forked from blue/squawk
Some work on omemo handler, NOT DONE, BUILD FAILS!
This commit is contained in:
parent
820dc845ea
commit
0b61b6e928
7 changed files with 187 additions and 12 deletions
|
@ -18,14 +18,17 @@
|
|||
#define CORE_OMEMOHANDLER_H
|
||||
|
||||
#include <QXmppOmemoStorage.h>
|
||||
#include <core/storage/cache.h>
|
||||
#include <cache.h>
|
||||
|
||||
Q_DECLARE_METATYPE(QXmppOmemoStorage::OwnDevice);
|
||||
|
||||
namespace Core {
|
||||
class Account;
|
||||
|
||||
class OmemoHandler : public QXmppOmemoStorage
|
||||
{
|
||||
public:
|
||||
OmemoHandler();
|
||||
OmemoHandler(Account* account);
|
||||
~OmemoHandler() override;
|
||||
|
||||
QFuture<OmemoData> allData() override;
|
||||
|
@ -45,13 +48,24 @@ public:
|
|||
QFuture<void> resetAll() override;
|
||||
|
||||
private:
|
||||
static QFuture<void> emptyVoidFuture();
|
||||
|
||||
private:
|
||||
Account* acc;
|
||||
std::optional<OwnDevice> ownDevice;
|
||||
Cache<QString, QHash<uint32_t, Device>> devices;
|
||||
Cache<uint32_t, QByteArray> preKeyPairs;
|
||||
Cache<uint32_t, QXmppOmemoStorage::SignedPreKeyPair> signedPreKeyPairs;
|
||||
|
||||
|
||||
DataBase db;
|
||||
DataBase::Cache<QString, QVariant>* meta;
|
||||
DataBase::Cache<QString, QHash<uint32_t, Device>>* devices;
|
||||
DataBase::Cache<uint32_t, QByteArray>* preKeyPairs;
|
||||
DataBase::Cache<uint32_t, QXmppOmemoStorage::SignedPreKeyPair>* signedPreKeyPairs;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
QDataStream& operator << (QDataStream &out, const QXmppOmemoStorage::Device& device);
|
||||
QDataStream& operator >> (QDataStream &out, QXmppOmemoStorage::Device device);
|
||||
|
||||
QDataStream& operator << (QDataStream &out, const QXmppOmemoStorage::SignedPreKeyPair& device);
|
||||
QDataStream& operator >> (QDataStream &out, QXmppOmemoStorage::SignedPreKeyPair device);
|
||||
|
||||
#endif // CORE_OMEMOHANDLER_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue