2021-05-12 21:32:13 +00:00
|
|
|
/*
|
|
|
|
* Created by victoria on 2021-05-12.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QList>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class QXmppPubSubIq;
|
2021-05-13 14:54:37 +00:00
|
|
|
|
2021-05-12 21:32:13 +00:00
|
|
|
class QXmppElement;
|
2021-05-13 14:54:37 +00:00
|
|
|
|
2021-05-12 21:32:13 +00:00
|
|
|
class QXmppIq;
|
|
|
|
|
|
|
|
namespace QXmpp::Omemo {
|
|
|
|
|
2021-05-13 14:54:37 +00:00
|
|
|
class PreKey {
|
|
|
|
public:
|
|
|
|
[[nodiscard]] QXmppElement toXml() const;
|
|
|
|
/// Expects a <pk>
|
|
|
|
void fromXml(const QXmppElement &element);
|
|
|
|
|
|
|
|
int id;
|
|
|
|
QString data;
|
|
|
|
};
|
|
|
|
|
|
|
|
class Bundle {
|
|
|
|
public:
|
|
|
|
[[nodiscard]] static QXmppPubSubIq fetchDeviceBundleIq(int deviceId);
|
|
|
|
|
|
|
|
[[nodiscard]] QXmppElement toXml() const;
|
|
|
|
[[nodiscard]] QXmppIq toIq(int deviceId) const;
|
|
|
|
void fromXml(const QXmppElement &element);
|
|
|
|
|
|
|
|
QString spk;
|
|
|
|
int spkId;
|
|
|
|
QString spks;
|
|
|
|
QString ik;
|
|
|
|
QList<PreKey> prekeys;
|
|
|
|
};
|
2021-05-12 21:32:13 +00:00
|
|
|
|
2021-05-13 14:50:59 +00:00
|
|
|
} // namespace QXmpp::Omemo
|