Tizen 2.1 base
[platform/framework/native/media.git] / inc / FMediaToneTypes.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                        FMediaToneTypes.h
20  * @brief                       This is the header file for the common types of Tone and TonePlayer.
21  *
22  * This header file contains the declarations of the enumerations of the Tone class.
23  */
24
25 #ifndef _FMEDIA_TONE_TYPES_H_
26 #define _FMEDIA_TONE_TYPES_H_
27
28 namespace Tizen { namespace Media
29 {
30
31
32 //
33 // This variable is for internal use only. Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
34 //
35 // Default volume level.
36 //
37 // @since               2.0
38 //
39 static const int DEFAULT_TONE_PLAYER_VOLUME = 50;
40
41 //
42 // This variable is for internal use only. Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
43 //
44 // Sampling rate.
45 //
46 // @since               2.0
47 //
48 static const int SAMPLING_RATE = 22050;
49
50 //
51 // This variable is for internal use only. Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
52 //
53 // Maximum frequency.
54 //
55 // @since               2.0
56 //
57 static const int MAX_FREQUENCY = 15000;
58
59 //
60 // This variable is for internal use only. Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
61 //
62 // Minimum frequency.
63 //
64 // @since               2.0
65 //
66 static const int MIN_FREQUENCY = 0;
67
68 //
69 // This variable is for internal use only. Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
70 //
71 // Minimum duration.
72 //
73 // @since               2.0
74 //
75 static const int MIN_DURATION = 1;
76
77 /**
78  * @enum TonePlayerState
79  *
80  * Defines the state of the tone player.
81  *
82  * @since               2.0
83  *
84  * @see Tizen::Media::TonePlayer::GetState()
85  */
86 enum TonePlayerState
87 {
88         TONE_PLAYER_STATE_IDLE = 0x00,          /**< The tone player is idle */
89         TONE_PLAYER_STATE_INITIALIZED,          /**< The tone player is initialized */
90         TONE_PLAYER_STATE_OPENED,               /**< The tone player instance is opened */
91         TONE_PLAYER_STATE_PLAYING,              /**< The tone player is playing the tone(s) */
92         TONE_PLAYER_STATE_PAUSED,               /**< The tone player playback is paused  */
93         TONE_PLAYER_STATE_STOPPED,              /**< The tone player has stopped and has no current play-time @n
94                                                              However, the tone(s) is still opened and initialized. */
95         TONE_PLAYER_STATE_CLOSED,               /**< The tone player is closed */
96         TONE_PLAYER_STATE_END_OF_TONE,          /**< The tone player has reached the end of the tone(s) */
97         TONE_PLAYER_STATE_ERROR,                /**< An error has occurred */
98 };
99
100 /**
101  * @enum DtmfPreset
102  *
103  * Defines the Dual-Tone Multi-Frequency (DTMF) presets for the keys.
104  *
105  * @since               2.0
106  */
107 enum DtmfPreset
108 {
109         DTMF_PRESET_0 = 0x00,       /**< The DTMF tone for key 0: 1336Hz, 941Hz */
110         DTMF_PRESET_1,              /**< The DTMF tone for key 1: 1209Hz, 697Hz */
111         DTMF_PRESET_2,              /**< The DTMF tone for key 2: 1336Hz, 697Hz */
112         DTMF_PRESET_3,              /**< The DTMF tone for key 3: 1477Hz, 697Hz */
113         DTMF_PRESET_4,              /**< The DTMF tone for key 4: 1209Hz, 770Hz */
114         DTMF_PRESET_5,              /**< The DTMF tone for key 5: 1336Hz, 770Hz */
115         DTMF_PRESET_6,              /**< The DTMF tone for key 6: 1477Hz, 770Hz */
116         DTMF_PRESET_7,              /**< The DTMF tone for key 7: 1209Hz, 852Hz */
117         DTMF_PRESET_8,              /**< The DTMF tone for key 8: 1336Hz, 852Hz */
118         DTMF_PRESET_9,              /**< The DTMF tone for key 9: 1477Hz, 852Hz */
119         DTMF_PRESET_A,              /**< The DTMF tone for key A: 1633Hz, 697Hz */
120         DTMF_PRESET_B,              /**< The DTMF tone for key B: 1633Hz, 770Hz */
121         DTMF_PRESET_C,              /**< The DTMF tone for key C: 1633Hz, 852Hz */
122         DTMF_PRESET_D,              /**< The DTMF tone for key D: 1633Hz, 941Hz */
123         DTMF_PRESET_P,              /**< The DTMF tone for key #: 1477Hz, 941Hz */
124         DTMF_PRESET_S,              /**< The DTMF tone for key *: 1209Hz, 941Hz */
125 };
126
127 }} // Tizen::Media
128
129 #endif