libUPnP 22.1.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#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 64000
205/* @} */
206
221#define DEFAULT_MAX_HEADER_SIZE 16384
222/* @} */
223
233#define NUM_SSDP_COPY 2
234/* @} */
235
245#define SSDP_PAUSE 100u
246/* @} */
247
256#define WEB_SERVER_BUF_SIZE (size_t)(1024 * 1024)
257/* @} */
258
270#define WEB_SERVER_CONTENT_LANGUAGE ""
271/* @} */
272
286#define AUTO_RENEW_TIME 10
287/* @} */
288
300#define CP_MINIMUM_SUBSCRIPTION_TIME (AUTO_RENEW_TIME + 5)
301/* @} */
302
313#define MAX_SEARCH_TIME 80
314/* @} */
315
326#define MIN_SEARCH_TIME 2
327/* @} */
328
338#define AUTO_ADVERTISEMENT_TIME 30
339/* @} */
340
353#define SSDP_PACKET_DISTRIBUTE 1
354/* @} */
355
373#define GENA_NOTIFICATION_SENDING_TIMEOUT HTTP_DEFAULT_TIMEOUT
374/* @} */
375
395#define GENA_NOTIFICATION_ANSWERING_TIMEOUT HTTP_DEFAULT_TIMEOUT
396/* @} */
397
418#define EXCLUDE_SSDP 0
419#define EXCLUDE_SOAP 0
420#define EXCLUDE_GENA 0
421#define EXCLUDE_DOM 0
422#define EXCLUDE_MINISERVER 0
423#define EXCLUDE_WEB_SERVER 0
424#ifdef USE_JNI
425 #define EXCLUDE_JNI 0
426#else
427 #define EXCLUDE_JNI 1
428#endif
429/* @} */
430
437
438#define DEBUG_ALL 1
439#define DEBUG_SSDP 0
440#define DEBUG_SOAP 0
441#define DEBUG_GENA 0
442#define DEBUG_TPOOL 0
443#define DEBUG_MSERV 0
444#define DEBUG_DOM 0
445#define DEBUG_HTTP 0
446#define DEBUG_API 0
447
448/*
449 * @} Compile time configuration options
450 */
451
452/***************************************************************************
453 * Do not change, Internal purpose only!!!
454 ***************************************************************************/
455
459
460/*
461 * Set additional defines based on requested configuration
462 */
463
464/* configure --enable-client */
465#if UPNP_HAVE_CLIENT
466 #define INCLUDE_CLIENT_APIS 1
467#endif
468
469/* configure --enable-device */
470#if UPNP_HAVE_DEVICE
471 #define INCLUDE_DEVICE_APIS 1
472#endif
473
474/* configure --enable-webserver */
475#if UPNP_HAVE_WEBSERVER
476 #define INTERNAL_WEB_SERVER 1
477#endif
478
479/* configure --enable-ssdp */
480#undef EXCLUDE_SSDP
481#if UPNP_HAVE_SSDP
482 #define EXCLUDE_SSDP 0
483#else
484 #define EXCLUDE_SSDP 1
485#endif
486
487/* configure --enable-soap */
488#undef EXCLUDE_SOAP
489#if UPNP_HAVE_SOAP
490 #define EXCLUDE_SOAP 0
491#else
492 #define EXCLUDE_SOAP 1
493#endif
494
495/* configure --enable-gena */
496#undef EXCLUDE_GENA
497#if UPNP_HAVE_GENA
498 #define EXCLUDE_GENA 0
499#else
500 #define EXCLUDE_GENA 1
501#endif
502
503#undef EXCLUDE_WEB_SERVER
504#undef EXCLUDE_MINISERVER
505#ifdef INTERNAL_WEB_SERVER
506 #define EXCLUDE_WEB_SERVER 0
507 #define EXCLUDE_MINISERVER 0
508#else
509 #define EXCLUDE_WEB_SERVER 1
510 #define EXCLUDE_MINISERVER 1
511#endif
512
513#if EXCLUDE_SSDP == 1 && EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && \
514 EXCLUDE_WEB_SERVER == 1
515 #undef EXCLUDE_MINISERVER
516 #define EXCLUDE_MINISERVER 1
517 #if INTERNAL_WEB_SERVER
518 #error "conflicting settings: use configure --disable-webserver"
519 #endif
520#endif
521
522#if EXCLUDE_SSDP == 0 || EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || \
523 EXCLUDE_WEB_SERVER == 0
524 #undef EXCLUDE_MINISERVER
525 #define EXCLUDE_MINISERVER 0
526 #if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
527 #error "conflicting settings : use configure --enable-webserver"
528 #endif
529#endif
530
531/*
532 * @}
533 */
534
535#endif /* INTERNAL_CONFIG_H */