| 1 |
{{#api_declaration}} |
| 2 |
/* |
| 3 |
* Asterisk -- An open source telephony toolkit. |
| 4 |
* |
| 5 |
* {{{copyright}}} |
| 6 |
* |
| 7 |
* {{{author}}} |
| 8 |
* |
| 9 |
* See http://www.asterisk.org for more information about |
| 10 |
* the Asterisk project. Please do not directly contact |
| 11 |
* any of the maintainers of this project for assistance; |
| 12 |
* the project provides a web site, mailing lists and IRC |
| 13 |
* channels for your use. |
| 14 |
* |
| 15 |
* This program is free software, distributed under the terms of |
| 16 |
* the GNU General Public License Version 2. See the LICENSE file |
| 17 |
* at the top of the source tree. |
| 18 |
*/ |
| 19 |
|
| 20 |
/*! \file |
| 21 |
* |
| 22 |
* \brief Generated file - declares stubs to be implemented in |
| 23 |
* res/ari/resource_{{name}}.c |
| 24 |
* |
| 25 |
* {{{description}}} |
| 26 |
* |
| 27 |
* \author {{{author}}} |
| 28 |
*/ |
| 29 |
|
| 30 |
/* |
| 31 |
{{> do-not-edit}} |
| 32 |
* This file is generated by a mustache template. Please see the original |
| 33 |
* template in rest-api-templates/ari_resource.h.mustache |
| 34 |
*/ |
| 35 |
|
| 36 |
#ifndef _ASTERISK_RESOURCE_{{name_caps}}_H |
| 37 |
#define _ASTERISK_RESOURCE_{{name_caps}}_H |
| 38 |
|
| 39 |
#include "asterisk/ari.h" |
| 40 |
|
| 41 |
{{#apis}} |
| 42 |
{{#operations}} |
| 43 |
/*! Argument struct for ast_ari_{{c_name}}_{{c_nickname}}() */ |
| 44 |
struct ast_ari_{{c_name}}_{{c_nickname}}_args { |
| 45 |
{{#parameters}} |
| 46 |
{{#description}} |
| 47 |
{{/description}} |
| 48 |
{{^allow_multiple}} |
| 49 |
{{#description}} |
| 50 |
/*! {{{description}}} */ |
| 51 |
{{/description}} |
| 52 |
{{c_data_type}}{{c_space}}{{c_name}}; |
| 53 |
{{/allow_multiple}} |
| 54 |
{{#allow_multiple}} |
| 55 |
/*! Array of {{{description}}} */ |
| 56 |
{{c_data_type}}{{c_space}}*{{c_name}}; |
| 57 |
/*! Length of {{c_name}} array. */ |
| 58 |
size_t {{c_name}}_count; |
| 59 |
/*! Parsing context for {{c_name}}. */ |
| 60 |
char *{{c_name}}_parse; |
| 61 |
{{/allow_multiple}} |
| 62 |
{{/parameters}} |
| 63 |
}; |
| 64 |
{{#is_req}} |
| 65 |
{{#parse_body}} |
| 66 |
/*! |
| 67 |
* \brief Body parsing function for {{path}}. |
| 68 |
* \param body The JSON body from which to parse parameters. |
| 69 |
* \param[out] args The args structure to parse into. |
| 70 |
* \retval zero on success |
| 71 |
* \retval non-zero on failure |
| 72 |
*/ |
| 73 |
int ast_ari_{{c_name}}_{{c_nickname}}_parse_body( |
| 74 |
struct ast_json *body, |
| 75 |
struct ast_ari_{{c_name}}_{{c_nickname}}_args *args); |
| 76 |
|
| 77 |
{{/parse_body}} |
| 78 |
/*! |
| 79 |
* \brief {{{summary}}} |
| 80 |
{{#notes}} |
| 81 |
* |
| 82 |
* {{{notes}}} |
| 83 |
{{/notes}} |
| 84 |
* |
| 85 |
{{#is_binary_response}} |
| 86 |
* \param ser TCP/TLS session instance |
| 87 |
{{/is_binary_response}} |
| 88 |
* \param headers HTTP headers |
| 89 |
* \param args Swagger parameters |
| 90 |
* \param[out] response HTTP response |
| 91 |
*/ |
| 92 |
{{^is_binary_response}} |
| 93 |
void ast_ari_{{c_name}}_{{c_nickname}}(struct ast_variable *headers, struct ast_ari_{{c_name}}_{{c_nickname}}_args *args, struct ast_ari_response *response); |
| 94 |
{{/is_binary_response}} |
| 95 |
{{#is_binary_response}} |
| 96 |
void ast_ari_{{c_name}}_{{c_nickname}}(struct ast_tcptls_session_instance *ser, struct ast_variable *headers, struct ast_ari_{{c_name}}_{{c_nickname}}_args *args, struct ast_ari_response *response); |
| 97 |
{{/is_binary_response}} |
| 98 |
{{/is_req}} |
| 99 |
{{/operations}} |
| 100 |
{{/apis}} |
| 101 |
|
| 102 |
#endif /* _ASTERISK_RESOURCE_{{name_caps}}_H */ |
| 103 |
{{/api_declaration}} |