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/Result.h"
12#include "mc/platform/brstd/move_only_function.h"
13
14// auto generated forward declare list
15// clang-format off
16namespace NetherNet { class CandidateAdd; }
17namespace NetherNet { class ConnectError; }
18namespace NetherNet { class ConnectRequest; }
19namespace NetherNet { class ConnectResponse; }
20namespace NetherNet { class ContextProxy; }
21namespace NetherNet { class PeerConnectionObserver; }
22namespace webrtc { class IceCandidateInterface; }
23namespace webrtc { class PeerConnectionFactory; }
24namespace webrtc { class PeerConnectionInterface; }
25namespace webrtc { class RTCError; }
26namespace webrtc { class SessionDescriptionInterface; }
27// clang-format on
28
29namespace NetherNet {
30
31class ServerNegotiator : public ::NetherNet::PeerConnectionNegotiator {
32public:
33 // member variables
34 // NOLINTBEGIN
39 // NOLINTEND
40
41public:
42 // prevent constructor by default
43 ServerNegotiator& operator=(ServerNegotiator const&);
44 ServerNegotiator(ServerNegotiator const&);
45 ServerNegotiator();
46
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 virtual void _onSetRemoteDescription(::webrtc::RTCError result) /*override*/;
51
52 virtual void
53 _onCreateSession(::webrtc::RTCErrorOr<::webrtc::SessionDescriptionInterface*> const& answerOrError) /*override*/;
54
55 virtual void _onSetLocalDescription(::webrtc::RTCError result) /*override*/;
56
57 virtual void _onLocalIceCandidate(::webrtc::IceCandidateInterface const* iceCandidate);
58
59 virtual void onRemoteIceCandidate(::NetherNet::CandidateAdd const& candidate) /*override*/;
60
61 virtual ~ServerNegotiator() /*override*/;
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
71 ::brstd::move_only_function<void(::std::variant<
75 ::NetherNet::CandidateAdd> const&) const> sendMessage,
76 uint64 sessionId
77 );
78
79 MCNAPI void _onIceConnectionChange(::webrtc::PeerConnectionInterface::IceConnectionState newState);
80
81 MCNAPI void createAnswer(
83 ::NetherNet::ConnectRequest const& offer,
86 )>&& onComplete
87 );
88 // NOLINTEND
89
90public:
91 // constructor thunks
92 // NOLINTBEGIN
93 MCNAPI void* $ctor(
97 ::brstd::move_only_function<void(::std::variant<
101 ::NetherNet::CandidateAdd> const&) const> sendMessage,
102 uint64 sessionId
103 );
104 // NOLINTEND
105
106public:
107 // destructor thunk
108 // NOLINTBEGIN
109 MCNAPI void $dtor();
110 // NOLINTEND
111
112public:
113 // virtual function thunks
114 // NOLINTBEGIN
116
118
120
122
124
125
126 // NOLINTEND
127
128public:
129 // vftables
130 // NOLINTBEGIN
131 MCNAPI static void** $vftable();
132 // NOLINTEND
133};
134
135} // namespace NetherNet
Definition Result.h:9
Definition CandidateAdd.h:7
Definition ConnectError.h:7
Definition ConnectRequest.h:12
Definition ConnectResponse.h:12
Definition ContextProxy.h:18
Definition PeerConnectionNegotiator.h:30
Definition PeerConnectionObserver.h:22
MCAPI void createAnswer(::webrtc::PeerConnectionInterface::RTCConfiguration const &config, ::NetherNet::ConnectRequest const &offer, ::brstd::move_only_function< void(::Bedrock::Result<::webrtc::scoped_refptr<::webrtc::PeerConnectionInterface >, ::NetherNet::ESessionError >)> &&onComplete)
MCAPI ServerNegotiator(::NetherNet::ContextProxy const &ctx, ::webrtc::scoped_refptr<::webrtc::PeerConnectionFactory > factory, ::webrtc::scoped_refptr<::NetherNet::PeerConnectionObserver > observer, ::brstd::move_only_function< void(::std::variant< ::NetherNet::ConnectRequest, ::NetherNet::ConnectResponse, ::NetherNet::ConnectError, ::NetherNet::CandidateAdd > const &) const > sendMessage, uint64 sessionId)
static MCAPI void ** $vftable()
MCAPI void $_onLocalIceCandidate(::webrtc::IceCandidateInterface const *iceCandidate)
MCAPI void $_onCreateSession(::webrtc::RTCErrorOr<::webrtc::SessionDescriptionInterface * > const &answerOrError)
MCAPI void $onRemoteIceCandidate(::NetherNet::CandidateAdd const &candidate)
MCAPI void $_onSetRemoteDescription(::webrtc::RTCError result)
MCAPI void $_onSetLocalDescription(::webrtc::RTCError result)
MCAPI void _onIceConnectionChange(::webrtc::PeerConnectionInterface::IceConnectionState newState)
MCAPI void * $ctor(::NetherNet::ContextProxy const &ctx, ::webrtc::scoped_refptr<::webrtc::PeerConnectionFactory > factory, ::webrtc::scoped_refptr<::NetherNet::PeerConnectionObserver > observer, ::brstd::move_only_function< void(::std::variant< ::NetherNet::ConnectRequest, ::NetherNet::ConnectResponse, ::NetherNet::ConnectError, ::NetherNet::CandidateAdd > const &) const > sendMessage, uint64 sessionId)
Definition move_only_function.h:9
Definition IceCandidateInterface.h:12
Definition PeerConnectionFactory.h:31
Definition PeerConnectionInterface.h:44
Definition RTCErrorOr.h:8
Definition RTCError.h:10
Definition SessionDescriptionInterface.h:18
Definition scoped_refptr.h:8
Definition ctx.h:5
Definition Alias.h:14
Definition PeerConnectionInterface.h:198