Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/quota/PQuota.h"
8 :
9 : namespace mozilla {
10 : namespace dom {
11 : namespace quota {
12 : namespace PQuota {
13 :
14 : nsresult
15 0 : CreateEndpoints(
16 : base::ProcessId aParentDestPid,
17 : base::ProcessId aChildDestPid,
18 : mozilla::ipc::Endpoint<mozilla::dom::quota::PQuotaParent>* aParent,
19 : mozilla::ipc::Endpoint<mozilla::dom::quota::PQuotaChild>* aChild)
20 : {
21 0 : return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, PQuotaMsgStart, PQuotaMsgStartChild, aParent, aChild);
22 : }
23 : void
24 0 : Transition(
25 : MessageType msg,
26 : State* next)
27 : {
28 0 : switch ((*(next))) {
29 : case __Null:
30 0 : if ((Msg___delete____ID) == (msg)) {
31 0 : (*(next)) = __Dead;
32 : }
33 0 : break;
34 : case __Dead:
35 0 : mozilla::ipc::LogicError("__delete__()d actor");
36 0 : break;
37 : default:
38 0 : mozilla::ipc::LogicError("corrupted actor state");
39 0 : break;
40 : }
41 0 : }
42 : IPC::Message*
43 0 : Msg___delete__(int32_t routingId)
44 : {
45 0 : return new IPC::Message(routingId, Msg___delete____ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PQuota::Msg___delete__", true);
46 : }
47 : IPC::Message*
48 0 : Reply___delete__(int32_t routingId)
49 : {
50 0 : return new IPC::Message(routingId, Reply___delete____ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PQuota::Reply___delete__", true);
51 : }
52 : IPC::Message*
53 0 : Msg_PQuotaUsageRequestConstructor(int32_t routingId)
54 : {
55 0 : return new IPC::Message(routingId, Msg_PQuotaUsageRequestConstructor__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PQuota::Msg_PQuotaUsageRequestConstructor", true);
56 : }
57 : IPC::Message*
58 0 : Reply_PQuotaUsageRequestConstructor(int32_t routingId)
59 : {
60 0 : return new IPC::Message(routingId, Reply_PQuotaUsageRequestConstructor__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PQuota::Reply_PQuotaUsageRequestConstructor", true);
61 : }
62 : IPC::Message*
63 0 : Msg_PQuotaRequestConstructor(int32_t routingId)
64 : {
65 0 : return new IPC::Message(routingId, Msg_PQuotaRequestConstructor__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PQuota::Msg_PQuotaRequestConstructor", true);
66 : }
67 : IPC::Message*
68 0 : Reply_PQuotaRequestConstructor(int32_t routingId)
69 : {
70 0 : return new IPC::Message(routingId, Reply_PQuotaRequestConstructor__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PQuota::Reply_PQuotaRequestConstructor", true);
71 : }
72 : IPC::Message*
73 0 : Msg_StartIdleMaintenance(int32_t routingId)
74 : {
75 0 : return new IPC::Message(routingId, Msg_StartIdleMaintenance__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PQuota::Msg_StartIdleMaintenance", true);
76 : }
77 : IPC::Message*
78 0 : Msg_StopIdleMaintenance(int32_t routingId)
79 : {
80 0 : return new IPC::Message(routingId, Msg_StopIdleMaintenance__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PQuota::Msg_StopIdleMaintenance", true);
81 : }
82 :
83 : } // namespace PQuota
84 : } // namespace quota
85 : } // namespace dom
86 : } // namespace mozilla
87 :
88 : //-----------------------------------------------------------------------------
89 : // Method definitions for the IPDL type |struct InitParams|
90 : //
91 : namespace mozilla {
92 : namespace dom {
93 : namespace quota {
94 0 : InitParams::~InitParams()
95 : {
96 0 : }
97 :
98 0 : auto InitParams::operator==(const InitParams& _o) const -> bool
99 : {
100 0 : return true;
101 : }
102 :
103 0 : auto InitParams::operator!=(const InitParams& _o) const -> bool
104 : {
105 0 : return (!(operator==(_o)));
106 : }
107 :
108 0 : auto InitParams::Init() -> void
109 : {
110 0 : }
111 :
112 0 : auto InitParams::Assign() -> void
113 : {
114 0 : }
115 :
116 : } // namespace quota
117 : } // namespace dom
118 : } // namespace mozilla
119 :
120 : //-----------------------------------------------------------------------------
121 : // Method definitions for the IPDL type |struct InitOriginParams|
122 : //
123 : namespace mozilla {
124 : namespace dom {
125 : namespace quota {
126 0 : MOZ_IMPLICIT InitOriginParams::InitOriginParams() :
127 0 : persistenceType_()
128 : {
129 0 : Init();
130 0 : }
131 :
132 0 : InitOriginParams::~InitOriginParams()
133 : {
134 0 : }
135 :
136 0 : auto InitOriginParams::operator==(const InitOriginParams& _o) const -> bool
137 : {
138 0 : if ((!((principalInfo()) == ((_o).principalInfo())))) {
139 0 : return false;
140 : }
141 0 : if ((!((persistenceType()) == ((_o).persistenceType())))) {
142 0 : return false;
143 : }
144 0 : return true;
145 : }
146 :
147 0 : auto InitOriginParams::operator!=(const InitOriginParams& _o) const -> bool
148 : {
149 0 : return (!(operator==(_o)));
150 : }
151 :
152 0 : auto InitOriginParams::Init() -> void
153 : {
154 0 : }
155 :
156 0 : auto InitOriginParams::Assign(
157 : const PrincipalInfo& _principalInfo,
158 : const PersistenceType& _persistenceType) -> void
159 : {
160 0 : principalInfo_ = _principalInfo;
161 0 : persistenceType_ = _persistenceType;
162 0 : }
163 :
164 : } // namespace quota
165 : } // namespace dom
166 : } // namespace mozilla
167 :
168 : //-----------------------------------------------------------------------------
169 : // Method definitions for the IPDL type |struct AllUsageParams|
170 : //
171 : namespace mozilla {
172 : namespace dom {
173 : namespace quota {
174 0 : MOZ_IMPLICIT AllUsageParams::AllUsageParams() :
175 0 : getAll_()
176 : {
177 0 : Init();
178 0 : }
179 :
180 0 : AllUsageParams::~AllUsageParams()
181 : {
182 0 : }
183 :
184 0 : auto AllUsageParams::operator==(const AllUsageParams& _o) const -> bool
185 : {
186 0 : if ((!((getAll()) == ((_o).getAll())))) {
187 0 : return false;
188 : }
189 0 : return true;
190 : }
191 :
192 0 : auto AllUsageParams::operator!=(const AllUsageParams& _o) const -> bool
193 : {
194 0 : return (!(operator==(_o)));
195 : }
196 :
197 0 : auto AllUsageParams::Init() -> void
198 : {
199 0 : }
200 :
201 0 : auto AllUsageParams::Assign(const bool& _getAll) -> void
202 : {
203 0 : getAll_ = _getAll;
204 0 : }
205 :
206 : } // namespace quota
207 : } // namespace dom
208 : } // namespace mozilla
209 :
210 : //-----------------------------------------------------------------------------
211 : // Method definitions for the IPDL type |struct OriginUsageParams|
212 : //
213 : namespace mozilla {
214 : namespace dom {
215 : namespace quota {
216 0 : MOZ_IMPLICIT OriginUsageParams::OriginUsageParams() :
217 0 : getGroupUsage_()
218 : {
219 0 : Init();
220 0 : }
221 :
222 0 : OriginUsageParams::~OriginUsageParams()
223 : {
224 0 : }
225 :
226 0 : auto OriginUsageParams::operator==(const OriginUsageParams& _o) const -> bool
227 : {
228 0 : if ((!((principalInfo()) == ((_o).principalInfo())))) {
229 0 : return false;
230 : }
231 0 : if ((!((getGroupUsage()) == ((_o).getGroupUsage())))) {
232 0 : return false;
233 : }
234 0 : return true;
235 : }
236 :
237 0 : auto OriginUsageParams::operator!=(const OriginUsageParams& _o) const -> bool
238 : {
239 0 : return (!(operator==(_o)));
240 : }
241 :
242 0 : auto OriginUsageParams::Init() -> void
243 : {
244 0 : }
245 :
246 0 : auto OriginUsageParams::Assign(
247 : const PrincipalInfo& _principalInfo,
248 : const bool& _getGroupUsage) -> void
249 : {
250 0 : principalInfo_ = _principalInfo;
251 0 : getGroupUsage_ = _getGroupUsage;
252 0 : }
253 :
254 : } // namespace quota
255 : } // namespace dom
256 : } // namespace mozilla
257 :
258 : //-----------------------------------------------------------------------------
259 : // Method definitions for the IPDL type |union UsageRequestParams|
260 : //
261 : namespace mozilla {
262 : namespace dom {
263 : namespace quota {
264 0 : auto UsageRequestParams::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 TAllUsageParams:
274 : {
275 0 : (ptr_AllUsageParams())->~AllUsageParams__tdef();
276 0 : break;
277 : }
278 : case TOriginUsageParams:
279 : {
280 0 : (ptr_OriginUsageParams())->~OriginUsageParams__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 UsageRequestParams::UsageRequestParams(const AllUsageParams& aOther)
293 : {
294 0 : new (mozilla::KnownNotNull, ptr_AllUsageParams()) AllUsageParams(aOther);
295 0 : mType = TAllUsageParams;
296 0 : }
297 :
298 0 : MOZ_IMPLICIT UsageRequestParams::UsageRequestParams(const OriginUsageParams& aOther)
299 : {
300 0 : new (mozilla::KnownNotNull, ptr_OriginUsageParams()) OriginUsageParams(aOther);
301 0 : mType = TOriginUsageParams;
302 0 : }
303 :
304 0 : MOZ_IMPLICIT UsageRequestParams::UsageRequestParams(const UsageRequestParams& aOther)
305 : {
306 0 : (aOther).AssertSanity();
307 0 : switch ((aOther).type()) {
308 : case TAllUsageParams:
309 : {
310 0 : new (mozilla::KnownNotNull, ptr_AllUsageParams()) AllUsageParams((aOther).get_AllUsageParams());
311 0 : break;
312 : }
313 : case TOriginUsageParams:
314 : {
315 0 : new (mozilla::KnownNotNull, ptr_OriginUsageParams()) OriginUsageParams((aOther).get_OriginUsageParams());
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 : UsageRequestParams::~UsageRequestParams()
332 : {
333 0 : static_cast<void>(MaybeDestroy(T__None));
334 0 : }
335 :
336 0 : auto UsageRequestParams::operator=(const AllUsageParams& aRhs) -> UsageRequestParams&
337 : {
338 0 : if (MaybeDestroy(TAllUsageParams)) {
339 0 : new (mozilla::KnownNotNull, ptr_AllUsageParams()) AllUsageParams;
340 : }
341 0 : (*(ptr_AllUsageParams())) = aRhs;
342 0 : mType = TAllUsageParams;
343 0 : return (*(this));
344 : }
345 :
346 0 : auto UsageRequestParams::operator=(const OriginUsageParams& aRhs) -> UsageRequestParams&
347 : {
348 0 : if (MaybeDestroy(TOriginUsageParams)) {
349 0 : new (mozilla::KnownNotNull, ptr_OriginUsageParams()) OriginUsageParams;
350 : }
351 0 : (*(ptr_OriginUsageParams())) = aRhs;
352 0 : mType = TOriginUsageParams;
353 0 : return (*(this));
354 : }
355 :
356 0 : auto UsageRequestParams::operator=(const UsageRequestParams& aRhs) -> UsageRequestParams&
357 : {
358 0 : (aRhs).AssertSanity();
359 0 : Type t = (aRhs).type();
360 0 : switch (t) {
361 : case TAllUsageParams:
362 : {
363 0 : if (MaybeDestroy(t)) {
364 0 : new (mozilla::KnownNotNull, ptr_AllUsageParams()) AllUsageParams;
365 : }
366 0 : (*(ptr_AllUsageParams())) = (aRhs).get_AllUsageParams();
367 0 : break;
368 : }
369 : case TOriginUsageParams:
370 : {
371 0 : if (MaybeDestroy(t)) {
372 0 : new (mozilla::KnownNotNull, ptr_OriginUsageParams()) OriginUsageParams;
373 : }
374 0 : (*(ptr_OriginUsageParams())) = (aRhs).get_OriginUsageParams();
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 UsageRequestParams::operator==(const AllUsageParams& aRhs) const -> bool
393 : {
394 0 : return (get_AllUsageParams()) == (aRhs);
395 : }
396 :
397 0 : auto UsageRequestParams::operator==(const OriginUsageParams& aRhs) const -> bool
398 : {
399 0 : return (get_OriginUsageParams()) == (aRhs);
400 : }
401 :
402 0 : auto UsageRequestParams::operator==(const UsageRequestParams& aRhs) const -> bool
403 : {
404 0 : if ((type()) != ((aRhs).type())) {
405 0 : return false;
406 : }
407 :
408 0 : switch (type()) {
409 : case TAllUsageParams:
410 : {
411 0 : return (get_AllUsageParams()) == ((aRhs).get_AllUsageParams());
412 : }
413 : case TOriginUsageParams:
414 : {
415 0 : return (get_OriginUsageParams()) == ((aRhs).get_OriginUsageParams());
416 : }
417 : default:
418 : {
419 0 : mozilla::ipc::LogicError("unreached");
420 0 : return false;
421 : }
422 : }
423 : }
424 :
425 0 : auto UsageRequestParams::get(AllUsageParams* aOutValue) const -> void
426 : {
427 0 : (*(aOutValue)) = get_AllUsageParams();
428 0 : }
429 :
430 0 : auto UsageRequestParams::get(OriginUsageParams* aOutValue) const -> void
431 : {
432 0 : (*(aOutValue)) = get_OriginUsageParams();
433 0 : }
434 :
435 : } // namespace quota
436 : } // namespace dom
437 : } // namespace mozilla
438 :
439 : //-----------------------------------------------------------------------------
440 : // Method definitions for the IPDL type |struct ClearOriginParams|
441 : //
442 : namespace mozilla {
443 : namespace dom {
444 : namespace quota {
445 0 : MOZ_IMPLICIT ClearOriginParams::ClearOriginParams() :
446 : persistenceType_(),
447 : persistenceTypeIsExplicit_(),
448 0 : clearAll_()
449 : {
450 0 : Init();
451 0 : }
452 :
453 0 : ClearOriginParams::~ClearOriginParams()
454 : {
455 0 : }
456 :
457 0 : auto ClearOriginParams::operator==(const ClearOriginParams& _o) const -> bool
458 : {
459 0 : if ((!((principalInfo()) == ((_o).principalInfo())))) {
460 0 : return false;
461 : }
462 0 : if ((!((persistenceType()) == ((_o).persistenceType())))) {
463 0 : return false;
464 : }
465 0 : if ((!((persistenceTypeIsExplicit()) == ((_o).persistenceTypeIsExplicit())))) {
466 0 : return false;
467 : }
468 0 : if ((!((clearAll()) == ((_o).clearAll())))) {
469 0 : return false;
470 : }
471 0 : return true;
472 : }
473 :
474 0 : auto ClearOriginParams::operator!=(const ClearOriginParams& _o) const -> bool
475 : {
476 0 : return (!(operator==(_o)));
477 : }
478 :
479 0 : auto ClearOriginParams::Init() -> void
480 : {
481 0 : }
482 :
483 0 : auto ClearOriginParams::Assign(
484 : const PrincipalInfo& _principalInfo,
485 : const PersistenceType& _persistenceType,
486 : const bool& _persistenceTypeIsExplicit,
487 : const bool& _clearAll) -> void
488 : {
489 0 : principalInfo_ = _principalInfo;
490 0 : persistenceType_ = _persistenceType;
491 0 : persistenceTypeIsExplicit_ = _persistenceTypeIsExplicit;
492 0 : clearAll_ = _clearAll;
493 0 : }
494 :
495 : } // namespace quota
496 : } // namespace dom
497 : } // namespace mozilla
498 :
499 : //-----------------------------------------------------------------------------
500 : // Method definitions for the IPDL type |struct ClearDataParams|
501 : //
502 : namespace mozilla {
503 : namespace dom {
504 : namespace quota {
505 0 : MOZ_IMPLICIT ClearDataParams::ClearDataParams() :
506 0 : pattern_()
507 : {
508 0 : Init();
509 0 : }
510 :
511 0 : ClearDataParams::~ClearDataParams()
512 : {
513 0 : }
514 :
515 0 : auto ClearDataParams::operator==(const ClearDataParams& _o) const -> bool
516 : {
517 0 : if ((!((pattern()) == ((_o).pattern())))) {
518 0 : return false;
519 : }
520 0 : return true;
521 : }
522 :
523 0 : auto ClearDataParams::operator!=(const ClearDataParams& _o) const -> bool
524 : {
525 0 : return (!(operator==(_o)));
526 : }
527 :
528 0 : auto ClearDataParams::Init() -> void
529 : {
530 0 : }
531 :
532 0 : auto ClearDataParams::Assign(const nsString& _pattern) -> void
533 : {
534 0 : pattern_ = _pattern;
535 0 : }
536 :
537 : } // namespace quota
538 : } // namespace dom
539 : } // namespace mozilla
540 :
541 : //-----------------------------------------------------------------------------
542 : // Method definitions for the IPDL type |struct ClearAllParams|
543 : //
544 : namespace mozilla {
545 : namespace dom {
546 : namespace quota {
547 0 : ClearAllParams::~ClearAllParams()
548 : {
549 0 : }
550 :
551 0 : auto ClearAllParams::operator==(const ClearAllParams& _o) const -> bool
552 : {
553 0 : return true;
554 : }
555 :
556 0 : auto ClearAllParams::operator!=(const ClearAllParams& _o) const -> bool
557 : {
558 0 : return (!(operator==(_o)));
559 : }
560 :
561 0 : auto ClearAllParams::Init() -> void
562 : {
563 0 : }
564 :
565 0 : auto ClearAllParams::Assign() -> void
566 : {
567 0 : }
568 :
569 : } // namespace quota
570 : } // namespace dom
571 : } // namespace mozilla
572 :
573 : //-----------------------------------------------------------------------------
574 : // Method definitions for the IPDL type |struct ResetAllParams|
575 : //
576 : namespace mozilla {
577 : namespace dom {
578 : namespace quota {
579 0 : ResetAllParams::~ResetAllParams()
580 : {
581 0 : }
582 :
583 0 : auto ResetAllParams::operator==(const ResetAllParams& _o) const -> bool
584 : {
585 0 : return true;
586 : }
587 :
588 0 : auto ResetAllParams::operator!=(const ResetAllParams& _o) const -> bool
589 : {
590 0 : return (!(operator==(_o)));
591 : }
592 :
593 0 : auto ResetAllParams::Init() -> void
594 : {
595 0 : }
596 :
597 0 : auto ResetAllParams::Assign() -> void
598 : {
599 0 : }
600 :
601 : } // namespace quota
602 : } // namespace dom
603 : } // namespace mozilla
604 :
605 : //-----------------------------------------------------------------------------
606 : // Method definitions for the IPDL type |struct PersistedParams|
607 : //
608 : namespace mozilla {
609 : namespace dom {
610 : namespace quota {
611 0 : MOZ_IMPLICIT PersistedParams::PersistedParams()
612 : {
613 0 : Init();
614 0 : }
615 :
616 0 : PersistedParams::~PersistedParams()
617 : {
618 0 : }
619 :
620 0 : auto PersistedParams::operator==(const PersistedParams& _o) const -> bool
621 : {
622 0 : if ((!((principalInfo()) == ((_o).principalInfo())))) {
623 0 : return false;
624 : }
625 0 : return true;
626 : }
627 :
628 0 : auto PersistedParams::operator!=(const PersistedParams& _o) const -> bool
629 : {
630 0 : return (!(operator==(_o)));
631 : }
632 :
633 0 : auto PersistedParams::Init() -> void
634 : {
635 0 : }
636 :
637 0 : auto PersistedParams::Assign(const PrincipalInfo& _principalInfo) -> void
638 : {
639 0 : principalInfo_ = _principalInfo;
640 0 : }
641 :
642 : } // namespace quota
643 : } // namespace dom
644 : } // namespace mozilla
645 :
646 : //-----------------------------------------------------------------------------
647 : // Method definitions for the IPDL type |struct PersistParams|
648 : //
649 : namespace mozilla {
650 : namespace dom {
651 : namespace quota {
652 0 : MOZ_IMPLICIT PersistParams::PersistParams()
653 : {
654 0 : Init();
655 0 : }
656 :
657 0 : PersistParams::~PersistParams()
658 : {
659 0 : }
660 :
661 0 : auto PersistParams::operator==(const PersistParams& _o) const -> bool
662 : {
663 0 : if ((!((principalInfo()) == ((_o).principalInfo())))) {
664 0 : return false;
665 : }
666 0 : return true;
667 : }
668 :
669 0 : auto PersistParams::operator!=(const PersistParams& _o) const -> bool
670 : {
671 0 : return (!(operator==(_o)));
672 : }
673 :
674 0 : auto PersistParams::Init() -> void
675 : {
676 0 : }
677 :
678 0 : auto PersistParams::Assign(const PrincipalInfo& _principalInfo) -> void
679 : {
680 0 : principalInfo_ = _principalInfo;
681 0 : }
682 :
683 : } // namespace quota
684 : } // namespace dom
685 : } // namespace mozilla
686 :
687 : //-----------------------------------------------------------------------------
688 : // Method definitions for the IPDL type |union RequestParams|
689 : //
690 : namespace mozilla {
691 : namespace dom {
692 : namespace quota {
693 0 : auto RequestParams::MaybeDestroy(Type aNewType) -> bool
694 : {
695 0 : if ((mType) == (T__None)) {
696 0 : return true;
697 : }
698 0 : if ((mType) == (aNewType)) {
699 0 : return false;
700 : }
701 0 : switch (mType) {
702 : case TInitParams:
703 : {
704 0 : (ptr_InitParams())->~InitParams__tdef();
705 0 : break;
706 : }
707 : case TInitOriginParams:
708 : {
709 0 : (ptr_InitOriginParams())->~InitOriginParams__tdef();
710 0 : break;
711 : }
712 : case TClearOriginParams:
713 : {
714 0 : (ptr_ClearOriginParams())->~ClearOriginParams__tdef();
715 0 : break;
716 : }
717 : case TClearDataParams:
718 : {
719 0 : (ptr_ClearDataParams())->~ClearDataParams__tdef();
720 0 : break;
721 : }
722 : case TClearAllParams:
723 : {
724 0 : (ptr_ClearAllParams())->~ClearAllParams__tdef();
725 0 : break;
726 : }
727 : case TResetAllParams:
728 : {
729 0 : (ptr_ResetAllParams())->~ResetAllParams__tdef();
730 0 : break;
731 : }
732 : case TPersistedParams:
733 : {
734 0 : (ptr_PersistedParams())->~PersistedParams__tdef();
735 0 : break;
736 : }
737 : case TPersistParams:
738 : {
739 0 : (ptr_PersistParams())->~PersistParams__tdef();
740 0 : break;
741 : }
742 : default:
743 : {
744 0 : mozilla::ipc::LogicError("not reached");
745 0 : break;
746 : }
747 : }
748 0 : return true;
749 : }
750 :
751 0 : MOZ_IMPLICIT RequestParams::RequestParams(const InitParams& aOther)
752 : {
753 0 : new (mozilla::KnownNotNull, ptr_InitParams()) InitParams(aOther);
754 0 : mType = TInitParams;
755 0 : }
756 :
757 0 : MOZ_IMPLICIT RequestParams::RequestParams(const InitOriginParams& aOther)
758 : {
759 0 : new (mozilla::KnownNotNull, ptr_InitOriginParams()) InitOriginParams(aOther);
760 0 : mType = TInitOriginParams;
761 0 : }
762 :
763 0 : MOZ_IMPLICIT RequestParams::RequestParams(const ClearOriginParams& aOther)
764 : {
765 0 : new (mozilla::KnownNotNull, ptr_ClearOriginParams()) ClearOriginParams(aOther);
766 0 : mType = TClearOriginParams;
767 0 : }
768 :
769 0 : MOZ_IMPLICIT RequestParams::RequestParams(const ClearDataParams& aOther)
770 : {
771 0 : new (mozilla::KnownNotNull, ptr_ClearDataParams()) ClearDataParams(aOther);
772 0 : mType = TClearDataParams;
773 0 : }
774 :
775 0 : MOZ_IMPLICIT RequestParams::RequestParams(const ClearAllParams& aOther)
776 : {
777 0 : new (mozilla::KnownNotNull, ptr_ClearAllParams()) ClearAllParams(aOther);
778 0 : mType = TClearAllParams;
779 0 : }
780 :
781 0 : MOZ_IMPLICIT RequestParams::RequestParams(const ResetAllParams& aOther)
782 : {
783 0 : new (mozilla::KnownNotNull, ptr_ResetAllParams()) ResetAllParams(aOther);
784 0 : mType = TResetAllParams;
785 0 : }
786 :
787 0 : MOZ_IMPLICIT RequestParams::RequestParams(const PersistedParams& aOther)
788 : {
789 0 : new (mozilla::KnownNotNull, ptr_PersistedParams()) PersistedParams(aOther);
790 0 : mType = TPersistedParams;
791 0 : }
792 :
793 0 : MOZ_IMPLICIT RequestParams::RequestParams(const PersistParams& aOther)
794 : {
795 0 : new (mozilla::KnownNotNull, ptr_PersistParams()) PersistParams(aOther);
796 0 : mType = TPersistParams;
797 0 : }
798 :
799 0 : MOZ_IMPLICIT RequestParams::RequestParams(const RequestParams& aOther)
800 : {
801 0 : (aOther).AssertSanity();
802 0 : switch ((aOther).type()) {
803 : case TInitParams:
804 : {
805 0 : new (mozilla::KnownNotNull, ptr_InitParams()) InitParams((aOther).get_InitParams());
806 0 : break;
807 : }
808 : case TInitOriginParams:
809 : {
810 0 : new (mozilla::KnownNotNull, ptr_InitOriginParams()) InitOriginParams((aOther).get_InitOriginParams());
811 0 : break;
812 : }
813 : case TClearOriginParams:
814 : {
815 0 : new (mozilla::KnownNotNull, ptr_ClearOriginParams()) ClearOriginParams((aOther).get_ClearOriginParams());
816 0 : break;
817 : }
818 : case TClearDataParams:
819 : {
820 0 : new (mozilla::KnownNotNull, ptr_ClearDataParams()) ClearDataParams((aOther).get_ClearDataParams());
821 0 : break;
822 : }
823 : case TClearAllParams:
824 : {
825 0 : new (mozilla::KnownNotNull, ptr_ClearAllParams()) ClearAllParams((aOther).get_ClearAllParams());
826 0 : break;
827 : }
828 : case TResetAllParams:
829 : {
830 0 : new (mozilla::KnownNotNull, ptr_ResetAllParams()) ResetAllParams((aOther).get_ResetAllParams());
831 0 : break;
832 : }
833 : case TPersistedParams:
834 : {
835 0 : new (mozilla::KnownNotNull, ptr_PersistedParams()) PersistedParams((aOther).get_PersistedParams());
836 0 : break;
837 : }
838 : case TPersistParams:
839 : {
840 0 : new (mozilla::KnownNotNull, ptr_PersistParams()) PersistParams((aOther).get_PersistParams());
841 0 : break;
842 : }
843 : case T__None:
844 : {
845 0 : break;
846 : }
847 : default:
848 : {
849 0 : mozilla::ipc::LogicError("unreached");
850 0 : return;
851 : }
852 : }
853 0 : mType = (aOther).type();
854 : }
855 :
856 0 : RequestParams::~RequestParams()
857 : {
858 0 : static_cast<void>(MaybeDestroy(T__None));
859 0 : }
860 :
861 0 : auto RequestParams::operator=(const InitParams& aRhs) -> RequestParams&
862 : {
863 0 : if (MaybeDestroy(TInitParams)) {
864 0 : new (mozilla::KnownNotNull, ptr_InitParams()) InitParams;
865 : }
866 0 : (*(ptr_InitParams())) = aRhs;
867 0 : mType = TInitParams;
868 0 : return (*(this));
869 : }
870 :
871 0 : auto RequestParams::operator=(const InitOriginParams& aRhs) -> RequestParams&
872 : {
873 0 : if (MaybeDestroy(TInitOriginParams)) {
874 0 : new (mozilla::KnownNotNull, ptr_InitOriginParams()) InitOriginParams;
875 : }
876 0 : (*(ptr_InitOriginParams())) = aRhs;
877 0 : mType = TInitOriginParams;
878 0 : return (*(this));
879 : }
880 :
881 0 : auto RequestParams::operator=(const ClearOriginParams& aRhs) -> RequestParams&
882 : {
883 0 : if (MaybeDestroy(TClearOriginParams)) {
884 0 : new (mozilla::KnownNotNull, ptr_ClearOriginParams()) ClearOriginParams;
885 : }
886 0 : (*(ptr_ClearOriginParams())) = aRhs;
887 0 : mType = TClearOriginParams;
888 0 : return (*(this));
889 : }
890 :
891 0 : auto RequestParams::operator=(const ClearDataParams& aRhs) -> RequestParams&
892 : {
893 0 : if (MaybeDestroy(TClearDataParams)) {
894 0 : new (mozilla::KnownNotNull, ptr_ClearDataParams()) ClearDataParams;
895 : }
896 0 : (*(ptr_ClearDataParams())) = aRhs;
897 0 : mType = TClearDataParams;
898 0 : return (*(this));
899 : }
900 :
901 0 : auto RequestParams::operator=(const ClearAllParams& aRhs) -> RequestParams&
902 : {
903 0 : if (MaybeDestroy(TClearAllParams)) {
904 0 : new (mozilla::KnownNotNull, ptr_ClearAllParams()) ClearAllParams;
905 : }
906 0 : (*(ptr_ClearAllParams())) = aRhs;
907 0 : mType = TClearAllParams;
908 0 : return (*(this));
909 : }
910 :
911 0 : auto RequestParams::operator=(const ResetAllParams& aRhs) -> RequestParams&
912 : {
913 0 : if (MaybeDestroy(TResetAllParams)) {
914 0 : new (mozilla::KnownNotNull, ptr_ResetAllParams()) ResetAllParams;
915 : }
916 0 : (*(ptr_ResetAllParams())) = aRhs;
917 0 : mType = TResetAllParams;
918 0 : return (*(this));
919 : }
920 :
921 0 : auto RequestParams::operator=(const PersistedParams& aRhs) -> RequestParams&
922 : {
923 0 : if (MaybeDestroy(TPersistedParams)) {
924 0 : new (mozilla::KnownNotNull, ptr_PersistedParams()) PersistedParams;
925 : }
926 0 : (*(ptr_PersistedParams())) = aRhs;
927 0 : mType = TPersistedParams;
928 0 : return (*(this));
929 : }
930 :
931 0 : auto RequestParams::operator=(const PersistParams& aRhs) -> RequestParams&
932 : {
933 0 : if (MaybeDestroy(TPersistParams)) {
934 0 : new (mozilla::KnownNotNull, ptr_PersistParams()) PersistParams;
935 : }
936 0 : (*(ptr_PersistParams())) = aRhs;
937 0 : mType = TPersistParams;
938 0 : return (*(this));
939 : }
940 :
941 0 : auto RequestParams::operator=(const RequestParams& aRhs) -> RequestParams&
942 : {
943 0 : (aRhs).AssertSanity();
944 0 : Type t = (aRhs).type();
945 0 : switch (t) {
946 : case TInitParams:
947 : {
948 0 : if (MaybeDestroy(t)) {
949 0 : new (mozilla::KnownNotNull, ptr_InitParams()) InitParams;
950 : }
951 0 : (*(ptr_InitParams())) = (aRhs).get_InitParams();
952 0 : break;
953 : }
954 : case TInitOriginParams:
955 : {
956 0 : if (MaybeDestroy(t)) {
957 0 : new (mozilla::KnownNotNull, ptr_InitOriginParams()) InitOriginParams;
958 : }
959 0 : (*(ptr_InitOriginParams())) = (aRhs).get_InitOriginParams();
960 0 : break;
961 : }
962 : case TClearOriginParams:
963 : {
964 0 : if (MaybeDestroy(t)) {
965 0 : new (mozilla::KnownNotNull, ptr_ClearOriginParams()) ClearOriginParams;
966 : }
967 0 : (*(ptr_ClearOriginParams())) = (aRhs).get_ClearOriginParams();
968 0 : break;
969 : }
970 : case TClearDataParams:
971 : {
972 0 : if (MaybeDestroy(t)) {
973 0 : new (mozilla::KnownNotNull, ptr_ClearDataParams()) ClearDataParams;
974 : }
975 0 : (*(ptr_ClearDataParams())) = (aRhs).get_ClearDataParams();
976 0 : break;
977 : }
978 : case TClearAllParams:
979 : {
980 0 : if (MaybeDestroy(t)) {
981 0 : new (mozilla::KnownNotNull, ptr_ClearAllParams()) ClearAllParams;
982 : }
983 0 : (*(ptr_ClearAllParams())) = (aRhs).get_ClearAllParams();
984 0 : break;
985 : }
986 : case TResetAllParams:
987 : {
988 0 : if (MaybeDestroy(t)) {
989 0 : new (mozilla::KnownNotNull, ptr_ResetAllParams()) ResetAllParams;
990 : }
991 0 : (*(ptr_ResetAllParams())) = (aRhs).get_ResetAllParams();
992 0 : break;
993 : }
994 : case TPersistedParams:
995 : {
996 0 : if (MaybeDestroy(t)) {
997 0 : new (mozilla::KnownNotNull, ptr_PersistedParams()) PersistedParams;
998 : }
999 0 : (*(ptr_PersistedParams())) = (aRhs).get_PersistedParams();
1000 0 : break;
1001 : }
1002 : case TPersistParams:
1003 : {
1004 0 : if (MaybeDestroy(t)) {
1005 0 : new (mozilla::KnownNotNull, ptr_PersistParams()) PersistParams;
1006 : }
1007 0 : (*(ptr_PersistParams())) = (aRhs).get_PersistParams();
1008 0 : break;
1009 : }
1010 : case T__None:
1011 : {
1012 0 : static_cast<void>(MaybeDestroy(t));
1013 0 : break;
1014 : }
1015 : default:
1016 : {
1017 0 : mozilla::ipc::LogicError("unreached");
1018 0 : break;
1019 : }
1020 : }
1021 0 : mType = t;
1022 0 : return (*(this));
1023 : }
1024 :
1025 0 : auto RequestParams::operator==(const InitParams& aRhs) const -> bool
1026 : {
1027 0 : return (get_InitParams()) == (aRhs);
1028 : }
1029 :
1030 0 : auto RequestParams::operator==(const InitOriginParams& aRhs) const -> bool
1031 : {
1032 0 : return (get_InitOriginParams()) == (aRhs);
1033 : }
1034 :
1035 0 : auto RequestParams::operator==(const ClearOriginParams& aRhs) const -> bool
1036 : {
1037 0 : return (get_ClearOriginParams()) == (aRhs);
1038 : }
1039 :
1040 0 : auto RequestParams::operator==(const ClearDataParams& aRhs) const -> bool
1041 : {
1042 0 : return (get_ClearDataParams()) == (aRhs);
1043 : }
1044 :
1045 0 : auto RequestParams::operator==(const ClearAllParams& aRhs) const -> bool
1046 : {
1047 0 : return (get_ClearAllParams()) == (aRhs);
1048 : }
1049 :
1050 0 : auto RequestParams::operator==(const ResetAllParams& aRhs) const -> bool
1051 : {
1052 0 : return (get_ResetAllParams()) == (aRhs);
1053 : }
1054 :
1055 0 : auto RequestParams::operator==(const PersistedParams& aRhs) const -> bool
1056 : {
1057 0 : return (get_PersistedParams()) == (aRhs);
1058 : }
1059 :
1060 0 : auto RequestParams::operator==(const PersistParams& aRhs) const -> bool
1061 : {
1062 0 : return (get_PersistParams()) == (aRhs);
1063 : }
1064 :
1065 0 : auto RequestParams::operator==(const RequestParams& aRhs) const -> bool
1066 : {
1067 0 : if ((type()) != ((aRhs).type())) {
1068 0 : return false;
1069 : }
1070 :
1071 0 : switch (type()) {
1072 : case TInitParams:
1073 : {
1074 0 : return (get_InitParams()) == ((aRhs).get_InitParams());
1075 : }
1076 : case TInitOriginParams:
1077 : {
1078 0 : return (get_InitOriginParams()) == ((aRhs).get_InitOriginParams());
1079 : }
1080 : case TClearOriginParams:
1081 : {
1082 0 : return (get_ClearOriginParams()) == ((aRhs).get_ClearOriginParams());
1083 : }
1084 : case TClearDataParams:
1085 : {
1086 0 : return (get_ClearDataParams()) == ((aRhs).get_ClearDataParams());
1087 : }
1088 : case TClearAllParams:
1089 : {
1090 0 : return (get_ClearAllParams()) == ((aRhs).get_ClearAllParams());
1091 : }
1092 : case TResetAllParams:
1093 : {
1094 0 : return (get_ResetAllParams()) == ((aRhs).get_ResetAllParams());
1095 : }
1096 : case TPersistedParams:
1097 : {
1098 0 : return (get_PersistedParams()) == ((aRhs).get_PersistedParams());
1099 : }
1100 : case TPersistParams:
1101 : {
1102 0 : return (get_PersistParams()) == ((aRhs).get_PersistParams());
1103 : }
1104 : default:
1105 : {
1106 0 : mozilla::ipc::LogicError("unreached");
1107 0 : return false;
1108 : }
1109 : }
1110 : }
1111 :
1112 0 : auto RequestParams::get(InitParams* aOutValue) const -> void
1113 : {
1114 0 : (*(aOutValue)) = get_InitParams();
1115 0 : }
1116 :
1117 0 : auto RequestParams::get(InitOriginParams* aOutValue) const -> void
1118 : {
1119 0 : (*(aOutValue)) = get_InitOriginParams();
1120 0 : }
1121 :
1122 0 : auto RequestParams::get(ClearOriginParams* aOutValue) const -> void
1123 : {
1124 0 : (*(aOutValue)) = get_ClearOriginParams();
1125 0 : }
1126 :
1127 0 : auto RequestParams::get(ClearDataParams* aOutValue) const -> void
1128 : {
1129 0 : (*(aOutValue)) = get_ClearDataParams();
1130 0 : }
1131 :
1132 0 : auto RequestParams::get(ClearAllParams* aOutValue) const -> void
1133 : {
1134 0 : (*(aOutValue)) = get_ClearAllParams();
1135 0 : }
1136 :
1137 0 : auto RequestParams::get(ResetAllParams* aOutValue) const -> void
1138 : {
1139 0 : (*(aOutValue)) = get_ResetAllParams();
1140 0 : }
1141 :
1142 0 : auto RequestParams::get(PersistedParams* aOutValue) const -> void
1143 : {
1144 0 : (*(aOutValue)) = get_PersistedParams();
1145 0 : }
1146 :
1147 0 : auto RequestParams::get(PersistParams* aOutValue) const -> void
1148 : {
1149 0 : (*(aOutValue)) = get_PersistParams();
1150 0 : }
1151 :
1152 : } // namespace quota
1153 : } // namespace dom
1154 : } // namespace mozilla
|