diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dbus/channel.c | 14 | ||||
-rw-r--r-- | tests/dbus/dbus-tube.c | 10 | ||||
-rw-r--r-- | tests/dbus/file-transfer-channel.c | 6 | ||||
-rw-r--r-- | tests/dbus/stream-tube.c | 10 | ||||
-rw-r--r-- | tests/dbus/text-channel.c | 10 | ||||
-rw-r--r-- | tests/lib/simple-conn.c | 21 |
6 files changed, 46 insertions, 25 deletions
diff --git a/tests/dbus/channel.c b/tests/dbus/channel.c index c3da0f69a..1de49ca36 100644 --- a/tests/dbus/channel.c +++ b/tests/dbus/channel.c @@ -46,7 +46,7 @@ create_contact_chan (Test *test) { gchar *chan_path; TpHandle handle; - GHashTable *props; + GVariant *props; tp_clear_object (&test->chan_contact_service); tp_clear_object (&test->chan_room_service); @@ -76,20 +76,21 @@ create_contact_chan (Test *test) "channel-properties", &props, NULL); - test->channel_contact = tp_tests_channel_new_from_properties (test->connection, + test->channel_contact = tp_client_factory_ensure_channel ( + tp_proxy_get_factory (test->connection), test->connection, chan_path, props, &test->error); g_assert_no_error (test->error); g_free (chan_path); - g_hash_table_unref (props); + g_variant_unref (props); } static void create_room_chan (Test *test) { gchar *chan_path; - GHashTable *props; + GVariant *props; tp_clear_object (&test->chan_room_service); @@ -111,7 +112,8 @@ create_room_chan (Test *test) "channel-properties", &props, NULL); - test->channel_room = tp_tests_channel_new_from_properties (test->connection, + test->channel_room = tp_client_factory_ensure_channel ( + tp_proxy_get_factory (test->connection), test->connection, chan_path, props, &test->error); g_assert_no_error (test->error); @@ -120,7 +122,7 @@ create_room_chan (Test *test) g_free (chan_path); - g_hash_table_unref (props); + g_variant_unref (props); } static void diff --git a/tests/dbus/dbus-tube.c b/tests/dbus/dbus-tube.c index 1c2486755..fd72421a6 100644 --- a/tests/dbus/dbus-tube.c +++ b/tests/dbus/dbus-tube.c @@ -86,7 +86,7 @@ create_tube_service (Test *test, { gchar *chan_path; TpHandle handle, alf_handle; - GHashTable *props; + GVariant *props; GType type; TpClientFactory *factory; @@ -136,18 +136,20 @@ create_tube_service (Test *test, NULL); /* Create client-side tube channel object */ - g_object_get (test->tube_chan_service, "channel-properties", &props, NULL); + g_object_get (test->tube_chan_service, + "channel-properties", &props, + NULL); factory = tp_proxy_get_factory (test->connection); test->tube = (TpDBusTubeChannel *) tp_client_factory_ensure_channel ( - factory, test->connection, chan_path, tp_asv_to_vardict (props), + factory, test->connection, chan_path, props, &test->error); g_assert (TP_IS_DBUS_TUBE_CHANNEL (test->tube)); g_assert_no_error (test->error); g_free (chan_path); - g_hash_table_unref (props); + g_variant_unref (props); } /* Test Basis */ diff --git a/tests/dbus/file-transfer-channel.c b/tests/dbus/file-transfer-channel.c index cd56b1ebf..4c946c07c 100644 --- a/tests/dbus/file-transfer-channel.c +++ b/tests/dbus/file-transfer-channel.c @@ -158,7 +158,7 @@ create_file_transfer_channel (Test *test, TpClientFactory *factory; gchar *chan_path; TpHandle handle, alf_handle; - GHashTable *props; + GVariant *props; GHashTable *sockets; GHashTable *metadata; GQuark features[] = { TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE, 0}; @@ -217,7 +217,7 @@ create_file_transfer_channel (Test *test, factory = tp_proxy_get_factory (test->connection); test->channel = TP_FILE_TRANSFER_CHANNEL (tp_client_factory_ensure_channel ( - factory, test->connection, chan_path, tp_asv_to_vardict (props), + factory, test->connection, chan_path, props, &test->error)); g_assert_no_error (test->error); g_assert (TP_IS_FILE_TRANSFER_CHANNEL (test->channel)); @@ -231,7 +231,7 @@ create_file_transfer_channel (Test *test, g_free (chan_path); g_hash_table_unref (metadata); - g_hash_table_unref (props); + g_variant_unref (props); g_hash_table_unref (sockets); } diff --git a/tests/dbus/stream-tube.c b/tests/dbus/stream-tube.c index a384297b6..a52b4136d 100644 --- a/tests/dbus/stream-tube.c +++ b/tests/dbus/stream-tube.c @@ -152,7 +152,7 @@ create_tube_service (Test *test, TpClientFactory *factory; gchar *chan_path; TpHandle handle, alf_handle; - GHashTable *props; + GVariant *props; GHashTable *sockets; GType type; @@ -218,17 +218,19 @@ create_tube_service (Test *test, NULL); /* Create client-side tube channel object */ - g_object_get (test->tube_chan_service, "channel-properties", &props, NULL); + g_object_get (test->tube_chan_service, + "channel-properties", &props, + NULL); factory = tp_proxy_get_factory (test->connection); test->tube = TP_STREAM_TUBE_CHANNEL (tp_client_factory_ensure_channel ( - factory, test->connection, chan_path, tp_asv_to_vardict (props), + factory, test->connection, chan_path, props, &test->error)); g_assert_no_error (test->error); g_assert (TP_IS_STREAM_TUBE_CHANNEL (test->tube)); g_free (chan_path); - g_hash_table_unref (props); + g_variant_unref (props); g_hash_table_unref (sockets); } diff --git a/tests/dbus/text-channel.c b/tests/dbus/text-channel.c index 3466cc004..0bde7871f 100644 --- a/tests/dbus/text-channel.c +++ b/tests/dbus/text-channel.c @@ -54,7 +54,7 @@ create_contact_chan (Test *test) { TpClientFactory *factory; gchar *chan_path; - GHashTable *props; + GVariant *props; tp_clear_object (&test->chan_service); tp_clear_object (&test->sms_chan_service); @@ -84,12 +84,12 @@ create_contact_chan (Test *test) factory = tp_proxy_get_factory (test->connection); test->channel = TP_TEXT_CHANNEL (tp_client_factory_ensure_channel (factory, - test->connection, chan_path, tp_asv_to_vardict (props), &test->error)); + test->connection, chan_path, props, &test->error)); g_assert_no_error (test->error); g_assert (TP_IS_TEXT_CHANNEL (test->channel)); g_free (chan_path); - g_hash_table_unref (props); + g_variant_unref (props); /* Register channel implementing SMS */ chan_path = g_strdup_printf ("%s/ChannelSMS", @@ -108,13 +108,13 @@ create_contact_chan (Test *test) NULL); test->sms_channel = TP_TEXT_CHANNEL (tp_client_factory_ensure_channel ( - factory, test->connection, chan_path, tp_asv_to_vardict (props), + factory, test->connection, chan_path, props, &test->error)); g_assert_no_error (test->error); g_assert (TP_IS_TEXT_CHANNEL (test->sms_channel)); g_free (chan_path); - g_hash_table_unref (props); + g_variant_unref (props); } static void diff --git a/tests/lib/simple-conn.c b/tests/lib/simple-conn.c index be1934de7..6b2f4923c 100644 --- a/tests/lib/simple-conn.c +++ b/tests/lib/simple-conn.c @@ -335,7 +335,15 @@ tp_tests_simple_connection_ensure_text_chan (TpTestsSimpleConnection *self, g_object_get (chan, "object-path", &chan_path, NULL); if (props != NULL) - g_object_get (chan, "channel-properties", props, NULL); + { + GVariant *tmp; + + g_object_get (chan, + "channel-properties", &tmp, + NULL); + *props = tp_asv_from_vardict (tmp); + g_variant_unref (tmp); + } return chan_path; } @@ -379,8 +387,15 @@ tp_tests_simple_connection_ensure_room_list_chan (TpTestsSimpleConnection *self, } if (props != NULL) - g_object_get (self->priv->room_list_chan, - "channel-properties", props, NULL); + { + GVariant *tmp; + + g_object_get (self->priv->room_list_chan, + "channel-properties", &tmp, + NULL); + *props = tp_asv_from_vardict (tmp); + g_variant_unref (tmp); + } return chan_path; } |