QXmpp Version: 1.10.0
Public Member Functions | Static Public Member Functions | List of all members
QXmppBitsOfBinaryData Class Reference
Inheritance diagram for QXmppBitsOfBinaryData:
Inheritance graph
[legend]

Public Member Functions

 QXmppBitsOfBinaryData ()
 
 QXmppBitsOfBinaryData (const QXmppBitsOfBinaryData &)
 Default copy-constructor.
 
 QXmppBitsOfBinaryData (QXmppBitsOfBinaryData &&)
 Default move-constructor.
 
 ~QXmppBitsOfBinaryData ()
 Default destructor.
 
QXmppBitsOfBinaryDataoperator= (const QXmppBitsOfBinaryData &)
 Default assignment operator.
 
QXmppBitsOfBinaryDataoperator= (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)
 

Detailed Description

QXmppBitsOfBinaryData represents a data element for XEP-0231: Bits of Binary. It can be used as an extension in other stanzas.

See also
QXmppBitsOfBinaryIq, QXmppBitsOfBinaryDataList
Since
QXmpp 1.2

Constructor & Destructor Documentation

◆ QXmppBitsOfBinaryData()

QXmppBitsOfBinaryData::QXmppBitsOfBinaryData ( )

Default constructor

Member Function Documentation

◆ cid()

QXmppBitsOfBinaryContentId QXmppBitsOfBinaryData::cid ( ) const

Returns the content id of the data

◆ contentType()

QMimeType QXmppBitsOfBinaryData::contentType ( ) const

Returns the content type of the data

Note
This is the advertised content type and may differ from the actual content type of the data.

◆ data()

QByteArray QXmppBitsOfBinaryData::data ( ) const

Returns the included data in binary form

◆ fromByteArray()

QXmppBitsOfBinaryData QXmppBitsOfBinaryData::fromByteArray ( QByteArray  data)
static

Creates bits of binary data from a QByteArray.

This hashes the data to generate a content ID. The MIME type is not set.

Note
This blocks while hashing the data. You may want to run this via QtConcurrent or a QThreadPool to run this on for large amounts of data.
Since
QXmpp 1.5

◆ isBitsOfBinaryData()

bool QXmppBitsOfBinaryData::isBitsOfBinaryData ( const QDomElement &  element)
static

Returns true, if element is a XEP-0231: Bits of Binary data element

◆ maxAge()

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.

◆ operator==()

bool QXmppBitsOfBinaryData::operator== ( const QXmppBitsOfBinaryData other) const

Returns true, if cid, maxAge, contentType and data equal.

◆ setCid()

void QXmppBitsOfBinaryData::setCid ( const QXmppBitsOfBinaryContentId cid)

Sets the content id of the data

◆ setContentType()

void QXmppBitsOfBinaryData::setContentType ( const QMimeType &  contentType)

Sets the content type of the data

◆ setData()

void QXmppBitsOfBinaryData::setData ( const QByteArray &  data)

Sets the data in binary form

◆ setMaxAge()

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.


The documentation for this class was generated from the following files: