aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-idle.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-15 22:00:26 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-16 19:41:48 +0800
commit565bab5296d9114543318ff453c6c2a878da417e (patch)
tree70d5a3b7ae30caa8a08729c55b03990f46458b16 /libempathy/empathy-idle.c
parent7c4c3fb9a2de1711a7a76abc48d6ac540b70d4d0 (diff)
downloadgsoc2013-empathy-565bab5296d9114543318ff453c6c2a878da417e.tar
gsoc2013-empathy-565bab5296d9114543318ff453c6c2a878da417e.tar.gz
gsoc2013-empathy-565bab5296d9114543318ff453c6c2a878da417e.tar.bz2
gsoc2013-empathy-565bab5296d9114543318ff453c6c2a878da417e.tar.lz
gsoc2013-empathy-565bab5296d9114543318ff453c6c2a878da417e.tar.xz
gsoc2013-empathy-565bab5296d9114543318ff453c6c2a878da417e.tar.zst
gsoc2013-empathy-565bab5296d9114543318ff453c6c2a878da417e.zip
Use default status identifiers when setting the presence
Diffstat (limited to 'libempathy/empathy-idle.c')
-rw-r--r--libempathy/empathy-idle.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index e1cccf1e7..9250359f0 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -577,15 +577,31 @@ empathy_idle_set_flash_state (EmpathyIdle *idle,
static void
empathy_idle_do_set_presence (EmpathyIdle *idle,
- TpConnectionPresenceType state,
- const gchar *status)
+ TpConnectionPresenceType status_type,
+ const gchar *status_message)
{
EmpathyIdlePriv *priv = GET_PRIV (idle);
+ const gchar *statusses[NUM_TP_CONNECTION_PRESENCE_TYPES] = {
+ NULL,
+ "offline",
+ "available",
+ "away",
+ "xa",
+ "hidden",
+ "busy",
+ NULL,
+ NULL,
+ };
+ const gchar *status;
+
+ g_assert (status_type > 0 && status_type < NUM_TP_CONNECTION_PRESENCE_TYPES);
+
+ status = statusses[status_type];
+ g_return_if_fail (status != NULL);
- /* FIXME */
empathy_account_manager_request_global_presence (priv->manager,
- state, "available", status);
+ status_type, status, status_message);
}
void