diff options
Diffstat (limited to 'libempathy')
-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); |