summaryrefslogtreecommitdiff
path: root/telepathy-glib/dbus-tube-channel.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-09-19 15:40:29 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-26 13:44:39 +0200
commit3a7bc0a5b62c8eae5a3226ffbdfeffa7f1541e03 (patch)
treea46e8831fc2503e3cbc1fbcf212e78d0d47f0a66 /telepathy-glib/dbus-tube-channel.c
parent426d2e6f389b5a691b6eb03a0a740bcbef173749 (diff)
downloadtelepathy-glib-3a7bc0a5b62c8eae5a3226ffbdfeffa7f1541e03.tar.gz
TpDBusTubeChannel: add parameters-vardict
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55095 https://bugs.freedesktop.org/show_bug.cgi?id=55024
Diffstat (limited to 'telepathy-glib/dbus-tube-channel.c')
-rw-r--r--telepathy-glib/dbus-tube-channel.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/telepathy-glib/dbus-tube-channel.c b/telepathy-glib/dbus-tube-channel.c
index 41ec5dbac..f2bb4fd23 100644
--- a/telepathy-glib/dbus-tube-channel.c
+++ b/telepathy-glib/dbus-tube-channel.c
@@ -116,7 +116,8 @@ struct _TpDBusTubeChannelPrivate
enum
{
PROP_SERVICE_NAME = 1,
- PROP_PARAMETERS
+ PROP_PARAMETERS,
+ PROP_PARAMETERS_VARDICT
};
static void
@@ -151,6 +152,11 @@ tp_dbus_tube_channel_get_property (GObject *object,
g_value_set_boxed (value, self->priv->parameters);
break;
+ case PROP_PARAMETERS_VARDICT:
+ g_value_take_variant (value,
+ tp_dbus_tube_channel_dup_parameters_vardict (self));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -429,6 +435,10 @@ tp_dbus_tube_channel_class_init (TpDBusTubeChannelClass *klass)
*
* Will be %NULL for outgoing tubes until the tube has been offered.
*
+ * In high-level language bindings, use
+ * tp_dbus_tube_channel_dup_parameters_vardict() to get the same information
+ * in a more convenient format.
+ *
* Since: 0.18.0
*/
param_spec = g_param_spec_boxed ("parameters", "Parameters",
@@ -437,6 +447,22 @@ tp_dbus_tube_channel_class_init (TpDBusTubeChannelClass *klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (gobject_class, PROP_PARAMETERS, param_spec);
+ /**
+ * TpDBusTubeChannel:parameters-vardict:
+ *
+ * A %G_VARIANT_TYPE_VARDICT representing the parameters of the tube.
+ *
+ * Will be %NULL for outgoing tubes until the tube has been offered.
+ *
+ * Since: 0.UNRELEASED
+ */
+ param_spec = g_param_spec_variant ("parameters-vardict", "Parameters",
+ "The parameters of the D-Bus tube",
+ G_VARIANT_TYPE_VARDICT, NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property (gobject_class, PROP_PARAMETERS_VARDICT,
+ param_spec);
+
g_type_class_add_private (gobject_class, sizeof (TpDBusTubeChannelPrivate));
}
@@ -614,6 +640,7 @@ proxy_prepare_offer_cb (GObject *source,
self->priv->parameters = tp_asv_new (NULL, NULL);
g_object_notify (G_OBJECT (self), "parameters");
+ g_object_notify (G_OBJECT (self), "parameters-vardict");
/* TODO: provide a way to use TP_SOCKET_ACCESS_CONTROL_LOCALHOST if you're in
* an environment where you need to disable authentication. tp-glib can't