Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00031 #ifndef _MOD_XMPP_H
00032 #define _MOD_XMPP_H
00033
00034 enum xmpp_pipe_cmd_type {
00035 XMPP_PIPE_SEND_PACKET = 1,
00036 XMPP_PIPE_SEND_MESSAGE = 2,
00037 XMPP_PIPE_SEND_PSUBSCRIBE = 4,
00038 XMPP_PIPE_SEND_PNOTIFY = 8
00039 };
00040
00041 struct xmpp_pipe_cmd {
00042 enum xmpp_pipe_cmd_type type;
00043 char *from, *to, *body, *id;
00044 };
00045
00046
00047
00048 extern char domain_separator;
00049 extern char *gateway_domain;
00050 extern char *xmpp_domain;
00051 extern char *xmpp_host;
00052 extern int xmpp_port;
00053 extern char *xmpp_password;
00054
00055
00056 extern int xmpp_send_sip_msg(char *from, char *to, char *msg);
00057 extern void xmpp_free_pipe_cmd(struct xmpp_pipe_cmd *cmd);
00058
00059
00060 char *extract_domain(char *jid);
00061 char *random_secret(void);
00062 char *db_key(char *secret, char *domain, char *id);
00063
00064
00065
00066 int xmpp_server_child_process(int data_pipe);
00067
00068
00069 int xmpp_component_child_process(int data_pipe);
00070
00071
00072 char *shahash(const char *str);
00073
00074 #endif