LeviLamina
Loading...
Searching...
No Matches
Connector.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/network/TransportLayer.h"
7#include "mc/network/connection/DisconnectFailReason.h"
8
9// auto generated forward declare list
10// clang-format off
12class NetworkPeer;
13namespace Json { class Value; }
14namespace Social { class GameConnectionInfo; }
15// clang-format on
16
17class Connector {
18public:
19 // Connector inner types declare
20 // clang-format off
22 // clang-format on
23
24 // Connector inner types define
26 public:
27 // virtual functions
28 // NOLINTBEGIN
29 virtual ~ConnectionCallbacks() = default;
30
31 virtual bool onNewIncomingConnection(::NetworkIdentifier const&, ::std::shared_ptr<::NetworkPeer>&&) = 0;
32
33 virtual bool onNewOutgoingConnection(::NetworkIdentifier const&, ::std::shared_ptr<::NetworkPeer>&&) = 0;
34
35 virtual void onConnectionClosed(
37 ::Connection::DisconnectFailReason const,
38 ::std::string const&,
39 bool,
40 ::Json::Value const&
41 ) = 0;
42 // NOLINTEND
43
44 public:
45 // virtual function thunks
46 // NOLINTBEGIN
47
48 // NOLINTEND
49 };
50
51public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<8, 8, ::Connector::ConnectionCallbacks&> mCallbacks;
55 // NOLINTEND
56
57public:
58 // prevent constructor by default
59 Connector& operator=(Connector const&);
60 Connector(Connector const&);
61 Connector();
62
63public:
64 // virtual functions
65 // NOLINTBEGIN
66 virtual ~Connector();
67
68 virtual ::std::string getLocalIp();
69
70 virtual ushort getPort() const;
71
72 virtual ::Social::GameConnectionInfo const& getConnectedGameInfo() const;
73
74 virtual bool isIPv4Supported() const;
75
76 virtual bool isIPv6Supported() const;
77
78 virtual ushort getIPv4Port() const;
79
80 virtual ushort getIPv6Port() const;
81
82 virtual ::TransportLayer getNetworkType() const;
83 // NOLINTEND
84
85public:
86 // destructor thunk
87 // NOLINTBEGIN
88 MCAPI void $dtor();
89 // NOLINTEND
90
91public:
92 // virtual function thunks
93 // NOLINTBEGIN
94 MCFOLD ::std::string $getLocalIp();
95
96 MCFOLD ushort $getPort() const;
97
98 MCFOLD ::Social::GameConnectionInfo const& $getConnectedGameInfo() const;
99
100 MCFOLD bool $isIPv4Supported() const;
101
102 MCFOLD bool $isIPv6Supported() const;
103
104 MCFOLD ushort $getIPv4Port() const;
105
106 MCFOLD ushort $getIPv6Port() const;
107
108#ifdef LL_PLAT_C
109 MCFOLD ::TransportLayer $getNetworkType() const;
110#endif
111
112
113 // NOLINTEND
114
115public:
116 // vftables
117 // NOLINTBEGIN
118 MCNAPI static void** $vftable();
119 // NOLINTEND
120};
static MCAPI void ** $vftable()
Definition Value.h:16
Definition NetworkIdentifier.h:10
Definition NetworkPeer.h:8
Definition GameConnectionInfo.h:21
Definition Connector.h:25