mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-23 04:58:48 +00:00
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
This commit is contained in:
@@ -102,6 +102,15 @@ struct stasis_topic *ast_channel_topic_all(void);
|
||||
*/
|
||||
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.
|
||||
@@ -135,6 +144,18 @@ struct ast_channel_snapshot *ast_channel_snapshot_create(
|
||||
*/
|
||||
struct ast_channel_snapshot *ast_channel_snapshot_get_latest(const char *uniqueid);
|
||||
|
||||
/*!
|
||||
* \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.
|
||||
|
Reference in New Issue
Block a user