[Pkg-telepathy-commits] [telepathy-glib-1] 134/212: test-disconnection: Stop using tp_svc_dbus_properties_*()
Simon McVittie
smcv at debian.org
Wed May 14 12:09:05 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository telepathy-glib-1.
commit c3b5d48edb43799ed84fa97b825f8f4dc02149df
Author: Xavier Claessens <xavier.claessens at collabora.com>
Date: Sat Apr 5 09:32:04 2014 -0400
test-disconnection: Stop using tp_svc_dbus_properties_*()
We are about to stop exporting TpSvcDBusProperties iface so they
would be no-op.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77144
Reviewed-by: Simon McVittie
---
tests/dbus/disconnection.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/tests/dbus/disconnection.c b/tests/dbus/disconnection.c
index 508b7a0..d738d2e 100644
--- a/tests/dbus/disconnection.c
+++ b/tests/dbus/disconnection.c
@@ -38,6 +38,7 @@ enum {
typedef struct {
GTestDBus *test_dbus;
+ GDBusConnection *dbus_connection;
TpClientFactory *factory;
TpProxy *proxies[N_PROXIES];
GObject *cd_service;
@@ -133,7 +134,6 @@ static void
setup (Fixture *f,
gconstpointer user_data)
{
- GDBusConnection *dbus_connection;
GError *error = NULL;
global_fixture = f;
@@ -150,7 +150,8 @@ setup (Fixture *f,
f->factory = tp_client_factory_dup (&error);
g_assert_no_error (error);
- dbus_connection = tp_client_factory_get_dbus_connection (f->factory);
+ f->dbus_connection = g_object_ref (tp_client_factory_get_dbus_connection (
+ f->factory));
/* Any random object with an interface: what matters is that it can
* accept a method call and emit a signal. We use the Properties
@@ -158,7 +159,7 @@ setup (Fixture *f,
f->cd_service = tp_tests_object_new_static_class (
TP_TESTS_TYPE_SIMPLE_CHANNEL_DISPATCHER,
NULL);
- tp_dbus_connection_register_object (dbus_connection, "/", f->cd_service);
+ tp_dbus_connection_register_object (f->dbus_connection, "/", f->cd_service);
f->private_gdbus = tp_tests_get_private_bus ();
g_assert (f->private_gdbus != NULL);
@@ -179,6 +180,7 @@ teardown (Fixture *f,
{
tp_tests_assert_last_unref (&f->cd_service);
tp_tests_assert_last_unref (&f->factory);
+ g_clear_object (&f->dbus_connection);
tp_tests_assert_last_unref (&f->private_factory);
@@ -219,7 +221,6 @@ test (Fixture *f,
GError err = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Because I said so" };
TpProxySignalConnection *sc;
gboolean freed = FALSE;
- GHashTable *empty_asv;
int i;
g_message ("Creating proxies");
@@ -346,10 +347,15 @@ test (Fixture *f,
drop_private_connection (f);
g_message ("Emitting signal");
- empty_asv = tp_asv_new (NULL, NULL);
- tp_svc_dbus_properties_emit_properties_changed (f->cd_service,
- TP_IFACE_CHANNEL_DISPATCHER, empty_asv, NULL);
- g_hash_table_unref (empty_asv);
+ g_dbus_connection_emit_signal (f->dbus_connection, NULL,
+ "/",
+ "org.freedesktop.DBus.Properties",
+ "PropertiesChanged",
+ g_variant_new ("(s at a{sv}@as)",
+ TP_IFACE_CHANNEL_DISPATCHER,
+ g_variant_new_array (G_VARIANT_TYPE ("{sv}"), NULL, 0),
+ g_variant_new_strv (NULL, 0)),
+ NULL);
/* wait for everything to happen */
g_message ("Running main loop");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-glib-1.git
More information about the Pkg-telepathy-commits
mailing list