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 98 of file basejob.h.

Constructor & Destructor Documentation

◆ Status() [1/2]

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

Definition at line 99 of file basejob.h.

◆ Status() [2/2]

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

Definition at line 100 of file basejob.h.

Member Function Documentation

◆ dumpToLog()

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

◆ fromHttpCode() [1/2]

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

◆ fromHttpCode() [2/2]

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

Definition at line 103 of file basejob.h.

◆ good()

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

Definition at line 108 of file basejob.h.

◆ operator!=() [1/2]

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

Definition at line 119 of file basejob.h.

◆ operator!=() [2/2]

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

Definition at line 127 of file basejob.h.

◆ operator==() [1/2]

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

Definition at line 115 of file basejob.h.

◆ operator==() [2/2]

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

Definition at line 123 of file basejob.h.

Friends And Related Symbol Documentation

◆ operator<<

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

Definition at line 110 of file basejob.h.

Member Data Documentation

◆ code

int Quotient::BaseJob::Status::code

Definition at line 132 of file basejob.h.

◆ message

QString Quotient::BaseJob::Status::message

Definition at line 133 of file basejob.h.


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