From: Youngjae Cho Date: Tue, 25 Mar 2025 09:01:14 +0000 (+0900) Subject: Fix enum resource_error_e to be exported X-Git-Tag: accepted/tizen/unified/20250326.130859^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86ab6acf2720e37e7b27384b11fed3f388935575;p=platform%2Fcore%2Fapi%2Fresource.git Fix enum resource_error_e to be exported The cpu-boosting.h has described its return value as a type of enum resource_error_e, but the header hasn't included the actual definition. Rather, the definition was at the common.h that was a header not being exported. This caused build error where the only was included as a header for cpu boosting. To fix it, move the definition to cpu-boosting-type.h. /home/abuild/rpmbuild/BUILD/dbus-tools-0.1/stress-test/src/test-main.c:127:28: error: 'RESOURCE_ERROR_NONE' undeclared (first use in this function); did you mean 'G_IO_ERROR_NONE'? 127 | if (ret != RESOURCE_ERROR_NONE) { | ^~~~~~~~~~~~~~~~~~~ | G_IO_ERROR_NONE Change-Id: Ibcc59281a28e03cf1a16c8f3a4f466ebb16f465a Signed-off-by: Youngjae Cho --- diff --git a/include/common.h b/include/common.h index 14086f7..a399b0c 100644 --- a/include/common.h +++ b/include/common.h @@ -24,7 +24,6 @@ #define __TIZEN_SYSTEM_COMMON_H__ #include -#include #ifdef __cplusplus extern "C" { @@ -50,16 +49,6 @@ extern "C" { #define API __attribute__ ((visibility ("default"))) #endif -typedef enum { - RESOURCE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */ - RESOURCE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_INVALID_OPERATION, /**< Not supported */ - RESOURCE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - RESOURCE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - RESOURCE_ERROR_OPERATION_FAILED = TIZEN_ERROR_IO_ERROR, /**< Operation failed */ - RESOURCE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ - RESOURCE_ERROR_NO_SUCH_FILE = TIZEN_ERROR_NO_SUCH_FILE /**< No such file */ -} resource_error_e; - #ifdef __cplusplus } #endif diff --git a/include/cpu-boosting-type.h b/include/cpu-boosting-type.h index 8c7fcd8..2035b0c 100644 --- a/include/cpu-boosting-type.h +++ b/include/cpu-boosting-type.h @@ -24,11 +24,26 @@ #define __TIZEN_SYSTEM_CPU_BOOSTING_TYPE_H__ #include +#include #ifdef __cplusplus extern "C" { #endif +/** + * @brief Enumeration for cpu boosting error. + * @since_tizen 6.5 + */ +typedef enum { + RESOURCE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */ + RESOURCE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_INVALID_OPERATION, /**< Not supported */ + RESOURCE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + RESOURCE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ + RESOURCE_ERROR_OPERATION_FAILED = TIZEN_ERROR_IO_ERROR, /**< Operation failed */ + RESOURCE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ + RESOURCE_ERROR_NO_SUCH_FILE = TIZEN_ERROR_NO_SUCH_FILE /**< No such file */ +} resource_error_e; + /** * @brief Enumeration for cpu boosting flag. * @since_tizen 6.5