[next] telepathy-glib: account: AccountPropertyChanged signal has been removed

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Tue Feb 11 23:53:19 PST 2014


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

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Tue Feb 11 11:24:01 2014 +0100

account: AccountPropertyChanged signal has been removed

---

 .../telepathy-glib/telepathy-glib-sections.txt     |    3 -
 telepathy-glib/account.c                           |   15 ++---
 tests/lib/simple-account.c                         |   63 ++++++--------------
 3 files changed, 24 insertions(+), 57 deletions(-)

diff --git a/docs/reference/telepathy-glib/telepathy-glib-sections.txt b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
index 58bf7d6..4a6a308 100644
--- a/docs/reference/telepathy-glib/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
@@ -3904,7 +3904,6 @@ TpCapabilitiesPrivate
 <TITLE>svc-account</TITLE>
 TpSvcAccount
 TpSvcAccountClass
-tp_svc_account_emit_account_property_changed
 tp_svc_account_emit_removed
 tp_svc_account_reconnect_impl
 tp_svc_account_return_from_reconnect
@@ -4157,8 +4156,6 @@ tp_cli_account_callback_for_remove
 tp_cli_account_call_remove
 tp_cli_account_callback_for_update_parameters
 tp_cli_account_call_update_parameters
-tp_cli_account_signal_callback_account_property_changed
-tp_cli_account_connect_to_account_property_changed
 tp_cli_account_signal_callback_removed
 tp_cli_account_connect_to_removed
 <SUBSECTION>
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index 8049c09..17b5e16 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -996,13 +996,9 @@ _tp_account_update (TpAccount *account,
 }
 
 static void
