[Pkg-telepathy-commits] [telepathy-mission-control-6] 85/90: Stop putting TpDBusPropertiesMixinClass in class structs

Simon McVittie smcv at debian.org
Wed May 14 12:09:09 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit 0ac96775c905c9b83d99fd5f6aca7bc4a8adf2de
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu Apr 17 14:46:02 2014 +0100

    Stop putting TpDBusPropertiesMixinClass in class structs
    
    We could have included <telepathy-glib/telepathy-glib-dbus.h> instead,
    but this seems nicer.
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77189
---
 src/mcd-dispatcher.c | 24 ++++++++----------------
 src/mcd-dispatcher.h |  1 -
 src/request.c        | 16 ++++------------
 3 files changed, 12 insertions(+), 29 deletions(-)

diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 8aa377c..bd26e0e 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -819,19 +819,6 @@ mcd_dispatcher_class_init (McdDispatcherClass * klass)
         { "DispatchOperations", "dispatch-operations", NULL },
         { NULL }
     };
-    static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-        { TP_IFACE_CHANNEL_DISPATCHER,
-          tp_dbus_properties_mixin_getter_gobject_properties,
-          NULL,
-          cd_props,
-        },
-        { TP_IFACE_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST1,
-          tp_dbus_properties_mixin_getter_gobject_properties,
-          NULL,
-          op_list_props,
-        },
-        { NULL }
-    };
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
     g_type_class_add_private (object_class, sizeof (McdDispatcherPrivate));
@@ -868,9 +855,14 @@ mcd_dispatcher_class_init (McdDispatcherClass * klass)
                              TP_ARRAY_TYPE_DISPATCH_OPERATION_DETAILS_LIST,
                              G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
-    klass->dbus_properties_class.interfaces = prop_interfaces,
-    tp_dbus_properties_mixin_class_init (object_class,
-        G_STRUCT_OFFSET (McdDispatcherClass, dbus_properties_class));
+    tp_dbus_properties_mixin_class_init (object_class, 0);
+    tp_dbus_properties_mixin_implement_interface (object_class,
+        TP_IFACE_QUARK_CHANNEL_DISPATCHER,
+        tp_dbus_properties_mixin_getter_gobject_properties, NULL, cd_props);
+    tp_dbus_properties_mixin_implement_interface (object_class,
+        TP_IFACE_QUARK_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST1,
+        tp_dbus_properties_mixin_getter_gobject_properties, NULL,
+        op_list_props);
 }
 
 static void
diff --git a/src/mcd-dispatcher.h b/src/mcd-dispatcher.h
index fcb33c9..3f04b0d 100644
--- a/src/mcd-dispatcher.h
+++ b/src/mcd-dispatcher.h
@@ -57,7 +57,6 @@ struct _McdDispatcher
 struct _McdDispatcherClass
 {
     GObjectClass parent_class;
-    TpDBusPropertiesMixinClass dbus_properties_class;
 };
 
 GType mcd_dispatcher_get_type (void);
diff --git a/src/request.c b/src/request.c
index 6a10404..ce91b1f 100644
--- a/src/request.c
+++ b/src/request.c
@@ -92,7 +92,6 @@ struct _McdRequest {
 
 struct _McdRequestClass {
     GObjectClass parent;
-    TpDBusPropertiesMixinClass dbus_properties_class;
 };
 
 static void request_iface_init (TpSvcChannelRequestClass *);
@@ -324,14 +323,6 @@ _mcd_request_class_init (
       { "Hints", "hints", NULL },
       { NULL }
   };
-  static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-      { TP_IFACE_CHANNEL_REQUEST,
-          tp_dbus_properties_mixin_getter_gobject_properties,
-          NULL,
-          request_props,
-      },
-      { NULL }
-  };
   GObjectClass *object_class = (GObjectClass *) cls;
 
   object_class->constructed = _mcd_request_constructed;
@@ -408,9 +399,10 @@ _mcd_request_class_init (
       G_OBJECT_CLASS_TYPE (cls), G_SIGNAL_RUN_LAST, 0, NULL, NULL,
       g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
 
-  cls->dbus_properties_class.interfaces = prop_interfaces,
-  tp_dbus_properties_mixin_class_init (object_class,
-      G_STRUCT_OFFSET (McdRequestClass, dbus_properties_class));
+  tp_dbus_properties_mixin_class_init (object_class, 0);
+  tp_dbus_properties_mixin_implement_interface (object_class,
+      TP_IFACE_QUARK_CHANNEL_REQUEST,
+      tp_dbus_properties_mixin_getter_gobject_properties, NULL, request_props);
 }
 
 McdRequest *

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list