Mercurial > ~mikael > mcabber > hg
diff mcabber/src/roster.c @ 986:ed697234bd39
Chat states receival (Alexis Hildebrandt)
Patch from Alexis Hildebrandt, slightly modified
(mostly coding style updates).
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 29 Oct 2006 11:43:00 +0100 |
parents | 5b01de4ac5e1 |
children | f47e312560af |
line wrap: on
line diff
--- a/mcabber/src/roster.c Sat Oct 28 18:14:22 2006 +0200 +++ b/mcabber/src/roster.c Sun Oct 29 11:43:00 2006 +0100 @@ -51,6 +51,7 @@ enum imrole role; enum imaffiliation affil; gchar *realjid; /* for chatrooms, if buddy's real jid is known */ + guint events; } res; /* This is a private structure type for the roster */ @@ -1062,6 +1063,32 @@ return 0; } +guint buddy_resource_getevents(gpointer rosterdata, const char *resname) +{ + roster *roster_usr = rosterdata; + res *p_res = get_resource(roster_usr, resname); + if (p_res) + return p_res->events; + return ROSTER_EVENT_NONE; +} + +void buddy_resource_setevents(gpointer rosterdata, const char *resname, + guint events) +{ + roster *roster_usr = rosterdata; + res *p_res = get_resource(roster_usr, resname); + if (p_res) + p_res->events = events; + + /* + // update group + roster_usr = roster_usr->list->data; + p_res = get_resource(roster_usr, ""); + if (p_res) + p_res->events = events; + */ +} + enum imrole buddy_getrole(gpointer rosterdata, const char *resname) { roster *roster_usr = rosterdata;