diff Framework/Toolbox/OrthancApiClient.h @ 315:aad37d0b6407 am-2

Added LayerWidget::RemoveLayer + DELETE commands in WebService
author am@osimis.io
date Fri, 05 Oct 2018 10:38:16 +0200
parents 14ef1227120f
children c2e040ea8fbe
line wrap: on
line diff
--- a/Framework/Toolbox/OrthancApiClient.h	Wed Oct 03 17:14:17 2018 +0200
+++ b/Framework/Toolbox/OrthancApiClient.h	Fri Oct 05 10:38:16 2018 +0200
@@ -52,6 +52,20 @@
       }
     };
 
+    struct EmptyResponseReadyMessage : public BaseMessage<MessageType_OrthancApi_GenericEmptyResponse_Ready>
+    {
+      std::string   Uri;
+      Orthanc::IDynamicObject*  Payload;
+
+      EmptyResponseReadyMessage(const std::string& uri,
+                                Orthanc::IDynamicObject*  payload = NULL)
+        : BaseMessage(),
+          Uri(uri),
+          Payload(payload)
+      {
+      }
+    };
+
     struct HttpErrorMessage : public BaseMessage<MessageType_OrthancApi_GenericHttpError_Ready>
     {
       std::string   Uri;
@@ -142,5 +156,12 @@
                                  MessageHandler<HttpErrorMessage>* failureCallback = NULL,
                                  Orthanc::IDynamicObject* payload = NULL);
 
+    // schedule a DELETE request expecting an empty response.
+    void DeleteAsync(const std::string& uri,
+                     MessageHandler<EmptyResponseReadyMessage>* successCallback,
+                     MessageHandler<HttpErrorMessage>* failureCallback = NULL,
+                     Orthanc::IDynamicObject* payload = NULL);
+
+
   };
 }