Fix native API header 71/236471/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Wed, 17 Jun 2020 08:13:25 +0000 (17:13 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Wed, 17 Jun 2020 08:14:50 +0000 (17:14 +0900)
Fix errors from native API header rule checker.

Change-Id: I9a5dcc3d40b19932cc2379daa9e8ae0151417019
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/api/theme.cc
src/api/theme.h
src/api/theme_error.h
src/api/theme_loader.cc
src/api/theme_loader.h
test/unit_tests/test_theme.cc

index a730fab..7b2cde4 100644 (file)
@@ -43,14 +43,14 @@ using namespace ttm::loader;
 extern "C" EXPORT_API int theme_get_id(theme_h handle, char** id) {
   if (handle == nullptr || id == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
   char* id_raw = strdup(p->GetId().c_str());
   if (id_raw == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   *id = id_raw;
@@ -60,14 +60,14 @@ extern "C" EXPORT_API int theme_get_id(theme_h handle, char** id) {
 extern "C" EXPORT_API int theme_get_version(theme_h handle, char** ver) {
   if (handle == nullptr || ver == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
   char* ver_raw = strdup(p->GetVersion().c_str());
   if (ver_raw == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   *ver = ver_raw;
@@ -77,14 +77,14 @@ extern "C" EXPORT_API int theme_get_version(theme_h handle, char** ver) {
 extern "C" EXPORT_API int theme_get_tool_version(theme_h handle, char** ver) {
   if (handle == nullptr || ver == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
   char* ver_raw = strdup(p->GetToolVersion().c_str());
   if (ver_raw == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   *ver = ver_raw;
@@ -94,14 +94,14 @@ extern "C" EXPORT_API int theme_get_tool_version(theme_h handle, char** ver) {
 extern "C" EXPORT_API int theme_get_title(theme_h handle, char** title) {
   if (handle == nullptr || title == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
   char* title_raw = strdup(p->GetTitle().c_str());
   if (title_raw == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   *title = title_raw;
@@ -112,14 +112,14 @@ extern "C" EXPORT_API int theme_get_resolution(theme_h handle,
     char** resolution) {
   if (handle == nullptr || resolution == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
   char* resolution_raw = strdup(p->GetResolution().c_str());
   if (resolution_raw == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   *resolution = resolution_raw;
@@ -129,14 +129,14 @@ extern "C" EXPORT_API int theme_get_resolution(theme_h handle,
 extern "C" EXPORT_API int theme_get_preview(theme_h handle, char** preview) {
   if (handle == nullptr || preview == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
   char* preview_raw = strdup(p->GetPreview().c_str());
   if (preview_raw == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   *preview = preview_raw;
@@ -147,14 +147,14 @@ extern "C" EXPORT_API int theme_get_description(
     theme_h handle, char** description) {
   if (handle == nullptr || description == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
   char* description_raw = strdup(p->GetDescription().c_str());
   if (description_raw == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   *description = description_raw;
@@ -165,19 +165,19 @@ extern "C" EXPORT_API int theme_get_string(theme_h handle,
     const char* key, char** val) {
   if (handle == nullptr || key == nullptr || val == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
   auto value = p->GetString(std::string(key));
   if (value.empty()) {
     LOG(ERROR) << "Failed to get string with given key";
-    return THEME_MANAGER_IO_ERROR;
+    return THEME_MANAGER_ERROR_IO_ERROR;
   }
   char* value_raw = strdup(value.c_str());
   if (value_raw == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   *val = value_raw;
@@ -189,7 +189,7 @@ extern "C" EXPORT_API int theme_get_string_array(theme_h handle,
   if (handle == nullptr || key == nullptr ||
       val == nullptr || cnt == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
@@ -204,7 +204,7 @@ extern "C" EXPORT_API int theme_get_string_array(theme_h handle,
       calloc(values.size(), sizeof(*values_raw)));
   if (values_raw == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   int idx = 0;
@@ -215,7 +215,7 @@ extern "C" EXPORT_API int theme_get_string_array(theme_h handle,
       for (int i = 0; i < idx; i++)
         free(values_raw[i]);
       free(values_raw);
-      return THEME_MANAGER_OUT_OF_MEMORY;
+      return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
     }
     values_raw[idx] = val_char;
     idx++;
@@ -230,7 +230,7 @@ extern "C" EXPORT_API int theme_get_int(theme_h handle, const char* key,
     int* val) {
   if (handle == nullptr || key == nullptr || val == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
@@ -243,7 +243,7 @@ extern "C" EXPORT_API int theme_get_float(theme_h handle, const char* key,
     float* val) {
   if (handle == nullptr || key == nullptr || val == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
@@ -256,7 +256,7 @@ extern "C" EXPORT_API int theme_get_bool(theme_h handle, const char* key,
     bool* val) {
   if (handle == nullptr || key == nullptr || val == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto p = *static_cast<std::shared_ptr<ThemeInfo>*>(handle);
@@ -268,7 +268,7 @@ extern "C" EXPORT_API int theme_get_bool(theme_h handle, const char* key,
 extern "C" EXPORT_API int theme_clone(theme_h handle, theme_h* new_handle) {
   if (handle == nullptr || new_handle == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto* p = static_cast<std::shared_ptr<ThemeInfo>*>(handle);
@@ -281,7 +281,7 @@ extern "C" EXPORT_API int theme_clone(theme_h handle, theme_h* new_handle) {
 extern "C" EXPORT_API int theme_destroy(theme_h handle) {
   if (handle == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto* p = static_cast<std::shared_ptr<ThemeInfo>*>(handle);
index d2fa310..4e87ce8 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef THEME_API_THEME_H_
-#define THEME_API_THEME_H_
+#ifndef __TIZEN_APPFW_THEME_MANAGER_THEME_H__
+#define __TIZEN_APPFW_THEME_MANAGER_THEME_H__
 
 
 #ifdef __cplusplus
@@ -234,4 +234,4 @@ int theme_destroy(theme_h handle);
 #ifdef __cplusplus
 }
 #endif
-#endif  /* THEME_API_THEME_H_ */
+#endif  /* __TIZEN_APPFW_THEME_MANAGER_THEME_H__ */
index 50bb97e..ad1492e 100644 (file)
@@ -15,8 +15,8 @@
  */
 
 
-#ifndef THEME_API_THEME_ERROR_H_
-#define THEME_API_THEME_ERROR_H_
+#ifndef __TIZEN_APPFW_THEME_MANAGER_THEME_ERROR_H__
+#define __TIZEN_APPFW_THEME_MANAGER_THEME_ERROR_H__
 
 
 #include <tizen.h>
  */
 typedef enum _theme_manager_error {
   THEME_MANAGER_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
-  THEME_MANAGER_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
-  THEME_MANAGER_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
-  THEME_MANAGER_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
-  THEME_MANAGER_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+  THEME_MANAGER_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+  THEME_MANAGER_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+  THEME_MANAGER_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
+  THEME_MANAGER_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
 } theme_manager_error_e;
 
 
@@ -51,4 +51,4 @@ typedef enum _theme_manager_error {
  */
 
 
-#endif  // THEME_API_THEME_ERROR_H_
+#endif  /* __TIZEN_APPFW_THEME_MANAGER_THEME_ERROR_H__ */
index 0e647e8..e2c4837 100644 (file)
@@ -68,14 +68,14 @@ class ThemeEventHandler : public IThemeEvent {
 extern "C" EXPORT_API int theme_loader_create(theme_loader_h* handle) {
   if (handle == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto* p = new std::shared_ptr<ThemeInfoLoader>(
       std::make_shared<ThemeInfoLoader>());
   if (p == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   *handle = static_cast<theme_loader_h>(p);
@@ -86,7 +86,7 @@ extern "C" EXPORT_API int theme_loader_create(theme_loader_h* handle) {
 extern "C" EXPORT_API int theme_loader_destroy(theme_loader_h handle) {
   if (handle == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   std::shared_ptr<ThemeInfoLoader>* p =
@@ -100,7 +100,7 @@ extern "C" EXPORT_API int theme_loader_load_current(theme_loader_h handle,
     theme_h* cur_theme) {
   if (handle == nullptr || cur_theme == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   std::shared_ptr<ThemeInfoLoader>* p =
@@ -115,7 +115,7 @@ extern "C" EXPORT_API int theme_loader_load(theme_loader_h handle,
     const char* id, theme_h* theme) {
   if (handle == nullptr || id == nullptr || theme == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   std::shared_ptr<ThemeInfoLoader>* p
@@ -130,7 +130,7 @@ extern "C" EXPORT_API int theme_loader_query_id(theme_loader_h handle,
     char*** ids, int* count) {
   if (handle == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   std::shared_ptr<ThemeInfoLoader>* p =
@@ -141,7 +141,7 @@ extern "C" EXPORT_API int theme_loader_query_id(theme_loader_h handle,
       calloc(id_list.size(), sizeof(*ids_raw)));
   if (ids_raw == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   int idx = 0;
@@ -152,7 +152,7 @@ extern "C" EXPORT_API int theme_loader_query_id(theme_loader_h handle,
       for (int i = 0; i < idx; i++)
         free(ids_raw[i]);
       free(ids_raw);
-      return THEME_MANAGER_OUT_OF_MEMORY;
+      return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
     }
 
     ids_raw[idx++] = id_char;
@@ -165,18 +165,18 @@ extern "C" EXPORT_API int theme_loader_query_id(theme_loader_h handle,
 
 extern "C" EXPORT_API int theme_loader_add_event(theme_loader_h handle,
     theme_loader_loaded_cb loaded, theme_loader_unloaded_cb unloaded,
-    void* data, theme_loader_event_h* event_h) {
+    void* user_data, theme_loader_event_h* event_h) {
   if (handle == nullptr || loaded == nullptr ||
       unloaded == nullptr || event_h == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   std::shared_ptr<IThemeEvent> event_handler(new ThemeEventHandler(
-      loaded, unloaded, data));
+      loaded, unloaded, user_data));
   if (event_handler.get() == nullptr) {
     LOG(ERROR) << "Out of memory";
-    return THEME_MANAGER_OUT_OF_MEMORY;
+    return THEME_MANAGER_ERROR_OUT_OF_MEMORY;
   }
 
   std::shared_ptr<ThemeInfoLoader>* p =
@@ -191,7 +191,7 @@ extern "C" EXPORT_API int theme_loader_remove_event(theme_loader_h handle,
     theme_loader_event_h event_handle) {
   if (handle == nullptr || event_handle == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   std::shared_ptr<ThemeInfoLoader>* p =
@@ -207,7 +207,7 @@ extern "C" EXPORT_API int theme_loader_set_current(
     theme_loader_h handle, const char* id) {
   if (handle == nullptr || id == nullptr) {
     LOG(ERROR) << "Invalid parameter";
-    return THEME_MANAGER_INVALID_PARAMETER;
+    return THEME_MANAGER_ERROR_INVALID_PARAMETER;
   }
 
   auto* p = static_cast<ThemeInfoLoader*>(handle);
index ff2faee..dd9fdc1 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef THEME_API_THEME_LOADER_H_
-#define THEME_API_THEME_LOADER_H_
+#ifndef __TIZEN_APPFW_THEME_MANAGER_THEME_LOADER_H__
+#define __TIZEN_APPFW_THEME_MANAGER_THEME_LOADER_H__
 
 #include <theme.h>
 
@@ -35,28 +35,30 @@ extern "C" {
 /**
  * @brief Called to get the loaded theme information.
  * @since_tizen 6.0
- * @remark @handle is valid only inside this function. If you want to keep it,
+ * @remarks The @a handle should not be released
+ * @remarks @handle is valid only inside this function. If you want to keep it,
  *         please use theme_clone().
  * @param[in] handle    The loaded theme information.
- * @param[in] data      The user data passed from add event function.
+ * @param[in] user_data The user data passed from add event function.
  * @return @c 0 on success,
  *         otherwise a negative value.
  * @pre theme_loader_add_event() will invoke this callback.
  * @see theme_loader_add_event()
  */
-typedef int (*theme_loader_loaded_cb) (theme_h handle, void *data);
+typedef int (*theme_loader_loaded_cb) (theme_h handle, void *user_data);
 
 /**
  * @brief Called to get the unloaded theme ID.
  * @since_tizen 6.0
+ * @remarks The @a id can be used only in the callback. To use outside, make a copy.
  * @param[in] id        The ID of unloaded theme.
- * @param[in] data      The user data passed from add event function.
+ * @param[in] user_data The user data passed from add event function.
  * @return @c 0 on success,
  *         otherwise a negative value.
  * @pre theme_loader_add_event() will invoke this callback.
  * @see theme_loader_add_event()
  */
-typedef int (*theme_loader_unloaded_cb) (const char *id, void *data);
+typedef int (*theme_loader_unloaded_cb) (const char *id, void *user_data);
 
 /**
  * @brief The theme loader handle.
@@ -100,9 +102,9 @@ int theme_loader_destroy(theme_loader_h handle);
  * @brief Registers a callback function to be invoked when the theme is being loaded or unloaded.
  * @since_tizen 6.0
  * @param[in] handle    The theme loader handle
- * @param[in] loaded   The callback function to be registered for theme load event
- * @param[in] unloaded   The callback function to be registered for theme unload event
- * @param[in] data  The user data to be passed to the callback function
+ * @param[in] loaded    The callback function to be registered for theme load event
+ * @param[in] unloaded  The callback function to be registered for theme unload event
+ * @param[in] user_data The user data to be passed to the callback function
  * @param[out] event_h  The theme event handle
  * @return @c 0 on success,
  *         otherwise a negative error value
@@ -113,7 +115,7 @@ int theme_loader_destroy(theme_loader_h handle);
 */
 int theme_loader_add_event(theme_loader_h handle,
     theme_loader_loaded_cb loaded, theme_loader_unloaded_cb unloaded,
-    void *data, theme_loader_event_h* event_h);
+    void *user_data, theme_loader_event_h* event_h);
 
 /**
  * @brief Unregisters a callback function.
@@ -159,6 +161,7 @@ int theme_loader_load(theme_loader_h handle, const char *id, theme_h *theme);
 /**
  * @brief Gets bundle of theme IDs.
  * @since_tizen 6.0
+ * @remarks The @a ids should be released using free().
  * @param[in]  handle         The theme loader handle
  * @param[out] ids            The theme IDs
  * @param[out] count          The number of IDs
@@ -171,7 +174,7 @@ int theme_loader_load(theme_loader_h handle, const char *id, theme_h *theme);
 int theme_loader_query_id(theme_loader_h handle, char ***ids, int *count);
 
 /**
- * @brief Sets theme which has given ID
+ * @brief Sets theme which has given ID.
  * @since_tizen 6.0
  * @param[in] handle         The theme loader handle
  * @param[in] id             The ID of theme to be set
@@ -185,4 +188,4 @@ int theme_loader_set_current(theme_loader_h handle, const char *id);
 #ifdef __cplusplus
 }
 #endif
-#endif  // THEME_API_THEME_LOADER_H_
+#endif  /* __TIZEN_APPFW_THEME_MANAGER_THEME_LOADER_H__ */
index f73d54c..817fdb9 100644 (file)
@@ -63,7 +63,7 @@ TEST_F(ThemeTest, Theme_GetId_N) {
   char *id;
   int ret = theme_get_id(nullptr, &id);
 
-  EXPECT_EQ(ret, THEME_MANAGER_INVALID_PARAMETER);
+  EXPECT_EQ(ret, THEME_MANAGER_ERROR_INVALID_PARAMETER);
 }
 
 TEST_F(ThemeTest, Theme_GetVersion) {
@@ -83,7 +83,7 @@ TEST_F(ThemeTest, Theme_GetVersion_N) {
   char *version;
   int ret = theme_get_version(nullptr, &version);
 
-  EXPECT_EQ(ret, THEME_MANAGER_INVALID_PARAMETER);
+  EXPECT_EQ(ret, THEME_MANAGER_ERROR_INVALID_PARAMETER);
 }
 
 TEST_F(ThemeTest, Theme_GetToolVersion) {
@@ -104,7 +104,7 @@ TEST_F(ThemeTest, Theme_GetToolVersion_N) {
   char *version;
   int ret = theme_get_tool_version(nullptr, &version);
 
-  EXPECT_EQ(ret, THEME_MANAGER_INVALID_PARAMETER);
+  EXPECT_EQ(ret, THEME_MANAGER_ERROR_INVALID_PARAMETER);
 }
 
 TEST_F(ThemeTest, Theme_GetTitle) {
@@ -126,7 +126,7 @@ TEST_F(ThemeTest, Theme_GetTitle_N) {
   char *title;
   int ret = theme_get_title(nullptr, &title);
 
-  EXPECT_EQ(ret, THEME_MANAGER_INVALID_PARAMETER);
+  EXPECT_EQ(ret, THEME_MANAGER_ERROR_INVALID_PARAMETER);
 }
 
 TEST_F(ThemeTest, Theme_GetResolution) {
@@ -145,7 +145,7 @@ TEST_F(ThemeTest, Theme_GetResolution_N) {
   char *resolution;
   int ret = theme_get_title(nullptr, &resolution);
 
-  EXPECT_EQ(ret, THEME_MANAGER_INVALID_PARAMETER);
+  EXPECT_EQ(ret, THEME_MANAGER_ERROR_INVALID_PARAMETER);
 }
 
 TEST_F(ThemeTest, Theme_GetPreview) {
@@ -166,7 +166,7 @@ TEST_F(ThemeTest, Theme_GetPreview_N) {
   char *preview;
   int ret = theme_get_preview(nullptr, &preview);
 
-  EXPECT_EQ(ret, THEME_MANAGER_INVALID_PARAMETER);
+  EXPECT_EQ(ret, THEME_MANAGER_ERROR_INVALID_PARAMETER);
 }
 
 TEST_F(ThemeTest, Theme_GetDescription) {
@@ -187,5 +187,5 @@ TEST_F(ThemeTest, Theme_GetDescription_N) {
   char *description;
   int ret = theme_get_description(nullptr, &description);
 
-  EXPECT_EQ(ret, THEME_MANAGER_INVALID_PARAMETER);
-}
\ No newline at end of file
+  EXPECT_EQ(ret, THEME_MANAGER_ERROR_INVALID_PARAMETER);
+}