00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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),
00044 CONF_RDWR = ((unsigned char) 0x02),
00045 CONF_CREATE = ((unsigned char) 0x04)
00046 } ALPConfType;
00047
00048
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
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
00061 int prv_conf_delete_section (const char *section);
00062 int prv_conf_delete_key ( const char *section, const char *key);
00063
00064
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
00075