QXmpp  Version: 1.10.4
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 
12 class QDomElement;
13 class QMimeType;
14 class QXmlStreamWriter;
15 class QXmppBitsOfBinaryDataPrivate;
17 
18 class QXMPP_EXPORT QXmppBitsOfBinaryData
19 {
20 public:
21  static QXmppBitsOfBinaryData fromByteArray(QByteArray data);
22 
27 
28  QXmppBitsOfBinaryData &operator=(const QXmppBitsOfBinaryData &);
30 
31  QXmppBitsOfBinaryContentId cid() const;
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 
52 private:
53  QSharedDataPointer<QXmppBitsOfBinaryDataPrivate> d;
54 };
55 
56 #endif // QXMPPBITSOFBINARYDATA_H
Definition: QXmppBitsOfBinaryData.h:18
Definition: QXmppBitsOfBinaryContentId.h:15