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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 *
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * modify it under the terms of the GNU Affero General Public License
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * as published by the Free Software Foundation, either version 3 of
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * the License, or (at your option) any later version.
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 *
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * Affero General Public License for more details.
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 *
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * You should have received a copy of the GNU Affero General Public License
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 **/
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #pragma once
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #include "../../Resources/Orthanc/Databases/DatabaseConstraint.h"
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 {
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 class IDatabaseBackendOutput : public boost::noncopyable
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 {
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 class IFactory : public boost::noncopyable
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 {
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 public:
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 virtual ~IFactory()
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 {
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 }
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 virtual IDatabaseBackendOutput* CreateOutput() = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 };
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 virtual ~IDatabaseBackendOutput()
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 {
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 }
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 virtual void SignalDeletedAttachment(const std::string& uuid,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 int32_t contentType,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 uint64_t uncompressedSize,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 const std::string& uncompressedHash,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 int32_t compressionType,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 uint64_t compressedSize,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 const std::string& compressedHash) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 virtual void SignalDeletedResource(const std::string& publicId,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 OrthancPluginResourceType resourceType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 virtual void SignalRemainingAncestor(const std::string& ancestorId,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 OrthancPluginResourceType ancestorType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 virtual void AnswerAttachment(const std::string& uuid,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 int32_t contentType,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 uint64_t uncompressedSize,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 const std::string& uncompressedHash,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 int32_t compressionType,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 uint64_t compressedSize,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 const std::string& compressedHash) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 virtual void AnswerChange(int64_t seq,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 int32_t changeType,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 OrthancPluginResourceType resourceType,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 const std::string& publicId,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 const std::string& date) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 virtual void AnswerDicomTag(uint16_t group,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 uint16_t element,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 const std::string& value) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 virtual void AnswerExportedResource(int64_t seq,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 OrthancPluginResourceType resourceType,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 const std::string& publicId,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 const std::string& modality,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 const std::string& date,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 const std::string& patientId,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 const std::string& studyInstanceUid,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 const std::string& seriesInstanceUid,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 const std::string& sopInstanceUid) = 0;
206
6dcf57074dd4 starting OrthancPluginDatabaseBackendV3 wrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 203
diff changeset
93
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 virtual void AnswerMatchingResource(const std::string& resourceId) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 #endif
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 virtual void AnswerMatchingResource(const std::string& resourceId,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 const std::string& someInstanceId) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 #endif
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 };
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 }