[next] telepathy-glib: tls-certificate: use the 'invisible' TpDBusPropertiesMixin API

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Fri May 16 06:28:33 PDT 2014


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

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Fri May 16 13:59:43 2014 +0200

tls-certificate: use the 'invisible' TpDBusPropertiesMixin API

https://bugs.freedesktop.org/show_bug.cgi?id=78376

---

 tests/lib/tls-certificate.c |   15 ++++-----------
 tests/lib/tls-certificate.h |    2 --
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/tests/lib/tls-certificate.c b/tests/lib/tls-certificate.c
index 48ceccc..6f61199 100644
--- a/tests/lib/tls-certificate.c
+++ b/tests/lib/tls-certificate.c
@@ -185,14 +185,6 @@ tp_tests_tls_certificate_class_init (TpTestsTLSCertificateClass *klass)
     { "CertificateChainData", "certificate-chain-data", NULL },
     { NULL }
   };
-  static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-    { TP_IFACE_AUTHENTICATION_TLS_CERTIFICATE,
-      tp_dbus_properties_mixin_getter_gobject_properties,
-      NULL,
-      object_props,
-    },
-    { NULL }
-  };
   GObjectClass *oclass = G_OBJECT_CLASS (klass);
   GParamSpec *pspec;
 
@@ -247,9 +239,10 @@ tp_tests_tls_certificate_class_init (TpTestsTLSCertificateClass *klass)
       G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
   g_object_class_install_property (oclass, PROP_DBUS_CONNECTION, pspec);
 
-  klass->dbus_props_class.interfaces = prop_interfaces;
-  tp_dbus_properties_mixin_class_init (oclass,
-      G_STRUCT_OFFSET (TpTestsTLSCertificateClass, dbus_props_class));
+  tp_dbus_properties_mixin_class_init (oclass, 0);
+  tp_dbus_properties_mixin_implement_interface (oclass,
+        TP_IFACE_QUARK_AUTHENTICATION_TLS_CERTIFICATE,
+        tp_dbus_properties_mixin_getter_gobject_properties, NULL, object_props);
 }
 
 static void
diff --git a/tests/lib/tls-certificate.h b/tests/lib/tls-certificate.h
index 8549ca5..1d113b1 100644
--- a/tests/lib/tls-certificate.h
+++ b/tests/lib/tls-certificate.h
@@ -34,8 +34,6 @@ typedef struct _TpTestsTLSCertificatePrivate TpTestsTLSCertificatePrivate;
 
 struct _TpTestsTLSCertificateClass {
   GObjectClass parent_class;
-
-  TpDBusPropertiesMixinClass dbus_props_class;
 };
 
 struct _TpTestsTLSCertificate {



More information about the telepathy-commits mailing list