[ACR-1810] Deprecate all APIs 63/302963/4 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_dev accepted/tizen_unified_riscv tizen tizen_9.0 accepted/tizen/9.0/unified/20241030.231719 accepted/tizen/unified/20240105.105500 accepted/tizen/unified/dev/20240620.004217 accepted/tizen/unified/riscv/20240106.074921 tizen_9.0_m2_release
authorminje.ahn <minje.ahn@samsung.com>
Mon, 18 Dec 2023 06:09:53 +0000 (15:09 +0900)
committerminje.ahn <minje.ahn@samsung.com>
Wed, 20 Dec 2023 02:29:57 +0000 (11:29 +0900)
Change-Id: I1fb19baaf45b4584fc2479fec235d92ff00a2e49
Signed-off-by: minje.ahn <minje.ahn@samsung.com>
doc/metadata_editor_doc.h
include/metadata_editor.h
include/metadata_editor_private.h
include/metadata_editor_type.h
src/metadata_editor.cpp

index f5161b7dfac76ccce3b5466756d3ef7884593909..cc1f34f621a49d56bf2c84f9aceb21fe5823c43e 100755 (executable)
@@ -25,7 +25,7 @@
  */
 
 /**
- * @defgroup CAPI_MEDIA_METADATA_EDITOR_MODULE Metadata Editor
+ * @defgroup CAPI_MEDIA_METADATA_EDITOR_MODULE Metadata Editor (Deprecated)
  * @ingroup CAPI_MEDIA_FRAMEWORK
  */
 
