diff options
author | Max Kellermann <max@musicpd.org> | 2019-04-24 15:18:01 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-04-25 12:05:18 +0200 |
commit | 77c9081f781c4afd975f58b549ed47bd35375ce2 (patch) | |
tree | 8ba8657373601e329e0d1de7510833bcea87e6a1 /src/Instance.hxx | |
parent | c88d5616f70819ce6e09255aeacc9153f58a56ec (diff) |
sticker/Database: wrap in class StickerDatabase
Diffstat (limited to 'src/Instance.hxx')
-rw-r--r-- | src/Instance.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Instance.hxx b/src/Instance.hxx index f3c772931..78e9ffb09 100644 --- a/src/Instance.hxx +++ b/src/Instance.hxx @@ -53,6 +53,7 @@ class ClientList; struct Partition; class StateFile; class RemoteTagCache; +class StickerDatabase; /** * A utility class which, when used as the first base class, ensures @@ -125,6 +126,10 @@ struct Instance final StateFile *state_file = nullptr; +#ifdef ENABLE_SQLITE + std::unique_ptr<StickerDatabase> sticker_database; +#endif + Instance(); ~Instance() noexcept; @@ -166,6 +171,12 @@ struct Instance final const Database &GetDatabaseOrThrow() const; #endif +#ifdef ENABLE_SQLITE + bool HasStickerDatabase() noexcept { + return sticker_database != nullptr; + } +#endif + void BeginShutdownUpdate() noexcept; #ifdef ENABLE_CURL |