diff options
author | Bastien Nocera <hadess@hadess.net> | 2014-08-25 17:04:27 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2014-09-02 21:56:38 +0200 |
commit | 07fa35c42b4ddab4bdc4ae0172aefac0258fe71e (patch) | |
tree | 64c86401c9ecb3df14bbfeed381a4e4d42498067 | |
parent | 90082ec5d4453ddafcfecdc867fa7f46f8aac2d4 (diff) | |
download | upower-07fa35c42b4ddab4bdc4ae0172aefac0258fe71e.tar.gz |
daemon: Add helper to get string from config
https://bugs.freedesktop.org/show_bug.cgi?id=82925
-rw-r--r-- | src/up-config.c | 10 | ||||
-rw-r--r-- | src/up-config.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/up-config.c b/src/up-config.c index 8973f85..703774a 100644 --- a/src/up-config.c +++ b/src/up-config.c @@ -71,6 +71,16 @@ up_config_get_uint (UpConfig *config, const gchar *key) } /** + * up_config_get_string: + **/ +gchar * +up_config_get_string (UpConfig *config, const gchar *key) +{ + return g_key_file_get_string (config->priv->keyfile, + "UPower", key, NULL); +} + +/** * up_config_class_init: **/ static void diff --git a/src/up-config.h b/src/up-config.h index e58a700..f02d37a 100644 --- a/src/up-config.h +++ b/src/up-config.h @@ -52,6 +52,8 @@ gboolean up_config_get_boolean (UpConfig *config, const gchar *key); guint up_config_get_uint (UpConfig *config, const gchar *key); +gchar *up_config_get_string (UpConfig *config, + const gchar *key); G_END_DECLS |