[telepathy-glib/master] account: re-add _refresh_properties internally and call in the AM
Jonny Lamb
jonny.lamb at collabora.co.uk
Sat Sep 26 09:57:56 PDT 2009
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
telepathy-glib/account-internal.h | 2 ++
telepathy-glib/account-manager.c | 2 ++
telepathy-glib/account.c | 18 ++++++++++++++++++
3 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/telepathy-glib/account-internal.h b/telepathy-glib/account-internal.h
index 3198c0c..2fbf071 100644
--- a/telepathy-glib/account-internal.h
+++ b/telepathy-glib/account-internal.h
@@ -32,6 +32,8 @@ const GQuark * _tp_account_get_actual_features (TpAccount *account);
const GQuark * _tp_account_get_missing_features (TpAccount *account);
+void _tp_account_refresh_properties (TpAccount *account);
+
G_END_DECLS
#endif
diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c
index 8eb4a00..1be1cf1 100644
--- a/telepathy-glib/account-manager.c
+++ b/telepathy-glib/account-manager.c
@@ -20,6 +20,7 @@
*/
#include "telepathy-glib/account-manager-internal.h"
+#include "telepathy-glib/account-internal.h"
#include <telepathy-glib/defs.h>
#include <telepathy-glib/gtypes.h>
@@ -341,6 +342,7 @@ _tp_account_manager_ensure_all_accounts (TpAccountManager *manager,
name = g_ptr_array_index (accounts, i);
account = tp_account_manager_ensure_account (manager, name);
+ _tp_account_refresh_properties (account);
}
missing_accounts = g_hash_table_size (priv->accounts) - accounts->len;
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index 7ad2c43..c682c92 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -2760,3 +2760,21 @@ free_segments_and_fail:
g_strfreev (segments);
return FALSE;
}
+
+/**
+ * _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)
+{
+ g_return_if_fail (TP_IS_ACCOUNT (account));
+
+ tp_cli_dbus_properties_call_get_all (account, -1, TP_IFACE_ACCOUNT,
+ _tp_account_got_all_cb, NULL, NULL, G_OBJECT (account));
+}
--
1.5.6.5
More information about the telepathy-commits
mailing list