EnginioReply Class

The EnginioReply class contains the data from a request to the Enginio database. More...

Header: #include <EnginioReply>
Since: Qt 5.3
Inherits: QObject

Properties

  • 1 property inherited from QObject

Public Functions

virtual ~EnginioReply()
int backendStatus() const
QJsonObject data() const
QString errorString() const
ErrorType errorType() const
bool isError() const
bool isFinished() const
QNetworkReply::NetworkError networkError() const
  • 31 public functions inherited from QObject

Signals

void dataChanged()
void finished(EnginioReply *reply)
void progress(qint64 bytesSent, qint64 bytesTotal)

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The EnginioReply class contains the data from a request to the Enginio database.

The reply, when finished, contains information received from the server:

  • Data - object, which is a result from an earlier request, see the data function
  • Network status - in case of a network problem, additional information can be accessed through: errorType, errorString, networkError
  • Backend status - a finished request is always associated with a backend status code, which is just an HTTP code, and it can be queried through backendStatus

The finished signal is emitted when the query is done.

See also EnginioClient.

Property Documentation

backendStatus : const int

Returns the backend return status for this reply.

Access functions:

int backendStatus() const

Notifier signal:

void dataChanged()

See also Enginio::ErrorType.

data : const QJsonObject

This property holds the data returned from the backend This property holds the JSON data returned by the server after a successful request.

Access functions:

QJsonObject data() const

Notifier signal:

void dataChanged()

errorString : const QString

This property holds the error for the request as human readable string. Check isError() first to check if the reply is an error.

Access functions:

QString errorString() const

Notifier signal:

void dataChanged()

errorType : const ErrorType

Returns the type of the error

Access functions:

ErrorType errorType() const

Notifier signal:

void dataChanged()

See also Enginio::ErrorType.

networkError : const QNetworkReply::NetworkError

This property holds the network error for the request.

Access functions:

QNetworkReply::NetworkError networkError() const

Notifier signal:

void dataChanged()

Member Function Documentation

[virtual] EnginioReply::~EnginioReply()

Destroys the EnginioReply.

The reply needs to be deleted after the finished signal is emitted.

[signal] void EnginioReply::finished(EnginioReply *reply)

This signal is emitted when the EnginioReply reply is finished. After the network operation, use the isError() function to check for potential problems and then use the data property to access the returned data.

bool EnginioReply::isError() const

Returns whether this reply was unsuccessful. Returns true if the reply did not succeed.

bool EnginioReply::isFinished() const

Returns whether this reply was finished or not. Returns true if the reply was finished.

[signal] void EnginioReply::progress(qint64 bytesSent, qint64 bytesTotal)

This signal is emitted for file operations, indicating the progress of up or downloads. The bytesSent is the current progress relative to the total bytesTotal.

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.