QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppBitsOfBinaryData.h
1// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPBITSOFBINARYDATA_H
6#define QXMPPBITSOFBINARYDATA_H
7
8#include "QXmppGlobal.h"
9
10#include <QSharedDataPointer>
11
12class QDomElement;
13class QMimeType;
14class QXmlStreamWriter;
15class QXmppBitsOfBinaryDataPrivate;
17
18class QXMPP_EXPORT QXmppBitsOfBinaryData
19{
20public:
21 static QXmppBitsOfBinaryData fromByteArray(QByteArray data);
22
27
30
32 void setCid(const QXmppBitsOfBinaryContentId &cid);
33
34 int maxAge() const;
35 void setMaxAge(int maxAge);
36
37 QMimeType contentType() const;
38 void setContentType(const QMimeType &contentType);
39
40 QByteArray data() const;
41 void setData(const QByteArray &data);
42
43 bool static isBitsOfBinaryData(const QDomElement &element);
44
46 void parseElementFromChild(const QDomElement &dataElement);
47 void toXmlElementFromChild(QXmlStreamWriter *writer) const;
49
50 bool operator==(const QXmppBitsOfBinaryData &other) const;
51
52private:
53 QSharedDataPointer<QXmppBitsOfBinaryDataPrivate> d;
54};
55
56#endif // QXMPPBITSOFBINARYDATA_H
Definition QXmppBitsOfBinaryContentId.h:16
Definition QXmppBitsOfBinaryData.h:19
~QXmppBitsOfBinaryData()
Default destructor.
QXmppBitsOfBinaryData(QXmppBitsOfBinaryData &&)
Default move-constructor.
QXmppBitsOfBinaryData(const QXmppBitsOfBinaryData &)
Default copy-constructor.
QXmppBitsOfBinaryData & operator=(const QXmppBitsOfBinaryData &)
Default assignment operator.
QXmppBitsOfBinaryData & operator=(QXmppBitsOfBinaryData &&)
Default move-assignment operator.