[telepathy-glib/master] account: removed _refresh_properties

Jonny Lamb jonny.lamb at collabora.co.uk
Thu Sep 24 06:40:52 PDT 2009


Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 docs/reference/telepathy-glib-sections.txt |    1 -
 telepathy-glib/account.c                   |   63 +++++++++++-----------------
 telepathy-glib/account.h                   |    2 -
 3 files changed, 24 insertions(+), 42 deletions(-)

diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index efe9b0e..3e8f50c 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -3026,7 +3026,6 @@ tp_account_get_parameters
 tp_account_get_nickname
 tp_account_set_nickname_async
 tp_account_set_nickname_finish
-tp_account_refresh_properties
 tp_account_get_unique_name
 tp_account_get_avatar_async
 tp_account_get_avatar_finish
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index fae3ae5..fced861 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -726,6 +726,28 @@ _tp_account_properties_changed (TpAccount *proxy,
 }
 
 static void
+_tp_account_got_all_cb (TpProxy *proxy,
+    GHashTable *properties,
+    const GError *error,
+    gpointer user_data,
+    GObject *weak_object)
+{
+  TpAccount *self = TP_ACCOUNT (weak_object);
+
+  DEBUG ("Got whole set of properties for %s",
+      tp_account_get_unique_name (self));
+
+  if (error != NULL)
+    {
+      DEBUG ("Failed to get the initial set of account properties: %s",
+          error->message);
+      return;
+    }
+
+  _tp_account_update (self, properties);
+}
+
+static void
 _tp_account_constructed (GObject *object)
 {
   TpAccount *self = TP_ACCOUNT (object);
@@ -777,7 +799,8 @@ _tp_account_constructed (GObject *object)
   tp_cli_account_connect_to_account_property_changed (self,
       _tp_account_properties_changed, NULL, NULL, object, NULL);
 
-  tp_account_refresh_properties (self);
+  tp_cli_dbus_properties_call_get_all (self, -1, TP_IFACE_ACCOUNT,
+      _tp_account_got_all_cb, NULL, NULL, G_OBJECT (self));
 }
 
 static void
@@ -1390,28 +1413,6 @@ unescape_protocol (gchar *protocol)
   return protocol;
 }
 
-static void
-_tp_account_got_all_cb (TpProxy *proxy,
-    GHashTable *properties,
-    const GError *error,
-    gpointer user_data,
-    GObject *weak_object)
-{
-  TpAccount *self = TP_ACCOUNT (weak_object);
-
-  DEBUG ("Got whole set of properties for %s",
-      tp_account_get_unique_name (self));
-
-  if (error != NULL)
-    {
-      DEBUG ("Failed to get the initial set of account properties: %s",
-          error->message);
-      return;
-    }
-
-  _tp_account_update (self, properties);
-}
-
 /**
  * tp_account_get_connection:
  * @account: a #TpAccount
@@ -2128,22 +2129,6 @@ tp_account_remove_finish (TpAccount *account,
 }
 
 /**
- * tp_account_refresh_properties:
- * @account: a #TpAccount
- *
- * Refreshes @account's hashtable of properties with what actually exists on
- * the account manager.
- *
- * Since: 0.7.UNRELEASED
- */
-void
-tp_account_refresh_properties (TpAccount *account)
-{
-  tp_cli_dbus_properties_call_get_all (account, -1, TP_IFACE_ACCOUNT,
-      _tp_account_got_all_cb, NULL, NULL, G_OBJECT (account));
-}
-
-/**
  * tp_account_get_connect_automatically:
  * @account: a #TpAccount
  *
diff --git a/telepathy-glib/account.h b/telepathy-glib/account.h
index 1ed2503..d8fb52e 100644
--- a/telepathy-glib/account.h
+++ b/telepathy-glib/account.h
@@ -179,8 +179,6 @@ void tp_account_set_nickname_async (TpAccount *account,
 gboolean tp_account_set_nickname_finish (TpAccount *account,
     GAsyncResult *result, GError **error);
 
-void tp_account_refresh_properties (TpAccount *account);
-
 const gchar *tp_account_get_unique_name (TpAccount *account);
 
 void tp_account_get_avatar_async (TpAccount *account,
-- 
1.5.6.5




More information about the telepathy-commits mailing list