From 86e5f80837ad55932f2469d79d9e6b6bb07cf5ed Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 28 Sep 2009 19:09:22 +0200 Subject: Implemented new ConfigManager --- .../StorageBackendFile/StorageBackendFile.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'src/modules/StorageBackendFile/StorageBackendFile.cpp') diff --git a/src/modules/StorageBackendFile/StorageBackendFile.cpp b/src/modules/StorageBackendFile/StorageBackendFile.cpp index e5da4e0..e801a64 100644 --- a/src/modules/StorageBackendFile/StorageBackendFile.cpp +++ b/src/modules/StorageBackendFile/StorageBackendFile.cpp @@ -28,27 +28,10 @@ namespace Mad { namespace Modules { namespace StorageBackendFile { -bool StorageBackendFile::handleConfigEntry(const Core::ConfigEntry &entry, bool /*handled*/) { - if(!entry[0].getKey().matches("Storage")) - return false; - +void StorageBackendFile::configure() { boost::lock_guard lock(mutex); - if(entry[1].getKey().matches("Root")) { - if(!entry[2].isEmpty()) - return false; - - storageRoot = entry[1][0].toLocale(); - } - else if(!entry[1].isEmpty()) { - return false; - } - - return true; -} - -void StorageBackendFile::configFinished() { - boost::lock_guard lock(mutex); + storageRoot = application->getConfigManager()->get("Storage.Root").toLocale(); if(!boost::filesystem::exists(storageRoot)) { boost::filesystem::create_directories(storageRoot); -- cgit v1.2.3