6#ifndef QXMPPOMEMODEVICEBUNDLE_H
7#define QXMPPOMEMODEVICEBUNDLE_H
9#include "QXmppGlobal.h"
14class QXmlStreamWriter;
16class QXMPP_AUTOTEST_EXPORT QXmppOmemoDeviceBundle
19 QByteArray publicIdentityKey()
const;
20 void setPublicIdentityKey(
const QByteArray &key);
22 QByteArray signedPublicPreKey()
const;
23 void setSignedPublicPreKey(
const QByteArray &key);
25 uint32_t signedPublicPreKeyId()
const;
26 void setSignedPublicPreKeyId(uint32_t
id);
28 QByteArray signedPublicPreKeySignature()
const;
29 void setSignedPublicPreKeySignature(
const QByteArray &signature);
31 QHash<uint32_t, QByteArray> publicPreKeys()
const;
32 void addPublicPreKey(uint32_t
id,
const QByteArray &key);
33 void removePublicPreKey(uint32_t
id);
36 void parse(
const QDomElement &element);
37 void toXml(QXmlStreamWriter *writer)
const;
40 static bool isOmemoDeviceBundle(
const QDomElement &element);
43 QByteArray m_publicIdentityKey;
44 QByteArray m_signedPublicPreKey;
45 uint32_t m_signedPublicPreKeyId = 0;
46 QByteArray m_signedPublicPreKeySignature;
47 QHash<uint32_t, QByteArray> m_publicPreKeys;
50Q_DECLARE_TYPEINFO(QXmppOmemoDeviceBundle, Q_MOVABLE_TYPE);