X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fmedia_content_internal.h;h=85068e05f17201d5daf6d2556c85b0b808ff8ae0;hb=b97b386ccb7bd75323a4f2d809c415e3264e429d;hp=0dd5ca1c0c6405df7d70dfe8cd171cc370a58de6;hpb=2f0462f14f9efbce04d97fbfa45cd01f3f6ef336;p=platform%2Fcore%2Fapi%2Fmedia-content.git diff --git a/include/media_content_internal.h b/include/media_content_internal.h index 0dd5ca1..85068e0 100755 --- a/include/media_content_internal.h +++ b/include/media_content_internal.h @@ -16,8 +16,8 @@ -#ifndef __TIZEN_MEDIA_CONTENT_INTERNAL_H__ -#define __TIZEN_MEDIA_CONTENT_INTERNAL_H__ +#ifndef __TIZEN_CONTENT_MEDIA_CONTENT_INTERNAL_H__ +#define __TIZEN_CONTENT_MEDIA_CONTENT_INTERNAL_H__ #include @@ -32,350 +32,33 @@ extern "C" { * Operations include: inserting a new storage in media to the media database, removing storage from database, \n */ -/** - * @ingroup CAPI_MEDIA_CONTENT_MODULE - * @brief Enumeration for a media storage scan status. - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - */ -typedef enum { - MEDIA_STORAGE_SCAN_NONE = 0, /**< Media Scanner not detect storage yet*/ - MEDIA_STORAGE_SCAN_PREPARE, /**< Media Scanner detect storage but not scanning yet*/ - MEDIA_STORAGE_SCAN_PROCESSING, /**< Media Scanner Start Scanning storage*/ - MEDIA_STORAGE_SCAN_STOP, /**< Media Scanner Stop Scanning storage. Not scanning items can be exist*/ - MEDIA_STORAGE_SCAN_DONE, /**< Scanning Done but need to extract metadata*/ - MEDIA_STORAGE_SCAN_META_PROCESSING, /**< Scanning Done and start to extract metadata*/ - MEDIA_STORAGE_SCAN_META_STOP, /**< Stop extract metadata*/ - MEDIA_STORAGE_SCAN_COMPLETE , /**< Complete scanning*/ -} media_storage_scan_status_e; - -/** -* @internal -* @brief Insert media storage to database. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @remarks You must release @a storage using media_storage_destroy(). -* -* @privlevel platform -* @privilege %http://tizen.org/privilege/content.write -* -* @param[in] storage_name The storage name to insert to database -* @param[in] storage_path The storage path to insert to database -* @param[in] storage_account The storage account to insert to database -* @param[in] storage_type The storage type to insert to database -* @param[out] storage The media storage handle -* -* @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_PERMISSION_DENIED Permission denied -* -* @see media_storage_delete_from_db() -*/ -int media_storage_insert_to_db(const char *storage_name, const char *storage_path, const char *storage_account, media_content_storage_e storage_type, media_storage_h *storage); - -/** -* @internal -* @brief Deletes the database for media storage. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @privlevel platform -* @privilege %http://tizen.org/privilege/content.write -* -* @param[in] storage_id The storage ID to delete from database -* -* @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_PERMISSION_DENIED Permission denied -* -* @see media_storage_insert_to_db() -*/ -int media_storage_delete_from_db(const char *storage_id); - -/** - * @brief Gets the storage account of media storage. - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * - * @remarks You must release @a storage_account using free(). - * - * @param[in] storage The media storage handle - * @param[out] storage_account The storage account 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_OUT_OF_MEMORY Out of memory - */ -int media_storage_get_storage_account(media_storage_h storage, char **storage_account); - -/** -* @internal -* @brief Sets the MIME type of media info handle. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @param[in] media The media info handle -* @param[in] mime_type The MIME type of the media info -* -* @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_PERMISSION_DENIED Permission denied -* -* @post media_info_insert_to_db_with_data() -*/ -int media_info_set_mime_type(media_info_h media, const char *mime_type); - -/** -* @internal -* @brief Sets the thumbnail path of media info handle. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @param[in] media The media info handle -* @param[in] thumbnail_path The thumbnail path of media info handle -* -* @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_PERMISSION_DENIED Permission denied -* -* @post media_info_insert_to_db_with_data() -*/ -int media_info_set_thumbnail_path(media_info_h media, const char *thumbnail_path); - -/** -* @internal -* @brief Sets the size of media info handle. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @param[in] media The media info handle -* @param[in] size The size of media info handle -* -* @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_PERMISSION_DENIED Permission denied -* -* @post media_info_insert_to_db_with_data() -*/ -int media_info_set_size(media_info_h media, unsigned long long size); - -/** -* @internal -* @brief Sets the modified time of media info handle. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @param[in] media The media info handle -* @param[in] modified_time The modified time of media info handle -* -* @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_PERMISSION_DENIED Permission denied -* -* @post media_info_insert_to_db_with_data() -*/ -int media_info_set_modified_time(media_info_h media, time_t modified_time); +/*Bookmark for C#*/ +int media_bookmark_create(const char *media_id, time_t time, media_bookmark_h *bookmark); +int media_bookmark_set_thumbnail_path(media_bookmark_h bookmark, const char *path); +int media_bookmark_insert_to_db_v2(media_bookmark_h bookmark); -/** -* @internal -* @brief Sets the media type of media info handle. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @param[in] media The media info handle -* @param[in] type The media type of media info handle -* -* @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_PERMISSION_DENIED Permission denied -* -* @post media_info_insert_to_db_with_data() -*/ -int media_info_set_media_type(media_info_h media, media_content_type_e type); +/*Playlist for C#*/ +int media_playlist_create(media_playlist_h *playlist); +int media_playlist_get_play_order_v2(int playlist_id, int playlist_member_id, int *play_order); +int media_playlist_insert_to_db_v2(media_playlist_h playlist); +int media_playlist_update_to_db_v2(int playlist_id, media_playlist_h playlist); -/** -* @internal -* @brief Sets the duration of media info handle. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @param[in] media The media info handle -* @param[in] duration The duration of media info handle -* -* @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_PERMISSION_DENIED Permission denied -* -* @post media_info_insert_to_db_with_data() -*/ -int media_info_set_duration(media_info_h media, int duration); +/*Tag for C#*/ +int media_tag_create(media_tag_h *tag); +int media_tag_insert_to_db_v2(media_tag_h tag); +int media_tag_update_to_db_v2(int tag_id, media_tag_h tag); -/** -* @internal -* @brief Sets the width of media info handle. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @param[in] media The media info handle -* @param[in] width The width of media info handle -* -* @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_PERMISSION_DENIED Permission denied -* -* @post media_info_insert_to_db_with_data() -*/ -int media_info_set_width(media_info_h media, int width); +/*Filter for C#*/ +int media_filter_set_condition_v2(filter_h filter, const char *condition); +int media_filter_get_condition_v2(filter_h filter, char **condition); +int media_filter_set_order_v2(filter_h filter, const char *order); +int media_filter_get_order_v2(filter_h filter, char **order); -/** -* @internal -* @brief Sets the height of media info handle. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @param[in] media The media info handle -* @param[in] height The height of media info handle -* -* @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_PERMISSION_DENIED Permission denied -* -* @post media_info_insert_to_db_with_data() -*/ -int media_info_set_height(media_info_h media, int height); - -/** -* @internal -* @brief Sets the storage type of media info handle. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @param[in] media The media info handle -* @param[in] storage_type The storage type of media info handle -* -* @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_PERMISSION_DENIED Permission denied -* -* @post media_info_insert_to_db_with_data() -*/ -int media_info_set_storage_type(media_info_h media, media_content_storage_e storage_type); - -/** -* @internal -* @brief Sets the storage type of media info handle. -* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -* -* @param[in] media The media info handle -* @param[in] storage_id The storage id of media info handle -* -* @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_PERMISSION_DENIED Permission denied -* -* @post media_info_insert_to_db_with_data() -*/ -int media_info_set_storage_id(media_info_h media, const char *storage_id); - -/** - * @brief Gets the storage scan status of media storage. - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * - * @param[in] storage The media storage handle - * @param[out] scan_status The storage type 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 - */ -int media_storage_get_scan_status(const char *storage_uuid, media_storage_scan_status_e *scan_status); - -/** - * @brief Subscribes notifications of the media DB change. - * @details This function subscribes notifications of the media DB change which are published by the media server or other apps. - * media_content_db_update_cb() function will be called when notification of the media DB change is subscribed. - * - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * - * @param[in] callback The callback to be invoked when the scanning is finished - * @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_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - * - * @see media_content_db_update_cb() - * @see media_content_unset_db_updated_cb_v2() - */ -int media_content_set_db_updated_cb_v2(media_content_noti_h *noti_handle, media_content_db_update_cb callback, void *user_data); - - -/** - * @brief Unsubscribes notifications of the media DB change. - * @details This function unsubscribes notifications of the media DB change which are published by the media server or other apps. - * - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - * - * @pre media_content_set_db_updated_cb_v2() - * - * @see media_content_set_db_updated_cb_v2() - */ -int media_content_unset_db_updated_cb_v2(media_content_noti_h noti_handle); +/* Only for system session process */ +int media_content_connect_with_uid(uid_t uid); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /*__TIZEN_MEDIA_CONTENT_INTERNAL_H__*/ +#endif /*__TIZEN_CONTENT_MEDIA_CONTENT_INTERNAL_H__*/