42 lines
669 B
C
42 lines
669 B
C
|
/*
|
||
|
* Created by victoria on 2021-05-12.
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <QList>
|
||
|
#include <QString>
|
||
|
|
||
|
class QXmppPubSubIq;
|
||
|
class QXmppElement;
|
||
|
class QXmppIq;
|
||
|
|
||
|
namespace QXmpp::Omemo {
|
||
|
|
||
|
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;
|
||
|
};
|
||
|
|
||
|
}
|