Home Download Musics Developers
API Sources Tools File Format Technicals

conf68.h

Go to the documentation of this file.
00001 
00011 #ifndef _CONF68_H_
00012 #define _CONF68_H_
00013 
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017 
00027 typedef enum {
00028   SC68CONFIG_UNDEFINED = 0, 
00029   SC68CONFIG_INT,           
00030   SC68CONFIG_STRING,        
00031   SC68CONFIG_ERROR = -1     
00032 } SC68config_type_t;
00033  
00035 typedef struct _SC68config_s SC68config_t;
00036 
00039 int SC68config_valid(SC68config_t * conf);
00040 
00049 int SC68config_get_idx(const SC68config_t * conf,
00050                        const char * name);
00051 
00063 SC68config_type_t SC68config_range(const SC68config_t * conf, int idx,
00064                                    int * min, int * max, int * def);
00065 
00075 SC68config_type_t SC68config_get(const SC68config_t * conf,
00076                                  int * v,
00077                                  const char ** name);
00078 
00090 SC68config_type_t SC68config_set(SC68config_t * conf,
00091                                  int idx,
00092                                  const char * name,
00093                                  int v,
00094                                  const char * s);
00095 
00098 int SC68config_load(SC68config_t * conf);
00099 
00102 int SC68config_save(SC68config_t * conf);
00103 
00106 int SC68config_default(SC68config_t * conf);
00107 
00109 SC68config_t * SC68config_create(int size);
00110 
00112 void SC68config_destroy(SC68config_t * conf);
00113 
00118 #ifdef __cplusplus
00119 }
00120 #endif
00121 
00122 #endif /* #ifndef _CONF68_H_ */