mUPnP for C
control.h File Reference
#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
 

Macros

#define MUPNP_MAN_DISCOVER   "\"ssdp:discover\""
 
#define MUPNP_NT_ROOTDEVICE   "upnp:rootdevice"
 
#define MUPNP_NT_EVENT   "upnp:event"
 
#define MUPNP_NTS_ALIVE   "ssdp:alive"
 
#define MUPNP_NTS_BYEBYE   "ssdp:byebye"
 
#define MUPNP_NTS_PROPCHANGE   "upnp:propchange"
 
#define MUPNP_ST_ALL_DEVICE   "ssdp:all"
 
#define MUPNP_ST_ROOT_DEVICE   "upnp:rootdevice"
 
#define MUPNP_ST_UUID_DEVICE   "uuid"
 
#define MUPNP_ST_URN   "urn"
 
#define MUPNP_ST_URN_DEVICE   "urn:schemas-upnp-org:device"
 
#define MUPNP_ST_URN_SERVICE   "urn:schemas-upnp-org:service"
 
#define MUPNP_USN_ROOTDEVICE   "upnp:rootdevice"
 
#define MUPNP_CONTROL_NS   "u"
 
#define MUPNP_CONTROL_QUERY_SOAPACTION   "\"urn:schemas-upnp-org:control-1-0#QueryStateVariable\""
 
#define MUPNP_CONTROL_XMLNS   "urn:schemas-upnp-org:control-1-0"
 
#define MUPNP_CONTROL_QUERY_STATE_VARIABLE   "QueryStateVariable"
 
#define MUPNP_CONTROL_QUERY_STATE_VARIABLE_RESPONSE   "QueryStateVariableResponse"
 
#define MUPNP_CONTROL_VAR_NAME   "varName"
 
#define MUPNP_CONTROL_RETURN   "return"
 
#define MUPNP_CONTROL_FAULT_CODE   "Client"
 
#define MUPNP_CONTROL_FAULT_STRING   "UPnPError"
 
#define MUPNP_CONTROL_ERROR_CODE   "errorCode"
 
#define MUPNP_CONTROL_ERROR_DESCRIPTION   "errorDescription"
 
#define mupnp_control_isqueryrequest(httpReq)
 
#define mupnp_control_isactionrequest(httpReq)
 
#define mupnp_control_action_request_getsoaprequest(actionReq)
 
#define mupnp_control_action_request_getargumentlist(actionReq)
 
#define mupnp_control_action_request_getactionresponse(actionReq)
 
#define mupnp_control_action_response_getsoapresponse(actionRes)
 
#define mupnp_control_action_response_issuccessful(actionRes)
 
#define mupnp_control_query_request_getsoaprequest(queryReq)
 
#define mupnp_control_query_request_getqueryresponse(queryReq)
 
#define mupnp_control_query_response_getsoapresponse(queryRes)
 
#define mupnp_control_query_response_issuccessful(queryRes)
 
#define mupnp_man_isdiscover(str)
 
#define mupnp_st_isalldevice(str)
 
#define mupnp_st_isrootdevice(str)
 
#define mupnp_st_isuuiddevice(str)
 
#define mupnp_st_isurn(str)
 
#define mupnp_st_isurndevice(str)
 
#define mupnp_st_isurnservice(str)
 
#define mupnp_nt_isrootdevice(str)
 
#define mupnp_nts_isalive(str)
 
#define mupnp_nts_isbyebye(str)
 
#define mupnp_nts_ispropchange(str)
 
#define mupnp_usn_isrootdevice(str)
 

Typedefs

typedef struct _mUpnpActionResponse mUpnpActionResponse
 
typedef struct _mUpnpActionRequest mUpnpActionRequest
 
typedef struct _mUpnpQueryResponse mUpnpQueryResponse
 
typedef struct _mUpnpQueryRequest mUpnpQueryRequest
 

Functions

void mupnp_control_soap_request_initializeenvelopenode (mUpnpSoapRequest *soapReq)
 
void mupnp_control_soap_response_initializeenvelopenode (mUpnpSoapResponse *soapRes)
 
