aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-account-settings.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-05 21:00:44 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-06 17:28:44 +0800
commit505305a0bc8f02ca770014682f0794b8c9353aef (patch)
tree84012aec08661542aacbe6ad0ebe7430a8b61b70 /libempathy/empathy-account-settings.c
parentc92e84c8b183d3fd5b18427d58a827b4bb865435 (diff)
downloadgsoc2013-empathy-505305a0bc8f02ca770014682f0794b8c9353aef.tar
gsoc2013-empathy-505305a0bc8f02ca770014682f0794b8c9353aef.tar.gz
gsoc2013-empathy-505305a0bc8f02ca770014682f0794b8c9353aef.tar.bz2
gsoc2013-empathy-505305a0bc8f02ca770014682f0794b8c9353aef.tar.lz
gsoc2013-empathy-505305a0bc8f02ca770014682f0794b8c9353aef.tar.xz
gsoc2013-empathy-505305a0bc8f02ca770014682f0794b8c9353aef.tar.zst
gsoc2013-empathy-505305a0bc8f02ca770014682f0794b8c9353aef.zip
account-settings: use TpProtocol's API to get TpConnectionManagerParam
https://bugzilla.gnome.org/show_bug.cgi?id=677465
Diffstat (limited to 'libempathy/empathy-account-settings.c')
-rw-r--r--libempathy/empathy-account-settings.c39
1 files changed, 9 insertions, 30 deletions
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index f88ff3dd7..7e3129766 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -689,25 +689,14 @@ empathy_account_settings_new_for_account (TpAccount *account)
NULL);
}
-TpConnectionManagerParam *
-empathy_account_settings_get_tp_params (EmpathyAccountSettings *settings)
+GList *
+empathy_account_settings_dup_tp_params (EmpathyAccountSettings *settings)
{
EmpathyAccountSettingsPriv *priv = GET_PRIV (settings);
- const TpConnectionManagerProtocol *tp_protocol;
- g_return_val_if_fail (priv->manager != NULL, NULL);
- g_return_val_if_fail (priv->protocol != NULL, NULL);
+ g_return_val_if_fail (priv->protocol_obj != NULL, NULL);
- tp_protocol = tp_connection_manager_get_protocol (priv->manager,
- priv->protocol);
- if (tp_protocol == NULL)
- {
- DEBUG ("Can't retrieve TpConnectionManagerProtocol for protocol '%s'",
- priv->protocol);
- return NULL;
- }
-
- return tp_protocol->params;
+ return tp_protocol_dup_params (priv->protocol_obj);
}
gboolean
@@ -800,23 +789,13 @@ empathy_account_settings_is_unset (EmpathyAccountSettings *settings,
return FALSE;
}
-static TpConnectionManagerParam *
+static const TpConnectionManagerParam *
empathy_account_settings_get_tp_param (EmpathyAccountSettings *settings,
const gchar *param)
{
- TpConnectionManagerParam *tp_params =
- empathy_account_settings_get_tp_params (settings);
- TpConnectionManagerParam *p;
-
- for (p = tp_params; p != NULL && p->name != NULL; p++)
- {
- if (tp_strdiff (p->name, param))
- continue;
-
- return p;
- }
+ EmpathyAccountSettingsPriv *priv = GET_PRIV (settings);
- return NULL;
+ return tp_protocol_get_param (priv->protocol_obj, param);
}
gboolean
@@ -853,7 +832,7 @@ const GValue *
empathy_account_settings_get_default (EmpathyAccountSettings *settings,
const gchar *param)
{
- TpConnectionManagerParam *p;
+ const TpConnectionManagerParam *p;
p = empathy_account_settings_get_tp_param (settings, param);
@@ -867,7 +846,7 @@ const gchar *
empathy_account_settings_get_dbus_signature (EmpathyAccountSettings *settings,
const gchar *param)
{
- TpConnectionManagerParam *p;
+ const TpConnectionManagerParam *p;
p = empathy_account_settings_get_tp_param (settings, param);