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/webrtc/CreateSessionDescriptionObserver.h"
9#include "mc/external/webrtc/RTCErrorOr.h"
10#include "mc/external/webrtc/RefCountedObject.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 ::webrtc::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
72 struct SetLocalDescriptionObserver
73 : public ::webrtc::RefCountedObject<::webrtc::SetLocalDescriptionObserverInterface> {
74 public:
75 // member variables
76 // NOLINTBEGIN
78 // NOLINTEND
79
80 public:
81 // prevent constructor by default
82 SetLocalDescriptionObserver& operator=(SetLocalDescriptionObserver const&);
83 SetLocalDescriptionObserver(SetLocalDescriptionObserver const&);
84 SetLocalDescriptionObserver();
85
86 public:
87 // virtual functions
88 // NOLINTBEGIN
89 virtual void OnSetLocalDescriptionComplete(::webrtc::RTCError result) /*override*/;
90 // NOLINTEND
91
92 public:
93 // virtual function thunks
94 // NOLINTBEGIN
96
97
98 // NOLINTEND
99 };
100
101 struct SetRemoteDescriptionObserver
102 : public ::webrtc::RefCountedObject<::webrtc::SetRemoteDescriptionObserverInterface> {
103 public:
104 // member variables
105 // NOLINTBEGIN
107 // NOLINTEND
108
109 public:
110 // prevent constructor by default
111 SetRemoteDescriptionObserver& operator=(SetRemoteDescriptionObserver const&);
112 SetRemoteDescriptionObserver(SetRemoteDescriptionObserver const&);
113 SetRemoteDescriptionObserver();
114
115 public:
116 // virtual functions
117 // NOLINTBEGIN
118 virtual void OnSetRemoteDescriptionComplete(::webrtc::RTCError result) /*override*/;
119 // NOLINTEND
120
121 public:
122 // virtual function thunks
123 // NOLINTBEGIN
125
126
127 // NOLINTEND
128 };
129
130public:
131 // member variables
132 // NOLINTBEGIN
143 // NOLINTEND
144
145public:
146 // prevent constructor by default
147 PeerConnectionNegotiator& operator=(PeerConnectionNegotiator const&);
148 PeerConnectionNegotiator(PeerConnectionNegotiator const&);
149 PeerConnectionNegotiator();
150
151public:
152 // virtual functions
153 // NOLINTBEGIN
154 virtual ~PeerConnectionNegotiator() /*override*/ = default;
155
156 virtual ::NetherNet::ESessionError checkTimeout(::std::chrono::seconds timeout) const;
157
158 virtual void onRemoteAnswer(::NetherNet::ConnectResponse const& answer);
159
160 virtual void onRemoteError(::NetherNet::ConnectError const& error);
161
162 virtual void onRemoteIceCandidate(::NetherNet::CandidateAdd const& candidate) = 0;
163
164 virtual void _onCreateSession(::webrtc::RTCErrorOr<::webrtc::SessionDescriptionInterface*> const& offerOrError) = 0;
165
166 virtual void _onSetLocalDescription(::webrtc::RTCError result) = 0;
167
168 virtual void _onSetRemoteDescription(::webrtc::RTCError result) = 0;
169 // NOLINTEND
170
171public:
172 // member functions
173 // NOLINTBEGIN
178 ::brstd::move_only_function<void(::std::variant<
182 ::NetherNet::CandidateAdd> const&) const> sendMessage,
183 uint64 sessionId
184 );
185 // NOLINTEND
186
187public:
188 // constructor thunks
189 // NOLINTBEGIN
190 MCNAPI void* $ctor(
194 ::brstd::move_only_function<void(::std::variant<
198 ::NetherNet::CandidateAdd> const&) const> sendMessage,
199 uint64 sessionId
200 );
201 // NOLINTEND
202
203public:
204 // virtual function thunks
205 // NOLINTBEGIN
206 MCNAPI ::NetherNet::ESessionError $checkTimeout(::std::chrono::seconds timeout) const;
207
209
210 MCNAPI void $onRemoteError(::NetherNet::ConnectError const& error);
211
212
213 // NOLINTEND
214};
215
216} // 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)
Definition PeerConnectionObserver.h:22
Definition move_only_function.h:9
Definition PeerConnectionFactory.h:32
Definition RTCErrorOr.h:8
Definition RTCError.h:10
Definition RefCountedObject.h:8
Definition SessionDescriptionInterface.h:17
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