X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fcommon%2Fconfig.h;h=34d7dc684e1f078abf04dcb5e4307cd11fe37a10;hb=857e7c75bb043a518ea0e724e635f68702ba33d0;hp=901cad849255beded2ccec1a5e8105627e8c79d5;hpb=0cad3846c334d2bc25724bc50b7b69e5e0dab8e4;p=tpg%2Fopendispense2.git diff --git a/src/common/config.h b/src/common/config.h index 901cad8..34d7dc6 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -9,6 +9,8 @@ #ifndef _CONFIG_H_ #define _CONFIG_H_ +#include // Because C + // === HELPER MACROS === #define _EXPSTR(x) #x #define EXPSTR(x) _EXPSTR(x) @@ -18,11 +20,15 @@ // --- Config Database --- -extern void Config_ParseFile(const char *Filename); +extern int Config_ParseFile(const char *Filename); + extern void Config_AddValue(const char *Key, const char *Value); + extern int Config_GetValueCount(const char *KeyName); -extern const char *Config_GetValue(const char *KeyName, int Index); -extern int Config_GetValue_Bool(const char *KeyName, int Index); -extern int Config_GetValue_Int(const char *KeyName, int Index); +extern const char *Config_GetValue_Idx(const char *KeyName, int Index); + +extern bool Config_GetValue_Str(const char *KeyName, const char** ValPtr); +extern bool Config_GetValue_Bool(const char *KeyName, bool* ValPtr); +extern bool Config_GetValue_Int(const char *KeyName, int* ValPtr); #endif