index 4109ef282494cfa77e064e071503f81711ce7f41..7076e9eb8edba02ac9389530ad0a9f2126a4ec8a 100755 (executable)
@@ -37,6 +37,7 @@ extern "C" {
 
 
 /**
+ * @deprecated Deprecated since 9.0.
  * @brief Creates metadata.
  * @since_tizen 2.4
  *
@@ -49,10 +50,11 @@ extern "C" {
  * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory
  * @see metadata_editor_destroy()
  */
-int metadata_editor_create(metadata_editor_h *metadata);
+int metadata_editor_create(metadata_editor_h *metadata) TIZEN_DEPRECATED_API;
 
 
 /**
+ * @deprecated Deprecated since 9.0.
  * @brief Sets file path to read or write metadata.
  * @since_tizen 2.4
  *
@@ -72,10 +74,11 @@ int metadata_editor_create(metadata_editor_h *metadata);
  * @see metadata_editor_create()
  * @see metadata_editor_destroy()
  */
-int metadata_editor_set_path(metadata_editor_h metadata, const char *path);
+int metadata_editor_set_path(metadata_editor_h metadata, const char *path) TIZEN_DEPRECATED_API;
 
 
 /**
+ * @deprecated Deprecated since 9.0.
  * @brief Gets the metadata corresponding to the attribute.
  * @since_tizen 2.4
  *
@@ -98,10 +101,11 @@ int metadata_editor_set_path(metadata_editor_h metadata, const char *path);
  * @see metadata_editor_set_path()
  * @see metadata_editor_destroy()
  */
-int metadata_editor_get_metadata(metadata_editor_h metadata, metadata_editor_attr_e attribute, char **value);
+int metadata_editor_get_metadata(metadata_editor_h metadata, metadata_editor_attr_e attribute, char **value) TIZEN_DEPRECATED_API;
 
 
 /**
+ * @deprecated Deprecated since 9.0.
  * @brief Sets the attribute of the metadata.
  * @details This function set the attribute of the metadata for updating the metadata. \n
  *            If @a attribute is #METADATA_EDITOR_ATTR_PICTURE_NUM, this function returns #METADATA_EDITOR_ERROR_INVALID_PARAMETER.
@@ -127,10 +131,11 @@ int metadata_editor_get_metadata(metadata_editor_h metadata, metadata_editor_att
  * @see metadata_editor_update_metadata()
  * @see metadata_editor_destroy()
  */
-int metadata_editor_set_metadata(metadata_editor_h metadata, metadata_editor_attr_e attribute, const char *value);
+int metadata_editor_set_metadata(metadata_editor_h metadata, metadata_editor_attr_e attribute, const char *value) TIZEN_DEPRECATED_API;
 
 
 /**
+ * @deprecated Deprecated since 9.0.
  * @brief Updates the modified metadata.
  * @details This function update the metadata in the media file that is modified by metadata_editor_set_metadata().
  * @since_tizen 2.4
@@ -150,9 +155,10 @@ int metadata_editor_set_metadata(metadata_editor_h metadata, metadata_editor_att
  * @see metadata_editor_set_path()
  * @see metadata_editor_destroy()
  */
-int metadata_editor_update_metadata(metadata_editor_h metadata);
+int metadata_editor_update_metadata(metadata_editor_h metadata) TIZEN_DEPRECATED_API;
 
 /**
+ * @deprecated Deprecated since 9.0.
  * @brief Gets the picture in the media file.
  * @details If there is no picture or if the @a index is invalid, this function returns #METADATA_EDITOR_ERROR_INVALID_PARAMETER.\n
  *            You can get picture number by using metadata_editor_get_metadata() and index starts with 0.
@@ -178,9 +184,10 @@ int metadata_editor_update_metadata(metadata_editor_h metadata);
  * @see metadata_editor_set_path()
  * @see metadata_editor_destroy()
  */
-int metadata_editor_get_picture(metadata_editor_h metadata, int index, void **picture, int *size, char **mime_type);
+int metadata_editor_get_picture(metadata_editor_h metadata, int index, void **picture, int *size, char **mime_type) TIZEN_DEPRECATED_API;
 
 /**
+ * @deprecated Deprecated since 9.0.
  * @brief Appends the picture to the media file.
  * @since_tizen 2.4
  *
@@ -207,9 +214,10 @@ int metadata_editor_get_picture(metadata_editor_h metadata, int index, void **pi
  * @see metadata_editor_update_metadata()
  * @see metadata_editor_destroy()
  */
-int metadata_editor_append_picture(metadata_editor_h metadata, const char *picture_path);
+int metadata_editor_append_picture(metadata_editor_h metadata, const char *picture_path) TIZEN_DEPRECATED_API;
 
 /**
+ * @deprecated Deprecated since 9.0.
  * @brief Removes artwork image from media file.
  * @since_tizen 2.4
  *
@@ -231,9 +239,10 @@ int metadata_editor_append_picture(metadata_editor_h metadata, const char *pictu
  * @see metadata_editor_update_metadata()
  * @see metadata_editor_destroy()
  */
-int metadata_editor_remove_picture(metadata_editor_h metadata, int index);
+int metadata_editor_remove_picture(metadata_editor_h metadata, int index) TIZEN_DEPRECATED_API;
 
 /**
+ * @deprecated Deprecated since 9.0.
  * @brief Destroys metadata.
  * @since_tizen 2.4
  *
@@ -245,7 +254,7 @@ int metadata_editor_remove_picture(metadata_editor_h metadata, int index);
  * @pre Create metadata handle by calling metadata_editor_create()
  * @see metadata_editor_create()
  */
-int metadata_editor_destroy(metadata_editor_h metadata);
+int metadata_editor_destroy(metadata_editor_h metadata) TIZEN_DEPRECATED_API;
 
 /**
  * @}
index d194f1836b8cf8b931e64293708ddd0f34ef5e30..317bd2c2ad2b8cc5b21e60c44b37061184c6d201 100755 (executable)
@@ -51,6 +51,10 @@ extern "C" {
                SECURE_LOGD(FONT_COLOR_CYAN"" fmt "" FONT_COLOR_RESET, ##arg);     \
        } while (0)
 
+#define ME_WARN(fmt, arg...) do { \
+               LOGW(FONT_COLOR_GREEN"" fmt "" FONT_COLOR_RESET, ##arg);     \
+       } while (0)
+
 #define ME_RETVM_IF(expr, val, fmt, arg...) do { \
                        if ((expr)) { \
                                LOGE(FONT_COLOR_RED"" fmt "" FONT_COLOR_RESET, ##arg); \
index 4c5b0cc87fc738a458ab5601773d563e31e79ed1..a083b3a85aa5f94d0f14585260536e18eeb8e7c8 100755 (executable)
@@ -41,6 +41,7 @@ extern "C" {
 
 /**
  * @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE
+ * @deprecated Deprecated since 9.0.
  * @brief The enumerations of media metadata error.
  * @since_tizen 2.4
  */
@@ -58,6 +59,7 @@ typedef enum {
 
 /**
  * @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE
+ * @deprecated Deprecated since 9.0.
  * @brief The enumerations of attribute.
  * @since_tizen 2.4
  */
@@ -79,6 +81,7 @@ typedef enum {
 
 /**
  * @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE
+ * @deprecated Deprecated since 9.0.
  * @brief The handle of media metadata.
  * @since_tizen 2.4
  */
index 4bfb53ea103cd445b305325856dfb350864a1f34..09c209671d12aecfe2d472d4f0ec953b0471c94d 100755 (executable)
@@ -38,7 +38,7 @@ using namespace TagLib;
 
 #define MIME_TYPE_JPEG "image/jpeg"
 #define MIME_TYPE_PNG "image/png"
-
+// LCOV_EXCL_START
 static String __get_file_ext(const char *file_path)
 {
        String s = String(file_path, String::UTF8);
@@ -488,6 +488,7 @@ class OggFileTypeResolver : public FileRef::FileTypeResolver {
 
 extern "C" int metadata_editor_create(metadata_editor_h *metadata)
 {
+       ME_WARN("DEPRECATION WARNING: metadata_editor_create() is deprecated and will be removed from next release.");
        ME_RETVM_IF(!metadata, METADATA_EDITOR_ERROR_INVALID_PARAMETER, "Invalid metadata");
 
        metadata_editor_s* _metadata = (metadata_editor_s*)malloc(sizeof(metadata_editor_s));
@@ -500,6 +501,7 @@ extern "C" int metadata_editor_create(metadata_editor_h *metadata)
 
 extern "C" int metadata_editor_destroy(metadata_editor_h metadata)
 {
+       ME_WARN("DEPRECATION WARNING: metadata_editor_destroy() is deprecated and will be removed from next release.");
        auto _metadata = static_cast<metadata_editor_s*>(metadata);
        ME_RETVM_IF(!_metadata, METADATA_EDITOR_ERROR_INVALID_PARAMETER, "Invalid metadata");
 
@@ -512,6 +514,7 @@ extern "C" int metadata_editor_destroy(metadata_editor_h metadata)
 
 extern "C" int metadata_editor_set_path(metadata_editor_h metadata, const char *path)
 {
+       ME_WARN("DEPRECATION WARNING: metadata_editor_set_path() is deprecated and will be removed from next release.");
        int ret = METADATA_EDITOR_ERROR_NONE;
        auto _metadata = static_cast<metadata_editor_s*>(metadata);
        ME_RETVM_IF(!_metadata, METADATA_EDITOR_ERROR_INVALID_PARAMETER, "Invalid metadata");
@@ -547,6 +550,7 @@ extern "C" int metadata_editor_set_path(metadata_editor_h metadata, const char *
 
 extern "C" int metadata_editor_append_picture(metadata_editor_h metadata, const char *path)
 {
+       ME_WARN("DEPRECATION WARNING: metadata_editor_append_picture() is deprecated and will be removed from next release.");
        int ret = METADATA_EDITOR_ERROR_NONE;
        auto _metadata = static_cast<metadata_editor_s*>(metadata);
        ME_RETV_IF(__is_valid_handle(_metadata, true), METADATA_EDITOR_ERROR_INVALID_PARAMETER);
@@ -562,6 +566,7 @@ extern "C" int metadata_editor_append_picture(metadata_editor_h metadata, const
 
 extern "C" int metadata_editor_remove_picture(metadata_editor_h metadata, int index)
 {
+       ME_WARN("DEPRECATION WARNING: metadata_editor_remove_picture() is deprecated and will be removed from next release.");
        auto _metadata = static_cast<metadata_editor_s*>(metadata);
        ME_RETV_IF(__is_valid_handle(_metadata, true), METADATA_EDITOR_ERROR_INVALID_PARAMETER);
 
@@ -570,6 +575,7 @@ extern "C" int metadata_editor_remove_picture(metadata_editor_h metadata, int in
 
 extern "C" int metadata_editor_get_picture(metadata_editor_h metadata, int index, void **picture, int *size, char **mime_type)
 {
+       ME_WARN("DEPRECATION WARNING: metadata_editor_get_picture() is deprecated and will be removed from next release.");
        auto _metadata = static_cast<metadata_editor_s*>(metadata);
        ME_RETV_IF(__is_valid_handle(_metadata, false), METADATA_EDITOR_ERROR_INVALID_PARAMETER);
        ME_RETVM_IF(!picture, METADATA_EDITOR_ERROR_INVALID_PARAMETER, "Invalid picture");
@@ -613,6 +619,7 @@ static const char * __get_attr_str(metadata_editor_attr_e attribute)
 
 extern "C" int metadata_editor_set_metadata(metadata_editor_h metadata, metadata_editor_attr_e attribute, const char *value)
 {
+       ME_WARN("DEPRECATION WARNING: metadata_editor_set_metadata() is deprecated and will be removed from next release.");
        auto _metadata = static_cast<metadata_editor_s*>(metadata);
        ME_RETV_IF(__is_valid_handle(_metadata, true), METADATA_EDITOR_ERROR_INVALID_PARAMETER);
 
@@ -621,6 +628,7 @@ extern "C" int metadata_editor_set_metadata(metadata_editor_h metadata, metadata
 
 extern "C" int metadata_editor_get_metadata(metadata_editor_h metadata, metadata_editor_attr_e attribute, char **value)
 {
+       ME_WARN("DEPRECATION WARNING: metadata_editor_get_metadata() is deprecated and will be removed from next release.");
        auto _metadata = static_cast<metadata_editor_s*>(metadata);
        ME_RETV_IF(__is_valid_handle(_metadata, false), METADATA_EDITOR_ERROR_INVALID_PARAMETER);
        ME_RETVM_IF(!value, METADATA_EDITOR_ERROR_INVALID_PARAMETER, "Invalid value");
@@ -636,6 +644,7 @@ extern "C" int metadata_editor_get_metadata(metadata_editor_h metadata, metadata
 
 extern "C" int metadata_editor_update_metadata(metadata_editor_h metadata)
 {
+       ME_WARN("DEPRECATION WARNING: metadata_editor_update_metadata() is deprecated and will be removed from next release.");
        auto _metadata = static_cast<metadata_editor_s*>(metadata);
        ME_RETV_IF(__is_valid_handle(_metadata, true), METADATA_EDITOR_ERROR_INVALID_PARAMETER);
 
@@ -643,4 +652,5 @@ extern "C" int metadata_editor_update_metadata(metadata_editor_h metadata)
                return METADATA_EDITOR_ERROR_OPERATION_FAILED;
 
        return METADATA_EDITOR_ERROR_NONE;
-}
\ No newline at end of file
+}
+// LCOV_EXCL_STOP
\ No newline at end of file