mUpnpXmlNodemupnp_control_soap_response_createfaultresponsenode (int errCode, char *errDescr)
 
void mupnp_control_soap_response_setfaultresponse (mUpnpSoapResponse *soapRes, int errCode, char *errDescr)
 
bool mupnp_action_performlistner (mUpnpAction *action, mUpnpActionRequest *actionReq)
 
bool mupnp_statevariable_performlistner (mUpnpStateVariable *statVar, mUpnpQueryRequest *queryReq)
 
void mupnp_control_request_sethostfromservice (mUpnpSoapRequest *soapReq, mUpnpService *service)
 
mUpnpActionRequestmupnp_control_action_request_new (void)
 
void mupnp_control_action_request_delete (mUpnpActionRequest *actionReq)
 
void mupnp_control_action_request_clear (mUpnpActionRequest *actionReq)
 
void mupnp_control_action_request_setsoaprequest (mUpnpActionRequest *actionReq, mUpnpSoapRequest *soapReq)
 
mUpnpXmlNodemupnp_control_action_request_getactionnode (mUpnpActionRequest *actionReq)
 
char * mupnp_control_action_request_getactionname (mUpnpActionRequest *actionReq)
 
void mupnp_control_action_request_setaction (mUpnpActionRequest *actionReq, mUpnpAction *action)
 
mUpnpActionResponsemupnp_control_action_request_post (mUpnpActionRequest *actionReq)
 
mUpnpActionResponsemupnp_control_action_response_new (void)
 
void mupnp_control_action_response_delete (mUpnpActionResponse *actionReq)
 
void mupnp_control_action_response_clear (mUpnpActionResponse *actionReq)
 
void mupnp_control_action_response_setsoapresponse (mUpnpActionResponse *actionRes, mUpnpSoapResponse *soapRes)
 
void mupnp_control_action_response_setresponse (mUpnpActionResponse *actionRes, mUpnpAction *action)
 
mUpnpXmlNodemupnp_control_action_response_getactionresponsenode (mUpnpActionResponse *actionRes)
 
bool mupnp_control_action_response_getresult (mUpnpActionResponse *actionRes, mUpnpAction *action)
 
bool mupnp_control_action_response_geterror (mUpnpActionResponse *actionRes, mUpnpAction *action)
 
mUpnpQueryRequestmupnp_control_query_request_new (void)
 
void mupnp_control_query_request_delete (mUpnpQueryRequest *queryReq)
 
void mupnp_control_query_request_clear (mUpnpQueryRequest *queryReq)
 
void mupnp_control_query_request_setsoaprequest (mUpnpQueryRequest *queryReq, mUpnpSoapRequest *soapReq)
 
mUpnpXmlNodemupnp_control_query_request_getvarnamenode (mUpnpQueryRequest *queryReq)
 
char * mupnp_control_query_request_getvarname (mUpnpQueryRequest *queryReq)
 
void mupnp_control_query_request_setstatevariable (mUpnpQueryRequest *queryReq, mUpnpStateVariable *statVar)
 
mUpnpQueryResponsemupnp_control_query_request_post (mUpnpQueryRequest *queryReq)
 
mUpnpQueryResponsemupnp_control_query_response_new (void)
 
void mupnp_control_query_response_delete (mUpnpQueryResponse *queryReq)
 
void mupnp_control_query_response_clear (mUpnpQueryResponse *queryReq)
 
void mupnp_control_query_response_setsoapresponse (mUpnpQueryResponse *queryRes, mUpnpSoapResponse *soapRes)
 
void mupnp_control_query_response_setresponse (mUpnpQueryResponse *queryRes, mUpnpStateVariable *statVar)
 
mUpnpXmlNodemupnp_control_query_response_getreturnnode (mUpnpQueryResponse *queryRes)
 
char * mupnp_control_query_response_getreturnvalue (mUpnpQueryResponse *queryRes)
 
const char * mupnp_usn_getudn (const char *usn, char *udnBuf, size_t udnBufLen)
 
bool mupnp_action_post (mUpnpAction *action)
 
bool mupnp_statevariable_post (mUpnpStateVariable *statVar)
 

