resource_playbacks.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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_playbacks.c
  22. *
  23. * Playback control 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_PLAYBACKS_H
  35. #define _ASTERISK_RESOURCE_PLAYBACKS_H
  36. #include "asterisk/ari.h"
  37. /*! Argument struct for ast_ari_playbacks_get() */
  38. struct ast_ari_playbacks_get_args {
  39. /*! Playback's id */
  40. const char *playback_id;
  41. };
  42. /*!
  43. * \brief Get a playback's details.
  44. *
  45. * \param headers HTTP headers
  46. * \param args Swagger parameters
  47. * \param[out] response HTTP response
  48. */
  49. void ast_ari_playbacks_get(struct ast_variable *headers, struct ast_ari_playbacks_get_args *args, struct ast_ari_response *response);
  50. /*! Argument struct for ast_ari_playbacks_stop() */
  51. struct ast_ari_playbacks_stop_args {
  52. /*! Playback's id */
  53. const char *playback_id;
  54. };
  55. /*!
  56. * \brief Stop a playback.
  57. *
  58. * \param headers HTTP headers
  59. * \param args Swagger parameters
  60. * \param[out] response HTTP response
  61. */
  62. void ast_ari_playbacks_stop(struct ast_variable *headers, struct ast_ari_playbacks_stop_args *args, struct ast_ari_response *response);
  63. /*! Argument struct for ast_ari_playbacks_control() */
  64. struct ast_ari_playbacks_control_args {
  65. /*! Playback's id */
  66. const char *playback_id;
  67. /*! Operation to perform on the playback. */
  68. const char *operation;
  69. };
  70. /*!
  71. * \brief Body parsing function for /playbacks/{playbackId}/control.
  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. */
  77. int ast_ari_playbacks_control_parse_body(
  78. struct ast_json *body,
  79. struct ast_ari_playbacks_control_args *args);
  80. /*!
  81. * \brief Control a playback.
  82. *
  83. * \param headers HTTP headers
  84. * \param args Swagger parameters
  85. * \param[out] response HTTP response
  86. */
  87. void ast_ari_playbacks_control(struct ast_variable *headers, struct ast_ari_playbacks_control_args *args, struct ast_ari_response *response);
  88. #endif /* _ASTERISK_RESOURCE_PLAYBACKS_H */