libUPnP 2.0.1
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#include "autoconfig.h"
37
47
59#define THREAD_IDLE_TIME 5000
60/* @} */
61
73#define JOBS_PER_THREAD 10
74/* @} */
75
88#define MIN_THREADS 2
89/* @} */
90
105#define MAX_THREADS 12
106/* @} */
107
122#define THREAD_STACK_SIZE (size_t)0
123/* @} */
124
134#define MAX_JOBS_TOTAL 100
135/* @} */
136
148#define MAX_SUBSCRIPTION_CALLBACK_HEADER_SIZE 5000
149/* @} */
150
163#define DEFAULT_MAX_SUBSCRIPTIONS 50
164/* @} */
165
175#define MAX_SUBSCRIPTION_QUEUED_EVENTS 10
176/* @} */
177
191#define MAX_SUBSCRIPTION_EVENT_AGE 30
192/* @} */
193
204#define DEFAULT_SOAP_CONTENT_LENGTH 16000
205/* @} */
206
216#define NUM_SSDP_COPY 2
217/* @} */
218
228#define SSDP_PAUSE 100u
229/* @} */
230
239#define WEB_SERVER_BUF_SIZE (size_t)(1024 * 1024)
240/* @} */
241
253#define WEB_SERVER_CONTENT_LANGUAGE ""
254/* @} */
255
269#define AUTO_RENEW_TIME 10
270/* @} */
271
283#define CP_MINIMUM_SUBSCRIPTION_TIME (AUTO_RENEW_TIME + 5)
284/* @} */
285
296#define MAX_SEARCH_TIME 80
297/* @} */
298
309#define MIN_SEARCH_TIME 2
310/* @} */
311
321#define AUTO_ADVERTISEMENT_TIME 30
322/* @} */
323
336#define SSDP_PACKET_DISTRIBUTE 1
337/* @} */
338
356#define GENA_NOTIFICATION_SENDING_TIMEOUT HTTP_DEFAULT_TIMEOUT
357/* @} */
358
378#define GENA_NOTIFICATION_ANSWERING_TIMEOUT HTTP_DEFAULT_TIMEOUT
379/* @} */
380
401#define EXCLUDE_SSDP 0
402#define EXCLUDE_SOAP 0
403#define EXCLUDE_GENA 0
404#define EXCLUDE_DOM 0
405#define EXCLUDE_MINISERVER 0
406#define EXCLUDE_WEB_SERVER 0
407#ifdef USE_JNI
408 #define EXCLUDE_JNI 0
409#else
410 #define EXCLUDE_JNI 1
411#endif
412/* @} */
413
420
421#define DEBUG_ALL 1
422#define DEBUG_SSDP 0
423#define DEBUG_SOAP 0
424#define DEBUG_GENA 0
425#define DEBUG_TPOOL 0
426#define DEBUG_MSERV 0
427#define DEBUG_DOM 0
428#define DEBUG_HTTP 0
429#define DEBUG_API 0
430
431/*
432 * @} Compile time configuration options
433 */
434
435/***************************************************************************
436 * Do not change, Internal purpose only!!!
437 ***************************************************************************/
438
442
443/*
444 * Set additional defines based on requested configuration
445 */
446
447/* configure --enable-client */
448#if UPNP_HAVE_CLIENT
449 #define INCLUDE_CLIENT_APIS 1
450#endif
451
452/* configure --enable-device */
453#if UPNP_HAVE_DEVICE
454 #define INCLUDE_DEVICE_APIS 1
455#endif
456
457/* configure --enable-webserver */
458#if UPNP_HAVE_WEBSERVER
459 #define INTERNAL_WEB_SERVER 1
460#endif
461
462/* configure --enable-ssdp */
463#undef EXCLUDE_SSDP
464#if UPNP_HAVE_SSDP
465 #define EXCLUDE_SSDP 0
466#else
467 #define EXCLUDE_SSDP 1
468#endif
469
470/* configure --enable-soap */
471#undef EXCLUDE_SOAP
472#if UPNP_HAVE_SOAP
473 #define EXCLUDE_SOAP 0
474#else
475 #define EXCLUDE_SOAP 1
476#endif
477
478/* configure --enable-gena */
479#undef EXCLUDE_GENA
480#if UPNP_HAVE_GENA
481 #define EXCLUDE_GENA 0
482#else
483 #define EXCLUDE_GENA 1
484#endif
485
486#undef EXCLUDE_WEB_SERVER
487#undef EXCLUDE_MINISERVER
488#ifdef INTERNAL_WEB_SERVER
489 #define EXCLUDE_WEB_SERVER 0
490 #define EXCLUDE_MINISERVER 0
491#else
492 #define EXCLUDE_WEB_SERVER 1
493 #define EXCLUDE_MINISERVER 1
494#endif
495
496#if EXCLUDE_SSDP == 1 && EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && \
497 EXCLUDE_WEB_SERVER == 1
498 #undef EXCLUDE_MINISERVER
499 #define EXCLUDE_MINISERVER 1
500 #if INTERNAL_WEB_SERVER
501 #error "conflicting settings: use configure --disable-webserver"
502 #endif
503#endif
504
505#if EXCLUDE_SSDP == 0 || EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || \
506 EXCLUDE_WEB_SERVER == 0
507 #undef EXCLUDE_MINISERVER
508 #define EXCLUDE_MINISERVER 0
509 #if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
510 #error "conflicting settings : use configure --enable-webserver"
511 #endif
512#endif
513
514/*
515 * @}
516 */
517
518#endif /* INTERNAL_CONFIG_H */