libUPnP  1.14.0
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 
154 #define MAX_SUBSCRIPTION_QUEUED_EVENTS 10
155 /* @} */
156 
157 
171 #define MAX_SUBSCRIPTION_EVENT_AGE 30
172 /* @} */
173 
174 
185 #define DEFAULT_SOAP_CONTENT_LENGTH 16000
186 /* @} */
187 
188 
198 #define NUM_SSDP_COPY 2
199 /* @} */
200 
201 
211 #define SSDP_PAUSE 100u
212 /* @} */
213 
222 #define WEB_SERVER_BUF_SIZE (size_t)(1024*1024)
223 /* @} */
224 
236 #define WEB_SERVER_CONTENT_LANGUAGE ""
237 /* @} */
238 
252 #define AUTO_RENEW_TIME 10
253 /* @} */
254 
266 #define CP_MINIMUM_SUBSCRIPTION_TIME (AUTO_RENEW_TIME + 5)
267 /* @} */
268 
269 
280 #define MAX_SEARCH_TIME 80
281 /* @} */
282 
283 
294 #define MIN_SEARCH_TIME 2
295 /* @} */
296 
297 
307 #define AUTO_ADVERTISEMENT_TIME 30
308 /* @} */
309 
310 
323 #define SSDP_PACKET_DISTRIBUTE 1
324 /* @} */
325 
326 
344 #define GENA_NOTIFICATION_SENDING_TIMEOUT HTTP_DEFAULT_TIMEOUT
345 /* @} */
346 
347 
367 #define GENA_NOTIFICATION_ANSWERING_TIMEOUT HTTP_DEFAULT_TIMEOUT
368 /* @} */
369 
370 
391 #define EXCLUDE_SSDP 0
392 #define EXCLUDE_SOAP 0
393 #define EXCLUDE_GENA 0
394 #define EXCLUDE_DOM 0
395 #define EXCLUDE_MINISERVER 0
396 #define EXCLUDE_WEB_SERVER 0
397 #ifdef USE_JNI
398 # define EXCLUDE_JNI 0
399 #else
400 # define EXCLUDE_JNI 1
401 #endif
402 /* @} */
403 
404 
412 #define DEBUG_ALL 1
413 #define DEBUG_SSDP 0
414 #define DEBUG_SOAP 0
415 #define DEBUG_GENA 0
416 #define DEBUG_TPOOL 0
417 #define DEBUG_MSERV 0
418 #define DEBUG_DOM 0
419 #define DEBUG_HTTP 0
420 #define DEBUG_API 0
421 
422 
423 /*
424  * @} Compile time configuration options
425  */
426 
427 
428 /***************************************************************************
429  * Do not change, Internal purpose only!!!
430  ***************************************************************************/
431 
437 /*
438  * Set additional defines based on requested configuration
439  */
440 
441 
442 /* configure --enable-client */
443 #if UPNP_HAVE_CLIENT
444 # define INCLUDE_CLIENT_APIS 1
445 #endif
446 
447 
448 /* configure --enable-device */
449 #if UPNP_HAVE_DEVICE
450 # define INCLUDE_DEVICE_APIS 1
451 #endif
452 
453 
454 /* configure --enable-webserver */
455 #if UPNP_HAVE_WEBSERVER
456 # define INTERNAL_WEB_SERVER 1
457 #endif
458 
459 /* configure --enable-ssdp */
460 #undef EXCLUDE_SSDP
461 #if UPNP_HAVE_SSDP
462 # define EXCLUDE_SSDP 0
463 #else
464 # define EXCLUDE_SSDP 1
465 #endif
466 
467 /* configure --enable-soap */
468 #undef EXCLUDE_SOAP
469 #if UPNP_HAVE_SOAP
470 # define EXCLUDE_SOAP 0
471 #else
472 # define EXCLUDE_SOAP 1
473 #endif
474 
475 /* configure --enable-gena */
476 #undef EXCLUDE_GENA
477 #if UPNP_HAVE_GENA
478 # define EXCLUDE_GENA 0
479 #else
480 # define EXCLUDE_GENA 1
481 #endif
482 
483 #undef EXCLUDE_WEB_SERVER
484 #undef EXCLUDE_MINISERVER
485 #ifdef INTERNAL_WEB_SERVER
486 # define EXCLUDE_WEB_SERVER 0
487 # define EXCLUDE_MINISERVER 0
488 #else
489 # define EXCLUDE_WEB_SERVER 1
490 # define EXCLUDE_MINISERVER 1
491 #endif
492 
493 
494 #if EXCLUDE_SSDP == 1 && EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && EXCLUDE_WEB_SERVER == 1
495 # undef EXCLUDE_MINISERVER
496 # define EXCLUDE_MINISERVER 1
497 # if INTERNAL_WEB_SERVER
498 # error "conflicting settings: use configure --disable-webserver"
499 # endif
500 #endif
501 
502 
503 #if EXCLUDE_SSDP == 0 || EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || EXCLUDE_WEB_SERVER == 0
504 # undef EXCLUDE_MINISERVER
505 # define EXCLUDE_MINISERVER 0
506 # if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
507 # error "conflicting settings : use configure --enable-webserver"
508 # endif
509 #endif
510 
511 
512 /*
513  * @}
514  */
515 
516 #endif /* INTERNAL_CONFIG_H */
517