changeset 1222:21c2b0eee53c broker

deprecating MessageHandler
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 07 Dec 2019 18:18:07 +0100
parents 6f3f1ef347a3
children 37bc7f115f81
files Applications/Samples/SimpleViewerApplicationSingleFile.h Framework/Deprecated/Toolbox/BaseWebService.cpp Framework/Deprecated/Toolbox/BaseWebService.h Framework/Deprecated/Toolbox/IDelayedCallExecutor.h Framework/Deprecated/Toolbox/IWebService.h Framework/Deprecated/Toolbox/OrthancApiClient.cpp Framework/Deprecated/Toolbox/OrthancApiClient.h Framework/Deprecated/Toolbox/OrthancSlicesLoader.cpp Framework/Deprecated/Volumes/StructureSetLoader.cpp Framework/Messages/ICallable.h Framework/Radiography/RadiographyScene.cpp Platforms/Generic/DelayedCallCommand.cpp Platforms/Generic/DelayedCallCommand.h Platforms/Generic/OracleDelayedCallExecutor.h Platforms/Generic/OracleWebService.cpp Platforms/Generic/OracleWebService.h Platforms/Generic/WebServiceCommandBase.cpp Platforms/Generic/WebServiceCommandBase.h Platforms/Generic/WebServiceDeleteCommand.cpp Platforms/Generic/WebServiceDeleteCommand.h Platforms/Generic/WebServiceGetCommand.cpp Platforms/Generic/WebServiceGetCommand.h Platforms/Generic/WebServicePostCommand.cpp Platforms/Generic/WebServicePostCommand.h
diffstat 24 files changed, 176 insertions(+), 135 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Samples/SimpleViewerApplicationSingleFile.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Applications/Samples/SimpleViewerApplicationSingleFile.h	Sat Dec 07 18:18:07 2019 +0100
@@ -330,7 +330,7 @@
           LOG(WARNING) << "The study ID is missing, will take the first studyId found in Orthanc";
           context->GetOrthancApiClient()->GetJsonAsync(
             "/studies",
-            new Callable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
+            new Deprecated::DeprecatedCallable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
             (GetSharedObserver(), &SimpleViewerApplication::OnStudyListReceived));
         }
         else
@@ -360,7 +360,7 @@
           {
             context_->GetOrthancApiClient()->GetJsonAsync(
               "/series/" + response["Series"][(int)i].asString(),
-              new Callable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
+              new Deprecated::DeprecatedCallable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
               (GetSharedObserver(), &SimpleViewerApplication::OnSeriesReceived));
           }
         }
@@ -411,7 +411,7 @@
       {
         LOG(INFO) << "Selecting study: " << studyId;
         context_->GetOrthancApiClient()->GetJsonAsync(
-          "/studies/" + studyId, new Callable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
+          "/studies/" + studyId, new Deprecated::DeprecatedCallable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
           (GetSharedObserver(), &SimpleViewerApplication::OnStudyReceived));
       }
 
