Just update api description
[platform/core/api/media-content.git] / include / media_folder.h
index c918c65..598db8e 100755 (executable)
@@ -15,8 +15,8 @@
 */
 
 
-#ifndef __TIZEN_MEDIA_FOLDER_H__
-#define __TIZEN_MEDIA_FOLDER_H__
+#ifndef __TIZEN_CONTENT_MEDIA_FOLDER_H__
+#define __TIZEN_CONTENT_MEDIA_FOLDER_H__
 
 
 #include <media_content_type.h>
@@ -45,8 +45,7 @@ extern "C" {
  * @brief Gets the count of folder for the passed @a filter from the media database.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in]  filter       The handle to filter \n
- *                          To allow searching over different content types, you should use #filter_h.
+ * @param[in] filter The handle to the media filter
  * @param[out] folder_count The count of the media folder
  *
  * @return @c 0 on success,
@@ -56,7 +55,6 @@ extern "C" {
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @pre This function requires opened connection to content service by media_content_connect().
  *
@@ -72,12 +70,12 @@ int media_folder_get_folder_count_from_db(filter_h filter, int *folder_count);
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks Do not call updating DB fuction like media_folder_update_to_db() in your callback function, your callback function is invoked as inline function.\n
+ * @remarks Do not call updating DB function like media_folder_update_to_db() in your callback function, your callback function is invoked as inline function.\n
  *                   So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. \n
  *                   We do not recommend you call updating DB function in callback of foreach function.
  *
- * @param[in] filter    The handle to the media folder filter
- * @param[in] callback  The callback function to be invoked
+ * @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,
@@ -88,7 +86,6 @@ int media_folder_get_folder_count_from_db(filter_h filter, int *folder_count);
  * @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
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @pre  This function requires opened connection to content service by media_content_connect().
  * @pre  A filter handle has to be created by calling media_filter_create().
@@ -101,11 +98,11 @@ int media_folder_get_folder_count_from_db(filter_h filter, int *folder_count);
 int media_folder_foreach_folder_from_db(filter_h filter, media_folder_cb callback, void *user_data);
 
 /**
- * @brief Gets the count of media files for the passed @a filter in the given @a folder from the media database.
+ * @brief Gets the count of media files for the passed @a filter in the given @a folder_id from the media database.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in] folder_id    The ID of the media folder
- * @param[in] filter       The filter of the media content
+ * @param[in] folder_id The ID of the media folder
+ * @param[in] filter The handle to the media filter
  * @param[out] media_count The count of media folder items
  *
  * @return @c 0 on success,
@@ -115,7 +112,6 @@ int media_folder_foreach_folder_from_db(filter_h filter, media_folder_cb callbac
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @pre This function requires opened connection to content service by media_content_connect().
  *
@@ -124,9 +120,9 @@ int media_folder_foreach_folder_from_db(filter_h filter, media_folder_cb callbac
 int media_folder_get_media_count_from_db(const char *folder_id, filter_h filter, int *media_count);
 
 /**
- * @brief Iterates through the media files with an optional @a filter in the given @a folder from the media database.
+ * @brief Iterates through the media files with an optional @a filter in the given @a folder_id from the media database.
  * @details This function gets all media files associated with the given folder and
- *          meeting desired filter option and calls registered callback function for
+ *          meeting desired filter option and calls @a callback for
  *          every retrieved media item. If @c NULL is passed to the @a filter, no filtering is applied.
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
@@ -137,8 +133,8 @@ int media_folder_get_media_count_from_db(const char *folder_id, filter_h filter,
  *                    We do not recommend you call updating DB function in callback of foreach function.
  *
  * @param[in] folder_id The ID of the media folder
- * @param[in] filter    The handle to the media info filter
- * @param[in] callback  The callback function to be invoked
+ * @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,
@@ -149,7 +145,6 @@ int media_folder_get_media_count_from_db(const char *folder_id, filter_h filter,
  * @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
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @pre  This function requires opened connection to content service by media_content_connect().
  * @post This function invokes media_info_cb().
@@ -169,17 +164,16 @@ int media_folder_foreach_media_from_db(const char *folder_id, filter_h filter, m
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks The destination handle must be released with media_folder_destroy().
+ * @remarks The @a dst should be released using media_folder_destroy().
  *
  * @param[out] dst The destination handle to the media folder
- * @param[in]  src The source handle to the media folder
+ * @param[in] src The source 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_PERMISSION_DENIED Permission denied
  *
  * @see media_folder_destroy()
  * @see media_folder_foreach_folder_from_db()
@@ -189,7 +183,7 @@ int media_folder_clone(media_folder_h *dst, media_folder_h src);
 /**
  * @brief Destroys the media folder.
  * @details The function frees all resources related to the folder handle. This handle
- *          no longer can be used to perform any operation. A new handle has to
+ *          no longer can be used to perform any operations. A new handle has to
  *          be created before the next use.
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
@@ -201,7 +195,6 @@ int media_folder_clone(media_folder_h *dst, media_folder_h src);
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @pre A copy of the media folder handle created by calling media_folder_clone().
  *
@@ -213,9 +206,9 @@ int media_folder_destroy(media_folder_h folder);
  * @brief Gets the media folder ID.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks You must release @a folder_id using free().
+ * @remarks The @a folder_id should be released using free().
  *
- * @param[in]  folder    The handle to the media folder
+ * @param[in] folder The handle to the media folder
  * @param[out] folder_id The ID of the media folder
  *
  * @return @c 0 on success,
@@ -223,17 +216,17 @@ int media_folder_destroy(media_folder_h folder);
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  */
 int media_folder_get_folder_id(media_folder_h folder, char **folder_id);
 
 /**
+ * @deprecated Deprecated since 4.0.
  * @brief Gets the parent folder ID.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  *
- * @remarks You must release @a parent_folder_id using free().
+ * @remarks The @a parent_folder_id should be released using free().
  *
- * @param[in]  folder    The handle to the media folder
+ * @param[in] folder The handle to the media folder
  * @param[out] parent_folder_id The ID of the upper media folder
  *
  * @return @c 0 on success,
@@ -241,18 +234,17 @@ int media_folder_get_folder_id(media_folder_h folder, char **folder_id);
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  */
-int media_folder_get_parent_folder_id(media_folder_h folder, char **parent_folder_id);
+int media_folder_get_parent_folder_id(media_folder_h folder, char **parent_folder_id) TIZEN_DEPRECATED_API;
 
 /**
  * @brief Gets the absolute path to the media folder.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks You must release @a path using free().
+ * @remarks The @a path should be released using free().
  *
- * @param[in]  folder The handle to the media folder
- * @param[out] path   The path of the media folder
+ * @param[in] folder The handle to the media folder
+ * @param[out] path The path of the media folder
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
@@ -260,7 +252,6 @@ int media_folder_get_parent_folder_id(media_folder_h folder, char **parent_folde
  * @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_PERMISSION_DENIED Permission denied
  *
  */
 int media_folder_get_path(media_folder_h folder, char **path);
@@ -269,9 +260,9 @@ int media_folder_get_path(media_folder_h folder, char **path);
  * @brief Gets the media folder name.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks You must release @a folder_name using free().
+ * @remarks The @a folder_name should be released using free().
  *
- * @param[in]  folder      The handle to the media folder
+ * @param[in] folder The handle to the media folder
  * @param[out] folder_name The name of the media folder
  *
  * @return @c 0 on success,
@@ -280,16 +271,16 @@ int media_folder_get_path(media_folder_h folder, char **path);
  * @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_PERMISSION_DENIED Permission denied
  */
 int media_folder_get_name(media_folder_h folder, char **folder_name);
 
 /**
+ * @deprecated Deprecated since 4.0.
  * @brief Gets the modified date of the folder.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in]  folder The handle to the media folder
- * @param[out] date   The modified date of the folder
+ * @param[in] folder The handle to the media folder
+ * @param[out] date The modified date of the media folder
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
@@ -297,13 +288,13 @@ int media_folder_get_name(media_folder_h folder, char **folder_name);
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
  */
-int media_folder_get_modified_time(media_folder_h folder, time_t *date);
+int media_folder_get_modified_time(media_folder_h folder, time_t *date) TIZEN_DEPRECATED_API;
 
 /**
  * @brief Gets the folder storage type.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in]  folder       The handle to the media folder
+ * @param[in] folder The handle to the media folder
  * @param[out] storage_type The storage type of the media folder
  *
  * @return @c 0 on success,
@@ -311,7 +302,6 @@ int media_folder_get_modified_time(media_folder_h folder, time_t *date);
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  */
 int media_folder_get_storage_type(media_folder_h folder, media_content_storage_e *storage_type);
 
@@ -319,9 +309,9 @@ int media_folder_get_storage_type(media_folder_h folder, media_content_storage_e
  * @brief Gets the storage id of the folder.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  *
- * @remarks You must release @a storage_id using free().
+ * @remarks The @a storage_id should be released using free().
  *
- * @param[in]  folder      The handle to the media folder
+ * @param[in] folder The handle to the media folder
  * @param[out] storage_id The storage id of the media folder
  *
  * @return @c 0 on success,
@@ -330,7 +320,6 @@ int media_folder_get_storage_type(media_folder_h folder, media_content_storage_e
  * @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_PERMISSION_DENIED Permission denied
  */
 int media_folder_get_storage_id(media_folder_h folder, char **storage_id);
 
@@ -342,15 +331,13 @@ int media_folder_get_storage_id(media_folder_h folder, char **storage_id);
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  *
  * @param[in] folder The handle to the media folder
- * @param[out] order   The viewing order of the media folder
+ * @param[out] order The viewing order 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_OUT_OF_MEMORY     Out of memory
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @post media_folder_update_to_db()
  */
@@ -363,17 +350,19 @@ int media_folder_get_order(media_folder_h folder, int *order) TIZEN_DEPRECATED_A
  *          Media folder will be created, which is filled with folder information.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks You must release @a folder using media_folder_destroy().
+ * @remarks The @a folder should be released using media_folder_destroy().
  *
- * @param[in]  folder_id The ID of the media folder
- * @param[out] folder    The media folder handle associated with the folder ID
+ * @param[in] folder_id The ID of the media folder
+ * @param[out] 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_PERMISSION_DENIED Permission denied
+ * @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().
  *
@@ -389,15 +378,15 @@ int media_folder_get_folder_from_db(const char *folder_id, media_folder_h *folde
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
  * @param[in] folder The handle to the media folder
- * @param[in] name   The name of 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
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  */
 int media_folder_set_name(media_folder_h folder, const char *name) TIZEN_DEPRECATED_API;
 
@@ -413,15 +402,13 @@ int media_folder_set_name(media_folder_h folder, const char *name) TIZEN_DEPRECA
  *                    If you don't use the filter, the set order value does not effect the folder viewing order.
  *
  * @param[in] folder The handle to the media folder
- * @param[in] order   The viewing order of the media folder
+ * @param[in] order The viewing order 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_OUT_OF_MEMORY     Out of memory
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  */
 int media_folder_set_order(media_folder_h folder, int order) TIZEN_DEPRECATED_API;
 
@@ -466,4 +453,4 @@ int media_folder_update_to_db(media_folder_h folder) TIZEN_DEPRECATED_API;
 }
 #endif /* __cplusplus */
 
-#endif /* __TIZEN_MEDIA_FOLDER_H__ */
+#endif /* __TIZEN_CONTENT_MEDIA_FOLDER_H__ */