Mercurial > hg > orthanc-databases
annotate Framework/Plugins/IDatabaseBackend.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 | d14e6ff04a5c |
children | 7b3acfa95bd8 |
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:
385
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
3d6886f3e5b3
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
385
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 | |
24 #pragma once | |
25 | |
26 #include "IDatabaseBackendOutput.h" | |
207
d9ef3f16e6a2
wrapping transactions in API v3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
203
diff
changeset
|
27 #include "../Common/DatabasesEnumerations.h" |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
28 #include "../Common/DatabaseManager.h" |
202 | 29 |
30 #include <list> | |
31 | |
203
2089d4071408
moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
202
diff
changeset
|
32 namespace OrthancDatabases |
202 | 33 { |
34 class IDatabaseBackend : public boost::noncopyable | |
35 { | |
36 public: | |
37 virtual ~IDatabaseBackend() | |
38 { | |
39 } | |
40 | |
41 virtual OrthancPluginContext* GetContext() = 0; | |
42 | |
255
d663d9e44f8d
reintroduction of IDatabaseFactory into DatabaseManager
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
237
diff
changeset
|
43 virtual IDatabaseFactory* CreateDatabaseFactory() = 0; |
226
a4918d57435c
DatabaseManager doesn't IDatabaseFactory anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
225
diff
changeset
|
44 |
a4918d57435c
DatabaseManager doesn't IDatabaseFactory anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
225
diff
changeset
|
45 // This function is invoked once, even if multiple connections are open |
237
35598014f140
refactoring to remove GlobalProperties.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
226
diff
changeset
|
46 virtual void ConfigureDatabase(DatabaseManager& database) = 0; |
224
61c309e06797
added internal class DatabaseBackendAdapterV2::Adapter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
47 |
202 | 48 virtual void SetOutputFactory(IDatabaseBackendOutput::IFactory* factory) = 0; |
49 | |
50 virtual IDatabaseBackendOutput* CreateOutput() = 0; | |
51 | |
260
793bbbe11287
IDatabaseBackend::HasRevisionsSupport()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
256
diff
changeset
|
52 virtual bool HasRevisionsSupport() const = 0; |
793bbbe11287
IDatabaseBackend::HasRevisionsSupport()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
256
diff
changeset
|
53 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
54 virtual void AddAttachment(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
55 int64_t id, |
261
34e2b93a7ac1
implementing interface for revisions in attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
260
diff
changeset
|
56 const OrthancPluginAttachment& attachment, |
34e2b93a7ac1
implementing interface for revisions in attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
260
diff
changeset
|
57 int64_t revision) = 0; |
202 | 58 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
59 virtual void AttachChild(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
60 int64_t parent, |
202 | 61 int64_t child) = 0; |
62 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
63 virtual void ClearChanges(DatabaseManager& manager) = 0; |
202 | 64 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
65 virtual void ClearExportedResources(DatabaseManager& manager) = 0; |
202 | 66 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
67 virtual int64_t CreateResource(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
68 const char* publicId, |
202 | 69 OrthancPluginResourceType type) = 0; |
70 | |
203
2089d4071408
moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
202
diff
changeset
|
71 virtual void DeleteAttachment(IDatabaseBackendOutput& output, |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
72 DatabaseManager& manager, |
202 | 73 int64_t id, |
74 int32_t attachment) = 0; | |
75 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
76 virtual void DeleteMetadata(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
77 int64_t id, |
202 | 78 int32_t metadataType) = 0; |
79 | |
203
2089d4071408
moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
202
diff
changeset
|
80 virtual void DeleteResource(IDatabaseBackendOutput& output, |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
81 DatabaseManager& manager, |
202 | 82 int64_t id) = 0; |
83 | |
84 virtual void GetAllInternalIds(std::list<int64_t>& target, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
85 DatabaseManager& manager, |
202 | 86 OrthancPluginResourceType resourceType) = 0; |
87 | |
88 virtual void GetAllPublicIds(std::list<std::string>& target, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
89 DatabaseManager& manager, |
202 | 90 OrthancPluginResourceType resourceType) = 0; |
91 | |
92 virtual void GetAllPublicIds(std::list<std::string>& target, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
93 DatabaseManager& manager, |
202 | 94 OrthancPluginResourceType resourceType, |
385
346fe629d638
clarifying types of since/limit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
378
diff
changeset
|
95 int64_t since, |
346fe629d638
clarifying types of since/limit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
378
diff
changeset
|
96 uint32_t limit) = 0; |
202 | 97 |
98 /* Use GetOutput().AnswerChange() */ | |
203
2089d4071408
moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
202
diff
changeset
|
99 virtual void GetChanges(IDatabaseBackendOutput& output, |
202 | 100 bool& done /*out*/, |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
101 DatabaseManager& manager, |
202 | 102 int64_t since, |
385
346fe629d638
clarifying types of since/limit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
378
diff
changeset
|
103 uint32_t limit) = 0; |
202 | 104 |
105 virtual void GetChildrenInternalId(std::list<int64_t>& target /*out*/, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
106 DatabaseManager& manager, |
202 | 107 int64_t id) = 0; |
108 | |
109 virtual void GetChildrenPublicId(std::list<std::string>& target /*out*/, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
110 DatabaseManager& manager, |
202 | 111 int64_t id) = 0; |
112 | |
113 /* Use GetOutput().AnswerExportedResource() */ | |
203
2089d4071408
moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
202
diff
changeset
|
114 virtual void GetExportedResources(IDatabaseBackendOutput& output, |
202 | 115 bool& done /*out*/, |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
116 DatabaseManager& manager, |
202 | 117 int64_t since, |
385
346fe629d638
clarifying types of since/limit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
378
diff
changeset
|
118 uint32_t limit) = 0; |
202 | 119 |
120 /* Use GetOutput().AnswerChange() */ | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
121 virtual void GetLastChange(IDatabaseBackendOutput& output, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
122 DatabaseManager& manager) = 0; |
202 | 123 |
124 /* Use GetOutput().AnswerExportedResource() */ | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
125 virtual void GetLastExportedResource(IDatabaseBackendOutput& output, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
126 DatabaseManager& manager) = 0; |
202 | 127 |
128 /* Use GetOutput().AnswerDicomTag() */ | |
203
2089d4071408
moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
202
diff
changeset
|
129 virtual void GetMainDicomTags(IDatabaseBackendOutput& output, |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
130 DatabaseManager& manager, |
202 | 131 int64_t id) = 0; |
132 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
133 virtual std::string GetPublicId(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
134 int64_t resourceId) = 0; |
202 | 135 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
136 virtual uint64_t GetResourcesCount(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
137 OrthancPluginResourceType resourceType) = 0; |
202 | 138 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
139 virtual OrthancPluginResourceType GetResourceType(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
140 int64_t resourceId) = 0; |
202 | 141 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
142 virtual uint64_t GetTotalCompressedSize(DatabaseManager& manager) = 0; |
202 | 143 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
144 virtual uint64_t GetTotalUncompressedSize(DatabaseManager& manager) = 0; |
202 | 145 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
146 virtual bool IsExistingResource(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
147 int64_t internalId) = 0; |
202 | 148 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
149 virtual bool IsProtectedPatient(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
150 int64_t internalId) = 0; |
202 | 151 |
152 virtual void ListAvailableMetadata(std::list<int32_t>& target /*out*/, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
153 DatabaseManager& manager, |
202 | 154 int64_t id) = 0; |
155 | |
156 virtual void ListAvailableAttachments(std::list<int32_t>& target /*out*/, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
157 DatabaseManager& manager, |
202 | 158 int64_t id) = 0; |
159 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
160 virtual void LogChange(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
161 int32_t changeType, |
209 | 162 int64_t resourceId, |
163 OrthancPluginResourceType resourceType, | |
164 const char* date) = 0; | |
165 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
166 virtual void LogExportedResource(DatabaseManager& manager, |
378
9db9e0275ec0
refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
167 OrthancPluginResourceType resourceType, |
9db9e0275ec0
refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
168 const char* publicId, |
9db9e0275ec0
refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
169 const char* modality, |
9db9e0275ec0
refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
170 const char* date, |
9db9e0275ec0
refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
171 const char* patientId, |
9db9e0275ec0
refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
172 const char* studyInstanceUid, |
9db9e0275ec0
refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
173 const char* seriesInstanceUid, |
9db9e0275ec0
refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
174 const char* sopInstanceUid) = 0; |
202 | 175 |
176 /* Use GetOutput().AnswerAttachment() */ | |
203
2089d4071408
moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
202
diff
changeset
|
177 virtual bool LookupAttachment(IDatabaseBackendOutput& output, |
261
34e2b93a7ac1
implementing interface for revisions in attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
260
diff
changeset
|
178 int64_t& revision /*out*/, |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
179 DatabaseManager& manager, |
202 | 180 int64_t id, |
181 int32_t contentType) = 0; | |
182 | |
183 virtual bool LookupGlobalProperty(std::string& target /*out*/, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
184 DatabaseManager& manager, |
221
73cc85f3d9c1
implementation of the "serverIdentifier" information for global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
209
diff
changeset
|
185 const char* serverIdentifier, |
202 | 186 int32_t property) = 0; |
187 | |
188 virtual void LookupIdentifier(std::list<int64_t>& target /*out*/, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
189 DatabaseManager& manager, |
202 | 190 OrthancPluginResourceType resourceType, |
191 uint16_t group, | |
192 uint16_t element, | |
193 OrthancPluginIdentifierConstraint constraint, | |
194 const char* value) = 0; | |
195 | |
196 virtual void LookupIdentifierRange(std::list<int64_t>& target /*out*/, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
197 DatabaseManager& manager, |
202 | 198 OrthancPluginResourceType resourceType, |
199 uint16_t group, | |
200 uint16_t element, | |
201 const char* start, | |
202 const char* end) = 0; | |
203 | |
204 virtual bool LookupMetadata(std::string& target /*out*/, | |
256
e184dcadf163
handling of revisions in metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
255
diff
changeset
|
205 int64_t& revision /*out*/, |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
206 DatabaseManager& manager, |
202 | 207 int64_t id, |
208 int32_t metadataType) = 0; | |
209 | |
210 virtual bool LookupParent(int64_t& parentId /*out*/, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
211 DatabaseManager& manager, |
202 | 212 int64_t resourceId) = 0; |
213 | |
214 virtual bool LookupResource(int64_t& id /*out*/, | |
215 OrthancPluginResourceType& type /*out*/, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
216 DatabaseManager& manager, |
202 | 217 const char* publicId) = 0; |
218 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
219 virtual bool SelectPatientToRecycle(int64_t& internalId /*out*/, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
220 DatabaseManager& manager) = 0; |
202 | 221 |
222 virtual bool SelectPatientToRecycle(int64_t& internalId /*out*/, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
223 DatabaseManager& manager, |
202 | 224 int64_t patientIdToAvoid) = 0; |
225 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
226 virtual void SetGlobalProperty(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
227 const char* serverIdentifier, |
221
73cc85f3d9c1
implementation of the "serverIdentifier" information for global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
209
diff
changeset
|
228 int32_t property, |
237
35598014f140
refactoring to remove GlobalProperties.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
226
diff
changeset
|
229 const char* utf8) = 0; |
202 | 230 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
231 virtual void SetMainDicomTag(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
232 int64_t id, |
202 | 233 uint16_t group, |
234 uint16_t element, | |
235 const char* value) = 0; | |
236 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
237 virtual void SetIdentifierTag(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
238 int64_t id, |
202 | 239 uint16_t group, |
240 uint16_t element, | |
241 const char* value) = 0; | |
242 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
243 virtual void SetMetadata(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
244 int64_t id, |
202 | 245 int32_t metadataType, |
256
e184dcadf163
handling of revisions in metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
255
diff
changeset
|
246 const char* value, |
e184dcadf163
handling of revisions in metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
255
diff
changeset
|
247 int64_t revision) = 0; |
202 | 248 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
249 virtual void SetProtectedPatient(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
250 int64_t internalId, |
202 | 251 bool isProtected) = 0; |
252 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
253 virtual uint32_t GetDatabaseVersion(DatabaseManager& manager) = 0; |
202 | 254 |
255 /** | |
256 * Upgrade the database to the specified version of the database | |
257 * schema. The upgrade script is allowed to make calls to | |
258 * OrthancPluginReconstructMainDicomTags(). | |
259 **/ | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
260 virtual void UpgradeDatabase(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
261 uint32_t targetVersion, |
202 | 262 OrthancPluginStorageArea* storageArea) = 0; |
263 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
264 virtual void ClearMainDicomTags(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
265 int64_t internalId) = 0; |
202 | 266 |
267 virtual bool HasCreateInstance() const = 0; | |
268 | |
269 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 | |
203
2089d4071408
moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
202
diff
changeset
|
270 virtual void LookupResources(IDatabaseBackendOutput& output, |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
271 DatabaseManager& manager, |
202 | 272 const std::vector<Orthanc::DatabaseConstraint>& lookup, |
273 OrthancPluginResourceType queryLevel, | |
391
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
274 const std::set<std::string>& withLabels, // New in Orthanc 1.12.0 |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
275 const std::set<std::string>& withoutLabels, // New in Orthanc 1.12.0 |
202 | 276 uint32_t limit, |
277 bool requestSomeInstance) = 0; | |
278 #endif | |
279 | |
280 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 | |
281 virtual void CreateInstance(OrthancPluginCreateInstanceResult& result, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
282 DatabaseManager& manager, |
202 | 283 const char* hashPatient, |
284 const char* hashStudy, | |
285 const char* hashSeries, | |
286 const char* hashInstance) = 0; | |
287 #endif | |
288 | |
289 | |
290 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 | |
291 virtual void SetResourcesContent( | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
292 DatabaseManager& manager, |
202 | 293 uint32_t countIdentifierTags, |
294 const OrthancPluginResourcesContentTags* identifierTags, | |
295 uint32_t countMainDicomTags, | |
296 const OrthancPluginResourcesContentTags* mainDicomTags, | |
297 uint32_t countMetadata, | |
298 const OrthancPluginResourcesContentMetadata* metadata) = 0; | |
299 #endif | |
300 | |
301 | |
302 virtual void GetChildrenMetadata(std::list<std::string>& target, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
303 DatabaseManager& manager, |
202 | 304 int64_t resourceId, |
305 int32_t metadata) = 0; | |
306 | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
307 virtual int64_t GetLastChangeIndex(DatabaseManager& manager) = 0; |
202 | 308 |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
309 virtual void TagMostRecentPatient(DatabaseManager& manager, |
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
310 int64_t patientId) = 0; |
202 | 311 |
312 // NB: "parentPublicId" must be cleared if the resource has no parent | |
313 virtual bool LookupResourceAndParent(int64_t& id, | |
314 OrthancPluginResourceType& type, | |
315 std::string& parentPublicId, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
316 DatabaseManager& manager, |
202 | 317 const char* publicId) = 0; |
318 | |
319 virtual void GetAllMetadata(std::map<int32_t, std::string>& result, | |
225
94c9908e6aca
removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
320 DatabaseManager& manager, |
202 | 321 int64_t id) = 0; |
391
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
322 |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
323 // New in Orthanc 1.12.0 |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
324 virtual bool HasLabelsSupport() const = 0; |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
325 |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
326 // New in Orthanc 1.12.0 |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
327 virtual void AddLabel(int64_t resource, |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
328 const std::string& label) = 0; |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
329 |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
330 // New in Orthanc 1.12.0 |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
331 virtual void RemoveLabel(int64_t resource, |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
332 const std::string& label) = 0; |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
333 |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
334 // New in Orthanc 1.12.0 |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
335 virtual void ListLabels(std::set<std::string>& target, |
d14e6ff04a5c
added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
336 int64_t resource) = 0; |
202 | 337 }; |
338 } |