Reinforce description of order type
[platform/core/api/media-content.git] / include_product / media_filter.h
index d88dcd6..387a3ca 100755 (executable)
@@ -16,8 +16,8 @@
 
 
 
-#ifndef __TIZEN_MEDIA_FILTER_H__
-#define __TIZEN_MEDIA_FILTER_H__
+#ifndef __TIZEN_CONTENT_MEDIA_FILTER_H__
+#define __TIZEN_CONTENT_MEDIA_FILTER_H__
 
 #include <media_content_type.h>
 
@@ -46,9 +46,9 @@ extern "C" {
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks You must release the @a filter handle using media_info_filter_destroy().
+ * @remarks The @a filter should be released using media_info_filter_destroy().
  *
- * @param[out] filter A handle to the media filter
+ * @param[out] filter The handle to the media filter
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
@@ -56,7 +56,6 @@ extern "C" {
  * @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
  *
  * @see media_filter_destroy()
  */
@@ -65,7 +64,7 @@ int media_filter_create(filter_h *filter);
 /**
  * @brief Destroys a media filter handle.
  * @details The function frees all resources related to the media filter handle. The filter
- *          handle no longer can be used to perform any operation. A new filter handle
+ *          handle no longer can be used to perform any operations. A new filter handle
  *          has to be created before the next usage.
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
@@ -77,7 +76,6 @@ int media_filter_create(filter_h *filter);
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @see media_filter_create()
  */
@@ -91,15 +89,14 @@ int media_filter_destroy(filter_h filter);
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
  * @param[in] filter The handle to the media filter
- * @param[in] offset The start position of the given filter (Starting from zero)
- * @param[in] count  The number of items to be searched with respect to the offset
+ * @param[in] offset The start position of the given media filter (Starting from zero)
+ * @param[in] count The number of items to be searched with respect to the offset
  *
  * @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_filter_create()
  * @see media_filter_destroy()
@@ -110,8 +107,8 @@ int media_filter_set_offset(filter_h filter, int offset, int count);
  * @brief Sets the @a condition for the given @a filter.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in] filter       The handle to the media filter
- * @param[in] condition    The condition which is used WHERE clause on a query
+ * @param[in] filter The handle to the media filter
+ * @param[in] condition The condition which is used WHERE clause on a query
  * @param[in] collate_type The collate type for comparing two strings
  *
  * @return @c 0 on success,
@@ -120,7 +117,6 @@ int media_filter_set_offset(filter_h filter, int offset, int count);
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @see media_filter_create()
  * @see media_filter_destroy()
@@ -128,20 +124,23 @@ int media_filter_set_offset(filter_h filter, int offset, int count);
 int media_filter_set_condition(filter_h filter, const char *condition, media_content_collation_e collate_type);
 
 /**
- * @brief Sets the media filter content @a order and order keyword i.e. either descending or ascending.
+ * @brief Sets the media filter content @a order_type and @a order_keyword i.e. either descending or ascending.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in] filter        The handle to the media filter
- * @param[in] order_type    The search order type
+ * @remarks If @a order_type set to #MEDIA_CONTENT_ORDER_OTHER, media_filter sorts by referring only to the value of @a order_keyword. \n
+ *          Therefore, @a order_keyword must include collation type and order type. \n
+ *          e.g. MEDIA_DISPLAY_NAME COLLATE NOCASE DESC, MEDIA_MODIFIED_TIME DESC
+ *
+ * @param[in] filter The handle to the media filter
+ * @param[in] order_type The search order type
  * @param[in] order_keyword The search order keyword
- * @param[in] collate_type  The collate type for comparing two strings
+ * @param[in] collate_type The collate type for comparing two strings
  *
  * @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_filter_create()
  * @see media_filter_destroy()
@@ -149,13 +148,16 @@ int media_filter_set_condition(filter_h filter, const char *condition, media_con
 int media_filter_set_order(filter_h filter, media_content_order_e order_type, const char *order_keyword, media_content_collation_e collate_type);
 
 /**
- * @brief Sets the @a storage id for the given @a filter.
- * @details You can use this API when you want to search items only in the specific storage
+ * @deprecated Deprecated since 5.0. Use media_filter_set_condition() with MEDIA_PATH keyword instead. \n
+ *             See @ref CAPI_SYSTEM_STORAGE_MODULE for information about file system paths.
+ *
+ * @brief Sets the @a storage_id for the given @a filter.
+ * @details You can use this function when you want to search items only in the specific storage
  *
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  *
- * @param[in] filter       The handle to the media filter
- * @param[in] storage_id    The storage_id for browsing or searching
+ * @param[in] filter The handle to the media filter
+ * @param[in] storage_id The ID of the media storage
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
@@ -163,27 +165,25 @@ int media_filter_set_order(filter_h filter, media_content_order_e order_type, co
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @see media_filter_create()
  * @see media_filter_destroy()
  */
-int media_filter_set_storage(filter_h filter, const char *storage_id);
+int media_filter_set_storage(filter_h filter, const char *storage_id) TIZEN_DEPRECATED_API;
 
 /**
  * @brief Gets the @a offset and @a count for the given @a filter used to limit the number of items returned.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in]  filter The handle to the media filter
- * @param[out] offset The start position of the given filter (Starting from zero)
- * @param[out] count  The number of items to be searched with respect to the offset
+ * @param[in] filter The handle to the media filter
+ * @param[out] offset The start position of the given media filter (Starting from zero)
+ * @param[out] count The number of items to be searched with respect to the offset
  *
  * @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_filter_create()
  * @see media_filter_destroy()
@@ -194,10 +194,10 @@ int media_filter_get_offset(filter_h filter, int *offset, int *count);
  * @brief Gets the @a condition for the given @a filter.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks You must release @a condition using free().
+ * @remarks The @a condition should be released using free().
  *
- * @param[in]  filter       The handle to the media info filter
- * @param[out] condition    The condition which is used WHERE clause on a query
+ * @param[in] filter The handle to the media filter
+ * @param[out] condition The condition which is used WHERE clause on a query
  * @param[out] collate_type The collate type for comparing two strings
  *
  * @return @c 0 on success,
@@ -206,7 +206,6 @@ int media_filter_get_offset(filter_h filter, int *offset, int *count);
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @see media_filter_create()
  * @see media_filter_destroy()
@@ -214,48 +213,47 @@ int media_filter_get_offset(filter_h filter, int *offset, int *count);
 int media_filter_get_condition(filter_h filter, char **condition, media_content_collation_e *collate_type);
 
 /**
- * @brief Gets the media filter's content @a order and order keyword i.e. either descending or ascending.
+ * @brief Gets the media filter's content @a order_type and @a order_keyword i.e. either descending or ascending.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @remarks You must release @a order_keyword using free().
+ * @remarks The @a order_keyword should be released using free().
  *
- * @param[in]  filter        The handle to the media filter
- * @param[out] order_type    The search order type
+ * @param[in] filter The handle to the media filter
+ * @param[out] order_type The search order type
  * @param[out] order_keyword The search order keyword
- * @param[out] collate_type  The collate type for comparing two strings
+ * @param[out] collate_type The collate type for comparing two strings
  *
  * @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_filter_create()
  * @see media_filter_destroy()
  */
-int media_filter_get_order(filter_h filter, media_content_order_eorder_type, char **order_keyword, media_content_collation_e *collate_type);
+int media_filter_get_order(filter_h filter, media_content_order_e *order_type, char **order_keyword, media_content_collation_e *collate_type);
 
 /**
- * @brief Get the @a storage id for given @a filter.
+ * @deprecated Deprecated since 5.0.
+ * @brief Gets the @a storage_id for given @a filter.
  * @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] filter The handle to media info filter
- * @param[out] storage_id The storage_id which is used in filter
+ * @param[in] filter The handle to the media filter
+ * @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_PERMISSION_DENIED Permission denied
  *
  * @see media_filter_create()
  * @see media_filter_destroy()
  */
-int media_filter_get_storage(filter_h filter, char **storage_id);
+int media_filter_get_storage(filter_h filter, char **storage_id) TIZEN_DEPRECATED_API;
 
 /**
  * @}
@@ -265,4 +263,4 @@ int media_filter_get_storage(filter_h filter, char **storage_id);
 }
 #endif /* __cplusplus */
 
-#endif /* __TIZEN_MEDIA_FILTER_H__ */
+#endif /* __TIZEN_CONTENT_MEDIA_FILTER_H__ */