Loading...
Searching...
No Matches
QXmppBitsOfBinaryData.h
// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPBITSOFBINARYDATA_H
#define QXMPPBITSOFBINARYDATA_H
#include "QXmppConstants_p.h"
#include "QXmppGlobal.h"
#include <QSharedDataPointer>
class QDomElement;
class QMimeType;
class QXmlStreamWriter;
class QXmppBitsOfBinaryDataPrivate;
class QXmppBitsOfBinaryContentId;
class QXMPP_EXPORT QXmppBitsOfBinaryData
{
public:
static QXmppBitsOfBinaryData fromByteArray(QByteArray data);
QXmppBitsOfBinaryData();
QXmppBitsOfBinaryData(const QXmppBitsOfBinaryData &);
QXmppBitsOfBinaryData(QXmppBitsOfBinaryData &&);
~QXmppBitsOfBinaryData();
QXmppBitsOfBinaryData &operator=(const QXmppBitsOfBinaryData &);
QXmppBitsOfBinaryData &operator=(QXmppBitsOfBinaryData &&);
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 static isBitsOfBinaryData(const QDomElement &element);
static constexpr std::tuple XmlTag = { u"data", QXmpp::Private::ns_bob };
void parseElementFromChild(const QDomElement &dataElement);
void toXmlElementFromChild(QXmlStreamWriter *writer) const;
bool operator==(const QXmppBitsOfBinaryData &other) const;
private:
QSharedDataPointer<QXmppBitsOfBinaryDataPrivate> d;
};
#endif // QXMPPBITSOFBINARYDATA_H
QXmppBitsOfBinaryContentId
Definition QXmppBitsOfBinaryContentId.h:16
QXmppBitsOfBinaryData
Definition QXmppBitsOfBinaryData.h:20
QXmppBitsOfBinaryData::~QXmppBitsOfBinaryData
~QXmppBitsOfBinaryData()
Default destructor.
QXmppBitsOfBinaryData::cid
QXmppBitsOfBinaryContentId cid() const
Definition QXmppBitsOfBinary.cpp:92
QXmppBitsOfBinaryData::isBitsOfBinaryData
static bool isBitsOfBinaryData(const QDomElement &element)
Definition QXmppBitsOfBinary.cpp:169
QXmppBitsOfBinaryData::QXmppBitsOfBinaryData
QXmppBitsOfBinaryData(QXmppBitsOfBinaryData &&)
Default move-constructor.
QXmppBitsOfBinaryData::contentType
QMimeType contentType() const
Definition QXmppBitsOfBinary.cpp:137
QXmppBitsOfBinaryData::QXmppBitsOfBinaryData
QXmppBitsOfBinaryData(const QXmppBitsOfBinaryData &)
Default copy-constructor.
QXmppBitsOfBinaryData::setMaxAge
void setMaxAge(int maxAge)
Definition QXmppBitsOfBinary.cpp:126
QXmppBitsOfBinaryData::maxAge
int maxAge() const
Definition QXmppBitsOfBinary.cpp:113
QXmppBitsOfBinaryData::setCid
void setCid(const QXmppBitsOfBinaryContentId &cid)
Definition QXmppBitsOfBinary.cpp:100
QXmppBitsOfBinaryData::setData
void setData(const QByteArray &data)
Definition QXmppBitsOfBinary.cpp:161
QXmppBitsOfBinaryData::setContentType
void setContentType(const QMimeType &contentType)
Definition QXmppBitsOfBinary.cpp:145
QXmppBitsOfBinaryData::fromByteArray
static QXmppBitsOfBinaryData fromByteArray(QByteArray data)
Definition QXmppBitsOfBinary.cpp:57
QXmppBitsOfBinaryData::operator=
QXmppBitsOfBinaryData & operator=(const QXmppBitsOfBinaryData &)
Default assignment operator.
QXmppBitsOfBinaryData::operator=
QXmppBitsOfBinaryData & operator=(QXmppBitsOfBinaryData &&)
Default move-assignment operator.
QXmppBitsOfBinaryData::QXmppBitsOfBinaryData
QXmppBitsOfBinaryData()
Definition QXmppBitsOfBinary.cpp:73
QXmppBitsOfBinaryData::data
QByteArray data() const
Definition QXmppBitsOfBinary.cpp:153