diff options
Diffstat (limited to 'common/storage.h')
-rw-r--r-- | common/storage.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/storage.h b/common/storage.h index 0b548fb..846e15b 100644 --- a/common/storage.h +++ b/common/storage.h | |||
@@ -5,12 +5,12 @@ | |||
5 | 5 | ||
6 | class Storage { | 6 | class Storage { |
7 | public: | 7 | public: |
8 | enum TransactionType { ReadOnly, ReadWrite }; | 8 | enum AccessMode { ReadOnly, ReadWrite }; |
9 | 9 | ||
10 | Storage(const QString &storageRoot, const QString &name); | 10 | Storage(const QString &storageRoot, const QString &name, AccessMode mode = ReadOnly); |
11 | ~Storage(); | 11 | ~Storage(); |
12 | bool isInTransaction() const; | 12 | bool isInTransaction() const; |
13 | bool startTransaction(TransactionType type = ReadWrite); | 13 | bool startTransaction(AccessMode mode = ReadWrite); |
14 | bool commitTransaction(); | 14 | bool commitTransaction(); |
15 | void abortTransaction(); | 15 | void abortTransaction(); |
16 | bool write(const char *key, size_t keySize, const char *value, size_t valueSize); | 16 | bool write(const char *key, size_t keySize, const char *value, size_t valueSize); |