⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.h

📁 Upnp开发包文件
💻 H
📖 第 1 页 / 共 2 页
字号:
 *  other important operational information regarding the working of  *  the library. If the user selects All, then the library displays all the  *  debugging information that it has. *  \begin{itemize} *    \item {\tt Critical [0]} *    \item {\tt Packet Level [1]} *    \item {\tt Info Level [2]} *    \item {\tt All [3]} *  \end{itemize} *///@{ #define DEBUG_LEVEL	     3//@}    /** @name DEBUG_TARGET *  The user has the option to redirect the library output debug messages  *  to either the screen or to a log file.  All the output messages with  *  debug level 0 will go to {\tt upnp.err} and messages with debug level  *  greater than zero will be redirected to {\tt upnp.out}. *///@{#define DEBUG_TARGET	    1   //@}//@} // Compile time configuration options#define DEBUG_ALL		0   #define DEBUG_SSDP		0    #define DEBUG_SOAP		0    #define DEBUG_GENA		0    #define DEBUG_TPOOL		0     #define DEBUG_MSERV		0#define DEBUG_DOM		0#define DEBUG_HTTP		0#define DEBUG_API		0    /** @name Other debugging features          The UPnP SDK contains other features to aid in debugging. *///@{// Do not change, Internal purpose only!!! // normally, this should be 0; adds extra seconds to delay#define MINIMUM_DELAY 10/** @name DBGONLY          The {\bf DBGONLY} macro allows code to be marked so that it           is only included in the DEBUG build and not the release.  To          use this macro, put the code inside of the parentheses:          {\tt DBGONLY(int i;)}          This will cause a declaration of the integer {\tt i} only          in the debug build.  *///@{#ifdef DEBUG#define DBGONLY(x) x#else#define DBGONLY(x)  #endif//@}typedef enum Upnp_Module {SSDP,SOAP,GENA,TPOOL,MSERV,DOM,API, HTTP} Dbg_Module;typedef enum DBG_LVL {UPNP_CRITICAL,UPNP_PACKET,UPNP_INFO,UPNP_ALL} Dbg_Level;DBGONLY(extern ithread_mutex_t GlobalDebugMutex;)#ifdef __cplusplusextern "C" {#endif  DBGONLY(	  // Function declarations only for debug /************************************************************************* Function : InitLog											*																	* Parameters:	void													*																	* Description:														*	This functions initializes the log files* Returns: int*	-1 : If fails*	UPNP_E_SUCCESS : if success***************************************************************************/  int InitLog();/************************************************************************* Function : CloseLog											*																	* Parameters:	void													*																	* Description:														*	This functions closes the log files* Returns: void***************************************************************************/  void CloseLog();/************************************************************************* Function : SetLogFileNames											*																	* Parameters:														*	IN const char* ErrFileName: name of the error file*	IN const char *InfoFileName: name of the information file*	IN int size: Size of the buffer*	IN int starLength: This parameter provides the width of the banner*																	* Description:														*	This functions takes the buffer and writes the buffer in the file as *	per the requested banner											* Returns: void***************************************************************************/  void SetLogFileNames(const char *ErrFileName,const char *InfoFileName);/*************************************************************************** Function : GetDebugFile											*																	* Parameters:														*	IN Dbg_Level DLevel: The level of the debug logging. It will decide *		whether debug statement will go to standard output, or any of the *		log files.*	IN Dbg_Module Module: debug will go in the name of this module*																	* Description:*	This function checks if the module is turned on for debug *	and returns the file descriptor corresponding to the debug level* Returns: FILE **	NULL : if the module is turn off for debug *	else returns the right file descriptor***************************************************************************/  FILE * GetDebugFile(Dbg_Level level, Dbg_Module module);/*************************************************************************** Function : UpnpPrintf											*																	* Parameters:														*	IN Dbg_Level DLevel: The level of the debug logging. It will decide *		whether debug statement will go to standard output, or any of the *		log files.*	IN Dbg_Module Module: debug will go in the name of this module*	IN char *DbgFileName: Name of the file from where debug statement is*							coming*	IN int DbgLineNo : Line number of the file from where debug statement is*							coming*	IN char * FmtStr, ...: Variable number of arguments that will go in the *			debug statement*																	* Description:														*	This functions prints the debug statement either on the startdard output*	or log file along with the information from where this debug statement *	is coming* Returns: void***************************************************************************/   void UpnpPrintf(Dbg_Level DLevel, Dbg_Module Module,char			*DbgFileName, int DbgLineNo,char * FmtStr,			...);/************************************************************************* Function : UpnpDisplayBanner											*																	* Parameters:														*	IN FILE *fd: file descriptor where the banner will be written*	IN char **lines: The buffer that will be written*	IN int size: Size of the buffer*	IN int starLength: This parameter provides the width of the banner*																	* Description:														*	This functions takes the buffer and writes the buffer in the file as *	per the requested banner											* Returns: void***************************************************************************/  void UpnpDisplayBanner(FILE *fd,			 char **lines, int size, int starlength);/*************************************************************************** Function : UpnpDisplayFileAndLine											*																	* Parameters:														*	IN FILE *fd: File descriptor where line number and file name will be *			written *	IN char *DbgFileName: Name of the file  *	IN int DbgLineNo : Line number of the file*																	* Description:*	This function writes the file name and file number from where*		debug statement is coming to the log file* Returns: void***************************************************************************/  void UpnpDisplayFileAndLine(FILE *fd,char *DbgFileName, int DbgLineNo);)       //End of function declarations only for debug#ifdef __cplusplus}#endif#ifdef  INTERNAL_WEB_SERVER#undef  EXCLUDE_WEB_SERVER #undef  EXCLUDE_MINISERVER #define EXCLUDE_WEB_SERVER 0#define EXCLUDE_MINISERVER 0#endif#if EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && EXCLUDE_WEB_SERVER == 1#undef  EXCLUDE_MINISERVER #undef  INTERNAL_WEB_SERVER#define EXCLUDE_MINISERVER 1#endif#if EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || EXCLUDE_WEB_SERVER == 0#undef  EXCLUDE_MINISERVER #define EXCLUDE_MINISERVER 0#endif#ifndef INTERNAL_WEB_SERVER#if EXCLUDE_WEB_SERVER == 0#define INTERNAL_WEB_SERVER#endif#endif#ifdef INCLUDE_CLIENT_APIS#define CLIENTONLY(x) x#else #define CLIENTONLY(x)#endif#ifdef INCLUDE_DEVICE_APIS#define DEVICEONLY(x) x#else #define DEVICEONLY(x) #endif//@}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -