mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-08 06:12:45 +00:00
app: Add functions to swap voicemail function table for testing purposes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -595,6 +595,22 @@ int __ast_vm_register(const struct ast_vm_functions *vm_table, struct ast_module
|
||||
*/
|
||||
void ast_vm_unregister(const char *module_name);
|
||||
|
||||
#ifdef TEST_FRAMEWORK
|
||||
/*!
|
||||
* \brief Swap out existing voicemail functions with a temporary set of functions for use with unit tests
|
||||
*
|
||||
* \param vm_table function table to use for testing
|
||||
*
|
||||
* \note ast_vm_test_swap_table_out should be called to restore the original set before testing concludes
|
||||
*/
|
||||
void ast_vm_test_swap_table_in(const struct ast_vm_functions *vm_table);
|
||||
|
||||
/*!
|
||||
* \brief Used after ast_vm_test_swap_table_in to restore the original set of voicemail functions
|
||||
*/
|
||||
void ast_vm_test_swap_table_out(void);
|
||||
#endif
|
||||
|
||||
#define VM_GREETER_MODULE_VERSION 1
|
||||
|
||||
/*! \brief Voicemail greeter function table definition. */
|
||||
|
Reference in New Issue
Block a user