QXmpp
Version:1.2.0
|
The Error class represents a stanza error. More...
#include <QXmppStanza.h>
Public Types | |
enum | Type { Cancel, Continue, Modify, Auth, Wait } |
enum | Condition { BadRequest, Conflict, FeatureNotImplemented, Forbidden, Gone, InternalServerError, ItemNotFound, JidMalformed, NotAcceptable, NotAllowed, NotAuthorized, PaymentRequired, RecipientUnavailable, Redirect, RegistrationRequired, RemoteServerNotFound, RemoteServerTimeout, ResourceConstraint, ServiceUnavailable, SubscriptionRequired, UndefinedCondition, UnexpectedRequest } |
A detailed condition of the error. More... | |
Public Member Functions | |
Error () | |
Error (const Error &) | |
Copy constructor. | |
Error (Type type, Condition cond, const QString &text=QString()) | |
Error (const QString &type, const QString &cond, const QString &text=QString()) | |
~Error () | |
Default destructor. | |
Error & | operator= (const Error &) |
Copy operator. | |
int | code () const |
void | setCode (int code) |
QString | text () const |
void | setText (const QString &text) |
Condition | condition () const |
void | setCondition (Condition cond) |
void | setType (Type type) |
Type | type () const |
bool | fileTooLarge () const |
void | setFileTooLarge (bool) |
qint64 | maxFileSize () const |
void | setMaxFileSize (qint64) |
QDateTime | retryDate () const |
void | setRetryDate (const QDateTime &) |
Sets the datetime when the client can retry to request the upload slot. | |
The Error class represents a stanza error.
A detailed condition of the error.
The type represents the error type of stanza errors.
The error descriptions are not detailed in here. The exact meaning can be found in the particular protocols using them.
QXmppStanza::Error::Error | ( | ) |
Default constructor
Initializes an error with a type, condition and text.
QXmppStanza::Error::Error | ( | const QString & | type, |
const QString & | cond, | ||
const QString & | text = QString() |
||
) |
Initializes an error with a type, condition and text (all from strings).
int QXmppStanza::Error::code | ( | ) | const |
Returns the error code.
QXmppStanza::Error::Condition QXmppStanza::Error::condition | ( | ) | const |
Returns the error condition.
bool QXmppStanza::Error::fileTooLarge | ( | ) | const |
Returns true, if an HTTP File Upload failed, because the file was too large.
qint64 QXmppStanza::Error::maxFileSize | ( | ) | const |
Returns the maximum file size allowed for uploading via. HTTP File Upload.
QDateTime QXmppStanza::Error::retryDate | ( | ) | const |
Returns when to retry the upload request via. HTTP File Upload.
void QXmppStanza::Error::setCode | ( | int | code | ) |
Sets the error code.
void QXmppStanza::Error::setCondition | ( | Condition | cond | ) |
Sets the error condition.
void QXmppStanza::Error::setFileTooLarge | ( | bool | fileTooLarge | ) |
Sets whether the requested file for HTTP File Upload was too large.
You should also set maxFileSize in this case.
void QXmppStanza::Error::setMaxFileSize | ( | qint64 | maxFileSize | ) |
Sets the maximum file size allowed for uploading via. HTTP File Upload.
This sets fileTooLarge to true.
void QXmppStanza::Error::setText | ( | const QString & | text | ) |
Sets the description of the error.
void QXmppStanza::Error::setType | ( | Type | type | ) |
Sets the type of the error.
QString QXmppStanza::Error::text | ( | ) | const |
Returns the human-readable description of the error.
QXmppStanza::Error::Type QXmppStanza::Error::type | ( | ) | const |
Returns the type of the error.