#include <xmlrpc.h>


Public Member Functions | |
| XMLRPCResponse () | |
| void | set_int (int i4) |
| void | set_double (double d) |
| void | set_bool (bool b) |
| void | set_string (const string &s) |
| void | set_string (const char *s) |
| void | set_date (const ISODate &date) |
| void | set_binary (const Binary &bin) |
| void | set_array (const XMLRPCArray &arr) |
| void | set_struct (const XMLRPCStruct &str) |
| void | set_failure (int code, const string &message) |
| string | flush () |
Protected Member Functions | |
| void | write_string_param (const string &value) |
| void | write_param (const string &type, const string &value) |
| void | write_param (const XMLRPCArray &arr) |
| void | write_param (const XMLRPCStruct &str) |
| void | write_struct (const XMLRPCStruct &str, const string &keyword) |
Protected Attributes | |
| ostringstream | _buffer |
| XMLWriter | _writer |
| int | _params |
Private Member Functions | |
| void | init () |
Definition at line 336 of file xmlrpc.h.
| XMLRPC::XMLRPCResponse::XMLRPCResponse | ( | ) | [inline] |
| string XMLRPC::XMLRPCWriter::flush | ( | ) | [inherited] |
Definition at line 219 of file xmlrpc.cpp.
References XMLRPC::XMLRPCWriter::_buffer, XMLRPC::XMLRPCWriter::_params, XMLRPC::XMLRPCWriter::_writer, and XMLStorage::XMLWriter::back().
Referenced by XMLRPC::XMLRPCClient::call().
{
if (_params)
_writer.back(); // </params>
_writer.back(); // </methodCall> bzw. </methodResponse>
return _buffer.str();
}


| void XMLRPC::XMLRPCResponse::init | ( | ) | [private] |
| void XMLRPC::XMLRPCResponse::set_array | ( | const XMLRPCArray & | arr ) | [inline] |
Definition at line 350 of file xmlrpc.h.
{write_param(arr);}
| void XMLRPC::XMLRPCResponse::set_binary | ( | const Binary & | bin ) | [inline] |
Definition at line 349 of file xmlrpc.h.
References XMLRPC::Binary::str().
{write_param("base64", bin.str());}

| void XMLRPC::XMLRPCResponse::set_bool | ( | bool | b ) | [inline] |
Definition at line 345 of file xmlrpc.h.
{write_param("boolean", b? "1": "0");}
| void XMLRPC::XMLRPCResponse::set_date | ( | const ISODate & | date ) | [inline] |
Definition at line 348 of file xmlrpc.h.
References XMLRPC::ISODate::str().
{write_param("dateTime.iso8601", date.str());}

| void XMLRPC::XMLRPCResponse::set_double | ( | double | d ) | [inline] |
Definition at line 344 of file xmlrpc.h.
{write_param("double", XMLDouble(d));}
| void XMLRPC::XMLRPCResponse::set_failure | ( | int | code, |
| const string & | message | ||
| ) |
| void XMLRPC::XMLRPCResponse::set_int | ( | int | i4 ) | [inline] |
Definition at line 343 of file xmlrpc.h.
{write_param("i4", XMLInt(i4));}
| void XMLRPC::XMLRPCResponse::set_string | ( | const string & | s ) | [inline] |
Definition at line 346 of file xmlrpc.h.
{write_string_param(s);}
| void XMLRPC::XMLRPCResponse::set_string | ( | const char * | s ) | [inline] |
Definition at line 347 of file xmlrpc.h.
{write_string_param(s);}
| void XMLRPC::XMLRPCResponse::set_struct | ( | const XMLRPCStruct & | str ) | [inline] |
Definition at line 351 of file xmlrpc.h.
{write_param(str);}
| void XMLRPC::XMLRPCWriter::write_param | ( | const XMLRPCStruct & | str ) | [protected, inherited] |
Definition at line 277 of file xmlrpc.cpp.
References XMLRPC::XMLRPCWriter::_params, XMLRPC::XMLRPCWriter::_writer, XMLStorage::XMLWriter::create(), and XMLRPC::XMLRPCWriter::write_struct().
{
if (!_params++)
_writer.create("params");
write_struct(str, "param");
}

| void XMLRPC::XMLRPCWriter::write_param | ( | const XMLRPCArray & | arr ) | [protected, inherited] |
Definition at line 255 of file xmlrpc.cpp.
References XMLRPC::XMLRPCWriter::_params, XMLRPC::XMLRPCWriter::_writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().
{
if (!_params++)
_writer.create("params");
_writer.create("param");
_writer.create("value");
_writer.create("array");
_writer.create("data");
for(XMLRPCArray::const_iterator it=arr.begin(); it!=arr.end(); ++it) {
_writer.create("value");
_writer.set_content(*it);
_writer.back();
}
_writer.back();
_writer.back();
_writer.back();
_writer.back();
}

| void XMLRPC::XMLRPCWriter::write_param | ( | const string & | type, |
| const string & | value | ||
| ) | [protected, inherited] |
Definition at line 241 of file xmlrpc.cpp.
References XMLRPC::XMLRPCWriter::_params, XMLRPC::XMLRPCWriter::_writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().
{
if (!_params++)
_writer.create("params");
_writer.create("param");
_writer.create("value");
_writer.create(type);
_writer.set_content(value);
_writer.back();
_writer.back();
_writer.back();
}

| void XMLRPC::XMLRPCWriter::write_string_param | ( | const string & | value ) | [protected, inherited] |
Definition at line 229 of file xmlrpc.cpp.
References XMLRPC::XMLRPCWriter::_params, XMLRPC::XMLRPCWriter::_writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().
{
if (!_params++)
_writer.create("params");
_writer.create("param");
_writer.create("value");
_writer.set_content(value);
_writer.back();
_writer.back();
}

| void XMLRPC::XMLRPCWriter::write_struct | ( | const XMLRPCStruct & | str, |
| const string & | keyword | ||
| ) | [protected, inherited] |
Definition at line 287 of file xmlrpc.cpp.
References XMLRPC::XMLRPCWriter::_writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().
Referenced by XMLRPC::XMLRPCWriter::write_param().
{
_writer.create(keyword);
_writer.create("value");
_writer.create("struct");
for(XMLRPCStruct::const_iterator it=str.begin(); it!=str.end(); ++it) {
_writer.create("member");
_writer.create("name");
_writer.set_content(it->first);
_writer.back();
_writer.create("value");
_writer.set_content(it->second);
_writer.back();
_writer.back();
}
_writer.back();
_writer.back();
_writer.back();
}


ostringstream XMLRPC::XMLRPCWriter::_buffer [protected, inherited] |
Definition at line 301 of file xmlrpc.h.
Referenced by XMLRPC::XMLRPCWriter::flush().
int XMLRPC::XMLRPCWriter::_params [protected, inherited] |
Definition at line 303 of file xmlrpc.h.
Referenced by XMLRPC::XMLRPCWriter::flush(), XMLRPC::XMLRPCWriter::write_param(), and XMLRPC::XMLRPCWriter::write_string_param().
XMLWriter XMLRPC::XMLRPCWriter::_writer [protected, inherited] |
Definition at line 302 of file xmlrpc.h.
Referenced by XMLRPC::XMLRPCWriter::flush(), XMLRPC::XMLRPCCall::init(), XMLRPC::XMLRPCWriter::write_param(), XMLRPC::XMLRPCWriter::write_string_param(), and XMLRPC::XMLRPCWriter::write_struct().
1.7.2