mirror of
https://github.com/wiiu-env/libwuhbutils.git
synced 2024-12-17 22:41:48 +01:00
Add WUHBUtils_GetStatusStr
This commit is contained in:
parent
691d797693
commit
7eda5e5027
@ -49,6 +49,8 @@ typedef enum {
|
|||||||
BundleSource_FileDescriptor_CafeOS, /* The native CafeOS file api will be used, use paths like /vol/external01/my.wuhb */
|
BundleSource_FileDescriptor_CafeOS, /* The native CafeOS file api will be used, use paths like /vol/external01/my.wuhb */
|
||||||
} BundleSource;
|
} BundleSource;
|
||||||
|
|
||||||
|
const char *WUHBUtils_GetStatusStr(WUHBUtilsStatus status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function has to be called before any other function of this lib (except WUHBUtils_GetVersion) can be used.
|
* This function has to be called before any other function of this lib (except WUHBUtils_GetVersion) can be used.
|
||||||
*
|
*
|
||||||
|
@ -16,6 +16,40 @@ static WUHBUtilsApiErrorType (*sWUUFileClose)(WUHBFileHandle)
|
|||||||
static WUHBUtilsApiErrorType (*sWUUFileExists)(const char *, int32_t *) = nullptr;
|
static WUHBUtilsApiErrorType (*sWUUFileExists)(const char *, int32_t *) = nullptr;
|
||||||
static WUHBUtilsApiErrorType (*sWUUGetRPXInfo)(const char *, BundleSource, WUHBRPXInfo *) = nullptr;
|
static WUHBUtilsApiErrorType (*sWUUGetRPXInfo)(const char *, BundleSource, WUHBRPXInfo *) = nullptr;
|
||||||
|
|
||||||
|
const char *WUHBUtils_GetStatusStr(WUHBUtilsStatus status) {
|
||||||
|
switch (status) {
|
||||||
|
case WUHB_UTILS_RESULT_SUCCESS:
|
||||||
|
return "WUHB_UTILS_RESULT_SUCCESS";
|
||||||
|
case WUHB_UTILS_RESULT_MODULE_NOT_FOUND:
|
||||||
|
return "WUHB_UTILS_RESULT_MODULE_NOT_FOUND";
|
||||||
|
case WUHB_UTILS_RESULT_MODULE_MISSING_EXPORT:
|
||||||
|
return "WUHB_UTILS_RESULT_MODULE_MISSING_EXPORT";
|
||||||
|
case WUHB_UTILS_RESULT_UNSUPPORTED_VERSION:
|
||||||
|
return "WUHB_UTILS_RESULT_UNSUPPORTED_VERSION";
|
||||||
|
case WUHB_UTILS_RESULT_INVALID_ARGUMENT:
|
||||||
|
return "WUHB_UTILS_RESULT_INVALID_ARGUMENT";
|
||||||
|
case WUHB_UTILS_RESULT_NO_MEMORY:
|
||||||
|
return "WUHB_UTILS_RESULT_NO_MEMORY";
|
||||||
|
case WUHB_UTILS_RESULT_MOUNT_NAME_TAKEN:
|
||||||
|
return "WUHB_UTILS_RESULT_MOUNT_NAME_TAKEN";
|
||||||
|
case WUHB_UTILS_RESULT_MOUNT_NOT_FOUND:
|
||||||
|
return "WUHB_UTILS_RESULT_MOUNT_NOT_FOUND";
|
||||||
|
case WUHB_UTILS_RESULT_FILE_NOT_FOUND:
|
||||||
|
return "WUHB_UTILS_RESULT_FILE_NOT_FOUND";
|
||||||
|
case WUHB_UTILS_RESULT_FILE_HANDLE_NOT_FOUND:
|
||||||
|
return "WUHB_UTILS_RESULT_FILE_HANDLE_NOT_FOUND";
|
||||||
|
case WUHB_UTILS_RESULT_MOUNT_FAILED:
|
||||||
|
return "WUHB_UTILS_RESULT_MOUNT_FAILED";
|
||||||
|
case WUHB_UTILS_RESULT_LIB_UNINITIALIZED:
|
||||||
|
return "WUHB_UTILS_RESULT_LIB_UNINITIALIZED";
|
||||||
|
case WUHB_UTILS_RESULT_UNKNOWN_ERROR:
|
||||||
|
return "WUHB_UTILS_RESULT_UNKNOWN_ERROR";
|
||||||
|
case WUHB_UTILS_RESULT_UNSUPPORTED_COMMAND:
|
||||||
|
return "WUHB_UTILS_RESULT_UNSUPPORTED_COMMAND";
|
||||||
|
}
|
||||||
|
return "WUHB_UTILS_RESULT_UNKNOWN_ERROR";
|
||||||
|
}
|
||||||
|
|
||||||
static WUHBUtilsVersion wuhbUtilsVersion = WUHB_UTILS_MODULE_VERSION_ERROR;
|
static WUHBUtilsVersion wuhbUtilsVersion = WUHB_UTILS_MODULE_VERSION_ERROR;
|
||||||
|
|
||||||
WUHBUtilsStatus WUHBUtils_InitLibrary() {
|
WUHBUtilsStatus WUHBUtils_InitLibrary() {
|
||||||
|
Loading…
Reference in New Issue
Block a user