Macro Definition Documentation

◆ mupnp_control_action_request_getactionresponse

#define mupnp_control_action_request_getactionresponse ( actionReq)
Value:
(actionReq->actionRes)

Get action response from action request

Parameters
actionReqAction request
Returns
Action response

◆ mupnp_control_action_request_getargumentlist

#define mupnp_control_action_request_getargumentlist ( actionReq)
Value:
(actionReq->argList)

Get argument list from action request

Parameters
actionReqAction request
Returns
Argument list

◆ mupnp_control_action_request_getsoaprequest

#define mupnp_control_action_request_getsoaprequest ( actionReq)
Value:
(actionReq->soapReq)

Get soap request associated with action request

Parameters
actionReqAction request
Returns
Soap request

◆ mupnp_control_action_response_getsoapresponse

#define mupnp_control_action_response_getsoapresponse ( actionRes)
Value:
(actionRes->soapRes)

Get soap response from action response

Parameters
actionResAction response
Returns
Soap response

◆ mupnp_control_action_response_issuccessful

#define mupnp_control_action_response_issuccessful ( actionRes)
Value:
#define mupnp_soap_response_issuccessful(soapRes)
Definition soap.h:123

Check if action response indicates that action invoke was successfull

Parameters
actionResAction response
Returns
True if action has been successful, false otherwise

◆ MUPNP_CONTROL_ERROR_CODE

#define MUPNP_CONTROL_ERROR_CODE   "errorCode"

Definition fro control error code

◆ MUPNP_CONTROL_ERROR_DESCRIPTION

#define MUPNP_CONTROL_ERROR_DESCRIPTION   "errorDescription"

Definition for control error description

◆ MUPNP_CONTROL_FAULT_CODE

#define MUPNP_CONTROL_FAULT_CODE   "Client"

Definition for control fault code

◆ MUPNP_CONTROL_FAULT_STRING

#define MUPNP_CONTROL_FAULT_STRING   "UPnPError"

Definition for contol fault string

◆ mupnp_control_isactionrequest

#define mupnp_control_isactionrequest ( httpReq)
Value:
((mupnp_control_isqueryrequest(httpReq) == true) ? false : true)
#define mupnp_control_isqueryrequest(httpReq)
Definition control.h:221
#define false
Definition typedef.h:66

◆ mupnp_control_isqueryrequest

#define mupnp_control_isqueryrequest ( httpReq)
Value:
#define MUPNP_CONTROL_QUERY_SOAPACTION
Definition control.h:115
#define mupnp_soap_request_getsoapaction(soapReq)
Definition soap.h:84
#define mupnp_soap_request_getsoapactionwithns(soapReq)
Definition soap.h:85
ssize_t mupnp_strstr(const char *haystack, const char *needle)
Definition string_function.c:190
#define true
Definition typedef.h:63

Check if HTTP request query is UPnP query request

Parameters
httpReqHTTP request
Returns
True if request is UPnP query request, false othewise

◆ MUPNP_CONTROL_NS

#define MUPNP_CONTROL_NS   "u"

Definition for control name space

◆ mupnp_control_query_request_getqueryresponse

#define mupnp_control_query_request_getqueryresponse ( queryReq)
Value:
(queryReq->queryRes)

Get response from query request

Parameters
queryReqQuery request
Returns
Query response

◆ mupnp_control_query_request_getsoaprequest

#define mupnp_control_query_request_getsoaprequest ( queryReq)
Value:
(queryReq->soapReq)

Get soap request from query request

Parameters
queryReq
Returns
Soap request

◆ mupnp_control_query_response_getsoapresponse

#define mupnp_control_query_response_getsoapresponse ( queryRes)
Value:
(queryRes->soapRes)

Get soap response from query response

Parameters
queryResQuery response
Returns
Soap response

◆ mupnp_control_query_response_issuccessful

#define mupnp_control_query_response_issuccessful ( queryRes)
Value:

Check if query response indicates that query request has succeeded

Parameters
queryResQuery response

◆ MUPNP_CONTROL_QUERY_SOAPACTION

