diff options
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-connectivity.c | 2 | ||||
-rw-r--r-- | libempathy/empathy-contact-list.c | 6 | ||||
-rw-r--r-- | libempathy/empathy-contact.c | 12 | ||||
-rw-r--r-- | libempathy/empathy-contact.h | 4 | ||||
-rw-r--r-- | libempathy/empathy-dispatch-operation.c | 35 |
5 files changed, 27 insertions, 32 deletions
diff --git a/libempathy/empathy-connectivity.c b/libempathy/empathy-connectivity.c index f6a723ef6..f02b7588b 100644 --- a/libempathy/empathy-connectivity.c +++ b/libempathy/empathy-connectivity.c @@ -403,7 +403,7 @@ empathy_connectivity_set_use_conn (EmpathyConnectivity *connectivity, if (use_conn == priv->use_conn) return; - DEBUG ("use_conn gconf key changed; new value = %s", + DEBUG ("use_conn GSetting key changed; new value = %s", use_conn ? "true" : "false"); priv->use_conn = use_conn; diff --git a/libempathy/empathy-contact-list.c b/libempathy/empathy-contact-list.c index 5cbe1cb15..631bb4a37 100644 --- a/libempathy/empathy-contact-list.c +++ b/libempathy/empathy-contact-list.c @@ -251,12 +251,10 @@ gboolean empathy_contact_list_is_favourite (EmpathyContactList *list, EmpathyContact *contact) { -#if HAVE_FAVOURITE_CONTACTS if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->is_favourite) { return EMPATHY_CONTACT_LIST_GET_IFACE (list)->is_favourite ( list, contact); } -#endif /* HAVE_FAVOURITE_CONTACTS */ return FALSE; } @@ -265,22 +263,18 @@ void empathy_contact_list_add_to_favourites (EmpathyContactList *list, EmpathyContact *contact) { -#if HAVE_FAVOURITE_CONTACTS if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->add_favourite) { EMPATHY_CONTACT_LIST_GET_IFACE (list)->add_favourite (list, contact); } -#endif /* HAVE_FAVOURITE_CONTACTS */ } void empathy_contact_list_remove_from_favourites (EmpathyContactList *list, EmpathyContact *contact) { -#if HAVE_FAVOURITE_CONTACTS if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->remove_favourite) { EMPATHY_CONTACT_LIST_GET_IFACE (list)->remove_favourite (list, contact); } -#endif /* HAVE_FAVOURITE_CONTACTS */ } diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index cbd3bd0ae..ba695ca57 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -970,7 +970,7 @@ empathy_contact_can_send_files (EmpathyContact *contact) } gboolean -empathy_contact_can_use_stream_tube (EmpathyContact *contact) +empathy_contact_can_use_rfb_stream_tube (EmpathyContact *contact) { EmpathyContactPriv *priv; @@ -978,7 +978,7 @@ empathy_contact_can_use_stream_tube (EmpathyContact *contact) priv = GET_PRIV (contact); - return priv->capabilities & EMPATHY_CAPABILITIES_STREAM_TUBE; + return priv->capabilities & EMPATHY_CAPABILITIES_RFB_STREAM_TUBE; } static gchar * @@ -1448,7 +1448,13 @@ tp_caps_to_capabilities (TpCapabilities *caps) } else if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE)) { - capabilities |= EMPATHY_CAPABILITIES_STREAM_TUBE; + const gchar *service; + + service = tp_asv_get_string (fixed_prop, + TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE); + + if (!tp_strdiff (service, "rfb")) + capabilities |= EMPATHY_CAPABILITIES_RFB_STREAM_TUBE; } else if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA)) diff --git a/libempathy/empathy-contact.h b/libempathy/empathy-contact.h index ddb3f66c0..b5f24d0c5 100644 --- a/libempathy/empathy-contact.h +++ b/libempathy/empathy-contact.h @@ -65,7 +65,7 @@ typedef enum { EMPATHY_CAPABILITIES_AUDIO = 1 << 0, EMPATHY_CAPABILITIES_VIDEO = 1 << 1, EMPATHY_CAPABILITIES_FT = 1 << 2, - EMPATHY_CAPABILITIES_STREAM_TUBE = 1 << 3, + EMPATHY_CAPABILITIES_RFB_STREAM_TUBE = 1 << 3, EMPATHY_CAPABILITIES_UNKNOWN = 1 << 7 } EmpathyCapabilities; @@ -106,7 +106,7 @@ gboolean empathy_contact_can_voip (EmpathyContact *contact); gboolean empathy_contact_can_voip_audio (EmpathyContact *contact); gboolean empathy_contact_can_voip_video (EmpathyContact *contact); gboolean empathy_contact_can_send_files (EmpathyContact *contact); -gboolean empathy_contact_can_use_stream_tube (EmpathyContact *contact); +gboolean empathy_contact_can_use_rfb_stream_tube (EmpathyContact *contact); gboolean empathy_contact_load_avatar_cache (EmpathyContact *contact, const gchar *token); diff --git a/libempathy/empathy-dispatch-operation.c b/libempathy/empathy-dispatch-operation.c index 68777a50e..83cf72483 100644 --- a/libempathy/empathy-dispatch-operation.c +++ b/libempathy/empathy-dispatch-operation.c @@ -217,6 +217,7 @@ dispatch_operation_connection_ready (TpConnection *connection, EmpathyDispatchOperation *self = EMPATHY_DISPATCH_OPERATION (user_data); EmpathyDispatchOperationPriv *priv = GET_PRIV (self); TpHandle handle; + TpHandleType handle_type; if (error != NULL) goto out; @@ -225,10 +226,18 @@ dispatch_operation_connection_ready (TpConnection *connection, /* no point to get more information */ goto out; - handle = tp_channel_get_handle (priv->channel, NULL); - - empathy_tp_contact_factory_get_from_handle (priv->connection, handle, - dispatcher_operation_got_contact_cb, NULL, NULL, G_OBJECT (self)); + handle = tp_channel_get_handle (priv->channel, &handle_type); + if (handle_type == TP_HANDLE_TYPE_CONTACT && priv->contact == NULL) + { + empathy_tp_contact_factory_get_from_handle (priv->connection, handle, + dispatcher_operation_got_contact_cb, NULL, NULL, G_OBJECT (self)); + } + else + { + g_object_ref (self); + tp_channel_call_when_ready (priv->channel, + empathy_dispatch_operation_channel_ready_cb, self); + } out: g_object_unref (self); @@ -239,8 +248,6 @@ empathy_dispatch_operation_constructed (GObject *object) { EmpathyDispatchOperation *self = EMPATHY_DISPATCH_OPERATION (object); EmpathyDispatchOperationPriv *priv = GET_PRIV (self); - TpHandle handle; - TpHandleType handle_type; empathy_dispatch_operation_set_status (self, EMPATHY_DISPATCHER_OPERATION_STATE_PREPARING); @@ -249,21 +256,9 @@ empathy_dispatch_operation_constructed (GObject *object) g_signal_connect (priv->channel, "invalidated", G_CALLBACK (empathy_dispatch_operation_invalidated), self); - handle = tp_channel_get_handle (priv->channel, &handle_type); - - if (handle_type == TP_HANDLE_TYPE_CONTACT && priv->contact == NULL) - { - /* Ensure to keep the self object alive while the call_when_ready is - * running */ - g_object_ref (self); - tp_connection_call_when_ready (priv->connection, - dispatch_operation_connection_ready, object); - return; - } - g_object_ref (self); - tp_channel_call_when_ready (priv->channel, - empathy_dispatch_operation_channel_ready_cb, self); + tp_connection_call_when_ready (priv->connection, + dispatch_operation_connection_ready, object); } static void |