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