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_H__
00027 #define __MNTD_VOLUME_H__
00028
00029 #include <dbus/dbus.h>
00030
00031 #include "mntd_volume_types.h"
00032
00033 #if defined(__cplusplus)
00034 extern "C" {
00035 #endif
00036
00037
00038 enum {
00039 VOLUME_TYPE=1
00040 };
00041
00042 enum {
00043 SIGNAL_UNKNOWN=1,
00044 SIGNAL_MOUNTED=2,
00045 SIGNAL_UNMOUNTED=3
00046 };
00047
00048
00057 PVOLUME new_Volume(const char *udi, const char *base, const char *prefix);
00058
00059
00063 struct VOLUME_ {
00064
00065 char *udi;
00066 char *device;
00067 char *mntpnt;
00068 char *fstype;
00069 char *base;
00070 char *prefix;
00071 int last_signal;
00079 int (*init) (PVOLUME pv);
00080
00085 void (*destroy) (PVOLUME pv);
00086
00096 int (*_send_signal) (PVOLUME pv, int what);
00097
00104 int (*_send_mounted) (PVOLUME pv);
00105
00112 int (*_send_unmounted) (PVOLUME pv);
00113
00120 int (*set_device) (PVOLUME pv, const char *device);
00121
00130 char *(*get_device) (PVOLUME pv);
00131
00136 void (*to_string) (PVOLUME pv);
00137
00144 int (*set_mntpnt) (PVOLUME pv, const char *mntpnt);
00145
00154 char *(*get_mntpnt) (PVOLUME pv);
00155
00162 int (*set_fstype) (PVOLUME pv, const char *fstype);
00163
00172 char *(*get_fstype) (PVOLUME pv);
00173
00179 int (*mount) (PVOLUME pv);
00180
00191 int (*umount) (PVOLUME pv);
00192
00199 int (*remount) (PVOLUME pv, int flag);
00200
00206 int (*is_in_mntpath) (PVOLUME pv);
00207
00208 };
00209
00210
00211 #if defined(__cplusplus)
00212 }
00213 #endif
00214
00215 #endif