Refactoring, account destruction fix, some thoughts about where to store contact settings (omemo enable status for instance)

This commit is contained in:
Blue 2023-03-16 22:38:05 +03:00
parent 283e9ebc4d
commit fffef9876a
Signed by: blue
GPG key ID: 9B203B252A63EE38
15 changed files with 352 additions and 380 deletions

View file

@ -55,8 +55,10 @@ public:
void clear();
long unsigned int size() const;
std::list<Shared::Message> getBefore(int count, const QString& id);
bool isFromTheBeginning();
bool isFromTheBeginning() const;
void setFromTheBeginning(bool is);
bool isEncryptionEnabled() const;
bool setEncryptionEnabled(bool is); //returns true if changed, false otherwise
bool setAvatar(const QByteArray& data, AvatarInfo& info, bool generated = false, const QString& resource = "");
AvatarInfo getAvatarInfo(const QString& resource = "") const;
bool readAvatarInfo(AvatarInfo& target, const QString& resource = "") const;
@ -171,6 +173,7 @@ public:
private:
bool opened;
bool fromTheBeginning;
bool encryptionEnabled;
MDB_env* environment;
MDB_dbi main; //id to message
MDB_dbi order; //time to id