310dca3d4dcd78a780ab490019efcca81698228e
[platform/core/security/vasum.git] / server / containers-manager-config.hpp
1 /*
2  *  Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Contact: Jan Olszak <j.olszak@samsung.com>
5  *
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License
17  */
18
19 /**
20  * @file
21  * @author  Jan Olszak (j.olszak@samsung.com)
22  * @brief   Declaration of the class for storing container manager configuration
23  */
24
25
26 #ifndef SERVER_CONTAINERS_MANAGER_CONFIG_HPP
27 #define SERVER_CONTAINERS_MANAGER_CONFIG_HPP
28
29 #include "config/fields.hpp"
30 #include "input-monitor-config.hpp"
31 #include "proxy-call-config.hpp"
32
33 #include <string>
34 #include <vector>
35
36
37 namespace security_containers {
38
39
40 const std::string CONTAINERS_MANAGER_CONFIG_PATH = "/etc/security-containers/config/daemon.conf";
41
42 struct ContainersManagerConfig {
43
44     /**
45      * List of containers' configs that we manage.
46      * File paths can be relative to the ContainerManager config file.
47      */
48     std::vector<std::string> containerConfigs;
49
50     /**
51      * An ID of a currently focused/foreground container.
52      */
53     std::string foregroundId;
54
55     /**
56      * An ID of default container.
57      */
58     std::string defaultId;
59
60     /**
61      * A path where the containers mount points reside.
62      */
63     std::string containersPath;
64
65     /*
66      * Parameters describing input device used to switch between containers
67      */
68     InputConfig inputConfig;
69
70     /**
71      * Prefix added to a path of "run" tmpfs mount point for each container.
72      */
73     std::string runMountPointPrefix;
74
75     /**
76      * Proxy call rules.
77      */
78     std::vector<ProxyCallRule> proxyCallRules;
79
80     CONFIG_REGISTER
81     (
82         containerConfigs,
83         foregroundId,
84         defaultId,
85         containersPath,
86         inputConfig,
87         runMountPointPrefix,
88         proxyCallRules
89     )
90 };
91
92
93 } // namespace security_containers
94
95
96 #endif // SERVER_CONTAINERS_MANAGER_CONFIG_HPP