From 565bab5296d9114543318ff453c6c2a878da417e Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Wed, 15 Jul 2009 15:00:26 +0100 Subject: Use default status identifiers when setting the presence --- libempathy/empathy-idle.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'libempathy') 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 -- cgit v1.2.3