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