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
00056 PVOLUME new_Volume(const char *udi, const char *base);
00057
00058
00062 struct VOLUME_ {
00063
00064 char *udi;
00065 char *device;
00066 char *mntpnt;
00067 char *fstype;
00068 char *base;
00069 int last_signal;
00077 int (*init) (PVOLUME pv);
00078
00083 void (*destroy) (PVOLUME pv);
00084
00094 int (*_send_signal) (PVOLUME pv, int what);
00095
00102 int (*_send_mounted) (PVOLUME pv);
00103
00110 int (*_send_unmounted) (PVOLUME pv);
00111
00119 int (*set_device) (PVOLUME pv, const char *device);
00120
00130 char *(*get_device) (PVOLUME pv);
00131
00137 void (*to_string) (PVOLUME pv);
00138
00146 int (*set_mntpnt) (PVOLUME pv, const char *mntpnt);
00147
00157 char *(*get_mntpnt) (PVOLUME pv);
00158
00166 int (*set_fstype) (PVOLUME pv, const char *fstype);
00167
00177 char *(*get_fstype) (PVOLUME pv);
00178
00185 int (*mount) (PVOLUME pv);
00186
00198 int (*umount) (PVOLUME pv);
00199
00206 int (*is_in_mntpath) (PVOLUME pv);
00207
00208 };
00209
00210
00211 #if defined(__cplusplus)
00212 }
00213 #endif
00214
00215 #endif