diff options
-rw-r--r-- | libempathy/empathy-contact.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 3015c479b..38fb662e1 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -30,9 +30,6 @@ #include <glib/gi18n.h> #include <telepathy-glib/util.h> -#include <telepathy-glib/gtypes.h> - -#include <extensions/extensions.h> #include "empathy-contact.h" #include "empathy-utils.h" @@ -471,67 +468,11 @@ empathy_contact_get_account (EmpathyContact *contact) return priv->account; } -static void -get_requestable_channel_classes_cb (TpProxy *connection, - const GValue *value, - const GError *error, - gpointer user_data, - GObject *weak_object) -{ - GPtrArray *classes; - guint i; - - if (error != NULL) - { - DEBUG ("Error: %s", error->message); - return; - } - - classes = g_value_get_boxed (value); - - for (i = 0; i < classes->len; i++) - { - GValue class = {0,}; - GValue *chan_type, *handle_type; - GHashTable *fixed_prop; - EmpathyCapabilities caps; - EmpathyContact *contact; - - g_value_init (&class, TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS); - g_value_set_static_boxed (&class, g_ptr_array_index (classes, i)); - - dbus_g_type_struct_get (&class, - 0, &fixed_prop, - G_MAXUINT); - - chan_type = g_hash_table_lookup (fixed_prop, - TP_IFACE_CHANNEL ".ChannelType"); - if (chan_type == NULL || tp_strdiff (g_value_get_string (chan_type), - EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER)) - continue; - - handle_type = g_hash_table_lookup (fixed_prop, - TP_IFACE_CHANNEL ".TargetHandleType"); - if (handle_type == NULL || g_value_get_uint (handle_type) - != TP_HANDLE_TYPE_CONTACT) - continue; - - /* We can request file transfer channel to contacts. Set the FT caps. */ - contact = EMPATHY_CONTACT (user_data); - caps = empathy_contact_get_capabilities (contact); - caps |= EMPATHY_CAPABILITIES_FT; - - empathy_contact_set_capabilities (contact, caps); - } -} - void empathy_contact_set_account (EmpathyContact *contact, McAccount *account) { EmpathyContactPriv *priv; - MissionControl *mc; - TpConnection *connection; g_return_if_fail (EMPATHY_IS_CONTACT (contact)); g_return_if_fail (MC_IS_ACCOUNT (account)); @@ -545,19 +486,7 @@ empathy_contact_set_account (EmpathyContact *contact, g_object_unref (priv->account); priv->account = g_object_ref (account); - /* FIXME: We should use the futur ContactCapabilities interface */ - /* Can we request FT channel on this connection? */ - mc = empathy_mission_control_new (); - connection = mission_control_get_tpconnection (mc, account, NULL); - - tp_cli_dbus_properties_call_get (connection, -1, - TP_IFACE_CONNECTION_INTERFACE_REQUESTS, "RequestableChannelClasses", - get_requestable_channel_classes_cb, contact, NULL, G_OBJECT (contact)); - g_object_notify (G_OBJECT (contact), "account"); - - g_object_unref (mc); - g_object_unref (connection); } McPresence |