Fix enum resource_error_e to be exported 83/321583/1
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 25 Mar 2025 09:01:14 +0000 (18:01 +0900)
committeryoungjae cho <y0.cho@samsung.com>
Tue, 25 Mar 2025 09:29:18 +0000 (09:29 +0000)
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 <cpu-boosting.h> 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 <y0.cho@samsung.com>
(cherry picked from commit 86ab6acf2720e37e7b27384b11fed3f388935575)

include/common.h
include/cpu-boosting-type.h

index 14086f74ee9a3b990d2fdec7880593fb0a777af5..a399b0c803b86e4f819bb049c4abe99693b3769b 100644 (file)
@@ -24,7 +24,6 @@
 #define __TIZEN_SYSTEM_COMMON_H__
 
 #include <dlog.h>
-#include <tizen.h>
 
 #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
index 8c7fcd89342b72d8d79f92e6f0ec6b32679922b9..2035b0ceffccc17e9921a4665bad8b6cfe5c1954 100644 (file)
 #define __TIZEN_SYSTEM_CPU_BOOSTING_TYPE_H__
 
 #include <sys/types.h>
+#include <tizen.h>
 
 #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