浏览代码

topos: api functions to get dialog and branch expire values

Daniel-Constantin Mierla 8 年之前
父节点
当前提交
83a8c97798
共有 2 个文件被更改,包括 22 次插入0 次删除
  1. 4 0
      src/modules/topos/api.h
  2. 18 0
      src/modules/topos/topos_mod.c

+ 4 - 0
src/modules/topos/api.h

@@ -56,12 +56,16 @@ typedef struct tps_storage_api {
 typedef int (*tps_set_storage_api_f)(tps_storage_api_t *tsa);
 int tps_set_storage_api(tps_storage_api_t *tsa);
 
+typedef int (*tps_get_dialog_expire_f)(void);
+typedef int (*tps_get_branch_expire_f)(void);
 
 /**
  * @brief TOPOS API structure
  */
 typedef struct topos_api {
 	tps_set_storage_api_f set_storage_api;
+	tps_get_dialog_expire_f get_dialog_expire;
+	tps_get_branch_expire_f get_branch_expire;
 } topos_api_t;
 
 typedef int (*bind_topos_f)(topos_api_t* api);

+ 18 - 0
src/modules/topos/topos_mod.c

@@ -380,6 +380,22 @@ done:
 	return 0;
 }
 
+/**
+ *
+ */
+int tps_get_dialog_expire(void)
+{
+	return _tps_dialog_expire;
+}
+
+/**
+ *
+ */
+int tps_get_branch_expire(void)
+{
+	return _tps_branch_expire;
+}
+
 /**
  *
  */
@@ -391,6 +407,8 @@ int bind_topos(topos_api_t *api)
 	}
 	memset(api, 0, sizeof(topos_api_t));
 	api->set_storage_api = tps_set_storage_api;
+	api->get_dialog_expire = tps_get_dialog_expire;
+	api->get_branch_expire = tps_get_branch_expire;
 
 	return 0;
 }