Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PBackgroundFileHandle.h"
8 :
9 : namespace mozilla {
10 : namespace dom {
11 : namespace PBackgroundFileHandle {
12 :
13 : nsresult
14 0 : CreateEndpoints(
15 : base::ProcessId aParentDestPid,
16 : base::ProcessId aChildDestPid,
17 : mozilla::ipc::Endpoint<mozilla::dom::PBackgroundFileHandleParent>* aParent,
18 : mozilla::ipc::Endpoint<mozilla::dom::PBackgroundFileHandleChild>* aChild)
19 : {
20 0 : return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, PBackgroundFileHandleMsgStart, PBackgroundFileHandleMsgStartChild, aParent, aChild);
21 : }
22 : void
23 0 : Transition(
24 : MessageType msg,
25 : State* next)
26 : {
27 0 : switch ((*(next))) {
28 : case __Null:
29 0 : if ((Msg___delete____ID) == (msg)) {
30 0 : (*(next)) = __Dead;
31 : }
32 0 : break;
33 : case __Dead:
34 0 : mozilla::ipc::LogicError("__delete__()d actor");
35 0 : break;
36 : default:
37 0 : mozilla::ipc::LogicError("corrupted actor state");
38 0 : break;
39 : }
40 0 : }
41 : IPC::Message*
42 0 : Msg_DeleteMe(int32_t routingId)
43 : {
44 0 : return new IPC::Message(routingId, Msg_DeleteMe__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundFileHandle::Msg_DeleteMe", true);
45 : }
46 : IPC::Message*
47 0 : Msg_Finish(int32_t routingId)
48 : {
49 0 : return new IPC::Message(routingId, Msg_Finish__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundFileHandle::Msg_Finish", true);
50 : }
51 : IPC::Message*
52 0 : Msg_Abort(int32_t routingId)
53 : {
54 0 : return new IPC::Message(routingId, Msg_Abort__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundFileHandle::Msg_Abort", true);
55 : }
56 : IPC::Message*
57 0 : Msg_PBackgroundFileRequestConstructor(int32_t routingId)
58 : {
59 0 : return new IPC::Message(routingId, Msg_PBackgroundFileRequestConstructor__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundFileHandle::Msg_PBackgroundFileRequestConstructor", true);
60 : }
61 : IPC::Message*
62 0 : Reply_PBackgroundFileRequestConstructor(int32_t routingId)
63 : {
64 0 : return new IPC::Message(routingId, Reply_PBackgroundFileRequestConstructor__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundFileHandle::Reply_PBackgroundFileRequestConstructor", true);
65 : }
66 : IPC::Message*
67 0 : Msg___delete__(int32_t routingId)
68 : {
69 0 : return new IPC::Message(routingId, Msg___delete____ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundFileHandle::Msg___delete__", true);
70 : }
71 : IPC::Message*
72 0 : Reply___delete__(int32_t routingId)
73 : {
74 0 : return new IPC::Message(routingId, Reply___delete____ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundFileHandle::Reply___delete__", true);
75 : }
76 : IPC::Message*
77 0 : Msg_Complete(int32_t routingId)
78 : {
79 0 : return new IPC::Message(routingId, Msg_Complete__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundFileHandle::Msg_Complete", true);
80 : }
81 :
82 : } // namespace PBackgroundFileHandle
83 : } // namespace dom
84 : } // namespace mozilla
85 :
86 : //-----------------------------------------------------------------------------
87 : // Method definitions for the IPDL type |struct FileRequestGetMetadataParams|
88 : //
89 : namespace mozilla {
90 : namespace dom {
91 0 : MOZ_IMPLICIT FileRequestGetMetadataParams::FileRequestGetMetadataParams() :
92 : size_(),
93 0 : lastModified_()
94 : {
95 0 : Init();
96 0 : }
97 :
98 0 : FileRequestGetMetadataParams::~FileRequestGetMetadataParams()
99 : {
100 0 : }
101 :
102 0 : auto FileRequestGetMetadataParams::operator==(const FileRequestGetMetadataParams& _o) const -> bool
103 : {
104 0 : if ((!((size()) == ((_o).size())))) {
105 0 : return false;
106 : }
107 0 : if ((!((lastModified()) == ((_o).lastModified())))) {
108 0 : return false;
109 : }
110 0 : return true;
111 : }
112 :
113 0 : auto FileRequestGetMetadataParams::operator!=(const FileRequestGetMetadataParams& _o) const -> bool
114 : {
115 0 : return (!(operator==(_o)));
116 : }
117 :
118 0 : auto FileRequestGetMetadataParams::Init() -> void
119 : {
120 0 : }
121 :
122 0 : auto FileRequestGetMetadataParams::Assign(
123 : const bool& _size,
124 : const bool& _lastModified) -> void
125 : {
126 0 : size_ = _size;
127 0 : lastModified_ = _lastModified;
128 0 : }
129 :
130 : } // namespace dom
131 : } // namespace mozilla
132 :
133 : //-----------------------------------------------------------------------------
134 : // Method definitions for the IPDL type |struct FileRequestReadParams|
135 : //
136 : namespace mozilla {
137 : namespace dom {
138 0 : MOZ_IMPLICIT FileRequestReadParams::FileRequestReadParams() :
139 : offset_(),
140 0 : size_()
141 : {
142 0 : Init();
143 0 : }
144 :
145 0 : FileRequestReadParams::~FileRequestReadParams()
146 : {
147 0 : }
148 :
149 0 : auto FileRequestReadParams::operator==(const FileRequestReadParams& _o) const -> bool
150 : {
151 0 : if ((!((offset()) == ((_o).offset())))) {
152 0 : return false;
153 : }
154 0 : if ((!((size()) == ((_o).size())))) {
155 0 : return false;
156 : }
157 0 : return true;
158 : }
159 :
160 0 : auto FileRequestReadParams::operator!=(const FileRequestReadParams& _o) const -> bool
161 : {
162 0 : return (!(operator==(_o)));
163 : }
164 :
165 0 : auto FileRequestReadParams::Init() -> void
166 : {
167 0 : }
168 :
169 0 : auto FileRequestReadParams::Assign(
170 : const uint64_t& _offset,
171 : const uint64_t& _size) -> void
172 : {
173 0 : offset_ = _offset;
174 0 : size_ = _size;
175 0 : }
176 :
177 : } // namespace dom
178 : } // namespace mozilla
179 :
180 : //-----------------------------------------------------------------------------
181 : // Method definitions for the IPDL type |struct FileRequestStringData|
182 : //
183 : namespace mozilla {
184 : namespace dom {
185 0 : MOZ_IMPLICIT FileRequestStringData::FileRequestStringData() :
186 0 : string_()
187 : {
188 0 : Init();
189 0 : }
190 :
191 0 : FileRequestStringData::~FileRequestStringData()
192 : {
193 0 : }
194 :
195 0 : auto FileRequestStringData::operator==(const FileRequestStringData& _o) const -> bool
196 : {
197 0 : if ((!((string()) == ((_o).string())))) {
198 0 : return false;
199 : }
200 0 : return true;
201 : }
202 :
203 0 : auto FileRequestStringData::operator!=(const FileRequestStringData& _o) const -> bool
204 : {
205 0 : return (!(operator==(_o)));
206 : }
207 :
208 0 : auto FileRequestStringData::Init() -> void
209 : {
210 0 : }
211 :
212 0 : auto FileRequestStringData::Assign(const nsCString& _string) -> void
213 : {
214 0 : string_ = _string;
215 0 : }
216 :
217 : } // namespace dom
218 : } // namespace mozilla
219 :
220 : //-----------------------------------------------------------------------------
221 : // Method definitions for the IPDL type |struct FileRequestBlobData|
222 : //
223 : namespace mozilla {
224 : namespace dom {
225 0 : MOZ_IMPLICIT FileRequestBlobData::FileRequestBlobData()
226 : {
227 0 : Init();
228 0 : }
229 :
230 0 : FileRequestBlobData::~FileRequestBlobData()
231 : {
232 0 : }
233 :
234 0 : auto FileRequestBlobData::operator==(const FileRequestBlobData& _o) const -> bool
235 : {
236 0 : if ((!((blob()) == ((_o).blob())))) {
237 0 : return false;
238 : }
239 0 : return true;
240 : }
241 :
242 0 : auto FileRequestBlobData::operator!=(const FileRequestBlobData& _o) const -> bool
243 : {
244 0 : return (!(operator==(_o)));
245 : }
246 :
247 0 : auto FileRequestBlobData::Init() -> void
248 : {
249 0 : }
250 :
251 0 : auto FileRequestBlobData::Assign(const IPCBlob& _blob) -> void
252 : {
253 0 : blob_ = _blob;
254 0 : }
255 :
256 : } // namespace dom
257 : } // namespace mozilla
258 :
259 : //-----------------------------------------------------------------------------
260 : // Method definitions for the IPDL type |union FileRequestData|
261 : //
262 : namespace mozilla {
263 : namespace dom {
264 0 : auto FileRequestData::MaybeDestroy(Type aNewType) -> bool
265 : {
266 0 : if ((mType) == (T__None)) {
267 0 : return true;
268 : }
269 0 : if ((mType) == (aNewType)) {
270 0 : return false;
271 : }
272 0 : switch (mType) {
273 : case TFileRequestStringData:
274 : {
275 0 : (ptr_FileRequestStringData())->~FileRequestStringData__tdef();
276 0 : break;
277 : }
278 : case TFileRequestBlobData:
279 : {
280 0 : (ptr_FileRequestBlobData())->~FileRequestBlobData__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 FileRequestData::FileRequestData(const FileRequestStringData& aOther)
293 : {
294 0 : new (mozilla::KnownNotNull, ptr_FileRequestStringData()) FileRequestStringData(aOther);
295 0 : mType = TFileRequestStringData;
296 0 : }
297 :
298 0 : MOZ_IMPLICIT FileRequestData::FileRequestData(const FileRequestBlobData& aOther)
299 : {
300 0 : new (mozilla::KnownNotNull, ptr_FileRequestBlobData()) FileRequestBlobData(aOther);
301 0 : mType = TFileRequestBlobData;
302 0 : }
303 :
304 0 : MOZ_IMPLICIT FileRequestData::FileRequestData(const FileRequestData& aOther)
305 : {
306 0 : (aOther).AssertSanity();
307 0 : switch ((aOther).type()) {
308 : case TFileRequestStringData:
309 : {
310 0 : new (mozilla::KnownNotNull, ptr_FileRequestStringData()) FileRequestStringData((aOther).get_FileRequestStringData());
311 0 : break;
312 : }
313 : case TFileRequestBlobData:
314 : {
315 0 : new (mozilla::KnownNotNull, ptr_FileRequestBlobData()) FileRequestBlobData((aOther).get_FileRequestBlobData());
316 0 : break;
317 : }
318 : case T__None:
319 : {
320 0 : break;
321 : }
322 : default:
323 : {
324 0 : mozilla::ipc::LogicError("unreached");
325 0 : return;
326 : }
327 : }
328 0 : mType = (aOther).type();
329 : }
330 :
331 0 : FileRequestData::~FileRequestData()
332 : {
333 0 : static_cast<void>(MaybeDestroy(T__None));
334 0 : }
335 :
336 0 : auto FileRequestData::operator=(const FileRequestStringData& aRhs) -> FileRequestData&
337 : {
338 0 : if (MaybeDestroy(TFileRequestStringData)) {
339 0 : new (mozilla::KnownNotNull, ptr_FileRequestStringData()) FileRequestStringData;
340 : }
341 0 : (*(ptr_FileRequestStringData())) = aRhs;
342 0 : mType = TFileRequestStringData;
343 0 : return (*(this));
344 : }
345 :
346 0 : auto FileRequestData::operator=(const FileRequestBlobData& aRhs) -> FileRequestData&
347 : {
348 0 : if (MaybeDestroy(TFileRequestBlobData)) {
349 0 : new (mozilla::KnownNotNull, ptr_FileRequestBlobData()) FileRequestBlobData;
350 : }
351 0 : (*(ptr_FileRequestBlobData())) = aRhs;
352 0 : mType = TFileRequestBlobData;
353 0 : return (*(this));
354 : }
355 :
356 0 : auto FileRequestData::operator=(const FileRequestData& aRhs) -> FileRequestData&
357 : {
358 0 : (aRhs).AssertSanity();
359 0 : Type t = (aRhs).type();
360 0 : switch (t) {
361 : case TFileRequestStringData:
362 : {
363 0 : if (MaybeDestroy(t)) {
364 0 : new (mozilla::KnownNotNull, ptr_FileRequestStringData()) FileRequestStringData;
365 : }
366 0 : (*(ptr_FileRequestStringData())) = (aRhs).get_FileRequestStringData();
367 0 : break;
368 : }
369 : case TFileRequestBlobData:
370 : {
371 0 : if (MaybeDestroy(t)) {
372 0 : new (mozilla::KnownNotNull, ptr_FileRequestBlobData()) FileRequestBlobData;
373 : }
374 0 : (*(ptr_FileRequestBlobData())) = (aRhs).get_FileRequestBlobData();
375 0 : break;
376 : }
377 : case T__None:
378 : {
379 0 : static_cast<void>(MaybeDestroy(t));
380 0 : break;
381 : }
382 : default:
383 : {
384 0 : mozilla::ipc::LogicError("unreached");
385 0 : break;
386 : }
387 : }
388 0 : mType = t;
389 0 : return (*(this));
390 : }
391 :
392 0 : auto FileRequestData::operator==(const FileRequestStringData& aRhs) const -> bool
393 : {
394 0 : return (get_FileRequestStringData()) == (aRhs);
395 : }
396 :
397 0 : auto FileRequestData::operator==(const FileRequestBlobData& aRhs) const -> bool
398 : {
399 0 : return (get_FileRequestBlobData()) == (aRhs);
400 : }
401 :
402 0 : auto FileRequestData::operator==(const FileRequestData& aRhs) const -> bool
403 : {
404 0 : if ((type()) != ((aRhs).type())) {
405 0 : return false;
406 : }
407 :
408 0 : switch (type()) {
409 : case TFileRequestStringData:
410 : {
411 0 : return (get_FileRequestStringData()) == ((aRhs).get_FileRequestStringData());
412 : }
413 : case TFileRequestBlobData:
414 : {
415 0 : return (get_FileRequestBlobData()) == ((aRhs).get_FileRequestBlobData());
416 : }
417 : default:
418 : {
419 0 : mozilla::ipc::LogicError("unreached");
420 0 : return false;
421 : }
422 : }
423 : }
424 :
425 0 : auto FileRequestData::get(FileRequestStringData* aOutValue) const -> void
426 : {
427 0 : (*(aOutValue)) = get_FileRequestStringData();
428 0 : }
429 :
430 0 : auto FileRequestData::get(FileRequestBlobData* aOutValue) const -> void
431 : {
432 0 : (*(aOutValue)) = get_FileRequestBlobData();
433 0 : }
434 :
435 : } // namespace dom
436 : } // namespace mozilla
437 :
438 : //-----------------------------------------------------------------------------
439 : // Method definitions for the IPDL type |struct FileRequestWriteParams|
440 : //
441 : namespace mozilla {
442 : namespace dom {
443 0 : MOZ_IMPLICIT FileRequestWriteParams::FileRequestWriteParams() :
444 : offset_(),
445 0 : dataLength_()
446 : {
447 0 : Init();
448 0 : }
449 :
450 0 : FileRequestWriteParams::~FileRequestWriteParams()
451 : {
452 0 : }
453 :
454 0 : auto FileRequestWriteParams::operator==(const FileRequestWriteParams& _o) const -> bool
455 : {
456 0 : if ((!((offset()) == ((_o).offset())))) {
457 0 : return false;
458 : }
459 0 : if ((!((data()) == ((_o).data())))) {
460 0 : return false;
461 : }
462 0 : if ((!((dataLength()) == ((_o).dataLength())))) {
463 0 : return false;
464 : }
465 0 : return true;
466 : }
467 :
468 0 : auto FileRequestWriteParams::operator!=(const FileRequestWriteParams& _o) const -> bool
469 : {
470 0 : return (!(operator==(_o)));
471 : }
472 :
473 0 : auto FileRequestWriteParams::Init() -> void
474 : {
475 0 : }
476 :
477 0 : auto FileRequestWriteParams::Assign(
478 : const uint64_t& _offset,
479 : const FileRequestData& _data,
480 : const uint64_t& _dataLength) -> void
481 : {
482 0 : offset_ = _offset;
483 0 : data_ = _data;
484 0 : dataLength_ = _dataLength;
485 0 : }
486 :
487 : } // namespace dom
488 : } // namespace mozilla
489 :
490 : //-----------------------------------------------------------------------------
491 : // Method definitions for the IPDL type |struct FileRequestTruncateParams|
492 : //
493 : namespace mozilla {
494 : namespace dom {
495 0 : MOZ_IMPLICIT FileRequestTruncateParams::FileRequestTruncateParams() :
496 0 : offset_()
497 : {
498 0 : Init();
499 0 : }
500 :
501 0 : FileRequestTruncateParams::~FileRequestTruncateParams()
502 : {
503 0 : }
504 :
505 0 : auto FileRequestTruncateParams::operator==(const FileRequestTruncateParams& _o) const -> bool
506 : {
507 0 : if ((!((offset()) == ((_o).offset())))) {
508 0 : return false;
509 : }
510 0 : return true;
511 : }
512 :
513 0 : auto FileRequestTruncateParams::operator!=(const FileRequestTruncateParams& _o) const -> bool
514 : {
515 0 : return (!(operator==(_o)));
516 : }
517 :
518 0 : auto FileRequestTruncateParams::Init() -> void
519 : {
520 0 : }
521 :
522 0 : auto FileRequestTruncateParams::Assign(const uint64_t& _offset) -> void
523 : {
524 0 : offset_ = _offset;
525 0 : }
526 :
527 : } // namespace dom
528 : } // namespace mozilla
529 :
530 : //-----------------------------------------------------------------------------
531 : // Method definitions for the IPDL type |struct FileRequestFlushParams|
532 : //
533 : namespace mozilla {
534 : namespace dom {
535 0 : FileRequestFlushParams::~FileRequestFlushParams()
536 : {
537 0 : }
538 :
539 0 : auto FileRequestFlushParams::operator==(const FileRequestFlushParams& _o) const -> bool
540 : {
541 0 : return true;
542 : }
543 :
544 0 : auto FileRequestFlushParams::operator!=(const FileRequestFlushParams& _o) const -> bool
545 : {
546 0 : return (!(operator==(_o)));
547 : }
548 :
549 0 : auto FileRequestFlushParams::Init() -> void
550 : {
551 0 : }
552 :
553 0 : auto FileRequestFlushParams::Assign() -> void
554 : {
555 0 : }
556 :
557 : } // namespace dom
558 : } // namespace mozilla
559 :
560 : //-----------------------------------------------------------------------------
561 : // Method definitions for the IPDL type |struct FileRequestGetFileParams|
562 : //
563 : namespace mozilla {
564 : namespace dom {
565 0 : FileRequestGetFileParams::~FileRequestGetFileParams()
566 : {
567 0 : }
568 :
569 0 : auto FileRequestGetFileParams::operator==(const FileRequestGetFileParams& _o) const -> bool
570 : {
571 0 : return true;
572 : }
573 :
574 0 : auto FileRequestGetFileParams::operator!=(const FileRequestGetFileParams& _o) const -> bool
575 : {
576 0 : return (!(operator==(_o)));
577 : }
578 :
579 0 : auto FileRequestGetFileParams::Init() -> void
580 : {
581 0 : }
582 :
583 0 : auto FileRequestGetFileParams::Assign() -> void
584 : {
585 0 : }
586 :
587 : } // namespace dom
588 : } // namespace mozilla
589 :
590 : //-----------------------------------------------------------------------------
591 : // Method definitions for the IPDL type |union FileRequestParams|
592 : //
593 : namespace mozilla {
594 : namespace dom {
595 0 : auto FileRequestParams::MaybeDestroy(Type aNewType) -> bool
596 : {
597 0 : if ((mType) == (T__None)) {
598 0 : return true;
599 : }
600 0 : if ((mType) == (aNewType)) {
601 0 : return false;
602 : }
603 0 : switch (mType) {
604 : case TFileRequestGetMetadataParams:
605 : {
606 0 : (ptr_FileRequestGetMetadataParams())->~FileRequestGetMetadataParams__tdef();
607 0 : break;
608 : }
609 : case TFileRequestReadParams:
610 : {
611 0 : (ptr_FileRequestReadParams())->~FileRequestReadParams__tdef();
612 0 : break;
613 : }
614 : case TFileRequestWriteParams:
615 : {
616 0 : (ptr_FileRequestWriteParams())->~FileRequestWriteParams__tdef();
617 0 : break;
618 : }
619 : case TFileRequestTruncateParams:
620 : {
621 0 : (ptr_FileRequestTruncateParams())->~FileRequestTruncateParams__tdef();
622 0 : break;
623 : }
624 : case TFileRequestFlushParams:
625 : {
626 0 : (ptr_FileRequestFlushParams())->~FileRequestFlushParams__tdef();
627 0 : break;
628 : }
629 : case TFileRequestGetFileParams:
630 : {
631 0 : (ptr_FileRequestGetFileParams())->~FileRequestGetFileParams__tdef();
632 0 : break;
633 : }
634 : default:
635 : {
636 0 : mozilla::ipc::LogicError("not reached");
637 0 : break;
638 : }
639 : }
640 0 : return true;
641 : }
642 :
643 0 : MOZ_IMPLICIT FileRequestParams::FileRequestParams(const FileRequestGetMetadataParams& aOther)
644 : {
645 0 : new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataParams()) FileRequestGetMetadataParams(aOther);
646 0 : mType = TFileRequestGetMetadataParams;
647 0 : }
648 :
649 0 : MOZ_IMPLICIT FileRequestParams::FileRequestParams(const FileRequestReadParams& aOther)
650 : {
651 0 : new (mozilla::KnownNotNull, ptr_FileRequestReadParams()) FileRequestReadParams(aOther);
652 0 : mType = TFileRequestReadParams;
653 0 : }
654 :
655 0 : MOZ_IMPLICIT FileRequestParams::FileRequestParams(const FileRequestWriteParams& aOther)
656 : {
657 0 : new (mozilla::KnownNotNull, ptr_FileRequestWriteParams()) FileRequestWriteParams(aOther);
658 0 : mType = TFileRequestWriteParams;
659 0 : }
660 :
661 0 : MOZ_IMPLICIT FileRequestParams::FileRequestParams(const FileRequestTruncateParams& aOther)
662 : {
663 0 : new (mozilla::KnownNotNull, ptr_FileRequestTruncateParams()) FileRequestTruncateParams(aOther);
664 0 : mType = TFileRequestTruncateParams;
665 0 : }
666 :
667 0 : MOZ_IMPLICIT FileRequestParams::FileRequestParams(const FileRequestFlushParams& aOther)
668 : {
669 0 : new (mozilla::KnownNotNull, ptr_FileRequestFlushParams()) FileRequestFlushParams(aOther);
670 0 : mType = TFileRequestFlushParams;
671 0 : }
672 :
673 0 : MOZ_IMPLICIT FileRequestParams::FileRequestParams(const FileRequestGetFileParams& aOther)
674 : {
675 0 : new (mozilla::KnownNotNull, ptr_FileRequestGetFileParams()) FileRequestGetFileParams(aOther);
676 0 : mType = TFileRequestGetFileParams;
677 0 : }
678 :
679 0 : MOZ_IMPLICIT FileRequestParams::FileRequestParams(const FileRequestParams& aOther)
680 : {
681 0 : (aOther).AssertSanity();
682 0 : switch ((aOther).type()) {
683 : case TFileRequestGetMetadataParams:
684 : {
685 0 : new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataParams()) FileRequestGetMetadataParams((aOther).get_FileRequestGetMetadataParams());
686 0 : break;
687 : }
688 : case TFileRequestReadParams:
689 : {
690 0 : new (mozilla::KnownNotNull, ptr_FileRequestReadParams()) FileRequestReadParams((aOther).get_FileRequestReadParams());
691 0 : break;
692 : }
693 : case TFileRequestWriteParams:
694 : {
695 0 : new (mozilla::KnownNotNull, ptr_FileRequestWriteParams()) FileRequestWriteParams((aOther).get_FileRequestWriteParams());
696 0 : break;
697 : }
698 : case TFileRequestTruncateParams:
699 : {
700 0 : new (mozilla::KnownNotNull, ptr_FileRequestTruncateParams()) FileRequestTruncateParams((aOther).get_FileRequestTruncateParams());
701 0 : break;
702 : }
703 : case TFileRequestFlushParams:
704 : {
705 0 : new (mozilla::KnownNotNull, ptr_FileRequestFlushParams()) FileRequestFlushParams((aOther).get_FileRequestFlushParams());
706 0 : break;
707 : }
708 : case TFileRequestGetFileParams:
709 : {
710 0 : new (mozilla::KnownNotNull, ptr_FileRequestGetFileParams()) FileRequestGetFileParams((aOther).get_FileRequestGetFileParams());
711 0 : break;
712 : }
713 : case T__None:
714 : {
715 0 : break;
716 : }
717 : default:
718 : {
719 0 : mozilla::ipc::LogicError("unreached");
720 0 : return;
721 : }
722 : }
723 0 : mType = (aOther).type();
724 : }
725 :
726 0 : FileRequestParams::~FileRequestParams()
727 : {
728 0 : static_cast<void>(MaybeDestroy(T__None));
729 0 : }
730 :
731 0 : auto FileRequestParams::operator=(const FileRequestGetMetadataParams& aRhs) -> FileRequestParams&
732 : {
733 0 : if (MaybeDestroy(TFileRequestGetMetadataParams)) {
734 0 : new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataParams()) FileRequestGetMetadataParams;
735 : }
736 0 : (*(ptr_FileRequestGetMetadataParams())) = aRhs;
737 0 : mType = TFileRequestGetMetadataParams;
738 0 : return (*(this));
739 : }
740 :
741 0 : auto FileRequestParams::operator=(const FileRequestReadParams& aRhs) -> FileRequestParams&
742 : {
743 0 : if (MaybeDestroy(TFileRequestReadParams)) {
744 0 : new (mozilla::KnownNotNull, ptr_FileRequestReadParams()) FileRequestReadParams;
745 : }
746 0 : (*(ptr_FileRequestReadParams())) = aRhs;
747 0 : mType = TFileRequestReadParams;
748 0 : return (*(this));
749 : }
750 :
751 0 : auto FileRequestParams::operator=(const FileRequestWriteParams& aRhs) -> FileRequestParams&
752 : {
753 0 : if (MaybeDestroy(TFileRequestWriteParams)) {
754 0 : new (mozilla::KnownNotNull, ptr_FileRequestWriteParams()) FileRequestWriteParams;
755 : }
756 0 : (*(ptr_FileRequestWriteParams())) = aRhs;
757 0 : mType = TFileRequestWriteParams;
758 0 : return (*(this));
759 : }
760 :
761 0 : auto FileRequestParams::operator=(const FileRequestTruncateParams& aRhs) -> FileRequestParams&
762 : {
763 0 : if (MaybeDestroy(TFileRequestTruncateParams)) {
764 0 : new (mozilla::KnownNotNull, ptr_FileRequestTruncateParams()) FileRequestTruncateParams;
765 : }
766 0 : (*(ptr_FileRequestTruncateParams())) = aRhs;
767 0 : mType = TFileRequestTruncateParams;
768 0 : return (*(this));
769 : }
770 :
771 0 : auto FileRequestParams::operator=(const FileRequestFlushParams& aRhs) -> FileRequestParams&
772 : {
773 0 : if (MaybeDestroy(TFileRequestFlushParams)) {
774 0 : new (mozilla::KnownNotNull, ptr_FileRequestFlushParams()) FileRequestFlushParams;
775 : }
776 0 : (*(ptr_FileRequestFlushParams())) = aRhs;
777 0 : mType = TFileRequestFlushParams;
778 0 : return (*(this));
779 : }
780 :
781 0 : auto FileRequestParams::operator=(const FileRequestGetFileParams& aRhs) -> FileRequestParams&
782 : {
783 0 : if (MaybeDestroy(TFileRequestGetFileParams)) {
784 0 : new (mozilla::KnownNotNull, ptr_FileRequestGetFileParams()) FileRequestGetFileParams;
785 : }
786 0 : (*(ptr_FileRequestGetFileParams())) = aRhs;
787 0 : mType = TFileRequestGetFileParams;
788 0 : return (*(this));
789 : }
790 :
791 0 : auto FileRequestParams::operator=(const FileRequestParams& aRhs) -> FileRequestParams&
792 : {
793 0 : (aRhs).AssertSanity();
794 0 : Type t = (aRhs).type();
795 0 : switch (t) {
796 : case TFileRequestGetMetadataParams:
797 : {
798 0 : if (MaybeDestroy(t)) {
799 0 : new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataParams()) FileRequestGetMetadataParams;
800 : }
801 0 : (*(ptr_FileRequestGetMetadataParams())) = (aRhs).get_FileRequestGetMetadataParams();
802 0 : break;
803 : }
804 : case TFileRequestReadParams:
805 : {
806 0 : if (MaybeDestroy(t)) {
807 0 : new (mozilla::KnownNotNull, ptr_FileRequestReadParams()) FileRequestReadParams;
808 : }
809 0 : (*(ptr_FileRequestReadParams())) = (aRhs).get_FileRequestReadParams();
810 0 : break;
811 : }
812 : case TFileRequestWriteParams:
813 : {
814 0 : if (MaybeDestroy(t)) {
815 0 : new (mozilla::KnownNotNull, ptr_FileRequestWriteParams()) FileRequestWriteParams;
816 : }
817 0 : (*(ptr_FileRequestWriteParams())) = (aRhs).get_FileRequestWriteParams();
818 0 : break;
819 : }
820 : case TFileRequestTruncateParams:
821 : {
822 0 : if (MaybeDestroy(t)) {
823 0 : new (mozilla::KnownNotNull, ptr_FileRequestTruncateParams()) FileRequestTruncateParams;
824 : }
825 0 : (*(ptr_FileRequestTruncateParams())) = (aRhs).get_FileRequestTruncateParams();
826 0 : break;
827 : }
828 : case TFileRequestFlushParams:
829 : {
830 0 : if (MaybeDestroy(t)) {
831 0 : new (mozilla::KnownNotNull, ptr_FileRequestFlushParams()) FileRequestFlushParams;
832 : }
833 0 : (*(ptr_FileRequestFlushParams())) = (aRhs).get_FileRequestFlushParams();
834 0 : break;
835 : }
836 : case TFileRequestGetFileParams:
837 : {
838 0 : if (MaybeDestroy(t)) {
839 0 : new (mozilla::KnownNotNull, ptr_FileRequestGetFileParams()) FileRequestGetFileParams;
840 : }
841 0 : (*(ptr_FileRequestGetFileParams())) = (aRhs).get_FileRequestGetFileParams();
842 0 : break;
843 : }
844 : case T__None:
845 : {
846 0 : static_cast<void>(MaybeDestroy(t));
847 0 : break;
848 : }
849 : default:
850 : {
851 0 : mozilla::ipc::LogicError("unreached");
852 0 : break;
853 : }
854 : }
855 0 : mType = t;
856 0 : return (*(this));
857 : }
858 :
859 0 : auto FileRequestParams::operator==(const FileRequestGetMetadataParams& aRhs) const -> bool
860 : {
861 0 : return (get_FileRequestGetMetadataParams()) == (aRhs);
862 : }
863 :
864 0 : auto FileRequestParams::operator==(const FileRequestReadParams& aRhs) const -> bool
865 : {
866 0 : return (get_FileRequestReadParams()) == (aRhs);
867 : }
868 :
869 0 : auto FileRequestParams::operator==(const FileRequestWriteParams& aRhs) const -> bool
870 : {
871 0 : return (get_FileRequestWriteParams()) == (aRhs);
872 : }
873 :
874 0 : auto FileRequestParams::operator==(const FileRequestTruncateParams& aRhs) const -> bool
875 : {
876 0 : return (get_FileRequestTruncateParams()) == (aRhs);
877 : }
878 :
879 0 : auto FileRequestParams::operator==(const FileRequestFlushParams& aRhs) const -> bool
880 : {
881 0 : return (get_FileRequestFlushParams()) == (aRhs);
882 : }
883 :
884 0 : auto FileRequestParams::operator==(const FileRequestGetFileParams& aRhs) const -> bool
885 : {
886 0 : return (get_FileRequestGetFileParams()) == (aRhs);
887 : }
888 :
889 0 : auto FileRequestParams::operator==(const FileRequestParams& aRhs) const -> bool
890 : {
891 0 : if ((type()) != ((aRhs).type())) {
892 0 : return false;
893 : }
894 :
895 0 : switch (type()) {
896 : case TFileRequestGetMetadataParams:
897 : {
898 0 : return (get_FileRequestGetMetadataParams()) == ((aRhs).get_FileRequestGetMetadataParams());
899 : }
900 : case TFileRequestReadParams:
901 : {
902 0 : return (get_FileRequestReadParams()) == ((aRhs).get_FileRequestReadParams());
903 : }
904 : case TFileRequestWriteParams:
905 : {
906 0 : return (get_FileRequestWriteParams()) == ((aRhs).get_FileRequestWriteParams());
907 : }
908 : case TFileRequestTruncateParams:
909 : {
910 0 : return (get_FileRequestTruncateParams()) == ((aRhs).get_FileRequestTruncateParams());
911 : }
912 : case TFileRequestFlushParams:
913 : {
914 0 : return (get_FileRequestFlushParams()) == ((aRhs).get_FileRequestFlushParams());
915 : }
916 : case TFileRequestGetFileParams:
917 : {
918 0 : return (get_FileRequestGetFileParams()) == ((aRhs).get_FileRequestGetFileParams());
919 : }
920 : default:
921 : {
922 0 : mozilla::ipc::LogicError("unreached");
923 0 : return false;
924 : }
925 : }
926 : }
927 :
928 0 : auto FileRequestParams::get(FileRequestGetMetadataParams* aOutValue) const -> void
929 : {
930 0 : (*(aOutValue)) = get_FileRequestGetMetadataParams();
931 0 : }
932 :
933 0 : auto FileRequestParams::get(FileRequestReadParams* aOutValue) const -> void
934 : {
935 0 : (*(aOutValue)) = get_FileRequestReadParams();
936 0 : }
937 :
938 0 : auto FileRequestParams::get(FileRequestWriteParams* aOutValue) const -> void
939 : {
940 0 : (*(aOutValue)) = get_FileRequestWriteParams();
941 0 : }
942 :
943 0 : auto FileRequestParams::get(FileRequestTruncateParams* aOutValue) const -> void
944 : {
945 0 : (*(aOutValue)) = get_FileRequestTruncateParams();
946 0 : }
947 :
948 0 : auto FileRequestParams::get(FileRequestFlushParams* aOutValue) const -> void
949 : {
950 0 : (*(aOutValue)) = get_FileRequestFlushParams();
951 0 : }
952 :
953 0 : auto FileRequestParams::get(FileRequestGetFileParams* aOutValue) const -> void
954 : {
955 0 : (*(aOutValue)) = get_FileRequestGetFileParams();
956 0 : }
957 :
958 : } // namespace dom
959 : } // namespace mozilla
|