Attica 5.109.0
|
Status messages from the server. More...
#include <Attica/Metadata>
Public Types | |
enum | Error { NoError = 0 , NetworkError , OcsError } |
Public Member Functions | |
Metadata (const Metadata &other) | |
Error | error () const |
Check if the job was successful. | |
QList< QNetworkReply::RawHeaderPair > | headers () const |
The http headers for the most recent network action in the case of a network error Use this to further inspect the error condition if the OCS status code and string is not enough to work out precisely what has happened (for example in case of a HTTP 503 status, which would suggest the service is down for maintenance for an expected duration which might be read from the Retry-After header). | |
int | itemsPerPage () |
The number of items per page the server was asked for. | |
QString | message () |
An optional additional message from the server. | |
Metadata & | operator= (const Metadata &other) |
QString | resultingId () |
The resulting ID when a PostJob created a new item. | |
void | setError (Error error) |
void | setHeaders (const QList< QNetworkReply::RawHeaderPair > &headers) |
Sets the http headers read by headers() | |
void | setItemsPerPage (int itemsPerPage) |
void | setMessage (const QString &message) |
void | setResultingId (const QString &id) |
void | setStatusCode (int code) |
void | setStatusString (const QString &status) |
void | setTotalItems (int items) |
int | statusCode () const |
The status as integer. | |
QString | statusString () const |
The status of the job, for example "Ok". | |
int | totalItems () |
The number of items returned by this job (only relevant for list jobs) | |
Status messages from the server.
Error Attica::Metadata::error | ( | ) | const |
Check if the job was successful.
QList< QNetworkReply::RawHeaderPair > Attica::Metadata::headers | ( | ) | const |
The http headers for the most recent network action in the case of a network error Use this to further inspect the error condition if the OCS status code and string is not enough to work out precisely what has happened (for example in case of a HTTP 503 status, which would suggest the service is down for maintenance for an expected duration which might be read from the Retry-After header).
int Attica::Metadata::itemsPerPage | ( | ) |
The number of items per page the server was asked for.
QString Attica::Metadata::message | ( | ) |
An optional additional message from the server.
QString Attica::Metadata::resultingId | ( | ) |
The resulting ID when a PostJob created a new item.
void Attica::Metadata::setHeaders | ( | const QList< QNetworkReply::RawHeaderPair > & | headers | ) |
int Attica::Metadata::statusCode | ( | ) | const |
The status as integer.
If the error is an OCS error, refer to http://www.freedesktop.org/wiki/Specifications/open-collaboration-services in any other case it is the network return code.
QString Attica::Metadata::statusString | ( | ) | const |
The status of the job, for example "Ok".
int Attica::Metadata::totalItems | ( | ) |
The number of items returned by this job (only relevant for list jobs)