LeviLamina
Loading...
Searching...
No Matches
ServerNegotiator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/nether_net/ESessionError.h"
7#include "mc/deps/nether_net/PeerConnectionNegotiator.h"
8#include "mc/external/webrtc/PeerConnectionInterface.h"
9#include "mc/external/webrtc/RTCErrorOr.h"
10#include "mc/external/webrtc/scoped_refptr.h"
11#include "mc/platform/ErrorInfo.h"
12#include "mc/platform/Result.h"
13#include "mc/platform/brstd/move_only_function.h"
14
15// auto generated forward declare list
16// clang-format off
17namespace NetherNet { class CandidateAdd; }
18namespace NetherNet { class ConnectError; }
19namespace NetherNet { class ConnectRequest; }
20namespace NetherNet { class ConnectResponse; }
21namespace NetherNet { class ContextProxy; }
22namespace NetherNet { class PeerConnectionObserver; }
23namespace webrtc { class IceCandidate; }
24namespace webrtc { class PeerConnectionFactory; }
25namespace webrtc { class PeerConnectionInterface; }
26namespace webrtc { class RTCError; }
27namespace webrtc { class SessionDescriptionInterface; }
28// clang-format on
29
30namespace NetherNet {
31
32class ServerNegotiator : public ::NetherNet::PeerConnectionNegotiator {
33public:
34 // member variables
35 // NOLINTBEGIN
40 // NOLINTEND
41
42public:
43 // prevent constructor by default
44 ServerNegotiator& operator=(ServerNegotiator const&);
45 ServerNegotiator(ServerNegotiator const&);
46 ServerNegotiator();
47
48public:
49 // virtual functions
50 // NOLINTBEGIN
51 virtual void createAnswer(
53 ::NetherNet::ConnectRequest const& offer,
56 )>&& onComplete
57 );
58
59 virtual void _onSetRemoteDescription(::webrtc::RTCError result) /*override*/;
60
61 virtual void
62 _onCreateSession(::webrtc::RTCErrorOr<::webrtc::SessionDescriptionInterface*> const& answerOrError) /*override*/;
63
64 virtual void _onSetLocalDescription(::webrtc::RTCError result) /*override*/;
65
66 virtual void _onLocalIceCandidate(::webrtc::IceCandidate const* iceCandidate);
67
68 virtual void onRemoteIceCandidate(::NetherNet::CandidateAdd const& candidate) /*override*/;
69 // NOLINTEND
70
71public:
72 // member functions
73 // NOLINTBEGIN
74 MCAPI ServerNegotiator(
78 ::brstd::move_only_function<void(::std::variant<
82 ::NetherNet::CandidateAdd> const&) const> sendMessage,
83 uint64 sessionId
84 );
85
86 MCAPI void _completeWithError(::Bedrock::ErrorInfo<::NetherNet::ESessionError> error);
87
88 MCAPI void _onIceConnectionChange(::webrtc::PeerConnectionInterface::IceConnectionState newState);
89 // NOLINTEND
90
91public:
92 // constructor thunks
93 // NOLINTBEGIN
94 MCAPI void* $ctor(
98 ::brstd::move_only_function<void(::std::variant<
102 ::NetherNet::CandidateAdd> const&) const> sendMessage,
103 uint64 sessionId
104 );
105 // NOLINTEND
106
107public:
108 // virtual function thunks
109 // NOLINTBEGIN
110 MCAPI void $createAnswer(
112 ::NetherNet::ConnectRequest const& offer,
115 )>&& onComplete
116 );
117
118 MCAPI void $_onSetRemoteDescription(::webrtc::RTCError result);
119
120 MCAPI void $_onCreateSession(::webrtc::RTCErrorOr<::webrtc::SessionDescriptionInterface*> const& answerOrError);
121
122 MCAPI void $_onSetLocalDescription(::webrtc::RTCError result);
123
124 MCAPI void $_onLocalIceCandidate(::webrtc::IceCandidate const* iceCandidate);
125
126 MCAPI void $onRemoteIceCandidate(::NetherNet::CandidateAdd const& candidate);
127
128
129 // NOLINTEND
130};
131
132} // namespace NetherNet
Definition Result.h:9
Definition CandidateAdd.h:7
Definition ConnectError.h:7
Definition ConnectRequest.h:7
Definition ConnectResponse.h:7
Definition ContextProxy.h:18
Definition PeerConnectionNegotiator.h:30
Definition PeerConnectionObserver.h:22
Definition move_only_function.h:9
Definition IceCandidate.h:12
Definition PeerConnectionFactory.h:32
Definition PeerConnectionInterface.h:57
Definition RTCErrorOr.h:8
Definition RTCError.h:10
Definition SessionDescriptionInterface.h:17
Definition scoped_refptr.h:8
Definition ErrorInfo.h:9
Definition ctx.h:5
Definition Alias.h:14
Definition PeerConnectionInterface.h:174