#define MUPNP_CONTROL_QUERY_SOAPACTION   "\"urn:schemas-upnp-org:control-1-0#QueryStateVariable\""

Definition for soap action: state variable query

◆ MUPNP_CONTROL_QUERY_STATE_VARIABLE

#define MUPNP_CONTROL_QUERY_STATE_VARIABLE   "QueryStateVariable"

Definition for query state variable

◆ MUPNP_CONTROL_QUERY_STATE_VARIABLE_RESPONSE

#define MUPNP_CONTROL_QUERY_STATE_VARIABLE_RESPONSE   "QueryStateVariableResponse"

Definition for query state variable response

◆ MUPNP_CONTROL_RETURN

#define MUPNP_CONTROL_RETURN   "return"

Definition for control return

◆ MUPNP_CONTROL_VAR_NAME

#define MUPNP_CONTROL_VAR_NAME   "varName"

Definition for control variable name

◆ MUPNP_CONTROL_XMLNS

#define MUPNP_CONTROL_XMLNS   "urn:schemas-upnp-org:control-1-0"

Definition for control XML name space

◆ MUPNP_MAN_DISCOVER

#define MUPNP_MAN_DISCOVER   "\"ssdp:discover\""

Definition for mandatory discover header

◆ mupnp_man_isdiscover

#define mupnp_man_isdiscover ( str)
Value:
((0 == mupnp_strstr(str, MUPNP_MAN_DISCOVER)) ? true : false)
#define MUPNP_MAN_DISCOVER
Definition control.h:37

Check if string is correct mandatory header value as specified in UPnP Device Architecture 1.2.2

Parameters
strString to be checked
Returns
True if string is exactly the required one, false otherwise

◆ MUPNP_NT_EVENT

#define MUPNP_NT_EVENT   "upnp:event"

Definition for NT event

◆ mupnp_nt_isrootdevice

#define mupnp_nt_isrootdevice ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_NT_ROOTDEVICE)) ? true : false)
#define MUPNP_NT_ROOTDEVICE
Definition control.h:44

Check if NT (notification target) is for root device

Parameters
strString to be checked
Returns
True if NT is for root device, false otherwise

◆ MUPNP_NT_ROOTDEVICE

#define MUPNP_NT_ROOTDEVICE   "upnp:rootdevice"

Definition for NT (Notification type) root device

◆ MUPNP_NTS_ALIVE

#define MUPNP_NTS_ALIVE   "ssdp:alive"

Definition for NTS alive

◆ MUPNP_NTS_BYEBYE

#define MUPNP_NTS_BYEBYE   "ssdp:byebye"

Definition for NTS byebye

◆ mupnp_nts_isalive

#define mupnp_nts_isalive ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_NTS_ALIVE)) ? true : false)
#define MUPNP_NTS_ALIVE
Definition control.h:56

Check if NTS (notification sub target) is of type "alive"

Parameters
strString to be checked
Returns
True if string is of type "alive", false otherwise

◆ mupnp_nts_isbyebye

#define mupnp_nts_isbyebye ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_NTS_BYEBYE)) ? true : false)
#define MUPNP_NTS_BYEBYE
Definition control.h:61

Check if string type is "byebye"

Parameters
strString to be checked
Returns
True if string is of type "byebye", false othewise

◆ mupnp_nts_ispropchange

#define mupnp_nts_ispropchange ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_NTS_PROPCHANGE)) ? true : false)
#define MUPNP_NTS_PROPCHANGE
Definition control.h:66

Check if string type is "property change"

Parameters
strString to be checked
Returns
True if string type is "property change"

◆ MUPNP_NTS_PROPCHANGE

#define MUPNP_NTS_PROPCHANGE   "upnp:propchange"

Definition for NTS property change

◆ MUPNP_ST_ALL_DEVICE

#define MUPNP_ST_ALL_DEVICE   "ssdp:all"

Definition for general ST (search target)

◆ mupnp_st_isalldevice

#define mupnp_st_isalldevice ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_ST_ALL_DEVICE)) ? true : false)
#define MUPNP_ST_ALL_DEVICE
Definition control.h:73

