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