comparison mcabber/src/jab_priv.h @ 683:c5e0d8c3f00c

Introduce new IQ system
author Mikael Berthe <mikael@lilotux.net>
date Mon, 06 Feb 2006 19:57:00 +0100
parents fed6d1e4d7a9
children 98de2d166a11
comparison
equal deleted inserted replaced
682:f3945593432e 683:c5e0d8c3f00c
17 struct T_presence { 17 struct T_presence {
18 enum imstatus st; 18 enum imstatus st;
19 const char *msg; 19 const char *msg;
20 }; 20 };
21 21
22
23 #define IQS_DEFAULT_TIMEOUT 40
24 #define IQS_MAX_TIMEOUT 600
25
26 typedef struct {
27 char *id;
28 time_t ts_create;
29 time_t ts_expire;
30 guint8 type;
31 gpointer data;
32 void (*callback)();
33 xmlnode xmldata;
34 } iqs;
35
36
22 extern enum enum_jstate jstate; 37 extern enum enum_jstate jstate;
23 extern int s_id; 38 extern int s_id;
39
24 40
25 char *jidtodisp(const char *jid); 41 char *jidtodisp(const char *jid);
26 void handle_packet_iq(jconn conn, char *type, char *from, xmlnode xmldata); 42 void handle_packet_iq(jconn conn, char *type, char *from, xmlnode xmldata);
27 void display_server_error(xmlnode x); 43 void display_server_error(xmlnode x);
44 iqs *iqs_new(guint8 type, const char *ns, const char *prefix, time_t timeout);
45 int iqs_del(const char *iqid);
46 int iqs_callback(const char *iqid, xmlnode xml_anwser);
47 void iqs_check_timeout(void);
28 48
29 #endif /* __JAB_PRIV_H__ */ 49 #endif /* __JAB_PRIV_H__ */
30 50
31 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ 51 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */