eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

error.h 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* Internal error APIs.
  2. *
  3. * Copyright (C) 2016 Reece H. Dunn
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, see: <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef ESPEAK_NG_ERROR_API
  19. #define ESPEAK_NG_ERROR_API
  20. #include <espeak-ng/espeak_ng.h>
  21. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif
  25. typedef enum
  26. {
  27. ERROR_CONTEXT_FILE,
  28. ERROR_CONTEXT_VERSION,
  29. } espeak_ng_CONTEXT_TYPE;
  30. typedef struct espeak_ng_ERROR_CONTEXT_
  31. {
  32. espeak_ng_CONTEXT_TYPE type;
  33. char *name;
  34. int version;
  35. int expected_version;
  36. } espeak_ng_ERROR_CONTEXT_;
  37. espeak_ng_STATUS
  38. create_file_error_context(espeak_ng_ERROR_CONTEXT *context,
  39. espeak_ng_STATUS status,
  40. const char *filename);
  41. espeak_ng_STATUS
  42. create_version_mismatch_error_context(espeak_ng_ERROR_CONTEXT *context,
  43. const char *path,
  44. int version,
  45. int expected_version);
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. #endif