aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-11 23:30:40 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-11 23:31:17 +0800
commitaef77c9a4bd157f0dd128a845c26c7ff134b3b2d (patch)
treee61504e4e39ab804ee8483b039d0e799f9eb8947
parente5f1b9ae3ff61e5a4ed0dca4576879744032233c (diff)
downloadgsoc2013-empathy-aef77c9a4bd157f0dd128a845c26c7ff134b3b2d.tar
gsoc2013-empathy-aef77c9a4bd157f0dd128a845c26c7ff134b3b2d.tar.gz
gsoc2013-empathy-aef77c9a4bd157f0dd128a845c26c7ff134b3b2d.tar.bz2
gsoc2013-empathy-aef77c9a4bd157f0dd128a845c26c7ff134b3b2d.tar.lz
gsoc2013-empathy-aef77c9a4bd157f0dd128a845c26c7ff134b3b2d.tar.xz
gsoc2013-empathy-aef77c9a4bd157f0dd128a845c26c7ff134b3b2d.tar.zst
gsoc2013-empathy-aef77c9a4bd157f0dd128a845c26c7ff134b3b2d.zip
remove empathy-dispatch-operation
-rw-r--r--libempathy/Makefile.am2
-rw-r--r--libempathy/empathy-call-factory.h1
-rw-r--r--libempathy/empathy-dispatch-operation.c627
-rw-r--r--libempathy/empathy-dispatch-operation.h126
-rw-r--r--libempathy/empathy-dispatcher.h1
-rw-r--r--libempathy/empathy-ft-factory.h1
-rw-r--r--libempathy/empathy-utils.c1
-rw-r--r--src/empathy.c1
8 files changed, 0 insertions, 760 deletions
diff --git a/libempathy/Makefile.am b/libempathy/Makefile.am
index eb8a874c4..94bbabe77 100644
--- a/libempathy/Makefile.am
+++ b/libempathy/Makefile.am
@@ -37,7 +37,6 @@ libempathy_headers = \
empathy-contact-manager.h \
empathy-contact.h \
empathy-debug.h \
- empathy-dispatch-operation.h \
empathy-dispatcher.h \
empathy-ft-factory.h \
empathy-ft-handler.h \
@@ -74,7 +73,6 @@ libempathy_la_SOURCES = \
empathy-contact-manager.c \
empathy-contact.c \
empathy-debug.c \
- empathy-dispatch-operation.c \
empathy-dispatcher.c \
empathy-ft-factory.c \
empathy-ft-handler.c \
diff --git a/libempathy/empathy-call-factory.h b/libempathy/empathy-call-factory.h
index 10b911f82..7b160dda4 100644
--- a/libempathy/empathy-call-factory.h
+++ b/libempathy/empathy-call-factory.h
@@ -23,7 +23,6 @@
#include <glib-object.h>
-#include <libempathy/empathy-dispatch-operation.h>
#include <libempathy/empathy-call-handler.h>
#include <libempathy/empathy-dispatcher.h>
diff --git a/libempathy/empathy-dispatch-operation.c b/libempathy/empathy-dispatch-operation.c
deleted file mode 100644
index adb76c77c..000000000
--- a/libempathy/empathy-dispatch-operation.c
+++ /dev/null
@@ -1,627 +0,0 @@
-/*
- * empathy-dispatch-operation.c - Source for EmpathyDispatchOperation
- * Copyright (C) 2008 Collabora Ltd.
- * @author Sjoerd Simons <sjoerd.simons@collabora.co.uk>
- *
- * 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
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <telepathy-glib/interfaces.h>
-
-#include "empathy-dispatch-operation.h"
-#include <libempathy/empathy-enum-types.h>
-#include <libempathy/empathy-tp-contact-factory.h>
-
-#include "empathy-marshal.h"
-
-#include "extensions/extensions.h"
-
-#define DEBUG_FLAG EMPATHY_DEBUG_DISPATCHER
-#include <libempathy/empathy-debug.h>
-
-G_DEFINE_TYPE(EmpathyDispatchOperation, empathy_dispatch_operation,
- G_TYPE_OBJECT)
-
-static void empathy_dispatch_operation_set_status (
- EmpathyDispatchOperation *self, EmpathyDispatchOperationState status);
-static void empathy_dispatch_operation_channel_ready_cb (TpChannel *channel,
- const GError *error, gpointer user_data);
-
-/* signal enum */
-enum
-{
- /* Ready for dispatching */
- READY,
- /* Claimed by a handler */
- CLAIMED,
- /* Error, channel went away, inspecting it failed etc */
- INVALIDATED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = {0};
-
-/* properties */
-enum {
- PROP_CONNECTION = 1,
- PROP_CHANNEL,
- PROP_CHANNEL_WRAPPER,
- PROP_CONTACT,
- PROP_INCOMING,
- PROP_STATUS,
- PROP_USER_ACTION_TIME,
-};
-
-/* private structure */
-typedef struct _EmpathyDispatchOperationPriv \
- EmpathyDispatchOperationPriv;
-
-struct _EmpathyDispatchOperationPriv
-{
- gboolean dispose_has_run;
- TpConnection *connection;
- TpChannel *channel;
- GObject *channel_wrapper;
- EmpathyContact *contact;
- EmpathyDispatchOperationState status;
- gboolean incoming;
- gint64 user_action_time;
- gulong invalidated_handler;
- gulong ready_handler;
-};
-
-#define GET_PRIV(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), EMPATHY_TYPE_DISPATCH_OPERATION, \
- EmpathyDispatchOperationPriv))
-
-static void
-empathy_dispatch_operation_init (EmpathyDispatchOperation *obj)
-{
- //EmpathyDispatchOperationPriv *priv =
- // GET_PRIV (obj);
-
- /* allocate any data required by the object here */
-}
-
-static void empathy_dispatch_operation_dispose (GObject *object);
-static void empathy_dispatch_operation_finalize (GObject *object);
-
-static void
-empathy_dispatch_operation_set_property (GObject *object,
- guint property_id, const GValue *value, GParamSpec *pspec)
-{
- EmpathyDispatchOperation *operation = EMPATHY_DISPATCH_OPERATION (object);
- EmpathyDispatchOperationPriv *priv = GET_PRIV (operation);
-
- switch (property_id)
- {
- case PROP_CONNECTION:
- priv->connection = g_value_dup_object (value);
- break;
- case PROP_CHANNEL:
- priv->channel = g_value_dup_object (value);
- break;
- case PROP_CHANNEL_WRAPPER:
- priv->channel_wrapper = g_value_dup_object (value);
- break;
- case PROP_CONTACT:
- if (priv->contact != NULL)
- g_object_unref (priv->contact);
- priv->contact = g_value_dup_object (value);
- break;
- case PROP_INCOMING:
- priv->incoming = g_value_get_boolean (value);
- break;
- case PROP_USER_ACTION_TIME:
- priv->user_action_time = g_value_get_int64 (value);
- break;
- default:
- g_assert_not_reached ();
- }
-}
-
-static void
-empathy_dispatch_operation_get_property (GObject *object,
- guint property_id, GValue *value, GParamSpec *pspec)
-{
- EmpathyDispatchOperation *operation = EMPATHY_DISPATCH_OPERATION (object);
- EmpathyDispatchOperationPriv *priv = GET_PRIV (operation);
-
- switch (property_id)
- {
- case PROP_CONNECTION:
- g_value_set_object (value, priv->connection);
- break;
- case PROP_CHANNEL:
- g_value_set_object (value, priv->channel);
- break;
- case PROP_CHANNEL_WRAPPER:
- g_value_set_object (value, priv->channel_wrapper);
- break;
- case PROP_CONTACT:
- g_value_set_object (value, priv->contact);
- break;
- case PROP_INCOMING:
- g_value_set_boolean (value, priv->incoming);
- break;
- case PROP_STATUS:
- g_value_set_enum (value, priv->status);
- break;
- case PROP_USER_ACTION_TIME:
- g_value_set_int64 (value, priv->user_action_time);
- break;
- default:
- g_assert_not_reached ();
- }
-}
-
-static void
-empathy_dispatch_operation_invalidated (TpProxy *proxy, guint domain,
- gint code, char *message, EmpathyDispatchOperation *self)
-{
- empathy_dispatch_operation_set_status (self,
- EMPATHY_DISPATCHER_OPERATION_STATE_INVALIDATED);
-
- g_signal_emit (self, signals[INVALIDATED], 0, domain, code, message);
-}
-
-static void
-dispatcher_operation_got_contact_cb (TpConnection *connection,
- EmpathyContact *contact,
- const GError *error,
- gpointer user_data,
- GObject *self)
-{
- EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
-
- if (error)
- {
- /* FIXME: We should cancel the operation */
- DEBUG ("Error: %s", error->message);
- return;
- }
-
- if (priv->contact != NULL)
- g_object_unref (priv->contact);
- priv->contact = g_object_ref (contact);
- g_object_notify (G_OBJECT (self), "contact");
-
- /* Ensure to keep the self object alive while the call_when_ready is
- * running */
- g_object_ref (self);
- tp_channel_call_when_ready (priv->channel,
- empathy_dispatch_operation_channel_ready_cb, self);
-}
-
-static void
-dispatch_operation_connection_ready (TpConnection *connection,
- const GError *error,
- gpointer user_data)
-{
- EmpathyDispatchOperation *self = EMPATHY_DISPATCH_OPERATION (user_data);
- EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
- TpHandle handle;
- TpHandleType handle_type;
-
- if (error != NULL)
- goto out;
-
- if (priv->status >= EMPATHY_DISPATCHER_OPERATION_STATE_CLAIMED)
- /* no point to get more information */
- goto out;
-
- handle = tp_channel_get_handle (priv->channel, &handle_type);
- if (handle_type == TP_HANDLE_TYPE_CONTACT && priv->contact == NULL)
- {
- empathy_tp_contact_factory_get_from_handle (priv->connection, handle,
- dispatcher_operation_got_contact_cb, NULL, NULL, G_OBJECT (self));
- }
- else
- {
- g_object_ref (self);
- tp_channel_call_when_ready (priv->channel,
- empathy_dispatch_operation_channel_ready_cb, self);
- }
-
-out:
- g_object_unref (self);
-}
-
-static void
-empathy_dispatch_operation_constructed (GObject *object)
-{
- EmpathyDispatchOperation *self = EMPATHY_DISPATCH_OPERATION (object);
- EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
-
- empathy_dispatch_operation_set_status (self,
- EMPATHY_DISPATCHER_OPERATION_STATE_PREPARING);
-
- priv->invalidated_handler =
- g_signal_connect (priv->channel, "invalidated",
- G_CALLBACK (empathy_dispatch_operation_invalidated), self);
-
- g_object_ref (self);
- tp_connection_call_when_ready (priv->connection,
- dispatch_operation_connection_ready, object);
-}
-
-static void
-empathy_dispatch_operation_class_init (
- EmpathyDispatchOperationClass *empathy_dispatch_operation_class)
-{
- GObjectClass *object_class =
- G_OBJECT_CLASS (empathy_dispatch_operation_class);
- GParamSpec *param_spec;
-
- g_type_class_add_private (empathy_dispatch_operation_class,
- sizeof (EmpathyDispatchOperationPriv));
-
- object_class->set_property = empathy_dispatch_operation_set_property;
- object_class->get_property = empathy_dispatch_operation_get_property;
-
- object_class->dispose = empathy_dispatch_operation_dispose;
- object_class->finalize = empathy_dispatch_operation_finalize;
- object_class->constructed = empathy_dispatch_operation_constructed;
-
- signals[READY] = g_signal_new ("ready",
- G_OBJECT_CLASS_TYPE(empathy_dispatch_operation_class),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- signals[CLAIMED] = g_signal_new ("claimed",
- G_OBJECT_CLASS_TYPE(empathy_dispatch_operation_class),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- signals[INVALIDATED] = g_signal_new ("invalidated",
- G_OBJECT_CLASS_TYPE(empathy_dispatch_operation_class),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL,
- _empathy_marshal_VOID__UINT_INT_STRING,
- G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_INT, G_TYPE_STRING);
-
- param_spec = g_param_spec_object ("connection",
- "connection", "The telepathy connection",
- TP_TYPE_CONNECTION,
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_CONNECTION,
- param_spec);
-
- param_spec = g_param_spec_object ("channel",
- "channel", "The telepathy channel",
- TP_TYPE_CHANNEL,
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_CHANNEL,
- param_spec);
-
- param_spec = g_param_spec_object ("channel-wrapper",
- "channel wrapper", "The empathy specific channel wrapper",
- G_TYPE_OBJECT,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_CHANNEL_WRAPPER,
- param_spec);
-
- param_spec = g_param_spec_object ("contact",
- "contact", "The empathy contact",
- EMPATHY_TYPE_CONTACT,
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_CONTACT,
- param_spec);
-
- param_spec = g_param_spec_boolean ("incoming",
- "incoming", "Whether or not the channel is incoming",
- FALSE,
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_INCOMING,
- param_spec);
-
- param_spec = g_param_spec_enum ("status",
- "status", "Status of the dispatch operation",
- EMPATHY_TYPE_DISPATCH_OPERATION_STATE, 0,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_STATUS, param_spec);
-
- param_spec = g_param_spec_int64 ("user-action-time",
- "user action time", "The user action time of the operation",
- G_MININT64, G_MAXINT64, 0,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_USER_ACTION_TIME,
- param_spec);
-}
-
-void
-empathy_dispatch_operation_dispose (GObject *object)
-{
- EmpathyDispatchOperation *self = EMPATHY_DISPATCH_OPERATION (object);
- EmpathyDispatchOperationPriv *priv =
- GET_PRIV (self);
-
- if (priv->dispose_has_run)
- return;
-
- priv->dispose_has_run = TRUE;
-
- g_object_unref (priv->connection);
-
- if (priv->ready_handler != 0)
- g_signal_handler_disconnect (priv->channel_wrapper,
- priv->ready_handler);
-
- if (priv->channel_wrapper != NULL)
- g_object_unref (priv->channel_wrapper);
-
- g_signal_handler_disconnect (priv->channel, priv->invalidated_handler);
- g_object_unref (priv->channel);
-
- if (priv->contact != NULL)
- g_object_unref (priv->contact);
-
- if (G_OBJECT_CLASS (empathy_dispatch_operation_parent_class)->dispose)
- G_OBJECT_CLASS (empathy_dispatch_operation_parent_class)->dispose (object);
-}
-
-void
-empathy_dispatch_operation_finalize (GObject *object)
-{
- /* free any data held directly by the object here */
- G_OBJECT_CLASS (empathy_dispatch_operation_parent_class)->finalize (object);
-}
-
-static void
-empathy_dispatch_operation_set_status (EmpathyDispatchOperation *self,
- EmpathyDispatchOperationState status)
-{
- EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
-
- g_assert (status >= priv->status);
-
-
- if (priv->status != status)
- {
- DEBUG ("Dispatch operation %s status: %d -> %d",
- empathy_dispatch_operation_get_object_path (self),
- priv->status, status);
-
- priv->status = status;
- g_object_notify (G_OBJECT (self), "status");
-
- if (status == EMPATHY_DISPATCHER_OPERATION_STATE_PENDING)
- g_signal_emit (self, signals[READY], 0);
- }
-}
-
-static void
-empathy_dispatch_operation_channel_ready_cb (TpChannel *channel,
- const GError *error, gpointer user_data)
-{
- EmpathyDispatchOperation *self = EMPATHY_DISPATCH_OPERATION (user_data);
- EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
-
- /* FIXME: remove */
-
- /* The error will be handled in empathy_dispatch_operation_invalidated */
- if (error != NULL)
- goto out;
-
- g_assert (channel == priv->channel);
-
- if (priv->status >= EMPATHY_DISPATCHER_OPERATION_STATE_CLAIMED)
- /* no point to get more information */
- goto out;
-
- /* If the channel wrapper is defined, we assume it's ready */
- if (priv->channel_wrapper != NULL)
- goto ready;
-
-ready:
- empathy_dispatch_operation_set_status (self,
- EMPATHY_DISPATCHER_OPERATION_STATE_PENDING);
-out:
- g_object_unref (self);
-}
-
-EmpathyDispatchOperation *
-empathy_dispatch_operation_new (TpConnection *connection,
- TpChannel *channel,
- EmpathyContact *contact,
- gboolean incoming,
- gint64 user_action_time)
-{
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (channel != NULL, NULL);
-
- return g_object_new (EMPATHY_TYPE_DISPATCH_OPERATION,
- "connection", connection,
- "channel", channel,
- "contact", contact,
- "incoming", incoming,
- "user-action-time", user_action_time,
- NULL);
-}
-
-void
-empathy_dispatch_operation_start (EmpathyDispatchOperation *operation)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation));
-
- priv = GET_PRIV (operation);
-
- g_return_if_fail (
- priv->status == EMPATHY_DISPATCHER_OPERATION_STATE_PENDING);
-
- empathy_dispatch_operation_set_status (operation,
- EMPATHY_DISPATCHER_OPERATION_STATE_DISPATCHING);
-}
-
-/* Returns whether or not the operation was successfully claimed */
-gboolean
-empathy_dispatch_operation_claim (EmpathyDispatchOperation *operation)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation), FALSE);
-
- priv = GET_PRIV (operation);
-
- if (priv->status == EMPATHY_DISPATCHER_OPERATION_STATE_CLAIMED)
- return FALSE;
-
- empathy_dispatch_operation_set_status (operation,
- EMPATHY_DISPATCHER_OPERATION_STATE_CLAIMED);
-
- g_signal_emit (operation, signals[CLAIMED], 0);
-
- return TRUE;
-}
-
-TpConnection *
-empathy_dispatch_operation_get_tp_connection (
- EmpathyDispatchOperation *operation)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation), NULL);
-
- priv = GET_PRIV (operation);
-
- return priv->connection;
-}
-
-TpChannel *
-empathy_dispatch_operation_get_channel (EmpathyDispatchOperation *operation)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation), NULL);
-
- priv = GET_PRIV (operation);
-
- return priv->channel;
-}
-
-GObject *
-empathy_dispatch_operation_get_channel_wrapper (
- EmpathyDispatchOperation *operation)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation), NULL);
-
- priv = GET_PRIV (operation);
-
- return priv->channel_wrapper;
-}
-
-const gchar *
-empathy_dispatch_operation_get_channel_type (
- EmpathyDispatchOperation *operation)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation), NULL);
-
- priv = GET_PRIV (operation);
-
- return tp_channel_get_channel_type (priv->channel);
-}
-
-GQuark
-empathy_dispatch_operation_get_channel_type_id (
- EmpathyDispatchOperation *operation)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation), 0);
-
- priv = GET_PRIV (operation);
-
- return tp_channel_get_channel_type_id (priv->channel);
-}
-
-const gchar *
-empathy_dispatch_operation_get_object_path (
- EmpathyDispatchOperation *operation)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation), NULL);
-
- priv = GET_PRIV (operation);
-
- return tp_proxy_get_object_path (TP_PROXY (priv->channel));
-}
-
-EmpathyDispatchOperationState
-empathy_dispatch_operation_get_status (EmpathyDispatchOperation *operation)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation),
- EMPATHY_DISPATCHER_OPERATION_STATE_PREPARING);
-
- priv = GET_PRIV (operation);
-
- return priv->status;
-}
-
-gboolean
-empathy_dispatch_operation_is_incoming (EmpathyDispatchOperation *operation)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation), FALSE);
-
- priv = GET_PRIV (operation);
-
- return priv->incoming;
-}
-
-void
-empathy_dispatch_operation_set_user_action_time (
- EmpathyDispatchOperation *self,
- gint64 user_action_time)
-{
- EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
-
- priv->user_action_time = user_action_time;
-}
-
-gint64
-empathy_dispatch_operation_get_user_action_time (EmpathyDispatchOperation *self)
-{
- EmpathyDispatchOperationPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (self), FALSE);
-
- priv = GET_PRIV (self);
-
- return priv->user_action_time;
-}
diff --git a/libempathy/empathy-dispatch-operation.h b/libempathy/empathy-dispatch-operation.h
deleted file mode 100644
index b7614234f..000000000
--- a/libempathy/empathy-dispatch-operation.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * empathy-dispatch-operation.h - Header for EmpathyDispatchOperation
- * Copyright (C) 2008 Collabora Ltd.
- * @author Sjoerd Simons <sjoerd.simons@collabora.co.uk>
- *
- * 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
- */
-
-#ifndef __EMPATHY_DISPATCH_OPERATION_H__
-#define __EMPATHY_DISPATCH_OPERATION_H__
-
-#include <glib-object.h>
-
-#include <libempathy/empathy-contact.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/channel.h>
-
-G_BEGIN_DECLS
-
-typedef struct _EmpathyDispatchOperation EmpathyDispatchOperation;
-typedef struct _EmpathyDispatchOperationClass EmpathyDispatchOperationClass;
-
-struct _EmpathyDispatchOperationClass {
- GObjectClass parent_class;
-};
-
-struct _EmpathyDispatchOperation {
- GObject parent;
-};
-
-typedef enum {
- /* waiting for the channel information to be ready */
- EMPATHY_DISPATCHER_OPERATION_STATE_PREPARING = 0,
- /* Information gathered ready to be dispatched */
- EMPATHY_DISPATCHER_OPERATION_STATE_PENDING,
- /* Send to handlers for dispatching */
- EMPATHY_DISPATCHER_OPERATION_STATE_DISPATCHING,
- /* somebody claimed the channel */
- EMPATHY_DISPATCHER_OPERATION_STATE_CLAIMED,
- /* dispatch operation invalidated, underlying channel died */
- EMPATHY_DISPATCHER_OPERATION_STATE_INVALIDATED,
-} EmpathyDispatchOperationState;
-
-GType empathy_dispatch_operation_get_type (void);
-
-/* TYPE MACROS */
-#define EMPATHY_TYPE_DISPATCH_OPERATION \
- (empathy_dispatch_operation_get_type ())
-#define EMPATHY_DISPATCH_OPERATION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), EMPATHY_TYPE_DISPATCH_OPERATION, \
- EmpathyDispatchOperation))
-#define EMPATHY_DISPATCH_OPERATION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), EMPATHY_TYPE_DISPATCH_OPERATION, \
- EmpathyDispatchOperationClass))
-#define EMPATHY_IS_DISPATCH_OPERATION(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), EMPATHY_TYPE_DISPATCH_OPERATION))
-#define EMPATHY_IS_DISPATCH_OPERATION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), EMPATHY_TYPE_DISPATCH_OPERATION))
-#define EMPATHY_DISPATCH_OPERATION_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_DISPATCH_OPERATION, \
- EmpathyDispatchOperationClass))
-
-EmpathyDispatchOperation *empathy_dispatch_operation_new (
- TpConnection *connection, TpChannel *channel, EmpathyContact *contact,
- gboolean incoming,
- gint64 user_action_time);
-
-EmpathyDispatchOperation *empathy_dispatch_operation_new_with_wrapper (
- TpConnection *connection, TpChannel *channel, EmpathyContact *contact,
- gboolean incoming,
- gint64 user_action_time,
- GObject *channel_wrapper);
-
-/* Start the dispatching process, goes to the APPROVING state for incoming
- * channels and DISPATCHING for outgoing ones */
-void empathy_dispatch_operation_start (EmpathyDispatchOperation *operation);
-
-/* Returns whether or not the operation was successfully claimed */
-gboolean empathy_dispatch_operation_claim (EmpathyDispatchOperation *operation);
-
-TpChannel *empathy_dispatch_operation_get_channel (
- EmpathyDispatchOperation *operation);
-
-GObject *empathy_dispatch_operation_get_channel_wrapper (
- EmpathyDispatchOperation *operation);
-
-TpConnection *empathy_dispatch_operation_get_tp_connection (
- EmpathyDispatchOperation *operation);
-
-const gchar *empathy_dispatch_operation_get_channel_type (
- EmpathyDispatchOperation *operation);
-
-GQuark empathy_dispatch_operation_get_channel_type_id (
- EmpathyDispatchOperation *operation);
-
-const gchar * empathy_dispatch_operation_get_object_path (
- EmpathyDispatchOperation *operation);
-
-EmpathyDispatchOperationState empathy_dispatch_operation_get_status (
- EmpathyDispatchOperation *operation);
-
-gboolean empathy_dispatch_operation_is_incoming (
- EmpathyDispatchOperation *operation);
-
-void empathy_dispatch_operation_set_user_action_time (
- EmpathyDispatchOperation *self,
- gint64 user_action_time);
-
-gint64 empathy_dispatch_operation_get_user_action_time (
- EmpathyDispatchOperation *self);
-
-G_END_DECLS
-
-#endif /* #ifndef __EMPATHY_DISPATCH_OPERATION_H__*/
diff --git a/libempathy/empathy-dispatcher.h b/libempathy/empathy-dispatcher.h
index c44ac9d01..bf6e169b7 100644
--- a/libempathy/empathy-dispatcher.h
+++ b/libempathy/empathy-dispatcher.h
@@ -28,7 +28,6 @@
#include <telepathy-glib/channel.h>
#include "empathy-contact.h"
-#include "empathy-dispatch-operation.h"
G_BEGIN_DECLS
diff --git a/libempathy/empathy-ft-factory.h b/libempathy/empathy-ft-factory.h
index 00b2af5a9..f59ecc44c 100644
--- a/libempathy/empathy-ft-factory.h
+++ b/libempathy/empathy-ft-factory.h
@@ -29,7 +29,6 @@
#include "empathy-contact.h"
#include "empathy-ft-handler.h"
-#include "empathy-dispatch-operation.h"
G_BEGIN_DECLS
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 82b13161d..4ab367b42 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -45,7 +45,6 @@
#include "empathy-contact-manager.h"
#include "empathy-individual-manager.h"
#include "empathy-dispatcher.h"
-#include "empathy-dispatch-operation.h"
#include "empathy-idle.h"
#include "empathy-tp-call.h"
#include "empathy-tp-contact-factory.h"
diff --git a/src/empathy.c b/src/empathy.c
index c1282808a..fc780fac0 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -54,7 +54,6 @@
#include <libempathy/empathy-connectivity.h>
#include <libempathy/empathy-connection-managers.h>
#include <libempathy/empathy-dispatcher.h>
-#include <libempathy/empathy-dispatch-operation.h>
#include <libempathy/empathy-ft-factory.h>
#include <libempathy/empathy-gsettings.h>
#include <libempathy/empathy-tp-chat.h>