#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>
* 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:
{
EmpathyChatPriv *priv = GET_PRIV (chat);
- empathy_dispatcher_join_muc (priv->account, room,
+ empathy_join_muc (priv->account, room,
gtk_get_current_event_time ());
}
#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"
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);
}
#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>
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 *
#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
#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>
{
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 *
#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"
{
DEBUG ("Starting a chat");
- empathy_dispatcher_chat_with_contact (contact,
+ empathy_chat_with_contact (contact,
gtk_get_current_event_time ());
}
#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
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:
#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>
#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
empathy-contact-manager.h \
empathy-contact.h \
empathy-debug.h \
- empathy-dispatcher.h \
empathy-ft-factory.h \
empathy-ft-handler.h \
empathy-gsettings.h \
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 \
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 \
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 \
#include <telepathy-glib/account.h>
#include "empathy-chatroom.h"
-#include "empathy-dispatcher.h"
G_BEGIN_DECLS
+++ /dev/null
-/* * 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);
-}
+++ /dev/null
-/* -*- 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__ */
--- /dev/null
+/* * 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);
+}
--- /dev/null
+/*
+ * 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__ */
#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"
#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"
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,
#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>
}
if (!chat) {
- empathy_dispatcher_chat_with_contact_id (
+ empathy_chat_with_contact_id (
account, contact_id, gtk_get_current_event_time ());
g_strfreev (strv);
#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>
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
#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>
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);
#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>
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);
}
}
else
{
- empathy_dispatcher_join_muc (account,
+ empathy_join_muc (account,
empathy_chatroom_get_room (room),
TP_USER_ACTION_TIME_NOT_USER_ACTION);
}
#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>
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);
}