summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/autoconfig.h.in5
-rw-r--r--include/asterisk/channel.h48
-rw-r--r--include/asterisk/manager.h8
3 files changed, 51 insertions, 10 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index a12f30603..f7294b36e 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -1229,6 +1229,11 @@
/* Define to 1 if running on Darwin. */
#undef _DARWIN_UNLIMITED_SELECT
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index eee0828be..8fef86d2c 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -151,6 +151,7 @@ extern "C" {
#include "asterisk/ccss.h"
#include "asterisk/framehook.h"
#include "asterisk/stasis.h"
+#include "asterisk/json.h"
#define DATASTORE_INHERIT_FOREVER INT_MAX
@@ -4187,24 +4188,51 @@ struct stasis_caching_topic *ast_channel_topic_all_cached(void);
/*!
* \since 12
- * \brief Variable set event.
+ * \brief Blob of data associated with a channel.
+ *
+ * The \c blob is actually a JSON object of structured data. It has a "type" field
+ * which contains the type string describing this blob.
*/
-struct ast_channel_varset {
- /*! Channel variable was set on (or NULL for global variable) */
+struct ast_channel_blob {
+ /*! Channel blob is associated with (or NULL for global/all channels) */
struct ast_channel_snapshot *snapshot;
- /*! Variable name */
- char *variable;
- /*! New value */
- char *value;
+ /*! JSON blob of data */
+ struct ast_json *blob;
};
/*!
* \since 12
- * \brief Message type for \ref ast_channel_varset messages.
+ * \brief Message type for \ref ast_channel_blob messages.
+ *
+ * \retval Message type for \ref ast_channel_blob messages.
+ */
+struct stasis_message_type *ast_channel_blob(void);
+
+/*!
+ * \since 12
+ * \brief Extracts the type field from a \ref ast_channel_blob.
+ * Returned \c char* is still owned by \a obj
+ * \param obj Channel blob object.
+ * \return Type field value from the blob.
+ * \return \c NULL on error.
+ */
+const char *ast_channel_blob_type(struct ast_channel_blob *obj);
+
+/*!
+ * \since 12
+ * \brief Creates a \ref ast_channel_blob message.
+ *
+ * The \a blob JSON object requires a \c "type" field describing the blob. It
+ * should also be treated as immutable and not modified after it is put into the
+ * message.
*
- * \retval Message type for \ref ast_channel_varset messages.
+ * \param chan Channel blob is associated with, or NULL for global/all channels.
+ * \param blob JSON object representing the data.
+ * \return \ref ast_channel_blob message.
+ * \return \c NULL on error
*/
-struct stasis_message_type *ast_channel_varset(void);
+struct stasis_message *ast_channel_blob_create(struct ast_channel *chan,
+ struct ast_json *blob);
/*!
* \since 12
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h
index 2e58a119a..af25edbf9 100644
--- a/include/asterisk/manager.h
+++ b/include/asterisk/manager.h
@@ -316,4 +316,12 @@ int astman_datastore_remove(struct mansession *s, struct ast_datastore *datastor
*/
struct ast_datastore *astman_datastore_find(struct mansession *s, const struct ast_datastore_info *info, const char *uid);
+/*!
+ * \brief Initialize support for AMI channel events.
+ * \return 0 on success.
+ * \return non-zero on error.
+ * \since 12
+ */
+int manager_channels_init(void);
+
#endif /* _ASTERISK_MANAGER_H */