Check if device is of type "all"

Parameters
strString to be checked
Returns
True if device type is "all", false otherwise

◆ mupnp_st_isrootdevice

#define mupnp_st_isrootdevice ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_ST_ROOT_DEVICE)) ? true : false)
#define MUPNP_ST_ROOT_DEVICE
Definition control.h:78

Check if device string is from root device

Parameters
strString to be checked
Returns
True if string is from device type "root device", false otherwise

◆ mupnp_st_isurn

#define mupnp_st_isurn ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_ST_URN)) ? true : false)
#define MUPNP_ST_URN
Definition control.h:88

Check if string is from urn

Parameters
strString to be checked
Returns
True if string is from urn, false otherwise

◆ mupnp_st_isurndevice

#define mupnp_st_isurndevice ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_ST_URN_DEVICE)) ? true : false)
#define MUPNP_ST_URN_DEVICE
Definition control.h:93

Check if string is from urn device

Parameters
strString to be checked
Returns
True if string is from urn device, false otherwise

◆ mupnp_st_isurnservice

#define mupnp_st_isurnservice ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_ST_URN_SERVICE)) ? true : false)
#define MUPNP_ST_URN_SERVICE
Definition control.h:98

Check if string is from urn service

Parameters
strString to be checked
Returns
True if string is from urn service, false otherwise

◆ mupnp_st_isuuiddevice

#define mupnp_st_isuuiddevice ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_ST_UUID_DEVICE)) ? true : false)
#define MUPNP_ST_UUID_DEVICE
Definition control.h:83

Check if string is from uuid device

Parameters
strString to be checked
Returns
True if string is from uuid device, false otherwise

◆ MUPNP_ST_ROOT_DEVICE

#define MUPNP_ST_ROOT_DEVICE   "upnp:rootdevice"

Definition for root device ST

◆ MUPNP_ST_URN

#define MUPNP_ST_URN   "urn"

Definition for URN device

◆ MUPNP_ST_URN_DEVICE

#define MUPNP_ST_URN_DEVICE   "urn:schemas-upnp-org:device"

Definition for URN device

◆ MUPNP_ST_URN_SERVICE

#define MUPNP_ST_URN_SERVICE   "urn:schemas-upnp-org:service"

Definition for URN service

◆ MUPNP_ST_UUID_DEVICE

#define MUPNP_ST_UUID_DEVICE   "uuid"

Definition for ST UUID (universally unique identifier) prefix

◆ mupnp_usn_isrootdevice

#define mupnp_usn_isrootdevice ( str)
Value:
((0 <= mupnp_strstr(str, MUPNP_USN_ROOTDEVICE)) ? true : false)
#define MUPNP_USN_ROOTDEVICE
Definition control.h:105

Check if usn is from root device

Parameters
strString to be checked
Returns
True if usn associates to root device, false otherwise

◆ MUPNP_USN_ROOTDEVICE

#define MUPNP_USN_ROOTDEVICE   "upnp:rootdevice"

Definition for USN rootdevice

Typedef Documentation

◆ mUpnpActionRequest

Data type definition for action request

◆ mUpnpActionResponse

Data type definition for action response

◆ mUpnpQueryRequest

Data type definition for query request

◆ mUpnpQueryResponse

Data type definition for query response

Function Documentation

◆ mupnp_action_performlistner()

bool mupnp_action_performlistner ( mUpnpAction * action,
mUpnpActionRequest * actionReq )

Perform action listener

Parameters
actionAction
actionReqAction request

◆ mupnp_action_post()

bool mupnp_action_post ( mUpnpAction * action)

Send action

Parameters
actionAction

◆ mupnp_control_action_request_clear()

void mupnp_control_action_request_clear ( mUpnpActionRequest * actionReq)

Clear action request

Parameters
actionReqClear Action request

◆ mupnp_control_action_request_delete()

void mupnp_control_action_request_delete ( mUpnpActionRequest * actionReq)

Delete action request object

Parameters
actionReqAction request

◆ mupnp_control_action_request_getactionname()

char * mupnp_control_action_request_getactionname ( mUpnpActionRequest * actionReq)

