From da0253481e52fe2b166f2b4780eba2258014c1b9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 26 Sep 2013 20:19:46 +0100 Subject: [PATCH 17/22] SucceededWithChannel is just Succeeded now --- src/mcd-account-requests.c | 8 ++++---- src/request.c | 3 +-- tests/twisted/dispatcher/create-hints.py | 7 +------ tests/twisted/dispatcher/create-text.py | 7 +------ 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/mcd-account-requests.c b/src/mcd-account-requests.c index 84aaeb1..5b849da 100644 --- a/src/mcd-account-requests.c +++ b/src/mcd-account-requests.c @@ -78,7 +78,7 @@ online_request_cb (McdAccount *account, gpointer userdata, const GError *error) static void mcd_account_channel_request_disconnect (McdRequest *request); static void -on_request_succeeded_with_channel (McdRequest *request, +on_request_succeeded (McdRequest *request, const gchar *conn_path, GHashTable *conn_props, const gchar *chan_path, @@ -115,7 +115,7 @@ mcd_account_channel_request_disconnect (McdRequest *request) 0, /* signal_id ignored */ 0, /* detail ignored */ NULL, /* closure ignored */ - on_request_succeeded_with_channel, + on_request_succeeded, NULL /* user data ignored */); g_signal_handlers_disconnect_matched (request, G_SIGNAL_MATCH_FUNC, 0, /* signal_id ignored */ @@ -167,8 +167,8 @@ _mcd_account_create_request (McdClientRegistry *clients, /* we use connect_after, to make sure that other signals (such as * RemoveRequest) are emitted before the Failed signal */ g_signal_connect_data (request, - "succeeded-with-channel", - G_CALLBACK (on_request_succeeded_with_channel), + "succeeded", + G_CALLBACK (on_request_succeeded), g_object_ref (channel), (GClosureNotify) g_object_unref, G_CONNECT_AFTER); diff --git a/src/request.c b/src/request.c index 72bc6a3..2cc633c 100644 --- a/src/request.c +++ b/src/request.c @@ -825,12 +825,11 @@ _mcd_request_set_success (McdRequest *self, dbus_g_value_parse_g_variant (variant, &value); g_assert (G_VALUE_HOLDS (&value, TP_HASH_TYPE_STRING_VARIANT_MAP)); - tp_svc_channel_request_emit_succeeded_with_channel (self, + tp_svc_channel_request_emit_succeeded (self, tp_proxy_get_object_path (tp_channel_get_connection (channel)), future_conn_props, tp_proxy_get_object_path (channel), g_value_get_boxed (&value)); - tp_svc_channel_request_emit_succeeded (self); g_hash_table_unref (future_conn_props); g_value_unset (&value); diff --git a/tests/twisted/dispatcher/create-hints.py b/tests/twisted/dispatcher/create-hints.py index ca1ae69..41d21d6 100644 --- a/tests/twisted/dispatcher/create-hints.py +++ b/tests/twisted/dispatcher/create-hints.py @@ -176,19 +176,14 @@ def test_channel_creation(q, bus, account, client, conn, # Handler accepts the Channels q.dbus_return(e.message, signature='') - # SucceededWithChannel is fired first e = q.expect('dbus-signal', path=request_path, interface=cs.CR, - signal='SucceededWithChannel') + signal='Succeeded') assertEquals(conn.object_path, e.args[0]) assert isinstance(e.args[1], dict), e.args[1] assertEquals(channel.object_path, e.args[2]) assertEquals(channel_immutable, e.args[3]) - # CR emits Succeeded - q.expect('dbus-signal', path=request_path, - interface=cs.CR, signal='Succeeded') - # Close the channel channel.close() diff --git a/tests/twisted/dispatcher/create-text.py b/tests/twisted/dispatcher/create-text.py index 6976e2a..40e5a54 100644 --- a/tests/twisted/dispatcher/create-text.py +++ b/tests/twisted/dispatcher/create-text.py @@ -197,19 +197,14 @@ def test_channel_creation(q, bus, account, client, conn, # Handler accepts the Channels q.dbus_return(e.message, signature='') - # SucceededWithChannel is fired first e = q.expect('dbus-signal', path=request_path, interface=cs.CR, - signal='SucceededWithChannel') + signal='Succeeded') assertEquals(conn.object_path, e.args[0]) assert isinstance(e.args[1], dict), e.args[1] assertEquals(channel.object_path, e.args[2]) assertEquals(channel_immutable, e.args[3]) - # CR emits Succeeded - q.expect('dbus-signal', path=request_path, - interface=cs.CR, signal='Succeeded') - # Close the channel channel.close() -- 1.8.4.rc3