summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-08 13:10:25 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-08 13:10:25 +0100
commit20573e15bd098fbf19857e23c4c7bfc0d12c27f6 (patch)
tree22d05c7163b1edebb7ad26dbdea69bb9d5a309bb
parent37b729e813c983dbb7f238e46a56ab02220e548b (diff)
Sync TpTestsSimple* from telepathy-glib gdbus-properties2 branchgdbus-properties2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77144
-rw-r--r--tests/lib/telepathy/contactlist/simple-account-manager.c2
-rw-r--r--tests/lib/telepathy/contactlist/simple-account.c18
-rw-r--r--tests/lib/telepathy/contactlist/simple-conn.c56
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 767bce44..7b01e06c 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 7f0d568b..c56cec6c 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 4769f952..9acea0a9 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
-}