QXmpp: QXmppOmemoEnvelope_p.h Source File

QXmpp Version: 1.14.2

Loading...
Searching...
No Matches
QXmppOmemoEnvelope_p.h
1// SPDX-FileCopyrightText: 2021 Germán Márquez Mejía <mancho@olomono.de>
2// SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
3//
4// SPDX-License-Identifier: LGPL-2.1-or-later
5
6#ifndef QXMPPOMEMOENVELOPE_H
7#define QXMPPOMEMOENVELOPE_H
8
9#include "QXmppGlobal.h"
10
11class QDomElement;
12class QXmlStreamWriter;
13
14class QXMPP_EXPORT QXmppOmemoEnvelope
15{
16public:
17 uint32_t recipientDeviceId() const;
18 void setRecipientDeviceId(uint32_t id);
19
20 bool isUsedForKeyExchange() const;
21 void setUsedForKeyExchange(bool isUsed);
22
23 QByteArray data() const;
24 void setData(const QByteArray &data);
25
27 void parse(const QDomElement &element);
28 void toXml(QXmlStreamWriter *writer) const;
30
31 static bool isOmemoEnvelope(const QDomElement &element);
32
33private:
34 uint32_t m_recipientDeviceId = 0;
35 bool m_isUsedForKeyExchange = false;
36 QByteArray m_data;
37};
38
39Q_DECLARE_TYPEINFO(QXmppOmemoEnvelope, Q_MOVABLE_TYPE);
40
41#endif // QXMPPOMEMOENVELOPE_H