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
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: 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
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #pragma once
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 #include <list>
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 class IDatabaseBackend : public boost::noncopyable
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 {
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 public:
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 virtual ~IDatabaseBackend()
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 {
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 }
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 virtual OrthancPluginContext* GetContext() = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 virtual void SetOutputFactory(IDatabaseBackendOutput::IFactory* factory) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 virtual IDatabaseBackendOutput* CreateOutput() = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 int64_t child) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
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 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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 OrthancPluginResourceType type) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 int64_t id,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 int32_t attachment) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 int32_t metadataType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 int64_t id) = 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 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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 OrthancPluginResourceType resourceType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 OrthancPluginResourceType resourceType) = 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 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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
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().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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
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 GetTotalUncompressedSize(DatabaseManager& manager) = 0;
202
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 int64_t id) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 207
diff changeset
162 int64_t resourceId,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 207
diff changeset
163 OrthancPluginResourceType resourceType,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 207
diff changeset
164 const char* date) = 0;
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 207
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 int64_t id,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 int32_t contentType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 int32_t property) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 OrthancPluginResourceType resourceType,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 uint16_t group,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 uint16_t element,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 OrthancPluginIdentifierConstraint constraint,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 const char* value) = 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 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
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 const char* start,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 const char* end) = 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 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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 int64_t id,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 int32_t metadataType) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 int64_t resourceId) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 virtual bool LookupResource(int64_t& id /*out*/,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 const char* publicId) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
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 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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 int64_t patientIdToAvoid) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 uint16_t group,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 uint16_t element,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 const char* value) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 uint16_t group,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 uint16_t element,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 const char* value) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 bool isProtected) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 /**
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256 * Upgrade the database to the specified version of the database
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 * schema. The upgrade script is allowed to make calls to
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 * OrthancPluginReconstructMainDicomTags().
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262 OrthancPluginStorageArea* storageArea) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
266
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
267 virtual bool HasCreateInstance() const = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
268
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
272 const std::vector<Orthanc::DatabaseConstraint>& lookup,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276 uint32_t limit,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277 bool requestSomeInstance) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
278 #endif
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
279
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
283 const char* hashPatient,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
284 const char* hashStudy,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
285 const char* hashSeries,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286 const char* hashInstance) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
287 #endif
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
288
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
289
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
290 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
293 uint32_t countIdentifierTags,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
294 const OrthancPluginResourcesContentTags* identifierTags,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
295 uint32_t countMainDicomTags,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
296 const OrthancPluginResourcesContentTags* mainDicomTags,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
297 uint32_t countMetadata,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
298 const OrthancPluginResourcesContentMetadata* metadata) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299 #endif
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
300
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
304 int64_t resourceId,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305 int32_t metadata) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
311
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
312 // NB: "parentPublicId" must be cleared if the resource has no parent
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
313 virtual bool LookupResourceAndParent(int64_t& id,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
314 OrthancPluginResourceType& type,
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
317 const char* publicId) = 0;
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
318
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
337 };
2def2df94f94 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
338 }