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

traces_conf_util.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 ********************************************************************/
00032 #ifndef __CONF_UTIL_H__
00033 #define __CONF_UTIL_H__
00034 
00035 
00036 #include <sys/types.h>
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00042 typedef enum {
00043         CONF_RDONLY = ((unsigned char) 0x01), /* Read only */
00044         CONF_RDWR = ((unsigned char) 0x02),   /* Read and write */
00045         CONF_CREATE = ((unsigned char) 0x04)  /* Create file */
00046 } ALPConfType;
00047 
00048 /* Read/get */
00049 char *prv_conf_read_string(const char *section, const char      *key, const char *def);
00050 int prv_conf_read_int   ( const char *section, const char *key, int def);
00051 int prv_conf_read_list( const char      *section, const char *key, int *argcp, char ***argvp);
00052 int prv_conf_get_sections (int  *argcp, char    ***argvp);
00053 int prv_conf_get_keys ( const char *section, int        *argcp, char    ***argvp);
00054 
00055 /* Write */
00056 int prv_conf_write_string       (const char     *section, const char *key, const char *value);
00057 int prv_conf_write_int  (const char     *section, const char *key, int value);
00058 int prv_conf_write_list (const char     *section, const char*key, int argc, char **argv);
00059 
00060 /* Removing */
00061 int prv_conf_delete_section     (const char     *section);
00062 int prv_conf_delete_key ( const char    *section, const char    *key);
00063 
00064 /* File mgt functions */
00065 int prv_conf_getfile (const char *path, const ALPConfType options);
00066 void prv_conf_close (void);
00067 int prv_conf_flush (void);
00068 
00069 
00070 #ifdef __cplusplus
00071 }
00072 #endif
00073 
00074 #endif  /* __CONF_UTIL_H__*/
00075 

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