[ACR-1736] Remove deprecated APIs 53/282453/2 accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/8.0/unified/20231005.092906 accepted/tizen/unified/20230221.085051 tizen_8.0_m2_release
authorminje.ahn <minje.ahn@samsung.com>
Tue, 4 Oct 2022 03:43:30 +0000 (12:43 +0900)
committerminje.ahn <minje.ahn@samsung.com>
Thu, 5 Jan 2023 01:14:37 +0000 (10:14 +0900)
Change-Id: I8741271b4b496ed82d0db51ca9bce74fb064f31e
Signed-off-by: minje.ahn <minje.ahn@samsung.com>
CMakeLists.txt
include/thumbnail_util.h
include/thumbnail_util_private.h [deleted file]
include/thumbnail_util_type.h
packaging/capi-media-thumbnail-util.spec
src/thumbnail_util.c

index 5761e67e886b02441fe720cadf267cc24c3fedd2..5ad6e593a357deb6e06e3e003b3cc1002f625ab1 100755 (executable)
@@ -26,7 +26,7 @@ SET(submodule "thumbnail-util")
 SET(fw_name "${project_prefix}-${service}-${submodule}")
 
 # for package file
-SET(dependents "dlog glib-2.0 capi-base-common media-thumbnail libmedia-utils")
+SET(dependents "capi-base-common media-thumbnail libmedia-utils")
 SET(pc_dependents "capi-base-common")
 
 PROJECT(${fw_name})
