adapt: adapt gmlib 1.0.0-rc.2 and levilamina 1.1.0

This commit is contained in:
zimuya4153
2025-03-22 00:10:55 +08:00
Unverified
parent b34c84f157
commit accf1d0664
15 changed files with 883 additions and 621 deletions
+6 -2
View File
@@ -1,6 +1,7 @@
#pragma once
#include <ll/api/mod/NativeMod.h>
#include <ll/api/mod/RegisterHelper.h>
#include <ll/api/thread/ThreadPoolExecutor.h>
namespace gmlib {
@@ -9,7 +10,7 @@ class LegacyRemoteCallApi {
public:
static LegacyRemoteCallApi& getInstance();
LegacyRemoteCallApi() : mSelf(*ll::mod::NativeMod::current()) {}
LegacyRemoteCallApi() : mSelf(*ll::mod::NativeMod::current()), mThreadPoolExecutor(getSelf().getName()) {}
[[nodiscard]] ll::mod::NativeMod& getSelf() const { return mSelf; }
@@ -26,8 +27,11 @@ public:
// /// @return True if the plugin is unloaded successfully.
// bool unload();
ll::thread::ThreadPoolExecutor& getThreadPoolExecutor() { return mThreadPoolExecutor; }
private:
ll::mod::NativeMod& mSelf;
ll::mod::NativeMod& mSelf;
ll::thread::ThreadPoolExecutor mThreadPoolExecutor;
};
} // namespace gmlib