diff Google/GoogleStoragePlugin.cpp @ 77:80792bb9600e

new HybridMode
author Alain Mazy <am@osimis.io>
date Fri, 14 Oct 2022 10:36:02 +0200
parents 16e419fe80c5
children d7295e8678d7
line wrap: on
line diff
--- a/Google/GoogleStoragePlugin.cpp	Tue Aug 30 14:59:58 2022 +0200
+++ b/Google/GoogleStoragePlugin.cpp	Fri Oct 14 10:36:02 2022 +0200
@@ -44,7 +44,7 @@
 
   virtual IWriter* GetWriterForObject(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled);
   virtual IReader* GetReaderForObject(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled);
-  virtual void DeleteObject(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled);
+  virtual bool DeleteObject(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled);
   virtual const char* GetConfigurationSectionName() {return PLUGIN_SECTION;}
 };
 
@@ -314,7 +314,7 @@
   return new Reader(bucketName_, paths, mainClient_);
 }
 
-void GoogleStoragePlugin::DeleteObject(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled)
+bool GoogleStoragePlugin::DeleteObject(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled)
 {
   gcs::Client client(mainClient_);
 
@@ -327,4 +327,5 @@
     throw StoragePluginException("GoogleCloudStorage: error while deleting file " + std::string(path) + ": " + deletionStatus.message());
   }
 
+  return false; // not 100% sure that the file has been deleted
 }