resource_asterisk.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  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. /*! \file
  19. *
  20. * \brief Generated file - declares stubs to be implemented in
  21. * res/ari/resource_asterisk.c
  22. *
  23. * Asterisk resources
  24. *
  25. * \author David M. Lee, II <dlee@digium.com>
  26. */
  27. /*
  28. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  29. * !!!!! DO NOT EDIT !!!!!
  30. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  31. * This file is generated by a mustache template. Please see the original
  32. * template in rest-api-templates/ari_resource.h.mustache
  33. */
  34. #ifndef _ASTERISK_RESOURCE_ASTERISK_H
  35. #define _ASTERISK_RESOURCE_ASTERISK_H
  36. #include "asterisk/ari.h"
  37. /*! Argument struct for ast_ari_asterisk_get_object() */
  38. struct ast_ari_asterisk_get_object_args {
  39. /*! The configuration class containing dynamic configuration objects. */
  40. const char *config_class;
  41. /*! The type of configuration object to retrieve. */
  42. const char *object_type;
  43. /*! The unique identifier of the object to retrieve. */
  44. const char *id;
  45. };
  46. /*!
  47. * \brief Retrieve a dynamic configuration object.
  48. *
  49. * \param headers HTTP headers
  50. * \param args Swagger parameters
  51. * \param[out] response HTTP response
  52. */
  53. void ast_ari_asterisk_get_object(struct ast_variable *headers, struct ast_ari_asterisk_get_object_args *args, struct ast_ari_response *response);
  54. /*! Argument struct for ast_ari_asterisk_update_object() */
  55. struct ast_ari_asterisk_update_object_args {
  56. /*! The configuration class containing dynamic configuration objects. */
  57. const char *config_class;
  58. /*! The type of configuration object to create or update. */
  59. const char *object_type;
  60. /*! The unique identifier of the object to create or update. */
  61. const char *id;
  62. /*! The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { "attribute": "directmedia", "value": "false" } ] */
  63. struct ast_json *fields;
  64. };
  65. /*!
  66. * \brief Body parsing function for /asterisk/config/dynamic/{configClass}/{objectType}/{id}.
  67. * \param body The JSON body from which to parse parameters.
  68. * \param[out] args The args structure to parse into.
  69. * \retval zero on success
  70. * \retval non-zero on failure
  71. */
  72. int ast_ari_asterisk_update_object_parse_body(
  73. struct ast_json *body,
  74. struct ast_ari_asterisk_update_object_args *args);
  75. /*!
  76. * \brief Create or update a dynamic configuration object.
  77. *
  78. * \param headers HTTP headers
  79. * \param args Swagger parameters
  80. * \param[out] response HTTP response
  81. */
  82. void ast_ari_asterisk_update_object(struct ast_variable *headers, struct ast_ari_asterisk_update_object_args *args, struct ast_ari_response *response);
  83. /*! Argument struct for ast_ari_asterisk_delete_object() */
  84. struct ast_ari_asterisk_delete_object_args {
  85. /*! The configuration class containing dynamic configuration objects. */
  86. const char *config_class;
  87. /*! The type of configuration object to delete. */
  88. const char *object_type;
  89. /*! The unique identifier of the object to delete. */
  90. const char *id;
  91. };
  92. /*!
  93. * \brief Delete a dynamic configuration object.
  94. *
  95. * \param headers HTTP headers
  96. * \param args Swagger parameters
  97. * \param[out] response HTTP response
  98. */
  99. void ast_ari_asterisk_delete_object(struct ast_variable *headers, struct ast_ari_asterisk_delete_object_args *args, struct ast_ari_response *response);
  100. /*! Argument struct for ast_ari_asterisk_get_info() */
  101. struct ast_ari_asterisk_get_info_args {
  102. /*! Array of Filter information returned */
  103. const char **only;
  104. /*! Length of only array. */
  105. size_t only_count;
  106. /*! Parsing context for only. */
  107. char *only_parse;
  108. };
  109. /*!
  110. * \brief Body parsing function for /asterisk/info.
  111. * \param body The JSON body from which to parse parameters.
  112. * \param[out] args The args structure to parse into.
  113. * \retval zero on success
  114. * \retval non-zero on failure
  115. */
  116. int ast_ari_asterisk_get_info_parse_body(
  117. struct ast_json *body,
  118. struct ast_ari_asterisk_get_info_args *args);
  119. /*!
  120. * \brief Gets Asterisk system information.
  121. *
  122. * \param headers HTTP headers
  123. * \param args Swagger parameters
  124. * \param[out] response HTTP response
  125. */
  126. void ast_ari_asterisk_get_info(struct ast_variable *headers, struct ast_ari_asterisk_get_info_args *args, struct ast_ari_response *response);
  127. /*! Argument struct for ast_ari_asterisk_ping() */
  128. struct ast_ari_asterisk_ping_args {
  129. };
  130. /*!
  131. * \brief Response pong message.
  132. *
  133. * \param headers HTTP headers
  134. * \param args Swagger parameters
  135. * \param[out] response HTTP response
  136. */
  137. void ast_ari_asterisk_ping(struct ast_variable *headers, struct ast_ari_asterisk_ping_args *args, struct ast_ari_response *response);
  138. /*! Argument struct for ast_ari_asterisk_list_modules() */
  139. struct ast_ari_asterisk_list_modules_args {
  140. };
  141. /*!
  142. * \brief List Asterisk modules.
  143. *
  144. * \param headers HTTP headers
  145. * \param args Swagger parameters
  146. * \param[out] response HTTP response
  147. */
  148. void ast_ari_asterisk_list_modules(struct ast_variable *headers, struct ast_ari_asterisk_list_modules_args *args, struct ast_ari_response *response);
  149. /*! Argument struct for ast_ari_asterisk_get_module() */
  150. struct ast_ari_asterisk_get_module_args {
  151. /*! Module's name */
  152. const char *module_name;
  153. };
  154. /*!
  155. * \brief Get Asterisk module information.
  156. *
  157. * \param headers HTTP headers
  158. * \param args Swagger parameters
  159. * \param[out] response HTTP response
  160. */
  161. void ast_ari_asterisk_get_module(struct ast_variable *headers, struct ast_ari_asterisk_get_module_args *args, struct ast_ari_response *response);
  162. /*! Argument struct for ast_ari_asterisk_load_module() */
  163. struct ast_ari_asterisk_load_module_args {
  164. /*! Module's name */
  165. const char *module_name;
  166. };
  167. /*!
  168. * \brief Load an Asterisk module.
  169. *
  170. * \param headers HTTP headers
  171. * \param args Swagger parameters
  172. * \param[out] response HTTP response
  173. */
  174. void ast_ari_asterisk_load_module(struct ast_variable *headers, struct ast_ari_asterisk_load_module_args *args, struct ast_ari_response *response);
  175. /*! Argument struct for ast_ari_asterisk_unload_module() */
  176. struct ast_ari_asterisk_unload_module_args {
  177. /*! Module's name */
  178. const char *module_name;
  179. };
  180. /*!
  181. * \brief Unload an Asterisk module.
  182. *
  183. * \param headers HTTP headers
  184. * \param args Swagger parameters
  185. * \param[out] response HTTP response
  186. */
  187. void ast_ari_asterisk_unload_module(struct ast_variable *headers, struct ast_ari_asterisk_unload_module_args *args, struct ast_ari_response *response);
  188. /*! Argument struct for ast_ari_asterisk_reload_module() */
  189. struct ast_ari_asterisk_reload_module_args {
  190. /*! Module's name */
  191. const char *module_name;
  192. };
  193. /*!
  194. * \brief Reload an Asterisk module.
  195. *
  196. * \param headers HTTP headers
  197. * \param args Swagger parameters
  198. * \param[out] response HTTP response
  199. */
  200. void ast_ari_asterisk_reload_module(struct ast_variable *headers, struct ast_ari_asterisk_reload_module_args *args, struct ast_ari_response *response);
  201. /*! Argument struct for ast_ari_asterisk_list_log_channels() */
  202. struct ast_ari_asterisk_list_log_channels_args {
  203. };
  204. /*!
  205. * \brief Gets Asterisk log channel information.
  206. *
  207. * \param headers HTTP headers
  208. * \param args Swagger parameters
  209. * \param[out] response HTTP response
  210. */
  211. 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);
  212. /*! Argument struct for ast_ari_asterisk_add_log() */
  213. struct ast_ari_asterisk_add_log_args {
  214. /*! The log channel to add */
  215. const char *log_channel_name;
  216. /*! levels of the log channel */
  217. const char *configuration;
  218. };
  219. /*!
  220. * \brief Body parsing function for /asterisk/logging/{logChannelName}.
  221. * \param body The JSON body from which to parse parameters.
  222. * \param[out] args The args structure to parse into.
  223. * \retval zero on success
  224. * \retval non-zero on failure
  225. */
  226. int ast_ari_asterisk_add_log_parse_body(
  227. struct ast_json *body,
  228. struct ast_ari_asterisk_add_log_args *args);
  229. /*!
  230. * \brief Adds a log channel.
  231. *
  232. * \param headers HTTP headers
  233. * \param args Swagger parameters
  234. * \param[out] response HTTP response
  235. */
  236. void ast_ari_asterisk_add_log(struct ast_variable *headers, struct ast_ari_asterisk_add_log_args *args, struct ast_ari_response *response);
  237. /*! Argument struct for ast_ari_asterisk_delete_log() */
  238. struct ast_ari_asterisk_delete_log_args {
  239. /*! Log channels name */
  240. const char *log_channel_name;
  241. };
  242. /*!
  243. * \brief Deletes a log channel.
  244. *
  245. * \param headers HTTP headers
  246. * \param args Swagger parameters
  247. * \param[out] response HTTP response
  248. */
  249. void ast_ari_asterisk_delete_log(struct ast_variable *headers, struct ast_ari_asterisk_delete_log_args *args, struct ast_ari_response *response);
  250. /*! Argument struct for ast_ari_asterisk_rotate_log() */
  251. struct ast_ari_asterisk_rotate_log_args {
  252. /*! Log channel's name */
  253. const char *log_channel_name;
  254. };
  255. /*!
  256. * \brief Rotates a log channel.
  257. *
  258. * \param headers HTTP headers
  259. * \param args Swagger parameters
  260. * \param[out] response HTTP response
  261. */
  262. void ast_ari_asterisk_rotate_log(struct ast_variable *headers, struct ast_ari_asterisk_rotate_log_args *args, struct ast_ari_response *response);
  263. /*! Argument struct for ast_ari_asterisk_get_global_var() */
  264. struct ast_ari_asterisk_get_global_var_args {
  265. /*! The variable to get */
  266. const char *variable;
  267. };
  268. /*!
  269. * \brief Body parsing function for /asterisk/variable.
  270. * \param body The JSON body from which to parse parameters.
  271. * \param[out] args The args structure to parse into.
  272. * \retval zero on success
  273. * \retval non-zero on failure
  274. */
  275. int ast_ari_asterisk_get_global_var_parse_body(
  276. struct ast_json *body,
  277. struct ast_ari_asterisk_get_global_var_args *args);
  278. /*!
  279. * \brief Get the value of a global variable.
  280. *
  281. * \param headers HTTP headers
  282. * \param args Swagger parameters
  283. * \param[out] response HTTP response
  284. */
  285. 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);
  286. /*! Argument struct for ast_ari_asterisk_set_global_var() */
  287. struct ast_ari_asterisk_set_global_var_args {
  288. /*! The variable to set */
  289. const char *variable;
  290. /*! The value to set the variable to */
  291. const char *value;
  292. };
  293. /*!
  294. * \brief Body parsing function for /asterisk/variable.
  295. * \param body The JSON body from which to parse parameters.
  296. * \param[out] args The args structure to parse into.
  297. * \retval zero on success
  298. * \retval non-zero on failure
  299. */
  300. int ast_ari_asterisk_set_global_var_parse_body(
  301. struct ast_json *body,
  302. struct ast_ari_asterisk_set_global_var_args *args);
  303. /*!
  304. * \brief Set the value of a global variable.
  305. *
  306. * \param headers HTTP headers
  307. * \param args Swagger parameters
  308. * \param[out] response HTTP response
  309. */
  310. 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);
  311. #endif /* _ASTERISK_RESOURCE_ASTERISK_H */