comparison OrthancFramework/SharedLibrary/OrthancFramework.h.in @ 4063:e00f3d089991 framework

shared library of orthanc framework
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Jun 2020 16:40:34 +0200
parents
children 50cb0fb99e34
comparison
equal deleted inserted replaced
4062:0953b3dc3261 4063:e00f3d089991
1 #pragma once
2
3 /**
4 * Besides the "pragma once" above that only protects this file,
5 * define a macro to prevent including different versions of
6 * "OrthancFramework.h"
7 **/
8 #ifndef __ORTHANC_FRAMEWORK_H
9 #define __ORTHANC_FRAMEWORK_H
10
11
12 #if defined(_WIN32) || defined (__CYGWIN__)
13 # define ORTHANC_PUBLIC __declspec(dllimport)
14 # define ORTHANC_LOCAL
15 #else
16 # if __GNUC__ >= 4
17 # define ORTHANC_PUBLIC __attribute__ ((visibility ("default")))
18 # define ORTHANC_LOCAL __attribute__ ((visibility ("hidden")))
19 # else
20 # define ORTHANC_PUBLIC
21 # define ORTHANC_LOCAL
22 # pragma warning Unknown dynamic link import/export semantics
23 # endif
24 #endif
25
26
27 /**
28 * Configuration macros that are always set to the same value if using
29 * "OrthancFrameworkConfiguration.cmake"
30 **/
31
32 #define ORTHANC_ENABLE_BASE64 1
33 #define ORTHANC_ENABLE_MD5 1
34
35
36
37 /**
38 * Configuration macros that needn't to be renamed
39 **/
40
41 #define ORTHANC_SQLITE_VERSION @ORTHANC_SQLITE_VERSION@
42 #define ORTHANC_VERSION "@ORTHANC_VERSION@"
43 #define ORTHANC_VERSION_MAJOR @ORTHANC_VERSION_MAJOR@
44 #define ORTHANC_VERSION_MINOR @ORTHANC_VERSION_MINOR@
45 #define ORTHANC_VERSION_REVISION @ORTHANC_VERSION_REVISION@
46
47 #cmakedefine01 ORTHANC_ENABLE_CIVETWEB
48 #cmakedefine01 ORTHANC_ENABLE_LOGGING
49 #cmakedefine01 ORTHANC_ENABLE_LOGGING_STDIO
50 #cmakedefine01 ORTHANC_ENABLE_MONGOOSE
51 #cmakedefine01 ORTHANC_SANDBOXED
52 #cmakedefine01 ORTHANC_STATIC_BOOST
53 #cmakedefine01 ORTHANC_STATIC_JSONCPP
54 #cmakedefine01 ORTHANC_STATIC_SQLITE
55
56 #if ORTHANC_STATIC_BOOST == 1 && !defined(BOOST_LEXICAL_CAST_ASSUME_C_LOCALE)
57 # define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
58 #endif
59
60 #if ORTHANC_STATIC_JSONCPP == 1
61 # if defined(JSON_API)
62 # error JSON_API should not be defined
63 # else
64 # define JSON_API @ORTHANC_JSON_API@
65 # endif
66 #endif
67
68 #if ORTHANC_STATIC_SQLITE == 1
69 # if defined(SQLITE_API)
70 # error SQLITE_API should not be defined
71 # else
72 # define SQLITE_API @ORTHANC_SQLITE_API@
73 # endif
74 #endif
75
76 #if ORTHANC_STATIC_PUGIXML == 1
77 # if defined(PUGIXML_API)
78 # error PUGIXML_API should not be defined
79 # else
80 # define PUGIXML_API @ORTHANC_PUGIXML_API@
81 # endif
82 #endif
83
84
85 #define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(major, minor, revision) \
86 (ORTHANC_VERSION_MAJOR > major || \
87 (ORTHANC_VERSION_MAJOR == major && \
88 (ORTHANC_VERSION_MINOR > minor || \
89 (ORTHANC_VERSION_MINOR == minor && \
90 ORTHANC_VERSION_REVISION >= revision))))
91
92
93 /**
94 * Configuration macros that must be renamed, prefixing them by
95 * "ORTHANC_"
96 **/
97
98 #cmakedefine01 ENABLE_DCMTK
99 #if !defined(ENABLE_DCMTK)
100 # error CMake error
101 #elif ENABLE_DCMTK == 1
102 # define ORTHANC_ENABLE_DCMTK 1
103 #else
104 # define ORTHANC_ENABLE_DCMTK 0
105 #endif
106 #undef ENABLE_DCMTK
107
108
109 #cmakedefine01 ENABLE_DCMTK_NETWORKING
110 #if !defined(ENABLE_DCMTK_NETWORKING)
111 # error CMake error
112 #elif ENABLE_DCMTK_NETWORKING == 1
113 # define ORTHANC_ENABLE_DCMTK_NETWORKING 1
114 #else
115 # define ORTHANC_ENABLE_DCMTK_NETWORKING 0
116 #endif
117 #undef ENABLE_DCMTK_NETWORKING
118
119
120 #cmakedefine01 ENABLE_DCMTK_JPEG
121 #if !defined(ENABLE_DCMTK_JPEG)
122 # error CMake error
123 #elif ENABLE_DCMTK_JPEG == 1
124 # define ORTHANC_ENABLE_DCMTK_JPEG 1
125 #else
126 # define ORTHANC_ENABLE_DCMTK_JPEG 0
127 #endif
128 #undef ENABLE_DCMTK_JPEG
129
130
131 #cmakedefine01 ENABLE_DCMTK_JPEG_LOSSLESS
132 #if !defined(ENABLE_DCMTK_JPEG_LOSSLESS)
133 # error CMake error
134 #elif ENABLE_DCMTK_JPEG_LOSSLESS == 1
135 # define ORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS 1
136 #else
137 # define ORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS 0
138 #endif
139 #undef ENABLE_DCMTK_JPEG_LOSSLESS
140
141
142 #cmakedefine01 ENABLE_DCMTK_TRANSCODING
143 #if !defined(ENABLE_DCMTK_TRANSCODING)
144 # error CMake error
145 #elif ENABLE_DCMTK_TRANSCODING == 1
146 # define ORTHANC_ENABLE_DCMTK_TRANSCODING 1
147 #else
148 # define ORTHANC_ENABLE_DCMTK_TRANSCODING 0
149 #endif
150 #undef ENABLE_DCMTK_TRANSCODING
151
152
153 #cmakedefine01 ENABLE_JPEG
154 #if !defined(ENABLE_JPEG)
155 # error CMake error
156 #elif ENABLE_JPEG == 1
157 # define ORTHANC_ENABLE_JPEG 1
158 #else
159 # define ORTHANC_ENABLE_JPEG 0
160 #endif
161 #undef ENABLE_JPEG
162
163
164 #cmakedefine01 ENABLE_LOCALE
165 #if !defined(ENABLE_LOCALE)
166 # error CMake error
167 #elif ENABLE_LOCALE == 1
168 # define ORTHANC_ENABLE_LOCALE 1
169 #else
170 # define ORTHANC_ENABLE_LOCALE 0
171 #endif
172 #undef ENABLE_LOCALE
173
174
175 #cmakedefine01 ENABLE_LUA
176 #if !defined(ENABLE_LUA)
177 # error CMake error
178 #elif ENABLE_LUA == 1
179 # define ORTHANC_ENABLE_LUA 1
180 #else
181 # define ORTHANC_ENABLE_LUA 0
182 #endif
183 #undef ENABLE_LUA
184
185
186 #cmakedefine01 ENABLE_PKCS11
187 #if !defined(ENABLE_PKCS11)
188 # error CMake error
189 #elif ENABLE_PKCS11 == 1
190 # define ORTHANC_ENABLE_PKCS11 1
191 #else
192 # define ORTHANC_ENABLE_PKCS11 0
193 #endif
194 #undef ENABLE_PKCS11
195
196
197 #cmakedefine01 ENABLE_PNG
198 #if !defined(ENABLE_PNG)
199 # error CMake error
200 #elif ENABLE_PNG == 1
201 # define ORTHANC_ENABLE_PNG 1
202 #else
203 # define ORTHANC_ENABLE_PNG 0
204 #endif
205 #undef ENABLE_PNG
206
207
208 #cmakedefine01 ENABLE_PUGIXML
209 #if !defined(ENABLE_PUGIXML)
210 # error CMake error
211 #elif ENABLE_PUGIXML == 1
212 # define ORTHANC_ENABLE_PUGIXML 1
213 #else
214 # define ORTHANC_ENABLE_PUGIXML 0
215 #endif
216 #undef ENABLE_PUGIXML
217
218
219 #cmakedefine01 ENABLE_SQLITE
220 #if !defined(ENABLE_SQLITE)
221 # error CMake error
222 #elif ENABLE_SQLITE == 1
223 # define ORTHANC_ENABLE_SQLITE 1
224 #else
225 # define ORTHANC_ENABLE_SQLITE 0
226 #endif
227 #undef ENABLE_SQLITE
228
229
230 #cmakedefine01 ENABLE_SSL
231 #if !defined(ENABLE_SSL)
232 # error CMake error
233 #elif ENABLE_SSL == 1
234 # define ORTHANC_ENABLE_SSL 1
235 #else
236 # define ORTHANC_ENABLE_SSL 0
237 #endif
238 #undef ENABLE_SSL
239
240
241 #cmakedefine01 ENABLE_WEB_CLIENT
242 #if !defined(ENABLE_WEB_CLIENT)
243 # error CMake error
244 #elif ENABLE_WEB_CLIENT == 1
245 # define ORTHANC_ENABLE_CURL 1
246 #else
247 # define ORTHANC_ENABLE_CURL 0
248 #endif
249 #undef ENABLE_WEB_CLIENT
250
251
252 #cmakedefine01 ENABLE_ZLIB
253 #if !defined(ENABLE_ZLIB)
254 # error CMake error
255 #elif ENABLE_ZLIB == 1
256 # define ORTHANC_ENABLE_ZLIB 1
257 #else
258 # define ORTHANC_ENABLE_ZLIB 0
259 #endif
260 #undef ENABLE_ZLIB
261
262
263 #if ORTHANC_ENABLE_DCMTK == 1
264 # define DCMTK_VERSION_NUMBER @DCMTK_VERSION_NUMBER@
265 #endif
266
267
268 /**
269 * Initialization functions.
270 **/
271
272 #include <string>
273
274 namespace Orthanc
275 {
276 ORTHANC_PUBLIC void InitializeFramework(const std::string& locale,
277 bool loadPrivateDictionary);
278
279 ORTHANC_PUBLIC void FinalizeFramework();
280 }
281
282
283 #endif /* __ORTHANC_FRAMEWORK_H */