libUPnP 22.1.8
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 MINISERVER_FIRST_BYTE_TIMEOUT 5
149/* @} */
150
163#define MINISERVER_MAX_CONNECTIONS_PER_PEER 6
164/* @} */
165
177#define MAX_SUBSCRIPTION_CALLBACK_HEADER_SIZE 5000
178/* @} */
179
192#define DEFAULT_MAX_SUBSCRIPTIONS 50
193/* @} */
194
204#define MAX_SUBSCRIPTION_QUEUED_EVENTS 10
205/* @} */
206
220#define MAX_SUBSCRIPTION_EVENT_AGE 30
221/* @} */
222
233#define DEFAULT_SOAP_CONTENT_LENGTH 64000
234/* @} */
235
250#define DEFAULT_MAX_HEADER_SIZE 16384
251/* @} */
252
262#define NUM_SSDP_COPY 2
263/* @} */
264
274#define SSDP_PAUSE 100u
275/* @} */
276
285#define WEB_SERVER_BUF_SIZE (size_t)(1024 * 1024)
286/* @} */
287
299#define WEB_SERVER_CONTENT_LANGUAGE ""
300/* @} */
301
315#define AUTO_RENEW_TIME 10
316/* @} */
317
329#define CP_MINIMUM_SUBSCRIPTION_TIME (AUTO_RENEW_TIME + 5)
330/* @} */
331
342#define MAX_SEARCH_TIME 80
343/* @} */
344
355#define MIN_SEARCH_TIME 2
356/* @} */
357
367#define AUTO_ADVERTISEMENT_TIME 30
368/* @} */
369
382#define SSDP_PACKET_DISTRIBUTE 1
383/* @} */
384
402#define GENA_NOTIFICATION_SENDING_TIMEOUT HTTP_DEFAULT_TIMEOUT
403/* @} */
404
424#define GENA_NOTIFICATION_ANSWERING_TIMEOUT HTTP_DEFAULT_TIMEOUT
425/* @} */
426
447#define EXCLUDE_SSDP 0
448#define EXCLUDE_SOAP 0
449#define EXCLUDE_GENA 0
450#define EXCLUDE_DOM 0
451#define EXCLUDE_MINISERVER 0
452#define EXCLUDE_WEB_SERVER 0
453#ifdef USE_JNI
454 #define EXCLUDE_JNI 0
455#else
456 #define EXCLUDE_JNI 1
457#endif
458/* @} */
459
466
467#define DEBUG_ALL 1
468#define DEBUG_SSDP 0
469#define DEBUG_SOAP 0
470#define DEBUG_GENA 0
471#define DEBUG_TPOOL 0
472#define DEBUG_MSERV 0
473#define DEBUG_DOM 0
474#define DEBUG_HTTP 0
475#define DEBUG_API 0
476
477/*
478 * @} Compile time configuration options
479 */
480
481/***************************************************************************
482 * Do not change, Internal purpose only!!!
483 ***************************************************************************/
484
488
489/*
490 * Set additional defines based on requested configuration
491 */
492
493/* configure --enable-client */
494#if UPNP_HAVE_CLIENT
495 #define INCLUDE_CLIENT_APIS 1
496#endif
497
498/* configure --enable-device */
499#if UPNP_HAVE_DEVICE
500 #define INCLUDE_DEVICE_APIS 1
501#endif
502
503/* configure --enable-webserver */
504#if UPNP_HAVE_WEBSERVER
505 #define INTERNAL_WEB_SERVER 1
506#endif
507
508/* configure --enable-ssdp */
509#undef EXCLUDE_SSDP
510#if UPNP_HAVE_SSDP
511 #define EXCLUDE_SSDP 0
512#else
513 #define EXCLUDE_SSDP 1
514#endif
515
516/* configure --enable-soap */
517#undef EXCLUDE_SOAP
518#if UPNP_HAVE_SOAP
519 #define EXCLUDE_SOAP 0
520#else
521 #define EXCLUDE_SOAP 1
522#endif
523
524/* configure --enable-gena */
525#undef EXCLUDE_GENA
526#if UPNP_HAVE_GENA
527 #define EXCLUDE_GENA 0
528#else
529 #define EXCLUDE_GENA 1
530#endif
531
532#undef EXCLUDE_WEB_SERVER
533#undef EXCLUDE_MINISERVER
534#ifdef INTERNAL_WEB_SERVER
535 #define EXCLUDE_WEB_SERVER 0
536 #define EXCLUDE_MINISERVER 0
537#else
538 #define EXCLUDE_WEB_SERVER 1
539 #define EXCLUDE_MINISERVER 1
540#endif
541
542#if EXCLUDE_SSDP == 1 && EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && \
543 EXCLUDE_WEB_SERVER == 1
544 #undef EXCLUDE_MINISERVER
545 #define EXCLUDE_MINISERVER 1
546 #if INTERNAL_WEB_SERVER
547 #error "conflicting settings: use configure --disable-webserver"
548 #endif
549#endif
550
551#if EXCLUDE_SSDP == 0 || EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || \
552 EXCLUDE_WEB_SERVER == 0
553 #undef EXCLUDE_MINISERVER
554 #define EXCLUDE_MINISERVER 0
555 #if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
556 #error "conflicting settings : use configure --enable-webserver"
557 #endif
558#endif
559
560/*
561 * @}
562 */
563
564#endif /* INTERNAL_CONFIG_H */