Add first version
[ric-plt/sdl.git] / include / private / namespaceconfiguration.hpp
1 /*
2    Copyright (c) 2018-2019 Nokia.
3
4    Licensed under the Apache License, Version 2.0 (the "License");
5    you may not use this file except in compliance with the License.
6    You may obtain a copy of the License at
7
8        http://www.apache.org/licenses/LICENSE-2.0
9
10    Unless required by applicable law or agreed to in writing, software
11    distributed under the License is distributed on an "AS IS" BASIS,
12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    See the License for the specific language governing permissions and
14    limitations under the License.
15 */
16
17 #ifndef SHAREDDATALAYER_NAMESPACECONFIGURATION_HPP_
18 #define SHAREDDATALAYER_NAMESPACECONFIGURATION_HPP_
19
20 #include <string>
21
22 namespace shareddatalayer
23 {
24     struct NamespaceConfiguration
25     {
26         const std::string namespacePrefix;
27         bool dbBackendIsUsed;
28         bool notificationsAreEnabled;
29         const std::string sourceName;
30
31         NamespaceConfiguration(const std::string& namespacePrefix,
32                                bool useDbBackend,
33                                bool enableNotifications,
34                                const std::string& sourceName):
35             namespacePrefix(namespacePrefix),
36             dbBackendIsUsed(useDbBackend),
37             notificationsAreEnabled(enableNotifications),
38             sourceName(sourceName)
39         {}
40
41         bool operator==(const NamespaceConfiguration& nc) const
42         {
43             return namespacePrefix == nc.namespacePrefix &&
44                    dbBackendIsUsed == nc.dbBackendIsUsed &&
45                    notificationsAreEnabled == nc.notificationsAreEnabled &&
46                    sourceName == nc.sourceName;
47         }
48     };
49 }
50
51 #endif