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:
Marcelo Roberto Jimenez 2008-05-26 02:19:24 +00:00
parent d0d4a0631a
commit a8521c09cf
5 changed files with 60 additions and 50 deletions

View File

@ -995,7 +995,7 @@ ENABLE_PREPROCESSING = YES
# compilation will be performed. Macro expansion can be done in a controlled
# 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
# 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
# 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
# this tag can be used to specify a list of macro names that should be expanded.

View File

@ -1295,14 +1295,13 @@ EXPORT_SPEC int UpnpSendAdvertisement(
* \brief Queries the state of a state variable of a service on another device.
*
* \deprecated
* <b>The use of this function is deprecated by the UPnP Forum</b>.
*
* This is a synchronous call.
*
* A positive return value indicates a SOAP error code, whereas a negative
* 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:
* \li \c UPNP_E_SUCCESS: The operation completed successfully.
* \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.
*
* \deprecated
*
* <b>Note that the use of this function is deprecated by the UPnP Forum</b>.
* <b>The use of this function is deprecated by the UPnP Forum</b>.
*
* \return An integer representing one of the following:
* \li \c UPNP_E_SUCCESS: The operation completed successfully.

View File

@ -33,6 +33,11 @@
#include "config.h"
/*!
* \file
*/
#if EXCLUDE_GENA == 0
#ifdef INCLUDE_CLIENT_APIS

View File

@ -33,6 +33,11 @@
#include "config.h"
/*!
* \file
*/
#if EXCLUDE_GENA == 0
#ifdef INCLUDE_DEVICE_APIS
@ -82,8 +87,8 @@ int genaUnregisterDevice(
*
* \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
* UPnP vendors.
* \note The XML_VERSION comment is NOT sent due to interoperability issues
* with other UPnP vendors.
*/
static int GeneratePropertySet(
/*! [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 DOMString *out)
{
char *buffer;
int counter = 0;
int size = 0;
int temp_counter = 0;
char *buffer;
int counter = 0;
int size = 0;
int temp_counter = 0;
//size+=strlen(XML_VERSION); the XML_VERSION is not interopeable with
//other vendors
size += strlen( XML_PROPERTYSET_HEADER );
size += strlen( "</e:propertyset>\n\n" );
/*size += strlen(XML_VERSION);*/
size += strlen(XML_PROPERTYSET_HEADER);
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++ ) {
size += strlen( "<e:property>\n</e:property>\n" );
size +=
( 2 * strlen( names[counter] ) + strlen( values[counter] ) +
( strlen( "<></>\n" ) ) );
buffer = (char *)malloc(size + 1);
if (buffer == NULL) {
return UPNP_E_OUTOF_MEMORY;
}
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);
}
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;
return XML_SUCCESS;
}
@ -253,7 +257,7 @@ static UPNP_INLINE int notify_send_and_recv(
* appropriate error code.
*/
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] The evented XML. */
IN char *propertySet,

View File

@ -66,15 +66,18 @@
#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_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_SERVICE_UNKNOWN "HTTP/1.1 404 Not Found\r\n\r\n"
#define UNABLE_SERVICE_NOT_ACCEPT \
"HTTP/1.1 503 Service Not Available\r\n\r\n"
#define UNABLE_SERVICE_NOT_ACCEPT "HTTP/1.1 503 Service Not Available\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() \
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, \
@ -125,7 +128,7 @@ extern ithread_mutex_t GlobalClientSubscribeMutex;
/*!
* Unlock the subscription
* \brief Unlocks the subscription.
*/
#define SubscribeUnlock() \
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, \