Mercurial > pidgin
comparison libpurple/protocols/jabber/buddy.h @ 29058:86204988c522
jabber: Treat JabberBuddy->resources as a sorted list.
Instead of having jabber_buddy_find_resource() do a bunch of
calculations, just do all those when presence changes. The first entry
in the list is the highest-priority resource.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Mon, 15 Feb 2010 06:07:53 +0000 |
parents | 73e4c14921e4 |
children | 89f072f356ef |
comparison
equal
deleted
inserted
replaced
29057:29bafbfca469 | 29058:86204988c522 |
---|---|
29 #include "jabber.h" | 29 #include "jabber.h" |
30 #include "caps.h" | 30 #include "caps.h" |
31 #include "jutil.h" | 31 #include "jutil.h" |
32 | 32 |
33 struct _JabberBuddy { | 33 struct _JabberBuddy { |
34 /** | |
35 * A sorted list of resources in priority descending order. | |
36 * This means that the first resource in the list is the | |
37 * "most available" (see resource_compare_cb in buddy.c for | |
38 * details). Don't play with this yourself, let | |
39 * jabber_buddy_track_resource and jabber_buddy_remove_resource do it. | |
40 */ | |
34 GList *resources; | 41 GList *resources; |
35 char *error_msg; | 42 char *error_msg; |
36 enum { | 43 enum { |
37 JABBER_INVISIBLE_NONE = 0, | 44 JABBER_INVISIBLE_NONE = 0, |
38 JABBER_INVISIBLE_SERVER = 1 << 1, | 45 JABBER_INVISIBLE_SERVER = 1 << 1, |