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

mntd_volume.h

00001 /***************************************************************************
00002  * CVSID: $Id: mntd_volume.h,v 1.20 2004/12/18 23:38:53 stefanb Exp $
00003  *
00004  * mntd_volume.h : Volume 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_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 
00057 PVOLUME new_Volume(const char *udi, const char *base, const char *prefix);
00058 
00059     
00063 struct VOLUME_ {
00064     /* variables */
00065     char *udi;               
00066     char *device;            
00067     char *mntpnt;            
00068     char *fstype;            
00069     char *base;              
00070     char *prefix;            
00071     int last_signal;         
00079     int (*init)                 (PVOLUME pv);
00080     
00085     void (*destroy)         (PVOLUME pv);
00086     
00096     int (*_send_signal)     (PVOLUME pv, int what);
00097     
00104     int (*_send_mounted)        (PVOLUME pv);
00105     
00112     int (*_send_unmounted)  (PVOLUME pv);
00113 
00120     int (*set_device)           (PVOLUME pv, const char *device);
00121     
00130     char *(*get_device)     (PVOLUME pv);
00131     
00136     void (*to_string)           (PVOLUME pv);
00137     
00144     int (*set_mntpnt)           (PVOLUME pv, const char *mntpnt);
00145     
00154     char *(*get_mntpnt)     (PVOLUME pv);
00155     
00162     int (*set_fstype)           (PVOLUME pv, const char *fstype);
00163     
00172     char *(*get_fstype)     (PVOLUME pv);
00173     
00179     int (*mount)                (PVOLUME pv);
00180     
00191     int (*umount)               (PVOLUME pv);
00192     
00199     int (*remount)              (PVOLUME pv, int flag);
00200 
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 Wed Mar 30 13:43:26 2005 for Mntd by  doxygen 1.3.9.1