diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:21:21 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:21:21 +0800 |
commit | 7e17a5298381cd34c4decf370bbbb76f96169156 (patch) | |
tree | 6d9a1336f052830549b0458668f1400d53180254 /libempathy/empathy-contact.c | |
parent | 276eececd984edec5592ee693b8f414bbbca4872 (diff) | |
download | gsoc2013-empathy-7e17a5298381cd34c4decf370bbbb76f96169156.tar gsoc2013-empathy-7e17a5298381cd34c4decf370bbbb76f96169156.tar.gz gsoc2013-empathy-7e17a5298381cd34c4decf370bbbb76f96169156.tar.bz2 gsoc2013-empathy-7e17a5298381cd34c4decf370bbbb76f96169156.tar.lz gsoc2013-empathy-7e17a5298381cd34c4decf370bbbb76f96169156.tar.xz gsoc2013-empathy-7e17a5298381cd34c4decf370bbbb76f96169156.tar.zst gsoc2013-empathy-7e17a5298381cd34c4decf370bbbb76f96169156.zip |
empathy-contact: no need to inspect the RequestableChannelClasses property anymore, empathy-tp-contact-factory does it for us now
svn path=/trunk/; revision=1855
Diffstat (limited to 'libempathy/empathy-contact.c')
-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 |