Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

mntd_volume_manager_helper.h

00001 /***************************************************************************
00002  * CVSID: $Id: mntd_volume_manager_helper.h,v 1.6 2004/05/23 00:29:08 stefanb Exp $
00003  *
00004  * mntd_volume_manager_helper.h : Volume Manager handler for MNT daemon
00005  *
00006  * Copyright (C) 2004 Stefan Bambach, <stefan@bambach.biz>
00007  *
00008  * Licensed under the GNU General Public License 2.0
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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     /* boolean properties */
00041 #define HAL_PROPERTY_TRUE "true"
00042 #define HAL_PROPERTY_FALSE "false"
00043 
00044 /* info properties */
00045 #define HAL_PROPERTY_INFO_CATEGORY "info.category"
00046 #define HAL_PROPERTY_INFO_CATEGORY_VOLUME "volume"
00047 
00048 /* block device defines */
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 /* safe device handling */
00056 int vmh_hal_device_is_safe(const char *udi);
00057 int vmh_hal_device_is_volume(const char *udi);
00058 
00059 /* safe property handling */
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 /* setting safe volumes data */
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 /* __MNTD_VOLUME_MANAGER_HELPER_H__ */

Generated on Thu May 27 23:27:28 2004 for Mntd by doxygen 1.3.5