Ark Server API 3.54
Serverside plugin support for Ark Survival Evolved.
Loading...
Searching...
No Matches
ArkBaseApi.h
Go to the documentation of this file.
1#pragma once
2
3#include "../IBaseApi.h"
4
5#include <IApiUtils.h>
6
7namespace API
8{
9 class ArkBaseApi : public IBaseApi
10 {
11 public:
12 ArkBaseApi();
13 ~ArkBaseApi() override = default;
14
15 bool Init() override;
16 float GetVersion() override;
17 std::string GetApiName() override;
18 void RegisterCommands() override;
19
20 std::unique_ptr<ArkApi::ICommands>& GetCommands() override;
21 std::unique_ptr<ArkApi::IHooks>& GetHooks() override;
22 std::unique_ptr<ArkApi::IApiUtils>& GetApiUtils() override;
23
24 private:
25 // Callbacks
26 static FString LoadPlugin(FString* cmd);
27 static FString UnloadPlugin(FString* cmd);
28
29 static void LoadPluginCmd(APlayerController* /*player_controller*/, FString* /*cmd*/, bool /*unused*/);
30 static void UnloadPluginCmd(APlayerController* /*player_controller*/, FString* /*cmd*/, bool /*unused*/);
31
32 static void LoadPluginRcon(RCONClientConnection* /*rcon_connection*/, RCONPacket* /*rcon_packet*/,
33 UWorld* /*unused*/);
34 static void UnloadPluginRcon(RCONClientConnection* /*rcon_connection*/, RCONPacket* /*rcon_packet*/,
35 UWorld* /*unused*/);
36
37 std::unique_ptr<ArkApi::ICommands> commands_;
38 std::unique_ptr<ArkApi::IHooks> hooks_;
39 std::unique_ptr<ArkApi::IApiUtils> api_utils_;
40 };
41} // namespace API
std::string GetApiName() override
Definition: ArkBaseApi.cpp:67
std::unique_ptr< ArkApi::IApiUtils > & GetApiUtils() override
Definition: ArkBaseApi.cpp:82
static void LoadPluginCmd(APlayerController *, FString *, bool)
Definition: ArkBaseApi.cpp:150
std::unique_ptr< ArkApi::IHooks > & GetHooks() override
Definition: ArkBaseApi.cpp:77
std::unique_ptr< ArkApi::IApiUtils > api_utils_
Definition: ArkBaseApi.h:39
void RegisterCommands() override
Definition: ArkBaseApi.cpp:87
float GetVersion() override
Definition: ArkBaseApi.cpp:62
std::unique_ptr< ArkApi::ICommands > & GetCommands() override
Definition: ArkBaseApi.cpp:72
~ArkBaseApi() override=default
static FString LoadPlugin(FString *cmd)
Definition: ArkBaseApi.cpp:95
static void UnloadPluginRcon(RCONClientConnection *, RCONPacket *, UWorld *)
Definition: ArkBaseApi.cpp:169
std::unique_ptr< ArkApi::ICommands > commands_
Definition: ArkBaseApi.h:37
bool Init() override
Definition: ArkBaseApi.cpp:28
static void UnloadPluginCmd(APlayerController *, FString *, bool)
Definition: ArkBaseApi.cpp:156
static void LoadPluginRcon(RCONClientConnection *, RCONPacket *, UWorld *)
Definition: ArkBaseApi.cpp:163
std::unique_ptr< ArkApi::IHooks > hooks_
Definition: ArkBaseApi.h:38
static FString UnloadPlugin(FString *cmd)
Definition: ArkBaseApi.cpp:122