[grilo] config: Add grl_config_get_source() function



commit 1de8dde1aab04d69efceb70cff31bbf43b8264eb
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Wed Apr 25 09:42:24 2012 +0000

    config: Add grl_config_get_source() function
    
    Returns the source id in the config object.
    
    Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>

 doc/grilo/grilo-sections.txt |    1 +
 src/data/grl-config.c        |   13 +++++++++++++
 src/data/grl-config.h        |    2 ++
 3 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/doc/grilo/grilo-sections.txt b/doc/grilo/grilo-sections.txt
index 36cef11..0dd312c 100644
--- a/doc/grilo/grilo-sections.txt
+++ b/doc/grilo/grilo-sections.txt
@@ -287,6 +287,7 @@ grl_config_set_api_secret
 grl_config_set_username
 grl_config_set_password
 grl_config_get_plugin
+grl_config_get_source
 grl_config_get_api_key
 grl_config_get_api_key_blob
 grl_config_get_api_token
diff --git a/src/data/grl-config.c b/src/data/grl-config.c
index ff7c55f..17a311e 100644
--- a/src/data/grl-config.c
+++ b/src/data/grl-config.c
@@ -394,6 +394,19 @@ grl_config_get_plugin (GrlConfig *config)
 }
 
 /**
+ * grl_config_get_source:
+ * @config: the config instance
+ *
+ * Returns: the source id
+ */
+gchar *
+grl_config_get_source (GrlConfig *config)
+{
+  return grl_config_get_string (GRL_CONFIG (config),
+                                GRL_CONFIG_KEY_SOURCE);
+}
+
+/**
  * grl_config_get_api_key:
  * @config: the config instance
  *
diff --git a/src/data/grl-config.h b/src/data/grl-config.h
index ebd7a35..020521c 100644
--- a/src/data/grl-config.h
+++ b/src/data/grl-config.h
@@ -117,6 +117,8 @@ void grl_config_set_password (GrlConfig *config, const gchar *password);
 
 gchar *grl_config_get_plugin (GrlConfig *config);
 
+gchar *grl_config_get_source (GrlConfig *config);
+
 gchar *grl_config_get_api_key (GrlConfig *config);
 
 guint8 *grl_config_get_api_key_blob (GrlConfig *config, gsize *size);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]