Mercurial > hg > orthanc
diff OrthancServer/ServerJobs/ArchiveJob.h @ 2976:cb5d75143da0
Asynchronous generation of ZIP archives and DICOM medias
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 06 Dec 2018 12:23:46 +0100 |
parents | 10c610e80b15 |
children | 4e43e67f8ecf |
line wrap: on
line diff
--- a/OrthancServer/ServerJobs/ArchiveJob.h Thu Dec 06 10:10:58 2018 +0100 +++ b/OrthancServer/ServerJobs/ArchiveJob.h Thu Dec 06 12:23:46 2018 +0100 @@ -51,6 +51,7 @@ class ZipWriterIterator; boost::shared_ptr<TemporaryFile> synchronousTarget_; + std::auto_ptr<TemporaryFile> asynchronousTarget_; ServerContext& context_; boost::shared_ptr<ArchiveIndex> archive_; bool isMedia_; @@ -61,18 +62,20 @@ size_t currentStep_; unsigned int instancesCount_; uint64_t uncompressedSize_; + std::string mediaArchiveId_; + void FinalizeTarget(); + public: ArchiveJob(ServerContext& context, bool isMedia, bool enableExtendedSopClass); - - void SetSynchronousTarget(boost::shared_ptr<TemporaryFile>& synchronousTarget); + + virtual ~ArchiveJob(); - void SetDescription(const std::string& description) - { - description_ = description; - } + void SetSynchronousTarget(boost::shared_ptr<TemporaryFile>& synchronousTarget); + + void SetDescription(const std::string& description); const std::string& GetDescription() const { @@ -101,5 +104,9 @@ { return false; // Cannot serialize this kind of job } + + virtual bool GetOutput(std::string& output, + MimeType& mime, + const std::string& key); }; }