From 3dd90236e7927028ff5c98635f8075189c9869c2 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Mon, 15 Dec 2014 19:28:05 +0100 Subject: namespace everything in libs with Akonadi2 --- common/commands.cpp | 7 ++++++- common/commands.h | 5 +++++ common/console.cpp | 5 +++++ common/console.h | 5 +++++ common/storage.h | 5 +++++ common/storage_common.cpp | 4 ++++ common/storage_lmdb.cpp | 5 +++++ common/storage_unqlite.cpp | 4 ++++ 8 files changed, 39 insertions(+), 1 deletion(-) (limited to 'common') 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 @@ #include +namespace Akonadi2 +{ + namespace Commands { @@ -13,4 +16,6 @@ void write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb device->write((const char*)fbb.GetBufferPointer(), dataSize); } -} \ No newline at end of file +} // namespace Commands + +} // 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 @@ class QIODevice; +namespace Akonadi2 +{ + namespace Commands { @@ -18,3 +21,5 @@ enum CommandIds { void AKONADI2COMMON_EXPORT write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb); } + +} // 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 @@ #include #include +namespace Akonadi2 +{ + static Console *s_console = 0; Console *Console::main() @@ -53,3 +56,5 @@ void Console::log(const QString &message) { m_textDisplay->append(QString::number(m_timestamper.elapsed()).rightJustified(6) + ": " + message); } + +} // 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 @@ class QTextBrowser; +namespace Akonadi2 +{ + class AKONADI2COMMON_EXPORT Console : public QWidget { Q_OBJECT @@ -22,3 +25,5 @@ private: QTime m_timestamper; static Console *s_output; }; + +} // 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 @@ #include #include +namespace Akonadi2 +{ + class AKONADI2COMMON_EXPORT Storage { public: enum AccessMode { ReadOnly, ReadWrite }; @@ -52,3 +55,5 @@ private: Private * const d; }; +} // namespace Akonadi2 + 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 @@ #include +namespace Akonadi2 +{ + void errorHandler(const Storage::Error &error) { //TODO: allow this to be turned on / off globally @@ -29,3 +32,4 @@ void Storage::scan(const std::string &sKey, const std::function +namespace Akonadi2 +{ + class Storage::Private { public: @@ -309,3 +312,5 @@ void Storage::removeFromDisk() const dir.remove("data.mdb"); dir.remove("lock.mdb"); } + +} // 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" { #include "unqlite/unqlite.h" } +namespace Akonadi2 +{ + static const char *s_unqliteDir = "/unqlite/"; class Storage::Private @@ -289,3 +292,4 @@ void Storage::removeFromDisk() const QFile::remove(d->storageRoot + s_unqliteDir + d->name); } +} // namespace Akonadi2 -- cgit v1.2.3