WiiUPluginLoaderBackend/source/plugin/PluginConfigData.h

27 lines
887 B
C
Raw Permalink Normal View History

#pragma once
#include <optional>
#include <string>
2024-11-27 20:44:36 +01:00
#include <wups/config.h>
#include <wups/config_api.h>
class PluginConfigData {
public:
PluginConfigData(std::string_view name,
WUPSConfigAPI_MenuOpenedCallback openedCallback,
WUPSConfigAPI_MenuClosedCallback closedCallback);
[[nodiscard]] std::optional<WUPSConfigHandle> createConfig() const;
2024-11-27 20:44:36 +01:00
[[nodiscard]] WUPSConfigAPIStatus CallMenuOpenedCallback(WUPSConfigHandle config) const;
[[nodiscard]] WUPSConfigAPIStatus CallMenuClosedCallback() const;
static std::optional<PluginConfigData> create(WUPSConfigAPIOptions options, WUPSConfigAPI_MenuOpenedCallback openedCallback, WUPSConfigAPI_MenuClosedCallback closedCallback);
private:
std::string mName;
WUPSConfigAPI_MenuOpenedCallback mOpenedCallback;
WUPSConfigAPI_MenuClosedCallback mClosedCallback;
};