summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2013-04-30 22:37:24 +0000
committerJonathan Rose <jrose@digium.com>2013-04-30 22:37:24 +0000
commit8e257fe8196544ff962f1032a73134ad7c8cc4b4 (patch)
tree7683b460e67a9e1e50f5ada8991f2216ae6c8aa6 /include/asterisk
parent6f5733388a93d01124c62233184691b53e886b3b (diff)
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
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/acl.h18
-rw-r--r--include/asterisk/event_defs.h6
-rw-r--r--include/asterisk/json.h15
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 */