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