aboutsummaryrefslogtreecommitdiffstats
path: root/src/conf.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-17 20:23:27 +0100
committerMax Kellermann <max@duempel.org>2009-01-17 20:23:27 +0100
commit4d472c265ed0b3f7f61ee624c01c8ef319db7c99 (patch)
tree8ec3ea874c741c9b0e1ab70db2a96e02acec8225 /src/conf.h
parent2bbf378dd8a3f12b4b79228ce562402c29d2cd09 (diff)
downloadmpd-4d472c265ed0b3f7f61ee624c01c8ef319db7c99.tar.gz
mpd-4d472c265ed0b3f7f61ee624c01c8ef319db7c99.tar.xz
mpd-4d472c265ed0b3f7f61ee624c01c8ef319db7c99.zip
conf: no CamelCase, part I
Renamed functions, types, variables.
Diffstat (limited to 'src/conf.h')
-rw-r--r--src/conf.h43
1 files changed, 27 insertions, 16 deletions
diff --git a/src/conf.h b/src/conf.h
index a50273e6e..97713f0af 100644
--- a/src/conf.h
+++ b/src/conf.h
@@ -68,46 +68,57 @@
#define CONF_BOOL_UNSET -1
#define CONF_BOOL_INVALID -2
-typedef struct _BlockParam {
+struct block_param {
char *name;
char *value;
int line;
-} BlockParam;
+};
-typedef struct _ConfigParam {
+struct config_param {
char *value;
unsigned int line;
- BlockParam *blockParams;
- int numberOfBlockParams;
-} ConfigParam;
-void initConf(void);
-void finishConf(void);
+ struct block_param *block_params;
+ int num_block_params;
+};
-void readConf(const char *file);
+void config_global_init(void);
+void config_global_finish(void);
+
+void config_read_file(const char *file);
/* don't free the returned value
set _last_ to NULL to get first entry */
-ConfigParam *getNextConfigParam(const char *name, ConfigParam * last);
+struct config_param *
+config_get_next_param(const char *name, struct config_param *last);
-#define getConfigParam(name) getNextConfigParam(name, NULL)
+static inline struct config_param *
+config_get_param(const char *name)
+{
+ return config_get_next_param(name, NULL);
+}
char *getConfigParamValue(const char *name);
-BlockParam *getBlockParam(ConfigParam * param, const char *name);
+struct block_param *
+getBlockParam(struct config_param *param, const char *name);
-ConfigParam *parseConfigFilePath(const char *name, int force);
+struct config_param *
+parseConfigFilePath(const char *name, int force);
int getBoolConfigParam(const char *name, int force);
bool config_get_bool(const char *name, bool default_value);
-int getBoolBlockParam(ConfigParam *param, const char *name, int force);
+int
+getBoolBlockParam(struct config_param *param, const char *name, int force);
-ConfigParam *newConfigParam(const char *value, int line);
+struct config_param *
+newConfigParam(const char *value, int line);
void config_param_free(gpointer data, gpointer user_data);
-void addBlockParam(ConfigParam * param, const char *name, const char *value, int line);
+void
+addBlockParam(struct config_param *param, const char *name, const char *value, int line);
#endif