Refactor CEL to avoid using the event system core

This removes usage of the event system for CEL backend data
distribution and strips unused pieces out of the event system.

Review: https://reviewboard.asterisk.org/r/2732/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2013-08-17 14:46:44 +00:00
parent 59753b1ea1
commit d7f1f31270
16 changed files with 192 additions and 1578 deletions

View File

@@ -300,6 +300,35 @@ struct ast_event *ast_cel_create_event(struct ast_channel_snapshot *snapshot,
enum ast_cel_event_type event_type, const char *userdefevname,
struct ast_json *extra, const char *peer_name);
/*!
* \brief CEL backend callback
*/
/*typedef int (*ast_cel_backend_cb)(struct ast_cel_event_record *cel);*/
typedef void (*ast_cel_backend_cb)(struct ast_event *event);
/*!
* \brief Register a CEL backend
*
* \param name Name of backend to register
* \param backend_callback Callback to register
*
* \retval zero on success
* \retval non-zero on failure
* \since 12
*/
int ast_cel_backend_register(const char *name, ast_cel_backend_cb backend_callback);
/*!
* \brief Unregister a CEL backend
*
* \param name Name of backend to unregister
*
* \retval zero on success
* \retval non-zero on failure
* \since 12
*/
int ast_cel_backend_unregister(const char *name);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif