diff OrthancServer/ServerContext.h @ 1124:790ff7a5b3bf

IStorageArea abstraction
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Sep 2014 16:28:34 +0200
parents 6c5a77637b23
children bf67431a7383
line wrap: on
line diff
--- a/OrthancServer/ServerContext.h	Fri Sep 05 15:59:04 2014 +0200
+++ b/OrthancServer/ServerContext.h	Fri Sep 05 16:28:34 2014 +0200
@@ -34,7 +34,7 @@
 
 #include "../Core/Cache/MemoryCache.h"
 #include "../Core/FileStorage/CompressedFileStorageAccessor.h"
-#include "../Core/FileStorage/FilesystemStorage.h"
+#include "../Core/FileStorage/IStorageArea.h"
 #include "../Core/RestApi/RestApiOutput.h"
 #include "../Core/Lua/LuaContext.h"
 #include "ServerIndex.h"
@@ -43,6 +43,8 @@
 #include "Scheduler/ServerScheduler.h"
 #include "DicomInstanceToStore.h"
 
+#include <boost/filesystem.hpp>
+
 namespace Orthanc
 {
   class PluginsHttpHandler;
@@ -75,7 +77,7 @@
                                   const Json::Value& simplifiedDicom,
                                   const Json::Value& metadata);
 
-    FilesystemStorage storage_;
+    IStorageArea& storage_;
     ServerIndex index_;
     CompressedFileStorageAccessor accessor_;
     bool compressionEnabled_;
@@ -132,7 +134,7 @@
     };
 
 
-    ServerContext(const boost::filesystem::path& storagePath,
+    ServerContext(IStorageArea& storage,
                   const boost::filesystem::path& indexPath);
 
     ServerIndex& GetIndex()