mUPnP for C
upnp_function.h File Reference
#include <mupnp/typedef.h>

Macros

#define MUPNP_UUID_NAME   "uuid"
 
#define MUPNP_UUID_MAX_LEN   128 /*(5 + ((4+1)*4) + 1)*/
 
#define MUPNP_SEVERNAME_MAXLEN   64
 
#define MUPNP_CONFIGID_UPNP_ORG_MAX   16777215
 

Functions

const char * mupnp_createuuid (char *uuidBuf, size_t uuidBufSize)
 
const char * mupnp_getservername (char *buf, size_t bufSize)
 
void mupnp_setnmprmode (bool onFlag)
 
bool mupnp_isnmprmode (void)
 
int mupnp_createbootid (void)
 
int mupnp_generateconfigid (const char *string)
 

Macro Definition Documentation

◆ MUPNP_CONFIGID_UPNP_ORG_MAX

#define MUPNP_CONFIGID_UPNP_ORG_MAX   16777215

◆ MUPNP_SEVERNAME_MAXLEN

#define MUPNP_SEVERNAME_MAXLEN   64

◆ MUPNP_UUID_MAX_LEN

#define MUPNP_UUID_MAX_LEN   128 /*(5 + ((4+1)*4) + 1)*/

◆ MUPNP_UUID_NAME

#define MUPNP_UUID_NAME   "uuid"

Function Documentation

◆ mupnp_createbootid()

int mupnp_createbootid ( void )

Generate a integer id of BOOTID.UPNP.ORG.

Returns
BOOTID

◆ mupnp_createuuid()

const char * mupnp_createuuid ( char * uuidBuf,
size_t uuidBufSize )

Create a UUID (Universally Unique IDentifier) based on a semi-random value using current time.

Parameters
uuidBufThe UUID created by this function (must not be NULL)
Returns
The UUID created by this function (== uuidBuf)

◆ mupnp_generateconfigid()

int mupnp_generateconfigid ( const char * string)

Generate a integer id of CONFIGID.UPNP.ORG.

Returns
CONFIGID

◆ mupnp_getservername()

const char * mupnp_getservername ( char * buf,
size_t bufSize )

Get the server name ("OSname/OSversion/UPnP/<version> mUPnP/<version>")

Parameters
bufBuffer to store the server name
bufSizeBuffer length
Theserver name buffer (== buf)

◆ mupnp_isnmprmode()

bool mupnp_isnmprmode ( void )

Check whether NMPR (Intel Networked Media Product Requirements) mode is on.

Returns
true if on; otherwise false

◆ mupnp_setnmprmode()

void mupnp_setnmprmode ( bool onFlag)

Enable/disable NMPR (Intel Networked Media Product Requirements) mode.

Parameters
onFlagtrue: enable; false: disable