Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
zone-provision-config.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Contact: Mateusz Malicki <m.malicki2@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 
26 #ifndef SERVER_PROVISIONING_CONFIG_HPP
27 #define SERVER_PROVISIONING_CONFIG_HPP
28 
29 #include "cargo/fields.hpp"
30 #include "cargo/fields-union.hpp"
31 #include <string>
32 #include <vector>
33 
34 
35 namespace vasum {
36 
38 {
39 
40  struct File
41  {
42  std::int32_t type;
43  std::string path;
44  std::int32_t flags;
45  std::int32_t mode;
46 
48  (
49  type,
50  path,
51  flags,
52  mode
53  )
54  };
55 
56  struct Mount
57  {
58  std::string source;
59  std::string target;
60  std::string type;
61  std::int64_t flags;
62  std::string data;
63 
65  (
66  source,
67  target,
68  type,
69  flags,
70  data
71  )
72  };
73 
74  struct Link
75  {
76  std::string source;
77  std::string target;
78 
80  (
81  source,
82  target
83  )
84  };
85 
86  struct Provision
87  {
89  (
90  File,
91  Mount,
92  Link
93  )
94  };
95 
96  std::vector<Provision> provisions;
97 
99  (
100  provisions
101  )
102 };
103 
104 } // namespace vasum
105 
106 #endif // SERVER_PROVISIONING_CONFIG_HPP
Definition: zone-provision-config.hpp:40
Definition: zone-provision-config.hpp:86
#define CARGO_DECLARE_UNION(...)
Use this macro to declare and register cargo fields.
Definition: fields-union.hpp:107
Definition: zone-provision-config.hpp:37
std::string data
Definition: zone-provision-config.hpp:62
std::string type
Definition: zone-provision-config.hpp:60
std::string target
Definition: zone-provision-config.hpp:59
Definition: zone-provision-config.hpp:56
std::string path
Definition: zone-provision-config.hpp:43
std::int64_t flags
Definition: zone-provision-config.hpp:61
#define CARGO_REGISTER(...)
Registers cargo fields within class.
Definition: fields.hpp:74
std::int32_t mode
Definition: zone-provision-config.hpp:45
std::int32_t type
Definition: zone-provision-config.hpp:42
std::vector< Provision > provisions
Definition: zone-provision-config.hpp:96
Macros for declare cargo fields.
std::string source
Definition: zone-provision-config.hpp:58
std::int32_t flags
Definition: zone-provision-config.hpp:44