From 2641590f8345154879310995dd2e3a1a6c9a1b0b Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Tue, 1 Nov 2016 17:54:16 +0900 Subject: [PATCH] [ACR-816] add new error code about privilege Change-Id: Ib097bda7b53cdd55470590af49cde4c533b2629f Signed-off-by: Eunhae Choi --- include/common/player.h | 25 +++++++++++++++---------- include/wearable/player.h | 25 +++++++++++++++---------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/include/common/player.h b/include/common/player.h index 0ab366f..3de2436 100644 --- a/include/common/player.h +++ b/include/common/player.h @@ -509,7 +509,9 @@ int player_unprepare(player_h player); * @since_tizen 2.3 * @remarks If you use HTTP or RSTP, URI should start with "http://" or "rtsp://". The default protocol is "file://". * If you provide an invalid URI, you won't receive an error message until you call player_start(). - * + * @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any video/audio files are used to play located in the internal storage. + * @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any video/audio files are used to play located in the external storage. + * @remarks The internet privilege(http://tizen.org/privilege/internet) must be added if any URLs are used to play from network. * @param[in] player The handle to the media player * @param[in] uri The content location, such as the file path, the URI of the HTTP or RSTP stream you want to play * @@ -519,6 +521,8 @@ int player_unprepare(player_h player); * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state + * @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied + * @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature * @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). * @see player_set_memory_buffer() */ @@ -1229,7 +1233,6 @@ int player_is_display_visible(player_h player, bool* visible); * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation * @retval #PLAYER_ERROR_INVALID_STATE Invalid state - * @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. * @see #player_display_rotation_e * @see player_set_display @@ -1764,6 +1767,8 @@ int player_unset_buffering_cb(player_h player); * @brief Sets a path to download, progressively. * @since_tizen 2.3 * @remarks Progressive download will be started when you invoke player_start(). + * @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any files are used to download and play located in the internal storage. + * @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any files are used to downlaod and play located in the external storage. * @param[in] player The handle to the media player * @param[in] path The absolute path to download * @return @c 0 on success, @@ -1773,6 +1778,7 @@ int player_unset_buffering_cb(player_h player); * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state * @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature + * @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied * @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). * @see player_set_progressive_download_message_cb() * @see player_unset_progressive_download_message_cb() @@ -1857,6 +1863,8 @@ int player_set_playback_rate(player_h player, float rate); * @brief Sets a subtitle path. * @since_tizen 2.3 * @remarks Only MicroDVD/SubViewer(*.sub), SAMI(*.smi), and SubRip(*.srt) subtitle formats are supported. + * @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any files are used to play located in the internal storage. + * @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any files are used to play located in the external storage. * @param[in] player The handle to the media player * @param[in] path The absolute path of the subtitle file, it can be @c NULL in the #PLAYER_STATE_IDLE state. * @return @c 0 on success, @@ -1865,6 +1873,7 @@ int player_set_playback_rate(player_h player, float rate); * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state + * @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. * @pre The path value can be @c NULL for reset when the player state is set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). */ @@ -1957,9 +1966,8 @@ int player_unset_video_stream_changed_cb(player_h player); * @brief Gets current track index. * @since_tizen 2.4 * @details Index starts from 0. - * @remarks PLAYER_STREAM_TYPE_VIDEO is not supported. * @param[in] player The handle to the media player - * @param[in] type The type of target stream + * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT * @param[out] index The index of track * @return @c 0 on success, * otherwise a negative error value @@ -1975,9 +1983,8 @@ int player_get_current_track(player_h player, player_stream_type_e type, int *in * @brief Gets language code of a track. * @since_tizen 2.4 * @remarks @a code must be released with @c free() by caller - * @remarks PLAYER_STREAM_TYPE_VIDEO is not supported. * @param[in] player The handle to the media player - * @param[in] type The type of target stream + * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT * @param[in] index The index of track * @param[out] code A language code in ISO 639-1. "und" will be returned if the language is undefined. * @return @c 0 on success, @@ -1993,9 +2000,8 @@ int player_get_track_language_code(player_h player, player_stream_type_e type, i /** * @brief Gets the track count. * @since_tizen 2.4 - * @remarks PLAYER_STREAM_TYPE_VIDEO is not supported. * @param[in] player The handle to the media player - * @param[in] type The type of target stream + * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT * @param[out] count The number of track * @return @c 0 on success, * otherwise a negative error value @@ -2010,9 +2016,8 @@ int player_get_track_count(player_h player, player_stream_type_e type, int *coun /** * @brief Selects a track to play. * @since_tizen 2.4 - * @remarks PLAYER_STREAM_TYPE_VIDEO is not supported. * @param[in] player The handle to the media player - * @param[in] type The type of target stream + * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT * @param[in] index The index of track * @return @c 0 on success, * otherwise a negative error value diff --git a/include/wearable/player.h b/include/wearable/player.h index 360e75f..b4dde68 100644 --- a/include/wearable/player.h +++ b/include/wearable/player.h @@ -508,7 +508,9 @@ int player_unprepare(player_h player); * @since_tizen 2.3.1 * @remarks If you use HTTP or RSTP, URI should start with "http://" or "rtsp://". The default protocol is "file://". * If you provide an invalid URI, you won't receive an error message until you call player_start(). - * + * @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any video/audio files are used to play located in the internal storage. + * @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any video/audio files are used to play located in the external storage. + * @remarks The internet privilege(http://tizen.org/privilege/internet) must be added if any URLs are used to play from network. * @param[in] player The handle to the media player * @param[in] uri The content location, such as the file path, the URI of the HTTP or RSTP stream you want to play * @@ -518,6 +520,8 @@ int player_unprepare(player_h player); * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state + * @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied + * @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature * @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). * @see player_set_memory_buffer() */ @@ -1228,7 +1232,6 @@ int player_is_display_visible(player_h player, bool* visible); * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation * @retval #PLAYER_ERROR_INVALID_STATE Invalid state - * @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. * @see #player_display_rotation_e * @see player_set_display @@ -1763,6 +1766,8 @@ int player_unset_buffering_cb(player_h player); * @brief Sets a path to download, progressively. * @since_tizen 2.3.1 * @remarks Progressive download will be started when you invoke player_start(). + * @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any files are used to download and play located in the internal storage. + * @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any files are used to download and play located in the external storage. * @param[in] player The handle to the media player * @param[in] path The absolute path to download * @return @c 0 on success, @@ -1772,6 +1777,7 @@ int player_unset_buffering_cb(player_h player); * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state * @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature + * @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied * @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). * @see player_set_progressive_download_message_cb() * @see player_unset_progressive_download_message_cb() @@ -1856,6 +1862,8 @@ int player_set_playback_rate(player_h player, float rate); * @brief Sets a subtitle path. * @since_tizen 2.3.1 * @remarks Only MicroDVD/SubViewer(*.sub), SAMI(*.smi), and SubRip(*.srt) subtitle formats are supported. + * @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any files are used to play located in the internal storage. + * @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any files are used to play located in the external storage. * @param[in] player The handle to the media player * @param[in] path The absolute path of the subtitle file, it can be @c NULL in the #PLAYER_STATE_IDLE state. * @return @c 0 on success, @@ -1864,6 +1872,7 @@ int player_set_playback_rate(player_h player, float rate); * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state + * @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. * @pre The path value can be @c NULL for reset when the player state is set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). */ @@ -1956,9 +1965,8 @@ int player_unset_video_stream_changed_cb(player_h player); * @brief Gets current track index. * @since_tizen 3.0 * @details Index starts from 0. - * @remarks PLAYER_STREAM_TYPE_VIDEO is not supported. * @param[in] player The handle to the media player - * @param[in] type The type of target stream + * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT * @param[out] index The index of track * @return @c 0 on success, * otherwise a negative error value @@ -1974,9 +1982,8 @@ int player_get_current_track(player_h player, player_stream_type_e type, int *in * @brief Gets language code of a track. * @since_tizen 3.0 * @remarks @a code must be released with @c free() by caller - * @remarks PLAYER_STREAM_TYPE_VIDEO is not supported. * @param[in] player The handle to the media player - * @param[in] type The type of target stream + * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT * @param[in] index The index of track * @param[out] code A language code in ISO 639-1. "und" will be returned if the language is undefined. * @return @c 0 on success, @@ -1992,9 +1999,8 @@ int player_get_track_language_code(player_h player, player_stream_type_e type, i /** * @brief Gets the track count. * @since_tizen 3.0 - * @remarks PLAYER_STREAM_TYPE_VIDEO is not supported. * @param[in] player The handle to the media player - * @param[in] type The type of target stream + * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT * @param[out] count The number of track * @return @c 0 on success, * otherwise a negative error value @@ -2009,9 +2015,8 @@ int player_get_track_count(player_h player, player_stream_type_e type, int *coun /** * @brief Selects a track to play. * @since_tizen 3.0 - * @remarks PLAYER_STREAM_TYPE_VIDEO is not supported. * @param[in] player The handle to the media player - * @param[in] type The type of target stream + * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT * @param[in] index The index of track * @return @c 0 on success, * otherwise a negative error value -- 2.7.4