vconf.h

Go to the documentation of this file.
00001 
00002 
00003 #ifndef VCONF_H
00004 #define VCONF_H
00005 
00009 
00010 #include <stdlib.h>
00011 
00012 #ifdef __cplusplus
00013 extern "C" {
00014 #endif /* __cplusplus */
00015 
00016 #include "vhash.h"
00017 #include "vlist.h"
00018 
00019 #define VCONF_FILE_STYLE_FLAT       0
00020 #define VCONF_FILE_STYLE_CHUNKED    1
00021 
00022 typedef struct vconf_s {
00023     const char * filename;
00024     vhash_t * options_hash;
00025     vlist_t * options_list;
00026     char delimiter;
00027     int style;
00028     int chunk;
00029     void *(VHASH_CDECL *malloc) (size_t);
00030     void (VHASH_CDECL *free) (void*);
00031 } vconf_t;
00032 
00033 
00034 vconf_t* new_vconf(
00035     void *(VHASH_CDECL *vconf_malloc) (size_t),
00036     void (VHASH_CDECL *vconf_free) (void *));
00037 
00038 void delete_vconf(
00039     vconf_t* vconf); 
00040 
00041 void vconf_clear_options(
00042     vconf_t* vconf);
00043 
00044 void vconf_set_delimiter(
00045     vconf_t* vconf, 
00046     char delimiter);
00047 
00048 int vconf_set_file_style(
00049     vconf_t* vconf, 
00050     int style);
00051 
00052 unsigned int vconf_chunk_count(
00053     vconf_t* vconf);
00054 
00055 int vconf_set_chunk(
00056     vconf_t* vconf, 
00057     unsigned int chunk);
00058 
00059 int vconf_read_file(
00060     vconf_t* vconf, 
00061     const char * filename);
00062 
00063 int vconf_write_file(
00064     vconf_t* vconf, 
00065     const char * filename);
00066 
00067 const char * vconf_get_filename(
00068     vconf_t* vconf);
00069 
00070 vhash_t * vconf_get_option_hash(
00071     vconf_t* vconf);
00072 
00073 const char * vconf_get_option(
00074     vconf_t* vconf, 
00075     const char * option);
00076 
00077 void vconf_set_option(
00078     vconf_t* vconf, 
00079     const char * option,
00080     const char * value);
00081 
00082 
00083 #ifdef __cplusplus
00084 } /* extern "C" */
00085 #endif /* __cplusplus */
00086 
00087 #endif /*VCONF_H*/
00088 
00089 

Generated on Tue Jan 6 22:41:37 2009 for Autodesk DWF 3D Toolkit by  doxygen 1.4.5