From 51cb6a0a44f8a70927de6516782e3a9a02b3b3dc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Jan 2013 18:52:14 +0100 Subject: conf: move struct definitions to ConfigData.hxx --- src/conf.h | 74 +------------------------------------------------------------- 1 file changed, 1 insertion(+), 73 deletions(-) (limited to 'src/conf.h') diff --git a/src/conf.h b/src/conf.h index 61c6cd9f7..b81b9ccdc 100644 --- a/src/conf.h +++ b/src/conf.h @@ -21,6 +21,7 @@ #define MPD_CONF_H #include "ConfigOption.hxx" +#include "ConfigData.hxx" #include "gcc.h" #include @@ -35,32 +36,6 @@ class Path; #endif -struct block_param { - char *name; - char *value; - int line; - - /** - * This flag is false when nobody has queried the value of - * this option yet. - */ - bool used; -}; - -struct config_param { - char *value; - unsigned int line; - - struct block_param *block_params; - unsigned num_block_params; - - /** - * This flag is false when nobody has queried the value of - * this option yet. - */ - bool used; -}; - /** * A GQuark for GError instances, resulting from malformed * configuration. @@ -135,56 +110,9 @@ G_GNUC_PURE unsigned config_get_positive(enum ConfigOption option, unsigned default_value); -G_GNUC_PURE -const struct block_param * -config_get_block_param(const struct config_param *param, const char *name); - G_GNUC_PURE bool config_get_bool(enum ConfigOption option, bool default_value); -G_GNUC_PURE -const char * -config_get_block_string(const struct config_param *param, const char *name, - const char *default_value); - -G_GNUC_MALLOC -static inline char * -config_dup_block_string(const struct config_param *param, const char *name, - const char *default_value) -{ - return g_strdup(config_get_block_string(param, name, default_value)); -} - -/** - * Same as config_dup_path(), but looks up the setting in the - * specified block. - */ -G_GNUC_MALLOC -char * -config_dup_block_path(const struct config_param *param, const char *name, - GError **error_r); - -G_GNUC_PURE -unsigned -config_get_block_unsigned(const struct config_param *param, const char *name, - unsigned default_value); - -G_GNUC_PURE -bool -config_get_block_bool(const struct config_param *param, const char *name, - bool default_value); - -G_GNUC_MALLOC -struct config_param * -config_new_param(const char *value, int line); - -void -config_param_free(struct config_param *param); - -void -config_add_block_param(struct config_param * param, const char *name, - const char *value, int line); - G_END_DECLS #endif -- cgit v1.2.3