diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/acl.h | 18 | ||||
-rw-r--r-- | include/asterisk/event_defs.h | 6 | ||||
-rw-r--r-- | include/asterisk/json.h | 15 |
3 files changed, 35 insertions, 4 deletions
diff --git a/include/asterisk/acl.h b/include/asterisk/acl.h index 50510a765..537a30d32 100644 --- a/include/asterisk/acl.h +++ b/include/asterisk/acl.h @@ -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 diff --git a/include/asterisk/event_defs.h b/include/asterisk/event_defs.h index 10c76d0da..83fc98889 100644 --- a/include/asterisk/event_defs.h +++ b/include/asterisk/event_defs.h @@ -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 */ diff --git a/include/asterisk/json.h b/include/asterisk/json.h index d06416f58..7b89d8270 100644 --- a/include/asterisk/json.h +++ b/include/asterisk/json.h @@ -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 */ |