[telepathy-glib/master] account: merged _get_connection_status and _get_connection_status_reason
Jonny Lamb
jonny.lamb at collabora.co.uk
Thu Sep 24 06:35:16 PDT 2009
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
docs/reference/telepathy-glib-sections.txt | 1 -
telepathy-glib/account.c | 25 +++++++------------------
telepathy-glib/account.h | 6 ++----
3 files changed, 9 insertions(+), 23 deletions(-)
diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index d8420e7..efe9b0e 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -3016,7 +3016,6 @@ tp_account_set_connect_automatically_async
tp_account_set_connect_automatically_finish
tp_account_get_has_been_online
tp_account_get_connection_status
-tp_account_get_connection_status_reason
tp_account_get_presence
tp_account_get_status
tp_account_get_status_message
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index 8e7be33..fae3ae5 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -2238,33 +2238,22 @@ tp_account_get_has_been_online (TpAccount *account)
/**
* tp_account_get_connection_status:
* @account: a #TpAccount
+ * @reason: a #TpConnectionStatusReason to fill, or %NULL
*
- * Gets the ConnectionStatus parameter on @account.
+ * Gets the ConnectionStatus and ConnectionStatusReason parameter on @account.
*
* Returns: the value of the ConnectionStatus parameter on @account
*
* Since: 0.7.UNRELEASED
*/
TpConnectionStatus
-tp_account_get_connection_status (TpAccount *account)
+tp_account_get_connection_status (TpAccount *account,
+ TpConnectionStatusReason *reason)
{
- return account->priv->connection_status;
-}
+ if (reason != NULL)
+ *reason = account->priv->reason;
-/**
- * tp_account_get_connection_status_reason:
- * @account: a #TpAccount
- *
- * Gets the ConnectionStatusReason parameter on @account.
- *
- * Returns: the value of the ConnectionStatusReason parameter on @account
- *
- * Since: 0.7.UNRELEASED
- */
-TpConnectionStatusReason
-tp_account_get_connection_status_reason (TpAccount *account)
-{
- return account->priv->reason;
+ return account->priv->connection_status;
}
/**
diff --git a/telepathy-glib/account.h b/telepathy-glib/account.h
index 00d962f..1ed2503 100644
--- a/telepathy-glib/account.h
+++ b/telepathy-glib/account.h
@@ -153,10 +153,8 @@ gboolean tp_account_set_connect_automatically_finish (TpAccount *account,
gboolean tp_account_get_has_been_online (TpAccount *account);
-TpConnectionStatus tp_account_get_connection_status (TpAccount *account);
-
-TpConnectionStatusReason tp_account_get_connection_status_reason (
- TpAccount *account);
+TpConnectionStatus tp_account_get_connection_status (TpAccount *account,
+ TpConnectionStatusReason *reason);
TpConnectionPresenceType tp_account_get_presence (TpAccount *account);
--
1.5.6.5
More information about the telepathy-commits
mailing list