summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-05-16 19:02:50 -0300
committerJoshua Colp <jcolp@digium.com>2015-05-22 09:28:24 -0500
commitf2cc766d817191c79b97668a67a203fe7cf1c588 (patch)
tree5474d9964c7ec1b0ef30af0ab69a6e2514d98267 /include
parent44d82b9479635ed2183e556309fb20a0f305765c (diff)
res_sorcery_memory_cache: Add basic module implementation.
This change adds a basic res_sorcery_memory_cache module which implements configuration option parsing, configuration file parsing for threading, sorcery interface implementation, and unit tests. Objects can be added, updated, deleted, and retrieved from the memory cache. Automatic expiration and stale handling will be added in the future. Note that unit tests exist within the module itself in case the threading done as a result of expiration results in asynchronous actions (which it likely will). Providing access and a notification mechanism for an external test module would be complicated and not worth it. ASTERISK-25067 #close Reported by: Matt Jordan Change-Id: Id8a6a357ef5a83d466f81eee56a67d13eeb118b9
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/sorcery.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asterisk/sorcery.h b/include/asterisk/sorcery.h
index 9d39ce492..d2dc701d8 100644
--- a/include/asterisk/sorcery.h
+++ b/include/asterisk/sorcery.h
@@ -1279,6 +1279,15 @@ struct ast_sorcery_object_type *ast_sorcery_get_object_type(const struct ast_sor
int ast_sorcery_is_object_field_registered(const struct ast_sorcery_object_type *object_type,
const char *field_name);
+/*!
+ * \brief Get the module that has opened the provided sorcery instance.
+ *
+ * \param sorcery The sorcery instance
+ *
+ * \return The module
+ */
+const char *ast_sorcery_get_module(const struct ast_sorcery *sorcery);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif