]> git.0d.be Git - empathy.git/commitdiff
rename empathy-dispatcher to empathy-request-util
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 7 Mar 2011 13:02:52 +0000 (14:02 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 17 Mar 2011 08:53:48 +0000 (09:53 +0100)
We don't have EmpathyDispatcher any more so this file just contains some
utility functions now.

22 files changed:
libempathy-gtk/empathy-chat.c
libempathy-gtk/empathy-contact-list-view.c
libempathy-gtk/empathy-contact-menu.c
libempathy-gtk/empathy-contact-selector-dialog.c
libempathy-gtk/empathy-individual-menu.c
libempathy-gtk/empathy-individual-view.c
libempathy-gtk/empathy-new-message-dialog.c
libempathy-gtk/empathy-share-my-desktop.c
libempathy-gtk/empathy-ui-utils.c
libempathy/Makefile.am
libempathy/empathy-chatroom-manager.h
libempathy/empathy-dispatcher.c [deleted file]
libempathy/empathy-dispatcher.h [deleted file]
libempathy/empathy-request-util.c [new file with mode: 0644]
libempathy/empathy-request-util.h [new file with mode: 0644]
libempathy/empathy-utils.c
src/empathy-chat-manager.c
src/empathy-chat-window.c
src/empathy-main-window.c
src/empathy-new-chatroom-dialog.c
src/empathy.c
tests/interactive/empetit.c

index b696963ac95c5371736e4b2c26b08cf3a8be5885..d1442d816da1603ec01ef10f1775b258d603f9ba 100644 (file)
@@ -42,7 +42,7 @@
 #include <libempathy/empathy-gsettings.h>
 #include <libempathy/empathy-keyring.h>
 #include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 #include <libempathy/empathy-marshal.h>
 #include <libempathy/empathy-chatroom-manager.h>
 #include <src/empathy-chat-window.h>
@@ -249,11 +249,11 @@ account_reconnected (EmpathyChat *chat,
        * https://bugs.freedesktop.org/show_bug.cgi?id=13422 */
        switch (priv->handle_type) {
                case TP_HANDLE_TYPE_CONTACT:
-                       empathy_dispatcher_chat_with_contact_id (
+                       empathy_chat_with_contact_id (
                                account, priv->id, TP_USER_ACTION_TIME_NOT_USER_ACTION);
                        break;
                case TP_HANDLE_TYPE_ROOM:
-                       empathy_dispatcher_join_muc (account, priv->id,
+                       empathy_join_muc (account, priv->id,
                                TP_USER_ACTION_TIME_NOT_USER_ACTION);
                        break;
                case TP_HANDLE_TYPE_NONE:
@@ -739,7 +739,7 @@ empathy_chat_join_muc (EmpathyChat *chat,
 {
        EmpathyChatPriv *priv = GET_PRIV (chat);
 
-       empathy_dispatcher_join_muc (priv->account, room,
+       empathy_join_muc (priv->account, room,
                gtk_get_current_event_time ());
 }
 
index 9377fdb561f2a8ce96de134a51ee7caa56e7bee0..608611a027f4417ea355b9a39245826f20134126 100644 (file)
@@ -37,7 +37,7 @@
 #include <libempathy/empathy-tp-contact-factory.h>
 #include <libempathy/empathy-contact-list.h>
 #include <libempathy/empathy-contact-groups.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 #include <libempathy/empathy-utils.h>
 
 #include "empathy-contact-list-view.h"
@@ -906,7 +906,7 @@ contact_list_view_row_activated (GtkTreeView       *view,
 
        if (contact) {
                DEBUG ("Starting a chat");
-               empathy_dispatcher_chat_with_contact (contact,
+               empathy_chat_with_contact (contact,
                        gtk_get_current_event_time ());
                g_object_unref (contact);
        }
index 28725cc4a8459eadd8c52a6af9633cde4fc94e90..441b69212d12596196bbb73f943d2da372e2a0dc 100644 (file)
@@ -28,7 +28,7 @@
 #include <telepathy-logger/log-manager.h>
 
 #include <libempathy/empathy-contact-manager.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 #include <libempathy/empathy-utils.h>
 #include <libempathy/empathy-chatroom-manager.h>
 #include <libempathy/empathy-contact-manager.h>
@@ -311,7 +311,7 @@ static void
 empathy_contact_chat_menu_item_activated (GtkMenuItem *item,
        EmpathyContact *contact)
 {
-  empathy_dispatcher_chat_with_contact (contact, gtk_get_current_event_time ());
+  empathy_chat_with_contact (contact, gtk_get_current_event_time ());
 }
 
 GtkWidget *
index 3ed7f30e523b3dac2a82f9a1693e8896d7cb6ed2..d5e533aeb21cc9580305e0743dcf1cd83a6ef6a5 100644 (file)
@@ -30,7 +30,6 @@
 
 #include <libempathy/empathy-tp-contact-factory.h>
 #include <libempathy/empathy-contact-manager.h>
-#include <libempathy/empathy-dispatcher.h>
 #include <libempathy/empathy-utils.h>
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
index 5995f2eb98427d4d9a711f39dec74a1680ce05aa..3e404c39fddc8be7d1cac3d1f11ba6e583ce7220 100644 (file)
@@ -31,7 +31,7 @@
 #include <folks/folks.h>
 #include <folks/folks-telepathy.h>
 
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 #include <libempathy/empathy-individual-manager.h>
 #include <libempathy/empathy-chatroom-manager.h>
 #include <libempathy/empathy-utils.h>
@@ -499,7 +499,7 @@ empathy_individual_chat_menu_item_activated (GtkMenuItem *item,
 {
   g_return_if_fail (EMPATHY_IS_CONTACT (contact));
 
-  empathy_dispatcher_chat_with_contact (contact, gtk_get_current_event_time ());
+  empathy_chat_with_contact (contact, gtk_get_current_event_time ());
 }
 
 GtkWidget *
index f72f6e6447c119cd3102ffaa5d3ad62b3f5f0b52..c66fda6b8acefa26ffb6eeeaaa2c7d398408a88b 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <libempathy/empathy-individual-manager.h>
 #include <libempathy/empathy-contact-groups.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 #include <libempathy/empathy-utils.h>
 
 #include "empathy-individual-view.h"
@@ -1019,7 +1019,7 @@ individual_view_row_activated (GtkTreeView *view,
     {
       DEBUG ("Starting a chat");
 
-      empathy_dispatcher_chat_with_contact (contact,
+      empathy_chat_with_contact (contact,
           gtk_get_current_event_time ());
     }
 
index 4747dfbb92762c1de26fda9d2192b9a28eb0a34e..b9edb93e7b949344bc4e6c32ead373ad82f26b36 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <libempathy/empathy-tp-contact-factory.h>
 #include <libempathy/empathy-contact-manager.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 #include <libempathy/empathy-utils.h>
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
@@ -75,7 +75,7 @@ empathy_new_message_dialog_response (GtkDialog *dialog, int response_id)
 
   if (EMP_STR_EMPTY (contact_id) || account == NULL) goto out;
 
-  empathy_dispatcher_chat_with_contact_id (account, contact_id,
+  empathy_chat_with_contact_id (account, contact_id,
       gtk_get_current_event_time ());
 
 out:
index 01a885ada0d51b3dc48efd49d718b602982ba74f..bc9e9218c96e21e7928fbe18dc296dfb66a46d91 100644 (file)
@@ -27,8 +27,6 @@
 #include <telepathy-glib/channel.h>
 #include <telepathy-glib/interfaces.h>
 
-#include <libempathy/empathy-dispatcher.h>
-
 #define DEBUG_FLAG EMPATHY_DEBUG_SHARE_DESKTOP
 #include <libempathy/empathy-debug.h>
 
index eb5578e4c9ce9b67203c3da177f582214ebccfe8..8dbf6afd95b1a022c11dbb8ef371bf1a69474bfa 100644 (file)
@@ -49,7 +49,6 @@
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
 #include <libempathy/empathy-debug.h>
 #include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-dispatcher.h>
 #include <libempathy/empathy-ft-factory.h>
 
 void
index 20225f7de461f1a58fe8a6ea9ec19facd6f2b9df..cfea24c0e6c8c501fca3afd1f51f5d3742c6397d 100644 (file)
@@ -38,7 +38,6 @@ libempathy_headers =                          \
        empathy-contact-manager.h               \
        empathy-contact.h                       \
        empathy-debug.h                         \
-       empathy-dispatcher.h                    \
        empathy-ft-factory.h                    \
        empathy-ft-handler.h                    \
        empathy-gsettings.h                     \
@@ -50,6 +49,7 @@ libempathy_headers =                          \
        empathy-keyring.h                       \
        empathy-location.h                      \
        empathy-message.h                       \
+       empathy-request-util.h                  \
        empathy-server-sasl-handler.h           \
        empathy-server-tls-handler.h            \
        empathy-status-presets.h                \
@@ -79,7 +79,6 @@ libempathy_la_SOURCES =                                       \
        empathy-contact-manager.c                       \
        empathy-contact.c                               \
        empathy-debug.c                                 \
-       empathy-dispatcher.c                            \
        empathy-ft-factory.c                            \
        empathy-ft-handler.c                            \
        empathy-presence-manager.c                                      \
@@ -89,6 +88,7 @@ libempathy_la_SOURCES =                                       \
        empathy-irc-server.c                            \
        empathy-keyring.c                               \
        empathy-message.c                               \
+       empathy-request-util.c                          \
        empathy-server-sasl-handler.c                   \
        empathy-server-tls-handler.c                    \
        empathy-status-presets.c                        \
index 5afb2b474d156054158023ffbf757b532ae77535..be33015032a02a47aa598d5487be1217dffc2cec 100644 (file)
@@ -29,7 +29,6 @@
 #include <telepathy-glib/account.h>
 
 #include "empathy-chatroom.h"
-#include "empathy-dispatcher.h"
 
 G_BEGIN_DECLS
 
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
deleted file mode 100644 (file)
index 1f7d7f2..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/* * Copyright (C) 2007-2009 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Authors: Xavier Claessens <xclaesse@gmail.com>
- *          Sjoerd Simons <sjoerd.simons@collabora.co.uk>
- *          Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
- */
-
-#include <config.h>
-
-#include <string.h>
-
-#include <glib/gi18n-lib.h>
-
-#include <telepathy-glib/telepathy-glib.h>
-
-#include "empathy-dispatcher.h"
-#include "empathy-utils.h"
-#include "empathy-utils.h"
-
-#define DEBUG_FLAG EMPATHY_DEBUG_DISPATCHER
-#include <libempathy/empathy-debug.h>
-
-void
-empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
-    gint64 timestamp)
-{
-  empathy_dispatcher_chat_with_contact_id (
-      empathy_contact_get_account (contact), empathy_contact_get_id (contact),
-      timestamp);
-}
-
-static void
-ensure_text_channel_cb (GObject *source,
-    GAsyncResult *result,
-    gpointer user_data)
-{
-  GError *error = NULL;
-
-  if (!tp_account_channel_request_ensure_channel_finish (
-        TP_ACCOUNT_CHANNEL_REQUEST (source), result, &error))
-    {
-      DEBUG ("Failed to ensure text channel: %s", error->message);
-      g_error_free (error);
-    }
-}
-
-void
-empathy_dispatcher_chat_with_contact_id (TpAccount *account,
-    const gchar *contact_id,
-    gint64 timestamp)
-{
-  GHashTable *request;
-  TpAccountChannelRequest *req;
-
-  request = tp_asv_new (
-      TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
-        TP_IFACE_CHANNEL_TYPE_TEXT,
-      TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT,
-      TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING, contact_id,
-      NULL);
-
-  req = tp_account_channel_request_new (account, request, timestamp);
-
-  tp_account_channel_request_ensure_channel_async (req, NULL, NULL,
-      ensure_text_channel_cb, NULL);
-
-  g_hash_table_unref (request);
-  g_object_unref (req);
-}
-
-void
-empathy_dispatcher_join_muc (TpAccount *account,
-    const gchar *room_name,
-    gint64 timestamp)
-{
-  GHashTable *request;
-  TpAccountChannelRequest *req;
-
-  request = tp_asv_new (
-      TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
-        TP_IFACE_CHANNEL_TYPE_TEXT,
-      TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_ROOM,
-      TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING, room_name,
-      NULL);
-
-  req = tp_account_channel_request_new (account, request, timestamp);
-
-  tp_account_channel_request_ensure_channel_async (req, NULL, NULL,
-      ensure_text_channel_cb, NULL);
-
-  g_hash_table_unref (request);
-  g_object_unref (req);
-}
diff --git a/libempathy/empathy-dispatcher.h b/libempathy/empathy-dispatcher.h
deleted file mode 100644 (file)
index 8c986ec..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2007-2008 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Authors: Xavier Claessens <xclaesse@gmail.com>
- */
-
-#ifndef __EMPATHY_DISPATCHER_H__
-#define __EMPATHY_DISPATCHER_H__
-
-#include <glib.h>
-#include <gio/gio.h>
-
-#include <telepathy-glib/channel.h>
-
-#include "empathy-contact.h"
-
-G_BEGIN_DECLS
-
-/* Requesting 1 to 1 text channels */
-void empathy_dispatcher_chat_with_contact_id (TpAccount *account,
-  const gchar *contact_id,
-  gint64 timestamp);
-
-void  empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
-  gint64 timestamp);
-
-/* Request a muc channel */
-void empathy_dispatcher_join_muc (TpAccount *account,
-  const gchar *roomname,
-  gint64 timestamp);
-
-G_END_DECLS
-
-#endif /* __EMPATHY_DISPATCHER_H__ */
diff --git a/libempathy/empathy-request-util.c b/libempathy/empathy-request-util.c
new file mode 100644 (file)
index 0000000..c912cc1
--- /dev/null
@@ -0,0 +1,107 @@
+/* * Copyright (C) 2007-2010 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Authors: Xavier Claessens <xclaesse@gmail.com>
+ *          Sjoerd Simons <sjoerd.simons@collabora.co.uk>
+ *          Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
+ */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <glib/gi18n-lib.h>
+
+#include <telepathy-glib/telepathy-glib.h>
+
+#include "empathy-request-util.h"
+#include "empathy-utils.h"
+#include "empathy-utils.h"
+
+#define DEBUG_FLAG EMPATHY_DEBUG_DISPATCHER
+#include <libempathy/empathy-debug.h>
+
+void
+empathy_chat_with_contact (EmpathyContact *contact,
+    gint64 timestamp)
+{
+  empathy_chat_with_contact_id (
+      empathy_contact_get_account (contact), empathy_contact_get_id (contact),
+      timestamp);
+}
+
+static void
+ensure_text_channel_cb (GObject *source,
+    GAsyncResult *result,
+    gpointer user_data)
+{
+  GError *error = NULL;
+
+  if (!tp_account_channel_request_ensure_channel_finish (
+        TP_ACCOUNT_CHANNEL_REQUEST (source), result, &error))
+    {
+      DEBUG ("Failed to ensure text channel: %s", error->message);
+      g_error_free (error);
+    }
+}
+
+void
+empathy_chat_with_contact_id (TpAccount *account,
+    const gchar *contact_id,
+    gint64 timestamp)
+{
+  GHashTable *request;
+  TpAccountChannelRequest *req;
+
+  request = tp_asv_new (
+      TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
+        TP_IFACE_CHANNEL_TYPE_TEXT,
+      TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT,
+      TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING, contact_id,
+      NULL);
+
+  req = tp_account_channel_request_new (account, request, timestamp);
+
+  tp_account_channel_request_ensure_channel_async (req, NULL, NULL,
+      ensure_text_channel_cb, NULL);
+
+  g_hash_table_unref (request);
+  g_object_unref (req);
+}
+
+void
+empathy_join_muc (TpAccount *account,
+    const gchar *room_name,
+    gint64 timestamp)
+{
+  GHashTable *request;
+  TpAccountChannelRequest *req;
+
+  request = tp_asv_new (
+      TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
+        TP_IFACE_CHANNEL_TYPE_TEXT,
+      TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_ROOM,
+      TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING, room_name,
+      NULL);
+
+  req = tp_account_channel_request_new (account, request, timestamp);
+
+  tp_account_channel_request_ensure_channel_async (req, NULL, NULL,
+      ensure_text_channel_cb, NULL);
+
+  g_hash_table_unref (request);
+  g_object_unref (req);
+}
diff --git a/libempathy/empathy-request-util.h b/libempathy/empathy-request-util.h
new file mode 100644 (file)
index 0000000..1073f0d
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2007-2010 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Authors: Xavier Claessens <xclaesse@gmail.com>
+ */
+
+#ifndef __EMPATHY_DISPATCHER_H__
+#define __EMPATHY_DISPATCHER_H__
+
+#include <glib.h>
+#include <gio/gio.h>
+
+#include <telepathy-glib/channel.h>
+
+#include "empathy-contact.h"
+
+G_BEGIN_DECLS
+
+/* Requesting 1 to 1 text channels */
+void empathy_chat_with_contact_id (TpAccount *account,
+  const gchar *contact_id,
+  gint64 timestamp);
+
+void  empathy_chat_with_contact (EmpathyContact *contact,
+  gint64 timestamp);
+
+/* Request a muc channel */
+void empathy_join_muc (TpAccount *account,
+  const gchar *roomname,
+  gint64 timestamp);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_DISPATCHER_H__ */
index 775a320c73e3c3187591dd36600538bc32acded4..86c0f20af175e746f775e119e22a0e4698a44875 100644 (file)
@@ -48,7 +48,6 @@
 #include "empathy-utils.h"
 #include "empathy-contact-manager.h"
 #include "empathy-individual-manager.h"
-#include "empathy-dispatcher.h"
 #include "empathy-presence-manager.h"
 #include "empathy-tp-contact-factory.h"
 
index c84b5f4472441bb67399b99c913dd8001d4f9832..c3488dc4511b102129f6df913fba33f245871f76 100644 (file)
@@ -20,7 +20,7 @@
 #include <telepathy-glib/telepathy-glib.h>
 
 #include <libempathy/empathy-chatroom-manager.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 #include <libempathy/empathy-utils.h>
 
 #include "empathy-chat-window.h"
@@ -433,10 +433,10 @@ empathy_chat_manager_undo_closed_chat (EmpathyChatManager *self)
       data->room ? "room" : "contact", data->id);
 
   if (data->room)
-    empathy_dispatcher_join_muc (data->account, data->id,
+    empathy_join_muc (data->account, data->id,
         TP_USER_ACTION_TIME_NOT_USER_ACTION);
   else
-    empathy_dispatcher_chat_with_contact_id (data->account, data->id,
+    empathy_chat_with_contact_id (data->account, data->id,
         TP_USER_ACTION_TIME_NOT_USER_ACTION);
 
   g_signal_emit (self, signals[CLOSED_CHATS_CHANGED], 0,
index 755e9d1a8f8de0fa51e3f3b8af56d329e9909fdf..6c6e617eb3997012610d495bd4d68f7e7709a0b7 100644 (file)
@@ -45,6 +45,7 @@
 #include <libempathy/empathy-utils.h>
 #include <libempathy/empathy-tp-contact-factory.h>
 #include <libempathy/empathy-contact-list.h>
+#include <libempathy/empathy-request-util.h>
 
 #include <libempathy-gtk/empathy-images.h>
 #include <libempathy-gtk/empathy-contact-dialogs.h>
@@ -1768,7 +1769,7 @@ chat_window_drag_data_received (GtkWidget        *widget,
                }
 
                if (!chat) {
-                       empathy_dispatcher_chat_with_contact_id (
+                       empathy_chat_with_contact_id (
                                account, contact_id, gtk_get_current_event_time ());
 
                        g_strfreev (strv);
index 12b99ba5f243ead398b206bc74bdca84978eeafc..b4c1254dfdbd0365b6e6e88bbc7439b1953b3482 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <libempathy/empathy-contact.h>
 #include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 #include <libempathy/empathy-chatroom-manager.h>
 #include <libempathy/empathy-chatroom.h>
 #include <libempathy/empathy-contact-list.h>
@@ -1157,7 +1157,7 @@ join_chatroom (EmpathyChatroom *chatroom,
        room = empathy_chatroom_get_room (chatroom);
 
        DEBUG ("Requesting channel for '%s'", room);
-       empathy_dispatcher_join_muc (account, room, timestamp);
+       empathy_join_muc (account, room, timestamp);
 }
 
 typedef struct
index edaeb0ea587b19eaf1e1ac18a09d58c9fcef6eb6..f27e8de030562e2b2b88d43dc76f9ca27a0223f1 100644 (file)
@@ -36,7 +36,7 @@
 #include <libempathy/empathy-tp-roomlist.h>
 #include <libempathy/empathy-chatroom.h>
 #include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 
 #include <libempathy-gtk/empathy-account-chooser.h>
 #include <libempathy-gtk/empathy-ui-utils.h>
@@ -690,7 +690,7 @@ new_chatroom_dialog_join (EmpathyNewChatroomDialog *dialog)
        g_strstrip (room_name);
 
        DEBUG ("Requesting channel for '%s'", room_name);
-       empathy_dispatcher_join_muc (account, room_name,
+       empathy_join_muc (account, room_name,
                gtk_get_current_event_time ());
 
        g_free (room_name);
index e03e43aa6f909b3d828b97d727a74d987b2a0cf2..e18288c352de241a3d37d007d99c69c6930f4e70 100644 (file)
@@ -52,7 +52,7 @@
 #include <libempathy/empathy-account-settings.h>
 #include <libempathy/empathy-connectivity.h>
 #include <libempathy/empathy-connection-managers.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 #include <libempathy/empathy-ft-factory.h>
 #include <libempathy/empathy-gsettings.h>
 #include <libempathy/empathy-tp-chat.h>
@@ -539,7 +539,7 @@ account_status_changed_cb (TpAccount *account,
   if (new_status != TP_CONNECTION_STATUS_CONNECTED)
     return;
 
-  empathy_dispatcher_join_muc (account,
+  empathy_join_muc (account,
       empathy_chatroom_get_room (room), TP_USER_ACTION_TIME_NOT_USER_ACTION);
 }
 
@@ -587,7 +587,7 @@ account_manager_chatroom_ready_cb (GObject *source_object,
             }
           else
             {
-              empathy_dispatcher_join_muc (account,
+              empathy_join_muc (account,
                   empathy_chatroom_get_room (room),
                   TP_USER_ACTION_TIME_NOT_USER_ACTION);
             }
index 3ed5998ac60dfe1bbf60e2f8c7d0da3dfbaff731..f3957dbf90dd61bddc02c4b01a9e6cae6eb5de4b 100644 (file)
@@ -3,7 +3,7 @@
 #include <gtk/gtk.h>
 
 #include <libempathy/empathy-contact-manager.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
 
 #include <libempathy-gtk/empathy-ui-utils.h>
 #include <libempathy-gtk/empathy-contact-list-store.h>
@@ -23,7 +23,7 @@ clicked_cb (GtkButton *button,
   if (!contact)
     return;
 
-  empathy_dispatcher_chat_with_contact (contact, gtk_get_current_event_time ());
+  empathy_chat_with_contact (contact, gtk_get_current_event_time ());
 
   g_object_unref (contact);
 }