comparison Core/JobsEngine/JobStatus.cpp @ 2573:3372c5255333 jobs

StoreScuJob, Orthanc Explorer for jobs
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 May 2018 17:56:14 +0200
parents 2af17cd5eb1f
children 73d7d95dd75e
comparison
equal deleted inserted replaced
2570:2e879c796ec7 2573:3372c5255333
37 namespace Orthanc 37 namespace Orthanc
38 { 38 {
39 JobStatus::JobStatus() : 39 JobStatus::JobStatus() :
40 errorCode_(ErrorCode_InternalError), 40 errorCode_(ErrorCode_InternalError),
41 progress_(0), 41 progress_(0),
42 description_(Json::objectValue) 42 jobType_("Invalid"),
43 publicContent_(Json::objectValue),
44 internalContent_(Json::objectValue)
43 { 45 {
44 } 46 }
45 47
46 48
47 JobStatus::JobStatus(ErrorCode code, 49 JobStatus::JobStatus(ErrorCode code,
48 IJob& job) : 50 IJob& job) :
49 errorCode_(code), 51 errorCode_(code),
50 progress_(job.GetProgress()) 52 progress_(job.GetProgress()),
53 publicContent_(Json::objectValue),
54 internalContent_(Json::objectValue)
51 { 55 {
52 if (progress_ < 0) 56 if (progress_ < 0)
53 { 57 {
54 progress_ = 0; 58 progress_ = 0;
55 } 59 }
57 if (progress_ > 1) 61 if (progress_ > 1)
58 { 62 {
59 progress_ = 1; 63 progress_ = 1;
60 } 64 }
61 65
62 job.GetDescription(description_); 66 job.GetJobType(jobType_);
67 job.GetPublicContent(publicContent_);
68 job.GetInternalContent(internalContent_);
63 } 69 }
64 } 70 }