WiiUPluginLoaderBackend/source/PluginManagement.h

31 lines
1.2 KiB
C
Raw Normal View History

#pragma once
2022-02-04 16:25:44 +01:00
#include "plugin/PluginContainer.h"
#include "plugin/PluginLoadWrapper.h"
#include <coreinit/dynload.h>
#include <functional>
#include <map>
#include <set>
#include <wums/defines/relocation_defines.h>
class PluginManagement {
public:
static std::vector<PluginContainer> loadPlugins(
const std::vector<PluginLoadWrapper> &pluginDataList,
std::vector<relocation_trampoline_entry_t> &trampolineData);
2020-05-03 12:30:15 +02:00
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);
};