--- a/Framework/Deprecated/Toolbox/BaseWebService.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Framework/Deprecated/Toolbox/BaseWebService.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -37,13 +37,13 @@
   class BaseWebService::BaseWebServicePayload : public Orthanc::IDynamicObject
   {
   private:
-    std::auto_ptr< OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage> >   userSuccessHandler_;
-    std::auto_ptr< OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage> >     userFailureHandler_;
+    std::auto_ptr< MessageHandler<IWebService::HttpRequestSuccessMessage> >   userSuccessHandler_;
+    std::auto_ptr< MessageHandler<IWebService::HttpRequestErrorMessage> >     userFailureHandler_;
     std::auto_ptr< Orthanc::IDynamicObject>                                   userPayload_;
 
   public:
-    BaseWebServicePayload(OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* userSuccessHandler,
-                          OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* userFailureHandler,
+    BaseWebServicePayload(MessageHandler<IWebService::HttpRequestSuccessMessage>* userSuccessHandler,
+                          MessageHandler<IWebService::HttpRequestErrorMessage>* userFailureHandler,
                           Orthanc::IDynamicObject* userPayload) :
       userSuccessHandler_(userSuccessHandler),
       userFailureHandler_(userFailureHandler),
@@ -88,17 +88,17 @@
   void BaseWebService::GetAsync(const std::string& uri,
                                 const HttpHeaders& headers,
                                 Orthanc::IDynamicObject* payload  /* takes ownership */,
-                                OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
-                                OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
+                                MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
+                                MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
                                 unsigned int timeoutInSeconds)
   {
     if (!cacheEnabled_ || cache_.find(uri) == cache_.end())
     {
       GetAsyncInternal(uri, headers,
                        new BaseWebService::BaseWebServicePayload(successCallback, failureCallback, payload), // ownership is transfered
-                       new OrthancStone::Callable<BaseWebService, IWebService::HttpRequestSuccessMessage>
+                       new DeprecatedCallable<BaseWebService, IWebService::HttpRequestSuccessMessage>
                        (GetSharedObserver(), &BaseWebService::CacheAndNotifyHttpSuccess),
-                       new OrthancStone::Callable<BaseWebService, IWebService::HttpRequestErrorMessage>
+                       new DeprecatedCallable<BaseWebService, IWebService::HttpRequestErrorMessage>
                        (GetSharedObserver(), &BaseWebService::NotifyHttpError),
                        timeoutInSeconds);
     }
--- a/Framework/Deprecated/Toolbox/BaseWebService.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Framework/Deprecated/Toolbox/BaseWebService.h	Sat Dec 07 18:18:07 2019 +0100
@@ -110,21 +110,21 @@
     virtual void GetAsync(const std::string& uri,
                           const HttpHeaders& headers,
                           Orthanc::IDynamicObject* payload  /* takes ownership */,
-                          OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
-                          OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                          MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
+                          MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                           unsigned int timeoutInSeconds = 60);
 
   protected:
     virtual void GetAsyncInternal(const std::string& uri,
                           const HttpHeaders& headers,
                           Orthanc::IDynamicObject* payload  /* takes ownership */,
-                          OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
-                          OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                          MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
+                          MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                           unsigned int timeoutInSeconds = 60) = 0;
 
     virtual void NotifyHttpSuccessLater(boost::shared_ptr<BaseWebService::CachedHttpRequestSuccessMessage> cachedHttpMessage,
                                         Orthanc::IDynamicObject* payload, // takes ownership
-                                        OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback) = 0;
+                                        MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback) = 0;
 
   private:
     void NotifyHttpSuccess(const IWebService::HttpRequestSuccessMessage& message);
--- a/Framework/Deprecated/Toolbox/IDelayedCallExecutor.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Framework/Deprecated/Toolbox/IDelayedCallExecutor.h	Sat Dec 07 18:18:07 2019 +0100
@@ -21,6 +21,7 @@
 
 #pragma once
 
+#include "IWebService.h"
 #include "../../Messages/IObserver.h"
 #include "../../Messages/ICallable.h"
 
@@ -42,7 +43,7 @@
     {
     }
     
-    virtual void Schedule(OrthancStone::MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback,
+    virtual void Schedule(MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback,
                           unsigned int timeoutInMs = 1000) = 0;
   };
 }
--- a/Framework/Deprecated/Toolbox/IWebService.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Framework/Deprecated/Toolbox/IWebService.h	Sat Dec 07 18:18:07 2019 +0100
@@ -33,6 +33,53 @@
 
 namespace Deprecated
 {
+  template <typename TMessage>
+  class MessageHandler : public OrthancStone::ICallable
+  {
+  };
+
+
+  template <typename TObserver,
+            typename TMessage>
+  class DeprecatedCallable : public MessageHandler<TMessage>
+  {
+  private:
+    typedef void (TObserver::* MemberMethod) (const TMessage&);
+
+    boost::weak_ptr<OrthancStone::IObserver>  observer_;
+    MemberMethod                function_;
+
+  public:
+    DeprecatedCallable(boost::shared_ptr<TObserver> observer,
+                       MemberMethod function) :
+      observer_(observer),
+      function_(function)
+    {
+    }
+
+    virtual void Apply(const OrthancStone::IMessage& message)
+    {
+      boost::shared_ptr<OrthancStone::IObserver> lock(observer_);
+      if (lock)
+      {
+        TObserver& observer = dynamic_cast<TObserver&>(*lock);
+        const TMessage& typedMessage = dynamic_cast<const TMessage&>(message);
+        (observer.*function_) (typedMessage);
+      }
+    }
+
+    virtual const OrthancStone::MessageIdentifier& GetMessageIdentifier()
+    {
+      return TMessage::GetStaticIdentifier();
+    }
+
+    virtual boost::weak_ptr<OrthancStone::IObserver> GetObserver() const
+    {
+      return observer_;
+    }
+  };
+
+
   // The IWebService performs HTTP requests.
   // Since applications can run in native or WASM environment and, since
   // in a WASM environment, the WebService is asynchronous, the IWebservice
@@ -144,23 +191,23 @@
     virtual void GetAsync(const std::string& uri,
                           const HttpHeaders& headers,
                           Orthanc::IDynamicObject* payload  /* takes ownership */,
-                          OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
-                          OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                          MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
+                          MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                           unsigned int timeoutInSeconds = 60) = 0;
 
     virtual void PostAsync(const std::string& uri,
                            const HttpHeaders& headers,
                            const std::string& body,
                            Orthanc::IDynamicObject* payload  /* takes ownership */,
-                           OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
-                           OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                           MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
+                           MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                            unsigned int timeoutInSeconds = 60) = 0;
 
     virtual void DeleteAsync(const std::string& uri,
                              const HttpHeaders& headers,
                              Orthanc::IDynamicObject* payload  /* takes ownership */,
-                             OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
-                             OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                             MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
+                             MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                              unsigned int timeoutInSeconds = 60) = 0;
   };
 }
--- a/Framework/Deprecated/Toolbox/OrthancApiClient.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Framework/Deprecated/Toolbox/OrthancApiClient.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -68,10 +68,10 @@
   class OrthancApiClient::WebServicePayload : public Orthanc::IDynamicObject
   {
   private:
-    std::auto_ptr< OrthancStone::MessageHandler<EmptyResponseReadyMessage> >             emptyHandler_;
-    std::auto_ptr< OrthancStone::MessageHandler<JsonResponseReadyMessage> >              jsonHandler_;
-    std::auto_ptr< OrthancStone::MessageHandler<BinaryResponseReadyMessage> >            binaryHandler_;
-    std::auto_ptr< OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage> >  failureHandler_;
+    std::auto_ptr< MessageHandler<EmptyResponseReadyMessage> >             emptyHandler_;
+    std::auto_ptr< MessageHandler<JsonResponseReadyMessage> >              jsonHandler_;
+    std::auto_ptr< MessageHandler<BinaryResponseReadyMessage> >            binaryHandler_;
+    std::auto_ptr< MessageHandler<IWebService::HttpRequestErrorMessage> >  failureHandler_;
     std::auto_ptr< Orthanc::IDynamicObject >                               userPayload_;
     void NotifyConversionError(const IWebService::HttpRequestSuccessMessage& message) const
     {
@@ -83,8 +83,8 @@
     }
     
   public:
-    WebServicePayload(OrthancStone::MessageHandler<EmptyResponseReadyMessage>* handler,
-                      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureHandler,
+    WebServicePayload(MessageHandler<EmptyResponseReadyMessage>* handler,
+                      MessageHandler<IWebService::HttpRequestErrorMessage>* failureHandler,
                       Orthanc::IDynamicObject* userPayload) :
       emptyHandler_(handler),
       failureHandler_(failureHandler),
@@ -97,8 +97,8 @@
       }
     }
 
