* @file media_face.h
* @brief This file contains the media face API and related to all operations with the face information of the image in Media DB. \n
* Functions include cloning and destroying the face handler, getting face information such as face id, face coordinates in file, \n
- * face tag. Face information detected and managed by DB automatically when image contents scanning. \n
- * And you can insert,update,delete face information manually.
+ * face tag. Face information will be managed by DB. To insert face information, you should use media_face_insert_to_db() \n
+ * or media_info_start_face_detection() API. And you can insert,update,delete face information manually.
*/
/**
*
* @since_tizen 3.0
*
+ * @remarks You must release @a face_id using free().
+ *
* @param [in] face The face handle
* @param [out] face_id The uuid of the face handle
*
*
* @since_tizen 3.0
*
+ * @remarks You must release @a media_id using free().
+ *
* @param [in] face The face handle
* @param [out] media_id The media uuid of the face handle
*
*
* @since_tizen 3.0
*
+ * @remarks You must release @a tag using free().
+ *
* @param [in] face The face handle
* @param [out] tag The tag of the face handle
*
*
* @since_tizen 3.0
*
+ * @param [in] media_id The media uuid to create the face handle
* @param [out] face The face handle
*
* @return 0 on success, otherwise a negative error value.
* @return 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
*
* @post media_face_insert_to_db()
* @post media_face_update_to_db()
* @return 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
*
* @post media_face_insert_to_db()
* @post media_face_update_to_db()
* @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
+ * @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
*
* @see media_content_connect()
* @see media_face_destroy()
*
* @details The function updates the given media face in the media database. The function should be called after any change in face, to be updated to the media
* database. For example, after using media_face_set_orientation() for setting the orientation of the face, media_face_update_to_db() function should be called so as to update
- * the given face attibutes in the media database.
+ * the given face attributes in the media database.
* @since_tizen 3.0
*
* @privlevel public
* @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_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
*
* @pre This function requires opened connection to content service by media_content_connect().
*
* @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_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
*
* @pre This function requires opened connection to content service by media_content_connect().
* @see media_content_connect()
int media_face_delete_from_db(const char *face_id);
/**
+ * @brief Gets the number of media faces with an optional filter from the media database.
+ * @since_tizen 4.0
+ *
+ * @param[in] filter The handle to the face filter
+ * @param[out] face_count The count of the media faces
+ *
+ * @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_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().
+ *
+ * @see media_content_connect()
+ * @see media_filter_create()
+ */
+int media_face_get_face_count_from_db(filter_h filter, int *face_count);
+
+/**
+ * @brief Iterates through the faces with an optional filter from the media database.
+ * @details This function gets all faces associated with the given filter and calls @a callback for every retrieved media face.
+ * If @c NULL is passed to the @a filter, then no filtering is applied.
+ * @since_tizen 4.0
+ *
+ * @param[in] filter The handle to the face 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_face_cb().
+ *
+ * @see media_content_connect()
+ * @see media_face_cb()
+ * @see media_filter_create()
+ */
+int media_face_foreach_face_from_db(filter_h filter, media_face_cb callback, void *user_data);
+
+/**
* @}
*/