00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef __MNTD_VOLUME_MANAGER_HELPER_H__
00027 #define __MNTD_VOLUME_MANAGER_HELPER_H__
00028
00029 #include <glib.h>
00030 #include <dbus/dbus.h>
00031
00032 #include "mntd_volume_manager_types.h"
00033 #include "mntd_volume_types.h"
00034
00035 #if defined(__cplusplus)
00036 extern "C" {
00037 #endif
00038
00039
00040
00041 #define HAL_PROPERTY_TRUE "true"
00042 #define HAL_PROPERTY_FALSE "false"
00043
00044
00045 #define HAL_PROPERTY_INFO_CATEGORY "info.category"
00046 #define HAL_PROPERTY_INFO_CATEGORY_VOLUME "volume"
00047
00048
00049 #define HAL_PROPERTY_BLOCK_DEVICE "block.device"
00050 #define HAL_PROPERTY_BLOCK_IS_VOLUME "block.is_volume"
00051 #define HAL_PROPERTY_BLOCK_MOUNT_POINT "block.mount_point"
00052 #define HAL_PROPERTY_BLOCK_FSTYPE "block.fstype"
00053
00054
00055
00056 int vmh_hal_device_is_safe(const char *udi);
00057 int vmh_hal_device_is_volume(const char *udi);
00058
00059
00060 int vmh_hal_device_is_safe_property(const char *udi, const char *key);
00061 int vmh_hal_device_get_safe_property_string(const char *udi, const char *key, char **result);
00062 int vmh_hal_device_get_safe_property_int(const char *udi, const char *key, int *result);
00063 int vmh_hal_device_get_safe_property_double(const char *udi, const char *key, double *result);
00064 int vmh_hal_device_get_safe_property_bool(const char *udi, const char *key, int *result);
00065
00066
00067 int vmh_try_n_set_volumes_device(PVOLUME pv, const char *udi);
00068 int vmh_try_n_set_volumes_mntpnt(PVOLUME pv, const char *udi);
00069 int vmh_try_n_set_volumes_fstype(PVOLUME pv, const char *udi);
00070 int vmh_try_n_set_volumes_data(PVOLUME pv, const char *udi);
00071 int vmh_try_n_set_volumes_data_by_property(PVOLUME pv, const char *udi, const char *property);
00072
00073
00074 #if defined(__cplusplus)
00075 }
00076 #endif
00077
00078 #endif