-    WebServicePayload(OrthancStone::MessageHandler<BinaryResponseReadyMessage>* handler,
-                      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureHandler,
+    WebServicePayload(MessageHandler<BinaryResponseReadyMessage>* handler,
+                      MessageHandler<IWebService::HttpRequestErrorMessage>* failureHandler,
                       Orthanc::IDynamicObject* userPayload) :
       binaryHandler_(handler),
       failureHandler_(failureHandler),
@@ -110,8 +110,8 @@
       }
     }
 
-    WebServicePayload(OrthancStone::MessageHandler<JsonResponseReadyMessage>* handler,
-                      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureHandler,
+    WebServicePayload(MessageHandler<JsonResponseReadyMessage>* handler,
+                      MessageHandler<IWebService::HttpRequestErrorMessage>* failureHandler,
                       Orthanc::IDynamicObject* userPayload) :
       jsonHandler_(handler),
       failureHandler_(failureHandler),
@@ -176,17 +176,17 @@
 
   void OrthancApiClient::GetJsonAsync(
       const std::string& uri,
-      OrthancStone::MessageHandler<JsonResponseReadyMessage>* successCallback,
-      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
+      MessageHandler<JsonResponseReadyMessage>* successCallback,
+      MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
       Orthanc::IDynamicObject* payload)
   {
     IWebService::HttpHeaders emptyHeaders;
     web_.GetAsync(baseUrl_ + uri,
                   emptyHeaders,
                   new WebServicePayload(successCallback, failureCallback, payload),
-                  new OrthancStone::Callable<OrthancApiClient, IWebService::HttpRequestSuccessMessage>
+                  new DeprecatedCallable<OrthancApiClient, IWebService::HttpRequestSuccessMessage>
                   (GetSharedObserver(), &OrthancApiClient::NotifyHttpSuccess),
-                  new OrthancStone::Callable<OrthancApiClient, IWebService::HttpRequestErrorMessage>
+                  new DeprecatedCallable<OrthancApiClient, IWebService::HttpRequestErrorMessage>
                   (GetSharedObserver(), &OrthancApiClient::NotifyHttpError));
   }
 
@@ -194,8 +194,8 @@
   void OrthancApiClient::GetBinaryAsync(
       const std::string& uri,
       const std::string& contentType,
-      OrthancStone::MessageHandler<BinaryResponseReadyMessage>* successCallback,
-      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
+      MessageHandler<BinaryResponseReadyMessage>* successCallback,
+      MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
       Orthanc::IDynamicObject* payload)
   {
     IWebService::HttpHeaders headers;
@@ -206,17 +206,17 @@
   void OrthancApiClient::GetBinaryAsync(
       const std::string& uri,
       const IWebService::HttpHeaders& headers,
-      OrthancStone::MessageHandler<BinaryResponseReadyMessage>* successCallback,
-      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
+      MessageHandler<BinaryResponseReadyMessage>* successCallback,
+      MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
       Orthanc::IDynamicObject* payload)
   {
     // printf("GET [%s] [%s]\n", baseUrl_.c_str(), uri.c_str());
 
     web_.GetAsync(baseUrl_ + uri, headers,
                   new WebServicePayload(successCallback, failureCallback, payload),
-                  new OrthancStone::Callable<OrthancApiClient, IWebService::HttpRequestSuccessMessage>
+                  new DeprecatedCallable<OrthancApiClient, IWebService::HttpRequestSuccessMessage>
                   (GetSharedObserver(), &OrthancApiClient::NotifyHttpSuccess),
-                  new OrthancStone::Callable<OrthancApiClient, IWebService::HttpRequestErrorMessage>
+                  new DeprecatedCallable<OrthancApiClient, IWebService::HttpRequestErrorMessage>
                   (GetSharedObserver(), &OrthancApiClient::NotifyHttpError));
   }
 
@@ -224,15 +224,15 @@
   void OrthancApiClient::PostBinaryAsyncExpectJson(
       const std::string& uri,
       const std::string& body,
-      OrthancStone::MessageHandler<JsonResponseReadyMessage>* successCallback,
-      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
+      MessageHandler<JsonResponseReadyMessage>* successCallback,
+      MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
       Orthanc::IDynamicObject* payload)
   {
     web_.PostAsync(baseUrl_ + uri, IWebService::HttpHeaders(), body,
                    new WebServicePayload(successCallback, failureCallback, payload),
-                   new OrthancStone::Callable<OrthancApiClient, IWebService::HttpRequestSuccessMessage>
+                   new DeprecatedCallable<OrthancApiClient, IWebService::HttpRequestSuccessMessage>
                    (GetSharedObserver(), &OrthancApiClient::NotifyHttpSuccess),
-                   new OrthancStone::Callable<OrthancApiClient, IWebService::HttpRequestErrorMessage>
+                   new DeprecatedCallable<OrthancApiClient, IWebService::HttpRequestErrorMessage>
                    (GetSharedObserver(), &OrthancApiClient::NotifyHttpError));
 
   }
@@ -247,23 +247,23 @@
   void OrthancApiClient::PostBinaryAsync(
       const std::string& uri,
       const std::string& body,
-      OrthancStone::MessageHandler<EmptyResponseReadyMessage>* successCallback,
-      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
+      MessageHandler<EmptyResponseReadyMessage>* successCallback,
+      MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
       Orthanc::IDynamicObject* payload   /* takes ownership */)
   {
     web_.PostAsync(baseUrl_ + uri, IWebService::HttpHeaders(), body,
                    new WebServicePayload(successCallback, failureCallback, payload),
-                   new OrthancStone::Callable<OrthancApiClient, IWebService::HttpRequestSuccessMessage>
+                   new DeprecatedCallable<OrthancApiClient, IWebService::HttpRequestSuccessMessage>
                    (GetSharedObserver(), &OrthancApiClient::NotifyHttpSuccess),
-                   new OrthancStone::Callable<OrthancApiClient, IWebService::HttpRequestErrorMessage>
+                   new DeprecatedCallable<OrthancApiClient, IWebService::HttpRequestErrorMessage>
                    (GetSharedObserver(), &OrthancApiClient::NotifyHttpError));
   }
 
   void OrthancApiClient::PostJsonAsyncExpectJson(
       const std::string& uri,
       const Json::Value& data,
-      OrthancStone::MessageHandler<JsonResponseReadyMessage>* successCallback,
-      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
+      MessageHandler<JsonResponseReadyMessage>* successCallback,
+      MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
       Orthanc::IDynamicObject* payload)
   {
     std::string body;
@@ -283,8 +283,8 @@
   void OrthancApiClient::PostJsonAsync(
       const std::string& uri,
       const Json::Value& data,
-      OrthancStone::MessageHandler<EmptyResponseReadyMessage>* successCallback,
-      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
+      MessageHandler<EmptyResponseReadyMessage>* successCallback,
+      MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
       Orthanc::IDynamicObject* payload   /* takes ownership */)
   {
     std::string body;
@@ -294,15 +294,15 @@
 
   void OrthancApiClient::DeleteAsync(
       const std::string& uri,
-      OrthancStone::MessageHandler<EmptyResponseReadyMessage>* successCallback,
-      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
+      MessageHandler<EmptyResponseReadyMessage>* successCallback,
+      MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
       Orthanc::IDynamicObject* payload)
   {
     web_.DeleteAsync(baseUrl_ + uri, IWebService::HttpHeaders(),
                      new WebServicePayload(successCallback, failureCallback, payload),
-                     new OrthancStone::Callable<OrthancApiClient, IWebService::HttpRequestSuccessMessage>
+                     new DeprecatedCallable<OrthancApiClient, IWebService::HttpRequestSuccessMessage>
                      (GetSharedObserver(), &OrthancApiClient::NotifyHttpSuccess),
-                     new OrthancStone::Callable<OrthancApiClient, IWebService::HttpRequestErrorMessage>
+                     new DeprecatedCallable<OrthancApiClient, IWebService::HttpRequestErrorMessage>
                      (GetSharedObserver(), &OrthancApiClient::NotifyHttpError));
   }
 
--- a/Framework/Deprecated/Toolbox/OrthancApiClient.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Framework/Deprecated/Toolbox/OrthancApiClient.h	Sat Dec 07 18:18:07 2019 +0100
@@ -168,36 +168,36 @@
 
     // schedule a GET request expecting a JSON response.
     void GetJsonAsync(const std::string& uri,
-                      OrthancStone::MessageHandler<JsonResponseReadyMessage>* successCallback,
-                      OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                      MessageHandler<JsonResponseReadyMessage>* successCallback,
+                      MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                       Orthanc::IDynamicObject* payload = NULL   /* takes ownership */);
 
     // schedule a GET request expecting a binary response.
     void GetBinaryAsync(const std::string& uri,
                         const std::string& contentType,
-                        OrthancStone::MessageHandler<BinaryResponseReadyMessage>* successCallback,
-                        OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                        MessageHandler<BinaryResponseReadyMessage>* successCallback,
+                        MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                         Orthanc::IDynamicObject* payload = NULL   /* takes ownership */);
 
     // schedule a GET request expecting a binary response.
     void GetBinaryAsync(const std::string& uri,
                         const IWebService::HttpHeaders& headers,
-                        OrthancStone::MessageHandler<BinaryResponseReadyMessage>* successCallback,
-                        OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                        MessageHandler<BinaryResponseReadyMessage>* successCallback,
+                        MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                         Orthanc::IDynamicObject* payload = NULL   /* takes ownership */);
 
     // schedule a POST request expecting a JSON response.
     void PostBinaryAsyncExpectJson(const std::string& uri,
                                    const std::string& body,
-                                   OrthancStone::MessageHandler<JsonResponseReadyMessage>* successCallback,
-                                   OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                                   MessageHandler<JsonResponseReadyMessage>* successCallback,
+                                   MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                                    Orthanc::IDynamicObject* payload = NULL   /* takes ownership */);
 
     // schedule a POST request expecting a JSON response.
     void PostJsonAsyncExpectJson(const std::string& uri,
                                  const Json::Value& data,
-                                 OrthancStone::MessageHandler<JsonResponseReadyMessage>* successCallback,
-                                 OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                                 MessageHandler<JsonResponseReadyMessage>* successCallback,
+                                 MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                                  Orthanc::IDynamicObject* payload = NULL   /* takes ownership */);
 
     // schedule a POST request and don't mind the response.
@@ -207,8 +207,8 @@
     // schedule a POST request and don't expect any response.
     void PostJsonAsync(const std::string& uri,
                        const Json::Value& data,
-                       OrthancStone::MessageHandler<EmptyResponseReadyMessage>* successCallback,
-                       OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                       MessageHandler<EmptyResponseReadyMessage>* successCallback,
+                       MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                        Orthanc::IDynamicObject* payload = NULL   /* takes ownership */);
 
 
@@ -219,14 +219,14 @@
     // schedule a POST request and don't expect any response.
     void PostBinaryAsync(const std::string& uri,
                          const std::string& body,
-                         OrthancStone::MessageHandler<EmptyResponseReadyMessage>* successCallback,
-                         OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                         MessageHandler<EmptyResponseReadyMessage>* successCallback,
+                         MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                          Orthanc::IDynamicObject* payload = NULL   /* takes ownership */);
 
     // schedule a DELETE request expecting an empty response.
     void DeleteAsync(const std::string& uri,
-                     OrthancStone::MessageHandler<EmptyResponseReadyMessage>* successCallback,
-                     OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                     MessageHandler<EmptyResponseReadyMessage>* successCallback,
+                     MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                      Orthanc::IDynamicObject* payload = NULL   /* takes ownership */);
 
     void NotifyHttpSuccess(const IWebService::HttpRequestSuccessMessage& message);
--- a/Framework/Deprecated/Toolbox/OrthancSlicesLoader.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Framework/Deprecated/Toolbox/OrthancSlicesLoader.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -656,8 +656,8 @@
     {
       state_ = State_LoadingGeometry;
       orthanc_->GetJsonAsync("/series/" + seriesId + "/instances-tags",
-                             new OrthancStone::Callable<OrthancSlicesLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &OrthancSlicesLoader::ParseSeriesGeometry),
-                             new OrthancStone::Callable<OrthancSlicesLoader, IWebService::HttpRequestErrorMessage>(GetSharedObserver(), &OrthancSlicesLoader::OnGeometryError),
+                             new DeprecatedCallable<OrthancSlicesLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &OrthancSlicesLoader::ParseSeriesGeometry),
+                             new DeprecatedCallable<OrthancSlicesLoader, IWebService::HttpRequestErrorMessage>(GetSharedObserver(), &OrthancSlicesLoader::OnGeometryError),
                              NULL);
     }
   }
@@ -675,8 +675,8 @@
       // Tag "3004-000c" is "Grid Frame Offset Vector", which is
       // mandatory to read RT DOSE, but is too long to be returned by default
       orthanc_->GetJsonAsync("/instances/" + instanceId + "/tags?ignore-length=3004-000c",
-                             new OrthancStone::Callable<OrthancSlicesLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &OrthancSlicesLoader::ParseInstanceGeometry),
-                             new OrthancStone::Callable<OrthancSlicesLoader, IWebService::HttpRequestErrorMessage>(GetSharedObserver(), &OrthancSlicesLoader::OnGeometryError),
+                             new DeprecatedCallable<OrthancSlicesLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &OrthancSlicesLoader::ParseInstanceGeometry),
+                             new DeprecatedCallable<OrthancSlicesLoader, IWebService::HttpRequestErrorMessage>(GetSharedObserver(), &OrthancSlicesLoader::OnGeometryError),
                              Operation::DownloadInstanceGeometry(instanceId));
     }
   }
