Doxygenation of SSDP library.

This commit is contained in:
Marcelo Roberto Jimenez
2010-12-19 13:30:32 -02:00
parent 704dca3df1
commit 04d64a893b
8 changed files with 1503 additions and 1986 deletions

View File

@@ -34,6 +34,10 @@
/*!
* \file
*
* \defgroup Sock Network Socket Library
*
* @{
*/
#include "upnputil.h"
@@ -64,6 +68,23 @@ typedef struct
#extern "C" {
#endif
/*!
* \brief Closes the socket if it is different from -1.
*
* \return -1 if an error occurred or if the socket is -1.
*/
static UPNP_INLINE int sock_close(
/*! Socket descriptor. */
SOCKET sock)
{
int ret = -1;
if (sock != -1)
ret = UpnpCloseSocket(sock);
return ret;
}
/*!
* \brief Assign the passed in socket descriptor to socket descriptor in the
* SOCKINFO structure.
@@ -96,6 +117,23 @@ int sock_init_with_ip(
/*! Remote socket address. */
IN struct sockaddr *foreign_sockaddr);
/*!
* \brief Shutsdown the socket using the ShutdownMethod to indicate whether
* sends and receives on the socket will be dis-allowed.
*
* After shutting down the socket, closesocket is called to release system
* resources used by the socket calls.
*
* \return Integer:
* \li \c UPNP_E_SOCKET_ERROR on failure.
* \li \c UPNP_E_SUCCESS on success.
*/
int sock_destroy(
/*! Socket Information Object. */
INOUT SOCKINFO* info,
/*! How to shutdown the socket. Used by sockets's shutdown(). */
int ShutdownMethod);
/*!
* \brief Reads data on socket in sockinfo.
*
@@ -133,42 +171,27 @@ int sock_write(
INOUT int *timeoutSecs);
/*!
* \brief Shutsdown the socket using the ShutdownMethod to indicate whether
* sends and receives on the socket will be dis-allowed.
*
* After shutting down the socket, closesocket is called to release system
* resources used by the socket calls.
*
* \return Integer:
* \li \c UPNP_E_SOCKET_ERROR on failure.
* \li \c UPNP_E_SUCCESS on success.
* \brief Make socket blocking.
*
* \return 0 if successful, -1 otherwise.
*/
int sock_destroy(
/*! Socket Information Object. */
INOUT SOCKINFO* info,
/*! How to shutdown the socket. Used by sockets's shutdown(). */
int ShutdownMethod);
int sock_make_blocking(
/* [in] socket. */
SOCKET sock);
/*!
* \brief Closes the socket if it is different from -1.
*
* \return -1 if an error occurred or if the socket is -1.
* \brief Make socket non-blocking.
*
* \return 0 if successful, -1 otherwise.
*/
static UPNP_INLINE int sock_close(
/*! Socket descriptor. */
SOCKET sock)
{
int ret = -1;
if (sock != -1) {
ret = UpnpCloseSocket(sock);
}
return ret;
}
int sock_make_no_blocking(
/* [in] socket. */
SOCKET sock);
#ifdef __cplusplus
} /* #extern "C" */
#endif
/* @} Sock Network Socket Library */
#endif /* GENLIB_NET_SOCK_H */