Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/media/PMediaParent.h"
8 :
9 : #include "mozilla/dom/PContentParent.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace media {
16 :
17 :
18 :
19 0 : MOZ_IMPLICIT PMediaParent::PMediaParent() :
20 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
21 0 : mState(PMedia::__Dead)
22 : {
23 0 : MOZ_COUNT_CTOR(PMediaParent);
24 0 : }
25 :
26 0 : PMediaParent::~PMediaParent()
27 : {
28 0 : MOZ_COUNT_DTOR(PMediaParent);
29 0 : }
30 :
31 0 : auto PMediaParent::Manager() const -> PContentParent*
32 : {
33 0 : return static_cast<PContentParent*>(IProtocol::Manager());
34 : }
35 :
36 0 : auto PMediaParent::SendGetPrincipalKeyResponse(
37 : const uint32_t& aRequestId,
38 : const nsCString& key) -> bool
39 : {
40 0 : IPC::Message* msg__ = PMedia::Msg_GetPrincipalKeyResponse(Id());
41 :
42 0 : Write(aRequestId, msg__);
43 : // Sentinel = 'aRequestId'
44 0 : (msg__)->WriteSentinel(3709302657);
45 0 : Write(key, msg__);
46 : // Sentinel = 'key'
47 0 : (msg__)->WriteSentinel(35142870);
48 :
49 :
50 :
51 :
52 0 : if (mozilla::ipc::LoggingEnabledFor("PMediaParent")) {
53 0 : mozilla::ipc::LogMessageForProtocol("PMediaParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
54 : }
55 0 : AUTO_PROFILER_LABEL("PMedia::Msg_GetPrincipalKeyResponse", OTHER);
56 0 : PMedia::Transition(PMedia::Msg_GetPrincipalKeyResponse__ID, (&(mState)));
57 :
58 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
59 0 : return sendok__;
60 : }
61 :
62 0 : auto PMediaParent::Send__delete__(PMediaParent* actor) -> bool
63 : {
64 0 : if ((!(actor))) {
65 0 : return false;
66 : }
67 :
68 0 : IPC::Message* msg__ = PMedia::Msg___delete__((actor)->Id());
69 :
70 0 : (actor)->Write(actor, msg__, false);
71 : // Sentinel = 'actor'
72 0 : (msg__)->WriteSentinel(875202478);
73 :
74 :
75 :
76 0 : if (mozilla::ipc::LoggingEnabledFor("PMediaParent")) {
77 0 : mozilla::ipc::LogMessageForProtocol("PMediaParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
78 : }
79 0 : AUTO_PROFILER_LABEL("PMedia::Msg___delete__", OTHER);
80 0 : PMedia::Transition(PMedia::Msg___delete____ID, (&((actor)->mState)));
81 :
82 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
83 :
84 0 : IProtocol* mgr = (actor)->Manager();
85 0 : (actor)->DestroySubtree(Deletion);
86 0 : (actor)->DeallocSubtree();
87 0 : (mgr)->RemoveManagee(PMediaMsgStart, actor);
88 0 : return sendok__;
89 : }
90 :
91 0 : auto PMediaParent::RemoveManagee(
92 : int32_t aProtocolId,
93 : ProtocolBase* aListener) -> void
94 : {
95 0 : FatalError("unreached");
96 0 : return;
97 : }
98 :
99 0 : auto PMediaParent::OnMessageReceived(const Message& msg__) -> PMediaParent::Result
100 : {
101 0 : switch ((msg__).type()) {
102 : case PMedia::Msg_GetPrincipalKey__ID:
103 : {
104 0 : if (mozilla::ipc::LoggingEnabledFor("PMediaParent")) {
105 0 : mozilla::ipc::LogMessageForProtocol("PMediaParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
106 : }
107 0 : AUTO_PROFILER_LABEL("PMedia::Msg_GetPrincipalKey", OTHER);
108 :
109 0 : PickleIterator iter__(msg__);
110 : uint32_t aRequestId;
111 0 : PrincipalInfo aPrincipal;
112 : bool aPersist;
113 :
114 0 : if ((!(Read((&(aRequestId)), (&(msg__)), (&(iter__)))))) {
115 0 : FatalError("Error deserializing 'uint32_t'");
116 0 : return MsgValueError;
117 : }
118 : // Sentinel = 'aRequestId'
119 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3709302657)))) {
120 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
121 0 : return MsgValueError;
122 : }
123 0 : if ((!(Read((&(aPrincipal)), (&(msg__)), (&(iter__)))))) {
124 0 : FatalError("Error deserializing 'PrincipalInfo'");
125 0 : return MsgValueError;
126 : }
127 : // Sentinel = 'aPrincipal'
128 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4097511)))) {
129 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PrincipalInfo'");
130 0 : return MsgValueError;
131 : }
132 0 : if ((!(Read((&(aPersist)), (&(msg__)), (&(iter__)))))) {
133 0 : FatalError("Error deserializing 'bool'");
134 0 : return MsgValueError;
135 : }
136 : // Sentinel = 'aPersist'
137 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4167438139)))) {
138 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
139 0 : return MsgValueError;
140 : }
141 0 : (msg__).EndRead(iter__, (msg__).type());
142 0 : PMedia::Transition(PMedia::Msg_GetPrincipalKey__ID, (&(mState)));
143 0 : if ((!(RecvGetPrincipalKey(mozilla::Move(aRequestId), mozilla::Move(aPrincipal), mozilla::Move(aPersist))))) {
144 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
145 : // Error handled in mozilla::ipc::IPCResult
146 0 : return MsgProcessingError;
147 : }
148 :
149 0 : return MsgProcessed;
150 : }
151 : case PMedia::Msg_SanitizeOriginKeys__ID:
152 : {
153 0 : if (mozilla::ipc::LoggingEnabledFor("PMediaParent")) {
154 0 : mozilla::ipc::LogMessageForProtocol("PMediaParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
155 : }
156 0 : AUTO_PROFILER_LABEL("PMedia::Msg_SanitizeOriginKeys", OTHER);
157 :
158 0 : PickleIterator iter__(msg__);
159 : uint64_t aSinceWhen;
160 : bool aOnlyPrivateBrowsing;
161 :
162 0 : if ((!(Read((&(aSinceWhen)), (&(msg__)), (&(iter__)))))) {
163 0 : FatalError("Error deserializing 'uint64_t'");
164 0 : return MsgValueError;
165 : }
166 : // Sentinel = 'aSinceWhen'
167 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2883988047)))) {
168 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
169 0 : return MsgValueError;
170 : }
171 0 : if ((!(Read((&(aOnlyPrivateBrowsing)), (&(msg__)), (&(iter__)))))) {
172 0 : FatalError("Error deserializing 'bool'");
173 0 : return MsgValueError;
174 : }
175 : // Sentinel = 'aOnlyPrivateBrowsing'
176 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1580982783)))) {
177 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
178 0 : return MsgValueError;
179 : }
180 0 : (msg__).EndRead(iter__, (msg__).type());
181 0 : PMedia::Transition(PMedia::Msg_SanitizeOriginKeys__ID, (&(mState)));
182 0 : if ((!(RecvSanitizeOriginKeys(mozilla::Move(aSinceWhen), mozilla::Move(aOnlyPrivateBrowsing))))) {
183 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
184 : // Error handled in mozilla::ipc::IPCResult
185 0 : return MsgProcessingError;
186 : }
187 :
188 0 : return MsgProcessed;
189 : }
190 : case PMedia::Reply___delete____ID:
191 : {
192 0 : return MsgProcessed;
193 : }
194 : default:
195 : {
196 0 : return MsgNotKnown;
197 : }
198 : }
199 : }
200 :
201 0 : auto PMediaParent::OnMessageReceived(
202 : const Message& msg__,
203 : Message*& reply__) -> PMediaParent::Result
204 : {
205 0 : return MsgNotKnown;
206 : }
207 :
208 0 : auto PMediaParent::OnCallReceived(
209 : const Message& msg__,
210 : Message*& reply__) -> PMediaParent::Result
211 : {
212 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
213 : return MsgNotKnown;
214 : }
215 :
216 0 : auto PMediaParent::GetProtocolTypeId() -> int32_t
217 : {
218 0 : return PMediaMsgStart;
219 : }
220 :
221 0 : auto PMediaParent::ProtocolName() const -> const char*
222 : {
223 0 : return "PMediaParent";
224 : }
225 :
226 0 : auto PMediaParent::DestroySubtree(ActorDestroyReason why) -> void
227 : {
228 : // Unregister from our manager.
229 0 : Unregister(Id());
230 :
231 : // Reject owning pending promises.
232 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
233 :
234 : // Finally, destroy "us".
235 0 : ActorDestroy(why);
236 0 : }
237 :
238 0 : auto PMediaParent::DeallocSubtree() -> void
239 : {
240 0 : }
241 :
242 0 : auto PMediaParent::Write(
243 : const SystemPrincipalInfo& v__,
244 : Message* msg__) -> void
245 : {
246 0 : }
247 :
248 0 : auto PMediaParent::Read(
249 : SystemPrincipalInfo* v__,
250 : const Message* msg__,
251 : PickleIterator* iter__) -> bool
252 : {
253 0 : return true;
254 : }
255 :
256 0 : auto PMediaParent::Write(
257 : const nsTArray<PrincipalInfo>& v__,
258 : Message* msg__) -> void
259 : {
260 0 : uint32_t length = (v__).Length();
261 0 : Write(length, msg__);
262 : // Sentinel = ('length', 'PrincipalInfo[]')
263 0 : (msg__)->WriteSentinel(1032188126);
264 :
265 0 : for (auto& elem : v__) {
266 0 : Write(elem, msg__);
267 : // Sentinel = 'PrincipalInfo[]'
268 0 : (msg__)->WriteSentinel(413380193);
269 : }
270 0 : }
271 :
272 0 : auto PMediaParent::Read(
273 : nsTArray<PrincipalInfo>* v__,
274 : const Message* msg__,
275 : PickleIterator* iter__) -> bool
276 : {
277 0 : nsTArray<PrincipalInfo> fa;
278 : uint32_t length;
279 0 : if ((!(Read((&(length)), msg__, iter__)))) {
280 0 : mozilla::ipc::ArrayLengthReadError("PrincipalInfo[]");
281 0 : return false;
282 : }
283 : // Sentinel = ('length', 'PrincipalInfo[]')
284 0 : if ((!((msg__)->ReadSentinel(iter__, 1032188126)))) {
285 0 : mozilla::ipc::SentinelReadError("PrincipalInfo[]");
286 0 : return false;
287 : }
288 :
289 0 : PrincipalInfo* elems = (fa).AppendElements(length);
290 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
291 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
292 0 : FatalError("Error deserializing 'PrincipalInfo[i]'");
293 0 : return false;
294 : }
295 : // Sentinel = 'PrincipalInfo[]'
296 0 : if ((!((msg__)->ReadSentinel(iter__, 413380193)))) {
297 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PrincipalInfo[i]'");
298 0 : return false;
299 : }
300 : }
301 0 : (v__)->SwapElements(fa);
302 0 : return true;
303 : }
304 :
305 0 : auto PMediaParent::Write(
306 : const ExpandedPrincipalInfo& v__,
307 : Message* msg__) -> void
308 : {
309 0 : Write((v__).attrs(), msg__);
310 : // Sentinel = 'attrs'
311 0 : (msg__)->WriteSentinel(3014987797);
312 0 : Write((v__).whitelist(), msg__);
313 : // Sentinel = 'whitelist'
314 0 : (msg__)->WriteSentinel(3731637258);
315 0 : }
316 :
317 0 : auto PMediaParent::Read(
318 : ExpandedPrincipalInfo* v__,
319 : const Message* msg__,
320 : PickleIterator* iter__) -> bool
321 : {
322 0 : if ((!(Read((&((v__)->attrs())), msg__, iter__)))) {
323 0 : FatalError("Error deserializing 'attrs' (OriginAttributes) member of 'ExpandedPrincipalInfo'");
324 0 : return false;
325 : }
326 : // Sentinel = 'attrs'
327 0 : if ((!((msg__)->ReadSentinel(iter__, 3014987797)))) {
328 0 : mozilla::ipc::SentinelReadError("Error deserializing 'attrs' (OriginAttributes) member of 'ExpandedPrincipalInfo'");
329 0 : return false;
330 : }
331 0 : if ((!(Read((&((v__)->whitelist())), msg__, iter__)))) {
332 0 : FatalError("Error deserializing 'whitelist' (PrincipalInfo[]) member of 'ExpandedPrincipalInfo'");
333 0 : return false;
334 : }
335 : // Sentinel = 'whitelist'
336 0 : if ((!((msg__)->ReadSentinel(iter__, 3731637258)))) {
337 0 : mozilla::ipc::SentinelReadError("Error deserializing 'whitelist' (PrincipalInfo[]) member of 'ExpandedPrincipalInfo'");
338 0 : return false;
339 : }
340 0 : return true;
341 : }
342 :
343 0 : auto PMediaParent::Write(
344 : const PMediaParent* v__,
345 : Message* msg__,
346 : bool nullable__) -> void
347 : {
348 : int32_t id;
349 0 : if ((!(v__))) {
350 0 : if ((!(nullable__))) {
351 0 : FatalError("NULL actor value passed to non-nullable param");
352 : }
353 0 : id = 0;
354 : }
355 : else {
356 0 : id = (v__)->Id();
357 0 : if ((1) == (id)) {
358 0 : FatalError("actor has been |delete|d");
359 : }
360 : }
361 :
362 0 : Write(id, msg__);
363 0 : }
364 :
365 0 : auto PMediaParent::Read(
366 : PMediaParent** v__,
367 : const Message* msg__,
368 : PickleIterator* iter__,
369 : bool nullable__) -> bool
370 : {
371 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PMedia", PMediaMsgStart);
372 0 : if ((actor).isNothing()) {
373 0 : return false;
374 : }
375 :
376 0 : (*(v__)) = static_cast<PMediaParent*>((actor).value());
377 0 : return true;
378 : }
379 :
380 0 : auto PMediaParent::Write(
381 : const PrincipalInfo& v__,
382 : Message* msg__) -> void
383 : {
384 : typedef PrincipalInfo type__;
385 0 : Write(int((v__).type()), msg__);
386 : // Sentinel = 'PrincipalInfo'
387 0 : (msg__)->WriteSentinel(4194518819);
388 :
389 0 : switch ((v__).type()) {
390 : case type__::TContentPrincipalInfo:
391 : {
392 0 : Write((v__).get_ContentPrincipalInfo(), msg__);
393 : // Sentinel = 'TContentPrincipalInfo'
394 0 : (msg__)->WriteSentinel(3677342258);
395 0 : return;
396 : }
397 : case type__::TSystemPrincipalInfo:
398 : {
399 0 : Write((v__).get_SystemPrincipalInfo(), msg__);
400 : // Sentinel = 'TSystemPrincipalInfo'
401 0 : (msg__)->WriteSentinel(3590603679);
402 0 : return;
403 : }
404 : case type__::TNullPrincipalInfo:
405 : {
406 0 : Write((v__).get_NullPrincipalInfo(), msg__);
407 : // Sentinel = 'TNullPrincipalInfo'
408 0 : (msg__)->WriteSentinel(3477774965);
409 0 : return;
410 : }
411 : case type__::TExpandedPrincipalInfo:
412 : {
413 0 : Write((v__).get_ExpandedPrincipalInfo(), msg__);
414 : // Sentinel = 'TExpandedPrincipalInfo'
415 0 : (msg__)->WriteSentinel(589324917);
416 0 : return;
417 : }
418 : default:
419 : {
420 0 : FatalError("unknown union type");
421 0 : return;
422 : }
423 : }
424 : }
425 :
426 0 : auto PMediaParent::Read(
427 : PrincipalInfo* v__,
428 : const Message* msg__,
429 : PickleIterator* iter__) -> bool
430 : {
431 : typedef PrincipalInfo type__;
432 : int type;
433 0 : if ((!(Read((&(type)), msg__, iter__)))) {
434 0 : mozilla::ipc::UnionTypeReadError("PrincipalInfo");
435 0 : return false;
436 : }
437 : // Sentinel = 'PrincipalInfo'
438 0 : if ((!((msg__)->ReadSentinel(iter__, 4194518819)))) {
439 0 : mozilla::ipc::SentinelReadError("PrincipalInfo");
440 0 : return false;
441 : }
442 :
443 0 : switch (type) {
444 : case type__::TContentPrincipalInfo:
445 : {
446 0 : ContentPrincipalInfo tmp = ContentPrincipalInfo();
447 0 : (*(v__)) = tmp;
448 0 : if ((!(Read((&((v__)->get_ContentPrincipalInfo())), msg__, iter__)))) {
449 0 : FatalError("Error deserializing Union type");
450 0 : return false;
451 : }
452 : // Sentinel = 'TContentPrincipalInfo'
453 0 : if ((!((msg__)->ReadSentinel(iter__, 3677342258)))) {
454 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
455 0 : return false;
456 : }
457 0 : return true;
458 : }
459 : case type__::TSystemPrincipalInfo:
460 : {
461 0 : SystemPrincipalInfo tmp = SystemPrincipalInfo();
462 0 : (*(v__)) = tmp;
463 0 : if ((!(Read((&((v__)->get_SystemPrincipalInfo())), msg__, iter__)))) {
464 0 : FatalError("Error deserializing Union type");
465 0 : return false;
466 : }
467 : // Sentinel = 'TSystemPrincipalInfo'
468 0 : if ((!((msg__)->ReadSentinel(iter__, 3590603679)))) {
469 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
470 0 : return false;
471 : }
472 0 : return true;
473 : }
474 : case type__::TNullPrincipalInfo:
475 : {
476 0 : NullPrincipalInfo tmp = NullPrincipalInfo();
477 0 : (*(v__)) = tmp;
478 0 : if ((!(Read((&((v__)->get_NullPrincipalInfo())), msg__, iter__)))) {
479 0 : FatalError("Error deserializing Union type");
480 0 : return false;
481 : }
482 : // Sentinel = 'TNullPrincipalInfo'
483 0 : if ((!((msg__)->ReadSentinel(iter__, 3477774965)))) {
484 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
485 0 : return false;
486 : }
487 0 : return true;
488 : }
489 : case type__::TExpandedPrincipalInfo:
490 : {
491 0 : ExpandedPrincipalInfo tmp = ExpandedPrincipalInfo();
492 0 : (*(v__)) = tmp;
493 0 : if ((!(Read((&((v__)->get_ExpandedPrincipalInfo())), msg__, iter__)))) {
494 0 : FatalError("Error deserializing Union type");
495 0 : return false;
496 : }
497 : // Sentinel = 'TExpandedPrincipalInfo'
498 0 : if ((!((msg__)->ReadSentinel(iter__, 589324917)))) {
499 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
500 0 : return false;
501 : }
502 0 : return true;
503 : }
504 : default:
505 : {
506 0 : FatalError("unknown union type");
507 0 : return false;
508 : }
509 : }
510 : }
511 :
512 0 : auto PMediaParent::Write(
513 : const ContentPrincipalInfoOriginNoSuffix& v__,
514 : Message* msg__) -> void
515 : {
516 : typedef ContentPrincipalInfoOriginNoSuffix type__;
517 0 : Write(int((v__).type()), msg__);
518 : // Sentinel = 'ContentPrincipalInfoOriginNoSuffix'
519 0 : (msg__)->WriteSentinel(2442066713);
520 :
521 0 : switch ((v__).type()) {
522 : case type__::TnsCString:
523 : {
524 0 : Write((v__).get_nsCString(), msg__);
525 : // Sentinel = 'TnsCString'
526 0 : (msg__)->WriteSentinel(2427411293);
527 0 : return;
528 : }
529 : case type__::Tvoid_t:
530 : {
531 0 : Write((v__).get_void_t(), msg__);
532 : // Sentinel = 'Tvoid_t'
533 0 : (msg__)->WriteSentinel(3041273328);
534 0 : return;
535 : }
536 : default:
537 : {
538 0 : FatalError("unknown union type");
539 0 : return;
540 : }
541 : }
542 : }
543 :
544 0 : auto PMediaParent::Read(
545 : ContentPrincipalInfoOriginNoSuffix* v__,
546 : const Message* msg__,
547 : PickleIterator* iter__) -> bool
548 : {
549 : typedef ContentPrincipalInfoOriginNoSuffix type__;
550 : int type;
551 0 : if ((!(Read((&(type)), msg__, iter__)))) {
552 0 : mozilla::ipc::UnionTypeReadError("ContentPrincipalInfoOriginNoSuffix");
553 0 : return false;
554 : }
555 : // Sentinel = 'ContentPrincipalInfoOriginNoSuffix'
556 0 : if ((!((msg__)->ReadSentinel(iter__, 2442066713)))) {
557 0 : mozilla::ipc::SentinelReadError("ContentPrincipalInfoOriginNoSuffix");
558 0 : return false;
559 : }
560 :
561 0 : switch (type) {
562 : case type__::TnsCString:
563 : {
564 0 : nsCString tmp = nsCString();
565 0 : (*(v__)) = tmp;
566 0 : if ((!(Read((&((v__)->get_nsCString())), msg__, iter__)))) {
567 0 : FatalError("Error deserializing Union type");
568 0 : return false;
569 : }
570 : // Sentinel = 'TnsCString'
571 0 : if ((!((msg__)->ReadSentinel(iter__, 2427411293)))) {
572 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
573 0 : return false;
574 : }
575 0 : return true;
576 : }
577 : case type__::Tvoid_t:
578 : {
579 : void_t tmp = void_t();
580 0 : (*(v__)) = tmp;
581 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
582 0 : FatalError("Error deserializing Union type");
583 0 : return false;
584 : }
585 : // Sentinel = 'Tvoid_t'
586 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
587 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
588 0 : return false;
589 : }
590 0 : return true;
591 : }
592 : default:
593 : {
594 0 : FatalError("unknown union type");
595 0 : return false;
596 : }
597 : }
598 : }
599 :
600 0 : auto PMediaParent::Write(
601 : const ContentPrincipalInfo& v__,
602 : Message* msg__) -> void
603 : {
604 0 : Write((v__).attrs(), msg__);
605 : // Sentinel = 'attrs'
606 0 : (msg__)->WriteSentinel(3014987797);
607 0 : Write((v__).originNoSuffix(), msg__);
608 : // Sentinel = 'originNoSuffix'
609 0 : (msg__)->WriteSentinel(2833071422);
610 0 : Write((v__).spec(), msg__);
611 : // Sentinel = 'spec'
612 0 : (msg__)->WriteSentinel(1630740541);
613 0 : }
614 :
615 0 : auto PMediaParent::Read(
616 : ContentPrincipalInfo* v__,
617 : const Message* msg__,
618 : PickleIterator* iter__) -> bool
619 : {
620 0 : if ((!(Read((&((v__)->attrs())), msg__, iter__)))) {
621 0 : FatalError("Error deserializing 'attrs' (OriginAttributes) member of 'ContentPrincipalInfo'");
622 0 : return false;
623 : }
624 : // Sentinel = 'attrs'
625 0 : if ((!((msg__)->ReadSentinel(iter__, 3014987797)))) {
626 0 : mozilla::ipc::SentinelReadError("Error deserializing 'attrs' (OriginAttributes) member of 'ContentPrincipalInfo'");
627 0 : return false;
628 : }
629 0 : if ((!(Read((&((v__)->originNoSuffix())), msg__, iter__)))) {
630 0 : FatalError("Error deserializing 'originNoSuffix' (ContentPrincipalInfoOriginNoSuffix) member of 'ContentPrincipalInfo'");
631 0 : return false;
632 : }
633 : // Sentinel = 'originNoSuffix'
634 0 : if ((!((msg__)->ReadSentinel(iter__, 2833071422)))) {
635 0 : mozilla::ipc::SentinelReadError("Error deserializing 'originNoSuffix' (ContentPrincipalInfoOriginNoSuffix) member of 'ContentPrincipalInfo'");
636 0 : return false;
637 : }
638 0 : if ((!(Read((&((v__)->spec())), msg__, iter__)))) {
639 0 : FatalError("Error deserializing 'spec' (nsCString) member of 'ContentPrincipalInfo'");
640 0 : return false;
641 : }
642 : // Sentinel = 'spec'
643 0 : if ((!((msg__)->ReadSentinel(iter__, 1630740541)))) {
644 0 : mozilla::ipc::SentinelReadError("Error deserializing 'spec' (nsCString) member of 'ContentPrincipalInfo'");
645 0 : return false;
646 : }
647 0 : return true;
648 : }
649 :
650 0 : auto PMediaParent::Write(
651 : const NullPrincipalInfo& v__,
652 : Message* msg__) -> void
653 : {
654 0 : Write((v__).attrs(), msg__);
655 : // Sentinel = 'attrs'
656 0 : (msg__)->WriteSentinel(3014987797);
657 0 : Write((v__).spec(), msg__);
658 : // Sentinel = 'spec'
659 0 : (msg__)->WriteSentinel(1630740541);
660 0 : }
661 :
662 0 : auto PMediaParent::Read(
663 : NullPrincipalInfo* v__,
664 : const Message* msg__,
665 : PickleIterator* iter__) -> bool
666 : {
667 0 : if ((!(Read((&((v__)->attrs())), msg__, iter__)))) {
668 0 : FatalError("Error deserializing 'attrs' (OriginAttributes) member of 'NullPrincipalInfo'");
669 0 : return false;
670 : }
671 : // Sentinel = 'attrs'
672 0 : if ((!((msg__)->ReadSentinel(iter__, 3014987797)))) {
673 0 : mozilla::ipc::SentinelReadError("Error deserializing 'attrs' (OriginAttributes) member of 'NullPrincipalInfo'");
674 0 : return false;
675 : }
676 0 : if ((!(Read((&((v__)->spec())), msg__, iter__)))) {
677 0 : FatalError("Error deserializing 'spec' (nsCString) member of 'NullPrincipalInfo'");
678 0 : return false;
679 : }
680 : // Sentinel = 'spec'
681 0 : if ((!((msg__)->ReadSentinel(iter__, 1630740541)))) {
682 0 : mozilla::ipc::SentinelReadError("Error deserializing 'spec' (nsCString) member of 'NullPrincipalInfo'");
683 0 : return false;
684 : }
685 0 : return true;
686 : }
687 :
688 :
689 :
690 : } // namespace media
691 : } // namespace mozilla
|