Neonode zForce(TM) SDK
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
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
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 
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
79 
86 #define ETHREADCREATEFAILED 600
87 #define EBADTHREAD 601
88 
95 #define EQUEUECREATIONFAILED 700
96 #define EENQUEUEFAILED 701
97 #define EDEQUEUEFAILED 702
98 #define EDEQUEUETIMEDOUT 703
99 #define EBADQUEUE 704
100 
107 #define EZFORCENOTINITIALIZED 800
108 #define EZFORCEINITIALIZATIONFAILED 801
109 
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 
129 #define EUNKNOWNDEVICETYPE 1000
130 #define EALREADYINPROGRESS 1001
131 
138 #define EUNKNOWNTRANSPORT 1100
140 #define EALREADYOPEN 1101
141 #define ENOTOPENED 1102
142 #define EWRITEFAILED 1103
143 #define EPARAMETERSTRINGTOOLONG 1104
144 #define ECLOSEFAILED 1105
146 #define EOPENFAILED 1106
147 #define ENOPORTENTRY 1107
148 #define EREADFAILED 1108
149 #define EPARTIALWRITE 1109
150 #define ENODEVICEENTRY 1110
151 
158 #define EUNKNOWNPROTOCOL 1200
160 #define EALREADYADDED 1201
162 #define EBADNAME 1202
163 #define EPROTOCOLERROR 1203
164 
171 #define EUNKNOWNMESSAGETYPE 1300
172 #define EUNKNOWNMESSAGEGROUP 1301
173 
175 // Barr 4.2d violation and exclusion.
176 #include <zForceConfig.h>
177 
178 #endif // ZFORCECOMMON_H
179