Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/ipc/InputStreamParams.h"
8 :
9 :
10 : //-----------------------------------------------------------------------------
11 : // Method definitions for the IPDL type |struct HeaderEntry|
12 : //
13 : namespace mozilla {
14 : namespace ipc {
15 0 : MOZ_IMPLICIT HeaderEntry::HeaderEntry() :
16 : name_(),
17 0 : value_()
18 : {
19 0 : Init();
20 0 : }
21 :
22 0 : HeaderEntry::~HeaderEntry()
23 : {
24 0 : }
25 :
26 0 : auto HeaderEntry::operator==(const HeaderEntry& _o) const -> bool
27 : {
28 0 : if ((!((name()) == ((_o).name())))) {
29 0 : return false;
30 : }
31 0 : if ((!((value()) == ((_o).value())))) {
32 0 : return false;
33 : }
34 0 : return true;
35 : }
36 :
37 0 : auto HeaderEntry::operator!=(const HeaderEntry& _o) const -> bool
38 : {
39 0 : return (!(operator==(_o)));
40 : }
41 :
42 0 : auto HeaderEntry::Init() -> void
43 : {
44 0 : }
45 :
46 0 : auto HeaderEntry::Assign(
47 : const nsCString& _name,
48 : const nsCString& _value) -> void
49 : {
50 0 : name_ = _name;
51 0 : value_ = _value;
52 0 : }
53 :
54 : } // namespace ipc
55 : } // namespace mozilla
56 :
57 : //-----------------------------------------------------------------------------
58 : // Method definitions for the IPDL type |struct StringInputStreamParams|
59 : //
60 : namespace mozilla {
61 : namespace ipc {
62 0 : MOZ_IMPLICIT StringInputStreamParams::StringInputStreamParams() :
63 0 : data_()
64 : {
65 0 : Init();
66 0 : }
67 :
68 0 : StringInputStreamParams::~StringInputStreamParams()
69 : {
70 0 : }
71 :
72 0 : auto StringInputStreamParams::operator==(const StringInputStreamParams& _o) const -> bool
73 : {
74 0 : if ((!((data()) == ((_o).data())))) {
75 0 : return false;
76 : }
77 0 : return true;
78 : }
79 :
80 0 : auto StringInputStreamParams::operator!=(const StringInputStreamParams& _o) const -> bool
81 : {
82 0 : return (!(operator==(_o)));
83 : }
84 :
85 0 : auto StringInputStreamParams::Init() -> void
86 : {
87 0 : }
88 :
89 0 : auto StringInputStreamParams::Assign(const nsCString& _data) -> void
90 : {
91 0 : data_ = _data;
92 0 : }
93 :
94 : } // namespace ipc
95 : } // namespace mozilla
96 :
97 : //-----------------------------------------------------------------------------
98 : // Method definitions for the IPDL type |struct FileInputStreamParams|
99 : //
100 : namespace mozilla {
101 : namespace ipc {
102 0 : MOZ_IMPLICIT FileInputStreamParams::FileInputStreamParams() :
103 : fileDescriptorIndex_(),
104 : behaviorFlags_(),
105 0 : ioFlags_()
106 : {
107 0 : Init();
108 0 : }
109 :
110 0 : FileInputStreamParams::~FileInputStreamParams()
111 : {
112 0 : }
113 :
114 0 : auto FileInputStreamParams::operator==(const FileInputStreamParams& _o) const -> bool
115 : {
116 0 : if ((!((fileDescriptorIndex()) == ((_o).fileDescriptorIndex())))) {
117 0 : return false;
118 : }
119 0 : if ((!((behaviorFlags()) == ((_o).behaviorFlags())))) {
120 0 : return false;
121 : }
122 0 : if ((!((ioFlags()) == ((_o).ioFlags())))) {
123 0 : return false;
124 : }
125 0 : return true;
126 : }
127 :
128 0 : auto FileInputStreamParams::operator!=(const FileInputStreamParams& _o) const -> bool
129 : {
130 0 : return (!(operator==(_o)));
131 : }
132 :
133 0 : auto FileInputStreamParams::Init() -> void
134 : {
135 0 : }
136 :
137 0 : auto FileInputStreamParams::Assign(
138 : const uint32_t& _fileDescriptorIndex,
139 : const int32_t& _behaviorFlags,
140 : const int32_t& _ioFlags) -> void
141 : {
142 0 : fileDescriptorIndex_ = _fileDescriptorIndex;
143 0 : behaviorFlags_ = _behaviorFlags;
144 0 : ioFlags_ = _ioFlags;
145 0 : }
146 :
147 : } // namespace ipc
148 : } // namespace mozilla
149 :
150 : //-----------------------------------------------------------------------------
151 : // Method definitions for the IPDL type |struct TemporaryFileInputStreamParams|
152 : //
153 : namespace mozilla {
154 : namespace ipc {
155 0 : MOZ_IMPLICIT TemporaryFileInputStreamParams::TemporaryFileInputStreamParams() :
156 : fileDescriptorIndex_(),
157 : startPos_(),
158 0 : endPos_()
159 : {
160 0 : Init();
161 0 : }
162 :
163 0 : TemporaryFileInputStreamParams::~TemporaryFileInputStreamParams()
164 : {
165 0 : }
166 :
167 0 : auto TemporaryFileInputStreamParams::operator==(const TemporaryFileInputStreamParams& _o) const -> bool
168 : {
169 0 : if ((!((fileDescriptorIndex()) == ((_o).fileDescriptorIndex())))) {
170 0 : return false;
171 : }
172 0 : if ((!((startPos()) == ((_o).startPos())))) {
173 0 : return false;
174 : }
175 0 : if ((!((endPos()) == ((_o).endPos())))) {
176 0 : return false;
177 : }
178 0 : return true;
179 : }
180 :
181 0 : auto TemporaryFileInputStreamParams::operator!=(const TemporaryFileInputStreamParams& _o) const -> bool
182 : {
183 0 : return (!(operator==(_o)));
184 : }
185 :
186 0 : auto TemporaryFileInputStreamParams::Init() -> void
187 : {
188 0 : }
189 :
190 0 : auto TemporaryFileInputStreamParams::Assign(
191 : const uint32_t& _fileDescriptorIndex,
192 : const uint64_t& _startPos,
193 : const uint64_t& _endPos) -> void
194 : {
195 0 : fileDescriptorIndex_ = _fileDescriptorIndex;
196 0 : startPos_ = _startPos;
197 0 : endPos_ = _endPos;
198 0 : }
199 :
200 : } // namespace ipc
201 : } // namespace mozilla
202 :
203 : //-----------------------------------------------------------------------------
204 : // Method definitions for the IPDL type |struct MultiplexInputStreamParams|
205 : //
206 : namespace mozilla {
207 : namespace ipc {
208 0 : MOZ_IMPLICIT MultiplexInputStreamParams::MultiplexInputStreamParams() :
209 : currentStream_(),
210 : status_(),
211 0 : startedReadingCurrent_()
212 : {
213 0 : Init();
214 0 : }
215 :
216 0 : MultiplexInputStreamParams::~MultiplexInputStreamParams()
217 : {
218 0 : delete streams_;
219 0 : }
220 :
221 0 : auto MultiplexInputStreamParams::operator==(const MultiplexInputStreamParams& _o) const -> bool
222 : {
223 0 : if ((!((streams()) == ((_o).streams())))) {
224 0 : return false;
225 : }
226 0 : if ((!((currentStream()) == ((_o).currentStream())))) {
227 0 : return false;
228 : }
229 0 : if ((!((status()) == ((_o).status())))) {
230 0 : return false;
231 : }
232 0 : if ((!((startedReadingCurrent()) == ((_o).startedReadingCurrent())))) {
233 0 : return false;
234 : }
235 0 : return true;
236 : }
237 :
238 0 : auto MultiplexInputStreamParams::operator!=(const MultiplexInputStreamParams& _o) const -> bool
239 : {
240 0 : return (!(operator==(_o)));
241 : }
242 :
243 0 : auto MultiplexInputStreamParams::Init() -> void
244 : {
245 0 : streams_ = new nsTArray<InputStreamParams>();
246 0 : }
247 :
248 0 : auto MultiplexInputStreamParams::Assign(
249 : const nsTArray<InputStreamParams>& _streams,
250 : const uint32_t& _currentStream,
251 : const nsresult& _status,
252 : const bool& _startedReadingCurrent) -> void
253 : {
254 0 : (*(streams_)) = _streams;
255 0 : currentStream_ = _currentStream;
256 0 : status_ = _status;
257 0 : startedReadingCurrent_ = _startedReadingCurrent;
258 0 : }
259 :
260 : } // namespace ipc
261 : } // namespace mozilla
262 :
263 : //-----------------------------------------------------------------------------
264 : // Method definitions for the IPDL type |struct SlicedInputStreamParams|
265 : //
266 : namespace mozilla {
267 : namespace ipc {
268 0 : MOZ_IMPLICIT SlicedInputStreamParams::SlicedInputStreamParams() :
269 : start_(),
270 : length_(),
271 : curPos_(),
272 0 : closed_()
273 : {
274 0 : Init();
275 0 : }
276 :
277 0 : SlicedInputStreamParams::~SlicedInputStreamParams()
278 : {
279 0 : delete stream_;
280 0 : }
281 :
282 0 : auto SlicedInputStreamParams::operator==(const SlicedInputStreamParams& _o) const -> bool
283 : {
284 0 : if ((!((stream()) == ((_o).stream())))) {
285 0 : return false;
286 : }
287 0 : if ((!((start()) == ((_o).start())))) {
288 0 : return false;
289 : }
290 0 : if ((!((length()) == ((_o).length())))) {
291 0 : return false;
292 : }
293 0 : if ((!((curPos()) == ((_o).curPos())))) {
294 0 : return false;
295 : }
296 0 : if ((!((closed()) == ((_o).closed())))) {
297 0 : return false;
298 : }
299 0 : return true;
300 : }
301 :
302 0 : auto SlicedInputStreamParams::operator!=(const SlicedInputStreamParams& _o) const -> bool
303 : {
304 0 : return (!(operator==(_o)));
305 : }
306 :
307 0 : auto SlicedInputStreamParams::Init() -> void
308 : {
309 0 : stream_ = new InputStreamParams();
310 0 : }
311 :
312 0 : auto SlicedInputStreamParams::Assign(
313 : const InputStreamParams& _stream,
314 : const uint64_t& _start,
315 : const uint64_t& _length,
316 : const uint64_t& _curPos,
317 : const bool& _closed) -> void
318 : {
319 0 : (*(stream_)) = _stream;
320 0 : start_ = _start;
321 0 : length_ = _length;
322 0 : curPos_ = _curPos;
323 0 : closed_ = _closed;
324 0 : }
325 :
326 : } // namespace ipc
327 : } // namespace mozilla
328 :
329 : //-----------------------------------------------------------------------------
330 : // Method definitions for the IPDL type |struct IPCBlobInputStreamParams|
331 : //
332 : namespace mozilla {
333 : namespace ipc {
334 0 : MOZ_IMPLICIT IPCBlobInputStreamParams::IPCBlobInputStreamParams() :
335 0 : id_()
336 : {
337 0 : Init();
338 0 : }
339 :
340 0 : IPCBlobInputStreamParams::~IPCBlobInputStreamParams()
341 : {
342 0 : }
343 :
344 0 : auto IPCBlobInputStreamParams::operator==(const IPCBlobInputStreamParams& _o) const -> bool
345 : {
346 0 : if ((!((id()) == ((_o).id())))) {
347 0 : return false;
348 : }
349 0 : return true;
350 : }
351 :
352 0 : auto IPCBlobInputStreamParams::operator!=(const IPCBlobInputStreamParams& _o) const -> bool
353 : {
354 0 : return (!(operator==(_o)));
355 : }
356 :
357 0 : auto IPCBlobInputStreamParams::Init() -> void
358 : {
359 0 : }
360 :
361 0 : auto IPCBlobInputStreamParams::Assign(const nsID& _id) -> void
362 : {
363 0 : id_ = _id;
364 0 : }
365 :
366 : } // namespace ipc
367 : } // namespace mozilla
368 :
369 : //-----------------------------------------------------------------------------
370 : // Method definitions for the IPDL type |union InputStreamParams|
371 : //
372 : namespace mozilla {
373 : namespace ipc {
374 0 : auto InputStreamParams::MaybeDestroy(Type aNewType) -> bool
375 : {
376 0 : if ((mType) == (T__None)) {
377 0 : return true;
378 : }
379 0 : if ((mType) == (aNewType)) {
380 0 : return false;
381 : }
382 0 : switch (mType) {
383 : case TStringInputStreamParams:
384 : {
385 0 : (ptr_StringInputStreamParams())->~StringInputStreamParams__tdef();
386 0 : break;
387 : }
388 : case TFileInputStreamParams:
389 : {
390 0 : (ptr_FileInputStreamParams())->~FileInputStreamParams__tdef();
391 0 : break;
392 : }
393 : case TTemporaryFileInputStreamParams:
394 : {
395 0 : (ptr_TemporaryFileInputStreamParams())->~TemporaryFileInputStreamParams__tdef();
396 0 : break;
397 : }
398 : case TBufferedInputStreamParams:
399 : {
400 0 : delete ptr_BufferedInputStreamParams();
401 0 : break;
402 : }
403 : case TMIMEInputStreamParams:
404 : {
405 0 : delete ptr_MIMEInputStreamParams();
406 0 : break;
407 : }
408 : case TMultiplexInputStreamParams:
409 : {
410 0 : delete ptr_MultiplexInputStreamParams();
411 0 : break;
412 : }
413 : case TSlicedInputStreamParams:
414 : {
415 0 : delete ptr_SlicedInputStreamParams();
416 0 : break;
417 : }
418 : case TIPCBlobInputStreamParams:
419 : {
420 0 : (ptr_IPCBlobInputStreamParams())->~IPCBlobInputStreamParams__tdef();
421 0 : break;
422 : }
423 : default:
424 : {
425 0 : mozilla::ipc::LogicError("not reached");
426 0 : break;
427 : }
428 : }
429 0 : return true;
430 : }
431 :
432 0 : MOZ_IMPLICIT InputStreamParams::InputStreamParams(const StringInputStreamParams& aOther)
433 : {
434 0 : new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams(aOther);
435 0 : mType = TStringInputStreamParams;
436 0 : }
437 :
438 0 : MOZ_IMPLICIT InputStreamParams::InputStreamParams(const FileInputStreamParams& aOther)
439 : {
440 0 : new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams(aOther);
441 0 : mType = TFileInputStreamParams;
442 0 : }
443 :
444 0 : MOZ_IMPLICIT InputStreamParams::InputStreamParams(const TemporaryFileInputStreamParams& aOther)
445 : {
446 0 : new (mozilla::KnownNotNull, ptr_TemporaryFileInputStreamParams()) TemporaryFileInputStreamParams(aOther);
447 0 : mType = TTemporaryFileInputStreamParams;
448 0 : }
449 :
450 0 : MOZ_IMPLICIT InputStreamParams::InputStreamParams(const BufferedInputStreamParams& aOther)
451 : {
452 0 : ptr_BufferedInputStreamParams() = new BufferedInputStreamParams(aOther);
453 0 : mType = TBufferedInputStreamParams;
454 0 : }
455 :
456 0 : MOZ_IMPLICIT InputStreamParams::InputStreamParams(const MIMEInputStreamParams& aOther)
457 : {
458 0 : ptr_MIMEInputStreamParams() = new MIMEInputStreamParams(aOther);
459 0 : mType = TMIMEInputStreamParams;
460 0 : }
461 :
462 0 : MOZ_IMPLICIT InputStreamParams::InputStreamParams(const MultiplexInputStreamParams& aOther)
463 : {
464 0 : ptr_MultiplexInputStreamParams() = new MultiplexInputStreamParams(aOther);
465 0 : mType = TMultiplexInputStreamParams;
466 0 : }
467 :
468 0 : MOZ_IMPLICIT InputStreamParams::InputStreamParams(const SlicedInputStreamParams& aOther)
469 : {
470 0 : ptr_SlicedInputStreamParams() = new SlicedInputStreamParams(aOther);
471 0 : mType = TSlicedInputStreamParams;
472 0 : }
473 :
474 0 : MOZ_IMPLICIT InputStreamParams::InputStreamParams(const IPCBlobInputStreamParams& aOther)
475 : {
476 0 : new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams(aOther);
477 0 : mType = TIPCBlobInputStreamParams;
478 0 : }
479 :
480 0 : MOZ_IMPLICIT InputStreamParams::InputStreamParams(const InputStreamParams& aOther)
481 : {
482 0 : (aOther).AssertSanity();
483 0 : switch ((aOther).type()) {
484 : case TStringInputStreamParams:
485 : {
486 0 : new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams((aOther).get_StringInputStreamParams());
487 0 : break;
488 : }
489 : case TFileInputStreamParams:
490 : {
491 0 : new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams((aOther).get_FileInputStreamParams());
492 0 : break;
493 : }
494 : case TTemporaryFileInputStreamParams:
495 : {
496 0 : new (mozilla::KnownNotNull, ptr_TemporaryFileInputStreamParams()) TemporaryFileInputStreamParams((aOther).get_TemporaryFileInputStreamParams());
497 0 : break;
498 : }
499 : case TBufferedInputStreamParams:
500 : {
501 0 : ptr_BufferedInputStreamParams() = new BufferedInputStreamParams((aOther).get_BufferedInputStreamParams());
502 0 : break;
503 : }
504 : case TMIMEInputStreamParams:
505 : {
506 0 : ptr_MIMEInputStreamParams() = new MIMEInputStreamParams((aOther).get_MIMEInputStreamParams());
507 0 : break;
508 : }
509 : case TMultiplexInputStreamParams:
510 : {
511 0 : ptr_MultiplexInputStreamParams() = new MultiplexInputStreamParams((aOther).get_MultiplexInputStreamParams());
512 0 : break;
513 : }
514 : case TSlicedInputStreamParams:
515 : {
516 0 : ptr_SlicedInputStreamParams() = new SlicedInputStreamParams((aOther).get_SlicedInputStreamParams());
517 0 : break;
518 : }
519 : case TIPCBlobInputStreamParams:
520 : {
521 0 : new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams((aOther).get_IPCBlobInputStreamParams());
522 0 : break;
523 : }
524 : case T__None:
525 : {
526 0 : break;
527 : }
528 : default:
529 : {
530 0 : mozilla::ipc::LogicError("unreached");
531 0 : return;
532 : }
533 : }
534 0 : mType = (aOther).type();
535 : }
536 :
537 0 : InputStreamParams::~InputStreamParams()
538 : {
539 0 : static_cast<void>(MaybeDestroy(T__None));
540 0 : }
541 :
542 0 : auto InputStreamParams::operator=(const StringInputStreamParams& aRhs) -> InputStreamParams&
543 : {
544 0 : if (MaybeDestroy(TStringInputStreamParams)) {
545 0 : new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams;
546 : }
547 0 : (*(ptr_StringInputStreamParams())) = aRhs;
548 0 : mType = TStringInputStreamParams;
549 0 : return (*(this));
550 : }
551 :
552 0 : auto InputStreamParams::operator=(const FileInputStreamParams& aRhs) -> InputStreamParams&
553 : {
554 0 : if (MaybeDestroy(TFileInputStreamParams)) {
555 0 : new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams;
556 : }
557 0 : (*(ptr_FileInputStreamParams())) = aRhs;
558 0 : mType = TFileInputStreamParams;
559 0 : return (*(this));
560 : }
561 :
562 0 : auto InputStreamParams::operator=(const TemporaryFileInputStreamParams& aRhs) -> InputStreamParams&
563 : {
564 0 : if (MaybeDestroy(TTemporaryFileInputStreamParams)) {
565 0 : new (mozilla::KnownNotNull, ptr_TemporaryFileInputStreamParams()) TemporaryFileInputStreamParams;
566 : }
567 0 : (*(ptr_TemporaryFileInputStreamParams())) = aRhs;
568 0 : mType = TTemporaryFileInputStreamParams;
569 0 : return (*(this));
570 : }
571 :
572 0 : auto InputStreamParams::operator=(const BufferedInputStreamParams& aRhs) -> InputStreamParams&
573 : {
574 0 : if (MaybeDestroy(TBufferedInputStreamParams)) {
575 0 : ptr_BufferedInputStreamParams() = new BufferedInputStreamParams;
576 : }
577 0 : (*(ptr_BufferedInputStreamParams())) = aRhs;
578 0 : mType = TBufferedInputStreamParams;
579 0 : return (*(this));
580 : }
581 :
582 0 : auto InputStreamParams::operator=(const MIMEInputStreamParams& aRhs) -> InputStreamParams&
583 : {
584 0 : if (MaybeDestroy(TMIMEInputStreamParams)) {
585 0 : ptr_MIMEInputStreamParams() = new MIMEInputStreamParams;
586 : }
587 0 : (*(ptr_MIMEInputStreamParams())) = aRhs;
588 0 : mType = TMIMEInputStreamParams;
589 0 : return (*(this));
590 : }
591 :
592 0 : auto InputStreamParams::operator=(const MultiplexInputStreamParams& aRhs) -> InputStreamParams&
593 : {
594 0 : if (MaybeDestroy(TMultiplexInputStreamParams)) {
595 0 : ptr_MultiplexInputStreamParams() = new MultiplexInputStreamParams;
596 : }
597 0 : (*(ptr_MultiplexInputStreamParams())) = aRhs;
598 0 : mType = TMultiplexInputStreamParams;
599 0 : return (*(this));
600 : }
601 :
602 0 : auto InputStreamParams::operator=(const SlicedInputStreamParams& aRhs) -> InputStreamParams&
603 : {
604 0 : if (MaybeDestroy(TSlicedInputStreamParams)) {
605 0 : ptr_SlicedInputStreamParams() = new SlicedInputStreamParams;
606 : }
607 0 : (*(ptr_SlicedInputStreamParams())) = aRhs;
608 0 : mType = TSlicedInputStreamParams;
609 0 : return (*(this));
610 : }
611 :
612 0 : auto InputStreamParams::operator=(const IPCBlobInputStreamParams& aRhs) -> InputStreamParams&
613 : {
614 0 : if (MaybeDestroy(TIPCBlobInputStreamParams)) {
615 0 : new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams;
616 : }
617 0 : (*(ptr_IPCBlobInputStreamParams())) = aRhs;
618 0 : mType = TIPCBlobInputStreamParams;
619 0 : return (*(this));
620 : }
621 :
622 0 : auto InputStreamParams::operator=(const InputStreamParams& aRhs) -> InputStreamParams&
623 : {
624 0 : (aRhs).AssertSanity();
625 0 : Type t = (aRhs).type();
626 0 : switch (t) {
627 : case TStringInputStreamParams:
628 : {
629 0 : if (MaybeDestroy(t)) {
630 0 : new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams;
631 : }
632 0 : (*(ptr_StringInputStreamParams())) = (aRhs).get_StringInputStreamParams();
633 0 : break;
634 : }
635 : case TFileInputStreamParams:
636 : {
637 0 : if (MaybeDestroy(t)) {
638 0 : new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams;
639 : }
640 0 : (*(ptr_FileInputStreamParams())) = (aRhs).get_FileInputStreamParams();
641 0 : break;
642 : }
643 : case TTemporaryFileInputStreamParams:
644 : {
645 0 : if (MaybeDestroy(t)) {
646 0 : new (mozilla::KnownNotNull, ptr_TemporaryFileInputStreamParams()) TemporaryFileInputStreamParams;
647 : }
648 0 : (*(ptr_TemporaryFileInputStreamParams())) = (aRhs).get_TemporaryFileInputStreamParams();
649 0 : break;
650 : }
651 : case TBufferedInputStreamParams:
652 : {
653 0 : if (MaybeDestroy(t)) {
654 0 : ptr_BufferedInputStreamParams() = new BufferedInputStreamParams;
655 : }
656 0 : (*(ptr_BufferedInputStreamParams())) = (aRhs).get_BufferedInputStreamParams();
657 0 : break;
658 : }
659 : case TMIMEInputStreamParams:
660 : {
661 0 : if (MaybeDestroy(t)) {
662 0 : ptr_MIMEInputStreamParams() = new MIMEInputStreamParams;
663 : }
664 0 : (*(ptr_MIMEInputStreamParams())) = (aRhs).get_MIMEInputStreamParams();
665 0 : break;
666 : }
667 : case TMultiplexInputStreamParams:
668 : {
669 0 : if (MaybeDestroy(t)) {
670 0 : ptr_MultiplexInputStreamParams() = new MultiplexInputStreamParams;
671 : }
672 0 : (*(ptr_MultiplexInputStreamParams())) = (aRhs).get_MultiplexInputStreamParams();
673 0 : break;
674 : }
675 : case TSlicedInputStreamParams:
676 : {
677 0 : if (MaybeDestroy(t)) {
678 0 : ptr_SlicedInputStreamParams() = new SlicedInputStreamParams;
679 : }
680 0 : (*(ptr_SlicedInputStreamParams())) = (aRhs).get_SlicedInputStreamParams();
681 0 : break;
682 : }
683 : case TIPCBlobInputStreamParams:
684 : {
685 0 : if (MaybeDestroy(t)) {
686 0 : new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams;
687 : }
688 0 : (*(ptr_IPCBlobInputStreamParams())) = (aRhs).get_IPCBlobInputStreamParams();
689 0 : break;
690 : }
691 : case T__None:
692 : {
693 0 : static_cast<void>(MaybeDestroy(t));
694 0 : break;
695 : }
696 : default:
697 : {
698 0 : mozilla::ipc::LogicError("unreached");
699 0 : break;
700 : }
701 : }
702 0 : mType = t;
703 0 : return (*(this));
704 : }
705 :
706 0 : auto InputStreamParams::operator==(const StringInputStreamParams& aRhs) const -> bool
707 : {
708 0 : return (get_StringInputStreamParams()) == (aRhs);
709 : }
710 :
711 0 : auto InputStreamParams::operator==(const FileInputStreamParams& aRhs) const -> bool
712 : {
713 0 : return (get_FileInputStreamParams()) == (aRhs);
714 : }
715 :
716 0 : auto InputStreamParams::operator==(const TemporaryFileInputStreamParams& aRhs) const -> bool
717 : {
718 0 : return (get_TemporaryFileInputStreamParams()) == (aRhs);
719 : }
720 :
721 0 : auto InputStreamParams::operator==(const BufferedInputStreamParams& aRhs) const -> bool
722 : {
723 0 : return (get_BufferedInputStreamParams()) == (aRhs);
724 : }
725 :
726 0 : auto InputStreamParams::operator==(const MIMEInputStreamParams& aRhs) const -> bool
727 : {
728 0 : return (get_MIMEInputStreamParams()) == (aRhs);
729 : }
730 :
731 0 : auto InputStreamParams::operator==(const MultiplexInputStreamParams& aRhs) const -> bool
732 : {
733 0 : return (get_MultiplexInputStreamParams()) == (aRhs);
734 : }
735 :
736 0 : auto InputStreamParams::operator==(const SlicedInputStreamParams& aRhs) const -> bool
737 : {
738 0 : return (get_SlicedInputStreamParams()) == (aRhs);
739 : }
740 :
741 0 : auto InputStreamParams::operator==(const IPCBlobInputStreamParams& aRhs) const -> bool
742 : {
743 0 : return (get_IPCBlobInputStreamParams()) == (aRhs);
744 : }
745 :
746 0 : auto InputStreamParams::operator==(const InputStreamParams& aRhs) const -> bool
747 : {
748 0 : if ((type()) != ((aRhs).type())) {
749 0 : return false;
750 : }
751 :
752 0 : switch (type()) {
753 : case TStringInputStreamParams:
754 : {
755 0 : return (get_StringInputStreamParams()) == ((aRhs).get_StringInputStreamParams());
756 : }
757 : case TFileInputStreamParams:
758 : {
759 0 : return (get_FileInputStreamParams()) == ((aRhs).get_FileInputStreamParams());
760 : }
761 : case TTemporaryFileInputStreamParams:
762 : {
763 0 : return (get_TemporaryFileInputStreamParams()) == ((aRhs).get_TemporaryFileInputStreamParams());
764 : }
765 : case TBufferedInputStreamParams:
766 : {
767 0 : return (get_BufferedInputStreamParams()) == ((aRhs).get_BufferedInputStreamParams());
768 : }
769 : case TMIMEInputStreamParams:
770 : {
771 0 : return (get_MIMEInputStreamParams()) == ((aRhs).get_MIMEInputStreamParams());
772 : }
773 : case TMultiplexInputStreamParams:
774 : {
775 0 : return (get_MultiplexInputStreamParams()) == ((aRhs).get_MultiplexInputStreamParams());
776 : }
777 : case TSlicedInputStreamParams:
778 : {
779 0 : return (get_SlicedInputStreamParams()) == ((aRhs).get_SlicedInputStreamParams());
780 : }
781 : case TIPCBlobInputStreamParams:
782 : {
783 0 : return (get_IPCBlobInputStreamParams()) == ((aRhs).get_IPCBlobInputStreamParams());
784 : }
785 : default:
786 : {
787 0 : mozilla::ipc::LogicError("unreached");
788 0 : return false;
789 : }
790 : }
791 : }
792 :
793 0 : auto InputStreamParams::get(StringInputStreamParams* aOutValue) const -> void
794 : {
795 0 : (*(aOutValue)) = get_StringInputStreamParams();
796 0 : }
797 :
798 0 : auto InputStreamParams::get(FileInputStreamParams* aOutValue) const -> void
799 : {
800 0 : (*(aOutValue)) = get_FileInputStreamParams();
801 0 : }
802 :
803 0 : auto InputStreamParams::get(TemporaryFileInputStreamParams* aOutValue) const -> void
804 : {
805 0 : (*(aOutValue)) = get_TemporaryFileInputStreamParams();
806 0 : }
807 :
808 0 : auto InputStreamParams::get(BufferedInputStreamParams* aOutValue) const -> void
809 : {
810 0 : (*(aOutValue)) = get_BufferedInputStreamParams();
811 0 : }
812 :
813 0 : auto InputStreamParams::get(MIMEInputStreamParams* aOutValue) const -> void
814 : {
815 0 : (*(aOutValue)) = get_MIMEInputStreamParams();
816 0 : }
817 :
818 0 : auto InputStreamParams::get(MultiplexInputStreamParams* aOutValue) const -> void
819 : {
820 0 : (*(aOutValue)) = get_MultiplexInputStreamParams();
821 0 : }
822 :
823 0 : auto InputStreamParams::get(SlicedInputStreamParams* aOutValue) const -> void
824 : {
825 0 : (*(aOutValue)) = get_SlicedInputStreamParams();
826 0 : }
827 :
828 0 : auto InputStreamParams::get(IPCBlobInputStreamParams* aOutValue) const -> void
829 : {
830 0 : (*(aOutValue)) = get_IPCBlobInputStreamParams();
831 0 : }
832 :
833 : } // namespace ipc
834 : } // namespace mozilla
835 :
836 : //-----------------------------------------------------------------------------
837 : // Method definitions for the IPDL type |union OptionalInputStreamParams|
838 : //
839 : namespace mozilla {
840 : namespace ipc {
841 0 : auto OptionalInputStreamParams::MaybeDestroy(Type aNewType) -> bool
842 : {
843 0 : if ((mType) == (T__None)) {
844 0 : return true;
845 : }
846 0 : if ((mType) == (aNewType)) {
847 0 : return false;
848 : }
849 0 : switch (mType) {
850 : case Tvoid_t:
851 : {
852 0 : (ptr_void_t())->~void_t__tdef();
853 0 : break;
854 : }
855 : case TInputStreamParams:
856 : {
857 0 : delete ptr_InputStreamParams();
858 0 : break;
859 : }
860 : default:
861 : {
862 0 : mozilla::ipc::LogicError("not reached");
863 0 : break;
864 : }
865 : }
866 0 : return true;
867 : }
868 :
869 0 : MOZ_IMPLICIT OptionalInputStreamParams::OptionalInputStreamParams(const void_t& aOther)
870 : {
871 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther);
872 0 : mType = Tvoid_t;
873 0 : }
874 :
875 0 : MOZ_IMPLICIT OptionalInputStreamParams::OptionalInputStreamParams(const InputStreamParams& aOther)
876 : {
877 0 : ptr_InputStreamParams() = new InputStreamParams(aOther);
878 0 : mType = TInputStreamParams;
879 0 : }
880 :
881 0 : MOZ_IMPLICIT OptionalInputStreamParams::OptionalInputStreamParams(const OptionalInputStreamParams& aOther)
882 : {
883 0 : (aOther).AssertSanity();
884 0 : switch ((aOther).type()) {
885 : case Tvoid_t:
886 : {
887 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t());
888 0 : break;
889 : }
890 : case TInputStreamParams:
891 : {
892 0 : ptr_InputStreamParams() = new InputStreamParams((aOther).get_InputStreamParams());
893 0 : break;
894 : }
895 : case T__None:
896 : {
897 0 : break;
898 : }
899 : default:
900 : {
901 0 : mozilla::ipc::LogicError("unreached");
902 0 : return;
903 : }
904 : }
905 0 : mType = (aOther).type();
906 : }
907 :
908 0 : OptionalInputStreamParams::~OptionalInputStreamParams()
909 : {
910 0 : static_cast<void>(MaybeDestroy(T__None));
911 0 : }
912 :
913 0 : auto OptionalInputStreamParams::operator=(const void_t& aRhs) -> OptionalInputStreamParams&
914 : {
915 0 : if (MaybeDestroy(Tvoid_t)) {
916 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t;
917 : }
918 0 : (*(ptr_void_t())) = aRhs;
919 0 : mType = Tvoid_t;
920 0 : return (*(this));
921 : }
922 :
923 0 : auto OptionalInputStreamParams::operator=(const InputStreamParams& aRhs) -> OptionalInputStreamParams&
924 : {
925 0 : if (MaybeDestroy(TInputStreamParams)) {
926 0 : ptr_InputStreamParams() = new InputStreamParams;
927 : }
928 0 : (*(ptr_InputStreamParams())) = aRhs;
929 0 : mType = TInputStreamParams;
930 0 : return (*(this));
931 : }
932 :
933 0 : auto OptionalInputStreamParams::operator=(const OptionalInputStreamParams& aRhs) -> OptionalInputStreamParams&
934 : {
935 0 : (aRhs).AssertSanity();
936 0 : Type t = (aRhs).type();
937 0 : switch (t) {
938 : case Tvoid_t:
939 : {
940 0 : if (MaybeDestroy(t)) {
941 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t;
942 : }
943 0 : (*(ptr_void_t())) = (aRhs).get_void_t();
944 0 : break;
945 : }
946 : case TInputStreamParams:
947 : {
948 0 : if (MaybeDestroy(t)) {
949 0 : ptr_InputStreamParams() = new InputStreamParams;
950 : }
951 0 : (*(ptr_InputStreamParams())) = (aRhs).get_InputStreamParams();
952 0 : break;
953 : }
954 : case T__None:
955 : {
956 0 : static_cast<void>(MaybeDestroy(t));
957 0 : break;
958 : }
959 : default:
960 : {
961 0 : mozilla::ipc::LogicError("unreached");
962 0 : break;
963 : }
964 : }
965 0 : mType = t;
966 0 : return (*(this));
967 : }
968 :
969 0 : auto OptionalInputStreamParams::operator==(const void_t& aRhs) const -> bool
970 : {
971 0 : return (get_void_t()) == (aRhs);
972 : }
973 :
974 0 : auto OptionalInputStreamParams::operator==(const InputStreamParams& aRhs) const -> bool
975 : {
976 0 : return (get_InputStreamParams()) == (aRhs);
977 : }
978 :
979 0 : auto OptionalInputStreamParams::operator==(const OptionalInputStreamParams& aRhs) const -> bool
980 : {
981 0 : if ((type()) != ((aRhs).type())) {
982 0 : return false;
983 : }
984 :
985 0 : switch (type()) {
986 : case Tvoid_t:
987 : {
988 0 : return (get_void_t()) == ((aRhs).get_void_t());
989 : }
990 : case TInputStreamParams:
991 : {
992 0 : return (get_InputStreamParams()) == ((aRhs).get_InputStreamParams());
993 : }
994 : default:
995 : {
996 0 : mozilla::ipc::LogicError("unreached");
997 0 : return false;
998 : }
999 : }
1000 : }
1001 :
1002 0 : auto OptionalInputStreamParams::get(void_t* aOutValue) const -> void
1003 : {
1004 0 : (*(aOutValue)) = get_void_t();
1005 0 : }
1006 :
1007 0 : auto OptionalInputStreamParams::get(InputStreamParams* aOutValue) const -> void
1008 : {
1009 0 : (*(aOutValue)) = get_InputStreamParams();
1010 0 : }
1011 :
1012 : } // namespace ipc
1013 : } // namespace mozilla
1014 :
1015 : //-----------------------------------------------------------------------------
1016 : // Method definitions for the IPDL type |struct BufferedInputStreamParams|
1017 : //
1018 : namespace mozilla {
1019 : namespace ipc {
1020 0 : MOZ_IMPLICIT BufferedInputStreamParams::BufferedInputStreamParams() :
1021 0 : bufferSize_()
1022 : {
1023 0 : Init();
1024 0 : }
1025 :
1026 0 : BufferedInputStreamParams::~BufferedInputStreamParams()
1027 : {
1028 0 : delete optionalStream_;
1029 0 : }
1030 :
1031 0 : auto BufferedInputStreamParams::operator==(const BufferedInputStreamParams& _o) const -> bool
1032 : {
1033 0 : if ((!((optionalStream()) == ((_o).optionalStream())))) {
1034 0 : return false;
1035 : }
1036 0 : if ((!((bufferSize()) == ((_o).bufferSize())))) {
1037 0 : return false;
1038 : }
1039 0 : return true;
1040 : }
1041 :
1042 0 : auto BufferedInputStreamParams::operator!=(const BufferedInputStreamParams& _o) const -> bool
1043 : {
1044 0 : return (!(operator==(_o)));
1045 : }
1046 :
1047 0 : auto BufferedInputStreamParams::Init() -> void
1048 : {
1049 0 : optionalStream_ = new OptionalInputStreamParams();
1050 0 : }
1051 :
1052 0 : auto BufferedInputStreamParams::Assign(
1053 : const OptionalInputStreamParams& _optionalStream,
1054 : const uint32_t& _bufferSize) -> void
1055 : {
1056 0 : (*(optionalStream_)) = _optionalStream;
1057 0 : bufferSize_ = _bufferSize;
1058 0 : }
1059 :
1060 : } // namespace ipc
1061 : } // namespace mozilla
1062 :
1063 : //-----------------------------------------------------------------------------
1064 : // Method definitions for the IPDL type |struct MIMEInputStreamParams|
1065 : //
1066 : namespace mozilla {
1067 : namespace ipc {
1068 0 : MOZ_IMPLICIT MIMEInputStreamParams::MIMEInputStreamParams() :
1069 0 : startedReading_()
1070 : {
1071 0 : Init();
1072 0 : }
1073 :
1074 0 : MIMEInputStreamParams::~MIMEInputStreamParams()
1075 : {
1076 0 : delete optionalStream_;
1077 0 : }
1078 :
1079 0 : auto MIMEInputStreamParams::operator==(const MIMEInputStreamParams& _o) const -> bool
1080 : {
1081 0 : if ((!((optionalStream()) == ((_o).optionalStream())))) {
1082 0 : return false;
1083 : }
1084 0 : if ((!((headers()) == ((_o).headers())))) {
1085 0 : return false;
1086 : }
1087 0 : if ((!((startedReading()) == ((_o).startedReading())))) {
1088 0 : return false;
1089 : }
1090 0 : return true;
1091 : }
1092 :
1093 0 : auto MIMEInputStreamParams::operator!=(const MIMEInputStreamParams& _o) const -> bool
1094 : {
1095 0 : return (!(operator==(_o)));
1096 : }
1097 :
1098 0 : auto MIMEInputStreamParams::Init() -> void
1099 : {
1100 0 : optionalStream_ = new OptionalInputStreamParams();
1101 0 : }
1102 :
1103 0 : auto MIMEInputStreamParams::Assign(
1104 : const OptionalInputStreamParams& _optionalStream,
1105 : const nsTArray<HeaderEntry>& _headers,
1106 : const bool& _startedReading) -> void
1107 : {
1108 0 : (*(optionalStream_)) = _optionalStream;
1109 0 : headers_ = _headers;
1110 0 : startedReading_ = _startedReading;
1111 0 : }
1112 :
1113 : } // namespace ipc
1114 : } // namespace mozilla
|