Fix coverity issue
[platform/core/api/media-content.git] / include / media_image.h
index 29725a7..8e8ff9a 100755 (executable)
@@ -16,8 +16,8 @@
 
 
 
-#ifndef __TIZEN_IMAGE_META_H__
-#define __TIZEN_IMAGE_META_H__
+#ifndef __TIZEN_CONTENT_MEDIA_IMAGE_H__
+#define __TIZEN_CONTENT_MEDIA_IMAGE_H__
 
 #include <media_content_type.h>
 
@@ -43,10 +43,10 @@ extern "C" {
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks The destination handle must be released with image_meta_destroy().
+ * @remarks The @a dst should be released using image_meta_destroy().
  *
- * @param[out] dst  The destination handle to the image metadata
- * @param[in]  src  The source handle to the image metadata
+ * @param[out] dst The destination handle to the image metadata
+ * @param[in] src The source handle to the image metadata
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
@@ -67,7 +67,7 @@ int image_meta_clone(image_meta_h *dst, image_meta_h src);
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in] image The image metadata handle
+ * @param[in] image The handle to the image metadata
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
@@ -85,13 +85,16 @@ int image_meta_destroy(image_meta_h image);
  * @brief Gets the ID of an image.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in]  image    The image metadata handle
- * @param[out] media_id The ID of an image
+ * @remarks The @a media_id should be released using free().
+ *
+ * @param[in] image The handle to the image metadata
+ * @param[out] media_id The media ID
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
  */
 int image_meta_get_media_id(image_meta_h image, char **media_id);
@@ -100,7 +103,7 @@ int image_meta_get_media_id(image_meta_h image, char **media_id);
  * @brief Gets the image width in pixels.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in]  image The image metadata handle
+ * @param[in] image The handle to the image metadata
  * @param[out] width The image width in pixels
  *
  * @return @c 0 on success,
@@ -115,7 +118,7 @@ int image_meta_get_width(image_meta_h image, int *width);
  * @brief Gets the image height in pixels.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in]  image  The image metadata handle
+ * @param[in] image The handle to the image metadata
  * @param[out] height The image height in pixels
  *
  * @return @c 0 on success,
@@ -130,7 +133,7 @@ int image_meta_get_height(image_meta_h image, int *height);
  * @brief Gets the image orientation.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in]  image       The image metadata handle
+ * @param[in] image The handle to the image metadata
  * @param[out] orientation The image orientation
  *
  * @return @c 0 on success,
@@ -145,25 +148,29 @@ int image_meta_get_orientation(image_meta_h image, media_content_orientation_e *
  * @brief Gets the image creation time.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in]  image      The image metadata handle
+ * @remarks The @a date_taken should be released using free().
+ *
+ * @param[in] image The handle to the image metadata
  * @param[out] date_taken The time, when image was taken (in seconds, since the Epoch)
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
  */
 int image_meta_get_date_taken(image_meta_h image, char **date_taken);
 
 /**
+ * @deprecated Deprecated since 4.0.
  * @brief Gets the burst shot ID.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks You must release @a burst_id using free().
+ * @remarks The @a burst_id should be released using free().
  *
- * @param[in]  image    The image metadata handle
- * @param[out] burst_id The ID of burst shot\ n
+ * @param[in] image The handle to the image metadata
+ * @param[out] burst_id The ID of the burst shot\ n
  *                      If @a burst_id is @c NULL, this is not burst shot
  *
  * @return @c 0 on success,
@@ -173,16 +180,16 @@ int image_meta_get_date_taken(image_meta_h image, char **date_taken);
  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
  */
