[ACR-1162] Deprecate asynchronous API to create thumbnails 71/168871/2
authorMinje Ahn <minje.ahn@samsung.com>
Thu, 1 Feb 2018 00:03:01 +0000 (09:03 +0900)
committerMinje ahn <minje.ahn@samsung.com>
Thu, 1 Feb 2018 00:04:58 +0000 (00:04 +0000)
Change-Id: I0acd9acdde841511af77cc4a606b1a6a8653728f
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
doc/thumbnail_util_doc.h
include/thumbnail_util.h
include/thumbnail_util_type.h
src/thumbnail_util.c

index 2290c9d..293b45e 100755 (executable)
  * @addtogroup CAPI_MEDIA_THUMBNAIL_UTIL_MODULE
  * @brief The @ref CAPI_MEDIA_THUMBNAIL_UTIL_MODULE API provides functions for creating the thumbnail from a given media file.
  * @ingroup CAPI_MEDIA_FRAMEWORK
 * @section CAPI_MEDIA_THUMBNAIL_UTIL_MODULE_HEADER Required Header
+ * @section CAPI_MEDIA_THUMBNAIL_UTIL_MODULE_HEADER Required Header
  *    \#include <thumbnail_util.h>
  *
  * @section CAPI_MEDIA_THUMBNAIL_UTIL_OVERVIEW Overview
