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
84 // NOLINTEND
85
86public:
87 // prevent constructor by default
88 NetworkSession& operator=(NetworkSession const&);
91
92public:
93 // virtual functions
94 // NOLINTBEGIN
95 // vIndex: 0
96 virtual ~NetworkSession() /*override*/;
97
98 // vIndex: 1
99 virtual void OnSignalingChange(::webrtc::PeerConnectionInterface::SignalingState) /*override*/;
100
101 // vIndex: 4
102 virtual void OnDataChannel(::webrtc::scoped_refptr<::webrtc::DataChannelInterface> pDataChannel) /*override*/;
103
104 // vIndex: 5
105 virtual void OnRenegotiationNeeded() /*override*/;
106
107 // vIndex: 7
108 virtual void OnIceConnectionChange(::webrtc::PeerConnectionInterface::IceConnectionState new_state) /*override*/;
109
110 // vIndex: 9
111 virtual void OnConnectionChange(::webrtc::PeerConnectionInterface::PeerConnectionState new_state) /*override*/;
112
113 // vIndex: 10
114 virtual void OnIceGatheringChange(::webrtc::PeerConnectionInterface::IceGatheringState new_state) /*override*/;
115
116 // vIndex: 11
117 virtual void OnIceCandidate(::webrtc::IceCandidateInterface const* candidate) /*override*/;
118
119 // vIndex: 13
120 virtual void OnIceCandidatesRemoved(::std::vector<::cricket::Candidate> const&) /*override*/;
121
122 // vIndex: 14
123 virtual void OnIceConnectionReceivingChange(bool) /*override*/;
124 // NOLINTEND
125
126public:
127 // member functions
128 // NOLINTBEGIN
130
131 MCNAPI void CheckUpdateStats();
132
133 MCNAPI void EnterNewNegotiationState(::NetherNet::NetworkSession::ENegotiationState negotiationState);
134
135 MCNAPI ::NetherNet::ESessionError InitializeIncoming(
136 ::NetherNet::NetworkID remoteID,
137 uint64 const& connectionID,
138 ::std::unique_ptr<::webrtc::SessionDescriptionInterface> pSessionDescription,
139 ::NetherNet::SignalingChannelId preference
140 );
141
143
144 MCNAPI ::NetherNet::ESessionError IsDeadSession(::std::chrono::seconds negotiationTimeout);
145
147
149
150 MCNAPI void OnStatsRequestComplete(::std::vector<::webrtc::StatsReport const*> const& reports);
151
152 MCNAPI void ProcessSignal(::NetherNet::CandidateAdd const& signal);
153
154 MCNAPI void ProcessSignal(::NetherNet::ConnectResponse const& signal);
155
156 MCNAPI void SendPacket(char const* pbData, uint cbData, ::NetherNet::ESendType eSendType);
157
159
161
163 // NOLINTEND
164
165public:
166 // constructor thunks
167 // NOLINTBEGIN
169 // NOLINTEND
170
171public:
172 // destructor thunk
173 // NOLINTBEGIN
174 MCNAPI void $dtor();
175 // NOLINTEND
176
177public:
178 // virtual function thunks
179 // NOLINTBEGIN
180 MCNAPI void $OnSignalingChange(::webrtc::PeerConnectionInterface::SignalingState);
181
183
185
186 MCNAPI void $OnIceConnectionChange(::webrtc::PeerConnectionInterface::IceConnectionState new_state);
187
188 MCNAPI void $OnConnectionChange(::webrtc::PeerConnectionInterface::PeerConnectionState new_state);
189
190 MCNAPI void $OnIceGatheringChange(::webrtc::PeerConnectionInterface::IceGatheringState new_state);
191
193
194 MCNAPI void $OnIceCandidatesRemoved(::std::vector<::cricket::Candidate> const&);
195
197 // NOLINTEND
198
199public:
200 // vftables
201 // NOLINTBEGIN
202 MCNAPI static void** $vftableForContextProxy();
203
204 MCNAPI static void** $vftableForPeerConnectionObserver();
205 // NOLINTEND
206};
207
208} // namespace NetherNet
Definition Direction.h:5
Definition CandidateAdd.h:7
Definition ConnectResponse.h:7
Definition ContextProxy.h:18
Definition NetworkSessionManager.h:28
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:12
Definition ctx.h:5
Definition Alias.h:14