aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-account-manager.c29
-rw-r--r--libempathy/empathy-account-manager.h6
2 files changed, 34 insertions, 1 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c
index c31ac0159..b443c2cd0 100644
--- a/libempathy/empathy-account-manager.c
+++ b/libempathy/empathy-account-manager.c
@@ -40,7 +40,6 @@
#define MC5_BUS_NAME "org.freedesktop.Telepathy.MissionControl5"
typedef struct {
-
/* (owned) unique name -> (reffed) EmpathyAccount */
GHashTable *accounts;
int connected;
@@ -874,3 +873,31 @@ empathy_account_manager_remove (EmpathyAccountManager *manager,
{
/* FIXME */
}
+
+
+void
+empathy_account_manager_request_global_presence (
+ EmpathyAccountManager *manager,
+ TpConnectionPresenceType type,
+ const gchar *status,
+ const gchar *message)
+{
+ /* FIXME should remember requested presence and set it on new accounts
+ as well */
+ EmpathyAccountManagerPriv *priv = GET_PRIV (manager);
+ GHashTableIter iter;
+ gpointer value;
+
+ g_hash_table_iter_init (&iter, priv->accounts);
+ while (g_hash_table_iter_next (&iter, NULL, &value))
+ {
+ EmpathyAccount *account = EMPATHY_ACCOUNT (value);
+ gboolean ready;
+
+ g_object_get (account, "ready", &ready, NULL);
+
+ if (ready)
+ empathy_account_request_presence (account, type, status, message);
+ }
+}
+
diff --git a/libempathy/empathy-account-manager.h b/libempathy/empathy-account-manager.h
index 2d77610fb..5d794bd83 100644
--- a/libempathy/empathy-account-manager.h
+++ b/libempathy/empathy-account-manager.h
@@ -81,6 +81,12 @@ void empathy_account_manager_remove (
EmpathyAccountManager *manager,
EmpathyAccount *account);
+void empathy_account_manager_request_global_presence (
+ EmpathyAccountManager *manager,
+ TpConnectionPresenceType type,
+ const gchar *status,
+ const gchar *message);
+
G_END_DECLS
#endif /* __EMPATHY_ACCOUNT_MANAGER_H__ */