|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This file contains common constant defines used within the |
|
15 * scope of the application. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef FMRADIODEFINES_H |
|
21 #define FMRADIODEFINES_H |
|
22 |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 #include <eikenv.h> |
|
26 #include <fmradio.rsg> |
|
27 |
|
28 #include "fmradioengine.h" |
|
29 |
|
30 const TInt KHzConversionFactor = 1000000; |
|
31 |
|
32 // Tuning step, frequency range high and low limits |
|
33 const TReal KFrequencyTuningStep = 0.05; |
|
34 |
|
35 const TInt KFrequencyMaxDecimalPlaces = 2; |
|
36 const TInt KFrequencyMaxLength = 6; |
|
37 |
|
38 // Minimum and maximum volume levels |
|
39 const TInt KMinimumVolume = 1; |
|
40 const TInt KMaximumVolume = 10; |
|
41 |
|
42 // Handy string buffer size declarations |
|
43 const TInt KBufLen16 = 0x10; |
|
44 |
|
45 const TInt KDefaultRegionArrayGranularity = 3; |
|
46 |
|
47 // Channel list item amount |
|
48 const TInt KMinNumberOfChannelListItems = 0; |
|
49 const TInt KMaxNumberOfChannelListItems = 99; |
|
50 |
|
51 // Channel list channel item string length |
|
52 const TInt KLengthOfChannelItemString = 100; |
|
53 |
|
54 // Channel list channel index string length |
|
55 const TInt KLengthOfChIndexStringChList = 5; |
|
56 |
|
57 // Channel list channel name string length |
|
58 const TInt KLengthOfChannelNameString = 80; |
|
59 |
|
60 // Channel list channel item icon index string length |
|
61 const TInt KLengthOfChannelItemIconIndexString = 3; |
|
62 |
|
63 // Time after pressing delayed key 1 or 2 |
|
64 const TInt KKeyDelayTimeInMicroseconds = 2000000; // 2 seconds |
|
65 |
|
66 const TInt KFMRadioProgressUpdateDelayInMicroseconds = 5000; //every .05 seconds. |
|
67 const TInt KProgressBarMaxValue = 100; |
|
68 const TInt KProgressBarIntervalChange = 10; |
|
69 |
|
70 //Decimal notation |
|
71 const TInt KBaseTen = 10; |
|
72 |
|
73 // Asterisk key code |
|
74 const TInt EStdKeyNkpAsteriskInDevice = 0x2A; |
|
75 |
|
76 // Current mode of the channel list view |
|
77 enum TFMRadioChannelListViewMode |
|
78 { |
|
79 ENormalListMode, |
|
80 ESaveChannelMode |
|
81 }; |
|
82 |
|
83 //const TInt KNumberOfButtonsToDisplay = 5; |
|
84 |
|
85 // Channel list channel index string formatter |
|
86 _LIT(KChIndexFormatChList, "%d"); |
|
87 _LIT(KChIndexFormatChMenu, "%d "); |
|
88 // Channel list channel item icon index string formatter |
|
89 _LIT(KChIconIndexFormatChList, "%d"); |
|
90 |
|
91 // bitmap file for the button panel |
|
92 _LIT( KFMRadioBmpFile, "fmradio.mif" ); |
|
93 |
|
94 // Keyboard number key codes |
|
95 enum TKeyboardKeys |
|
96 { |
|
97 EKeyboardKey0 = 0x30, |
|
98 EKeyboardKey1 = 0x31, |
|
99 EKeyboardKey2 = 0x32, |
|
100 EKeyboardKey3 = 0x33, |
|
101 EKeyboardKey4 = 0x34, |
|
102 EKeyboardKey5 = 0x35, |
|
103 EKeyboardKey6 = 0x36, |
|
104 EKeyboardKey7 = 0x37, |
|
105 EKeyboardKey8 = 0x38, |
|
106 EKeyboardKey9 = 0x39 |
|
107 }; |
|
108 |
|
109 // CONSTANTS FOR ALFRED ENVIRONMENT |
|
110 |
|
111 // Main view visual controls group id |
|
112 const TInt KFMRadioVisualControlsGroupId = 1; |
|
113 const TInt KFMRadioVisualizerGestureControlGroupId = 2; //Do not use for any other purpose |
|
114 const TInt KFMRadioMediaIdleId = 312; |
|
115 const TInt KFMRadioVisualControlId = 211; |
|
116 const TInt KFMRadioRdsIndicatorId = 313; |
|
117 const TInt KFMRadioRdsAfIndicatorId = 314; |
|
118 const TInt KFMRadioRdsViewer = 316; |
|
119 const TInt KFMRadioRdsInteractionIndicatorId = 317; |
|
120 const TInt KFMRadioLogoId = 318; |
|
121 const TReal KFMRadioIndicatorOpacityInHiddenState = 0.2f; |
|
122 const TReal KFMRadioRdsViewerOpacityHidden = 0.0f; |
|
123 const TReal KFMRadioRdsViewerOpacityShow = 0.4f; |
|
124 |
|
125 |
|
126 // Main view transparent layer bottom margin |
|
127 const TReal KInfoBgLayerBottomMarginAsNormalizedValue = -0.12f; |
|
128 // Main view transparent layer top margin |
|
129 const TReal KInfoBgLayerTopMarginAsNormalizedValue = 0.5f; |
|
130 // Media Idle content item amount |
|
131 const TInt KFMRadioMaxNumberOfMediaIdleContentItem = 10; |
|
132 |
|
133 // Time delay in milliseconds when main view toolbar buttons report long key press event |
|
134 const TInt KLongPressDelayValueInMicroseconds = 500; |
|
135 // How many times user is asked to scan local frequencies at application startup |
|
136 const TInt KMaxStartupTimesToAskSaveWizard = 2; |
|
137 |
|
138 // Toolbar center (=mute) button state indexes |
|
139 const TInt KMuteStateIndex = 1; |
|
140 const TInt KUnMuteStateIndex = 0; |
|
141 |
|
142 /** |
|
143 * Local Variation Flags for FM Radio |
|
144 * For values, see FMRadioVariant.hrh. |
|
145 * Integer value. |
|
146 **/ |
|
147 //_LIT( KFMRadioFeatures, "FMRadioFeatures" ); |
|
148 |
|
149 /** |
|
150 * Upper frequency bound for FM Radio band |
|
151 * Possible Values are: |
|
152 * 0 ... 115000 |
|
153 * 108000 default value |
|
154 * Integer value. |
|
155 **/ |
|
156 _LIT( KFMRadioFrequencyRangeUpperLimit, "FMRadioFrequencyRangeUpperLimit" ); |
|
157 |
|
158 /** |
|
159 * Lower frequency bound for FM Radio band |
|
160 * Possible Values are: |
|
161 * 0 ... 115000 |
|
162 * 87500 default value |
|
163 * Integer value. |
|
164 **/ |
|
165 _LIT( KFMRadioFrequencyRangeLowerLimit, "FMRadioFrequencyRangeLowerLimit" ); |
|
166 |
|
167 /** |
|
168 * Direction change mark for strings with numerals in mirrored layout |
|
169 */ |
|
170 _LIT( KRightToLeftMark, "\x200F" ); |
|
171 _LIT( KLeftToRightMark, "\x200E" ); |
|
172 |
|
173 /** |
|
174 * Volume settings for radio |
|
175 */ |
|
176 const TInt KFMRadioMaxVolumeLevel = 20; |
|
177 const TInt KFMRadioMinVolumeLevel = 0; |
|
178 const TInt KFMRadioVolumeStepSize = 1; |
|
179 |
|
180 // Channel list icon index in the icon array |
|
181 const TInt KNowPlayingIconIndexChList = 0; |
|
182 const TInt KMoveIconIndexChList = 1; |
|
183 // RDS text max length |
|
184 const TInt KFMRadioWebLinkMaxLength = 64; |
|
185 |
|
186 #endif |
|
187 |
|
188 |
|
189 |
|
190 // End of file |