UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
anonymous_namespace{soap_device.cpp} Namespace Reference

Classes

struct  soap_devserv_t
 SOAP info. More...
 

Functions

Functions scope restricted to file
void namecopy (char dest[NAME_SIZE], const char *src)
 Copy string with length NAME_SIZE and terminate with '\0'.
 
void send_error_response (SOCKINFO *info, int error_code, const char *err_msg, http_message_t *hmsg)
 Sends SOAP error response.
 
void send_var_query_response (SOCKINFO *info, const char *var_value, http_message_t *hmsg)
 Sends response of get var status.
 
void send_action_response (SOCKINFO *info, IXML_Document *action_resp, http_message_t *request)
 Sends the SOAP action response.
 
void handle_query_variable (SOCKINFO *info, http_message_t *request, soap_devserv_t *soap_info, IXML_Node *req_node)
 Handles the SOAP requests to querry the state variables.
 
void handle_invoke_action (SOCKINFO *info, http_message_t *request, soap_devserv_t *soap_info, IXML_Node *req_node)
 Handles the SOAP action request.
 
int get_dev_service (http_message_t *request, int AddressFamily, soap_devserv_t *soap_info)
 Retrieve SOAP device/service information associated with request-URI.
 
int get_mpost_acton_hdrval (http_message_t *request, memptr *val)
 Get the SOAPACTION header value for M-POST request.
 
int check_soapaction_hdr (http_message_t *request, soap_devserv_t *soap_info)
 Check header validity, get action name and version of service.
 
int check_soap_request (soap_devserv_t *soap_info, IXML_Document *xml_doc, IXML_Node **req_node)
 Check validity of the SOAP request per UPnP specification.
 

Variables

Variables scope restricted to file
constexpr int SREQ_HDR_NOT_FOUND {-1}
 UPnP Device SOAP status.
 
constexpr int SREQ_BAD_HDR_FORMAT {-2}
 UPnP Device SOAP status.
 
constexpr int SREQ_NOT_EXTENDED {-3}
 UPnP Device SOAP status.
 
constexpr int SOAP_INVALID_ACTION {401}
 UPnP Device SOAP status.
 
constexpr int SOAP_INVALID_VAR {404}
 UPnP Device SOAP status.
 
constexpr int SOAP_ACTION_FAILED {501}
 UPnP Device SOAP status.
 
constexpr int SOAP_MEMORY_OUT {603}
 UPnP Device SOAP status.
 
constexpr char SOAP_BODY [] {"Body"}
 UPnP Device SOAP strings.
 
constexpr char SOAP_URN [] {"http://schemas.xmlsoap.org/soap/envelope/"}
 UPnP Device SOAP strings.
 
constexpr char QUERY_STATE_VAR_URN [] {"urn:schemas-upnp-org:control-1-0"}
 UPnP Device SOAP strings.
 
constexpr char Soap_Invalid_Action [] {"Invalid Action"}
 UPnP Device SOAP strings.
 
constexpr char Soap_Action_Failed [] {"Action Failed"}
 UPnP Device SOAP strings.
 
constexpr char Soap_Invalid_Var [] {"Invalid Var"}
 UPnP Device SOAP strings.
 
constexpr char Soap_Memory_out [] {"Out of Memory"}
 UPnP Device SOAP strings.
 

Class Documentation

◆ anonymous_namespace{soap_device.cpp}::soap_devserv_t

struct anonymous_namespace{soap_device.cpp}::soap_devserv_t

SOAP info.

Definition at line 101 of file soap_device.cpp.

+ Collaboration diagram for anonymous_namespace{soap_device.cpp}::soap_devserv_t:
Class Members
char dev_udn[NAME_SIZE]
char service_type[NAME_SIZE]
char service_id[NAME_SIZE]
memptr action_name
Upnp_FunPtr callback
void * cookie

Function Documentation

◆ namecopy()

void anonymous_namespace{soap_device.cpp}::namecopy ( char  dest[NAME_SIZE],
const char *  src 
)

Copy string with length NAME_SIZE and terminate with '\0'.

