libUPnP 22.0.4
soaplib.h
Go to the documentation of this file.
1/**************************************************************************
2 *
3 * Copyright (c) 2000-2003 Intel Corporation
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *
9 * - Redistributions of source code must retain the above copyright notice,
10 * this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 * - Neither name of Intel Corporation nor the names of its contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
30 **************************************************************************/
31
32#ifndef SOAPLIB_H
33#define SOAPLIB_H
34
35#include "httpparser.h"
36
40
41/* SOAP module API to be called in Upnp-Dk API */
42
43#include "sock.h"
44
52 http_parser_t *parser,
54 http_message_t *request,
56 SOCKINFO *info);
57
58/****************************************************************************
59 * Function: SoapSendAction
60 *
61 * Parameters:
62 * IN char* action_url: device control URL
63 * IN char *service_type: device service type
64 * IN IXML_Document *action_node: SOAP action node
65 * OUT IXML_Document **response_node: SOAP response node
66 *
67 * Description: This function is called by UPnP API to send the SOAP
68 * action request and waits till it gets the response from the device
69 * pass the response to the API layer
70 *
71 * Return: int
72 * returns UPNP_E_SUCCESS if successful else returns appropriate error
73 * Note:
74 ****************************************************************************/
75int SoapSendAction(char *action_url,
76 char *service_type,
77 IXML_Document *action_node,
78 IXML_Document **response_node);
79
80/****************************************************************************
81 * Function: SoapSendActionEx
82 *
83 * Parameters:
84 * IN char* action_url: device control URL
85 * IN char *service_type: device service type
86 * IN IXML_Document *Header: Soap header
87 * IN IXML_Document *action_node: SOAP action node (SOAP body)
88 * OUT IXML_Document **response_node: SOAP response node
89 *
90 * Description: This function is called by UPnP API to send the SOAP
91 * action request and waits till it gets the response from the device
92 * pass the response to the API layer. This action is similar to the
93 * the SoapSendAction with only difference that it allows users to
94 * pass the SOAP header along the SOAP body ( soap action request)
95 *
96 * Return: int
97 * returns UPNP_E_SUCCESS if successful else returns appropriate error
98 * Note:
99 ****************************************************************************/
100int SoapSendActionEx(char *ActionURL,
101 char *ServiceType,
102 IXML_Document *Header,
103 IXML_Document *ActNode,
104 IXML_Document **RespNode);
105
106/****************************************************************************
107 * Function: SoapGetServiceVarStatus
108 *
109 * Parameters:
110 * IN char * action_url: Address to send this variable query message.
111 * IN char *var_name: Name of the variable.
112 * OUT char **var_value: Output value.
113 *
114 * Description: This function creates a status variable query message
115 * send it to the specified URL. It also collect the response.
116 *
117 * Return: int
118 *
119 * Note:
120 ****************************************************************************/
121int SoapGetServiceVarStatus(
122 char *ActionURL, DOMString VarName, DOMString *StVar);
123
124extern const char *ContentTypeHeader;
125
126#endif /* SOAPLIB_H */
#define DOMString
The type of DOM strings.
Definition ixml.h:48
struct _IXML_Document IXML_Document
Data structure representing the DOM Document.
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....
Definition soap_device.c:758
Definition sock.h:60
Definition httpparser.h:181
Definition httpparser.h:216