Apply coding rule (TSAM-444) 17/49417/1 accepted/tizen/mobile/20151013.071327 accepted/tizen/tv/20151013.071339 accepted/tizen/wearable/20151013.071353 submit/tizen/20151013.055711
authorMinje Ahn <minje.ahn@samsung.com>
Tue, 13 Oct 2015 05:49:32 +0000 (14:49 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Tue, 13 Oct 2015 05:49:32 +0000 (14:49 +0900)
Change-Id: Ifd89426221e435de027cd2a6a24d62b0ba680abb
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
include/media_content.h
include/media_info.h
src/media_face.c
src/media_info.c

index 473b030..fc50944 100755 (executable)
@@ -53,7 +53,7 @@ extern "C" {
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE      Successful
@@ -73,7 +73,7 @@ int media_content_connect(void);
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE      Successful
@@ -107,7 +107,7 @@ int media_content_disconnect(void);
  *
  * @param[in] path The file path
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
@@ -143,7 +143,7 @@ int media_content_scan_file(const char *path);
  * @param[in] callback     The callback to be invoked when the scanning is finished
  * @param[in] user_data    The user data to be passed to the callback function
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
@@ -159,7 +159,7 @@ int media_content_scan_folder(const char *path, bool is_recursive, media_scan_co
  *
  * @param[in] path         The folder path
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
@@ -179,7 +179,7 @@ int media_content_cancel_scan_folder(const char *path);
  * @param[in] callback  The callback to be invoked when the scanning is finished
  * @param[in] user_data The user data to be passed to the callback function
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
@@ -199,7 +199,7 @@ int media_content_set_db_updated_cb(media_content_db_update_cb callback, void *u
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
index 04c377c..0fe43be 100755 (executable)
@@ -63,7 +63,7 @@ extern "C" {
  * @param[in]  path The path to the media file
  * @param[out] info The handle to the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -79,7 +79,7 @@ extern "C" {
  *
  * @see media_content_connect()
  */
-int media_info_insert_to_db (const char *path, media_info_h *info);
+int media_info_insert_to_db(const char *path, media_info_h *info);
 
 /**
  * @brief Inserts media files into the media database, asynchronously.
@@ -104,7 +104,7 @@ int media_info_insert_to_db (const char *path, media_info_h *info);
  * @param[in] callback     The callback to be invoked when media items inserted completely
  * @param[in] user_data    The user data to be passed to the callback function
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -121,7 +121,7 @@ int media_info_insert_to_db (const char *path, media_info_h *info);
  * @see media_content_connect()
  * @see media_insert_completed_cb()
  */
-int media_info_insert_batch_to_db(const char **path_array,unsigned int array_length, media_insert_completed_cb callback, void *user_data);
+int media_info_insert_batch_to_db(const char **path_array, unsigned int array_length, media_insert_completed_cb callback, void *user_data);
 
 /**
  * @brief Inserts the burst shot images into the media database, asynchronously.
@@ -145,7 +145,7 @@ int media_info_insert_batch_to_db(const char **path_array,unsigned int array_len
  * @param[in] callback     The callback to be invoked when the images are inserted completely
  * @param[in] user_data    The user data to be passed to the callback function
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -162,7 +162,7 @@ int media_info_insert_batch_to_db(const char **path_array,unsigned int array_len
  * @see media_content_connect()
  * @see media_insert_burst_shot_completed_cb()
  */
-int media_info_insert_burst_shot_to_db(const char **path_array,unsigned int array_length, media_insert_burst_shot_completed_cb callback, void *user_data);
+int media_info_insert_burst_shot_to_db(const char **path_array, unsigned int array_length, media_insert_burst_shot_completed_cb callback, void *user_data);
 
 /**
  * @brief Deletes a media file from the media database.
@@ -177,7 +177,7 @@ int media_info_insert_burst_shot_to_db(const char **path_array,unsigned int arra
  *
  * @param[in] media_id  The ID to the media file
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -208,7 +208,7 @@ int media_info_delete_from_db(const char *media_id);
  *
  * @param[in] filter  The handle to filter
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -236,7 +236,7 @@ int media_info_delete_batch_from_db(filter_h filter);
  *
  * @param[in]  media  The media info handle
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -264,7 +264,7 @@ int media_info_destroy(media_info_h media);
  * @param[out] dst  The destination handle to the media info
  * @param[in]  src  The source handle to media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -289,7 +289,7 @@ int media_info_clone(media_info_h *dst, media_info_h src);
  * @param[in]  filter      The handle to filter
  * @param[out] media_count The count of media
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -321,7 +321,7 @@ int media_info_get_media_count_from_db(filter_h filter, int *media_count);
  * @param[in] callback  The callback function to be invoked
  * @param[in] user_data The user data to be passed to the callback function
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -348,7 +348,7 @@ int media_info_foreach_media_from_db(filter_h filter, media_info_cb callback, vo
  * @param[in]  filter    The handle to the media filter
  * @param[out] tag_count The count of the media tag
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -374,7 +374,7 @@ int media_info_get_tag_count_from_db(const char *media_id, filter_h filter, int
  * @param[in] callback  The callback function to be invoked
  * @param[in] user_data The user data to be passed to the callback function
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -400,7 +400,7 @@ int media_info_foreach_tag_from_db(const char *media_id, filter_h filter, media_
  * @param[in]  filter          The handle to the media filter
  * @param[out] bookmark_count  The count of the media tag
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -426,7 +426,7 @@ int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter,
  * @param[in] callback  The callback function to be invoked
  * @param[in] user_data The user data to be passed to the callback function
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -442,7 +442,7 @@ int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter,
  * @see media_content_connect()
  * @see media_bookmark_cb()
  */
-int media_info_foreach_bookmark_from_db (const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
+int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
 
 /**
  * @brief Gets the number of face for the passed @a media_id from the media database.
@@ -481,7 +481,7 @@ int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int
  * @see media_filter_create()
  *
  */
-int media_info_foreach_face_from_db (const char *media_id, filter_h filter, media_face_cb callback, void *user_data);
+int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data);
 
 /**
  * @brief Gets the image metadata for a given media info.
@@ -494,7 +494,7 @@ int media_info_foreach_face_from_db (const char *media_id, filter_h filter, medi
  * @param[in]  media  The media info handle
  * @param[out] image  A handle to image metadata
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -516,7 +516,7 @@ int media_info_get_image(media_info_h media, image_meta_h *image);
  * @param[in]  media The media info handle
  * @param[out] video A handle to the video meta
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -539,7 +539,7 @@ int media_info_get_video(media_info_h media, video_meta_h *video);
  * @param[in]  media The media info handle
  * @param[out] audio A handle to the audio meta
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -558,7 +558,7 @@ int media_info_get_audio(media_info_h media, audio_meta_h *audio);
  * @param[in]  media The media info handle
  * @param[out] media_id     The ID of the media tag
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -576,7 +576,7 @@ int media_info_get_media_id(media_info_h media, char **media_id);
  * @param[in]  media The media info handle
  * @param[out] path  The path of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -596,7 +596,7 @@ int media_info_get_file_path(media_info_h media, char **path);
  * @param[in]  media The media info handle
  * @param[out] name  The name of media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -613,7 +613,7 @@ int media_info_get_display_name(media_info_h media, char **name);
  * @param[in]  media The media info handle
  * @param[out] type  The type of the media content (#media_content_type_e)
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -631,7 +631,7 @@ int media_info_get_media_type(media_info_h media, media_content_type_e *type);
  * @param[in]  media     The media info handle
  * @param[out] mime_type The MIME type of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -648,7 +648,7 @@ int media_info_get_mime_type(media_info_h media, char **mime_type);
  * @param[in]  media The media info handle
  * @param[out] size  The type of the media content
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -664,7 +664,7 @@ int media_info_get_size(media_info_h media, unsigned long long *size);
  * @param[in]  media      The media info handle
  * @param[out] added_time The added time to the DB
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -681,7 +681,7 @@ int media_info_get_added_time(media_info_h media, time_t *added_time);
  * @param[out] time  The date of modification of the file \n
  *                   Get from the file.
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -699,7 +699,7 @@ int media_info_get_modified_time(media_info_h media, time_t *time);
  * @param[in]  media The media info handle
  * @param[out] time  The date of the timeline
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -717,7 +717,7 @@ int media_info_get_timeline(media_info_h media, time_t* time);
  * @param[in]  media The media info handle
  * @param[out] path  The path to the thumbnail of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -736,7 +736,7 @@ int media_info_get_thumbnail_path(media_info_h media, char **path);
  * @param[in]  media       The media info handle
  * @param[out] description The description of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -753,7 +753,7 @@ int media_info_get_description(media_info_h media, char **description);
  * @param[in]  media     The media info handle
  * @param[out] longitude The longitude of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -769,7 +769,7 @@ int media_info_get_longitude(media_info_h media, double* longitude);
  * @param[in]  media    The media info handle
  * @param[out] latitude The latitude of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -786,7 +786,7 @@ int media_info_get_latitude(media_info_h media, double* latitude);
  * @param[in]  media    The media info handle
  * @param[out] altitude The altitude of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -802,7 +802,7 @@ int media_info_get_altitude(media_info_h media, double* altitude);
  * @param[in]  media   The media info handle
  * @param[out] weather The weather of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -818,7 +818,7 @@ int media_info_get_weather(media_info_h media, char **weather);
  * @param[in]  media  The media info handle
  * @param[out] rating The rating of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -832,10 +832,10 @@ int media_info_get_rating(media_info_h media, int *rating);
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
  * @param[in]  media     The media info handle
- * @param[out] favorite  @c true if media info is set as favorite, 
+ * @param[out] favorite  @c true if media info is set as favorite,
  *                       otherwise @c false if media info is not set as favorite
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -853,7 +853,7 @@ int media_info_get_favorite(media_info_h media, bool* favorite);
  * @param[in]  media  The media info handle
  * @param[out] author The author of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -872,7 +872,7 @@ int media_info_get_author(media_info_h media, char **author);
  * @param[in]  media    The media info handle
  * @param[out] provider The provider of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -891,7 +891,7 @@ int media_info_get_provider(media_info_h media, char **provider);
  * @param[in]  media        The media info handle
  * @param[out] content_name The content name of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -910,7 +910,7 @@ int media_info_get_content_name(media_info_h media, char **content_name);
  * @param[in]  media  The media info handle
  * @param[out] title  The title of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -929,7 +929,7 @@ int media_info_get_title(media_info_h media, char **title);
  * @param[in]  media    The media info handle
  * @param[out] category The category of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -948,7 +948,7 @@ int media_info_get_category(media_info_h media, char **category);
  * @param[in]  media        The media info handle
  * @param[out] location_tag The location of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -967,7 +967,7 @@ int media_info_get_location_tag(media_info_h media, char **location_tag);
  * @param[in]  media      The media info handle
  * @param[out] age_rating The age rating of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -986,7 +986,7 @@ int media_info_get_age_rating(media_info_h media, char **age_rating);
  * @param[in]  media   The media info handle
  * @param[out] keyword The keyword of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1005,7 +1005,7 @@ int media_info_get_keyword(media_info_h media, char **keyword);
  * @param[in]  media   The media info handle
  * @param[out] storage_id The storage id of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1023,7 +1023,7 @@ int media_info_get_storage_id(media_info_h media, char **storage_id);
  * @param[out] is_drm @c true if media is DRM media,
  *                    otherwise @c false if media is not DRM media
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1039,7 +1039,7 @@ int media_info_is_drm(media_info_h media, bool *is_drm);
  * @param[in]  media        The media info handle
  * @param[out] storage_type The storage type of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1148,7 +1148,7 @@ int media_info_set_played_time(media_info_h media);
  * @param[in] media        The media info handle
  * @param[in] display_name The display name of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1168,7 +1168,7 @@ int media_info_set_display_name(media_info_h media, const char *display_name);
  * @param[in] media       The media info handle
  * @param[in] description The description of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1188,7 +1188,7 @@ int media_info_set_description(media_info_h media, const char *description);
  * @param[in] media     The media info handle
  * @param[in] longitude The longitude of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1207,7 +1207,7 @@ int media_info_set_longitude(media_info_h media, double longitude);
  * @param[in] media    The media info handle
  * @param[in] latitude The latitude of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1226,7 +1226,7 @@ int media_info_set_latitude(media_info_h media, double latitude);
  * @param[in] media    The media info handle
  * @param[in] altitude The altitude of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1245,7 +1245,7 @@ int media_info_set_altitude(media_info_h media, double altitude);
  * @param[in] media   The media info handle
  * @param[in] weather The weather of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1265,7 +1265,7 @@ int media_info_set_weather(media_info_h media, const char *weather);
  * @param[in] media  The media info handle
  * @param[in] rating The rating of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1285,7 +1285,7 @@ int media_info_set_rating(media_info_h media, int rating);
  * @param[in] favorite Set @c true to set the media info as favorite,
  *                     otherwise set @c false to not set the media info as favorite
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1302,7 +1302,7 @@ int media_info_set_favorite(media_info_h media, bool favorite);
  * @param[in] media  The media info handle
  * @param[in] author The author of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1319,7 +1319,7 @@ int media_info_set_author(media_info_h media, const char *author);
  * @param[in] media    The media info handle
  * @param[in] provider The provider of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1336,7 +1336,7 @@ int media_info_set_provider(media_info_h media, const char *provider);
  * @param[in] media        The media info handle
  * @param[in] content_name The content name of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1355,7 +1355,7 @@ int media_info_set_content_name(media_info_h media, const char *content_name);
  * @param[in] media    The media info handle
  * @param[in] category The category of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1374,7 +1374,7 @@ int media_info_set_category(media_info_h media, const char *category);
  * @param[in] media        The media info handle
  * @param[in] location_tag The location of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1393,7 +1393,7 @@ int media_info_set_location_tag(media_info_h media, const char *location_tag);
  * @param[in] media      The media info handle
  * @param[in] age_rating The age rating of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1412,7 +1412,7 @@ int media_info_set_age_rating(media_info_h media, const char *age_rating);
  * @param[in] media   The media info handle
  * @param[in] keyword The keyword of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1426,7 +1426,7 @@ int media_info_set_keyword(media_info_h media, const char *keyword);
 
 /**
  * @brief Updates the media info to the media database.
- * 
+ *
  * @details The function updates the given media info in the media database.
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
@@ -1440,7 +1440,7 @@ int media_info_set_keyword(media_info_h media, const char *keyword);
  *
  * @param[in] media The media info handle
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1487,7 +1487,7 @@ int media_info_update_to_db(media_info_h media);
  *
  * @param[in] media_id The ID of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1512,7 +1512,7 @@ int media_info_refresh_metadata_to_db(const char *media_id);
  * @param[in] media      The media info handle
  * @param[in] added_time The added time of the media info
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1541,7 +1541,7 @@ int media_info_set_added_time(media_info_h media, time_t added_time);
  * @param[in] media    The media info handle
  * @param[in] dst_path The path of destination
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1575,7 +1575,7 @@ int media_info_move_to_db(media_info_h media, const char* dst_path);
  * @param[in] callback  The callback function to be invoked
  * @param[in] user_data The user data to be passed to the callback function
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
@@ -1604,7 +1604,7 @@ int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb
  *
  * @param[in] media The media info handle
  *
- * @return @c 0 on success, 
+ * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
index 8f70355..c19b8c3 100755 (executable)
@@ -31,10 +31,9 @@ static int __media_face_check_media_id(const char *media_id)
        SQLITE3_SAFE_FREE(query_str);
        media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
 
-       while(sqlite3_step(stmt) == SQLITE_ROW)
-       {
+       while (sqlite3_step(stmt) == SQLITE_ROW)
                item_count = (int)sqlite3_column_int(stmt, 0);
-       }
+
        SQLITE3_FINALIZE(stmt);
 
        media_content_retvm_if(item_count == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_id");
@@ -51,22 +50,18 @@ int media_face_clone(media_face_h *dst, media_face_h src)
        media_face_s *_dst = (media_face_s *)calloc(1, sizeof(media_face_s));
        media_content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
 
-       if (STRING_VALID(_src->face_id))
-       {
+       if (STRING_VALID(_src->face_id)) {
                _dst->face_id = strdup(_src->face_id);
-               if(_dst->face_id== NULL)
-               {
+               if (_dst->face_id == NULL) {
                        media_face_destroy((media_face_h)_dst);
                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                }
        }
 
-       if (STRING_VALID(_src->media_id))
-       {
+       if (STRING_VALID(_src->media_id)) {
                _dst->media_id = strdup(_src->media_id);
-               if(_dst->media_id== NULL)
-               {
+               if (_dst->media_id == NULL) {
                        media_face_destroy((media_face_h)_dst);
                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
@@ -79,11 +74,9 @@ int media_face_clone(media_face_h *dst, media_face_h src)
        _dst->face_rect_h = _src->face_rect_h;
        _dst->orientation = _src->orientation;
 
-       if (STRING_VALID(_src->face_tag))
-       {
+       if (STRING_VALID(_src->face_tag)) {
                _dst->face_tag = strdup(_src->face_tag);
-               if(_dst->face_tag== NULL)
-               {
+               if (_dst->face_tag == NULL) {
                        media_face_destroy((media_face_h)_dst);
                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
@@ -107,7 +100,7 @@ int media_face_destroy(media_face_h face)
        SAFE_FREE(_face);
 
        return MEDIA_CONTENT_ERROR_NONE;
-} 
+}
 
 int media_face_get_face_id(media_face_h face, char **face_id)
 {
@@ -115,38 +108,32 @@ int media_face_get_face_id(media_face_h face, char **face_id)
 
        media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
 
-       if(STRING_VALID(_face->face_id))
-       {
+       if (STRING_VALID(_face->face_id)) {
                *face_id = strdup(_face->face_id);
                media_content_retvm_if(*face_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
-       }
-       else
-       {
+       } else {
                *face_id = NULL;
        }
 
        return MEDIA_CONTENT_ERROR_NONE;
 }
+
 int media_face_get_media_id(media_face_h face, char **media_id)
 {
        media_face_s* _face = (media_face_s*)face;
 
        media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
 
-       if(STRING_VALID(_face->media_id))
-       {
+       if (STRING_VALID(_face->media_id)) {
                *media_id = strdup(_face->media_id);
                media_content_retvm_if(*media_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
-       }
-       else
-       {
+       } else {
                *media_id = NULL;
        }
 
        return MEDIA_CONTENT_ERROR_NONE;
 }
+
 int media_face_get_face_rect(media_face_h face, unsigned int *rect_x, unsigned int *rect_y, unsigned int *rect_w, unsigned int *rect_h)
 {
        media_face_s* _face = (media_face_s*)face;
@@ -180,13 +167,10 @@ int media_face_get_tag(media_face_h face, char **tag)
 
        media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
 
-       if (STRING_VALID(_face->face_tag))
-       {
+       if (STRING_VALID(_face->face_tag)) {
                *tag = strdup(_face->face_tag);
                media_content_retvm_if(*tag == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
-       }
-       else
-       {
+       } else {
                *tag = NULL;
        }
 
index b57c48e..8f83030 100755 (executable)
@@ -57,17 +57,15 @@ static void __media_info_insert_completed_cb(media_request_result_s *result, voi
        media_insert_cb_s *_cb_data = (media_insert_cb_s *)user_data;
 
        if (_cb_data) {
-               if (result) {
+               if (result)
                        ret = _content_error_capi(MEDIA_CONTENT_TYPE, result->result);
-               }
 
                if (_cb_data->insert_completed_cb)
                        _cb_data->insert_completed_cb(ret, _cb_data->user_data);
 
                if (STRING_VALID(_cb_data->insert_list_path)) {
-                       if (unlink(_cb_data->insert_list_path) < 0) {
+                       if (unlink(_cb_data->insert_list_path) < 0)
                                media_content_stderror("failed to delete");
-                       }
                        SAFE_FREE(_cb_data->insert_list_path);
                }
        }
@@ -84,11 +82,9 @@ static void __media_info_thumbnail_completed_cb(int error, const char *path, voi
        media_thumbnail_cb_s *_thumb_cb = (media_thumbnail_cb_s *)user_data;
        media_info_s *media = NULL;
 
-       if (_thumb_cb != NULL)
-       {
+       if (_thumb_cb != NULL) {
                media = _thumb_cb->handle;
-               if((media != NULL) && STRING_VALID(path))
-               {
+               if ((media != NULL) && STRING_VALID(path)) {
                        SAFE_FREE(media->thumbnail_path);
                        media->thumbnail_path = strdup(path);
                }
@@ -122,9 +118,8 @@ static bool __media_info_delete_batch_cb(media_info_h media, void *user_data)
 
                media_info_get_thumbnail_path(media, &thumb_path);
                if (STRING_VALID(thumb_path) && STRING_VALID(MEDIA_CONTENT_THUMB_DEFAULT_PATH)) {
-                       if (strncmp(MEDIA_CONTENT_THUMB_DEFAULT_PATH, thumb_path, strlen(MEDIA_CONTENT_THUMB_DEFAULT_PATH)) != 0) {
+                       if (strncmp(MEDIA_CONTENT_THUMB_DEFAULT_PATH, thumb_path, strlen(MEDIA_CONTENT_THUMB_DEFAULT_PATH)) != 0)
                                g_array_append_val(thumb_list, thumb_path);
-                       }
                }
        } else {
                media_content_error("media_info_get_media_type failed");
@@ -175,9 +170,8 @@ static int __media_info_insert_batch(media_batch_insert_e insert_type, const cha
                        ret = _media_util_check_file_exist(path_array[idx]);
                        if (ret != MEDIA_CONTENT_ERROR_NONE) {
                                fclose(fp);
-                               if (unlink(list_path) < 0) {
+                               if (unlink(list_path) < 0)
                                        media_content_stderror("failed to delete");
-                               }
                                return ret;
                        }
 
@@ -185,9 +179,8 @@ static int __media_info_insert_batch(media_batch_insert_e insert_type, const cha
                        if (nwrites != size) {
                                media_content_stderror("failed to write");
                                fclose(fp);
-                               if (unlink(list_path) < 0) {
+                               if (unlink(list_path) < 0)
                                        media_content_stderror("failed to delete");
-                               }
                                return MEDIA_CONTENT_ERROR_INVALID_OPERATION;
                        }
 
@@ -195,9 +188,8 @@ static int __media_info_insert_batch(media_batch_insert_e insert_type, const cha
                        if (nwrites != 1) {
                                media_content_stderror("failed to write");
                                fclose(fp);
-                               if (unlink(list_path) < 0) {
+                               if (unlink(list_path) < 0)
                                        media_content_stderror("failed to delete");
-                               }
                                return MEDIA_CONTENT_ERROR_INVALID_OPERATION;
                        }
                } else {
@@ -223,9 +215,8 @@ static int __media_info_insert_batch(media_batch_insert_e insert_type, const cha
 
        if (ret != MEDIA_CONTENT_ERROR_NONE) {
                media_content_error("media_files_register failed : %d", ret);
-               if (unlink(list_path) < 0) {
+               if (unlink(list_path) < 0)
                        media_content_stderror("failed to delete");
-               }
                return _content_error_capi(MEDIA_CONTENT_TYPE, ret);
        }
 
@@ -244,7 +235,7 @@ void _media_info_item_get_detail(sqlite3_stmt* stmt, media_info_h media)
        _media->size = (unsigned long long)sqlite3_column_int64(stmt, MEDIA_INFO_SIZE);
        _media->added_time = (int)sqlite3_column_int(stmt, MEDIA_INFO_ADDED_TIME);
        _media->modified_time = (int)sqlite3_column_int(stmt, MEDIA_INFO_MODIFIED_TIME);
-       _media->thumbnail_path= g_strdup((const char *)sqlite3_column_text(stmt, MEDIA_INFO_THUMBNAIL_PATH));
+       _media->thumbnail_path = g_strdup((const char *)sqlite3_column_text(stmt, MEDIA_INFO_THUMBNAIL_PATH));
        _media->description = g_strdup((const char *)sqlite3_column_text(stmt, MEDIA_INFO_DESCRIPTION));
        _media->rating = (int)sqlite3_column_int(stmt, MEDIA_INFO_RATING);
        _media->favourite = (int)sqlite3_column_int(stmt, MEDIA_INFO_FAVOURITE);
@@ -285,7 +276,6 @@ void _media_info_item_get_detail(sqlite3_stmt* stmt, media_info_h media)
                        _media->image_meta->exposure_time = g_strdup((const char *)sqlite3_column_text(stmt, MEDIA_INFO_EXPOSURE_TIME));
                        _media->image_meta->model = g_strdup((const char *)sqlite3_column_text(stmt, MEDIA_INFO_MODEL));
                }
-
        } else if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO) {
                _media->video_meta = (video_meta_s *)calloc(1, sizeof(video_meta_s));
                if (_media->video_meta) {
@@ -309,8 +299,7 @@ void _media_info_item_get_detail(sqlite3_stmt* stmt, media_info_h media)
                        _media->video_meta->played_position = sqlite3_column_int(stmt, MEDIA_INFO_LAST_PLAYED_POSITION);
                }
 
-       }
-       else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND)) {
+       } else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND)) {
                _media->audio_meta = (audio_meta_s *)calloc(1, sizeof(audio_meta_s));
                if (_media->audio_meta) {
                        _media->audio_meta->media_id = g_strdup(_media->media_id);
@@ -351,8 +340,7 @@ int _media_info_get_media_info_from_db(const char *path, const char *storage_id,
        SQLITE3_SAFE_FREE(select_query);
        media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
 
-       if (sqlite3_step(stmt) == SQLITE_ROW)
-       {
+       if (sqlite3_step(stmt) == SQLITE_ROW) {
                _media_info_item_get_detail(stmt, (media_info_h)_media);
        } else {
                media_content_error("There's no media!!");
@@ -389,8 +377,7 @@ int media_info_insert_to_db(const char *path, media_info_h *info)
 
        memset(storage_id, 0x00, sizeof(storage_id));
        ret = media_svc_get_storage_id(_content_get_db_handle(), path, storage_id);
-       if (ret != MS_MEDIA_ERR_NONE)
-       {
+       if (ret != MS_MEDIA_ERR_NONE) {
                media_content_error("media_svc_get_storage_id failed : %d", ret);
                return _content_error_capi(MEDIA_CONTENT_TYPE, ret);
        }
@@ -459,8 +446,7 @@ int media_info_delete_from_db(const char *media_id)
        char *path = NULL;
        char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0, };
 
-       if (!STRING_VALID(media_id))
-       {
+       if (!STRING_VALID(media_id)) {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -494,15 +480,12 @@ static int __media_info_delete_thumb_from_list(GArray *thumb_list)
        char *thumb_path = NULL;
 
        if (thumb_list != NULL) {
-
                list_len = thumb_list->len;
-
-               for (i = 0; i < list_len; i ++) {
+               for (i = 0; i < list_len; i++) {
                        thumb_path = g_array_index(thumb_list, char*, i);
                        media_content_debug("thumb path [%s]", thumb_path);
-                       if (unlink(thumb_path) < 0) {
+                       if (unlink(thumb_path) < 0)
                                media_content_stderror("failed to delete");
-                       }
                }
        }
        return MEDIA_CONTENT_ERROR_NONE;
@@ -515,12 +498,10 @@ static int __media_info_release_thumb_list(GArray *thumb_list)
        char *thumb_path = NULL;
 
        if (thumb_list != NULL) {
-
                list_len = thumb_list->len;
-
-               for (i = 0; i < list_len; i ++) {
+               for (i = 0; i < list_len; i++) {
                        thumb_path = g_array_index(thumb_list, char*, 0);
-                       g_array_remove_index(thumb_list,0);
+                       g_array_remove_index(thumb_list, 0);
                        SAFE_FREE(thumb_path);
                }
 
@@ -550,8 +531,7 @@ int media_info_delete_batch_from_db(filter_h filter)
        _filter = (filter_s*)filter;
        attr = _content_get_attirbute_handle();
 
-       if (_filter->condition)
-       {
+       if (_filter->condition) {
                ret = _media_filter_attribute_generate(attr, _filter->condition, _filter->condition_collate_type, &condition_query);
                if (ret != MEDIA_CONTENT_ERROR_NONE) {
                        __media_info_release_thumb_list(thumb_list);
@@ -559,17 +539,14 @@ int media_info_delete_batch_from_db(filter_h filter)
                }
        }
 
-       if (STRING_VALID(condition_query))
-       {
+       if (STRING_VALID(condition_query)) {
                if (_filter->storage_id == NULL) {
                        /*FIX ME*/
                        query_string = sqlite3_mprintf(DELETE_MEDIA_FROM_MEDIA_BATCH, "media", condition_query);
                } else {
                        query_string = sqlite3_mprintf(DELETE_MEDIA_FROM_MEDIA_BATCH, _filter->storage_id, condition_query);
                }
-       }
-       else
-       {
+       } else {
                SAFE_FREE(condition_query);
                __media_info_release_thumb_list(thumb_list);
 
@@ -610,8 +587,7 @@ int media_info_destroy(media_info_h media)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media)
-       {
+       if (_media) {
                SAFE_FREE(_media->media_id);
                SAFE_FREE(_media->file_path);
                SAFE_FREE(_media->display_name);
@@ -676,9 +652,7 @@ int media_info_destroy(media_info_h media)
                SAFE_FREE(_media);
 
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -691,169 +665,136 @@ int media_info_clone(media_info_h *dst, media_info_h src)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_src = (media_info_s*)src;
 
-       if (_src != NULL)
-       {
+       if (_src != NULL) {
                media_info_s *_dst = (media_info_s*)calloc(1, sizeof(media_info_s));
                media_content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
 
-               if(STRING_VALID(_src->media_id))
-               {
+               if (STRING_VALID(_src->media_id)) {
                        _dst->media_id = strdup(_src->media_id);
-                       if(_dst->media_id == NULL)
-                       {
+                       if (_dst->media_id == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->file_path))
-               {
+               if (STRING_VALID(_src->file_path)) {
                        _dst->file_path = strdup(_src->file_path);
-                       if(_dst->file_path == NULL)
-                       {
+                       if (_dst->file_path == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->display_name))
-               {
+               if (STRING_VALID(_src->display_name)) {
                        _dst->display_name = strdup(_src->display_name);
-                       if(_dst->display_name == NULL)
-                       {
+                       if (_dst->display_name == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->mime_type))
-               {
+               if (STRING_VALID(_src->mime_type)) {
                        _dst->mime_type = strdup(_src->mime_type);
-                       if(_dst->mime_type == NULL)
-                       {
+                       if (_dst->mime_type == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->thumbnail_path))
-               {
+               if (STRING_VALID(_src->thumbnail_path)) {
                        _dst->thumbnail_path = strdup(_src->thumbnail_path);
-                       if(_dst->thumbnail_path == NULL)
-                       {
+                       if (_dst->thumbnail_path == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->description))
-               {
+               if (STRING_VALID(_src->description)) {
                        _dst->description = strdup(_src->description);
-                       if(_dst->description == NULL)
-                       {
+                       if (_dst->description == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
 
-               if(STRING_VALID(_src->weather))
-               {
+               if (STRING_VALID(_src->weather)) {
                        _dst->weather = strdup(_src->weather);
-                       if(_dst->weather == NULL)
-                       {
+                       if (_dst->weather == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
 
-               if(STRING_VALID(_src->title))
-               {
+               if (STRING_VALID(_src->title)) {
                        _dst->title = strdup(_src->title);
-                       if(_dst->title == NULL)
-                       {
+                       if (_dst->title == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->author))
-               {
+               if (STRING_VALID(_src->author)) {
                        _dst->author = strdup(_src->author);
-                       if(_dst->author == NULL)
-                       {
+                       if (_dst->author == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->provider))
-               {
+               if (STRING_VALID(_src->provider)) {
                        _dst->provider = strdup(_src->provider);
-                       if(_dst->provider == NULL)
-                       {
+                       if (_dst->provider == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->content_name))
-               {
+               if (STRING_VALID(_src->content_name)) {
                        _dst->content_name = strdup(_src->content_name);
-                       if(_dst->content_name == NULL)
-                       {
+                       if (_dst->content_name == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->category))
-               {
+               if (STRING_VALID(_src->category)) {
                        _dst->category = strdup(_src->category);
-                       if(_dst->category == NULL)
-                       {
+                       if (_dst->category == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->location_tag))
-               {
+               if (STRING_VALID(_src->location_tag)) {
                        _dst->location_tag = strdup(_src->location_tag);
-                       if(_dst->location_tag == NULL)
-                       {
+                       if (_dst->location_tag == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->age_rating))
-               {
+               if (STRING_VALID(_src->age_rating)) {
                        _dst->age_rating = strdup(_src->age_rating);
-                       if(_dst->age_rating == NULL)
-                       {
+                       if (_dst->age_rating == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
-               if(STRING_VALID(_src->keyword))
-               {
+               if (STRING_VALID(_src->keyword)) {
                        _dst->keyword = strdup(_src->keyword);
-                       if(_dst->keyword == NULL)
-                       {
+                       if (_dst->keyword == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
                }
 
-               if(STRING_VALID(_src->storage_uuid))
-               {
+               if (STRING_VALID(_src->storage_uuid)) {
                        _dst->storage_uuid = strdup(_src->storage_uuid);
-                       if(_dst->storage_uuid == NULL)
-                       {
+                       if (_dst->storage_uuid == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
@@ -879,73 +820,60 @@ int media_info_clone(media_info_h *dst, media_info_h src)
 
                if (_src->media_type == MEDIA_CONTENT_TYPE_IMAGE && _src->image_meta) {
                        _dst->image_meta = (image_meta_s *)calloc(1, sizeof(image_meta_s));
-                       if (_dst->image_meta == NULL)
-                       {
+                       if (_dst->image_meta == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
 
-                       if(STRING_VALID(_src->image_meta->media_id))
-                       {
+                       if (STRING_VALID(_src->image_meta->media_id)) {
                                _dst->image_meta->media_id = strdup(_src->image_meta->media_id);
-                               if(_dst->image_meta->media_id == NULL)
-                               {
+                               if (_dst->image_meta->media_id == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
 
-                       if(STRING_VALID(_src->image_meta->date_taken))
-                       {
+                       if (STRING_VALID(_src->image_meta->date_taken)) {
                                _dst->image_meta->date_taken = strdup(_src->image_meta->date_taken);
-                               if(_dst->image_meta->date_taken == NULL)
-                               {
+                               if (_dst->image_meta->date_taken == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
 
-                       if(STRING_VALID(_src->image_meta->burst_id))
-                       {
+                       if (STRING_VALID(_src->image_meta->burst_id)) {
                                _dst->image_meta->burst_id = strdup(_src->image_meta->burst_id);
-                               if(_dst->image_meta->burst_id == NULL)
-                               {
+                               if (_dst->image_meta->burst_id == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
 
-                       if(STRING_VALID(_src->image_meta->weather))
-                       {
+                       if (STRING_VALID(_src->image_meta->weather)) {
                                _dst->image_meta->weather = strdup(_src->image_meta->weather);
-                               if(_dst->image_meta->weather == NULL)
-                               {
+                               if (_dst->image_meta->weather == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
 
-                       if(STRING_VALID(_src->image_meta->exposure_time))
-                       {
+                       if (STRING_VALID(_src->image_meta->exposure_time)) {
                                _dst->image_meta->exposure_time = strdup(_src->image_meta->exposure_time);
-                               if(_dst->image_meta->exposure_time == NULL)
-                               {
+                               if (_dst->image_meta->exposure_time == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
 
-                       if(STRING_VALID(_src->image_meta->model))
-                       {
+                       if (STRING_VALID(_src->image_meta->model)) {
                                _dst->image_meta->model = strdup(_src->image_meta->model);
-                               if(_dst->image_meta->model == NULL)
-                               {
+                               if (_dst->image_meta->model == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
@@ -960,118 +888,95 @@ int media_info_clone(media_info_h *dst, media_info_h src)
 
                } else if (_src->media_type == MEDIA_CONTENT_TYPE_VIDEO && _src->video_meta) {
                        _dst->video_meta = (video_meta_s *)calloc(1, sizeof(video_meta_s));
-                       if (_dst->video_meta == NULL)
-                       {
+                       if (_dst->video_meta == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
 
-                       if(STRING_VALID(_src->video_meta->media_id))
-                       {
+                       if (STRING_VALID(_src->video_meta->media_id)) {
                                _dst->video_meta->media_id = strdup(_src->video_meta->media_id);
-                               if(_dst->video_meta->media_id == NULL)
-                               {
+                               if (_dst->video_meta->media_id == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->video_meta->title))
-                       {
+                       if (STRING_VALID(_src->video_meta->title)) {
                                _dst->video_meta->title = strdup(_src->video_meta->title);
-                               if(_dst->video_meta->title == NULL)
-                               {
+                               if (_dst->video_meta->title == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->video_meta->album))
-                       {
+                       if (STRING_VALID(_src->video_meta->album)) {
                                _dst->video_meta->album = strdup(_src->video_meta->album);
-                               if(_dst->video_meta->album == NULL)
-                               {
+                               if (_dst->video_meta->album == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->video_meta->artist))
-                       {
+                       if (STRING_VALID(_src->video_meta->artist)) {
                                _dst->video_meta->artist = strdup(_src->video_meta->artist);
-                               if(_dst->video_meta->artist == NULL)
-                               {
+                               if (_dst->video_meta->artist == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->video_meta->album_artist))
-                       {
+                       if (STRING_VALID(_src->video_meta->album_artist)) {
                                _dst->video_meta->album_artist = strdup(_src->video_meta->album_artist);
-                               if(_dst->video_meta->album_artist == NULL)
-                               {
+                               if (_dst->video_meta->album_artist == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->video_meta->genre))
-                       {
+                       if (STRING_VALID(_src->video_meta->genre)) {
                                _dst->video_meta->genre = strdup(_src->video_meta->genre);
-                               if(_dst->video_meta->genre == NULL)
-                               {
+                               if (_dst->video_meta->genre == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->video_meta->composer))
-                       {
+                       if (STRING_VALID(_src->video_meta->composer)) {
                                _dst->video_meta->composer = strdup(_src->video_meta->composer);
-                               if(_dst->video_meta->composer == NULL)
-                               {
+                               if (_dst->video_meta->composer == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->video_meta->year))
-                       {
+                       if (STRING_VALID(_src->video_meta->year)) {
                                _dst->video_meta->year = strdup(_src->video_meta->year);
-                               if(_dst->video_meta->year == NULL)
-                               {
+                               if (_dst->video_meta->year == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->video_meta->recorded_date))
-                       {
+                       if (STRING_VALID(_src->video_meta->recorded_date)) {
                                _dst->video_meta->recorded_date = strdup(_src->video_meta->recorded_date);
-                               if(_dst->video_meta->recorded_date == NULL)
-                               {
+                               if (_dst->video_meta->recorded_date == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->video_meta->copyright))
-                       {
+                       if (STRING_VALID(_src->video_meta->copyright)) {
                                _dst->video_meta->copyright = strdup(_src->video_meta->copyright);
-                               if(_dst->video_meta->copyright == NULL)
-                               {
+                               if (_dst->video_meta->copyright == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->video_meta->track_num))
-                       {
+                       if (STRING_VALID(_src->video_meta->track_num)) {
                                _dst->video_meta->track_num = strdup(_src->video_meta->track_num);
-                               if(_dst->video_meta->track_num == NULL)
-                               {
+                               if (_dst->video_meta->track_num == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
@@ -1088,118 +993,95 @@ int media_info_clone(media_info_h *dst, media_info_h src)
 
                } else if ((_src->media_type == MEDIA_CONTENT_TYPE_MUSIC || _src->media_type == MEDIA_CONTENT_TYPE_SOUND) && _src->audio_meta) {
                        _dst->audio_meta = (audio_meta_s *)calloc(1, sizeof(audio_meta_s));
-                       if (_dst->audio_meta == NULL)
-                       {
+                       if (_dst->audio_meta == NULL) {
                                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                media_info_destroy((media_info_h)_dst);
                                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                        }
 
-                       if(STRING_VALID(_src->audio_meta->media_id))
-                       {
+                       if (STRING_VALID(_src->audio_meta->media_id)) {
                                _dst->audio_meta->media_id = strdup(_src->audio_meta->media_id);
-                               if(_dst->audio_meta->media_id == NULL)
-                               {
+                               if (_dst->audio_meta->media_id == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->audio_meta->title))
-                       {
+                       if (STRING_VALID(_src->audio_meta->title)) {
                                _dst->audio_meta->title = strdup(_src->audio_meta->title);
-                               if(_dst->audio_meta->title == NULL)
-                               {
+                               if (_dst->audio_meta->title == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->audio_meta->album))
-                       {
+                       if (STRING_VALID(_src->audio_meta->album)) {
                                _dst->audio_meta->album = strdup(_src->audio_meta->album);
-                               if(_dst->audio_meta->album == NULL)
-                               {
+                               if (_dst->audio_meta->album == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->audio_meta->artist))
-                       {
+                       if (STRING_VALID(_src->audio_meta->artist)) {
                                _dst->audio_meta->artist = strdup(_src->audio_meta->artist);
-                               if(_dst->audio_meta->artist == NULL)
-                               {
+                               if (_dst->audio_meta->artist == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->audio_meta->album_artist))
-                       {
+                       if (STRING_VALID(_src->audio_meta->album_artist)) {
                                _dst->audio_meta->album_artist = strdup(_src->audio_meta->album_artist);
-                               if(_dst->audio_meta->album_artist == NULL)
-                               {
+                               if (_dst->audio_meta->album_artist == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->audio_meta->genre))
-                       {
+                       if (STRING_VALID(_src->audio_meta->genre)) {
                                _dst->audio_meta->genre = strdup(_src->audio_meta->genre);
-                               if(_dst->audio_meta->genre == NULL)
-                               {
+                               if (_dst->audio_meta->genre == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->audio_meta->composer))
-                       {
+                       if (STRING_VALID(_src->audio_meta->composer)) {
                                _dst->audio_meta->composer = strdup(_src->audio_meta->composer);
-                               if(_dst->audio_meta->composer == NULL)
-                               {
+                               if (_dst->audio_meta->composer == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->audio_meta->year))
-                       {
+                       if (STRING_VALID(_src->audio_meta->year)) {
                                _dst->audio_meta->year = strdup(_src->audio_meta->year);
-                               if(_dst->audio_meta->year == NULL)
-                               {
+                               if (_dst->audio_meta->year == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->audio_meta->recorded_date))
-                       {
+                       if (STRING_VALID(_src->audio_meta->recorded_date)) {
                                _dst->audio_meta->recorded_date = strdup(_src->audio_meta->recorded_date);
-                               if(_dst->audio_meta->recorded_date == NULL)
-                               {
+                               if (_dst->audio_meta->recorded_date == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->audio_meta->copyright))
-                       {
+                       if (STRING_VALID(_src->audio_meta->copyright)) {
                                _dst->audio_meta->copyright = strdup(_src->audio_meta->copyright);
-                               if(_dst->audio_meta->copyright == NULL)
-                               {
+                               if (_dst->audio_meta->copyright == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       if(STRING_VALID(_src->audio_meta->track_num))
-                       {
+                       if (STRING_VALID(_src->audio_meta->track_num)) {
                                _dst->audio_meta->track_num = strdup(_src->audio_meta->track_num);
-                               if(_dst->audio_meta->track_num == NULL)
-                               {
+                               if (_dst->audio_meta->track_num == NULL) {
                                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                                        media_info_destroy((media_info_h)_dst);
                                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
@@ -1219,9 +1101,7 @@ int media_info_clone(media_info_h *dst, media_info_h src)
                *dst = (media_info_h)_dst;
 
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1233,8 +1113,7 @@ int media_info_get_media_count_from_db(filter_h filter, int *media_count)
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
 
-       if (media_count == NULL)
-       {
+       if (media_count == NULL) {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
 
@@ -1261,12 +1140,9 @@ int media_info_get_tag_count_from_db(const char *media_id, filter_h filter, int
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
 
-       if (STRING_VALID(media_id) && tag_count)
-       {
+       if (STRING_VALID(media_id) && tag_count) {
                ret = _media_db_get_group_item_count(media_id, filter, MEDIA_GROUP_TAG_BY_MEDIA_ID, tag_count);
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1278,12 +1154,9 @@ int media_info_foreach_tag_from_db(const char *media_id, filter_h filter, media_
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
 
-       if ((callback != NULL) && STRING_VALID(media_id))
-       {
+       if ((callback != NULL) && STRING_VALID(media_id)) {
                ret = _media_db_get_tag(media_id, filter, callback, user_data);
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1295,12 +1168,9 @@ int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter,
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
 
-       if (STRING_VALID(media_id) && bookmark_count)
-       {
+       if (STRING_VALID(media_id) && bookmark_count) {
                ret = _media_db_get_group_item_count(media_id, filter, MEDIA_GROUP_BOOKMARK_BY_MEDIA_ID, bookmark_count);
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1308,16 +1178,13 @@ int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter,
        return ret;
 }
 
-int media_info_foreach_bookmark_from_db (const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data)
+int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data)
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
 
-       if ((callback != NULL) && STRING_VALID(media_id))
-       {
+       if ((callback != NULL) && STRING_VALID(media_id)) {
                ret = _media_db_get_bookmark(media_id, filter, callback, user_data);
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1329,12 +1196,9 @@ int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
 
-       if (STRING_VALID(media_id) && face_count)
-       {
+       if (STRING_VALID(media_id) && face_count) {
                ret = _media_db_get_group_item_count(media_id, filter, MEDIA_GROUP_FACE_BY_MEDIA_ID, face_count);
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1342,16 +1206,13 @@ int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int
        return ret;
 }
 
-int media_info_foreach_face_from_db (const char *media_id, filter_h filter, media_face_cb callback, void *user_data)
+int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data)
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
 
-       if ((callback != NULL) && STRING_VALID(media_id))
-       {
+       if ((callback != NULL) && STRING_VALID(media_id)) {
                ret = _media_db_get_face(media_id, filter, callback, user_data);
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1472,21 +1333,15 @@ int media_info_get_media_id(media_info_h media, char **media_id)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && media_id)
-       {
-               if (STRING_VALID(_media->media_id))
-               {
+       if (_media && media_id) {
+               if (STRING_VALID(_media->media_id)) {
                        *media_id = strdup(_media->media_id);
                        media_content_retvm_if(*media_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *media_id = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1499,22 +1354,16 @@ int media_info_get_file_path(media_info_h media, char **path)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && path)
-       {
-               if (STRING_VALID(_media->file_path))
-               {
+       if (_media && path) {
+               if (STRING_VALID(_media->file_path)) {
                        *path = strdup(_media->file_path);
                        media_content_retvm_if(*path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *path = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
 
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1526,22 +1375,16 @@ int media_info_get_display_name(media_info_h media, char **name)
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
-       if (_media && name)
-       {
-               if (STRING_VALID(_media->display_name))
-               {
+       if (_media && name) {
+               if (STRING_VALID(_media->display_name)) {
                        *name = strdup(_media->display_name);
                        media_content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *name = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
 
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1553,13 +1396,10 @@ int media_info_get_media_type(media_info_h media, media_content_type_e *type)
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
-       if (_media && type)
-       {
+       if (_media && type) {
                *type = _media->media_type;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1572,21 +1412,15 @@ int media_info_get_mime_type(media_info_h media, char **mime_type)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && mime_type)
-       {
-               if (STRING_VALID(_media->mime_type))
-               {
+       if (_media && mime_type) {
+               if (STRING_VALID(_media->mime_type)) {
                        *mime_type = strdup(_media->mime_type);
                        media_content_retvm_if(*mime_type == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *mime_type = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1599,13 +1433,10 @@ int media_info_get_size(media_info_h media, unsigned long long *size)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && size)
-       {
+       if (_media && size) {
                *size = _media->size;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1617,13 +1448,10 @@ int media_info_get_added_time(media_info_h media, time_t *added_time)
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
-       if (_media && added_time)
-       {
+       if (_media && added_time) {
                *added_time = _media->added_time;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1635,13 +1463,10 @@ int media_info_get_modified_time(media_info_h media, time_t* time)
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
-       if (_media && time)
-       {
+       if (_media && time) {
                *time = _media->modified_time;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1653,13 +1478,10 @@ int media_info_get_timeline(media_info_h media, time_t* time)
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
-       if (_media && time)
-       {
+       if (_media && time) {
                *time = _media->timeline;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1671,22 +1493,16 @@ int media_info_get_thumbnail_path(media_info_h media, char **path)
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
-       if (_media && path)
-       {
-               if(STRING_VALID(_media->thumbnail_path))
-               {
+       if (_media && path) {
+               if (STRING_VALID(_media->thumbnail_path)) {
                        *path = strdup(_media->thumbnail_path);
                        media_content_retvm_if(*path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *path = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
 
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1699,21 +1515,15 @@ int media_info_get_title(media_info_h media, char **title)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && title)    /*title can be empty string*/
-       {
-               if(STRING_VALID(_media->title))
-               {
+       if (_media && title)    { /*title can be empty string*/
+               if (STRING_VALID(_media->title)) {
                        *title = strdup(_media->title);
                        media_content_retvm_if(*title == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *title = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1726,21 +1536,15 @@ int media_info_get_description(media_info_h media, char **description)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && description)
-       {
-               if(STRING_VALID(_media->description))
-               {
+       if (_media && description) {
+               if (STRING_VALID(_media->description)) {
                        *description = strdup(_media->description);
                        media_content_retvm_if(*description == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *description = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1753,13 +1557,10 @@ int media_info_get_longitude(media_info_h media, double* longitude)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && longitude)
-       {
+       if (_media && longitude) {
                *longitude = _media->longitude;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1771,13 +1572,10 @@ int media_info_get_latitude(media_info_h media, double* latitude)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && latitude)
-       {
+       if (_media && latitude) {
                *latitude = _media->latitude;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1790,13 +1588,10 @@ int media_info_get_altitude(media_info_h media, double *altitude)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && altitude)
-       {
+       if (_media && altitude) {
                *altitude = _media->altitude;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1809,21 +1604,15 @@ int media_info_get_weather(media_info_h media, char **weather)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && weather)
-       {
-               if(STRING_VALID(_media->weather))
-               {
+       if (_media && weather) {
+               if (STRING_VALID(_media->weather)) {
                        *weather = strdup(_media->weather);
                        media_content_retvm_if(*weather == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *weather = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1836,13 +1625,10 @@ int media_info_get_rating(media_info_h media, int *rating)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && rating)
-       {
+       if (_media && rating) {
                *rating = _media->rating;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1855,14 +1641,10 @@ int media_info_get_favorite(media_info_h media, bool* favorite)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && favorite)
-       {
-
+       if (_media && favorite) {
                *favorite = _media->favourite;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1875,21 +1657,15 @@ int media_info_get_author(media_info_h media, char **author)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && author)
-       {
-               if(STRING_VALID(_media->author))
-               {
+       if (_media && author) {
+               if (STRING_VALID(_media->author)) {
                        *author = strdup(_media->author);
                        media_content_retvm_if(*author == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *author = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1902,21 +1678,15 @@ int media_info_get_provider(media_info_h media, char **provider)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && provider)
-       {
-               if(STRING_VALID(_media->provider))
-               {
+       if (_media && provider) {
+               if (STRING_VALID(_media->provider)) {
                        *provider = strdup(_media->provider);
                        media_content_retvm_if(*provider == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *provider = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1929,21 +1699,15 @@ int media_info_get_content_name(media_info_h media, char **content_name)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && content_name)
-       {
-               if(STRING_VALID(_media->content_name))
-               {
+       if (_media && content_name) {
+               if (STRING_VALID(_media->content_name)) {
                        *content_name = strdup(_media->content_name);
                        media_content_retvm_if(*content_name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *content_name = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1956,21 +1720,15 @@ int media_info_get_category(media_info_h media, char **category)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && category)
-       {
-               if(STRING_VALID(_media->category))
-               {
+       if (_media && category) {
+               if (STRING_VALID(_media->category)) {
                        *category = strdup(_media->category);
                        media_content_retvm_if(*category == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *category = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -1983,21 +1741,15 @@ int media_info_get_location_tag(media_info_h media, char **location_tag)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && location_tag)
-       {
-               if(STRING_VALID(_media->location_tag))
-               {
+       if (_media && location_tag) {
+               if (STRING_VALID(_media->location_tag)) {
                        *location_tag = strdup(_media->location_tag);
                        media_content_retvm_if(*location_tag == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *location_tag = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2010,21 +1762,15 @@ int media_info_get_age_rating(media_info_h media, char **age_rating)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && age_rating)
-       {
-               if(STRING_VALID(_media->age_rating))
-               {
+       if (_media && age_rating) {
+               if (STRING_VALID(_media->age_rating)) {
                        *age_rating = strdup(_media->age_rating);
                        media_content_retvm_if(*age_rating == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *age_rating = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2037,21 +1783,15 @@ int media_info_get_keyword(media_info_h media, char **keyword)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && keyword)
-       {
-               if(STRING_VALID(_media->keyword))
-               {
+       if (_media && keyword) {
+               if (STRING_VALID(_media->keyword)) {
                        *keyword = strdup(_media->keyword);
                        media_content_retvm_if(*keyword == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *keyword = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2064,21 +1804,15 @@ int media_info_get_storage_id(media_info_h media, char **storage_id)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && storage_id)
-       {
-               if (STRING_VALID(_media->storage_uuid))
-               {
+       if (_media && storage_id) {
+               if (STRING_VALID(_media->storage_uuid)) {
                        *storage_id = strdup(_media->storage_uuid);
                        media_content_retvm_if(*storage_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        *storage_id = NULL;
                }
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2091,13 +1825,10 @@ int media_info_is_drm(media_info_h media, bool *is_drm)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media)
-       {
+       if (_media) {
                *is_drm = _media->is_drm;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2110,13 +1841,10 @@ int media_info_get_storage_type(media_info_h media, media_content_storage_e *sto
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media && storage_type)
-       {
+       if (_media && storage_type) {
                *storage_type = _media->storage_type;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2129,13 +1857,10 @@ int media_info_get_played_count(media_info_h media, int *played_count)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media)
-       {
+       if (_media) {
                *played_count = _media->played_count;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2148,13 +1873,10 @@ int media_info_get_played_time(media_info_h media, time_t* played_time)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media)
-       {
+       if (_media) {
                *played_time = _media->played_time;
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2168,12 +1890,9 @@ int media_info_increase_played_count(media_info_h media)
 
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media)
-       {
+       if (_media) {
                _media->played_count += 1;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2188,13 +1907,10 @@ int media_info_set_played_time(media_info_h media)
 
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                time(&current_time);
                _media->played_time = current_time;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2209,8 +1925,7 @@ int media_info_get_media_from_db(const char *media_id, media_info_h *media)
        char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0, };
        sqlite3_stmt *stmt = NULL;
 
-       if (!STRING_VALID(media_id) || (media == NULL))
-       {
+       if (!STRING_VALID(media_id) || (media == NULL)) {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2228,15 +1943,13 @@ int media_info_get_media_from_db(const char *media_id, media_info_h *media)
 
        media_info_s *_media = NULL;
 
-       while(sqlite3_step(stmt) == SQLITE_ROW)
-       {
+       while (sqlite3_step(stmt) == SQLITE_ROW) {
                if (_media)
                        media_info_destroy((media_info_h)_media);
 
                _media = (media_info_s*)calloc(1, sizeof(media_info_s));
 
-               if (_media == NULL)
-               {
+               if (_media == NULL) {
                        media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                        SQLITE3_FINALIZE(stmt);
                        return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
@@ -2257,15 +1970,12 @@ int media_info_set_display_name(media_info_h media, const char *display_name)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL && STRING_VALID(display_name))
-       {
+       if (_media != NULL && STRING_VALID(display_name)) {
                SAFE_FREE(_media->display_name);
 
                _media->display_name = strdup(display_name);
                media_content_retvm_if(_media->display_name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2278,22 +1988,16 @@ int media_info_set_description(media_info_h media, const char *description)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                SAFE_FREE(_media->description);
 
-               if (STRING_VALID(description))
-               {
+               if (STRING_VALID(description)) {
                        _media->description = strdup(description);
                        media_content_retvm_if(_media->description == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        _media->description = NULL;
                }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2306,12 +2010,9 @@ int media_info_set_longitude(media_info_h media, double longitude)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                _media->longitude = longitude;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2324,12 +2025,9 @@ int media_info_set_latitude(media_info_h media, double latitude)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                _media->latitude = latitude;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2342,12 +2040,9 @@ int media_info_set_altitude(media_info_h media, double altitude)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                _media->altitude = altitude;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2360,22 +2055,16 @@ int media_info_set_weather(media_info_h media, const char *weather)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                SAFE_FREE(_media->weather);
 
-               if (STRING_VALID(weather))
-               {
+               if (STRING_VALID(weather)) {
                        _media->weather = strdup(weather);
                        media_content_retvm_if(_media->weather == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        _media->weather = NULL;
                }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2388,12 +2077,9 @@ int media_info_set_rating(media_info_h media, int rating)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                _media->rating = rating;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2407,12 +2093,9 @@ int media_info_set_added_time(media_info_h media, time_t added_time)
 
        media_info_s *_media = (media_info_s*)media;
 
-       if ((_media != NULL) && (added_time >= 0))
-       {
+       if ((_media != NULL) && (added_time >= 0)) {
                _media->added_time = added_time;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2425,19 +2108,12 @@ int media_info_set_favorite(media_info_h media, bool favorite)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                if (favorite == TRUE)
-               {
                        time(&_media->favourite);
-               }
                else
-               {
                        _media->favourite = 0;
-               }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2450,20 +2126,14 @@ int media_info_set_author(media_info_h media, const char *author)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
-               if (STRING_VALID(author))
-               {
+       if (_media != NULL) {
+               if (STRING_VALID(author)) {
                        _media->author = strdup(author);
                        media_content_retvm_if(_media->author == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        _media->author = NULL;
                }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2476,22 +2146,16 @@ int media_info_set_provider(media_info_h media, const char *provider)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                SAFE_FREE(_media->provider);
 
-               if (STRING_VALID(provider))
-               {
+               if (STRING_VALID(provider)) {
                        _media->provider = strdup(provider);
                        media_content_retvm_if(_media->provider == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        _media->provider = NULL;
                }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2504,22 +2168,16 @@ int media_info_set_content_name(media_info_h media, const char *content_name)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                SAFE_FREE(_media->content_name);
 
-               if (STRING_VALID(content_name))
-               {
+               if (STRING_VALID(content_name)) {
                        _media->content_name = strdup(content_name);
                        media_content_retvm_if(_media->content_name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        _media->content_name = NULL;
                }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2532,22 +2190,16 @@ int media_info_set_category(media_info_h media, const char *category)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                SAFE_FREE(_media->category);
 
-               if (STRING_VALID(category))
-               {
+               if (STRING_VALID(category)) {
                        _media->category = strdup(category);
                        media_content_retvm_if(_media->category == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        _media->category = NULL;
                }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2560,22 +2212,16 @@ int media_info_set_location_tag(media_info_h media, const char *location_tag)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                SAFE_FREE(_media->location_tag);
 
-               if (STRING_VALID(location_tag))
-               {
+               if (STRING_VALID(location_tag)) {
                        _media->location_tag = strdup(location_tag);
                        media_content_retvm_if(_media->location_tag == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        _media->location_tag = NULL;
                }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2588,22 +2234,16 @@ int media_info_set_age_rating(media_info_h media, const char *age_rating)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                SAFE_FREE(_media->age_rating);
 
-               if (STRING_VALID(age_rating))
-               {
+               if (STRING_VALID(age_rating)) {
                        _media->age_rating = strdup(age_rating);
                        media_content_retvm_if(_media->age_rating == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        _media->age_rating = NULL;
                }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2616,22 +2256,16 @@ int media_info_set_keyword(media_info_h media, const char *keyword)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL)
-       {
+       if (_media != NULL) {
                SAFE_FREE(_media->keyword);
 
-               if (STRING_VALID(keyword))
-               {
+               if (STRING_VALID(keyword)) {
                        _media->keyword = strdup(keyword);
                        media_content_retvm_if(_media->keyword == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-               }
-               else
-               {
+               } else {
                        _media->keyword = NULL;
                }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2646,8 +2280,7 @@ int media_info_update_to_db(media_info_h media)
        char *set_sql = NULL;
        char *sql = NULL;
 
-       if (_media != NULL && STRING_VALID(_media->media_id))
-       {
+       if (_media != NULL && STRING_VALID(_media->media_id)) {
                /* This sql is due to sqlite3_mprintf's wrong operation when using floating point in the text format */
                /* This code will be removed when sqlite3_mprintf works clearly */
                char *test_sql = sqlite3_mprintf("%f, %f, %f", _media->longitude, _media->latitude, _media->altitude);
@@ -2667,8 +2300,7 @@ int media_info_update_to_db(media_info_h media)
 
                /*Update Pinyin If Support Pinyin*/
                media_svc_check_pinyin_support(&pinyin_support);
-               if (pinyin_support)
-               {
+               if (pinyin_support) {
                        if (STRING_VALID(_media->display_name))
                                media_svc_get_pinyin(_content_get_db_handle(), _media->display_name, &file_name_pinyin);
                        if (STRING_VALID(_media->description))
@@ -2712,27 +2344,19 @@ int media_info_update_to_db(media_info_h media)
                SAFE_FREE(age_rating_pinyin);
                SAFE_FREE(keyword_pinyin);
 
-               if (_media->storage_type == MEDIA_CONTENT_STORAGE_CLOUD)
-               {
+               if (_media->storage_type == MEDIA_CONTENT_STORAGE_CLOUD) {
                        set_sql = NULL;
                        sql = NULL;
 
-                       if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO)
-                       {
+                       if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO) {
                                set_sql = sqlite3_mprintf("title=%Q, album=%Q, artist=%Q, genre=%Q, duration=%d, width=%d, height=%d", \
                                _media->title, _media->video_meta->album, _media->video_meta->artist, _media->video_meta->genre, _media->video_meta->duration, _media->video_meta->width, _media->video_meta->height);
-                       }
-                       else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND))
-                       {
+                       } else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND)) {
                                set_sql = sqlite3_mprintf("title=%Q, album=%Q, artist=%Q, genre=%Q, duration=%d", \
                                _media->title, _media->audio_meta->album, _media->audio_meta->artist, _media->audio_meta->genre, _media->audio_meta->duration);
-                       }
-                       else if (_media->media_type == MEDIA_CONTENT_TYPE_IMAGE)
-                       {
+                       } else if (_media->media_type == MEDIA_CONTENT_TYPE_IMAGE) {
                                set_sql = sqlite3_mprintf("title=%Q, width=%d, height=%d", _media->title, _media->image_meta->width, _media->image_meta->height);
-                       }
-                       else
-                       {
+                       } else {
                                set_sql = sqlite3_mprintf("title=%Q", _media->title);
                        }
 
@@ -2747,15 +2371,12 @@ int media_info_update_to_db(media_info_h media)
                if (ret == MEDIA_CONTENT_ERROR_NONE) {
                        /*  Send notification for this update */
                        media_content_debug("Update is successfull. Send notification for this");
-                       if (_media->file_path && _media->mime_type) {
+                       if (_media->file_path && _media->mime_type)
                                media_svc_publish_noti(_content_get_db_handle(), MS_MEDIA_ITEM_FILE, MS_MEDIA_ITEM_UPDATE, _media->file_path, _media->media_type, _media->media_id, _media->mime_type);
-                       } else {
+                       else
                                media_content_error("Can't Send Noti : path or mime type is NULL");
-                       }
                }
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2771,36 +2392,31 @@ int media_info_refresh_metadata_to_db(const char *media_id)
        media_content_storage_e storage_type = 0;
        char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0, };
 
-       if (!STRING_VALID(media_id))
-       {
+       if (!STRING_VALID(media_id)) {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
 
        ret = media_info_get_media_from_db(media_id, &media);
-       if (ret != MEDIA_CONTENT_ERROR_NONE)
-       {
+       if (ret != MEDIA_CONTENT_ERROR_NONE) {
                media_info_destroy(media);
                return ret;
        }
 
        ret = media_info_get_storage_type(media, &storage_type);
-       if (ret != MEDIA_CONTENT_ERROR_NONE)
-       {
+       if (ret != MEDIA_CONTENT_ERROR_NONE) {
                media_info_destroy(media);
                return ret;
        }
 
-       if (storage_type == MEDIA_CONTENT_STORAGE_CLOUD)
-       {
+       if (storage_type == MEDIA_CONTENT_STORAGE_CLOUD) {
                media_info_destroy(media);
                media_content_error("Can't refresh cloud content!!");
                return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
 
        ret = media_info_get_file_path(media, &file_path);
-       if (ret != MEDIA_CONTENT_ERROR_NONE)
-       {
+       if (ret != MEDIA_CONTENT_ERROR_NONE) {
                media_info_destroy(media);
                return ret;
        }
@@ -2814,8 +2430,7 @@ int media_info_refresh_metadata_to_db(const char *media_id)
 
        memset(storage_id, 0x00, sizeof(storage_id));
        ret = media_svc_get_storage_id(_content_get_db_handle(), file_path, storage_id);
-       if (ret != MS_MEDIA_ERR_NONE)
-       {
+       if (ret != MS_MEDIA_ERR_NONE) {
                media_content_error("media_svc_get_storage_id failed : %d", ret);
                SAFE_FREE(file_path);
                media_info_destroy(media);
@@ -2824,9 +2439,7 @@ int media_info_refresh_metadata_to_db(const char *media_id)
 
        ret = media_svc_refresh_item(_content_get_db_handle(), storage_id, storage_type, file_path, tzplatform_getuid(TZ_USER_NAME));
        if (ret != MS_MEDIA_ERR_NONE)
-       {
                ret = _content_error_capi(MEDIA_CONTENT_TYPE, ret);
-       }
 
        SAFE_FREE(file_path);
        media_info_destroy(media);
@@ -2862,23 +2475,20 @@ int media_info_move_to_db(media_info_h media, const char* dst_path)
        media_content_retvm_if(ignore_dir == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
 
        ret = media_svc_get_storage_type(_media->file_path, &src_storage_type, tzplatform_getuid(TZ_USER_NAME));
-       if (ret != MS_MEDIA_ERR_NONE)
-       {
+       if (ret != MS_MEDIA_ERR_NONE) {
                media_content_sec_error("media_svc_get_storage_type failed : %d", ret);
                return _content_error_capi(MEDIA_CONTENT_TYPE, ret);
        }
 
        ret = media_svc_get_storage_type(dst_path, &dst_storage_type, tzplatform_getuid(TZ_USER_NAME));
-       if (ret != MS_MEDIA_ERR_NONE)
-       {
+       if (ret != MS_MEDIA_ERR_NONE) {
                media_content_sec_error("media_svc_get_storage_type failed : %d", ret);
                return _content_error_capi(MEDIA_CONTENT_TYPE, ret);
        }
 
        memset(storage_id, 0x00, sizeof(storage_id));
        ret = media_svc_get_storage_id(_content_get_db_handle(), _media->file_path, storage_id);
-       if (ret != MS_MEDIA_ERR_NONE)
-       {
+       if (ret != MS_MEDIA_ERR_NONE) {
                media_content_error("media_svc_get_storage_id failed : %d", ret);
                return _content_error_capi(MEDIA_CONTENT_TYPE, ret);
        }
@@ -2892,8 +2502,7 @@ int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL && STRING_VALID(_media->media_id) && STRING_VALID(_media->file_path))
-       {
+       if (_media != NULL && STRING_VALID(_media->media_id) && STRING_VALID(_media->file_path)) {
                media_thumbnail_cb_s *_thumb_cb = (media_thumbnail_cb_s*)calloc(1, sizeof(media_thumbnail_cb_s));
                media_content_retvm_if(_thumb_cb == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
 
@@ -2903,9 +2512,7 @@ int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb
 
                ret = thumbnail_request_from_db_async(_media->file_path, (ThumbFunc)__media_info_thumbnail_completed_cb, (void *)_thumb_cb, tzplatform_getuid(TZ_USER_NAME));
                ret = _content_error_capi(MEDIA_THUMBNAIL_TYPE, ret);
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2918,13 +2525,10 @@ int media_info_cancel_thumbnail(media_info_h media)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media != NULL && STRING_VALID(_media->media_id) && STRING_VALID(_media->file_path))
-       {
+       if (_media != NULL && STRING_VALID(_media->media_id) && STRING_VALID(_media->file_path)) {
                ret = thumbnail_request_cancel_media(_media->file_path);
                ret = _content_error_capi(MEDIA_THUMBNAIL_TYPE, ret);
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -2951,9 +2555,9 @@ static int __media_info_map_data_usr_to_svc(media_info_s *media, media_svc_conte
        svc_content_info->modified_time = media->modified_time;
        svc_content_info->thumbnail_path = g_strdup(media->thumbnail_path);
        svc_content_info->is_drm = media->is_drm;
-       svc_content_info->last_played_time= media->played_time;
-       svc_content_info->played_count= media->played_count;
-       svc_content_info->favourate= media->favourite;
+       svc_content_info->last_played_time = media->played_time;
+       svc_content_info->played_count = media->played_count;
+       svc_content_info->favourate = media->favourite;
 
        svc_content_info->media_meta.title = g_strdup(media->title);
        svc_content_info->media_meta.rating = media->rating;
@@ -2976,40 +2580,39 @@ static int __media_info_map_data_usr_to_svc(media_info_s *media, media_svc_conte
        svc_content_info->media_meta.recorded_date = g_strdup(media->audio_meta->recorded_date);
 
        if (storage_type == MEDIA_CONTENT_STORAGE_CLOUD) {
-               switch(media->media_type)
-               {
-                       case MEDIA_CONTENT_TYPE_IMAGE:
-                               svc_content_info->media_meta.width = media->image_meta->width;
-                               svc_content_info->media_meta.height = media->image_meta->height;
-                               svc_content_info->media_meta.datetaken = g_strdup(media->image_meta->date_taken);
-                               svc_content_info->media_meta.orientation = media->image_meta->orientation;
-                               break;
-                       case MEDIA_CONTENT_TYPE_VIDEO:
-                               svc_content_info->media_meta.album_artist = g_strdup(media->audio_meta->album_artist);
-                               svc_content_info->media_meta.composer = g_strdup(media->audio_meta->composer);
-                               svc_content_info->media_meta.year = g_strdup(media->audio_meta->year);
-                               svc_content_info->media_meta.copyright = g_strdup(media->audio_meta->copyright);
-                               svc_content_info->media_meta.track_num = g_strdup(media->audio_meta->track_num);
-                               svc_content_info->media_meta.bitrate = media->audio_meta->bitrate;
-                               svc_content_info->media_meta.duration = media->audio_meta->duration;
-                               svc_content_info->media_meta.width = media->image_meta->width;
-                               svc_content_info->media_meta.height = media->image_meta->height;
-                               break;
-                       case MEDIA_CONTENT_TYPE_SOUND:
-                       case MEDIA_CONTENT_TYPE_MUSIC:
-                               svc_content_info->media_meta.album_artist = g_strdup(media->audio_meta->album_artist);
-                               svc_content_info->media_meta.composer = g_strdup(media->audio_meta->composer);
-                               svc_content_info->media_meta.year = g_strdup(media->audio_meta->year);
-                               svc_content_info->media_meta.copyright = g_strdup(media->audio_meta->copyright);
-                               svc_content_info->media_meta.track_num = g_strdup(media->audio_meta->track_num);
-                               svc_content_info->media_meta.bitrate = media->audio_meta->bitrate;
-                               svc_content_info->media_meta.duration = media->audio_meta->duration;
-                               svc_content_info->media_meta.channel = media->audio_meta->channel;
-                               svc_content_info->media_meta.samplerate = media->audio_meta->samplerate;
-                               break;
-                       case MEDIA_CONTENT_TYPE_OTHERS:
-                       default:
-                               break;
+               switch (media->media_type) {
+               case MEDIA_CONTENT_TYPE_IMAGE:
+                       svc_content_info->media_meta.width = media->image_meta->width;
+                       svc_content_info->media_meta.height = media->image_meta->height;
+                       svc_content_info->media_meta.datetaken = g_strdup(media->image_meta->date_taken);
+                       svc_content_info->media_meta.orientation = media->image_meta->orientation;
+                       break;
+               case MEDIA_CONTENT_TYPE_VIDEO:
+                       svc_content_info->media_meta.album_artist = g_strdup(media->audio_meta->album_artist);
+                       svc_content_info->media_meta.composer = g_strdup(media->audio_meta->composer);
+                       svc_content_info->media_meta.year = g_strdup(media->audio_meta->year);
+                       svc_content_info->media_meta.copyright = g_strdup(media->audio_meta->copyright);
+                       svc_content_info->media_meta.track_num = g_strdup(media->audio_meta->track_num);
+                       svc_content_info->media_meta.bitrate = media->audio_meta->bitrate;
+                       svc_content_info->media_meta.duration = media->audio_meta->duration;
+                       svc_content_info->media_meta.width = media->image_meta->width;
+                       svc_content_info->media_meta.height = media->image_meta->height;
+                       break;
+               case MEDIA_CONTENT_TYPE_SOUND:
+               case MEDIA_CONTENT_TYPE_MUSIC:
+                       svc_content_info->media_meta.album_artist = g_strdup(media->audio_meta->album_artist);
+                       svc_content_info->media_meta.composer = g_strdup(media->audio_meta->composer);
+                       svc_content_info->media_meta.year = g_strdup(media->audio_meta->year);
+                       svc_content_info->media_meta.copyright = g_strdup(media->audio_meta->copyright);
+                       svc_content_info->media_meta.track_num = g_strdup(media->audio_meta->track_num);
+                       svc_content_info->media_meta.bitrate = media->audio_meta->bitrate;
+                       svc_content_info->media_meta.duration = media->audio_meta->duration;
+                       svc_content_info->media_meta.channel = media->audio_meta->channel;
+                       svc_content_info->media_meta.samplerate = media->audio_meta->samplerate;
+                       break;
+               case MEDIA_CONTENT_TYPE_OTHERS:
+               default:
+                       break;
                }
        }
 
@@ -3024,183 +2627,143 @@ static int __media_info_set_str_data(media_info_h media, media_info_item_e data_
 
        media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media");
 
-       switch(data_type)
-       {
-               case MEDIA_INFO_PATH:
-                       SAFE_FREE(_media->file_path);
-                       if (STRING_VALID(str_data))
-                       {
-                               _media->file_path = strdup(str_data);
-                               media_content_retvm_if(_media->file_path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                       }
-                       else
-                       {
-                               _media->file_path = NULL;
-                       }
-                       break;
-               case MEDIA_INFO_MIME_TYPE:
-                       SAFE_FREE(_media->mime_type);
-                       if (STRING_VALID(str_data))
-                       {
-                               _media->mime_type = strdup(str_data);
-                               media_content_retvm_if(_media->mime_type == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                       }
-                       else
-                       {
-                               _media->mime_type = NULL;
-                       }
-                       break;
-               case MEDIA_INFO_THUMBNAIL_PATH:
-                       SAFE_FREE(_media->thumbnail_path);
-                       if (STRING_VALID(str_data))
-                       {
-                               _media->thumbnail_path = strdup(str_data);
-                               media_content_retvm_if(_media->thumbnail_path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                       }
-                       else
-                       {
-                               _media->thumbnail_path = NULL;
-                       }
-                       break;
-               case MEDIA_INFO_TITLE:
-                       SAFE_FREE(_media->title);
-                       if (STRING_VALID(str_data))
-                       {
-                               _media->title = strdup(str_data);
-                               media_content_retvm_if(_media->title == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                       }
-                       else
-                       {
-                               _media->title = NULL;
-                       }
-                       break;
-               case MEDIA_INFO_STORAGE_UUID:
-                       SAFE_FREE(_media->storage_uuid);
-                       if (STRING_VALID(str_data))
-                       {
-                               _media->storage_uuid = strdup(str_data);
-                               media_content_retvm_if(_media->storage_uuid == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                       }
-                       else
-                       {
-                               _media->storage_uuid = NULL;
-                       }
-                       break;
-               case MEDIA_INFO_ALBUM:
-                       //if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO)
-                       {
-                               SAFE_FREE(_media->video_meta->album);
-                               if (STRING_VALID(str_data))
-                               {
-                                       _media->video_meta->album = strdup(str_data);
-                                       media_content_retvm_if(_media->video_meta->album == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                               }
-                               else
-                               {
-                                       _media->video_meta->album = NULL;
-                               }
+       switch (data_type) {
+       case MEDIA_INFO_PATH:
+               SAFE_FREE(_media->file_path);
+               if (STRING_VALID(str_data)) {
+                       _media->file_path = strdup(str_data);
+                       media_content_retvm_if(_media->file_path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+               } else {
+                       _media->file_path = NULL;
+               }
+               break;
+       case MEDIA_INFO_MIME_TYPE:
+               SAFE_FREE(_media->mime_type);
+               if (STRING_VALID(str_data)) {
+                       _media->mime_type = strdup(str_data);
+                       media_content_retvm_if(_media->mime_type == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+               } else {
+                       _media->mime_type = NULL;
+               }
+               break;
+       case MEDIA_INFO_THUMBNAIL_PATH:
+               SAFE_FREE(_media->thumbnail_path);
+               if (STRING_VALID(str_data)) {
+                       _media->thumbnail_path = strdup(str_data);
+                       media_content_retvm_if(_media->thumbnail_path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+               } else {
+                       _media->thumbnail_path = NULL;
+               }
+               break;
+       case MEDIA_INFO_TITLE:
+               SAFE_FREE(_media->title);
+               if (STRING_VALID(str_data)) {
+                       _media->title = strdup(str_data);
+                       media_content_retvm_if(_media->title == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+               } else {
+                       _media->title = NULL;
+               }
+               break;
+       case MEDIA_INFO_STORAGE_UUID:
+               SAFE_FREE(_media->storage_uuid);
+               if (STRING_VALID(str_data)) {
+                       _media->storage_uuid = strdup(str_data);
+                       media_content_retvm_if(_media->storage_uuid == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+               } else {
+                       _media->storage_uuid = NULL;
+               }
+               break;
+       case MEDIA_INFO_ALBUM:
+               /* if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO) */
+               {
+                       SAFE_FREE(_media->video_meta->album);
+                       if (STRING_VALID(str_data)) {
+                               _media->video_meta->album = strdup(str_data);
+                               media_content_retvm_if(_media->video_meta->album == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+                       } else {
+                               _media->video_meta->album = NULL;
                        }
-                       //else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND))
-                       {
-                               SAFE_FREE(_media->audio_meta->album);
-                               if (STRING_VALID(str_data))
-                               {
-                                       _media->audio_meta->album = strdup(str_data);
-                                       media_content_retvm_if(_media->audio_meta->album == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                               }
-                               else
-                               {
-                                       _media->audio_meta->album = NULL;
-                               }
+               }
+               /* else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND)) */
+               {
+                       SAFE_FREE(_media->audio_meta->album);
+                       if (STRING_VALID(str_data)) {
+                               _media->audio_meta->album = strdup(str_data);
+                               media_content_retvm_if(_media->audio_meta->album == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+                       } else {
+                               _media->audio_meta->album = NULL;
                        }
-                       break;
-               case MEDIA_INFO_ARTIST:
-                       //if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO)
-                       {
-                               SAFE_FREE(_media->video_meta->artist);
-                               if (STRING_VALID(str_data))
-                               {
-                                       _media->video_meta->artist = strdup(str_data);
-                                       media_content_retvm_if(_media->video_meta->artist == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                               }
-                               else
-                               {
-                                       _media->video_meta->artist = NULL;
-                               }
+               }
+               break;
+       case MEDIA_INFO_ARTIST:
+               /* if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO) */
+               {
+                       SAFE_FREE(_media->video_meta->artist);
+                       if (STRING_VALID(str_data)) {
+                               _media->video_meta->artist = strdup(str_data);
+                               media_content_retvm_if(_media->video_meta->artist == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+                       } else {
+                               _media->video_meta->artist = NULL;
                        }
-                       //else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND))
-                       {
-                               SAFE_FREE(_media->audio_meta->artist);
-                               if (STRING_VALID(str_data))
-                               {
-                                       _media->audio_meta->artist = strdup(str_data);
-                                       media_content_retvm_if(_media->audio_meta->artist == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                               }
-                               else
-                               {
-                                       _media->audio_meta->artist = NULL;
-                               }
+               }
+               /* else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND)) */
+               {
+                       SAFE_FREE(_media->audio_meta->artist);
+                       if (STRING_VALID(str_data)) {
+                               _media->audio_meta->artist = strdup(str_data);
+                               media_content_retvm_if(_media->audio_meta->artist == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+                       } else {
+                               _media->audio_meta->artist = NULL;
                        }
-                       break;
-               case MEDIA_INFO_GENRE:
-                       //if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO)
-                       {
-                               SAFE_FREE(_media->video_meta->genre);
-                               if (STRING_VALID(str_data))
-                               {
-                                       _media->video_meta->genre = strdup(str_data);
-                                       media_content_retvm_if(_media->video_meta->genre == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                               }
-                               else
-                               {
-                                       _media->video_meta->genre = NULL;
-                               }
+               }
+               break;
+       case MEDIA_INFO_GENRE:
+               /* if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO) */
+               {
+                       SAFE_FREE(_media->video_meta->genre);
+                       if (STRING_VALID(str_data)) {
+                               _media->video_meta->genre = strdup(str_data);
+                               media_content_retvm_if(_media->video_meta->genre == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+                       } else {
+                               _media->video_meta->genre = NULL;
                        }
-                       //else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND))
-                       {
-                               SAFE_FREE(_media->audio_meta->genre);
-                               if (STRING_VALID(str_data))
-                               {
-                                       _media->audio_meta->genre = strdup(str_data);
-                                       media_content_retvm_if(_media->audio_meta->genre == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                               }
-                               else
-                               {
-                                       _media->audio_meta->genre = NULL;
-                               }
+               }
+               /* else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND)) */
+               {
+                       SAFE_FREE(_media->audio_meta->genre);
+                       if (STRING_VALID(str_data)) {
+                               _media->audio_meta->genre = strdup(str_data);
+                               media_content_retvm_if(_media->audio_meta->genre == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+                       } else {
+                               _media->audio_meta->genre = NULL;
                        }
-                       break;
-               case MEDIA_INFO_RECORDED_DATE:
-                       //if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO)
-                       {
-                               SAFE_FREE(_media->video_meta->recorded_date);
-                               if (STRING_VALID(str_data))
-                               {
-                                       _media->video_meta->recorded_date = strdup(str_data);
-                                       media_content_retvm_if(_media->video_meta->recorded_date == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                               }
-                               else
-                               {
-                                       _media->video_meta->recorded_date = NULL;
-                               }
+               }
+               break;
+       case MEDIA_INFO_RECORDED_DATE:
+               /* if (_media->media_type == MEDIA_CONTENT_TYPE_VIDEO) */
+               {
+                       SAFE_FREE(_media->video_meta->recorded_date);
+                       if (STRING_VALID(str_data)) {
+                               _media->video_meta->recorded_date = strdup(str_data);
+                               media_content_retvm_if(_media->video_meta->recorded_date == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+                       } else {
+                               _media->video_meta->recorded_date = NULL;
                        }
-                       //else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND))
-                       {
-                               SAFE_FREE(_media->audio_meta->recorded_date);
-                               if (STRING_VALID(str_data))
-                               {
-                                       _media->audio_meta->recorded_date = strdup(str_data);
-                                       media_content_retvm_if(_media->audio_meta->recorded_date == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
-                               }
-                               else
-                               {
-                                       _media->audio_meta->recorded_date = NULL;
-                               }
+               }
+               /* else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND)) */
+               {
+                       SAFE_FREE(_media->audio_meta->recorded_date);
+                       if (STRING_VALID(str_data)) {
+                               _media->audio_meta->recorded_date = strdup(str_data);
+                               media_content_retvm_if(_media->audio_meta->recorded_date == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+                       } else {
+                               _media->audio_meta->recorded_date = NULL;
                        }
-                       break;
-               default:
-                       media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
-                       return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+               break;
+       default:
+               media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+               return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
 
        return MEDIA_CONTENT_ERROR_NONE;
@@ -3211,8 +2774,7 @@ static int __media_info_destroy(media_info_h media)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        media_info_s *_media = (media_info_s*)media;
 
-       if (_media)
-       {
+       if (_media) {
                SAFE_FREE(_media->media_id);
                SAFE_FREE(_media->file_path);
                SAFE_FREE(_media->display_name);
@@ -3275,9 +2837,7 @@ static int __media_info_destroy(media_info_h media)
                }
 
                ret = MEDIA_CONTENT_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
                ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -3303,8 +2863,7 @@ int media_info_insert_to_db_with_data(media_info_h media, media_info_h *info)
                media_content_retvm_if(_media->size <= 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid size [%d]", _media->size);
                media_content_retvm_if(_media->modified_time <= 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid modified_time [%d]", _media->modified_time);
 
-               if ((_media->media_type < MEDIA_CONTENT_TYPE_IMAGE) || (_media->media_type > MEDIA_CONTENT_TYPE_OTHERS))
-               {
+               if ((_media->media_type < MEDIA_CONTENT_TYPE_IMAGE) || (_media->media_type > MEDIA_CONTENT_TYPE_OTHERS)) {
                        media_content_error("invalid media type [%d]", _media->media_type);
                        return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
                }
@@ -3328,8 +2887,7 @@ int media_info_insert_to_db_with_data(media_info_h media, media_info_h *info)
        media_svc_destroy_content_info(svc_content_info);
        SAFE_FREE(svc_content_info);
 
-       if (info != NULL)
-       {
+       if (info != NULL) {
                media_info_s *_get_media = (media_info_s*)calloc(1, sizeof(media_info_s));
                media_content_retvm_if(_get_media == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
 
@@ -3381,8 +2939,7 @@ int media_info_create(const char *path, media_info_h *media)
                media_content_retvm_if(ignore_dir == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
 
                ret = media_svc_get_storage_id(_content_get_db_handle(), path, storage_id);
-               if (ret != MS_MEDIA_ERR_NONE)
-               {
+               if (ret != MS_MEDIA_ERR_NONE) {
                        media_content_error("media_svc_get_storage_id failed : %d", ret);
                        return _content_error_capi(MEDIA_CONTENT_TYPE, ret);
                }
@@ -3394,20 +2951,18 @@ int media_info_create(const char *path, media_info_h *media)
                }
        }
 
-       media_info_s *_media = (media_info_s*)calloc(1,sizeof(media_info_s));
+       media_info_s *_media = (media_info_s*)calloc(1, sizeof(media_info_s));
        media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
 
        _media->audio_meta = (audio_meta_s *)calloc(1, sizeof(audio_meta_s));
-       if (_media->audio_meta == NULL)
-       {
+       if (_media->audio_meta == NULL) {
                SAFE_FREE(_media);
                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
        }
 
        _media->video_meta = (video_meta_s *)calloc(1, sizeof(video_meta_s));
-       if (_media->video_meta == NULL)
-       {
+       if (_media->video_meta == NULL) {
                SAFE_FREE(_media->audio_meta);
                SAFE_FREE(_media);
                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
@@ -3415,8 +2970,7 @@ int media_info_create(const char *path, media_info_h *media)
        }
 
        _media->image_meta = (image_meta_s *)calloc(1, sizeof(image_meta_s));
-       if (_media->image_meta == NULL)
-       {
+       if (_media->image_meta == NULL) {
                SAFE_FREE(_media->audio_meta);
                SAFE_FREE(_media->video_meta);
                SAFE_FREE(_media);
@@ -3429,9 +2983,9 @@ int media_info_create(const char *path, media_info_h *media)
        _media->media_type = 0;
        _media->modified_time = 0;
        _media->size = 0;
-       _media->longitude= MEDIA_SVC_DEFAULT_GPS_VALUE;
+       _media->longitude = MEDIA_SVC_DEFAULT_GPS_VALUE;
        _media->latitude = MEDIA_SVC_DEFAULT_GPS_VALUE;
-       _media->altitude= MEDIA_SVC_DEFAULT_GPS_VALUE;
+       _media->altitude = MEDIA_SVC_DEFAULT_GPS_VALUE;
 
        if (STRING_VALID(storage_id)) {
                _media->storage_uuid = g_strdup(storage_id);
@@ -3449,20 +3003,18 @@ int media_info_create_handle(media_info_h *media)
 
        media_content_retvm_if(media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
 
-       media_info_s *_media = (media_info_s*)calloc(1,sizeof(media_info_s));
+       media_info_s *_media = (media_info_s*)calloc(1, sizeof(media_info_s));
        media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
 
        _media->audio_meta = (audio_meta_s *)calloc(1, sizeof(audio_meta_s));
-       if (_media->audio_meta == NULL)
-       {
+       if (_media->audio_meta == NULL) {
                SAFE_FREE(_media);
                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
                return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
        }
 
        _media->video_meta = (video_meta_s *)calloc(1, sizeof(video_meta_s));
-       if (_media->video_meta == NULL)
-       {
+       if (_media->video_meta == NULL) {
                SAFE_FREE(_media->audio_meta);
                SAFE_FREE(_media);
                media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
@@ -3470,8 +3022,7 @@ int media_info_create_handle(media_info_h *media)
        }
 
        _media->image_meta = (image_meta_s *)calloc(1, sizeof(image_meta_s));
-       if (_media->image_meta == NULL)
-       {
+       if (_media->image_meta == NULL) {
                SAFE_FREE(_media->audio_meta);
                SAFE_FREE(_media->video_meta);
                SAFE_FREE(_media);
@@ -3577,8 +3128,7 @@ int media_info_set_duration(media_info_h media, int duration)
                _media->video_meta->duration = duration;
        else if ((_media->media_type == MEDIA_CONTENT_TYPE_MUSIC) || (_media->media_type == MEDIA_CONTENT_TYPE_SOUND))
                _media->audio_meta->duration = duration;
-       else
-       {
+       else {
                media_content_error("Invalid media type");
                return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -3596,8 +3146,7 @@ int media_info_set_width(media_info_h media, int width)
                _media->video_meta->width = width;
        else if (_media->media_type == MEDIA_CONTENT_TYPE_IMAGE)
                _media->image_meta->width = width;
-       else
-       {
+       else {
                media_content_error("Invalid media type");
                return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }
@@ -3615,8 +3164,7 @@ int media_info_set_height(media_info_h media, int height)
                _media->video_meta->height = height;
        else if (_media->media_type == MEDIA_CONTENT_TYPE_IMAGE)
                _media->image_meta->height = height;
-       else
-       {
+       else {
                media_content_error("Invalid media type");
                return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
        }