Asterisk - The Open Source Telephony Project GIT-master-7e7a603
resource_asterisk.h
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2012 - 2013, Digium, Inc.
5 *
6 * David M. Lee, II <dlee@digium.com>
7 *
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
13 *
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
17 */
18
19/*! \file
20 *
21 * \brief Generated file - declares stubs to be implemented in
22 * res/ari/resource_asterisk.c
23 *
24 * Asterisk resources
25 *
26 * \author David M. Lee, II <dlee@digium.com>
27 */
28
29/*
30 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31 * !!!!! DO NOT EDIT !!!!!
32 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33 * This file is generated by a mustache template. Please see the original
34 * template in rest-api-templates/ari_resource.h.mustache
35 */
36
37#ifndef _ASTERISK_RESOURCE_ASTERISK_H
38#define _ASTERISK_RESOURCE_ASTERISK_H
39
40#include "asterisk/ari.h"
41
42/*! Argument struct for ast_ari_asterisk_get_object() */
44 /*! The configuration class containing dynamic configuration objects. */
45 const char *config_class;
46 /*! The type of configuration object to retrieve. */
47 const char *object_type;
48 /*! The unique identifier of the object to retrieve. */
49 const char *id;
50};
51/*!
52 * \brief Retrieve a dynamic configuration object.
53 *
54 * \param headers HTTP headers
55 * \param args Swagger parameters
56 * \param[out] response HTTP response
57 */
59/*! Argument struct for ast_ari_asterisk_update_object() */
61 /*! The configuration class containing dynamic configuration objects. */
62 const char *config_class;
63 /*! The type of configuration object to create or update. */
64 const char *object_type;
65 /*! The unique identifier of the object to create or update. */
66 const char *id;
67 /*! The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { "attribute": "directmedia", "value": "false" } ] */
69};
70/*!
71 * \brief Body parsing function for /asterisk/config/dynamic/{configClass}/{objectType}/{id}.
72 * \param body The JSON body from which to parse parameters.
73 * \param[out] args The args structure to parse into.
74 * \retval zero on success
75 * \retval non-zero on failure
76 */
78 struct ast_json *body,
80
81/*!
82 * \brief Create or update a dynamic configuration object.
83 *
84 * \param headers HTTP headers
85 * \param args Swagger parameters
86 * \param[out] response HTTP response
87 */
89/*! Argument struct for ast_ari_asterisk_delete_object() */
91 /*! The configuration class containing dynamic configuration objects. */
92 const char *config_class;
93 /*! The type of configuration object to delete. */
94 const char *object_type;
95 /*! The unique identifier of the object to delete. */
96 const char *id;
97};
98/*!
99 * \brief Delete a dynamic configuration object.
100 *
101 * \param headers HTTP headers
102 * \param args Swagger parameters
103 * \param[out] response HTTP response
104 */
106/*! Argument struct for ast_ari_asterisk_get_info() */
108 /*! Array of Filter information returned */
109 const char **only;
110 /*! Length of only array. */
112 /*! Parsing context for only. */
114};
115/*!
116 * \brief Body parsing function for /asterisk/info.
117 * \param body The JSON body from which to parse parameters.
118 * \param[out] args The args structure to parse into.
119 * \retval zero on success
120 * \retval non-zero on failure
121 */
123 struct ast_json *body,
125
126/*!
127 * \brief Gets Asterisk system information.
128 *
129 * \param headers HTTP headers
130 * \param args Swagger parameters
131 * \param[out] response HTTP response
132 */
133void ast_ari_asterisk_get_info(struct ast_variable *headers, struct ast_ari_asterisk_get_info_args *args, struct ast_ari_response *response);
134/*! Argument struct for ast_ari_asterisk_ping() */
136};
137/*!
138 * \brief Response pong message.
139 *
140 * \param headers HTTP headers
141 * \param args Swagger parameters
142 * \param[out] response HTTP response
143 */
144void ast_ari_asterisk_ping(struct ast_variable *headers, struct ast_ari_asterisk_ping_args *args, struct ast_ari_response *response);
145/*! Argument struct for ast_ari_asterisk_list_modules() */
147};
148/*!
149 * \brief List Asterisk modules.
150 *
151 * \param headers HTTP headers
152 * \param args Swagger parameters
153 * \param[out] response HTTP response
154 */
156/*! Argument struct for ast_ari_asterisk_get_module() */
158 /*! Module's name */
159 const char *module_name;
160};
161/*!
162 * \brief Get Asterisk module information.
163 *
164 * \param headers HTTP headers
165 * \param args Swagger parameters
166 * \param[out] response HTTP response
167 */
169/*! Argument struct for ast_ari_asterisk_load_module() */
171 /*! Module's name */
172 const char *module_name;
173};
174/*!
175 * \brief Load an Asterisk module.
176 *
177 * \param headers HTTP headers
178 * \param args Swagger parameters
179 * \param[out] response HTTP response
180 */
182/*! Argument struct for ast_ari_asterisk_unload_module() */
184 /*! Module's name */
185 const char *module_name;
186};
187/*!
188 * \brief Unload an Asterisk module.
189 *
190 * \param headers HTTP headers
191 * \param args Swagger parameters
192 * \param[out] response HTTP response
193 */
195/*! Argument struct for ast_ari_asterisk_reload_module() */
197 /*! Module's name */
198 const char *module_name;
199};
200/*!
201 * \brief Reload an Asterisk module.
202 *
203 * \param headers HTTP headers
204 * \param args Swagger parameters
205 * \param[out] response HTTP response
206 */
208/*! Argument struct for ast_ari_asterisk_list_log_channels() */
210};
211/*!
212 * \brief Gets Asterisk log channel information.
213 *
214 * \param headers HTTP headers
215 * \param args Swagger parameters
216 * \param[out] response HTTP response
217 */
219/*! Argument struct for ast_ari_asterisk_add_log() */
221 /*! The log channel to add */
222 const char *log_channel_name;
223 /*! levels of the log channel */
224 const char *configuration;
225};
226/*!
227 * \brief Body parsing function for /asterisk/logging/{logChannelName}.
228 * \param body The JSON body from which to parse parameters.
229 * \param[out] args The args structure to parse into.
230 * \retval zero on success
231 * \retval non-zero on failure
232 */
234 struct ast_json *body,
236
237/*!
238 * \brief Adds a log channel.
239 *
240 * \param headers HTTP headers
241 * \param args Swagger parameters
242 * \param[out] response HTTP response
243 */
244void ast_ari_asterisk_add_log(struct ast_variable *headers, struct ast_ari_asterisk_add_log_args *args, struct ast_ari_response *response);
245/*! Argument struct for ast_ari_asterisk_delete_log() */
247 /*! Log channels name */
248 const char *log_channel_name;
249};
250/*!
251 * \brief Deletes a log channel.
252 *
253 * \param headers HTTP headers
254 * \param args Swagger parameters
255 * \param[out] response HTTP response
256 */
258/*! Argument struct for ast_ari_asterisk_rotate_log() */
260 /*! Log channel's name */
261 const char *log_channel_name;
262};
263/*!
264 * \brief Rotates a log channel.
265 *
266 * \param headers HTTP headers
267 * \param args Swagger parameters
268 * \param[out] response HTTP response
269 */
271/*! Argument struct for ast_ari_asterisk_get_global_var() */
273 /*! The variable to get */
274 const char *variable;
275};
276/*!
277 * \brief Body parsing function for /asterisk/variable.
278 * \param body The JSON body from which to parse parameters.
279 * \param[out] args The args structure to parse into.
280 * \retval zero on success
281 * \retval non-zero on failure
282 */
284 struct ast_json *body,
286
287/*!
288 * \brief Get the value of a global variable.
289 *
290 * \param headers HTTP headers
291 * \param args Swagger parameters
292 * \param[out] response HTTP response
293 */
295/*! Argument struct for ast_ari_asterisk_set_global_var() */
297 /*! The variable to set */
298 const char *variable;
299 /*! The value to set the variable to */
300 const char *value;
301};
302/*!
303 * \brief Body parsing function for /asterisk/variable.
304 * \param body The JSON body from which to parse parameters.
305 * \param[out] args The args structure to parse into.
306 * \retval zero on success
307 * \retval non-zero on failure
308 */
310 struct ast_json *body,
312
313/*!
314 * \brief Set the value of a global variable.
315 *
316 * \param headers HTTP headers
317 * \param args Swagger parameters
318 * \param[out] response HTTP response
319 */
321
322#endif /* _ASTERISK_RESOURCE_ASTERISK_H */
Asterisk RESTful API hooks.
void ast_ari_asterisk_unload_module(struct ast_variable *headers, struct ast_ari_asterisk_unload_module_args *args, struct ast_ari_response *response)
Unload an Asterisk module.
void ast_ari_asterisk_set_global_var(struct ast_variable *headers, struct ast_ari_asterisk_set_global_var_args *args, struct ast_ari_response *response)
Set the value of a global variable.
void ast_ari_asterisk_get_global_var(struct ast_variable *headers, struct ast_ari_asterisk_get_global_var_args *args, struct ast_ari_response *response)
Get the value of a global variable.
void ast_ari_asterisk_delete_object(struct ast_variable *headers, struct ast_ari_asterisk_delete_object_args *args, struct ast_ari_response *response)
Delete a dynamic configuration object.
void ast_ari_asterisk_get_module(struct ast_variable *headers, struct ast_ari_asterisk_get_module_args *args, struct ast_ari_response *response)
Get Asterisk module information.
void ast_ari_asterisk_rotate_log(struct ast_variable *headers, struct ast_ari_asterisk_rotate_log_args *args, struct ast_ari_response *response)
Rotates a log channel.
void ast_ari_asterisk_add_log(struct ast_variable *headers, struct ast_ari_asterisk_add_log_args *args, struct ast_ari_response *response)
Adds a log channel.
void ast_ari_asterisk_ping(struct ast_variable *headers, struct ast_ari_asterisk_ping_args *args, struct ast_ari_response *response)
Response pong message.
void ast_ari_asterisk_update_object(struct ast_variable *headers, struct ast_ari_asterisk_update_object_args *args, struct ast_ari_response *response)
Create or update a dynamic configuration object.
int ast_ari_asterisk_add_log_parse_body(struct ast_json *body, struct ast_ari_asterisk_add_log_args *args)
Body parsing function for /asterisk/logging/{logChannelName}.
int ast_ari_asterisk_get_global_var_parse_body(struct ast_json *body, struct ast_ari_asterisk_get_global_var_args *args)
Body parsing function for /asterisk/variable.
void ast_ari_asterisk_get_info(struct ast_variable *headers, struct ast_ari_asterisk_get_info_args *args, struct ast_ari_response *response)
Gets Asterisk system information.
int ast_ari_asterisk_get_info_parse_body(struct ast_json *body, struct ast_ari_asterisk_get_info_args *args)
Body parsing function for /asterisk/info.
void ast_ari_asterisk_delete_log(struct ast_variable *headers, struct ast_ari_asterisk_delete_log_args *args, struct ast_ari_response *response)
Deletes a log channel.
void ast_ari_asterisk_load_module(struct ast_variable *headers, struct ast_ari_asterisk_load_module_args *args, struct ast_ari_response *response)
Load an Asterisk module.
void ast_ari_asterisk_reload_module(struct ast_variable *headers, struct ast_ari_asterisk_reload_module_args *args, struct ast_ari_response *response)
Reload an Asterisk module.
void ast_ari_asterisk_list_modules(struct ast_variable *headers, struct ast_ari_asterisk_list_modules_args *args, struct ast_ari_response *response)
List Asterisk modules.
void ast_ari_asterisk_list_log_channels(struct ast_variable *headers, struct ast_ari_asterisk_list_log_channels_args *args, struct ast_ari_response *response)
Gets Asterisk log channel information.
int ast_ari_asterisk_set_global_var_parse_body(struct ast_json *body, struct ast_ari_asterisk_set_global_var_args *args)
Body parsing function for /asterisk/variable.
int ast_ari_asterisk_update_object_parse_body(struct ast_json *body, struct ast_ari_asterisk_update_object_args *args)
Body parsing function for /asterisk/config/dynamic/{configClass}/{objectType}/{id}.
void ast_ari_asterisk_get_object(struct ast_variable *headers, struct ast_ari_asterisk_get_object_args *args, struct ast_ari_response *response)
Retrieve a dynamic configuration object.
Abstract JSON element (object, array, string, int, ...).
Structure for variables, used for configurations and for channel variables.
const char * args