diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/commands.cpp | 7 | ||||
-rw-r--r-- | common/commands.h | 5 | ||||
-rw-r--r-- | common/console.cpp | 5 | ||||
-rw-r--r-- | common/console.h | 5 | ||||
-rw-r--r-- | common/storage.h | 5 | ||||
-rw-r--r-- | common/storage_common.cpp | 4 | ||||
-rw-r--r-- | common/storage_lmdb.cpp | 5 | ||||
-rw-r--r-- | common/storage_unqlite.cpp | 4 |
8 files changed, 39 insertions, 1 deletions
diff --git a/common/commands.cpp b/common/commands.cpp index b5773e7..474b091 100644 --- a/common/commands.cpp +++ b/common/commands.cpp | |||
@@ -2,6 +2,9 @@ | |||
2 | 2 | ||
3 | #include <QIODevice> | 3 | #include <QIODevice> |
4 | 4 | ||
5 | namespace Akonadi2 | ||
6 | { | ||
7 | |||
5 | namespace Commands | 8 | namespace Commands |
6 | { | 9 | { |
7 | 10 | ||
@@ -13,4 +16,6 @@ void write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb | |||
13 | device->write((const char*)fbb.GetBufferPointer(), dataSize); | 16 | device->write((const char*)fbb.GetBufferPointer(), dataSize); |
14 | } | 17 | } |
15 | 18 | ||
16 | } \ No newline at end of file | 19 | } // namespace Commands |
20 | |||
21 | } // namespace Akonadi2 | ||
diff --git a/common/commands.h b/common/commands.h index 5f2b006..3db1d3b 100644 --- a/common/commands.h +++ b/common/commands.h | |||
@@ -5,6 +5,9 @@ | |||
5 | 5 | ||
6 | class QIODevice; | 6 | class QIODevice; |
7 | 7 | ||
8 | namespace Akonadi2 | ||
9 | { | ||
10 | |||
8 | namespace Commands | 11 | namespace Commands |
9 | { | 12 | { |
10 | 13 | ||
@@ -18,3 +21,5 @@ enum CommandIds { | |||
18 | void AKONADI2COMMON_EXPORT write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb); | 21 | void AKONADI2COMMON_EXPORT write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb); |
19 | 22 | ||
20 | } | 23 | } |
24 | |||
25 | } // namespace Akonadi2 | ||
diff --git a/common/console.cpp b/common/console.cpp index 6fb174a..a878355 100644 --- a/common/console.cpp +++ b/common/console.cpp | |||
@@ -5,6 +5,9 @@ | |||
5 | #include <QTextBrowser> | 5 | #include <QTextBrowser> |
6 | #include <QVBoxLayout> | 6 | #include <QVBoxLayout> |
7 | 7 | ||
8 | namespace Akonadi2 | ||
9 | { | ||
10 | |||
8 | static Console *s_console = 0; | 11 | static Console *s_console = 0; |
9 | 12 | ||
10 | Console *Console::main() | 13 | Console *Console::main() |
@@ -53,3 +56,5 @@ void Console::log(const QString &message) | |||
53 | { | 56 | { |
54 | m_textDisplay->append(QString::number(m_timestamper.elapsed()).rightJustified(6) + ": " + message); | 57 | m_textDisplay->append(QString::number(m_timestamper.elapsed()).rightJustified(6) + ": " + message); |
55 | } | 58 | } |
59 | |||
60 | } // namespace Akonadi2 | ||
diff --git a/common/console.h b/common/console.h index 0df5c38..e0b803c 100644 --- a/common/console.h +++ b/common/console.h | |||
@@ -7,6 +7,9 @@ | |||
7 | 7 | ||
8 | class QTextBrowser; | 8 | class QTextBrowser; |
9 | 9 | ||
10 | namespace Akonadi2 | ||
11 | { | ||
12 | |||
10 | class AKONADI2COMMON_EXPORT Console : public QWidget | 13 | class AKONADI2COMMON_EXPORT Console : public QWidget |
11 | { | 14 | { |
12 | Q_OBJECT | 15 | Q_OBJECT |
@@ -22,3 +25,5 @@ private: | |||
22 | QTime m_timestamper; | 25 | QTime m_timestamper; |
23 | static Console *s_output; | 26 | static Console *s_output; |
24 | }; | 27 | }; |
28 | |||
29 | } // namespace Akonadi2 | ||
diff --git a/common/storage.h b/common/storage.h index 2fac068..b6d6a07 100644 --- a/common/storage.h +++ b/common/storage.h | |||
@@ -5,6 +5,9 @@ | |||
5 | #include <functional> | 5 | #include <functional> |
6 | #include <QString> | 6 | #include <QString> |
7 | 7 | ||
8 | namespace Akonadi2 | ||
9 | { | ||
10 | |||
8 | class AKONADI2COMMON_EXPORT Storage { | 11 | class AKONADI2COMMON_EXPORT Storage { |
9 | public: | 12 | public: |
10 | enum AccessMode { ReadOnly, ReadWrite }; | 13 | enum AccessMode { ReadOnly, ReadWrite }; |
@@ -52,3 +55,5 @@ private: | |||
52 | Private * const d; | 55 | Private * const d; |
53 | }; | 56 | }; |
54 | 57 | ||
58 | } // namespace Akonadi2 | ||
59 | |||
diff --git a/common/storage_common.cpp b/common/storage_common.cpp index 6263bf2..099eb36 100644 --- a/common/storage_common.cpp +++ b/common/storage_common.cpp | |||
@@ -2,6 +2,9 @@ | |||
2 | 2 | ||
3 | #include <iostream> | 3 | #include <iostream> |
4 | 4 | ||
5 | namespace Akonadi2 | ||
6 | { | ||
7 | |||
5 | void errorHandler(const Storage::Error &error) | 8 | void errorHandler(const Storage::Error &error) |
6 | { | 9 | { |
7 | //TODO: allow this to be turned on / off globally | 10 | //TODO: allow this to be turned on / off globally |
@@ -29,3 +32,4 @@ void Storage::scan(const std::string &sKey, const std::function<bool(void *keyPt | |||
29 | scan(sKey.data(), sKey.size(), resultHandler, &errorHandler); | 32 | scan(sKey.data(), sKey.size(), resultHandler, &errorHandler); |
30 | } | 33 | } |
31 | 34 | ||
35 | } // namespace Akonadi2 | ||
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index ce77bbb..7c5c95a 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp | |||
@@ -12,6 +12,9 @@ | |||
12 | 12 | ||
13 | #include <lmdb.h> | 13 | #include <lmdb.h> |
14 | 14 | ||
15 | namespace Akonadi2 | ||
16 | { | ||
17 | |||
15 | class Storage::Private | 18 | class Storage::Private |
16 | { | 19 | { |
17 | public: | 20 | public: |
@@ -309,3 +312,5 @@ void Storage::removeFromDisk() const | |||
309 | dir.remove("data.mdb"); | 312 | dir.remove("data.mdb"); |
310 | dir.remove("lock.mdb"); | 313 | dir.remove("lock.mdb"); |
311 | } | 314 | } |
315 | |||
316 | } // namespace Akonadi2 | ||
diff --git a/common/storage_unqlite.cpp b/common/storage_unqlite.cpp index 67f910b..69dc288 100644 --- a/common/storage_unqlite.cpp +++ b/common/storage_unqlite.cpp | |||
@@ -13,6 +13,9 @@ extern "C" { | |||
13 | #include "unqlite/unqlite.h" | 13 | #include "unqlite/unqlite.h" |
14 | } | 14 | } |
15 | 15 | ||
16 | namespace Akonadi2 | ||
17 | { | ||
18 | |||
16 | static const char *s_unqliteDir = "/unqlite/"; | 19 | static const char *s_unqliteDir = "/unqlite/"; |
17 | 20 | ||
18 | class Storage::Private | 21 | class Storage::Private |
@@ -289,3 +292,4 @@ void Storage::removeFromDisk() const | |||
289 | QFile::remove(d->storageRoot + s_unqliteDir + d->name); | 292 | QFile::remove(d->storageRoot + s_unqliteDir + d->name); |
290 | } | 293 | } |
291 | 294 | ||
295 | } // namespace Akonadi2 | ||