Mercurial > hg > orthanc
comparison OrthancServer/ServerContext.h @ 227:209ca3f6db62
dicom-scu from rest
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 30 Nov 2012 10:57:34 +0100 |
parents | 8a26a8e85edf |
children | 5368bbe813cf |
comparison
equal
deleted
inserted
replaced
226:8a26a8e85edf | 227:209ca3f6db62 |
---|---|
36 #include "../Core/FileStorage.h" | 36 #include "../Core/FileStorage.h" |
37 #include "../Core/RestApi/RestApiOutput.h" | 37 #include "../Core/RestApi/RestApiOutput.h" |
38 | 38 |
39 namespace Orthanc | 39 namespace Orthanc |
40 { | 40 { |
41 /** | |
42 * This class is responsible for maintaining the storage area on the | |
43 * filesystem (including compression), as well as the index of the | |
44 * DICOM store. It implements the required locking mechanisms. | |
45 **/ | |
41 class ServerContext | 46 class ServerContext |
42 { | 47 { |
43 private: | 48 private: |
44 FileStorage storage_; | 49 FileStorage storage_; |
45 ServerIndex index_; | 50 ServerIndex index_; |
50 ServerIndex& GetIndex() | 55 ServerIndex& GetIndex() |
51 { | 56 { |
52 return index_; | 57 return index_; |
53 } | 58 } |
54 | 59 |
55 // TODO REMOVE THIS, SINCE IT IS NOT PROTECTED BY MUTEXES | 60 void RemoveFile(const std::string& fileUuid); |
56 FileStorage& GetFileStorage() | |
57 { | |
58 return storage_; | |
59 } | |
60 | |
61 void RemoveFile(const std::string& fileUuid) | |
62 { | |
63 storage_.Remove(fileUuid); | |
64 } | |
65 | 61 |
66 StoreStatus Store(const char* dicomFile, | 62 StoreStatus Store(const char* dicomFile, |
67 size_t dicomSize, | 63 size_t dicomSize, |
68 const DicomMap& dicomSummary, | 64 const DicomMap& dicomSummary, |
69 const Json::Value& dicomJson, | 65 const Json::Value& dicomJson, |
73 const std::string& instancePublicId, | 69 const std::string& instancePublicId, |
74 AttachedFileType content); | 70 AttachedFileType content); |
75 | 71 |
76 void ReadJson(Json::Value& result, | 72 void ReadJson(Json::Value& result, |
77 const std::string& instancePublicId); | 73 const std::string& instancePublicId); |
74 | |
75 // TODO CACHING MECHANISM AT THIS POINT | |
76 void ReadFile(std::string& result, | |
77 const std::string& instancePublicId, | |
78 AttachedFileType content); | |
78 }; | 79 }; |
79 } | 80 } |