diff OrthancServer/ServerJobs/OrthancJobUnserializer.cpp @ 2815:925d8dc03a23

unserialization of jobs from plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Sep 2018 16:34:21 +0200
parents a21b244efb37
children 218e2c864d1d
line wrap: on
line diff
--- a/OrthancServer/ServerJobs/OrthancJobUnserializer.cpp	Fri Sep 07 10:09:17 2018 +0200
+++ b/OrthancServer/ServerJobs/OrthancJobUnserializer.cpp	Tue Sep 11 16:34:21 2018 +0200
@@ -55,6 +55,17 @@
   {
     const std::string type = SerializationToolbox::ReadString(source, "Type");
 
+#if ORTHANC_ENABLE_PLUGINS == 1
+    if (context_.HasPlugins())
+    {
+      std::auto_ptr<IJob> job(context_.GetPlugins().UnserializeJob(type, source));
+      if (job.get() != NULL)
+      {
+        return job.release();
+      }
+    }
+#endif
+
     if (type == "DicomModalityStore")
     {
       return new DicomModalityStoreJob(context_, source);