diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-09-06 13:33:05 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-09-28 10:15:22 +0200 |
commit | df902ada21f115a8064b343174b48fb2678b76c3 (patch) | |
tree | e225f3903f689a517c8ca9e2d380de655e5f346d /examples/client/stream-tubes | |
parent | decd9fd4edff304bf02f6f1c311ec4f4ac740c7e (diff) |
TpStreamTube now inherit from TpChannel
Diffstat (limited to 'examples/client/stream-tubes')
-rw-r--r-- | examples/client/stream-tubes/accepter.c | 9 | ||||
-rw-r--r-- | examples/client/stream-tubes/offerer.c | 8 |
2 files changed, 13 insertions, 4 deletions
diff --git a/examples/client/stream-tubes/accepter.c b/examples/client/stream-tubes/accepter.c index 0ca3f6344..e4baac5c1 100644 --- a/examples/client/stream-tubes/accepter.c +++ b/examples/client/stream-tubes/accepter.c @@ -70,6 +70,7 @@ _handle_channels (TpSimpleHandler *handler, { TpChannel *channel = l->data; GHashTable *props = tp_channel_borrow_immutable_properties (channel); + GError *error = NULL; if (tp_channel_get_channel_type_id (channel) != TP_IFACE_QUARK_CHANNEL_TYPE_STREAM_TUBE) @@ -82,8 +83,12 @@ _handle_channels (TpSimpleHandler *handler, g_debug ("Accepting tube"); - /* the TpStreamTube holds the only ref to @channel */ - tube = tp_stream_tube_new (channel); + tube = tp_stream_tube_new (tp_channel_borrow_connection (channel), + tp_proxy_get_object_path (channel), + tp_channel_borrow_immutable_properties (channel), + &error); + g_assert_no_error (error); + tp_stream_tube_accept_async (tube, _tube_accepted, context); delay = TRUE; diff --git a/examples/client/stream-tubes/offerer.c b/examples/client/stream-tubes/offerer.c index f6e092876..04a519f05 100644 --- a/examples/client/stream-tubes/offerer.c +++ b/examples/client/stream-tubes/offerer.c @@ -65,8 +65,12 @@ _channel_created (GObject *source, g_debug ("Channel created: %s", tp_proxy_get_object_path (channel)); - tube = tp_stream_tube_new (TP_CHANNEL (channel)); - /* the TpStreamTube holds the only reference to @channel */ + tube = tp_stream_tube_new (tp_channel_borrow_connection (channel), + tp_proxy_get_object_path (channel), + tp_channel_borrow_immutable_properties (channel), + &error); + g_assert_no_error (error); + g_object_unref (channel); g_signal_connect (tube, "incoming", |