| Tilt Five NDK |

errors.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020-2022 Tilt Five, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
21
22#ifndef __cplusplus
23#include <stdint.h>
24#else
25#include <cstdint>
26#endif
27
28#ifdef _WIN32
29#ifdef BUILDING_T5_NATIVE_DLL
30#ifdef __GNUC__
31#define T5_EXPORT __attribute__((dllexport))
32#else // !__GNUC__
33#define T5_EXPORT __declspec(dllexport)
34#endif // !__GNUC__
35#else // !BUILDING_T5_NATIVE_DLL
36#define T5_EXPORT
37#endif // !BUILDING_T5_NATIVE_DLL
38#else // !_WIN32
39#define T5_EXPORT __attribute__((visibility("default")))
40#endif // !_WIN32
41
42#ifdef __cplusplus
43 extern "C" {
44#endif
45
47 typedef uint32_t T5_Result;
48
52
54#define T5_SUCCESS (0x0000)
55
57#define T5_TIMEOUT (0x0001)
58
63#define T5_ERROR_NO_CONTEXT (0x1000)
64
66#define T5_ERROR_NO_LIBRARY (0x1001)
67
69#define T5_ERROR_INTERNAL (0x1002)
70
72#define T5_ERROR_NO_SERVICE (0x1003)
73
75#define T5_ERROR_IO_FAILURE (0x1004)
76
78#define T5_ERROR_REQUEST_ID_UNKNOWN (0x1005)
79
81#define T5_ERROR_INVALID_ARGS (0x1006)
82
84#define T5_ERROR_DEVICE_LOST (0x1007)
85
87#define T5_ERROR_TARGET_NOT_FOUND (0x1008)
88
90#define T5_ERROR_INVALID_STATE (0x1009)
91
93#define T5_ERROR_SETTING_UNKNOWN (0x100A)
94
96#define T5_ERROR_SETTING_WRONG_TYPE (0x100B)
97
99#define T5_ERROR_MISC_REMOTE (0x100C)
100
102#define T5_ERROR_OVERFLOW (0x100D)
103
105#define T5_ERROR_GRAPHICS_API_UNAVAILABLE (0x100E)
106
108#define T5_ERROR_UNSUPPORTED (0x100F)
109
111#define T5_ERROR_DECODE_ERROR (0x1010)
112
114#define T5_ERROR_INVALID_GFX_CONTEXT (0x1011)
115
117#define T5_ERROR_GFX_CONTEXT_INIT_FAIL (0x1012)
118
120#define T5_ERROR_TRY_AGAIN (0x1015)
121
123#define T5_ERROR_UNAVAILABLE (0x1016)
124
126#define T5_ERROR_ALREADY_CONNECTED (0x1017)
127
129#define T5_ERROR_NOT_CONNECTED (0x1018)
130
132#define T5_ERROR_STRING_OVERFLOW (0x1019)
133
135#define T5_ERROR_SERVICE_INCOMPATIBLE (0x101A)
136
138#define T5_PERMISSION_DENIED (0x101B)
139
141#define T5_ERROR_INVALID_BUFFER_SIZE (0x101C)
142
144#define T5_MAX_ERROR (0x8000)
145
149T5_EXPORT const char* t5GetResultMessage(T5_Result result);
150
152
153#ifdef __cplusplus
154} // extern "C"
155#endif
156
157#undef T5_EXPORT
T5_Result
uint32_t T5_Result
Represents an error code that may be returned by the Tilt Five™ API.
Definition: errors.h:47
t5GetResultMessage
T5_EXPORT const char * t5GetResultMessage(T5_Result result)
cstdint