Server/Coke - Improved logging
[tpg/opendispense2.git] / src / common / config.h
index 1e7583e..34d7dc6 100644 (file)
@@ -9,9 +9,7 @@
 #ifndef _CONFIG_H_
 #define _CONFIG_H_
 
-#include <regex.h>
-extern void    CompileRegex(regex_t *Regex, const char *Pattern, int Flags);
-extern int     RunRegex(regex_t *regex, const char *string, int nMatches, regmatch_t *matches, const char *errorMessage);
+#include <stdbool.h>   // Because C
 
 // === HELPER MACROS ===
 #define _EXPSTR(x)      #x
@@ -22,11 +20,15 @@ extern int  RunRegex(regex_t *regex, const char *string, int nMatches, regmatch_t
 
 
 // --- 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

UCC git Repository :: git.ucc.asn.au