2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FMediaPlayerTypes.h
20 * @brief This is the header file for the enumerations of the Player class.
22 * This header file contains the declarations of the enumerations of the Player class.
25 #ifndef _FMEDIA_PLAYER_TYPES_H_
26 #define _FMEDIA_PLAYER_TYPES_H_
28 namespace Tizen { namespace Media
31 #define MIN_PLAYER_VOLUME 0
32 #define MAX_PLAYER_VOLUME 100
33 #define DEFAULT_PLAYER_VOLUME 50
38 * Defines the state of the player.
42 * @see Tizen::Media::Player::GetState()
46 PLAYER_STATE_INITIALIZED, /**< The player is initialized */
47 PLAYER_STATE_OPENING, /**< The player opening behavior is processed */
48 PLAYER_STATE_OPENED, /**< The source is opened */
49 PLAYER_STATE_ENDOFCLIP, /**< The player has reached the end of the clip */
50 PLAYER_STATE_STOPPED, /**< The player has stopped and has no current play-time, but the media content is still opened and initialized */
51 PLAYER_STATE_PAUSED, /**< The player playback is paused */
52 PLAYER_STATE_PLAYING, /**< The player is playing the media content */
53 PLAYER_STATE_CLOSED, /**< The source is closed */
54 PLAYER_STATE_ERROR, /**< An error has occurred */
59 * @enum PlayerErrorReason
61 * Defines the player error reason.
65 enum PlayerErrorReason
67 PLAYER_ERROR_NONE, // Not defined
68 PLAYER_ERROR_INVALID_DATA, /**< The data is invalid */
69 PLAYER_ERROR_CONNECTION_LOST, /**< The connection is lost */
70 PLAYER_ERROR_STREAMING_TIMEOUT, /**< The streaming has timed out */
71 PLAYER_ERROR_TRANSPORT, /**< The transport has failed */
72 PLAYER_ERROR_SERVER, /**< The server has failed */
73 PLAYER_ERROR_OUT_OF_MEMORY, /**< The memory is insufficient*/
74 PLAYER_ERROR_DEVICE_FAILED, /**< The player device has failed */
75 PLAYER_ERROR_RIGHT_EXPIRED, /**< The right has expired */
76 PLAYER_ERROR_RIGHT_NO_LICENSE, /**< The content has no right */
77 PLAYER_ERROR_RIGHT_FUTURE_USE, /**< The right is for future use */