Changes in protocols/jabber/jabber.h [ef5c185:0da65d5]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.h
ref5c185 r0da65d5 32 32 typedef enum 33 33 { 34 JFLAG_STREAM_STARTED = 1, 34 JFLAG_STREAM_STARTED = 1, /* Set when we detected the beginning of the stream 35 35 and want to do auth. */ 36 JFLAG_AUTHENTICATED = 2, 37 JFLAG_STREAM_RESTART = 4, 36 JFLAG_AUTHENTICATED = 2, /* Set when we're successfully authenticatd. */ 37 JFLAG_STREAM_RESTART = 4, /* Set when we want to restart the stream (after 38 38 SASL or TLS). */ 39 JFLAG_WAIT_SESSION = 8, 39 JFLAG_WAIT_SESSION = 8, /* Set if we sent a <session> tag and need a reply 40 40 before we continue. */ 41 JFLAG_WAIT_BIND = 16, 42 JFLAG_WANT_TYPING = 32, 41 JFLAG_WAIT_BIND = 16, /* ... for <bind> tag. */ 42 JFLAG_WANT_TYPING = 32, /* Set if we ever sent a typing notification, this 43 43 activates all XEP-85 related code. */ 44 JFLAG_XMLCONSOLE = 64, /* If the user added an xmlconsole buddy. */45 44 } jabber_flags_t; 46 45 … … 51 50 JBFLAG_DOES_XEP85 = 2, /* Set this when the resource seems to support 52 51 XEP85 (typing notification shite). */ 53 JBFLAG_IS_CHATROOM = 4, /* It's convenient to use this JID thingy for54 groupchat state info too. */55 JBFLAG_IS_ANONYMOUS = 8, /* For anonymous chatrooms, when we don't have56 have a real JID. */57 52 } jabber_buddy_flags_t; 53 54 #define JABBER_PORT_DEFAULT "5222" 55 #define JABBER_PORT_MIN 5220 56 #define JABBER_PORT_MAX 5229 58 57 59 58 struct jabber_data … … 102 101 char *resource; 103 102 104 char *ext_jid; /* The JID to use in BitlBee. The real JID if possible, */105 /* otherwise something similar to the conference JID. */106 107 103 int priority; 108 104 struct jabber_away_state *away_state; … … 114 110 struct jabber_buddy *next; 115 111 }; 116 117 struct jabber_chat118 {119 int flags;120 char *name;121 char *my_full_jid; /* Separate copy because of case sensitivity. */122 struct jabber_buddy *me;123 };124 125 #define JABBER_XMLCONSOLE_HANDLE "xmlconsole"126 127 #define JABBER_PORT_DEFAULT "5222"128 #define JABBER_PORT_MIN 5220129 #define JABBER_PORT_MAX 5229130 112 131 113 /* Prefixes to use for packet IDs (mainly for IQ packets ATM). Usually the … … 150 132 #define XMLNS_TIME "jabber:iq:time" /* XEP-0090 */ 151 133 #define XMLNS_VCARD "vcard-temp" /* XEP-0054 */ 152 #define XMLNS_DELAY "jabber:x:delay" /* XEP-0091 */153 134 #define XMLNS_CHATSTATES "http://jabber.org/protocol/chatstates" /* 0085 */ 154 135 #define XMLNS_DISCOVER "http://jabber.org/protocol/disco#info" /* 0030 */ 155 #define XMLNS_MUC "http://jabber.org/protocol/muc" /* XEP-0045 */156 #define XMLNS_MUC_USER "http://jabber.org/protocol/muc#user"/* XEP-0045 */157 136 158 137 /* iq.c */ … … 185 164 const struct jabber_away_state *jabber_away_state_by_name( char *name ); 186 165 void jabber_buddy_ask( struct im_connection *ic, char *handle ); 187 char *jabber_normalize( c onst char *orig );166 char *jabber_normalize( char *orig ); 188 167 189 168 typedef enum 190 169 { 191 170 GET_BUDDY_CREAT = 1, /* Try to create it, if necessary. */ 192 GET_BUDDY_EXACT = 2, /* Get an exact match (only makes sense with bare JIDs). */ 193 GET_BUDDY_FIRST = 4, /* No selection, simply get the first resource for this JID. */ 171 GET_BUDDY_EXACT = 2, /* Get an exact message (only makes sense with bare JIDs). */ 194 172 } get_buddy_flags_t; 195 196 struct jabber_error197 {198 char *code, *text, *type;199 };200 173 201 174 struct jabber_buddy *jabber_buddy_add( struct im_connection *ic, char *full_jid ); 202 175 struct jabber_buddy *jabber_buddy_by_jid( struct im_connection *ic, char *jid, get_buddy_flags_t flags ); 203 struct jabber_buddy *jabber_buddy_by_ext_jid( struct im_connection *ic, char *jid, get_buddy_flags_t flags );204 176 int jabber_buddy_remove( struct im_connection *ic, char *full_jid ); 205 177 int jabber_buddy_remove_bare( struct im_connection *ic, char *bare_jid ); 206 struct groupchat *jabber_chat_by_name( struct im_connection *ic, const char *name );207 time_t jabber_get_timestamp( struct xt_node *xt );208 struct jabber_error *jabber_error_parse( struct xt_node *node, char *xmlns );209 void jabber_error_free( struct jabber_error *err );210 178 211 179 extern const struct jabber_away_state jabber_away_state_list[]; … … 225 193 gboolean sasl_supported( struct im_connection *ic ); 226 194 227 /* conference.c */228 struct groupchat *jabber_chat_join( struct im_connection *ic, char *room, char *nick, char *password );229 void jabber_chat_free( struct groupchat *c );230 int jabber_chat_msg( struct groupchat *ic, char *message, int flags );231 int jabber_chat_topic( struct groupchat *c, char *topic );232 int jabber_chat_leave( struct groupchat *c, const char *reason );233 void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bud, struct xt_node *node );234 void jabber_chat_pkt_message( struct im_connection *ic, struct jabber_buddy *bud, struct xt_node *node );235 236 195 #endif
Note: See TracChangeset
for help on using the changeset viewer.