mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 15:29:05 +00:00
Merge "media_index.c: Refactored so it doesn't cache the index" into 13
This commit is contained in:
@@ -101,6 +101,26 @@ struct ao2_container *ast_media_get_media(struct ast_media_index *index);
|
||||
*/
|
||||
int ast_media_index_update(struct ast_media_index *index,
|
||||
const char *variant);
|
||||
|
||||
/*!
|
||||
* \brief Update a media index for a specific sound file
|
||||
*
|
||||
* \since 13.25.0
|
||||
* \since 16.2.0
|
||||
*
|
||||
* \param index Media index in which to query information
|
||||
* \param variant Media variant for which to get the description
|
||||
* \param filename Sound file name without extension
|
||||
*
|
||||
* \note If filename is NULL, this function will act as
|
||||
* \ref ast_media_index_update and add all sound files to the index.
|
||||
*
|
||||
* \retval non-zero on error
|
||||
* \return zero on success
|
||||
*/
|
||||
int ast_media_index_update_for_file(struct ast_media_index *index,
|
||||
const char *variant, const char *filename);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -34,9 +34,11 @@ struct ast_media_index;
|
||||
|
||||
/*!
|
||||
* \brief Reload the sounds index
|
||||
* \deprecated
|
||||
*
|
||||
* \retval zero on success
|
||||
* \retval non-zero on failure
|
||||
* This function is a NoOp and will be removed in a future release.
|
||||
*
|
||||
* \retval zero
|
||||
*/
|
||||
int ast_sounds_reindex(void);
|
||||
|
||||
@@ -48,6 +50,19 @@ int ast_sounds_reindex(void);
|
||||
*/
|
||||
struct ast_media_index *ast_sounds_get_index(void);
|
||||
|
||||
/*!
|
||||
* \brief Get the index for a specific sound file
|
||||
* \since 13.25.0
|
||||
* \since 16.2.0
|
||||
*
|
||||
* \param filename Sound file name without extension
|
||||
*
|
||||
* \retval sounds index (must be ao2_cleanup()'ed)
|
||||
* \retval NULL on failure
|
||||
*/
|
||||
struct ast_media_index *ast_sounds_get_index_for_file(const char *filename);
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user