diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-10-09 20:19:05 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-10-09 20:19:05 +0200 |
commit | 6a1128d1333cf79f1ef9fb1f55b1b8fec67caf2a (patch) | |
tree | 7942fe056dfecb513fad0fb106011c890d9588ac /protocols/jabber/jabber.h | |
parent | 861c199fb60fecf5dab96e0ed9d4b0cf0c57822f (diff) |
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.
Diffstat (limited to 'protocols/jabber/jabber.h')
-rw-r--r-- | protocols/jabber/jabber.h | 19 |
1 files changed, 19 insertions, 0 deletions
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[]; |