Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

volumesvcs.h

Go to the documentation of this file.
00001 /********************************************************************
00002 
00003 Copyright 2006, ACCESS Systems Americas, Inc. All rights reserved.
00004 
00005 The contents of this file are subject to the Mozilla Public License Version
00006 1.1 (the "License"); you may not use this file except in compliance with
00007 the License. You may obtain a copy of the License at
00008 http://www.mozilla.org/MPL/
00009 
00010 Software distributed under the License is distributed on an "AS IS" basis,
00011 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012 for the specific language governing rights and limitations under the
00013 License.
00014 
00015 The Original Code is the entire contents of this file.
00016 
00017 The Initial Developer of the Original Code is ACCESS Systems Americas, Inc.
00018 
00019 Portions created by ACCESS Systems Americas, Inc. are Copyright © 2006. All
00020 Rights Reserved.
00021 
00022 Contributor(s): none.
00023 
00024 ********************************************************************/
00030 #ifndef SERVER_VOLUMESVCS_H
00031 #define SERVER_VOLUMESVCS_H
00032 
00033 #include <sys/mount.h>
00034 #include <hiker/volumesvcs_types.h>
00035 #include <hiker/prv/volumesvcs_prv.h>
00036 #include <stdlib.h>
00037 #include <hiker/traces.h>
00038 #include <glib.h>
00039 #include <time.h>
00040 
00041 extern int gtracelevel;
00042 #define TRACELEVEL 0  // 0 - none, 1 - some, 2 - more, 3 - you've got to be kidding
00043 #define MAX_TRACELEVEL 3
00044 #if ALP_TRACE == ALP_TRACE_ON
00045 #define ALP_VSTL(level, str, ...) \
00046         if (level <= gtracelevel)  \
00047                 ALP_TM(TL(ALP_CLASS_VOLUMESVCS, "%s():@%d " str, __PRETTY_FUNCTION__,time(NULL), ## __VA_ARGS__))
00048 #else
00049 #define ALP_VSTL(leve, str, ...)
00050 #endif
00051 #define MEMCHECK(p) ALP_FAIL_FATAL_IF( p == NULL, "out of memory")
00052 
00053 #define AisBsParent(a,b) ( a->sys_dev_path && b->sys_dev_path && !strncmp(a->sys_dev_path, b->sys_dev_path, strlen(a->sys_dev_path)) )
00054 
00055 #define MOUNTROOT "/media"
00056 #define MOUNT_OPTIONS MS_NOATIME+MS_NODEV+MS_NOSUID+MS_SYNCHRONOUS
00057 #define UMOUNT_OPTIONS MNT_FORCE // MNT_EXPIRE MNT_DETACH are other possible options
00058 #define NOTIFY_TIMEOUT 0
00059 
00060 #define ACCESS_UDI_ROOT "/access/ALP/volumesvcs/"
00061 
00062 typedef struct _prv_slot {
00063         char *dev_path;                         
00064         char *name;                                     
00065         int refcnt;                                     
00066 } prv_slot_t;
00067 
00068 typedef struct _prv_fsinfo {
00069         AlpVolumeSvcsFSinfo pub;   
00070 
00071         gchar *sys_dev_path;       
00072         prv_slot_t *slotp;                 
00073         gchar *fstype;                     
00074         gchar *parent_udi;
00075         int     major;
00076         int minor;
00077 } prv_fsinfo_t;
00078 
00079 #endif
00080 

Generated on Sat Dec 16 20:29:47 2006 for hiker-0.9 by  doxygen 1.4.4