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

libmnt.h

00001 /***************************************************************************
00002  * CVSID: $Id: libmnt.h,v 1.11 2004/05/23 14:41:54 stefanb Exp $
00003  *
00004  * libmnt.h : main() for MNT daemon
00005  *
00006  * Copyright (C) 2004 Stefan Bambach, <stefan@bambach.biz>
00007  *
00008  * Licensed under the GNU Lesser General Public License 2.1
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 __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 /* __LIBMNT_H__ */

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