summaryrefslogtreecommitdiff
path: root/res/ari/ari_model_validators.h
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-10-04 16:01:48 +0000
committerMatthew Jordan <mjordan@digium.com>2013-10-04 16:01:48 +0000
commit8d7873b836999b09caad87abec27579f1f065b84 (patch)
treecdf683ab18142553b42102de6c5ca52fc71b22a2 /res/ari/ari_model_validators.h
parentb52c972b172087d27178c0e60127d486d4e500f8 (diff)
ARI: Add subscription support
This patch adds an /applications API to ARI, allowing explicit management of Stasis applications. * GET /applications - list current applications * GET /applications/{applicationName} - get details of a specific application * POST /applications/{applicationName}/subscription - explicitly subscribe to a channel, bridge or endpoint * DELETE /applications/{applicationName}/subscription - explicitly unsubscribe from a channel, bridge or endpoint Subscriptions work by a reference counting mechanism: if you subscript to an event source X number of times, you must unsubscribe X number of times to stop receiveing events for that event source. Review: https://reviewboard.asterisk.org/r/2862 (issue ASTERISK-22451) Reported by: Matt Jordan ........ Merged revisions 400522 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/ari/ari_model_validators.h')
-rw-r--r--res/ari/ari_model_validators.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/res/ari/ari_model_validators.h b/res/ari/ari_model_validators.h
index a8a856f15..6aa6a2a14 100644
--- a/res/ari/ari_model_validators.h
+++ b/res/ari/ari_model_validators.h
@@ -55,6 +55,15 @@
int ast_ari_validate_void(struct ast_json *json);
/*!
+ * \brief Validator for native Swagger object.
+ *
+ * \param json JSON object to validate.
+ * \returns True (non-zero) if valid.
+ * \returns False (zero) if invalid.
+ */
+int ast_ari_validate_object(struct ast_json *json);
+
+/*!
* \brief Validator for native Swagger byte.
*
* \param json JSON object to validate.
@@ -746,6 +755,24 @@ int ast_ari_validate_channel_varset(struct ast_json *json);
ari_validator ast_ari_validate_channel_varset_fn(void);
/*!
+ * \brief Validator for EndpointStateChange.
+ *
+ * Endpoint state changed.
+ *
+ * \param json JSON object to validate.
+ * \returns True (non-zero) if valid.
+ * \returns False (zero) if invalid.
+ */
+int ast_ari_validate_endpoint_state_change(struct ast_json *json);
+
+/*!
+ * \brief Function pointer to ast_ari_validate_endpoint_state_change().
+ *
+ * See \ref ast_ari_model_validators.h for more details.
+ */
+ari_validator ast_ari_validate_endpoint_state_change_fn(void);
+
+/*!
* \brief Validator for Event.
*
* Base type for asynchronous events from Asterisk.
@@ -871,6 +898,24 @@ int ast_ari_validate_stasis_start(struct ast_json *json);
*/
ari_validator ast_ari_validate_stasis_start_fn(void);
+/*!
+ * \brief Validator for Application.
+ *
+ * Details of a Stasis application
+ *
+ * \param json JSON object to validate.
+ * \returns True (non-zero) if valid.
+ * \returns False (zero) if invalid.
+ */
+int ast_ari_validate_application(struct ast_json *json);
+
+/*!
+ * \brief Function pointer to ast_ari_validate_application().
+ *
+ * See \ref ast_ari_model_validators.h for more details.
+ */
+ari_validator ast_ari_validate_application_fn(void);
+
/*
* JSON models
*
@@ -1035,6 +1080,7 @@ ari_validator ast_ari_validate_stasis_start_fn(void);
* - timestamp: Date
* - channel: Channel (required)
* - eventname: string (required)
+ * - userevent: object (required)
* ChannelVarset
* - type: string (required)
* - application: string (required)
@@ -1042,6 +1088,11 @@ ari_validator ast_ari_validate_stasis_start_fn(void);
* - channel: Channel
* - value: string (required)
* - variable: string (required)
+ * EndpointStateChange
+ * - type: string (required)
+ * - application: string (required)
+ * - timestamp: Date
+ * - endpoint: Endpoint (required)
* Event
* - type: string (required)
* - application: string (required)
@@ -1072,6 +1123,11 @@ ari_validator ast_ari_validate_stasis_start_fn(void);
* - timestamp: Date
* - args: List[string] (required)
* - channel: Channel (required)
+ * Application
+ * - bridge_ids: List[string] (required)
+ * - channel_ids: List[string] (required)
+ * - endpoint_ids: List[string] (required)
+ * - name: string (required)
*/
#endif /* _ASTERISK_ARI_MODEL_H */