-_tp_account_properties_changed (TpAccount *proxy,
-    GHashTable *properties,
-    gpointer user_data,
-    GObject *weak_object)
+account_props_changed (TpAccount *self,
+    GHashTable *properties)
 {
-  TpAccount *self = TP_ACCOUNT (weak_object);
-
   if (!tp_proxy_is_prepared (self, TP_ACCOUNT_FEATURE_CORE))
     return;
 
@@ -1082,6 +1078,10 @@ dbus_properties_changed_cb (TpProxy *proxy,
 {
   TpAccount *self = TP_ACCOUNT (weak_object);
 
+  if (!tp_strdiff (interface_name, TP_IFACE_ACCOUNT))
+    {
+      account_props_changed (self, changed_properties);
+    }
   if (!tp_strdiff (interface_name, TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING1))
     {
       addressing_props_changed (self, changed_properties);
@@ -1124,9 +1124,6 @@ _tp_account_constructed (GObject *object)
   g_signal_connect (self, "invalidated",
       G_CALLBACK (_tp_account_invalidated_cb), NULL);
 
-  tp_cli_account_connect_to_account_property_changed (self,
-      _tp_account_properties_changed, NULL, NULL, object, NULL);
-
   tp_cli_dbus_properties_connect_to_properties_changed (self,
       dbus_properties_changed_cb, NULL, NULL, object, NULL);
 
diff --git a/tests/lib/simple-account.c b/tests/lib/simple-account.c
index bbb3890..7f9a629 100644
--- a/tests/lib/simple-account.c
+++ b/tests/lib/simple-account.c
@@ -596,9 +596,6 @@ tp_tests_simple_account_set_presence (TpTestsSimpleAccount *self,
     const gchar *status,
     const gchar *message)
 {
-  GHashTable *props;
-  GValueArray *v;
-
   g_free (self->priv->presence_status);
   g_free (self->priv->presence_msg);
 
@@ -606,33 +603,22 @@ tp_tests_simple_account_set_presence (TpTestsSimpleAccount *self,
   self->priv->presence_status = g_strdup (status);
   self->priv->presence_msg = g_strdup (message);
 
-  g_object_get (self, "current-presence", &v, NULL);
-
-  props = tp_asv_new (
-      "CurrentPresence", TP_STRUCT_TYPE_PRESENCE, v,
-      NULL);
-
-  tp_svc_account_emit_account_property_changed (self, props);
-
-  g_boxed_free (TP_STRUCT_TYPE_PRESENCE, v);
+  tp_dbus_properties_mixin_emit_properties_changed_varargs (G_OBJECT (self),
+      TP_IFACE_ACCOUNT, "CurrentPresence", NULL);
 }
 
 void
 tp_tests_simple_account_set_connection (TpTestsSimpleAccount *self,
     const gchar *object_path)
 {
-  GHashTable *change;
-
   if (object_path == NULL)
     object_path = "/";
 
   g_free (self->priv->connection_path);
   self->priv->connection_path = g_strdup (object_path);
 
-  change = tp_asv_new (NULL, NULL);
-  tp_asv_set_string (change, "Connection", object_path);
-  tp_svc_account_emit_account_property_changed (self, change);
-  g_hash_table_unref (change);
+  tp_dbus_properties_mixin_emit_properties_changed_varargs (G_OBJECT (self),
+      TP_IFACE_ACCOUNT, "Connection", NULL);
 }
 
 void
@@ -641,8 +627,6 @@ tp_tests_simple_account_set_connection_with_status (TpTestsSimpleAccount *self,
     TpConnectionStatus status,
     TpConnectionStatusReason reason)
 {
-  GHashTable *change;
-
   if (object_path == NULL)
     object_path = "/";
 
@@ -652,14 +636,12 @@ tp_tests_simple_account_set_connection_with_status (TpTestsSimpleAccount *self,
   self->priv->connection_status = status;
   self->priv->connection_status_reason = reason;
 
-  change = tp_asv_new (
-      "Connection", DBUS_TYPE_G_OBJECT_PATH, object_path,
-      "ConnectionStatus", G_TYPE_UINT, status,
-      "ConnectionStatusReason", G_TYPE_UINT, reason,
+  tp_dbus_properties_mixin_emit_properties_changed_varargs (G_OBJECT (self),
+      TP_IFACE_ACCOUNT,
+      "Connection",
+      "ConnectionStatus",
+      "ConnectionStatusReason",
       NULL);
-
-  tp_svc_account_emit_account_property_changed (self, change);
-  g_hash_table_unref (change);
 }
 
 void
@@ -671,8 +653,6 @@ tp_tests_simple_account_set_connection_with_status_and_details (
     const gchar *connection_error,
     GHashTable *details)
 {
-  GHashTable *change;
-
   if (object_path == NULL)
     object_path = "/";
 
@@ -694,17 +674,14 @@ tp_tests_simple_account_set_connection_with_status_and_details (
   else
     self->priv->connection_error_details = tp_asv_new (NULL, NULL);
 
-  change = tp_asv_new (
-      "Connection", DBUS_TYPE_G_OBJECT_PATH, object_path,
-      "ConnectionStatus", G_TYPE_UINT, status,
-      "ConnectionStatusReason", G_TYPE_UINT, reason,
-      "ConnectionError", G_TYPE_STRING, self->priv->connection_error,
-      "ConnectionErrorDetails", TP_HASH_TYPE_STRING_VARIANT_MAP,
-          self->priv->connection_error_details,
+  tp_dbus_properties_mixin_emit_properties_changed_varargs (G_OBJECT (self),
+      TP_IFACE_ACCOUNT,
+      "Connection",
+      "ConnectionStatus",
+      "ConnectionStatusReason",
+      "ConnectionError",
+      "ConnectionErrorDetails",
       NULL);
-
-  tp_svc_account_emit_account_property_changed (self, change);
-  g_hash_table_unref (change);
 }
 
 void
@@ -717,14 +694,10 @@ void
 tp_tests_simple_account_set_enabled (TpTestsSimpleAccount *self,
     gboolean enabled)
 {
-  GHashTable *change;
-
   self->priv->enabled = enabled;
 
-  change = tp_asv_new (NULL, NULL);
-  tp_asv_set_boolean (change, "Enabled", enabled);
-  tp_svc_account_emit_account_property_changed (self, change);
-  g_hash_table_unref (change);
+  tp_dbus_properties_mixin_emit_properties_changed_varargs (G_OBJECT (self),
+      TP_IFACE_ACCOUNT, "Enabled", NULL);
 }
 
 void



More information about the telepathy-commits mailing list