mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Stasis Core: Refactor ACL Change events to go out over the stasis core msg bus
(issue ASTERISK-21103) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2481/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -385,6 +385,24 @@ int ast_named_acl_init(void);
|
||||
*/
|
||||
int ast_named_acl_reload(void);
|
||||
|
||||
/*!
|
||||
* \brief accessor for the ACL stasis topic
|
||||
* \since 12
|
||||
*
|
||||
* \retval NULL if the stasis topic hasn't been created or has been disabled
|
||||
* \retval a pointer to the ACL stasis topic
|
||||
*/
|
||||
struct stasis_topic *ast_acl_topic(void);
|
||||
|
||||
/*!
|
||||
* \brief accessor for the named ACL change stasis message type
|
||||
* \since 12
|
||||
*
|
||||
* \retval NULL if the ACL change message type hasn't been created or has been canceled
|
||||
* \retval a pointer to the ACL change message type
|
||||
*/
|
||||
struct stasis_message_type *ast_named_acl_change_type(void);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
@@ -56,12 +56,10 @@ enum ast_event_type {
|
||||
AST_EVENT_NETWORK_CHANGE = 0x09,
|
||||
/*! The presence state for a presence provider */
|
||||
AST_EVENT_PRESENCE_STATE = 0x0a,
|
||||
/*! Used to alert listeners when a named ACL has changed. */
|
||||
AST_EVENT_ACL_CHANGE = 0x0b,
|
||||
/*! Send out a ping for debugging distributed events */
|
||||
AST_EVENT_PING = 0x0c,
|
||||
AST_EVENT_PING = 0x0b,
|
||||
/*! Number of event types. This should be the last event type + 1 */
|
||||
AST_EVENT_TOTAL = 0x0d,
|
||||
AST_EVENT_TOTAL = 0x0c,
|
||||
};
|
||||
|
||||
/*! \brief Event Information Element types */
|
||||
|
@@ -830,6 +830,21 @@ struct ast_json *ast_json_timeval(const struct timeval tv, const char *zone);
|
||||
*/
|
||||
struct ast_json *ast_json_dialplan_cep(const char *context, const char *exten, int priority);
|
||||
|
||||
struct ast_json_payload {
|
||||
struct ast_json *json;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Create an ao2 object to pass json blobs as data payloads for stasis
|
||||
* \since 12.0.0
|
||||
*
|
||||
* \param json the ast_json blob we are loading
|
||||
*
|
||||
* \retval NULL if we fail to alloc it
|
||||
* \retval pointer to the ast_json_payload created
|
||||
*/
|
||||
struct ast_json_payload *ast_json_payload_create(struct ast_json *json);
|
||||
|
||||
/*!@}*/
|
||||
|
||||
#endif /* _ASTERISK_JSON_H */
|
||||
|
Reference in New Issue
Block a user