Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/IPCBlob.h"
8 :
9 :
10 : //-----------------------------------------------------------------------------
11 : // Method definitions for the IPDL type |struct IPCFile|
12 : //
13 : namespace mozilla {
14 : namespace dom {
15 0 : MOZ_IMPLICIT IPCFile::IPCFile() :
16 : name_(),
17 : lastModified_(),
18 : DOMPath_(),
19 : fullPath_(),
20 0 : isDirectory_()
21 : {
22 0 : Init();
23 0 : }
24 :
25 0 : IPCFile::~IPCFile()
26 : {
27 0 : }
28 :
29 0 : auto IPCFile::operator==(const IPCFile& _o) const -> bool
30 : {
31 0 : if ((!((name()) == ((_o).name())))) {
32 0 : return false;
33 : }
34 0 : if ((!((lastModified()) == ((_o).lastModified())))) {
35 0 : return false;
36 : }
37 0 : if ((!((DOMPath()) == ((_o).DOMPath())))) {
38 0 : return false;
39 : }
40 0 : if ((!((fullPath()) == ((_o).fullPath())))) {
41 0 : return false;
42 : }
43 0 : if ((!((isDirectory()) == ((_o).isDirectory())))) {
44 0 : return false;
45 : }
46 0 : return true;
47 : }
48 :
49 0 : auto IPCFile::operator!=(const IPCFile& _o) const -> bool
50 : {
51 0 : return (!(operator==(_o)));
52 : }
53 :
54 0 : auto IPCFile::Init() -> void
55 : {
56 0 : }
57 :
58 0 : auto IPCFile::Assign(
59 : const nsString& _name,
60 : const int64_t& _lastModified,
61 : const nsString& _DOMPath,
62 : const nsString& _fullPath,
63 : const bool& _isDirectory) -> void
64 : {
65 0 : name_ = _name;
66 0 : lastModified_ = _lastModified;
67 0 : DOMPath_ = _DOMPath;
68 0 : fullPath_ = _fullPath;
69 0 : isDirectory_ = _isDirectory;
70 0 : }
71 :
72 : } // namespace dom
73 : } // namespace mozilla
74 :
75 : //-----------------------------------------------------------------------------
76 : // Method definitions for the IPDL type |union IPCFileUnion|
77 : //
78 : namespace mozilla {
79 : namespace dom {
80 0 : auto IPCFileUnion::MaybeDestroy(Type aNewType) -> bool
81 : {
82 0 : if ((mType) == (T__None)) {
83 0 : return true;
84 : }
85 0 : if ((mType) == (aNewType)) {
86 0 : return false;
87 : }
88 0 : switch (mType) {
89 : case Tvoid_t:
90 : {
91 0 : (ptr_void_t())->~void_t__tdef();
92 0 : break;
93 : }
94 : case TIPCFile:
95 : {
96 0 : (ptr_IPCFile())->~IPCFile__tdef();
97 0 : break;
98 : }
99 : default:
100 : {
101 0 : mozilla::ipc::LogicError("not reached");
102 0 : break;
103 : }
104 : }
105 0 : return true;
106 : }
107 :
108 0 : MOZ_IMPLICIT IPCFileUnion::IPCFileUnion(const void_t& aOther)
109 : {
110 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther);
111 0 : mType = Tvoid_t;
112 0 : }
113 :
114 0 : MOZ_IMPLICIT IPCFileUnion::IPCFileUnion(const IPCFile& aOther)
115 : {
116 0 : new (mozilla::KnownNotNull, ptr_IPCFile()) IPCFile(aOther);
117 0 : mType = TIPCFile;
118 0 : }
119 :
120 0 : MOZ_IMPLICIT IPCFileUnion::IPCFileUnion(const IPCFileUnion& aOther)
121 : {
122 0 : (aOther).AssertSanity();
123 0 : switch ((aOther).type()) {
124 : case Tvoid_t:
125 : {
126 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t());
127 0 : break;
128 : }
129 : case TIPCFile:
130 : {
131 0 : new (mozilla::KnownNotNull, ptr_IPCFile()) IPCFile((aOther).get_IPCFile());
132 0 : break;
133 : }
134 : case T__None:
135 : {
136 0 : break;
137 : }
138 : default:
139 : {
140 0 : mozilla::ipc::LogicError("unreached");
141 0 : return;
142 : }
143 : }
144 0 : mType = (aOther).type();
145 : }
146 :
147 0 : IPCFileUnion::~IPCFileUnion()
148 : {
149 0 : static_cast<void>(MaybeDestroy(T__None));
150 0 : }
151 :
152 0 : auto IPCFileUnion::operator=(const void_t& aRhs) -> IPCFileUnion&
153 : {
154 0 : if (MaybeDestroy(Tvoid_t)) {
155 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t;
156 : }
157 0 : (*(ptr_void_t())) = aRhs;
158 0 : mType = Tvoid_t;
159 0 : return (*(this));
160 : }
161 :
162 0 : auto IPCFileUnion::operator=(const IPCFile& aRhs) -> IPCFileUnion&
163 : {
164 0 : if (MaybeDestroy(TIPCFile)) {
165 0 : new (mozilla::KnownNotNull, ptr_IPCFile()) IPCFile;
166 : }
167 0 : (*(ptr_IPCFile())) = aRhs;
168 0 : mType = TIPCFile;
169 0 : return (*(this));
170 : }
171 :
172 0 : auto IPCFileUnion::operator=(const IPCFileUnion& aRhs) -> IPCFileUnion&
173 : {
174 0 : (aRhs).AssertSanity();
175 0 : Type t = (aRhs).type();
176 0 : switch (t) {
177 : case Tvoid_t:
178 : {
179 0 : if (MaybeDestroy(t)) {
180 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t;
181 : }
182 0 : (*(ptr_void_t())) = (aRhs).get_void_t();
183 0 : break;
184 : }
185 : case TIPCFile:
186 : {
187 0 : if (MaybeDestroy(t)) {
188 0 : new (mozilla::KnownNotNull, ptr_IPCFile()) IPCFile;
189 : }
190 0 : (*(ptr_IPCFile())) = (aRhs).get_IPCFile();
191 0 : break;
192 : }
193 : case T__None:
194 : {
195 0 : static_cast<void>(MaybeDestroy(t));
196 0 : break;
197 : }
198 : default:
199 : {
200 0 : mozilla::ipc::LogicError("unreached");
201 0 : break;
202 : }
203 : }
204 0 : mType = t;
205 0 : return (*(this));
206 : }
207 :
208 0 : auto IPCFileUnion::operator==(const void_t& aRhs) const -> bool
209 : {
210 0 : return (get_void_t()) == (aRhs);
211 : }
212 :
213 0 : auto IPCFileUnion::operator==(const IPCFile& aRhs) const -> bool
214 : {
215 0 : return (get_IPCFile()) == (aRhs);
216 : }
217 :
218 0 : auto IPCFileUnion::operator==(const IPCFileUnion& aRhs) const -> bool
219 : {
220 0 : if ((type()) != ((aRhs).type())) {
221 0 : return false;
222 : }
223 :
224 0 : switch (type()) {
225 : case Tvoid_t:
226 : {
227 0 : return (get_void_t()) == ((aRhs).get_void_t());
228 : }
229 : case TIPCFile:
230 : {
231 0 : return (get_IPCFile()) == ((aRhs).get_IPCFile());
232 : }
233 : default:
234 : {
235 0 : mozilla::ipc::LogicError("unreached");
236 0 : return false;
237 : }
238 : }
239 : }
240 :
241 0 : auto IPCFileUnion::get(void_t* aOutValue) const -> void
242 : {
243 0 : (*(aOutValue)) = get_void_t();
244 0 : }
245 :
246 0 : auto IPCFileUnion::get(IPCFile* aOutValue) const -> void
247 : {
248 0 : (*(aOutValue)) = get_IPCFile();
249 0 : }
250 :
251 : } // namespace dom
252 : } // namespace mozilla
253 :
254 : //-----------------------------------------------------------------------------
255 : // Method definitions for the IPDL type |union IPCBlobStream|
256 : //
257 : namespace mozilla {
258 : namespace dom {
259 0 : auto IPCBlobStream::MaybeDestroy(Type aNewType) -> bool
260 : {
261 0 : if ((mType) == (T__None)) {
262 0 : return true;
263 : }
264 0 : if ((mType) == (aNewType)) {
265 0 : return false;
266 : }
267 0 : switch (mType) {
268 : case TPIPCBlobInputStreamParent:
269 : {
270 0 : (ptr_PIPCBlobInputStreamParent())->~PIPCBlobInputStreamParent__tdef();
271 0 : break;
272 : }
273 : case TPIPCBlobInputStreamChild:
274 : {
275 0 : (ptr_PIPCBlobInputStreamChild())->~PIPCBlobInputStreamChild__tdef();
276 0 : break;
277 : }
278 : case TIPCStream:
279 : {
280 0 : (ptr_IPCStream())->~IPCStream__tdef();
281 0 : break;
282 : }
283 : default:
284 : {
285 0 : mozilla::ipc::LogicError("not reached");
286 0 : break;
287 : }
288 : }
289 0 : return true;
290 : }
291 :
292 0 : MOZ_IMPLICIT IPCBlobStream::IPCBlobStream(PIPCBlobInputStreamParent* aOther)
293 : {
294 0 : new (mozilla::KnownNotNull, ptr_PIPCBlobInputStreamParent()) PIPCBlobInputStreamParent*(const_cast<PIPCBlobInputStreamParent*>(aOther));
295 0 : mType = TPIPCBlobInputStreamParent;
296 0 : }
297 :
298 0 : MOZ_IMPLICIT IPCBlobStream::IPCBlobStream(PIPCBlobInputStreamChild* aOther)
299 : {
300 0 : new (mozilla::KnownNotNull, ptr_PIPCBlobInputStreamChild()) PIPCBlobInputStreamChild*(const_cast<PIPCBlobInputStreamChild*>(aOther));
301 0 : mType = TPIPCBlobInputStreamChild;
302 0 : }
303 :
304 0 : MOZ_IMPLICIT IPCBlobStream::IPCBlobStream(const IPCStream& aOther)
305 : {
306 0 : new (mozilla::KnownNotNull, ptr_IPCStream()) IPCStream(aOther);
307 0 : mType = TIPCStream;
308 0 : }
309 :
310 0 : MOZ_IMPLICIT IPCBlobStream::IPCBlobStream(const IPCBlobStream& aOther)
311 : {
312 0 : (aOther).AssertSanity();
313 0 : switch ((aOther).type()) {
314 : case TPIPCBlobInputStreamParent:
315 : {
316 0 : new (mozilla::KnownNotNull, ptr_PIPCBlobInputStreamParent()) PIPCBlobInputStreamParent*(const_cast<PIPCBlobInputStreamParent*>((aOther).get_PIPCBlobInputStreamParent()));
317 0 : break;
318 : }
319 : case TPIPCBlobInputStreamChild:
320 : {
321 0 : new (mozilla::KnownNotNull, ptr_PIPCBlobInputStreamChild()) PIPCBlobInputStreamChild*(const_cast<PIPCBlobInputStreamChild*>((aOther).get_PIPCBlobInputStreamChild()));
322 0 : break;
323 : }
324 : case TIPCStream:
325 : {
326 0 : new (mozilla::KnownNotNull, ptr_IPCStream()) IPCStream((aOther).get_IPCStream());
327 0 : break;
328 : }
329 : case T__None:
330 : {
331 0 : break;
332 : }
333 : default:
334 : {
335 0 : mozilla::ipc::LogicError("unreached");
336 0 : return;
337 : }
338 : }
339 0 : mType = (aOther).type();
340 : }
341 :
342 0 : IPCBlobStream::~IPCBlobStream()
343 : {
344 0 : static_cast<void>(MaybeDestroy(T__None));
345 0 : }
346 :
347 0 : auto IPCBlobStream::operator=(PIPCBlobInputStreamParent* aRhs) -> IPCBlobStream&
348 : {
349 0 : if (MaybeDestroy(TPIPCBlobInputStreamParent)) {
350 0 : new (mozilla::KnownNotNull, ptr_PIPCBlobInputStreamParent()) PIPCBlobInputStreamParent*;
351 : }
352 0 : (*(ptr_PIPCBlobInputStreamParent())) = const_cast<PIPCBlobInputStreamParent*>(aRhs);
353 0 : mType = TPIPCBlobInputStreamParent;
354 0 : return (*(this));
355 : }
356 :
357 0 : auto IPCBlobStream::operator=(PIPCBlobInputStreamChild* aRhs) -> IPCBlobStream&
358 : {
359 0 : if (MaybeDestroy(TPIPCBlobInputStreamChild)) {
360 0 : new (mozilla::KnownNotNull, ptr_PIPCBlobInputStreamChild()) PIPCBlobInputStreamChild*;
361 : }
362 0 : (*(ptr_PIPCBlobInputStreamChild())) = const_cast<PIPCBlobInputStreamChild*>(aRhs);
363 0 : mType = TPIPCBlobInputStreamChild;
364 0 : return (*(this));
365 : }
366 :
367 0 : auto IPCBlobStream::operator=(const IPCStream& aRhs) -> IPCBlobStream&
368 : {
369 0 : if (MaybeDestroy(TIPCStream)) {
370 0 : new (mozilla::KnownNotNull, ptr_IPCStream()) IPCStream;
371 : }
372 0 : (*(ptr_IPCStream())) = aRhs;
373 0 : mType = TIPCStream;
374 0 : return (*(this));
375 : }
376 :
377 0 : auto IPCBlobStream::operator=(const IPCBlobStream& aRhs) -> IPCBlobStream&
378 : {
379 0 : (aRhs).AssertSanity();
380 0 : Type t = (aRhs).type();
381 0 : switch (t) {
382 : case TPIPCBlobInputStreamParent:
383 : {
384 0 : if (MaybeDestroy(t)) {
385 0 : new (mozilla::KnownNotNull, ptr_PIPCBlobInputStreamParent()) PIPCBlobInputStreamParent*;
386 : }
387 0 : (*(ptr_PIPCBlobInputStreamParent())) = const_cast<PIPCBlobInputStreamParent*>((aRhs).get_PIPCBlobInputStreamParent());
388 0 : break;
389 : }
390 : case TPIPCBlobInputStreamChild:
391 : {
392 0 : if (MaybeDestroy(t)) {
393 0 : new (mozilla::KnownNotNull, ptr_PIPCBlobInputStreamChild()) PIPCBlobInputStreamChild*;
394 : }
395 0 : (*(ptr_PIPCBlobInputStreamChild())) = const_cast<PIPCBlobInputStreamChild*>((aRhs).get_PIPCBlobInputStreamChild());
396 0 : break;
397 : }
398 : case TIPCStream:
399 : {
400 0 : if (MaybeDestroy(t)) {
401 0 : new (mozilla::KnownNotNull, ptr_IPCStream()) IPCStream;
402 : }
403 0 : (*(ptr_IPCStream())) = (aRhs).get_IPCStream();
404 0 : break;
405 : }
406 : case T__None:
407 : {
408 0 : static_cast<void>(MaybeDestroy(t));
409 0 : break;
410 : }
411 : default:
412 : {
413 0 : mozilla::ipc::LogicError("unreached");
414 0 : break;
415 : }
416 : }
417 0 : mType = t;
418 0 : return (*(this));
419 : }
420 :
421 0 : auto IPCBlobStream::operator==(PIPCBlobInputStreamParent* aRhs) const -> bool
422 : {
423 0 : return (get_PIPCBlobInputStreamParent()) == (aRhs);
424 : }
425 :
426 0 : auto IPCBlobStream::operator==(PIPCBlobInputStreamChild* aRhs) const -> bool
427 : {
428 0 : return (get_PIPCBlobInputStreamChild()) == (aRhs);
429 : }
430 :
431 0 : auto IPCBlobStream::operator==(const IPCStream& aRhs) const -> bool
432 : {
433 0 : return (get_IPCStream()) == (aRhs);
434 : }
435 :
436 0 : auto IPCBlobStream::operator==(const IPCBlobStream& aRhs) const -> bool
437 : {
438 0 : if ((type()) != ((aRhs).type())) {
439 0 : return false;
440 : }
441 :
442 0 : switch (type()) {
443 : case TPIPCBlobInputStreamParent:
444 : {
445 0 : return (get_PIPCBlobInputStreamParent()) == ((aRhs).get_PIPCBlobInputStreamParent());
446 : }
447 : case TPIPCBlobInputStreamChild:
448 : {
449 0 : return (get_PIPCBlobInputStreamChild()) == ((aRhs).get_PIPCBlobInputStreamChild());
450 : }
451 : case TIPCStream:
452 : {
453 0 : return (get_IPCStream()) == ((aRhs).get_IPCStream());
454 : }
455 : default:
456 : {
457 0 : mozilla::ipc::LogicError("unreached");
458 0 : return false;
459 : }
460 : }
461 : }
462 :
463 0 : auto IPCBlobStream::get(PIPCBlobInputStreamParent** aOutValue) const -> void
464 : {
465 0 : (*(aOutValue)) = get_PIPCBlobInputStreamParent();
466 0 : }
467 :
468 0 : auto IPCBlobStream::get(PIPCBlobInputStreamChild** aOutValue) const -> void
469 : {
470 0 : (*(aOutValue)) = get_PIPCBlobInputStreamChild();
471 0 : }
472 :
473 0 : auto IPCBlobStream::get(IPCStream* aOutValue) const -> void
474 : {
475 0 : (*(aOutValue)) = get_IPCStream();
476 0 : }
477 :
478 : } // namespace dom
479 : } // namespace mozilla
480 :
481 : //-----------------------------------------------------------------------------
482 : // Method definitions for the IPDL type |struct IPCBlob|
483 : //
484 : namespace mozilla {
485 : namespace dom {
486 0 : MOZ_IMPLICIT IPCBlob::IPCBlob() :
487 : type_(),
488 : size_(),
489 0 : fileId_()
490 : {
491 0 : Init();
492 0 : }
493 :
494 0 : IPCBlob::~IPCBlob()
495 : {
496 0 : }
497 :
498 0 : auto IPCBlob::operator==(const IPCBlob& _o) const -> bool
499 : {
500 0 : if ((!((type()) == ((_o).type())))) {
501 0 : return false;
502 : }
503 0 : if ((!((size()) == ((_o).size())))) {
504 0 : return false;
505 : }
506 0 : if ((!((inputStream()) == ((_o).inputStream())))) {
507 0 : return false;
508 : }
509 0 : if ((!((file()) == ((_o).file())))) {
510 0 : return false;
511 : }
512 0 : if ((!((fileId()) == ((_o).fileId())))) {
513 0 : return false;
514 : }
515 0 : return true;
516 : }
517 :
518 0 : auto IPCBlob::operator!=(const IPCBlob& _o) const -> bool
519 : {
520 0 : return (!(operator==(_o)));
521 : }
522 :
523 0 : auto IPCBlob::Init() -> void
524 : {
525 0 : }
526 :
527 0 : auto IPCBlob::Assign(
528 : const nsString& _type,
529 : const uint64_t& _size,
530 : const IPCBlobStream& _inputStream,
531 : const IPCFileUnion& _file,
532 : const int64_t& _fileId) -> void
533 : {
534 0 : type_ = _type;
535 0 : size_ = _size;
536 0 : inputStream_ = _inputStream;
537 0 : file_ = _file;
538 0 : fileId_ = _fileId;
539 0 : }
540 :
541 : } // namespace dom
542 : } // namespace mozilla
|