Mercurial > ~mikael > mcabber > hg
diff mcabber/src/roster.h @ 987:f47e312560af
Improve JEP22 + JEP85 support
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 30 Oct 2006 20:18:00 +0100 |
parents | ed697234bd39 |
children | ebbde723614b |
line wrap: on
line diff
--- a/mcabber/src/roster.h Sun Oct 29 11:43:00 2006 +0100 +++ b/mcabber/src/roster.h Mon Oct 30 20:18:00 2006 +0100 @@ -74,21 +74,42 @@ #define ROSTER_FLAG_USRLOCK (1U<<3) // Node should not be removed from buddylist // ROSTER_FLAG_LOCAL (1U<<4) // Buddy not on server's roster (??) +#define JEP0022 +#define JEP0085 + +struct jep0022 { + guint support; + guint last_state_sent; + gchar *last_msgid_sent; + guint last_state_rcvd; + gchar *last_msgid_rcvd; +}; +struct jep0085 { + guint support; + guint last_state_sent; + guint last_state_rcvd; +}; + +enum chatstate_support { + CHATSTATES_SUPPORT_UNKNOWN = 0, + CHATSTATES_SUPPORT_PROBED, + CHATSTATES_SUPPORT_NONE, + CHATSTATES_SUPPORT_OK +}; /* Message event and chat state flags */ #define ROSTER_EVENT_NONE 0U -#define ROSTER_EVENT_MSG 1U /* JEP-22 Message Events */ -#define ROSTER_EVENT_OFFLINE (1U<<1) -#define ROSTER_EVENT_DELIVERED (1U<<2) -#define ROSTER_EVENT_DISPLAYED (1U<<3) +#define ROSTER_EVENT_OFFLINE (1U<<0) +#define ROSTER_EVENT_DELIVERED (1U<<1) +#define ROSTER_EVENT_DISPLAYED (1U<<2) /* JEP-22 & JEP-85 */ -#define ROSTER_EVENT_COMPOSING (1U<<4) +#define ROSTER_EVENT_COMPOSING (1U<<3) /* JEP-85 Chat State Notifications */ -#define ROSTER_EVENT_ACTIVE (1U<<5) -#define ROSTER_EVENT_PAUSED (1U<<6) -#define ROSTER_EVENT_INACTIVE (1U<<7) -#define ROSTER_EVENT_GONE (1U<<8) +#define ROSTER_EVENT_ACTIVE (1U<<4) +#define ROSTER_EVENT_PAUSED (1U<<5) +#define ROSTER_EVENT_INACTIVE (1U<<6) +#define ROSTER_EVENT_GONE (1U<<7) extern GList *buddylist; extern GList *current_buddy; @@ -154,6 +175,8 @@ void buddy_resource_setevents(gpointer rosterdata, const char *resname, guint event); guint buddy_resource_getevents(gpointer rosterdata, const char *resname); +struct jep0022 *buddy_resource_jep22(gpointer rosterdata, const char *resname); +struct jep0085 *buddy_resource_jep85(gpointer rosterdata, const char *resname); enum imrole buddy_getrole(gpointer rosterdata, const char *resname); enum imaffiliation buddy_getaffil(gpointer rosterdata, const char *resname); const char *buddy_getrjid(gpointer rosterdata, const char *resname);