Neonode zForce(TM) SDK

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

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