diff Core/FileStorage/FilesystemStorage.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/Core/FileStorage/FilesystemStorage.h	Fri Sep 05 15:59:04 2014 +0200
+++ b/Core/FileStorage/FilesystemStorage.h	Fri Sep 05 16:28:34 2014 +0200
@@ -32,12 +32,14 @@
 
 #pragma once
 
+#include "IStorageArea.h"
+
 #include <boost/filesystem.hpp>
 #include <set>
 
 namespace Orthanc
 {
-  class FilesystemStorage : public boost::noncopyable
+  class FilesystemStorage : public IStorageArea
   {
     // TODO REMOVE THIS
     friend class FilesystemHttpSender;
@@ -51,14 +53,12 @@
   public:
     FilesystemStorage(std::string root);
 
-    std::string Create(const void* content, size_t size);
-
-    std::string Create(const std::vector<uint8_t>& content);
+    virtual std::string Create(const void* content, size_t size);
 
-    std::string Create(const std::string& content);
+    virtual void Read(std::string& content,
+                      const std::string& uuid) const;
 
-    void Read(std::string& content,
-              const std::string& uuid) const;
+    virtual void Remove(const std::string& uuid);
 
     void ListAllFiles(std::set<std::string>& result) const;
 
@@ -66,8 +66,6 @@
 
     void Clear();
 
-    void Remove(const std::string& uuid);
-
     uintmax_t GetCapacity() const;
 
     uintmax_t GetAvailableSpace() const;