libUPnP 1.14.19
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
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
146#define MAX_SUBSCRIPTION_QUEUED_EVENTS 10
147/* @} */
148
162#define MAX_SUBSCRIPTION_EVENT_AGE 30
163/* @} */
164
175#define DEFAULT_SOAP_CONTENT_LENGTH 16000
176/* @} */
177
187#define NUM_SSDP_COPY 2
188/* @} */
189
199#define SSDP_PAUSE 100u
200/* @} */
201
210#define WEB_SERVER_BUF_SIZE (size_t)(1024 * 1024)
211/* @} */
212
224#define WEB_SERVER_CONTENT_LANGUAGE ""
225/* @} */
226
240#define AUTO_RENEW_TIME 10
241/* @} */
242
254#define CP_MINIMUM_SUBSCRIPTION_TIME (AUTO_RENEW_TIME + 5)
255/* @} */
256
267#define MAX_SEARCH_TIME 80
268/* @} */
269
280#define MIN_SEARCH_TIME 2
281/* @} */
282
292#define AUTO_ADVERTISEMENT_TIME 30
293/* @} */
294
307#define SSDP_PACKET_DISTRIBUTE 1
308/* @} */
309
327#define GENA_NOTIFICATION_SENDING_TIMEOUT HTTP_DEFAULT_TIMEOUT
328/* @} */
329
349#define GENA_NOTIFICATION_ANSWERING_TIMEOUT HTTP_DEFAULT_TIMEOUT
350/* @} */
351
372#define EXCLUDE_SSDP 0
373#define EXCLUDE_SOAP 0
374#define EXCLUDE_GENA 0
375#define EXCLUDE_DOM 0
376#define EXCLUDE_MINISERVER 0
377#define EXCLUDE_WEB_SERVER 0
378#ifdef USE_JNI
379 #define EXCLUDE_JNI 0
380#else
381 #define EXCLUDE_JNI 1
382#endif
383/* @} */
384
392#define DEBUG_ALL 1
393#define DEBUG_SSDP 0
394#define DEBUG_SOAP 0
395#define DEBUG_GENA 0
396#define DEBUG_TPOOL 0
397#define DEBUG_MSERV 0
398#define DEBUG_DOM 0
399#define DEBUG_HTTP 0
400#define DEBUG_API 0
401
402/*
403 * @} Compile time configuration options
404 */
405
406/***************************************************************************
407 * Do not change, Internal purpose only!!!
408 ***************************************************************************/
409
414/*
415 * Set additional defines based on requested configuration
416 */
417
418/* configure --enable-client */
419#if UPNP_HAVE_CLIENT
420 #define INCLUDE_CLIENT_APIS 1
421#endif
422
423/* configure --enable-device */
424#if UPNP_HAVE_DEVICE
425 #define INCLUDE_DEVICE_APIS 1
426#endif
427
428/* configure --enable-webserver */
429#if UPNP_HAVE_WEBSERVER
430 #define INTERNAL_WEB_SERVER 1
431#endif
432
433/* configure --enable-ssdp */
434#undef EXCLUDE_SSDP
435#if UPNP_HAVE_SSDP
436 #define EXCLUDE_SSDP 0
437#else
438 #define EXCLUDE_SSDP 1
439#endif
440
441/* configure --enable-soap */
442#undef EXCLUDE_SOAP
443#if UPNP_HAVE_SOAP
444 #define EXCLUDE_SOAP 0
445#else
446 #define EXCLUDE_SOAP 1
447#endif
448
449/* configure --enable-gena */
450#undef EXCLUDE_GENA
451#if UPNP_HAVE_GENA
452 #define EXCLUDE_GENA 0
453#else
454 #define EXCLUDE_GENA 1
455#endif
456
457#undef EXCLUDE_WEB_SERVER
458#undef EXCLUDE_MINISERVER
459#ifdef INTERNAL_WEB_SERVER
460 #define EXCLUDE_WEB_SERVER 0
461 #define EXCLUDE_MINISERVER 0
462#else
463 #define EXCLUDE_WEB_SERVER 1
464 #define EXCLUDE_MINISERVER 1
465#endif
466
467#if EXCLUDE_SSDP == 1 && EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && \
468 EXCLUDE_WEB_SERVER == 1
469 #undef EXCLUDE_MINISERVER
470 #define EXCLUDE_MINISERVER 1
471 #if INTERNAL_WEB_SERVER
472 #error "conflicting settings: use configure --disable-webserver"
473 #endif
474#endif
475
476#if EXCLUDE_SSDP == 0 || EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || \
477 EXCLUDE_WEB_SERVER == 0
478 #undef EXCLUDE_MINISERVER
479 #define EXCLUDE_MINISERVER 0
480 #if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
481 #error "conflicting settings : use configure --enable-webserver"
482 #endif
483#endif
484
485/*
486 * @}
487 */
488
489#endif /* INTERNAL_CONFIG_H */