mUPnP for C
|
#include <mupnp/typedef.h>
#include <mupnp/util/string.h>
#include <mupnp/soap/soap.h>
#include <mupnp/service.h>
#include <mupnp/action.h>
#include <mupnp/argument.h>
#include <mupnp/statevariable.h>
Data Structures | |
struct | _mUpnpActionResponse |
struct | _mUpnpActionRequest |
struct | _mUpnpQueryResponse |
struct | _mUpnpQueryRequest |
Typedefs | |
typedef struct _mUpnpActionResponse | mUpnpActionResponse |
typedef struct _mUpnpActionRequest | mUpnpActionRequest |
typedef struct _mUpnpQueryResponse | mUpnpQueryResponse |
typedef struct _mUpnpQueryRequest | mUpnpQueryRequest |
#define mupnp_control_action_request_getactionresponse | ( | actionReq | ) |
Get action response from action request
actionReq | Action request |
#define mupnp_control_action_request_getargumentlist | ( | actionReq | ) |
Get argument list from action request
actionReq | Action request |
#define mupnp_control_action_request_getsoaprequest | ( | actionReq | ) |
Get soap request associated with action request
actionReq | Action request |
#define mupnp_control_action_response_getsoapresponse | ( | actionRes | ) |
Get soap response from action response
actionRes | Action response |
#define mupnp_control_action_response_issuccessful | ( | actionRes | ) |
Check if action response indicates that action invoke was successfull
actionRes | Action response |
#define MUPNP_CONTROL_ERROR_CODE "errorCode" |
Definition fro control error code
#define MUPNP_CONTROL_ERROR_DESCRIPTION "errorDescription" |
Definition for control error description
#define MUPNP_CONTROL_FAULT_CODE "Client" |
Definition for control fault code
#define MUPNP_CONTROL_FAULT_STRING "UPnPError" |
Definition for contol fault string
#define mupnp_control_isactionrequest | ( | httpReq | ) |
#define mupnp_control_isqueryrequest | ( | httpReq | ) |
Check if HTTP request query is UPnP query request
httpReq | HTTP request |
#define MUPNP_CONTROL_NS "u" |
Definition for control name space
#define mupnp_control_query_request_getqueryresponse | ( | queryReq | ) |
Get response from query request
queryReq | Query request |
#define mupnp_control_query_request_getsoaprequest | ( | queryReq | ) |
Get soap request from query request
queryReq |
#define mupnp_control_query_response_getsoapresponse | ( | queryRes | ) |
Get soap response from query response
queryRes | Query response |
#define mupnp_control_query_response_issuccessful | ( | queryRes | ) |
Check if query response indicates that query request has succeeded
queryRes | Query response |
#define MUPNP_CONTROL_QUERY_SOAPACTION "\"urn:schemas-upnp-org:control-1-0#QueryStateVariable\"" |
Definition for soap action: state variable query
#define MUPNP_CONTROL_QUERY_STATE_VARIABLE "QueryStateVariable" |
Definition for query state variable
#define MUPNP_CONTROL_QUERY_STATE_VARIABLE_RESPONSE "QueryStateVariableResponse" |
Definition for query state variable response
#define MUPNP_CONTROL_RETURN "return" |
Definition for control return
#define MUPNP_CONTROL_VAR_NAME "varName" |
Definition for control variable name
#define MUPNP_CONTROL_XMLNS "urn:schemas-upnp-org:control-1-0" |
Definition for control XML name space
#define MUPNP_MAN_DISCOVER "\"ssdp:discover\"" |
Definition for mandatory discover header
#define mupnp_man_isdiscover | ( | str | ) |
Check if string is correct mandatory header value as specified in UPnP Device Architecture 1.2.2
str | String to be checked |
#define MUPNP_NT_EVENT "upnp:event" |
Definition for NT event
#define mupnp_nt_isrootdevice | ( | str | ) |
Check if NT (notification target) is for root device
str | String to be checked |
#define MUPNP_NT_ROOTDEVICE "upnp:rootdevice" |
Definition for NT (Notification type) root device
#define MUPNP_NTS_ALIVE "ssdp:alive" |
Definition for NTS alive
#define MUPNP_NTS_BYEBYE "ssdp:byebye" |
Definition for NTS byebye
#define mupnp_nts_isalive | ( | str | ) |
Check if NTS (notification sub target) is of type "alive"
str | String to be checked |
#define mupnp_nts_isbyebye | ( | str | ) |
Check if string type is "byebye"
str | String to be checked |
#define mupnp_nts_ispropchange | ( | str | ) |
Check if string type is "property change"
str | String to be checked |
#define MUPNP_NTS_PROPCHANGE "upnp:propchange" |
Definition for NTS property change
#define MUPNP_ST_ALL_DEVICE "ssdp:all" |
Definition for general ST (search target)
#define mupnp_st_isalldevice | ( | str | ) |
Check if device is of type "all"
str | String to be checked |
#define mupnp_st_isrootdevice | ( | str | ) |
Check if device string is from root device
str | String to be checked |
#define mupnp_st_isurn | ( | str | ) |
Check if string is from urn
str | String to be checked |
#define mupnp_st_isurndevice | ( | str | ) |
Check if string is from urn device
str | String to be checked |
#define mupnp_st_isurnservice | ( | str | ) |
Check if string is from urn service
str | String to be checked |
#define mupnp_st_isuuiddevice | ( | str | ) |
Check if string is from uuid device
str | String to be checked |
#define MUPNP_ST_ROOT_DEVICE "upnp:rootdevice" |
Definition for root device ST
#define MUPNP_ST_URN "urn" |
Definition for URN device
#define MUPNP_ST_URN_DEVICE "urn:schemas-upnp-org:device" |
Definition for URN device
#define MUPNP_ST_URN_SERVICE "urn:schemas-upnp-org:service" |
Definition for URN service
#define MUPNP_ST_UUID_DEVICE "uuid" |
Definition for ST UUID (universally unique identifier) prefix
#define mupnp_usn_isrootdevice | ( | str | ) |
Check if usn is from root device
str | String to be checked |
#define MUPNP_USN_ROOTDEVICE "upnp:rootdevice" |
Definition for USN rootdevice
typedef struct _mUpnpActionRequest mUpnpActionRequest |
Data type definition for action request
typedef struct _mUpnpActionResponse mUpnpActionResponse |
Data type definition for action response
typedef struct _mUpnpQueryRequest mUpnpQueryRequest |
Data type definition for query request
typedef struct _mUpnpQueryResponse mUpnpQueryResponse |
Data type definition for query response
bool mupnp_action_performlistner | ( | mUpnpAction * | action, |
mUpnpActionRequest * | actionReq ) |
Perform action listener
action | Action |
actionReq | Action request |
bool mupnp_action_post | ( | mUpnpAction * | action | ) |
Send action
action | Action |
void mupnp_control_action_request_clear | ( | mUpnpActionRequest * | actionReq | ) |
Clear action request
actionReq | Clear Action request |
void mupnp_control_action_request_delete | ( | mUpnpActionRequest * | actionReq | ) |
Delete action request object
actionReq | Action request |
char * mupnp_control_action_request_getactionname | ( | mUpnpActionRequest * | actionReq | ) |
Get action name from action request
actionReq | Action request |
mUpnpXmlNode * mupnp_control_action_request_getactionnode | ( | mUpnpActionRequest * | actionReq | ) |
Get XML action node from action request
actionReq |
mUpnpActionRequest * mupnp_control_action_request_new | ( | void | ) |
Create new action request object
mUpnpActionResponse * mupnp_control_action_request_post | ( | mUpnpActionRequest * | actionReq | ) |
Send action request
actionReq | Action request |
void mupnp_control_action_request_setaction | ( | mUpnpActionRequest * | actionReq, |
mUpnpAction * | action ) |
Set action to action request
actionReq | Action request |
action | UPnP action |
void mupnp_control_action_request_setsoaprequest | ( | mUpnpActionRequest * | actionReq, |
mUpnpSoapRequest * | soapReq ) |
Set soap request associated with action request
actionReq | Action request |
soapReq | Soap request |
void mupnp_control_action_response_clear | ( | mUpnpActionResponse * | actionReq | ) |
Clear action response
actionReq | Action response |
void mupnp_control_action_response_delete | ( | mUpnpActionResponse * | actionReq | ) |
Delete action response
actionReq | Action response |
mUpnpXmlNode * mupnp_control_action_response_getactionresponsenode | ( | mUpnpActionResponse * | actionRes | ) |
Get action response XML node from action response
actionRes | Action response |
bool mupnp_control_action_response_geterror | ( | mUpnpActionResponse * | actionRes, |
mUpnpAction * | action ) |
Get error associated to action response
actionRes | Action response |
action | UPnP action |
bool mupnp_control_action_response_getresult | ( | mUpnpActionResponse * | actionRes, |
mUpnpAction * | action ) |
Get result from action response
actionRes | Action response |
action | UPnP action |
mUpnpActionResponse * mupnp_control_action_response_new | ( | void | ) |
Create new action response
void mupnp_control_action_response_setresponse | ( | mUpnpActionResponse * | actionRes, |
mUpnpAction * | action ) |
Set action response to action
actionRes | Action response |
action | UPnP action |
void mupnp_control_action_response_setsoapresponse | ( | mUpnpActionResponse * | actionRes, |
mUpnpSoapResponse * | soapRes ) |
Set soap response to action response
actionRes | Action response |
soapRes | Soap reaponse |
void mupnp_control_query_request_clear | ( | mUpnpQueryRequest * | queryReq | ) |
Clear query request
queryReq | Query request |
void mupnp_control_query_request_delete | ( | mUpnpQueryRequest * | queryReq | ) |
Delete query request
queryReq | Query request |
char * mupnp_control_query_request_getvarname | ( | mUpnpQueryRequest * | queryReq | ) |
Get state variable name associated with this query request
queryReq | Query request |
mUpnpXmlNode * mupnp_control_query_request_getvarnamenode | ( | mUpnpQueryRequest * | queryReq | ) |
Get state variable XML node
queryReq |
mUpnpQueryRequest * mupnp_control_query_request_new | ( | void | ) |
Create new query request object
mUpnpQueryResponse * mupnp_control_query_request_post | ( | mUpnpQueryRequest * | queryReq | ) |
Send query request
queryReq | Query request |
void mupnp_control_query_request_setsoaprequest | ( | mUpnpQueryRequest * | queryReq, |
mUpnpSoapRequest * | soapReq ) |
Set soap request for query request
queryReq | Query request |
soapReq | Soap request |
void mupnp_control_query_request_setstatevariable | ( | mUpnpQueryRequest * | queryReq, |
mUpnpStateVariable * | statVar ) |
Set state variable to query request
queryReq | Query request |
statVar | State variable |
void mupnp_control_query_response_clear | ( | mUpnpQueryResponse * | queryReq | ) |
Clear query response
queryReq | Query request |
void mupnp_control_query_response_delete | ( | mUpnpQueryResponse * | queryReq | ) |
Delete query response
queryReq | Query request |
mUpnpXmlNode * mupnp_control_query_response_getreturnnode | ( | mUpnpQueryResponse * | queryRes | ) |
Get XML return node from query response
queryRes |
char * mupnp_control_query_response_getreturnvalue | ( | mUpnpQueryResponse * | queryRes | ) |
Get return valuse from query response
queryRes | Query response |
mUpnpQueryResponse * mupnp_control_query_response_new | ( | void | ) |
Create new query response
void mupnp_control_query_response_setresponse | ( | mUpnpQueryResponse * | queryRes, |
mUpnpStateVariable * | statVar ) |
Create and set XML response data into query response
queryRes | Query response |
statVar | State variable |
void mupnp_control_query_response_setsoapresponse | ( | mUpnpQueryResponse * | queryRes, |
mUpnpSoapResponse * | soapRes ) |
Set soap response for query response
queryRes | Query response |
soapRes | Soap response |
void mupnp_control_request_sethostfromservice | ( | mUpnpSoapRequest * | soapReq, |
mUpnpService * | service ) |
Set host from service
soapReq | Soap request |
service | UPnP service |
void mupnp_control_soap_request_initializeenvelopenode | ( | mUpnpSoapRequest * | soapReq | ) |
Initializes soap requests envelope node
soapReq | Soap request |
mUpnpXmlNode * mupnp_control_soap_response_createfaultresponsenode | ( | int | errCode, |
char * | errDescr ) |
void mupnp_control_soap_response_initializeenvelopenode | ( | mUpnpSoapResponse * | soapRes | ) |
Initialize soap responses envelope node
soapRes | Soap response |
void mupnp_control_soap_response_setfaultresponse | ( | mUpnpSoapResponse * | soapRes, |
int | errCode, | ||
char * | errDescr ) |
Set failed response data
soapRes | Soap response |
errCode | Error code |
errDescr | Error description |
bool mupnp_statevariable_performlistner | ( | mUpnpStateVariable * | statVar, |
mUpnpQueryRequest * | queryReq ) |
Perform query listener
statVar | State variable |
queryReq | Query request |
bool mupnp_statevariable_post | ( | mUpnpStateVariable * | statVar | ) |
Send query
statVar | State variable |
const char * mupnp_usn_getudn | ( | const char * | usn, |
char * | udnBuf, | ||
size_t | udnBufLen ) |
Get udn from usn
usn | Universal serial number |
udnBuf | Buffer where udn is stored after successfull execution |
udnBufLen | Buffer length for udnBuf |