Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/net/PChannelDiverterParent.h"
8 :
9 : #include "mozilla/net/PFTPChannelParent.h"
10 : #include "mozilla/net/PHttpChannelParent.h"
11 : #include "mozilla/net/PNeckoParent.h"
12 :
13 : #include "nsIFile.h"
14 : #include "GeckoProfiler.h"
15 :
16 : namespace mozilla {
17 : namespace net {
18 :
19 :
20 :
21 0 : MOZ_IMPLICIT PChannelDiverterParent::PChannelDiverterParent() :
22 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
23 0 : mState(PChannelDiverter::__Dead)
24 : {
25 0 : MOZ_COUNT_CTOR(PChannelDiverterParent);
26 0 : }
27 :
28 0 : PChannelDiverterParent::~PChannelDiverterParent()
29 : {
30 0 : MOZ_COUNT_DTOR(PChannelDiverterParent);
31 0 : }
32 :
33 0 : auto PChannelDiverterParent::Manager() const -> PNeckoParent*
34 : {
35 0 : return static_cast<PNeckoParent*>(IProtocol::Manager());
36 : }
37 :
38 0 : auto PChannelDiverterParent::Send__delete__(PChannelDiverterParent* actor) -> bool
39 : {
40 0 : if ((!(actor))) {
41 0 : return false;
42 : }
43 :
44 0 : IPC::Message* msg__ = PChannelDiverter::Msg___delete__((actor)->Id());
45 :
46 0 : (actor)->Write(actor, msg__, false);
47 : // Sentinel = 'actor'
48 0 : (msg__)->WriteSentinel(875202478);
49 :
50 :
51 :
52 0 : if (mozilla::ipc::LoggingEnabledFor("PChannelDiverterParent")) {
53 0 : mozilla::ipc::LogMessageForProtocol("PChannelDiverterParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
54 : }
55 0 : AUTO_PROFILER_LABEL("PChannelDiverter::Msg___delete__", OTHER);
56 0 : PChannelDiverter::Transition(PChannelDiverter::Msg___delete____ID, (&((actor)->mState)));
57 :
58 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
59 :
60 0 : IProtocol* mgr = (actor)->Manager();
61 0 : (actor)->DestroySubtree(Deletion);
62 0 : (actor)->DeallocSubtree();
63 0 : (mgr)->RemoveManagee(PChannelDiverterMsgStart, actor);
64 0 : return sendok__;
65 : }
66 :
67 0 : auto PChannelDiverterParent::RemoveManagee(
68 : int32_t aProtocolId,
69 : ProtocolBase* aListener) -> void
70 : {
71 0 : FatalError("unreached");
72 0 : return;
73 : }
74 :
75 0 : auto PChannelDiverterParent::OnMessageReceived(const Message& msg__) -> PChannelDiverterParent::Result
76 : {
77 0 : switch ((msg__).type()) {
78 : case PChannelDiverter::Reply___delete____ID:
79 : {
80 0 : return MsgProcessed;
81 : }
82 : default:
83 : {
84 0 : return MsgNotKnown;
85 : }
86 : }
87 : }
88 :
89 0 : auto PChannelDiverterParent::OnMessageReceived(
90 : const Message& msg__,
91 : Message*& reply__) -> PChannelDiverterParent::Result
92 : {
93 0 : return MsgNotKnown;
94 : }
95 :
96 0 : auto PChannelDiverterParent::OnCallReceived(
97 : const Message& msg__,
98 : Message*& reply__) -> PChannelDiverterParent::Result
99 : {
100 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
101 : return MsgNotKnown;
102 : }
103 :
104 0 : auto PChannelDiverterParent::GetProtocolTypeId() -> int32_t
105 : {
106 0 : return PChannelDiverterMsgStart;
107 : }
108 :
109 0 : auto PChannelDiverterParent::ProtocolName() const -> const char*
110 : {
111 0 : return "PChannelDiverterParent";
112 : }
113 :
114 0 : auto PChannelDiverterParent::DestroySubtree(ActorDestroyReason why) -> void
115 : {
116 : // Unregister from our manager.
117 0 : Unregister(Id());
118 :
119 : // Reject owning pending promises.
120 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
121 :
122 : // Finally, destroy "us".
123 0 : ActorDestroy(why);
124 0 : }
125 :
126 0 : auto PChannelDiverterParent::DeallocSubtree() -> void
127 : {
128 0 : }
129 :
130 0 : auto PChannelDiverterParent::Write(
131 : const PChannelDiverterParent* v__,
132 : Message* msg__,
133 : bool nullable__) -> void
134 : {
135 : int32_t id;
136 0 : if ((!(v__))) {
137 0 : if ((!(nullable__))) {
138 0 : FatalError("NULL actor value passed to non-nullable param");
139 : }
140 0 : id = 0;
141 : }
142 : else {
143 0 : id = (v__)->Id();
144 0 : if ((1) == (id)) {
145 0 : FatalError("actor has been |delete|d");
146 : }
147 : }
148 :
149 0 : Write(id, msg__);
150 0 : }
151 :
152 0 : auto PChannelDiverterParent::Read(
153 : PChannelDiverterParent** v__,
154 : const Message* msg__,
155 : PickleIterator* iter__,
156 : bool nullable__) -> bool
157 : {
158 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PChannelDiverter", PChannelDiverterMsgStart);
159 0 : if ((actor).isNothing()) {
160 0 : return false;
161 : }
162 :
163 0 : (*(v__)) = static_cast<PChannelDiverterParent*>((actor).value());
164 0 : return true;
165 : }
166 :
167 :
168 :
169 : } // namespace net
170 : } // namespace mozilla
|