From d8966b7d703cc34dd71ca7688b3d0f08c7a2a902 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 4 Dec 2014 23:04:02 +0100 Subject: Adapted to new interface. --- store/database.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'store/database.h') diff --git a/store/database.h b/store/database.h index 2bf0556..e752ff5 100644 --- a/store/database.h +++ b/store/database.h @@ -7,17 +7,20 @@ class Database { public: enum TransactionType { ReadOnly, ReadWrite }; - Database(const QString &path); + Database(const QString &storageRoot, const QString &name); ~Database(); bool isInTransaction() const; bool startTransaction(TransactionType type = ReadWrite); bool commitTransaction(); void abortTransaction(); + bool write(const char *key, size_t keySize, const char *value, size_t valueSize); bool write(const std::string &sKey, const std::string &sValue); //Perhaps prefer iterators (assuming we need to be able to match multiple values void read(const std::string &sKey, const std::function &); void read(const std::string &sKey, const std::function &); + qint64 diskUsage() const; + void removeFromDisk() const; private: class Private; Private * const d; -- cgit v1.2.3