Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cgroup-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_CGROUPS_CGROUP_CONFIG_HPP
25 #define LXCPP_CGROUPS_CGROUP_CONFIG_HPP
26 
27 #include "cargo/fields.hpp"
28 
29 #include <string>
30 #include <vector>
31 
32 namespace lxcpp {
33 
35  std::string name;
36  std::string path;
37 
39  (
40  name,
41  path
42  )
43 };
44 
45 struct CGroupParam {
46  std::string name;
47  std::string value;
48 
50  (
51  name,
52  value
53  )
54 };
55 
56 struct CGroupConfig {
57  std::string subsystem;
58  std::string name;
59  std::vector<CGroupParam> common; // cgroup.*
60  std::vector<CGroupParam> params; // {name}.*
61 
63  (
64  subsystem,
65  name,
66  common,
67  params
68  )
69 };
70 
71 struct CGroupsConfig {
72  std::vector<SubsystemConfig> subsystems;
73  std::vector<CGroupConfig> cgroups;
74 
76  (
77  subsystems,
78  cgroups
79  )
80 };
81 
82 } // namespace lxcpp
83 
84 #endif //LXCPP_CGROUPS_CGROUP_CONFIG_HPP
std::string name
Definition: cgroup-config.hpp:35
std::vector< CGroupParam > common
Definition: cgroup-config.hpp:59
std::string name
Definition: cgroup-config.hpp:58
Definition: cgroup-config.hpp:71
std::vector< SubsystemConfig > subsystems
Definition: cgroup-config.hpp:72
std::string name
Definition: cgroup-config.hpp:46
std::string path
Definition: cgroup-config.hpp:36
#define CARGO_REGISTER(...)
Registers cargo fields within class.
Definition: fields.hpp:74
std::vector< CGroupConfig > cgroups
Definition: cgroup-config.hpp:73
Definition: cgroup-config.hpp:34
Definition: cgroup-config.hpp:45
std::string subsystem
Definition: cgroup-config.hpp:57
std::vector< CGroupParam > params
Definition: cgroup-config.hpp:60
std::string value
Definition: cgroup-config.hpp:47
Definition: cgroup-config.hpp:56