|
@@ -58,6 +58,7 @@
|
|
|
|
|
|
#include "tps_storage.h"
|
|
#include "tps_storage.h"
|
|
#include "tps_msg.h"
|
|
#include "tps_msg.h"
|
|
|
|
+#include "api.h"
|
|
|
|
|
|
MODULE_VERSION
|
|
MODULE_VERSION
|
|
|
|
|
|
@@ -92,6 +93,15 @@ static int child_init(int rank);
|
|
/* Module destroy function prototype */
|
|
/* Module destroy function prototype */
|
|
static void destroy(void);
|
|
static void destroy(void);
|
|
|
|
|
|
|
|
+int bind_topos(topos_api_t *api);
|
|
|
|
+
|
|
|
|
+static cmd_export_t cmds[]={
|
|
|
|
+ {"bind_topos", (cmd_function)bind_topos, 0,
|
|
|
|
+ 0, 0, 0},
|
|
|
|
+
|
|
|
|
+ {0, 0, 0, 0, 0, 0}
|
|
|
|
+};
|
|
|
|
+
|
|
static param_export_t params[]={
|
|
static param_export_t params[]={
|
|
{"db_url", PARAM_STR, &_tps_db_url},
|
|
{"db_url", PARAM_STR, &_tps_db_url},
|
|
{"mask_callid", PARAM_INT, &_tps_param_mask_callid},
|
|
{"mask_callid", PARAM_INT, &_tps_param_mask_callid},
|
|
@@ -107,7 +117,7 @@ static param_export_t params[]={
|
|
struct module_exports exports= {
|
|
struct module_exports exports= {
|
|
"topos",
|
|
"topos",
|
|
DEFAULT_DLFLAGS, /* dlopen flags */
|
|
DEFAULT_DLFLAGS, /* dlopen flags */
|
|
- 0,
|
|
|
|
|
|
+ cmds,
|
|
params,
|
|
params,
|
|
0, /* exported statistics */
|
|
0, /* exported statistics */
|
|
0, /* exported MI functions */
|
|
0, /* exported MI functions */
|
|
@@ -356,3 +366,17 @@ done:
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+int bind_topos(topos_api_t *api)
|
|
|
|
+{
|
|
|
|
+ if (!api) {
|
|
|
|
+ ERR("Invalid parameter value\n");
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+ memset(api, 0, sizeof(topos_api_t));
|
|
|
|
+ api->set_storage_api = tps_set_storage_api;
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|