receiving avatars, generating missing avatars, storing state of avatars, global color palette

This commit is contained in:
Blue 2019-10-15 22:25:40 +03:00
parent c678a790e5
commit 64e33b6139
8 changed files with 375 additions and 38 deletions

View file

@ -20,6 +20,10 @@
#define CORE_ARCHIVE_H
#include <QObject>
#include <QCryptographicHash>
#include <QMimeDatabase>
#include <QMimeType>
#include "../global.h"
#include <lmdb.h>
#include "../exception.h"
@ -50,8 +54,10 @@ public:
bool isFromTheBeginning();
void setFromTheBeginning(bool is);
bool getHasAvatar() const;
bool getAutoAvatar() const;
QString getAvatarHash() const;
QString getAvatarType() const;
bool setAvatar(const QByteArray& data, bool generated = false);
public:
const QString jid;
@ -135,6 +141,7 @@ private:
MDB_dbi order;
MDB_dbi stats;
bool hasAvatar;
bool avatarAutoGenerated;
QString avatarHash;
QString avatarType;
@ -145,6 +152,7 @@ private:
bool setStatValue(const std::string& id, const std::string& value, MDB_txn* txn);
void printOrder();
void printKeys();
bool dropAvatar();
};
}