|
mUPnP for C
|
#include <mupnp/typedef.h>#include <mupnp/util/list.h>#include <mupnp/util/string.h>#include <mupnp/xml/xml.h>#include <mupnp/upnp_status.h>Data Structures | |
| struct | _mUpnpAllowedValuesList |
| struct | _mUpnpStateVariable |
Typedefs | |
| typedef struct _mUpnpAllowedValuesList | mUpnpAllowedValuesList |
| typedef struct _mUpnpAllowedValuesList | mUpnpAllowedValue |
| typedef struct _mUpnpStateVariable | mUpnpStateVariable |
| typedef struct _mUpnpStateVariable | mUpnpServiceStateTable |
| typedef bool(* | MUPNP_STATEVARIABLE_LISTNER) (mUpnpStateVariable *) |
Functions | |
| mUpnpStateVariable * | mupnp_statevariable_new (void) |
| Create a new UPnP state variable. | |
| void | mupnp_statevariable_delete (mUpnpStateVariable *statVar) |
| Destroy a UPnP state variable and free resources. | |
| void | mupnp_statevariable_setstatevariablenode (mUpnpStateVariable *statVar, mUpnpXmlNode *node) |
| mUpnpAllowedValuesList * | mupnp_statevariable_getallowedvaluelist (mUpnpStateVariable *statVar) |
| int | mupnp_statevariable_is_allowed_value (mUpnpStateVariable *statVar, const char *value) |
| mUpnpAllowedValuesList * | mupnp_allowedvaluelist_new (void) |
| void | mupnp_statevariable_setvalue (mUpnpStateVariable *statVar, const char *data) |
| void | mupnp_statevariable_setvaluewithoutnotify (mUpnpStateVariable *statVar, const char *data) |
| mUpnpServiceStateTable * | mupnp_servicestatetable_new (void) |
| void | mupnp_servicestatetable_delete (mUpnpServiceStateTable *servicestatetable) |
| #define mupnp_servicestatetable_add | ( | stateTable, | |
| statVar ) |
Add new service state table into service state table list
| stateTable | Service state table |
| statVar | State variable |
| #define mupnp_servicestatetable_clear | ( | stateTable | ) |
Clear service state table
| stateTable | Service state table |
| #define mupnp_servicestatetable_gets | ( | stateTable | ) |
Get next service state table from service state table list
| stateTable | Service state table |
| #define mupnp_servicestatetable_size | ( | stateTable | ) |
Get size of service state table
| stateTable | Service state table |
| #define MUPNP_SERVICESTATETALBE_ELEM_NAME "serviceStateTable" |
Definition for service state table XML element name
| #define MUPNP_STATEVARIABLE_ALLOWEDVALUELIST "allowedValueList" |
Definition for state variable allowed values list
| #define MUPNP_STATEVARIABLE_DATATYPE "dataType" |
Definition for state variable data type element
| #define MUPNP_STATEVARIABLE_ELEM_NAME "stateVariable" |
Definition for state variable XML element name
| #define mupnp_statevariable_getallowedvaluerange | ( | statVar | ) |
Get allowed value range for state variable
| statVar | State variable |
| #define mupnp_statevariable_getdatatype | ( | statVar | ) |
Get data type from state variable
| statVar | State variable |
| #define mupnp_statevariable_getlistener | ( | statVar | ) |
Get lister function associated with state variable
| statVar | State variable |
| #define mupnp_statevariable_getname | ( | statVar | ) |
Get state variable name
| statVar | State variable |
| #define mupnp_statevariable_getsendevents | ( | statVar | ) |
Get state variable event sending option value
| statVar | State variable |
| #define mupnp_statevariable_getservice | ( | statVar | ) |
Get service from state variable
| statVar | State variable |
| #define mupnp_statevariable_getstatevariablenode | ( | statVar | ) |
Get XML node from this state variable
| statVar | State variable |
| #define mupnp_statevariable_getstatuscode | ( | statVar | ) |
Get status code of this state variable
| statVar | Status variable |
| #define mupnp_statevariable_getstatusdescription | ( | statVar | ) |
Get status description from this state variable
| statVar | State variable |
| #define mupnp_statevariable_getuserdata | ( | statVar | ) |
Get user data from this state variable
| statVar | State variable |
| #define mupnp_statevariable_getvalue | ( | statVar | ) |
Get value associated with this state variable
| statVar | State variable |
| #define mupnp_statevariable_hasallowedvaluelist | ( | statVar | ) |
Check if state variable has allowed value list
| statVar | State variable |
| #define mupnp_statevariable_hasallowedvaluerange | ( | statVar | ) |
| #define mupnp_statevariable_isname | ( | statVar, | |
| name ) |
Checks if state variable has certain name
| statVar | State variable |
| name | Name to be checked |
| #define mupnp_statevariable_issendevents | ( | statVar | ) |
Check if events are sent to subscribers when this state variable changes
| statVar | State variable |
| #define mupnp_statevariable_isstatevariablenode | ( | node | ) |
Check if XML node is state variable node
| node | XML node |
| #define MUPNP_STATEVARIABLE_NAME "name" |
Definition for state variable name element
| #define mupnp_statevariable_next | ( | statVar | ) |
Get next element from state variable list
| statVar | state variable list node |
| #define MUPNP_STATEVARIABLE_SENDEVENTS "sendEvents" |
Definition for state variable send events element name
| #define MUPNP_STATEVARIABLE_SENDEVENTS_NO "no" |
Definition for state variable send events element value
| #define MUPNP_STATEVARIABLE_SENDEVENTS_YES "yes" |
Definition for state variable send events element value
| #define mupnp_statevariable_setdatatype | ( | statVar, | |
| value ) |
Set data type for state variable
| statVar | State variable |
| value | Data type |
| #define mupnp_statevariable_setlistener | ( | statVar, | |
| func ) |
Set listener callback for this state variable
| statVar | State variable |
| func | Listener function |
| #define mupnp_statevariable_setname | ( | statVar, | |
| value ) |
Set state variable name
| statVar | State variable |
| value | New state variable name |
| #define mupnp_statevariable_setsendevents | ( | statVar, | |
| value ) |
Set send events option for state variable, can be used to disable eventing for certain variables.
| statVar | State variable |
| value | New value |
| #define mupnp_statevariable_setservice | ( | statVar, | |
| service ) |
Set service for this state variable
| statVar | State variable |
| service | Service |
| #define mupnp_statevariable_setstatuscode | ( | statVar, | |
| code ) |
Set status code for state variable
| statVar | State variable |
| code | Status code |
| #define mupnp_statevariable_setstatusdescription | ( | statVar, | |
| value ) |
Set status description for state variable
| statVar | State variable |
| value | Status description |
| #define mupnp_statevariable_setuserdata | ( | statVar, | |
| value ) |
Set arbitrary user data associated with this state variable
| statVar | State variable |
| value | Data |
| typedef bool(* MUPNP_STATEVARIABLE_LISTNER) (mUpnpStateVariable *) |
Type definition for state variable listener function
| typedef struct _mUpnpAllowedValuesList mUpnpAllowedValue |
| typedef struct _mUpnpAllowedValuesList mUpnpAllowedValuesList |
Data type for allowed state variables allowed values table
| typedef struct _mUpnpStateVariable mUpnpServiceStateTable |
| typedef struct _mUpnpStateVariable mUpnpStateVariable |
Data type for state variable and state table
| mUpnpAllowedValuesList * mupnp_allowedvaluelist_new | ( | void | ) |
Create new allowed state variable values list
| void mupnp_servicestatetable_delete | ( | mUpnpServiceStateTable * | servicestatetable | ) |
Delete service state table object
| servicestatetable | Service state table |
| mUpnpServiceStateTable * mupnp_servicestatetable_new | ( | void | ) |
Create service state table object
| void mupnp_statevariable_delete | ( | mUpnpStateVariable * | statVar | ) |
Destroy a UPnP state variable and free resources.
Releases all resources associated with the state variable, including:
| statVar | The state variable to destroy. May be NULL (no-op if NULL). |
| mUpnpAllowedValuesList * mupnp_statevariable_getallowedvaluelist | ( | mUpnpStateVariable * | statVar | ) |
Get allowed value list
| statVar | State variable |
| 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
| statVar | State variable |
| mUpnpStateVariable * mupnp_statevariable_new | ( | void | ) |
Create a new UPnP state variable.
Allocates and initializes a new state variable object. State variables represent the state of a UPnP service and can be:
State variables have:
State variables are typically created during SCPD parsing and added to the service state table.
| void mupnp_statevariable_setstatevariablenode | ( | mUpnpStateVariable * | statVar, |
| mUpnpXmlNode * | node ) |
Set XML node for this state variable
| statVar | State variable |
| node | XML node |
| void mupnp_statevariable_setvalue | ( | mUpnpStateVariable * | statVar, |
| const char * | data ) |
Set state variable value
| statVar | State variable |
| data | New value associated with this state variable, and the value is send to other devices which subscribe the service. |
| void mupnp_statevariable_setvaluewithoutnotify | ( | mUpnpStateVariable * | statVar, |
| const char * | data ) |
Set state variable value
| statVar | State variable |
| data | New value associated with this state variable |