comparison OrthancServer/ServerContext.h @ 232:5368bbe813cf

refactoring of attachments
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 30 Nov 2012 14:22:27 +0100
parents 209ca3f6db62
children c11273198cef
comparison
equal deleted inserted replaced
231:8098448bd827 232:5368bbe813cf
33 #pragma once 33 #pragma once
34 34
35 #include "ServerIndex.h" 35 #include "ServerIndex.h"
36 #include "../Core/FileStorage.h" 36 #include "../Core/FileStorage.h"
37 #include "../Core/RestApi/RestApiOutput.h" 37 #include "../Core/RestApi/RestApiOutput.h"
38 #include "../Core/FileStorage/CompressedFileStorageAccessor.h"
38 39
39 namespace Orthanc 40 namespace Orthanc
40 { 41 {
41 /** 42 /**
42 * This class is responsible for maintaining the storage area on the 43 * This class is responsible for maintaining the storage area on the
46 class ServerContext 47 class ServerContext
47 { 48 {
48 private: 49 private:
49 FileStorage storage_; 50 FileStorage storage_;
50 ServerIndex index_; 51 ServerIndex index_;
52 CompressedFileStorageAccessor accessor_;
51 53
52 public: 54 public:
53 ServerContext(const boost::filesystem::path& path); 55 ServerContext(const boost::filesystem::path& path);
54 56
55 ServerIndex& GetIndex() 57 ServerIndex& GetIndex()
65 const Json::Value& dicomJson, 67 const Json::Value& dicomJson,
66 const std::string& remoteAet); 68 const std::string& remoteAet);
67 69
68 void AnswerFile(RestApiOutput& output, 70 void AnswerFile(RestApiOutput& output,
69 const std::string& instancePublicId, 71 const std::string& instancePublicId,
70 AttachedFileType content); 72 FileType content);
71 73
72 void ReadJson(Json::Value& result, 74 void ReadJson(Json::Value& result,
73 const std::string& instancePublicId); 75 const std::string& instancePublicId);
74 76
75 // TODO CACHING MECHANISM AT THIS POINT 77 // TODO CACHING MECHANISM AT THIS POINT
76 void ReadFile(std::string& result, 78 void ReadFile(std::string& result,
77 const std::string& instancePublicId, 79 const std::string& instancePublicId,
78 AttachedFileType content); 80 FileType content);
79 }; 81 };
80 } 82 }