Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
2970:eea66afed0db | 2976:cb5d75143da0 |
---|---|
49 class ResourceIdentifiers; | 49 class ResourceIdentifiers; |
50 class ZipCommands; | 50 class ZipCommands; |
51 class ZipWriterIterator; | 51 class ZipWriterIterator; |
52 | 52 |
53 boost::shared_ptr<TemporaryFile> synchronousTarget_; | 53 boost::shared_ptr<TemporaryFile> synchronousTarget_; |
54 std::auto_ptr<TemporaryFile> asynchronousTarget_; | |
54 ServerContext& context_; | 55 ServerContext& context_; |
55 boost::shared_ptr<ArchiveIndex> archive_; | 56 boost::shared_ptr<ArchiveIndex> archive_; |
56 bool isMedia_; | 57 bool isMedia_; |
57 bool enableExtendedSopClass_; | 58 bool enableExtendedSopClass_; |
58 std::string description_; | 59 std::string description_; |
59 | 60 |
60 boost::shared_ptr<ZipWriterIterator> writer_; | 61 boost::shared_ptr<ZipWriterIterator> writer_; |
61 size_t currentStep_; | 62 size_t currentStep_; |
62 unsigned int instancesCount_; | 63 unsigned int instancesCount_; |
63 uint64_t uncompressedSize_; | 64 uint64_t uncompressedSize_; |
65 std::string mediaArchiveId_; | |
64 | 66 |
67 void FinalizeTarget(); | |
68 | |
65 public: | 69 public: |
66 ArchiveJob(ServerContext& context, | 70 ArchiveJob(ServerContext& context, |
67 bool isMedia, | 71 bool isMedia, |
68 bool enableExtendedSopClass); | 72 bool enableExtendedSopClass); |
73 | |
74 virtual ~ArchiveJob(); | |
75 | |
76 void SetSynchronousTarget(boost::shared_ptr<TemporaryFile>& synchronousTarget); | |
69 | 77 |
70 void SetSynchronousTarget(boost::shared_ptr<TemporaryFile>& synchronousTarget); | 78 void SetDescription(const std::string& description); |
71 | |
72 void SetDescription(const std::string& description) | |
73 { | |
74 description_ = description; | |
75 } | |
76 | 79 |
77 const std::string& GetDescription() const | 80 const std::string& GetDescription() const |
78 { | 81 { |
79 return description_; | 82 return description_; |
80 } | 83 } |
99 | 102 |
100 virtual bool Serialize(Json::Value& value) | 103 virtual bool Serialize(Json::Value& value) |
101 { | 104 { |
102 return false; // Cannot serialize this kind of job | 105 return false; // Cannot serialize this kind of job |
103 } | 106 } |
107 | |
108 virtual bool GetOutput(std::string& output, | |
109 MimeType& mime, | |
110 const std::string& key); | |
104 }; | 111 }; |
105 } | 112 } |