Tizen 2.0 Release
[framework/osp/media.git] / inc / FMediaPlayerTypes.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file                        FMediaPlayerTypes.h
20  * @brief                       This is the header file for the Player class.
21  *
22  * This header file contains the declarations of the enumerations of the Player class.
23  */
24
25 #ifndef _FMEDIA_PLAYER_TYPES_H_
26 #define _FMEDIA_PLAYER_TYPES_H_
27
28 namespace Tizen { namespace Media
29 {
30
31 #define MIN_PLAYER_VOLUME 0
32 #define MAX_PLAYER_VOLUME 100
33 #define DEFAULT_PLAYER_VOLUME 50
34
35 /**
36  * @enum PlayerState
37  *
38  * Defines the state of the player.
39  *
40  * @since               2.0
41  *
42  * @see         Tizen::Media::Player::GetState()
43  */
44 enum PlayerState
45 {
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 to 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 */
55
56 };
57
58 /**
59  * @enum PlayerErrorReason
60  *
61  * Defines the player error reason.
62  *
63  * @since               2.0
64  */
65 enum PlayerErrorReason
66 {
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 };
76
77 }} // Tizen::Media
78
79 #endif