Mercurial > hg > orthanc
annotate Plugins/Engine/OrthancPluginDatabase.h @ 3085:c829758b9ca0 db-changes
reorganization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 04 Jan 2019 16:52:53 +0100 |
parents | 195ba4cbac3f |
children | fb8ee0786b1e |
rev | line source |
---|---|
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
3060
4e43e67f8ecf
preparing for 2019
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU General Public License as |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * published by the Free Software Foundation, either version 3 of the |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * License, or (at your option) any later version. |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * In addition, as a special exception, the copyright holders of this |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * program give permission to link the code of its release with the |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * that use the same license as the "OpenSSL" library), and distribute |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * the linked executables. You must obey the GNU General Public License |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * in all respects for all of the code used other than "OpenSSL". If you |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * modify file(s) with this exception, you may extend this exception to |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * your version of the file(s), but you are not obligated to do so. If |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 * you do not wish to do so, delete this exception statement from your |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 * version. If you delete this exception statement from all source files |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 * in the program, then also delete it here. |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 * |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 * This program is distributed in the hope that it will be useful, but |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 * WITHOUT ANY WARRANTY; without even the implied warranty of |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 * General Public License for more details. |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 * |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 * You should have received a copy of the GNU General Public License |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 **/ |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 #pragma once |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 |
2136
dd609a99d39a
uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
36 #if ORTHANC_ENABLE_PLUGINS == 1 |
1632
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
37 |
2463
be5c0f4155f6
move SharedLibrary into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
38 #include "../../Core/SharedLibrary.h" |
3085 | 39 #include "../../OrthancServer/Search/Compatibility/ILookupResources.h" |
3084 | 40 #include "../../OrthancServer/Search/Compatibility/ISetResourcesContent.h" |
41 #include "../../OrthancServer/Search/Compatibility/ICreateInstance.h" | |
1425
97268448bdfc
refactoring of samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1314
diff
changeset
|
42 #include "../Include/orthanc/OrthancCDatabasePlugin.h" |
1651
2e692c83e2f3
improved custom error login
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1632
diff
changeset
|
43 #include "PluginsErrorDictionary.h" |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 namespace Orthanc |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 { |
3084 | 47 class OrthancPluginDatabase : |
48 public IDatabaseWrapper, | |
3085 | 49 public Compatibility::ILookupResources, |
3084 | 50 public Compatibility::ISetResourcesContent, |
51 public Compatibility::ICreateInstance | |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 { |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 private: |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 class Transaction; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 typedef std::pair<int64_t, ResourceType> AnswerResource; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 |
1630
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
58 SharedLibrary& library_; |
1651
2e692c83e2f3
improved custom error login
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1632
diff
changeset
|
59 PluginsErrorDictionary& errorDictionary_; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 _OrthancPluginDatabaseAnswerType type_; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 OrthancPluginDatabaseBackend backend_; |
1609
c74495267acf
Implementation of the "GetAllPublicIdsWithLimit" extension
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1509
diff
changeset
|
62 OrthancPluginDatabaseExtensions extensions_; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 void* payload_; |
1432
0ac74fa21db8
rename IServerIndexListener as IDatabaseListener
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1425
diff
changeset
|
64 IDatabaseListener* listener_; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 |
3019
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
66 bool fastGetTotalSize_; |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
67 uint64_t currentDiskSize_; |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
68 |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 std::list<std::string> answerStrings_; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 std::list<int32_t> answerInt32_; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 std::list<int64_t> answerInt64_; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 std::list<AnswerResource> answerResources_; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 std::list<FileInfo> answerAttachments_; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 DicomMap* answerDicomMap_; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 std::list<ServerIndexChange>* answerChanges_; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 std::list<ExportedResource>* answerExportedResources_; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 bool* answerDone_; |
3076
8bc2cb1335f4
OrthancPluginDatabase::ApplyLookupResources() using fast lookup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3075
diff
changeset
|
79 std::list<std::string>* answerMatchingResources_; |
8bc2cb1335f4
OrthancPluginDatabase::ApplyLookupResources() using fast lookup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3075
diff
changeset
|
80 std::list<std::string>* answerMatchingInstances_; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 OrthancPluginDatabaseContext* GetContext() |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 { |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 return reinterpret_cast<OrthancPluginDatabaseContext*>(this); |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 } |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 |
1672
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
87 void CheckSuccess(OrthancPluginErrorCode code); |
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
88 |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 void ResetAnswers(); |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 void ForwardAnswers(std::list<int64_t>& target); |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 void ForwardAnswers(std::list<std::string>& target); |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 bool ForwardSingleAnswer(std::string& target); |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 bool ForwardSingleAnswer(int64_t& target); |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 public: |
1630
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
100 OrthancPluginDatabase(SharedLibrary& library, |
1651
2e692c83e2f3
improved custom error login
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1632
diff
changeset
|
101 PluginsErrorDictionary& errorDictionary, |
1630
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
102 const OrthancPluginDatabaseBackend& backend, |
1609
c74495267acf
Implementation of the "GetAllPublicIdsWithLimit" extension
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1509
diff
changeset
|
103 const OrthancPluginDatabaseExtensions* extensions, |
c74495267acf
Implementation of the "GetAllPublicIdsWithLimit" extension
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1509
diff
changeset
|
104 size_t extensionsSize, |
1314 | 105 void *payload); |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
107 virtual void Open() |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
108 ORTHANC_OVERRIDE; |
1672
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
109 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
110 virtual void Close() |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
111 ORTHANC_OVERRIDE |
1672
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
112 { |
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
113 CheckSuccess(backend_.close(payload_)); |
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
114 } |
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
115 |
1630
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
116 const SharedLibrary& GetSharedLibrary() const |
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
117 { |
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
118 return library_; |
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
119 } |
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
120 |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 virtual void AddAttachment(int64_t id, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
122 const FileInfo& attachment) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
123 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 virtual void AttachChild(int64_t parent, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
126 int64_t child) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
127 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
129 virtual void ClearChanges() |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
130 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
132 virtual void ClearExportedResources() |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
133 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 virtual int64_t CreateResource(const std::string& publicId, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
136 ResourceType type) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
137 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 virtual void DeleteAttachment(int64_t id, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
140 FileContentType attachment) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
141 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 virtual void DeleteMetadata(int64_t id, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
144 MetadataType type) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
145 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
147 virtual void DeleteResource(int64_t id) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
148 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
150 virtual void FlushToDisk() |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
151 ORTHANC_OVERRIDE |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 { |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 } |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
154 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
155 virtual bool HasFlushToDisk() const |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
156 ORTHANC_OVERRIDE |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 { |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 return false; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 } |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 virtual void GetAllMetadata(std::map<MetadataType, std::string>& target, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
162 int64_t id) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
163 ORTHANC_OVERRIDE; |
1750
55d52567bebb
LookupResource implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1746
diff
changeset
|
164 |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
165 virtual void GetAllPublicIds(std::list<std::string>& target, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
166 ResourceType resourceType) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
167 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
168 |
1509
0586ed8897f1
limit and since arguments while retrieving DICOM resources in the REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1432
diff
changeset
|
169 virtual void GetAllPublicIds(std::list<std::string>& target, |
0586ed8897f1
limit and since arguments while retrieving DICOM resources in the REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1432
diff
changeset
|
170 ResourceType resourceType, |
0586ed8897f1
limit and since arguments while retrieving DICOM resources in the REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1432
diff
changeset
|
171 size_t since, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
172 size_t limit) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
173 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
175 virtual void GetChanges(std::list<ServerIndexChange>& target /*out*/, |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 bool& done /*out*/, |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 int64_t since, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
178 uint32_t maxResults) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
179 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
180 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
181 virtual void GetChildrenInternalId(std::list<int64_t>& target, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
182 int64_t id) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
183 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
184 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
185 virtual void GetChildrenPublicId(std::list<std::string>& target, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
186 int64_t id) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
187 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
189 virtual void GetExportedResources(std::list<ExportedResource>& target /*out*/, |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
190 bool& done /*out*/, |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
191 int64_t since, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
192 uint32_t maxResults) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
193 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
194 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
195 virtual void GetLastChange(std::list<ServerIndexChange>& target /*out*/) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
196 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
197 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
198 virtual void GetLastExportedResource(std::list<ExportedResource>& target /*out*/) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
199 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
200 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
201 virtual void GetMainDicomTags(DicomMap& map, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
202 int64_t id) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
203 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
204 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
205 virtual std::string GetPublicId(int64_t resourceId) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
206 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
207 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
208 virtual uint64_t GetResourceCount(ResourceType resourceType) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
209 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
210 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
211 virtual ResourceType GetResourceType(int64_t resourceId) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
212 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
213 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
214 virtual uint64_t GetTotalCompressedSize() |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
215 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
216 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
217 virtual uint64_t GetTotalUncompressedSize() |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
218 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
219 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
220 virtual bool IsExistingResource(int64_t internalId) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
221 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
222 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
223 virtual bool IsProtectedPatient(int64_t internalId) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
224 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
225 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
226 virtual void ListAvailableMetadata(std::list<MetadataType>& target, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
227 int64_t id) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
228 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
229 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
230 virtual void ListAvailableAttachments(std::list<FileContentType>& target, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
231 int64_t id) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
232 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
233 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
234 virtual void LogChange(int64_t internalId, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
235 const ServerIndexChange& change) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
236 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
237 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
238 virtual void LogExportedResource(const ExportedResource& resource) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
239 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
240 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
241 virtual bool LookupAttachment(FileInfo& attachment, |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
242 int64_t id, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
243 FileContentType contentType) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
244 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
245 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
246 virtual bool LookupGlobalProperty(std::string& target, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
247 GlobalProperty property) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
248 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
249 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
250 virtual bool LookupMetadata(std::string& target, |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
251 int64_t id, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
252 MetadataType type) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
253 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
254 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
255 virtual bool LookupParent(int64_t& parentId, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
256 int64_t resourceId) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
257 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
258 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
259 virtual bool LookupResource(int64_t& id, |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
260 ResourceType& type, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
261 const std::string& publicId) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
262 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
263 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
264 virtual bool SelectPatientToRecycle(int64_t& internalId) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
265 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
266 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
267 virtual bool SelectPatientToRecycle(int64_t& internalId, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
268 int64_t patientIdToAvoid) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
269 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
270 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
271 virtual void SetGlobalProperty(GlobalProperty property, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
272 const std::string& value) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
273 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
274 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
275 virtual void ClearMainDicomTags(int64_t id) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
276 ORTHANC_OVERRIDE; |
1668
de1413733c97
reconstructing main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
277 |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
278 virtual void SetMainDicomTag(int64_t id, |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
279 const DicomTag& tag, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
280 const std::string& value) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
281 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
282 |
1713 | 283 virtual void SetIdentifierTag(int64_t id, |
284 const DicomTag& tag, | |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
285 const std::string& value) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
286 ORTHANC_OVERRIDE; |
1713 | 287 |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
288 virtual void SetMetadata(int64_t id, |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
289 MetadataType type, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
290 const std::string& value) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
291 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
292 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
293 virtual void SetProtectedPatient(int64_t internalId, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
294 bool isProtected) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
295 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
296 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
297 virtual IDatabaseWrapper::ITransaction* StartTransaction() |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
298 ORTHANC_OVERRIDE; |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
299 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
300 virtual void SetListener(IDatabaseListener& listener) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
301 ORTHANC_OVERRIDE |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
302 { |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
303 listener_ = &listener; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
304 } |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
305 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
306 virtual unsigned int GetDatabaseVersion() |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
307 ORTHANC_OVERRIDE; |
1615
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1609
diff
changeset
|
308 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1609
diff
changeset
|
309 virtual void Upgrade(unsigned int targetVersion, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
310 IStorageArea& storageArea) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
311 ORTHANC_OVERRIDE; |
1615
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1609
diff
changeset
|
312 |
3051 | 313 void AnswerReceived(const _OrthancPluginDatabaseAnswer& answer); |
3020
d207f6ac1f86
tracking disk size by the database engine to ensure consistency across transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3019
diff
changeset
|
314 |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
315 virtual bool IsDiskSizeAbove(uint64_t threshold) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
316 ORTHANC_OVERRIDE; |
3025
039a9d262d64
preparing to speed up find in databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3020
diff
changeset
|
317 |
3075
ead8576a02ef
IDatabaseWrapper::ApplyLookupResources now returns lists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
318 virtual void ApplyLookupResources(std::list<std::string>& resourcesId, |
ead8576a02ef
IDatabaseWrapper::ApplyLookupResources now returns lists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
319 std::list<std::string>* instancesId, |
ead8576a02ef
IDatabaseWrapper::ApplyLookupResources now returns lists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
320 const std::vector<DatabaseConstraint>& lookup, |
ead8576a02ef
IDatabaseWrapper::ApplyLookupResources now returns lists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
321 ResourceType queryLevel, |
ead8576a02ef
IDatabaseWrapper::ApplyLookupResources now returns lists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
322 size_t limit) |
ead8576a02ef
IDatabaseWrapper::ApplyLookupResources now returns lists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
323 ORTHANC_OVERRIDE; |
ead8576a02ef
IDatabaseWrapper::ApplyLookupResources now returns lists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
324 |
3080
1a75595d8e44
started refactoring of ServerIndex::Store()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3076
diff
changeset
|
325 virtual bool CreateInstance(CreateInstanceResult& result, |
1a75595d8e44
started refactoring of ServerIndex::Store()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3076
diff
changeset
|
326 int64_t& instanceId, |
1a75595d8e44
started refactoring of ServerIndex::Store()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3076
diff
changeset
|
327 const std::string& patient, |
1a75595d8e44
started refactoring of ServerIndex::Store()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3076
diff
changeset
|
328 const std::string& study, |
1a75595d8e44
started refactoring of ServerIndex::Store()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3076
diff
changeset
|
329 const std::string& series, |
3082
847a0ed92654
new extension for database plugin SDK: createInstance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3080
diff
changeset
|
330 const std::string& instance) |
3080
1a75595d8e44
started refactoring of ServerIndex::Store()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3076
diff
changeset
|
331 ORTHANC_OVERRIDE; |
1a75595d8e44
started refactoring of ServerIndex::Store()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3076
diff
changeset
|
332 |
3085 | 333 // From the "ILookupResources" interface |
3057 | 334 virtual void GetAllInternalIds(std::list<int64_t>& target, |
335 ResourceType resourceType) | |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
336 ORTHANC_OVERRIDE; |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
337 |
3085 | 338 // From the "ILookupResources" interface |
1746 | 339 virtual void LookupIdentifier(std::list<int64_t>& result, |
340 ResourceType level, | |
341 const DicomTag& tag, | |
3054
3638de45a08c
backward compatibility with filtering identifiers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3053
diff
changeset
|
342 Compatibility::IdentifierConstraintType type, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
343 const std::string& value) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
344 ORTHANC_OVERRIDE; |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
345 |
3085 | 346 // From the "ILookupResources" interface |
2697
e583478e0c6c
New primitive in database SDK: "lookupIdentifierRange" to speed up range searches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2463
diff
changeset
|
347 virtual void LookupIdentifierRange(std::list<int64_t>& result, |
e583478e0c6c
New primitive in database SDK: "lookupIdentifierRange" to speed up range searches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2463
diff
changeset
|
348 ResourceType level, |
e583478e0c6c
New primitive in database SDK: "lookupIdentifierRange" to speed up range searches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2463
diff
changeset
|
349 const DicomTag& tag, |
e583478e0c6c
New primitive in database SDK: "lookupIdentifierRange" to speed up range searches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2463
diff
changeset
|
350 const std::string& start, |
3050
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
351 const std::string& end) |
d8a91acb7424
working on a database compatibility layer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3038
diff
changeset
|
352 ORTHANC_OVERRIDE; |
3084 | 353 |
354 virtual void SetResourcesContent(const Orthanc::ResourcesContent& content) | |
355 ORTHANC_OVERRIDE | |
356 { | |
357 ISetResourcesContent::Apply(*this, content); | |
358 } | |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
359 }; |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
360 } |
1632
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
361 |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
362 #endif |