@@ -694,8 +694,8 @@
       state_ = State_LoadingGeometry;
 
       orthanc_->GetJsonAsync("/instances/" + instanceId + "/tags",
-                             new OrthancStone::Callable<OrthancSlicesLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &OrthancSlicesLoader::ParseFrameGeometry),
-                             new OrthancStone::Callable<OrthancSlicesLoader, IWebService::HttpRequestErrorMessage>(GetSharedObserver(), &OrthancSlicesLoader::OnGeometryError),
+                             new DeprecatedCallable<OrthancSlicesLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &OrthancSlicesLoader::ParseFrameGeometry),
+                             new DeprecatedCallable<OrthancSlicesLoader, IWebService::HttpRequestErrorMessage>(GetSharedObserver(), &OrthancSlicesLoader::OnGeometryError),
                              Operation::DownloadFrameGeometry(instanceId, frame));
     }
   }
@@ -768,10 +768,10 @@
     }
     
     orthanc_->GetBinaryAsync(uri, "image/png",
-                             new OrthancStone::Callable<OrthancSlicesLoader, 
+                             new DeprecatedCallable<OrthancSlicesLoader, 
                              OrthancApiClient::BinaryResponseReadyMessage>
                              (GetSharedObserver(), &OrthancSlicesLoader::ParseSliceImagePng),
-                             new OrthancStone::Callable<OrthancSlicesLoader, 
+                             new DeprecatedCallable<OrthancSlicesLoader, 
                              IWebService::HttpRequestErrorMessage>
                              (GetSharedObserver(), &OrthancSlicesLoader::OnSliceImageError),
                              Operation::DownloadSliceImage(
@@ -804,10 +804,10 @@
     }
 
     orthanc_->GetBinaryAsync(uri, "image/x-portable-arbitrarymap",
-                             new OrthancStone::Callable<OrthancSlicesLoader, 
+                             new DeprecatedCallable<OrthancSlicesLoader, 
                              OrthancApiClient::BinaryResponseReadyMessage>
                              (GetSharedObserver(), &OrthancSlicesLoader::ParseSliceImagePam),
-                             new OrthancStone::Callable<OrthancSlicesLoader, 
+                             new DeprecatedCallable<OrthancSlicesLoader, 
                              IWebService::HttpRequestErrorMessage>
                              (GetSharedObserver(), &OrthancSlicesLoader::OnSliceImageError),
                              Operation::DownloadSliceImage(static_cast<unsigned int>(index), 
@@ -847,10 +847,10 @@
                        boost::lexical_cast<std::string>(slice.GetFrame()));
 
     orthanc_->GetJsonAsync(uri,
-                           new OrthancStone::Callable<OrthancSlicesLoader, 
+                           new DeprecatedCallable<OrthancSlicesLoader, 
                            OrthancApiClient::JsonResponseReadyMessage>
                            (GetSharedObserver(), &OrthancSlicesLoader::ParseSliceImageJpeg),
-                           new OrthancStone::Callable<OrthancSlicesLoader, 
+                           new DeprecatedCallable<OrthancSlicesLoader, 
                            IWebService::HttpRequestErrorMessage>
                            (GetSharedObserver(), &OrthancSlicesLoader::OnSliceImageError),
                            Operation::DownloadSliceImage(
@@ -888,10 +888,10 @@
       std::string uri = ("/instances/" + slice.GetOrthancInstanceId() + "/frames/" +
                          boost::lexical_cast<std::string>(slice.GetFrame()) + "/raw.gz");
       orthanc_->GetBinaryAsync(uri, IWebService::HttpHeaders(),
-                               new OrthancStone::Callable<OrthancSlicesLoader, 
+                               new DeprecatedCallable<OrthancSlicesLoader, 
                                OrthancApiClient::BinaryResponseReadyMessage>
                                (GetSharedObserver(), &OrthancSlicesLoader::ParseSliceRawImage),
-                               new OrthancStone::Callable<OrthancSlicesLoader,
+                               new DeprecatedCallable<OrthancSlicesLoader,
                                IWebService::HttpRequestErrorMessage>
                                (GetSharedObserver(), &OrthancSlicesLoader::OnSliceImageError),
                                Operation::DownloadSliceRawImage(
--- a/Framework/Deprecated/Volumes/StructureSetLoader.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Framework/Deprecated/Volumes/StructureSetLoader.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -57,7 +57,7 @@
          it != instances.end(); ++it)
     {
       orthanc_.PostBinaryAsyncExpectJson("/tools/lookup", *it,
-                                         new OrthancStone::Callable<StructureSetLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &StructureSetLoader::OnLookupCompleted));
+                                         new DeprecatedCallable<StructureSetLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &StructureSetLoader::OnLookupCompleted));
     }
 
     BroadcastMessage(GeometryReadyMessage(*this));
@@ -81,7 +81,7 @@
 
     const std::string& instance = lookup[0]["ID"].asString();
     orthanc_.GetJsonAsync("/instances/" + instance + "/tags",
-                          new OrthancStone::Callable<StructureSetLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &StructureSetLoader::OnReferencedSliceLoaded));
+                          new DeprecatedCallable<StructureSetLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &StructureSetLoader::OnReferencedSliceLoaded));
   }
 
   
