]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-share-my-desktop.c
Be more compatible with Facebook emoticon codes
[empathy.git] / libempathy-gtk / empathy-share-my-desktop.c
index 8f14fb6b1ae93dc9fd00a2bb622a710954c68d91..07edfce469a79b10ac14af61af1ea7055a4259ec 100644 (file)
  */
 
 #include "config.h"
+#include "empathy-share-my-desktop.h"
 
-#include <gtk/gtk.h>
-
-#include <dbus/dbus-glib.h>
-#include <telepathy-glib/account-channel-request.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/contact.h>
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
 
 #define DEBUG_FLAG EMPATHY_DEBUG_SHARE_DESKTOP
-#include <libempathy/empathy-debug.h>
-
-#include "empathy-share-my-desktop.h"
+#include "empathy-debug.h"
 
 static void
 create_tube_channel_cb (GObject *source,
@@ -53,7 +45,6 @@ void
 empathy_share_my_desktop_share_with_contact (EmpathyContact *contact)
 {
   TpAccountChannelRequest *req;
-  GHashTable *request;
   TpContact *tp_contact;
 
   tp_contact = empathy_contact_get_tp_contact (contact);
@@ -66,22 +57,14 @@ empathy_share_my_desktop_share_with_contact (EmpathyContact *contact)
       return;
     }
 
-  request = tp_asv_new (
-      TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
-        TP_IFACE_CHANNEL_TYPE_STREAM_TUBE,
-      TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
-        TP_HANDLE_TYPE_CONTACT,
-      TP_PROP_CHANNEL_TARGET_HANDLE, G_TYPE_UINT,
-        tp_contact_get_handle (tp_contact),
-      TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE, G_TYPE_STRING, "rfb",
-      NULL);
+  req = tp_account_channel_request_new_stream_tube (
+      empathy_contact_get_account (contact), "rfb",
+      TP_USER_ACTION_TIME_CURRENT_TIME);
 
-  req = tp_account_channel_request_new (empathy_contact_get_account (contact),
-      request, TP_USER_ACTION_TIME_CURRENT_TIME);
+  tp_account_channel_request_set_target_contact (req, tp_contact);
 
   tp_account_channel_request_create_channel_async (req, NULL, NULL,
       create_tube_channel_cb, NULL);
 
   g_object_unref (req);
-  g_hash_table_unref (request);
 }