diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-01-13 22:49:14 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-01-14 20:59:29 +0800 |
commit | 5d54cdabd84b5425e36596426dec5025e09f7de5 (patch) | |
tree | bd4068753279dfe565a91264aade9fe19ce9aa9c | |
parent | 398f69f13a9c9ee415fba5b1b393f27984b558bc (diff) | |
download | gsoc2013-empathy-5d54cdabd84b5425e36596426dec5025e09f7de5.tar gsoc2013-empathy-5d54cdabd84b5425e36596426dec5025e09f7de5.tar.gz gsoc2013-empathy-5d54cdabd84b5425e36596426dec5025e09f7de5.tar.bz2 gsoc2013-empathy-5d54cdabd84b5425e36596426dec5025e09f7de5.tar.lz gsoc2013-empathy-5d54cdabd84b5425e36596426dec5025e09f7de5.tar.xz gsoc2013-empathy-5d54cdabd84b5425e36596426dec5025e09f7de5.tar.zst gsoc2013-empathy-5d54cdabd84b5425e36596426dec5025e09f7de5.zip |
Stop using the old Capabilities iface if ContactCapabilities is implemented
-rw-r--r-- | libempathy/empathy-tp-contact-factory.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c index ffd3087da..b8be403c6 100644 --- a/libempathy/empathy-tp-contact-factory.c +++ b/libempathy/empathy-tp-contact-factory.c @@ -857,7 +857,13 @@ tp_contact_factory_add_contact (EmpathyTpContactFactory *tp_factory, G_OBJECT (tp_factory)); } - if (tp_proxy_has_interface_by_id (priv->connection, + if (priv->contact_caps_supported) { + tp_cli_connection_interface_contact_capabilities_call_get_contact_capabilities ( + priv->connection, -1, &handles, + tp_contact_factory_got_contact_capabilities, NULL, NULL, + G_OBJECT (tp_factory)); + } + else if (tp_proxy_has_interface_by_id (priv->connection, TP_IFACE_QUARK_CONNECTION_INTERFACE_CAPABILITIES)) { tp_cli_connection_interface_capabilities_call_get_capabilities ( priv->connection, -1, &handles, @@ -876,13 +882,6 @@ tp_contact_factory_add_contact (EmpathyTpContactFactory *tp_factory, NULL); } - if (priv->contact_caps_supported) { - tp_cli_connection_interface_contact_capabilities_call_get_contact_capabilities ( - priv->connection, -1, &handles, - tp_contact_factory_got_contact_capabilities, NULL, NULL, - G_OBJECT (tp_factory)); - } - DEBUG ("Contact added: %s (%d)", empathy_contact_get_id (contact), empathy_contact_get_handle (contact)); @@ -1429,18 +1428,6 @@ connection_ready_cb (TpConnection *connection, NULL, NULL, G_OBJECT (tp_factory), NULL); - tp_cli_connection_interface_capabilities_connect_to_capabilities_changed (priv->connection, - tp_contact_factory_capabilities_changed_cb, - NULL, NULL, - G_OBJECT (tp_factory), - NULL); - - - tp_cli_connection_interface_location_connect_to_location_updated (priv->connection, - tp_contact_factory_location_updated_cb, - NULL, NULL, - G_OBJECT (tp_factory), - NULL); if (tp_proxy_has_interface_by_id (connection, TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_CAPABILITIES)) { @@ -1450,6 +1437,19 @@ connection_ready_cb (TpConnection *connection, priv->connection, tp_contact_factory_contact_capabilities_changed_cb, NULL, NULL, G_OBJECT (tp_factory), NULL); } + else { + tp_cli_connection_interface_capabilities_connect_to_capabilities_changed (priv->connection, + tp_contact_factory_capabilities_changed_cb, + NULL, NULL, + G_OBJECT (tp_factory), + NULL); + } + + tp_cli_connection_interface_location_connect_to_location_updated (priv->connection, + tp_contact_factory_location_updated_cb, + NULL, NULL, + G_OBJECT (tp_factory), + NULL); tp_cli_connection_interface_avatars_call_get_avatar_requirements (priv->connection, -1, |