Definition at line 116 of file soap_device.cpp.

+ Here is the caller graph for this function:

◆ send_error_response()

void anonymous_namespace{soap_device.cpp}::send_error_response ( SOCKINFO info,
int  error_code,
const char *  err_msg,
http_message_t hmsg 
)

Sends SOAP error response.

Parameters
[in]infoSocket info.
[in]error_codeError code.
[in]err_msgError message.
[in]hmsgHTTP request.

Definition at line 125 of file soap_device.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send_var_query_response()

void anonymous_namespace{soap_device.cpp}::send_var_query_response ( SOCKINFO info,
const char *  var_value,
http_message_t hmsg 
)
inline

Sends response of get var status.

Parameters
[in]infoSocket info.
[in]var_valueValue of the state variable.
[in]hmsgHTTP request.

Definition at line 190 of file soap_device.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send_action_response()

void anonymous_namespace{soap_device.cpp}::send_action_response ( SOCKINFO info,
IXML_Document action_resp,
http_message_t request 
)
inline

Sends the SOAP action response.

Parameters
[in]infoSocket info.
[in]action_respThe response document.
[in]requestAction request document.

Definition at line 239 of file soap_device.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handle_query_variable()

void anonymous_namespace{soap_device.cpp}::handle_query_variable ( SOCKINFO info,
http_message_t request,
soap_devserv_t soap_info,
IXML_Node req_node 
)
inline

Handles the SOAP requests to querry the state variables.

Deprecated:
This functionality has been deprecated in the UPnP V1.0 architecture.
Parameters
[in]infoSocket info.
[in]requestHTTP Request.
[in]soap_infoSOAP device/service information.
[in]req_nodeNode containing variable name.

Definition at line 302 of file soap_device.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handle_invoke_action()

void anonymous_namespace{soap_device.cpp}::handle_invoke_action ( SOCKINFO info,
http_message_t request,
soap_devserv_t soap_info,
IXML_Node req_node 
)
inline

Handles the SOAP action request.

Parameters
[in]infoSocket info.
[in]requestHTTP Request.
[in]soap_infoSOAP device/service information.
[in]req_nodeNode containing the SOAP action request.

Definition at line 364 of file soap_device.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_dev_service()

int anonymous_namespace{soap_device.cpp}::get_dev_service ( http_message_t request,
int  AddressFamily,
soap_devserv_t soap_info 
)
inline

Retrieve SOAP device/service information associated with request-URI.

This includes the callback function to hand-over the request to the device application.

Returns
On success: 0
On error: -1
Parameters
[in]requestHTTP request.
[in]AddressFamilyAddress family: AF_INET or AF_INET6.
[out]soap_infoSOAP device/service information.

Definition at line 461 of file soap_device.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_mpost_acton_hdrval()

int anonymous_namespace{soap_device.cpp}::get_mpost_acton_hdrval ( http_message_t request,
memptr val 
)
inline

Get the SOAPACTION header value for M-POST request.

Returns
On success: UPNP_E_SUCCESS
On error:
  • UPNP_E_OUTOF_MEMORY
  • SREQ_NOT_EXTENDED
  • SREQ_HDR_NOT_FOUND
Parameters
[in]requestHTTP request.
[out]valBuffer to get the header value

Definition at line 513 of file soap_device.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_soapaction_hdr()

int anonymous_namespace{soap_device.cpp}::check_soapaction_hdr ( http_message_t request,
soap_devserv_t soap_info 
)
inline

Check header validity, get action name and version of service.

Check the header validity, and get the action name and the version of the service that the Control Point wants to use.

Returns
On success: UPNP_E_SUCCESS
On error:
  • UPNP_E_OUTOF_MEMORY
  • SREQ_NOT_EXTENDED
  • SREQ_HDR_NOT_FOUND
  • SREQ_BAD_HDR_FORMAT
Parameters
[in]requestHTTP request.
[in,out]soap_infoSOAP device/service information.

Definition at line 561 of file soap_device.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_soap_request()

