1 #ifndef GBXSERVERRESPONSE_H_
2 #define GBXSERVERRESPONSE_H_
10 #include "../../../lib/pugixml/src/pugixml.hpp"
11 #include "../GbxStructs.h"
21 std::vector<GbxResponseParameter>
Array;
22 std::map<std::string, GbxResponseParameter>
Struct;
30 if(
Type.find(
"array") != std::string::npos)
35 return std::vector<GbxResponseParameter>();
41 std::map<std::string, GbxResponseParameter>
GetStruct()
43 if(
Type.find(
"struct") != std::string::npos)
48 return std::map<std::string, GbxResponseParameter>();
56 if(
Type.find(
"array") == std::string::npos &&
57 Type.find(
"struct") == std::string::npos)
83 void SetRaw(std::string response);
97 std::vector<GbxResponseParameter>
parameters = std::vector<GbxResponseParameter>();
105 #endif // GBXSERVERRESPONSE_H_
std::vector< GbxResponseParameter > GetArray()
Gets the value as vector of parameters.
Definition: GbxServerResponse.h:28
std::vector< GbxResponseParameter > GetParameters()
Returns the extracted parameters.
Definition: GbxServerResponse.cpp:21
std::string Text
Parameters as text.
Definition: GbxServerResponse.h:23
std::string GetString()
Gets the value as string.
Definition: GbxServerResponse.h:54
void SetRaw(std::string response)
Sets the raw message value.
Definition: GbxServerResponse.cpp:11
GbxServerResponse()
Empty constructor.
Definition: GbxServerResponse.cpp:6
std::map< std::string, GbxResponseParameter > Struct
Parameters as struct.
Definition: GbxServerResponse.h:22
std::vector< GbxResponseParameter > parameters
List of parameters.
Definition: GbxServerResponse.h:97
std::string Type
XML-RPC data type.
Definition: GbxServerResponse.h:20
std::string GetRaw()
Returns raw response (XML).
Definition: GbxServerResponse.cpp:16
GbxResponseParameter extractParam(pugi::xml_node param)
Extracts parameters from the raw data (XML).
Definition: GbxServerResponse.cpp:26
Response from server, de-XML-fies the response.
Definition: GbxServerResponse.h:70
std::string data
Raw response data.
Definition: GbxServerResponse.h:96
std::map< std::string, GbxResponseParameter > GetStruct()
Gets the value as map of parameters.
Definition: GbxServerResponse.h:41
std::vector< GbxResponseParameter > Array
Parameters as array.
Definition: GbxServerResponse.h:21
Parameter deducted from server response.
Definition: GbxServerResponse.h:17