|
a/libupnpp/soaphelp.hxx |
|
b/libupnpp/soaphelp.hxx |
|
... |
|
... |
18 |
#define _SOAPHELP_H_X_INCLUDED_
|
18 |
#define _SOAPHELP_H_X_INCLUDED_
|
19 |
|
19 |
|
20 |
#include <vector>
|
20 |
#include <vector>
|
21 |
#include <string>
|
21 |
#include <string>
|
22 |
#include <map>
|
22 |
#include <map>
|
|
|
23 |
#include <unordered_map>
|
23 |
|
24 |
|
24 |
#include <upnp/ixml.h>
|
25 |
#include <upnp/ixml.h>
|
25 |
|
26 |
|
26 |
/** Store returned values after decoding the arguments in a SOAP Call */
|
27 |
/** Store returned values after decoding the arguments in a SOAP Call */
|
27 |
class SoapDecodeOutput {
|
28 |
class SoapDecodeOutput {
|
|
... |
|
... |
31 |
|
32 |
|
32 |
// Utility methods
|
33 |
// Utility methods
|
33 |
bool getBool(const char *nm, bool *value) const;
|
34 |
bool getBool(const char *nm, bool *value) const;
|
34 |
bool getInt(const char *nm, int *value) const;
|
35 |
bool getInt(const char *nm, int *value) const;
|
35 |
bool getString(const char *nm, std::string *value) const;
|
36 |
bool getString(const char *nm, std::string *value) const;
|
36 |
static std::string xmlQuote(const std::string& in);
|
|
|
37 |
static std::string i2s(int val);
|
|
|
38 |
};
|
37 |
};
|
39 |
|
38 |
|
40 |
/** Decode the XML in a Soap call and return the arguments in a SoapArgs
|
39 |
/** Decode the XML in a Soap call and return the arguments in a SoapArgs
|
41 |
* structure.
|
40 |
* structure.
|
42 |
*
|
41 |
*
|
|
... |
|
... |
83 |
|
82 |
|
84 |
/** Build a SOAP response data XML document from a list of values */
|
83 |
/** Build a SOAP response data XML document from a list of values */
|
85 |
extern IXML_Document *buildSoapBody(const SoapEncodeInput& data,
|
84 |
extern IXML_Document *buildSoapBody(const SoapEncodeInput& data,
|
86 |
bool isResp = true);
|
85 |
bool isResp = true);
|
87 |
|
86 |
|
|
|
87 |
namespace SoapHelp {
|
|
|
88 |
std::string xmlQuote(const std::string& in);
|
|
|
89 |
std::string xmlUnquote(const std::string& in);
|
|
|
90 |
std::string i2s(int val);
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
/** Decode UPnP Event data. This is not soap, but it's quite close to
|
|
|
94 |
* the other code in here so whatever...
|
|
|
95 |
*
|
|
|
96 |
* The variable values are contained in a propertyset XML document:
|
|
|
97 |
* <?xml version="1.0"?>
|
|
|
98 |
* <e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0">
|
|
|
99 |
* <e:property>
|
|
|
100 |
* <variableName>new value</variableName>
|
|
|
101 |
* </e:property>
|
|
|
102 |
* <!-- Other variable names and values (if any) go here. -->
|
|
|
103 |
* </e:propertyset>
|
|
|
104 |
*/
|
|
|
105 |
extern bool decodePropertySet(IXML_Document *doc,
|
|
|
106 |
std::unordered_map<std::string,std::string>& out);
|
|
|
107 |
|
88 |
#endif /* _SOAPHELP_H_X_INCLUDED_ */
|
108 |
#endif /* _SOAPHELP_H_X_INCLUDED_ */
|