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
This commit is contained in:
Joshua Colp
2006-11-06 17:05:04 +00:00
parent 908b6ed6bc
commit 980ce017ec
3 changed files with 61 additions and 1 deletions

View File

@@ -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 {