QXmpp  Version:1.2.0
QXmppBitsOfBinaryData.h
1 /*
2  * Copyright (C) 2008-2020 The QXmpp developers
3  *
4  * Author:
5  * Linus Jahn
6  *
7  * Source:
8  * https://github.com/qxmpp-project/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPBITSOFBINARYDATA_H
25 #define QXMPPBITSOFBINARYDATA_H
26 
27 #include "QXmppGlobal.h"
28 
29 #include <QSharedDataPointer>
30 
31 class QDomElement;
32 class QMimeType;
33 class QXmlStreamWriter;
34 class QXmppBitsOfBinaryDataPrivate;
36 
43 
44 class QXMPP_EXPORT QXmppBitsOfBinaryData
45 {
46 public:
50 
51  QXmppBitsOfBinaryData &operator=(const QXmppBitsOfBinaryData &);
52 
53  QXmppBitsOfBinaryContentId cid() const;
54  void setCid(const QXmppBitsOfBinaryContentId &cid);
55 
56  int maxAge() const;
57  void setMaxAge(int maxAge);
58 
59  QMimeType contentType() const;
60  void setContentType(const QMimeType &contentType);
61 
62  QByteArray data() const;
63  void setData(const QByteArray &data);
64 
65  bool static isBitsOfBinaryData(const QDomElement &element);
66 
68  void parseElementFromChild(const QDomElement &dataElement);
69  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
71 
72  bool operator==(const QXmppBitsOfBinaryData &other) const;
73 
74 private:
75  QSharedDataPointer<QXmppBitsOfBinaryDataPrivate> d;
76 };
77 
78 #endif // QXMPPBITSOFBINARYDATA_H
QXmppBitsOfBinaryContentId
Definition: QXmppBitsOfBinaryContentId.h:39
QXmppBitsOfBinaryData
Definition: QXmppBitsOfBinaryData.h:44