comparison Framework/Plugins/DatabaseBackendAdapterV4.h @ 366:cd9521e04249 attach-custom-data

DatabaseBackendAdapterV4: added support for customData + revision when not already done
author Alain Mazy <am@osimis.io>
date Thu, 15 Sep 2022 18:12:34 +0200
parents
children
comparison
equal deleted inserted replaced
365:7671fa7f099e 366:cd9521e04249
1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
6 *
7 * This program is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU Affero General Public License
9 * as published by the Free Software Foundation, either version 3 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Affero General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 **/
20
21
22
23 #pragma once
24
25 #include "IndexBackend.h"
26
27
28 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1
29 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 0)
30
31 namespace OrthancDatabases
32 {
33 /**
34 * @brief Bridge between C and C++ database engines.
35 *
36 * Class creating the bridge between the C low-level primitives for
37 * custom database engines, and the high-level IDatabaseBackend C++
38 * interface, for Orthanc >= 1.12.0.
39 **/
40 class DatabaseBackendAdapterV4
41 {
42 private:
43 class Output;
44
45 // This class cannot be instantiated
46 DatabaseBackendAdapterV4()
47 {
48 }
49
50 public:
51 class Adapter;
52 class Transaction;
53
54 class Factory : public IDatabaseBackendOutput::IFactory
55 {
56 public:
57 virtual IDatabaseBackendOutput* CreateOutput() ORTHANC_OVERRIDE;
58 };
59
60 static void Register(IndexBackend* backend,
61 size_t countConnections,
62 unsigned int maxDatabaseRetries);
63
64 static void Finalize();
65 };
66 }
67
68 # endif
69 #endif