@@ -94,7 +94,7 @@
     else
     {
       orthanc_.GetJsonAsync("/instances/" + instance + "/tags?ignore-length=3006-0050",
-                            new OrthancStone::Callable<StructureSetLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &StructureSetLoader::OnStructureSetLoaded));
+                            new DeprecatedCallable<StructureSetLoader, OrthancApiClient::JsonResponseReadyMessage>(GetSharedObserver(), &StructureSetLoader::OnStructureSetLoaded));
     }
   }
 
--- a/Framework/Messages/ICallable.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Framework/Messages/ICallable.h	Sat Dec 07 18:18:07 2019 +0100
@@ -52,16 +52,9 @@
   };
 
 
-  // TODO - Remove this class
-  template <typename TMessage>
-  class MessageHandler : public ICallable
-  {
-  };
-
-
   template <typename TObserver,
             typename TMessage>
-  class Callable : public MessageHandler<TMessage>
+  class Callable : public ICallable
   {
   private:
     typedef void (TObserver::* MemberMethod) (const TMessage&);
--- a/Framework/Radiography/RadiographyScene.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Framework/Radiography/RadiographyScene.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -425,7 +425,7 @@
 
       orthanc.GetBinaryAsync(
             uri, headers,
-            new Callable<RadiographyScene, Deprecated::OrthancApiClient::BinaryResponseReadyMessage>
+            new Deprecated::DeprecatedCallable<RadiographyScene, Deprecated::OrthancApiClient::BinaryResponseReadyMessage>
             (GetSharedObserver(), &RadiographyScene::OnTagsReceived), NULL,
             new Orthanc::SingleValueObject<size_t>(layer.GetIndex()));
     }
