Mercurial > hg > orthanc
diff OrthancServer/Sources/ServerJobs/ArchiveJob.h @ 4674:cdab941fe17d
ZIP archive/media generated in synchronous mode are now streamed by default
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 03 Jun 2021 17:40:15 +0200 |
parents | b02dc8303cf6 |
children | f0038043fb97 4e765c18ace7 0a38000b086d |
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerJobs/ArchiveJob.h Wed Jun 02 18:01:17 2021 +0200 +++ b/OrthancServer/Sources/ServerJobs/ArchiveJob.h Thu Jun 03 17:40:15 2021 +0200 @@ -34,6 +34,7 @@ #pragma once #include "../../../OrthancFramework/Sources/Compatibility.h" +#include "../../../OrthancFramework/Sources/Compression/ZipWriter.h" #include "../../../OrthancFramework/Sources/JobsEngine/IJob.h" #include "../../../OrthancFramework/Sources/TemporaryFile.h" @@ -55,7 +56,7 @@ class ZipCommands; class ZipWriterIterator; - boost::shared_ptr<TemporaryFile> synchronousTarget_; + std::unique_ptr<ZipWriter::IOutputStream> synchronousTarget_; // Only valid before "Start()" std::unique_ptr<TemporaryFile> asynchronousTarget_; ServerContext& context_; boost::shared_ptr<ArchiveIndex> archive_; @@ -74,8 +75,6 @@ bool transcode_; DicomTransferSyntax transferSyntax_; - void RefreshArchiveSize(); - void FinalizeTarget(); public: @@ -84,8 +83,8 @@ bool enableExtendedSopClass); virtual ~ArchiveJob(); - - void SetSynchronousTarget(boost::shared_ptr<TemporaryFile>& synchronousTarget); + + void AcquireSynchronousTarget(ZipWriter::IOutputStream* synchronousTarget); void SetDescription(const std::string& description);