[telepathy-mission-control/master] Rename _mcd_account_request_connection to _mcd_account_connect_with_auto_presence
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Jun 25 10:57:49 PDT 2009
This suits its purpose better.
---
src/mcd-account-priv.h | 2 +-
src/mcd-account.c | 16 +++++++++-------
src/mcd-master.c | 6 +++---
3 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/mcd-account-priv.h b/src/mcd-account-priv.h
index a791fe6..7732c34 100644
--- a/src/mcd-account-priv.h
+++ b/src/mcd-account-priv.h
@@ -88,7 +88,7 @@ typedef void (*McdOnlineRequestCb) (McdAccount *account, gpointer userdata,
void _mcd_account_online_request (McdAccount *account,
McdOnlineRequestCb callback,
gpointer userdata);
-void _mcd_account_request_connection (McdAccount *account);
+void _mcd_account_connect_with_auto_presence (McdAccount *account);
G_GNUC_INTERNAL
void _mcd_account_online_request_completed (McdAccount *account,
GError *error);
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 5e4d790..559e444 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -213,7 +213,7 @@ _mcd_account_maybe_autoconnect (McdAccount *account)
}
DEBUG ("connecting account %s", priv->unique_name);
- _mcd_account_request_connection (account);
+ _mcd_account_connect_with_auto_presence (account);
}
static gboolean
@@ -325,7 +325,7 @@ mcd_account_loaded (McdAccount *account)
/* otherwise, we want to go online now */
if (account->priv->conn_status == TP_CONNECTION_STATUS_DISCONNECTED)
{
- _mcd_account_request_connection (account);
+ _mcd_account_connect_with_auto_presence (account);
}
}
@@ -2802,14 +2802,16 @@ mcd_account_check_validity (McdAccount *account)
}
/*
- * _mcd_account_request_connection:
+ * _mcd_account_connect_with_auto_presence:
* @account: the #McdAccount.
*
- * Request the account to go online. If an automatic presence is specified, set
- * it.
+ * Request the account to go online with the configured AutomaticPresence.
+ * This is appropriate in these situations:
+ * - going online automatically because we've gained connectivity
+ * - going online automatically in order to request a channel
*/
void
-_mcd_account_request_connection (McdAccount *account)
+_mcd_account_connect_with_auto_presence (McdAccount *account)
{
McdAccountPrivate *priv = account->priv;
@@ -2873,7 +2875,7 @@ _mcd_account_online_request (McdAccount *account,
/* listen to the StatusChanged signal */
if (priv->loaded && priv->conn_status == TP_CONNECTION_STATUS_DISCONNECTED)
- _mcd_account_request_connection (account);
+ _mcd_account_connect_with_auto_presence (account);
/* now the connection should be in connecting state; insert the
* callback in the online_requests hash table, which will be processed
diff --git a/src/mcd-master.c b/src/mcd-master.c
index 885355a..e81b025 100644
--- a/src/mcd-master.c
+++ b/src/mcd-master.c
@@ -151,7 +151,7 @@ check_account_transport (gpointer key, gpointer value, gpointer userdata)
conditions))
{
DEBUG ("conditions matched");
- _mcd_account_request_connection (account);
+ _mcd_account_connect_with_auto_presence (account);
if (g_hash_table_size (conditions) > 0)
mcd_account_connection_bind_transport (account, td->transport);
}
@@ -198,7 +198,7 @@ disconnect_account_transport (gpointer key, gpointer value, gpointer userdata)
if (_mcd_master_account_conditions_satisfied (td->master, account))
{
DEBUG ("conditions matched");
- _mcd_account_request_connection (account);
+ _mcd_account_connect_with_auto_presence (account);
}
}
}
@@ -245,7 +245,7 @@ mcd_master_connect_automatic_accounts (McdMaster *master)
if (_mcd_master_account_conditions_satisfied (master, account))
{
DEBUG ("conditions matched");
- _mcd_account_request_connection (account);
+ _mcd_account_connect_with_auto_presence (account);
}
}
}
--
1.5.6.5
More information about the telepathy-commits
mailing list