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

mntd_volume_manager.h

00001 /***************************************************************************
00002  * CVSID: $Id: mntd_volume_manager.h,v 1.21 2004/12/18 23:38:53 stefanb Exp $
00003  *
00004  * mntd_volume_manager.h : Volume Manager handler for MNT daemon
00005  *
00006  * Copyright (C) 2004 Stefan Bambach, <sbambach@gmx.net>
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_H__
00027 #define __MNTD_VOLUME_MANAGER_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 #include "mntd_volume_hash.h"
00035 
00036 #if defined(__cplusplus)
00037 extern "C" {
00038 #endif
00039 
00040 
00048 PVOLUMEMANAGER new_VolumeManager(const char *base, const char *prefix);
00049 
00050     
00054 struct VOLUMEMANAGER_ {
00055     /* variables */
00056     PHASHMAP phm;                
00057     char *base;                  
00058     char *prefix;                
00066     int (*init)                             (PVOLUMEMANAGER pvm);
00067 
00072     void (*destroy)                     (PVOLUMEMANAGER pvm);
00073     
00078     void (*rescan)                          (PVOLUMEMANAGER pvm);
00079     
00086     char *(*get_mntpnt)                 (PVOLUMEMANAGER pvm, const char *udi);
00087     
00094     int (*contains)                     (PVOLUMEMANAGER pvm, const char *udi);
00095 
00102     void (*foreach_mounted)             (PVOLUMEMANAGER pvm,
00103                                                 int (*func)(void *data, void *userdata), 
00104                                                 void *userdata);
00105                                                 
00113     void (*add_volume)                  (PVOLUMEMANAGER pvm, const char *udi);
00114     
00122     void (*remove_volume)               (PVOLUMEMANAGER pvm, const char *udi);
00123     
00131     int (*remount)                          (PVOLUMEMANAGER pvm, const char *udi, int flag);
00132     
00133 };
00134 
00135 
00136 #if defined(__cplusplus)
00137 }
00138 #endif
00139 
00140 #endif /* __MNTD_VOLUME_MANAGER_H__ */

Generated on Wed Mar 30 13:43:27 2005 for Mntd by  doxygen 1.3.9.1