[next] telepathy-glib: RequestableChannelClasses has been moved to Connection

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Wed Jan 29 03:02:20 PST 2014


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

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Fri Jan 17 16:18:15 2014 +0100

RequestableChannelClasses has been moved to Connection

---

 .../telepathy-glib/telepathy-glib-sections.txt     |    2 +-
 telepathy-glib/base-connection.c                   |   26 ++++++++++++++++----
 telepathy-glib/connection.c                        |    3 +--
 tests/dbus/message-mixin.c                         |    2 +-
 4 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/docs/reference/telepathy-glib/telepathy-glib-sections.txt b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
index 24e4d35..36f68c3 100644
--- a/docs/reference/telepathy-glib/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
@@ -2719,12 +2719,12 @@ TP_PROP_CONNECTION_INTERFACE_MAIL_NOTIFICATION1_UNREAD_MAILS
 TP_PROP_CONNECTION_INTERFACE_MAIL_NOTIFICATION1_UNREAD_MAIL_COUNT
 TP_PROP_CONNECTION_INTERFACE_POWER_SAVING1_POWER_SAVING_ACTIVE
 TP_PROP_CONNECTION_INTERFACE_REQUESTS_CHANNELS
-TP_PROP_CONNECTION_INTERFACE_REQUESTS_REQUESTABLE_CHANNEL_CLASSES
 TP_PROP_CONNECTION_INTERFACE_SERVICE_POINT1_KNOWN_SERVICE_POINTS
 TP_PROP_CONNECTION_INTERFACE_PRESENCE1_STATUSES
 TP_PROP_CONNECTION_INTERFACE_PRESENCE1_MAXIMUM_STATUS_MESSAGE_LENGTH
 TP_PROP_CONNECTION_MANAGER_INTERFACES
 TP_PROP_CONNECTION_MANAGER_PROTOCOLS
+TP_PROP_CONNECTION_REQUESTABLE_CHANNEL_CLASSES
 TP_PROP_CONNECTION_INTERFACES
 TP_PROP_CONNECTION_SELF_HANDLE
 TP_PROP_CONNECTION_SELF_ID
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index 334e2f7..01615fb 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -273,6 +273,7 @@ enum
     PROP_SELF_HANDLE,
     PROP_SELF_ID,
     PROP_INTERFACES,
+    PROP_REQUESTABLE_CHANNEL_CLASSES,
     PROP_DBUS_STATUS,
     PROP_DBUS_DAEMON,
     N_PROPS
@@ -444,6 +445,8 @@ tp_base_connection_ensure_dbus (TpBaseConnection *self,
   return TRUE;
 }
 
+static GPtrArray * conn_requests_get_requestables (TpBaseConnection *self);
+
 static void
 tp_base_connection_get_property (GObject *object,
                                  guint property_id,
@@ -471,6 +474,10 @@ tp_base_connection_get_property (GObject *object,
       g_value_set_boxed (value, tp_base_connection_get_interfaces (self));
       break;
 
+    case PROP_REQUESTABLE_CHANNEL_CLASSES:
+      g_value_take_boxed (value, conn_requests_get_requestables (self));
+      break;
+
     case PROP_DBUS_STATUS:
       g_value_set_uint (value, tp_base_connection_get_status (self));
       break;
@@ -1079,10 +1086,6 @@ conn_requests_get_dbus_property (GObject *object,
     {
       g_value_take_boxed (value, conn_requests_get_channel_details (self));
     }
-  else if (name == g_quark_from_static_string ("RequestableChannelClasses"))
-    {
-      g_value_take_boxed (value, conn_requests_get_requestables (self));
-    }
   else
     {
       g_return_if_reached ();
@@ -1156,11 +1159,11 @@ tp_base_connection_class_init (TpBaseConnectionClass *klass)
       { "SelfID", "self-id", NULL },
       { "Status", "dbus-status", NULL },
       { "Interfaces", "interfaces", NULL },
+      { "RequestableChannelClasses", "requestable-channel-classes", NULL },
       { NULL }
   };
   static TpDBusPropertiesMixinPropImpl requests_properties[] = {
         { "Channels", NULL, NULL },
-        { "RequestableChannelClasses", NULL, NULL },
         { NULL }
   };
   GParamSpec *param_spec;
@@ -1237,6 +1240,19 @@ tp_base_connection_class_init (TpBaseConnectionClass *klass)
   g_object_class_install_property (object_class, PROP_INTERFACES, param_spec);
 
   /**
+   * TpBaseConnection:requestable-channel-classes: (skip)
+   *
+   * The classes of channel that are expected to be available on this connection
+   */
+  param_spec = g_param_spec_boxed ("requestable-channel-classes",
+      "Connection.RequestableChannelClasses",
+      "Connection.RequestableChannelClasses",
+      TP_ARRAY_TYPE_REQUESTABLE_CHANNEL_CLASS_LIST,
+      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+  g_object_class_install_property (object_class,
+      PROP_REQUESTABLE_CHANNEL_CLASSES, param_spec);
+
+  /**
    * TpBaseConnection:dbus-status: (skip)
    *
    * The Connection.Status as visible on D-Bus, which is the same as
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index 723e6ab..70ad478 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -570,8 +570,7 @@ _tp_connection_do_get_capabilities_async (TpConnection *self,
           /* We don't check whether we actually have this interface here.
            * The Requests interface is mandatory, and we assume we have it. */
           tp_cli_dbus_properties_call_get (self, -1,
-            TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
-              "RequestableChannelClasses",
+            TP_IFACE_CONNECTION, "RequestableChannelClasses",
             tp_connection_get_rcc_cb, NULL, NULL, NULL);
         }
     }
diff --git a/tests/dbus/message-mixin.c b/tests/dbus/message-mixin.c
index 3e6a58c..1a89eac 100644
--- a/tests/dbus/message-mixin.c
+++ b/tests/dbus/message-mixin.c
@@ -205,7 +205,7 @@ main (int argc,
 
       /* check that it has the requestable channel class */
       tp_cli_dbus_properties_run_get_all (conn, -1,
-          TP_IFACE_CONNECTION_INTERFACE_REQUESTS, &properties, &error, NULL);
+          TP_IFACE_CONNECTION, &properties, &error, NULL);
       g_assert_no_error (error);
 
       arr = tp_asv_get_boxed (properties, "RequestableChannelClasses",



More information about the telepathy-commits mailing list