ost::XMLRPC(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– 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 cap
  • virtual ~XMLRPC () β€” destroys the XMLRPC object, rip queen πŸ’€
  • void begArray (void) β€” creates an array
  • void endArray (void) β€” ends an array
  • void invoke (const char *method) β€” creates an XMLRPC 'method' call in the buffer
  • void response (bool fault) β€” creates an XMLRPC 'reply' to a method call
  • void addParam (bool value) β€” adds a bool param to the XMLRPC request
  • void addMember (const char *name, bool value) β€” adds a bool member to an XMLRPC struct
  • void addParam (long value) β€” adds an integer parameter to the XMLRPC request
  • void addMember (const char *name, long value) β€” adds an integer member to an XMLRPC struct
  • void addParam (const char *string) β€” adds a string parameter to the XMLRPC request
  • void addMember (const char *name, const char *value) β€” adds a string member to an XMLRPC struct
  • void endStruct (void) β€” clears a struct
  • bool 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 successful
  • void 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