libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
Quotient::BaseJob::Status Struct Reference

The status of a job. More...

#include <basejob.h>

Public Member Functions

 Status (StatusCode c)
 Status (int c, QString m)
bool good () const
QDebug dumpToLog (QDebug dbg) const
bool operator== (const Status &other) const
bool operator!= (const Status &other) const
bool operator== (int otherCode) const
bool operator!= (int otherCode) const

Static Public Member Functions

static StatusCode fromHttpCode (int httpCode)
static Status fromHttpCode (int httpCode, QString msg)

Public Attributes

int code
QString message

Friends

QDebug operator<< (const QDebug &dbg, const Status &s)

Detailed Description

The status of a job.

The status consists of a code that is described (but not delimited) by StatusCode, and a freeform message.

To extend the list of error codes, define an (anonymous) enum along the lines of StatusCode, with additional values starting at UserDefinedError.

Definition at line 97 of file basejob.h.

Constructor & Destructor Documentation

◆ Status() [1/2]

Quotient::BaseJob::Status::Status ( StatusCode c)
inline

Definition at line 98 of file basejob.h.

◆ Status() [2/2]

Quotient::BaseJob::Status::Status ( int c,
QString m )
inline

Definition at line 99 of file basejob.h.

Member Function Documentation

◆ dumpToLog()

QDebug Quotient::BaseJob::Status::dumpToLog ( QDebug dbg) const

◆ fromHttpCode() [1/2]

StatusCode Quotient::BaseJob::Status::fromHttpCode ( int httpCode)
static

◆ fromHttpCode() [2/2]

Status Quotient::BaseJob::Status::fromHttpCode ( int httpCode,
QString msg )
inlinestatic

Definition at line 102 of file basejob.h.

◆ good()

bool Quotient::BaseJob::Status::good ( ) const
inline

Definition at line 107 of file basejob.h.

◆ operator!=() [1/2]

bool Quotient::BaseJob::Status::operator!= ( const Status & other) const
inline

Definition at line 118 of file basejob.h.

◆ operator!=() [2/2]

bool Quotient::BaseJob::Status::operator!= ( int otherCode) const
inline

Definition at line 126 of file basejob.h.

◆ operator==() [1/2]

bool Quotient::BaseJob::Status::operator== ( const Status & other) const
inline

Definition at line 114 of file basejob.h.

◆ operator==() [2/2]

bool Quotient::BaseJob::Status::operator== ( int otherCode) const
inline

Definition at line 122 of file basejob.h.

◆ operator<<

QDebug operator<< ( const QDebug & dbg,
const Status & s )
friend

Definition at line 109 of file basejob.h.

Member Data Documentation

◆ code

int Quotient::BaseJob::Status::code

Definition at line 131 of file basejob.h.

◆ message

QString Quotient::BaseJob::Status::message

Definition at line 132 of file basejob.h.


The documentation for this struct was generated from the following file: