2023-12-16 17:36:57 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <optional>
|
|
|
|
#include <string>
|
2024-11-27 20:44:36 +01:00
|
|
|
#include <wups/config.h>
|
2023-12-16 17:36:57 +01:00
|
|
|
#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-11-27 20:44:36 +01:00
|
|
|
[[nodiscard]] WUPSConfigAPIStatus CallMenuOpenedCallback(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;
|
|
|
|
};
|