index 9132d7227bf2a0163a3a11960c6ceaaf064201d2..64d47663ae87ccfc28f63b33437ff2a8e22d861d 100755 (executable)
@@ -34,148 +34,6 @@ extern "C" {
  * @{
  */
 
-/**
- * @deprecated Deprecated since 5.0.
- * @brief Creates thumbnail info handle.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- * @remarks The @a thumb info should be released using thumbnail_util_destroy().
- *
- * @param[in] thumb The handle to thumbnail info
- *
- * @return @c 0 on success, otherwise a negative error value
- *
- * @retval #THUMBNAIL_UTIL_ERROR_NONE Successful
- * @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #THUMBNAIL_UTIL_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see thumbnail_util_destroy()
- */
-int thumbnail_util_create(thumbnail_h *thumb) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.0. Use thumbnail_util_extract_to_file() or thumbnail_util_extract_to_buffer() instead.
- * @brief Extracts the thumbnail for the given media, asynchronously.
- * @details This function extracts the thumbnail for given media item and calls registered
- *         callback function for completion of extracting the thumbnail.\n
- *         You can distinguish generated thumbnails by @a request_id. Therefore, the @a request_id must be maintained until the request is completed. \n
- *         And the @a request_id is also used to cancel the request.
- *
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- *
- * @remarks The @a request_id should be released using free(). \n
- *                %http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n
- *                %http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
- *                If you don't set the size, the thumbnail size will be set default size. Default size is 320x240. \n
- *                Color space of the generated thumbnail is BGRA. \n
- *                Since 3.0, %http://tizen.org/privilege/content.write privilege is not required. \n
- *
- * @param[in] thumb     The thumbnail info handle
- * @param[in] callback  The callback function to be invoked
- * @param[in] user_data The user data to be passed to the callback function
- * @param[out] request_id The request id for the thumbnail extraction request
- *
- * @return @c 0 on success, otherwise a negative error value
- *
- * @retval #THUMBNAIL_UTIL_ERROR_NONE              Successful
- * @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied
- *
- * @pre Create a thumbnail info handle by calling thumbnail_util_create(). \n
- *           The content path that you want to generate thumbnail must be set by calling thumbnail_util_set_path().
- * @post Thumbnail extraction result except canceled is provided by thumbnail_extracted_cb().
- * @see thumbnail_util_create()
- * @see thumbnail_util_set_path()
- * @see thumbnail_util_set_size()
- * @see thumbnail_extracted_cb()
- * @see thumbnail_util_cancel()
- * @see thumbnail_util_destroy()
- */
-int thumbnail_util_extract(thumbnail_h thumb, thumbnail_extracted_cb callback, void *user_data, char **request_id) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.0.
- * @brief Sets the path of original media file.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- *
- * @param[in] thumb     The thumbnail info handle
- * @param[in] path        The path of the original media file
- *
- * @return @c 0 on success, otherwise a negative error value
- *
- * @retval #THUMBNAIL_UTIL_ERROR_NONE              Successful
- * @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @pre Create a thumbnail info handle by calling thumbnail_util_create().
- * @see thumbnail_util_create()
- * @see thumbnail_util_set_size()
- * @see thumbnail_util_destroy()
- */
-int thumbnail_util_set_path(thumbnail_h thumb, const char *path) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.0.
- * @brief Sets the size of thumbnail to be extracted.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- * @remarks If you don't set the size, the thumbnail size will be set default size. Default size is 320x240. \n
- *                  If the set width is not a multiple of 8, it can be changed by inner process. the width will be a multiple of 8 greater than the set value.
- *
- * @param[in] thumb    The thumbnail info handle
- * @param[in] width      The width of the thumbnail
- * @param[in] height     The height of the thumbnail
- *
- * @return @c 0 on success, otherwise a negative error value
- *
- * @retval #THUMBNAIL_UTIL_ERROR_NONE              Successful
- * @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @pre Create a thumbnail info handle by calling thumbnail_util_create().
- * @see thumbnail_util_create()
- * @see thumbnail_util_set_path()
- * @see thumbnail_util_destroy()
- *
- */
-int thumbnail_util_set_size(thumbnail_h thumb, int width, int height) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.0.
- * @brief Cancels the thumbnail extraction request for the given media.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- * @remarks If there is no request to be canceled, this function returns #THUMBNAIL_UTIL_ERROR_INVALID_OPERATION
- *
- * @param[in] thumb         The media thumbnail info handle
- * @param[in] request_id   The generated request id by thumbnail extraction request
- *
- * @return @c 0 on success, otherwise a negative error value
- *
- * @retval #THUMBNAIL_UTIL_ERROR_NONE              Successful
- * @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @pre It is available before thumbnail_extracted_cb() is called.
- * @see thumbnail_util_extract()
- */
-int thumbnail_util_cancel(thumbnail_h thumb, const char *request_id) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.0.
- * @brief Destroys thumbnail info handle.
- * @details The function frees all resources related to the thumbnail info handle. This handle
- *          can no longer be used to perform any operations. New thumbnail info handle has to
- *          be created before the next usage.
- *
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- *
- * @param[in]  thumb  The thumbnail info handle
- *
- * @return @c 0 on success, otherwise a negative error value
- *
- * @retval #THUMBNAIL_UTIL_ERROR_NONE              Successful
- * @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @pre Create a thumbnail info handle by calling thumbnail_util_create().
- * @see thumbnail_util_create()
- */
-int thumbnail_util_destroy(thumbnail_h thumb) TIZEN_DEPRECATED_API;
-
 /**
  * @brief Extracts the thumbnail for the given media into a file, synchronously.
  * @details This function creates thumbnail from a given media file. \n
diff --git a/include/thumbnail_util_private.h b/include/thumbnail_util_private.h
deleted file mode 100755 (executable)
index ff25077..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-
-
-#ifndef __TIZEN_MULTIMEDIA_THUMBNAIL_UTIL_PRIVATE_H__
-#define __TIZEN_MULTIMEDIA_THUMBNAIL_UTIL_PRIVATE_H__
-
-
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <thumbnail_util_type.h>
-#include <dlog.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-
-#define LOG_TAG "CAPI_MEDIA_THUMBNAIL_UTIL"
-
-typedef struct {
-       int request_id;
-} thumbnail_s;
-
-#define FONT_COLOR_RESET    "\033[0m"
-#define FONT_COLOR_GREEN    "\033[32m"
-
-#define THUMB_WARN(fmt, arg...) do { \
-               LOGW(FONT_COLOR_GREEN""fmt""FONT_COLOR_RESET, ##arg);     \
-       } while (0)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /*__TIZEN_MULTIMEDIA_THUMBNAIL_UTIL_PRIVATE_H__*/
index 7d8dddeacc6da2c787be43fe298f6e46334017ba..ef1fd5dbd40b71e0e709654613922312be02d764 100755 (executable)
@@ -52,45 +52,6 @@ typedef enum {
        THUMBNAIL_UTIL_ERROR_UNSUPPORTED_CONTENT                = THUMBNAIL_UTIL_ERROR_CLASS | 0x01,    /**< Unsupported Content (Since 4.0) */
 } thumbnail_util_error_e;
 
-
-/**
- * @ingroup CAPI_MEDIA_THUMBNAIL_UTIL_MODULE
- * @deprecated Deprecated since 5.0.
- * @brief The structure type for the thumbnail info handle.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- */
-typedef struct thumbnail_s *thumbnail_h;
-
-
-/**
- * @ingroup CAPI_MEDIA_THUMBNAIL_UTIL_MODULE
- * @deprecated Deprecated since 5.0.
- * @brief Called when creating the thumbnail.
- * @details This callback is called for completion of generating the thumbnail.
- *            The following error codes can be received: \n
- *            #THUMBNAIL_UTIL_ERROR_NONE : Successful
- *            #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER : Invalid parameter
- *            #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED : Permission denied
- *
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- *
- * @remarks Color space of the generated thumbnail is BGRA. \n
- *                  The callback is called in a separate thread(not in the main loop). \n
- *                  The @a thumb_data should be released using free().
- *
- * @param[in] error     The error code
- * @param[in] request_id       The generated request id by thumbnail extraction request
- * @param[in] thumb_width    The width of the thumbnail which is generated
- * @param[in] thumb_height   The height of the thumbnail which is generated
- * @param[in] thumb_data     The raw data of the thumbnail which is generated
- * @param[in] thumb_size      The size of the thumbnail which is generated
- * @param[in] user_data        The user data passed from the thumbnail_util_extract() function
- *
- * @pre thumbnail_util_extract() calls this callback.
- * @see thumbnail_util_extract()
- */
-typedef void (*thumbnail_extracted_cb)(thumbnail_util_error_e error, const char *request_id, int thumb_width, int thumb_height, unsigned char *thumb_data, int thumb_size, void *user_data);
-
 /**
  * @}
  */
index 43921d06d814fac454c5eb094e13fd0df16af279..0b37d3d7a93a15a2e843a81eae6c7ec4a3b2cb33 100644 (file)
@@ -1,13 +1,11 @@
 Name:       capi-media-thumbnail-util
 Summary:    A media thumbnail util library in Tizen Native API
-Version:    0.1.30
+Version:    0.2.0
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 BuildRequires:  cmake
-BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(libmedia-utils)
 BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires:  pkgconfig(media-thumbnail)
index e7ba103c37553492ba10f23af4ba6830f469733d..2acc7a175fff2be7928a98ad3fb29547b47a73d8 100644 (file)
@@ -15,9 +15,8 @@
 */
 
 #include <thumbnail_util.h>
-#include <thumbnail_util_private.h>
 #include <media-thumbnail.h>
-#include <media-util.h>
+#include <media-util-err.h>
 
 // LCOV_EXCL_START
 static int __thumbnail_util_error_capi(int internal_error)
@@ -37,44 +36,7 @@ static int __thumbnail_util_error_capi(int internal_error)
                return THUMBNAIL_UTIL_ERROR_INVALID_OPERATION;
        }
 }
