comparison Framework/Plugins/GlobalProperties.h @ 221:73cc85f3d9c1

implementation of the "serverIdentifier" information for global properties
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Mar 2021 10:40:34 +0200
parents 3236894320d6
children 35598014f140
comparison
equal deleted inserted replaced
220:492aa3edf572 221:73cc85f3d9c1
20 20
21 21
22 #pragma once 22 #pragma once
23 23
24 #include "../Common/DatabaseManager.h" 24 #include "../Common/DatabaseManager.h"
25
26 #define MISSING_SERVER_IDENTIFIER ""
25 27
26 28
27 namespace Orthanc 29 namespace Orthanc
28 { 30 {
29 /** 31 /**
61 namespace OrthancDatabases 63 namespace OrthancDatabases
62 { 64 {
63 bool LookupGlobalProperty(std::string& target /* out */, 65 bool LookupGlobalProperty(std::string& target /* out */,
64 IDatabase& db, 66 IDatabase& db,
65 ITransaction& transaction, 67 ITransaction& transaction,
68 const std::string& serverIdentifier,
66 Orthanc::GlobalProperty property); 69 Orthanc::GlobalProperty property);
67 70
68 bool LookupGlobalProperty(std::string& target /* out */, 71 bool LookupGlobalProperty(std::string& target /* out */,
69 DatabaseManager& manager, 72 DatabaseManager& manager,
73 const std::string& serverIdentifier,
70 Orthanc::GlobalProperty property); 74 Orthanc::GlobalProperty property);
71 75
72 void SetGlobalProperty(IDatabase& db, 76 void SetGlobalProperty(IDatabase& db,
73 ITransaction& transaction, 77 ITransaction& transaction,
78 const std::string& serverIdentifier,
74 Orthanc::GlobalProperty property, 79 Orthanc::GlobalProperty property,
75 const std::string& utf8); 80 const std::string& utf8);
76 81
77 void SetGlobalProperty(DatabaseManager& manager, 82 void SetGlobalProperty(DatabaseManager& manager,
83 const std::string& serverIdentifier,
78 Orthanc::GlobalProperty property, 84 Orthanc::GlobalProperty property,
79 const std::string& utf8); 85 const std::string& utf8);
80 86
81 bool LookupGlobalIntegerProperty(int& target, 87 bool LookupGlobalIntegerProperty(int& target,
82 IDatabase& db, 88 IDatabase& db,
83 ITransaction& transaction, 89 ITransaction& transaction,
90 const std::string& serverIdentifier,
84 Orthanc::GlobalProperty property); 91 Orthanc::GlobalProperty property);
85 92
86 void SetGlobalIntegerProperty(IDatabase& db, 93 void SetGlobalIntegerProperty(IDatabase& db,
87 ITransaction& transaction, 94 ITransaction& transaction,
95 const std::string& serverIdentifier,
88 Orthanc::GlobalProperty property, 96 Orthanc::GlobalProperty property,
89 int value); 97 int value);
90 } 98 }