diff options
author | Kinsey Moore <kmoore@digium.com> | 2013-03-08 16:00:14 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2013-03-08 16:00:14 +0000 |
commit | c6b06e40dc859125cf76bec4632bd76de42256bd (patch) | |
tree | f99d321c8621ce9285389c058d70dfb71ffe3809 /include | |
parent | 4edd8be35cdef3b212355c48b68319f2304bc9f2 (diff) |
Add message dump capability to stasis cache layer
The cache dump mechanism allows the developer to retreive multiple
items of a given type (or of all types) from the cache residing in a
stasis caching topic in addition to the existing single-item cache
retreival mechanism. This also adds to the caching unit tests to
ensure that the new cache dump mechanism is functioning properly.
Review: https://reviewboard.asterisk.org/r/2367/
(issue ASTERISK-21097)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/stasis.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/stasis.h b/include/asterisk/stasis.h index a6ab4212f..e6d2409cf 100644 --- a/include/asterisk/stasis.h +++ b/include/asterisk/stasis.h @@ -480,6 +480,17 @@ struct stasis_message *stasis_cache_get(struct stasis_caching_topic *caching_top struct stasis_message_type *type, const char *id); +/*! + * \brief Dump cached items to a subscription + * \param caching_topic The topic returned from stasis_caching_topic_create(). + * \param type Type of message to dump (any type if NULL). + * \return ao2_container containing all matches (must be unreffed by caller) + * \return NULL on allocation error + * \since 12 + */ +struct ao2_container *stasis_cache_dump(struct stasis_caching_topic *caching_topic, + struct stasis_message_type *type); + /*! @} */ /*! @{ */ |