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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef RADIO_GLOBAL_H_ |
|
19 #define RADIO_GLOBAL_H_ |
|
20 |
|
21 // System includes |
|
22 #include <QtGlobal> |
|
23 |
|
24 // Constants |
|
25 |
|
26 /** |
|
27 * Radio frequency multiplier |
|
28 */ |
|
29 const int KFrequencyMultiplier = 1000000; |
|
30 |
|
31 /** |
|
32 * Desired amount of steps in the volume control in the UI |
|
33 */ |
|
34 const int KMaximumVolumeLevel = 20; |
|
35 |
|
36 /** |
|
37 * Id of the offline profile |
|
38 */ |
|
39 const int KOfflineProfileId = 5; |
|
40 |
|
41 /** |
|
42 * Radio Text Plus tag ids |
|
43 */ |
|
44 namespace RtPlus |
|
45 { |
|
46 enum Tag { Title = 1, Artist = 4, Homepage = 39 }; |
|
47 } |
|
48 |
|
49 namespace Seeking |
|
50 { |
|
51 enum Direction |
|
52 { |
|
53 Down, |
|
54 Up |
|
55 }; |
|
56 |
|
57 enum State |
|
58 { |
|
59 NotSeeking, |
|
60 SeekingUp, |
|
61 SeekingDown |
|
62 }; |
|
63 } |
|
64 |
|
65 namespace CommandSender |
|
66 { |
|
67 enum Sender |
|
68 { |
|
69 Unspecified, |
|
70 FrequencyStrip, |
|
71 StationCarousel |
|
72 }; |
|
73 } |
|
74 |
|
75 namespace RadioRegion |
|
76 { |
|
77 enum Region |
|
78 { |
|
79 None = -1, |
|
80 Default, |
|
81 Japan, |
|
82 America, |
|
83 Poland |
|
84 }; |
|
85 } |
|
86 |
|
87 namespace GenreEurope |
|
88 { |
|
89 enum Europe |
|
90 { |
|
91 RdsNone, |
|
92 RdsNews, |
|
93 RdsCurrentAffairs, |
|
94 RdsInformation, |
|
95 RdsSport, |
|
96 RdsEducation, |
|
97 RdsDrama, |
|
98 RdsCulture, |
|
99 RdsScience, |
|
100 RdsVariedSpeech, |
|
101 RdsPopMusic, |
|
102 RdsRockMusic, |
|
103 RdsEasyListening, |
|
104 RdsLightClassical, |
|
105 RdsSeriousClassical, |
|
106 RdsOtherMusic, |
|
107 RdsWeather, |
|
108 RdsFinance, |
|
109 RdsChildrensProgrammes, |
|
110 RdsSocialAffairs, |
|
111 RdsReligion, |
|
112 RdsPhoneIn, |
|
113 RdsTravel, |
|
114 RdsLeisure, |
|
115 RdsJazzMusic, |
|
116 RdsCountryMusic, |
|
117 RdsNationalMusic, |
|
118 RdsOldiesMusic, |
|
119 RdsFolkMusic, |
|
120 RdsDocumentary, |
|
121 RdsAlarmTest, |
|
122 RdsAlarm |
|
123 }; |
|
124 } |
|
125 |
|
126 namespace GenreAmerica |
|
127 { |
|
128 enum America |
|
129 { |
|
130 RbdsNone, |
|
131 RbdsNews, |
|
132 RbdsInformation, |
|
133 RbdsSports, |
|
134 RbdsTalk, |
|
135 RbdsRock, |
|
136 RbdsClassicRock, |
|
137 RbdsAdultHits, |
|
138 RbdsSoftRock, |
|
139 RbdsTop40, |
|
140 RbdsCountry, |
|
141 RbdsOldies, |
|
142 RbdsSoft, |
|
143 RbdsNostalgia, |
|
144 RbdsJazz, |
|
145 RbdsClassical, |
|
146 RbdsRhythmAndBlues, |
|
147 RbdsSoftRhythmAndBlues, |
|
148 RbdsLanguage, |
|
149 RbdsReligiousMusic, |
|
150 RbdsReligiousTalk, |
|
151 RbdsPersonality, |
|
152 RbdsPublic, |
|
153 RbdsCollege, |
|
154 RbdsUnassigned1, |
|
155 RbdsUnassigned2, |
|
156 RbdsUnassigned3, |
|
157 RbdsUnassigned4, |
|
158 RbdsUnassigned5, |
|
159 RbdsWeather, |
|
160 RbdsEmergencyTest, |
|
161 RbdsEmergency |
|
162 }; |
|
163 } |
|
164 |
|
165 struct GenreStruct |
|
166 { |
|
167 int mGenreCode; |
|
168 struct{ const char *source; const char *comment; } mTranslation; |
|
169 }; |
|
170 |
|
171 //static const char* GenreContext = "Genre"; |
|
172 |
|
173 const GenreStruct EuropeanGenres[] = |
|
174 { |
|
175 { GenreEurope::RdsNone, QT_TRANSLATE_NOOP3( GenreContext, "None", "txt_genre_europe_none" ) } |
|
176 ,{ GenreEurope::RdsNews, QT_TRANSLATE_NOOP3( GenreContext, "News", "txt_genre_europe_news" ) } |
|
177 ,{ GenreEurope::RdsCurrentAffairs, QT_TRANSLATE_NOOP3( GenreContext, "Current affairs", "txt_genre_europe_current_affairs" ) } |
|
178 ,{ GenreEurope::RdsInformation, QT_TRANSLATE_NOOP3( GenreContext, "Information", "txt_genre_europe_information" ) } |
|
179 ,{ GenreEurope::RdsSport, QT_TRANSLATE_NOOP3( GenreContext, "Sport", "txt_genre_europe_sport" ) } |
|
180 ,{ GenreEurope::RdsEducation, QT_TRANSLATE_NOOP3( GenreContext, "Education", "txt_genre_europe_education" ) } |
|
181 ,{ GenreEurope::RdsDrama, QT_TRANSLATE_NOOP3( GenreContext, "Drama", "txt_genre_europe_drama" ) } |
|
182 ,{ GenreEurope::RdsCulture, QT_TRANSLATE_NOOP3( GenreContext, "Culture", "txt_genre_europe_culture" ) } |
|
183 ,{ GenreEurope::RdsScience, QT_TRANSLATE_NOOP3( GenreContext, "Science", "txt_genre_europe_science" ) } |
|
184 ,{ GenreEurope::RdsVariedSpeech, QT_TRANSLATE_NOOP3( GenreContext, "Varied speech", "txt_genre_europe_varied_speech" ) } |
|
185 ,{ GenreEurope::RdsPopMusic, QT_TRANSLATE_NOOP3( GenreContext, "Pop music", "txt_genre_europe_pop_music" ) } |
|
186 ,{ GenreEurope::RdsRockMusic, QT_TRANSLATE_NOOP3( GenreContext, "Rock music", "txt_genre_europe_rock_music" ) } |
|
187 ,{ GenreEurope::RdsEasyListening, QT_TRANSLATE_NOOP3( GenreContext, "Easy listening", "txt_genre_europe_easy_listening" ) } |
|
188 ,{ GenreEurope::RdsLightClassical, QT_TRANSLATE_NOOP3( GenreContext, "Light classical", "txt_genre_europe_light_classical" ) } |
|
189 ,{ GenreEurope::RdsSeriousClassical, QT_TRANSLATE_NOOP3( GenreContext, "Serious classical", "txt_genre_europe_serious_classical" ) } |
|
190 ,{ GenreEurope::RdsOtherMusic, QT_TRANSLATE_NOOP3( GenreContext, "Other music", "txt_genre_europe_other_music" ) } |
|
191 ,{ GenreEurope::RdsWeather, QT_TRANSLATE_NOOP3( GenreContext, "Weather", "txt_genre_europe_weather" ) } |
|
192 ,{ GenreEurope::RdsFinance, QT_TRANSLATE_NOOP3( GenreContext, "Finance", "txt_genre_europe_finance" ) } |
|
193 ,{ GenreEurope::RdsChildrensProgrammes, QT_TRANSLATE_NOOP3( GenreContext, "Childrens programmes", "txt_genre_europe_childrens_programmes" ) } |
|
194 ,{ GenreEurope::RdsSocialAffairs, QT_TRANSLATE_NOOP3( GenreContext, "Social affairs", "txt_genre_europe_social_affairs" ) } |
|
195 ,{ GenreEurope::RdsReligion, QT_TRANSLATE_NOOP3( GenreContext, "Religion", "txt_genre_europe_religion" ) } |
|
196 ,{ GenreEurope::RdsPhoneIn, QT_TRANSLATE_NOOP3( GenreContext, "Phone in", "txt_genre_europe_phone_in" ) } |
|
197 ,{ GenreEurope::RdsTravel, QT_TRANSLATE_NOOP3( GenreContext, "Travel", "txt_genre_europe_travel" ) } |
|
198 ,{ GenreEurope::RdsLeisure, QT_TRANSLATE_NOOP3( GenreContext, "Leisure", "txt_genre_europe_leisure" ) } |
|
199 ,{ GenreEurope::RdsJazzMusic, QT_TRANSLATE_NOOP3( GenreContext, "Jazz music", "txt_genre_europe_jazz_music" ) } |
|
200 ,{ GenreEurope::RdsCountryMusic, QT_TRANSLATE_NOOP3( GenreContext, "Country music", "txt_genre_europe_country_music" ) } |
|
201 ,{ GenreEurope::RdsNationalMusic, QT_TRANSLATE_NOOP3( GenreContext, "National music", "txt_genre_europe_national_music" ) } |
|
202 ,{ GenreEurope::RdsOldiesMusic, QT_TRANSLATE_NOOP3( GenreContext, "Oldies music", "txt_genre_europe_oldies_music" ) } |
|
203 ,{ GenreEurope::RdsFolkMusic, QT_TRANSLATE_NOOP3( GenreContext, "Folk music", "txt_genre_europe_folk_music" ) } |
|
204 ,{ GenreEurope::RdsDocumentary, QT_TRANSLATE_NOOP3( GenreContext, "Documentary", "txt_genre_europe_documentary" ) } |
|
205 ,{ GenreEurope::RdsAlarmTest, QT_TRANSLATE_NOOP3( GenreContext, "Alarm test", "txt_genre_europe_alarm_test" ) } |
|
206 ,{ GenreEurope::RdsAlarm, QT_TRANSLATE_NOOP3( GenreContext, "Alarm", "txt_genre_europe_alarm" ) } |
|
207 }; |
|
208 const int EuropeanGenresCount = sizeof( EuropeanGenres ) / sizeof ( EuropeanGenres[0] ); |
|
209 |
|
210 const GenreStruct AmericanGenres[] = |
|
211 { |
|
212 { GenreAmerica::RbdsNone, QT_TRANSLATE_NOOP3( GenreContext, "None", "txt_genre_america_none" ) } |
|
213 ,{ GenreAmerica::RbdsNews, QT_TRANSLATE_NOOP3( GenreContext, "News", "txt_genre_america_news" ) } |
|
214 ,{ GenreAmerica::RbdsInformation, QT_TRANSLATE_NOOP3( GenreContext, "Information", "txt_genre_america_information" ) } |
|
215 ,{ GenreAmerica::RbdsSports, QT_TRANSLATE_NOOP3( GenreContext, "Sports", "txt_genre_america_sports" ) } |
|
216 ,{ GenreAmerica::RbdsRock, QT_TRANSLATE_NOOP3( GenreContext, "Rock", "txt_genre_america_rock" ) } |
|
217 ,{ GenreAmerica::RbdsClassicRock, QT_TRANSLATE_NOOP3( GenreContext, "Classic rock", "txt_genre_america_classic_rock" ) } |
|
218 ,{ GenreAmerica::RbdsAdultHits, QT_TRANSLATE_NOOP3( GenreContext, "Adult hits", "txt_genre_america_adult_hits" ) } |
|
219 ,{ GenreAmerica::RbdsSoftRock, QT_TRANSLATE_NOOP3( GenreContext, "Soft rock", "txt_genre_america_soft_rock" ) } |
|
220 ,{ GenreAmerica::RbdsTop40, QT_TRANSLATE_NOOP3( GenreContext, "Top 40", "txt_genre_america_top_40" ) } |
|
221 ,{ GenreAmerica::RbdsCountry, QT_TRANSLATE_NOOP3( GenreContext, "Country", "txt_genre_america_country" ) } |
|
222 ,{ GenreAmerica::RbdsOldies, QT_TRANSLATE_NOOP3( GenreContext, "Oldies", "txt_genre_america_oldies" ) } |
|
223 ,{ GenreAmerica::RbdsSoft, QT_TRANSLATE_NOOP3( GenreContext, "Soft", "txt_genre_america_soft" ) } |
|
224 ,{ GenreAmerica::RbdsNostalgia, QT_TRANSLATE_NOOP3( GenreContext, "Nostalgia", "txt_genre_america_nostalgia" ) } |
|
225 ,{ GenreAmerica::RbdsJazz, QT_TRANSLATE_NOOP3( GenreContext, "Jazz", "txt_genre_america_jazz" ) } |
|
226 ,{ GenreAmerica::RbdsClassical, QT_TRANSLATE_NOOP3( GenreContext, "Classical", "txt_genre_america_classical" ) } |
|
227 ,{ GenreAmerica::RbdsRhythmAndBlues, QT_TRANSLATE_NOOP3( GenreContext, "Rhythm and blues", "txt_genre_america_rhythm_and_blues" ) } |
|
228 ,{ GenreAmerica::RbdsSoftRhythmAndBlues, QT_TRANSLATE_NOOP3( GenreContext, "Soft rhythm and blues", "txt_genre_america_soft_rhythm_and_blues" ) } |
|
229 ,{ GenreAmerica::RbdsLanguage, QT_TRANSLATE_NOOP3( GenreContext, "Language", "txt_genre_america_language" ) } |
|
230 ,{ GenreAmerica::RbdsReligiousMusic, QT_TRANSLATE_NOOP3( GenreContext, "Religuous music", "txt_genre_america_religuous_music" ) } |
|
231 ,{ GenreAmerica::RbdsReligiousTalk, QT_TRANSLATE_NOOP3( GenreContext, "Religuous talk", "txt_genre_america_religuous_talk" ) } |
|
232 ,{ GenreAmerica::RbdsPersonality, QT_TRANSLATE_NOOP3( GenreContext, "Personality", "txt_genre_america_personality" ) } |
|
233 ,{ GenreAmerica::RbdsPublic, QT_TRANSLATE_NOOP3( GenreContext, "Public", "txt_genre_america_public" ) } |
|
234 ,{ GenreAmerica::RbdsCollege, QT_TRANSLATE_NOOP3( GenreContext, "College", "txt_genre_america_college" ) } |
|
235 ,{ GenreAmerica::RbdsUnassigned1, QT_TRANSLATE_NOOP3( GenreContext, "Unassigned 1", "txt_genre_america_unassigned_1" ) } |
|
236 ,{ GenreAmerica::RbdsUnassigned2, QT_TRANSLATE_NOOP3( GenreContext, "Unassigned 2", "txt_genre_america_unassigned_2" ) } |
|
237 ,{ GenreAmerica::RbdsUnassigned3, QT_TRANSLATE_NOOP3( GenreContext, "Unassigned 3", "txt_genre_america_unassigned_3" ) } |
|
238 ,{ GenreAmerica::RbdsUnassigned4, QT_TRANSLATE_NOOP3( GenreContext, "Unassigned 4", "txt_genre_america_unassigned_4" ) } |
|
239 ,{ GenreAmerica::RbdsUnassigned5, QT_TRANSLATE_NOOP3( GenreContext, "Unassigned 5", "txt_genre_america_unassigned_5" ) } |
|
240 ,{ GenreAmerica::RbdsWeather, QT_TRANSLATE_NOOP3( GenreContext, "Weather", "txt_genre_america_weather" ) } |
|
241 ,{ GenreAmerica::RbdsEmergencyTest, QT_TRANSLATE_NOOP3( GenreContext, "Emergency test", "txt_genre_america_emergency_test" ) } |
|
242 ,{ GenreAmerica::RbdsEmergency, QT_TRANSLATE_NOOP3( GenreContext, "Emergency", "txt_genre_america_emergency" ) } |
|
243 }; |
|
244 const int AmericanGenresCount = sizeof( AmericanGenres ) / sizeof ( AmericanGenres[0] ); |
|
245 |
|
246 #endif // RADIO_GLOBAL_H_ |
|