Mercurial > hg
diff 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 |
line wrap: on
line diff
--- a/mcabber/src/jab_priv.h Sun Jan 29 22:57:35 2006 +0100 +++ b/mcabber/src/jab_priv.h Mon Feb 06 19:57:00 2006 +0100 @@ -19,12 +19,32 @@ const char *msg; }; + +#define IQS_DEFAULT_TIMEOUT 40 +#define IQS_MAX_TIMEOUT 600 + +typedef struct { + char *id; + time_t ts_create; + time_t ts_expire; + guint8 type; + gpointer data; + void (*callback)(); + xmlnode xmldata; +} iqs; + + extern enum enum_jstate jstate; extern int s_id; + char *jidtodisp(const char *jid); void handle_packet_iq(jconn conn, char *type, char *from, xmlnode xmldata); void display_server_error(xmlnode x); +iqs *iqs_new(guint8 type, const char *ns, const char *prefix, time_t timeout); +int iqs_del(const char *iqid); +int iqs_callback(const char *iqid, xmlnode xml_anwser); +void iqs_check_timeout(void); #endif /* __JAB_PRIV_H__ */