jsonrpc_io.h

00001 
00025 #ifndef _JSONRPC_IO_H_
00026 #define _JSONRPC_IO_H_
00027 
00028 #include "../../route_struct.h"
00029 #include "../../pvar.h"
00030 
00031 #define JSONRPC_SERVER_CONNECTED    1
00032 #define JSONRPC_SERVER_DISCONNECTED 2
00033 #define JSONRPC_SERVER_FAILURE      3
00034 
00035 /* interval (in seconds) at which failed servers are retried */
00036 #define JSONRPC_RECONNECT_INTERVAL  3
00037 
00038 /* time (in ms) after which the error route is called */
00039 #define JSONRPC_TIMEOUT                         500
00040 
00041 struct jsonrpc_pipe_cmd 
00042 {
00043         char *method, *params, *cb_route, *err_route;
00044         unsigned int t_hash, t_label, notify_only;
00045         pv_spec_t *cb_pv;
00046         struct sip_msg *msg;
00047 };
00048 
00049 int jsonrpc_io_child_process(int data_pipe, char* servers);
00050 void free_pipe_cmd(struct jsonrpc_pipe_cmd *cmd); 
00051 
00052 #endif /* _JSONRPC_IO_H_ */