-int image_meta_get_burst_id(image_meta_h image, char **burst_id);
+int image_meta_get_burst_id(image_meta_h image, char **burst_id) TIZEN_DEPRECATED_API;
 
 /**
- * @brief Gets the exposure time from exif.
+ * @brief Gets the exposure time from EXIF.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  *
- * @remarks @a exposure time must be released with free() by you.
+ * @remarks The @a exposure_time should be released using free().
  *
- * @param[in]  image    The image metadata handle
- * @param[out] exposure_time The value of exposure_time, getting from exif
+ * @param[in] image The handle to the image metadata
+ * @param[out] exposure_time The value of exposure_time, getting from EXIF
  *
  * @return 0 on success,
  *         otherwise a negative error value
@@ -195,11 +202,11 @@ int image_meta_get_burst_id(image_meta_h image, char **burst_id);
 int image_meta_get_exposure_time(image_meta_h image, char **exposure_time);
 
 /**
- * @brief Gets the fnumber from exif.
+ * @brief Gets the fnumber from EXIF.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  *
- * @param[in]  image    The image metadata handle
- * @param[out] fnumber The value of fnumber, getting from exif
+ * @param[in] image The handle to the image metadata
+ * @param[out] fnumber The value of fnumber, getting from EXIF
  *
  * @return 0 on success,
  *         otherwise a negative error value
@@ -211,11 +218,11 @@ int image_meta_get_exposure_time(image_meta_h image, char **exposure_time);
 int image_meta_get_fnumber(image_meta_h image, double *fnumber);
 
 /**
- * @brief Gets the iso from exif.
+ * @brief Gets the iso from EXIF.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  *
- * @param[in]  image    The image metadata handle
- * @param[out] iso The value of iso, getting from exif
+ * @param[in] image The handle to the image metadata
+ * @param[out] iso The value of iso, getting from EXIF
  *
  * @return 0 on success,
  *         otherwise a negative error value
@@ -227,13 +234,13 @@ int image_meta_get_fnumber(image_meta_h image, double *fnumber);
 int image_meta_get_iso(image_meta_h image, int *iso);
 
 /**
- * @brief Gets the model from exif.
+ * @brief Gets the model from EXIF.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  *
- * @remarks @a model must be released with free() by you.
+ * @remarks The @a model should be released using free().
  *
- * @param[in]  image    The image metadata handle
- * @param[out] model The value of model, getting from exif
+ * @param[in] image The handle to the image metadata
+ * @param[out] model The value of model, getting from EXIF
  *
  * @return 0 on success,
  *         otherwise a negative error value
@@ -246,10 +253,11 @@ int image_meta_get_iso(image_meta_h image, int *iso);
 int image_meta_get_model(image_meta_h image, char **model);
 
 /**
+ * @deprecated Deprecated since 4.0.
  * @brief Checks whether the media is a burst shot image.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in]  image         The image metadata handle
+ * @param[in] image The handle to the image metadata
  * @param[out] is_burst_shot @c true if the media is a burst shot image,
  *                           otherwise @c false if the media is not a burst shot image
  *
@@ -259,14 +267,14 @@ int image_meta_get_model(image_meta_h image, char **model);
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
  */
-int image_meta_is_burst_shot(image_meta_h image, bool *is_burst_shot);
+int image_meta_is_burst_shot(image_meta_h image, bool *is_burst_shot) TIZEN_DEPRECATED_API;
 
 /**
  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
  * @brief Sets an orientation of the image.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in] image       The image metadata handle
+ * @param[in] image The handle to the image metadata
  * @param[in] orientation The image orientation
  *
  * @return @c 0 on success,
@@ -291,7 +299,7 @@ int image_meta_set_orientation(image_meta_h image, media_content_orientation_e o
  *
  * @remarks Do not call this function in callback function of foreach function like media_info_foreach_media_from_db().
  *
- * @param[in] image The handle to the image
+ * @param[in] image The handle to the image metadata
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
@@ -320,4 +328,4 @@ int image_meta_update_to_db(image_meta_h image) TIZEN_DEPRECATED_API;
 }
 #endif /* __cplusplus */
 
-#endif /*__TIZEN_IMAGE_META_H__*/
+#endif /*__TIZEN_CONTENT_MEDIA_IMAGE_H__*/