Mercurial > hg
comparison mcabber/libjabber/jabber.h @ 56:1fa1185346be
[/trunk] Changeset 71 by mikael
* Align comments...
author | mikael |
---|---|
date | Wed, 06 Apr 2005 12:34:16 +0000 |
parents | bf3d6e241714 |
children | 17aa60c6dc63 |
comparison
equal
deleted
inserted
replaced
55:39fd2f53f035 | 56:1fa1185346be |
---|---|
36 #include <arpa/inet.h> | 36 #include <arpa/inet.h> |
37 #include <ctype.h> | 37 #include <ctype.h> |
38 #include <time.h> | 38 #include <time.h> |
39 | 39 |
40 #include "libxode.h" | 40 #include "libxode.h" |
41 #include "connwrap.h" | 41 #include "../connwrap/connwrap.h" |
42 | 42 |
43 #ifndef INCL_JABBER_H | 43 #ifndef INCL_JABBER_H |
44 #define INCL_JABBER_H | 44 #define INCL_JABBER_H |
45 | 45 |
46 #ifdef __cplusplus | 46 #ifdef __cplusplus |
265 #define JCONN_STATE_CONNECTING 4 | 265 #define JCONN_STATE_CONNECTING 4 |
266 | 266 |
267 typedef struct jconn_struct | 267 typedef struct jconn_struct |
268 { | 268 { |
269 /* Core structure */ | 269 /* Core structure */ |
270 pool p; /* Memory allocation pool */ | 270 pool p; /* Memory allocation pool */ |
271 int state; /* Connection state flag */ | 271 int state; /* Connection state flag */ |
272 int cw_state; /* Low level connection state flag */ | 272 int cw_state; /* Low level connection state flag */ |
273 int fd; /* Connection file descriptor */ | 273 int fd; /* Connection file descriptor */ |
274 int port; | 274 int port; |
275 int ssl; | 275 int ssl; |
276 jid user; /* User info */ | 276 jid user; /* User info */ |
277 char *pass; /* User passwd */ | 277 char *pass; /* User passwd */ |
278 | 278 |
279 /* Stream stuff */ | 279 /* Stream stuff */ |
280 int id; /* id counter for jab_getid() function */ | 280 int id; /* id counter for jab_getid() function */ |
281 char idbuf[9]; /* temporary storage for jab_getid() */ | 281 char idbuf[9]; /* temporary storage for jab_getid() */ |
282 char *sid; /* stream id from server, for digest auth */ | 282 char *sid; /* stream id from server, for digest auth */ |
283 XML_Parser parser; /* Parser instance */ | 283 XML_Parser parser; /* Parser instance */ |
284 xmlnode current; /* Current node in parsing instance.. */ | 284 xmlnode current; /* Current node in parsing instance.. */ |
285 | 285 |
286 /* Event callback ptrs */ | 286 /* Event callback ptrs */ |
287 void (*on_state)(struct jconn_struct *j, int state); | 287 void (*on_state)(struct jconn_struct *j, int state); |
288 void (*on_packet)(struct jconn_struct *j, jpacket p); | 288 void (*on_packet)(struct jconn_struct *j, jpacket p); |
289 void (*logger)(struct jconn_struct *j, int inout, const char *p); | 289 void (*logger)(struct jconn_struct *j, int inout, const char *p); |