From 9bc187d4c6d9d14bc63ac1afa584bd1e9d807c04 Mon Sep 17 00:00:00 2001 From: Marcelo Roberto Jimenez Date: Fri, 25 May 2007 15:02:12 +0000 Subject: [PATCH] * Removing the Dbg_Level, InitLog, SetLogFileNames and CloseLog defines. These were just aliases, no reason to keep them. * Changed the comments of the include files that expose the UPnP API to use only C89 comments and no C99 comments. git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@198 119443c7-1b9e-41f8-b6fc-b9c35fce742c --- ChangeLog | 8 + ixml/inc/ixml.h | 133 +++--- threadutil/inc/FreeList.h | 78 ++-- threadutil/inc/LinkedList.h | 81 ++-- threadutil/inc/ThreadPool.h | 219 +++++----- threadutil/inc/TimerThread.h | 89 +++-- threadutil/inc/iasnprintf.h | 60 +-- threadutil/inc/ithread.h | 87 ++-- upnp/inc/upnp.h | 378 +++++++++--------- upnp/inc/upnpconfig.h.in | 65 ++- upnp/inc/upnpdebug.h | 93 ++--- upnp/inc/upnptools.h | 71 ++-- upnp/src/api/upnpapi.c | 2 +- upnp/src/api/upnpdebug.c | 6 +- upnp/src/genlib/service_table/service_table.c | 12 +- upnp/src/inc/http_client.h | 24 +- upnp/src/inc/service_table.h | 18 +- 17 files changed, 711 insertions(+), 713 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47a2aef..2832d31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,14 @@ Version 1.4.7 ******************************************************************************* +2007-05-25 Marcelo Jimenez + * Removing the Dbg_Level, InitLog, SetLogFileNames and CloseLog + defines. These were just aliases, no reason to keep them. + +2007-05-25 Marcelo Jimenez + * Changed the comments of the include files that expose the UPnP API + to use only C89 comments and no C99 comments. + 2007-05-24 Nektarios K. Papadopoulos * Added tvcombo sample that demonstrates coexistence of a device and a control point in the same application. diff --git a/ixml/inc/ixml.h b/ixml/inc/ixml.h index 03098ce..c7a549e 100644 --- a/ixml/inc/ixml.h +++ b/ixml/inc/ixml.h @@ -1,59 +1,61 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2000-2003 Intel Corporation -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/******************************************************************************* + * + * Copyright (c) 2000-2003 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ #ifndef _IXML_H_ #define _IXML_H_ + #include #include -//#include #include + #ifdef WIN32 - #ifndef UPNP_STATIC_LIB - #ifdef LIBUPNP_EXPORTS - // set up declspec for dll export to make functions visible to library users - #define EXPORT_SPEC __declspec(dllexport) - #else - #define EXPORT_SPEC __declspec(dllimport) - #endif - #else - #define EXPORT_SPEC - #endif + #ifndef UPNP_STATIC_LIB + #ifdef LIBUPNP_EXPORTS + /* set up declspec for dll export to make functions visible to library users */ + #define EXPORT_SPEC __declspec(dllexport) + #else + #define EXPORT_SPEC __declspec(dllimport) + #endif + #else + #define EXPORT_SPEC + #endif #else - #define EXPORT_SPEC + #define EXPORT_SPEC #endif typedef int BOOL; + #define DOMString char * @@ -88,7 +90,7 @@ typedef int BOOL; * etc., refer to section 1.1 of the DOM2-Core recommendation. */ -//@{ +/*! @{ */ /*================================================================ * @@ -121,7 +123,7 @@ typedef enum * *=================================================================*/ typedef enum -{ // see DOM spec +{ /* see DOM spec */ IXML_INDEX_SIZE_ERR = 1, IXML_DOMSTRING_SIZE_ERR = 2, IXML_HIERARCHY_REQUEST_ERR = 3, @@ -240,7 +242,7 @@ extern "C" { * its functionality. For more information, refer to DOM2-Core page 34. */ -//@{ +/*! @{ */ /** Returns the name of the {\bf Node}, depending on what type of * {\bf Node} it is, in a read-only string. Refer to the table in the @@ -634,7 +636,7 @@ ixmlNode_free(IXML_Node *nodeptr /** The {\bf Node} to free. */ ); -//@} +/*! @} */ /*================================================================ * @@ -649,7 +651,7 @@ ixmlNode_free(IXML_Node *nodeptr * allowable attributes and values for a particular element. For more * information, refer to the {\it Interface Attr} section in the DOM2-Core. */ -//@{ +/*! @{ */ /** Frees an {\bf Attr} node. @@ -662,7 +664,7 @@ ixmlAttr_free(IXML_Attr *attrNode /** The {\bf Attr} node to free. */ ); -//@} +/*! @} */ /*================================================================ @@ -680,7 +682,7 @@ ixmlAttr_free(IXML_Attr *attrNode * information, refer to the {\it Interface CDATASection} section in the * DOM2-Core. */ -//@{ +/*! @{ */ /** Initializes a {\bf CDATASection} node. @@ -704,7 +706,7 @@ ixmlCDATASection_free(IXML_CDATASection *nodeptr /** The {\bf CDATASection} node to free. */ ); -//@} +/*! @} */ /*================================================================ * @@ -719,7 +721,7 @@ ixmlCDATASection_free(IXML_CDATASection *nodeptr * primary interface to the elements of the document. For more information, * refer to the {\it Interface Document} section in the DOM2Core. */ -//@{ +/*! @{ */ /** Initializes a {\bf Document} node. * @@ -947,7 +949,7 @@ ixmlDocument_getElementsByTagName(IXML_Document *doc, /** The tag name to find. */ ); -// introduced in DOM level 2 +/* introduced in DOM level 2 */ /** Creates a new {\bf Element} node in the given qualified name and * namespace URI. @@ -1128,7 +1130,7 @@ ixmlDocument_importNode(IXML_Document* doc, /** A pointer to a new {\bf Node} owned by {\bf doc}. */ ); -//@} +/*! @} */ /*================================================================ * @@ -1144,7 +1146,7 @@ ixmlDocument_importNode(IXML_Document* doc, * extends the {\bf Node} interface and adds more operations to manipulate * attributes. */ -//@{ +/*! @{ */ /** Initializes a {\bf IXML_Element} node. * @@ -1314,7 +1316,7 @@ ixmlElement_getElementsByTagName(IXML_Element* element, search. */ ); -// introduced in DOM 2 +/* introduced in DOM 2 */ /** Retrieves an attribute value using the local name and namespace URI. * @@ -1493,7 +1495,7 @@ ixmlElement_free(IXML_Element* element /** The {\bf Element} to free. */ ); -//@} +/*! @} */ /*================================================================ * @@ -1508,7 +1510,7 @@ ixmlElement_free(IXML_Element* element * no particular order. The {\bf Node} interface uses a {\bf NamedNodeMap} * to maintain the attributes of a node. */ -//@{ +/*! @{ */ /** Returns the number of items contained in this {\bf NamedNodeMap}. * @@ -1579,7 +1581,7 @@ ixmlNamedNodeMap_item(IXML_NamedNodeMap *nnMap, /** The index into the map to remove. */ ); -// introduced in DOM level 2 +/* introduced in DOM level 2 */ /** Retrieves a {\bf Node} from a {\bf NamedNodeMap} specified by * namespace URI and local name. @@ -1646,7 +1648,7 @@ ixmlNamedNodeMap_free(IXML_NamedNodeMap *nnMap /** The {\bf NamedNodeMap to free}. */ ); -//@} +/*! @} */ /*================================================================ * @@ -1661,7 +1663,7 @@ ixmlNamedNodeMap_free(IXML_NamedNodeMap *nnMap * the nodes contained in a {\bf NodeList}. The DOM2-Core refers to * this as being {\it live}. */ -//@{ +/*! @{ */ /** Retrieves a {\bf Node} from a {\bf NodeList} specified by a * numerical index. @@ -1701,8 +1703,8 @@ ixmlNodeList_free(IXML_NodeList *nList /** The {\bf NodeList} to free. */ ); -//@} Interface NodeList -//@} DOM Interfaces +/*! @} */ /* Interface NodeList */ +/*! @} */ /* DOM Interfaces */ /**@name IXML API * The IXML API contains utility functions that are not part of the standard @@ -1710,7 +1712,7 @@ ixmlNodeList_free(IXML_NodeList *nList * file or buffer, create an XML file from a DOM structure, and manipulate * DOMString objects. */ -//@{ +/*! @{ */ /*================================================================ * @@ -1913,6 +1915,7 @@ ixmlFreeDOMString(DOMString buf } #endif -//@} IXML API +/*! @} */ /* IXML API */ + +#endif /* _IXML_H_ */ -#endif // _IXML_H_ diff --git a/threadutil/inc/FreeList.h b/threadutil/inc/FreeList.h index dd56135..e389e65 100644 --- a/threadutil/inc/FreeList.h +++ b/threadutil/inc/FreeList.h @@ -1,33 +1,33 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2000-2003 Intel Corporation -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/******************************************************************************* + * + * Copyright (c) 2000-2003 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ #ifndef FREE_LIST_H #define FREE_LIST_H @@ -36,9 +36,6 @@ extern "C" { #endif -//#include - - #include "ithread.h" #include @@ -52,7 +49,7 @@ extern "C" { *****************************************************************************/ typedef struct FREELISTNODE { - struct FREELISTNODE*next; //pointer to next free node + struct FREELISTNODE *next; } FreeListNode; @@ -65,12 +62,10 @@ typedef struct FREELISTNODE *****************************************************************************/ typedef struct FREELIST { - FreeListNode *head; //head of free list - size_t element_size; //size of elements in free - //list - int maxFreeListLength; //max size of free structures - //to keep - int freeListLength; //current size of free list + FreeListNode *head; + size_t element_size; + int maxFreeListLength; + int freeListLength; }FreeList; @@ -141,4 +136,5 @@ int FreeListDestroy (FreeList *free_list); } #endif -#endif // FREE_LIST_H +#endif /* FREE_LIST_H */ + diff --git a/threadutil/inc/LinkedList.h b/threadutil/inc/LinkedList.h index 2572723..240f975 100644 --- a/threadutil/inc/LinkedList.h +++ b/threadutil/inc/LinkedList.h @@ -1,33 +1,33 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2000-2003 Intel Corporation -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/******************************************************************************* + * + * Copyright (c) 2000-2003 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ #ifndef LINKED_LIST_H #define LINKED_LIST_H @@ -70,9 +70,9 @@ typedef int (*cmp_routine)(void *itemA,void *itemB); *****************************************************************************/ typedef struct LISTNODE { - struct LISTNODE *prev; //previous node - struct LISTNODE *next; //next node - void *item; //item + struct LISTNODE *prev; + struct LISTNODE *next; + void *item; } ListNode; /**************************************************************************** @@ -96,12 +96,12 @@ typedef struct LISTNODE *****************************************************************************/ typedef struct LINKEDLIST { - ListNode head; //head, first item is stored at: head->next - ListNode tail; //tail, last item is stored at: tail->prev - long size; //size of list - FreeList freeNodeList; //free list to use - free_function free_func; //free function to use - cmp_routine cmp_func; //compare function to use + ListNode head; /* head, first item is stored at: head->next */ + ListNode tail; /* tail, last item is stored at: tail->prev */ + long size; /* size of list */ + FreeList freeNodeList; /* free list to use */ + free_function free_func; /* free function to use */ + cmp_routine cmp_func; /* compare function to use */ } LinkedList; /**************************************************************************** @@ -327,4 +327,5 @@ int ListSize(LinkedList* list); } #endif -#endif //LINKED_LIST_H +#endif /* LINKED_LIST_H */ + diff --git a/threadutil/inc/ThreadPool.h b/threadutil/inc/ThreadPool.h index 1f68934..91a0726 100644 --- a/threadutil/inc/ThreadPool.h +++ b/threadutil/inc/ThreadPool.h @@ -1,33 +1,33 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2000-2003 Intel Corporation -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/******************************************************************************* + * + * Copyright (c) 2000-2003 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ #ifndef THREADPOOL_H #define THREADPOOL_H @@ -36,17 +36,17 @@ extern "C" { #endif -//Size of job free list +/* Size of job free list */ #define JOBFREELISTSIZE 100 #define INFINITE_THREADS -1 #define EMAXTHREADS (-8 & 1<<29) -//Invalid Policy +/* Invalid Policy */ #define INVALID_POLICY (-9 & 1<<29) -//Invalid JOB Id +/* Invalid JOB Id */ #define INVALID_JOB_ID (-2 & 1<<29) typedef enum duration {SHORT_TERM,PERSISTENT} Duration; @@ -55,27 +55,27 @@ typedef enum priority {LOW_PRIORITY, MED_PRIORITY, HIGH_PRIORITY} ThreadPriority; -#define DEFAULT_PRIORITY MED_PRIORITY //default priority used by TPJobInit -#define DEFAULT_MIN_THREADS 1 //default minimum used by TPAttrInit -#define DEFAULT_MAX_THREADS 10 //default max used by TPAttrInit -#define DEFAULT_JOBS_PER_THREAD 10 //default jobs per thread used by TPAttrInit -#define DEFAULT_STARVATION_TIME 500 //default starvation time used by TPAttrInit -#define DEFAULT_IDLE_TIME 10 * 1000 //default idle time used by TPAttrInit -#define DEFAULT_FREE_ROUTINE NULL //default free routine used TPJobInit -#define DEFAULT_MAX_JOBS_TOTAL 100 //default max jobs used TPAttrInit +#define DEFAULT_PRIORITY MED_PRIORITY /* default priority used by TPJobInit */ +#define DEFAULT_MIN_THREADS 1 /* default minimum used by TPAttrInit */ +#define DEFAULT_MAX_THREADS 10 /* default max used by TPAttrInit */ +#define DEFAULT_JOBS_PER_THREAD 10 /* default jobs per thread used by TPAttrInit */ +#define DEFAULT_STARVATION_TIME 500 /* default starvation time used by TPAttrInit */ +#define DEFAULT_IDLE_TIME 10 * 1000 /* default idle time used by TPAttrInit */ +#define DEFAULT_FREE_ROUTINE NULL /* default free routine used TPJobInit */ +#define DEFAULT_MAX_JOBS_TOTAL 100 /* default max jobs used TPAttrInit */ -#define STATS 1 //always include stats because code change is minimal +#define STATS 1 /* always include stats because code change is minimal */ -//Statistics -#ifdef WIN32 // todo: check why STATSONLY fails during compilation - #undef STATS +/* Statistics */ +#ifdef WIN32 /* TODO: check why STATSONLY fails during compilation */ + #undef STATS #endif #ifdef STATS - #define STATSONLY(x) x + #define STATSONLY(x) x #else - #define STATSONLY(x) + #define STATSONLY(x) #endif #ifdef _DEBUG @@ -92,7 +92,7 @@ typedef enum priority {LOW_PRIORITY, #define EXPORT typedef int PolicyType; #define DEFAULT_POLICY SCHED_OTHER -#define DEFAULT_SCHED_PARAM 0 //default priority +#define DEFAULT_SCHED_PARAM 0 /* default priority */ /**************************************************************************** * Name: free_routine @@ -111,25 +111,25 @@ typedef void (*free_routine)(void *arg); *****************************************************************************/ typedef struct THREADPOOLATTR { - int minThreads; // minThreads, ThreadPool will always maintain at least - // this many threads + int minThreads; /* minThreads, ThreadPool will always maintain at least + this many threads */ - int maxThreads; // maxThreads, ThreadPool will never have more than this - // number of threads + int maxThreads; /* maxThreads, ThreadPool will never have more than this + number of threads */ - int maxIdleTime; // maxIdleTime (in milliseconds) - // this is the maximum time a thread will remain idle - // before dying + int maxIdleTime; /* maxIdleTime (in milliseconds) + this is the maximum time a thread will remain idle + before dying */ - int jobsPerThread; // jobs per thread to maintain + int jobsPerThread; /* jobs per thread to maintain */ - int maxJobsTotal; // maximum number of jobs that can be queued totally. + int maxJobsTotal; /* maximum number of jobs that can be queued totally. */ - int starvationTime; // the time a low priority or med priority - // job waits before getting bumped - // up a priority (in milliseconds) + int starvationTime; /* the time a low priority or med priority + job waits before getting bumped + up a priority (in milliseconds) */ - PolicyType schedPolicy; // scheduling policy to use + PolicyType schedPolicy; /* scheduling policy to use */ } ThreadPoolAttr; @@ -141,12 +141,12 @@ typedef struct THREADPOOLATTR *****************************************************************************/ typedef struct THREADPOOLJOB { - start_routine func; //function - void *arg; //arg - free_routine free_func; //free function - struct timeb requestTime; //time of request - int priority; //priority of request - int jobId; //id + start_routine func; + void *arg; + free_routine free_func; + struct timeb requestTime; + int priority; + int jobId; } ThreadPoolJob; /**************************************************************************** @@ -156,32 +156,32 @@ typedef struct THREADPOOLJOB * Structure to hold statistics *****************************************************************************/ -STATSONLY( +#ifdef STATS typedef struct TPOOLSTATS { - double totalTimeHQ; //total time spent by all jobs in high priority Q - int totalJobsHQ; //total jobs in HQ run so far - double avgWaitHQ; //average wait in HQ - double totalTimeMQ; //total time spent by all jobs in med priority Q - int totalJobsMQ; //total jobs in MQ run so far - double avgWaitMQ; //average wait in MQ - double totalTimeLQ; //total time spent by all jobs in low priority Q - int totalJobsLQ; //total jobs in LQ run so far - double avgWaitLQ; //average wait in LQ - double totalWorkTime; //total time spent working for all threads - double totalIdleTime; //total time spent idle for all threads - int workerThreads; //number of current workerThreads - int idleThreads; //number of current idle threads - int persistentThreads; //number of persistent threads - int totalThreads; //total number of current threads - int maxThreads; //max threads so far - int currentJobsHQ; // current jobs in Q - int currentJobsLQ; //current jobs in Q - int currentJobsMQ; //current jobs in Q + double totalTimeHQ; + int totalJobsHQ; + double avgWaitHQ; + double totalTimeMQ; + int totalJobsMQ; + double avgWaitMQ; + double totalTimeLQ; + int totalJobsLQ; + double avgWaitLQ; + double totalWorkTime; + double totalIdleTime; + int workerThreads; + int idleThreads; + int persistentThreads; + int totalThreads; + int maxThreads; + int currentJobsHQ; + int currentJobsLQ; + int currentJobsMQ; }ThreadPoolStats; -) +#endif /**************************************************************************** @@ -206,24 +206,26 @@ typedef struct TPOOLSTATS typedef struct THREADPOOL { - ithread_mutex_t mutex; //mutex to protect job qs - ithread_cond_t condition; //condition variable to signal Q - ithread_cond_t start_and_shutdown; //condition variable for start - //and stop - int lastJobId; //ids for jobs - int shutdown; //whether or not we are shutting down - int totalThreads; //total number of threads - int persistentThreads; //number of persistent threads - FreeList jobFreeList; //free list of jobs - LinkedList lowJobQ; //low priority job Q - LinkedList medJobQ; //med priority job Q - LinkedList highJobQ; //high priority job Q - ThreadPoolJob *persistentJob; //persistent job + ithread_mutex_t mutex; /* mutex to protect job qs */ + ithread_cond_t condition; /* condition variable to signal Q */ + ithread_cond_t start_and_shutdown; /* condition variable for start + and stop */ + int lastJobId; /* ids for jobs */ + int shutdown; /* whether or not we are shutting down */ + int totalThreads; /* total number of threads */ + int persistentThreads; /* number of persistent threads */ + FreeList jobFreeList; /* free list of jobs */ + LinkedList lowJobQ; /* low priority job Q */ + LinkedList medJobQ; /* med priority job Q */ + LinkedList highJobQ; /* high priority job Q */ + ThreadPoolJob *persistentJob; /* persistent job */ - ThreadPoolAttr attr; //thread pool attributes + ThreadPoolAttr attr; /* thread pool attributes */ - //statistics - STATSONLY(ThreadPoolStats stats;) +#ifdef STATS + /* statistics */ + ThreadPoolStats stats; +#endif } ThreadPool; @@ -541,12 +543,15 @@ int TPAttrSetMaxJobsTotal(ThreadPoolAttr *attr, int maxJobsTotal); * Returns: * Always returns 0. *****************************************************************************/ -STATSONLY( EXPORT int ThreadPoolGetStats(ThreadPool *tp, ThreadPoolStats *stats);); +#ifdef STATS + EXPORT int ThreadPoolGetStats(ThreadPool *tp, ThreadPoolStats *stats); -STATSONLY(EXPORT void ThreadPoolPrintStats(ThreadPoolStats *stats);); + EXPORT void ThreadPoolPrintStats(ThreadPoolStats *stats); +#endif #ifdef __cplusplus } #endif -#endif //ThreadPool +#endif /* ThreadPool */ + diff --git a/threadutil/inc/TimerThread.h b/threadutil/inc/TimerThread.h index 1659de8..6eb03e2 100644 --- a/threadutil/inc/TimerThread.h +++ b/threadutil/inc/TimerThread.h @@ -1,33 +1,33 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2000-2003 Intel Corporation -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/******************************************************************************* + * + * Copyright (c) 2000-2003 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ #ifndef TIMERTHREAD_H #define TIMERTHREAD_H @@ -43,9 +43,9 @@ extern "C" { #define INVALID_EVENT_ID (-10 & 1<<29) -//Timeout Types -//absolute means in seconds from Jan 1, 1970 -//relative means in seconds from current time +/* Timeout Types */ +/* absolute means in seconds from Jan 1, 1970 */ +/* relative means in seconds from current time */ typedef enum timeoutType {ABS_SEC,REL_SEC} TimeoutType; @@ -63,13 +63,13 @@ typedef enum timeoutType {ABS_SEC,REL_SEC} TimeoutType; *****************************************************************************/ typedef struct TIMERTHREAD { - ithread_mutex_t mutex; //mutex to protect eventQ - ithread_cond_t condition; //condition variable - int lastEventId; //last event id - LinkedList eventQ; //event q - int shutdown; //whether or not we are shutdown - FreeList freeEvents; //FreeList for events - ThreadPool *tp; //ThreadPool to use + ithread_mutex_t mutex; + ithread_cond_t condition; + int lastEventId; + LinkedList eventQ; + int shutdown; + FreeList freeEvents; + ThreadPool *tp; } TimerThread; @@ -85,9 +85,9 @@ typedef struct TIMERTHREAD typedef struct TIMEREVENT { ThreadPoolJob job; - time_t eventTime; //absolute time for event in seconds since Jan 1, 1970 - Duration persistent; //long term or short term job - int id; //id of job + time_t eventTime; /* absolute time for event in seconds since Jan 1, 1970 */ + Duration persistent; /* long term or short term job */ + int id; } TimerEvent; @@ -188,4 +188,5 @@ int TimerThreadShutdown(TimerThread *timer); } #endif -#endif //TIMER_THREAD_H +#endif /* TIMER_THREAD_H */ + diff --git a/threadutil/inc/iasnprintf.h b/threadutil/inc/iasnprintf.h index b4f1331..041fea8 100644 --- a/threadutil/inc/iasnprintf.h +++ b/threadutil/inc/iasnprintf.h @@ -1,33 +1,33 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2000-2003 Intel Corporation -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/******************************************************************************* + * + * Copyright (c) 2000-2003 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ #include diff --git a/threadutil/inc/ithread.h b/threadutil/inc/ithread.h index 48ecd74..90d69f3 100644 --- a/threadutil/inc/ithread.h +++ b/threadutil/inc/ithread.h @@ -1,33 +1,33 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2000-2003 Intel Corporation -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/******************************************************************************* + * + * Copyright (c) 2000-2003 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ #ifndef ITHREADH #define ITHREADH @@ -542,23 +542,23 @@ extern "C" { #define imillisleep(x) usleep(1000*x) #ifdef WIN32 - #ifndef UPNP_STATIC_LIB - #ifdef LIBUPNP_EXPORTS - // set up declspec for dll export to make functions visible to library users - #define EXPORT_SPEC __declspec(dllexport) - #else - #define EXPORT_SPEC __declspec(dllimport) - #endif - #else - #define EXPORT_SPEC - #endif + #ifndef UPNP_STATIC_LIB + #ifdef LIBUPNP_EXPORTS + /* set up declspec for dll export to make functions visible to library users */ + #define EXPORT_SPEC __declspec(dllexport) + #else + #define EXPORT_SPEC __declspec(dllimport) + #endif + #else + #define EXPORT_SPEC + #endif #else - #define EXPORT_SPEC + #define EXPORT_SPEC #endif #ifndef PTHREAD_MUTEX_RECURSIVE -//NK: Added for satisfying the gcc compiler +/* NK: Added for satisfying the gcc compiler */ EXPORT_SPEC int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind); #endif @@ -566,4 +566,5 @@ EXPORT_SPEC int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind } #endif -#endif //ITHREADH +#endif /* ITHREADH */ + diff --git a/upnp/inc/upnp.h b/upnp/inc/upnp.h index 50d1e6c..d47944e 100644 --- a/upnp/inc/upnp.h +++ b/upnp/inc/upnp.h @@ -1,40 +1,40 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2000-2003 Intel Corporation -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/******************************************************************************* + * + * Copyright (c) 2000-2003 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ #ifndef UPNP_H #define UPNP_H /** @name The API */ -//@{ +/*! @{ */ #if defined MYLIB_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64 @@ -57,7 +57,7 @@ #ifdef WIN32 #ifndef UPNP_STATIC_LIB #ifdef LIBUPNP_EXPORTS - // set up declspec for dll export to make functions visible to library users + /* set up declspec for dll export to make functions visible to library users */ #define EXPORT_SPEC __declspec(dllexport) #else #define EXPORT_SPEC __declspec(dllimport) @@ -66,14 +66,14 @@ #define EXPORT_SPEC #endif #ifdef UPNP_USE_MSVCPP - // define some things the M$ VC++ doesn't know + /* define some things the M$ VC++ doesn't know */ #define UPNP_INLINE typedef __int64 int64_t; #define PRId64 "I64d" #define PRIzu "lu" #endif #ifdef UPNP_USE_BCBPP - // define some things Borland Builder doesn't know + /* define some things Borland Builder doesn't know */ #define UPNP_INLINE inline typedef __int64 int64_t; #warning The Borland C compiler is probably broken on PRId64, please someone provide a proper fix here @@ -83,28 +83,28 @@ #else #define EXPORT_SPEC #define UPNP_INLINE inline - // Invented this macro so that we can live a little longer with MSVC lack of C99. + /* Invented this macro so that we can live a little longer with MSVC lack of C99. */ #define PRIzu "zu" #endif -// -// Defining this macro here gives some interesting information about unused -// functions in the code. Of course, this should never go uncommented on a -// release. -// -//#define inline +/* + * Defining this macro here gives some interesting information about unused + * functions in the code. Of course, this should never go uncommented on a + * release. + */ +/*#define inline*/ #ifndef WIN32 - #define UpnpCloseSocket close + #define UpnpCloseSocket close #else - #define UpnpCloseSocket closesocket + #define UpnpCloseSocket closesocket #define fseeko fseek #endif -#define UPNP_SOCKETERROR -1 -#define UPNP_INVALID_SOCKET -1 +#define UPNP_SOCKETERROR -1 +#define UPNP_INVALID_SOCKET -1 #ifndef WIN32 - #define SOCKET int + #define SOCKET int #endif @@ -138,7 +138,7 @@ * code means. Refer to the documentation for each function for a * description of what an error code means in that context. */ -//@{ +/*! @{ */ /** @name UPNP_E_SUCCESS [0] * {\tt UPNP_E_SUCCESS} signifies that the operation completed successfully. @@ -146,35 +146,35 @@ * the operation was successfully transmitted on the network. The result of * the entire operation comes as part of the callback for that operation. */ -//@{ +/*! @{ */ #define UPNP_E_SUCCESS 0 -//@} +/*! @} */ /** @name UPNP_E_INVALID_HANDLE [-100] * {\tt UPNP_E_INVALID_HANDLE} signifies that the handle passed to a * function is not a recognized as a valid handle. */ -//@{ +/*! @{ */ #define UPNP_E_INVALID_HANDLE -100 -//@} +/*! @} */ /** @name UPNP_E_INVALID_PARAM [-101] * {\tt UPNP_E_INVALID_PARAM} signifies that one or more of the parameters * passed to the function is not valid. Refer to the documentation for each * function for more information on the valid ranges of the parameters. */ -//@{ +/*! @{ */ #define UPNP_E_INVALID_PARAM -101 -//@} +/*! @} */ /** @name UPNP_E_OUTOF_HANDLE [-102] * {\tt UPNP_E_OUTOF_HANDLE} signifies that the SDK does not have any * more space for additional handles. The SDK allocates space for only * a few handles in order to conserve memory. */ -//@{ +/*! @{ */ #define UPNP_E_OUTOF_HANDLE -102 -//@} +/*! @} */ #define UPNP_E_OUTOF_CONTEXT -103 @@ -183,9 +183,9 @@ * currently available to complete the operation. Most operations require * some free memory in order to complete their work. */ -//@{ +/*! @{ */ #define UPNP_E_OUTOF_MEMORY -104 -//@} +/*! @} */ /** @name UPNP_E_INIT [-105] * {\tt UPNP_E_INIT} signifies that the SDK has already been @@ -193,9 +193,9 @@ * Any additional initialization attempts simply return this error with * no other ill effects. */ -//@{ +/*! @{ */ #define UPNP_E_INIT -105 -//@} +/*! @} */ #define UPNP_E_BUFFER_TOO_SMALL -106 @@ -204,9 +204,9 @@ * to {\bf UpnpRegisterRootDevice} or {\bf UpnpRegisterRootDevice2} is an * invalid description document. */ -//@{ +/*! @{ */ #define UPNP_E_INVALID_DESC -107 -//@} +/*! @} */ /** @name UPNP_E_INVALID_URL [-108] * {\tt UPNP_E_INVALID_URL} signifies that a URL passed into the function @@ -214,9 +214,9 @@ * URL itself might be malformed (e.g. have invalid characters in it) or * the host might be unreachable. */ -//@{ +/*! @{ */ #define UPNP_E_INVALID_URL -108 -//@} +/*! @} */ #define UPNP_E_INVALID_SID -109 #define UPNP_E_INVALID_DEVICE -110 @@ -227,18 +227,18 @@ * {\bf UpnpAcceptSubscriptionExt} to signify that the device ID/service * ID pair does not refer to a valid service. */ -//@{ +/*! @{ */ #define UPNP_E_INVALID_SERVICE -111 -//@} +/*! @} */ /** @name UPNP_E_BAD_RESPONSE [-113] * {\tt UPNP_E_BAD_RESPONSE} signifies that the response received from the * remote side of a connection is not correct for the protocol. This applies * to the GENA, SOAP, and HTTP protocols. */ -//@{ +/*! @{ */ #define UPNP_E_BAD_RESPONSE -113 -//@} +/*! @} */ #define UPNP_E_BAD_REQUEST -114 @@ -247,26 +247,26 @@ * invalid. This can be because the DOM document passed to the function was * malformed or the action message is not correct for the given action. */ -//@{ +/*! @{ */ #define UPNP_E_INVALID_ACTION -115 -//@} +/*! @} */ /** @name UPNP_E_FINISH [-116] * {\tt UPNP_E_FINISH} signifies that {\bf UpnpInit} has not been called, or * that {\bf UpnpFinish} has already been called. None of the API functions * operate until {\bf UpnpInit} successfully completes. */ -//@{ +/*! @{ */ #define UPNP_E_FINISH -116 -//@} +/*! @} */ /** @name UPNP_E_INIT_FAILED [-117] * {\tt UPNP_E_INIT_FAILED} signifies that {\bf UpnpInit} cannot complete. * The typical reason is failure to allocate sufficient resources. */ -//@{ +/*! @{ */ #define UPNP_E_INIT_FAILED -117 -//@} +/*! @} */ /** @name UPNP_E_URL_TOO_BIG [-118] * {\tt UPNP_E_URL_TOO_BIG} signifies that the URL passed into a function @@ -282,18 +282,18 @@ * message (e.g. {\bf UpnpSubscribe}), GENA event notifications (e.g. {\bf * UpnpNotify}), and HTTP transfers (e.g. {\bf UpnpDownloadXmlDoc}). */ -//@{ +/*! @{ */ #define UPNP_E_BAD_HTTPMSG -119 -//@} +/*! @} */ /** @name UPNP_E_ALREADY_REGISTERED [-120] * {\tt UPNP_E_ALREADY_REGISTERED} signifies that a client or a device is * already registered. The SDK currently has a limit of one registered * client and one registered device per process. */ -//@{ +/*! @{ */ #define UPNP_E_ALREADY_REGISTERED -120 -//@} +/*! @} */ /** @name UPNP_E_NETWORK_ERROR [-200] * {\tt UPNP_E_NETWORK_ERROR} signifies that a network error occurred. It @@ -302,9 +302,9 @@ * failed to read the local IP address or had problems configuring one of * the sockets. */ -//@{ +/*! @{ */ #define UPNP_E_NETWORK_ERROR -200 -//@} +/*! @} */ /** @name UPNP_E_SOCKET_WRITE [-201] * {\tt UPNP_E_SOCKET_WRITE} signifies an error writing to a socket. This @@ -313,9 +313,9 @@ * control (e.g. {\bf UpnpSendAction}), eventing (e.g. {\bf UpnpNotify}), * and HTTP functions (e.g. {\bf UpnpDownloadXmlDoc}). */ -//@{ +/*! @{ */ #define UPNP_E_SOCKET_WRITE -201 -//@} +/*! @} */ /** @name UPNP_E_SOCKET_READ [-202] * {\tt UPNP_E_SOCKET_READ} signifies an error reading from a socket. This @@ -324,9 +324,9 @@ * control (e.g. {\bf UpnpSendAction}), eventing (e.g. {\bf UpnpNotify}), * and HTTP functions (e.g. {\bf UpnpDownloadXmlDoc}). */ -//@{ +/*! @{ */ #define UPNP_E_SOCKET_READ -202 -//@} +/*! @} */ /** @name UPNP_E_SOCKET_BIND [-203] * {\tt UPNP_E_SOCKET_BIND} signifies that the SDK had a problem binding @@ -336,9 +336,9 @@ * (e.g. {\bf UpnpNotify}), and HTTP functions (e.g. * {\bf UpnpDownloadXmlDoc}). */ -//@{ +/*! @{ */ #define UPNP_E_SOCKET_BIND -203 -//@} +/*! @} */ /** @name UPNP_E_SOCKET_CONNECT [-204] * {\tt UPNP_E_SOCKET_CONNECT} signifies that the SDK had a problem @@ -348,9 +348,9 @@ * (e.g. {\bf UpnpNotify}), and HTTP functions (e.g. * {\bf UpnpDownloadXmlDoc}). */ -//@{ +/*! @{ */ #define UPNP_E_SOCKET_CONNECT -204 -//@} +/*! @} */ /** @name UPNP_E_OUTOF_SOCKET [-205] * {\tt UPNP_E_OUTOF_SOCKET} signifies that the SDK cannot create any @@ -360,36 +360,36 @@ * (e.g. {\bf UpnpNotify}), and HTTP functions (e.g. * {\bf UpnpDownloadXmlDoc}). */ -//@{ +/*! @{ */ #define UPNP_E_OUTOF_SOCKET -205 -//@} +/*! @} */ /** @name UPNP_E_LISTEN [-206] * {\tt UPNP_E_LISTEN} signifies that the SDK had a problem setting the * socket to listen for incoming connections. This error only happens during * initialization (i.e. {\bf UpnpInit}). */ -//@{ +/*! @{ */ #define UPNP_E_LISTEN -206 -//@} +/*! @} */ /** @name UPNP_E_TIMEDOUT [-207] * {\tt UPNP_E_TIMEDOUT} signifies that too much time elapsed before the * required number of bytes were sent or received over a socket. This error * can be returned by any function that performs network operations. */ -//@{ +/*! @{ */ #define UPNP_E_TIMEDOUT -207 -//@} +/*! @} */ /** @name UPNP_E_SOCKET_ERROR [-208] * {\tt UPNP_E_SOCKET_ERROR} is the generic socket error code for * conditions not covered by other error codes. This error can be returned * by any function that performs network operations. */ -//@{ +/*! @{ */ #define UPNP_E_SOCKET_ERROR -208 -//@} +/*! @} */ #define UPNP_E_FILE_WRITE_ERROR -209 @@ -398,9 +398,9 @@ * error can be returned by any function that allows for external * cancelation. */ -//@{ +/*! @{ */ #define UPNP_E_CANCELED -210 -//@} +/*! @} */ #define UPNP_E_EVENT_PROTOCOL -300 @@ -408,58 +408,58 @@ * {\tt UPNP_E_SUBSCRIBE_UNACCEPTED} signifies that a subscription * request was rejected from the remote side. */ -//@{ +/*! @{ */ #define UPNP_E_SUBSCRIBE_UNACCEPTED -301 -//@} +/*! @} */ /** @name UPNP_E_UNSUBSCRIBE_UNACCAPTED [-302] * {\tt UPNP_E_UNSUBSCRIBE_UNACCEPTED} signifies that an unsubscribe * request was rejected from the remote side. */ -//@{ +/*! @{ */ #define UPNP_E_UNSUBSCRIBE_UNACCEPTED -302 -//@} +/*! @} */ /** @name UPNP_E_NOTIFY_UNACCEPTED [-303] * {\tt UPNP_E_NOTIFY_UNACCEPTED} signifies that the remote host did not * accept the notify sent from the local device. */ -//@{ +/*! @{ */ #define UPNP_E_NOTIFY_UNACCEPTED -303 -//@} +/*! @} */ /** @name UPNP_E_INVALID_ARGUMENT [-501] * {\tt UPNP_E_INVALID_ARGUMENT} signifies that one or more of the parameters * passed to a function is invalid. Refer to the individual function * descriptions for the acceptable ranges for parameters. */ -//@{ +/*! @{ */ #define UPNP_E_INVALID_ARGUMENT -501 -//@} +/*! @} */ /** @name UPNP_E_FILE_NOT_FOUND [-502] * {\tt UPNP_E_FILE_NOT_FOUND} signifies that the filename passed * to one of the device registration functions was not found or was not * accessible. */ -//@{ +/*! @{ */ #define UPNP_E_FILE_NOT_FOUND -502 -//@} +/*! @} */ /** @name UPNP_E_FILE_READ_ERROR [-503] * {\tt UPNP_E_FILE_READ_ERROR} signifies an error when reading a file. */ -//@{ +/*! @{ */ #define UPNP_E_FILE_READ_ERROR -503 -//@} +/*! @} */ /** @name UPNP_E_EXT_NOT_XML [-504] * {\tt UPNP_E_EXT_NOT_XML} signifies that the file name of the description * document passed to {\bf UpnpRegisterRootDevice2} does not end in ".xml". */ -//@{ +/*! @{ */ #define UPNP_E_EXT_NOT_XML -504 -//@} +/*! @} */ #define UPNP_E_NO_WEB_SERVER -505 #define UPNP_E_OUTOF_BOUNDS -506 @@ -468,26 +468,26 @@ * {\tt UPNP_E_NOT_FOUND} signifies that the response to a SOAP request * did not contain the required XML constructs. */ -//@{ +/*! @{ */ #define UPNP_E_NOT_FOUND -507 -//@} +/*! @} */ /** @name UPNP_E_INTERNAL_ERROR [-911] * {\tt UPNP_E_INTERNAL_ERROR} is the generic error code for internal * conditions not covered by other error codes. */ -//@{ +/*! @{ */ #define UPNP_E_INTERNAL_ERROR -911 -//@} +/*! @} */ -// SOAP-related error codes +/* SOAP-related error codes */ #define UPNP_SOAP_E_INVALID_ACTION 401 #define UPNP_SOAP_E_INVALID_ARGS 402 #define UPNP_SOAP_E_OUT_OF_SYNC 403 #define UPNP_SOAP_E_INVALID_VAR 404 #define UPNP_SOAP_E_ACTION_FAILED 501 -//@} +/*! @} */ #ifndef OUT #define OUT @@ -505,8 +505,8 @@ enum UpnpOpenFileMode{UPNP_READ, UPNP_WRITE}; -/// @name Constants, Structures, and Types -//@{ +/*! @name Constants, Structures, and Types */ +/*! @{ */ /** Returned when a control point application registers with {\bf * UpnpRegisterClient}. Client handles can only be used with @@ -529,9 +529,9 @@ typedef int UpnpDevice_Handle; enum Upnp_EventType_e { - // - // Control callbacks - // + /* + * Control callbacks + */ /** Received by a device when a control point issues a control * request. The {\bf Event} parameter contains a pointer to a {\bf @@ -559,9 +559,9 @@ enum Upnp_EventType_e { UPNP_CONTROL_GET_VAR_COMPLETE, - // - // Discovery callbacks - // + /* + * Discovery callbacks + */ /** Received by a control point when a new device or service is available. * The {\bf Event} parameter contains a pointer to a {\bf @@ -590,9 +590,9 @@ enum Upnp_EventType_e { UPNP_DISCOVERY_SEARCH_TIMEOUT, - // - // Eventing callbacks - // + /* + * Eventing callbacks + */ /** Received by a device when a subscription arrives. * The {\bf Event} parameter contains a pointer to a {\bf @@ -823,10 +823,10 @@ struct Upnp_Event }; -// -// This typedef is required by Doc++ to parse the last entry of the -// Upnp_Discovery structure correctly. -// +/* + * This typedef is required by Doc++ to parse the last entry of the + * Upnp_Discovery structure correctly. + */ typedef struct sockaddr_in SOCKADDRIN; @@ -1071,14 +1071,14 @@ typedef int (*Upnp_FunPtr) ( IN void *Cookie ); -//@} // Constants, Structures, and Types +/*! @} */ /* Constants, Structures, and Types */ #ifdef __cplusplus extern "C" { -#endif // __cplusplus +#endif /* __cplusplus */ -///@name Initialization and Registration -//@{ +/*! @name Initialization and Registration */ +/*! @{ */ /** Initializes the Linux SDK for UPnP Devices. This function must be called * before any other API function can be called. It should be called * only once. Subsequent calls to this API return a {\tt UPNP_E_INIT} @@ -1389,18 +1389,18 @@ EXPORT_SPEC int UpnpSetMaxContentLength( for incoming SOAP actions, in bytes. */ ); -//@} // Initialization and Registration +/*! @} */ /* Initialization and Registration */ -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// -// // -// D I S C O V E R Y // -// // -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// +/****************************************************************************** + ****************************************************************************** + * * + * D I S C O V E R Y * + * * + ****************************************************************************** + ******************************************************************************/ -///@name Discovery -//@{ +/*! @name Discovery */ +/*! @{ */ /** {\bf UpnpSearchAsync} searches for devices matching the given * search target. The function returns immediately and the SDK @@ -1459,18 +1459,18 @@ EXPORT_SPEC int UpnpSendAdvertisement( the announcements. */ ); -//@} // Discovery +/*! @} */ /* Discovery */ -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// -// // -// C O N T R O L // -// // -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// +/****************************************************************************** + ****************************************************************************** + * * + * C O N T R O L * + * * + ****************************************************************************** + ******************************************************************************/ -///@name Control -//@{ +/*! @name Control */ +/*! @{ */ /** {\bf UpnpGetServiceVarStatus} queries the state of a state * variable of a service on another device. This is a synchronous call. @@ -1693,18 +1693,18 @@ EXPORT_SPEC int UpnpSendActionExAsync( passed to the callback when invoked. */ ); -//@} // Control +/*! @} */ /* Control */ -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// -// // -// E V E N T I N G // -// // -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// +/****************************************************************************** + ****************************************************************************** + * * + * E V E N T I N G * + * * + ****************************************************************************** + ******************************************************************************/ -///@name Eventing -//@{ +/*! @name Eventing */ +/*! @{ */ /** {\bf UpnpAcceptSubscription} accepts a subscription request and sends * out the current state of the eventable variables for a service. @@ -2207,19 +2207,19 @@ EXPORT_SPEC int UpnpUnSubscribeAsync( callback function when invoked. */ ); -//@} // Eventing +/*! @} */ /* Eventing */ -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// -// // -// C L I E N T - A P I // -// // -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// +/****************************************************************************** + ****************************************************************************** + * * + * C L I E N T - A P I * + * * + ****************************************************************************** + ******************************************************************************/ -///@name Control Point HTTP API -//@{ +/*! @name Control Point HTTP API */ +/*! @{ */ /** {\bf UpnpDownloadUrlItem} downloads a file specified in a URL. * The SDK allocates the memory for {\bf outBuf} and the @@ -2612,18 +2612,18 @@ EXPORT_SPEC int UpnpDownloadXmlDoc( XML document. */ ); -//@} // Control Point HTTP API +/*! @} */ /* Control Point HTTP API */ -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// -// // -// W E B S E R V E R A P I // -// // -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// +/****************************************************************************** + ****************************************************************************** + * * + * W E B S E R V E R A P I * + * * + ****************************************************************************** + ******************************************************************************/ -///@name Web Server API -//@{ +/*! @name Web Server API */ +/*! @{ */ /** {\bf UpnpSetWebServerRootDir} sets the document root directory for * the internal web server. This directory is considered the @@ -2739,13 +2739,13 @@ EXPORT_SPEC void UpnpFree( IN void *item /* The item to free. */ ); -//@} // Web Server API +/*! @} */ /* Web Server API */ #ifdef __cplusplus } -#endif // __cplusplus +#endif /* __cplusplus */ -//@} The API +/*! @} */ /* The API */ #endif diff --git a/upnp/inc/upnpconfig.h.in b/upnp/inc/upnpconfig.h.in index 309f763..b729f43 100644 --- a/upnp/inc/upnpconfig.h.in +++ b/upnp/inc/upnpconfig.h.in @@ -1,34 +1,34 @@ -// -*- C -*- -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006 Rémi Turboult -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/* -*- C -*- */ +/******************************************************************************* + * + * Copyright (c) 2006 Rémi Turboult + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ #ifndef UPNP_CONFIG_H #define UPNP_CONFIG_H @@ -91,6 +91,5 @@ #undef UPNP_HAVE_TOOLS -#endif // UPNP_CONFIG_H - +#endif /* UPNP_CONFIG_H */ diff --git a/upnp/inc/upnpdebug.h b/upnp/inc/upnpdebug.h index 007f6e4..97c9534 100644 --- a/upnp/inc/upnpdebug.h +++ b/upnp/inc/upnpdebug.h @@ -1,34 +1,34 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2000-2003 Intel Corporation -// Copyright (c) 2006 Rémi Turboult -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/******************************************************************************* + * + * Copyright (c) 2000-2003 Intel Corporation + * Copyright (c) 2006 Rémi Turboult + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ #ifndef UPNP_DEBUG_H #define UPNP_DEBUG_H @@ -47,7 +47,7 @@ extern "C" { The UPnP SDK contains other features to aid in debugging. */ -//@{ +/*! @{ */ /** @name Upnp_LogLevel * The user has the option to select 4 different types of debugging levels, @@ -79,17 +79,14 @@ typedef enum Upnp_Module { HTTP } Dbg_Module; -//@{ +/*! @{ */ typedef enum Upnp_LogLevel_e { UPNP_CRITICAL, UPNP_PACKET, UPNP_INFO, UPNP_ALL } Upnp_LogLevel; -//@} - -// for backward compatibility -#define Dbg_Level Upnp_LogLevel +/*! @} */ /** @@ -117,9 +114,6 @@ int UpnpInitLog(); static UPNP_INLINE int UpnpInitLog() { return UPNP_E_SUCCESS; } #endif -// for backward compatibility -#define InitLog UpnpInitLog - /*************************************************************************** * Function : UpnpSetLogLevel @@ -152,9 +146,6 @@ void UpnpCloseLog(); static UPNP_INLINE void UpnpCloseLog() {} #endif -// for backward compatibility -#define CloseLog UpnpCloseLog - /*************************************************************************** * Function : UpnpSetLogFileNames @@ -180,15 +171,12 @@ static UPNP_INLINE void UpnpSetLogFileNames( const char *InfoFileName) {} #endif -// for backward compatibility -#define SetLogFileNames UpnpSetLogFileNames - /*************************************************************************** * Function : UpnpGetDebugFile * * Parameters: - * IN Dbg_Level DLevel: The level of the debug logging. It will decide + * IN Upnp_LogLevel 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 @@ -209,15 +197,12 @@ static UPNP_INLINE FILE *UpnpGetDebugFile(Upnp_LogLevel level, Dbg_Module module } #endif -// for backward compatibility -#define GetDebugFile UpnpGetDebugFile - /*************************************************************************** * Function : DebugAtThisLevel * * Parameters: - * IN Dbg_Level DLevel: The level of the debug logging. It will decide + * IN Upnp_LogLevel 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 @@ -243,7 +228,7 @@ static UPNP_INLINE int DebugAtThisLevel( * Function : UpnpPrintf * * Parameters: - * IN Dbg_Level DLevel: The level of the debug logging. It will decide + * IN Upnp_LogLevel 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 @@ -335,11 +320,11 @@ static UPNP_INLINE void UpnpDisplayFileAndLine( int DbgLineNo) {} #endif -//@} +/*! @} */ #ifdef __cplusplus } #endif -#endif // UPNP_DEBUG_H +#endif /* UPNP_DEBUG_H */ diff --git a/upnp/inc/upnptools.h b/upnp/inc/upnptools.h index 2d785d7..4b51758 100644 --- a/upnp/inc/upnptools.h +++ b/upnp/inc/upnptools.h @@ -1,33 +1,33 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2000-2003 Intel Corporation -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither name of Intel Corporation nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// +/******************************************************************************* + * + * Copyright (c) 2000-2003 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ******************************************************************************/ /** @name Optional Tool APIs * The Linux SDK for UPnP Devices contains some additional, optional @@ -36,14 +36,14 @@ * size in the SDK. Refer to the README for details. */ -//@{ +/*! @{ */ #ifndef UPNP_TOOLS_H #define UPNP_TOOLS_H #include "upnp.h" -// Function declarations only if tools compiled into the library +/* Function declarations only if tools compiled into the library */ #if UPNP_HAVE_TOOLS #ifdef __cplusplus @@ -217,14 +217,13 @@ EXPORT_SPEC const char * UpnpGetErrorMessage( int errorcode /** The SDK error code to convert. */ ); -//@} +/*! @} */ #ifdef __cplusplus } #endif -#endif // UPNP_HAVE_TOOLS - -#endif // UPNP_TOOLS_H +#endif /* UPNP_HAVE_TOOLS */ +#endif /* UPNP_TOOLS_H */ diff --git a/upnp/src/api/upnpapi.c b/upnp/src/api/upnpapi.c index 7072ba1..3e62bd8 100644 --- a/upnp/src/api/upnpapi.c +++ b/upnp/src/api/upnpapi.c @@ -423,7 +423,7 @@ UpnpFinish() ThreadPoolGetStats( &gSendThreadPool, &stats ); PrintThreadPoolStats(__FILE__, __LINE__, "Send Thread Pool", &stats); - CloseLog(); + UpnpCloseLog(); #endif #ifdef INCLUDE_CLIENT_APIS diff --git a/upnp/src/api/upnpdebug.c b/upnp/src/api/upnpdebug.c index 708fcad..6748fa7 100644 --- a/upnp/src/api/upnpdebug.c +++ b/upnp/src/api/upnpdebug.c @@ -157,7 +157,7 @@ UpnpCloseLog() * Function : DebugAtThisLevel * * Parameters: - * IN Dbg_Level DLevel: The level of the debug logging. It will decide + * IN Upnp_LogLevel 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 @@ -193,7 +193,7 @@ int DebugAtThisLevel( * Function : UpnpPrintf * * Parameters: - * IN Dbg_Level DLevel: The level of the debug logging. It will decide + * IN Upnp_LogLevel 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 @@ -256,7 +256,7 @@ void UpnpPrintf( * Function : UpnpGetDebugFile * * Parameters: - * IN Dbg_Level DLevel: The level of the debug logging. It will decide + * IN Upnp_LogLevel 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 diff --git a/upnp/src/genlib/service_table/service_table.c b/upnp/src/genlib/service_table/service_table.c index 5ad33d7..20d5a88 100644 --- a/upnp/src/genlib/service_table/service_table.c +++ b/upnp/src/genlib/service_table/service_table.c @@ -433,7 +433,7 @@ FindServiceControlURLPath( service_table * table, * * Parameters : * service_info *service ;Service whose information is to be printed -* Dbg_Level level ; Debug level specified to the print function +* Upnp_LogLevel level ; Debug level specified to the print function * Dbg_Module module ; Debug module specified to the print function * * Description : For debugging purposes prints information from the @@ -446,7 +446,7 @@ FindServiceControlURLPath( service_table * table, #ifdef DEBUG void printService( service_info *service, - Dbg_Level level, + Upnp_LogLevel level, Dbg_Module module ) { if( service ) { @@ -490,7 +490,7 @@ void printService( * * Parameters : * service_info *service ; Service whose information is to be printed -* Dbg_Level level ; Debug level specified to the print function +* Upnp_LogLevel level ; Debug level specified to the print function * Dbg_Module module ; Debug module specified to the print function * * Description : For debugging purposes prints information of each @@ -503,7 +503,7 @@ void printService( #ifdef DEBUG void printServiceList( service_info * service, - Dbg_Level level, + Upnp_LogLevel level, Dbg_Module module ) { while( service ) { @@ -548,7 +548,7 @@ void printServiceList( * * Parameters : * service_table * table ; Service table to be printed -* Dbg_Level level ; Debug level specified to the print function +* Upnp_LogLevel level ; Debug level specified to the print function * Dbg_Module module ; Debug module specified to the print function * * Description : For debugging purposes prints the URL base of the table @@ -562,7 +562,7 @@ void printServiceList( #ifdef DEBUG void printServiceTable( service_table * table, - Dbg_Level level, + Upnp_LogLevel level, Dbg_Module module ) { UpnpPrintf( level, module, __FILE__, __LINE__, diff --git a/upnp/src/inc/http_client.h b/upnp/src/inc/http_client.h index fe57b34..1f45073 100644 --- a/upnp/src/inc/http_client.h +++ b/upnp/src/inc/http_client.h @@ -217,14 +217,14 @@ EXTERN_C int remove_dots(char * in, int size); #ifdef DEBUG EXTERN_C void print_http_request( http_message *message, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo); #else static inline void print_http_request( http_message *message, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo) {} @@ -233,14 +233,14 @@ static inline void print_http_request( #ifdef DEBUG EXTERN_C void print_http_response( http_message *message, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo); #else static inline void print_http_response( http_message *message, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo) {} @@ -249,14 +249,14 @@ static inline void print_http_response( #ifdef DEBUG EXTERN_C void print_token( token *in, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo); #else static inline void print_token( token *in, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo) {} @@ -265,14 +265,14 @@ static inline void print_token( #ifdef DEBUG EXTERN_C void print_status_line( http_status *in, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo); #else static inline void print_status_line( http_status *in, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo) {} @@ -281,14 +281,14 @@ static inline void print_status_line( #ifdef DEBUG EXTERN_C void print_request_line( http_request *in, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo); #else static inline void print_request_line( http_request *in, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo) {} @@ -297,14 +297,14 @@ static inline void print_request_line( #ifdef DEBUG EXTERN_C void print_uri( uri_type *in, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo); #else static inline void print_uri( uri_type *in, - Dbg_Level DLevel, + Upnp_LogLevel DLevel, Dbg_Module Module, char *DbgFileName, int DbgLineNo) {} diff --git a/upnp/src/inc/service_table.h b/upnp/src/inc/service_table.h index f15ed89..001893d 100644 --- a/upnp/src/inc/service_table.h +++ b/upnp/src/inc/service_table.h @@ -253,7 +253,7 @@ service_info * FindServiceControlURLPath( service_table *table, * * Parameters : * service_info *service ;Service whose information is to be printed -* Dbg_Level level ; Debug level specified to the print function +* Upnp_LogLevel level ; Debug level specified to the print function * Dbg_Module module ; Debug module specified to the print function * * Description : For debugging purposes prints information from the @@ -266,12 +266,12 @@ service_info * FindServiceControlURLPath( service_table *table, #ifdef DEBUG void printService( service_info *service, - Dbg_Level level, + Upnp_LogLevel level, Dbg_Module module); #else static UPNP_INLINE void printService( service_info *service, - Dbg_Level level, + Upnp_LogLevel level, Dbg_Module module) {} #endif @@ -280,7 +280,7 @@ static UPNP_INLINE void printService( * * Parameters : * service_info *service ; Service whose information is to be printed -* Dbg_Level level ; Debug level specified to the print function +* Upnp_LogLevel level ; Debug level specified to the print function * Dbg_Module module ; Debug module specified to the print function * * Description : For debugging purposes prints information of each @@ -293,12 +293,12 @@ static UPNP_INLINE void printService( #ifdef DEBUG void printServiceList( service_info *service, - Dbg_Level level, + Upnp_LogLevel level, Dbg_Module module); #else static UPNP_INLINE void printServiceList( service_info *service, - Dbg_Level level, + Upnp_LogLevel level, Dbg_Module module) {} #endif @@ -307,7 +307,7 @@ static UPNP_INLINE void printServiceList( * * Parameters : * service_table * table ; Service table to be printed -* Dbg_Level level ; Debug level specified to the print function +* Upnp_LogLevel level ; Debug level specified to the print function * Dbg_Module module ; Debug module specified to the print function * * Description : For debugging purposes prints the URL base of the table @@ -321,12 +321,12 @@ static UPNP_INLINE void printServiceList( #ifdef DEBUG void printServiceTable( service_table *table, - Dbg_Level level, + Upnp_LogLevel level, Dbg_Module module); #else static UPNP_INLINE void printServiceTable( service_table *table, - Dbg_Level level, + Upnp_LogLevel level, Dbg_Module module) {} #endif