Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/docshell/POfflineCacheUpdateChild.h"
8 :
9 : #include "mozilla/dom/PContentChild.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace docshell {
16 :
17 :
18 0 : auto POfflineCacheUpdateChild::ActorDestroy(ActorDestroyReason aWhy) -> void
19 : {
20 0 : }
21 :
22 0 : MOZ_IMPLICIT POfflineCacheUpdateChild::POfflineCacheUpdateChild() :
23 : mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
24 0 : mState(POfflineCacheUpdate::__Dead)
25 : {
26 0 : MOZ_COUNT_CTOR(POfflineCacheUpdateChild);
27 0 : }
28 :
29 0 : POfflineCacheUpdateChild::~POfflineCacheUpdateChild()
30 : {
31 0 : MOZ_COUNT_DTOR(POfflineCacheUpdateChild);
32 0 : }
33 :
34 0 : auto POfflineCacheUpdateChild::Manager() const -> PContentChild*
35 : {
36 0 : return static_cast<PContentChild*>(IProtocol::Manager());
37 : }
38 :
39 0 : auto POfflineCacheUpdateChild::Send__delete__(POfflineCacheUpdateChild* actor) -> bool
40 : {
41 0 : if ((!(actor))) {
42 0 : return false;
43 : }
44 :
45 0 : IPC::Message* msg__ = POfflineCacheUpdate::Msg___delete__((actor)->Id());
46 :
47 0 : (actor)->Write(actor, msg__, false);
48 : // Sentinel = 'actor'
49 0 : (msg__)->WriteSentinel(875202478);
50 :
51 :
52 :
53 0 : if (mozilla::ipc::LoggingEnabledFor("POfflineCacheUpdateChild")) {
54 0 : mozilla::ipc::LogMessageForProtocol("POfflineCacheUpdateChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
55 : }
56 0 : AUTO_PROFILER_LABEL("POfflineCacheUpdate::Msg___delete__", OTHER);
57 0 : POfflineCacheUpdate::Transition(POfflineCacheUpdate::Msg___delete____ID, (&((actor)->mState)));
58 :
59 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
60 :
61 0 : IProtocol* mgr = (actor)->Manager();
62 0 : (actor)->DestroySubtree(Deletion);
63 0 : (actor)->DeallocSubtree();
64 0 : (mgr)->RemoveManagee(POfflineCacheUpdateMsgStart, actor);
65 0 : return sendok__;
66 : }
67 :
68 0 : auto POfflineCacheUpdateChild::RemoveManagee(
69 : int32_t aProtocolId,
70 : ProtocolBase* aListener) -> void
71 : {
72 0 : FatalError("unreached");
73 0 : return;
74 : }
75 :
76 0 : auto POfflineCacheUpdateChild::OnMessageReceived(const Message& msg__) -> POfflineCacheUpdateChild::Result
77 : {
78 0 : switch ((msg__).type()) {
79 : case POfflineCacheUpdate::Reply___delete____ID:
80 : {
81 0 : return MsgProcessed;
82 : }
83 : case POfflineCacheUpdate::Msg_NotifyStateEvent__ID:
84 : {
85 0 : if (mozilla::ipc::LoggingEnabledFor("POfflineCacheUpdateChild")) {
86 0 : mozilla::ipc::LogMessageForProtocol("POfflineCacheUpdateChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
87 : }
88 0 : AUTO_PROFILER_LABEL("POfflineCacheUpdate::Msg_NotifyStateEvent", OTHER);
89 :
90 0 : PickleIterator iter__(msg__);
91 : uint32_t stateEvent;
92 : uint64_t byteProgress;
93 :
94 0 : if ((!(Read((&(stateEvent)), (&(msg__)), (&(iter__)))))) {
95 0 : FatalError("Error deserializing 'uint32_t'");
96 0 : return MsgValueError;
97 : }
98 : // Sentinel = 'stateEvent'
99 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 837383343)))) {
100 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
101 0 : return MsgValueError;
102 : }
103 0 : if ((!(Read((&(byteProgress)), (&(msg__)), (&(iter__)))))) {
104 0 : FatalError("Error deserializing 'uint64_t'");
105 0 : return MsgValueError;
106 : }
107 : // Sentinel = 'byteProgress'
108 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1834843755)))) {
109 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
110 0 : return MsgValueError;
111 : }
112 0 : (msg__).EndRead(iter__, (msg__).type());
113 0 : POfflineCacheUpdate::Transition(POfflineCacheUpdate::Msg_NotifyStateEvent__ID, (&(mState)));
114 0 : if ((!(RecvNotifyStateEvent(mozilla::Move(stateEvent), mozilla::Move(byteProgress))))) {
115 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
116 : // Error handled in mozilla::ipc::IPCResult
117 0 : return MsgProcessingError;
118 : }
119 :
120 0 : return MsgProcessed;
121 : }
122 : case POfflineCacheUpdate::Msg_AssociateDocuments__ID:
123 : {
124 0 : if (mozilla::ipc::LoggingEnabledFor("POfflineCacheUpdateChild")) {
125 0 : mozilla::ipc::LogMessageForProtocol("POfflineCacheUpdateChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
126 : }
127 0 : AUTO_PROFILER_LABEL("POfflineCacheUpdate::Msg_AssociateDocuments", OTHER);
128 :
129 0 : PickleIterator iter__(msg__);
130 0 : nsCString cacheGroupId;
131 0 : nsCString cacheClientId;
132 :
133 0 : if ((!(Read((&(cacheGroupId)), (&(msg__)), (&(iter__)))))) {
134 0 : FatalError("Error deserializing 'nsCString'");
135 0 : return MsgValueError;
136 : }
137 : // Sentinel = 'cacheGroupId'
138 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2677625460)))) {
139 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
140 0 : return MsgValueError;
141 : }
142 0 : if ((!(Read((&(cacheClientId)), (&(msg__)), (&(iter__)))))) {
143 0 : FatalError("Error deserializing 'nsCString'");
144 0 : return MsgValueError;
145 : }
146 : // Sentinel = 'cacheClientId'
147 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4020023385)))) {
148 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
149 0 : return MsgValueError;
150 : }
151 0 : (msg__).EndRead(iter__, (msg__).type());
152 0 : POfflineCacheUpdate::Transition(POfflineCacheUpdate::Msg_AssociateDocuments__ID, (&(mState)));
153 0 : if ((!(RecvAssociateDocuments(mozilla::Move(cacheGroupId), mozilla::Move(cacheClientId))))) {
154 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
155 : // Error handled in mozilla::ipc::IPCResult
156 0 : return MsgProcessingError;
157 : }
158 :
159 0 : return MsgProcessed;
160 : }
161 : case POfflineCacheUpdate::Msg_Finish__ID:
162 : {
163 0 : if (mozilla::ipc::LoggingEnabledFor("POfflineCacheUpdateChild")) {
164 0 : mozilla::ipc::LogMessageForProtocol("POfflineCacheUpdateChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
165 : }
166 0 : AUTO_PROFILER_LABEL("POfflineCacheUpdate::Msg_Finish", OTHER);
167 :
168 0 : PickleIterator iter__(msg__);
169 : bool succeeded;
170 : bool isUpgrade;
171 :
172 0 : if ((!(Read((&(succeeded)), (&(msg__)), (&(iter__)))))) {
173 0 : FatalError("Error deserializing 'bool'");
174 0 : return MsgValueError;
175 : }
176 : // Sentinel = 'succeeded'
177 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1477863910)))) {
178 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
179 0 : return MsgValueError;
180 : }
181 0 : if ((!(Read((&(isUpgrade)), (&(msg__)), (&(iter__)))))) {
182 0 : FatalError("Error deserializing 'bool'");
183 0 : return MsgValueError;
184 : }
185 : // Sentinel = 'isUpgrade'
186 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1409803445)))) {
187 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
188 0 : return MsgValueError;
189 : }
190 0 : (msg__).EndRead(iter__, (msg__).type());
191 0 : POfflineCacheUpdate::Transition(POfflineCacheUpdate::Msg_Finish__ID, (&(mState)));
192 0 : if ((!(RecvFinish(mozilla::Move(succeeded), mozilla::Move(isUpgrade))))) {
193 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
194 : // Error handled in mozilla::ipc::IPCResult
195 0 : return MsgProcessingError;
196 : }
197 :
198 0 : return MsgProcessed;
199 : }
200 : default:
201 : {
202 0 : return MsgNotKnown;
203 : }
204 : }
205 : }
206 :
207 0 : auto POfflineCacheUpdateChild::OnMessageReceived(
208 : const Message& msg__,
209 : Message*& reply__) -> POfflineCacheUpdateChild::Result
210 : {
211 0 : return MsgNotKnown;
212 : }
213 :
214 0 : auto POfflineCacheUpdateChild::OnCallReceived(
215 : const Message& msg__,
216 : Message*& reply__) -> POfflineCacheUpdateChild::Result
217 : {
218 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
219 : return MsgNotKnown;
220 : }
221 :
222 0 : auto POfflineCacheUpdateChild::GetProtocolTypeId() -> int32_t
223 : {
224 0 : return POfflineCacheUpdateMsgStart;
225 : }
226 :
227 0 : auto POfflineCacheUpdateChild::ProtocolName() const -> const char*
228 : {
229 0 : return "POfflineCacheUpdateChild";
230 : }
231 :
232 0 : auto POfflineCacheUpdateChild::DestroySubtree(ActorDestroyReason why) -> void
233 : {
234 : // Unregister from our manager.
235 0 : Unregister(Id());
236 :
237 : // Reject owning pending promises.
238 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
239 :
240 : // Finally, destroy "us".
241 0 : ActorDestroy(why);
242 0 : }
243 :
244 0 : auto POfflineCacheUpdateChild::DeallocSubtree() -> void
245 : {
246 0 : }
247 :
248 0 : auto POfflineCacheUpdateChild::Write(
249 : const POfflineCacheUpdateChild* v__,
250 : Message* msg__,
251 : bool nullable__) -> void
252 : {
253 : int32_t id;
254 0 : if ((!(v__))) {
255 0 : if ((!(nullable__))) {
256 0 : FatalError("NULL actor value passed to non-nullable param");
257 : }
258 0 : id = 0;
259 : }
260 : else {
261 0 : id = (v__)->Id();
262 0 : if ((1) == (id)) {
263 0 : FatalError("actor has been |delete|d");
264 : }
265 : }
266 :
267 0 : Write(id, msg__);
268 0 : }
269 :
270 0 : auto POfflineCacheUpdateChild::Read(
271 : POfflineCacheUpdateChild** v__,
272 : const Message* msg__,
273 : PickleIterator* iter__,
274 : bool nullable__) -> bool
275 : {
276 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "POfflineCacheUpdate", POfflineCacheUpdateMsgStart);
277 0 : if ((actor).isNothing()) {
278 0 : return false;
279 : }
280 :
281 0 : (*(v__)) = static_cast<POfflineCacheUpdateChild*>((actor).value());
282 0 : return true;
283 : }
284 :
285 :
286 :
287 : } // namespace docshell
288 : } // namespace mozilla
|