Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
process-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 PROCESS_CONFIG_HPP
26 #define PROCESS_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 UserConfig {
37 
41  int uid;
42  int gid;
43 
47  std::vector<int> additionalGids;
48 
50  (
51  uid,
52  gid,
54  )
55 };
56 
57 struct ProcessConfig {
58 
62  bool terminal;
63 
68 
72  std::vector<std::string> args;
73 
77  std::vector<std::string> env;
78 
82  std::string cwd;
83 
85  (
86  terminal,
87  user,
88  args,
89  env,
90  cwd
91  )
92 };
93 
94 } // namespace vasum
95 
96 
97 #endif // PROCESS_CONFIG_HPP
Definition: process-config.hpp:57
UserConfig user
which user the process runs as
Definition: process-config.hpp:67
std::vector< std::string > args
executable to launch and any flags
Definition: process-config.hpp:72
int gid
Definition: process-config.hpp:42
Configuration file for the code.
std::vector< int > additionalGids
specifies additional group ids to be added to the process
Definition: process-config.hpp:47
#define CARGO_REGISTER(...)
Registers cargo fields within class.
Definition: fields.hpp:74
std::string cwd
working directory that will be set for the executable
Definition: process-config.hpp:82
int uid
specifies the user/group id
Definition: process-config.hpp:41
std::vector< std::string > env
contains a list of variables that will be set in the process's environment
Definition: process-config.hpp:77
bool terminal
specifies whether you want a terminal attached to that process.
Definition: process-config.hpp:62
Definition: process-config.hpp:36