mUPnP for C
statevariable.c File Reference
#include <mupnp/service.h>
#include <mupnp/statevariable.h>
#include <mupnp/util/log.h>
#include <string.h>

Functions

mUpnpStateVariablemupnp_statevariable_new ()
 
void mupnp_statevariable_delete (mUpnpStateVariable *statVar)
 
void mupnp_statevariable_setstatevariablenode (mUpnpStateVariable *statVar, mUpnpXmlNode *node)
 
static void mupnp_statevariable_setvaluewithnotify (mUpnpStateVariable *statVar, const char *data, bool doNotify)
 
void mupnp_statevariable_setvalue (mUpnpStateVariable *statVar, const char *data)
 
void mupnp_statevariable_setvaluewithoutnotify (mUpnpStateVariable *statVar, const char *data)
 
mUpnpAllowedValuesListmupnp_allowedvaluelist_new ()
 
mUpnpAllowedValuesListmupnp_statevariable_getallowedvaluelist (mUpnpStateVariable *statVar)
 
int mupnp_statevariable_is_allowed_value (mUpnpStateVariable *statVar, const char *value)
 

Function Documentation

◆ mupnp_allowedvaluelist_new()

mUpnpAllowedValuesList * mupnp_allowedvaluelist_new ( void )

Create new allowed state variable values list

◆ mupnp_statevariable_delete()

void mupnp_statevariable_delete ( mUpnpStateVariable * statVar)

Delete state variable object

Parameters
statVarstate variable

◆ mupnp_statevariable_getallowedvaluelist()

mUpnpAllowedValuesList * mupnp_statevariable_getallowedvaluelist ( mUpnpStateVariable * statVar)

Get allowed value list

Parameters
statVarState variable
Returns
Allowed value list

◆ mupnp_statevariable_is_allowed_value()

int mupnp_statevariable_is_allowed_value ( mUpnpStateVariable * statVar,
const char * value )

Check if state variable allowes to receive value

@parap value value to be checked

Parameters
statVarState variable
Returns
0 if it does allowed to receive value

◆ mupnp_statevariable_new()

mUpnpStateVariable * mupnp_statevariable_new ( void )

Create new state variable object

◆ mupnp_statevariable_setstatevariablenode()

void mupnp_statevariable_setstatevariablenode ( mUpnpStateVariable * statVar,
mUpnpXmlNode * node )

Set XML node for this state variable

Parameters
statVarState variable
nodeXML node

◆ mupnp_statevariable_setvalue()

void mupnp_statevariable_setvalue ( mUpnpStateVariable * statVar,
const char * data )

Set state variable value

Parameters
statVarState variable
dataNew value associated with this state variable, and the value is send to other devices which subscribe the service.

◆ mupnp_statevariable_setvaluewithnotify()

static void mupnp_statevariable_setvaluewithnotify ( mUpnpStateVariable * statVar,
const char * data,
bool doNotify )
static

◆ mupnp_statevariable_setvaluewithoutnotify()

void mupnp_statevariable_setvaluewithoutnotify ( mUpnpStateVariable * statVar,
const char * data )

Set state variable value

Parameters
statVarState variable
dataNew value associated with this state variable