Add deprecation warning message 59/82659/3
authorJiyong Min <jiyong.min@samsung.com>
Fri, 5 Aug 2016 02:36:58 +0000 (11:36 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Mon, 8 Aug 2016 03:43:28 +0000 (12:43 +0900)
Change-Id: I33b64403859b58125017203f3cec1621b531c3d4
Signed-off-by: jiyong min <jiyong.min@samsung.com>
doc/image_util_doc.h
include/mobile/image_util.h
include/mobile/image_util_private.h
include/mobile/image_util_type.h
include/wearable/image_util.h
include/wearable/image_util_private.h
include/wearable/image_util_type.h
src/image_util.c

index a98b3aad271170fd4ad3dad81f6810b11ec18523..0ff5ac6bbba34c059c422463b0e0b5d9147f94bf 100755 (executable)
@@ -86,7 +86,6 @@
  *        <th><b>DESCRIPTION</b></th>
  *     </tr>
  *     <tr>
- *        <td>image_util_foreach_supported_colorspace()</td>
  *        <td>image_util_supported_colorspace_cb()</td>
  *        <td> Supported JPEG/PNG/GIF/BMP encoding/decoding colorspace</td>
  *     </tr>
index 4d98207dd12d5d33576c52ce1344280b4e036545..c56ef0c01d3a01438c8d6f3dbfabda0620eb7652 100644 (file)
@@ -574,7 +574,7 @@ typedef bool(*image_util_supported_jpeg_colorspace_cb)(image_util_colorspace_e c
 * @see image_util_decode_jpeg()
 * @see image_util_decode_jpeg_from_memory()
 */
-int image_util_foreach_supported_jpeg_colorspace(image_util_supported_jpeg_colorspace_cb callback, void *user_data);
+int image_util_foreach_supported_jpeg_colorspace(image_util_supported_jpeg_colorspace_cb callback, void *user_data) DEPRECATED_API;
 
 /**
 * @deprecated Deprecated since 3.0. Use image_util_decode_create() instead.
@@ -608,7 +608,7 @@ int image_util_foreach_supported_jpeg_colorspace(image_util_supported_jpeg_color
 * @see image_util_decode_jpeg_from_memory()
 * @see image_util_foreach_supported_jpeg_colorspace()
 */
-int image_util_decode_jpeg(const char *path, image_util_colorspace_e colorspace, unsigned char **image_buffer, int *width, int *height, unsigned int *size);
+int image_util_decode_jpeg(const char *path, image_util_colorspace_e colorspace, unsigned char **image_buffer, int *width, int *height, unsigned int *size) DEPRECATED_API;
 
 /**
 * @deprecated Deprecated since 3.0. Use image_util_decode_create() instead.
@@ -641,7 +641,7 @@ int image_util_decode_jpeg(const char *path, image_util_colorspace_e colorspace,
 * @see image_util_decode_jpeg()
 * @see image_util_foreach_supported_jpeg_colorspace()
 */
-int image_util_decode_jpeg_from_memory(const unsigned char *jpeg_buffer, int jpeg_size, image_util_colorspace_e colorspace, unsigned char **image_buffer, int *width, int *height, unsigned int *size);
+int image_util_decode_jpeg_from_memory(const unsigned char *jpeg_buffer, int jpeg_size, image_util_colorspace_e colorspace, unsigned char **image_buffer, int *width, int *height, unsigned int *size) DEPRECATED_API;
 
 /**
 * @deprecated Deprecated since 3.0. Use image_util_decode_create() instead.
@@ -676,7 +676,7 @@ int image_util_decode_jpeg_from_memory(const unsigned char *jpeg_buffer, int jpe
 * @see image_util_decode_jpeg_from_memory()
 * @see image_util_foreach_supported_jpeg_colorspace()
 */
-int image_util_decode_jpeg_with_downscale(const char *path, image_util_colorspace_e colorspace, image_util_scale_e downscale, unsigned char **image_buffer, int *width, int *height, unsigned int *size);
+int image_util_decode_jpeg_with_downscale(const char *path, image_util_colorspace_e colorspace, image_util_scale_e downscale, unsigned char **image_buffer, int *width, int *height, unsigned int *size) DEPRECATED_API;
 
 /**
 * @deprecated Deprecated since 3.0. Use image_util_decode_create() instead.
@@ -710,7 +710,7 @@ int image_util_decode_jpeg_with_downscale(const char *path, image_util_colorspac
 * @see image_util_decode_jpeg()
 * @see image_util_foreach_supported_jpeg_colorspace()
 */
-int image_util_decode_jpeg_from_memory_with_downscale(const unsigned char *jpeg_buffer, int jpeg_size, image_util_colorspace_e colorspace, image_util_scale_e downscale, unsigned char **image_buffer, int *width, int *height, unsigned int *size);
+int image_util_decode_jpeg_from_memory_with_downscale(const unsigned char *jpeg_buffer, int jpeg_size, image_util_colorspace_e colorspace, image_util_scale_e downscale, unsigned char **image_buffer, int *width, int *height, unsigned int *size) DEPRECATED_API;
 
 /**
 * @deprecated Deprecated since 3.0. Use image_util_encode_create() instead.
@@ -741,7 +741,7 @@ int image_util_decode_jpeg_from_memory_with_downscale(const unsigned char *jpeg_
 * @see image_util_foreach_supported_jpeg_colorspace()
 * @see image_util_encode_jpeg_to_memory()
 */
-int image_util_encode_jpeg(const unsigned char *buffer, int width, int height, image_util_colorspace_e colorspace,  int quality, const char *path);
+int image_util_encode_jpeg(const unsigned char *buffer, int width, int height, image_util_colorspace_e colorspace,  int quality, const char *path) DEPRECATED_API;
 
 /**
 * @deprecated Deprecated since 3.0. Use image_util_encode_create() instead.
@@ -773,7 +773,7 @@ int image_util_encode_jpeg(const unsigned char *buffer, int width, int height, i
 * @see image_util_foreach_supported_jpeg_colorspace()
 * @see image_util_encode_jpeg()
 */
-int image_util_encode_jpeg_to_memory(const unsigned char *image_buffer, int width, int height, image_util_colorspace_e colorspace, int quality,  unsigned char **jpeg_buffer, unsigned int *jpeg_size);
+int image_util_encode_jpeg_to_memory(const unsigned char *image_buffer, int width, int height, image_util_colorspace_e colorspace, int quality,  unsigned char **jpeg_buffer, unsigned int *jpeg_size) DEPRECATED_API;
 
 /**
 * @brief Called once for each supported image encode/decode colorspace.
index 62afe0de22930f03278e46387ef788af835990b6..44b7962f0ba89b61d563c932e1d1cc7f6cd86a13 100644 (file)
@@ -59,6 +59,10 @@ extern "C"
                } \
        } while (0)
 
+#define DEPRECATION_LOGW(deprecated, instead) do { \
+               LOGW("DEPRECATION WARNING: %s is deprecated and will be removed from next release. Use %s instead.", deprecated, instead);     \
+       } while (0)
+
 #define IMGCV_FUNC_NAME "mm_util_cv_extract_representative_color"
 #define PATH_MMUTIL_IMGCV_LIB "/usr/lib/libmmutil_imgcv.so"
 typedef gboolean(*ModuleFunc)(void *, int, int, unsigned char *, unsigned char *, unsigned char *);
index acdbe9a124230249d87c2c426c727aebf15909ae..7b3b255beb3cd05ef5829c02118b416f04584c58 100644 (file)
@@ -26,6 +26,9 @@ extern "C"
 #endif
 
 #define IMAGE_UTIL_ERROR_CLASS           TIZEN_ERROR_IMAGE_UTIL
+#ifndef DEPRECATED_API
+#define DEPRECATED_API __attribute__((__visibility__("default"), deprecated))
+#endif
 
 /**
  * @file image_util_type.h
index 65b79cf645d20164bfb729de649af9a1e6f0eba4..095cf128c2320fff397470adb971050b6ddac3d5 100644 (file)
@@ -574,7 +574,7 @@ typedef bool(*image_util_supported_jpeg_colorspace_cb)(image_util_colorspace_e c
 * @see image_util_decode_jpeg()
 * @see image_util_decode_jpeg_from_memory()
 */
-int image_util_foreach_supported_jpeg_colorspace(image_util_supported_jpeg_colorspace_cb callback, void *user_data);
+int image_util_foreach_supported_jpeg_colorspace(image_util_supported_jpeg_colorspace_cb callback, void *user_data) DEPRECATED_API;
 
 /**
 * @deprecated Deprecated since 3.0. Use image_util_decode_create() instead.
@@ -608,7 +608,7 @@ int image_util_foreach_supported_jpeg_colorspace(image_util_supported_jpeg_color
 * @see image_util_decode_jpeg_from_memory()
 * @see image_util_foreach_supported_jpeg_colorspace()
 */
-int image_util_decode_jpeg(const char *path, image_util_colorspace_e colorspace, unsigned char **image_buffer, int *width, int *height, unsigned int *size);
+int image_util_decode_jpeg(const char *path, image_util_colorspace_e colorspace, unsigned char **image_buffer, int *width, int *height, unsigned int *size) DEPRECATED_API;
 
 /**
 * @deprecated Deprecated since 3.0. Use image_util_decode_create() instead.
@@ -641,7 +641,7 @@ int image_util_decode_jpeg(const char *path, image_util_colorspace_e colorspace,
 * @see image_util_decode_jpeg()
 * @see image_util_foreach_supported_jpeg_colorspace()
 */
-int image_util_decode_jpeg_from_memory(const unsigned char *jpeg_buffer, int jpeg_size, image_util_colorspace_e colorspace, unsigned char **image_buffer, int *width, int *height, unsigned int *size);
+int image_util_decode_jpeg_from_memory(const unsigned char *jpeg_buffer, int jpeg_size, image_util_colorspace_e colorspace, unsigned char **image_buffer, int *width, int *height, unsigned int *size) DEPRECATED_API;
 
 /**
 * @deprecated Deprecated since 3.0. Use image_util_encode_create() instead.
@@ -672,7 +672,7 @@ int image_util_decode_jpeg_from_memory(const unsigned char *jpeg_buffer, int jpe
 * @see image_util_foreach_supported_jpeg_colorspace()
 * @see image_util_encode_jpeg_to_memory()
 */
-int image_util_encode_jpeg(const unsigned char *buffer, int width, int height, image_util_colorspace_e colorspace,  int quality, const char *path);
+int image_util_encode_jpeg(const unsigned char *buffer, int width, int height, image_util_colorspace_e colorspace,  int quality, const char *path) DEPRECATED_API;
 
 /**
 * @deprecated Deprecated since 3.0. Use image_util_encode_create() instead.
@@ -704,7 +704,7 @@ int image_util_encode_jpeg(const unsigned char *buffer, int width, int height, i
 * @see image_util_foreach_supported_jpeg_colorspace()
 * @see image_util_encode_jpeg()
 */
-int image_util_encode_jpeg_to_memory(const unsigned char *image_buffer, int width, int height, image_util_colorspace_e colorspace, int quality,  unsigned char **jpeg_buffer, unsigned int *jpeg_size);
+int image_util_encode_jpeg_to_memory(const unsigned char *image_buffer, int width, int height, image_util_colorspace_e colorspace, int quality,  unsigned char **jpeg_buffer, unsigned int *jpeg_size) DEPRECATED_API;
 
 /**
 * @brief Called once for each supported image encode/decode colorspace.
index 62afe0de22930f03278e46387ef788af835990b6..44b7962f0ba89b61d563c932e1d1cc7f6cd86a13 100755 (executable)
@@ -59,6 +59,10 @@ extern "C"
                } \
        } while (0)
 
+#define DEPRECATION_LOGW(deprecated, instead) do { \
+               LOGW("DEPRECATION WARNING: %s is deprecated and will be removed from next release. Use %s instead.", deprecated, instead);     \
+       } while (0)
+
 #define IMGCV_FUNC_NAME "mm_util_cv_extract_representative_color"
 #define PATH_MMUTIL_IMGCV_LIB "/usr/lib/libmmutil_imgcv.so"
 typedef gboolean(*ModuleFunc)(void *, int, int, unsigned char *, unsigned char *, unsigned char *);
index b05f647cec3ba2b2d872839d68195c7743894045..9002a9d0e59c43731cbd37f6c08f3c58313090e1 100755 (executable)
@@ -26,6 +26,9 @@ extern "C"
 #endif
 
 #define IMAGE_UTIL_ERROR_CLASS           TIZEN_ERROR_IMAGE_UTIL
+#ifndef DEPRECATED_API
+#define DEPRECATED_API __attribute__((__visibility__("default"), deprecated))
+#endif
 
 /**
  * @file image_util_type.h
index 649df80247e76449d83f3d3e9e8a648070d0144b..cd03b09d7adb67763ec51703a6ee204bf48a681b 100755 (executable)
@@ -254,6 +254,8 @@ int image_util_foreach_supported_jpeg_colorspace(image_util_supported_jpeg_color
 {
        int i = 0;
 
+       DEPRECATION_LOGW("image_util_foreach_supported_jpeg_colorspace()", "image_util_foreach_supported_colorspace()");
+
        image_util_retvm_if((callback == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "callback is null");
 
        /* RGB has higher precedence than YUV */
@@ -667,6 +669,8 @@ int image_util_decode_jpeg(const char *path, image_util_colorspace_e colorspace,
 {
        int err = MM_UTIL_ERROR_NONE;
 
+       DEPRECATION_LOGW("image_util_decode_jpeg()", "image_util_decode_create()");
+
        image_util_retvm_if((path == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "path is null");
        image_util_retvm_if((image_buffer == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "image_buffer is null");
        image_util_retvm_if((size == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "size is null");
@@ -694,6 +698,8 @@ int image_util_decode_jpeg_from_memory(const unsigned char *jpeg_buffer, int jpe
 {
        int err = MM_UTIL_ERROR_NONE;
 
+       DEPRECATION_LOGW("image_util_decode_jpeg_from_memory()", "image_util_decode_create()");
+
        image_util_retvm_if((jpeg_buffer == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "jpeg_buffer is null");
        image_util_retvm_if((image_buffer == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "image_buffer is null");
        image_util_retvm_if((size == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "size is null");
@@ -722,6 +728,8 @@ int image_util_decode_jpeg_with_downscale(const char *path, image_util_colorspac
 {
        int err = MM_UTIL_ERROR_NONE;
 
+       DEPRECATION_LOGW("image_util_decode_jpeg_with_downscale()", "image_util_decode_create()");
+
        image_util_retvm_if((path == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "path is null");
        image_util_retvm_if((image_buffer == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "image_buffer is null");
        image_util_retvm_if((size == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "size is null");
@@ -750,6 +758,8 @@ int image_util_decode_jpeg_from_memory_with_downscale(const unsigned char *jpeg_
 {
        int err = MM_UTIL_ERROR_NONE;
 
+       DEPRECATION_LOGW("image_util_decode_jpeg_from_memory_with_downscale()", "image_util_decode_create()");
+
        image_util_retvm_if((jpeg_buffer == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "jpeg_buffer is null");
        image_util_retvm_if((image_buffer == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "image_buffer is null");
        image_util_retvm_if((size == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "size is null");
@@ -779,6 +789,8 @@ int image_util_encode_jpeg(const unsigned char *buffer, int width, int height, i
 {
        int err = MM_UTIL_ERROR_NONE;
 
+       DEPRECATION_LOGW("image_util_encode_jpeg()", "image_util_encode_create()");
+
        image_util_retvm_if((path == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "path is null");
        image_util_retvm_if((buffer == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "buffer is null");
        image_util_retvm_if((strlen(path) == 0), IMAGE_UTIL_ERROR_NO_SUCH_FILE, "Invalid path");
@@ -794,6 +806,8 @@ int image_util_encode_jpeg_to_memory(const unsigned char *image_buffer, int widt
        int err = MM_UTIL_ERROR_NONE;
        int isize = 0;
 
+       DEPRECATION_LOGW("image_util_encode_jpeg_to_memory()", "image_util_encode_create()");
+
        image_util_retvm_if((jpeg_buffer == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "jpeg_buffer is null");
        image_util_retvm_if((image_buffer == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "image_buffer is null");
        image_util_retvm_if((jpeg_size == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "jpeg_size is null");