libUPnP  1.8.0
config.h
1 /**************************************************************************
2  *
3  * Copyright (c) 2000-2003 Intel Corporation
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  * - Redistributions of source code must retain the above copyright notice,
10  * this list of conditions and the following disclaimer.
11  * - Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  * - Neither name of Intel Corporation nor the names of its contributors
15  * may be used to endorse or promote products derived from this software
16  * without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
22  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  *
30  **************************************************************************/
31 
32 
33 #ifndef INTERNAL_CONFIG_H
34 #define INTERNAL_CONFIG_H
35 
36 
37 #include "autoconfig.h"
38 
39 
62 #define THREAD_IDLE_TIME 5000
63 /* @} */
64 
65 
77 #define JOBS_PER_THREAD 10
78 /* @} */
79 
80 
93 #define MIN_THREADS 2
94 /* @} */
95 
96 
111 #define MAX_THREADS 12
112 /* @} */
113 
114 
124 #define MAX_JOBS_TOTAL 100
125 /* @} */
126 
127 
138 #define DEFAULT_SOAP_CONTENT_LENGTH 16000
139 /* @} */
140 
141 
151 #define NUM_SSDP_COPY 2
152 /* @} */
153 
154 
164 #define SSDP_PAUSE 100
165 /* @} */
166 
175 #define WEB_SERVER_BUF_SIZE (1024*1024)
176 /* @} */
177 
191 #define AUTO_RENEW_TIME 10
192 /* @} */
193 
205 #define CP_MINIMUM_SUBSCRIPTION_TIME (AUTO_RENEW_TIME + 5)
206 /* @} */
207 
208 
219 #define MAX_SEARCH_TIME 80
220 /* @} */
221 
222 
233 #define MIN_SEARCH_TIME 2
234 /* @} */
235 
236 
246 #define AUTO_ADVERTISEMENT_TIME 30
247 /* @} */
248 
249 
262 #define SSDP_PACKET_DISTRIBUTE 1
263 /* @} */
264 
265 
286 #define EXCLUDE_SSDP 0
287 #define EXCLUDE_SOAP 0
288 #define EXCLUDE_GENA 0
289 #define EXCLUDE_DOM 0
290 #define EXCLUDE_MINISERVER 0
291 #define EXCLUDE_WEB_SERVER 0
292 #ifdef USE_JNI
293 # define EXCLUDE_JNI 0
294 #else
295 # define EXCLUDE_JNI 1
296 #endif
297 /* @} */
298 
299 
310 #define DEBUG_TARGET 1
311 /* @} */
312 
313 
321 #define DEBUG_ALL 1
322 #define DEBUG_SSDP 0
323 #define DEBUG_SOAP 0
324 #define DEBUG_GENA 0
325 #define DEBUG_TPOOL 0
326 #define DEBUG_MSERV 0
327 #define DEBUG_DOM 0
328 #define DEBUG_HTTP 0
329 #define DEBUG_API 0
330 
331 
332 /*
333  * @} Compile time configuration options
334  */
335 
336 
337 /***************************************************************************
338  * Do not change, Internal purpose only!!!
339  ***************************************************************************/
340 
346 /*
347  * Set additional defines based on requested configuration
348  */
349 
350 
351 /* configure --enable-client */
352 #if UPNP_HAVE_CLIENT
353 # define INCLUDE_CLIENT_APIS 1
354 #endif
355 
356 
357 /* configure --enable-device */
358 #if UPNP_HAVE_DEVICE
359 # define INCLUDE_DEVICE_APIS 1
360 #endif
361 
362 
363 /* configure --enable-webserver --enable-device */
364 #if UPNP_HAVE_WEBSERVER
365 # define INTERNAL_WEB_SERVER 1
366 #endif
367 
368 
369 #undef EXCLUDE_WEB_SERVER
370 #undef EXCLUDE_MINISERVER
371 #ifdef INTERNAL_WEB_SERVER
372 # define EXCLUDE_WEB_SERVER 0
373 # define EXCLUDE_MINISERVER 0
374 #else
375 # define EXCLUDE_WEB_SERVER 1
376 # define EXCLUDE_MINISERVER 1
377 #endif
378 
379 
380 #if EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && EXCLUDE_WEB_SERVER == 1
381 # undef EXCLUDE_MINISERVER
382 # define EXCLUDE_MINISERVER 1
383 # if INTERNAL_WEB_SERVER
384 # error "conflicting settings: use configure --disable-webserver"
385 # endif
386 #endif
387 
388 
389 #if EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || EXCLUDE_WEB_SERVER == 0
390 # undef EXCLUDE_MINISERVER
391 # define EXCLUDE_MINISERVER 0
392 # if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
393 # error "conflicting settings : use configure --enable-webserver"
394 # endif
395 #endif
396 
397 
398 #ifdef INCLUDE_CLIENT_APIS
399 # define CLIENTONLY(x) x
400 #else /* INCLUDE_CLIENT_APIS */
401 # define CLIENTONLY(x)
402 #endif /* INCLUDE_CLIENT_APIS */
403 
404 
405 /*
406  * @}
407  */
408 
409 
410 #endif /* INTERNAL_CONFIG_H */
411