From 6a1128d1333cf79f1ef9fb1f55b1b8fec67caf2a Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 9 Oct 2006 20:19:05 +0200 Subject: The module now keeps track of all resources available for a buddy. This means the buddy won't show up offline when one resource goes down (while there are still others available). It also remembers away state information for every separate resource. Later this system will be used to keep track of client capability information (Typing notices, yay...) and who knows what else. --- protocols/jabber/jabber.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'protocols/jabber/jabber.h') diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h index 6791a0f5..450c8be7 100644 --- a/protocols/jabber/jabber.h +++ b/protocols/jabber/jabber.h @@ -60,6 +60,7 @@ struct jabber_data char *away_message; GHashTable *node_cache; + GHashTable *buddies; }; struct jabber_away_state @@ -76,6 +77,21 @@ struct jabber_cache_entry jabber_cache_event func; }; +struct jabber_buddy +{ + char *handle; + char *resource; + + int priority; + struct jabber_away_state *away_state; + char *away_message; + + time_t last_act; + int flags; + + struct jabber_buddy *next; +}; + /* iq.c */ xt_status jabber_pkt_iq( struct xt_node *node, gpointer data ); int jabber_init_iq_auth( struct gaim_connection *gc ); @@ -103,6 +119,9 @@ void jabber_cache_clean( struct gaim_connection *gc ); const struct jabber_away_state *jabber_away_state_by_code( char *code ); const struct jabber_away_state *jabber_away_state_by_name( char *name ); void jabber_buddy_ask( struct gaim_connection *gc, char *handle ); +struct jabber_buddy *jabber_buddy_add( struct gaim_connection *gc, char *full_jid ); +struct jabber_buddy *jabber_buddy_by_jid( struct gaim_connection *gc, char *jid ); +int jabber_buddy_remove( struct gaim_connection *gc, char *full_jid ); extern const struct jabber_away_state jabber_away_state_list[]; -- cgit v1.2.3