Get action name from action request

Parameters
actionReqAction request
Returns
Action name

◆ mupnp_control_action_request_getactionnode()

mUpnpXmlNode * mupnp_control_action_request_getactionnode ( mUpnpActionRequest * actionReq)

Get XML action node from action request

Parameters
actionReq
Returns
Action request XML node

◆ mupnp_control_action_request_new()

mUpnpActionRequest * mupnp_control_action_request_new ( void )

Create new action request object

◆ mupnp_control_action_request_post()

mUpnpActionResponse * mupnp_control_action_request_post ( mUpnpActionRequest * actionReq)

Send action request

Parameters
actionReqAction request

◆ mupnp_control_action_request_setaction()

void mupnp_control_action_request_setaction ( mUpnpActionRequest * actionReq,
mUpnpAction * action )

Set action to action request

Parameters
actionReqAction request
actionUPnP action

◆ mupnp_control_action_request_setsoaprequest()

void mupnp_control_action_request_setsoaprequest ( mUpnpActionRequest * actionReq,
mUpnpSoapRequest * soapReq )

Set soap request associated with action request

Parameters
actionReqAction request
soapReqSoap request

◆ mupnp_control_action_response_clear()

void mupnp_control_action_response_clear ( mUpnpActionResponse * actionReq)

Clear action response

Parameters
actionReqAction response

◆ mupnp_control_action_response_delete()

void mupnp_control_action_response_delete ( mUpnpActionResponse * actionReq)

Delete action response

Parameters
actionReqAction response

◆ mupnp_control_action_response_getactionresponsenode()

mUpnpXmlNode * mupnp_control_action_response_getactionresponsenode ( mUpnpActionResponse * actionRes)

Get action response XML node from action response

Parameters
actionResAction response
Returns
Action response XML node

◆ mupnp_control_action_response_geterror()

bool mupnp_control_action_response_geterror ( mUpnpActionResponse * actionRes,
mUpnpAction * action )

Get error associated to action response

Todo
Check this out more carefully
Parameters
actionResAction response
actionUPnP action

◆ mupnp_control_action_response_getresult()

bool mupnp_control_action_response_getresult ( mUpnpActionResponse * actionRes,
mUpnpAction * action )

Get result from action response

Todo
Check this out more carefully
Parameters
actionResAction response
actionUPnP action

◆ mupnp_control_action_response_new()

mUpnpActionResponse * mupnp_control_action_response_new ( void )

Create new action response

◆ mupnp_control_action_response_setresponse()

void mupnp_control_action_response_setresponse ( mUpnpActionResponse * actionRes,
mUpnpAction * action )

Set action response to action

Parameters
actionResAction response
actionUPnP action

◆ mupnp_control_action_response_setsoapresponse()

void mupnp_control_action_response_setsoapresponse ( mUpnpActionResponse * actionRes,
mUpnpSoapResponse * soapRes )

Set soap response to action response

Parameters
actionResAction response
soapResSoap reaponse

◆ mupnp_control_query_request_clear()

void mupnp_control_query_request_clear ( mUpnpQueryRequest * queryReq)

Clear query request

Parameters
queryReqQuery request

◆ mupnp_control_query_request_delete()

void mupnp_control_query_request_delete ( mUpnpQueryRequest * queryReq)

Delete query request

Parameters
queryReqQuery request

◆ mupnp_control_query_request_getvarname()

char * mupnp_control_query_request_getvarname ( mUpnpQueryRequest * queryReq)

Get state variable name associated with this query request

Parameters
queryReqQuery request
Returns
State variable variable name

◆ mupnp_control_query_request_getvarnamenode()

mUpnpXmlNode * mupnp_control_query_request_getvarnamenode ( mUpnpQueryRequest * queryReq)

Get state variable XML node

Parameters
queryReq
Returns
State variable XML node

◆ mupnp_control_query_request_new()

mUpnpQueryRequest * mupnp_control_query_request_new ( void )

Create new query request object

◆ mupnp_control_query_request_post()

mUpnpQueryResponse * mupnp_control_query_request_post ( mUpnpQueryRequest * queryReq)

