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
32 onNewIncomingConnection(::NetworkIdentifier const& id, ::std::shared_ptr<::NetworkPeer>&& peer) = 0;
33
34 virtual bool
35 onNewOutgoingConnection(::NetworkIdentifier const& id, ::std::shared_ptr<::NetworkPeer>&& peer) = 0;
36
37 virtual void onConnectionClosed(
38 ::NetworkIdentifier const& id,
39 ::Connection::DisconnectFailReason const discoReason,
40 ::std::string const& messageFromServer,
41 ::std::string const& messageBodyOverride,
42 bool skipDisconnectMessage,
43 ::Json::Value const& sessionSummary
44 ) = 0;
45 // NOLINTEND
46
47 public:
48 // virtual function thunks
49 // NOLINTBEGIN
50
51 // NOLINTEND
52 };
53
54public:
55 // member variables
56 // NOLINTBEGIN
57 ::ll::TypedStorage<8, 8, ::Connector::ConnectionCallbacks&> mCallbacks;
58 // NOLINTEND
59
60public:
61 // prevent constructor by default
62 Connector& operator=(Connector const&);
63 Connector(Connector const&);
64 Connector();
65
66public:
67 // virtual functions
68 // NOLINTBEGIN
69 virtual ~Connector();
70
71 virtual ::std::string getLocalIp();
72
73 virtual ushort getPort() const;
74
75 virtual ::Social::GameConnectionInfo const& getConnectedGameInfo() const;
76
77 virtual bool isIPv4Supported() const;
78
79 virtual bool isIPv6Supported() const;
80
81 virtual ushort getIPv4Port() const;
82
83 virtual ushort getIPv6Port() const;
84
85 virtual ::TransportLayer getNetworkType() const;
86 // NOLINTEND
87
88public:
89 // destructor thunk
90 // NOLINTBEGIN
91 MCAPI void $dtor();
92 // NOLINTEND
93
94public:
95 // virtual function thunks
96 // NOLINTBEGIN
97 MCFOLD ::std::string $getLocalIp();
98
99 MCFOLD ushort $getPort() const;
100
101 MCFOLD ::Social::GameConnectionInfo const& $getConnectedGameInfo() const;
102
103 MCFOLD bool $isIPv4Supported() const;
104
105 MCFOLD bool $isIPv6Supported() const;
106
107 MCFOLD ushort $getIPv4Port() const;
108
109 MCFOLD ushort $getIPv6Port() const;
110
111 MCFOLD ::TransportLayer $getNetworkType() const;
112
113
114 // NOLINTEND
115
116public:
117 // vftables
118 // NOLINTBEGIN
119 MCNAPI static void** $vftable();
120 // NOLINTEND
121};
static MCAPI void ** $vftable()
Definition Value.h:16
Definition NetworkIdentifier.h:10
Definition NetworkPeer.h:8
Definition GameConnectionInfo.h:21
Definition Connector.h:25