diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2010-09-04 04:45:08 +0800 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2010-09-09 05:12:01 +0800 |
commit | 0d31be0718c4624eaa17778f60f953f261f7487d (patch) | |
tree | 56ee043920d765ce777a458ad6a17dab116936e3 | |
parent | c7630607a2ad03c27ee42b95093ada15d54087b9 (diff) | |
download | gsoc2013-empathy-0d31be0718c4624eaa17778f60f953f261f7487d.tar gsoc2013-empathy-0d31be0718c4624eaa17778f60f953f261f7487d.tar.gz gsoc2013-empathy-0d31be0718c4624eaa17778f60f953f261f7487d.tar.bz2 gsoc2013-empathy-0d31be0718c4624eaa17778f60f953f261f7487d.tar.lz gsoc2013-empathy-0d31be0718c4624eaa17778f60f953f261f7487d.tar.xz gsoc2013-empathy-0d31be0718c4624eaa17778f60f953f261f7487d.tar.zst gsoc2013-empathy-0d31be0718c4624eaa17778f60f953f261f7487d.zip |
Add support for 'as' in account settings
-rw-r--r-- | libempathy/empathy-account-settings.c | 26 | ||||
-rw-r--r-- | libempathy/empathy-account-settings.h | 5 |
2 files changed, 31 insertions, 0 deletions
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c index c470ce052..43bba44e6 100644 --- a/libempathy/empathy-account-settings.c +++ b/libempathy/empathy-account-settings.c @@ -682,6 +682,20 @@ empathy_account_settings_get_string (EmpathyAccountSettings *settings, return g_value_get_string (v); } +const gchar * const * +empathy_account_settings_get_strv (EmpathyAccountSettings *settings, + const gchar *param) +{ + const GValue *v; + + v = empathy_account_settings_get (settings, param); + + if (v == NULL || !G_VALUE_HOLDS (v, G_TYPE_STRV)) + return NULL; + + return g_value_get_boxed (v); +} + gint32 empathy_account_settings_get_int32 (EmpathyAccountSettings *settings, const gchar *param) @@ -857,6 +871,18 @@ empathy_account_settings_set_string (EmpathyAccountSettings *settings, } void +empathy_account_settings_set_strv (EmpathyAccountSettings *settings, + const gchar *param, + gchar **value) +{ + EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); + + tp_asv_set_strv (priv->parameters, param, value); + + account_settings_remove_from_unset (settings, param); +} + +void empathy_account_settings_set_int32 (EmpathyAccountSettings *settings, const gchar *param, gint32 value) diff --git a/libempathy/empathy-account-settings.h b/libempathy/empathy-account-settings.h index 419476b3e..7b1a4d6f9 100644 --- a/libempathy/empathy-account-settings.h +++ b/libempathy/empathy-account-settings.h @@ -103,6 +103,9 @@ empathy_account_settings_get_default (EmpathyAccountSettings *settings, const gchar *empathy_account_settings_get_string ( EmpathyAccountSettings *settings, const gchar *param); +const gchar * const * empathy_account_settings_get_strv ( + EmpathyAccountSettings *settings, + const gchar *param); gint32 empathy_account_settings_get_int32 (EmpathyAccountSettings *settings, const gchar *param); @@ -117,6 +120,8 @@ gboolean empathy_account_settings_get_boolean (EmpathyAccountSettings *settings, void empathy_account_settings_set_string (EmpathyAccountSettings *settings, const gchar *param, const gchar *value); +void empathy_account_settings_set_strv (EmpathyAccountSettings *settings, + const gchar *param, gchar **value); void empathy_account_settings_set_int32 (EmpathyAccountSettings *settings, const gchar *param, gint32 value); |