comparison Orthanc/FileStorage/FilesystemStorage.h @ 23:7a0af291cc90

Synchronization with Orthanc mainline
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 01 Jun 2015 11:52:28 +0200
parents 09421764214b
children ed9acb0f938e
comparison
equal deleted inserted replaced
22:b42eeb4bd1e3 23:7a0af291cc90
30 **/ 30 **/
31 31
32 32
33 #pragma once 33 #pragma once
34 34
35 #include "IStorageArea.h"
36
35 #include <boost/filesystem.hpp> 37 #include <boost/filesystem.hpp>
36 #include <set> 38 #include <set>
37 #include <stdint.h>
38 39
39 namespace Orthanc 40 namespace Orthanc
40 { 41 {
41 class FilesystemStorage : public boost::noncopyable 42 class FilesystemStorage : public IStorageArea
42 { 43 {
44 // TODO REMOVE THIS
45 friend class FilesystemHttpSender;
46 friend class FileStorageAccessor;
47
43 private: 48 private:
44 boost::filesystem::path root_; 49 boost::filesystem::path root_;
45 50
46 boost::filesystem::path GetPath(const std::string& uuid) const; 51 boost::filesystem::path GetPath(const std::string& uuid) const;
47 52
48 public: 53 public:
49 FilesystemStorage(std::string root); 54 FilesystemStorage(std::string root);
50 55
51 virtual void Create(const std::string& uuid, 56 virtual void Create(const std::string& uuid,
52 const void* content, 57 const void* content,
53 size_t size); 58 size_t size,
59 FileContentType type);
54 60
55 virtual void Read(std::string& content, 61 virtual void Read(std::string& content,
56 const std::string& uuid); 62 const std::string& uuid,
63 FileContentType type);
57 64
58 virtual void Remove(const std::string& uuid); 65 virtual void Remove(const std::string& uuid,
66 FileContentType type);
59 67
60 void ListAllFiles(std::set<std::string>& result) const; 68 void ListAllFiles(std::set<std::string>& result) const;
61 69
62 uintmax_t GetSize(const std::string& uuid) const; 70 uintmax_t GetSize(const std::string& uuid) const;
63 71