annotate Framework/Plugins/DatabaseBackendAdapterV4.h @ 395:a7a029043670 db-protobuf

integration mainline->db-protobuf
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Apr 2023 14:53:57 +0200
parents 3d6886f3e5b3
children ecd0b719cff5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
373
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
be7de633695c started DatabaseBackendAdapterV4
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: 373
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
3d6886f3e5b3 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 373
diff changeset
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
373
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 *
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * modify it under the terms of the GNU Affero General Public License
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * as published by the Free Software Foundation, either version 3 of
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * the License, or (at your option) any later version.
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 *
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * Affero General Public License for more details.
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 *
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * You should have received a copy of the GNU Affero General Public License
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 **/
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #pragma once
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include "IndexBackend.h"
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 0)
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 namespace OrthancDatabases
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 /**
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 * @brief Bridge between C and C++ database engines.
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 *
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 * Class creating the bridge between the C low-level primitives for
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 * custom database engines, and the high-level IDatabaseBackend C++
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 * interface, through ProtocolBuffers for Orthanc >= 1.12.0.
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 **/
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 class DatabaseBackendAdapterV4
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 {
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 private:
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 // This class cannot be instantiated
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 DatabaseBackendAdapterV4()
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 {
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 }
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 public:
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 static void Register(IndexBackend* backend,
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 size_t countConnections,
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 unsigned int maxDatabaseRetries);
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 static void Finalize();
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 };
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 }
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 # endif
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 #endif