2023-12-16 17:36:57 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "config/WUPSConfigAPI.h"
|
|
|
|
#include <optional>
|
|
|
|
#include <string>
|
|
|
|
#include <wups/config_api.h>
|
|
|
|
|
|
|
|
class PluginConfigData {
|
|
|
|
public:
|
|
|
|
PluginConfigData(std::string_view name,
|
|
|
|
WUPSConfigAPI_MenuOpenedCallback openedCallback,
|
2024-03-24 07:50:30 +01:00
|
|
|
WUPSConfigAPI_MenuClosedCallback closedCallback);
|
2023-12-16 17:36:57 +01:00
|
|
|
|
2024-03-24 07:50:30 +01:00
|
|
|
[[nodiscard]] std::optional<WUPSConfigHandle> createConfig() const;
|
2023-12-16 17:36:57 +01:00
|
|
|
|
2024-03-24 07:50:30 +01:00
|
|
|
[[nodiscard]] WUPSConfigAPIStatus CallMenuOpenendCallback(WUPSConfigHandle config) const;
|
2023-12-16 17:36:57 +01:00
|
|
|
|
2024-03-24 07:50:30 +01:00
|
|
|
[[nodiscard]] WUPSConfigAPIStatus CallMenuClosedCallback() const;
|
2023-12-16 17:36:57 +01:00
|
|
|
|
2024-03-24 07:50:30 +01:00
|
|
|
static std::optional<PluginConfigData> create(WUPSConfigAPIOptions options, WUPSConfigAPI_MenuOpenedCallback openedCallback, WUPSConfigAPI_MenuClosedCallback closedCallback);
|
2023-12-16 17:36:57 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string mName;
|
|
|
|
WUPSConfigAPI_MenuOpenedCallback mOpenedCallback;
|
|
|
|
WUPSConfigAPI_MenuClosedCallback mClosedCallback;
|
|
|
|
};
|