diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-03-31 23:06:12 +1100 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-03-31 23:13:31 +1100 |
commit | 5c1a25405b0e9c857d8b83337f1fd961a2cdd910 (patch) | |
tree | ef469e62fddec0ef9d3a9b0b6002c2e5bd116843 /telepathy-glib/account.c | |
parent | 11b018caa3e3df9e5968ad07bf80f2843cc5bb2c (diff) | |
download | telepathy-glib-5c1a25405b0e9c857d8b83337f1fd961a2cdd910.tar.gz |
tp-account: check Interfaces property and append interface to TpProxy
Diffstat (limited to 'telepathy-glib/account.c')
-rw-r--r-- | telepathy-glib/account.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c index 75f6375af..48202611f 100644 --- a/telepathy-glib/account.c +++ b/telepathy-glib/account.c @@ -444,6 +444,27 @@ _tp_account_update (TpAccount *account, TpConnectionStatus old_s = priv->connection_status; gboolean presence_changed = FALSE; + if (g_hash_table_lookup (properties, "Interfaces") != NULL) + { + gchar **interfaces, **iter; + + interfaces = tp_asv_get_boxed (properties, "Interfaces", G_TYPE_STRV); + + for (iter = interfaces; *iter != NULL; iter++) + { + if (tp_dbus_check_valid_interface_name (*iter, NULL)) + { + GQuark q = g_quark_from_string (*iter); + + tp_proxy_add_interface_by_id ((TpProxy *) account, q); + } + else + { + DEBUG ("\t\tInterface %s not valid", *iter); + } + } + } + if (g_hash_table_lookup (properties, "ConnectionStatus") != NULL) priv->connection_status = tp_asv_get_uint32 (properties, "ConnectionStatus", NULL); |