More doxygen. Now some gena files are documented.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@394 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
parent
d0d4a0631a
commit
a8521c09cf
4
Doxyfile
4
Doxyfile
@ -995,7 +995,7 @@ ENABLE_PREPROCESSING = YES
|
|||||||
# compilation will be performed. Macro expansion can be done in a controlled
|
# compilation will be performed. Macro expansion can be done in a controlled
|
||||||
# way by setting EXPAND_ONLY_PREDEF to YES.
|
# way by setting EXPAND_ONLY_PREDEF to YES.
|
||||||
|
|
||||||
MACRO_EXPANSION = NO
|
MACRO_EXPANSION = YES
|
||||||
|
|
||||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||||
# then the macro expansion is limited to the macros specified with the
|
# then the macro expansion is limited to the macros specified with the
|
||||||
@ -1029,7 +1029,7 @@ INCLUDE_FILE_PATTERNS =
|
|||||||
# undefined via #undef or recursively expanded use the := operator
|
# undefined via #undef or recursively expanded use the := operator
|
||||||
# instead of the = operator.
|
# instead of the = operator.
|
||||||
|
|
||||||
PREDEFINED = DEBUG
|
PREDEFINED = DEBUG INCLUDE_DEVICE_APIS INCLUDE_CLIENT_APIS EXCLUDE_GENA=0
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
||||||
# this tag can be used to specify a list of macro names that should be expanded.
|
# this tag can be used to specify a list of macro names that should be expanded.
|
||||||
|
@ -1295,14 +1295,13 @@ EXPORT_SPEC int UpnpSendAdvertisement(
|
|||||||
* \brief Queries the state of a state variable of a service on another device.
|
* \brief Queries the state of a state variable of a service on another device.
|
||||||
*
|
*
|
||||||
* \deprecated
|
* \deprecated
|
||||||
|
* <b>The use of this function is deprecated by the UPnP Forum</b>.
|
||||||
*
|
*
|
||||||
* This is a synchronous call.
|
* This is a synchronous call.
|
||||||
*
|
*
|
||||||
* A positive return value indicates a SOAP error code, whereas a negative
|
* A positive return value indicates a SOAP error code, whereas a negative
|
||||||
* return code indicates an SDK error code.
|
* return code indicates an SDK error code.
|
||||||
*
|
*
|
||||||
* <b>Note that the use of this function is deprecated by the UPnP Forum</b>.
|
|
||||||
*
|
|
||||||
* \return An integer representing one of the following:
|
* \return An integer representing one of the following:
|
||||||
* \li \c UPNP_E_SUCCESS: The operation completed successfully.
|
* \li \c UPNP_E_SUCCESS: The operation completed successfully.
|
||||||
* \li \c UPNP_E_INVALID_HANDLE: The handle is not a valid control
|
* \li \c UPNP_E_INVALID_HANDLE: The handle is not a valid control
|
||||||
@ -1335,8 +1334,7 @@ EXPORT_SPEC int UpnpGetServiceVarStatus(
|
|||||||
* when the operation is complete.
|
* when the operation is complete.
|
||||||
*
|
*
|
||||||
* \deprecated
|
* \deprecated
|
||||||
*
|
* <b>The use of this function is deprecated by the UPnP Forum</b>.
|
||||||
* <b>Note that the use of this function is deprecated by the UPnP Forum</b>.
|
|
||||||
*
|
*
|
||||||
* \return An integer representing one of the following:
|
* \return An integer representing one of the following:
|
||||||
* \li \c UPNP_E_SUCCESS: The operation completed successfully.
|
* \li \c UPNP_E_SUCCESS: The operation completed successfully.
|
||||||
|
@ -33,6 +33,11 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \file
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#if EXCLUDE_GENA == 0
|
#if EXCLUDE_GENA == 0
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
|
|
||||||
|
@ -33,6 +33,11 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \file
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#if EXCLUDE_GENA == 0
|
#if EXCLUDE_GENA == 0
|
||||||
#ifdef INCLUDE_DEVICE_APIS
|
#ifdef INCLUDE_DEVICE_APIS
|
||||||
|
|
||||||
@ -82,8 +87,8 @@ int genaUnregisterDevice(
|
|||||||
*
|
*
|
||||||
* \return UPNP_E_SUCCESS if successful else returns GENA_E_BAD_HANDLE.
|
* \return UPNP_E_SUCCESS if successful else returns GENA_E_BAD_HANDLE.
|
||||||
*
|
*
|
||||||
* \note XML_VERSION comment is NOT sent due to interop issues with other
|
* \note The XML_VERSION comment is NOT sent due to interoperability issues
|
||||||
* UPnP vendors.
|
* with other UPnP vendors.
|
||||||
*/
|
*/
|
||||||
static int GeneratePropertySet(
|
static int GeneratePropertySet(
|
||||||
/*! [in] Array of variable names (go in the event notify). */
|
/*! [in] Array of variable names (go in the event notify). */
|
||||||
@ -95,45 +100,44 @@ static int GeneratePropertySet(
|
|||||||
/*! [out] PropertySet node in the string format. */
|
/*! [out] PropertySet node in the string format. */
|
||||||
OUT DOMString *out)
|
OUT DOMString *out)
|
||||||
{
|
{
|
||||||
char *buffer;
|
char *buffer;
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
int temp_counter = 0;
|
int temp_counter = 0;
|
||||||
|
|
||||||
//size+=strlen(XML_VERSION); the XML_VERSION is not interopeable with
|
/*size += strlen(XML_VERSION);*/
|
||||||
//other vendors
|
size += strlen(XML_PROPERTYSET_HEADER);
|
||||||
size += strlen( XML_PROPERTYSET_HEADER );
|
size += strlen("</e:propertyset>\n\n");
|
||||||
size += strlen( "</e:propertyset>\n\n" );
|
for (temp_counter = 0, counter = 0; counter < count; counter++) {
|
||||||
|
size += strlen( "<e:property>\n</e:property>\n" );
|
||||||
|
size += 2 * strlen(names[counter]) +
|
||||||
|
strlen(values[counter]) +
|
||||||
|
strlen("<></>\n");
|
||||||
|
}
|
||||||
|
|
||||||
for( temp_counter = 0, counter = 0; counter < count; counter++ ) {
|
buffer = (char *)malloc(size + 1);
|
||||||
size += strlen( "<e:property>\n</e:property>\n" );
|
if (buffer == NULL) {
|
||||||
size +=
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
( 2 * strlen( names[counter] ) + strlen( values[counter] ) +
|
}
|
||||||
( strlen( "<></>\n" ) ) );
|
memset(buffer, 0, size + 1);
|
||||||
|
/*
|
||||||
|
strcpy(buffer,XML_VERSION);
|
||||||
|
strcat(buffer, XML_PROPERTYSET_HEADER);
|
||||||
|
*/
|
||||||
|
strcpy(buffer, XML_PROPERTYSET_HEADER);
|
||||||
|
for (counter = 0; counter < count; counter++) {
|
||||||
|
strcat(buffer, "<e:property>\n");
|
||||||
|
sprintf(&buffer[strlen(buffer)],
|
||||||
|
"<%s>%s</%s>\n</e:property>\n",
|
||||||
|
names[counter],
|
||||||
|
values[counter],
|
||||||
|
names[counter]);
|
||||||
|
}
|
||||||
|
strcat(buffer, "</e:propertyset>\n\n");
|
||||||
|
*out = ixmlCloneDOMString(buffer);
|
||||||
|
free(buffer);
|
||||||
|
|
||||||
}
|
return XML_SUCCESS;
|
||||||
buffer = ( char * )malloc( size + 1 );
|
|
||||||
|
|
||||||
if( buffer == NULL ) {
|
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
|
||||||
}
|
|
||||||
memset( buffer, 0, size + 1 );
|
|
||||||
|
|
||||||
//strcpy(buffer,XML_VERSION); the XML_VERSION is not interopeable with
|
|
||||||
//other vendors
|
|
||||||
strcpy( buffer, XML_PROPERTYSET_HEADER );
|
|
||||||
|
|
||||||
for( counter = 0; counter < count; counter++ ) {
|
|
||||||
strcat( buffer, "<e:property>\n" );
|
|
||||||
sprintf( &buffer[strlen( buffer )],
|
|
||||||
"<%s>%s</%s>\n</e:property>\n", names[counter],
|
|
||||||
values[counter], names[counter] );
|
|
||||||
}
|
|
||||||
strcat( buffer, "</e:propertyset>\n\n" );
|
|
||||||
( *out ) = ixmlCloneDOMString( buffer );
|
|
||||||
free( buffer );
|
|
||||||
|
|
||||||
return XML_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -253,7 +257,7 @@ static UPNP_INLINE int notify_send_and_recv(
|
|||||||
* appropriate error code.
|
* appropriate error code.
|
||||||
*/
|
*/
|
||||||
static int genaNotify(
|
static int genaNotify(
|
||||||
/*! [in] Null terminated, includes all headers (including \r\n) except SID and SEQ. */
|
/*! [in] Null terminated, includes all headers (including \\r\\n) except SID and SEQ. */
|
||||||
IN char *headers,
|
IN char *headers,
|
||||||
/*! [in] The evented XML. */
|
/*! [in] The evented XML. */
|
||||||
IN char *propertySet,
|
IN char *propertySet,
|
||||||
|
@ -66,15 +66,18 @@
|
|||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief XML version comment. Not used because it is not interopeable with
|
||||||
|
* other UPnP vendors.
|
||||||
|
*/
|
||||||
#define XML_VERSION "<?xml version='1.0' encoding='ISO-8859-1' ?>\n"
|
#define XML_VERSION "<?xml version='1.0' encoding='ISO-8859-1' ?>\n"
|
||||||
#define XML_PROPERTYSET_HEADER \
|
#define XML_PROPERTYSET_HEADER \
|
||||||
"<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">\n"
|
"<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">\n"
|
||||||
|
|
||||||
|
|
||||||
#define UNABLE_MEMORY "HTTP/1.1 500 Internal Server Error\r\n\r\n"
|
#define UNABLE_MEMORY "HTTP/1.1 500 Internal Server Error\r\n\r\n"
|
||||||
#define UNABLE_SERVICE_UNKNOWN "HTTP/1.1 404 Not Found\r\n\r\n"
|
#define UNABLE_SERVICE_UNKNOWN "HTTP/1.1 404 Not Found\r\n\r\n"
|
||||||
#define UNABLE_SERVICE_NOT_ACCEPT \
|
#define UNABLE_SERVICE_NOT_ACCEPT "HTTP/1.1 503 Service Not Available\r\n\r\n"
|
||||||
"HTTP/1.1 503 Service Not Available\r\n\r\n"
|
|
||||||
|
|
||||||
|
|
||||||
#define NOT_IMPLEMENTED "HTTP/1.1 501 Not Implemented\r\n\r\n"
|
#define NOT_IMPLEMENTED "HTTP/1.1 501 Not Implemented\r\n\r\n"
|
||||||
@ -114,7 +117,7 @@ extern ithread_mutex_t GlobalClientSubscribeMutex;
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Lock the subscription
|
* \brief Locks the subscription.
|
||||||
*/
|
*/
|
||||||
#define SubscribeLock() \
|
#define SubscribeLock() \
|
||||||
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, \
|
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, \
|
||||||
@ -125,7 +128,7 @@ extern ithread_mutex_t GlobalClientSubscribeMutex;
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Unlock the subscription
|
* \brief Unlocks the subscription.
|
||||||
*/
|
*/
|
||||||
#define SubscribeUnlock() \
|
#define SubscribeUnlock() \
|
||||||
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, \
|
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, \
|
||||||
|
Loading…
Reference in New Issue
Block a user