GNU CommonC++
|
This class impliments a core XMLRPC service without the underlying transports. More...
#include <xml.h>
Public Member Functions | |
XMLRPC (size_t bufferSize=512) | |
Construct XMLRPC workspace. More... | |
virtual | ~XMLRPC () |
Destroy XMLRPC object. More... | |
void | begArray (void) |
Create an array. More... | |
void | endArray (void) |
end an array. More... | |
void | invoke (const char *method) |
Create XMLRPC "method" call in buffer. More... | |
void | response (bool fault) |
Create XMLRPC "reply" to a method call. More... | |
void | addParam (bool value) |
Add bool param to XMLRPC request. More... | |
void | addMember (const char *name, bool value) |
Add bool member to a XMLRPC struct. More... | |
void | addParam (long value) |
Add an integer paramater to XMLRPC request. More... | |
void | addMember (const char *name, long value) |
Add an integer member to XMLRPC struct. More... | |
void | addParam (const char *string) |
Add a string paramater to XMLRPC request. More... | |
void | addMember (const char *name, const char *value) |
Add a string member to XMLRPC struct. More... | |
void | endStruct (void) |
Clear a struct. More... | |
bool | send (const char *resource) |
Complete buffer and send well formed XMLRPC request thru post. More... | |
![]() | |
virtual bool | open (const char *resource) |
May perform an open operation on behalf of a parsed resource. More... | |
virtual void | close (void) |
May perform a close operation of an i/o source when the parser has completed operation. More... | |
virtual Slog::Level | getLogging (void) |
Get error logging level. More... | |
virtual void | comment (const unsigned char *text, size_t len) |
Virtual to receive embedded comments in an XML document being parsed. More... | |
virtual int | read (unsigned char *buffer, size_t len)=0 |
Read method to aquire data for the parser. More... | |
virtual void | characters (const unsigned char *text, size_t len)=0 |
Virtual to receive character text extracted from the document in the current element. More... | |
virtual void | startDocument (void) |
Identify start of document event. More... | |
virtual void | endDocument (void) |
Identify end of document event. More... | |
virtual void | startElement (const unsigned char *name, const unsigned char **attr)=0 |
Identify start of an element in the document. More... | |
virtual void | endElement (const unsigned char *name)=0 |
Identify end of an element in the document. More... | |
bool | parse (const char *resource=NULL) |
Parse a resource as a stream thru the virtual read method. More... | |
Protected Member Functions | |
virtual bool | post (const char *resource, const char *msg)=0 |
Used in a derived transport class to deliver the XMLRPC encoded request and return true if successful. More... | |
void | begStruct (void) |
Start member struct. More... | |
![]() | |
virtual | ~XMLStream () |
This class impliments a core XMLRPC service without the underlying transports.
It is meant to create and parse XMLRPC messages. To use for a fit purpose, one might combine it with URLStream, although this implimentation makes no requirement for http based transport.
XML-RPC service building class
ost::XMLRPC::XMLRPC | ( | size_t | bufferSize = 512 | ) |
Construct XMLRPC workspace.
bufferSize | size of buffer when using old C++ strstreams. When the newer stringstream (<sstream>) is available, this parameter is silently ignored. |
|
virtual |
Destroy XMLRPC object.
void ost::XMLRPC::addMember | ( | const char * | name, |
bool | value | ||
) |
Add bool member to a XMLRPC struct.
name | of member. |
value | of member. |
void ost::XMLRPC::addMember | ( | const char * | name, |
const char * | value | ||
) |
Add a string member to XMLRPC struct.
name | of member. |
value | of member. |
void ost::XMLRPC::addMember | ( | const char * | name, |
long | value | ||
) |
Add an integer member to XMLRPC struct.
name | of member. |
value | of member. |
void ost::XMLRPC::addParam | ( | bool | value | ) |
Add bool param to XMLRPC request.
value | to add. |
void ost::XMLRPC::addParam | ( | const char * | string | ) |
Add a string paramater to XMLRPC request.
string | to add. |
void ost::XMLRPC::addParam | ( | long | value | ) |
Add an integer paramater to XMLRPC request.
value | to add. |
void ost::XMLRPC::begArray | ( | void | ) |
Create an array.
|
protected |
Start member struct.
void ost::XMLRPC::endArray | ( | void | ) |
end an array.
void ost::XMLRPC::endStruct | ( | void | ) |
Clear a struct.
void ost::XMLRPC::invoke | ( | const char * | method | ) |
Create XMLRPC "method" call in buffer.
method | name of method being called. |
|
protectedpure virtual |
void ost::XMLRPC::response | ( | bool | fault | ) |
Create XMLRPC "reply" to a method call.
fault | set true for fault message. |
bool ost::XMLRPC::send | ( | const char * | resource | ) |
Complete buffer and send well formed XMLRPC request thru post.
resource | to send to. |