summaryrefslogtreecommitdiffstats
path: root/common/storage/key.h
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2018-07-26 17:00:03 +0200
committerMinijackson <minijackson@riseup.net>2018-07-26 17:00:03 +0200
commit6c5d7a65899f3b322184628c2be68fd3f3fdd5da (patch)
tree2f28fea8c0f39f45b97e3277d75bfa457db7f939 /common/storage/key.h
parenta49c078fde2597a05a6b9f6eb2fba5c7fa0b53c9 (diff)
downloadsink-key-for-sinksh.tar.gz
sink-key-for-sinksh.zip
Parse Keys in SinkSH inspectkey-for-sinksh
Diffstat (limited to 'common/storage/key.h')
-rw-r--r--common/storage/key.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/common/storage/key.h b/common/storage/key.h
index a5b92bb..211aea7 100644
--- a/common/storage/key.h
+++ b/common/storage/key.h
@@ -48,6 +48,10 @@ public:
48 48
49 bool isNull() const; 49 bool isNull() const;
50 50
51 static bool isValidInternal(const QByteArray &);
52 static bool isValidDisplay(const QByteArray &);
53 static bool isValid(const QByteArray &);
54
51 bool operator==(const Identifier &other) const; 55 bool operator==(const Identifier &other) const;
52 bool operator!=(const Identifier &other) const; 56 bool operator!=(const Identifier &other) const;
53 57
@@ -72,6 +76,10 @@ public:
72 static Revision fromDisplayByteArray(const QByteArray &bytes); 76 static Revision fromDisplayByteArray(const QByteArray &bytes);
73 qint64 toQint64() const; 77 qint64 toQint64() const;
74 78
79 static bool isValidInternal(const QByteArray &);
80 static bool isValidDisplay(const QByteArray &);
81 static bool isValid(const QByteArray &);
82
75 bool operator==(const Revision &other) const; 83 bool operator==(const Revision &other) const;
76 bool operator!=(const Revision &other) const; 84 bool operator!=(const Revision &other) const;
77 85
@@ -99,6 +107,10 @@ public:
99 107
100 bool isNull() const; 108 bool isNull() const;
101 109
110 static bool isValidInternal(const QByteArray &);
111 static bool isValidDisplay(const QByteArray &);
112 static bool isValid(const QByteArray &);
113
102 bool operator==(const Key &other) const; 114 bool operator==(const Key &other) const;
103 bool operator!=(const Key &other) const; 115 bool operator!=(const Key &other) const;
104 116
@@ -110,6 +122,6 @@ private:
110} // namespace Storage 122} // namespace Storage
111} // namespace Sink 123} // namespace Sink
112 124
113SINK_EXPORT QDebug& operator<<(QDebug &dbg, const Sink::Storage::Identifier &); 125SINK_EXPORT QDebug &operator<<(QDebug &dbg, const Sink::Storage::Identifier &);
114SINK_EXPORT QDebug& operator<<(QDebug &dbg, const Sink::Storage::Revision &); 126SINK_EXPORT QDebug &operator<<(QDebug &dbg, const Sink::Storage::Revision &);
115SINK_EXPORT QDebug& operator<<(QDebug &dbg, const Sink::Storage::Key &); 127SINK_EXPORT QDebug &operator<<(QDebug &dbg, const Sink::Storage::Key &);