summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-09-05 13:02:41 +0200
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-09-05 14:06:27 +0200
commit050fedeeacb312b99cf82482fa4aeea55194765e (patch)
treeefdef822cb6eeaf99310e80cb04e407381e498e8 /examples
parentfad8f1f85525c1bf698240af6e6bad0cd3636a57 (diff)
downloadtelepathy-glib-050fedeeacb312b99cf82482fa4aeea55194765e.tar.gz
TpChannel: Deprecate _borrow_ functions and replace them by _get_
New transfer and naming policy has been discussed in https://bugs.freedesktop.org/show_bug.cgi?id=39189 and is documented there: http://telepathy.freedesktop.org/wiki/Style/TelepathyGLib _tp_channel_get_immutable_properties() is kept internal because we don't want to expose more dbus-glib structures. tp_channel_dup_immutable_properties() is added, it returns a GVariant and should be needed only to TpChannel subclasses.
Diffstat (limited to 'examples')
-rw-r--r--examples/client/stream-tubes/accepter.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/examples/client/stream-tubes/accepter.c b/examples/client/stream-tubes/accepter.c
index 79e8eff80..fd974ab24 100644
--- a/examples/client/stream-tubes/accepter.c
+++ b/examples/client/stream-tubes/accepter.c
@@ -58,7 +58,6 @@ _tube_accepted (GObject *tube,
g_debug ("Received: %s", buf);
g_object_unref (tube_conn);
- g_object_unref (tube);
}
static void
@@ -82,7 +81,6 @@ _handle_channels (TpSimpleHandler *handler,
TpHandleChannelsContext *context,
gpointer user_data)
{
- TpStreamTubeChannel *tube;
gboolean delay = FALSE;
GList *l;
@@ -90,22 +88,13 @@ _handle_channels (TpSimpleHandler *handler,
for (l = channels; l != NULL; l = l->next)
{
- TpChannel *channel = l->data;
- GHashTable *props = tp_channel_borrow_immutable_properties (channel);
+ TpStreamTubeChannel *tube = l->data;
- if (tp_channel_get_channel_type_id (channel) !=
- TP_IFACE_QUARK_CHANNEL_TYPE_STREAM_TUBE)
- continue;
-
- if (tp_strdiff (
- tp_asv_get_string (props, TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE),
- "ExampleService"))
+ if (!TP_IS_STREAM_TUBE_CHANNEL (tube))
continue;
g_debug ("Accepting tube");
- tube = g_object_ref (channel);
-
g_signal_connect (tube, "invalidated",
G_CALLBACK (tube_invalidated_cb), NULL);