@@ -444,7 +444,7 @@
 
       orthanc.GetBinaryAsync(
             uri, headers,
-            new Callable<RadiographyScene, Deprecated::OrthancApiClient::BinaryResponseReadyMessage>
+            new Deprecated::DeprecatedCallable<RadiographyScene, Deprecated::OrthancApiClient::BinaryResponseReadyMessage>
             (GetSharedObserver(), &RadiographyScene::OnFrameReceived), NULL,
             new Orthanc::SingleValueObject<size_t>(layer.GetIndex()));
     }
@@ -784,7 +784,7 @@
 
     orthanc.PostJsonAsyncExpectJson(
           "/tools/create-dicom", createDicomRequestContent,
-          new Callable<RadiographyScene, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
+          new Deprecated::DeprecatedCallable<RadiographyScene, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
           (GetSharedObserver(), &RadiographyScene::OnDicomExported),
           NULL, NULL);
 
--- a/Platforms/Generic/DelayedCallCommand.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/DelayedCallCommand.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -26,7 +26,7 @@
 
 namespace Deprecated
 {
-  DelayedCallCommand::DelayedCallCommand(OrthancStone::MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback,  // takes ownership
+  DelayedCallCommand::DelayedCallCommand(MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback,  // takes ownership
                                          unsigned int timeoutInMs,
                                          Orthanc::IDynamicObject* payload /* takes ownership */,
                                          OrthancStone::NativeStoneApplicationContext& context
--- a/Platforms/Generic/DelayedCallCommand.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/DelayedCallCommand.h	Sat Dec 07 18:18:07 2019 +0100
@@ -35,14 +35,14 @@
   class DelayedCallCommand : public IOracleCommand, OrthancStone::IObservable
   {
   protected:
-    std::auto_ptr<OrthancStone::MessageHandler<IDelayedCallExecutor::TimeoutMessage> >  callback_;
+    std::auto_ptr<MessageHandler<IDelayedCallExecutor::TimeoutMessage> >  callback_;
     std::auto_ptr<Orthanc::IDynamicObject>  payload_;
     OrthancStone::NativeStoneApplicationContext&          context_;
     boost::posix_time::ptime                expirationTimePoint_;
     unsigned int                            timeoutInMs_;
 
   public:
-    DelayedCallCommand(OrthancStone::MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback,  // takes ownership
+    DelayedCallCommand(MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback,  // takes ownership
                        unsigned int timeoutInMs,
                        Orthanc::IDynamicObject* payload /* takes ownership */,
                        OrthancStone::NativeStoneApplicationContext& context
--- a/Platforms/Generic/OracleDelayedCallExecutor.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/OracleDelayedCallExecutor.h	Sat Dec 07 18:18:07 2019 +0100
@@ -43,7 +43,7 @@
     {
     }
 
-    virtual void Schedule(OrthancStone::MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback,
+    virtual void Schedule(MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback,
                           unsigned int timeoutInMs = 1000)
     {
       oracle_.Submit(new DelayedCallCommand(callback, timeoutInMs, NULL, context_));
--- a/Platforms/Generic/OracleWebService.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/OracleWebService.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -29,13 +29,13 @@
   class OracleWebService::WebServiceCachedGetCommand : public IOracleCommand, OrthancStone::IObservable
   {
   protected:
-    std::auto_ptr<OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage> >  successCallback_;
+    std::auto_ptr<MessageHandler<IWebService::HttpRequestSuccessMessage> >  successCallback_;
     std::auto_ptr<Orthanc::IDynamicObject>                                  payload_;
     boost::shared_ptr<BaseWebService::CachedHttpRequestSuccessMessage>      cachedMessage_;
     OrthancStone::NativeStoneApplicationContext&                                          context_;
 
   public:
-    WebServiceCachedGetCommand(OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
+    WebServiceCachedGetCommand(MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
                                boost::shared_ptr<BaseWebService::CachedHttpRequestSuccessMessage> cachedMessage,
                                Orthanc::IDynamicObject* payload /* takes ownership */,
                                OrthancStone::NativeStoneApplicationContext& context
@@ -71,7 +71,7 @@
 
   void OracleWebService::NotifyHttpSuccessLater(boost::shared_ptr<BaseWebService::CachedHttpRequestSuccessMessage> cachedMessage,
                                                 Orthanc::IDynamicObject* payload, // takes ownership
-                                                OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback)
+                                                MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback)
   {
     oracle_.Submit(new WebServiceCachedGetCommand(successCallback, cachedMessage, payload, context_));
   }
--- a/Platforms/Generic/OracleWebService.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/OracleWebService.h	Sat Dec 07 18:18:07 2019 +0100
@@ -56,8 +56,8 @@
                            const HttpHeaders& headers,
                            const std::string& body,
                            Orthanc::IDynamicObject* payload, // takes ownership
-                           OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback, // takes ownership
-                           OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL, // takes ownership
+                           MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback, // takes ownership
+                           MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL, // takes ownership
                            unsigned int timeoutInSeconds = 60)
     {
       oracle_.Submit(new WebServicePostCommand(successCallback, failureCallback, parameters_, uri, headers, timeoutInSeconds, body, payload, context_));
@@ -66,8 +66,8 @@
     virtual void DeleteAsync(const std::string& uri,
                              const HttpHeaders& headers,
                              Orthanc::IDynamicObject* payload,
-                             OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
-                             OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
+                             MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
+                             MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
                              unsigned int timeoutInSeconds = 60)
     {
       oracle_.Submit(new WebServiceDeleteCommand(successCallback, failureCallback, parameters_, uri, headers, timeoutInSeconds, payload, context_));
@@ -77,8 +77,8 @@
     virtual void GetAsyncInternal(const std::string& uri,
                                   const HttpHeaders& headers,
                                   Orthanc::IDynamicObject* payload, // takes ownership
-                                  OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,   // takes ownership
-                                  OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,// takes ownership
+                                  MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,   // takes ownership
+                                  MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,// takes ownership
                                   unsigned int timeoutInSeconds = 60)
     {
       oracle_.Submit(new WebServiceGetCommand(successCallback, failureCallback, parameters_, uri, headers, timeoutInSeconds, payload, context_));
@@ -86,7 +86,7 @@
 
     virtual void NotifyHttpSuccessLater(boost::shared_ptr<BaseWebService::CachedHttpRequestSuccessMessage> cachedHttpMessage,
                                         Orthanc::IDynamicObject* payload, // takes ownership
-                                        OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback);
+                                        MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback);
 
   };
 }
--- a/Platforms/Generic/WebServiceCommandBase.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/WebServiceCommandBase.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -25,8 +25,8 @@
 
 namespace Deprecated
 {
-  WebServiceCommandBase::WebServiceCommandBase(OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
-                                               OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
+  WebServiceCommandBase::WebServiceCommandBase(MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
+                                               MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,
                                                const Orthanc::WebServiceParameters& parameters,
                                                const std::string& url,
                                                const IWebService::HttpHeaders& headers,
--- a/Platforms/Generic/WebServiceCommandBase.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/WebServiceCommandBase.h	Sat Dec 07 18:18:07 2019 +0100
@@ -37,8 +37,8 @@
   class WebServiceCommandBase : public IOracleCommand, OrthancStone::IObservable
   {
   protected:
-    std::auto_ptr<OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage> >  successCallback_;
-    std::auto_ptr<OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage> >    failureCallback_;
+    std::auto_ptr<MessageHandler<IWebService::HttpRequestSuccessMessage> >  successCallback_;
+    std::auto_ptr<MessageHandler<IWebService::HttpRequestErrorMessage> >    failureCallback_;
     Orthanc::WebServiceParameters           parameters_;
     std::string                             url_;
     IWebService::HttpHeaders                headers_;
@@ -51,8 +51,8 @@
     unsigned int                            timeoutInSeconds_;
 
   public:
-    WebServiceCommandBase(OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
-                          OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
+    WebServiceCommandBase(MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
+                          MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
                           const Orthanc::WebServiceParameters& parameters,
                           const std::string& url,
                           const IWebService::HttpHeaders& headers,
--- a/Platforms/Generic/WebServiceDeleteCommand.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/WebServiceDeleteCommand.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -25,8 +25,8 @@
 
 namespace Deprecated
 {
-  WebServiceDeleteCommand::WebServiceDeleteCommand(OrthancStone::MessageHandler<Deprecated::IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
-                                                   OrthancStone::MessageHandler<Deprecated::IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
+  WebServiceDeleteCommand::WebServiceDeleteCommand(MessageHandler<Deprecated::IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
+                                                   MessageHandler<Deprecated::IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
                                                    const Orthanc::WebServiceParameters& parameters,
                                                    const std::string& url,
                                                    const Deprecated::IWebService::HttpHeaders& headers,
--- a/Platforms/Generic/WebServiceDeleteCommand.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/WebServiceDeleteCommand.h	Sat Dec 07 18:18:07 2019 +0100
@@ -28,8 +28,8 @@
   class WebServiceDeleteCommand : public WebServiceCommandBase
   {
   public:
-    WebServiceDeleteCommand(OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
-                            OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
+    WebServiceDeleteCommand(MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
+                            MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
                             const Orthanc::WebServiceParameters& parameters,
                             const std::string& url,
                             const IWebService::HttpHeaders& headers,
--- a/Platforms/Generic/WebServiceGetCommand.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/WebServiceGetCommand.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -25,8 +25,8 @@
 
 namespace Deprecated
 {
-  WebServiceGetCommand::WebServiceGetCommand(OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
-                                             OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
+  WebServiceGetCommand::WebServiceGetCommand(MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
+                                             MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
                                              const Orthanc::WebServiceParameters& parameters,
                                              const std::string& url,
                                              const IWebService::HttpHeaders& headers,
--- a/Platforms/Generic/WebServiceGetCommand.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/WebServiceGetCommand.h	Sat Dec 07 18:18:07 2019 +0100
@@ -28,8 +28,8 @@
   class WebServiceGetCommand : public WebServiceCommandBase
   {
   public:
-    WebServiceGetCommand(OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
-                         OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
+    WebServiceGetCommand(MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
+                         MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
                          const Orthanc::WebServiceParameters& parameters,
                          const std::string& url,
                          const IWebService::HttpHeaders& headers,
--- a/Platforms/Generic/WebServicePostCommand.cpp	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/WebServicePostCommand.cpp	Sat Dec 07 18:18:07 2019 +0100
@@ -25,8 +25,8 @@
 
 namespace Deprecated
 {
-  WebServicePostCommand::WebServicePostCommand(OrthancStone::MessageHandler<Deprecated::IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
-                                               OrthancStone::MessageHandler<Deprecated::IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
+  WebServicePostCommand::WebServicePostCommand(MessageHandler<Deprecated::IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
+                                               MessageHandler<Deprecated::IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
                                                const Orthanc::WebServiceParameters& parameters,
                                                const std::string& url,
                                                const Deprecated::IWebService::HttpHeaders& headers,
--- a/Platforms/Generic/WebServicePostCommand.h	Fri Dec 06 17:05:57 2019 +0100
+++ b/Platforms/Generic/WebServicePostCommand.h	Sat Dec 07 18:18:07 2019 +0100
@@ -31,8 +31,8 @@
     std::string  body_;
 
   public:
-    WebServicePostCommand(OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
-                          OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
+    WebServicePostCommand(MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,  // takes ownership
+                          MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback,  // takes ownership
                           const Orthanc::WebServiceParameters& parameters,
                           const std::string& url,
                           const IWebService::HttpHeaders& headers,