Mercurial > ~mikael > mcabber > hg
diff mcabber/src/jab_priv.h @ 698:60522cf6d325
Propagate context to IQ callback functions
It will allow to deal with timeouts and errors more easily.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 12 Feb 2006 11:06:26 +0100 |
parents | 3c0a0a993de8 |
children | 603b43e4f56a |
line wrap: on
line diff
--- a/mcabber/src/jab_priv.h Sat Feb 11 16:06:29 2006 +0100 +++ b/mcabber/src/jab_priv.h Sun Feb 12 11:06:26 2006 +0100 @@ -23,6 +23,11 @@ #define IQS_DEFAULT_TIMEOUT 40 #define IQS_MAX_TIMEOUT 600 +#define IQS_CONTEXT_RESULT 0 /* Normal result should be zero */ +#define IQS_CONTEXT_TIMEOUT 1 +#define IQS_CONTEXT_ERROR 2 + + typedef struct { char *id; time_t ts_create; @@ -42,7 +47,7 @@ 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); +int iqs_callback(const char *iqid, xmlnode xml_result, guint iqcontext); void iqs_check_timeout(void); void iqscallback_auth(iqs *iqp, xmlnode xml_result); void request_version(const char *fulljid);