aboutsummaryrefslogtreecommitdiff
path: root/src/conf.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-30 18:52:14 +0100
committerMax Kellermann <max@duempel.org>2013-01-30 21:36:07 +0100
commit51cb6a0a44f8a70927de6516782e3a9a02b3b3dc (patch)
treebcbccc4ef69556e79ad81e8945a4e1632c40fa35 /src/conf.h
parenta1b1ec3d11f78108fb50129a027211b8bc2b2110 (diff)
conf: move struct definitions to ConfigData.hxx
Diffstat (limited to 'src/conf.h')
-rw-r--r--src/conf.h74
1 files changed, 1 insertions, 73 deletions
diff --git a/src/conf.h b/src/conf.h
index 61c6cd9f..b81b9ccd 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 <stdbool.h>
@@ -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.
@@ -136,55 +111,8 @@ 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