libUPnP  1.6.20
config.h
1 /**************************************************************************
2  *
3  * Copyright (c) 2000-2003 Intel Corporation
4  * All rights reserved.
5  * Copyright (c) 2012 France Telecom All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * - Redistributions of source code must retain the above copyright notice,
11  * this list of conditions and the following disclaimer.
12  * - Redistributions in binary form must reproduce the above copyright notice,
13  * this list of conditions and the following disclaimer in the documentation
14  * and/or other materials provided with the distribution.
15  * - Neither name of Intel Corporation nor the names of its contributors
16  * may be used to endorse or promote products derived from this software
17  * without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
23  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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 
129 #define THREAD_STACK_SIZE (size_t)0
130 /* @} */
131 
132 
142 #define MAX_JOBS_TOTAL 100
143 /* @} */
144 
145 
156 #define DEFAULT_SOAP_CONTENT_LENGTH 16000
157 /* @} */
158 
159 
169 #define NUM_SSDP_COPY 2
170 /* @} */
171 
172 
182 #define SSDP_PAUSE 100u
183 /* @} */
184 
193 #define WEB_SERVER_BUF_SIZE (size_t)(1024*1024)
194 /* @} */
195 
207 #define WEB_SERVER_CONTENT_LANGUAGE ""
208 /* @} */
209 
223 #define AUTO_RENEW_TIME 10
224 /* @} */
225 
237 #define CP_MINIMUM_SUBSCRIPTION_TIME (AUTO_RENEW_TIME + 5)
238 /* @} */
239 
240 
251 #define MAX_SEARCH_TIME 80
252 /* @} */
253 
254 
265 #define MIN_SEARCH_TIME 2
266 /* @} */
267 
268 
278 #define AUTO_ADVERTISEMENT_TIME 30
279 /* @} */
280 
281 
294 #define SSDP_PACKET_DISTRIBUTE 1
295 /* @} */
296 
297 
315 #define GENA_NOTIFICATION_SENDING_TIMEOUT HTTP_DEFAULT_TIMEOUT
316 /* @} */
317 
318 
338 #define GENA_NOTIFICATION_ANSWERING_TIMEOUT HTTP_DEFAULT_TIMEOUT
339 /* @} */
340 
341 
362 #define EXCLUDE_SSDP 0
363 #define EXCLUDE_SOAP 0
364 #define EXCLUDE_GENA 0
365 #define EXCLUDE_DOM 0
366 #define EXCLUDE_MINISERVER 0
367 #define EXCLUDE_WEB_SERVER 0
368 #ifdef USE_JNI
369 # define EXCLUDE_JNI 0
370 #else
371 # define EXCLUDE_JNI 1
372 #endif
373 /* @} */
374 
375 
386 #define DEBUG_TARGET 1
387 /* @} */
388 
389 
397 #define DEBUG_ALL 1
398 #define DEBUG_SSDP 0
399 #define DEBUG_SOAP 0
400 #define DEBUG_GENA 0
401 #define DEBUG_TPOOL 0
402 #define DEBUG_MSERV 0
403 #define DEBUG_DOM 0
404 #define DEBUG_HTTP 0
405 #define DEBUG_API 0
406 
407 
408 /*
409  * @} Compile time configuration options
410  */
411 
412 
413 /***************************************************************************
414  * Do not change, Internal purpose only!!!
415  ***************************************************************************/
416 
422 /*
423  * Set additional defines based on requested configuration
424  */
425 
426 
427 /* configure --enable-client */
428 #if UPNP_HAVE_CLIENT
429 # define INCLUDE_CLIENT_APIS 1
430 #endif
431 
432 
433 /* configure --enable-device */
434 #if UPNP_HAVE_DEVICE
435 # define INCLUDE_DEVICE_APIS 1
436 #endif
437 
438 
439 /* configure --enable-webserver */
440 #if UPNP_HAVE_WEBSERVER
441 # define INTERNAL_WEB_SERVER 1
442 #endif
443 
444 /* configure --enable-ssdp */
445 #undef EXCLUDE_SSDP
446 #if UPNP_HAVE_SSDP
447 # define EXCLUDE_SSDP 0
448 #else
449 # define EXCLUDE_SSDP 1
450 #endif
451 
452 /* configure --enable-soap */
453 #undef EXCLUDE_SOAP
454 #if UPNP_HAVE_SOAP
455 # define EXCLUDE_SOAP 0
456 #else
457 # define EXCLUDE_SOAP 1
458 #endif
459 
460 /* configure --enable-gena */
461 #undef EXCLUDE_GENA
462 #if UPNP_HAVE_GENA
463 # define EXCLUDE_GENA 0
464 #else
465 # define EXCLUDE_GENA 1
466 #endif
467 
468 #undef EXCLUDE_WEB_SERVER
469 #undef EXCLUDE_MINISERVER
470 #ifdef INTERNAL_WEB_SERVER
471 # define EXCLUDE_WEB_SERVER 0
472 # define EXCLUDE_MINISERVER 0
473 #else
474 # define EXCLUDE_WEB_SERVER 1
475 # define EXCLUDE_MINISERVER 1
476 #endif
477 
478 
479 #if EXCLUDE_SSDP == 1 && EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && EXCLUDE_WEB_SERVER == 1
480 # undef EXCLUDE_MINISERVER
481 # define EXCLUDE_MINISERVER 1
482 # if INTERNAL_WEB_SERVER
483 # error "conflicting settings: use configure --disable-webserver"
484 # endif
485 #endif
486 
487 
488 #if EXCLUDE_SSDP == 0 || EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || EXCLUDE_WEB_SERVER == 0
489 # undef EXCLUDE_MINISERVER
490 # define EXCLUDE_MINISERVER 0
491 # if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
492 # error "conflicting settings : use configure --enable-webserver"
493 # endif
494 #endif
495 
496 
497 /*
498  * @}
499  */
500 
501 #endif /* INTERNAL_CONFIG_H */
502