[folks/next] Sync TpTestsSimple* from telepathy-glib gdbus-properties2 branch



commit 20573e15bd098fbf19857e23c4c7bfc0d12c27f6
Author: Simon McVittie <simon mcvittie collabora co uk>
Date:   Tue Apr 8 13:10:25 2014 +0100

    Sync TpTestsSimple* from telepathy-glib gdbus-properties2 branch
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77144

 .../telepathy/contactlist/simple-account-manager.c |    2 -
 tests/lib/telepathy/contactlist/simple-account.c   |   18 +------
 tests/lib/telepathy/contactlist/simple-conn.c      |   56 --------------------
 3 files changed, 2 insertions(+), 74 deletions(-)
---
diff --git a/tests/lib/telepathy/contactlist/simple-account-manager.c 
b/tests/lib/telepathy/contactlist/simple-account-manager.c
index 767bce4..7b01e06 100644
--- a/tests/lib/telepathy/contactlist/simple-account-manager.c
+++ b/tests/lib/telepathy/contactlist/simple-account-manager.c
@@ -23,8 +23,6 @@ G_DEFINE_TYPE_WITH_CODE (TpTestsSimpleAccountManager,
     G_TYPE_OBJECT,
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_ACCOUNT_MANAGER,
         account_manager_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
-        tp_dbus_properties_mixin_iface_init)
     )
 
 
diff --git a/tests/lib/telepathy/contactlist/simple-account.c 
b/tests/lib/telepathy/contactlist/simple-account.c
index 7f0d568..c56cec6 100644
--- a/tests/lib/telepathy/contactlist/simple-account.c
+++ b/tests/lib/telepathy/contactlist/simple-account.c
@@ -30,8 +30,6 @@ G_DEFINE_TYPE_WITH_CODE (TpTestsSimpleAccount,
         NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_ACCOUNT_INTERFACE_STORAGE1,
         NULL);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
-        tp_dbus_properties_mixin_iface_init)
     )
 
 /* TP_IFACE_ACCOUNT is implied */
@@ -704,22 +702,10 @@ void
 tp_tests_simple_account_add_uri_scheme (TpTestsSimpleAccount *self,
     const gchar *uri_scheme)
 {
-  GHashTable *changed;
-  GStrv schemes;
-
   g_ptr_array_add (self->priv->uri_schemes, g_strdup (uri_scheme));
 
-  g_object_get (self, "uri-schemes", &schemes, NULL);
-
-  changed = tp_asv_new (
-      "URISchemes", G_TYPE_STRV, schemes,
-      NULL);
-
-  tp_svc_dbus_properties_emit_properties_changed (self,
-      TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING1, changed, NULL);
-
-  g_strfreev (schemes);
-  g_hash_table_unref (changed);
+  tp_dbus_properties_mixin_emit_properties_changed_varargs (G_OBJECT (self),
+      TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING1, "URISchemes", NULL);
 }
 
 void
diff --git a/tests/lib/telepathy/contactlist/simple-conn.c b/tests/lib/telepathy/contactlist/simple-conn.c
index 4769f95..9acea0a 100644
--- a/tests/lib/telepathy/contactlist/simple-conn.c
+++ b/tests/lib/telepathy/contactlist/simple-conn.c
@@ -24,11 +24,8 @@
 #include "room-list-chan.h"
 #include "util.h"
 
-static void props_iface_init (TpSvcDBusPropertiesClass *);
-
 G_DEFINE_TYPE_WITH_CODE (TpTestsSimpleConnection, tp_tests_simple_connection,
     TP_TYPE_BASE_CONNECTION,
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES, props_iface_init);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION, NULL))
 
 /* type definition stuff */
@@ -40,14 +37,6 @@ enum
   N_PROPS
 };
 
-enum
-{
-  SIGNAL_GOT_ALL,
-  N_SIGNALS
-};
-
-static guint signals[N_SIGNALS] = {0};
-
 struct _TpTestsSimpleConnectionPrivate
 {
   gchar *account;
@@ -264,19 +253,6 @@ shut_down (TpBaseConnection *conn)
       conn);
 }
 
-static GPtrArray *
-get_interfaces_always_present (TpBaseConnection *base)
-{
-  GPtrArray *interfaces;
-
-  interfaces = TP_BASE_CONNECTION_CLASS (
-      tp_tests_simple_connection_parent_class)->get_interfaces_always_present (base);
-
-  g_ptr_array_add (interfaces, TP_IFACE_CONNECTION_INTERFACE_REQUESTS);
-
-  return interfaces;
-}
-
 static void
 tp_tests_simple_connection_class_init (TpTestsSimpleConnectionClass *klass)
 {
@@ -297,8 +273,6 @@ tp_tests_simple_connection_class_init (TpTestsSimpleConnectionClass *klass)
   base_class->start_connecting = start_connecting;
   base_class->shut_down = shut_down;
 
-  base_class->get_interfaces_always_present = get_interfaces_always_present;
-
   param_spec = g_param_spec_string ("account", "Account name",
       "The username of this user", NULL,
       G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -311,13 +285,6 @@ tp_tests_simple_connection_class_init (TpTestsSimpleConnectionClass *klass)
       TP_CONNECTION_STATUS_DISCONNECTED,
       G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
   g_object_class_install_property (object_class, PROP_DBUS_STATUS, param_spec);
-
-  signals[SIGNAL_GOT_ALL] = g_signal_new ("got-all",
-      G_OBJECT_CLASS_TYPE (klass),
-      G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
-      0,
-      NULL, NULL, NULL,
-      G_TYPE_NONE, 0);
 }
 
 void
@@ -431,26 +398,3 @@ tp_tests_simple_connection_ensure_room_list_chan (TpTestsSimpleConnection *self,
 
   return chan_path;
 }
-
-static void
-get_all (TpSvcDBusProperties *iface,
-    const gchar *interface_name,
-    GDBusMethodInvocation *context)
-{
-  GHashTable *values = tp_dbus_properties_mixin_dup_all (G_OBJECT (iface),
-      interface_name);
-
-  tp_svc_dbus_properties_return_from_get_all (context, values);
-  g_hash_table_unref (values);
-  g_signal_emit (iface, signals[SIGNAL_GOT_ALL],
-      g_quark_from_string (interface_name));
-}
-
-static void
-props_iface_init (TpSvcDBusPropertiesClass *iface)
-{
-#define IMPLEMENT(x) \
-  tp_svc_dbus_properties_implement_##x (iface, x)
-  IMPLEMENT (get_all);
-#undef IMPLEMENT
-}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]