| 1 |
#ifndef __XMPP_SERVERS_H |
| 2 |
#define __XMPP_SERVERS_H |
| 3 |
|
| 4 |
#include "chat-protocols.h" |
| 5 |
#include "servers.h" |
| 6 |
|
| 7 |
#include "loudmouth/loudmouth.h" |
| 8 |
#include "loudmouth-tools.h" |
| 9 |
|
| 10 |
#define XMPP_PROXY_HTTP "http" |
| 11 |
|
| 12 |
|
| 13 |
#define XMPP_SERVER(server) \ |
| 14 |
PROTO_CHECK_CAST(SERVER(server), XMPP_SERVER_REC, chat_type, "XMPP") |
| 15 |
|
| 16 |
#define XMPP_SERVER_CONNECT(conn) \ |
| 17 |
PROTO_CHECK_CAST(SERVER_CONNECT(conn), XMPP_SERVER_CONNECT_REC, \ |
| 18 |
chat_type, "XMPP") |
| 19 |
|
| 20 |
#define IS_XMPP_SERVER(server) \ |
| 21 |
(XMPP_SERVER(server) ? TRUE : FALSE) |
| 22 |
|
| 23 |
#define IS_XMPP_SERVER_CONNECT(conn) \ |
| 24 |
(XMPP_SERVER_CONNECT(conn) ? TRUE : FALSE) |
| 25 |
|
| 26 |
struct _XMPP_SERVER_CONNECT_REC { |
| 27 |
#include "server-connect-rec.h" |
| 28 |
|
| 29 |
GSList *channels_list; |
| 30 |
int show; |
| 31 |
int priority; |
| 32 |
char *real_jid; |
| 33 |
char *prompted_password; |
| 34 |
}; |
| 35 |
|
| 36 |
#define STRUCT_SERVER_CONNECT_REC XMPP_SERVER_CONNECT_REC |
| 37 |
struct _XMPP_SERVER_REC { |
| 38 |
#include "server-rec.h" |
| 39 |
|
| 40 |
char *jid; |
| 41 |
char *user; |
| 42 |
char *domain; |
| 43 |
char *resource; |
| 44 |
|
| 45 |
int show; |
| 46 |
int priority; |
| 47 |
char *ping_id; |
| 48 |
GSList *server_features; |
| 49 |
GSList *my_resources; |
| 50 |
GSList *roster; |
| 51 |
|
| 52 |
int timeout_tag; |
| 53 |
LmConnection *lmconn; |
| 54 |
GSList *msg_handlers; |
| 55 |
}; |
| 56 |
|
| 57 |
__BEGIN_DECLS |
| 58 |
SERVER_REC *xmpp_server_init_connect(SERVER_CONNECT_REC *); |
| 59 |
void xmpp_server_connect(XMPP_SERVER_REC *); |
| 60 |
|
| •61 |
void xmpp_servers_init(void); |
| 62 |
void xmpp_servers_deinit(void); |
| 63 |
char *get_password(char *prompt); |
| 64 |
__END_DECLS |
| 65 |
|
| 66 |
#endif |