Mercurial > hg
annotate mcabber/src/jab_priv.h @ 685:f033345d1315
Call IQ callback function when receiving a RESULT packet
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 06 Feb 2006 20:04:58 +0100 |
parents | c5e0d8c3f00c |
children | 98de2d166a11 |
rev | line source |
---|---|
577
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
1 #ifndef __JAB_PRIV_H__ |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
2 #define __JAB_PRIV_H__ 1 |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
3 |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
4 /* This header file declares functions used by jab*.c only. */ |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
5 |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
6 #include "jabglue.h" |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
7 |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
8 #define JABBER_AGENT_GROUP "Jabber Agents" |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
9 |
578 | 10 enum enum_jstate { |
577
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
11 STATE_CONNECTING, |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
12 STATE_GETAUTH, |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
13 STATE_SENDAUTH, |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
14 STATE_LOGGED |
578 | 15 }; |
577
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
16 |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
17 struct T_presence { |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
18 enum imstatus st; |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
19 const char *msg; |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
20 }; |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
21 |
683 | 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 | |
578 | 37 extern enum enum_jstate jstate; |
577
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
38 extern int s_id; |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
39 |
683 | 40 |
577
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
41 char *jidtodisp(const char *jid); |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
42 void handle_packet_iq(jconn conn, char *type, char *from, xmlnode xmldata); |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
43 void display_server_error(xmlnode x); |
683 | 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); | |
577
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
48 |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
49 #endif /* __JAB_PRIV_H__ */ |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
50 |
580 | 51 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |