LeviLamina
Loading...
Searching...
No Matches
AutomationClient.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/codebuilder/IClient.h"
7#include "mc/deps/application/UriListener.h"
8#include "mc/world/level/LevelListener.h"
9
10// auto generated forward declare list
11// clang-format off
12class CommandOrigin;
13class IMinecraftApp;
14namespace Automation { class AutomationSession; }
15namespace CodeBuilder { class GameContext; }
16namespace CodeBuilder { struct AgentMessage; }
17namespace CodeBuilder { struct ChatMessage; }
18namespace CodeBuilder { struct CommandMessage; }
19namespace CodeBuilder { struct CommandRequest; }
20namespace CodeBuilder { struct ErrorMessage; }
21namespace CodeBuilder { struct EventMessage; }
22class ActivationUri;
23// clang-format on
24
25namespace Automation {
26
27class AutomationClient : public ::CodeBuilder::IClient, public ::UriListener, public ::LevelListener {
28public:
29 // member variables
30 // NOLINTBEGIN
44 // NOLINTEND
45
46public:
47 // prevent constructor by default
48 AutomationClient& operator=(AutomationClient const&);
49 AutomationClient(AutomationClient const&);
50 AutomationClient();
51
52public:
53 // virtual functions
54 // NOLINTBEGIN
55 virtual ~AutomationClient() /*override*/;
56
57 virtual void onUri(::ActivationUri const& uri) /*override*/;
58
59 virtual void send(::CodeBuilder::AgentMessage const& message) /*override*/;
60
61 virtual void send(::CodeBuilder::CommandMessage const& message) /*override*/;
62
63 virtual void send(::CodeBuilder::ErrorMessage const& message) /*override*/;
64
65 virtual void send(::CodeBuilder::EventMessage const& message) /*override*/;
66
67 virtual void send(::CodeBuilder::ChatMessage const& message) /*override*/;
68
69 virtual void tick() /*override*/;
70
71 virtual void executeStartupUris() /*override*/;
72
73 virtual void onLevelDestruction(::std::string const&) /*override*/;
74
75 virtual void playerListChanged() /*override*/;
76 // NOLINTEND
77
78public:
79 // member functions
80 // NOLINTBEGIN
81 MCNAPI explicit AutomationClient(::IMinecraftApp& minecraft);
82
83 MCNAPI void _forEachSession(::std::function<bool(::Automation::AutomationSession&)> const& callback);
84
86
87 MCNAPI bool _tryAddCommand(::CodeBuilder::CommandRequest&& commandRequest);
88
89 MCNAPI ::std::shared_ptr<::Automation::AutomationSession> createSession();
90
91 MCNAPI ::std::shared_ptr<::Automation::AutomationSession> getDefaultSession();
92
93 MCNAPI ::std::shared_ptr<::CodeBuilder::GameContext> getGameContext() const;
94
95 MCNAPI ::std::shared_ptr<::Automation::AutomationSession> getSessionForCommand(::CommandOrigin const& origin);
96
97#ifdef LL_PLAT_C
98 MCNAPI bool isReady();
99#endif
100
102
103#ifdef LL_PLAT_C
104 MCNAPI bool isWebsocketsEnabled() const;
105#endif
106
107 MCNAPI void setRequireEncryption(bool isEncryptionRequired);
108
109#ifdef LL_PLAT_S
110 MCNAPI void setServerRetryTime(float retryTime);
111#endif
112
113#ifdef LL_PLAT_C
114 MCNAPI void setWebsocketsEnabled(bool enabled);
115#endif
116 // NOLINTEND
117
118public:
119 // constructor thunks
120 // NOLINTBEGIN
121 MCNAPI void* $ctor(::IMinecraftApp& minecraft);
122 // NOLINTEND
123
124public:
125 // destructor thunk
126 // NOLINTBEGIN
127 MCNAPI void $dtor();
128 // NOLINTEND
129
130public:
131 // virtual function thunks
132 // NOLINTBEGIN
133 MCNAPI void $onUri(::ActivationUri const& uri);
134
135 MCNAPI void $send(::CodeBuilder::AgentMessage const& message);
136
137 MCNAPI void $send(::CodeBuilder::CommandMessage const& message);
138
139 MCNAPI void $send(::CodeBuilder::ErrorMessage const& message);
140
141 MCNAPI void $send(::CodeBuilder::EventMessage const& message);
142
143 MCNAPI void $send(::CodeBuilder::ChatMessage const& message);
144
145 MCNAPI void $tick();
146
147 MCNAPI void $executeStartupUris();
148
149 MCNAPI void $onLevelDestruction(::std::string const&);
150
151 MCNAPI void $playerListChanged();
152
153
154 // NOLINTEND
155
156public:
157 // vftables
158 // NOLINTBEGIN
159 MCNAPI static void** $vftableForUriListener();
160
161 MCNAPI static void** $vftableForIClient();
162
163 MCNAPI static void** $vftableForLevelListener();
164 // NOLINTEND
165};
166
167} // namespace Automation
Definition ActivationUri.h:5
MCAPI void $send(::CodeBuilder::AgentMessage const &message)
MCAPI void * $ctor(::IMinecraftApp &minecraft)
MCAPI AutomationClient(::IMinecraftApp &minecraft)
MCAPI void $onLevelDestruction(::std::string const &)
static MCAPI void ** $vftableForIClient()
MCAPI void $send(::CodeBuilder::ChatMessage const &message)
MCAPI void $send(::CodeBuilder::ErrorMessage const &message)
MCAPI ::std::shared_ptr<::Automation::AutomationSession > createSession()
MCAPI ::std::shared_ptr<::CodeBuilder::GameContext > getGameContext() const
MCAPI void $onUri(::ActivationUri const &uri)
MCAPI bool isReadyForInGameCommands()
MCAPI void $send(::CodeBuilder::CommandMessage const &message)
MCAPI void $send(::CodeBuilder::EventMessage const &message)
static MCAPI void ** $vftableForUriListener()
MCAPI ::std::shared_ptr<::Automation::AutomationSession > getDefaultSession()
MCAPI void _removeSession(::Automation::AutomationSession const &session)
MCAPI bool _tryAddCommand(::CodeBuilder::CommandRequest &&commandRequest)
MCAPI void setRequireEncryption(bool isEncryptionRequired)
static MCAPI void ** $vftableForLevelListener()
MCAPI ::std::shared_ptr<::Automation::AutomationSession > getSessionForCommand(::CommandOrigin const &origin)
MCAPI void _forEachSession(::std::function< bool(::Automation::AutomationSession &)> const &callback)
Definition AutomationSession.h:32
Definition GameContext.h:13
Definition IClient.h:19
Definition CommandOrigin.h:32
Definition IMinecraftApp.h:19
Definition LevelListener.h:28
Definition UriListener.h:10
Definition AgentMessage.h:7
Definition ChatMessage.h:7
Definition CommandMessage.h:7
Definition CommandRequest.h:7
Definition ErrorMessage.h:12
Definition EventMessage.h:12
Definition Alias.h:14