author | Mikael Berthe <mikael@lilotux.net> |
Thu, 09 Feb 2006 23:20:28 +0100 | |
changeset 690 | 3e965a1186c7 |
parent 686 | 98de2d166a11 |
child 691 | 3c0a0a993de8 |
permissions | -rw-r--r-- |
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 |
|
683 | 39 |
|
577
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
40 |
char *jidtodisp(const char *jid); |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
41 |
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
|
42 |
void display_server_error(xmlnode x); |
683 | 43 |
iqs *iqs_new(guint8 type, const char *ns, const char *prefix, time_t timeout); |
44 |
int iqs_del(const char *iqid); |
|
45 |
int iqs_callback(const char *iqid, xmlnode xml_anwser); |
|
46 |
void iqs_check_timeout(void); |
|
686
98de2d166a11
Use the new IQ system for authentication
Mikael Berthe <mikael@lilotux.net>
parents:
683
diff
changeset
|
47 |
void iqscallback_auth(iqs *iqp, xmlnode xml_result); |
690
3e965a1186c7
Implement IQ:version requests
Mikael Berthe <mikael@lilotux.net>
parents:
686
diff
changeset
|
48 |
void request_version(const char *fulljid); |
577
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
49 |
|
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
50 |
#endif /* __JAB_PRIV_H__ */ |
5c6d364130ee
Move IQ Jabber stuff to a separate file
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
51 |
|
580 | 52 |
/* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |