Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
4673:ac66afbdda58 | 4674:cdab941fe17d |
---|---|
32 | 32 |
33 | 33 |
34 #pragma once | 34 #pragma once |
35 | 35 |
36 #include "../../../OrthancFramework/Sources/Compatibility.h" | 36 #include "../../../OrthancFramework/Sources/Compatibility.h" |
37 #include "../../../OrthancFramework/Sources/Compression/ZipWriter.h" | |
37 #include "../../../OrthancFramework/Sources/JobsEngine/IJob.h" | 38 #include "../../../OrthancFramework/Sources/JobsEngine/IJob.h" |
38 #include "../../../OrthancFramework/Sources/TemporaryFile.h" | 39 #include "../../../OrthancFramework/Sources/TemporaryFile.h" |
39 | 40 |
40 #include <boost/shared_ptr.hpp> | 41 #include <boost/shared_ptr.hpp> |
41 #include <stdint.h> | 42 #include <stdint.h> |
53 class MediaIndexVisitor; | 54 class MediaIndexVisitor; |
54 class ResourceIdentifiers; | 55 class ResourceIdentifiers; |
55 class ZipCommands; | 56 class ZipCommands; |
56 class ZipWriterIterator; | 57 class ZipWriterIterator; |
57 | 58 |
58 boost::shared_ptr<TemporaryFile> synchronousTarget_; | 59 std::unique_ptr<ZipWriter::IOutputStream> synchronousTarget_; // Only valid before "Start()" |
59 std::unique_ptr<TemporaryFile> asynchronousTarget_; | 60 std::unique_ptr<TemporaryFile> asynchronousTarget_; |
60 ServerContext& context_; | 61 ServerContext& context_; |
61 boost::shared_ptr<ArchiveIndex> archive_; | 62 boost::shared_ptr<ArchiveIndex> archive_; |
62 bool isMedia_; | 63 bool isMedia_; |
63 bool enableExtendedSopClass_; | 64 bool enableExtendedSopClass_; |
72 | 73 |
73 // New in Orthanc 1.7.0 | 74 // New in Orthanc 1.7.0 |
74 bool transcode_; | 75 bool transcode_; |
75 DicomTransferSyntax transferSyntax_; | 76 DicomTransferSyntax transferSyntax_; |
76 | 77 |
77 void RefreshArchiveSize(); | |
78 | |
79 void FinalizeTarget(); | 78 void FinalizeTarget(); |
80 | 79 |
81 public: | 80 public: |
82 ArchiveJob(ServerContext& context, | 81 ArchiveJob(ServerContext& context, |
83 bool isMedia, | 82 bool isMedia, |
84 bool enableExtendedSopClass); | 83 bool enableExtendedSopClass); |
85 | 84 |
86 virtual ~ArchiveJob(); | 85 virtual ~ArchiveJob(); |
87 | 86 |
88 void SetSynchronousTarget(boost::shared_ptr<TemporaryFile>& synchronousTarget); | 87 void AcquireSynchronousTarget(ZipWriter::IOutputStream* synchronousTarget); |
89 | 88 |
90 void SetDescription(const std::string& description); | 89 void SetDescription(const std::string& description); |
91 | 90 |
92 const std::string& GetDescription() const | 91 const std::string& GetDescription() const |
93 { | 92 { |