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