Module: sip-router Branch: master Commit: 15e1eea33c24413abca5ff480fe432307245e0b2 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=15e1eea3...
Author: pd peter.dunkley@crocodile-rcs.com Committer: pd peter.dunkley@crocodile-rcs.com Date: Sat Aug 20 13:01:42 2011 +0100
modules_k/presence_xml: Adding file missed out on previous commit
---
modules_k/presence_xml/api.h | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/modules_k/presence_xml/api.h b/modules_k/presence_xml/api.h new file mode 100644 index 0000000..a80cd63 --- /dev/null +++ b/modules_k/presence_xml/api.h @@ -0,0 +1,28 @@ +#ifndef PXML_API_H +#define PXML_API_H +#include "../../str.h" + +typedef int (*pres_check_basic_t)(struct sip_msg*, str presentity_uri, str status); +typedef int (*pres_check_activities_t)(struct sip_msg*, str presentity_uri, str activity); + +typedef struct presence_xml_binds { + pres_check_basic_t pres_check_basic; + pres_check_activities_t pres_check_activities; +} presence_xml_api_t; + +typedef int (*bind_presence_xml_f)(presence_xml_api_t*); + +int bind_presence_xml(struct presence_xml_binds*); + +inline static int presence_xml_load_api(presence_xml_api_t *pxb) +{ + bind_presence_xml_f bind_presence_xml_exports; + if (!(bind_presence_xml_exports = (bind_presence_xml_f)find_export("bind_presence_xml", 1, 0))) + { + LM_ERR("Failed to import bind_presence_xml\n"); + return -1; + } + return bind_presence_xml_exports(pxb); +} + +#endif /*PXML_API_H*/