diff options
author | Jonathan Rose <jrose@digium.com> | 2015-03-06 21:38:36 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2015-03-06 21:38:36 +0000 |
commit | b85cb7ea1b64471dde7eabafdc440e8baaba7655 (patch) | |
tree | c718f8ec2b1e42890c0c3f72ab3e85eb397b9984 /include | |
parent | c7cc1b3059509e95d17746348f8b390d7b1d988f (diff) |
app: Add functions to swap voicemail function table for testing purposes
........
Merged revisions 432556 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/app.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h index d5a0e27b5..d70d8a6f2 100644 --- a/include/asterisk/app.h +++ b/include/asterisk/app.h @@ -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. */ |