diff OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp @ 4298:db3932f9660d

abi continued
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 05 Nov 2020 18:21:03 +0100
parents bf7b9edf6b81
children d9473bd5ed43
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp	Thu Nov 05 17:20:49 2020 +0100
+++ b/OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp	Thu Nov 05 18:21:03 2020 +0100
@@ -43,6 +43,34 @@
     file_.seekg(0, file_.beg);
   }
 
+  FilesystemHttpSender::FilesystemHttpSender(const std::string& path)
+  {
+    Initialize(path);
+  }
+
+  FilesystemHttpSender::FilesystemHttpSender(const boost::filesystem::path& path)
+  {
+    Initialize(path);
+  }
+
+  FilesystemHttpSender::FilesystemHttpSender(const std::string& path,
+                                             MimeType contentType)
+  {
+    SetContentType(contentType);
+    Initialize(path);
+  }
+
+  FilesystemHttpSender::FilesystemHttpSender(const FilesystemStorage& storage,
+                                             const std::string& uuid)
+  {
+    Initialize(storage.GetPath(uuid));
+  }
+
+  uint64_t FilesystemHttpSender::GetContentLength()
+  {
+    return size_;
+  }
+
 
   bool FilesystemHttpSender::ReadNextChunk()
   {
@@ -63,4 +91,14 @@
 
     return chunkSize_ > 0;
   }
+
+  const char *FilesystemHttpSender::GetChunkContent()
+  {
+    return chunk_.c_str();
+  }
+
+  size_t FilesystemHttpSender::GetChunkSize()
+  {
+    return chunkSize_;
+  }
 }