comparison Framework/Plugins/MessagesToolbox.h @ 569:f18e46d7dbf8 attach-custom-data

merged find-refactoring -> attach-custom-data
author Alain Mazy <am@orthanc.team>
date Tue, 24 Sep 2024 15:04:21 +0200
parents 373cf7d747cc
children
comparison
equal deleted inserted replaced
368:82f73188b58d 569:f18e46d7dbf8
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-2023 Osimis S.A., Belgium
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
8 *
9 * This program is free software: you can redistribute it and/or
10 * modify it under the terms of the GNU Affero General Public License
11 * as published by the Free Software Foundation, either version 3 of
12 * the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Affero General Public License for more details.
18 *
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 **/
22
23
24 #pragma once
25
26 #include <orthanc/OrthancCDatabasePlugin.h>
27 #include <OrthancDatabasePlugin.pb.h>
28
29 // Ensure that "ORTHANC_PLUGINS_VERSION_IS_ABOVE" is defined
30 #include "../../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h"
31
32 #define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 0
33
34 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE)
35 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 2)
36 # undef ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT
37 # define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 1
38 # endif
39 #endif
40
41
42 #define ORTHANC_PLUGINS_HAS_INTEGRATED_FIND 0
43
44 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE)
45 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 5)
46 # undef ORTHANC_PLUGINS_HAS_INTEGRATED_FIND
47 # define ORTHANC_PLUGINS_HAS_INTEGRATED_FIND 1
48 # endif
49 #endif
50
51
52 #define ORTHANC_PLUGINS_HAS_CHANGES_EXTENDED 0
53
54 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE)
55 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 5)
56 # undef ORTHANC_PLUGINS_HAS_CHANGES_EXTENDED
57 # define ORTHANC_PLUGINS_HAS_CHANGES_EXTENDED 1
58 # endif
59 #endif
60
61
62 #include <Enumerations.h>
63
64
65 namespace OrthancDatabases
66 {
67 enum ConstraintType
68 {
69 ConstraintType_Equal,
70 ConstraintType_SmallerOrEqual,
71 ConstraintType_GreaterOrEqual,
72 ConstraintType_Wildcard,
73 ConstraintType_List
74 };
75
76 namespace MessagesToolbox
77 {
78 Orthanc::ResourceType Convert(Orthanc::DatabasePluginMessages::ResourceType resourceType);
79
80 OrthancPluginResourceType ConvertToPlainC(Orthanc::ResourceType type);
81
82 Orthanc::ResourceType Convert(OrthancPluginResourceType type);
83
84 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
85 OrthancPluginConstraintType ConvertToPlainC(ConstraintType constraint);
86 #endif
87
88 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
89 ConstraintType Convert(OrthancPluginConstraintType constraint);
90 #endif
91 }
92 }