mirror of
https://github.com/wiiu-env/libsdutils.git
synced 2024-11-21 18:49:15 +01:00
Add SDUtils_GetStatusStr
This commit is contained in:
parent
77c4c30d6f
commit
aa469e5fa3
@ -32,6 +32,8 @@ typedef void (*SDAttachHandlerFn)(SDUtilsAttachStatus status);
|
||||
|
||||
typedef void (*SDCleanUpHandlesHandlerFn)();
|
||||
|
||||
const char *SDUtils_GetStatusStr(SDUtilsStatus status);
|
||||
|
||||
/**
|
||||
* Initializes the SDUtils library. This must be call before any other function can be called
|
||||
* @return SDUTILS_RESULT_SUCCESS on success, the functions of this lib can be used <br>
|
||||
|
@ -14,6 +14,34 @@ static bool (*sSDUtilsRemoveAttachHandler)(SDAttachHandlerFn) = nullptr;
|
||||
static bool (*sSDUtilsAddCleanUpHandlesHandler)(SDCleanUpHandlesHandlerFn) = nullptr;
|
||||
static bool (*sSDUtilsRemoveCleanUpHandlesHandler)(SDCleanUpHandlesHandlerFn) = nullptr;
|
||||
|
||||
const char *SDUtils_GetStatusStr(SDUtilsStatus status) {
|
||||
switch (status) {
|
||||
case SDUTILS_RESULT_SUCCESS:
|
||||
return "SDUTILS_RESULT_SUCCESS";
|
||||
case SDUTILS_RESULT_MODULE_NOT_FOUND:
|
||||
return "SDUTILS_RESULT_MODULE_NOT_FOUND";
|
||||
case SDUTILS_RESULT_MODULE_MISSING_EXPORT:
|
||||
return "SDUTILS_RESULT_MODULE_MISSING_EXPORT";
|
||||
case SDUTILS_RESULT_MAX_CALLBACKS:
|
||||
return "SDUTILS_RESULT_MAX_CALLBACKS";
|
||||
case SDUTILS_RESULT_NOT_FOUND:
|
||||
return "SDUTILS_RESULT_NOT_FOUND";
|
||||
case SDUTILS_RESULT_INVALID_ARGUMENT:
|
||||
return "SDUTILS_RESULT_INVALID_ARGUMENT";
|
||||
case SDUTILS_RESULT_FAILED:
|
||||
return "SDUTILS_RESULT_FAILED";
|
||||
case SDUTILS_RESULT_LIB_UNINITIALIZED:
|
||||
return "SDUTILS_RESULT_LIB_UNINITIALIZED";
|
||||
case SDUTILS_RESULT_UNSUPPORTED_VERSION:
|
||||
return "SDUTILS_RESULT_UNSUPPORTED_VERSION";
|
||||
case SDUTILS_RESULT_UNSUPPORTED_COMMAND:
|
||||
return "SDUTILS_RESULT_UNSUPPORTED_COMMAND";
|
||||
case SDUTILS_RESULT_UNKNOWN_ERROR:
|
||||
return "SDUTILS_RESULT_UNKNOWN_ERROR";
|
||||
}
|
||||
return "SDUTILS_RESULT_UNKNOWN_ERROR";
|
||||
}
|
||||
|
||||
static SDUtilsVersion sSDUtilsVersion = SD_UTILS_MODULE_VERSION_ERROR;
|
||||
|
||||
SDUtilsStatus SDUtils_InitLibrary() {
|
||||
|
Loading…
Reference in New Issue
Block a user