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 FMediaToneTypes.h
20 * @brief This is the header file for the common types of Tone and TonePlayer.
22 * This header file contains the declarations of the enumerations of the Tone class.
25 #ifndef _FMEDIA_TONE_TYPES_H_
26 #define _FMEDIA_TONE_TYPES_H_
28 namespace Tizen { namespace Media
33 // This variable is for internal use only. Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
35 // Default volume level.
39 static const int DEFAULT_TONE_PLAYER_VOLUME = 50;
42 // This variable is for internal use only. Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
48 static const int SAMPLING_RATE = 22050;
51 // This variable is for internal use only. Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
57 static const int MAX_FREQUENCY = 15000;
60 // This variable is for internal use only. Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
66 static const int MIN_FREQUENCY = 0;
69 // This variable is for internal use only. Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
75 static const int MIN_DURATION = 1;
78 * @enum TonePlayerState
80 * Defines the state of the tone player.
84 * @see Tizen::Media::TonePlayer::GetState()
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 */
103 * Defines the Dual-Tone Multi-Frequency (DTMF) presets for the keys.
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 P(#): 1477Hz, 941Hz */
124 DTMF_PRESET_S, /**< The DTMF tone for key S(*): 1209Hz, 941Hz */