소스 검색

modules_k/presence_xml: Adding file missed out on previous commit

pd 14 년 전
부모
커밋
15e1eea33c
1개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  1. 28 0
      modules_k/presence_xml/api.h

+ 28 - 0
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*/