mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2024-11-16 07:39:24 +01:00
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <wups/config.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct ConfigItemStub {
|
|
WUPSConfigItemHandle handle;
|
|
} ConfigItemStub;
|
|
|
|
WUPSConfigAPIStatus WUPSConfigItemStub_Create(const char *displayName,
|
|
WUPSConfigItemHandle *outHandle);
|
|
|
|
/**
|
|
* @brief Adds a stub item to a category to display information
|
|
*
|
|
* @param cat The handle of the category to which the item should be added.
|
|
* @param displayName The display name of the item.
|
|
* @return true if the item was added successfully, false otherwise.
|
|
*/
|
|
WUPSConfigAPIStatus
|
|
WUPSConfigItemStub_AddToCategory(WUPSConfigCategoryHandle cat, const char *displayName);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#ifdef __cplusplus
|
|
|
|
#include "WUPSConfigItem.h"
|
|
#include <optional>
|
|
#include <stdexcept>
|
|
#include <string>
|
|
#include <wups/config_api.h>
|
|
|
|
class WUPSConfigItemStub : public WUPSConfigItem {
|
|
public:
|
|
static std::optional<WUPSConfigItemStub> Create(std::string_view displayName,
|
|
WUPSConfigAPIStatus &err) noexcept;
|
|
|
|
static WUPSConfigItemStub Create(std::string_view displayName);
|
|
|
|
private:
|
|
explicit WUPSConfigItemStub(WUPSConfigItemHandle itemHandle) : WUPSConfigItem(itemHandle) {
|
|
}
|
|
};
|
|
#endif
|