Send query request

Parameters
queryReqQuery request
Returns
Query response

◆ mupnp_control_query_request_setsoaprequest()

void mupnp_control_query_request_setsoaprequest ( mUpnpQueryRequest * queryReq,
mUpnpSoapRequest * soapReq )

Set soap request for query request

Parameters
queryReqQuery request
soapReqSoap request

◆ mupnp_control_query_request_setstatevariable()

void mupnp_control_query_request_setstatevariable ( mUpnpQueryRequest * queryReq,
mUpnpStateVariable * statVar )

Set state variable to query request

Parameters
queryReqQuery request
statVarState variable

◆ mupnp_control_query_response_clear()

void mupnp_control_query_response_clear ( mUpnpQueryResponse * queryReq)

Clear query response

Parameters
queryReqQuery request

◆ mupnp_control_query_response_delete()

void mupnp_control_query_response_delete ( mUpnpQueryResponse * queryReq)

Delete query response

Parameters
queryReqQuery request

◆ mupnp_control_query_response_getreturnnode()

mUpnpXmlNode * mupnp_control_query_response_getreturnnode ( mUpnpQueryResponse * queryRes)

Get XML return node from query response

Parameters
queryRes
Returns
XML return node

◆ mupnp_control_query_response_getreturnvalue()

char * mupnp_control_query_response_getreturnvalue ( mUpnpQueryResponse * queryRes)

Get return valuse from query response

Parameters
queryResQuery response
Returns
UPnP return value

◆ mupnp_control_query_response_new()

mUpnpQueryResponse * mupnp_control_query_response_new ( void )

Create new query response

◆ mupnp_control_query_response_setresponse()

void mupnp_control_query_response_setresponse ( mUpnpQueryResponse * queryRes,
mUpnpStateVariable * statVar )

Create and set XML response data into query response

Parameters
queryResQuery response
statVarState variable

◆ mupnp_control_query_response_setsoapresponse()

void mupnp_control_query_response_setsoapresponse ( mUpnpQueryResponse * queryRes,
mUpnpSoapResponse * soapRes )

Set soap response for query response

Parameters
queryResQuery response
soapResSoap response

◆ mupnp_control_request_sethostfromservice()

void mupnp_control_request_sethostfromservice ( mUpnpSoapRequest * soapReq,
mUpnpService * service )

Set host from service

Parameters
soapReqSoap request
serviceUPnP service

◆ mupnp_control_soap_request_initializeenvelopenode()

void mupnp_control_soap_request_initializeenvelopenode ( mUpnpSoapRequest * soapReq)

Initializes soap requests envelope node

Parameters
soapReqSoap request

◆ mupnp_control_soap_response_createfaultresponsenode()

mUpnpXmlNode * mupnp_control_soap_response_createfaultresponsenode ( int errCode,
char * errDescr )

◆ mupnp_control_soap_response_initializeenvelopenode()

void mupnp_control_soap_response_initializeenvelopenode ( mUpnpSoapResponse * soapRes)

Initialize soap responses envelope node

Parameters
soapResSoap response

◆ mupnp_control_soap_response_setfaultresponse()

void mupnp_control_soap_response_setfaultresponse ( mUpnpSoapResponse * soapRes,
int errCode,
char * errDescr )

Set failed response data

Parameters
soapResSoap response
errCodeError code
errDescrError description

◆ mupnp_statevariable_performlistner()

bool mupnp_statevariable_performlistner ( mUpnpStateVariable * statVar,
mUpnpQueryRequest * queryReq )

Perform query listener

Parameters
statVarState variable
queryReqQuery request

◆ mupnp_statevariable_post()

bool mupnp_statevariable_post ( mUpnpStateVariable * statVar)

Send query

Parameters
statVarState variable

◆ mupnp_usn_getudn()

const char * mupnp_usn_getudn ( const char * usn,
char * udnBuf,
size_t udnBufLen )

Get udn from usn

Parameters
usnUniversal serial number
udnBufBuffer where udn is stored after successfull execution
udnBufLenBuffer length for udnBuf
Returns
Pointer to beginning of udnBuf.