Mercurial > hg > orthanc-databases
annotate Framework/Plugins/IDatabaseBackendOutput.h @ 395:a7a029043670 db-protobuf
integration mainline->db-protobuf
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Apr 2023 14:53:57 +0200 |
parents | 3d6886f3e5b3 |
children | ecd0b719cff5 |
rev | line source |
---|---|
202 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
389
3d6886f3e5b3
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
3d6886f3e5b3
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
202 | 7 * |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU Affero General Public License | |
10 * as published by the Free Software Foundation, either version 3 of | |
11 * the License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * Affero General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU Affero General Public License | |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 **/ | |
21 | |
22 | |
23 #pragma once | |
24 | |
25 #include "../../Resources/Orthanc/Databases/DatabaseConstraint.h" | |
26 | |
203
2089d4071408
moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
202
diff
changeset
|
27 namespace OrthancDatabases |
202 | 28 { |
29 class IDatabaseBackendOutput : public boost::noncopyable | |
30 { | |
31 public: | |
232
4e15eace9b90
reorganization in DatabaseBackendAdapterV3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
206
diff
changeset
|
32 /** |
4e15eace9b90
reorganization in DatabaseBackendAdapterV3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
206
diff
changeset
|
33 * Contrarily to its parent "IDatabaseBackendOutput" class, the |
4e15eace9b90
reorganization in DatabaseBackendAdapterV3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
206
diff
changeset
|
34 * "IFactory" subclass *can* be invoked from multiple threads if |
4e15eace9b90
reorganization in DatabaseBackendAdapterV3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
206
diff
changeset
|
35 * used through "DatabaseBackendAdapterV3". Make sure to implement |
4e15eace9b90
reorganization in DatabaseBackendAdapterV3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
206
diff
changeset
|
36 * proper locking if need be. |
4e15eace9b90
reorganization in DatabaseBackendAdapterV3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
206
diff
changeset
|
37 **/ |
202 | 38 class IFactory : public boost::noncopyable |
39 { | |
40 public: | |
41 virtual ~IFactory() | |
42 { | |
43 } | |
44 | |
45 virtual IDatabaseBackendOutput* CreateOutput() = 0; | |
46 }; | |
47 | |
48 virtual ~IDatabaseBackendOutput() | |
49 { | |
50 } | |
51 | |
52 virtual void SignalDeletedAttachment(const std::string& uuid, | |
53 int32_t contentType, | |
54 uint64_t uncompressedSize, | |
55 const std::string& uncompressedHash, | |
56 int32_t compressionType, | |
57 uint64_t compressedSize, | |
58 const std::string& compressedHash) = 0; | |
59 | |
60 virtual void SignalDeletedResource(const std::string& publicId, | |
61 OrthancPluginResourceType resourceType) = 0; | |
62 | |
63 virtual void SignalRemainingAncestor(const std::string& ancestorId, | |
64 OrthancPluginResourceType ancestorType) = 0; | |
65 | |
66 virtual void AnswerAttachment(const std::string& uuid, | |
67 int32_t contentType, | |
68 uint64_t uncompressedSize, | |
69 const std::string& uncompressedHash, | |
70 int32_t compressionType, | |
71 uint64_t compressedSize, | |
72 const std::string& compressedHash) = 0; | |
73 | |
74 virtual void AnswerChange(int64_t seq, | |
75 int32_t changeType, | |
76 OrthancPluginResourceType resourceType, | |
77 const std::string& publicId, | |
78 const std::string& date) = 0; | |
79 | |
80 virtual void AnswerDicomTag(uint16_t group, | |
81 uint16_t element, | |
82 const std::string& value) = 0; | |
83 | |
84 virtual void AnswerExportedResource(int64_t seq, | |
85 OrthancPluginResourceType resourceType, | |
86 const std::string& publicId, | |
87 const std::string& modality, | |
88 const std::string& date, | |
89 const std::string& patientId, | |
90 const std::string& studyInstanceUid, | |
91 const std::string& seriesInstanceUid, | |
92 const std::string& sopInstanceUid) = 0; | |
206
6dcf57074dd4
starting OrthancPluginDatabaseBackendV3 wrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
203
diff
changeset
|
93 |
202 | 94 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 |
95 virtual void AnswerMatchingResource(const std::string& resourceId) = 0; | |
96 #endif | |
97 | |
98 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 | |
99 virtual void AnswerMatchingResource(const std::string& resourceId, | |
100 const std::string& someInstanceId) = 0; | |
101 #endif | |
102 }; | |
103 } |