config.h

00001 /**************************************************************************
00002  *
00003  * Copyright (c) 2000-2003 Intel Corporation 
00004  * All rights reserved. 
00005  *
00006  * Redistribution and use in source and binary forms, with or without 
00007  * modification, are permitted provided that the following conditions are met: 
00008  *
00009  * - Redistributions of source code must retain the above copyright notice, 
00010  * this list of conditions and the following disclaimer. 
00011  * - Redistributions in binary form must reproduce the above copyright notice, 
00012  * this list of conditions and the following disclaimer in the documentation 
00013  * and/or other materials provided with the distribution. 
00014  * - Neither name of Intel Corporation nor the names of its contributors 
00015  * may be used to endorse or promote products derived from this software 
00016  * without specific prior written permission.
00017  * 
00018  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
00019  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
00020  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
00021  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR 
00022  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
00023  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
00024  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
00025  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
00026  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00027  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
00028  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029  *
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 
00124 #define MAX_JOBS_TOTAL 100
00125 /* @} */
00126 
00127 
00138 #define DEFAULT_SOAP_CONTENT_LENGTH 16000
00139 /* @} */
00140 
00141 
00151 #define NUM_SSDP_COPY  2
00152 /* @} */
00153 
00154 
00164 #define SSDP_PAUSE  100
00165 /* @} */
00166 
00175 #define WEB_SERVER_BUF_SIZE  (1024*1024)
00176 /* @} */
00177 
00191 #define AUTO_RENEW_TIME 10
00192 /* @} */
00193 
00205 #define CP_MINIMUM_SUBSCRIPTION_TIME (AUTO_RENEW_TIME + 5)
00206 /* @} */
00207 
00208 
00219 #define MAX_SEARCH_TIME 80
00220 /* @} */
00221 
00222 
00233 #define MIN_SEARCH_TIME 2
00234 /* @} */
00235 
00236 
00246 #define AUTO_ADVERTISEMENT_TIME 30
00247 /* @} */
00248 
00249 
00262 #define SSDP_PACKET_DISTRIBUTE 1
00263 /* @} */
00264 
00265 
00286 #define EXCLUDE_SSDP 0
00287 #define EXCLUDE_SOAP 0
00288 #define EXCLUDE_GENA 0
00289 #define EXCLUDE_DOM  0
00290 #define EXCLUDE_MINISERVER 0
00291 #define EXCLUDE_WEB_SERVER 0
00292 #ifdef USE_JNI
00293 #       define EXCLUDE_JNI 0
00294 #else
00295 #       define EXCLUDE_JNI 1
00296 #endif
00297 /* @} */
00298 
00299     
00310 #define DEBUG_TARGET            1   
00311 /* @} */
00312 
00313 
00321 #define DEBUG_ALL               1
00322 #define DEBUG_SSDP              0
00323 #define DEBUG_SOAP              0
00324 #define DEBUG_GENA              0
00325 #define DEBUG_TPOOL             0
00326 #define DEBUG_MSERV             0
00327 #define DEBUG_DOM               0
00328 #define DEBUG_HTTP              0
00329 #define DEBUG_API               0
00330 
00331 
00332 /*
00333  * @} Compile time configuration options
00334  */
00335 
00336 
00337 /***************************************************************************
00338  * Do not change, Internal purpose only!!!
00339  ***************************************************************************/ 
00340 
00346 /*
00347  * Set additional defines based on requested configuration 
00348  */
00349 
00350 
00351 /* configure --enable-client */
00352 #if UPNP_HAVE_CLIENT
00353 #       define INCLUDE_CLIENT_APIS      1
00354 #endif
00355 
00356 
00357 /* configure --enable-device */
00358 #if UPNP_HAVE_DEVICE
00359 #       define INCLUDE_DEVICE_APIS      1
00360 #endif
00361 
00362 
00363 /* configure --enable-webserver --enable-device */
00364 #if UPNP_HAVE_WEBSERVER
00365 #       define INTERNAL_WEB_SERVER      1
00366 #endif
00367 
00368 
00369 #undef  EXCLUDE_WEB_SERVER
00370 #undef  EXCLUDE_MINISERVER
00371 #ifdef  INTERNAL_WEB_SERVER
00372 #       define EXCLUDE_WEB_SERVER 0
00373 #       define EXCLUDE_MINISERVER 0
00374 #else
00375 #       define EXCLUDE_WEB_SERVER 1
00376 #       define EXCLUDE_MINISERVER 1
00377 #endif
00378 
00379 
00380 #if EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && EXCLUDE_WEB_SERVER == 1
00381 #       undef  EXCLUDE_MINISERVER
00382 #       define EXCLUDE_MINISERVER 1
00383 #       if INTERNAL_WEB_SERVER
00384 #               error "conflicting settings: use configure --disable-webserver"
00385 #       endif
00386 #endif
00387 
00388 
00389 #if EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || EXCLUDE_WEB_SERVER == 0
00390 #       undef  EXCLUDE_MINISERVER
00391 #       define EXCLUDE_MINISERVER 0
00392 #       if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
00393 #               error "conflicting settings : use configure --enable-webserver"
00394 #       endif
00395 #endif
00396 
00397 
00398 #ifdef INCLUDE_CLIENT_APIS
00399 #       define CLIENTONLY(x) x
00400 #else /* INCLUDE_CLIENT_APIS */
00401 #       define CLIENTONLY(x)
00402 #endif /* INCLUDE_CLIENT_APIS */
00403 
00404 
00405 /*
00406  * @}
00407  */
00408 
00409 
00410 #endif /* INTERNAL_CONFIG_H */
00411