Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/ipc/URIParams.h"
8 :
9 :
10 : //-----------------------------------------------------------------------------
11 : // Method definitions for the IPDL type |struct SimpleURIParams|
12 : //
13 : namespace mozilla {
14 : namespace ipc {
15 0 : MOZ_IMPLICIT SimpleURIParams::SimpleURIParams() :
16 : scheme_(),
17 : path_(),
18 : ref_(),
19 : query_(),
20 0 : isMutable_()
21 : {
22 0 : Init();
23 0 : }
24 :
25 0 : SimpleURIParams::~SimpleURIParams()
26 : {
27 0 : }
28 :
29 0 : auto SimpleURIParams::operator==(const SimpleURIParams& _o) const -> bool
30 : {
31 0 : if ((!((scheme()) == ((_o).scheme())))) {
32 0 : return false;
33 : }
34 0 : if ((!((path()) == ((_o).path())))) {
35 0 : return false;
36 : }
37 0 : if ((!((ref()) == ((_o).ref())))) {
38 0 : return false;
39 : }
40 0 : if ((!((query()) == ((_o).query())))) {
41 0 : return false;
42 : }
43 0 : if ((!((isMutable()) == ((_o).isMutable())))) {
44 0 : return false;
45 : }
46 0 : return true;
47 : }
48 :
49 0 : auto SimpleURIParams::operator!=(const SimpleURIParams& _o) const -> bool
50 : {
51 0 : return (!(operator==(_o)));
52 : }
53 :
54 0 : auto SimpleURIParams::Init() -> void
55 : {
56 0 : }
57 :
58 0 : auto SimpleURIParams::Assign(
59 : const nsCString& _scheme,
60 : const nsCString& _path,
61 : const nsCString& _ref,
62 : const nsCString& _query,
63 : const bool& _isMutable) -> void
64 : {
65 0 : scheme_ = _scheme;
66 0 : path_ = _path;
67 0 : ref_ = _ref;
68 0 : query_ = _query;
69 0 : isMutable_ = _isMutable;
70 0 : }
71 :
72 : } // namespace ipc
73 : } // namespace mozilla
74 :
75 : //-----------------------------------------------------------------------------
76 : // Method definitions for the IPDL type |struct StandardURLSegment|
77 : //
78 : namespace mozilla {
79 : namespace ipc {
80 1320 : MOZ_IMPLICIT StandardURLSegment::StandardURLSegment() :
81 : position_(),
82 1320 : length_()
83 : {
84 1320 : Init();
85 1320 : }
86 :
87 1584 : StandardURLSegment::~StandardURLSegment()
88 : {
89 1584 : }
90 :
91 0 : auto StandardURLSegment::operator==(const StandardURLSegment& _o) const -> bool
92 : {
93 0 : if ((!((position()) == ((_o).position())))) {
94 0 : return false;
95 : }
96 0 : if ((!((length()) == ((_o).length())))) {
97 0 : return false;
98 : }
99 0 : return true;
100 : }
101 :
102 0 : auto StandardURLSegment::operator!=(const StandardURLSegment& _o) const -> bool
103 : {
104 0 : return (!(operator==(_o)));
105 : }
106 :
107 1584 : auto StandardURLSegment::Init() -> void
108 : {
109 1584 : }
110 :
111 1320 : auto StandardURLSegment::Assign(
112 : const uint32_t& _position,
113 : const int32_t& _length) -> void
114 : {
115 1320 : position_ = _position;
116 1320 : length_ = _length;
117 1320 : }
118 :
119 : } // namespace ipc
120 : } // namespace mozilla
121 :
122 : //-----------------------------------------------------------------------------
123 : // Method definitions for the IPDL type |struct StandardURLParams|
124 : //
125 : namespace mozilla {
126 : namespace ipc {
127 110 : MOZ_IMPLICIT StandardURLParams::StandardURLParams() :
128 : urlType_(),
129 : port_(),
130 : defaultPort_(),
131 : spec_(),
132 : originCharset_(),
133 : isMutable_(),
134 110 : supportsFileURL_()
135 : {
136 110 : Init();
137 110 : }
138 :
139 110 : StandardURLParams::~StandardURLParams()
140 : {
141 110 : }
142 :
143 0 : auto StandardURLParams::operator==(const StandardURLParams& _o) const -> bool
144 : {
145 0 : if ((!((urlType()) == ((_o).urlType())))) {
146 0 : return false;
147 : }
148 0 : if ((!((port()) == ((_o).port())))) {
149 0 : return false;
150 : }
151 0 : if ((!((defaultPort()) == ((_o).defaultPort())))) {
152 0 : return false;
153 : }
154 0 : if ((!((spec()) == ((_o).spec())))) {
155 0 : return false;
156 : }
157 0 : if ((!((scheme()) == ((_o).scheme())))) {
158 0 : return false;
159 : }
160 0 : if ((!((authority()) == ((_o).authority())))) {
161 0 : return false;
162 : }
163 0 : if ((!((username()) == ((_o).username())))) {
164 0 : return false;
165 : }
166 0 : if ((!((password()) == ((_o).password())))) {
167 0 : return false;
168 : }
169 0 : if ((!((host()) == ((_o).host())))) {
170 0 : return false;
171 : }
172 0 : if ((!((path()) == ((_o).path())))) {
173 0 : return false;
174 : }
175 0 : if ((!((filePath()) == ((_o).filePath())))) {
176 0 : return false;
177 : }
178 0 : if ((!((directory()) == ((_o).directory())))) {
179 0 : return false;
180 : }
181 0 : if ((!((baseName()) == ((_o).baseName())))) {
182 0 : return false;
183 : }
184 0 : if ((!((extension()) == ((_o).extension())))) {
185 0 : return false;
186 : }
187 0 : if ((!((query()) == ((_o).query())))) {
188 0 : return false;
189 : }
190 0 : if ((!((ref()) == ((_o).ref())))) {
191 0 : return false;
192 : }
193 0 : if ((!((originCharset()) == ((_o).originCharset())))) {
194 0 : return false;
195 : }
196 0 : if ((!((isMutable()) == ((_o).isMutable())))) {
197 0 : return false;
198 : }
199 0 : if ((!((supportsFileURL()) == ((_o).supportsFileURL())))) {
200 0 : return false;
201 : }
202 0 : return true;
203 : }
204 :
205 0 : auto StandardURLParams::operator!=(const StandardURLParams& _o) const -> bool
206 : {
207 0 : return (!(operator==(_o)));
208 : }
209 :
210 110 : auto StandardURLParams::Init() -> void
211 : {
212 110 : }
213 :
214 66 : auto StandardURLParams::Assign(
215 : const uint32_t& _urlType,
216 : const int32_t& _port,
217 : const int32_t& _defaultPort,
218 : const nsCString& _spec,
219 : const StandardURLSegment& _scheme,
220 : const StandardURLSegment& _authority,
221 : const StandardURLSegment& _username,
222 : const StandardURLSegment& _password,
223 : const StandardURLSegment& _host,
224 : const StandardURLSegment& _path,
225 : const StandardURLSegment& _filePath,
226 : const StandardURLSegment& _directory,
227 : const StandardURLSegment& _baseName,
228 : const StandardURLSegment& _extension,
229 : const StandardURLSegment& _query,
230 : const StandardURLSegment& _ref,
231 : const nsCString& _originCharset,
232 : const bool& _isMutable,
233 : const bool& _supportsFileURL) -> void
234 : {
235 66 : urlType_ = _urlType;
236 66 : port_ = _port;
237 66 : defaultPort_ = _defaultPort;
238 66 : spec_ = _spec;
239 66 : scheme_ = _scheme;
240 66 : authority_ = _authority;
241 66 : username_ = _username;
242 66 : password_ = _password;
243 66 : host_ = _host;
244 66 : path_ = _path;
245 66 : filePath_ = _filePath;
246 66 : directory_ = _directory;
247 66 : baseName_ = _baseName;
248 66 : extension_ = _extension;
249 66 : query_ = _query;
250 66 : ref_ = _ref;
251 66 : originCharset_ = _originCharset;
252 66 : isMutable_ = _isMutable;
253 66 : supportsFileURL_ = _supportsFileURL;
254 66 : }
255 :
256 : } // namespace ipc
257 : } // namespace mozilla
258 :
259 : //-----------------------------------------------------------------------------
260 : // Method definitions for the IPDL type |struct JARURIParams|
261 : //
262 : namespace mozilla {
263 : namespace ipc {
264 0 : MOZ_IMPLICIT JARURIParams::JARURIParams() :
265 0 : charset_()
266 : {
267 0 : Init();
268 0 : }
269 :
270 0 : JARURIParams::~JARURIParams()
271 : {
272 0 : delete jarFile_;
273 0 : delete jarEntry_;
274 0 : }
275 :
276 0 : auto JARURIParams::operator==(const JARURIParams& _o) const -> bool
277 : {
278 0 : if ((!((jarFile()) == ((_o).jarFile())))) {
279 0 : return false;
280 : }
281 0 : if ((!((jarEntry()) == ((_o).jarEntry())))) {
282 0 : return false;
283 : }
284 0 : if ((!((charset()) == ((_o).charset())))) {
285 0 : return false;
286 : }
287 0 : return true;
288 : }
289 :
290 0 : auto JARURIParams::operator!=(const JARURIParams& _o) const -> bool
291 : {
292 0 : return (!(operator==(_o)));
293 : }
294 :
295 0 : auto JARURIParams::Init() -> void
296 : {
297 0 : jarFile_ = new URIParams();
298 0 : jarEntry_ = new URIParams();
299 0 : }
300 :
301 0 : auto JARURIParams::Assign(
302 : const URIParams& _jarFile,
303 : const URIParams& _jarEntry,
304 : const nsCString& _charset) -> void
305 : {
306 0 : (*(jarFile_)) = _jarFile;
307 0 : (*(jarEntry_)) = _jarEntry;
308 0 : charset_ = _charset;
309 0 : }
310 :
311 : } // namespace ipc
312 : } // namespace mozilla
313 :
314 : //-----------------------------------------------------------------------------
315 : // Method definitions for the IPDL type |struct IconURIParams|
316 : //
317 : namespace mozilla {
318 : namespace ipc {
319 0 : MOZ_IMPLICIT IconURIParams::IconURIParams() :
320 : size_(),
321 : contentType_(),
322 : fileName_(),
323 : stockIcon_(),
324 : iconSize_(),
325 0 : iconState_()
326 : {
327 0 : Init();
328 0 : }
329 :
330 0 : IconURIParams::~IconURIParams()
331 : {
332 0 : delete uri_;
333 0 : }
334 :
335 0 : auto IconURIParams::operator==(const IconURIParams& _o) const -> bool
336 : {
337 0 : if ((!((uri()) == ((_o).uri())))) {
338 0 : return false;
339 : }
340 0 : if ((!((size()) == ((_o).size())))) {
341 0 : return false;
342 : }
343 0 : if ((!((contentType()) == ((_o).contentType())))) {
344 0 : return false;
345 : }
346 0 : if ((!((fileName()) == ((_o).fileName())))) {
347 0 : return false;
348 : }
349 0 : if ((!((stockIcon()) == ((_o).stockIcon())))) {
350 0 : return false;
351 : }
352 0 : if ((!((iconSize()) == ((_o).iconSize())))) {
353 0 : return false;
354 : }
355 0 : if ((!((iconState()) == ((_o).iconState())))) {
356 0 : return false;
357 : }
358 0 : return true;
359 : }
360 :
361 0 : auto IconURIParams::operator!=(const IconURIParams& _o) const -> bool
362 : {
363 0 : return (!(operator==(_o)));
364 : }
365 :
366 0 : auto IconURIParams::Init() -> void
367 : {
368 0 : uri_ = new OptionalURIParams();
369 0 : }
370 :
371 0 : auto IconURIParams::Assign(
372 : const OptionalURIParams& _uri,
373 : const uint32_t& _size,
374 : const nsCString& _contentType,
375 : const nsCString& _fileName,
376 : const nsCString& _stockIcon,
377 : const int32_t& _iconSize,
378 : const int32_t& _iconState) -> void
379 : {
380 0 : (*(uri_)) = _uri;
381 0 : size_ = _size;
382 0 : contentType_ = _contentType;
383 0 : fileName_ = _fileName;
384 0 : stockIcon_ = _stockIcon;
385 0 : iconSize_ = _iconSize;
386 0 : iconState_ = _iconState;
387 0 : }
388 :
389 : } // namespace ipc
390 : } // namespace mozilla
391 :
392 : //-----------------------------------------------------------------------------
393 : // Method definitions for the IPDL type |struct NullPrincipalURIParams|
394 : //
395 : namespace mozilla {
396 : namespace ipc {
397 0 : NullPrincipalURIParams::~NullPrincipalURIParams()
398 : {
399 0 : }
400 :
401 0 : auto NullPrincipalURIParams::operator==(const NullPrincipalURIParams& _o) const -> bool
402 : {
403 0 : return true;
404 : }
405 :
406 0 : auto NullPrincipalURIParams::operator!=(const NullPrincipalURIParams& _o) const -> bool
407 : {
408 0 : return (!(operator==(_o)));
409 : }
410 :
411 0 : auto NullPrincipalURIParams::Init() -> void
412 : {
413 0 : }
414 :
415 0 : auto NullPrincipalURIParams::Assign() -> void
416 : {
417 0 : }
418 :
419 : } // namespace ipc
420 : } // namespace mozilla
421 :
422 : //-----------------------------------------------------------------------------
423 : // Method definitions for the IPDL type |struct HostObjectURIParams|
424 : //
425 : namespace mozilla {
426 : namespace ipc {
427 0 : MOZ_IMPLICIT HostObjectURIParams::HostObjectURIParams()
428 : {
429 0 : Init();
430 0 : }
431 :
432 0 : HostObjectURIParams::~HostObjectURIParams()
433 : {
434 0 : }
435 :
436 0 : auto HostObjectURIParams::operator==(const HostObjectURIParams& _o) const -> bool
437 : {
438 0 : if ((!((simpleParams()) == ((_o).simpleParams())))) {
439 0 : return false;
440 : }
441 0 : if ((!((principal()) == ((_o).principal())))) {
442 0 : return false;
443 : }
444 0 : return true;
445 : }
446 :
447 0 : auto HostObjectURIParams::operator!=(const HostObjectURIParams& _o) const -> bool
448 : {
449 0 : return (!(operator==(_o)));
450 : }
451 :
452 0 : auto HostObjectURIParams::Init() -> void
453 : {
454 0 : }
455 :
456 0 : auto HostObjectURIParams::Assign(
457 : const SimpleURIParams& _simpleParams,
458 : const OptionalPrincipalInfo& _principal) -> void
459 : {
460 0 : simpleParams_ = _simpleParams;
461 0 : principal_ = _principal;
462 0 : }
463 :
464 : } // namespace ipc
465 : } // namespace mozilla
466 :
467 : //-----------------------------------------------------------------------------
468 : // Method definitions for the IPDL type |union URIParams|
469 : //
470 : namespace mozilla {
471 : namespace ipc {
472 160 : auto URIParams::MaybeDestroy(Type aNewType) -> bool
473 : {
474 160 : if ((mType) == (T__None)) {
475 94 : return true;
476 : }
477 66 : if ((mType) == (aNewType)) {
478 0 : return false;
479 : }
480 66 : switch (mType) {
481 : case TSimpleURIParams:
482 : {
483 0 : (ptr_SimpleURIParams())->~SimpleURIParams__tdef();
484 0 : break;
485 : }
486 : case TStandardURLParams:
487 : {
488 66 : (ptr_StandardURLParams())->~StandardURLParams__tdef();
489 66 : break;
490 : }
491 : case TJARURIParams:
492 : {
493 0 : delete ptr_JARURIParams();
494 0 : break;
495 : }
496 : case TIconURIParams:
497 : {
498 0 : delete ptr_IconURIParams();
499 0 : break;
500 : }
501 : case TNullPrincipalURIParams:
502 : {
503 0 : (ptr_NullPrincipalURIParams())->~NullPrincipalURIParams__tdef();
504 0 : break;
505 : }
506 : case TJSURIParams:
507 : {
508 0 : delete ptr_JSURIParams();
509 0 : break;
510 : }
511 : case TSimpleNestedURIParams:
512 : {
513 0 : delete ptr_SimpleNestedURIParams();
514 0 : break;
515 : }
516 : case THostObjectURIParams:
517 : {
518 0 : (ptr_HostObjectURIParams())->~HostObjectURIParams__tdef();
519 0 : break;
520 : }
521 : default:
522 : {
523 0 : mozilla::ipc::LogicError("not reached");
524 0 : break;
525 : }
526 : }
527 66 : return true;
528 : }
529 :
530 0 : MOZ_IMPLICIT URIParams::URIParams(const SimpleURIParams& aOther)
531 : {
532 0 : new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams(aOther);
533 0 : mType = TSimpleURIParams;
534 0 : }
535 :
536 0 : MOZ_IMPLICIT URIParams::URIParams(const StandardURLParams& aOther)
537 : {
538 0 : new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams(aOther);
539 0 : mType = TStandardURLParams;
540 0 : }
541 :
542 0 : MOZ_IMPLICIT URIParams::URIParams(const JARURIParams& aOther)
543 : {
544 0 : ptr_JARURIParams() = new JARURIParams(aOther);
545 0 : mType = TJARURIParams;
546 0 : }
547 :
548 0 : MOZ_IMPLICIT URIParams::URIParams(const IconURIParams& aOther)
549 : {
550 0 : ptr_IconURIParams() = new IconURIParams(aOther);
551 0 : mType = TIconURIParams;
552 0 : }
553 :
554 0 : MOZ_IMPLICIT URIParams::URIParams(const NullPrincipalURIParams& aOther)
555 : {
556 0 : new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams(aOther);
557 0 : mType = TNullPrincipalURIParams;
558 0 : }
559 :
560 0 : MOZ_IMPLICIT URIParams::URIParams(const JSURIParams& aOther)
561 : {
562 0 : ptr_JSURIParams() = new JSURIParams(aOther);
563 0 : mType = TJSURIParams;
564 0 : }
565 :
566 0 : MOZ_IMPLICIT URIParams::URIParams(const SimpleNestedURIParams& aOther)
567 : {
568 0 : ptr_SimpleNestedURIParams() = new SimpleNestedURIParams(aOther);
569 0 : mType = TSimpleNestedURIParams;
570 0 : }
571 :
572 0 : MOZ_IMPLICIT URIParams::URIParams(const HostObjectURIParams& aOther)
573 : {
574 0 : new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams(aOther);
575 0 : mType = THostObjectURIParams;
576 0 : }
577 :
578 0 : MOZ_IMPLICIT URIParams::URIParams(const URIParams& aOther)
579 : {
580 0 : (aOther).AssertSanity();
581 0 : switch ((aOther).type()) {
582 : case TSimpleURIParams:
583 : {
584 0 : new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams((aOther).get_SimpleURIParams());
585 0 : break;
586 : }
587 : case TStandardURLParams:
588 : {
589 0 : new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams((aOther).get_StandardURLParams());
590 0 : break;
591 : }
592 : case TJARURIParams:
593 : {
594 0 : ptr_JARURIParams() = new JARURIParams((aOther).get_JARURIParams());
595 0 : break;
596 : }
597 : case TIconURIParams:
598 : {
599 0 : ptr_IconURIParams() = new IconURIParams((aOther).get_IconURIParams());
600 0 : break;
601 : }
602 : case TNullPrincipalURIParams:
603 : {
604 0 : new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams((aOther).get_NullPrincipalURIParams());
605 0 : break;
606 : }
607 : case TJSURIParams:
608 : {
609 0 : ptr_JSURIParams() = new JSURIParams((aOther).get_JSURIParams());
610 0 : break;
611 : }
612 : case TSimpleNestedURIParams:
613 : {
614 0 : ptr_SimpleNestedURIParams() = new SimpleNestedURIParams((aOther).get_SimpleNestedURIParams());
615 0 : break;
616 : }
617 : case THostObjectURIParams:
618 : {
619 0 : new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams((aOther).get_HostObjectURIParams());
620 0 : break;
621 : }
622 : case T__None:
623 : {
624 0 : break;
625 : }
626 : default:
627 : {
628 0 : mozilla::ipc::LogicError("unreached");
629 0 : return;
630 : }
631 : }
632 0 : mType = (aOther).type();
633 : }
634 :
635 160 : URIParams::~URIParams()
636 : {
637 80 : static_cast<void>(MaybeDestroy(T__None));
638 80 : }
639 :
640 0 : auto URIParams::operator=(const SimpleURIParams& aRhs) -> URIParams&
641 : {
642 0 : if (MaybeDestroy(TSimpleURIParams)) {
643 0 : new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams;
644 : }
645 0 : (*(ptr_SimpleURIParams())) = aRhs;
646 0 : mType = TSimpleURIParams;
647 0 : return (*(this));
648 : }
649 :
650 44 : auto URIParams::operator=(const StandardURLParams& aRhs) -> URIParams&
651 : {
652 44 : if (MaybeDestroy(TStandardURLParams)) {
653 44 : new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams;
654 : }
655 44 : (*(ptr_StandardURLParams())) = aRhs;
656 44 : mType = TStandardURLParams;
657 44 : return (*(this));
658 : }
659 :
660 0 : auto URIParams::operator=(const JARURIParams& aRhs) -> URIParams&
661 : {
662 0 : if (MaybeDestroy(TJARURIParams)) {
663 0 : ptr_JARURIParams() = new JARURIParams;
664 : }
665 0 : (*(ptr_JARURIParams())) = aRhs;
666 0 : mType = TJARURIParams;
667 0 : return (*(this));
668 : }
669 :
670 0 : auto URIParams::operator=(const IconURIParams& aRhs) -> URIParams&
671 : {
672 0 : if (MaybeDestroy(TIconURIParams)) {
673 0 : ptr_IconURIParams() = new IconURIParams;
674 : }
675 0 : (*(ptr_IconURIParams())) = aRhs;
676 0 : mType = TIconURIParams;
677 0 : return (*(this));
678 : }
679 :
680 0 : auto URIParams::operator=(const NullPrincipalURIParams& aRhs) -> URIParams&
681 : {
682 0 : if (MaybeDestroy(TNullPrincipalURIParams)) {
683 0 : new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams;
684 : }
685 0 : (*(ptr_NullPrincipalURIParams())) = aRhs;
686 0 : mType = TNullPrincipalURIParams;
687 0 : return (*(this));
688 : }
689 :
690 0 : auto URIParams::operator=(const JSURIParams& aRhs) -> URIParams&
691 : {
692 0 : if (MaybeDestroy(TJSURIParams)) {
693 0 : ptr_JSURIParams() = new JSURIParams;
694 : }
695 0 : (*(ptr_JSURIParams())) = aRhs;
696 0 : mType = TJSURIParams;
697 0 : return (*(this));
698 : }
699 :
700 0 : auto URIParams::operator=(const SimpleNestedURIParams& aRhs) -> URIParams&
701 : {
702 0 : if (MaybeDestroy(TSimpleNestedURIParams)) {
703 0 : ptr_SimpleNestedURIParams() = new SimpleNestedURIParams;
704 : }
705 0 : (*(ptr_SimpleNestedURIParams())) = aRhs;
706 0 : mType = TSimpleNestedURIParams;
707 0 : return (*(this));
708 : }
709 :
710 0 : auto URIParams::operator=(const HostObjectURIParams& aRhs) -> URIParams&
711 : {
712 0 : if (MaybeDestroy(THostObjectURIParams)) {
713 0 : new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams;
714 : }
715 0 : (*(ptr_HostObjectURIParams())) = aRhs;
716 0 : mType = THostObjectURIParams;
717 0 : return (*(this));
718 : }
719 :
720 36 : auto URIParams::operator=(const URIParams& aRhs) -> URIParams&
721 : {
722 36 : (aRhs).AssertSanity();
723 36 : Type t = (aRhs).type();
724 36 : switch (t) {
725 : case TSimpleURIParams:
726 : {
727 0 : if (MaybeDestroy(t)) {
728 0 : new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams;
729 : }
730 0 : (*(ptr_SimpleURIParams())) = (aRhs).get_SimpleURIParams();
731 0 : break;
732 : }
733 : case TStandardURLParams:
734 : {
735 22 : if (MaybeDestroy(t)) {
736 22 : new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams;
737 : }
738 22 : (*(ptr_StandardURLParams())) = (aRhs).get_StandardURLParams();
739 22 : break;
740 : }
741 : case TJARURIParams:
742 : {
743 0 : if (MaybeDestroy(t)) {
744 0 : ptr_JARURIParams() = new JARURIParams;
745 : }
746 0 : (*(ptr_JARURIParams())) = (aRhs).get_JARURIParams();
747 0 : break;
748 : }
749 : case TIconURIParams:
750 : {
751 0 : if (MaybeDestroy(t)) {
752 0 : ptr_IconURIParams() = new IconURIParams;
753 : }
754 0 : (*(ptr_IconURIParams())) = (aRhs).get_IconURIParams();
755 0 : break;
756 : }
757 : case TNullPrincipalURIParams:
758 : {
759 0 : if (MaybeDestroy(t)) {
760 0 : new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams;
761 : }
762 0 : (*(ptr_NullPrincipalURIParams())) = (aRhs).get_NullPrincipalURIParams();
763 0 : break;
764 : }
765 : case TJSURIParams:
766 : {
767 0 : if (MaybeDestroy(t)) {
768 0 : ptr_JSURIParams() = new JSURIParams;
769 : }
770 0 : (*(ptr_JSURIParams())) = (aRhs).get_JSURIParams();
771 0 : break;
772 : }
773 : case TSimpleNestedURIParams:
774 : {
775 0 : if (MaybeDestroy(t)) {
776 0 : ptr_SimpleNestedURIParams() = new SimpleNestedURIParams;
777 : }
778 0 : (*(ptr_SimpleNestedURIParams())) = (aRhs).get_SimpleNestedURIParams();
779 0 : break;
780 : }
781 : case THostObjectURIParams:
782 : {
783 0 : if (MaybeDestroy(t)) {
784 0 : new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams;
785 : }
786 0 : (*(ptr_HostObjectURIParams())) = (aRhs).get_HostObjectURIParams();
787 0 : break;
788 : }
789 : case T__None:
790 : {
791 14 : static_cast<void>(MaybeDestroy(t));
792 14 : break;
793 : }
794 : default:
795 : {
796 0 : mozilla::ipc::LogicError("unreached");
797 0 : break;
798 : }
799 : }
800 36 : mType = t;
801 36 : return (*(this));
802 : }
803 :
804 0 : auto URIParams::operator==(const SimpleURIParams& aRhs) const -> bool
805 : {
806 0 : return (get_SimpleURIParams()) == (aRhs);
807 : }
808 :
809 0 : auto URIParams::operator==(const StandardURLParams& aRhs) const -> bool
810 : {
811 0 : return (get_StandardURLParams()) == (aRhs);
812 : }
813 :
814 0 : auto URIParams::operator==(const JARURIParams& aRhs) const -> bool
815 : {
816 0 : return (get_JARURIParams()) == (aRhs);
817 : }
818 :
819 0 : auto URIParams::operator==(const IconURIParams& aRhs) const -> bool
820 : {
821 0 : return (get_IconURIParams()) == (aRhs);
822 : }
823 :
824 0 : auto URIParams::operator==(const NullPrincipalURIParams& aRhs) const -> bool
825 : {
826 0 : return (get_NullPrincipalURIParams()) == (aRhs);
827 : }
828 :
829 0 : auto URIParams::operator==(const JSURIParams& aRhs) const -> bool
830 : {
831 0 : return (get_JSURIParams()) == (aRhs);
832 : }
833 :
834 0 : auto URIParams::operator==(const SimpleNestedURIParams& aRhs) const -> bool
835 : {
836 0 : return (get_SimpleNestedURIParams()) == (aRhs);
837 : }
838 :
839 0 : auto URIParams::operator==(const HostObjectURIParams& aRhs) const -> bool
840 : {
841 0 : return (get_HostObjectURIParams()) == (aRhs);
842 : }
843 :
844 0 : auto URIParams::operator==(const URIParams& aRhs) const -> bool
845 : {
846 0 : if ((type()) != ((aRhs).type())) {
847 0 : return false;
848 : }
849 :
850 0 : switch (type()) {
851 : case TSimpleURIParams:
852 : {
853 0 : return (get_SimpleURIParams()) == ((aRhs).get_SimpleURIParams());
854 : }
855 : case TStandardURLParams:
856 : {
857 0 : return (get_StandardURLParams()) == ((aRhs).get_StandardURLParams());
858 : }
859 : case TJARURIParams:
860 : {
861 0 : return (get_JARURIParams()) == ((aRhs).get_JARURIParams());
862 : }
863 : case TIconURIParams:
864 : {
865 0 : return (get_IconURIParams()) == ((aRhs).get_IconURIParams());
866 : }
867 : case TNullPrincipalURIParams:
868 : {
869 0 : return (get_NullPrincipalURIParams()) == ((aRhs).get_NullPrincipalURIParams());
870 : }
871 : case TJSURIParams:
872 : {
873 0 : return (get_JSURIParams()) == ((aRhs).get_JSURIParams());
874 : }
875 : case TSimpleNestedURIParams:
876 : {
877 0 : return (get_SimpleNestedURIParams()) == ((aRhs).get_SimpleNestedURIParams());
878 : }
879 : case THostObjectURIParams:
880 : {
881 0 : return (get_HostObjectURIParams()) == ((aRhs).get_HostObjectURIParams());
882 : }
883 : default:
884 : {
885 0 : mozilla::ipc::LogicError("unreached");
886 0 : return false;
887 : }
888 : }
889 : }
890 :
891 0 : auto URIParams::get(SimpleURIParams* aOutValue) const -> void
892 : {
893 0 : (*(aOutValue)) = get_SimpleURIParams();
894 0 : }
895 :
896 0 : auto URIParams::get(StandardURLParams* aOutValue) const -> void
897 : {
898 0 : (*(aOutValue)) = get_StandardURLParams();
899 0 : }
900 :
901 0 : auto URIParams::get(JARURIParams* aOutValue) const -> void
902 : {
903 0 : (*(aOutValue)) = get_JARURIParams();
904 0 : }
905 :
906 0 : auto URIParams::get(IconURIParams* aOutValue) const -> void
907 : {
908 0 : (*(aOutValue)) = get_IconURIParams();
909 0 : }
910 :
911 0 : auto URIParams::get(NullPrincipalURIParams* aOutValue) const -> void
912 : {
913 0 : (*(aOutValue)) = get_NullPrincipalURIParams();
914 0 : }
915 :
916 0 : auto URIParams::get(JSURIParams* aOutValue) const -> void
917 : {
918 0 : (*(aOutValue)) = get_JSURIParams();
919 0 : }
920 :
921 0 : auto URIParams::get(SimpleNestedURIParams* aOutValue) const -> void
922 : {
923 0 : (*(aOutValue)) = get_SimpleNestedURIParams();
924 0 : }
925 :
926 0 : auto URIParams::get(HostObjectURIParams* aOutValue) const -> void
927 : {
928 0 : (*(aOutValue)) = get_HostObjectURIParams();
929 0 : }
930 :
931 : } // namespace ipc
932 : } // namespace mozilla
933 :
934 : //-----------------------------------------------------------------------------
935 : // Method definitions for the IPDL type |union OptionalURIParams|
936 : //
937 : namespace mozilla {
938 : namespace ipc {
939 191 : auto OptionalURIParams::MaybeDestroy(Type aNewType) -> bool
940 : {
941 191 : if ((mType) == (T__None)) {
942 112 : return true;
943 : }
944 79 : if ((mType) == (aNewType)) {
945 0 : return false;
946 : }
947 79 : switch (mType) {
948 : case Tvoid_t:
949 : {
950 49 : (ptr_void_t())->~void_t__tdef();
951 49 : break;
952 : }
953 : case TURIParams:
954 : {
955 30 : delete ptr_URIParams();
956 30 : break;
957 : }
958 : default:
959 : {
960 0 : mozilla::ipc::LogicError("not reached");
961 0 : break;
962 : }
963 : }
964 79 : return true;
965 : }
966 :
967 3 : MOZ_IMPLICIT OptionalURIParams::OptionalURIParams(const void_t& aOther)
968 : {
969 3 : new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther);
970 3 : mType = Tvoid_t;
971 3 : }
972 :
973 0 : MOZ_IMPLICIT OptionalURIParams::OptionalURIParams(const URIParams& aOther)
974 : {
975 0 : ptr_URIParams() = new URIParams(aOther);
976 0 : mType = TURIParams;
977 0 : }
978 :
979 0 : MOZ_IMPLICIT OptionalURIParams::OptionalURIParams(const OptionalURIParams& aOther)
980 : {
981 0 : (aOther).AssertSanity();
982 0 : switch ((aOther).type()) {
983 : case Tvoid_t:
984 : {
985 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t());
986 0 : break;
987 : }
988 : case TURIParams:
989 : {
990 0 : ptr_URIParams() = new URIParams((aOther).get_URIParams());
991 0 : break;
992 : }
993 : case T__None:
994 : {
995 0 : break;
996 : }
997 : default:
998 : {
999 0 : mozilla::ipc::LogicError("unreached");
1000 0 : return;
1001 : }
1002 : }
1003 0 : mType = (aOther).type();
1004 : }
1005 :
1006 194 : OptionalURIParams::~OptionalURIParams()
1007 : {
1008 97 : static_cast<void>(MaybeDestroy(T__None));
1009 97 : }
1010 :
1011 27 : auto OptionalURIParams::operator=(const void_t& aRhs) -> OptionalURIParams&
1012 : {
1013 27 : if (MaybeDestroy(Tvoid_t)) {
1014 27 : new (mozilla::KnownNotNull, ptr_void_t()) void_t;
1015 : }
1016 27 : (*(ptr_void_t())) = aRhs;
1017 27 : mType = Tvoid_t;
1018 27 : return (*(this));
1019 : }
1020 :
1021 22 : auto OptionalURIParams::operator=(const URIParams& aRhs) -> OptionalURIParams&
1022 : {
1023 22 : if (MaybeDestroy(TURIParams)) {
1024 22 : ptr_URIParams() = new URIParams;
1025 : }
1026 22 : (*(ptr_URIParams())) = aRhs;
1027 22 : mType = TURIParams;
1028 22 : return (*(this));
1029 : }
1030 :
1031 45 : auto OptionalURIParams::operator=(const OptionalURIParams& aRhs) -> OptionalURIParams&
1032 : {
1033 45 : (aRhs).AssertSanity();
1034 45 : Type t = (aRhs).type();
1035 45 : switch (t) {
1036 : case Tvoid_t:
1037 : {
1038 19 : if (MaybeDestroy(t)) {
1039 19 : new (mozilla::KnownNotNull, ptr_void_t()) void_t;
1040 : }
1041 19 : (*(ptr_void_t())) = (aRhs).get_void_t();
1042 19 : break;
1043 : }
1044 : case TURIParams:
1045 : {
1046 8 : if (MaybeDestroy(t)) {
1047 8 : ptr_URIParams() = new URIParams;
1048 : }
1049 8 : (*(ptr_URIParams())) = (aRhs).get_URIParams();
1050 8 : break;
1051 : }
1052 : case T__None:
1053 : {
1054 18 : static_cast<void>(MaybeDestroy(t));
1055 18 : break;
1056 : }
1057 : default:
1058 : {
1059 0 : mozilla::ipc::LogicError("unreached");
1060 0 : break;
1061 : }
1062 : }
1063 45 : mType = t;
1064 45 : return (*(this));
1065 : }
1066 :
1067 0 : auto OptionalURIParams::operator==(const void_t& aRhs) const -> bool
1068 : {
1069 0 : return (get_void_t()) == (aRhs);
1070 : }
1071 :
1072 0 : auto OptionalURIParams::operator==(const URIParams& aRhs) const -> bool
1073 : {
1074 0 : return (get_URIParams()) == (aRhs);
1075 : }
1076 :
1077 0 : auto OptionalURIParams::operator==(const OptionalURIParams& aRhs) const -> bool
1078 : {
1079 0 : if ((type()) != ((aRhs).type())) {
1080 0 : return false;
1081 : }
1082 :
1083 0 : switch (type()) {
1084 : case Tvoid_t:
1085 : {
1086 0 : return (get_void_t()) == ((aRhs).get_void_t());
1087 : }
1088 : case TURIParams:
1089 : {
1090 0 : return (get_URIParams()) == ((aRhs).get_URIParams());
1091 : }
1092 : default:
1093 : {
1094 0 : mozilla::ipc::LogicError("unreached");
1095 0 : return false;
1096 : }
1097 : }
1098 : }
1099 :
1100 0 : auto OptionalURIParams::get(void_t* aOutValue) const -> void
1101 : {
1102 0 : (*(aOutValue)) = get_void_t();
1103 0 : }
1104 :
1105 0 : auto OptionalURIParams::get(URIParams* aOutValue) const -> void
1106 : {
1107 0 : (*(aOutValue)) = get_URIParams();
1108 0 : }
1109 :
1110 : } // namespace ipc
1111 : } // namespace mozilla
1112 :
1113 : //-----------------------------------------------------------------------------
1114 : // Method definitions for the IPDL type |struct JSURIParams|
1115 : //
1116 : namespace mozilla {
1117 : namespace ipc {
1118 0 : MOZ_IMPLICIT JSURIParams::JSURIParams()
1119 : {
1120 0 : Init();
1121 0 : }
1122 :
1123 0 : JSURIParams::~JSURIParams()
1124 : {
1125 0 : delete baseURI_;
1126 0 : }
1127 :
1128 0 : auto JSURIParams::operator==(const JSURIParams& _o) const -> bool
1129 : {
1130 0 : if ((!((simpleParams()) == ((_o).simpleParams())))) {
1131 0 : return false;
1132 : }
1133 0 : if ((!((baseURI()) == ((_o).baseURI())))) {
1134 0 : return false;
1135 : }
1136 0 : return true;
1137 : }
1138 :
1139 0 : auto JSURIParams::operator!=(const JSURIParams& _o) const -> bool
1140 : {
1141 0 : return (!(operator==(_o)));
1142 : }
1143 :
1144 0 : auto JSURIParams::Init() -> void
1145 : {
1146 0 : baseURI_ = new OptionalURIParams();
1147 0 : }
1148 :
1149 0 : auto JSURIParams::Assign(
1150 : const SimpleURIParams& _simpleParams,
1151 : const OptionalURIParams& _baseURI) -> void
1152 : {
1153 0 : simpleParams_ = _simpleParams;
1154 0 : (*(baseURI_)) = _baseURI;
1155 0 : }
1156 :
1157 : } // namespace ipc
1158 : } // namespace mozilla
1159 :
1160 : //-----------------------------------------------------------------------------
1161 : // Method definitions for the IPDL type |struct SimpleNestedURIParams|
1162 : //
1163 : namespace mozilla {
1164 : namespace ipc {
1165 0 : MOZ_IMPLICIT SimpleNestedURIParams::SimpleNestedURIParams()
1166 : {
1167 0 : Init();
1168 0 : }
1169 :
1170 0 : SimpleNestedURIParams::~SimpleNestedURIParams()
1171 : {
1172 0 : delete innerURI_;
1173 0 : }
1174 :
1175 0 : auto SimpleNestedURIParams::operator==(const SimpleNestedURIParams& _o) const -> bool
1176 : {
1177 0 : if ((!((simpleParams()) == ((_o).simpleParams())))) {
1178 0 : return false;
1179 : }
1180 0 : if ((!((innerURI()) == ((_o).innerURI())))) {
1181 0 : return false;
1182 : }
1183 0 : return true;
1184 : }
1185 :
1186 0 : auto SimpleNestedURIParams::operator!=(const SimpleNestedURIParams& _o) const -> bool
1187 : {
1188 0 : return (!(operator==(_o)));
1189 : }
1190 :
1191 0 : auto SimpleNestedURIParams::Init() -> void
1192 : {
1193 0 : innerURI_ = new URIParams();
1194 0 : }
1195 :
1196 0 : auto SimpleNestedURIParams::Assign(
1197 : const SimpleURIParams& _simpleParams,
1198 : const URIParams& _innerURI) -> void
1199 : {
1200 0 : simpleParams_ = _simpleParams;
1201 0 : (*(innerURI_)) = _innerURI;
1202 0 : }
1203 :
1204 : } // namespace ipc
1205 : } // namespace mozilla
|