-
-int thumbnail_util_create(thumbnail_h *thumb)
-{
-       THUMB_WARN("DEPRECATION WARNING: thumbnail_util_create() is deprecated and will be removed from next release.");
-       return THUMBNAIL_UTIL_ERROR_NONE;
-}
-
-int thumbnail_util_extract(thumbnail_h thumb, thumbnail_extracted_cb callback, void *user_data, char **request_id)
-{
-       THUMB_WARN("DEPRECATION WARNING: thumbnail_util_extract() is deprecated and will be removed from next release. Use thumbnail_util_extract_to_file() or thumbnail_util_extract_to_buffer() instead.");
-       return THUMBNAIL_UTIL_ERROR_NONE;
-}
-
-int thumbnail_util_set_path(thumbnail_h thumb, const char *path)
-{
-       THUMB_WARN("DEPRECATION WARNING: thumbnail_util_set_path() is deprecated and will be removed from next release.");
-       return THUMBNAIL_UTIL_ERROR_NONE;
-}
-
-int thumbnail_util_set_size(thumbnail_h thumb, int width, int height)
-{
-       THUMB_WARN("DEPRECATION WARNING: thumbnail_util_set_size() is deprecated and will be removed from next release.");
-       return THUMBNAIL_UTIL_ERROR_NONE;
-}
-
-int thumbnail_util_cancel(thumbnail_h thumb, const char *request_id)
-{
-       THUMB_WARN("DEPRECATION WARNING: thumbnail_util_cancel() is deprecated and will be removed from next release.");
-       return THUMBNAIL_UTIL_ERROR_NONE;
-}
-
-int thumbnail_util_destroy(thumbnail_h thumb)
-{
-       THUMB_WARN("DEPRECATION WARNING: thumbnail_util_destroy() is deprecated and will be removed from next release.");
-       return THUMBNAIL_UTIL_ERROR_NONE;
-}
 // LCOV_EXCL_STOP
-
 int thumbnail_util_extract_to_buffer(const char *path, unsigned int width, unsigned int height, unsigned char **thumb_buffer, size_t *thumb_size, unsigned int *thumb_width, unsigned int *thumb_height)
 {
        int ret = create_thumbnail_to_buffer(path, width, height, thumb_buffer, thumb_size, thumb_width, thumb_height);