Attica::Metadata

Search for usage in LXR

Attica::Metadata Class Reference

#include <Attica/Metadata>

Public Types

enum  Error { NoError = 0 , NetworkError , OcsError }
 

Public Member Functions

 Metadata (const Metadata &other)
 
Error error () const
 
QList< QNetworkReply::RawHeaderPairheaders () const
 
int itemsPerPage ()
 
QString message ()
 
Metadataoperator= (const Metadata &other)
 
QString resultingId ()
 
void setError (Error error)
 
void setHeaders (const QList< QNetworkReply::RawHeaderPair > &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
 
QString statusString () const
 
int totalItems ()
 

Detailed Description

Status messages from the server.

Definition at line 28 of file metadata.h.

Member Enumeration Documentation

◆ Error

enum Attica::Metadata::Error

Definition at line 36 of file metadata.h.

Constructor & Destructor Documentation

◆ Metadata() [1/2]

Metadata::Metadata ( )

Definition at line 49 of file metadata.cpp.

◆ Metadata() [2/2]

Metadata::Metadata ( const Metadata & other)

Definition at line 58 of file metadata.cpp.

◆ ~Metadata()

Metadata::~Metadata ( )

Definition at line 54 of file metadata.cpp.

Member Function Documentation

◆ error()

Metadata::Error Metadata::error ( ) const

Check if the job was successful.

Returns
the error state enum returns the type of error (network or ocs)

Definition at line 69 of file metadata.cpp.

◆ headers()

QList< QNetworkReply::RawHeaderPair > 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).

Returns
The list of raw headers (equivalent to a QNetworkReply::rawHeaderPairs call)
Since
5.83

Definition at line 139 of file metadata.cpp.

◆ itemsPerPage()

int Metadata::itemsPerPage ( )

The number of items per page the server was asked for.

Definition at line 129 of file metadata.cpp.

◆ message()

QString Metadata::message ( )

An optional additional message from the server.

Definition at line 79 of file metadata.cpp.

◆ operator=()

Metadata & Metadata::operator= ( const Metadata & other)

Definition at line 63 of file metadata.cpp.

◆ resultingId()

QString Metadata::resultingId ( )

The resulting ID when a PostJob created a new item.

Definition at line 89 of file metadata.cpp.

◆ setError()

void Metadata::setError ( Metadata::Error error)

Definition at line 74 of file metadata.cpp.

◆ setHeaders()

void Metadata::setHeaders ( const QList< QNetworkReply::RawHeaderPair > & headers)

Sets the http headers read by headers()

Parameters
headersThe new list of raw headers
Since
5.83

Definition at line 144 of file metadata.cpp.

◆ setItemsPerPage()

void Metadata::setItemsPerPage ( int itemsPerPage)

Definition at line 134 of file metadata.cpp.

◆ setMessage()

void Metadata::setMessage ( const QString & message)

Definition at line 84 of file metadata.cpp.

◆ setResultingId()

void Metadata::setResultingId ( const QString & id)

Definition at line 94 of file metadata.cpp.

◆ setStatusCode()

void Metadata::setStatusCode ( int code)

Definition at line 104 of file metadata.cpp.

◆ setStatusString()

void Metadata::setStatusString ( const QString & status)

Definition at line 114 of file metadata.cpp.

◆ setTotalItems()

void Metadata::setTotalItems ( int items)

Definition at line 124 of file metadata.cpp.

◆ statusCode()

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

Definition at line 99 of file metadata.cpp.

◆ statusString()

QString Metadata::statusString ( ) const

The status of the job, for example "Ok".

Definition at line 109 of file metadata.cpp.

◆ totalItems()

int Metadata::totalItems ( )

The number of items returned by this job (only relevant for list jobs)

Definition at line 119 of file metadata.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 12 2024 12:02:40 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.