|
Bayonne2 / Common C++ 2 Framework
|
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... | |
Private Attributes | |
| char * | buffer |
| std::strstream * | oldStrBuf |
| size_t | bufSize |
| bool | structFlag |
| bool | reply |
| bool | fault |
| unsigned | array |
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.
| 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 XMLRPC::addMember | ( | const char * | name, |
| bool | value | ||
| ) |
Add bool member to a XMLRPC struct.
| name | of member. |
| value | of member. |
| void XMLRPC::addMember | ( | const char * | name, |
| long | value | ||
| ) |
Add an integer member to XMLRPC struct.
| name | of member. |
| value | of member. |
| void XMLRPC::addMember | ( | const char * | name, |
| const char * | value | ||
| ) |
Add a string member to XMLRPC struct.
| name | of member. |
| value | of member. |
| void XMLRPC::addParam | ( | bool | value | ) |
Add bool param to XMLRPC request.
| value | to add. |
| void XMLRPC::addParam | ( | long | value | ) |
Add an integer paramater to XMLRPC request.
| value | to add. |
| void XMLRPC::addParam | ( | const char * | string | ) |
Add a string paramater to XMLRPC request.
| string | to add. |
| void XMLRPC::begArray | ( | void | ) |
Create an array.
|
protected |
Start member struct.
|
pure virtualinherited |
Virtual to receive character text extracted from the document in the current element.
| text | received. |
| len | length of text received. |
|
virtualinherited |
May perform a close operation of an i/o source when the parser has completed operation.
|
virtualinherited |
Virtual to receive embedded comments in an XML document being parsed.
| text | text comment extracted. |
| len | length of comment. |
| void XMLRPC::endArray | ( | void | ) |
end an array.
|
virtualinherited |
Identify end of document event.
|
pure virtualinherited |
Identify end of an element in the document.
| name | of element found. |
| void XMLRPC::endStruct | ( | void | ) |
Clear a struct.
|
virtualinherited |
Get error logging level.
| void XMLRPC::invoke | ( | const char * | method | ) |
Create XMLRPC "method" call in buffer.
| method | name of method being called. |
|
virtualinherited |
May perform an open operation on behalf of a parsed resource.
In some cases, the parser may be merged with a class that already has performed some kind of open, and this method can then be ignored.
| resource | passed to Parse methods. |
|
inherited |
Parse a resource as a stream thru the virtual read method.
| resource | optional name of resource. |
|
protectedpure virtual |
|
pure virtualinherited |
Read method to aquire data for the parser.
| buffer | to read data into. |
| len | number of bytes to read. |
| void XMLRPC::response | ( | bool | fault | ) |
Create XMLRPC "reply" to a method call.
| fault | set true for fault message. |
| bool XMLRPC::send | ( | const char * | resource | ) |
Complete buffer and send well formed XMLRPC request thru post.
| resource | to send to. |
|
virtualinherited |
Identify start of document event.
|
pure virtualinherited |
Identify start of an element in the document.
| name | of element found. |
| attr | list of attributes extracted. |
1.8.6