summaryrefslogtreecommitdiff
path: root/telepathy-glib/channel-group.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2008-05-29 15:46:30 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2008-05-29 15:46:30 +0000
commit6763fdad6433f6b6e5b56a9d16fbb0951224d5ed (patch)
treea6d3ea3854c0eb2f6fbc05ec2b4d5a989b5d4129 /telepathy-glib/channel-group.c
parent5e22f16509fc9adf3f4dd606144bf5aab4c1a8a4 (diff)
downloadtelepathy-glib-6763fdad6433f6b6e5b56a9d16fbb0951224d5ed.tar.gz
Make tp_channel_group_get_local_pending_info() not a stub
20080529154630-53eee-4e30f0bc159336f2824f89bc79f42730a822589f.gz
Diffstat (limited to 'telepathy-glib/channel-group.c')
-rw-r--r--telepathy-glib/channel-group.c38
1 files changed, 34 insertions, 4 deletions
diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index 67dd810e2..d66108799 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -188,16 +188,46 @@ tp_channel_group_get_local_pending_info (TpChannel *self,
TpChannelGroupChangeReason *reason,
const gchar **message)
{
+ gboolean ret = FALSE;
+ TpHandle a = 0;
+ TpChannelGroupChangeReason r = TP_CHANNEL_GROUP_CHANGE_REASON_NONE;
+ const gchar *m = "";
+
+ if (self->priv->group_local_pending != NULL)
+ {
+ /* it could conceivably be someone who is local-pending */
+
+ ret = tp_intset_is_member (self->priv->group_local_pending,
+ local_pending);
+
+ if (ret && self->priv->group_local_pending_info != NULL)
+ {
+ /* we might even have information about them */
+ LocalPendingInfo *info = g_hash_table_lookup (
+ self->priv->group_local_pending_info, GUINT_TO_POINTER (actor));
+
+ if (info != NULL)
+ {
+ a = info->actor;
+ r = info->reason;
+
+ if (info->message != NULL)
+ m = info->message;
+ }
+ /* else we have no info, which means (0, NONE, NULL) */
+ }
+ }
+
if (actor != NULL)
- *actor = 0;
+ *actor = a;
if (message != NULL)
- *message = "";
+ *message = m;
if (reason != NULL)
- *reason = TP_CHANNEL_GROUP_CHANGE_REASON_NONE;
+ *reason = r;
- return TRUE;
+ return ret;
}