This class represents a reply for the JSON-RPC API request. More...
Header: | #include <JsonReply> |
Inherits: |
enum | Type { TypeSync, TypeAsync } |
QUuid | clientId() const |
int | commandId() const |
QVariantMap | data() const |
JsonHandler * | handler() const |
QString | method() const |
void | setClientId(const QUuid & clientId) |
void | setCommandId(int commandId) |
void | setData(const QVariantMap & data) |
bool | timedOut() const |
Type | type() const |
void | startWait() |
void | finished() |
JsonReply * | createAsyncReply(JsonHandler * handler, const QString & method) |
JsonReply * | createReply(JsonHandler * handler, const QVariantMap & data) |
This class represents a reply for the JSON-RPC API request.
See also JsonHandler and JsonRPCServer.
This enum type specifies the type of a JsonReply.
Constant | Value | Description |
---|---|---|
nymeaserver::JsonReply::TypeSync | 0 | The response is synchronous. |
nymeaserver::JsonReply::TypeAsync | 1 | The response is asynchronous. |
Returns the client ID of this JsonReply.
See also setClientId().
Returns the command ID of this JsonReply.
See also setCommandId().
[static]
JsonReply * JsonReply::createAsyncReply(JsonHandler * handler, const QString & method)Returns the pointer to a new asynchronous JsonReply for the given handler and method.
[static]
JsonReply * JsonReply::createReply(JsonHandler * handler, const QVariantMap & data)Returns the pointer to a new JsonReply for the given handler and data.
Returns the data of this JsonReply.
See also setData().
[signal]
void JsonReply::finished()This signal will be emitted when a JsonReply is finished. A JsonReply is finished when the response is ready or then the reply timed out.
Returns the handler of this JsonReply.
Returns the method of this JsonReply.
Sets the clientId of this JsonReply.
See also clientId().
Returns the commandId of this JsonReply.
See also commandId().
Sets the data of this JsonReply.
See also data().
[slot]
void JsonReply::startWait()Start the timeout timer for this JsonReply. The default timeout is 15 seconds.
Returns true if this JsonReply timed out.
Returns the type of this JsonReply.