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