libUPnP  1.6.17
config.h
00001 /**************************************************************************
00002  *
00003  * Copyright (c) 2000-2003 Intel Corporation
00004  * All rights reserved.
00005  * Copyright (c) 2012 France Telecom All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions are met:
00009  *
00010  * - Redistributions of source code must retain the above copyright notice,
00011  * this list of conditions and the following disclaimer.
00012  * - Redistributions in binary form must reproduce the above copyright notice,
00013  * this list of conditions and the following disclaimer in the documentation
00014  * and/or other materials provided with the distribution.
00015  * - Neither name of Intel Corporation nor the names of its contributors
00016  * may be used to endorse or promote products derived from this software
00017  * without specific prior written permission.
00018  *
00019  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00020  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00021  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00022  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
00023  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00024  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00025  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00026  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00027  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00028  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00029  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00030  *
00031  **************************************************************************/
00032 
00033 #ifndef INTERNAL_CONFIG_H
00034 #define INTERNAL_CONFIG_H 
00035 
00036 
00037 #include "autoconfig.h"
00038 
00039 
00062 #define THREAD_IDLE_TIME 5000
00063 /* @} */
00064 
00065 
00077 #define JOBS_PER_THREAD 10
00078 /* @} */
00079 
00080 
00093 #define MIN_THREADS 2 
00094 /* @} */
00095 
00096 
00111 #define MAX_THREADS 12 
00112 /* @} */
00113 
00114 
00129 #define THREAD_STACK_SIZE (size_t)0
00130 /* @} */
00131 
00132 
00142 #define MAX_JOBS_TOTAL 100
00143 /* @} */
00144 
00145 
00156 #define DEFAULT_SOAP_CONTENT_LENGTH 16000
00157 /* @} */
00158 
00159 
00169 #define NUM_SSDP_COPY  2
00170 /* @} */
00171 
00172 
00182 #define SSDP_PAUSE  100u
00183 /* @} */
00184 
00193 #define WEB_SERVER_BUF_SIZE  (size_t)(1024*1024)
00194 /* @} */
00195 
00207 #define WEB_SERVER_CONTENT_LANGUAGE ""
00208 /* @} */
00209 
00223 #define AUTO_RENEW_TIME 10
00224 /* @} */
00225 
00237 #define CP_MINIMUM_SUBSCRIPTION_TIME (AUTO_RENEW_TIME + 5)
00238 /* @} */
00239 
00240 
00251 #define MAX_SEARCH_TIME 80
00252 /* @} */
00253 
00254 
00265 #define MIN_SEARCH_TIME 2
00266 /* @} */
00267 
00268 
00278 #define AUTO_ADVERTISEMENT_TIME 30
00279 /* @} */
00280 
00281 
00294 #define SSDP_PACKET_DISTRIBUTE 1
00295 /* @} */
00296 
00297 
00315 #define GENA_NOTIFICATION_SENDING_TIMEOUT HTTP_DEFAULT_TIMEOUT
00316 /* @} */
00317 
00318 
00338 #define GENA_NOTIFICATION_ANSWERING_TIMEOUT HTTP_DEFAULT_TIMEOUT
00339 /* @} */
00340 
00341 
00362 #define EXCLUDE_SSDP 0
00363 #define EXCLUDE_SOAP 0
00364 #define EXCLUDE_GENA 0
00365 #define EXCLUDE_DOM  0
00366 #define EXCLUDE_MINISERVER 0
00367 #define EXCLUDE_WEB_SERVER 0
00368 #ifdef USE_JNI
00369 #       define EXCLUDE_JNI 0
00370 #else
00371 #       define EXCLUDE_JNI 1
00372 #endif
00373 /* @} */
00374 
00375     
00386 #define DEBUG_TARGET            1   
00387 /* @} */
00388 
00389 
00397 #define DEBUG_ALL               1
00398 #define DEBUG_SSDP              0
00399 #define DEBUG_SOAP              0
00400 #define DEBUG_GENA              0
00401 #define DEBUG_TPOOL             0
00402 #define DEBUG_MSERV             0
00403 #define DEBUG_DOM               0
00404 #define DEBUG_HTTP              0
00405 #define DEBUG_API               0
00406 
00407 
00408 /*
00409  * @} Compile time configuration options
00410  */
00411 
00412 
00413 /***************************************************************************
00414  * Do not change, Internal purpose only!!!
00415  ***************************************************************************/ 
00416 
00422 /*
00423  * Set additional defines based on requested configuration 
00424  */
00425 
00426 
00427 /* configure --enable-client */
00428 #if UPNP_HAVE_CLIENT
00429 #       define INCLUDE_CLIENT_APIS      1
00430 #endif
00431 
00432 
00433 /* configure --enable-device */
00434 #if UPNP_HAVE_DEVICE
00435 #       define INCLUDE_DEVICE_APIS      1
00436 #endif
00437 
00438 
00439 /* configure --enable-webserver */
00440 #if UPNP_HAVE_WEBSERVER
00441 #       define INTERNAL_WEB_SERVER      1
00442 #endif
00443 
00444 /* configure --enable-ssdp */
00445 #undef EXCLUDE_SSDP
00446 #if UPNP_HAVE_SSDP
00447 #       define EXCLUDE_SSDP 0
00448 #else
00449 #       define EXCLUDE_SSDP 1
00450 #endif
00451 
00452 /* configure --enable-soap */
00453 #undef EXCLUDE_SOAP
00454 #if UPNP_HAVE_SOAP
00455 #       define EXCLUDE_SOAP 0
00456 #else
00457 #       define EXCLUDE_SOAP 1
00458 #endif
00459 
00460 /* configure --enable-gena */
00461 #undef EXCLUDE_GENA
00462 #if UPNP_HAVE_GENA
00463 #       define EXCLUDE_GENA 0
00464 #else
00465 #       define EXCLUDE_GENA 1
00466 #endif
00467 
00468 #undef  EXCLUDE_WEB_SERVER
00469 #undef  EXCLUDE_MINISERVER
00470 #ifdef  INTERNAL_WEB_SERVER
00471 #       define EXCLUDE_WEB_SERVER 0
00472 #       define EXCLUDE_MINISERVER 0
00473 #else
00474 #       define EXCLUDE_WEB_SERVER 1
00475 #       define EXCLUDE_MINISERVER 1
00476 #endif
00477 
00478 
00479 #if EXCLUDE_SSDP == 1 && EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && EXCLUDE_WEB_SERVER == 1
00480 #       undef  EXCLUDE_MINISERVER
00481 #       define EXCLUDE_MINISERVER 1
00482 #       if INTERNAL_WEB_SERVER
00483 #               error "conflicting settings: use configure --disable-webserver"
00484 #       endif
00485 #endif
00486 
00487 
00488 #if EXCLUDE_SSDP == 0 || EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || EXCLUDE_WEB_SERVER == 0
00489 #       undef  EXCLUDE_MINISERVER
00490 #       define EXCLUDE_MINISERVER 0
00491 #       if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
00492 #               error "conflicting settings : use configure --enable-webserver"
00493 #       endif
00494 #endif
00495 
00496 
00497 /*
00498  * @}
00499  */
00500 
00501 #endif /* INTERNAL_CONFIG_H */
00502