Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.h

    rc6ca3ee r04a927c  
    2727#include <glib.h>
    2828
    29 #include "xmltree.h"
    3029#include "bitlbee.h"
    3130#include "md5.h"
     31#include "xmltree.h"
    3232
    3333extern GSList *jabber_connections;
     
    4040        JFLAG_STREAM_RESTART = 4,       /* Set when we want to restart the stream (after
    4141                                           SASL or TLS). */
    42         JFLAG_WAIT_SESSION = 8,         /* Set if we sent a <session> tag and need a reply
     42        JFLAG_WANT_SESSION = 8,         /* Set if the server wants a <session/> tag
    4343                                           before we continue. */
    44         JFLAG_WAIT_BIND = 16,           /* ... for <bind> tag. */
     44        JFLAG_WANT_BIND = 16,           /* ... for <bind> tag. */
    4545        JFLAG_WANT_TYPING = 32,         /* Set if we ever sent a typing notification, this
    4646                                           activates all XEP-85 related code. */
    4747        JFLAG_XMLCONSOLE = 64,          /* If the user added an xmlconsole buddy. */
     48        JFLAG_STARTTLS_DONE = 128,      /* If a plaintext session was converted to TLS. */
    4849} jabber_flags_t;
    4950
     
    8485        /* After changing one of these two (or the priority setting), call
    8586           presence_send_update() to inform the server about the changes. */
    86         struct jabber_away_state *away_state;
     87        const struct jabber_away_state *away_state;
    8788        char *away_message;
    8889       
     
    107108};
    108109
     110/* Somewhat messy data structure: We have a hash table with the bare JID as
     111   the key and the head of a struct jabber_buddy list as the value. The head
     112   is always a bare JID. If the JID has other resources (often the case,
     113   except for some transports that don't support multiple resources), those
     114   follow. In that case, the bare JID at the beginning doesn't actually
     115   refer to a real session and should only be used for operations that
     116   support incomplete JIDs. */
    109117struct jabber_buddy
    110118{
     
    120128        char *away_message;
    121129       
    122         time_t last_act;
     130        time_t last_msg;
    123131        jabber_buddy_flags_t flags;
    124132       
     
    208216        GET_BUDDY_EXACT = 2,    /* Get an exact match (only makes sense with bare JIDs). */
    209217        GET_BUDDY_FIRST = 4,    /* No selection, simply get the first resource for this JID. */
     218        GET_BUDDY_BARE = 8,     /* Get the bare version of the JID (possibly inexistent). */
     219        GET_BUDDY_BARE_OK = 16, /* Allow returning a bare JID if that seems better. */
    210220} get_buddy_flags_t;
    211221
     
    220230int jabber_buddy_remove( struct im_connection *ic, char *full_jid );
    221231int jabber_buddy_remove_bare( struct im_connection *ic, char *bare_jid );
     232void jabber_buddy_remove_all( struct im_connection *ic );
    222233time_t jabber_get_timestamp( struct xt_node *xt );
    223234struct jabber_error *jabber_error_parse( struct xt_node *node, char *xmlns );
     
    241252
    242253/* conference.c */
    243 struct groupchat *jabber_chat_join( struct im_connection *ic, char *room, char *nick, char *password );
     254struct groupchat *jabber_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password );
    244255struct groupchat *jabber_chat_by_jid( struct im_connection *ic, const char *name );
    245256void jabber_chat_free( struct groupchat *c );
Note: See TracChangeset for help on using the changeset viewer.