Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
messages.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Contact: Jan Olszak (j.olszak@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 COMMON_API_MESSAGES
27 #define COMMON_API_MESSAGES
28 
29 #include "cargo/fields.hpp"
30 #include <string>
31 #include <vector>
32 
33 namespace vasum {
34 namespace api {
35 
36 struct Void {
38 };
39 
40 struct String {
41  std::string value;
42 
44  (
45  value
46  )
47 };
48 
49 struct StringPair {
50  std::string first;
51  std::string second;
52 
54  (
55  first,
56  second
57  )
58 };
59 
61  std::vector<std::string> values;
62 
64  (
65  values
66  )
67 };
68 
70  std::vector<api::StringPair> values;
71 
73  (
74  values
75  )
76 };
77 
92 
93 struct ZoneInfoOut {
94  std::string id;
95  int vt;
96  std::string state;
97  std::string rootPath;
98 
100  (
101  id,
102  vt,
103  state,
104  rootPath
105  )
106 };
107 
109  std::string id; // Zone's id
110  std::string netDev;
111  std::vector<StringPair> attrs;
112 
114  (
115  id,
116  netDev,
117  attrs
118  )
119 };
120 
122  std::string id;
123  std::string zoneDev;
124  std::string hostDev;
125 
127  (
128  id,
129  zoneDev,
130  hostDev
131  )
132 };
133 
135  std::string id;
136  std::string zoneDev;
137  std::string hostDev;
138  uint32_t mode;
139 
141  (
142  id,
143  zoneDev,
144  hostDev,
145  mode
146  )
147 };
148 
150  std::string zone;
151  std::string netdev;
152  std::string ip;
153 
155  (
156  zone,
157  netdev,
158  ip
159  )
160 };
161 
163  std::string zone;
164  int32_t type;
165  std::string path;
166  int32_t flags;
167  int32_t mode;
168 
170  (
171  zone,
172  type,
173  path,
174  flags,
175  mode
176  )
177 };
178 
180  std::string source;
181  std::string zone;
182  std::string target;
183  std::string type;
184  uint64_t flags;
185  std::string data;
186 
188  (
189  source,
190  zone,
191  target,
192  type,
193  flags,
194  data
195  )
196 };
197 
199  std::string source;
200  std::string zone;
201  std::string target;
202 
204  (
205  source,
206  zone,
207  target
208  )
209 };
210 
212  std::string id;
213  std::string device;
214  uint32_t flags;
215 
217  (
218  id,
219  device,
220  flags
221  )
222 };
223 
224 struct CreateFileIn {
225  std::string id;
226  std::string path;
227  int32_t flags;
228  int32_t mode;
230  (
231  id,
232  path,
233  flags,
234  mode
235  )
236 };
237 
241  (
242  fd
243  )
244 };
245 
246 } // namespace api
247 } // namespace vasum
248 
249 #endif // COMMON_API_MESSAGES
api::StringPair ConnectionState
Definition: messages.hpp:86
api::VectorOfStringPairs GetNetDevAttrs
Definition: messages.hpp:91
std::vector< std::string > values
Definition: messages.hpp:61
Definition: messages.hpp:93
std::string value
Definition: messages.hpp:41
std::string path
Definition: messages.hpp:226
api::StringPair DestroyNetDevIn
Definition: messages.hpp:85
api::StringPair RevokeDeviceIn
Definition: messages.hpp:84
#define CARGO_REGISTER_EMPTY
Register empty cargo class.
Definition: fields.hpp:42
std::string hostDev
Definition: messages.hpp:124
api::VectorOfStrings ZoneIds
Definition: messages.hpp:87
std::string rootPath
Definition: messages.hpp:97
std::string source
Definition: messages.hpp:199
api::String Declaration
Definition: messages.hpp:79
Definition: messages.hpp:36
Whenever possible, this type will be serialized using Linux file descriptor passing.
Definition: types.hpp:33
api::VectorOfStrings NetDevList
Definition: messages.hpp:89
Definition: messages.hpp:69
std::string type
Definition: messages.hpp:183
Definition: messages.hpp:179
std::string id
Definition: messages.hpp:212
int32_t flags
Definition: messages.hpp:227
std::string state
Definition: messages.hpp:96
Definition: messages.hpp:40
std::string zone
Definition: messages.hpp:181
std::string path
Definition: messages.hpp:165
int vt
Definition: messages.hpp:95
int32_t mode
Definition: messages.hpp:167
std::string zone
Definition: messages.hpp:150
std::string first
Definition: messages.hpp:50
api::StringPair GetNetDevAttrsIn
Definition: messages.hpp:80
std::string id
Definition: messages.hpp:109
std::string id
Definition: messages.hpp:122
std::string id
Definition: messages.hpp:135
int32_t mode
Definition: messages.hpp:228
std::string zoneDev
Definition: messages.hpp:123
api::StringPair CreateZoneIn
Definition: messages.hpp:83
std::string data
Definition: messages.hpp:185
std::string ip
Definition: messages.hpp:152
std::string zone
Definition: messages.hpp:163
int32_t type
Definition: messages.hpp:164
std::vector< StringPair > attrs
Definition: messages.hpp:111
uint64_t flags
Definition: messages.hpp:184
api::StringPair CreateNetDevPhysIn
Definition: messages.hpp:81
int32_t flags
Definition: messages.hpp:166
std::string second
Definition: messages.hpp:51
std::string id
Definition: messages.hpp:94
#define CARGO_REGISTER(...)
Registers cargo fields within class.
Definition: fields.hpp:74
Definition: messages.hpp:149
Definition: messages.hpp:224
Definition: messages.hpp:108
Definition: messages.hpp:49
std::string id
Definition: messages.hpp:225
Definition: messages.hpp:121
Definition: messages.hpp:211
uint32_t mode
Definition: messages.hpp:138
std::string netDev
Definition: messages.hpp:110
Definition: messages.hpp:198
std::string target
Definition: messages.hpp:201
std::string target
Definition: messages.hpp:182
api::VectorOfStrings Declarations
Definition: messages.hpp:88
api::StringPair RemoveDeclarationIn
Definition: messages.hpp:82
std::string zoneDev
Definition: messages.hpp:136
std::string hostDev
Definition: messages.hpp:137
std::string device
Definition: messages.hpp:213
uint32_t flags
Definition: messages.hpp:214
api::VectorOfStringPairs Connections
Definition: messages.hpp:90
::cargo::FileDescriptor fd
Definition: messages.hpp:239
Definition: messages.hpp:238
std::string netdev
Definition: messages.hpp:151
std::string zone
Definition: messages.hpp:200
std::string source
Definition: messages.hpp:180
Definition: messages.hpp:162
Definition: messages.hpp:60
api::String ZoneId
Definition: messages.hpp:78
Definition: messages.hpp:134
std::vector< api::StringPair > values
Definition: messages.hpp:70