29 #ifndef Pt_JsonRpc_Responder_h
30 #define Pt_JsonRpc_Responder_h
32 #include <Pt/JsonRpc/Api.h>
33 #include <Pt/JsonRpc/Fault.h>
35 #include <Pt/Remoting/Responder.h>
37 #include <Pt/Json/JsonReader.h>
38 #include <Pt/Json/JsonWriter.h>
39 #include <Pt/Json/JsonFormatter.h>
40 #include <Pt/TextStream.h>
41 #include <Pt/NonCopyable.h>
42 #include <Pt/Utf8Codec.h>
124 void beginFault(std::ostream& os,
const Fault& fault);
190 #endif // Pt_XmlRpc_Responder_h
Core module.
Definition: Allocator.h:33
Manages the decomposition of types during serialization.
Definition: Decomposer.h:44
void finishMessage(System::EventLoop &loop)
Parses the XML-RPC message.
virtual void onReady()
The service procedure has finished.
bool isFailed() const
Indicates if the procedure has failed.
void beginResult(std::ostream &os)
Formats the XML-RPC result.
Convert between unicode and UTF-8.
Definition: Utf8Codec.h:44
void setFault(int rc, const char *msg)
Fails the service procedure.
Responder(Remoting::ServiceDefinition &service)
Construct with Service.
Remote service definition.
Definition: Api-ServiceDefinition.h:22
JSON document node.
Definition: Node.h:52
Reads JSON as a Stream of Nodes.
Definition: JsonReader.h:51
virtual void onFault(const Fault &fault)=0
The service procedure has failed.
Dispatches requests to a service procedure.
Definition: Responder.h:50
void beginMessage(std::istream &is)
Parses the XML-RPC message.
Dispatches requests to a service procedure.
Definition: Responder.h:52
virtual void onCancel()
Cancels all operations.
Thread-safe event loop supporting I/O multiplexing and Timers.
Definition: EventLoop.h:74
Composes types during serialization.
Definition: Composer.h:43
bool parseMessage()
Parses the XML-RPC message.
virtual ~Responder()
Destructor.
JSON-RPC fault exception.
Definition: Fault.h:44
void finishResult()
Formats the XML-RPC message.
virtual void onResult()=0
The service procedure has finished.
bool advanceResult()
Formats the XML-RPC message.
Writes JSON to a text stream.
Definition: JsonWriter.h:46