From e2e877decd4fee57e0c4f69fba2840771da108b6 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 7 May 2020 15:50:21 +0200 Subject: [PATCH] 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: - https://github.com/decaf-emu/decaf-emu/blob/dcd9bd1a084ac2806676ea1197c500edfe987f5a/src/libdecaf/src/cafe/libraries/coreinit/coreinit_cosreport.h - https://github.com/decaf-emu/decaf-emu/blob/1dc2c3a27832c4c0bcfb6dcac3ce0e64532ddf62/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 --- include/coreinit/cosreport.h | 59 +++++++++++++++++++ .../test_compile_headers_list.h | 1 + 2 files changed, 60 insertions(+) create mode 100644 include/coreinit/cosreport.h diff --git a/include/coreinit/cosreport.h b/include/coreinit/cosreport.h new file mode 100644 index 00000000..a3d40fe0 --- /dev/null +++ b/include/coreinit/cosreport.h @@ -0,0 +1,59 @@ +#pragma once +#include + +/** + * \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 + +/** @} */ \ No newline at end of file diff --git a/tests/test_compile_headers_common/test_compile_headers_list.h b/tests/test_compile_headers_common/test_compile_headers_list.h index 547fb74f..34ffba6d 100644 --- a/tests/test_compile_headers_common/test_compile_headers_list.h +++ b/tests/test_compile_headers_common/test_compile_headers_list.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include