#include <Pt/XmlRpc/Client.h>
A client for remote procedure calls.
Inherits Client.
Inherited by HttpClient.
|
|
| Client () |
| | Constructor.
|
|
virtual | ~Client () |
| | Destructor.
|
|
bool | isFailed () const |
| | Indicates if the procedure has failed.
|
|
const RemoteCall * | activeProcedure () const |
| | The currently executing procedure.
|
|
void | cancel () |
| | Cancels the currently executing procedure.
|
|
| virtual void | onCancel () |
| | Cancels the remote procedure call.
|
| virtual void | onBeginInvoke ()=0 |
| | An asynchronous remote procedure is invoked.
|
| virtual void | onInvoke ()=0 |
| | A synchronous remote procedure is called.
|
| void | beginMessage (std::ostream &os) |
| | Formats the XML-RPC message.
|
| bool | advanceMessage () |
| | Formats the XML-RPC message.
|
| void | finishMessage () |
| | Formats the XML-RPC message.
|
| void | beginResult (std::istream &is) |
| | Parses the XML-RPC result.
|
| bool | parseResult () |
| | Parses the XML-RPC result.
|
| void | processResult (std::istream &is) |
| | Parses the XML-RPC result.
|
| void | setFault (int rc, const char *msg) |
| | Fails the current procedure.
|
| void | setReady () |
| | Parses the XML-RPC result.
|
◆ onCancel()
| virtual void onCancel |
( |
| ) |
|
|
protectedvirtual |
Derived Clients implement this method to cancel the remote procedure call.
Implements Client.
Reimplemented in HttpClient.
◆ onBeginInvoke()
| virtual void onBeginInvoke |
( |
| ) |
|
|
protectedpure virtual |
Derived Clients implement this method to format and send a message to the service.
Implemented in HttpClient.
◆ onInvoke()
| virtual void onInvoke |
( |
| ) |
|
|
protectedpure virtual |
Derived Clients implement this method to format and send a message to the service and receive and parse the result.
Implemented in HttpClient.
◆ beginMessage()
| void beginMessage |
( |
std::ostream & | os | ) |
|
|
protected |
This method is used by derived Clients in onInvoke() and onCall() to begin formatting a XML-RPC message to a std::ostream.
◆ advanceMessage()
This method is used by derived Clients in onInvoke() and onCall() to format a XML-RPC message. Each call generates a chunk of the message and returns true if the message is complete.
◆ finishMessage()
This method is used by derived Clients in onInvoke() and onCall() to format the end of a XML-RPC message. It is called after advanceMessage() returns true.
◆ beginResult()
| void beginResult |
( |
std::istream & | is | ) |
|
|
protected |
This method is used by derived Clients to begin parsing a XML-RPC result from a std::istream.
◆ parseResult()
This method is used by derived Clients to parse a XML-RPC result Each call consumes the available data from the std::istream set with beginResult() and returns true if the result is complete.
◆ processResult()
| void processResult |
( |
std::istream & | is | ) |
|
|
protected |
This method is used by derived Clients after the XML-RPC result has been parsed by parseResult(). The current RemoteProcedure will receive completion notification to process the result.
Parses the XML-RPC result.
This method is used by derived Clients in in onCall() to parse a XML-RPC result from a std::istream.
◆ setFault()
| void setFault |
( |
int | rc, |
|
|
const char * | msg ) |
|
protected |
This method is used by derived Clients before calling finishResult() so that the RemoteProcedure throws a Fault when the result is processed.
◆ setReady()
This method is used by derived Clients after the XML-RPC result has been parsed by parseResult(). The current RemoteProcedure will receive completion notification to process the result.