mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-12-25 04:21:49 +01:00
32 lines
1.3 KiB
C++
32 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "plugin/PluginContainer.h"
|
|
|
|
#include <coreinit/dynload.h>
|
|
#include <functional>
|
|
#include <map>
|
|
#include <memory>
|
|
#include <set>
|
|
#include <wums/defines/relocation_defines.h>
|
|
|
|
class PluginManagement {
|
|
public:
|
|
static std::vector<PluginContainer> loadPlugins(
|
|
const std::set<std::shared_ptr<PluginData>, PluginDataSharedPtrComparator> &pluginDataList,
|
|
std::vector<relocation_trampoline_entry_t> &trampolineData);
|
|
|
|
static void callInitHooks(const std::vector<PluginContainer> &plugins, const std::function<bool(const PluginContainer &)> &pred);
|
|
|
|
static bool doRelocations(const std::vector<PluginContainer> &plugins,
|
|
std::vector<relocation_trampoline_entry_t> &trampData,
|
|
std::map<std::string, OSDynLoad_Module> &usedRPls);
|
|
|
|
static bool doRelocation(const std::vector<RelocationData> &relocData,
|
|
std::vector<relocation_trampoline_entry_t> &trampData,
|
|
uint32_t trampolineID,
|
|
std::map<std::string, OSDynLoad_Module> &usedRPls);
|
|
|
|
static bool DoFunctionPatches(std::vector<PluginContainer> &plugins);
|
|
|
|
static bool RestoreFunctionPatches(std::vector<PluginContainer> &plugins);
|
|
}; |