sounds_index.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Asterisk -- An open source telephony toolkit.
  3. *
  4. * Copyright (C) 2013, Digium, Inc.
  5. *
  6. * Kinsey Moore <kmoore@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. * \brief Sound file format and description indexer.
  20. */
  21. #ifndef _ASTERISK_SOUNDS_INDEX_H
  22. #define _ASTERISK_SOUNDS_INDEX_H
  23. #if defined(__cplusplus) || defined(c_plusplus)
  24. extern "C" {
  25. #endif
  26. /*!
  27. * \brief Object representing a media index
  28. */
  29. struct ast_media_index;
  30. /*!
  31. * \brief Reload the sounds index
  32. * \deprecated
  33. *
  34. * This function is a NoOp and will be removed in a future release.
  35. *
  36. * \retval zero
  37. */
  38. int ast_sounds_reindex(void);
  39. /*!
  40. * \brief Get the sounds index
  41. *
  42. * \retval sounds index (must be ao2_cleanup()'ed)
  43. * \retval NULL on failure
  44. */
  45. struct ast_media_index *ast_sounds_get_index(void);
  46. /*!
  47. * \brief Get the index for a specific sound file
  48. * \since 13.25.0
  49. * \since 16.2.0
  50. *
  51. * \param filename Sound file name without extension
  52. *
  53. * \retval sounds index (must be ao2_cleanup()'ed)
  54. * \retval NULL on failure
  55. */
  56. struct ast_media_index *ast_sounds_get_index_for_file(const char *filename);
  57. #if defined(__cplusplus) || defined(c_plusplus)
  58. }
  59. #endif
  60. #endif /* _ASTERISK_SOUNDS_INDEX_H */