summaryrefslogtreecommitdiff
path: root/res/ari/resource_asterisk.h
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2014-01-21 14:27:21 +0000
committerKinsey Moore <kmoore@digium.com>2014-01-21 14:27:21 +0000
commit1590d32ab0a5b6797c96244a47f18f868574e970 (patch)
tree3cc0717778b4d2b816ba4df12bb76a75716631b3 /res/ari/resource_asterisk.h
parent4bc84b1b9f25b6bdfab7daef9c08000fb31d5a43 (diff)
ARI: Support channel variables in originate
This adds back in support for specifying channel variables during an originate without compromising the ability to specify query parameters in the JSON body. This was accomplished by generating the body-parsing code in a separate function instead of being integrated with the URI query parameter parsing code such that it could be called by paths with body parameters. This is transparent to the user of the API and prevents manual duplication of code or data structures. (closes issue ASTERISK-23051) Review: https://reviewboard.asterisk.org/r/3122/ Reported by: Matt Jordan ........ Merged revisions 406003 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/ari/resource_asterisk.h')
-rw-r--r--res/ari/resource_asterisk.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/res/ari/resource_asterisk.h b/res/ari/resource_asterisk.h
index aff89c445..93e161d3f 100644
--- a/res/ari/resource_asterisk.h
+++ b/res/ari/resource_asterisk.h
@@ -49,6 +49,17 @@ struct ast_ari_asterisk_get_info_args {
char *only_parse;
};
/*!
+ * \brief Body parsing function for /asterisk/info.
+ * \param body The JSON body from which to parse parameters.
+ * \param[out] args The args structure to parse into.
+ * \retval zero on success
+ * \retval non-zero on failure
+ */
+int ast_ari_asterisk_get_info_parse_body(
+ struct ast_json *body,
+ struct ast_ari_asterisk_get_info_args *args);
+
+/*!
* \brief Gets Asterisk system information.
*
* \param headers HTTP headers
@@ -62,6 +73,17 @@ struct ast_ari_asterisk_get_global_var_args {
const char *variable;
};
/*!
+ * \brief Body parsing function for /asterisk/variable.
+ * \param body The JSON body from which to parse parameters.
+ * \param[out] args The args structure to parse into.
+ * \retval zero on success
+ * \retval non-zero on failure
+ */
+int ast_ari_asterisk_get_global_var_parse_body(
+ struct ast_json *body,
+ struct ast_ari_asterisk_get_global_var_args *args);
+
+/*!
* \brief Get the value of a global variable.
*
* \param headers HTTP headers
@@ -77,6 +99,17 @@ struct ast_ari_asterisk_set_global_var_args {
const char *value;
};
/*!
+ * \brief Body parsing function for /asterisk/variable.
+ * \param body The JSON body from which to parse parameters.
+ * \param[out] args The args structure to parse into.
+ * \retval zero on success
+ * \retval non-zero on failure
+ */
+int ast_ari_asterisk_set_global_var_parse_body(
+ struct ast_json *body,
+ struct ast_ari_asterisk_set_global_var_args *args);
+
+/*!
* \brief Set the value of a global variable.
*
* \param headers HTTP headers