Neonode zForce(TM) SDK

zForceCommon.h
Go to the documentation of this file.
1
6 #ifndef ZFORCECOMMON_H
7 #define ZFORCECOMMON_H 1
8
9 // DLLEXTERNAL is for members visible outside the Shared Library.
10 // DLLINTERNAL is for members visible only inside the Shared Library.
11 // MODULEINTERNAL is for members visible only inside the module.
12
13 #ifdef _WIN32
14 #ifdef COMPILING_ZFORCE_SDK
15 #define DLLEXTERNAL __declspec(dllexport)
16 #else
17 #define DLLEXTERNAL __declspec(dllimport)
18 #endif // COMPILING_ZFORCE_SDK
19 #define DLLINTERNAL
20 #define MODULEINTERNAL static
21 #elif defined (__clang__) || __GNUC__ > 4
22 #define DLLEXTERNAL __attribute__ ((visibility ("default")))
23 #define DLLINTERNAL __attribute__ ((visibility ("hidden")))
24 #define MODULEINTERNAL static
25 #else
26 #error Unsupported compiler.
27 #endif // _WIN32
28
29 // Violates Barr 4.2d "No header file shall contain a #include statement."
30 // We have a rule exclusion.
31 #include <zForceTypes.h>
32
33 // Macros used to expand OS defines into path/file that can be #included.
34 #define OSINCLUDE1(x) #x
35 #define OSINCLUDE(x) OSINCLUDE1(x)
36
42 #define ENOTALLOWED 300
43 #define EALREADYINITIALIZED 301
44 #define EVALUEOVERFLOW 302
45 #define EFAILEDGETTINGTIME 303
46 #define EINTERRUPTED 304
47 #define ENOTSUPPORTED 305
48 #define EINVALIDSIZE 306
49 #define EINVALIDINPUT 307
57 #define EOUTOFMEMORY 400
58 #define EILLEGALMEMORYSIZE 401
66 #define EMUTEXNOTINITIALIZED 500
67 #define EMUTEXINITIALIZATIONFAILED 501
68 #define EMUTEXLOCKFAILED 502
69 #define EMUTEXUNLOCKFAILED 503
70 #define EMUTEXDESTROYFAILED 504
71 #define EBADMUTEX 505
72 #define ESEMAPHORENOTINITIALIZED 506
73 #define ESEMAPHOREINITIALIZATIONFAILED 507
74 #define ESEMAPHOREWAITFAILED 508
75 #define ESEMAPHOREINCREMENTFAILED 509
76 #define ESEMAPHOREDESTROYFAILED 510
77 #define EBADSEMAPHORE 511
78 #define ESEMAPHOREWAITTIMEDOUT 512
86 #define ETHREADCREATEFAILED 600
87 #define EBADTHREAD 601
95 #define EQUEUECREATIONFAILED 700
96 #define EENQUEUEFAILED 701
97 #define EDEQUEUEFAILED 702
98 #define EDEQUEUETIMEDOUT 703
99 #define EBADQUEUE 704
107 #define EZFORCENOTINITIALIZED 800
108 #define EZFORCEINITIALIZATIONFAILED 801
116 #define EBADCONNECTION 900
117 #define EDEVICENOTFOUND 901
118 #define EMESSAGEFILTERALREADYSET 902
119 #define EALREADYCONNECTED 903
120 #define ENOTCONNECTED 904
121 #define ERECEIVETIMEOUT 905
122 #define ECONNECTIONLOST 906
130 #define EUNKNOWNDEVICETYPE 1000
131 #define EALREADYINPROGRESS 1001
140 #define EUNKNOWNTRANSPORT 1100
141 #define EALREADYOPEN 1101
142 #define ENOTOPENED 1102
143 #define EWRITEFAILED 1103
144 #define EPARAMETERSTRINGTOOLONG 1104
146 #define ECLOSEFAILED 1105
147 #define EOPENFAILED 1106
148 #define ENOPORTENTRY 1107
149 #define EREADFAILED 1108
150 #define EPARTIALWRITE 1109
151 #define ENODEVICEENTRY 1110
152 #define ENODEVICEATINDEX 1111
153 #define EDEVICEENUMERATIONFAILED 1112
162 #define EUNKNOWNPROTOCOL 1200
164 #define EALREADYADDED 1201
165 #define EBADNAME 1202
166 #define EPROTOCOLERROR 1203
174 #define EUNKNOWNMESSAGETYPE 1300
175 #define EUNKNOWNMESSAGEGROUP 1301
178 // Barr 4.2d violation and exclusion.
179 #include <zForceConfig.h>
180
181 #endif // ZFORCECOMMON_H
zForceTypes.h