[ACR-1643] Add to search ebooks with keywords
[platform/core/api/media-content.git] / include_product / media_book.h
index a80a20b..6e39fde 100755 (executable)
@@ -171,6 +171,35 @@ int book_meta_get_date(book_meta_h book, char **date);
 int book_meta_get_publisher(book_meta_h book, char **publisher);
 
 /**
+ * @brief Gets a list of paths to ebooks which contain a given keyword.
+ * @details This function returns a list of ebook paths including @a keyword.\n
+ *          The search scope is title, table of contents, and body.\n
+ *          If there are no ebooks matching the criteria, @a path_list will be NULL.
+ *
+ * @since_tizen 6.5
+ *
+ * @remarks Each element of @a path_list should be released with free(), then the array itself should be released with free(). \n
+ *          %http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n
+ *          %http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.
+ *
+ * @param[in] keyword Keyword to search for
+ * @param[out] path_list A list of paths to books containing @a keyword
+ * @param[out] len Length of @a path_list
+ *
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
+ * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
+ * @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
+ *
+ * @see media_info_get_media_from_db_by_path()
+ */
+int book_meta_get_path_with_keyword(const char *keyword, char ***path_list, unsigned int *len);
+
+/**
  *@}
  */