- * The @ref CAPI_MEDIA_THUMBNAIL_UTIL_MODULE API allows you to create the thumbnail from a media file. To extract a thumbnail(#thumbnail_util_extract()), create/destory the handle(#thumbnail_util_create()/#thumbnail_util_destroy). To set the path, width and height for extracting, and cancel thumbnail_util_cancel().
+ * The @ref CAPI_MEDIA_THUMBNAIL_UTIL_MODULE API allows you to create thumbnails of the size you want from media files.\n
+ * Thumbnails can be created as files(#thumbnail_util_extract_to_file()) or buffers(#thumbnail_util_extract_to_buffer()).
  */
 
 #endif /* __TIZEN_THUMBNAIL_UTIL_DOC_H__ */
index e5b5947..b5a8917 100755 (executable)
@@ -35,6 +35,7 @@ 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().
@@ -49,9 +50,10 @@ extern "C" {
  *
  * @see thumbnail_util_destroy()
  */
-int thumbnail_util_create(thumbnail_h *thumb);
+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
@@ -88,9 +90,10 @@ int thumbnail_util_create(thumbnail_h *thumb);
  * @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);
+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
  *
@@ -107,9 +110,10 @@ int thumbnail_util_extract(thumbnail_h thumb, thumbnail_extracted_cb callback, v
  * @see thumbnail_util_set_size()
  * @see thumbnail_util_destroy()
  */
-int thumbnail_util_set_path(thumbnail_h thumb, const char *path);
+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
@@ -130,9 +134,10 @@ int thumbnail_util_set_path(thumbnail_h thumb, const char *path);
  * @see thumbnail_util_destroy()
  *
  */
-int thumbnail_util_set_size(thumbnail_h thumb, int width, int height);
+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 item you want to cancel, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
@@ -148,10 +153,10 @@ int thumbnail_util_set_size(thumbnail_h thumb, int width, int height);
  * @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);
+int thumbnail_util_cancel(thumbnail_h thumb, const char *request_id) TIZEN_DEPRECATED_API;
 
 /**
- * @deprecated Deprecated since 4.0. Use thumbnail_util_cancel() instead.
+ * @deprecated Deprecated since 4.0.
  * @brief Cancels all thumbnail extraction requests associated with the given thumbnail info handle.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  * @remarks If there is no item you want to cancel, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
@@ -169,6 +174,7 @@ int thumbnail_util_cancel(thumbnail_h thumb, const char *request_id);
 int thumbnail_util_cancel_all(thumbnail_h thumb) 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 operation. New thumbnail info handle has to
@@ -186,7 +192,7 @@ int thumbnail_util_cancel_all(thumbnail_h thumb) TIZEN_DEPRECATED_API;
  * @pre Create a thumbnail info handle by calling thumbnail_util_create().
  * @see thumbnail_util_create()
  */
-int thumbnail_util_destroy(thumbnail_h thumb);
+int thumbnail_util_destroy(thumbnail_h thumb) TIZEN_DEPRECATED_API;
 
 /**
  * @brief Extracts the thumbnail for the given media into a file, synchronously.
index ef5d52c..efb6eec 100755 (executable)
@@ -55,6 +55,7 @@ typedef enum {
 
 /**
  * @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
  */
@@ -63,6 +64,7 @@ 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
index d93a309..2e073f2 100755 (executable)
@@ -119,6 +119,7 @@ void __thumbnail_util_extract_completed_cb(int error, int request_id, const char
 int thumbnail_util_create(thumbnail_h *thumb)
 {
        int ret = THUMBNAIL_UTIL_ERROR_NONE;
+       thumbnail_util_warn("DEPRECATION WARNING: thumbnail_util_create() is deprecated and will be removed from next release.");
 
        if (thumb == NULL) {
                thumbnail_util_error("INVALID_PARAMETER(0x%08x)", THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER);
@@ -144,6 +145,7 @@ int thumbnail_util_create(thumbnail_h *thumb)
 int thumbnail_util_extract(thumbnail_h thumb, thumbnail_extracted_cb callback, void *user_data, char **request_id)
 {
        int ret = THUMBNAIL_UTIL_ERROR_NONE;
+       thumbnail_util_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.");
        int res = 0;
        static int g_thumbnail_req_id = 0;
        thumbnail_s *_thumb = (thumbnail_s *)thumb;
@@ -179,6 +181,7 @@ int thumbnail_util_extract(thumbnail_h thumb, thumbnail_extracted_cb callback, v
 int thumbnail_util_set_path(thumbnail_h thumb, const char *path)
 {
        int ret = THUMBNAIL_UTIL_ERROR_NONE;
+       thumbnail_util_warn("DEPRECATION WARNING: thumbnail_util_set_path() is deprecated and will be removed from next release.");
        char repl_path[MAX_PATH_SIZE + 1] = {0, };
        thumbnail_s *_thumb = (thumbnail_s *)thumb;
 
@@ -203,6 +206,7 @@ int thumbnail_util_set_path(thumbnail_h thumb, const char *path)
 int thumbnail_util_set_size(thumbnail_h thumb, int width, int height)
 {
        int ret = THUMBNAIL_UTIL_ERROR_NONE;
+       thumbnail_util_warn("DEPRECATION WARNING: thumbnail_util_set_size() is deprecated and will be removed from next release.");
        thumbnail_s *_thumb = (thumbnail_s *)thumb;
 
        if (_thumb != NULL && width > 0 && height > 0) {
@@ -219,6 +223,7 @@ int thumbnail_util_set_size(thumbnail_h thumb, int width, int height)
 int thumbnail_util_cancel(thumbnail_h thumb, const char *request_id)
 {
        int ret = THUMBNAIL_UTIL_ERROR_NONE;
+       thumbnail_util_warn("DEPRECATION WARNING: thumbnail_util_cancel() is deprecated and will be removed from next release.");
        thumbnail_s *_thumb = (thumbnail_s *)thumb;
 
        if (_thumb != NULL && STRING_VALID(request_id)) {
@@ -234,7 +239,7 @@ int thumbnail_util_cancel(thumbnail_h thumb, const char *request_id)
 
 int thumbnail_util_cancel_all(thumbnail_h thumb)
 {
-       thumbnail_util_warn("DEPRECATION WARNING: thumbnail_util_cancel_all() is deprecated and will be removed from next release. Use thumbnail_util_cancel() instead.");
+       thumbnail_util_warn("DEPRECATION WARNING: thumbnail_util_cancel_all() is deprecated and will be removed from next release.");
        int ret = THUMBNAIL_UTIL_ERROR_NONE;
        thumbnail_s *_thumb = (thumbnail_s *)thumb;
 
@@ -251,6 +256,7 @@ int thumbnail_util_cancel_all(thumbnail_h thumb)
 
 int thumbnail_util_destroy(thumbnail_h thumb)
 {
+       thumbnail_util_warn("DEPRECATION WARNING: thumbnail_util_destroy() is deprecated and will be removed from next release.");
        int ret = THUMBNAIL_UTIL_ERROR_NONE;
        thumbnail_s *_thumb = (thumbnail_s *)thumb;