Add coreinit/cosreport.h (#131)

* Add coreinit/cosreport.h
- add enum COSReportLevel
- add enum COSReportModule
- add function COSVReport
- add function COSError
- add function COSInfo
- add function COSVerbose
- add function COSWarn

see decaf for reference:
- dcd9bd1a08/src/libdecaf/src/cafe/libraries/coreinit/coreinit_cosreport.h
- 1dc2c3a278/src/libdecaf/src/cafe/libraries/coreinit/coreinit_enum.h

* Fix formatting in coreinit/cosreport.h

* coreinit/cosreport.h: Fix enum declarations

* Add coreinit/cosreport.h to the testsuite
This commit is contained in:
Maschell 2020-05-07 15:50:21 +02:00 committed by GitHub
parent a0412a90da
commit e2e877decd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,59 @@
#pragma once
#include <wut.h>
/**
* \defgroup coreinit_cosreport COS Report
* \ingroup coreinit
*
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef enum COSReportLevel{
COS_REPORT_LEVEL_ERROR = 0,
COS_REPORT_LEVEL_WARN = 1,
COS_REPORT_LEVEL_INFO = 2,
COS_REPORT_LEVEL_VERBOSE = 3
} COSReportLevel;
typedef enum COSReportModule{
COS_REPORT_MODULE_UNKNOWN_0 = 0,
COS_REPORT_MODULE_UNKNOWN_1 = 1,
COS_REPORT_MODULE_UNKNOWN_2 = 2,
COS_REPORT_MODULE_UNKNOWN_5 = 5
} COSReportModule;
void
COSVReport(COSReportModule module,
COSReportLevel level,
const char* fmt,
...);
void
COSError(COSReportModule module,
const char* fmt,
...);
void
COSInfo(COSReportModule module,
const char* fmt,
...);
void
COSVerbose(COSReportModule module,
const char* fmt,
...);
void
COSWarn(COSReportModule module,
const char* fmt,
...);
#ifdef __cplusplus
}
#endif
/** @} */

View File

@ -8,6 +8,7 @@
#include <coreinit/context.h>
#include <coreinit/core.h>
#include <coreinit/coroutine.h>
#include <coreinit/cosreport.h>
#include <coreinit/debug.h>
#include <coreinit/dynload.h>
#include <coreinit/energysaver.h>