[empathy/mc5: 93/483] Use default status identifiers when setting the presence



commit 565bab5296d9114543318ff453c6c2a878da417e
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Wed Jul 15 15:00:26 2009 +0100

    Use default status identifiers when setting the presence

 libempathy/empathy-idle.c |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index e1cccf1..9250359 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]