notification_peer.h

00001 #include "../../parser/msg_parser.h"
00002 #include "../../parser/parse_content.h"
00003 #include "../../ut.h"
00004 #include "dmq.h"
00005 #include "dmqnode.h"
00006 #include "peer.h"
00007 #include "dmq_funcs.h"
00008 
00009 int add_notification_peer();
00010 int dmq_notification_callback(struct sip_msg* msg, peer_reponse_t* resp);
00011 int extract_node_list(dmq_node_list_t* update_list, struct sip_msg* msg);
00012 str* build_notification_body();
00013 int build_node_str(dmq_node_t* node, char* buf, int buflen);
00014 /* request a nodelist from a server
00015  * this is acomplished by a KDMQ request
00016  * KDMQ notification@server:port
00017  * node - the node to send to
00018  * forward - flag that tells if the node receiving the message is allowed to 
00019  *           forward the request to its own list
00020  */
00021 int request_nodelist(dmq_node_t* node, int forward);
00022 dmq_node_t* add_server_and_notify(str* server_address);
00023 
00024 /* helper functions */
00025 extern int notification_resp_callback_f(struct sip_msg* msg, int code, dmq_node_t* node, void* param);
00026 extern dmq_resp_cback_t notification_callback;
00027