diff options
author | Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> | 2009-02-18 23:47:16 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2009-06-01 23:47:35 +0800 |
commit | 23b3f7b0609a948267a9b7855079e124e0a1ab7d (patch) | |
tree | 3b1d80452f8c59ab01aa8c9ec4cf6fc982a219df | |
parent | 58d08cef143811d990218551a922451609978610 (diff) | |
download | gsoc2013-empathy-23b3f7b0609a948267a9b7855079e124e0a1ab7d.tar gsoc2013-empathy-23b3f7b0609a948267a9b7855079e124e0a1ab7d.tar.gz gsoc2013-empathy-23b3f7b0609a948267a9b7855079e124e0a1ab7d.tar.bz2 gsoc2013-empathy-23b3f7b0609a948267a9b7855079e124e0a1ab7d.tar.lz gsoc2013-empathy-23b3f7b0609a948267a9b7855079e124e0a1ab7d.tar.xz gsoc2013-empathy-23b3f7b0609a948267a9b7855079e124e0a1ab7d.tar.zst gsoc2013-empathy-23b3f7b0609a948267a9b7855079e124e0a1ab7d.zip |
Remove dead code in EmpathyDispatcher
-rw-r--r-- | libempathy/empathy-dispatcher.c | 131 |
1 files changed, 0 insertions, 131 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 75120bce2..93900b32e 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -1318,137 +1318,6 @@ empathy_dispatcher_create_channel (EmpathyDispatcher *dispatcher, G_OBJECT (request_data->dispatcher)); } -#if 0 - -static void -dispatcher_create_channel_with_contact_cb (EmpathyContact *contact, - const GError *error, - gpointer user_data, - GObject *object) -{ - DispatcherRequestData *request_data = (DispatcherRequestData *) user_data; - GValue *target_handle; - - g_assert (request_data->request); - - if (error != NULL) - { - dispatcher_request_failed (request_data->dispatcher, - request_data, error); - return; - } - - request_data->handle = empathy_contact_get_handle (contact); - - target_handle = tp_g_value_slice_new (G_TYPE_UINT); - g_value_set_uint (target_handle, request_data->handle); - g_hash_table_insert (request_data->request, - TP_IFACE_CHANNEL ".TargetHandle", target_handle); - - tp_cli_connection_interface_requests_call_create_channel ( - request_data->connection, -1, - request_data->request, dispatcher_create_channel_cb, request_data, NULL, - G_OBJECT (request_data->dispatcher)); -} - -static void -dispatcher_send_file_connection_ready_cb (TpConnection *connection, - const GError *error, - gpointer user_data) -{ - DispatcherRequestData *request_data = (DispatcherRequestData *) user_data; - - if (error != NULL) - { - dispatcher_request_failed (request_data->dispatcher, - request_data, error); - return; - } - - empathy_contact_call_when_ready (request_data->contact, - EMPATHY_CONTACT_READY_HANDLE, dispatcher_create_channel_with_contact_cb, - request_data, NULL, G_OBJECT (request_data->dispatcher)); -} - -void -empathy_dispatcher_send_file_to_contact (EmpathyContact *contact, - const gchar *filename, - guint64 size, - guint64 date, - const gchar *content_type, - EmpathyDispatcherRequestCb *callback, - gpointer user_data) -{ - EmpathyDispatcher *dispatcher = empathy_dispatcher_dup_singleton (); - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); - TpConnection *connection = empathy_contact_get_connection (contact); - ConnectionData *connection_data = - g_hash_table_lookup (priv->connections, connection); - DispatcherRequestData *request_data; - GValue *value; - GHashTable *request = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, - (GDestroyNotify) tp_g_value_slice_free); - - g_return_if_fail (EMPATHY_IS_CONTACT (contact)); - g_return_if_fail (!EMP_STR_EMPTY (filename)); - g_return_if_fail (!EMP_STR_EMPTY (content_type)); - - /* org.freedesktop.Telepathy.Channel.ChannelType */ - value = tp_g_value_slice_new (G_TYPE_STRING); - g_value_set_string (value, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER); - g_hash_table_insert (request, TP_IFACE_CHANNEL ".ChannelType", value); - - /* org.freedesktop.Telepathy.Channel.TargetHandleType */ - value = tp_g_value_slice_new (G_TYPE_UINT); - g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT); - g_hash_table_insert (request, TP_IFACE_CHANNEL ".TargetHandleType", value); - - /* org.freedesktop.Telepathy.Channel.TargetHandle */ - value = tp_g_value_slice_new (G_TYPE_UINT); - g_value_set_uint (value, empathy_contact_get_handle (contact)); - g_hash_table_insert (request, TP_IFACE_CHANNEL ".TargetHandle", value); - - /* org.freedesktop.Telepathy.Channel.Type.FileTransfer.ContentType */ - value = tp_g_value_slice_new (G_TYPE_STRING); - g_value_set_string (value, content_type); - g_hash_table_insert (request, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentType", value); - - /* org.freedesktop.Telepathy.Channel.Type.FileTransfer.Filename */ - value = tp_g_value_slice_new (G_TYPE_STRING); - g_value_set_string (value, filename); - g_hash_table_insert (request, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename", value); - - /* org.freedesktop.Telepathy.Channel.Type.FileTransfer.Size */ - value = tp_g_value_slice_new (G_TYPE_UINT64); - g_value_set_uint64 (value, size); - g_hash_table_insert (request, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", value); - - /* org.freedesktop.Telepathy.Channel.Type.FileTransfer.Date */ - value = tp_g_value_slice_new (G_TYPE_UINT64); - g_value_set_uint64 (value, date); - g_hash_table_insert (request, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Date", value); - - request_data = new_dispatcher_request_data (dispatcher, connection, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, TP_HANDLE_TYPE_CONTACT, - empathy_contact_get_handle (contact), request, contact, callback, - user_data); - connection_data->outstanding_requests = g_list_prepend - (connection_data->outstanding_requests, request_data); - - tp_cli_connection_interface_requests_call_create_channel ( - request_data->connection, -1, - request_data->request, dispatcher_create_channel_cb, request_data, NULL, - G_OBJECT (request_data->dispatcher)); - - g_object_unref (dispatcher); -} - -#endif - GStrv empathy_dispatcher_find_channel_class (EmpathyDispatcher *dispatcher, TpConnection *connection, |