summaryrefslogtreecommitdiff
path: root/telepathy-glib/base-channel.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-08-24 18:43:16 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2010-08-24 18:43:16 +0100
commit709b60945ad3e15906e21ad56ad72314babec0ea (patch)
treed6562de590028bc5094ff85816cd5b24b43ee34c /telepathy-glib/base-channel.c
parente943e15ce4a27cf570735ce82ce35902847a20ad (diff)
downloadtelepathy-glib-709b60945ad3e15906e21ad56ad72314babec0ea.tar.gz
Add tp_base_channel_is_registered()
I seem to need this in porting Gabble's Call channel implementation to TpBaseChannel.
Diffstat (limited to 'telepathy-glib/base-channel.c')
-rw-r--r--telepathy-glib/base-channel.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/telepathy-glib/base-channel.c b/telepathy-glib/base-channel.c
index 1201aa52a..e911cb3c0 100644
--- a/telepathy-glib/base-channel.c
+++ b/telepathy-glib/base-channel.c
@@ -375,6 +375,24 @@ tp_base_channel_is_requested (TpBaseChannel *chan)
}
/**
+ * tp_base_channel_is_registered:
+ * @chan: a channel
+ *
+ * Returns whether or not @chan is visible on the bus; that is, whether
+ * tp_base_channel_register() has been called and tp_base_channel_destroyed()
+ * has not been called.
+ *
+ * Returns: TRUE if @chan is visible on the bus
+ */
+gboolean
+tp_base_channel_is_registered (TpBaseChannel *chan)
+{
+ g_return_val_if_fail (TP_IS_BASE_CHANNEL (chan), FALSE);
+
+ return chan->priv->registered;
+}
+
+/**
* tp_base_channel_is_destroyed:
* @chan: a channel
*