diff options
author | Max Kellermann <max@duempel.org> | 2014-02-26 08:39:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-27 20:49:13 +0100 |
commit | e9a85aa4e4d0634548b5c97461beb27ae5559338 (patch) | |
tree | 7cdfdd0ae0d990a8adbecc34f32d073627483205 /src/db/update/Service.hxx | |
parent | 2a16fc74fd354484a70efcc5b6dbfcdd73ee5f5a (diff) | |
download | mpd-e9a85aa4e4d0634548b5c97461beb27ae5559338.tar.gz mpd-e9a85aa4e4d0634548b5c97461beb27ae5559338.tar.xz mpd-e9a85aa4e4d0634548b5c97461beb27ae5559338.zip |
db/simple: mount points
A SimpleDatabase instance can now "mount" other Database instances at
certain locations. This is used to use a new SimpleDatabase instance
for each storage mount (issued with the "mount" protocol command).
Each such instance has its own database file, stored in the directory
that is specified with the "cache_directory" option.
Diffstat (limited to '')
-rw-r--r-- | src/db/update/Service.hxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/db/update/Service.hxx b/src/db/update/Service.hxx index e42a0fa5a..cbb4a3f9d 100644 --- a/src/db/update/Service.hxx +++ b/src/db/update/Service.hxx @@ -28,7 +28,7 @@ class SimpleDatabase; class DatabaseListener; class UpdateWalk; -class Storage; +class CompositeStorage; /** * This class manages the update queue and runs the update thread. @@ -41,7 +41,7 @@ class UpdateService final : DeferredMonitor { }; SimpleDatabase &db; - Storage &storage; + CompositeStorage &storage; DatabaseListener &listener; @@ -63,7 +63,7 @@ class UpdateService final : DeferredMonitor { public: UpdateService(EventLoop &_loop, SimpleDatabase &_db, - Storage &_storage, + CompositeStorage &_storage, DatabaseListener &_listener); ~UpdateService(); @@ -92,6 +92,13 @@ public: */ void CancelAllAsync(); + /** + * Cancel all updates for the given mount point. If an update + * is already running for it, the method will wait for + * cancellation to complete. + */ + void CancelMount(const char *uri); + private: /* virtual methods from class DeferredMonitor */ virtual void RunDeferred() override; |