diff OrthancFramework/Sources/JobsEngine/Operations/SequenceOfOperationsJob.cpp @ 4304:50b0c69b653a

continued abi
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 06 Nov 2020 16:33:52 +0100
parents bf7b9edf6b81
children 2ae905070221
line wrap: on
line diff
--- a/OrthancFramework/Sources/JobsEngine/Operations/SequenceOfOperationsJob.cpp	Fri Nov 06 15:37:30 2020 +0100
+++ b/OrthancFramework/Sources/JobsEngine/Operations/SequenceOfOperationsJob.cpp	Fri Nov 06 16:33:52 2020 +0100
@@ -236,6 +236,17 @@
   }
 
 
+  SequenceOfOperationsJob::Lock::Lock(SequenceOfOperationsJob& that) :
+    that_(that),
+    lock_(that.mutex_)
+  {
+  }
+
+  bool SequenceOfOperationsJob::Lock::IsDone() const
+  {
+    return that_.done_;
+  }
+
   void SequenceOfOperationsJob::Lock::SetTrailingOperationTimeout(unsigned int timeout)
   {
     that_.trailingTimeout_ = boost::posix_time::milliseconds(timeout);
@@ -257,6 +268,11 @@
     return index;
   }
 
+  size_t SequenceOfOperationsJob::Lock::GetOperationsCount() const
+  {
+    return that_.operations_.size();
+  }
+
 
   void SequenceOfOperationsJob::Lock::AddInput(size_t index,
                                                const JobOperationValue& value)
@@ -301,6 +317,11 @@
   }
 
 
+  void SequenceOfOperationsJob::Start()
+  {
+  }
+
+
   JobStepResult SequenceOfOperationsJob::Step(const std::string& jobId)
   {
     boost::mutex::scoped_lock lock(mutex_);
@@ -361,6 +382,10 @@
     }
   }
 
+  void SequenceOfOperationsJob::Stop(JobStopReason reason)
+  {
+  }
+
 
   float SequenceOfOperationsJob::GetProgress()
   {
@@ -370,6 +395,11 @@
             static_cast<float>(operations_.size() + 1));
   }
 
+  void SequenceOfOperationsJob::GetJobType(std::string& target)
+  {
+    target = "SequenceOfOperations";
+  }
+
 
   void SequenceOfOperationsJob::GetPublicContent(Json::Value& value)
   {
@@ -407,6 +437,18 @@
     return true;
   }
 
+  bool SequenceOfOperationsJob::GetOutput(std::string& output,
+                                          MimeType& mime,
+                                          const std::string& key)
+  {
+    return false;
+  }
+
+  void SequenceOfOperationsJob::AwakeTrailingSleep()
+  {
+    operationAdded_.notify_one();
+  }
+
 
   SequenceOfOperationsJob::SequenceOfOperationsJob(IJobUnserializer& unserializer,
                                                    const Json::Value& serialized) :