Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/gmp/PGMPDecryptorParent.h"
8 :
9 : #include "mozilla/gmp/PGMPContentParent.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace gmp {
16 :
17 :
18 0 : auto PGMPDecryptorParent::Recv__delete__() -> mozilla::ipc::IPCResult
19 : {
20 0 : return IPC_OK();
21 : }
22 :
23 :
24 0 : MOZ_IMPLICIT PGMPDecryptorParent::PGMPDecryptorParent() :
25 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
26 0 : mState(PGMPDecryptor::__Dead)
27 : {
28 0 : MOZ_COUNT_CTOR(PGMPDecryptorParent);
29 0 : }
30 :
31 0 : PGMPDecryptorParent::~PGMPDecryptorParent()
32 : {
33 0 : MOZ_COUNT_DTOR(PGMPDecryptorParent);
34 0 : }
35 :
36 0 : auto PGMPDecryptorParent::Manager() const -> PGMPContentParent*
37 : {
38 0 : return static_cast<PGMPContentParent*>(IProtocol::Manager());
39 : }
40 :
41 0 : auto PGMPDecryptorParent::SendInit(
42 : const bool& aDistinctiveIdentifierRequired,
43 : const bool& aPersistentStateRequired) -> bool
44 : {
45 0 : IPC::Message* msg__ = PGMPDecryptor::Msg_Init(Id());
46 :
47 0 : Write(aDistinctiveIdentifierRequired, msg__);
48 : // Sentinel = 'aDistinctiveIdentifierRequired'
49 0 : (msg__)->WriteSentinel(2071028981);
50 0 : Write(aPersistentStateRequired, msg__);
51 : // Sentinel = 'aPersistentStateRequired'
52 0 : (msg__)->WriteSentinel(1104457810);
53 :
54 :
55 :
56 :
57 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
58 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
59 : }
60 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_Init", OTHER);
61 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_Init__ID, (&(mState)));
62 :
63 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
64 0 : return sendok__;
65 : }
66 :
67 0 : auto PGMPDecryptorParent::SendCreateSession(
68 : const uint32_t& aCreateSessionToken,
69 : const uint32_t& aPromiseId,
70 : const nsCString& aInitDataType,
71 : const nsTArray<uint8_t>& aInitData,
72 : const GMPSessionType& aSessionType) -> bool
73 : {
74 0 : IPC::Message* msg__ = PGMPDecryptor::Msg_CreateSession(Id());
75 :
76 0 : Write(aCreateSessionToken, msg__);
77 : // Sentinel = 'aCreateSessionToken'
78 0 : (msg__)->WriteSentinel(4272054301);
79 0 : Write(aPromiseId, msg__);
80 : // Sentinel = 'aPromiseId'
81 0 : (msg__)->WriteSentinel(1396174085);
82 0 : Write(aInitDataType, msg__);
83 : // Sentinel = 'aInitDataType'
84 0 : (msg__)->WriteSentinel(3194748458);
85 0 : Write(aInitData, msg__);
86 : // Sentinel = 'aInitData'
87 0 : (msg__)->WriteSentinel(897514454);
88 0 : Write(aSessionType, msg__);
89 : // Sentinel = 'aSessionType'
90 0 : (msg__)->WriteSentinel(2018610683);
91 :
92 :
93 :
94 :
95 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
96 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
97 : }
98 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_CreateSession", OTHER);
99 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_CreateSession__ID, (&(mState)));
100 :
101 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
102 0 : return sendok__;
103 : }
104 :
105 0 : auto PGMPDecryptorParent::SendLoadSession(
106 : const uint32_t& aPromiseId,
107 : const nsCString& aSessionId) -> bool
108 : {
109 0 : IPC::Message* msg__ = PGMPDecryptor::Msg_LoadSession(Id());
110 :
111 0 : Write(aPromiseId, msg__);
112 : // Sentinel = 'aPromiseId'
113 0 : (msg__)->WriteSentinel(1396174085);
114 0 : Write(aSessionId, msg__);
115 : // Sentinel = 'aSessionId'
116 0 : (msg__)->WriteSentinel(725794242);
117 :
118 :
119 :
120 :
121 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
122 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
123 : }
124 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_LoadSession", OTHER);
125 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_LoadSession__ID, (&(mState)));
126 :
127 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
128 0 : return sendok__;
129 : }
130 :
131 0 : auto PGMPDecryptorParent::SendUpdateSession(
132 : const uint32_t& aPromiseId,
133 : const nsCString& aSessionId,
134 : const nsTArray<uint8_t>& aResponse) -> bool
135 : {
136 0 : IPC::Message* msg__ = PGMPDecryptor::Msg_UpdateSession(Id());
137 :
138 0 : Write(aPromiseId, msg__);
139 : // Sentinel = 'aPromiseId'
140 0 : (msg__)->WriteSentinel(1396174085);
141 0 : Write(aSessionId, msg__);
142 : // Sentinel = 'aSessionId'
143 0 : (msg__)->WriteSentinel(725794242);
144 0 : Write(aResponse, msg__);
145 : // Sentinel = 'aResponse'
146 0 : (msg__)->WriteSentinel(4228544409);
147 :
148 :
149 :
150 :
151 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
152 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
153 : }
154 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_UpdateSession", OTHER);
155 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_UpdateSession__ID, (&(mState)));
156 :
157 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
158 0 : return sendok__;
159 : }
160 :
161 0 : auto PGMPDecryptorParent::SendCloseSession(
162 : const uint32_t& aPromiseId,
163 : const nsCString& aSessionId) -> bool
164 : {
165 0 : IPC::Message* msg__ = PGMPDecryptor::Msg_CloseSession(Id());
166 :
167 0 : Write(aPromiseId, msg__);
168 : // Sentinel = 'aPromiseId'
169 0 : (msg__)->WriteSentinel(1396174085);
170 0 : Write(aSessionId, msg__);
171 : // Sentinel = 'aSessionId'
172 0 : (msg__)->WriteSentinel(725794242);
173 :
174 :
175 :
176 :
177 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
178 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
179 : }
180 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_CloseSession", OTHER);
181 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_CloseSession__ID, (&(mState)));
182 :
183 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
184 0 : return sendok__;
185 : }
186 :
187 0 : auto PGMPDecryptorParent::SendRemoveSession(
188 : const uint32_t& aPromiseId,
189 : const nsCString& aSessionId) -> bool
190 : {
191 0 : IPC::Message* msg__ = PGMPDecryptor::Msg_RemoveSession(Id());
192 :
193 0 : Write(aPromiseId, msg__);
194 : // Sentinel = 'aPromiseId'
195 0 : (msg__)->WriteSentinel(1396174085);
196 0 : Write(aSessionId, msg__);
197 : // Sentinel = 'aSessionId'
198 0 : (msg__)->WriteSentinel(725794242);
199 :
200 :
201 :
202 :
203 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
204 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
205 : }
206 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_RemoveSession", OTHER);
207 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_RemoveSession__ID, (&(mState)));
208 :
209 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
210 0 : return sendok__;
211 : }
212 :
213 0 : auto PGMPDecryptorParent::SendSetServerCertificate(
214 : const uint32_t& aPromiseId,
215 : const nsTArray<uint8_t>& aServerCert) -> bool
216 : {
217 0 : IPC::Message* msg__ = PGMPDecryptor::Msg_SetServerCertificate(Id());
218 :
219 0 : Write(aPromiseId, msg__);
220 : // Sentinel = 'aPromiseId'
221 0 : (msg__)->WriteSentinel(1396174085);
222 0 : Write(aServerCert, msg__);
223 : // Sentinel = 'aServerCert'
224 0 : (msg__)->WriteSentinel(370477549);
225 :
226 :
227 :
228 :
229 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
230 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
231 : }
232 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_SetServerCertificate", OTHER);
233 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_SetServerCertificate__ID, (&(mState)));
234 :
235 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
236 0 : return sendok__;
237 : }
238 :
239 0 : auto PGMPDecryptorParent::SendDecrypt(
240 : const uint32_t& aId,
241 : const nsTArray<uint8_t>& aBuffer,
242 : const GMPDecryptionData& aMetadata) -> bool
243 : {
244 0 : IPC::Message* msg__ = PGMPDecryptor::Msg_Decrypt(Id());
245 :
246 0 : Write(aId, msg__);
247 : // Sentinel = 'aId'
248 0 : (msg__)->WriteSentinel(2735041817);
249 0 : Write(aBuffer, msg__);
250 : // Sentinel = 'aBuffer'
251 0 : (msg__)->WriteSentinel(35469444);
252 0 : Write(aMetadata, msg__);
253 : // Sentinel = 'aMetadata'
254 0 : (msg__)->WriteSentinel(2898605475);
255 :
256 :
257 :
258 :
259 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
260 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
261 : }
262 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_Decrypt", OTHER);
263 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_Decrypt__ID, (&(mState)));
264 :
265 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
266 0 : return sendok__;
267 : }
268 :
269 0 : auto PGMPDecryptorParent::SendDecryptingComplete() -> bool
270 : {
271 0 : IPC::Message* msg__ = PGMPDecryptor::Msg_DecryptingComplete(Id());
272 :
273 :
274 :
275 :
276 :
277 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
278 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
279 : }
280 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_DecryptingComplete", OTHER);
281 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_DecryptingComplete__ID, (&(mState)));
282 :
283 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
284 0 : return sendok__;
285 : }
286 :
287 0 : auto PGMPDecryptorParent::RemoveManagee(
288 : int32_t aProtocolId,
289 : ProtocolBase* aListener) -> void
290 : {
291 0 : FatalError("unreached");
292 0 : return;
293 : }
294 :
295 0 : auto PGMPDecryptorParent::OnMessageReceived(const Message& msg__) -> PGMPDecryptorParent::Result
296 : {
297 0 : switch ((msg__).type()) {
298 : case PGMPDecryptor::Msg___delete____ID:
299 : {
300 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
301 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
302 : }
303 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg___delete__", OTHER);
304 :
305 0 : PickleIterator iter__(msg__);
306 : PGMPDecryptorParent* actor;
307 :
308 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
309 0 : FatalError("Error deserializing 'PGMPDecryptorParent'");
310 0 : return MsgValueError;
311 : }
312 : // Sentinel = 'actor'
313 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
314 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PGMPDecryptorParent'");
315 0 : return MsgValueError;
316 : }
317 0 : (msg__).EndRead(iter__, (msg__).type());
318 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg___delete____ID, (&(mState)));
319 0 : if ((!(Recv__delete__()))) {
320 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
321 : // Error handled in mozilla::ipc::IPCResult
322 0 : return MsgProcessingError;
323 : }
324 :
325 :
326 0 : IProtocol* mgr = (actor)->Manager();
327 0 : (actor)->DestroySubtree(Deletion);
328 0 : (actor)->DeallocSubtree();
329 0 : (mgr)->RemoveManagee(PGMPDecryptorMsgStart, actor);
330 :
331 0 : return MsgProcessed;
332 : }
333 : case PGMPDecryptor::Msg_SetDecryptorId__ID:
334 : {
335 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
336 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
337 : }
338 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_SetDecryptorId", OTHER);
339 :
340 0 : PickleIterator iter__(msg__);
341 : uint32_t aId;
342 :
343 0 : if ((!(Read((&(aId)), (&(msg__)), (&(iter__)))))) {
344 0 : FatalError("Error deserializing 'uint32_t'");
345 0 : return MsgValueError;
346 : }
347 : // Sentinel = 'aId'
348 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2735041817)))) {
349 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
350 0 : return MsgValueError;
351 : }
352 0 : (msg__).EndRead(iter__, (msg__).type());
353 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_SetDecryptorId__ID, (&(mState)));
354 0 : if ((!(RecvSetDecryptorId(mozilla::Move(aId))))) {
355 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
356 : // Error handled in mozilla::ipc::IPCResult
357 0 : return MsgProcessingError;
358 : }
359 :
360 0 : return MsgProcessed;
361 : }
362 : case PGMPDecryptor::Msg_SetSessionId__ID:
363 : {
364 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
365 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
366 : }
367 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_SetSessionId", OTHER);
368 :
369 0 : PickleIterator iter__(msg__);
370 : uint32_t aCreateSessionToken;
371 0 : nsCString aSessionId;
372 :
373 0 : if ((!(Read((&(aCreateSessionToken)), (&(msg__)), (&(iter__)))))) {
374 0 : FatalError("Error deserializing 'uint32_t'");
375 0 : return MsgValueError;
376 : }
377 : // Sentinel = 'aCreateSessionToken'
378 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4272054301)))) {
379 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
380 0 : return MsgValueError;
381 : }
382 0 : if ((!(Read((&(aSessionId)), (&(msg__)), (&(iter__)))))) {
383 0 : FatalError("Error deserializing 'nsCString'");
384 0 : return MsgValueError;
385 : }
386 : // Sentinel = 'aSessionId'
387 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 725794242)))) {
388 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
389 0 : return MsgValueError;
390 : }
391 0 : (msg__).EndRead(iter__, (msg__).type());
392 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_SetSessionId__ID, (&(mState)));
393 0 : if ((!(RecvSetSessionId(mozilla::Move(aCreateSessionToken), mozilla::Move(aSessionId))))) {
394 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
395 : // Error handled in mozilla::ipc::IPCResult
396 0 : return MsgProcessingError;
397 : }
398 :
399 0 : return MsgProcessed;
400 : }
401 : case PGMPDecryptor::Msg_ResolveLoadSessionPromise__ID:
402 : {
403 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
404 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
405 : }
406 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_ResolveLoadSessionPromise", OTHER);
407 :
408 0 : PickleIterator iter__(msg__);
409 : uint32_t aPromiseId;
410 : bool aSuccess;
411 :
412 0 : if ((!(Read((&(aPromiseId)), (&(msg__)), (&(iter__)))))) {
413 0 : FatalError("Error deserializing 'uint32_t'");
414 0 : return MsgValueError;
415 : }
416 : // Sentinel = 'aPromiseId'
417 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1396174085)))) {
418 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
419 0 : return MsgValueError;
420 : }
421 0 : if ((!(Read((&(aSuccess)), (&(msg__)), (&(iter__)))))) {
422 0 : FatalError("Error deserializing 'bool'");
423 0 : return MsgValueError;
424 : }
425 : // Sentinel = 'aSuccess'
426 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2132928722)))) {
427 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
428 0 : return MsgValueError;
429 : }
430 0 : (msg__).EndRead(iter__, (msg__).type());
431 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_ResolveLoadSessionPromise__ID, (&(mState)));
432 0 : if ((!(RecvResolveLoadSessionPromise(mozilla::Move(aPromiseId), mozilla::Move(aSuccess))))) {
433 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
434 : // Error handled in mozilla::ipc::IPCResult
435 0 : return MsgProcessingError;
436 : }
437 :
438 0 : return MsgProcessed;
439 : }
440 : case PGMPDecryptor::Msg_ResolvePromise__ID:
441 : {
442 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
443 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
444 : }
445 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_ResolvePromise", OTHER);
446 :
447 0 : PickleIterator iter__(msg__);
448 : uint32_t aPromiseId;
449 :
450 0 : if ((!(Read((&(aPromiseId)), (&(msg__)), (&(iter__)))))) {
451 0 : FatalError("Error deserializing 'uint32_t'");
452 0 : return MsgValueError;
453 : }
454 : // Sentinel = 'aPromiseId'
455 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1396174085)))) {
456 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
457 0 : return MsgValueError;
458 : }
459 0 : (msg__).EndRead(iter__, (msg__).type());
460 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_ResolvePromise__ID, (&(mState)));
461 0 : if ((!(RecvResolvePromise(mozilla::Move(aPromiseId))))) {
462 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
463 : // Error handled in mozilla::ipc::IPCResult
464 0 : return MsgProcessingError;
465 : }
466 :
467 0 : return MsgProcessed;
468 : }
469 : case PGMPDecryptor::Msg_RejectPromise__ID:
470 : {
471 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
472 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
473 : }
474 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_RejectPromise", OTHER);
475 :
476 0 : PickleIterator iter__(msg__);
477 : uint32_t aPromiseId;
478 : GMPDOMException aDOMExceptionCode;
479 0 : nsCString aMessage;
480 :
481 0 : if ((!(Read((&(aPromiseId)), (&(msg__)), (&(iter__)))))) {
482 0 : FatalError("Error deserializing 'uint32_t'");
483 0 : return MsgValueError;
484 : }
485 : // Sentinel = 'aPromiseId'
486 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1396174085)))) {
487 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
488 0 : return MsgValueError;
489 : }
490 0 : if ((!(Read((&(aDOMExceptionCode)), (&(msg__)), (&(iter__)))))) {
491 0 : FatalError("Error deserializing 'GMPDOMException'");
492 0 : return MsgValueError;
493 : }
494 : // Sentinel = 'aDOMExceptionCode'
495 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1177088860)))) {
496 0 : mozilla::ipc::SentinelReadError("Error deserializing 'GMPDOMException'");
497 0 : return MsgValueError;
498 : }
499 0 : if ((!(Read((&(aMessage)), (&(msg__)), (&(iter__)))))) {
500 0 : FatalError("Error deserializing 'nsCString'");
501 0 : return MsgValueError;
502 : }
503 : // Sentinel = 'aMessage'
504 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3453110902)))) {
505 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
506 0 : return MsgValueError;
507 : }
508 0 : (msg__).EndRead(iter__, (msg__).type());
509 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_RejectPromise__ID, (&(mState)));
510 0 : if ((!(RecvRejectPromise(mozilla::Move(aPromiseId), mozilla::Move(aDOMExceptionCode), mozilla::Move(aMessage))))) {
511 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
512 : // Error handled in mozilla::ipc::IPCResult
513 0 : return MsgProcessingError;
514 : }
515 :
516 0 : return MsgProcessed;
517 : }
518 : case PGMPDecryptor::Msg_SessionMessage__ID:
519 : {
520 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
521 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
522 : }
523 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_SessionMessage", OTHER);
524 :
525 0 : PickleIterator iter__(msg__);
526 0 : nsCString aSessionId;
527 : GMPSessionMessageType aMessageType;
528 0 : nsTArray<uint8_t> aMessage;
529 :
530 0 : if ((!(Read((&(aSessionId)), (&(msg__)), (&(iter__)))))) {
531 0 : FatalError("Error deserializing 'nsCString'");
532 0 : return MsgValueError;
533 : }
534 : // Sentinel = 'aSessionId'
535 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 725794242)))) {
536 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
537 0 : return MsgValueError;
538 : }
539 0 : if ((!(Read((&(aMessageType)), (&(msg__)), (&(iter__)))))) {
540 0 : FatalError("Error deserializing 'GMPSessionMessageType'");
541 0 : return MsgValueError;
542 : }
543 : // Sentinel = 'aMessageType'
544 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3343772818)))) {
545 0 : mozilla::ipc::SentinelReadError("Error deserializing 'GMPSessionMessageType'");
546 0 : return MsgValueError;
547 : }
548 0 : if ((!(Read((&(aMessage)), (&(msg__)), (&(iter__)))))) {
549 0 : FatalError("Error deserializing 'nsTArray'");
550 0 : return MsgValueError;
551 : }
552 : // Sentinel = 'aMessage'
553 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3453110902)))) {
554 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
555 0 : return MsgValueError;
556 : }
557 0 : (msg__).EndRead(iter__, (msg__).type());
558 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_SessionMessage__ID, (&(mState)));
559 0 : if ((!(RecvSessionMessage(mozilla::Move(aSessionId), mozilla::Move(aMessageType), mozilla::Move(aMessage))))) {
560 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
561 : // Error handled in mozilla::ipc::IPCResult
562 0 : return MsgProcessingError;
563 : }
564 :
565 0 : return MsgProcessed;
566 : }
567 : case PGMPDecryptor::Msg_ExpirationChange__ID:
568 : {
569 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
570 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
571 : }
572 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_ExpirationChange", OTHER);
573 :
574 0 : PickleIterator iter__(msg__);
575 0 : nsCString aSessionId;
576 : double aExpiryTime;
577 :
578 0 : if ((!(Read((&(aSessionId)), (&(msg__)), (&(iter__)))))) {
579 0 : FatalError("Error deserializing 'nsCString'");
580 0 : return MsgValueError;
581 : }
582 : // Sentinel = 'aSessionId'
583 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 725794242)))) {
584 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
585 0 : return MsgValueError;
586 : }
587 0 : if ((!(Read((&(aExpiryTime)), (&(msg__)), (&(iter__)))))) {
588 0 : FatalError("Error deserializing 'double'");
589 0 : return MsgValueError;
590 : }
591 : // Sentinel = 'aExpiryTime'
592 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 864162640)))) {
593 0 : mozilla::ipc::SentinelReadError("Error deserializing 'double'");
594 0 : return MsgValueError;
595 : }
596 0 : (msg__).EndRead(iter__, (msg__).type());
597 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_ExpirationChange__ID, (&(mState)));
598 0 : if ((!(RecvExpirationChange(mozilla::Move(aSessionId), mozilla::Move(aExpiryTime))))) {
599 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
600 : // Error handled in mozilla::ipc::IPCResult
601 0 : return MsgProcessingError;
602 : }
603 :
604 0 : return MsgProcessed;
605 : }
606 : case PGMPDecryptor::Msg_SessionClosed__ID:
607 : {
608 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
609 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
610 : }
611 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_SessionClosed", OTHER);
612 :
613 0 : PickleIterator iter__(msg__);
614 0 : nsCString aSessionId;
615 :
616 0 : if ((!(Read((&(aSessionId)), (&(msg__)), (&(iter__)))))) {
617 0 : FatalError("Error deserializing 'nsCString'");
618 0 : return MsgValueError;
619 : }
620 : // Sentinel = 'aSessionId'
621 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 725794242)))) {
622 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
623 0 : return MsgValueError;
624 : }
625 0 : (msg__).EndRead(iter__, (msg__).type());
626 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_SessionClosed__ID, (&(mState)));
627 0 : if ((!(RecvSessionClosed(mozilla::Move(aSessionId))))) {
628 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
629 : // Error handled in mozilla::ipc::IPCResult
630 0 : return MsgProcessingError;
631 : }
632 :
633 0 : return MsgProcessed;
634 : }
635 : case PGMPDecryptor::Msg_SessionError__ID:
636 : {
637 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
638 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
639 : }
640 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_SessionError", OTHER);
641 :
642 0 : PickleIterator iter__(msg__);
643 0 : nsCString aSessionId;
644 : GMPDOMException aDOMExceptionCode;
645 : uint32_t aSystemCode;
646 0 : nsCString aMessage;
647 :
648 0 : if ((!(Read((&(aSessionId)), (&(msg__)), (&(iter__)))))) {
649 0 : FatalError("Error deserializing 'nsCString'");
650 0 : return MsgValueError;
651 : }
652 : // Sentinel = 'aSessionId'
653 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 725794242)))) {
654 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
655 0 : return MsgValueError;
656 : }
657 0 : if ((!(Read((&(aDOMExceptionCode)), (&(msg__)), (&(iter__)))))) {
658 0 : FatalError("Error deserializing 'GMPDOMException'");
659 0 : return MsgValueError;
660 : }
661 : // Sentinel = 'aDOMExceptionCode'
662 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1177088860)))) {
663 0 : mozilla::ipc::SentinelReadError("Error deserializing 'GMPDOMException'");
664 0 : return MsgValueError;
665 : }
666 0 : if ((!(Read((&(aSystemCode)), (&(msg__)), (&(iter__)))))) {
667 0 : FatalError("Error deserializing 'uint32_t'");
668 0 : return MsgValueError;
669 : }
670 : // Sentinel = 'aSystemCode'
671 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2991479206)))) {
672 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
673 0 : return MsgValueError;
674 : }
675 0 : if ((!(Read((&(aMessage)), (&(msg__)), (&(iter__)))))) {
676 0 : FatalError("Error deserializing 'nsCString'");
677 0 : return MsgValueError;
678 : }
679 : // Sentinel = 'aMessage'
680 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3453110902)))) {
681 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
682 0 : return MsgValueError;
683 : }
684 0 : (msg__).EndRead(iter__, (msg__).type());
685 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_SessionError__ID, (&(mState)));
686 0 : if ((!(RecvSessionError(mozilla::Move(aSessionId), mozilla::Move(aDOMExceptionCode), mozilla::Move(aSystemCode), mozilla::Move(aMessage))))) {
687 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
688 : // Error handled in mozilla::ipc::IPCResult
689 0 : return MsgProcessingError;
690 : }
691 :
692 0 : return MsgProcessed;
693 : }
694 : case PGMPDecryptor::Msg_Decrypted__ID:
695 : {
696 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
697 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
698 : }
699 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_Decrypted", OTHER);
700 :
701 0 : PickleIterator iter__(msg__);
702 : uint32_t aId;
703 : GMPErr aResult;
704 0 : nsTArray<uint8_t> aBuffer;
705 :
706 0 : if ((!(Read((&(aId)), (&(msg__)), (&(iter__)))))) {
707 0 : FatalError("Error deserializing 'uint32_t'");
708 0 : return MsgValueError;
709 : }
710 : // Sentinel = 'aId'
711 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2735041817)))) {
712 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
713 0 : return MsgValueError;
714 : }
715 0 : if ((!(Read((&(aResult)), (&(msg__)), (&(iter__)))))) {
716 0 : FatalError("Error deserializing 'GMPErr'");
717 0 : return MsgValueError;
718 : }
719 : // Sentinel = 'aResult'
720 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3888726089)))) {
721 0 : mozilla::ipc::SentinelReadError("Error deserializing 'GMPErr'");
722 0 : return MsgValueError;
723 : }
724 0 : if ((!(Read((&(aBuffer)), (&(msg__)), (&(iter__)))))) {
725 0 : FatalError("Error deserializing 'nsTArray'");
726 0 : return MsgValueError;
727 : }
728 : // Sentinel = 'aBuffer'
729 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 35469444)))) {
730 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
731 0 : return MsgValueError;
732 : }
733 0 : (msg__).EndRead(iter__, (msg__).type());
734 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_Decrypted__ID, (&(mState)));
735 0 : if ((!(RecvDecrypted(mozilla::Move(aId), mozilla::Move(aResult), mozilla::Move(aBuffer))))) {
736 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
737 : // Error handled in mozilla::ipc::IPCResult
738 0 : return MsgProcessingError;
739 : }
740 :
741 0 : return MsgProcessed;
742 : }
743 : case PGMPDecryptor::Msg_Shutdown__ID:
744 : {
745 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
746 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
747 : }
748 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_Shutdown", OTHER);
749 :
750 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_Shutdown__ID, (&(mState)));
751 0 : if ((!(RecvShutdown()))) {
752 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
753 : // Error handled in mozilla::ipc::IPCResult
754 0 : return MsgProcessingError;
755 : }
756 :
757 0 : return MsgProcessed;
758 : }
759 : case PGMPDecryptor::Msg_BatchedKeyStatusChanged__ID:
760 : {
761 0 : if (mozilla::ipc::LoggingEnabledFor("PGMPDecryptorParent")) {
762 0 : mozilla::ipc::LogMessageForProtocol("PGMPDecryptorParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
763 : }
764 0 : AUTO_PROFILER_LABEL("PGMPDecryptor::Msg_BatchedKeyStatusChanged", OTHER);
765 :
766 0 : PickleIterator iter__(msg__);
767 0 : nsCString aSessionId;
768 0 : nsTArray<GMPKeyInformation> aKeyInfos;
769 :
770 0 : if ((!(Read((&(aSessionId)), (&(msg__)), (&(iter__)))))) {
771 0 : FatalError("Error deserializing 'nsCString'");
772 0 : return MsgValueError;
773 : }
774 : // Sentinel = 'aSessionId'
775 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 725794242)))) {
776 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
777 0 : return MsgValueError;
778 : }
779 0 : if ((!(Read((&(aKeyInfos)), (&(msg__)), (&(iter__)))))) {
780 0 : FatalError("Error deserializing 'nsTArray'");
781 0 : return MsgValueError;
782 : }
783 : // Sentinel = 'aKeyInfos'
784 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2722758264)))) {
785 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
786 0 : return MsgValueError;
787 : }
788 0 : (msg__).EndRead(iter__, (msg__).type());
789 0 : PGMPDecryptor::Transition(PGMPDecryptor::Msg_BatchedKeyStatusChanged__ID, (&(mState)));
790 0 : if ((!(RecvBatchedKeyStatusChanged(mozilla::Move(aSessionId), mozilla::Move(aKeyInfos))))) {
791 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
792 : // Error handled in mozilla::ipc::IPCResult
793 0 : return MsgProcessingError;
794 : }
795 :
796 0 : return MsgProcessed;
797 : }
798 : default:
799 : {
800 0 : return MsgNotKnown;
801 : }
802 : }
803 : }
804 :
805 0 : auto PGMPDecryptorParent::OnMessageReceived(
806 : const Message& msg__,
807 : Message*& reply__) -> PGMPDecryptorParent::Result
808 : {
809 0 : return MsgNotKnown;
810 : }
811 :
812 0 : auto PGMPDecryptorParent::OnCallReceived(
813 : const Message& msg__,
814 : Message*& reply__) -> PGMPDecryptorParent::Result
815 : {
816 0 : return MsgNotKnown;
817 : }
818 :
819 0 : auto PGMPDecryptorParent::GetProtocolTypeId() -> int32_t
820 : {
821 0 : return PGMPDecryptorMsgStart;
822 : }
823 :
824 0 : auto PGMPDecryptorParent::ProtocolName() const -> const char*
825 : {
826 0 : return "PGMPDecryptorParent";
827 : }
828 :
829 0 : auto PGMPDecryptorParent::DestroySubtree(ActorDestroyReason why) -> void
830 : {
831 : // Unregister from our manager.
832 0 : Unregister(Id());
833 :
834 : // Reject owning pending promises.
835 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
836 :
837 : // Finally, destroy "us".
838 0 : ActorDestroy(why);
839 0 : }
840 :
841 0 : auto PGMPDecryptorParent::DeallocSubtree() -> void
842 : {
843 0 : }
844 :
845 0 : auto PGMPDecryptorParent::Write(
846 : const GMPDecryptionData& v__,
847 : Message* msg__) -> void
848 : {
849 0 : Write((v__).mKeyId(), msg__);
850 : // Sentinel = 'mKeyId'
851 0 : (msg__)->WriteSentinel(3981028119);
852 0 : Write((v__).mIV(), msg__);
853 : // Sentinel = 'mIV'
854 0 : (msg__)->WriteSentinel(2012943167);
855 0 : Write((v__).mClearBytes(), msg__);
856 : // Sentinel = 'mClearBytes'
857 0 : (msg__)->WriteSentinel(2207723306);
858 0 : Write((v__).mCipherBytes(), msg__);
859 : // Sentinel = 'mCipherBytes'
860 0 : (msg__)->WriteSentinel(2558919233);
861 0 : Write((v__).mSessionIds(), msg__);
862 : // Sentinel = 'mSessionIds'
863 0 : (msg__)->WriteSentinel(2015252892);
864 0 : }
865 :
866 0 : auto PGMPDecryptorParent::Read(
867 : GMPDecryptionData* v__,
868 : const Message* msg__,
869 : PickleIterator* iter__) -> bool
870 : {
871 0 : if ((!(Read((&((v__)->mKeyId())), msg__, iter__)))) {
872 0 : FatalError("Error deserializing 'mKeyId' (uint8_t[]) member of 'GMPDecryptionData'");
873 0 : return false;
874 : }
875 : // Sentinel = 'mKeyId'
876 0 : if ((!((msg__)->ReadSentinel(iter__, 3981028119)))) {
877 0 : mozilla::ipc::SentinelReadError("Error deserializing 'mKeyId' (uint8_t[]) member of 'GMPDecryptionData'");
878 0 : return false;
879 : }
880 0 : if ((!(Read((&((v__)->mIV())), msg__, iter__)))) {
881 0 : FatalError("Error deserializing 'mIV' (uint8_t[]) member of 'GMPDecryptionData'");
882 0 : return false;
883 : }
884 : // Sentinel = 'mIV'
885 0 : if ((!((msg__)->ReadSentinel(iter__, 2012943167)))) {
886 0 : mozilla::ipc::SentinelReadError("Error deserializing 'mIV' (uint8_t[]) member of 'GMPDecryptionData'");
887 0 : return false;
888 : }
889 0 : if ((!(Read((&((v__)->mClearBytes())), msg__, iter__)))) {
890 0 : FatalError("Error deserializing 'mClearBytes' (uint16_t[]) member of 'GMPDecryptionData'");
891 0 : return false;
892 : }
893 : // Sentinel = 'mClearBytes'
894 0 : if ((!((msg__)->ReadSentinel(iter__, 2207723306)))) {
895 0 : mozilla::ipc::SentinelReadError("Error deserializing 'mClearBytes' (uint16_t[]) member of 'GMPDecryptionData'");
896 0 : return false;
897 : }
898 0 : if ((!(Read((&((v__)->mCipherBytes())), msg__, iter__)))) {
899 0 : FatalError("Error deserializing 'mCipherBytes' (uint32_t[]) member of 'GMPDecryptionData'");
900 0 : return false;
901 : }
902 : // Sentinel = 'mCipherBytes'
903 0 : if ((!((msg__)->ReadSentinel(iter__, 2558919233)))) {
904 0 : mozilla::ipc::SentinelReadError("Error deserializing 'mCipherBytes' (uint32_t[]) member of 'GMPDecryptionData'");
905 0 : return false;
906 : }
907 0 : if ((!(Read((&((v__)->mSessionIds())), msg__, iter__)))) {
908 0 : FatalError("Error deserializing 'mSessionIds' (nsCString[]) member of 'GMPDecryptionData'");
909 0 : return false;
910 : }
911 : // Sentinel = 'mSessionIds'
912 0 : if ((!((msg__)->ReadSentinel(iter__, 2015252892)))) {
913 0 : mozilla::ipc::SentinelReadError("Error deserializing 'mSessionIds' (nsCString[]) member of 'GMPDecryptionData'");
914 0 : return false;
915 : }
916 0 : return true;
917 : }
918 :
919 0 : auto PGMPDecryptorParent::Write(
920 : const nsTArray<GMPKeyInformation>& v__,
921 : Message* msg__) -> void
922 : {
923 0 : uint32_t length = (v__).Length();
924 0 : Write(length, msg__);
925 : // Sentinel = ('length', 'GMPKeyInformation[]')
926 0 : (msg__)->WriteSentinel(1816615355);
927 :
928 0 : for (auto& elem : v__) {
929 0 : Write(elem, msg__);
930 : // Sentinel = 'GMPKeyInformation[]'
931 0 : (msg__)->WriteSentinel(2141605854);
932 : }
933 0 : }
934 :
935 0 : auto PGMPDecryptorParent::Read(
936 : nsTArray<GMPKeyInformation>* v__,
937 : const Message* msg__,
938 : PickleIterator* iter__) -> bool
939 : {
940 0 : nsTArray<GMPKeyInformation> fa;
941 : uint32_t length;
942 0 : if ((!(Read((&(length)), msg__, iter__)))) {
943 0 : mozilla::ipc::ArrayLengthReadError("GMPKeyInformation[]");
944 0 : return false;
945 : }
946 : // Sentinel = ('length', 'GMPKeyInformation[]')
947 0 : if ((!((msg__)->ReadSentinel(iter__, 1816615355)))) {
948 0 : mozilla::ipc::SentinelReadError("GMPKeyInformation[]");
949 0 : return false;
950 : }
951 :
952 0 : GMPKeyInformation* elems = (fa).AppendElements(length);
953 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
954 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
955 0 : FatalError("Error deserializing 'GMPKeyInformation[i]'");
956 0 : return false;
957 : }
958 : // Sentinel = 'GMPKeyInformation[]'
959 0 : if ((!((msg__)->ReadSentinel(iter__, 2141605854)))) {
960 0 : mozilla::ipc::SentinelReadError("Error deserializing 'GMPKeyInformation[i]'");
961 0 : return false;
962 : }
963 : }
964 0 : (v__)->SwapElements(fa);
965 0 : return true;
966 : }
967 :
968 0 : auto PGMPDecryptorParent::Write(
969 : const GMPKeyInformation& v__,
970 : Message* msg__) -> void
971 : {
972 0 : Write((v__).keyId(), msg__);
973 : // Sentinel = 'keyId'
974 0 : (msg__)->WriteSentinel(948857603);
975 0 : Write((v__).status(), msg__);
976 : // Sentinel = 'status'
977 0 : (msg__)->WriteSentinel(3714608576);
978 0 : }
979 :
980 0 : auto PGMPDecryptorParent::Read(
981 : GMPKeyInformation* v__,
982 : const Message* msg__,
983 : PickleIterator* iter__) -> bool
984 : {
985 0 : if ((!(Read((&((v__)->keyId())), msg__, iter__)))) {
986 0 : FatalError("Error deserializing 'keyId' (uint8_t[]) member of 'GMPKeyInformation'");
987 0 : return false;
988 : }
989 : // Sentinel = 'keyId'
990 0 : if ((!((msg__)->ReadSentinel(iter__, 948857603)))) {
991 0 : mozilla::ipc::SentinelReadError("Error deserializing 'keyId' (uint8_t[]) member of 'GMPKeyInformation'");
992 0 : return false;
993 : }
994 0 : if ((!(Read((&((v__)->status())), msg__, iter__)))) {
995 0 : FatalError("Error deserializing 'status' (GMPMediaKeyStatus) member of 'GMPKeyInformation'");
996 0 : return false;
997 : }
998 : // Sentinel = 'status'
999 0 : if ((!((msg__)->ReadSentinel(iter__, 3714608576)))) {
1000 0 : mozilla::ipc::SentinelReadError("Error deserializing 'status' (GMPMediaKeyStatus) member of 'GMPKeyInformation'");
1001 0 : return false;
1002 : }
1003 0 : return true;
1004 : }
1005 :
1006 0 : auto PGMPDecryptorParent::Write(
1007 : const PGMPDecryptorParent* v__,
1008 : Message* msg__,
1009 : bool nullable__) -> void
1010 : {
1011 : int32_t id;
1012 0 : if ((!(v__))) {
1013 0 : if ((!(nullable__))) {
1014 0 : FatalError("NULL actor value passed to non-nullable param");
1015 : }
1016 0 : id = 0;
1017 : }
1018 : else {
1019 0 : id = (v__)->Id();
1020 0 : if ((1) == (id)) {
1021 0 : FatalError("actor has been |delete|d");
1022 : }
1023 : }
1024 :
1025 0 : Write(id, msg__);
1026 0 : }
1027 :
1028 0 : auto PGMPDecryptorParent::Read(
1029 : PGMPDecryptorParent** v__,
1030 : const Message* msg__,
1031 : PickleIterator* iter__,
1032 : bool nullable__) -> bool
1033 : {
1034 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PGMPDecryptor", PGMPDecryptorMsgStart);
1035 0 : if ((actor).isNothing()) {
1036 0 : return false;
1037 : }
1038 :
1039 0 : (*(v__)) = static_cast<PGMPDecryptorParent*>((actor).value());
1040 0 : return true;
1041 : }
1042 :
1043 :
1044 :
1045 : } // namespace gmp
1046 : } // namespace mozilla
|