mUPnP for C
upnp_function.c File Reference
#include <mupnp/typedef.h>
#include <mupnp/upnp.h>
#include <mupnp/util/log.h>
#include <limits.h>
#include <stdlib.h>
#include <time.h>

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 ()
 
int mupnp_createbootid ()
 
int mupnp_generateconfigid (const char *string)
 

Variables

static bool isUpnpNMPRMode = false
 

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

Variable Documentation

◆ isUpnpNMPRMode

bool isUpnpNMPRMode = false
static