Mercurial > hg > orthanc
comparison OrthancServer/ServerContext.h @ 226:8a26a8e85edf
refactoring to read files
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 30 Nov 2012 09:45:29 +0100 |
parents | 4eb0c7ce86c9 |
children | 209ca3f6db62 |
comparison
equal
deleted
inserted
replaced
225:03aa59ecf6d8 | 226:8a26a8e85edf |
---|---|
32 | 32 |
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 | 38 |
38 namespace Orthanc | 39 namespace Orthanc |
39 { | 40 { |
40 class ServerContext | 41 class ServerContext |
41 { | 42 { |
49 ServerIndex& GetIndex() | 50 ServerIndex& GetIndex() |
50 { | 51 { |
51 return index_; | 52 return index_; |
52 } | 53 } |
53 | 54 |
55 // TODO REMOVE THIS, SINCE IT IS NOT PROTECTED BY MUTEXES | |
54 FileStorage& GetFileStorage() | 56 FileStorage& GetFileStorage() |
55 { | 57 { |
56 return storage_; | 58 return storage_; |
59 } | |
60 | |
61 void RemoveFile(const std::string& fileUuid) | |
62 { | |
63 storage_.Remove(fileUuid); | |
57 } | 64 } |
58 | 65 |
59 StoreStatus Store(const char* dicomFile, | 66 StoreStatus Store(const char* dicomFile, |
60 size_t dicomSize, | 67 size_t dicomSize, |
61 const DicomMap& dicomSummary, | 68 const DicomMap& dicomSummary, |
62 const Json::Value& dicomJson, | 69 const Json::Value& dicomJson, |
63 const std::string& remoteAet); | 70 const std::string& remoteAet); |
71 | |
72 void AnswerFile(RestApiOutput& output, | |
73 const std::string& instancePublicId, | |
74 AttachedFileType content); | |
75 | |
76 void ReadJson(Json::Value& result, | |
77 const std::string& instancePublicId); | |
64 }; | 78 }; |
65 } | 79 } |