aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-dispatcher.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-19 00:11:58 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-19 00:11:58 +0800
commitbfb75bb92f7e1a4aa93a9e144b781faf03df93eb (patch)
tree700eb3afadb8e17d8035a92ee0e30ab018adb495 /libempathy/empathy-dispatcher.c
parent13699e023a50f88055f24c0230c28a7163c8356d (diff)
parent247ea7a25d8495d2f1cd2b6ac2bf6fe582a3c5fb (diff)
downloadgsoc2013-empathy-bfb75bb92f7e1a4aa93a9e144b781faf03df93eb.tar
gsoc2013-empathy-bfb75bb92f7e1a4aa93a9e144b781faf03df93eb.tar.gz
gsoc2013-empathy-bfb75bb92f7e1a4aa93a9e144b781faf03df93eb.tar.bz2
gsoc2013-empathy-bfb75bb92f7e1a4aa93a9e144b781faf03df93eb.tar.lz
gsoc2013-empathy-bfb75bb92f7e1a4aa93a9e144b781faf03df93eb.tar.xz
gsoc2013-empathy-bfb75bb92f7e1a4aa93a9e144b781faf03df93eb.tar.zst
gsoc2013-empathy-bfb75bb92f7e1a4aa93a9e144b781faf03df93eb.zip
Merge branch 'approvers-redone-599158'
Diffstat (limited to 'libempathy/empathy-dispatcher.c')
-rw-r--r--libempathy/empathy-dispatcher.c53
1 files changed, 4 insertions, 49 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index c8943c9df..ce234e452 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -110,7 +110,6 @@ enum
enum
{
OBSERVE,
- APPROVE,
DISPATCH,
LAST_SIGNAL
};
@@ -431,16 +430,6 @@ dispatcher_channel_invalidated_cb (TpProxy *proxy,
}
static void
-dispatch_operation_approved_cb (EmpathyDispatchOperation *operation,
- EmpathyDispatcher *self)
-{
- g_assert (empathy_dispatch_operation_is_incoming (operation));
- DEBUG ("Send of for dispatching: %s",
- empathy_dispatch_operation_get_object_path (operation));
- g_signal_emit (self, signals[DISPATCH], 0, operation);
-}
-
-static void
dispatch_operation_claimed_cb (EmpathyDispatchOperation *operation,
EmpathyDispatcher *self)
{
@@ -480,9 +469,6 @@ dispatch_operation_ready_cb (EmpathyDispatchOperation *operation,
ConnectionData *cd;
EmpathyDispatchOperationState status;
- g_signal_connect (operation, "approved",
- G_CALLBACK (dispatch_operation_approved_cb), self);
-
g_signal_connect (operation, "claimed",
G_CALLBACK (dispatch_operation_claimed_cb), self);
@@ -508,19 +494,10 @@ dispatch_operation_ready_cb (EmpathyDispatchOperation *operation,
if (status == EMPATHY_DISPATCHER_OPERATION_STATE_CLAIMED)
return;
- if (status == EMPATHY_DISPATCHER_OPERATION_STATE_APPROVING)
- {
- DEBUG ("Send to approvers: %s",
- empathy_dispatch_operation_get_object_path (operation));
- g_signal_emit (self, signals[APPROVE], 0, operation);
- }
- else
- {
- g_assert (status == EMPATHY_DISPATCHER_OPERATION_STATE_DISPATCHING);
- DEBUG ("Send of for dispatching: %s",
- empathy_dispatch_operation_get_object_path (operation));
- g_signal_emit (self, signals[DISPATCH], 0, operation);
- }
+ g_assert (status == EMPATHY_DISPATCHER_OPERATION_STATE_DISPATCHING);
+ DEBUG ("Send of for dispatching: %s",
+ empathy_dispatch_operation_get_object_path (operation));
+ g_signal_emit (self, signals[DISPATCH], 0, operation);
g_object_unref (self);
}
@@ -608,15 +585,6 @@ dispatcher_connection_new_channel (EmpathyDispatcher *self,
DEBUG ("%s channel of type %s on %s", incoming ? "incoming" : "outgoing",
channel_type, object_path);
- if ((operation = g_hash_table_lookup (cd->dispatching_channels,
- object_path)) != NULL)
- {
- /* This operation was already being dispatched, assume we got the channel
- * again because something asked for it and approve it right away */
- empathy_dispatch_operation_approve (operation);
- return;
- }
-
if (properties == NULL)
channel = tp_channel_new (connection, object_path, channel_type,
handle_type, handle, NULL);
@@ -680,9 +648,6 @@ dispatcher_connection_new_channel (EmpathyDispatcher *self,
}
}
- if (g_hash_table_lookup (cd->dispatched_channels, object_path) != NULL)
- empathy_dispatch_operation_approve (operation);
-
dispatcher_start_dispatching (dispatcher, operation, cd);
}
@@ -1093,16 +1058,6 @@ empathy_dispatcher_class_init (EmpathyDispatcherClass *klass)
G_TYPE_NONE,
1, EMPATHY_TYPE_DISPATCH_OPERATION);
- signals[APPROVE] =
- g_signal_new ("approve",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE,
- 1, EMPATHY_TYPE_DISPATCH_OPERATION);
-
signals[DISPATCH] =
g_signal_new ("dispatch",
G_TYPE_FROM_CLASS (klass),