Modify checker for scan ignore
[platform/core/api/media-content.git] / include / media_face.h
index 49915dc..231b978 100755 (executable)
@@ -27,8 +27,8 @@ extern "C" {
  * @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.
  */
 
 /**
@@ -170,6 +170,7 @@ int media_face_get_tag(media_face_h face, char **tag);
  *
  * @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.
@@ -194,7 +195,6 @@ int media_face_create(const char *media_id, media_face_h *face);
  * @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()
@@ -214,7 +214,6 @@ int media_face_set_face_rect(media_face_h face, unsigned int rect_x, unsigned in
  * @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()
@@ -257,6 +256,10 @@ int media_face_set_tag(media_face_h face, const char *tag);
  * @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()
@@ -269,7 +272,7 @@ int media_face_insert_to_db(media_face_h face);
  *
  * @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
@@ -282,6 +285,10 @@ int media_face_insert_to_db(media_face_h face);
  * @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().
  *
@@ -306,6 +313,10 @@ int media_face_update_to_db(media_face_h face);
  * @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()
@@ -314,6 +325,56 @@ int media_face_update_to_db(media_face_h face);
 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);
+
+/**
  * @}
  */