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

mntd_volume.h

00001 /***************************************************************************
00002  * CVSID: $Id: mntd_volume.h,v 1.15 2004/05/26 19:12:40 stefanb Exp $
00003  *
00004  * mntd_volume.h : Volume handler for MNT daemon
00005  *
00006  * Copyright (C) 2004 Stefan Bambach, <stefan@bambach.biz>
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_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     /* variables */
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 /* __MNTD_VOLUME_H__ */

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