UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
soap_device.cpp File Reference

Items for UPnP devices to manage UPnP Control. More...

#include <soap_common.hpp>
#include <soap_device.hpp>
#include <httpreadwrite.hpp>
#include <parsetools.hpp>
#include <ssdp_common.hpp>
#include <statcodes.hpp>
#include <upnpapi.hpp>
#include <UpnpStateVarRequest.hpp>
#include <webserver.hpp>
+ Include dependency graph for soap_device.cpp:

Go to the source code of this file.

Classes

struct  anonymous_namespace{soap_device.cpp}::soap_devserv_t
 SOAP info. More...
 

Functions

void soap_device_callback (http_parser_t *parser, http_message_t *request, SOCKINFO *info)
 This is a callback called by minisever after receiving the request from the control point.
 
Functions scope restricted to file
void anonymous_namespace{soap_device.cpp}::namecopy (char dest[NAME_SIZE], const char *src)
 Copy string with length NAME_SIZE and terminate with '\0'.
 
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.
 
void anonymous_namespace{soap_device.cpp}::send_var_query_response (SOCKINFO *info, const char *var_value, http_message_t *hmsg)
 Sends response of get var status.
 
void anonymous_namespace{soap_device.cpp}::send_action_response (SOCKINFO *info, IXML_Document *action_resp, http_message_t *request)
 Sends the SOAP action response.
 
void anonymous_namespace{soap_device.cpp}::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 anonymous_namespace{soap_device.cpp}::handle_invoke_action (SOCKINFO *info, http_message_t *request, soap_devserv_t *soap_info, IXML_Node *req_node)
 Handles the SOAP action request.
 
int anonymous_namespace{soap_device.cpp}::get_dev_service (http_message_t *request, int AddressFamily, soap_devserv_t *soap_info)
 Retrieve SOAP device/service information associated with request-URI.
 
int anonymous_namespace{soap_device.cpp}::get_mpost_acton_hdrval (http_message_t *request, memptr *val)
 Get the SOAPACTION header value for M-POST request.
 
int anonymous_namespace{soap_device.cpp}::check_soapaction_hdr (http_message_t *request, soap_devserv_t *soap_info)
 Check header validity, get action name and version of service.
 
int anonymous_namespace{soap_device.cpp}::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 anonymous_namespace{soap_device.cpp}::SREQ_HDR_NOT_FOUND {-1}
 UPnP Device SOAP status.
 
constexpr int anonymous_namespace{soap_device.cpp}::SREQ_BAD_HDR_FORMAT {-2}
 UPnP Device SOAP status.
 
constexpr int anonymous_namespace{soap_device.cpp}::SREQ_NOT_EXTENDED {-3}
 UPnP Device SOAP status.
 
constexpr int anonymous_namespace{soap_device.cpp}::SOAP_INVALID_ACTION {401}
 UPnP Device SOAP status.
 
constexpr int anonymous_namespace{soap_device.cpp}::SOAP_INVALID_VAR {404}
 UPnP Device SOAP status.
 
constexpr int anonymous_namespace{soap_device.cpp}::SOAP_ACTION_FAILED {501}
 UPnP Device SOAP status.
 
constexpr int anonymous_namespace{soap_device.cpp}::SOAP_MEMORY_OUT {603}
 UPnP Device SOAP status.
 
constexpr char anonymous_namespace{soap_device.cpp}::SOAP_BODY [] {"Body"}
 UPnP Device SOAP strings.
 
constexpr char anonymous_namespace{soap_device.cpp}::SOAP_URN [] {"http://schemas.xmlsoap.org/soap/envelope/"}
 UPnP Device SOAP strings.
 
constexpr char anonymous_namespace{soap_device.cpp}::QUERY_STATE_VAR_URN [] {"urn:schemas-upnp-org:control-1-0"}
 UPnP Device SOAP strings.
 
constexpr char anonymous_namespace{soap_device.cpp}::Soap_Invalid_Action [] {"Invalid Action"}
 UPnP Device SOAP strings.
 
constexpr char anonymous_namespace{soap_device.cpp}::Soap_Action_Failed [] {"Action Failed"}
 UPnP Device SOAP strings.
 
constexpr char anonymous_namespace{soap_device.cpp}::Soap_Invalid_Var [] {"Invalid Var"}
 UPnP Device SOAP strings.
 
constexpr char anonymous_namespace{soap_device.cpp}::Soap_Memory_out [] {"Out of Memory"}
 UPnP Device SOAP strings.
 

Detailed Description

Items for UPnP devices to manage UPnP Control.

This is only available if the option for Devices and the option for SOAP is enabled with compiling the library.

Definition in file soap_device.cpp.


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

◆ soap_device_callback()

void soap_device_callback ( http_parser_t parser,
http_message_t request,
SOCKINFO info 
)

This is a callback called by minisever after receiving the request from the control point.

This is a callback called by minisever.

After HTTP processing, it calls handle_soap_request to start SOAP processing.

Parameters
[in]parserParsed request received by the device.
[in]requestHTTP request.
[in,out]infoSocket info.

Definition at line 735 of file soap_device.cpp.

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