diff Core/FileStorage/StorageAccessor.cpp @ 232:5368bbe813cf

refactoring of attachments
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 30 Nov 2012 14:22:27 +0100
parents e7432706b354
children c11273198cef
line wrap: on
line diff
--- a/Core/FileStorage/StorageAccessor.cpp	Fri Nov 30 12:18:44 2012 +0100
+++ b/Core/FileStorage/StorageAccessor.cpp	Fri Nov 30 14:22:27 2012 +0100
@@ -34,27 +34,29 @@
 
 namespace Orthanc
 {
-  std::string StorageAccessor::Write(const std::vector<uint8_t>& content)
+  FileInfo StorageAccessor::Write(const std::vector<uint8_t>& content,
+                                  FileType type)
   {
     if (content.size() == 0)
     {
-      return WriteInternal(NULL, 0);
+      return WriteInternal(NULL, 0, type);
     }
     else
     {
-      return WriteInternal(&content[0], content.size());
+      return WriteInternal(&content[0], content.size(), type);
     }
   }
 
-  std::string StorageAccessor::Write(const std::string& content)
+  FileInfo StorageAccessor::Write(const std::string& content,
+                                  FileType type)
   {
     if (content.size() == 0)
     {
-      return WriteInternal(NULL, 0);
+      return WriteInternal(NULL, 0, type);
     }
     else
     {
-      return WriteInternal(&content[0], content.size());
+      return WriteInternal(&content[0], content.size(), type);
     }
   }
 }