comparison Framework/Plugins/GlobalProperties.h @ 237:35598014f140

refactoring to remove GlobalProperties.cpp
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Apr 2021 19:09:04 +0200
parents 73cc85f3d9c1
children e9ba888f371b
comparison
equal deleted inserted replaced
236:d1d2edbbe6fb 237:35598014f140
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 **/ 19 **/
20 20
21 21
22 #pragma once 22 #pragma once
23
24 #include "../Common/DatabaseManager.h"
25 23
26 #define MISSING_SERVER_IDENTIFIER "" 24 #define MISSING_SERVER_IDENTIFIER ""
27 25
28 26
29 namespace Orthanc 27 namespace Orthanc
56 GlobalProperty_DatabaseInternal7 = 17, 54 GlobalProperty_DatabaseInternal7 = 17,
57 GlobalProperty_DatabaseInternal8 = 18, 55 GlobalProperty_DatabaseInternal8 = 18,
58 GlobalProperty_DatabaseInternal9 = 19 56 GlobalProperty_DatabaseInternal9 = 19
59 }; 57 };
60 } 58 }
61
62
63 namespace OrthancDatabases
64 {
65 bool LookupGlobalProperty(std::string& target /* out */,
66 IDatabase& db,
67 ITransaction& transaction,
68 const std::string& serverIdentifier,
69 Orthanc::GlobalProperty property);
70
71 bool LookupGlobalProperty(std::string& target /* out */,
72 DatabaseManager& manager,
73 const std::string& serverIdentifier,
74 Orthanc::GlobalProperty property);
75
76 void SetGlobalProperty(IDatabase& db,
77 ITransaction& transaction,
78 const std::string& serverIdentifier,
79 Orthanc::GlobalProperty property,
80 const std::string& utf8);
81
82 void SetGlobalProperty(DatabaseManager& manager,
83 const std::string& serverIdentifier,
84 Orthanc::GlobalProperty property,
85 const std::string& utf8);
86
87 bool LookupGlobalIntegerProperty(int& target,
88 IDatabase& db,
89 ITransaction& transaction,
90 const std::string& serverIdentifier,
91 Orthanc::GlobalProperty property);
92
93 void SetGlobalIntegerProperty(IDatabase& db,
94 ITransaction& transaction,
95 const std::string& serverIdentifier,
96 Orthanc::GlobalProperty property,
97 int value);
98 }