diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-12-09 22:01:35 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-12-11 01:01:13 +0100 |
commit | 5f7262f5c410cf3f36116c221d28dd393664228d (patch) | |
tree | 5c3fb21cd31835470bdd87cd467a3c6ef0659fed /common/storage.h | |
parent | 3207343cbd4484950155146ab632b8304b70d640 (diff) | |
download | sink-5f7262f5c410cf3f36116c221d28dd393664228d.tar.gz sink-5f7262f5c410cf3f36116c221d28dd393664228d.zip |
add another read method and expose a basic error handler for convenience
also, add some todos
Diffstat (limited to 'common/storage.h')
-rw-r--r-- | common/storage.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/storage.h b/common/storage.h index 83c307c..a051043 100644 --- a/common/storage.h +++ b/common/storage.h | |||
@@ -32,16 +32,17 @@ public: | |||
32 | const std::function<bool(const std::string &value)> &resultHandler); | 32 | const std::function<bool(const std::string &value)> &resultHandler); |
33 | void read(const std::string &sKey, | 33 | void read(const std::string &sKey, |
34 | const std::function<bool(const std::string &value)> &resultHandler, | 34 | const std::function<bool(const std::string &value)> &resultHandler, |
35 | const std::function<void(const Storage::Error &error)> &errors); | 35 | const std::function<void(const Storage::Error &error)> &errorHandler); |
36 | void read(const std::string &sKey, const std::function<bool(void *ptr, int size)> &resultHandler); | 36 | void read(const std::string &sKey, const std::function<bool(void *ptr, int size)> &resultHandler); |
37 | void read(const std::string &sKey, | 37 | void read(const std::string &sKey, |
38 | const std::function<bool(void *ptr, int size)> & resultHandler, | 38 | const std::function<bool(void *ptr, int size)> & resultHandler, |
39 | const std::function<void(const Storage::Error &error)> &errorHandler); | 39 | const std::function<void(const Storage::Error &error)> &errorHandler); |
40 | void scan(const std::string &sKey, const std::function<bool(void *keyPtr, int keySize, void *valuePtr, int valueSize)> &resultHandler); | 40 | void scan(const std::string &sKey, const std::function<bool(void *keyPtr, int keySize, void *valuePtr, int valueSize)> &resultHandler); |
41 | void scan(const std::string &sKey, | 41 | void scan(const char *keyData, uint keySize, |
42 | const std::function<bool(void *keyPtr, int keySize, void *valuePtr, int valueSize)> & resultHandler, | 42 | const std::function<bool(void *keyPtr, int keySize, void *ptr, int size)> &resultHandler, |
43 | const std::function<void(const Storage::Error &error)> &errorHandler); | 43 | const std::function<void(const Storage::Error &error)> &errorHandler); |
44 | 44 | ||
45 | static std::function<void(const Storage::Error &error)> basicErrorHandler(); | ||
45 | qint64 diskUsage() const; | 46 | qint64 diskUsage() const; |
46 | void removeFromDisk() const; | 47 | void removeFromDisk() const; |
47 | private: | 48 | private: |