1 #ifndef TORCRPCREQUEST_H 2 #define TORCRPCREQUEST_H 40 void AddParameter (
const QString &Name,
const QVariant &Value);
42 void SetReply (
const QVariant &Reply);
45 int GetID (
void)
const;
48 const QVariant&
GetReply (
void)
const;
49 const QList<QPair<QString,QVariant> >&
51 const QList<QVariant>&
56 explicit TorcRPCRequest(
const QJsonObject &Object, QObject *Parent,
bool Authenticated);
60 void ParseJSONObject (const QJsonObject &Object);
61 void ProcessNullContent (
bool HasMethod);
62 void ProcessBatchCall (const QJsonArray &Array);
74 QList<QPair<QString,QVariant> > m_parameters;
75 QList<QVariant> m_positionalParameters;
76 QByteArray m_serialisedData;
82 #endif // TORCRPCREQUEST_H
TorcRPCRequest(const QString &Method, QObject *Parent)
Creates an RPC request owned by the given Parent.
A reference counting implementation.
QByteArray & GetData(void)
void SetParent(QObject *Parent)
Set the parent for the request.
void AddState(int State)
Progress the state for this request.
A class encapsulating a Remote Procedure Call.
void NotifyParent(void)
Signal to the parent that the request is ready (but may be errored).
QString GetMethod(void) const
void AddPositionalParameter(const QVariant &Value)
Add a positional parameter.
const QList< QVariant > & GetPositionalParameters(void) const
bool IsNotification(void) const
QByteArray & SerialiseRequest(TorcWebSocketReader::WSSubProtocol Protocol)
Serialise the request for the given protocol.
const QList< QPair< QString, QVariant > > & GetParameters(void) const
const QVariant & GetReply(void) const
void SetReply(const QVariant &Reply)
QObject * GetParent(void) const
void AddParameter(const QString &Name, const QVariant &Value)
Add Parameter and value to list of call parameters.
void SetID(int ID)
Set the unique ID for this request.