Module: sip-router Branch: master Commit: 0e986a18dea2c6141669a3ddad0c17055ce97e32 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0e986a18...
Author: pd peter.dunkley@crocodile-rcs.com Committer: pd peter.dunkley@crocodile-rcs.com Date: Wed Oct 19 11:25:36 2011 +0100
modules_k/msilo: added missing file from previous commit
---
modules_k/msilo/api.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/modules_k/msilo/api.h b/modules_k/msilo/api.h new file mode 100644 index 0000000..ac90912 --- /dev/null +++ b/modules_k/msilo/api.h @@ -0,0 +1,39 @@ +/** + * $Id$ + * + */ + +#ifndef _MSILO_API_H_ +#define _MSILO_API_H_ + +//#include "../../sr_module.h" + +typedef int (*msilo_f)(struct sip_msg*, str*); +typedef struct msilo_api { + msilo_f m_store; + msilo_f m_dump; +} msilo_api_t; + +typedef int (*bind_msilo_f)(msilo_api_t* api); + +/** + * @brief Load the MSILO API + */ +static inline int load_msilo_api(msilo_api_t *api) +{ + bind_msilo_f bindmsilo; + + bindmsilo = (bind_msilo_f)find_export("bind_msilo", 1, 0); + if(bindmsilo == 0) { + LM_ERR("cannot find bind_msilo\n"); + return -1; + } + if(bindmsilo(api)<0) + { + LM_ERR("cannot bind msilo api\n"); + return -1; + } + return 0; +} + +#endif