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 __LIBMNT_H__
00027 #define __LIBMNT_H__
00028
00029 #include <dbus/dbus.h>
00030
00031 #if defined(__cplusplus)
00032 extern "C" {
00033 #endif
00034
00035 #define DBUS_SERVICE_MNT "biz.bambach.Mnt"
00036 #define DBUS_PATH_MNT_MANAGER "/biz/bambach/Mnt/Manager"
00037 #define DBUS_INTERFACE_MNT_MANAGER "biz.bambach.Mnt.Manager"
00038 #define DBUS_INTERFACE_MNT_VOLUME "biz.bambach.Mnt.Volume"
00039 #define DBUS_ERROR_NO_SUCH_DEVICE "biz.bambach.Mnt.NoSuchDevice"
00040 #define DBUS_ERROR_SYNTAX "biz.bambach.Mnt.SyntaxError"
00041 #define DBUS_ERROR_NO_MNTPNT "biz.bambach.Mnt.NoMntPnt"
00042
00043
00048 typedef void (*LibMntMainLoop)(DBusConnection* dbus_connection, void *user_data);
00049
00050
00055 typedef void (*LibMntVolumeMounted)(const char* udi, const char* mntpnt, void *user_data);
00056
00057
00062 typedef void (*LibMntVolumeUnmounted)(const char* udi, const char* mntpnt, void *user_data);
00063
00064
00069 typedef struct LIBMNTFUNCS_
00070 {
00072 LibMntMainLoop main_loop;
00073
00075 LibMntVolumeMounted volume_mounted;
00076
00078 LibMntVolumeUnmounted volume_unmounted;
00079
00080 } LIBMNTFUNCS, *PLIBMNTFUNCS;
00081
00082
00083 int mnt_init(PLIBMNTFUNCS functions, void *user_data);
00084 int mnt_quit(void);
00085 char **mnt_get_all_volumes(int *num_volumes);
00086 char *mnt_get_mntpnt(char *udi);
00087
00088
00089 #if defined(__cplusplus)
00090 }
00091 #endif
00092
00093 #endif