Module: sip-router
Branch: master
Commit: 8f00ae7a9b4e2d19bc49f62b0ab3507c283f74f4
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8f00ae7…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Oct 19 11:56:15 2011 +0100
modules/textopsx, modules_k/alias_db, modules_k/pua_usrloc: added missing api.h files from
previous commits
---
modules/textopsx/api.h | 48 ++++++++++++++++++++++++++++++++++++++++++++
modules_k/alias_db/api.h | 26 +++++++++++++++++++++++
modules_k/pua_usrloc/api.h | 26 +++++++++++++++++++++++
3 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/modules/textopsx/api.h b/modules/textopsx/api.h
new file mode 100644
index 0000000..d88abfa
--- /dev/null
+++ b/modules/textopsx/api.h
@@ -0,0 +1,48 @@
+/*
+ * This file is part of kamailio, a free SIP server.
+ *
+ * kamailio is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef TEXTOPSX_API_H_
+#define TEXTOPSX_API_H_
+#include "../../str.h"
+#include "../../sr_module.h"
+
+
+/*
+ * Struct with the textopsx api.
+ */
+typedef struct textopsx_binds {
+ cmd_function msg_apply_changes;
+} textopsx_api_t;
+
+typedef int (*bind_textopsx_f)(textopsx_api_t*);
+
+/*
+ * Function to be called direclty from other modules to load
+ * the textops API.
+ */
+inline static int load_textopsx_api(textopsx_api_t *tob){
+ bind_textopsx_f bind_textopsx_exports;
+ if(!(bind_textopsx_exports=(bind_textopsx_f)find_export("bind_textopsx", 1,
0))){
+ LM_ERR("Failed to import bind_textopsx\n");
+ return -1;
+ }
+ return bind_textopsx_exports(tob);
+}
+
+#endif /*TEXTX_OPS_API_H_*/
diff --git a/modules_k/alias_db/api.h b/modules_k/alias_db/api.h
new file mode 100644
index 0000000..b5c81b6
--- /dev/null
+++ b/modules_k/alias_db/api.h
@@ -0,0 +1,26 @@
+#ifndef ALIASDB_API_H
+#define ALIASDB_API_H
+#include "../../str.h"
+
+typedef int (*alias_db_lookup_t)(struct sip_msg*, str table);
+
+typedef struct alias_db_binds {
+ alias_db_lookup_t alias_db_lookup;
+} alias_db_api_t;
+
+typedef int (*bind_alias_db_f)(alias_db_api_t*);
+
+int bind_alias_db(struct alias_db_binds*);
+
+inline static int alias_db_load_api(alias_db_api_t *pxb)
+{
+ bind_alias_db_f bind_alias_db_exports;
+ if (!(bind_alias_db_exports = (bind_alias_db_f)find_export("bind_alias_db", 1,
0)))
+ {
+ LM_ERR("Failed to import bind_alias_db\n");
+ return -1;
+ }
+ return bind_alias_db_exports(pxb);
+}
+
+#endif /*ALIASDB_API_H*/
diff --git a/modules_k/pua_usrloc/api.h b/modules_k/pua_usrloc/api.h
new file mode 100644
index 0000000..b341d55
--- /dev/null
+++ b/modules_k/pua_usrloc/api.h
@@ -0,0 +1,26 @@
+#ifndef PUAUSRLOC_API_H
+#define PUAUSRLOC_API_H
+#include "../../str.h"
+
+typedef int (*pua_set_publish_t)(struct sip_msg*, char *, char *);
+
+typedef struct pua_usrloc_binds {
+ pua_set_publish_t pua_set_publish;
+} pua_usrloc_api_t;
+
+typedef int (*bind_pua_usrloc_f)(pua_usrloc_api_t*);
+
+int bind_pua_usrloc(struct pua_usrloc_binds*);
+
+inline static int pua_usrloc_load_api(pua_usrloc_api_t *pxb)
+{
+ bind_pua_usrloc_f bind_pua_usrloc_exports;
+ if (!(bind_pua_usrloc_exports =
(bind_pua_usrloc_f)find_export("bind_pua_usrloc", 1, 0)))
+ {
+ LM_ERR("Failed to import bind_pua_usrloc\n");
+ return -1;
+ }
+ return bind_pua_usrloc_exports(pxb);
+}
+
+#endif /*PUAUSRLOC_API_H*/