CyberLink for C

cstatevariable.c File Reference

#include <cybergarage/upnp/cstatevariable.h>
#include <cybergarage/upnp/cservice.h>
#include <cybergarage/util/clog.h>
#include <string.h>

Functions

CgUpnpStateVariable * cg_upnp_statevariable_new ()
void cg_upnp_statevariable_delete (CgUpnpStateVariable *statVar)
void cg_upnp_statevariable_setstatevariablenode (CgUpnpStateVariable *statVar, CgXmlNode *node)
static void cg_upnp_statevariable_setvaluewithnotify (CgUpnpStateVariable *statVar, char *data, BOOL doNotify)
void cg_upnp_statevariable_setvalue (CgUpnpStateVariable *statVar, char *data)
void cg_upnp_statevariable_setvaluewithoutnotify (CgUpnpStateVariable *statVar, char *data)
CgUpnpAllowedValuesList * cg_upnp_allowedvaluelist_new ()
CgUpnpAllowedValuesList * cg_upnp_statevariable_getallowedvaluelist (CgUpnpStateVariable *statVar)
int cg_upnp_statevariable_is_allowed_value (CgUpnpStateVariable *statVar, const char *value)

Function Documentation

CgUpnpAllowedValuesList* cg_upnp_allowedvaluelist_new ( )

Create new allowed state variable values list

void cg_upnp_statevariable_delete ( CgUpnpStateVariable *  statVar)

Delete state variable object

Parameters:
statVarstate variable
CgUpnpAllowedValuesList* cg_upnp_statevariable_getallowedvaluelist ( CgUpnpStateVariable *  statVar)

Get allowed value list

Parameters:
statVarState variable
Returns:
Allowed value list
int cg_upnp_statevariable_is_allowed_value ( CgUpnpStateVariable *  statVar,
const char *  value 
)

Check if state variable allowes to receive value

value value to be checked

Parameters:
statVarState variable
Returns:
0 if it does allowed to receive value
CgUpnpStateVariable* cg_upnp_statevariable_new ( )

Create new state variable object

void cg_upnp_statevariable_setstatevariablenode ( CgUpnpStateVariable *  statVar,
CgXmlNode *  node 
)

Set XML node for this state variable

Parameters:
statVarState variable
nodeXML node
void cg_upnp_statevariable_setvalue ( CgUpnpStateVariable *  statVar,
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.
static void cg_upnp_statevariable_setvaluewithnotify ( CgUpnpStateVariable *  statVar,
char *  data,
BOOL  doNotify 
) [static]
void cg_upnp_statevariable_setvaluewithoutnotify ( CgUpnpStateVariable *  statVar,
char *  data 
)

Set state variable value

Parameters:
statVarState variable
dataNew value associated with this state variable