comparison OrthancServer/ServerJobs/LuaJobManager.cpp @ 2607:44e268605478 jobs

ModifyInstanceOperation
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 19 May 2018 15:28:41 +0200
parents f2b9d3256060
children 25225f0b4f33
comparison
equal deleted inserted replaced
2606:f2b9d3256060 2607:44e268605478
32 32
33 33
34 #include "../PrecompiledHeadersServer.h" 34 #include "../PrecompiledHeadersServer.h"
35 #include "LuaJobManager.h" 35 #include "LuaJobManager.h"
36 36
37 #include "../../Core/JobsEngine/Operations/LogJobOperation.h"
37 #include "DeleteResourceOperation.h" 38 #include "DeleteResourceOperation.h"
39 #include "ModifyInstanceOperation.h"
38 #include "StorePeerOperation.h" 40 #include "StorePeerOperation.h"
39 #include "StoreScuOperation.h" 41 #include "StoreScuOperation.h"
40 #include "SystemCallOperation.h" 42 #include "SystemCallOperation.h"
41 #include "../../Core/JobsEngine/Operations/LogJobOperation.h" 43
42
43 #include "DicomInstanceOperationValue.h"
44 #include "../../Core/JobsEngine/Operations/NullOperationValue.h" 44 #include "../../Core/JobsEngine/Operations/NullOperationValue.h"
45 #include "../../Core/JobsEngine/Operations/StringOperationValue.h" 45 #include "../../Core/JobsEngine/Operations/StringOperationValue.h"
46 #include "DicomInstanceOperationValue.h"
46 47
47 namespace Orthanc 48 namespace Orthanc
48 { 49 {
49 void LuaJobManager::ConnectionTimeoutThread(LuaJobManager* manager) 50 void LuaJobManager::ConnectionTimeoutThread(LuaJobManager* manager)
50 { 51 {
194 size_t LuaJobManager::Lock::AddSystemCallOperation(const std::string& command) 195 size_t LuaJobManager::Lock::AddSystemCallOperation(const std::string& command)
195 { 196 {
196 assert(jobLock_.get() != NULL); 197 assert(jobLock_.get() != NULL);
197 return jobLock_->AddOperation(new SystemCallOperation(command)); 198 return jobLock_->AddOperation(new SystemCallOperation(command));
198 } 199 }
199 200
200 201
201 size_t LuaJobManager::Lock::AddSystemCallOperation 202 size_t LuaJobManager::Lock::AddSystemCallOperation
202 (const std::string& command, 203 (const std::string& command,
203 const std::vector<std::string>& preArguments, 204 const std::vector<std::string>& preArguments,
204 const std::vector<std::string>& postArguments) 205 const std::vector<std::string>& postArguments)
207 return jobLock_->AddOperation 208 return jobLock_->AddOperation
208 (new SystemCallOperation(command, preArguments, postArguments)); 209 (new SystemCallOperation(command, preArguments, postArguments));
209 } 210 }
210 211
211 212
213 size_t LuaJobManager::Lock::AddModifyInstanceOperation(ServerContext& context,
214 DicomModification* modification)
215 {
216 assert(jobLock_.get() != NULL);
217 return jobLock_->AddOperation
218 (new ModifyInstanceOperation(context, RequestOrigin_Lua, modification));
219 }
220
221
212 void LuaJobManager::Lock::AddNullInput(size_t operation) 222 void LuaJobManager::Lock::AddNullInput(size_t operation)
213 { 223 {
214 assert(jobLock_.get() != NULL); 224 assert(jobLock_.get() != NULL);
215 jobLock_->AddInput(operation, NullOperationValue()); 225 jobLock_->AddInput(operation, NullOperationValue());
216 } 226 }