LeviLamina
Loading...
Searching...
No Matches
PeerConnectionNegotiator.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/ESessionError.h"
8#include "mc/external/rtc/RefCountedObject.h"
9#include "mc/external/webrtc/CreateSessionDescriptionObserver.h"
10#include "mc/external/webrtc/RTCErrorOr.h"
11#include "mc/external/webrtc/SetLocalDescriptionObserverInterface.h"
12#include "mc/external/webrtc/SetRemoteDescriptionObserverInterface.h"
13#include "mc/external/webrtc/scoped_refptr.h"
14#include "mc/platform/brstd/move_only_function.h"
15
16// auto generated forward declare list
17// clang-format off
18namespace NetherNet { class CandidateAdd; }
19namespace NetherNet { class ConnectError; }
20namespace NetherNet { class ConnectRequest; }
21namespace NetherNet { class ConnectResponse; }
22namespace NetherNet { class PeerConnectionObserver; }
23namespace webrtc { class PeerConnectionFactory; }
24namespace webrtc { class RTCError; }
25namespace webrtc { class SessionDescriptionInterface; }
26// clang-format on
27
28namespace NetherNet {
29
30class PeerConnectionNegotiator : public ::NetherNet::ContextProxy {
31public:
32 // PeerConnectionNegotiator inner types declare
33 // clang-format off
37 // clang-format on
38
39 // PeerConnectionNegotiator inner types define
40 struct CreateSessionObserver : public ::rtc::RefCountedObject<::webrtc::CreateSessionDescriptionObserver> {
41 public:
42 // member variables
43 // NOLINTBEGIN
45 // NOLINTEND
46
47 public:
48 // prevent constructor by default
49 CreateSessionObserver& operator=(CreateSessionObserver const&);
50 CreateSessionObserver(CreateSessionObserver const&);
51 CreateSessionObserver();
52
53 public:
54 // virtual functions
55 // NOLINTBEGIN
56 virtual void OnSuccess(::webrtc::SessionDescriptionInterface* description) /*override*/;
57
58 virtual void OnFailure(::webrtc::RTCError error) /*override*/;
59 // NOLINTEND
60
61 public:
62 // virtual function thunks
63 // NOLINTBEGIN
65
66 MCNAPI void $OnFailure(::webrtc::RTCError error);
67
68
69 // NOLINTEND
70
71 public:
72 // vftables
73 // NOLINTBEGIN
74 MCNAPI static void** $vftable();
75 // NOLINTEND
76 };
77
78 struct SetLocalDescriptionObserver
79 : public ::rtc::RefCountedObject<::webrtc::SetLocalDescriptionObserverInterface> {
80 public:
81 // member variables
82 // NOLINTBEGIN
84 // NOLINTEND
85
86 public:
87 // prevent constructor by default
88 SetLocalDescriptionObserver& operator=(SetLocalDescriptionObserver const&);
89 SetLocalDescriptionObserver(SetLocalDescriptionObserver const&);
90 SetLocalDescriptionObserver();
91
92 public:
93 // virtual functions
94 // NOLINTBEGIN
95 virtual void OnSetLocalDescriptionComplete(::webrtc::RTCError result) /*override*/;
96 // NOLINTEND
97
98 public:
99 // virtual function thunks
100 // NOLINTBEGIN
102
103
104 // NOLINTEND
105
106 public:
107 // vftables
108 // NOLINTBEGIN
109 MCNAPI static void** $vftable();
110 // NOLINTEND
111 };
112
113 struct SetRemoteDescriptionObserver
114 : public ::rtc::RefCountedObject<::webrtc::SetRemoteDescriptionObserverInterface> {
115 public:
116 // member variables
117 // NOLINTBEGIN
119 // NOLINTEND
120
121 public:
122 // prevent constructor by default
123 SetRemoteDescriptionObserver& operator=(SetRemoteDescriptionObserver const&);
124 SetRemoteDescriptionObserver(SetRemoteDescriptionObserver const&);
125 SetRemoteDescriptionObserver();
126
127 public:
128 // virtual functions
129 // NOLINTBEGIN
130 virtual void OnSetRemoteDescriptionComplete(::webrtc::RTCError result) /*override*/;
131 // NOLINTEND
132
133 public:
134 // virtual function thunks
135 // NOLINTBEGIN
137
138
139 // NOLINTEND
140
141 public:
142 // vftables
143 // NOLINTBEGIN
144 MCNAPI static void** $vftable();
145 // NOLINTEND
146 };
147
148public:
149 // member variables
150 // NOLINTBEGIN
160 // NOLINTEND
161
162public:
163 // prevent constructor by default
164 PeerConnectionNegotiator& operator=(PeerConnectionNegotiator const&);
165 PeerConnectionNegotiator(PeerConnectionNegotiator const&);
166 PeerConnectionNegotiator();
167
168public:
169 // virtual functions
170 // NOLINTBEGIN
171 virtual ~PeerConnectionNegotiator() /*override*/;
172
173 virtual ::NetherNet::ESessionError checkTimeout(::std::chrono::seconds timeout) const;
174
175 virtual void onRemoteAnswer(::NetherNet::ConnectResponse const& answer);
176
177 virtual void onRemoteError(::NetherNet::ConnectError const& error);
178
179 virtual void onRemoteIceCandidate(::NetherNet::CandidateAdd const& candidate) = 0;
180
181 virtual void _onCreateSession(::webrtc::RTCErrorOr<::webrtc::SessionDescriptionInterface*> const& offerOrError) = 0;
182
183 virtual void _onSetLocalDescription(::webrtc::RTCError result) = 0;
184
185 virtual void _onSetRemoteDescription(::webrtc::RTCError result) = 0;
186 // NOLINTEND
187
188public:
189 // member functions
190 // NOLINTBEGIN
195 ::brstd::move_only_function<void(::std::variant<
199 ::NetherNet::CandidateAdd> const&) const> sendMessage,
200 uint64 sessionId
201 );
202 // NOLINTEND
203
204public:
205 // constructor thunks
206 // NOLINTBEGIN
207 MCNAPI void* $ctor(
211 ::brstd::move_only_function<void(::std::variant<
215 ::NetherNet::CandidateAdd> const&) const> sendMessage,
216 uint64 sessionId
217 );
218 // NOLINTEND
219
220public:
221 // destructor thunk
222 // NOLINTBEGIN
223 MCNAPI void $dtor();
224 // NOLINTEND
225
226public:
227 // virtual function thunks
228 // NOLINTBEGIN
229 MCNAPI ::NetherNet::ESessionError $checkTimeout(::std::chrono::seconds timeout) const;
230
232
233 MCNAPI void $onRemoteError(::NetherNet::ConnectError const& error);
234
235
236 // NOLINTEND
237
238public:
239 // vftables
240 // NOLINTBEGIN
241 MCNAPI static void** $vftable();
242 // NOLINTEND
243};
244
245} // namespace NetherNet
Definition CandidateAdd.h:7
Definition ConnectError.h:7
Definition ConnectRequest.h:7
Definition ConnectResponse.h:7
Definition ContextProxy.h:18
MCAPI void $onRemoteError(::NetherNet::ConnectError const &error)
MCAPI::NetherNet::ESessionError $checkTimeout(::std::chrono::seconds timeout) const
MCAPI PeerConnectionNegotiator(::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 $onRemoteAnswer(::NetherNet::ConnectResponse const &answer)
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)
static MCAPI void ** $vftable()
Definition PeerConnectionObserver.h:22
Definition move_only_function.h:9
Definition RefCountedObject.h:8
Definition PeerConnectionFactory.h:31
Definition RTCErrorOr.h:8
Definition RTCError.h:10
Definition SessionDescriptionInterface.h:18
Definition scoped_refptr.h:8
Definition PeerConnectionNegotiator.h:40
MCAPI void $OnFailure(::webrtc::RTCError error)
MCAPI void $OnSuccess(::webrtc::SessionDescriptionInterface *description)
MCAPI void $OnSetLocalDescriptionComplete(::webrtc::RTCError result)
MCAPI void $OnSetRemoteDescriptionComplete(::webrtc::RTCError result)
Definition ctx.h:5
Definition Alias.h:14