/********** media_info **********/
+int media_info_delete_from_db(const char *media_id);
+
/**
* @brief Gets the extract_flag of media info.
* @since_tizen 2.3
*/
int media_info_get_extract_flag(media_info_h media, int *extract_flag);
int media_info_get_stitched_state(media_info_h media, int *type_360);
-int media_info_get_stitched_engine(media_info_h media, int *type_360);
/**
* @brief Gets the content's played position parameter.
* @details Function returns content's elapsed playback position parameter as period
int media_info_get_modified_month(media_info_h media, char **modified_month);
/**
+ * @brief Gets the played count to content meta handle.
+ *
+ * @param[in] media The handle to media info
+ * @param[out] played_count The played count of content
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int media_info_get_played_count(media_info_h media, int *played_count);
+
+/**
* @brief Sets the played count to content meta handle.
*
* @param[in] media The handle to media info
* @post media_info_update_to_db()
*/
int media_info_set_played_position(media_info_h media, int played_position);
+
+/**
+ * @brief Gets the content's played time parameter.
+ * @details Function returns content's elapsed playback time parameter as period
+ * starting from the beginning of the track.
+ *
+ * @param[in] media The handle to the media info
+ * @param[out] played_time The elapsed time of the content
+ *
+ * @return 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int media_info_get_played_time(media_info_h media, time_t *played_time);
+
+/**
+ * @brief Sets the played time to content meta handle.
+ * @details You can set the latest played(opened) time of the content file. the latest played time to be set the current time on the system.
+ *
+ * @param[in] media The handle to the media info
+ *
+ * @return 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @post media_info_update_to_db()
+ */
+int media_info_set_played_time(media_info_h media);
+
+
int media_info_get_media_info_by_path_from_db(const char* path, media_info_h* media);
-#ifdef _USE_SENIOR_MODE
-int media_info_insert_to_db_with_contact_data(const char *path, const char* contact, const char* app_data, media_info_h *info);
-int media_info_delete_contact_from_db(const char* contact, const char* storage_id);
-int media_info_delete_item(const char *media_id);
-int media_info_get_contact(media_info_h media, char **contact);
-int media_info_get_app_data(media_info_h media, char **app_data);
-int media_info_set_contact(media_info_h media, const char *contact);
-int media_info_set_app_data(media_info_h media, const char *app_data);
-#endif
/********** media_folder **********/
-
-#ifdef _USE_SENIOR_MODE
-int media_folder_foreach_media_from_db_by_union_select(const char* folder_id, filter_h filter1, filter_h filter2, media_info_cb callback, void* user_data);
-#endif
int media_folder_get_scan_status(const char *storage_uuid, char* path, media_folder_scan_status_e *scan_status);
+int media_folder_reset_scan_status(const char *storage_uuid, const char* path);
+/**
+ * @brief Sets the folder name.
+ * @since_tizen 2.3
+ *
+ * @param[in] folder The handle to the media folder
+ * @param[in] name The name of the media folder
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ */
+int media_folder_set_name(media_folder_h folder, const char *name);
+
+/**
+ * @brief Updates the media folder to the media database.
+ *
+ * @details The function updates the given media folder in the media database. The function should be called after any change in folder attributes, to be updated to the media
+ * database.
+ *
+ * @since_tizen 2.3
+ *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/content.write
+ *
+ * @param[in] folder The handle to the media folder
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
+ * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
+ * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
+ * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
+ *
+ * @pre This function requires opened connection to content service by media_content_connect().
+ *
+ * @see media_content_connect()
+ * @see media_folder_destroy()
+ */
+int media_folder_update_to_db(media_folder_h folder);
/********** media_group **********/
*/
int media_storage_get_scan_status(const char *storage_uuid, media_storage_scan_status_e *scan_status);
+/**
+ * @brief Iterates through media storage from the media database.
+ * @details This function gets all media storage handles meeting the given @a filter.
+ * The @a callback function will be invoked for every retrieved media storage.
+ * If @c NULL is passed to the @a filter, then no filtering is applied.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] filter The handle to the media 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,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
+ * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
+ *
+ * @pre This function requires opened connection to content service by media_content_connect().
+ * @post This function invokes media_storage_destroy().
+ *
+ * @see media_content_connect()
+ * @see media_storage_destroy()
+ */
+int media_storage_foreach_storage_from_db(filter_h filter, media_storage_cb callback, void *user_data);
+
+/**
+ * @brief Destroys media storage handle.
+ * @details The function frees all resources related to the media storage handle. This handle
+ * can no longer be used to perform any operations. New media storage handle has to
+ * be created before the next usage.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] storage The media storage handle
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @pre Get copy of media_storage_h handle by calling media_storage_clone().
+ *
+ * @see media_storage_clone()
+ */
+int media_storage_destroy(media_storage_h storage);
+
+/**
+ * @brief Clones the media storage handle.
+ *
+ * @details This function copies the media storage handle from a source to the destination.
+ * There is no media_storage_create() function. The media_storage_h is created internally and
+ * available through media storage foreach function such as media_storage_foreach_storage_from_db().
+ * To use this handle outside of these foreach functions, use this function.
+ *
+ * @since_tizen 2.4
+ *
+ * @remarks The @a dst should be released using media_storage_destroy().
+ *
+ * @param[out] dst The destination handle to the media storage
+ * @param[in] src The source handle to the media storage
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @see media_storage_destroy()
+ * @see media_storage_foreach_storage_from_db()
+ * @see media_storage_get_storage_info_from_db()
+ */
+int media_storage_clone(media_storage_h *dst, media_storage_h src);
+
+/**
+ * @brief Gets the storage id of media storage.
+ * @since_tizen 2.4
+ *
+ * @remarks The @a storage_id should be released using free().
+ *
+ * @param[in] storage The media storage handle
+ * @param[out] storage_id The ID of the media storage
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ */
+int media_storage_get_id(media_storage_h storage, char **storage_id);
+/**
+ * @brief Gets the storage path of media storage.
+ * @since_tizen 2.4
+ *
+ * @remarks The @a storage_path should be released using free().
+ *
+ * @param[in] storage The media storage handle
+ * @param[out] storage_path The storage path of the media storage
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ */
+int media_storage_get_path(media_storage_h storage, char **storage_path);
#ifdef __cplusplus
}
#endif /* __cplusplus */