
Go to the source code of this file.
Data Structures | |
| struct | xmpp_api_ |
| struct | xmpp_callback_ |
| struct | xmpp_cb_list_ |
Defines | |
| #define | xmpp_isset_cb_type(_types_) ((_xmpp_cb_list->types)|(_types_) ) |
| #define | XMPP_RCV_IQ (1<<2) |
| #define | XMPP_RCV_MESSAGE (1<<0) |
| #define | XMPP_RCV_PRESENCE (1<<1) |
Typedefs | |
| typedef int(* | bind_xmpp_t )(xmpp_api_t *api) |
| typedef int(* | register_xmpp_cb_t )(int types, xmpp_cb_f f, void *param) |
| typedef struct xmpp_api_ | xmpp_api_t |
| typedef struct xmpp_callback_ | xmpp_callback_t |
| typedef void( | xmpp_cb_f )(char *msg, int type, void *param) |
| typedef struct xmpp_cb_list_ | xmpp_cb_list_t |
| typedef int(* | xmpp_send_xmessage_f )(str *from, str *to, str *msg, str *id) |
| typedef int(* | xmpp_send_xnotify_f )(str *from, str *to, str *msg, str *id) |
| typedef int(* | xmpp_send_xpacket_f )(str *from, str *to, str *msg, str *id) |
| typedef int(* | xmpp_send_xsubscribe_f )(str *from, str *to, str *msg, str *id) |
| typedef char *(* | xmpp_translate_uri_f )(char *uri) |
Functions | |
| int | bind_xmpp (xmpp_api_t *api) |
| char * | decode_uri_sip_xmpp (char *uri) |
| decode sip:user*domain1@domain2 -> user@domain1 | |
| char * | decode_uri_xmpp_sip (char *jid) |
| decode user*domain1@domain2 -> sip:user@domain1 | |
| void | destroy_xmpp_cb_list (void) |
| char * | encode_uri_sip_xmpp (char *uri) |
| encode sip:user@domain -> user*domain@xmpp_domain | |
| char * | encode_uri_xmpp_sip (char *jid) |
| encode user@domain -> sip:user*domain@gateway_domain | |
| int | init_xmpp_cb_list (void) |
| int | register_xmpp_cb (int types, xmpp_cb_f f, void *param) |
| register a callback function 'f' for 'types' mask of events; | |
| static void | run_xmpp_callbacks (int type, char *msg) |
| run all transaction callbacks for an event type | |
| int | xmpp_send_xmessage (str *from, str *to, str *msg, str *id) |
| int | xmpp_send_xnotify (str *from, str *to, str *msg, str *id) |
| int | xmpp_send_xpacket (str *from, str *to, str *msg, str *id) |
| int | xmpp_send_xsubscribe (str *from, str *to, str *msg, str *id) |
Variables | |
| xmpp_cb_list_t * | _xmpp_cb_list |
Definition in file xmpp_api.h.
| #define xmpp_isset_cb_type | ( | _types_ | ) | ((_xmpp_cb_list->types)|(_types_) ) |
Definition at line 61 of file xmpp_api.h.
| #define XMPP_RCV_IQ (1<<2) |
| #define XMPP_RCV_MESSAGE (1<<0) |
Definition at line 35 of file xmpp_api.h.
| #define XMPP_RCV_PRESENCE (1<<1) |
| typedef int(* bind_xmpp_t)(xmpp_api_t *api) |
Definition at line 117 of file xmpp_api.h.
| typedef int(* register_xmpp_cb_t)(int types, xmpp_cb_f f, void *param) |
Definition at line 40 of file xmpp_api.h.
| typedef struct xmpp_api_ xmpp_api_t |
| typedef struct xmpp_callback_ xmpp_callback_t |
Definition at line 39 of file xmpp_api.h.
| typedef struct xmpp_cb_list_ xmpp_cb_list_t |
Definition at line 89 of file xmpp_api.h.
Definition at line 95 of file xmpp_api.h.
Definition at line 86 of file xmpp_api.h.
Definition at line 92 of file xmpp_api.h.
| typedef char*(* xmpp_translate_uri_f)(char *uri) |
Definition at line 98 of file xmpp_api.h.
| int bind_xmpp | ( | xmpp_api_t * | api | ) |
Definition at line 113 of file xmpp_api.c.
References decode_uri_sip_xmpp(), xmpp_api_::decode_uri_sip_xmpp, decode_uri_xmpp_sip(), xmpp_api_::decode_uri_xmpp_sip, encode_uri_sip_xmpp(), xmpp_api_::encode_uri_sip_xmpp, encode_uri_xmpp_sip(), xmpp_api_::encode_uri_xmpp_sip, LM_ERR, NULL, xmpp_api_::register_callback, register_xmpp_cb(), xmpp_api_::xmessage, xmpp_send_xmessage(), xmpp_send_xnotify(), xmpp_send_xpacket(), xmpp_send_xsubscribe(), xmpp_api_::xnotify, xmpp_api_::xpacket, and xmpp_api_::xsubscribe.
Referenced by mod_init().
| char* decode_uri_sip_xmpp | ( | char * | uri | ) |
decode sip:user*domain1@domain2 -> user@domain1
Definition at line 42 of file util.c.
References buf, domain_separator, _str::len, LM_ERR, NULL, parse_uri(), _str::s, and sip_uri::user.
Referenced by bind_xmpp(), do_send_message_component(), and do_send_message_server().
| char* decode_uri_xmpp_sip | ( | char * | jid | ) |
decode user*domain1@domain2 -> sip:user@domain1
Definition at line 85 of file util.c.
References buf, domain_separator, NULL, and snprintf.
Referenced by bind_xmpp(), in_stream_node_callback(), and stream_node_callback().
| void destroy_xmpp_cb_list | ( | void | ) |
Definition at line 56 of file xmpp_api.c.
References xmpp_cb_list_::first, xmpp_callback_::next, and shm_free.
| char* encode_uri_sip_xmpp | ( | char * | uri | ) |
encode sip:user@domain -> user*domain@xmpp_domain
Definition at line 65 of file util.c.
References buf, domain_separator, sip_uri::host, _str::len, LM_ERR, NULL, parse_uri(), _str::s, snprintf, sip_uri::user, and xmpp_domain.
Referenced by bind_xmpp(), do_send_message_component(), and do_send_message_server().
| char* encode_uri_xmpp_sip | ( | char * | jid | ) |
encode user@domain -> sip:user*domain@gateway_domain
Definition at line 108 of file util.c.
References buf, domain_separator, gateway_domain, NULL, and snprintf.
Referenced by bind_xmpp(), in_stream_node_callback(), and stream_node_callback().
| int init_xmpp_cb_list | ( | void | ) |
Definition at line 44 of file xmpp_api.c.
References LM_CRIT, and shm_malloc().
Referenced by mod_init().
| int register_xmpp_cb | ( | int | types, | |
| xmpp_cb_f | f, | |||
| void * | param | |||
| ) |
register a callback function 'f' for 'types' mask of events;
Definition at line 77 of file xmpp_api.c.
References xmpp_callback_::cbf, xmpp_callback_::cbp, E_BUG, E_OUT_OF_MEM, xmpp_cb_list_::first, LM_CRIT, LM_ERR, xmpp_callback_::next, shm_malloc(), xmpp_callback_::types, and xmpp_cb_list_::types.
Referenced by bind_xmpp().
| static void run_xmpp_callbacks | ( | int | type, | |
| char * | msg | |||
| ) | [inline, static] |
run all transaction callbacks for an event type
Definition at line 73 of file xmpp_api.h.
References xmpp_callback_::cbf, xmpp_callback_::cbp, xmpp_cb_list_::first, LM_DBG, xmpp_callback_::next, and xmpp_callback_::types.
Referenced by stream_node_callback().
Definition at line 419 of file xmpp.c.
References NULL, XMPP_PIPE_SEND_MESSAGE, and xmpp_send_pipe_cmd().
Referenced by bind_xmpp().
Definition at line 439 of file xmpp.c.
References NULL, XMPP_PIPE_SEND_PNOTIFY, and xmpp_send_pipe_cmd().
Referenced by bind_xmpp().
Definition at line 409 of file xmpp.c.
References NULL, XMPP_PIPE_SEND_PACKET, and xmpp_send_pipe_cmd().
Referenced by bind_xmpp().
Definition at line 429 of file xmpp.c.
References NULL, XMPP_PIPE_SEND_PSUBSCRIBE, and xmpp_send_pipe_cmd().
Referenced by bind_xmpp().
Definition at line 41 of file xmpp_api.c.
1.5.6