LeviLamina
Loading...
Searching...
No Matches
NetworkSession.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/nether_net/ContextProxy.h"
7#include "mc/deps/nether_net/ESessionError.h"
8#include "mc/deps/nether_net/SignalingChannelId.h"
9#include "mc/external/webrtc/PeerConnectionInterface.h"
10#include "mc/external/webrtc/PeerConnectionObserver.h"
11#include "mc/external/webrtc/scoped_refptr.h"
12
13// auto generated forward declare list
14// clang-format off
15namespace NetherNet { class CandidateAdd; }
16namespace NetherNet { class ConnectResponse; }
17namespace NetherNet { class NetworkSessionManager; }
18namespace NetherNet { struct NetworkID; }
19namespace cricket { class Candidate; }
20namespace webrtc { class DataChannelInterface; }
21namespace webrtc { class IceCandidateInterface; }
22namespace webrtc { class SessionDescriptionInterface; }
23namespace webrtc { class StatsReport; }
24// clang-format on
25
26namespace NetherNet {
27
29public:
30 // NetworkSession inner types define
31 enum class Direction : int {
32 Incoming = 0,
33 Outgoing = 1,
34 };
35
36 enum class ENegotiationState : int {
37 None = 0,
38 WaitingForResponse = 1,
39 WaitingForAccept = 2,
40 ICEProcessing = 3,
41 };
42
43public:
44 // member variables
45 // NOLINTBEGIN
90 // NOLINTEND
91
92public:
93 // prevent constructor by default
94 NetworkSession& operator=(NetworkSession const&);
97
98public:
99 // virtual functions
100 // NOLINTBEGIN
101 // vIndex: 0
102 virtual ~NetworkSession() /*override*/;
103
104 // vIndex: 1
105 virtual void OnSignalingChange(::webrtc::PeerConnectionInterface::SignalingState) /*override*/;
106
107 // vIndex: 4
108 virtual void OnDataChannel(::webrtc::scoped_refptr<::webrtc::DataChannelInterface> pDataChannel) /*override*/;
109
110 // vIndex: 5
111 virtual void OnRenegotiationNeeded() /*override*/;
112
113 // vIndex: 7
114 virtual void OnIceConnectionChange(::webrtc::PeerConnectionInterface::IceConnectionState new_state) /*override*/;
115
116 // vIndex: 9
117 virtual void OnConnectionChange(::webrtc::PeerConnectionInterface::PeerConnectionState new_state) /*override*/;
118
119 // vIndex: 10
120 virtual void OnIceGatheringChange(::webrtc::PeerConnectionInterface::IceGatheringState new_state) /*override*/;
121
122 // vIndex: 11
123 virtual void OnIceCandidate(::webrtc::IceCandidateInterface const* candidate) /*override*/;
124
125 // vIndex: 13
126 virtual void OnIceCandidatesRemoved(::std::vector<::cricket::Candidate> const&) /*override*/;
127
128 // vIndex: 14
129 virtual void OnIceConnectionReceivingChange(bool) /*override*/;
130 // NOLINTEND
131
132public:
133 // member functions
134 // NOLINTBEGIN
136
137 MCNAPI void CheckUpdateStats();
138
139 MCNAPI void EnterNewNegotiationState(::NetherNet::NetworkSession::ENegotiationState negotiationState);
140
141 MCNAPI ::NetherNet::ESessionError InitializeIncoming(
142 ::NetherNet::NetworkID remoteID,
143 uint64 const& connectionID,
144 ::std::unique_ptr<::webrtc::SessionDescriptionInterface> pSessionDescription,
145 ::NetherNet::SignalingChannelId preference
146 );
147
148 MCNAPI ::NetherNet::ESessionError IsDeadSession(::std::chrono::seconds negotiationTimeout);
149
151
153
154 MCNAPI void OnStatsRequestComplete(::std::vector<::webrtc::StatsReport const*> const& reports);
155
156 MCNAPI void ProcessSignal(::NetherNet::CandidateAdd const& signal);
157
158 MCNAPI void ProcessSignal(::NetherNet::ConnectResponse const& signal);
159
161
163
165 // NOLINTEND
166
167public:
168 // constructor thunks
169 // NOLINTBEGIN
171 // NOLINTEND
172
173public:
174 // destructor thunk
175 // NOLINTBEGIN
176 MCNAPI void $dtor();
177 // NOLINTEND
178
179public:
180 // virtual function thunks
181 // NOLINTBEGIN
182 MCNAPI void $OnSignalingChange(::webrtc::PeerConnectionInterface::SignalingState);
183
185
187
188 MCNAPI void $OnIceConnectionChange(::webrtc::PeerConnectionInterface::IceConnectionState new_state);
189
190 MCNAPI void $OnConnectionChange(::webrtc::PeerConnectionInterface::PeerConnectionState new_state);
191
192 MCNAPI void $OnIceGatheringChange(::webrtc::PeerConnectionInterface::IceGatheringState new_state);
193
195
196 MCNAPI void $OnIceCandidatesRemoved(::std::vector<::cricket::Candidate> const&);
197
199 // NOLINTEND
200
201public:
202 // vftables
203 // NOLINTBEGIN
204 MCNAPI static void** $vftableForContextProxy();
205
206 MCNAPI static void** $vftableForPeerConnectionObserver();
207 // NOLINTEND
208};
209
210} // namespace NetherNet
Definition Direction.h:5
Definition CandidateAdd.h:7
Definition ConnectResponse.h:7
Definition ContextProxy.h:18
Definition NetworkSessionManager.h:27
Definition NetworkSession.h:28
MCAPI void $OnConnectionChange(::webrtc::PeerConnectionInterface::PeerConnectionState new_state)
MCAPI void ProcessSignal(::NetherNet::CandidateAdd const &signal)
MCAPI void $OnRenegotiationNeeded()
MCAPI::NetherNet::ESessionError IsDeadSession(::std::chrono::seconds negotiationTimeout)
MCAPI void CheckSendReliableData()
MCAPI void CheckUpdateStats()
MCAPI void $OnIceConnectionReceivingChange(bool)
MCAPI void $OnIceCandidatesRemoved(::std::vector<::cricket::Candidate > const &)
MCAPI void $OnSignalingChange(::webrtc::PeerConnectionInterface::SignalingState)
MCAPI void $OnIceConnectionChange(::webrtc::PeerConnectionInterface::IceConnectionState new_state)
MCAPI void OnStatsRequestComplete(::std::vector<::webrtc::StatsReport const * > const &reports)
MCAPI void UpdateSessionActivity()
MCAPI void UpdateDataChannelStates()
static MCAPI void ** $vftableForPeerConnectionObserver()
static MCAPI void ** $vftableForContextProxy()
MCAPI void MaybeProcessIceCandidates()
MCAPI void * $ctor(::NetherNet::ContextProxy const &ctx, ::NetherNet::NetworkSessionManager &manager)
MCAPI::NetherNet::ESessionError InitializeIncoming(::NetherNet::NetworkID remoteID, uint64 const &connectionID, ::std::unique_ptr<::webrtc::SessionDescriptionInterface > pSessionDescription, ::NetherNet::SignalingChannelId preference)
MCAPI void $OnIceCandidate(::webrtc::IceCandidateInterface const *candidate)
MCAPI NetworkSession(::NetherNet::ContextProxy const &ctx, ::NetherNet::NetworkSessionManager &manager)
MCAPI void $OnIceGatheringChange(::webrtc::PeerConnectionInterface::IceGatheringState new_state)
MCAPI void TrySendSessionResponse()
MCAPI void ProcessSignal(::NetherNet::ConnectResponse const &signal)
MCAPI void $OnDataChannel(::webrtc::scoped_refptr<::webrtc::DataChannelInterface > pDataChannel)
MCAPI void EnterNewNegotiationState(::NetherNet::NetworkSession::ENegotiationState negotiationState)
Definition IceCandidateInterface.h:12
Definition PeerConnectionObserver.h:22
Definition scoped_refptr.h:8
Definition NetworkID.h:21
Definition ctx.h:5
Definition Alias.h:14