diff options
author | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-05-06 21:02:09 +0800 |
---|---|---|
committer | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-08-20 18:03:05 +0800 |
commit | 88819ece017f0693803f33bb560e4d01140174c1 (patch) | |
tree | eff64c70d25e3a59d13d74ecbb1099e6b6860890 /libempathy | |
parent | dc5ad68355fa55261f24098d9be184a2c6f6f459 (diff) | |
download | gsoc2013-empathy-88819ece017f0693803f33bb560e4d01140174c1.tar gsoc2013-empathy-88819ece017f0693803f33bb560e4d01140174c1.tar.gz gsoc2013-empathy-88819ece017f0693803f33bb560e4d01140174c1.tar.bz2 gsoc2013-empathy-88819ece017f0693803f33bb560e4d01140174c1.tar.lz gsoc2013-empathy-88819ece017f0693803f33bb560e4d01140174c1.tar.xz gsoc2013-empathy-88819ece017f0693803f33bb560e4d01140174c1.tar.zst gsoc2013-empathy-88819ece017f0693803f33bb560e4d01140174c1.zip |
tpaw-utils: move empathy_connect_new_account to tp-aw and rename it
This commit also changes the licence of the moved code (all copyrighted
by Collabora Ltd.) from GPL to LGPL.
https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-utils.c | 43 | ||||
-rw-r--r-- | libempathy/empathy-utils.h | 3 |
2 files changed, 0 insertions, 46 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index 25624bf00..b06edeb01 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -564,49 +564,6 @@ empathy_account_manager_get_accounts_connected (gboolean *connecting) return out_connected; } -/* Change the RequestedPresence of a newly created account to ensure that it - * is actually connected. */ -void -empathy_connect_new_account (TpAccount *account, - TpAccountManager *account_manager) -{ - TpConnectionPresenceType presence; - gchar *status, *message; - - /* only force presence if presence was offline, unknown or unset */ - presence = tp_account_get_requested_presence (account, NULL, NULL); - switch (presence) - { - case TP_CONNECTION_PRESENCE_TYPE_OFFLINE: - case TP_CONNECTION_PRESENCE_TYPE_UNKNOWN: - case TP_CONNECTION_PRESENCE_TYPE_UNSET: - presence = tp_account_manager_get_most_available_presence ( - account_manager, &status, &message); - - if (presence == TP_CONNECTION_PRESENCE_TYPE_OFFLINE) - /* Global presence is offline; we force it so user doesn't have to - * manually change the presence to connect his new account. */ - presence = TP_CONNECTION_PRESENCE_TYPE_AVAILABLE; - - tp_account_request_presence_async (account, presence, - status, NULL, NULL, NULL); - - g_free (status); - g_free (message); - break; - - case TP_CONNECTION_PRESENCE_TYPE_AVAILABLE: - case TP_CONNECTION_PRESENCE_TYPE_AWAY: - case TP_CONNECTION_PRESENCE_TYPE_EXTENDED_AWAY: - case TP_CONNECTION_PRESENCE_TYPE_HIDDEN: - case TP_CONNECTION_PRESENCE_TYPE_BUSY: - case TP_CONNECTION_PRESENCE_TYPE_ERROR: - default: - /* do nothing if the presence is not offline */ - break; - } -} - /* Translate Folks' general presence type to the Tp presence type */ TpConnectionPresenceType empathy_folks_presence_type_to_tp (FolksPresenceType type) diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h index f002c41cd..1a86755c6 100644 --- a/libempathy/empathy-utils.h +++ b/libempathy/empathy-utils.h @@ -75,9 +75,6 @@ GType empathy_type_dbus_ao (void); gboolean empathy_account_manager_get_accounts_connected (gboolean *connecting); -void empathy_connect_new_account (TpAccount *account, - TpAccountManager *account_manager); - TpConnectionPresenceType empathy_folks_presence_type_to_tp ( FolksPresenceType type); gboolean empathy_folks_individual_contains_contact ( |