[telepathy-glib/master] account: add getter for HasBeenOnline
Jonny Lamb
jonny.lamb at collabora.co.uk
Mon Sep 28 07:39:35 PDT 2009
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
telepathy-glib/account.c | 21 +++++++++++++++++++++
telepathy-glib/account.h | 2 ++
2 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index fcf2c94..71678d4 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -84,6 +84,7 @@ struct _TpAccountPrivate {
gchar *message;
gboolean connect_automatically;
+ gboolean has_been_online;
gboolean enabled;
gboolean valid;
@@ -464,6 +465,12 @@ _tp_account_update (TpAccount *account,
priv->connect_automatically =
tp_asv_get_boolean (properties, "ConnectAutomatically", NULL);
}
+
+ if (g_hash_table_lookup (properties, "HasBeenOnline") != NULL)
+ {
+ priv->has_been_online =
+ tp_asv_get_boolean (properties, "HasBeenOnline", NULL);
+ }
}
static void
@@ -1720,3 +1727,17 @@ tp_account_set_connect_automatically_finish (TpAccount *account,
return TRUE;
}
+
+/**
+ * tp_account_get_has_been_online:
+ * @account: a #TpAccount
+ *
+ * Gets the HasBeenOnline parameter on @account.
+ *
+ * Returns: the value of the HasBeenOnline parameter on @account
+ */
+gboolean
+tp_account_get_has_been_online (TpAccount *account)
+{
+ return account->priv->has_been_online;
+}
diff --git a/telepathy-glib/account.h b/telepathy-glib/account.h
index e080ba4..1a4787f 100644
--- a/telepathy-glib/account.h
+++ b/telepathy-glib/account.h
@@ -149,6 +149,8 @@ void tp_account_set_connect_automatically_async (TpAccount *account,
gboolean tp_account_set_connect_automatically_finish (TpAccount *account,
GAsyncResult *result, GError **error);
+gboolean tp_account_get_has_been_online (TpAccount *account);
+
const GHashTable *tp_account_get_parameters (TpAccount *account);
void tp_account_refresh_properties (TpAccount *account);
--
1.5.6.5
More information about the telepathy-commits
mailing list