[next] telepathy-glib: dbus-tube: use the vardict version of the ' parameters' property

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Thu Feb 27 06:07:35 PST 2014


Module: telepathy-glib
Branch: next
Commit: 09de35fcc3bd425909bd5eed5936a9b607bbe936
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=09de35fcc3bd425909bd5eed5936a9b607bbe936

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Wed Feb 19 14:24:12 2014 +0100

dbus-tube: use the vardict version of the 'parameters' property

---

 telepathy-glib/dbus-tube-channel.c |   29 ++---------------------------
 tests/dbus/dbus-tube.c             |    2 +-
 2 files changed, 3 insertions(+), 28 deletions(-)

diff --git a/telepathy-glib/dbus-tube-channel.c b/telepathy-glib/dbus-tube-channel.c
index a171079..361d666 100644
--- a/telepathy-glib/dbus-tube-channel.c
+++ b/telepathy-glib/dbus-tube-channel.c
@@ -119,7 +119,6 @@ enum
 {
   PROP_SERVICE_NAME = 1,
   PROP_PARAMETERS,
-  PROP_PARAMETERS_VARDICT
 };
 
 static void
@@ -151,10 +150,6 @@ tp_dbus_tube_channel_get_property (GObject *object,
         break;
 
       case PROP_PARAMETERS:
-        g_value_set_boxed (value, self->priv->parameters);
-        break;
-
-      case PROP_PARAMETERS_VARDICT:
         g_value_take_variant (value,
             tp_dbus_tube_channel_dup_parameters (self));
         break;
@@ -433,36 +428,17 @@ tp_dbus_tube_channel_class_init (TpDBusTubeChannelClass *klass)
   /**
    * TpDBusTubeChannel:parameters:
    *
-   * A string to #GValue #GHashTable representing the parameters of the tube.
-   *
-   * Will be %NULL for outgoing tubes until the tube has been offered.
-   *
-   * In high-level language bindings, use
-   * tp_dbus_tube_channel_dup_parameters() to get the same information
-   * in a more convenient format.
-   *
-   * Since: 0.18.0
-   */
-  param_spec = g_param_spec_boxed ("parameters", "Parameters",
-      "The parameters of the dbus tube",
-      TP_HASH_TYPE_STRING_VARIANT_MAP,
-      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.19.10
    */
-  param_spec = g_param_spec_variant ("parameters-vardict", "Parameters",
+  param_spec = g_param_spec_variant ("parameters", "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,
+  g_object_class_install_property (gobject_class, PROP_PARAMETERS,
       param_spec);
 
   g_type_class_add_private (gobject_class, sizeof (TpDBusTubeChannelPrivate));
@@ -623,7 +599,6 @@ 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
diff --git a/tests/dbus/dbus-tube.c b/tests/dbus/dbus-tube.c
index e1f8d05..33fcf2b 100644
--- a/tests/dbus/dbus-tube.c
+++ b/tests/dbus/dbus-tube.c
@@ -211,7 +211,7 @@ test_properties (Test *test,
   g_variant_unref (parameters_vardict);
 
   g_object_get (test->tube,
-      "parameters-vardict", &parameters_vardict,
+      "parameters", &parameters_vardict,
       NULL);
   check_parameters_vardict (parameters_vardict);
   g_variant_unref (parameters_vardict);



More information about the telepathy-commits mailing list