Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/ipc/PPendingIPCBlobChild.h"
8 :
9 : #include "mozilla/ipc/PBackgroundChild.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace ipc {
16 :
17 :
18 0 : auto PPendingIPCBlobChild::ActorDestroy(ActorDestroyReason aWhy) -> void
19 : {
20 0 : }
21 :
22 0 : MOZ_IMPLICIT PPendingIPCBlobChild::PPendingIPCBlobChild() :
23 : mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
24 0 : mState(PPendingIPCBlob::__Dead)
25 : {
26 0 : MOZ_COUNT_CTOR(PPendingIPCBlobChild);
27 0 : }
28 :
29 0 : PPendingIPCBlobChild::~PPendingIPCBlobChild()
30 : {
31 0 : MOZ_COUNT_DTOR(PPendingIPCBlobChild);
32 0 : }
33 :
34 0 : auto PPendingIPCBlobChild::Manager() const -> PBackgroundChild*
35 : {
36 0 : return static_cast<PBackgroundChild*>(IProtocol::Manager());
37 : }
38 :
39 0 : auto PPendingIPCBlobChild::Send__delete__(
40 : PPendingIPCBlobChild* actor,
41 : const PendingIPCBlobData& aData) -> bool
42 : {
43 0 : if ((!(actor))) {
44 0 : return false;
45 : }
46 :
47 0 : IPC::Message* msg__ = PPendingIPCBlob::Msg___delete__((actor)->Id());
48 :
49 0 : (actor)->Write(actor, msg__, false);
50 : // Sentinel = 'actor'
51 0 : (msg__)->WriteSentinel(875202478);
52 0 : (actor)->Write(aData, msg__);
53 : // Sentinel = 'aData'
54 0 : (msg__)->WriteSentinel(3285075324);
55 :
56 :
57 :
58 0 : if (mozilla::ipc::LoggingEnabledFor("PPendingIPCBlobChild")) {
59 0 : mozilla::ipc::LogMessageForProtocol("PPendingIPCBlobChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
60 : }
61 0 : AUTO_PROFILER_LABEL("PPendingIPCBlob::Msg___delete__", OTHER);
62 0 : PPendingIPCBlob::Transition(PPendingIPCBlob::Msg___delete____ID, (&((actor)->mState)));
63 :
64 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
65 :
66 0 : IProtocol* mgr = (actor)->Manager();
67 0 : (actor)->DestroySubtree(Deletion);
68 0 : (actor)->DeallocSubtree();
69 0 : (mgr)->RemoveManagee(PPendingIPCBlobMsgStart, actor);
70 0 : return sendok__;
71 : }
72 :
73 0 : auto PPendingIPCBlobChild::RemoveManagee(
74 : int32_t aProtocolId,
75 : ProtocolBase* aListener) -> void
76 : {
77 0 : FatalError("unreached");
78 0 : return;
79 : }
80 :
81 0 : auto PPendingIPCBlobChild::OnMessageReceived(const Message& msg__) -> PPendingIPCBlobChild::Result
82 : {
83 0 : switch ((msg__).type()) {
84 : case PPendingIPCBlob::Reply___delete____ID:
85 : {
86 0 : return MsgProcessed;
87 : }
88 : default:
89 : {
90 0 : return MsgNotKnown;
91 : }
92 : }
93 : }
94 :
95 0 : auto PPendingIPCBlobChild::OnMessageReceived(
96 : const Message& msg__,
97 : Message*& reply__) -> PPendingIPCBlobChild::Result
98 : {
99 0 : return MsgNotKnown;
100 : }
101 :
102 0 : auto PPendingIPCBlobChild::OnCallReceived(
103 : const Message& msg__,
104 : Message*& reply__) -> PPendingIPCBlobChild::Result
105 : {
106 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
107 : return MsgNotKnown;
108 : }
109 :
110 0 : auto PPendingIPCBlobChild::GetProtocolTypeId() -> int32_t
111 : {
112 0 : return PPendingIPCBlobMsgStart;
113 : }
114 :
115 0 : auto PPendingIPCBlobChild::ProtocolName() const -> const char*
116 : {
117 0 : return "PPendingIPCBlobChild";
118 : }
119 :
120 0 : auto PPendingIPCBlobChild::DestroySubtree(ActorDestroyReason why) -> void
121 : {
122 : // Unregister from our manager.
123 0 : Unregister(Id());
124 :
125 : // Reject owning pending promises.
126 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
127 :
128 : // Finally, destroy "us".
129 0 : ActorDestroy(why);
130 0 : }
131 :
132 0 : auto PPendingIPCBlobChild::DeallocSubtree() -> void
133 : {
134 0 : }
135 :
136 0 : auto PPendingIPCBlobChild::Write(
137 : const PendingIPCFileData& v__,
138 : Message* msg__) -> void
139 : {
140 0 : Write((v__).name(), msg__);
141 : // Sentinel = 'name'
142 0 : (msg__)->WriteSentinel(15034981);
143 0 : Write((v__).lastModified(), msg__);
144 : // Sentinel = 'lastModified'
145 0 : (msg__)->WriteSentinel(3456113257);
146 0 : }
147 :
148 0 : auto PPendingIPCBlobChild::Read(
149 : PendingIPCFileData* v__,
150 : const Message* msg__,
151 : PickleIterator* iter__) -> bool
152 : {
153 0 : if ((!(Read((&((v__)->name())), msg__, iter__)))) {
154 0 : FatalError("Error deserializing 'name' (nsString) member of 'PendingIPCFileData'");
155 0 : return false;
156 : }
157 : // Sentinel = 'name'
158 0 : if ((!((msg__)->ReadSentinel(iter__, 15034981)))) {
159 0 : mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsString) member of 'PendingIPCFileData'");
160 0 : return false;
161 : }
162 0 : if ((!(Read((&((v__)->lastModified())), msg__, iter__)))) {
163 0 : FatalError("Error deserializing 'lastModified' (int64_t) member of 'PendingIPCFileData'");
164 0 : return false;
165 : }
166 : // Sentinel = 'lastModified'
167 0 : if ((!((msg__)->ReadSentinel(iter__, 3456113257)))) {
168 0 : mozilla::ipc::SentinelReadError("Error deserializing 'lastModified' (int64_t) member of 'PendingIPCFileData'");
169 0 : return false;
170 : }
171 0 : return true;
172 : }
173 :
174 0 : auto PPendingIPCBlobChild::Write(
175 : const PendingIPCFileUnion& v__,
176 : Message* msg__) -> void
177 : {
178 : typedef PendingIPCFileUnion type__;
179 0 : Write(int((v__).type()), msg__);
180 : // Sentinel = 'PendingIPCFileUnion'
181 0 : (msg__)->WriteSentinel(1596690423);
182 :
183 0 : switch ((v__).type()) {
184 : case type__::Tvoid_t:
185 : {
186 0 : Write((v__).get_void_t(), msg__);
187 : // Sentinel = 'Tvoid_t'
188 0 : (msg__)->WriteSentinel(3041273328);
189 0 : return;
190 : }
191 : case type__::TPendingIPCFileData:
192 : {
193 0 : Write((v__).get_PendingIPCFileData(), msg__);
194 : // Sentinel = 'TPendingIPCFileData'
195 0 : (msg__)->WriteSentinel(1894431344);
196 0 : return;
197 : }
198 : default:
199 : {
200 0 : FatalError("unknown union type");
201 0 : return;
202 : }
203 : }
204 : }
205 :
206 0 : auto PPendingIPCBlobChild::Read(
207 : PendingIPCFileUnion* v__,
208 : const Message* msg__,
209 : PickleIterator* iter__) -> bool
210 : {
211 : typedef PendingIPCFileUnion type__;
212 : int type;
213 0 : if ((!(Read((&(type)), msg__, iter__)))) {
214 0 : mozilla::ipc::UnionTypeReadError("PendingIPCFileUnion");
215 0 : return false;
216 : }
217 : // Sentinel = 'PendingIPCFileUnion'
218 0 : if ((!((msg__)->ReadSentinel(iter__, 1596690423)))) {
219 0 : mozilla::ipc::SentinelReadError("PendingIPCFileUnion");
220 0 : return false;
221 : }
222 :
223 0 : switch (type) {
224 : case type__::Tvoid_t:
225 : {
226 : void_t tmp = void_t();
227 0 : (*(v__)) = tmp;
228 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
229 0 : FatalError("Error deserializing Union type");
230 0 : return false;
231 : }
232 : // Sentinel = 'Tvoid_t'
233 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
234 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
235 0 : return false;
236 : }
237 0 : return true;
238 : }
239 : case type__::TPendingIPCFileData:
240 : {
241 0 : PendingIPCFileData tmp = PendingIPCFileData();
242 0 : (*(v__)) = tmp;
243 0 : if ((!(Read((&((v__)->get_PendingIPCFileData())), msg__, iter__)))) {
244 0 : FatalError("Error deserializing Union type");
245 0 : return false;
246 : }
247 : // Sentinel = 'TPendingIPCFileData'
248 0 : if ((!((msg__)->ReadSentinel(iter__, 1894431344)))) {
249 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
250 0 : return false;
251 : }
252 0 : return true;
253 : }
254 : default:
255 : {
256 0 : FatalError("unknown union type");
257 0 : return false;
258 : }
259 : }
260 : }
261 :
262 0 : auto PPendingIPCBlobChild::Write(
263 : const PendingIPCBlobData& v__,
264 : Message* msg__) -> void
265 : {
266 0 : Write((v__).type(), msg__);
267 : // Sentinel = 'type'
268 0 : (msg__)->WriteSentinel(2982068540);
269 0 : Write((v__).size(), msg__);
270 : // Sentinel = 'size'
271 0 : (msg__)->WriteSentinel(931048223);
272 0 : Write((v__).file(), msg__);
273 : // Sentinel = 'file'
274 0 : (msg__)->WriteSentinel(224874390);
275 0 : }
276 :
277 0 : auto PPendingIPCBlobChild::Read(
278 : PendingIPCBlobData* v__,
279 : const Message* msg__,
280 : PickleIterator* iter__) -> bool
281 : {
282 0 : if ((!(Read((&((v__)->type())), msg__, iter__)))) {
283 0 : FatalError("Error deserializing 'type' (nsString) member of 'PendingIPCBlobData'");
284 0 : return false;
285 : }
286 : // Sentinel = 'type'
287 0 : if ((!((msg__)->ReadSentinel(iter__, 2982068540)))) {
288 0 : mozilla::ipc::SentinelReadError("Error deserializing 'type' (nsString) member of 'PendingIPCBlobData'");
289 0 : return false;
290 : }
291 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
292 0 : FatalError("Error deserializing 'size' (uint64_t) member of 'PendingIPCBlobData'");
293 0 : return false;
294 : }
295 : // Sentinel = 'size'
296 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
297 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (uint64_t) member of 'PendingIPCBlobData'");
298 0 : return false;
299 : }
300 0 : if ((!(Read((&((v__)->file())), msg__, iter__)))) {
301 0 : FatalError("Error deserializing 'file' (PendingIPCFileUnion) member of 'PendingIPCBlobData'");
302 0 : return false;
303 : }
304 : // Sentinel = 'file'
305 0 : if ((!((msg__)->ReadSentinel(iter__, 224874390)))) {
306 0 : mozilla::ipc::SentinelReadError("Error deserializing 'file' (PendingIPCFileUnion) member of 'PendingIPCBlobData'");
307 0 : return false;
308 : }
309 0 : return true;
310 : }
311 :
312 0 : auto PPendingIPCBlobChild::Write(
313 : const PPendingIPCBlobChild* v__,
314 : Message* msg__,
315 : bool nullable__) -> void
316 : {
317 : int32_t id;
318 0 : if ((!(v__))) {
319 0 : if ((!(nullable__))) {
320 0 : FatalError("NULL actor value passed to non-nullable param");
321 : }
322 0 : id = 0;
323 : }
324 : else {
325 0 : id = (v__)->Id();
326 0 : if ((1) == (id)) {
327 0 : FatalError("actor has been |delete|d");
328 : }
329 : }
330 :
331 0 : Write(id, msg__);
332 0 : }
333 :
334 0 : auto PPendingIPCBlobChild::Read(
335 : PPendingIPCBlobChild** v__,
336 : const Message* msg__,
337 : PickleIterator* iter__,
338 : bool nullable__) -> bool
339 : {
340 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PPendingIPCBlob", PPendingIPCBlobMsgStart);
341 0 : if ((actor).isNothing()) {
342 0 : return false;
343 : }
344 :
345 0 : (*(v__)) = static_cast<PPendingIPCBlobChild*>((actor).value());
346 0 : return true;
347 : }
348 :
349 :
350 :
351 : } // namespace ipc
352 : } // namespace mozilla
|