comparison OrthancFramework/Sources/JobsEngine/JobStepResult.cpp @ 4300:b30a8de92ad9

abi continued
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 05 Nov 2020 19:33:18 +0100
parents bf7b9edf6b81
children d9473bd5ed43
comparison
equal deleted inserted replaced
4299:3f85db78c441 4300:b30a8de92ad9
25 25
26 #include "../OrthancException.h" 26 #include "../OrthancException.h"
27 27
28 namespace Orthanc 28 namespace Orthanc
29 { 29 {
30 JobStepResult::JobStepResult() :
31 code_(JobStepCode_Failure),
32 timeout_(0),
33 error_(ErrorCode_InternalError)
34 {
35 }
36
37 JobStepResult JobStepResult::Success()
38 {
39 return JobStepResult(JobStepCode_Success);
40 }
41
42 JobStepResult JobStepResult::Continue()
43 {
44 return JobStepResult(JobStepCode_Continue);
45 }
46
30 JobStepResult JobStepResult::Retry(unsigned int timeout) 47 JobStepResult JobStepResult::Retry(unsigned int timeout)
31 { 48 {
32 JobStepResult result(JobStepCode_Retry); 49 JobStepResult result(JobStepCode_Retry);
33 result.timeout_ = timeout; 50 result.timeout_ = timeout;
34 return result; 51 return result;
52 69
53 JobStepResult JobStepResult::Failure(const OrthancException& exception) 70 JobStepResult JobStepResult::Failure(const OrthancException& exception)
54 { 71 {
55 return Failure(exception.GetErrorCode(), 72 return Failure(exception.GetErrorCode(),
56 exception.HasDetails() ? exception.GetDetails() : NULL); 73 exception.HasDetails() ? exception.GetDetails() : NULL);
74 }
75
76 JobStepCode JobStepResult::GetCode() const
77 {
78 return code_;
57 } 79 }
58 80
59 81
60 unsigned int JobStepResult::GetRetryTimeout() const 82 unsigned int JobStepResult::GetRetryTimeout() const
61 { 83 {