Line Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
//
// Automatically generated by ipdlc.
// Edit at your own risk
//


#include "mozilla/net/PStunAddrsRequestParent.h"

#include "mozilla/net/PNeckoParent.h"

#include "nsIFile.h"
#include "GeckoProfiler.h"

namespace mozilla {
namespace net {


auto PStunAddrsRequestParent::Recv__delete__() -> mozilla::ipc::IPCResult
{
    return IPC_OK();
}

auto PStunAddrsRequestParent::ActorDestroy(ActorDestroyReason aWhy) -> void
{
}

MOZ_IMPLICIT PStunAddrsRequestParent::PStunAddrsRequestParent() :
    mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
    mLivenessState(mozilla::ipc::LivenessState::Dead)
{
    MOZ_COUNT_CTOR(PStunAddrsRequestParent);
}

PStunAddrsRequestParent::~PStunAddrsRequestParent()
{
    MOZ_COUNT_DTOR(PStunAddrsRequestParent);
}

auto PStunAddrsRequestParent::Manager() const -> PNeckoParent*
{
    return static_cast<PNeckoParent*>(IProtocol::Manager());
}

auto PStunAddrsRequestParent::SendOnStunAddrsAvailable(const NrIceStunAddrArray& iceStunAddrs) -> bool
{
    IPC::Message* msg__ = PStunAddrsRequest::Msg_OnStunAddrsAvailable(Id());

    WriteIPDLParam(msg__, this, iceStunAddrs);
    // Sentinel = 'iceStunAddrs'
    (msg__)->WriteSentinel(2257180203);




    if (mozilla::ipc::LoggingEnabledFor("PStunAddrsRequestParent")) {
        mozilla::ipc::LogMessageForProtocol("PStunAddrsRequestParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PStunAddrsRequest::Msg_OnStunAddrsAvailable", OTHER);
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
        mozilla::ipc::LogicError("Transition error");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PStunAddrsRequestParent::RemoveManagee(
        int32_t aProtocolId,
        IProtocol* aListener) -> void
{
    FatalError("unreached");
    return;
}

auto PStunAddrsRequestParent::OnMessageReceived(const Message& msg__) -> PStunAddrsRequestParent::Result
{
    switch ((msg__).type()) {
    case PStunAddrsRequest::Msg_GetStunAddrs__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PStunAddrsRequestParent")) {
                mozilla::ipc::LogMessageForProtocol("PStunAddrsRequestParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PStunAddrsRequest::Msg_GetStunAddrs", OTHER);

            if ((!(StateTransition(false, (&(mLivenessState)))))) {
                FatalError("Transition error");
                return MsgValueError;
            }
            if ((!(RecvGetStunAddrs()))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PStunAddrsRequest::Msg___delete____ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PStunAddrsRequestParent")) {
                mozilla::ipc::LogMessageForProtocol("PStunAddrsRequestParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PStunAddrsRequest::Msg___delete__", OTHER);

            PickleIterator iter__(msg__);
            PStunAddrsRequestParent* actor;

            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) {
                FatalError("Error deserializing 'PStunAddrsRequestParent'");
                return MsgValueError;
            }
            if ((!((*((&(actor))))))) {
                FatalError("Error deserializing 'PStunAddrsRequestParent'");
                return MsgValueError;
            }
            // Sentinel = 'actor'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'PStunAddrsRequestParent'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__, (msg__).type());
            if ((!(StateTransition(true, (&(mLivenessState)))))) {
                FatalError("Transition error");
                return MsgValueError;
            }
            if ((!(Recv__delete__()))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }


            IProtocol* mgr = (actor)->Manager();
            (actor)->DestroySubtree(Deletion);
            (actor)->DeallocSubtree();
            (mgr)->RemoveManagee(PStunAddrsRequestMsgStart, actor);

            return MsgProcessed;
        }
    default:
        {
            return MsgNotKnown;
        }
    }
}

auto PStunAddrsRequestParent::OnMessageReceived(
        const Message& msg__,
        Message*& reply__) -> PStunAddrsRequestParent::Result
{
    return MsgNotKnown;
}

auto PStunAddrsRequestParent::OnCallReceived(
        const Message& msg__,
        Message*& reply__) -> PStunAddrsRequestParent::Result
{
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
    return MsgNotKnown;
}

auto PStunAddrsRequestParent::GetProtocolTypeId() -> int32_t
{
    return PStunAddrsRequestMsgStart;
}

auto PStunAddrsRequestParent::DestroySubtree(ActorDestroyReason why) -> void
{
    // Unregister from our manager.
    Unregister(Id());

    // Reject owning pending responses.
    (GetIPCChannel())->RejectPendingResponsesForActor(this);

    // Finally, destroy "us".
    ActorDestroy(why);
}

auto PStunAddrsRequestParent::DeallocSubtree() -> void
{
}



} // namespace net
} // namespace mozilla
namespace mozilla {
namespace ipc {
auto IPDLParamTraits<mozilla::net::PStunAddrsRequestParent>::Write(
        IPC::Message* aMsg,
        mozilla::ipc::IProtocol* aActor,
        const paramType& aVar) -> void
{
    int32_t id;
    if ((!(aVar))) {
        id = 0;
    }
    else {
        id = (aVar)->Id();
        if ((1) == (id)) {
            (aActor)->FatalError("actor has been |delete|d");
        }
    }
    WriteIPDLParam(aMsg, aActor, id);
}

auto IPDLParamTraits<mozilla::net::PStunAddrsRequestParent>::Read(
        const IPC::Message* aMsg,
        PickleIterator* aIter,
        mozilla::ipc::IProtocol* aActor,
        paramType* aVar) -> bool
{
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PStunAddrsRequest", PStunAddrsRequestMsgStart);
    if ((actor).isNothing()) {
        return false;
    }

    (*(aVar)) = static_cast<mozilla::net::PStunAddrsRequestParent*>((actor).value());
    return true;
}

} // namespace ipc
} // namespace mozilla