| 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_APIcxx . . $ `external/espeak/error.h:19:9`! |
| 20 | |
| 21 | #include "espeak_ng.h"cxx . . $ `<file>/external/espeak/espeak_ng.h`/ |
| 22 | |
| 23 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 24 | extern "C" |
| 25 | { |
| 26 | #endif |
| 27 | |
| 28 | typedef enum |
| 29 | { |
| 30 | ERROR_CONTEXT_FILE, |
| 31 | ERROR_CONTEXT_VERSION, |
| 32 | } espeak_ng_CONTEXT_TYPE; |
| 33 | |
| 34 | typedef struct espeak_ng_ERROR_CONTEXT_cxx . . $ espeak_ng_ERROR_CONTEXT_# |
| 35 | { |
| 36 | espeak_ng_CONTEXT_TYPE typecxx . . $ espeak_ng_ERROR_CONTEXT_#type.; |
| 37 | char *namecxx . . $ espeak_ng_ERROR_CONTEXT_#name.; |
| 38 | int versioncxx . . $ espeak_ng_ERROR_CONTEXT_#version.; |
| 39 | int expected_versioncxx . . $ espeak_ng_ERROR_CONTEXT_#expected_version.; |
| 40 | } espeak_ng_ERROR_CONTEXT_; |
| 41 | |
| 42 | espeak_ng_STATUS |
| 43 | create_file_error_context(espeak_ng_ERROR_CONTEXT *context, |
| 44 | espeak_ng_STATUS status, |
| 45 | const char *filename); |
| 46 | |
| 47 | espeak_ng_STATUS |
| 48 | create_version_mismatch_error_context(espeak_ng_ERROR_CONTEXT *context, |
| 49 | const char *path, |
| 50 | int version, |
| 51 | int expected_version); |
| 52 | |
| 53 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 54 | } |
| 55 | #endif |
| 56 | |
| 57 | #endif |