Mercurial > hg > orthanc
annotate OrthancServer/Plugins/Samples/DelayedDeletion/LargeDeleteJob.h @ 5853:4d932683049d get-scu tip
very first implementation of C-Get SCU
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Tue, 29 Oct 2024 17:25:49 +0100 |
parents | f7adfb22e20e |
children |
rev | line source |
---|---|
5264
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
1 /** |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
5640
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5485
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5485
diff
changeset
|
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
5485
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5264
diff
changeset
|
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
5264
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
8 * |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
9 * This program is free software: you can redistribute it and/or |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
10 * modify it under the terms of the GNU General Public License as |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
11 * published by the Free Software Foundation, either version 3 of the |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
12 * License, or (at your option) any later version. |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
13 * |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
14 * This program is distributed in the hope that it will be useful, but |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
15 * WITHOUT ANY WARRANTY; without even the implied warranty of |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
17 * General Public License for more details. |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
18 * |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
19 * You should have received a copy of the GNU General Public License |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
21 **/ |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
22 |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
23 |
5024 | 24 #pragma once |
25 | |
26 #include "../Common/OrthancPluginCppWrapper.h" | |
27 #include "../../../../OrthancFramework/Sources/Enumerations.h" | |
28 #include "../../../../OrthancFramework/Sources/Compatibility.h" | |
29 | |
30 | |
31 class LargeDeleteJob : public OrthancPlugins::OrthancJob | |
32 { | |
33 private: | |
34 std::vector<std::string> resources_; | |
35 std::vector<Orthanc::ResourceType> levels_; | |
36 std::vector<std::string> instances_; | |
37 std::vector<std::string> series_; | |
38 size_t posResources_; | |
39 size_t posInstances_; | |
40 size_t posSeries_; | |
41 size_t posDelete_; | |
42 | |
43 void UpdateDeleteProgress(); | |
44 | |
45 void ScheduleChildrenResources(std::vector<std::string>& target, | |
46 const std::string& uri); | |
47 | |
48 void ScheduleResource(Orthanc::ResourceType level, | |
49 const std::string& id); | |
50 | |
51 void DeleteResource(Orthanc::ResourceType level, | |
52 const std::string& id); | |
53 | |
54 public: | |
55 LargeDeleteJob(const std::vector<std::string>& resources, | |
56 const std::vector<Orthanc::ResourceType>& levels); | |
57 | |
58 virtual OrthancPluginJobStepStatus Step() ORTHANC_OVERRIDE; | |
59 | |
60 virtual void Stop(OrthancPluginJobStopReason reason) ORTHANC_OVERRIDE | |
61 { | |
62 } | |
63 | |
64 virtual void Reset() ORTHANC_OVERRIDE; | |
65 | |
66 static void RestHandler(OrthancPluginRestOutput* output, | |
67 const char* url, | |
68 const OrthancPluginHttpRequest* request); | |
69 }; |