/* * Created by victoria on 2021-05-13. */ #pragma once #include class QString; class QXmppElement; class QXmppIq; namespace QXmpp::Omemo { class PreKey; class Bundle; class Device; class DeviceList; namespace Variant { class Base { public: virtual ~Base() = default; virtual QXmppElement deviceToXml(const Device &device) = 0; virtual Device deviceFromXml(const QXmppElement &xml) = 0; [[nodiscard]] virtual QString getDeviceListNode() const = 0; virtual QXmppElement deviceListToXml(const DeviceList &deviceList) = 0; virtual std::optional latestDeviceListFromPubSubNode(const QXmppElement &xml) = 0; virtual QXmppIq deviceListSetIq(const DeviceList &deviceList) = 0; virtual QXmppElement preKeyToXml(const PreKey &pk) = 0; virtual std::optional preKeyFromXml(const QXmppElement &xml) = 0; virtual QXmppElement bundleToXml(const Bundle& bundle) = 0; virtual std::optional bundleFromXml(const QXmppElement& xml) = 0; virtual QXmppIq bundleSetIq(int deviceId, const Bundle& bundle) = 0; }; } // namespace Variant } // namespace QXmpp::Omemo