LeviLamina
Loading...
Searching...
No Matches
ClientNegotiator.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 ClientNegotiator : public ::NetherNet::PeerConnectionNegotiator {
33public:
34 // member variables
35 // NOLINTBEGIN
41 // NOLINTEND
42
43public:
44 // prevent constructor by default
45 ClientNegotiator& operator=(ClientNegotiator const&);
46 ClientNegotiator(ClientNegotiator const&);
47 ClientNegotiator();
48
49public:
50 // virtual functions
51 // NOLINTBEGIN
52 virtual void createOffer(
56 )>&& onComplete
57 );
58
59 virtual ::NetherNet::ESessionError checkTimeout(::std::chrono::seconds timeout) const /*override*/;
60
61 virtual void
62 _onCreateSession(::webrtc::RTCErrorOr<::webrtc::SessionDescriptionInterface*> const& offerOrError) /*override*/;
63
64 virtual void _onSetLocalDescription(::webrtc::RTCError result) /*override*/;
65
66 virtual void onRemoteAnswer(::NetherNet::ConnectResponse const& answer) /*override*/;
67
68 virtual void onRemoteError(::NetherNet::ConnectError const& error) /*override*/;
69
70 virtual void _onSetRemoteDescription(::webrtc::RTCError result) /*override*/;
71
72 virtual void _onLocalIceCandidate(::webrtc::IceCandidate const* iceCandidate);
73
74 virtual void onRemoteIceCandidate(::NetherNet::CandidateAdd const& candidate) /*override*/;
75 // NOLINTEND
76
77public:
78 // member functions
79 // NOLINTBEGIN
84 ::brstd::move_only_function<void(::std::variant<
88 ::NetherNet::CandidateAdd> const&) const> sendMessage,
89 uint64 sessionId
90 );
91
93
94 MCNAPI void _onIceConnectionChanged(::webrtc::PeerConnectionInterface::IceConnectionState newState);
95 // NOLINTEND
96
97public:
98 // constructor thunks
99 // NOLINTBEGIN
100 MCNAPI void* $ctor(
104 ::brstd::move_only_function<void(::std::variant<
108 ::NetherNet::CandidateAdd> const&) const> sendMessage,
109 uint64 sessionId
110 );
111 // NOLINTEND
112
113public:
114 // virtual function thunks
115 // NOLINTBEGIN
116 MCNAPI void $createOffer(
120 )>&& onComplete
121 );
122
123 MCNAPI ::NetherNet::ESessionError $checkTimeout(::std::chrono::seconds timeout) const;
124
126
128
130
131 MCNAPI void $onRemoteError(::NetherNet::ConnectError const& error);
132
134
135 MCNAPI void $_onLocalIceCandidate(::webrtc::IceCandidate const* iceCandidate);
136
138
139
140 // NOLINTEND
141};
142
143} // namespace NetherNet
Definition Result.h:9
Definition CandidateAdd.h:7
MCAPI void $_onCreateSession(::webrtc::RTCErrorOr<::webrtc::SessionDescriptionInterface * > const &offerOrError)
MCAPI void $onRemoteError(::NetherNet::ConnectError const &error)
MCAPI::NetherNet::ESessionError $checkTimeout(::std::chrono::seconds timeout) const
MCAPI void _onIceConnectionChanged(::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)
MCAPI void $onRemoteIceCandidate(::NetherNet::CandidateAdd const &candidate)
MCAPI void $onRemoteAnswer(::NetherNet::ConnectResponse const &answer)
MCAPI void $createOffer(::webrtc::PeerConnectionInterface::RTCConfiguration const &config, ::brstd::move_only_function< void(::Bedrock::Result<::webrtc::scoped_refptr<::webrtc::PeerConnectionInterface >, ::NetherNet::ESessionError >)> &&onComplete)
MCAPI void _completeWithError(::Bedrock::ErrorInfo<::NetherNet::ESessionError > error)
MCAPI void $_onSetRemoteDescription(::webrtc::RTCError result)
MCAPI void $_onLocalIceCandidate(::webrtc::IceCandidate const *iceCandidate)
MCAPI void $_onSetLocalDescription(::webrtc::RTCError result)
MCAPI ClientNegotiator(::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 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