libUPnP 1.8.4
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
415#define DEBUG_TARGET 1
416/* @} */
417
418
426#define DEBUG_ALL 1
427#define DEBUG_SSDP 0
428#define DEBUG_SOAP 0
429#define DEBUG_GENA 0
430#define DEBUG_TPOOL 0
431#define DEBUG_MSERV 0
432#define DEBUG_DOM 0
433#define DEBUG_HTTP 0
434#define DEBUG_API 0
435
436
437/*
438 * @} Compile time configuration options
439 */
440
441
442/***************************************************************************
443 * Do not change, Internal purpose only!!!
444 ***************************************************************************/
445
451/*
452 * Set additional defines based on requested configuration
453 */
454
455
456/* configure --enable-client */
457#if UPNP_HAVE_CLIENT
458# define INCLUDE_CLIENT_APIS 1
459#endif
460
461
462/* configure --enable-device */
463#if UPNP_HAVE_DEVICE
464# define INCLUDE_DEVICE_APIS 1
465#endif
466
467
468/* configure --enable-webserver */
469#if UPNP_HAVE_WEBSERVER
470# define INTERNAL_WEB_SERVER 1
471#endif
472
473/* configure --enable-ssdp */
474#undef EXCLUDE_SSDP
475#if UPNP_HAVE_SSDP
476# define EXCLUDE_SSDP 0
477#else
478# define EXCLUDE_SSDP 1
479#endif
480
481/* configure --enable-soap */
482#undef EXCLUDE_SOAP
483#if UPNP_HAVE_SOAP
484# define EXCLUDE_SOAP 0
485#else
486# define EXCLUDE_SOAP 1
487#endif
488
489/* configure --enable-gena */
490#undef EXCLUDE_GENA
491#if UPNP_HAVE_GENA
492# define EXCLUDE_GENA 0
493#else
494# define EXCLUDE_GENA 1
495#endif
496
497#undef EXCLUDE_WEB_SERVER
498#undef EXCLUDE_MINISERVER
499#ifdef INTERNAL_WEB_SERVER
500# define EXCLUDE_WEB_SERVER 0
501# define EXCLUDE_MINISERVER 0
502#else
503# define EXCLUDE_WEB_SERVER 1
504# define EXCLUDE_MINISERVER 1
505#endif
506
507
508#if EXCLUDE_SSDP == 1 && EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && EXCLUDE_WEB_SERVER == 1
509# undef EXCLUDE_MINISERVER
510# define EXCLUDE_MINISERVER 1
511# if INTERNAL_WEB_SERVER
512# error "conflicting settings: use configure --disable-webserver"
513# endif
514#endif
515
516
517#if EXCLUDE_SSDP == 0 || EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || EXCLUDE_WEB_SERVER == 0
518# undef EXCLUDE_MINISERVER
519# define EXCLUDE_MINISERVER 0
520# if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
521# error "conflicting settings : use configure --enable-webserver"
522# endif
523#endif
524
525
526/*
527 * @}
528 */
529
530#endif /* INTERNAL_CONFIG_H */
531