Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hooks-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 HOOKS_CONFIG_HPP
26 #define HOOKS_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 HookConfig {
37 
41  std::string path;
42 
46  std::vector<std::string> args;
47 
51  std::vector<std::string> env;
52 
54  (
55  path,
56  args,
57  env
58  )
59 };
60 
64 struct HooksConfig {
65 
69  std::vector<HookConfig> prestart;
70 
74  std::vector<HookConfig> poststart;
75 
79  std::vector<HookConfig> poststop;
80 
82  (
83  prestart,
84  poststart,
85  poststop
86  )
87 };
88 
89 } // namespace vasum
90 
91 
92 #endif // HOOKS_CONFIG_HPP
Configuration file for the code.
std::string path
specifies the path to hook
Definition: hooks-config.hpp:41
Definition: hooks-config.hpp:36
Hooks are a collection of actions to perform at various container lifecycle events.
Definition: hooks-config.hpp:64
#define CARGO_REGISTER(...)
Registers cargo fields within class.
Definition: fields.hpp:74
std::vector< HookConfig > poststart
list of hooks to be run immediately after the container process is started
Definition: hooks-config.hpp:74
std::vector< HookConfig > prestart
list of hooks to be run before the container process is executed
Definition: hooks-config.hpp:69
std::vector< std::string > env
contains a list of variables that will be set in the process's environment
Definition: hooks-config.hpp:51
std::vector< HookConfig > poststop
list of hooks to be run after the container process exits
Definition: hooks-config.hpp:79
std::vector< std::string > args
specifies hook arguments
Definition: hooks-config.hpp:46