Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/jab_priv.h @ 745:413e95f3051a
Introduce user "events" list
Not used yet.
The events list (evs_list) will be used to queue events for user approval,
for example subscription requests, file tranfers, etc.
The evs stuff is actually almost the same as the iqs stuff, a lot of code
is duplicated... :-\
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 13 Mar 2006 17:28:24 +0100 |
parents | 603b43e4f56a |
children | 109dcf5fc111 |
comparison
equal
deleted
inserted
replaced
744:c3b76a1a07cb | 745:413e95f3051a |
---|---|
2 #define __JAB_PRIV_H__ 1 | 2 #define __JAB_PRIV_H__ 1 |
3 | 3 |
4 /* This header file declares functions used by jab*.c only. */ | 4 /* This header file declares functions used by jab*.c only. */ |
5 | 5 |
6 #include "jabglue.h" | 6 #include "jabglue.h" |
7 #include "events.h" | |
7 | 8 |
8 #define JABBER_AGENT_GROUP "Jabber Agents" | 9 #define JABBER_AGENT_GROUP "Jabber Agents" |
9 | 10 |
10 enum enum_jstate { | 11 enum enum_jstate { |
11 STATE_CONNECTING, | 12 STATE_CONNECTING, |
25 | 26 |
26 #define IQS_CONTEXT_RESULT 0 /* Normal result should be zero */ | 27 #define IQS_CONTEXT_RESULT 0 /* Normal result should be zero */ |
27 #define IQS_CONTEXT_TIMEOUT 1 | 28 #define IQS_CONTEXT_TIMEOUT 1 |
28 #define IQS_CONTEXT_ERROR 2 | 29 #define IQS_CONTEXT_ERROR 2 |
29 | 30 |
30 | |
31 typedef struct { | |
32 char *id; | |
33 time_t ts_create; | |
34 time_t ts_expire; | |
35 guint8 type; | |
36 gpointer data; | |
37 void (*callback)(); | |
38 xmlnode xmldata; | |
39 } iqs; | |
40 | |
41 | |
42 extern enum enum_jstate jstate; | 31 extern enum enum_jstate jstate; |
43 | 32 |
44 | 33 |
45 char *jidtodisp(const char *jid); | 34 char *jidtodisp(const char *jid); |
46 void handle_packet_iq(jconn conn, char *type, char *from, xmlnode xmldata); | 35 void handle_packet_iq(jconn conn, char *type, char *from, xmlnode xmldata); |
47 void display_server_error(xmlnode x); | 36 void display_server_error(xmlnode x); |
48 iqs *iqs_new(guint8 type, const char *ns, const char *prefix, time_t timeout); | 37 eviqs *iqs_new(guint8 type, const char *ns, const char *prefix, time_t timeout); |
49 int iqs_del(const char *iqid); | 38 int iqs_del(const char *iqid); |
50 int iqs_callback(const char *iqid, xmlnode xml_result, guint iqcontext); | 39 int iqs_callback(const char *iqid, xmlnode xml_result, guint iqcontext); |
51 void iqs_check_timeout(time_t now_t); | 40 void iqs_check_timeout(time_t now_t); |
52 void iqscallback_auth(iqs *iqp, xmlnode xml_result); | 41 void iqscallback_auth(eviqs *iqp, xmlnode xml_result); |
53 void request_version(const char *fulljid); | 42 void request_version(const char *fulljid); |
54 void request_time(const char *fulljid); | 43 void request_time(const char *fulljid); |
55 | 44 |
56 #endif /* __JAB_PRIV_H__ */ | 45 #endif /* __JAB_PRIV_H__ */ |
57 | 46 |