ost::XMLRPC(3)
π NAME π
ost::XMLRPC β okay so bestie, this class is a whole core XMLRPC service, and the way it does it is without the underlying transports. Like, the vibe is there, the transport is not. π
β¨ SYNOPSIS β¨
#include <xml.h>
Inherits ost::XMLStream. π¦ (yes she's a nepo baby, she inherited it)
π«Ά Public Member Functions
XMLRPC (size_t bufferSize=512)β constructs the XMLRPC workspace, no capvirtual ~XMLRPC ()β destroys the XMLRPC object, rip queen πvoid begArray (void)β creates an arrayvoid endArray (void)β ends an arrayvoid invoke (const char *method)β creates an XMLRPC'method'call in the buffervoid response (bool fault)β creates an XMLRPC'reply'to a method callvoid addParam (bool value)β adds a bool param to the XMLRPC requestvoid addMember (const char *name, bool value)β adds a bool member to an XMLRPC structvoid addParam (long value)β adds an integer parameter to the XMLRPC requestvoid addMember (const char *name, long value)β adds an integer member to an XMLRPC structvoid addParam (const char *string)β adds a string parameter to the XMLRPC requestvoid addMember (const char *name, const char *value)β adds a string member to an XMLRPC structvoid endStruct (void)β clears a structbool send (const char *resource)β completes the buffer and sends a well formed XMLRPC request thru post, fr fr
π 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 successfulvoid begStruct (void)β starts a member struct
π DESCRIPTION π
ost::XMLRPC implements a core XMLRPC service without the underlying transports. She's the brains, not the ride. π§ β¨
It is meant to create and parse XMLRPC messages. And like β to use it for a fit purpose, one might combine it with URLStream, although this implementation makes no requirement for http based transport. So do with that what you will, bestie, she's flexible. π
π Author
David Sugar dyfet@ostel.com
XML-RPC service building class β that's the whole personality and honestly? iconic. π
π§ Constructor & Destructor Documentation π§
ost::XMLRPC::XMLRPC (size_t bufferSize = 512)
Construct XMLRPC workspace. β¨
Parameters
bufferSizeβ size of buffer when using old C++ strstreams. When the newer stringstream (<sstream>) is available, this parameter is silently ignored. π (not her ghosting you, she's just built different now)
virtual ost::XMLRPC::~XMLRPC () [virtual]
Destroy XMLRPC object. π«Ά gone but never forgotten.
π Member Function Documentation π
void ost::XMLRPC::addMember (const char * name, bool value)
Add bool member to a XMLRPC struct.
Parameters
- name β of member
- value β of member
void ost::XMLRPC::addMember (const char * name, const char * value)
Add a string member to XMLRPC struct.
Parameters
- name β of member
- value β of member
void ost::XMLRPC::addMember (const char * name, long value)
Add an integer member to XMLRPC struct.
Parameters
- name β of member
- value β of member
void ost::XMLRPC::addParam (bool value)
Add bool param to XMLRPC request.
Parameters
- value β to add
void ost::XMLRPC::addParam (const char * string)
Add a string parameter to XMLRPC request.
Parameters
- string β to add
void ost::XMLRPC::addParam (long value)
Add an integer parameter to XMLRPC request.
Parameters
- value β to add
void ost::XMLRPC::begArray (void)
Create an array. π start the lil collection era.
void ost::XMLRPC::begStruct (void) [protected]
Start member struct. π protected, so this one's invite-only, iykyk.
void ost::XMLRPC::endArray (void)
end an array. π closing the era, we're so back.
void ost::XMLRPC::endStruct (void)
Clear a struct. π§Ή clean slate energy.
void ost::XMLRPC::invoke (const char * method)
Create XMLRPC 'method' call in buffer.
Parameters
- method β name of method being called
virtual bool ost::XMLRPC::post (const char * resource, const char * msg) [protected], [pure virtual]
Used in a derived transport class to deliver the XMLRPC encoded request and return true if successful. The Parse method can then be used to decode the reply. π₯
Heads up bestie: this one is pure virtual β you have to bring your own implementation in a derived transport class, she will not do it for you. Periodt.
Returns
- true if successful
Parameters
- resource β to send to (such as url)
- msg β well formed XMLRPC request message
void ost::XMLRPC::response (bool fault)
Create XMLRPC 'reply' to a method call.
Parameters
- fault β set true for fault message
bool ost::XMLRPC::send (const char * resource)
Complete buffer and send well formed XMLRPC request thru post. π
Returns
- true if successful
Parameters
- resource β to send to
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code. π
okay and that's the whole page bestie!! this lil icon dropped as part of GNU CommonC++, dated Sun Dec 27 2020, and she's still serving. mwah πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms