summaryrefslogtreecommitdiff
path: root/telepathy-glib/base-channel.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-20 16:35:23 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-20 16:35:23 +0000
commitc99370d3e1532073f526378155bb5183a4f50a3f (patch)
tree66e5655beff01e7883f5342f5073cbab3ee2fba6 /telepathy-glib/base-channel.c
parent89ebc5c794da4b2312ea299764f58de2bf037343 (diff)
parent50fb23a47944f2a47427010db697afe5e4a003df (diff)
downloadtelepathy-glib-c99370d3e1532073f526378155bb5183a4f50a3f.tar.gz
Merge remote-tracking branch 'origin/call1' into call1
Conflicts: docs/reference/telepathy-glib-docs.sgml docs/reference/telepathy-glib-sections.txt examples/future/call-cm/call-channel.c examples/future/call-cm/call-stream.c spec/Call_Content.xml spec/Call_Content_Interface_Audio_Control.xml spec/Call_Content_Interface_DTMF.xml spec/Call_Content_Interface_Media.xml spec/Call_Content_Interface_Video_Control.xml spec/Call_Content_Media_Description.xml spec/Call_Content_Media_Description_Interface_RTCP_Extended_Reports.xml spec/Call_Content_Media_Description_Interface_RTCP_Feedback.xml spec/Call_Content_Media_Description_Interface_RTP_Header_Extensions.xml spec/Call_Interface_Mute.xml spec/Call_Stream.xml spec/Call_Stream_Endpoint.xml spec/Call_Stream_Interface_Media.xml spec/Channel_Interface_DTMF.xml spec/Channel_Type_Call.xml spec/all.xml telepathy-glib/channel.xml telepathy-glib/extra-gtkdoc.h tests/dbus/call-example.c
Diffstat (limited to 'telepathy-glib/base-channel.c')
-rw-r--r--telepathy-glib/base-channel.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/telepathy-glib/base-channel.c b/telepathy-glib/base-channel.c
index 6b67b29a3..4ca245247 100644
--- a/telepathy-glib/base-channel.c
+++ b/telepathy-glib/base-channel.c
@@ -242,6 +242,7 @@
#include <telepathy-glib/channel-iface.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/exportable-channel.h>
+#include "telepathy-glib/group-mixin.h"
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/svc-generic.h>
@@ -458,6 +459,32 @@ tp_base_channel_get_connection (TpBaseChannel *chan)
}
/**
+ * tp_base_channel_get_self_handle:
+ * @chan: a channel
+ *
+ * If @chan has a #TpGroupMixin, returns the value of group's self handle.
+ * Otherwise return the value of #TpBaseConnection:self-handle.
+ *
+ * Returns: the self handle of @chan
+ *
+ * Since: 0.UNRELEASED
+ */
+TpHandle
+tp_base_channel_get_self_handle (TpBaseChannel *chan)
+{
+ if (TP_HAS_GROUP_MIXIN (chan))
+ {
+ guint ret = 0;
+
+ tp_group_mixin_get_self_handle (G_OBJECT (chan), &ret, NULL);
+ if (ret != 0)
+ return ret;
+ }
+
+ return tp_base_connection_get_self_handle (chan->priv->conn);
+}
+
+/**
* tp_base_channel_get_target_handle:
* @chan: a channel
*