Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
devices-config.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Contact: Dariusz Michaluk <d.michaluk@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 
25 #ifndef DEVICES_CONFIG_HPP
26 #define DEVICES_CONFIG_HPP
27 
28 #include "config.hpp"
29 #include "cargo/fields.hpp"
30 
31 #include <string>
32 #include <vector>
33 
34 namespace vasum {
35 
36 struct DeviceConfig {
37 
41  std::string path;
42 
46  char type;
47 
51  int64_t major;
52  int64_t minor;
53 
57  std::string permissions;
58 
62  uint32_t fileMode;
63 
67  uint32_t uid;
68  uint32_t gid;
69 
71  (
72  path,
73  type,
74  major,
75  minor,
77  fileMode,
78  uid,
79  gid
80  )
81 };
82 
83 typedef std::vector<DeviceConfig> DevicesConfig;
84 
85 } // namespace vasum
86 
87 
88 #endif // DEVICES_CONFIG_HPP
char type
Device type, block, char, etc.
Definition: devices-config.hpp:46
uint32_t gid
Definition: devices-config.hpp:68
Configuration file for the code.
Definition: devices-config.hpp:36
uint32_t uid
UID, GID of the device owner.
Definition: devices-config.hpp:67
#define CARGO_REGISTER(...)
Registers cargo fields within class.
Definition: fields.hpp:74
std::vector< DeviceConfig > DevicesConfig
Definition: devices-config.hpp:83
int64_t minor
Definition: devices-config.hpp:52
std::string path
Full path to the device inside container.
Definition: devices-config.hpp:41
std::string permissions
Cgroup permissions format, rwm.
Definition: devices-config.hpp:57
uint32_t fileMode
File mode permission bits for the device.
Definition: devices-config.hpp:62
int64_t major
Device's major, minor number.
Definition: devices-config.hpp:51