diff Framework/Oracle/GetOrthancImageCommand.cpp @ 1098:17660df24c36 broker

simplification of IOracleRunner
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 25 Oct 2019 13:01:24 +0200
parents 81b29bc7c3d4
children 87fbeb823375
line wrap: on
line diff
--- a/Framework/Oracle/GetOrthancImageCommand.cpp	Thu Oct 24 22:31:18 2019 +0200
+++ b/Framework/Oracle/GetOrthancImageCommand.cpp	Fri Oct 25 13:01:24 2019 +0200
@@ -82,10 +82,8 @@
     }
   }
 
-  void GetOrthancImageCommand::ProcessHttpAnswer(IMessageEmitter& emitter,
-                                                 boost::weak_ptr<IObserver>& receiver,
-                                                 const std::string& answer,
-                                                 const HttpHeaders& answerHeaders) const
+  IMessage* GetOrthancImageCommand::ProcessHttpAnswer(const std::string& answer,
+                                                      const HttpHeaders& answerHeaders) const
   {
     Orthanc::MimeType contentType = Orthanc::MimeType_Binary;
 
@@ -147,7 +145,6 @@
       }
     }
 
-    SuccessMessage message(*this, image.release(), contentType);
-    emitter.EmitMessage(receiver, message);
+    return new SuccessMessage(*this, image.release(), contentType);
   }
 }