Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
userns-config.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License version 2.1 as published by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  */
17 
24 #ifndef LXCPP_USERNS_CONFIG_HPP
25 #define LXCPP_USERNS_CONFIG_HPP
26 
27 #include "config.hpp"
28 #include "cargo/fields.hpp"
29 
30 #include <vector>
31 #include <string>
32 
33 
34 namespace lxcpp {
35 
36 
37 struct UserNSConfig {
38  // TODO: Replace UserNSMap with std::tuple
39  struct UserNSMap {
40  unsigned min;
41  unsigned max;
42  unsigned num;
43 
44  UserNSMap() = default;
45  UserNSMap(unsigned min, unsigned max, unsigned num)
46  : min(min), max(max), num(num) {}
47 
49  (
50  min,
51  max,
52  num
53  )
54  };
55 
56  std::vector<UserNSMap> mUIDMaps;
57  std::vector<UserNSMap> mGIDMaps;
58 
60  (
61  mUIDMaps,
62  mGIDMaps
63  )
64 };
65 
66 
67 } //namespace lxcpp
68 
69 
70 #endif // LXCPP_USERNS_CONFIG_HPP
std::vector< UserNSMap > mUIDMaps
Definition: userns-config.hpp:56
UserNSMap(unsigned min, unsigned max, unsigned num)
Definition: userns-config.hpp:45
Definition: userns-config.hpp:39
Configuration file for the code.
unsigned max
Definition: userns-config.hpp:41
#define CARGO_REGISTER(...)
Registers cargo fields within class.
Definition: fields.hpp:74
Definition: userns-config.hpp:37
unsigned min
Definition: userns-config.hpp:40
unsigned num
Definition: userns-config.hpp:42
std::vector< UserNSMap > mGIDMaps
Definition: userns-config.hpp:57