libUPnP 1.14.19
upnptools.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 UPNP_TOOLS_H
33#define UPNP_TOOLS_H
34
49#include "ixml.h" /* for IXML_Document */
50#include "upnpconfig.h" /* for UPNP_HAVE_TOOLS */
51
52/* Function declarations only if tools compiled into the library */
53#if UPNP_HAVE_TOOLS
54
55 #ifdef __cplusplus
56extern "C" {
57 #endif
58
68 int errorcode);
69
86 const char *BaseURL,
88 const char *RelURL,
90 char *AbsURL);
91
108 const char *BaseURL,
110 const char *RelURL,
113 char **AbsURL);
114
130 const char *ActionName,
132 const char *ServType,
134 int NumArg,
136 const char *Arg,
138 ...);
139
155 const char *ActionName,
157 const char *ServType,
159 int NumArg,
161 const char *Arg,
163 ...);
164
184 IXML_Document **ActionDoc,
186 const char *ActionName,
188 const char *ServType,
190 const char *ArgName,
192 const char *ArgVal);
193
214 IXML_Document **ActionResponse,
216 const char *ActionName,
218 const char *ServType,
220 const char *ArgName,
222 const char *ArgVal);
223
234 int NumArg,
236 const char *Arg,
238 ...);
239
258 IXML_Document **PropSet,
260 const char *ArgName,
262 const char *ArgVal);
263
264 #ifdef __cplusplus
265}
266 #endif
267
270#endif /* UPNP_HAVE_TOOLS */
271
272#endif /* UPNP_TOOLS_H */
#define UPNP_EXPORT_SPEC
Export functions on WIN32 DLLs.
Definition UpnpGlobal.h:98
UPNP_EXPORT_SPEC const char * UpnpGetErrorMessage(int errorcode)
Converts an SDK error code into a string error message suitable for display. The memory returned from...
Definition upnptools.c:115
UPNP_EXPORT_SPEC int UpnpAddToActionResponse(IXML_Document **ActionResponse, const char *ActionName, const char *ServType, const char *ArgName, const char *ArgVal)
Creates an action response packet based on its output parameters (status variable name and value pair...
Definition upnptools.c:389
UPNP_EXPORT_SPEC int UpnpResolveURL(const char *BaseURL, const char *RelURL, char *AbsURL)
Combines a base URL and a relative URL into a single absolute URL.
Definition upnptools.c:133
UPNP_EXPORT_SPEC IXML_Document * UpnpCreatePropertySet(int NumArg, const char *Arg,...)
Creates a property set message packet.
Definition upnptools.c:399
UPNP_EXPORT_SPEC IXML_Document * UpnpMakeAction(const char *ActionName, const char *ServType, int NumArg, const char *Arg,...)
Creates an action request packet based on its input parameters (status variable name and value pair).
Definition upnptools.c:347
UPNP_EXPORT_SPEC int UpnpResolveURL2(const char *BaseURL, const char *RelURL, char **AbsURL)
Combines a base URL and a relative URL into a single absolute URL.
Definition upnptools.c:153
UPNP_EXPORT_SPEC int UpnpAddToAction(IXML_Document **ActionDoc, const char *ActionName, const char *ServType, const char *ArgName, const char *ArgVal)
Adds the argument in the action request.
Definition upnptools.c:379
UPNP_EXPORT_SPEC IXML_Document * UpnpMakeActionResponse(const char *ActionName, const char *ServType, int NumArg, const char *Arg,...)
Ceates an action response packet based on its output parameters (status variable name and value pair)...
Definition upnptools.c:363
UPNP_EXPORT_SPEC int UpnpAddToPropertySet(IXML_Document **PropSet, const char *ArgName, const char *ArgVal)
Can be used when an application needs to transfer the status of many variables at once.
Definition upnptools.c:446
Data structure representing the DOM Document.
Definition ixml.h:160