[next] telepathy-mission-control: add mcd_channel_dup_immutable_properties_asv()
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Wed Jan 29 08:12:40 PST 2014
Module: telepathy-mission-control
Branch: next
Commit: ed3c76d0faa1bf295b2286c6b638dbdf32fe191c
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=ed3c76d0faa1bf295b2286c6b638dbdf32fe191c
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Wed Jan 22 12:04:04 2014 +0100
add mcd_channel_dup_immutable_properties_asv()
---
src/channel-utils.c | 18 ++++++++++++++++++
src/channel-utils.h | 2 ++
src/mcd-channel.c | 14 ++++++++++++++
src/mcd-channel.h | 2 ++
4 files changed, 36 insertions(+)
diff --git a/src/channel-utils.c b/src/channel-utils.c
index 194ce50..5bd0cd8 100644
--- a/src/channel-utils.c
+++ b/src/channel-utils.c
@@ -137,4 +137,22 @@ _mcd_tp_channel_details_free (GPtrArray *channels)
g_boxed_free (TP_ARRAY_TYPE_CHANNEL_DETAILS_LIST, channels);
}
+GHashTable *
+_mcd_tp_channel_dup_immutable_properties_asv (TpChannel *channel)
+{
+ GVariant *props;
+ GHashTable *asv;
+ GValue v = G_VALUE_INIT;
+
+ props = tp_channel_dup_immutable_properties (channel);
+ g_return_val_if_fail (props != NULL, NULL);
+
+ dbus_g_value_parse_g_variant (props, &v);
+ asv = g_value_dup_boxed (&v);
+
+ g_variant_unref (props);
+ g_value_unset (&v);
+
+ return asv;
+}
diff --git a/src/channel-utils.h b/src/channel-utils.h
index 0dcb506..5b8c24c 100644
--- a/src/channel-utils.h
+++ b/src/channel-utils.h
@@ -44,6 +44,8 @@ void _mcd_tp_channel_details_free (GPtrArray *channels);
G_GNUC_INTERNAL gboolean _mcd_tp_channel_should_close (TpChannel *channel,
const gchar *verb);
+G_GNUC_INTERNAL GHashTable * _mcd_tp_channel_dup_immutable_properties_asv (TpChannel *channel);
+
G_END_DECLS
#endif
diff --git a/src/mcd-channel.c b/src/mcd-channel.c
index e2ec67d..90a541b 100644
--- a/src/mcd-channel.c
+++ b/src/mcd-channel.c
@@ -769,6 +769,20 @@ mcd_channel_dup_immutable_properties (McdChannel *channel)
return ret;
}
+GHashTable *
+mcd_channel_dup_immutable_properties_asv (McdChannel *channel)
+{
+ g_return_val_if_fail (MCD_IS_CHANNEL (channel), NULL);
+
+ if (channel->priv->tp_chan == NULL)
+ {
+ DEBUG ("Channel %p has no associated TpChannel", channel);
+ return NULL;
+ }
+
+ return _mcd_tp_channel_dup_immutable_properties_asv (channel->priv->tp_chan);
+}
+
/**
* mcd_channel_take_error:
* @channel: the #McdChannel.
diff --git a/src/mcd-channel.h b/src/mcd-channel.h
index b7fc5a1..62b4d3f 100644
--- a/src/mcd-channel.h
+++ b/src/mcd-channel.h
@@ -103,5 +103,7 @@ const GError *mcd_channel_get_error (McdChannel *channel);
GVariant *mcd_channel_dup_immutable_properties (McdChannel *channel);
+GHashTable * mcd_channel_dup_immutable_properties_asv (McdChannel *channel);
+
G_END_DECLS
#endif /* MCD_CHANNEL_H */
More information about the telepathy-commits
mailing list