annotate Framework/Plugins/IDatabaseBackend.h @ 507:54d518dcd74a

updated copyright, as Orthanc Team now replaces Osimis
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 May 2024 21:47:02 +0200
parents 11c6bcc9d1f2
children 2ab3d45c0b3c
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
507
54d518dcd74a updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 470
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
54d518dcd74a updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 470
diff changeset
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
459
ecd0b719cff5 update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 403
diff changeset
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 *
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * This program is free software: you can redistribute it and/or
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * modify it under the terms of the GNU Affero General Public License
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * as published by the Free Software Foundation, either version 3 of
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * the License, or (at your option) any later version.
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 *
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful, but
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * Affero General Public License for more details.
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 *
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * You should have received a copy of the GNU Affero General Public License
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #pragma once
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
401
a8774581adfc replaced "WithLabels" and "WithoutLabels", by "Labels" and "LabelsConstraint"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 396
diff changeset
27 #include "../../Resources/Orthanc/Databases/ISqlLookupFormatter.h"
a8774581adfc replaced "WithLabels" and "WithoutLabels", by "Labels" and "LabelsConstraint"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 396
diff changeset
28 #include "../Common/DatabaseManager.h"
207
d9ef3f16e6a2 wrapping transactions in API v3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 203
diff changeset
29 #include "../Common/DatabasesEnumerations.h"
401
a8774581adfc replaced "WithLabels" and "WithoutLabels", by "Labels" and "LabelsConstraint"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 396
diff changeset
30 #include "IDatabaseBackendOutput.h"
403
91124cc8a8c7 database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 402
diff changeset
31 #include "IdentifierTag.h"
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 #include <list>
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
203
2089d4071408 moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 202
diff changeset
35 namespace OrthancDatabases
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 {
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 class IDatabaseBackend : public boost::noncopyable
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 {
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 public:
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 virtual ~IDatabaseBackend()
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 {
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 virtual OrthancPluginContext* GetContext() = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
255
d663d9e44f8d reintroduction of IDatabaseFactory into DatabaseManager
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 237
diff changeset
46 virtual IDatabaseFactory* CreateDatabaseFactory() = 0;
226
a4918d57435c DatabaseManager doesn't IDatabaseFactory anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 225
diff changeset
47
403
91124cc8a8c7 database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 402
diff changeset
48 /**
91124cc8a8c7 database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 402
diff changeset
49 * This function is invoked once, even if multiple connections are
91124cc8a8c7 database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 402
diff changeset
50 * open. It is notably used to update the schema of the database.
91124cc8a8c7 database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 402
diff changeset
51 **/
91124cc8a8c7 database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 402
diff changeset
52 virtual void ConfigureDatabase(DatabaseManager& database,
91124cc8a8c7 database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 402
diff changeset
53 bool hasIdentifierTags,
91124cc8a8c7 database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 402
diff changeset
54 const std::list<IdentifierTag>& identifierTags) = 0;
224
61c309e06797 added internal class DatabaseBackendAdapterV2::Adapter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 221
diff changeset
55
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 virtual void SetOutputFactory(IDatabaseBackendOutput::IFactory* factory) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 virtual IDatabaseBackendOutput* CreateOutput() = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
260
793bbbe11287 IDatabaseBackend::HasRevisionsSupport()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 256
diff changeset
60 virtual bool HasRevisionsSupport() const = 0;
793bbbe11287 IDatabaseBackend::HasRevisionsSupport()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 256
diff changeset
61
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
62 virtual void AddAttachment(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
63 int64_t id,
261
34e2b93a7ac1 implementing interface for revisions in attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 260
diff changeset
64 const OrthancPluginAttachment& attachment,
34e2b93a7ac1 implementing interface for revisions in attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 260
diff changeset
65 int64_t revision) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
67 virtual void AttachChild(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
68 int64_t parent,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 int64_t child) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
71 virtual void ClearChanges(DatabaseManager& manager) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
73 virtual void ClearExportedResources(DatabaseManager& manager) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
75 virtual int64_t CreateResource(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
76 const char* publicId,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 OrthancPluginResourceType type) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
203
2089d4071408 moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 202
diff changeset
79 virtual void DeleteAttachment(IDatabaseBackendOutput& output,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
80 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 int64_t id,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 int32_t attachment) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
84 virtual void DeleteMetadata(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
85 int64_t id,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 int32_t metadataType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
203
2089d4071408 moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 202
diff changeset
88 virtual void DeleteResource(IDatabaseBackendOutput& output,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
89 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 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
93 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 OrthancPluginResourceType resourceType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 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
97 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 OrthancPluginResourceType resourceType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 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
101 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 OrthancPluginResourceType resourceType,
385
346fe629d638 clarifying types of since/limit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 378
diff changeset
103 int64_t since,
346fe629d638 clarifying types of since/limit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 378
diff changeset
104 uint32_t limit) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 /* Use GetOutput().AnswerChange() */
203
2089d4071408 moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 202
diff changeset
107 virtual void GetChanges(IDatabaseBackendOutput& output,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 bool& done /*out*/,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
109 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 int64_t since,
385
346fe629d638 clarifying types of since/limit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 378
diff changeset
111 uint32_t limit) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 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
114 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 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
118 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 /* Use GetOutput().AnswerExportedResource() */
203
2089d4071408 moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 202
diff changeset
122 virtual void GetExportedResources(IDatabaseBackendOutput& output,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 bool& done /*out*/,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
124 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 int64_t since,
385
346fe629d638 clarifying types of since/limit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 378
diff changeset
126 uint32_t limit) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 /* Use GetOutput().AnswerChange() */
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
129 virtual void GetLastChange(IDatabaseBackendOutput& output,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
130 DatabaseManager& manager) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 /* Use GetOutput().AnswerExportedResource() */
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
133 virtual void GetLastExportedResource(IDatabaseBackendOutput& output,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
134 DatabaseManager& manager) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 /* Use GetOutput().AnswerDicomTag() */
203
2089d4071408 moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 202
diff changeset
137 virtual void GetMainDicomTags(IDatabaseBackendOutput& output,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
138 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
141 virtual std::string GetPublicId(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
142 int64_t resourceId) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
144 virtual uint64_t GetResourcesCount(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
145 OrthancPluginResourceType resourceType) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
147 virtual OrthancPluginResourceType GetResourceType(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
148 int64_t resourceId) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
150 virtual uint64_t GetTotalCompressedSize(DatabaseManager& manager) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
152 virtual uint64_t GetTotalUncompressedSize(DatabaseManager& manager) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
154 virtual bool IsExistingResource(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
155 int64_t internalId) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
157 virtual bool IsProtectedPatient(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
158 int64_t internalId) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 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
161 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 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
165 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
168 virtual void LogChange(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
169 int32_t changeType,
209
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 207
diff changeset
170 int64_t resourceId,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 207
diff changeset
171 OrthancPluginResourceType resourceType,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 207
diff changeset
172 const char* date) = 0;
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 207
diff changeset
173
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
174 virtual void LogExportedResource(DatabaseManager& manager,
378
9db9e0275ec0 refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
175 OrthancPluginResourceType resourceType,
9db9e0275ec0 refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
176 const char* publicId,
9db9e0275ec0 refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
177 const char* modality,
9db9e0275ec0 refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
178 const char* date,
9db9e0275ec0 refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
179 const char* patientId,
9db9e0275ec0 refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
180 const char* studyInstanceUid,
9db9e0275ec0 refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
181 const char* seriesInstanceUid,
9db9e0275ec0 refactoring IndexBackend::LogExportedResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
182 const char* sopInstanceUid) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 /* Use GetOutput().AnswerAttachment() */
203
2089d4071408 moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 202
diff changeset
185 virtual bool LookupAttachment(IDatabaseBackendOutput& output,
261
34e2b93a7ac1 implementing interface for revisions in attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 260
diff changeset
186 int64_t& revision /*out*/,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
187 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 int64_t id,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 int32_t contentType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 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
192 DatabaseManager& manager,
221
73cc85f3d9c1 implementation of the "serverIdentifier" information for global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 209
diff changeset
193 const char* serverIdentifier,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 int32_t property) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 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
197 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 OrthancPluginResourceType resourceType,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 uint16_t group,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 uint16_t element,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 OrthancPluginIdentifierConstraint constraint,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 const char* value) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 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
205 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 OrthancPluginResourceType resourceType,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 uint16_t group,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 uint16_t element,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 const char* start,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 const char* end) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 virtual bool LookupMetadata(std::string& target /*out*/,
256
e184dcadf163 handling of revisions in metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 255
diff changeset
213 int64_t& revision /*out*/,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
214 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 int64_t id,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 int32_t metadataType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 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
219 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 int64_t resourceId) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 virtual bool LookupResource(int64_t& id /*out*/,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 OrthancPluginResourceType& type /*out*/,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
224 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 const char* publicId) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
227 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
228 DatabaseManager& manager) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 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
231 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 int64_t patientIdToAvoid) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
234 virtual void SetGlobalProperty(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
235 const char* serverIdentifier,
221
73cc85f3d9c1 implementation of the "serverIdentifier" information for global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 209
diff changeset
236 int32_t property,
237
35598014f140 refactoring to remove GlobalProperties.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 226
diff changeset
237 const char* utf8) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
239 virtual void SetMainDicomTag(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
240 int64_t id,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 uint16_t group,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242 uint16_t element,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243 const char* value) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
245 virtual void SetIdentifierTag(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
246 int64_t id,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 uint16_t group,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248 uint16_t element,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249 const char* value) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
251 virtual void SetMetadata(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
252 int64_t id,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 int32_t metadataType,
256
e184dcadf163 handling of revisions in metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 255
diff changeset
254 const char* value,
e184dcadf163 handling of revisions in metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 255
diff changeset
255 int64_t revision) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
257 virtual void SetProtectedPatient(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
258 int64_t internalId,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 bool isProtected) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
261 virtual uint32_t GetDatabaseVersion(DatabaseManager& manager) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
263 /**
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264 * Upgrade the database to the specified version of the database
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 * schema. The upgrade script is allowed to make calls to
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
266 * OrthancPluginReconstructMainDicomTags().
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
267 **/
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
268 virtual void UpgradeDatabase(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
269 uint32_t targetVersion,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
270 OrthancPluginStorageArea* storageArea) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
271
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
272 virtual void ClearMainDicomTags(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
273 int64_t internalId) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
274
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
275 virtual bool HasCreateInstance() const = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277 #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
278 virtual void LookupResources(IDatabaseBackendOutput& output,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
279 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280 const std::vector<Orthanc::DatabaseConstraint>& lookup,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
281 OrthancPluginResourceType queryLevel,
401
a8774581adfc replaced "WithLabels" and "WithoutLabels", by "Labels" and "LabelsConstraint"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 396
diff changeset
282 const std::set<std::string>& labels, // New in Orthanc 1.12.0
a8774581adfc replaced "WithLabels" and "WithoutLabels", by "Labels" and "LabelsConstraint"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 396
diff changeset
283 Orthanc::LabelsConstraint labelsConstraint, // New in Orthanc 1.12.0
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
284 uint32_t limit,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
285 bool requestSomeInstance) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286 #endif
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
287
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
288 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
289 virtual void CreateInstance(OrthancPluginCreateInstanceResult& result,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
290 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
291 const char* hashPatient,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
292 const char* hashStudy,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
293 const char* hashSeries,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
294 const char* hashInstance) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
295 #endif
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
296
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
297
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
298 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299 virtual void SetResourcesContent(
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
300 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301 uint32_t countIdentifierTags,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
302 const OrthancPluginResourcesContentTags* identifierTags,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
303 uint32_t countMainDicomTags,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
304 const OrthancPluginResourcesContentTags* mainDicomTags,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305 uint32_t countMetadata,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
306 const OrthancPluginResourcesContentMetadata* metadata) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
307 #endif
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
308
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
309
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
310 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
311 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
312 int64_t resourceId,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
313 int32_t metadata) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
314
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
315 virtual int64_t GetLastChangeIndex(DatabaseManager& manager) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
316
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
317 virtual void TagMostRecentPatient(DatabaseManager& manager,
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
318 int64_t patientId) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
319
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
320 // NB: "parentPublicId" must be cleared if the resource has no parent
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
321 virtual bool LookupResourceAndParent(int64_t& id,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
322 OrthancPluginResourceType& type,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
323 std::string& parentPublicId,
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 224
diff changeset
324 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
325 const char* publicId) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
326
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
327 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
328 DatabaseManager& manager,
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
329 int64_t id) = 0;
391
d14e6ff04a5c added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
330
d14e6ff04a5c added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
331 // New in Orthanc 1.12.0
d14e6ff04a5c added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
332 virtual bool HasLabelsSupport() const = 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
396
7b3acfa95bd8 implementation of list/add/remove labels in postgresql
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 391
diff changeset
335 virtual void AddLabel(DatabaseManager& manager,
7b3acfa95bd8 implementation of list/add/remove labels in postgresql
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 391
diff changeset
336 int64_t resource,
391
d14e6ff04a5c added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
337 const std::string& label) = 0;
d14e6ff04a5c added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
338
d14e6ff04a5c added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
339 // New in Orthanc 1.12.0
396
7b3acfa95bd8 implementation of list/add/remove labels in postgresql
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 391
diff changeset
340 virtual void RemoveLabel(DatabaseManager& manager,
7b3acfa95bd8 implementation of list/add/remove labels in postgresql
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 391
diff changeset
341 int64_t resource,
391
d14e6ff04a5c added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
342 const std::string& label) = 0;
d14e6ff04a5c added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
343
d14e6ff04a5c added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
344 // New in Orthanc 1.12.0
396
7b3acfa95bd8 implementation of list/add/remove labels in postgresql
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 391
diff changeset
345 virtual void ListLabels(std::list<std::string>& target,
7b3acfa95bd8 implementation of list/add/remove labels in postgresql
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 391
diff changeset
346 DatabaseManager& manager,
391
d14e6ff04a5c added primitives to handle labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
347 int64_t resource) = 0;
402
82921a29349a implemented IDatabaseBackend::ListAllLabels()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 401
diff changeset
348
82921a29349a implemented IDatabaseBackend::ListAllLabels()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 401
diff changeset
349 // New in Orthanc 1.12.0
82921a29349a implemented IDatabaseBackend::ListAllLabels()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 401
diff changeset
350 virtual void ListAllLabels(std::list<std::string>& target,
82921a29349a implemented IDatabaseBackend::ListAllLabels()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 401
diff changeset
351 DatabaseManager& manager) = 0;
431
7c1fe5d6c12c PG: IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents: 403
diff changeset
352
470
11c6bcc9d1f2 cleanup
Alain Mazy <am@osimis.io>
parents: 460
diff changeset
353 // New in Orthanc 1.12.3
431
7c1fe5d6c12c PG: IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents: 403
diff changeset
354 virtual bool HasAtomicIncrementGlobalProperty() = 0;
7c1fe5d6c12c PG: IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents: 403
diff changeset
355
470
11c6bcc9d1f2 cleanup
Alain Mazy <am@osimis.io>
parents: 460
diff changeset
356 // New in Orthanc 1.12.3
431
7c1fe5d6c12c PG: IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents: 403
diff changeset
357 virtual int64_t IncrementGlobalProperty(DatabaseManager& manager,
7c1fe5d6c12c PG: IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents: 403
diff changeset
358 const char* serverIdentifier,
7c1fe5d6c12c PG: IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents: 403
diff changeset
359 int32_t property,
7c1fe5d6c12c PG: IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents: 403
diff changeset
360 int64_t increment) = 0;
436
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
361
470
11c6bcc9d1f2 cleanup
Alain Mazy <am@osimis.io>
parents: 460
diff changeset
362 // New in Orthanc 1.12.3
436
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
363 virtual bool HasUpdateAndGetStatistics() = 0;
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
364
470
11c6bcc9d1f2 cleanup
Alain Mazy <am@osimis.io>
parents: 460
diff changeset
365 // New in Orthanc 1.12.3
436
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
366 virtual void UpdateAndGetStatistics(DatabaseManager& manager,
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
367 int64_t& patientsCount,
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
368 int64_t& studiesCount,
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
369 int64_t& seriesCount,
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
370 int64_t& instancesCount,
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
371 int64_t& compressedSize,
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
372 int64_t& uncompressedSize) = 0;
f16faa1fdc46 InsertOrUpdateMetadata function + UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 431
diff changeset
373
470
11c6bcc9d1f2 cleanup
Alain Mazy <am@osimis.io>
parents: 460
diff changeset
374 // New in Orthanc 1.12.3
447
5881e4af5799 measure DB latency
Alain Mazy <am@osimis.io>
parents: 436
diff changeset
375 virtual bool HasMeasureLatency() = 0;
5881e4af5799 measure DB latency
Alain Mazy <am@osimis.io>
parents: 436
diff changeset
376
470
11c6bcc9d1f2 cleanup
Alain Mazy <am@osimis.io>
parents: 460
diff changeset
377 // New in Orthanc 1.12.3
447
5881e4af5799 measure DB latency
Alain Mazy <am@osimis.io>
parents: 436
diff changeset
378 virtual uint64_t MeasureLatency(DatabaseManager& manager) = 0;
5881e4af5799 measure DB latency
Alain Mazy <am@osimis.io>
parents: 436
diff changeset
379
5881e4af5799 measure DB latency
Alain Mazy <am@osimis.io>
parents: 436
diff changeset
380
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
381 };
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
382 }