LeviLamina
Loading...
Searching...
No Matches
ClientNetworkSystem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/network/NetworkSystem.h"
5
6// auto generated inclusion list
7#include "mc/deps/core/threading/Async.h"
8#include "mc/deps/core/threading/TaskGroup.h"
9#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/deps/core/utility/UniqueOwnerPointer.h"
12#include "mc/deps/core/utility/pub_sub/Subscription.h"
13#include "mc/network/IGameConnectionInfoProvider.h"
14#include "mc/network/NetworkSystem.h"
15#include "mc/platform/brstd/function_ref.h"
16
17// auto generated forward declare list
18// clang-format off
19class AppPlatform;
26class NetworkSummary;
27class Scheduler;
32namespace Json { class Value; }
33namespace PlayerMessaging { struct NetworkID; }
34namespace Social { class GameConnectionInfo; }
35// clang-format on
36
39 public ::NetworkSystem {
40public:
41 // ClientNetworkSystem inner types define
42 using DependencyFactory = ::brstd::function_ref<::NetworkSystem::Dependencies()>;
43
44 using StatisticsFactory =
45 ::brstd::function_ref<::std::unique_ptr<::NetworkStatistics>(), ::std::unique_ptr<::NetworkStatistics>()>;
46
47public:
48 // member variables
49 // NOLINTBEGIN
50 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
51 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::SignalingService>> mSignalingService;
52 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mUserLoggingSub;
53 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mUserConnectionQualitySub;
54 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mDisableLanSignalingSub;
55 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mDisableTrickleIceSub;
56 ::ll::TypedStorage<8, 16, ::Bedrock::UniqueOwnerPointer<::NetworkSummary>> mNetworkSummary;
57 // NOLINTEND
58
59public:
60 // virtual functions
61 // NOLINTBEGIN
62#ifdef LL_PLAT_S
63 virtual ~ClientNetworkSystem() /*override*/ = default;
64#else // LL_PLAT_C
65 virtual ~ClientNetworkSystem() /*override*/;
66#endif
67
68 virtual ::Social::GameConnectionInfo const& getConnectionInfo() const /*override*/;
69
70 virtual ::std::optional<::std::string> getNetworkInfoString() const /*override*/;
71 // NOLINTEND
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCNAPI_C bool
77 connect(::Social::GameConnectionInfo const& gameConnection, ::Social::GameConnectionInfo const& backupConnection);
78
79 MCNAPI_C ::std::shared_ptr<::SignalingServiceSignInJob> createSignalingServiceSigninJobIfNeeded(
80 ::std::shared_ptr<::SignalingService> signalingService,
81 bool useJsonRpc,
82 ::Bedrock::Threading::Async<::std::optional<::PlayerMessaging::NetworkID>>&& playerMessagingId
83 );
84
85 MCNAPI_C ::std::pair<::Json::Value, ::Json::Value> getPacketTraces() const;
86
87 MCNAPI_C void getPingTimeForConnection(
88 ::Social::GameConnectionInfo const& connection,
89 ::std::function<void(uint)> pingTimeCallback
90 );
91
92 MCNAPI_C void registerForPrimaryUserOptionChanges(::ClientNetworkSystemOptions const& primaryUserOptions);
93
94 MCNAPI_C void setupNetworkSummary(
95 ::std::function<bool()> isInGame,
96 ::std::function<bool()> isSignedIntoSignalingService,
97 ::std::function<bool()> isHostingLocalDedicatedServer
98 );
99
100 MCNAPI ::std::optional<::NetworkIdentifier> tryGetLocalNetworkId() const;
101
102 MCNAPI ::std::optional<::NetworkIdentifier> tryGetServerId() const;
103 // NOLINTEND
104
105public:
106 // static functions
107 // NOLINTBEGIN
108 MCNAPI_C static ::NetworkSystem::Dependencies _createConstructionDependencies(
110 ::Scheduler& recieveThread,
111 ::std::vector<::std::string> const& overrideBroadcastAddresses,
112 ::NetworkSystemToggles const& networkToggles,
113 ::NetherNetTransportFactory const& transportFactory,
115 ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner> networkSessionOwner,
116 ::std::unique_ptr<::IPacketSerializationController> packetController
117 );
118 // NOLINTEND
119
120public:
121 // constructor thunks
122 // NOLINTBEGIN
123 MCNAPI_C void* $ctor(
124 ::Scheduler& receiveThread,
125 ::std::vector<::std::string> const& overrideBroadcastAddresses,
126 ::NetworkSystemToggles const& networkToggles,
129 ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner> networkSessionOwner,
130 ::std::unique_ptr<::IPacketSerializationController> packetController
131 );
132 // NOLINTEND
133
134public:
135 // destructor thunk
136 // NOLINTBEGIN
137 MCNAPI void $dtor();
138 // NOLINTEND
139
140public:
141 // virtual function thunks
142 // NOLINTBEGIN
143#ifdef LL_PLAT_C
144 MCNAPI ::Social::GameConnectionInfo const& $getConnectionInfo() const;
145
146 MCNAPI ::std::optional<::std::string> $getNetworkInfoString() const;
147#endif
148
149
150 // NOLINTEND
151
152public:
153 // vftables
154 // NOLINTBEGIN
155 MCNAPI static void** $vftableForIPSupportInterface();
156
158
160
161 MCNAPI static void** $vftableForConnectionCallbacks();
162
164 // NOLINTEND
165};
Definition AppPlatform.h:90
Definition EnableNonOwnerReferences.h:7
Definition NonOwnerPointer.h:9
Definition Async.h:8
Definition ClientNetworkSystem.h:39
static MCAPI void ** $vftableForConnectionCallbacks()
static MCAPI void ** $vftableForNetworkEnableDisableListener()
MCAPI void $dtor()
static MCAPI void ** $vftableForIPSupportInterface()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
MCAPI ::std::optional<::NetworkIdentifier > tryGetLocalNetworkId() const
static MCAPI void ** $vftableForIGameConnectionInfoProvider()
MCAPI ::std::optional<::NetworkIdentifier > tryGetServerId() const
Definition IPacketSerializationController.h:9
Definition Value.h:16
Definition NetherNetTransportFactory.h:18
Definition NetworkDebugManager.h:10
Definition NetworkIdentifier.h:10
Definition NetworkSessionOwner.h:9
Definition NetworkStatistics.h:23
Definition NetworkSummary.h:8
Definition Scheduler.h:14
Definition SignalingServiceSignInJob.h:21
Definition SignalingService.h:38
Definition GameConnectionInfo.h:21
Definition IGameConnectionInfoProvider.h:12
Definition function_ref.h:60
Definition ClientNetworkSystemOptions.h:5
Definition NetworkSystemToggles.h:11
Definition NetworkSystem.h:55
Definition NetworkID.h:12