Qt 1.6 | Enginio Manual | C++ Classes | EnginioReply

Qt 1.6.3 Reference Documentation

# EnginioReply Class

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

Header: | #include <EnginioReply>
Since: | Qt 5.3

- List of all members, including inherited members

## Properties

- backendStatus : const int
- data : const QJsonObject
- errorString : const QString

- errorType : const ErrorType
- networkError : const QNetworkReply::NetworkError

## 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

## Signals

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

## 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.