diff libpurple/purple-remote @ 18035:c168d1ae2012

A patch from Norbert Buchmuller: "There's a 'setstatus' command implemented in 'gaim-remote', but there's no 'getstatus'. For some tasks (eg. setting status to 'offline' on hibernation and restoring it on resume) it would be useful if such command existed." I'm not sure if we're considering this API or not. committer: Richard Laager <rlaager@wiktel.com>
author Norbert Buchmuller <norbi@nix.hu>
date Sun, 03 Jun 2007 19:34:16 +0000
parents 3c8ccbc4a667
children 6b7b13adb9b1
line wrap: on
line diff
--- a/libpurple/purple-remote	Sun Jun 03 00:48:00 2007 +0000
+++ b/libpurple/purple-remote	Sun Jun 03 19:34:16 2007 +0000
@@ -159,6 +159,12 @@
 
         return None
 
+    elif command == "getstatus":
+        current = purple.PurpleSavedstatusGetCurrent()
+        status_type = purple.PurpleSavedstatusGetType(current)
+        status_id = purple.PurplePrimitiveGetIdFromType(status_type)
+        return status_id
+
     elif command == "getinfo":
         account = findaccount(accountname, protocol)
         connection = cpurple.PurpleAccountGetConnection(account)