QXmpp Version: 1.5.6
|
Public Member Functions | |
QXmppBitsOfBinaryData () | |
QXmppBitsOfBinaryData (const QXmppBitsOfBinaryData &) | |
Default copy-constructor. | |
QXmppBitsOfBinaryData (QXmppBitsOfBinaryData &&) | |
Default move-constructor. | |
~QXmppBitsOfBinaryData () | |
Default destructor. | |
QXmppBitsOfBinaryData & | operator= (const QXmppBitsOfBinaryData &) |
Default assignment operator. | |
QXmppBitsOfBinaryData & | operator= (QXmppBitsOfBinaryData &&) |
Default move-assignment operator. | |
QXmppBitsOfBinaryContentId | cid () const |
void | setCid (const QXmppBitsOfBinaryContentId &cid) |
int | maxAge () const |
void | setMaxAge (int maxAge) |
QMimeType | contentType () const |
void | setContentType (const QMimeType &contentType) |
QByteArray | data () const |
void | setData (const QByteArray &data) |
bool | operator== (const QXmppBitsOfBinaryData &other) const |
Static Public Member Functions | |
static QXmppBitsOfBinaryData | fromByteArray (QByteArray data) |
static bool | isBitsOfBinaryData (const QDomElement &element) |
QXmppBitsOfBinaryData represents a data element for XEP-0231: Bits of Binary. It can be used as an extension in other stanzas.
QXmppBitsOfBinaryData::QXmppBitsOfBinaryData | ( | ) |
Default constructor
QXmppBitsOfBinaryContentId QXmppBitsOfBinaryData::cid | ( | ) | const |
Returns the content id of the data
QMimeType QXmppBitsOfBinaryData::contentType | ( | ) | const |
Returns the content type of the data
QByteArray QXmppBitsOfBinaryData::data | ( | ) | const |
Returns the included data in binary form
|
static |
Creates bits of binary data from a QByteArray.
This hashes the data to generate a content ID. The MIME type is not set.
|
static |
Returns true, if element
is a XEP-0231: Bits of Binary data element
int QXmppBitsOfBinaryData::maxAge | ( | ) | const |
Returns the time in seconds the data should be cached
A value of 0 means that the data should not be cached, while a value of -1 means that nothing was set.
The default value is -1.
bool QXmppBitsOfBinaryData::operator== | ( | const QXmppBitsOfBinaryData & | other | ) | const |
Returns true, if cid, maxAge, contentType and data equal.
void QXmppBitsOfBinaryData::setCid | ( | const QXmppBitsOfBinaryContentId & | cid | ) |
Sets the content id of the data
void QXmppBitsOfBinaryData::setContentType | ( | const QMimeType & | contentType | ) |
Sets the content type of the data
void QXmppBitsOfBinaryData::setData | ( | const QByteArray & | data | ) |
Sets the data in binary form
void QXmppBitsOfBinaryData::setMaxAge | ( | int | maxAge | ) |
Sets the time in seconds the data should be cached
A value of 0 means that the data should not be cached, while a value of -1 means that nothing was set.
The default value is -1.