diff options
author | Kinsey Moore <kmoore@digium.com> | 2013-05-31 12:27:29 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2013-05-31 12:27:29 +0000 |
commit | e1bff7958adbf7780a70fd6e687e344edf11fdcc (patch) | |
tree | 9a1057fb57bbe487e66818521e8068ffd33feb8a /include | |
parent | 12548000dc1f754e29e91b44243204465dd35e72 (diff) |
Add snapshot cache that indexes by channel name
This adds a new channel snapshot cache in parallel to the existing
cache; the difference being that it indexes the channel snapshots by
channel name instead of channel uniqueid.
Review: https://reviewboard.asterisk.org/r/2576
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/stasis_channels.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/asterisk/stasis_channels.h b/include/asterisk/stasis_channels.h index e521e05eb..64224c04f 100644 --- a/include/asterisk/stasis_channels.h +++ b/include/asterisk/stasis_channels.h @@ -104,6 +104,15 @@ struct stasis_caching_topic *ast_channel_topic_all_cached(void); /*! * \since 12 + * \brief A caching topic which caches \ref ast_channel_snapshot messages from + * ast_channel_events_all(void) and indexes them by name. + * + * \retval Topic for all channel events. + */ +struct stasis_caching_topic *ast_channel_topic_all_cached_by_name(void); + +/*! + * \since 12 * \brief Message type for \ref ast_channel_snapshot. * * \retval Message type for \ref ast_channel_snapshot. @@ -137,6 +146,18 @@ struct ast_channel_snapshot *ast_channel_snapshot_get_latest(const char *uniquei /*! * \since 12 + * \brief Obtain the latest \ref ast_channel_snapshot from the \ref stasis cache. This is + * an ao2 object, so use \ref ao2_cleanup() to deallocate. + * + * \param name The channel's name + * + * \retval A \ref ast_channel_snapshot on success + * \retval NULL on error + */ +struct ast_channel_snapshot *ast_channel_snapshot_get_latest_by_name(const char *name); + +/*! + * \since 12 * \brief Creates a \ref ast_channel_blob message. * * The given \a blob should be treated as immutable and not modified after it is |