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/ESendType.h"
8#include "mc/deps/nether_net/ESessionError.h"
9#include "mc/deps/nether_net/SignalingChannelId.h"
10#include "mc/external/webrtc/PeerConnectionInterface.h"
11#include "mc/external/webrtc/PeerConnectionObserver.h"
12#include "mc/external/webrtc/scoped_refptr.h"
13
14// auto generated forward declare list
15// clang-format off
16namespace NetherNet { class CandidateAdd; }
17namespace NetherNet { class ConnectResponse; }
18namespace NetherNet { class NetworkSessionManager; }
19namespace NetherNet { struct NetworkID; }
20namespace cricket { class Candidate; }
21namespace webrtc { class DataChannelInterface; }
22namespace webrtc { class IceCandidateInterface; }
23namespace webrtc { class SessionDescriptionInterface; }
24namespace webrtc { class StatsReport; }
25// clang-format on
26
27namespace NetherNet {
28
30public:
31 // NetworkSession inner types define
32 enum class Direction : int {
33 Incoming = 0,
34 Outgoing = 1,
35 };
36
37 enum class ENegotiationState : int {
38 None = 0,
39 WaitingForResponse = 1,
40 WaitingForAccept = 2,
41 ICEProcessing = 3,
42 };
43
44public:
45 // member variables
46 // 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
149
150 MCNAPI ::NetherNet::ESessionError IsDeadSession(::std::chrono::seconds negotiationTimeout);
151
153
155
156 MCNAPI void OnStatsRequestComplete(::std::vector<::webrtc::StatsReport const*> const& reports);
157
158 MCNAPI void ProcessSignal(::NetherNet::CandidateAdd const& signal);
159
160 MCNAPI void ProcessSignal(::NetherNet::ConnectResponse const& signal);
161
162 MCNAPI void SendPacket(char const* pbData, uint cbData, ::NetherNet::ESendType eSendType);
163
165
167
169 // NOLINTEND
170
171public:
172 // constructor thunks
173 // NOLINTBEGIN
175 // NOLINTEND
176
177public:
178 // destructor thunk
179 // NOLINTBEGIN
180 MCNAPI void $dtor();
181 // NOLINTEND
182
183public:
184 // virtual function thunks
185 // NOLINTBEGIN
186 MCNAPI void $OnSignalingChange(::webrtc::PeerConnectionInterface::SignalingState);
187
189
191
192 MCNAPI void $OnIceConnectionChange(::webrtc::PeerConnectionInterface::IceConnectionState new_state);
193
194 MCNAPI void $OnConnectionChange(::webrtc::PeerConnectionInterface::PeerConnectionState new_state);
195
196 MCNAPI void $OnIceGatheringChange(::webrtc::PeerConnectionInterface::IceGatheringState new_state);
197
199
200 MCNAPI void $OnIceCandidatesRemoved(::std::vector<::cricket::Candidate> const&);
201
203 // NOLINTEND
204
205public:
206 // vftables
207 // NOLINTBEGIN
208 MCNAPI static void** $vftableForContextProxy();
209
210 MCNAPI static void** $vftableForPeerConnectionObserver();
211 // NOLINTEND
212};
213
214} // 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:29
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 SendPacket(char const *pbData, uint cbData, ::NetherNet::ESendType eSendType)
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 InitializeOutgoing(::NetherNet::NetworkID remoteID)
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:17
Definition ctx.h:5
Definition Alias.h:14