comparison OrthancServer/ServerContext.h @ 1005:84b6d7bca6db lua-scripting

refactoring of ServerContext::Store
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 08 Jul 2014 14:34:11 +0200
parents a226e0959d8b
children bb82e5e818e9
comparison
equal deleted inserted replaced
1004:a226e0959d8b 1005:84b6d7bca6db
85 ServerScheduler scheduler_; 85 ServerScheduler scheduler_;
86 86
87 boost::mutex luaMutex_; 87 boost::mutex luaMutex_;
88 LuaContext lua_; 88 LuaContext lua_;
89 89
90 StoreStatus Store(std::string& resultPublicId,
91 const char* dicomBuffer,
92 size_t dicomSize,
93 const ServerIndex::MetadataMap& metadata = ServerIndex::MetadataMap());
94
95 public: 90 public:
96 class DicomCacheLocker : public boost::noncopyable 91 class DicomCacheLocker : public boost::noncopyable
97 { 92 {
98 private: 93 private:
99 ServerContext& that_; 94 ServerContext& that_;
154 bool AddAttachment(const std::string& resourceId, 149 bool AddAttachment(const std::string& resourceId,
155 FileContentType attachmentType, 150 FileContentType attachmentType,
156 const void* data, 151 const void* data,
157 size_t size); 152 size_t size);
158 153
159
160 // TODO SIMPLIFY THESE MANY "Store" methods!
161 StoreStatus Store(std::string& resultPublicId, 154 StoreStatus Store(std::string& resultPublicId,
162 DicomInstanceToStore& dicom); 155 DicomInstanceToStore& dicom);
163
164 StoreStatus Store(const char* dicomInstance,
165 size_t dicomSize,
166 const DicomMap& dicomSummary,
167 const Json::Value& dicomJson,
168 const std::string& remoteAet,
169 const ServerIndex::MetadataMap& metadata = ServerIndex::MetadataMap());
170
171 StoreStatus Store(std::string& resultPublicId,
172 ParsedDicomFile& dicomInstance,
173 const char* dicomBuffer,
174 size_t dicomSize,
175 const ServerIndex::MetadataMap& metadata = ServerIndex::MetadataMap());
176
177 StoreStatus Store(std::string& resultPublicId,
178 ParsedDicomFile& dicomInstance,
179 const ServerIndex::MetadataMap& metadata = ServerIndex::MetadataMap());
180
181 StoreStatus Store(std::string& resultPublicId,
182 const std::string& dicomContent,
183 const ServerIndex::MetadataMap& metadata = ServerIndex::MetadataMap());
184 156
185 void AnswerDicomFile(RestApiOutput& output, 157 void AnswerDicomFile(RestApiOutput& output,
186 const std::string& instancePublicId, 158 const std::string& instancePublicId,
187 FileContentType content); 159 FileContentType content);
188 160