Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/jutil.h @ 29449:73e4c14921e4
jabber: Move those functions to jutil.[ch]
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Mon, 15 Feb 2010 05:35:56 +0000 |
parents | b676cb5b4595 |
children | 9f59abd49def |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jutil.h Mon Feb 15 05:31:34 2010 +0000 +++ b/libpurple/protocols/jabber/jutil.h Mon Feb 15 05:35:56 2010 +0000 @@ -30,6 +30,17 @@ char *resource; } JabberID; +typedef enum { + JABBER_BUDDY_STATE_UNKNOWN = -2, + JABBER_BUDDY_STATE_ERROR = -1, + JABBER_BUDDY_STATE_UNAVAILABLE = 0, + JABBER_BUDDY_STATE_ONLINE, + JABBER_BUDDY_STATE_CHAT, + JABBER_BUDDY_STATE_AWAY, + JABBER_BUDDY_STATE_XA, + JABBER_BUDDY_STATE_DND +} JabberBuddyState; + #include "jabber.h" JabberID* jabber_id_new(const char *str); @@ -63,5 +74,16 @@ */ char *jabber_saslprep(const char *); +/* state -> readable name */ +const char *jabber_buddy_state_get_name(JabberBuddyState state); +/* state -> core id */ +const char *jabber_buddy_state_get_status_id(JabberBuddyState state); +/* state -> show attr (for presence stanza) */ +const char *jabber_buddy_state_get_show(JabberBuddyState state); +/* core id -> state */ +JabberBuddyState jabber_buddy_status_id_get_state(const char *id); +/* show attr (presence stanza) -> state */ +JabberBuddyState jabber_buddy_show_get_state(const char *id); + char *jabber_calculate_data_sha1sum(gconstpointer data, size_t len); #endif /* PURPLE_JABBER_JUTIL_H_ */