int anonymous_namespace{soap_device.cpp}::check_soap_request ( soap_devserv_t soap_info,
IXML_Document xml_doc,
IXML_Node **  req_node 
)
inline

Check validity of the SOAP request per UPnP specification.

Returns
On success: 0
On error: -1
Parameters
[in]soap_infoSOAP device/service information.
[in]xml_docDocument containing the SOAP action request.
[out]req_nodeNode containing the SOAP action request/variable name.

Definition at line 643 of file soap_device.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ SREQ_HDR_NOT_FOUND

constexpr int anonymous_namespace{soap_device.cpp}::SREQ_HDR_NOT_FOUND {-1}
constexpr

UPnP Device SOAP status.

Definition at line 70 of file soap_device.cpp.

◆ SREQ_BAD_HDR_FORMAT

constexpr int anonymous_namespace{soap_device.cpp}::SREQ_BAD_HDR_FORMAT {-2}
constexpr

UPnP Device SOAP status.

Definition at line 71 of file soap_device.cpp.

◆ SREQ_NOT_EXTENDED

constexpr int anonymous_namespace{soap_device.cpp}::SREQ_NOT_EXTENDED {-3}
constexpr

UPnP Device SOAP status.

Definition at line 72 of file soap_device.cpp.

◆ SOAP_INVALID_ACTION

constexpr int anonymous_namespace{soap_device.cpp}::SOAP_INVALID_ACTION {401}
constexpr

UPnP Device SOAP status.

Definition at line 74 of file soap_device.cpp.

◆ SOAP_INVALID_VAR

constexpr int anonymous_namespace{soap_device.cpp}::SOAP_INVALID_VAR {404}
constexpr

UPnP Device SOAP status.

Definition at line 77 of file soap_device.cpp.

◆ SOAP_ACTION_FAILED

constexpr int anonymous_namespace{soap_device.cpp}::SOAP_ACTION_FAILED {501}
constexpr

UPnP Device SOAP status.

Definition at line 78 of file soap_device.cpp.

◆ SOAP_MEMORY_OUT

constexpr int anonymous_namespace{soap_device.cpp}::SOAP_MEMORY_OUT {603}
constexpr

UPnP Device SOAP status.

Definition at line 79 of file soap_device.cpp.

◆ SOAP_BODY

constexpr char anonymous_namespace{soap_device.cpp}::SOAP_BODY[] {"Body"}
constexpr

UPnP Device SOAP strings.

Definition at line 84 of file soap_device.cpp.

◆ SOAP_URN

constexpr char anonymous_namespace{soap_device.cpp}::SOAP_URN[] {"http://schemas.xmlsoap.org/soap/envelope/"}
constexpr

UPnP Device SOAP strings.

Definition at line 85 of file soap_device.cpp.

◆ QUERY_STATE_VAR_URN

constexpr char anonymous_namespace{soap_device.cpp}::QUERY_STATE_VAR_URN[] {"urn:schemas-upnp-org:control-1-0"}
constexpr

UPnP Device SOAP strings.

Definition at line 86 of file soap_device.cpp.

◆ Soap_Invalid_Action

constexpr char anonymous_namespace{soap_device.cpp}::Soap_Invalid_Action[] {"Invalid Action"}
constexpr

UPnP Device SOAP strings.

Definition at line 88 of file soap_device.cpp.

◆ Soap_Action_Failed

constexpr char anonymous_namespace{soap_device.cpp}::Soap_Action_Failed[] {"Action Failed"}
constexpr

UPnP Device SOAP strings.

Definition at line 90 of file soap_device.cpp.

◆ Soap_Invalid_Var

constexpr char anonymous_namespace{soap_device.cpp}::Soap_Invalid_Var[] {"Invalid Var"}
constexpr

UPnP Device SOAP strings.

Definition at line 91 of file soap_device.cpp.

◆ Soap_Memory_out

constexpr char anonymous_namespace{soap_device.cpp}::Soap_Memory_out[] {"Out of Memory"}
constexpr

UPnP Device SOAP strings.

Definition at line 92 of file soap_device.cpp.