diff options
author | Joshua Colp <jcolp@digium.com> | 2006-11-06 17:05:04 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2006-11-06 17:05:04 +0000 |
commit | 980ce017ec0919bbae1373dfe36c0c9799c825be (patch) | |
tree | f61cd111a6a675726f8487828ff37160b7fdf4cf /include/asterisk | |
parent | 908b6ed6bc6d51f079373f6c557d565d99b8397f (diff) |
Add support for manager hooks, so you could fire off manager events over IRC if you were crazy enough. (issue #5161 reported by anthm with mods by moi)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/manager.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h index 6a44ab912..c7b489691 100644 --- a/include/asterisk/manager.h +++ b/include/asterisk/manager.h @@ -60,6 +60,28 @@ #define AST_MAX_MANHEADERS 80 #define AST_MAX_MANHEADER_LEN 256 +/* Manager Helper Function */ +typedef int (*manager_hook_t)(int, const char *, char *); + +struct manager_custom_hook { + /*! Identifier */ + char *file; + /*! helper function */ + manager_hook_t helper; + /*! Linked list information */ + AST_RWLIST_ENTRY(manager_custom_hook) list; +}; + +/*! Add a custom hook to be called when an event is fired */ +/*! \param hook struct manager_custom_hook object to add +*/ +void ast_manager_register_hook(struct manager_custom_hook *hook); + +/*! Delete a custom hook to be called when an event is fired */ +/*! \param hook struct manager_custom_hook object to delete +*/ +void ast_manager_unregister_hook(struct manager_custom_hook *hook); + struct mansession; struct message { |