libUPnP
1.6.17
|
00001 /************************************************************************** 00002 * 00003 * Copyright (c) 2000-2003 Intel Corporation 00004 * All rights reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions are met: 00008 * 00009 * - Redistributions of source code must retain the above copyright notice, 00010 * this list of conditions and the following disclaimer. 00011 * - Redistributions in binary form must reproduce the above copyright notice, 00012 * this list of conditions and the following disclaimer in the documentation 00013 * and/or other materials provided with the distribution. 00014 * - Neither name of Intel Corporation nor the names of its contributors 00015 * may be used to endorse or promote products derived from this software 00016 * without specific prior written permission. 00017 * 00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00019 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00020 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00021 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR 00022 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00023 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00024 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00025 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 00026 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00027 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00028 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00029 * 00030 **************************************************************************/ 00031 00032 #ifndef SOAPLIB_H 00033 #define SOAPLIB_H 00034 00039 /* SOAP module API to be called in Upnp-Dk API */ 00040 00041 00047 void soap_device_callback( 00049 http_parser_t *parser, 00051 http_message_t *request, 00053 SOCKINFO *info); 00054 00055 00056 /**************************************************************************** 00057 * Function: SoapSendAction 00058 * 00059 * Parameters: 00060 * IN char* action_url: device contrl URL 00061 * IN char *service_type: device service type 00062 * IN IXML_Document *action_node: SOAP action node 00063 * OUT IXML_Document **response_node: SOAP response node 00064 * 00065 * Description: This function is called by UPnP API to send the SOAP 00066 * action request and waits till it gets the response from the device 00067 * pass the response to the API layer 00068 * 00069 * Return: int 00070 * returns UPNP_E_SUCCESS if successful else returns appropriate error 00071 * Note: 00072 ****************************************************************************/ 00073 int SoapSendAction( 00074 IN char* action_url, 00075 IN char *service_type, 00076 IN IXML_Document *action_node, 00077 OUT IXML_Document **response_node); 00078 00079 /**************************************************************************** 00080 * Function: SoapSendActionEx 00081 * 00082 * Parameters: 00083 * IN char* action_url: device contrl URL 00084 * IN char *service_type: device service type 00085 * IN IXML_Document *Header: Soap header 00086 * IN IXML_Document *action_node: SOAP action node (SOAP body) 00087 * OUT IXML_Document **response_node: SOAP response node 00088 * 00089 * Description: This function is called by UPnP API to send the SOAP 00090 * action request and waits till it gets the response from the device 00091 * pass the response to the API layer. This action is similar to the 00092 * the SoapSendAction with only difference that it allows users to 00093 * pass the SOAP header along the SOAP body ( soap action request) 00094 * 00095 * Return: int 00096 * returns UPNP_E_SUCCESS if successful else returns appropriate error 00097 * Note: 00098 ****************************************************************************/ 00099 int SoapSendActionEx( 00100 IN char * ActionURL, 00101 IN char *ServiceType, 00102 IN IXML_Document *Header, 00103 IN IXML_Document *ActNode, 00104 OUT IXML_Document **RespNode); 00105 00106 /**************************************************************************** 00107 * Function: SoapGetServiceVarStatus 00108 * 00109 * Parameters: 00110 * IN char * action_url: Address to send this variable query message. 00111 * IN char *var_name: Name of the variable. 00112 * OUT char **var_value: Output value. 00113 * 00114 * Description: This function creates a status variable query message 00115 * send it to the specified URL. It also collect the response. 00116 * 00117 * Return: int 00118 * 00119 * Note: 00120 ****************************************************************************/ 00121 int SoapGetServiceVarStatus( 00122 IN char * ActionURL, 00123 IN DOMString VarName, 00124 OUT DOMString *StVar); 00125 00126 extern const char* ContentTypeHeader; 00127 00128 #endif /* SOAPLIB_H */ 00129