summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-01-22 15:52:11 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-01-22 17:31:43 +0100
commit78c4725aaa8e5321e98261e278e46048bd4b9052 (patch)
tree9da6fd3901cff52bb57368b88672c918f0eb0fe9
parent90acb0012361a8a4f912bf887e53ce59241acd41 (diff)
HandleWithTime() has been removed
-rw-r--r--src/mcd-dispatch-operation.c15
-rw-r--r--tests/twisted/dispatcher/already-has-channel.py2
-rw-r--r--tests/twisted/dispatcher/bypass-approval.py2
-rw-r--r--tests/twisted/dispatcher/capture-bundle.py2
-rw-r--r--tests/twisted/dispatcher/delay-approvers.py2
-rw-r--r--tests/twisted/dispatcher/delay-then-call-handle-with.py2
-rw-r--r--tests/twisted/dispatcher/dispatch-delayed-by-mini-plugin.py4
-rw-r--r--tests/twisted/dispatcher/dispatch-text.py12
-rw-r--r--tests/twisted/dispatcher/exploding-bundles.py4
-rw-r--r--tests/twisted/dispatcher/handle-channels-fails.py6
-rw-r--r--tests/twisted/dispatcher/lose-text.py2
-rw-r--r--tests/twisted/dispatcher/recover-from-disconnect.py2
-rw-r--r--tests/twisted/dispatcher/redispatch-channels.py2
-rw-r--r--tests/twisted/dispatcher/respawn-activatable-observers.py2
-rw-r--r--tests/twisted/dispatcher/respawn-observers.py2
-rw-r--r--tests/twisted/dispatcher/some-delay-approvers.py2
16 files changed, 25 insertions, 38 deletions
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 3bc3ae70..e2aae21e 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -872,8 +872,6 @@ _mcd_dispatch_operation_finish (McdDispatchOperation *operation,
DEBUG ("successful HandleWith, channel went to %s",
successful_handler);
- /* HandleWith and HandleWithTime both return void, so
- * it's OK to not distinguish */
tp_svc_channel_dispatch_operation_return_from_handle_with (
approval->context);
approval->context = NULL;
@@ -931,7 +929,7 @@ static gboolean mcd_dispatch_operation_check_handle_with (
McdDispatchOperation *self, const gchar *handler_name, GError **error);
static void
-dispatch_operation_handle_with_time (TpSvcChannelDispatchOperation *cdo,
+dispatch_operation_handle_with (TpSvcChannelDispatchOperation *cdo,
const gchar *handler_name,
gint64 user_action_timestamp,
DBusGMethodInvocation *context)
@@ -955,16 +953,6 @@ dispatch_operation_handle_with_time (TpSvcChannelDispatchOperation *cdo,
_mcd_dispatch_operation_check_client_locks (self);
}
-static void
-dispatch_operation_handle_with (TpSvcChannelDispatchOperation *cdo,
- const gchar *handler_name,
- DBusGMethodInvocation *context)
-{
- dispatch_operation_handle_with_time (cdo, handler_name,
- TP_USER_ACTION_TIME_NOT_USER_ACTION,
- context);
-}
-
typedef struct {
McdDispatchOperation *self;
DBusGMethodInvocation *context;
@@ -1066,7 +1054,6 @@ dispatch_operation_iface_init (TpSvcChannelDispatchOperationClass *iface,
iface, dispatch_operation_##x)
IMPLEMENT(handle_with);
IMPLEMENT(claim);
- IMPLEMENT(handle_with_time);
#undef IMPLEMENT
}
diff --git a/tests/twisted/dispatcher/already-has-channel.py b/tests/twisted/dispatcher/already-has-channel.py
index 4d382989..8e64b988 100644
--- a/tests/twisted/dispatcher/already-has-channel.py
+++ b/tests/twisted/dispatcher/already-has-channel.py
@@ -185,7 +185,7 @@ def test(q, bus, mc):
# The user responds to Empathy first
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Empathy')
+ cs.tp_name_prefix + '.Client.Empathy', 0)
# Empathy is asked to handle the channels
e = q.expect('dbus-method-call',
diff --git a/tests/twisted/dispatcher/bypass-approval.py b/tests/twisted/dispatcher/bypass-approval.py
index 16c71683..0bef1f64 100644
--- a/tests/twisted/dispatcher/bypass-approval.py
+++ b/tests/twisted/dispatcher/bypass-approval.py
@@ -157,7 +157,7 @@ def expect_and_exercise_approval(q, bus, chan, channel_properties,
# The user responds to Empathy first
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Empathy')
+ cs.tp_name_prefix + '.Client.Empathy', 0)
# Empathy is asked to handle the channels
e = q.expect('dbus-method-call',
diff --git a/tests/twisted/dispatcher/capture-bundle.py b/tests/twisted/dispatcher/capture-bundle.py
index 1ce247b6..5da029ef 100644
--- a/tests/twisted/dispatcher/capture-bundle.py
+++ b/tests/twisted/dispatcher/capture-bundle.py
@@ -164,7 +164,7 @@ def test(q, bus, mc):
# The user responds to Empathy first
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Empathy')
+ cs.tp_name_prefix + '.Client.Empathy', 0)
# Empathy is asked to handle the channels
e = q.expect('dbus-method-call',
diff --git a/tests/twisted/dispatcher/delay-approvers.py b/tests/twisted/dispatcher/delay-approvers.py
index f2ae7b19..cf278d85 100644
--- a/tests/twisted/dispatcher/delay-approvers.py
+++ b/tests/twisted/dispatcher/delay-approvers.py
@@ -116,7 +116,7 @@ def test(q, bus, mc):
# The user responds to Kopete
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Kopete')
+ cs.tp_name_prefix + '.Client.Kopete', 0)
# Kopete is asked to handle the channels
k = q.expect('dbus-method-call',
diff --git a/tests/twisted/dispatcher/delay-then-call-handle-with.py b/tests/twisted/dispatcher/delay-then-call-handle-with.py
index 4ebd01c1..62fc6989 100644
--- a/tests/twisted/dispatcher/delay-then-call-handle-with.py
+++ b/tests/twisted/dispatcher/delay-then-call-handle-with.py
@@ -104,7 +104,7 @@ def test(q, bus, mc):
# We can't call this synchronously because MC won't return until
# HandleChannel returns.
- call_async(q, cdo_iface, 'HandleWith', cs.CLIENT + '.Kopete')
+ call_async(q, cdo_iface, 'HandleWith', cs.CLIENT + '.Kopete', 0)
# Finally return from ObserveChannels.
q.dbus_return(o.message, bus=bus, signature='')
diff --git a/tests/twisted/dispatcher/dispatch-delayed-by-mini-plugin.py b/tests/twisted/dispatcher/dispatch-delayed-by-mini-plugin.py
index 2db9d912..33f4f1a1 100644
--- a/tests/twisted/dispatcher/dispatch-delayed-by-mini-plugin.py
+++ b/tests/twisted/dispatcher/dispatch-delayed-by-mini-plugin.py
@@ -222,7 +222,7 @@ def test(q, bus, mc):
kopete_cdo = bus.get_object(cs.CD, cdo_path)
kopete_cdo_iface = dbus.Interface(kopete_cdo, cs.CDO)
call_async(q, kopete_cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Kopete')
+ cs.tp_name_prefix + '.Client.Kopete', 0)
check_handler = q.expect('dbus-method-call', path='/com/example/Policy',
interface='com.example.Policy', method='CheckHandler')
@@ -232,7 +232,7 @@ def test(q, bus, mc):
# well, let's try *something*... Kopete has been marked as failed,
# so this will try Empathy
- call_async(q, kopete_cdo_iface, 'HandleWith', '')
+ call_async(q, kopete_cdo_iface, 'HandleWith', '', 0)
check_handler = q.expect('dbus-method-call', path='/com/example/Policy',
interface='com.example.Policy', method='CheckHandler')
diff --git a/tests/twisted/dispatcher/dispatch-text.py b/tests/twisted/dispatcher/dispatch-text.py
index 90b9ad4d..2d9438d2 100644
--- a/tests/twisted/dispatcher/dispatch-text.py
+++ b/tests/twisted/dispatcher/dispatch-text.py
@@ -166,15 +166,15 @@ def test(q, bus, mc):
# Using an invalid Handler name should fail
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.The.Moon.On.A.Stick')
+ cs.tp_name_prefix + '.The.Moon.On.A.Stick', 0)
q.expect('dbus-error', method='HandleWith')
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.the moon on a stick')
+ cs.tp_name_prefix + '.Client.the moon on a stick', 0)
q.expect('dbus-error', method='HandleWith')
# The user responds to Empathy first
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Empathy')
+ cs.tp_name_prefix + '.Client.Empathy', 0)
# Empathy is asked to handle the channels
e = q.expect('dbus-method-call',
@@ -195,7 +195,7 @@ def test(q, bus, mc):
# Now there are no more active channel dispatch operations
assert cd_props.Get(cs.CD_IFACE_OP_LIST, 'DispatchOperations') == []
- # Approve another channel using HandleWithTime()
+ # Approve another channe
channel_properties = dbus.Dictionary(text_fixed_properties,
signature='sv')
channel_properties[cs.CHANNEL + '.TargetID'] = 'lucien'
@@ -296,7 +296,7 @@ def test(q, bus, mc):
# user's attention
# The user responds to Empathy first
- call_async(q, cdo_iface, 'HandleWithTime',
+ call_async(q, cdo_iface, 'HandleWith',
cs.tp_name_prefix + '.Client.Empathy', 13)
# Empathy is asked to handle the channels
@@ -312,7 +312,7 @@ def test(q, bus, mc):
q.dbus_return(e.message, bus=empathy_bus, signature='')
q.expect_many(
- EventPattern('dbus-return', method='HandleWithTime'),
+ EventPattern('dbus-return', method='HandleWith'),
EventPattern('dbus-signal', interface=cs.CDO, signal='Finished'),
EventPattern('dbus-signal', interface=cs.CD_IFACE_OP_LIST,
signal='DispatchOperationFinished'),
diff --git a/tests/twisted/dispatcher/exploding-bundles.py b/tests/twisted/dispatcher/exploding-bundles.py
index 5505b6fc..9eaa6cf4 100644
--- a/tests/twisted/dispatcher/exploding-bundles.py
+++ b/tests/twisted/dispatcher/exploding-bundles.py
@@ -233,7 +233,7 @@ def test(q, bus, mc):
# Both Approvers now have a flashing icon or something, trying to get the
# user's attention. The user clicks on Empathy
call_async(q, text_cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.org.gnome.Empathy')
+ cs.tp_name_prefix + '.Client.org.gnome.Empathy', 0)
# Empathy is asked to handle the channel
e = q.expect('dbus-method-call',
@@ -254,7 +254,7 @@ def test(q, bus, mc):
# The user doesn't care which client will handle the channel - because
# Empathy is the only possibility, it will be chosen (this is also a
# regression test for the ability to leave the handler unspecified).
- call_async(q, media_cdo_iface, 'HandleWith', '')
+ call_async(q, media_cdo_iface, 'HandleWith', '', 0)
# Empathy is asked to handle the channel
e = q.expect('dbus-method-call',
diff --git a/tests/twisted/dispatcher/handle-channels-fails.py b/tests/twisted/dispatcher/handle-channels-fails.py
index 8f7da752..5497b49f 100644
--- a/tests/twisted/dispatcher/handle-channels-fails.py
+++ b/tests/twisted/dispatcher/handle-channels-fails.py
@@ -144,7 +144,7 @@ def test(q, bus, mc):
q.dbus_return(e.message, bus=empathy_bus, signature='')
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Empathy')
+ cs.tp_name_prefix + '.Client.Empathy', 0)
# Empathy is asked to handle the channels
e = q.expect('dbus-method-call',
@@ -168,7 +168,7 @@ def test(q, bus, mc):
# I'm Feeling Lucky. It might work if I try again? Maybe?
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Empathy')
+ cs.tp_name_prefix + '.Client.Empathy', 0)
# Empathy is asked to handle the channels, again
e = q.expect('dbus-method-call',
@@ -189,7 +189,7 @@ def test(q, bus, mc):
forbidden = [EventPattern('dbus-method-call', method='HandleChannel',
path=empathy.object_path)]
q.forbid_events(forbidden)
- call_async(q, cdo_iface, 'HandleWith', '')
+ call_async(q, cdo_iface, 'HandleWith', '', 0)
# Kopete is asked to handle the channels
k = q.expect('dbus-method-call',
diff --git a/tests/twisted/dispatcher/lose-text.py b/tests/twisted/dispatcher/lose-text.py
index 0cc09921..5d9c7b2d 100644
--- a/tests/twisted/dispatcher/lose-text.py
+++ b/tests/twisted/dispatcher/lose-text.py
@@ -149,7 +149,7 @@ def test(q, bus, mc):
# Empathy wants to handle the channel, but is too late
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Empathy')
+ cs.tp_name_prefix + '.Client.Empathy', 0)
e = q.expect('dbus-error')
# FIXME: e.error.get_dbus_name() == [...Disconnected] which doesn't
# seem like the most appropriate thing for MC to do (but at least it's
diff --git a/tests/twisted/dispatcher/recover-from-disconnect.py b/tests/twisted/dispatcher/recover-from-disconnect.py
index 396a67e6..7754ec1a 100644
--- a/tests/twisted/dispatcher/recover-from-disconnect.py
+++ b/tests/twisted/dispatcher/recover-from-disconnect.py
@@ -245,7 +245,7 @@ def test_dispatching(q, bus, conn, account, empathy, kopete):
# The user responds to Empathy first
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Empathy')
+ cs.tp_name_prefix + '.Client.Empathy', 0)
# Empathy is asked to handle the channels
e = q.expect('dbus-method-call',
diff --git a/tests/twisted/dispatcher/redispatch-channels.py b/tests/twisted/dispatcher/redispatch-channels.py
index fa9053d7..28d4a9b7 100644
--- a/tests/twisted/dispatcher/redispatch-channels.py
+++ b/tests/twisted/dispatcher/redispatch-channels.py
@@ -238,7 +238,7 @@ def test(q, bus, mc):
# gnome-shell handles the channel itself first
call_async(q, cdo, 'HandleWith',
- cs.tp_name_prefix + '.Client.GnomeShell')
+ cs.tp_name_prefix + '.Client.GnomeShell', 0)
e = q.expect('dbus-method-call',
path=gs.object_path,
diff --git a/tests/twisted/dispatcher/respawn-activatable-observers.py b/tests/twisted/dispatcher/respawn-activatable-observers.py
index 2736e550..4257386a 100644
--- a/tests/twisted/dispatcher/respawn-activatable-observers.py
+++ b/tests/twisted/dispatcher/respawn-activatable-observers.py
@@ -157,7 +157,7 @@ def test(q, bus, mc):
# The user responds to Kopete
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Kopete')
+ cs.tp_name_prefix + '.Client.Kopete', 0)
# Kopete is asked to handle the channels
k = q.expect('dbus-method-call',
diff --git a/tests/twisted/dispatcher/respawn-observers.py b/tests/twisted/dispatcher/respawn-observers.py
index fec35e72..535226d1 100644
--- a/tests/twisted/dispatcher/respawn-observers.py
+++ b/tests/twisted/dispatcher/respawn-observers.py
@@ -150,7 +150,7 @@ def test(q, bus, mc):
# The user responds to Kopete
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Kopete')
+ cs.tp_name_prefix + '.Client.Kopete', 0)
# Kopete is asked to handle the channels
k = q.expect('dbus-method-call',
diff --git a/tests/twisted/dispatcher/some-delay-approvers.py b/tests/twisted/dispatcher/some-delay-approvers.py
index 7ad24414..af5e2b97 100644
--- a/tests/twisted/dispatcher/some-delay-approvers.py
+++ b/tests/twisted/dispatcher/some-delay-approvers.py
@@ -132,7 +132,7 @@ def test(q, bus, mc):
# The user responds to Kopete
call_async(q, cdo_iface, 'HandleWith',
- cs.tp_name_prefix + '.Client.Kopete')
+ cs.tp_name_prefix + '.Client.Kopete', 0)
# Kopete is asked to handle the channels
k = q.expect('dbus-method-call',