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

mounthandler.h

Go to the documentation of this file.
00001 /*
00002 ** Copyright (C) 2004 Russell Leighton
00003 **
00004 ** This program is free software; you can redistribute it and/or modify
00005 ** it under the terms of the GNU General Public License as published by
00006 ** the Free Software Foundation; either version 2 of the License, or
00007 ** (at your option) any later version.
00008 **
00009 ** This program is distributed in the hope that it will be useful,
00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 ** GNU General Public License for more details.
00013 **
00014 ** You should have received a copy of the GNU General Public License
00015 ** along with this program; if not, write to the Free Software
00016 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 */
00018 
00019 
00020 
00021 
00022 #ifndef __AWHANDLER_MOUNT__
00023 #define __AWHANDLER_MOUNT__
00024 
00025 #include "monitor.h"
00026 #include "wire.h"
00027 
00078 /*
00079 
00080 Changes:
00081 
00082 02/10/04 Russell Leighton
00083 Port to handler
00084 
00085 */
00086 
00090 typedef struct {
00091 
00092   aw_event_sig_t
00093     used,                      /* number of 1K blocks used */
00094     avail,                     /* number of 1K blocks available */
00095     percentused;               /* 100 * used / (used + avail) */
00096 
00097 } aw_mounthandler_events_t;
00098 
00099 
00103 typedef struct {
00104 
00105   aw_handler_t 
00106     handler_header;
00107 
00108   aw_mounthandler_events_t
00109     events;
00110 
00111   byte_t 
00112    *filename;            /* path in the files system of interest */
00113 
00114 } aw_mounthandler_t ;
00115 
00126 aw_mounthandler_t *aw_create_mounthandler(const aw_mounthandler_events_t *events,
00127                                           const byte_t *filename,
00128                                           int32_t (*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00129                                           int32_t (*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00130                                           const aw_alarm_sched_t *sched,
00131                                           aw_logger_t *logger
00132                                           );
00133 
00138 void aw_free_mounthandler(aw_mounthandler_t *h);
00139 
00143 aw_handler_t *aw_wire_mounthandler(aw_wire_mkhandler_args_t *args);
00144 
00145 #endif
Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)