summaryrefslogtreecommitdiff
path: root/res/ari/ari_model_validators.h
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2014-01-14 23:44:57 +0000
committerJonathan Rose <jrose@digium.com>2014-01-14 23:44:57 +0000
commitaa9db707c56fa673560e25663f581954a66f3974 (patch)
treea539c9a84ad0679612606f15728bd5049ff2e441 /res/ari/ari_model_validators.h
parented0d083596bd22bf772433ac949f243dfc5fb28c (diff)
ARI: Add mailboxes resource for controlling and polling external MWI
Adds the following AMI commands: PUT mailboxes/mailboxName modifies mailbox state and implicitly creates new mailboxes GET mailboxes/mailboxName retrieves a JSON representation of a single mailbox if it exists GET mailboxes retrieves a JSON array of all mailboxes DELETE mailbox/mailboxName deletes a mailbox Note that res_mwi_external must be loaded for these functions to actually do anything. Review: https://reviewboard.asterisk.org/r/3117/ ........ Merged revisions 405553 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/ari/ari_model_validators.h')
-rw-r--r--res/ari/ari_model_validators.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/res/ari/ari_model_validators.h b/res/ari/ari_model_validators.h
index 326693950..ffe003903 100644
--- a/res/ari/ari_model_validators.h
+++ b/res/ari/ari_model_validators.h
@@ -499,6 +499,24 @@ int ast_ari_validate_device_state(struct ast_json *json);
ari_validator ast_ari_validate_device_state_fn(void);
/*!
+ * \brief Validator for Mailbox.
+ *
+ * Represents the state of a mailbox.
+ *
+ * \param json JSON object to validate.
+ * \returns True (non-zero) if valid.
+ * \returns False (zero) if invalid.
+ */
+int ast_ari_validate_mailbox(struct ast_json *json);
+
+/*!
+ * \brief Function pointer to ast_ari_validate_mailbox().
+ *
+ * See \ref ast_ari_model_validators.h for more details.
+ */
+ari_validator ast_ari_validate_mailbox_fn(void);
+
+/*!
* \brief Validator for ApplicationReplaced.
*
* Notification that another WebSocket has taken over for an application.
@@ -1111,6 +1129,10 @@ ari_validator ast_ari_validate_application_fn(void);
* DeviceState
* - name: string (required)
* - state: string (required)
+ * Mailbox
+ * - name: string (required)
+ * - new_messages: int (required)
+ * - old_messages: int (required)
* ApplicationReplaced
* - type: string (required)
* - application: string (required)