chore: use new template

This commit is contained in:
Tsubasa6848
2024-03-23 19:54:55 +08:00
Unverified
parent 35fc8a7a4f
commit 0034f21b98
9 changed files with 81 additions and 57 deletions
+26 -2
View File
@@ -1,9 +1,33 @@
#pragma once
#include <ll/api/plugin/NativePlugin.h>
#include <ll/api/plugin/RegisterHelper.h>
namespace GMLIB_LegacyRemoteCallApi {
[[nodiscard]] auto getSelfPluginInstance() -> ll::plugin::NativePlugin&;
class LRCA {
public:
static std::unique_ptr<LRCA>& getInstance();
LRCA(ll::plugin::NativePlugin& self) : mSelf(self) {}
[[nodiscard]] ll::plugin::NativePlugin& getSelf() const { return mSelf; }
/// @return True if the plugin is loaded successfully.
bool load();
/// @return True if the plugin is enabled successfully.
bool enable();
/// @return True if the plugin is disabled successfully.
bool disable();
// TODO: Implement this method if you need to unload the plugin.
// /// @return True if the plugin is unloaded successfully.
// bool unload();
private:
ll::plugin::NativePlugin& mSelf;
};
} // namespace GMLIB_LegacyRemoteCallApi