Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PWebrtcGlobalChild.h"
8 : #include "mozilla/dom/RTCStatsReportBinding.h"
9 :
10 : #include "mozilla/dom/PContentChild.h"
11 :
12 : #include "nsIFile.h"
13 : #include "GeckoProfiler.h"
14 :
15 : namespace mozilla {
16 : namespace dom {
17 :
18 :
19 0 : auto PWebrtcGlobalChild::ActorDestroy(ActorDestroyReason aWhy) -> void
20 : {
21 0 : }
22 :
23 0 : MOZ_IMPLICIT PWebrtcGlobalChild::PWebrtcGlobalChild() :
24 : mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
25 0 : mState(PWebrtcGlobal::__Dead)
26 : {
27 0 : MOZ_COUNT_CTOR(PWebrtcGlobalChild);
28 0 : }
29 :
30 0 : PWebrtcGlobalChild::~PWebrtcGlobalChild()
31 : {
32 0 : MOZ_COUNT_DTOR(PWebrtcGlobalChild);
33 0 : }
34 :
35 0 : auto PWebrtcGlobalChild::Manager() const -> PContentChild*
36 : {
37 0 : return static_cast<PContentChild*>(IProtocol::Manager());
38 : }
39 :
40 0 : auto PWebrtcGlobalChild::SendGetStatsResult(
41 : const int& aRequestId,
42 : const nsTArray<RTCStatsReportInternal>& aStats) -> bool
43 : {
44 0 : IPC::Message* msg__ = PWebrtcGlobal::Msg_GetStatsResult(Id());
45 :
46 0 : Write(aRequestId, msg__);
47 : // Sentinel = 'aRequestId'
48 0 : (msg__)->WriteSentinel(3709302657);
49 0 : Write(aStats, msg__);
50 : // Sentinel = 'aStats'
51 0 : (msg__)->WriteSentinel(3694751948);
52 :
53 :
54 :
55 :
56 0 : if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) {
57 0 : mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
58 : }
59 0 : AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_GetStatsResult", OTHER);
60 0 : PWebrtcGlobal::Transition(PWebrtcGlobal::Msg_GetStatsResult__ID, (&(mState)));
61 :
62 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
63 0 : return sendok__;
64 : }
65 :
66 0 : auto PWebrtcGlobalChild::SendGetLogResult(
67 : const int& aRequestId,
68 : const WebrtcGlobalLog& aLog) -> bool
69 : {
70 0 : IPC::Message* msg__ = PWebrtcGlobal::Msg_GetLogResult(Id());
71 :
72 0 : Write(aRequestId, msg__);
73 : // Sentinel = 'aRequestId'
74 0 : (msg__)->WriteSentinel(3709302657);
75 0 : Write(aLog, msg__);
76 : // Sentinel = 'aLog'
77 0 : (msg__)->WriteSentinel(2709198341);
78 :
79 :
80 :
81 :
82 0 : if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) {
83 0 : mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
84 : }
85 0 : AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_GetLogResult", OTHER);
86 0 : PWebrtcGlobal::Transition(PWebrtcGlobal::Msg_GetLogResult__ID, (&(mState)));
87 :
88 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
89 0 : return sendok__;
90 : }
91 :
92 0 : auto PWebrtcGlobalChild::Send__delete__(PWebrtcGlobalChild* actor) -> bool
93 : {
94 0 : if ((!(actor))) {
95 0 : return false;
96 : }
97 :
98 0 : IPC::Message* msg__ = PWebrtcGlobal::Msg___delete__((actor)->Id());
99 :
100 0 : (actor)->Write(actor, msg__, false);
101 : // Sentinel = 'actor'
102 0 : (msg__)->WriteSentinel(875202478);
103 :
104 :
105 :
106 0 : if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) {
107 0 : mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
108 : }
109 0 : AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg___delete__", OTHER);
110 0 : PWebrtcGlobal::Transition(PWebrtcGlobal::Msg___delete____ID, (&((actor)->mState)));
111 :
112 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
113 :
114 0 : IProtocol* mgr = (actor)->Manager();
115 0 : (actor)->DestroySubtree(Deletion);
116 0 : (actor)->DeallocSubtree();
117 0 : (mgr)->RemoveManagee(PWebrtcGlobalMsgStart, actor);
118 0 : return sendok__;
119 : }
120 :
121 0 : auto PWebrtcGlobalChild::RemoveManagee(
122 : int32_t aProtocolId,
123 : ProtocolBase* aListener) -> void
124 : {
125 0 : FatalError("unreached");
126 0 : return;
127 : }
128 :
129 0 : auto PWebrtcGlobalChild::OnMessageReceived(const Message& msg__) -> PWebrtcGlobalChild::Result
130 : {
131 0 : switch ((msg__).type()) {
132 : case PWebrtcGlobal::Msg_GetStatsRequest__ID:
133 : {
134 0 : if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) {
135 0 : mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
136 : }
137 0 : AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_GetStatsRequest", OTHER);
138 :
139 0 : PickleIterator iter__(msg__);
140 : int aRequestId;
141 0 : nsString aPcIdFilter;
142 :
143 0 : if ((!(Read((&(aRequestId)), (&(msg__)), (&(iter__)))))) {
144 0 : FatalError("Error deserializing 'int'");
145 0 : return MsgValueError;
146 : }
147 : // Sentinel = 'aRequestId'
148 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3709302657)))) {
149 0 : mozilla::ipc::SentinelReadError("Error deserializing 'int'");
150 0 : return MsgValueError;
151 : }
152 0 : if ((!(Read((&(aPcIdFilter)), (&(msg__)), (&(iter__)))))) {
153 0 : FatalError("Error deserializing 'nsString'");
154 0 : return MsgValueError;
155 : }
156 : // Sentinel = 'aPcIdFilter'
157 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1293029124)))) {
158 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
159 0 : return MsgValueError;
160 : }
161 0 : (msg__).EndRead(iter__, (msg__).type());
162 0 : PWebrtcGlobal::Transition(PWebrtcGlobal::Msg_GetStatsRequest__ID, (&(mState)));
163 0 : if ((!(RecvGetStatsRequest(mozilla::Move(aRequestId), mozilla::Move(aPcIdFilter))))) {
164 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
165 : // Error handled in mozilla::ipc::IPCResult
166 0 : return MsgProcessingError;
167 : }
168 :
169 0 : return MsgProcessed;
170 : }
171 : case PWebrtcGlobal::Msg_ClearStatsRequest__ID:
172 : {
173 0 : if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) {
174 0 : mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
175 : }
176 0 : AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_ClearStatsRequest", OTHER);
177 :
178 0 : PWebrtcGlobal::Transition(PWebrtcGlobal::Msg_ClearStatsRequest__ID, (&(mState)));
179 0 : if ((!(RecvClearStatsRequest()))) {
180 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
181 : // Error handled in mozilla::ipc::IPCResult
182 0 : return MsgProcessingError;
183 : }
184 :
185 0 : return MsgProcessed;
186 : }
187 : case PWebrtcGlobal::Msg_GetLogRequest__ID:
188 : {
189 0 : if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) {
190 0 : mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
191 : }
192 0 : AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_GetLogRequest", OTHER);
193 :
194 0 : PickleIterator iter__(msg__);
195 : int aRequestId;
196 0 : nsCString aPattern;
197 :
198 0 : if ((!(Read((&(aRequestId)), (&(msg__)), (&(iter__)))))) {
199 0 : FatalError("Error deserializing 'int'");
200 0 : return MsgValueError;
201 : }
202 : // Sentinel = 'aRequestId'
203 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3709302657)))) {
204 0 : mozilla::ipc::SentinelReadError("Error deserializing 'int'");
205 0 : return MsgValueError;
206 : }
207 0 : if ((!(Read((&(aPattern)), (&(msg__)), (&(iter__)))))) {
208 0 : FatalError("Error deserializing 'nsCString'");
209 0 : return MsgValueError;
210 : }
211 : // Sentinel = 'aPattern'
212 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3502183121)))) {
213 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
214 0 : return MsgValueError;
215 : }
216 0 : (msg__).EndRead(iter__, (msg__).type());
217 0 : PWebrtcGlobal::Transition(PWebrtcGlobal::Msg_GetLogRequest__ID, (&(mState)));
218 0 : if ((!(RecvGetLogRequest(mozilla::Move(aRequestId), mozilla::Move(aPattern))))) {
219 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
220 : // Error handled in mozilla::ipc::IPCResult
221 0 : return MsgProcessingError;
222 : }
223 :
224 0 : return MsgProcessed;
225 : }
226 : case PWebrtcGlobal::Msg_ClearLogRequest__ID:
227 : {
228 0 : if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) {
229 0 : mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
230 : }
231 0 : AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_ClearLogRequest", OTHER);
232 :
233 0 : PWebrtcGlobal::Transition(PWebrtcGlobal::Msg_ClearLogRequest__ID, (&(mState)));
234 0 : if ((!(RecvClearLogRequest()))) {
235 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
236 : // Error handled in mozilla::ipc::IPCResult
237 0 : return MsgProcessingError;
238 : }
239 :
240 0 : return MsgProcessed;
241 : }
242 : case PWebrtcGlobal::Msg_SetAecLogging__ID:
243 : {
244 0 : if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) {
245 0 : mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
246 : }
247 0 : AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_SetAecLogging", OTHER);
248 :
249 0 : PickleIterator iter__(msg__);
250 : bool aEnable;
251 :
252 0 : if ((!(Read((&(aEnable)), (&(msg__)), (&(iter__)))))) {
253 0 : FatalError("Error deserializing 'bool'");
254 0 : return MsgValueError;
255 : }
256 : // Sentinel = 'aEnable'
257 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 163837555)))) {
258 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
259 0 : return MsgValueError;
260 : }
261 0 : (msg__).EndRead(iter__, (msg__).type());
262 0 : PWebrtcGlobal::Transition(PWebrtcGlobal::Msg_SetAecLogging__ID, (&(mState)));
263 0 : if ((!(RecvSetAecLogging(mozilla::Move(aEnable))))) {
264 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
265 : // Error handled in mozilla::ipc::IPCResult
266 0 : return MsgProcessingError;
267 : }
268 :
269 0 : return MsgProcessed;
270 : }
271 : case PWebrtcGlobal::Msg_SetDebugMode__ID:
272 : {
273 0 : if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) {
274 0 : mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
275 : }
276 0 : AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_SetDebugMode", OTHER);
277 :
278 0 : PickleIterator iter__(msg__);
279 : int aLevel;
280 :
281 0 : if ((!(Read((&(aLevel)), (&(msg__)), (&(iter__)))))) {
282 0 : FatalError("Error deserializing 'int'");
283 0 : return MsgValueError;
284 : }
285 : // Sentinel = 'aLevel'
286 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1717579975)))) {
287 0 : mozilla::ipc::SentinelReadError("Error deserializing 'int'");
288 0 : return MsgValueError;
289 : }
290 0 : (msg__).EndRead(iter__, (msg__).type());
291 0 : PWebrtcGlobal::Transition(PWebrtcGlobal::Msg_SetDebugMode__ID, (&(mState)));
292 0 : if ((!(RecvSetDebugMode(mozilla::Move(aLevel))))) {
293 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
294 : // Error handled in mozilla::ipc::IPCResult
295 0 : return MsgProcessingError;
296 : }
297 :
298 0 : return MsgProcessed;
299 : }
300 : case PWebrtcGlobal::Reply___delete____ID:
301 : {
302 0 : return MsgProcessed;
303 : }
304 : default:
305 : {
306 0 : return MsgNotKnown;
307 : }
308 : }
309 : }
310 :
311 0 : auto PWebrtcGlobalChild::OnMessageReceived(
312 : const Message& msg__,
313 : Message*& reply__) -> PWebrtcGlobalChild::Result
314 : {
315 0 : return MsgNotKnown;
316 : }
317 :
318 0 : auto PWebrtcGlobalChild::OnCallReceived(
319 : const Message& msg__,
320 : Message*& reply__) -> PWebrtcGlobalChild::Result
321 : {
322 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
323 : return MsgNotKnown;
324 : }
325 :
326 0 : auto PWebrtcGlobalChild::GetProtocolTypeId() -> int32_t
327 : {
328 0 : return PWebrtcGlobalMsgStart;
329 : }
330 :
331 0 : auto PWebrtcGlobalChild::ProtocolName() const -> const char*
332 : {
333 0 : return "PWebrtcGlobalChild";
334 : }
335 :
336 0 : auto PWebrtcGlobalChild::DestroySubtree(ActorDestroyReason why) -> void
337 : {
338 : // Unregister from our manager.
339 0 : Unregister(Id());
340 :
341 : // Reject owning pending promises.
342 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
343 :
344 : // Finally, destroy "us".
345 0 : ActorDestroy(why);
346 0 : }
347 :
348 0 : auto PWebrtcGlobalChild::DeallocSubtree() -> void
349 : {
350 0 : }
351 :
352 0 : auto PWebrtcGlobalChild::Write(
353 : const PWebrtcGlobalChild* v__,
354 : Message* msg__,
355 : bool nullable__) -> void
356 : {
357 : int32_t id;
358 0 : if ((!(v__))) {
359 0 : if ((!(nullable__))) {
360 0 : FatalError("NULL actor value passed to non-nullable param");
361 : }
362 0 : id = 0;
363 : }
364 : else {
365 0 : id = (v__)->Id();
366 0 : if ((1) == (id)) {
367 0 : FatalError("actor has been |delete|d");
368 : }
369 : }
370 :
371 0 : Write(id, msg__);
372 0 : }
373 :
374 0 : auto PWebrtcGlobalChild::Read(
375 : PWebrtcGlobalChild** v__,
376 : const Message* msg__,
377 : PickleIterator* iter__,
378 : bool nullable__) -> bool
379 : {
380 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PWebrtcGlobal", PWebrtcGlobalMsgStart);
381 0 : if ((actor).isNothing()) {
382 0 : return false;
383 : }
384 :
385 0 : (*(v__)) = static_cast<PWebrtcGlobalChild*>((actor).value());
386 0 : return true;
387 : }
388 :
389 :
390 :
391 : } // namespace dom
392 : } // namespace mozilla
|