#include <xmlrpc.h>


Public Member Functions | |
| XMLRPCCall (const char *name) | |
| XMLRPCCall & | operator% (int i4) |
| XMLRPCCall & | operator% (double d) |
| XMLRPCCall & | operator% (bool b) |
| XMLRPCCall & | operator% (const string &s) |
| XMLRPCCall & | operator% (const char *s) |
| XMLRPCCall & | operator% (const ISODate &date) |
| XMLRPCCall & | operator% (const Binary &bin) |
| XMLRPCCall & | operator% (const XMLRPCArray &arr) |
| XMLRPCCall & | operator% (const XMLRPCStruct &str) |
| 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 (const char *name) |
Definition at line 305 of file xmlrpc.h.
| XMLRPCCall::XMLRPCCall | ( | const char * | name ) |
Definition at line 42 of file xmlrpc_clnt.cpp.
References init().
{
init(name);
}

| string XMLRPCWriter::flush | ( | ) | [inherited] |
Definition at line 216 of file xmlrpc.cpp.
References XMLRPCWriter::_buffer, XMLRPCWriter::_params, XMLRPCWriter::_writer, and XMLStorage::XMLWriter::back().
Referenced by XMLRPCClient::call(), and server_test().
{
if (_params)
_writer.back(); // </params>
_writer.back(); // </methodCall> bzw. </methodResponse>
return _buffer.str();
}


| void XMLRPCCall::init | ( | const char * | name ) | [private] |
Definition at line 47 of file xmlrpc_clnt.cpp.
References XMLRPCWriter::_writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().
Referenced by XMLRPCCall().
{
_writer.create("methodCall");
_writer.create("methodName");
_writer.set_content(name);
_writer.back();
// The <methodCall> tag is closed in XMLRPCWriter::flush().
}


| XMLRPCCall& XMLRPCCall::operator% | ( | const string & | s ) | [inline] |
Definition at line 312 of file xmlrpc.h.
{write_string_param(s); return *this;}
| XMLRPCCall& XMLRPCCall::operator% | ( | const XMLRPCArray & | arr ) | [inline] |
Definition at line 316 of file xmlrpc.h.
{write_param(arr);}
| XMLRPCCall& XMLRPCCall::operator% | ( | const XMLRPCStruct & | str ) | [inline] |
Definition at line 317 of file xmlrpc.h.
{write_param(str);}
| XMLRPCCall& XMLRPCCall::operator% | ( | int | i4 ) | [inline] |
Definition at line 309 of file xmlrpc.h.
{write_param("i4", XMLInt(i4)); return *this;}
| XMLRPCCall& XMLRPCCall::operator% | ( | const char * | s ) | [inline] |
Definition at line 313 of file xmlrpc.h.
{write_string_param(s); return *this;}
| XMLRPCCall& XMLRPCCall::operator% | ( | double | d ) | [inline] |
Definition at line 310 of file xmlrpc.h.
{write_param("double", XMLDouble(d)); return *this;}
| XMLRPCCall& XMLRPCCall::operator% | ( | bool | b ) | [inline] |
Definition at line 311 of file xmlrpc.h.
{write_param("boolean", b? "1": "0"); return *this;}
| XMLRPCCall& XMLRPCCall::operator% | ( | const ISODate & | date ) | [inline] |
Definition at line 314 of file xmlrpc.h.
References ISODate::str().
{write_param("dateTime.iso8601", date.str()); return *this;}

| XMLRPCCall& XMLRPCCall::operator% | ( | const Binary & | bin ) | [inline] |
Definition at line 315 of file xmlrpc.h.
References Binary::str().
{write_param("base64", bin.str()); return *this;}

| void XMLRPCWriter::write_param | ( | const XMLRPCArray & | arr ) | [protected, inherited] |
Definition at line 252 of file xmlrpc.cpp.
References XMLRPCWriter::_params, 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 XMLRPCWriter::write_param | ( | const string & | type, |
| const string & | value | ||
| ) | [protected, inherited] |
Definition at line 238 of file xmlrpc.cpp.
References XMLRPCWriter::_params, 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 XMLRPCWriter::write_param | ( | const XMLRPCStruct & | str ) | [protected, inherited] |
Definition at line 274 of file xmlrpc.cpp.
References XMLRPCWriter::_params, XMLRPCWriter::_writer, XMLStorage::XMLWriter::create(), and XMLRPCWriter::write_struct().
{
if (!_params++)
_writer.create("params");
write_struct(str, "param");
}

| void XMLRPCWriter::write_string_param | ( | const string & | value ) | [protected, inherited] |
Definition at line 226 of file xmlrpc.cpp.
References XMLRPCWriter::_params, 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 XMLRPCWriter::write_struct | ( | const XMLRPCStruct & | str, |
| const string & | keyword | ||
| ) | [protected, inherited] |
Definition at line 284 of file xmlrpc.cpp.
References XMLRPCWriter::_writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().
Referenced by XMLRPCResponse::set_failure(), and 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 XMLRPCWriter::_buffer [protected, inherited] |
Definition at line 298 of file xmlrpc.h.
Referenced by XMLRPCWriter::flush().
int XMLRPCWriter::_params [protected, inherited] |
Definition at line 300 of file xmlrpc.h.
Referenced by XMLRPCWriter::flush(), XMLRPCWriter::write_param(), and XMLRPCWriter::write_string_param().
XMLWriter XMLRPCWriter::_writer [protected, inherited] |
Definition at line 299 of file xmlrpc.h.
Referenced by XMLRPCWriter::flush(), XMLRPCResponse::init(), init(), XMLRPCWriter::write_param(), XMLRPCWriter::write_string_param(), and XMLRPCWriter::write_struct().
1.7.2