summaryrefslogtreecommitdiffstats
path: root/common/index.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/index.h')
-rw-r--r--common/index.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/common/index.h b/common/index.h
index 3ee322a..0345f56 100644
--- a/common/index.h
+++ b/common/index.h
@@ -12,15 +12,17 @@
12class SINK_EXPORT Index 12class SINK_EXPORT Index
13{ 13{
14public: 14public:
15 enum ErrorCodes { 15 enum ErrorCodes
16 {
16 IndexNotAvailable = -1 17 IndexNotAvailable = -1
17 }; 18 };
18 19
19 class Error 20 class Error
20 { 21 {
21 public: 22 public:
22 Error(const QByteArray &s, int c, const QByteArray &m) 23 Error(const QByteArray &s, int c, const QByteArray &m) : store(s), message(m), code(c)
23 : store(s), message(m), code(c) {} 24 {
25 }
24 QByteArray store; 26 QByteArray store;
25 QByteArray message; 27 QByteArray message;
26 int code; 28 int code;
@@ -32,8 +34,8 @@ public:
32 void add(const QByteArray &key, const QByteArray &value); 34 void add(const QByteArray &key, const QByteArray &value);
33 void remove(const QByteArray &key, const QByteArray &value); 35 void remove(const QByteArray &key, const QByteArray &value);
34 36
35 void lookup(const QByteArray &key, const std::function<void(const QByteArray &value)> &resultHandler, 37 void lookup(const QByteArray &key, const std::function<void(const QByteArray &value)> &resultHandler, const std::function<void(const Error &error)> &errorHandler,
36 const std::function<void(const Error &error)> &errorHandler, bool matchSubStringKeys = false); 38 bool matchSubStringKeys = false);
37 QByteArray lookup(const QByteArray &key); 39 QByteArray lookup(const QByteArray &key);
38 40
39private: 41private: