evapi_dispatch.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * Copyright (C) 2014 Daniel-Constantin Mierla (asipto.com)
  3. *
  4. * This file is part of Kamailio, a free SIP server.
  5. *
  6. * This file is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version
  10. *
  11. *
  12. * This file is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. *
  21. */
  22. #ifndef _EVAPI_DISPATCH_
  23. #define _EVAPI_DISPATCH_
  24. #include "../../pvar.h"
  25. int evapi_init_notify_sockets(void);
  26. void evapi_close_notify_sockets_child(void);
  27. void evapi_close_notify_sockets_parent(void);
  28. int evapi_run_dispatcher(char *laddr, int lport);
  29. int evapi_run_worker(int prank);
  30. int evapi_relay(str *evdata);
  31. void evapi_init_environment(int dformat);
  32. int pv_parse_evapi_name(pv_spec_t *sp, str *in);
  33. int pv_get_evapi(sip_msg_t *msg, pv_param_t *param, pv_value_t *res);
  34. int pv_set_evapi(sip_msg_t *msg, pv_param_t *param, int op,
  35. pv_value_t *val);
  36. /* set evapi env to shortcut of hdr date - not used in faked msg */
  37. #define evapi_set_msg_env(_msg, _evenv) do { _msg->date=(hdr_field_t*)_evenv; } while(0)
  38. #define evapi_get_msg_env(_msg) ((evapi_env_t*)_msg->date)
  39. int evapi_cfg_close(sip_msg_t *msg);
  40. #endif