/work/obj-fuzz/ipc/ipdl/PCamerasParent.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // Automatically generated by ipdlc. |
3 | | // Edit at your own risk |
4 | | // |
5 | | |
6 | | |
7 | | #include "mozilla/camera/PCamerasParent.h" |
8 | | |
9 | | #include "mozilla/dom/PContentParent.h" |
10 | | #include "mozilla/ipc/PBackgroundParent.h" |
11 | | |
12 | | #include "nsIFile.h" |
13 | | #include "GeckoProfiler.h" |
14 | | |
15 | | namespace mozilla { |
16 | | namespace camera { |
17 | | |
18 | | |
19 | | auto PCamerasParent::ActorDestroy(ActorDestroyReason aWhy) -> void |
20 | 0 | { |
21 | 0 | } |
22 | | |
23 | | MOZ_IMPLICIT PCamerasParent::PCamerasParent() : |
24 | | mozilla::ipc::IProtocol(mozilla::ipc::ParentSide), |
25 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
26 | 0 | { |
27 | 0 | MOZ_COUNT_CTOR(PCamerasParent); |
28 | 0 | } |
29 | | |
30 | | PCamerasParent::~PCamerasParent() |
31 | 0 | { |
32 | 0 | MOZ_COUNT_DTOR(PCamerasParent); |
33 | 0 | } |
34 | | |
35 | | auto PCamerasParent::Manager() const -> PBackgroundParent* |
36 | 0 | { |
37 | 0 | return static_cast<PBackgroundParent*>(IProtocol::Manager()); |
38 | 0 | } |
39 | | |
40 | | auto PCamerasParent::SendDeliverFrame( |
41 | | const CaptureEngine& capEngine, |
42 | | const int& streamId, |
43 | | Shmem& buffer, |
44 | | const VideoFrameProperties& props) -> bool |
45 | 0 | { |
46 | 0 | IPC::Message* msg__ = PCameras::Msg_DeliverFrame(Id()); |
47 | 0 |
|
48 | 0 | WriteIPDLParam(msg__, this, capEngine); |
49 | 0 | // Sentinel = 'capEngine' |
50 | 0 | (msg__)->WriteSentinel(653793175); |
51 | 0 | WriteIPDLParam(msg__, this, streamId); |
52 | 0 | // Sentinel = 'streamId' |
53 | 0 | (msg__)->WriteSentinel(456612599); |
54 | 0 | WriteIPDLParam(msg__, this, buffer); |
55 | 0 | // Sentinel = 'buffer' |
56 | 0 | (msg__)->WriteSentinel(4093250504); |
57 | 0 | WriteIPDLParam(msg__, this, props); |
58 | 0 | // Sentinel = 'props' |
59 | 0 | (msg__)->WriteSentinel(3139085495); |
60 | 0 |
|
61 | 0 |
|
62 | 0 |
|
63 | 0 |
|
64 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
65 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
66 | 0 | } |
67 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_DeliverFrame", OTHER); |
68 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
69 | 0 | mozilla::ipc::LogicError("Transition error"); |
70 | 0 | } |
71 | 0 |
|
72 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
73 | 0 | return sendok__; |
74 | 0 | } |
75 | | |
76 | | auto PCamerasParent::SendDeviceChange() -> bool |
77 | 0 | { |
78 | 0 | IPC::Message* msg__ = PCameras::Msg_DeviceChange(Id()); |
79 | 0 |
|
80 | 0 |
|
81 | 0 |
|
82 | 0 |
|
83 | 0 |
|
84 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
85 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
86 | 0 | } |
87 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_DeviceChange", OTHER); |
88 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
89 | 0 | mozilla::ipc::LogicError("Transition error"); |
90 | 0 | } |
91 | 0 |
|
92 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
93 | 0 | return sendok__; |
94 | 0 | } |
95 | | |
96 | | auto PCamerasParent::SendReplyNumberOfCaptureDevices(const int& numdev) -> bool |
97 | 0 | { |
98 | 0 | IPC::Message* msg__ = PCameras::Msg_ReplyNumberOfCaptureDevices(Id()); |
99 | 0 |
|
100 | 0 | WriteIPDLParam(msg__, this, numdev); |
101 | 0 | // Sentinel = 'numdev' |
102 | 0 | (msg__)->WriteSentinel(2469121787); |
103 | 0 |
|
104 | 0 |
|
105 | 0 |
|
106 | 0 |
|
107 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
108 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
109 | 0 | } |
110 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_ReplyNumberOfCaptureDevices", OTHER); |
111 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
112 | 0 | mozilla::ipc::LogicError("Transition error"); |
113 | 0 | } |
114 | 0 |
|
115 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
116 | 0 | return sendok__; |
117 | 0 | } |
118 | | |
119 | | auto PCamerasParent::SendReplyNumberOfCapabilities(const int& numdev) -> bool |
120 | 0 | { |
121 | 0 | IPC::Message* msg__ = PCameras::Msg_ReplyNumberOfCapabilities(Id()); |
122 | 0 |
|
123 | 0 | WriteIPDLParam(msg__, this, numdev); |
124 | 0 | // Sentinel = 'numdev' |
125 | 0 | (msg__)->WriteSentinel(2469121787); |
126 | 0 |
|
127 | 0 |
|
128 | 0 |
|
129 | 0 |
|
130 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
131 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
132 | 0 | } |
133 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_ReplyNumberOfCapabilities", OTHER); |
134 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
135 | 0 | mozilla::ipc::LogicError("Transition error"); |
136 | 0 | } |
137 | 0 |
|
138 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
139 | 0 | return sendok__; |
140 | 0 | } |
141 | | |
142 | | auto PCamerasParent::SendReplyAllocateCaptureDevice(const int& numdev) -> bool |
143 | 0 | { |
144 | 0 | IPC::Message* msg__ = PCameras::Msg_ReplyAllocateCaptureDevice(Id()); |
145 | 0 |
|
146 | 0 | WriteIPDLParam(msg__, this, numdev); |
147 | 0 | // Sentinel = 'numdev' |
148 | 0 | (msg__)->WriteSentinel(2469121787); |
149 | 0 |
|
150 | 0 |
|
151 | 0 |
|
152 | 0 |
|
153 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
154 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
155 | 0 | } |
156 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_ReplyAllocateCaptureDevice", OTHER); |
157 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
158 | 0 | mozilla::ipc::LogicError("Transition error"); |
159 | 0 | } |
160 | 0 |
|
161 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
162 | 0 | return sendok__; |
163 | 0 | } |
164 | | |
165 | | auto PCamerasParent::SendReplyGetCaptureCapability(const VideoCaptureCapability& cap) -> bool |
166 | 0 | { |
167 | 0 | IPC::Message* msg__ = PCameras::Msg_ReplyGetCaptureCapability(Id()); |
168 | 0 |
|
169 | 0 | WriteIPDLParam(msg__, this, cap); |
170 | 0 | // Sentinel = 'cap' |
171 | 0 | (msg__)->WriteSentinel(405875051); |
172 | 0 |
|
173 | 0 |
|
174 | 0 |
|
175 | 0 |
|
176 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
177 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
178 | 0 | } |
179 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_ReplyGetCaptureCapability", OTHER); |
180 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
181 | 0 | mozilla::ipc::LogicError("Transition error"); |
182 | 0 | } |
183 | 0 |
|
184 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
185 | 0 | return sendok__; |
186 | 0 | } |
187 | | |
188 | | auto PCamerasParent::SendReplyGetCaptureDevice( |
189 | | const nsCString& device_name, |
190 | | const nsCString& device_id, |
191 | | const bool& scary) -> bool |
192 | 0 | { |
193 | 0 | IPC::Message* msg__ = PCameras::Msg_ReplyGetCaptureDevice(Id()); |
194 | 0 |
|
195 | 0 | WriteIPDLParam(msg__, this, device_name); |
196 | 0 | // Sentinel = 'device_name' |
197 | 0 | (msg__)->WriteSentinel(2744663535); |
198 | 0 | WriteIPDLParam(msg__, this, device_id); |
199 | 0 | // Sentinel = 'device_id' |
200 | 0 | (msg__)->WriteSentinel(31832543); |
201 | 0 | WriteIPDLParam(msg__, this, scary); |
202 | 0 | // Sentinel = 'scary' |
203 | 0 | (msg__)->WriteSentinel(620600033); |
204 | 0 |
|
205 | 0 |
|
206 | 0 |
|
207 | 0 |
|
208 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
209 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
210 | 0 | } |
211 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_ReplyGetCaptureDevice", OTHER); |
212 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
213 | 0 | mozilla::ipc::LogicError("Transition error"); |
214 | 0 | } |
215 | 0 |
|
216 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
217 | 0 | return sendok__; |
218 | 0 | } |
219 | | |
220 | | auto PCamerasParent::SendReplyFailure() -> bool |
221 | 0 | { |
222 | 0 | IPC::Message* msg__ = PCameras::Msg_ReplyFailure(Id()); |
223 | 0 |
|
224 | 0 |
|
225 | 0 |
|
226 | 0 |
|
227 | 0 |
|
228 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
229 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
230 | 0 | } |
231 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_ReplyFailure", OTHER); |
232 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
233 | 0 | mozilla::ipc::LogicError("Transition error"); |
234 | 0 | } |
235 | 0 |
|
236 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
237 | 0 | return sendok__; |
238 | 0 | } |
239 | | |
240 | | auto PCamerasParent::SendReplySuccess() -> bool |
241 | 0 | { |
242 | 0 | IPC::Message* msg__ = PCameras::Msg_ReplySuccess(Id()); |
243 | 0 |
|
244 | 0 |
|
245 | 0 |
|
246 | 0 |
|
247 | 0 |
|
248 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
249 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
250 | 0 | } |
251 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_ReplySuccess", OTHER); |
252 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
253 | 0 | mozilla::ipc::LogicError("Transition error"); |
254 | 0 | } |
255 | 0 |
|
256 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
257 | 0 | return sendok__; |
258 | 0 | } |
259 | | |
260 | | auto PCamerasParent::Send__delete__(PCamerasParent* actor) -> bool |
261 | 0 | { |
262 | 0 | if ((!(actor))) { |
263 | 0 | return false; |
264 | 0 | } |
265 | 0 | |
266 | 0 | IPC::Message* msg__ = PCameras::Msg___delete__((actor)->Id()); |
267 | 0 |
|
268 | 0 | MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param"); |
269 | 0 | WriteIPDLParam(msg__, actor, actor); |
270 | 0 | // Sentinel = 'actor' |
271 | 0 | (msg__)->WriteSentinel(875202478); |
272 | 0 |
|
273 | 0 |
|
274 | 0 |
|
275 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
276 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
277 | 0 | } |
278 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg___delete__", OTHER); |
279 | 0 | if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) { |
280 | 0 | mozilla::ipc::LogicError("Transition error"); |
281 | 0 | } |
282 | 0 |
|
283 | 0 | bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__); |
284 | 0 |
|
285 | 0 | IProtocol* mgr = (actor)->Manager(); |
286 | 0 | (actor)->DestroySubtree(Deletion); |
287 | 0 | (actor)->DeallocSubtree(); |
288 | 0 | (mgr)->RemoveManagee(PCamerasMsgStart, actor); |
289 | 0 | return sendok__; |
290 | 0 | } |
291 | | |
292 | | auto PCamerasParent::RemoveManagee( |
293 | | int32_t aProtocolId, |
294 | | IProtocol* aListener) -> void |
295 | 0 | { |
296 | 0 | FatalError("unreached"); |
297 | 0 | return; |
298 | 0 | } |
299 | | |
300 | | auto PCamerasParent::OnMessageReceived(const Message& msg__) -> PCamerasParent::Result |
301 | 0 | { |
302 | 0 | switch ((msg__).type()) { |
303 | 0 | case PCameras::Reply___delete____ID: |
304 | 0 | { |
305 | 0 | return MsgProcessed; |
306 | 0 | } |
307 | 0 | case PCameras::Msg_NumberOfCaptureDevices__ID: |
308 | 0 | { |
309 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
310 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
311 | 0 | } |
312 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_NumberOfCaptureDevices", OTHER); |
313 | 0 |
|
314 | 0 | PickleIterator iter__(msg__); |
315 | 0 | CaptureEngine engine; |
316 | 0 |
|
317 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(engine)))))) { |
318 | 0 | FatalError("Error deserializing 'CaptureEngine'"); |
319 | 0 | return MsgValueError; |
320 | 0 | } |
321 | 0 | // Sentinel = 'engine' |
322 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 749038912)))) { |
323 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CaptureEngine'"); |
324 | 0 | return MsgValueError; |
325 | 0 | } |
326 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
327 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
328 | 0 | FatalError("Transition error"); |
329 | 0 | return MsgValueError; |
330 | 0 | } |
331 | 0 | if ((!(RecvNumberOfCaptureDevices(engine)))) { |
332 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
333 | 0 | // Error handled in mozilla::ipc::IPCResult |
334 | 0 | return MsgProcessingError; |
335 | 0 | } |
336 | 0 | |
337 | 0 | return MsgProcessed; |
338 | 0 | } |
339 | 0 | case PCameras::Msg_NumberOfCapabilities__ID: |
340 | 0 | { |
341 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
342 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
343 | 0 | } |
344 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_NumberOfCapabilities", OTHER); |
345 | 0 |
|
346 | 0 | PickleIterator iter__(msg__); |
347 | 0 | CaptureEngine engine; |
348 | 0 | nsCString deviceUniqueIdUTF8; |
349 | 0 |
|
350 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(engine)))))) { |
351 | 0 | FatalError("Error deserializing 'CaptureEngine'"); |
352 | 0 | return MsgValueError; |
353 | 0 | } |
354 | 0 | // Sentinel = 'engine' |
355 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 749038912)))) { |
356 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CaptureEngine'"); |
357 | 0 | return MsgValueError; |
358 | 0 | } |
359 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(deviceUniqueIdUTF8)))))) { |
360 | 0 | FatalError("Error deserializing 'nsCString'"); |
361 | 0 | return MsgValueError; |
362 | 0 | } |
363 | 0 | // Sentinel = 'deviceUniqueIdUTF8' |
364 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1853575775)))) { |
365 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
366 | 0 | return MsgValueError; |
367 | 0 | } |
368 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
369 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
370 | 0 | FatalError("Transition error"); |
371 | 0 | return MsgValueError; |
372 | 0 | } |
373 | 0 | if ((!(RecvNumberOfCapabilities(engine, deviceUniqueIdUTF8)))) { |
374 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
375 | 0 | // Error handled in mozilla::ipc::IPCResult |
376 | 0 | return MsgProcessingError; |
377 | 0 | } |
378 | 0 | |
379 | 0 | return MsgProcessed; |
380 | 0 | } |
381 | 0 | case PCameras::Msg_GetCaptureCapability__ID: |
382 | 0 | { |
383 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
384 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
385 | 0 | } |
386 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_GetCaptureCapability", OTHER); |
387 | 0 |
|
388 | 0 | PickleIterator iter__(msg__); |
389 | 0 | CaptureEngine engine; |
390 | 0 | nsCString unique_idUTF8; |
391 | 0 | int capability_number; |
392 | 0 |
|
393 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(engine)))))) { |
394 | 0 | FatalError("Error deserializing 'CaptureEngine'"); |
395 | 0 | return MsgValueError; |
396 | 0 | } |
397 | 0 | // Sentinel = 'engine' |
398 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 749038912)))) { |
399 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CaptureEngine'"); |
400 | 0 | return MsgValueError; |
401 | 0 | } |
402 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(unique_idUTF8)))))) { |
403 | 0 | FatalError("Error deserializing 'nsCString'"); |
404 | 0 | return MsgValueError; |
405 | 0 | } |
406 | 0 | // Sentinel = 'unique_idUTF8' |
407 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1172699115)))) { |
408 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
409 | 0 | return MsgValueError; |
410 | 0 | } |
411 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(capability_number)))))) { |
412 | 0 | FatalError("Error deserializing 'int'"); |
413 | 0 | return MsgValueError; |
414 | 0 | } |
415 | 0 | // Sentinel = 'capability_number' |
416 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2978179015)))) { |
417 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int'"); |
418 | 0 | return MsgValueError; |
419 | 0 | } |
420 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
421 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
422 | 0 | FatalError("Transition error"); |
423 | 0 | return MsgValueError; |
424 | 0 | } |
425 | 0 | if ((!(RecvGetCaptureCapability(engine, unique_idUTF8, capability_number)))) { |
426 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
427 | 0 | // Error handled in mozilla::ipc::IPCResult |
428 | 0 | return MsgProcessingError; |
429 | 0 | } |
430 | 0 | |
431 | 0 | return MsgProcessed; |
432 | 0 | } |
433 | 0 | case PCameras::Msg_GetCaptureDevice__ID: |
434 | 0 | { |
435 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
436 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
437 | 0 | } |
438 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_GetCaptureDevice", OTHER); |
439 | 0 |
|
440 | 0 | PickleIterator iter__(msg__); |
441 | 0 | CaptureEngine engine; |
442 | 0 | int num; |
443 | 0 |
|
444 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(engine)))))) { |
445 | 0 | FatalError("Error deserializing 'CaptureEngine'"); |
446 | 0 | return MsgValueError; |
447 | 0 | } |
448 | 0 | // Sentinel = 'engine' |
449 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 749038912)))) { |
450 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CaptureEngine'"); |
451 | 0 | return MsgValueError; |
452 | 0 | } |
453 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(num)))))) { |
454 | 0 | FatalError("Error deserializing 'int'"); |
455 | 0 | return MsgValueError; |
456 | 0 | } |
457 | 0 | // Sentinel = 'num' |
458 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2933843091)))) { |
459 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int'"); |
460 | 0 | return MsgValueError; |
461 | 0 | } |
462 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
463 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
464 | 0 | FatalError("Transition error"); |
465 | 0 | return MsgValueError; |
466 | 0 | } |
467 | 0 | if ((!(RecvGetCaptureDevice(engine, num)))) { |
468 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
469 | 0 | // Error handled in mozilla::ipc::IPCResult |
470 | 0 | return MsgProcessingError; |
471 | 0 | } |
472 | 0 | |
473 | 0 | return MsgProcessed; |
474 | 0 | } |
475 | 0 | case PCameras::Msg_AllocateCaptureDevice__ID: |
476 | 0 | { |
477 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
478 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
479 | 0 | } |
480 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_AllocateCaptureDevice", OTHER); |
481 | 0 |
|
482 | 0 | PickleIterator iter__(msg__); |
483 | 0 | CaptureEngine engine; |
484 | 0 | nsCString unique_idUTF8; |
485 | 0 | PrincipalInfo principal; |
486 | 0 |
|
487 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(engine)))))) { |
488 | 0 | FatalError("Error deserializing 'CaptureEngine'"); |
489 | 0 | return MsgValueError; |
490 | 0 | } |
491 | 0 | // Sentinel = 'engine' |
492 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 749038912)))) { |
493 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CaptureEngine'"); |
494 | 0 | return MsgValueError; |
495 | 0 | } |
496 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(unique_idUTF8)))))) { |
497 | 0 | FatalError("Error deserializing 'nsCString'"); |
498 | 0 | return MsgValueError; |
499 | 0 | } |
500 | 0 | // Sentinel = 'unique_idUTF8' |
501 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1172699115)))) { |
502 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
503 | 0 | return MsgValueError; |
504 | 0 | } |
505 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(principal)))))) { |
506 | 0 | FatalError("Error deserializing 'PrincipalInfo'"); |
507 | 0 | return MsgValueError; |
508 | 0 | } |
509 | 0 | // Sentinel = 'principal' |
510 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 732240927)))) { |
511 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PrincipalInfo'"); |
512 | 0 | return MsgValueError; |
513 | 0 | } |
514 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
515 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
516 | 0 | FatalError("Transition error"); |
517 | 0 | return MsgValueError; |
518 | 0 | } |
519 | 0 | if ((!(RecvAllocateCaptureDevice(engine, unique_idUTF8, principal)))) { |
520 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
521 | 0 | // Error handled in mozilla::ipc::IPCResult |
522 | 0 | return MsgProcessingError; |
523 | 0 | } |
524 | 0 | |
525 | 0 | return MsgProcessed; |
526 | 0 | } |
527 | 0 | case PCameras::Msg_ReleaseCaptureDevice__ID: |
528 | 0 | { |
529 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
530 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
531 | 0 | } |
532 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_ReleaseCaptureDevice", OTHER); |
533 | 0 |
|
534 | 0 | PickleIterator iter__(msg__); |
535 | 0 | CaptureEngine engine; |
536 | 0 | int numdev; |
537 | 0 |
|
538 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(engine)))))) { |
539 | 0 | FatalError("Error deserializing 'CaptureEngine'"); |
540 | 0 | return MsgValueError; |
541 | 0 | } |
542 | 0 | // Sentinel = 'engine' |
543 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 749038912)))) { |
544 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CaptureEngine'"); |
545 | 0 | return MsgValueError; |
546 | 0 | } |
547 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(numdev)))))) { |
548 | 0 | FatalError("Error deserializing 'int'"); |
549 | 0 | return MsgValueError; |
550 | 0 | } |
551 | 0 | // Sentinel = 'numdev' |
552 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2469121787)))) { |
553 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int'"); |
554 | 0 | return MsgValueError; |
555 | 0 | } |
556 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
557 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
558 | 0 | FatalError("Transition error"); |
559 | 0 | return MsgValueError; |
560 | 0 | } |
561 | 0 | if ((!(RecvReleaseCaptureDevice(engine, numdev)))) { |
562 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
563 | 0 | // Error handled in mozilla::ipc::IPCResult |
564 | 0 | return MsgProcessingError; |
565 | 0 | } |
566 | 0 | |
567 | 0 | return MsgProcessed; |
568 | 0 | } |
569 | 0 | case PCameras::Msg_StartCapture__ID: |
570 | 0 | { |
571 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
572 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
573 | 0 | } |
574 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_StartCapture", OTHER); |
575 | 0 |
|
576 | 0 | PickleIterator iter__(msg__); |
577 | 0 | CaptureEngine engine; |
578 | 0 | int numdev; |
579 | 0 | VideoCaptureCapability capability; |
580 | 0 |
|
581 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(engine)))))) { |
582 | 0 | FatalError("Error deserializing 'CaptureEngine'"); |
583 | 0 | return MsgValueError; |
584 | 0 | } |
585 | 0 | // Sentinel = 'engine' |
586 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 749038912)))) { |
587 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CaptureEngine'"); |
588 | 0 | return MsgValueError; |
589 | 0 | } |
590 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(numdev)))))) { |
591 | 0 | FatalError("Error deserializing 'int'"); |
592 | 0 | return MsgValueError; |
593 | 0 | } |
594 | 0 | // Sentinel = 'numdev' |
595 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2469121787)))) { |
596 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int'"); |
597 | 0 | return MsgValueError; |
598 | 0 | } |
599 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(capability)))))) { |
600 | 0 | FatalError("Error deserializing 'VideoCaptureCapability'"); |
601 | 0 | return MsgValueError; |
602 | 0 | } |
603 | 0 | // Sentinel = 'capability' |
604 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2146873968)))) { |
605 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'VideoCaptureCapability'"); |
606 | 0 | return MsgValueError; |
607 | 0 | } |
608 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
609 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
610 | 0 | FatalError("Transition error"); |
611 | 0 | return MsgValueError; |
612 | 0 | } |
613 | 0 | if ((!(RecvStartCapture(engine, numdev, capability)))) { |
614 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
615 | 0 | // Error handled in mozilla::ipc::IPCResult |
616 | 0 | return MsgProcessingError; |
617 | 0 | } |
618 | 0 | |
619 | 0 | return MsgProcessed; |
620 | 0 | } |
621 | 0 | case PCameras::Msg_FocusOnSelectedSource__ID: |
622 | 0 | { |
623 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
624 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
625 | 0 | } |
626 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_FocusOnSelectedSource", OTHER); |
627 | 0 |
|
628 | 0 | PickleIterator iter__(msg__); |
629 | 0 | CaptureEngine engine; |
630 | 0 | int numdev; |
631 | 0 |
|
632 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(engine)))))) { |
633 | 0 | FatalError("Error deserializing 'CaptureEngine'"); |
634 | 0 | return MsgValueError; |
635 | 0 | } |
636 | 0 | // Sentinel = 'engine' |
637 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 749038912)))) { |
638 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CaptureEngine'"); |
639 | 0 | return MsgValueError; |
640 | 0 | } |
641 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(numdev)))))) { |
642 | 0 | FatalError("Error deserializing 'int'"); |
643 | 0 | return MsgValueError; |
644 | 0 | } |
645 | 0 | // Sentinel = 'numdev' |
646 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2469121787)))) { |
647 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int'"); |
648 | 0 | return MsgValueError; |
649 | 0 | } |
650 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
651 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
652 | 0 | FatalError("Transition error"); |
653 | 0 | return MsgValueError; |
654 | 0 | } |
655 | 0 | if ((!(RecvFocusOnSelectedSource(engine, numdev)))) { |
656 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
657 | 0 | // Error handled in mozilla::ipc::IPCResult |
658 | 0 | return MsgProcessingError; |
659 | 0 | } |
660 | 0 | |
661 | 0 | return MsgProcessed; |
662 | 0 | } |
663 | 0 | case PCameras::Msg_StopCapture__ID: |
664 | 0 | { |
665 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
666 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
667 | 0 | } |
668 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_StopCapture", OTHER); |
669 | 0 |
|
670 | 0 | PickleIterator iter__(msg__); |
671 | 0 | CaptureEngine engine; |
672 | 0 | int numdev; |
673 | 0 |
|
674 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(engine)))))) { |
675 | 0 | FatalError("Error deserializing 'CaptureEngine'"); |
676 | 0 | return MsgValueError; |
677 | 0 | } |
678 | 0 | // Sentinel = 'engine' |
679 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 749038912)))) { |
680 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CaptureEngine'"); |
681 | 0 | return MsgValueError; |
682 | 0 | } |
683 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(numdev)))))) { |
684 | 0 | FatalError("Error deserializing 'int'"); |
685 | 0 | return MsgValueError; |
686 | 0 | } |
687 | 0 | // Sentinel = 'numdev' |
688 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2469121787)))) { |
689 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int'"); |
690 | 0 | return MsgValueError; |
691 | 0 | } |
692 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
693 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
694 | 0 | FatalError("Transition error"); |
695 | 0 | return MsgValueError; |
696 | 0 | } |
697 | 0 | if ((!(RecvStopCapture(engine, numdev)))) { |
698 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
699 | 0 | // Error handled in mozilla::ipc::IPCResult |
700 | 0 | return MsgProcessingError; |
701 | 0 | } |
702 | 0 | |
703 | 0 | return MsgProcessed; |
704 | 0 | } |
705 | 0 | case PCameras::Msg_ReleaseFrame__ID: |
706 | 0 | { |
707 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
708 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
709 | 0 | } |
710 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_ReleaseFrame", OTHER); |
711 | 0 |
|
712 | 0 | PickleIterator iter__(msg__); |
713 | 0 | Shmem s; |
714 | 0 |
|
715 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(s)))))) { |
716 | 0 | FatalError("Error deserializing 'Shmem'"); |
717 | 0 | return MsgValueError; |
718 | 0 | } |
719 | 0 | // Sentinel = 's' |
720 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1835142386)))) { |
721 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'"); |
722 | 0 | return MsgValueError; |
723 | 0 | } |
724 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
725 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
726 | 0 | FatalError("Transition error"); |
727 | 0 | return MsgValueError; |
728 | 0 | } |
729 | 0 | if ((!(RecvReleaseFrame(std::move(s))))) { |
730 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
731 | 0 | // Error handled in mozilla::ipc::IPCResult |
732 | 0 | return MsgProcessingError; |
733 | 0 | } |
734 | 0 | |
735 | 0 | return MsgProcessed; |
736 | 0 | } |
737 | 0 | case PCameras::Msg_AllDone__ID: |
738 | 0 | { |
739 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
740 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
741 | 0 | } |
742 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_AllDone", OTHER); |
743 | 0 |
|
744 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
745 | 0 | FatalError("Transition error"); |
746 | 0 | return MsgValueError; |
747 | 0 | } |
748 | 0 | if ((!(RecvAllDone()))) { |
749 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
750 | 0 | // Error handled in mozilla::ipc::IPCResult |
751 | 0 | return MsgProcessingError; |
752 | 0 | } |
753 | 0 | |
754 | 0 | return MsgProcessed; |
755 | 0 | } |
756 | 0 | case PCameras::Msg_EnsureInitialized__ID: |
757 | 0 | { |
758 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCamerasParent")) { |
759 | 0 | mozilla::ipc::LogMessageForProtocol("PCamerasParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
760 | 0 | } |
761 | 0 | AUTO_PROFILER_LABEL("PCameras::Msg_EnsureInitialized", OTHER); |
762 | 0 |
|
763 | 0 | PickleIterator iter__(msg__); |
764 | 0 | CaptureEngine engine; |
765 | 0 |
|
766 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(engine)))))) { |
767 | 0 | FatalError("Error deserializing 'CaptureEngine'"); |
768 | 0 | return MsgValueError; |
769 | 0 | } |
770 | 0 | // Sentinel = 'engine' |
771 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 749038912)))) { |
772 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CaptureEngine'"); |
773 | 0 | return MsgValueError; |
774 | 0 | } |
775 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
776 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
777 | 0 | FatalError("Transition error"); |
778 | 0 | return MsgValueError; |
779 | 0 | } |
780 | 0 | if ((!(RecvEnsureInitialized(engine)))) { |
781 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
782 | 0 | // Error handled in mozilla::ipc::IPCResult |
783 | 0 | return MsgProcessingError; |
784 | 0 | } |
785 | 0 | |
786 | 0 | return MsgProcessed; |
787 | 0 | } |
788 | 0 | default: |
789 | 0 | { |
790 | 0 | return MsgNotKnown; |
791 | 0 | } |
792 | 0 | } |
793 | 0 | } |
794 | | |
795 | | auto PCamerasParent::OnMessageReceived( |
796 | | const Message& msg__, |
797 | | Message*& reply__) -> PCamerasParent::Result |
798 | 0 | { |
799 | 0 | return MsgNotKnown; |
800 | 0 | } |
801 | | |
802 | | auto PCamerasParent::OnCallReceived( |
803 | | const Message& msg__, |
804 | | Message*& reply__) -> PCamerasParent::Result |
805 | 0 | { |
806 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
807 | 0 | return MsgNotKnown; |
808 | 0 | } |
809 | | |
810 | | auto PCamerasParent::GetProtocolTypeId() -> int32_t |
811 | 0 | { |
812 | 0 | return PCamerasMsgStart; |
813 | 0 | } |
814 | | |
815 | | auto PCamerasParent::DestroySubtree(ActorDestroyReason why) -> void |
816 | 0 | { |
817 | 0 | // Unregister from our manager. |
818 | 0 | Unregister(Id()); |
819 | 0 |
|
820 | 0 | // Reject owning pending responses. |
821 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
822 | 0 |
|
823 | 0 | // Finally, destroy "us". |
824 | 0 | ActorDestroy(why); |
825 | 0 | } |
826 | | |
827 | | auto PCamerasParent::DeallocSubtree() -> void |
828 | 0 | { |
829 | 0 | } |
830 | | |
831 | | |
832 | | |
833 | | } // namespace camera |
834 | | } // namespace mozilla |
835 | | namespace mozilla { |
836 | | namespace ipc { |
837 | | auto IPDLParamTraits<mozilla::camera::PCamerasParent>::Write( |
838 | | IPC::Message* aMsg, |
839 | | mozilla::ipc::IProtocol* aActor, |
840 | | const paramType& aVar) -> void |
841 | 0 | { |
842 | 0 | int32_t id; |
843 | 0 | if ((!(aVar))) { |
844 | 0 | id = 0; |
845 | 0 | } |
846 | 0 | else { |
847 | 0 | id = (aVar)->Id(); |
848 | 0 | if ((1) == (id)) { |
849 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
850 | 0 | } |
851 | 0 | } |
852 | 0 | WriteIPDLParam(aMsg, aActor, id); |
853 | 0 | } |
854 | | |
855 | | auto IPDLParamTraits<mozilla::camera::PCamerasParent>::Read( |
856 | | const IPC::Message* aMsg, |
857 | | PickleIterator* aIter, |
858 | | mozilla::ipc::IProtocol* aActor, |
859 | | paramType* aVar) -> bool |
860 | 0 | { |
861 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PCameras", PCamerasMsgStart); |
862 | 0 | if ((actor).isNothing()) { |
863 | 0 | return false; |
864 | 0 | } |
865 | 0 | |
866 | 0 | (*(aVar)) = static_cast<mozilla::camera::PCamerasParent*>((actor).value()); |
867 | 0 | return true; |
868 | 0 | } |
869 | | |
870 | | } // namespace ipc |
871 | | } // namespace mozilla |