Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PFileSystemParams.h"
8 :
9 :
10 : //-----------------------------------------------------------------------------
11 : // Method definitions for the IPDL type |struct FileSystemGetDirectoryListingParams|
12 : //
13 : namespace mozilla {
14 : namespace dom {
15 0 : MOZ_IMPLICIT FileSystemGetDirectoryListingParams::FileSystemGetDirectoryListingParams() :
16 : filesystem_(),
17 : realPath_(),
18 : domPath_(),
19 0 : filters_()
20 : {
21 0 : Init();
22 0 : }
23 :
24 0 : FileSystemGetDirectoryListingParams::~FileSystemGetDirectoryListingParams()
25 : {
26 0 : }
27 :
28 0 : auto FileSystemGetDirectoryListingParams::operator==(const FileSystemGetDirectoryListingParams& _o) const -> bool
29 : {
30 0 : if ((!((filesystem()) == ((_o).filesystem())))) {
31 0 : return false;
32 : }
33 0 : if ((!((realPath()) == ((_o).realPath())))) {
34 0 : return false;
35 : }
36 0 : if ((!((domPath()) == ((_o).domPath())))) {
37 0 : return false;
38 : }
39 0 : if ((!((filters()) == ((_o).filters())))) {
40 0 : return false;
41 : }
42 0 : return true;
43 : }
44 :
45 0 : auto FileSystemGetDirectoryListingParams::operator!=(const FileSystemGetDirectoryListingParams& _o) const -> bool
46 : {
47 0 : return (!(operator==(_o)));
48 : }
49 :
50 0 : auto FileSystemGetDirectoryListingParams::Init() -> void
51 : {
52 0 : }
53 :
54 0 : auto FileSystemGetDirectoryListingParams::Assign(
55 : const nsString& _filesystem,
56 : const nsString& _realPath,
57 : const nsString& _domPath,
58 : const nsString& _filters) -> void
59 : {
60 0 : filesystem_ = _filesystem;
61 0 : realPath_ = _realPath;
62 0 : domPath_ = _domPath;
63 0 : filters_ = _filters;
64 0 : }
65 :
66 : } // namespace dom
67 : } // namespace mozilla
68 :
69 : //-----------------------------------------------------------------------------
70 : // Method definitions for the IPDL type |struct FileSystemGetFilesParams|
71 : //
72 : namespace mozilla {
73 : namespace dom {
74 0 : MOZ_IMPLICIT FileSystemGetFilesParams::FileSystemGetFilesParams() :
75 : filesystem_(),
76 : realPath_(),
77 : domPath_(),
78 0 : recursiveFlag_()
79 : {
80 0 : Init();
81 0 : }
82 :
83 0 : FileSystemGetFilesParams::~FileSystemGetFilesParams()
84 : {
85 0 : }
86 :
87 0 : auto FileSystemGetFilesParams::operator==(const FileSystemGetFilesParams& _o) const -> bool
88 : {
89 0 : if ((!((filesystem()) == ((_o).filesystem())))) {
90 0 : return false;
91 : }
92 0 : if ((!((realPath()) == ((_o).realPath())))) {
93 0 : return false;
94 : }
95 0 : if ((!((domPath()) == ((_o).domPath())))) {
96 0 : return false;
97 : }
98 0 : if ((!((recursiveFlag()) == ((_o).recursiveFlag())))) {
99 0 : return false;
100 : }
101 0 : return true;
102 : }
103 :
104 0 : auto FileSystemGetFilesParams::operator!=(const FileSystemGetFilesParams& _o) const -> bool
105 : {
106 0 : return (!(operator==(_o)));
107 : }
108 :
109 0 : auto FileSystemGetFilesParams::Init() -> void
110 : {
111 0 : }
112 :
113 0 : auto FileSystemGetFilesParams::Assign(
114 : const nsString& _filesystem,
115 : const nsString& _realPath,
116 : const nsString& _domPath,
117 : const bool& _recursiveFlag) -> void
118 : {
119 0 : filesystem_ = _filesystem;
120 0 : realPath_ = _realPath;
121 0 : domPath_ = _domPath;
122 0 : recursiveFlag_ = _recursiveFlag;
123 0 : }
124 :
125 : } // namespace dom
126 : } // namespace mozilla
127 :
128 : //-----------------------------------------------------------------------------
129 : // Method definitions for the IPDL type |struct FileSystemGetFileOrDirectoryParams|
130 : //
131 : namespace mozilla {
132 : namespace dom {
133 0 : MOZ_IMPLICIT FileSystemGetFileOrDirectoryParams::FileSystemGetFileOrDirectoryParams() :
134 : filesystem_(),
135 0 : realPath_()
136 : {
137 0 : Init();
138 0 : }
139 :
140 0 : FileSystemGetFileOrDirectoryParams::~FileSystemGetFileOrDirectoryParams()
141 : {
142 0 : }
143 :
144 0 : auto FileSystemGetFileOrDirectoryParams::operator==(const FileSystemGetFileOrDirectoryParams& _o) const -> bool
145 : {
146 0 : if ((!((filesystem()) == ((_o).filesystem())))) {
147 0 : return false;
148 : }
149 0 : if ((!((realPath()) == ((_o).realPath())))) {
150 0 : return false;
151 : }
152 0 : return true;
153 : }
154 :
155 0 : auto FileSystemGetFileOrDirectoryParams::operator!=(const FileSystemGetFileOrDirectoryParams& _o) const -> bool
156 : {
157 0 : return (!(operator==(_o)));
158 : }
159 :
160 0 : auto FileSystemGetFileOrDirectoryParams::Init() -> void
161 : {
162 0 : }
163 :
164 0 : auto FileSystemGetFileOrDirectoryParams::Assign(
165 : const nsString& _filesystem,
166 : const nsString& _realPath) -> void
167 : {
168 0 : filesystem_ = _filesystem;
169 0 : realPath_ = _realPath;
170 0 : }
171 :
172 : } // namespace dom
173 : } // namespace mozilla
174 :
175 : //-----------------------------------------------------------------------------
176 : // Method definitions for the IPDL type |union FileSystemParams|
177 : //
178 : namespace mozilla {
179 : namespace dom {
180 0 : auto FileSystemParams::MaybeDestroy(Type aNewType) -> bool
181 : {
182 0 : if ((mType) == (T__None)) {
183 0 : return true;
184 : }
185 0 : if ((mType) == (aNewType)) {
186 0 : return false;
187 : }
188 0 : switch (mType) {
189 : case TFileSystemGetDirectoryListingParams:
190 : {
191 0 : (ptr_FileSystemGetDirectoryListingParams())->~FileSystemGetDirectoryListingParams__tdef();
192 0 : break;
193 : }
194 : case TFileSystemGetFilesParams:
195 : {
196 0 : (ptr_FileSystemGetFilesParams())->~FileSystemGetFilesParams__tdef();
197 0 : break;
198 : }
199 : case TFileSystemGetFileOrDirectoryParams:
200 : {
201 0 : (ptr_FileSystemGetFileOrDirectoryParams())->~FileSystemGetFileOrDirectoryParams__tdef();
202 0 : break;
203 : }
204 : default:
205 : {
206 0 : mozilla::ipc::LogicError("not reached");
207 0 : break;
208 : }
209 : }
210 0 : return true;
211 : }
212 :
213 0 : MOZ_IMPLICIT FileSystemParams::FileSystemParams(const FileSystemGetDirectoryListingParams& aOther)
214 : {
215 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams(aOther);
216 0 : mType = TFileSystemGetDirectoryListingParams;
217 0 : }
218 :
219 0 : MOZ_IMPLICIT FileSystemParams::FileSystemParams(const FileSystemGetFilesParams& aOther)
220 : {
221 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams(aOther);
222 0 : mType = TFileSystemGetFilesParams;
223 0 : }
224 :
225 0 : MOZ_IMPLICIT FileSystemParams::FileSystemParams(const FileSystemGetFileOrDirectoryParams& aOther)
226 : {
227 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams(aOther);
228 0 : mType = TFileSystemGetFileOrDirectoryParams;
229 0 : }
230 :
231 0 : MOZ_IMPLICIT FileSystemParams::FileSystemParams(const FileSystemParams& aOther)
232 : {
233 0 : (aOther).AssertSanity();
234 0 : switch ((aOther).type()) {
235 : case TFileSystemGetDirectoryListingParams:
236 : {
237 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams((aOther).get_FileSystemGetDirectoryListingParams());
238 0 : break;
239 : }
240 : case TFileSystemGetFilesParams:
241 : {
242 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams((aOther).get_FileSystemGetFilesParams());
243 0 : break;
244 : }
245 : case TFileSystemGetFileOrDirectoryParams:
246 : {
247 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams((aOther).get_FileSystemGetFileOrDirectoryParams());
248 0 : break;
249 : }
250 : case T__None:
251 : {
252 0 : break;
253 : }
254 : default:
255 : {
256 0 : mozilla::ipc::LogicError("unreached");
257 0 : return;
258 : }
259 : }
260 0 : mType = (aOther).type();
261 : }
262 :
263 0 : FileSystemParams::~FileSystemParams()
264 : {
265 0 : static_cast<void>(MaybeDestroy(T__None));
266 0 : }
267 :
268 0 : auto FileSystemParams::operator=(const FileSystemGetDirectoryListingParams& aRhs) -> FileSystemParams&
269 : {
270 0 : if (MaybeDestroy(TFileSystemGetDirectoryListingParams)) {
271 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams;
272 : }
273 0 : (*(ptr_FileSystemGetDirectoryListingParams())) = aRhs;
274 0 : mType = TFileSystemGetDirectoryListingParams;
275 0 : return (*(this));
276 : }
277 :
278 0 : auto FileSystemParams::operator=(const FileSystemGetFilesParams& aRhs) -> FileSystemParams&
279 : {
280 0 : if (MaybeDestroy(TFileSystemGetFilesParams)) {
281 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams;
282 : }
283 0 : (*(ptr_FileSystemGetFilesParams())) = aRhs;
284 0 : mType = TFileSystemGetFilesParams;
285 0 : return (*(this));
286 : }
287 :
288 0 : auto FileSystemParams::operator=(const FileSystemGetFileOrDirectoryParams& aRhs) -> FileSystemParams&
289 : {
290 0 : if (MaybeDestroy(TFileSystemGetFileOrDirectoryParams)) {
291 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams;
292 : }
293 0 : (*(ptr_FileSystemGetFileOrDirectoryParams())) = aRhs;
294 0 : mType = TFileSystemGetFileOrDirectoryParams;
295 0 : return (*(this));
296 : }
297 :
298 0 : auto FileSystemParams::operator=(const FileSystemParams& aRhs) -> FileSystemParams&
299 : {
300 0 : (aRhs).AssertSanity();
301 0 : Type t = (aRhs).type();
302 0 : switch (t) {
303 : case TFileSystemGetDirectoryListingParams:
304 : {
305 0 : if (MaybeDestroy(t)) {
306 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams;
307 : }
308 0 : (*(ptr_FileSystemGetDirectoryListingParams())) = (aRhs).get_FileSystemGetDirectoryListingParams();
309 0 : break;
310 : }
311 : case TFileSystemGetFilesParams:
312 : {
313 0 : if (MaybeDestroy(t)) {
314 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams;
315 : }
316 0 : (*(ptr_FileSystemGetFilesParams())) = (aRhs).get_FileSystemGetFilesParams();
317 0 : break;
318 : }
319 : case TFileSystemGetFileOrDirectoryParams:
320 : {
321 0 : if (MaybeDestroy(t)) {
322 0 : new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams;
323 : }
324 0 : (*(ptr_FileSystemGetFileOrDirectoryParams())) = (aRhs).get_FileSystemGetFileOrDirectoryParams();
325 0 : break;
326 : }
327 : case T__None:
328 : {
329 0 : static_cast<void>(MaybeDestroy(t));
330 0 : break;
331 : }
332 : default:
333 : {
334 0 : mozilla::ipc::LogicError("unreached");
335 0 : break;
336 : }
337 : }
338 0 : mType = t;
339 0 : return (*(this));
340 : }
341 :
342 0 : auto FileSystemParams::operator==(const FileSystemGetDirectoryListingParams& aRhs) const -> bool
343 : {
344 0 : return (get_FileSystemGetDirectoryListingParams()) == (aRhs);
345 : }
346 :
347 0 : auto FileSystemParams::operator==(const FileSystemGetFilesParams& aRhs) const -> bool
348 : {
349 0 : return (get_FileSystemGetFilesParams()) == (aRhs);
350 : }
351 :
352 0 : auto FileSystemParams::operator==(const FileSystemGetFileOrDirectoryParams& aRhs) const -> bool
353 : {
354 0 : return (get_FileSystemGetFileOrDirectoryParams()) == (aRhs);
355 : }
356 :
357 0 : auto FileSystemParams::operator==(const FileSystemParams& aRhs) const -> bool
358 : {
359 0 : if ((type()) != ((aRhs).type())) {
360 0 : return false;
361 : }
362 :
363 0 : switch (type()) {
364 : case TFileSystemGetDirectoryListingParams:
365 : {
366 0 : return (get_FileSystemGetDirectoryListingParams()) == ((aRhs).get_FileSystemGetDirectoryListingParams());
367 : }
368 : case TFileSystemGetFilesParams:
369 : {
370 0 : return (get_FileSystemGetFilesParams()) == ((aRhs).get_FileSystemGetFilesParams());
371 : }
372 : case TFileSystemGetFileOrDirectoryParams:
373 : {
374 0 : return (get_FileSystemGetFileOrDirectoryParams()) == ((aRhs).get_FileSystemGetFileOrDirectoryParams());
375 : }
376 : default:
377 : {
378 0 : mozilla::ipc::LogicError("unreached");
379 0 : return false;
380 : }
381 : }
382 : }
383 :
384 0 : auto FileSystemParams::get(FileSystemGetDirectoryListingParams* aOutValue) const -> void
385 : {
386 0 : (*(aOutValue)) = get_FileSystemGetDirectoryListingParams();
387 0 : }
388 :
389 0 : auto FileSystemParams::get(FileSystemGetFilesParams* aOutValue) const -> void
390 : {
391 0 : (*(aOutValue)) = get_FileSystemGetFilesParams();
392 0 : }
393 :
394 0 : auto FileSystemParams::get(FileSystemGetFileOrDirectoryParams* aOutValue) const -> void
395 : {
396 0 : (*(aOutValue)) = get_FileSystemGetFileOrDirectoryParams();
397 0 : }
398 :
399 : } // namespace dom
400 : } // namespace mozilla
|