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 #include <qnamespace.h> |
|
24 |
|
25 // Constants |
|
26 |
|
27 /** |
|
28 * Radio frequency multiplier |
|
29 */ |
|
30 const int FREQUENCY_MULTIPLIER = 1000000; |
|
31 |
|
32 /** |
|
33 * Desired amount of steps in the volume control in the UI |
|
34 */ |
|
35 const int MAXIMUM_VOLUME_LEVEL = 20; |
|
36 |
|
37 /** |
|
38 * Default volume level that is used when no previous setting exists |
|
39 */ |
|
40 const int DEFAULT_VOLUME_LEVEL = 4; |
|
41 |
|
42 /** |
|
43 * UIDs for checking the offline mode |
|
44 * Values copied from CoreApplicationUIsSDKCRKeys.h |
|
45 */ |
|
46 const long int CENREP_CORE_APPLICATION_UIS = 0x101F876C; |
|
47 const unsigned long int ID_NETWORK_CONNECTION_ALLOWED = 0x00000001; |
|
48 enum NetworkConnectionAllowed { NetworkNotAllowed = 0, NetworkAllowed }; |
|
49 |
|
50 /** |
|
51 * Roles used when interacting with the radio station model |
|
52 */ |
|
53 namespace RadioRole |
|
54 { |
|
55 enum Role |
|
56 { |
|
57 RadioStationRole = Qt::UserRole + 1, |
|
58 ToggleFavoriteRole, |
|
59 IsFavoriteRole |
|
60 }; |
|
61 } |
|
62 |
|
63 /** |
|
64 * Radio Text Plus tag ids |
|
65 */ |
|
66 namespace RtPlus |
|
67 { |
|
68 enum Tag |
|
69 { |
|
70 Dummy = 0, |
|
71 Title = 1, |
|
72 Artist = 4, |
|
73 Band = 9, |
|
74 Homepage = 39 |
|
75 }; |
|
76 } |
|
77 |
|
78 namespace GenreTarget |
|
79 { |
|
80 enum Target |
|
81 { |
|
82 Carousel, |
|
83 StationsList, |
|
84 HomeScreen |
|
85 }; |
|
86 } |
|
87 |
|
88 namespace Seek |
|
89 { |
|
90 enum Direction |
|
91 { |
|
92 Down, |
|
93 Up |
|
94 }; |
|
95 |
|
96 enum State |
|
97 { |
|
98 NotSeeking, |
|
99 SeekingUp, |
|
100 SeekingDown |
|
101 }; |
|
102 } |
|
103 |
|
104 namespace Scan |
|
105 { |
|
106 enum Status |
|
107 { |
|
108 NotScanning, |
|
109 ScanningInMainView, |
|
110 ScanningInStationsView |
|
111 }; |
|
112 } |
|
113 |
|
114 namespace StationSkip |
|
115 { |
|
116 enum Mode |
|
117 { |
|
118 Previous, |
|
119 Next, |
|
120 PreviousFavorite, |
|
121 NextFavorite |
|
122 }; |
|
123 } |
|
124 |
|
125 namespace TuneReason |
|
126 { |
|
127 enum Reason |
|
128 { |
|
129 Unspecified, |
|
130 FrequencyStrip, |
|
131 ManualSeekUpdate, |
|
132 ManualSeekTune, |
|
133 StationCarousel, |
|
134 StationsList, |
|
135 Skip, |
|
136 Seek, |
|
137 StationScanInitialization, |
|
138 StationScan, |
|
139 StationScanFinalize, |
|
140 StationScanNoStationsFound, |
|
141 SkipFromEngine, |
|
142 SkipFromWidget |
|
143 }; |
|
144 } |
|
145 |
|
146 namespace RadioRegion |
|
147 { |
|
148 enum Region |
|
149 { |
|
150 None = -1, |
|
151 Default, |
|
152 Japan, |
|
153 America, |
|
154 Poland |
|
155 }; |
|
156 } |
|
157 |
|
158 namespace GenreEurope |
|
159 { |
|
160 enum Europe |
|
161 { |
|
162 RdsNone, |
|
163 RdsNews, |
|
164 RdsCurrentAffairs, |
|
165 RdsInformation, |
|
166 RdsSport, |
|
167 RdsEducation, |
|
168 RdsDrama, |
|
169 RdsCulture, |
|
170 RdsScience, |
|
171 RdsVariedSpeech, |
|
172 RdsPopMusic, |
|
173 RdsRockMusic, |
|
174 RdsEasyListening, |
|
175 RdsLightClassical, |
|
176 RdsSeriousClassical, |
|
177 RdsOtherMusic, |
|
178 RdsWeather, |
|
179 RdsFinance, |
|
180 RdsChildrensProgrammes, |
|
181 RdsSocialAffairs, |
|
182 RdsReligion, |
|
183 RdsPhoneIn, |
|
184 RdsTravel, |
|
185 RdsLeisure, |
|
186 RdsJazzMusic, |
|
187 RdsCountryMusic, |
|
188 RdsNationalMusic, |
|
189 RdsOldiesMusic, |
|
190 RdsFolkMusic, |
|
191 RdsDocumentary, |
|
192 RdsAlarmTest, |
|
193 RdsAlarm |
|
194 }; |
|
195 } |
|
196 |
|
197 namespace GenreAmerica |
|
198 { |
|
199 enum America |
|
200 { |
|
201 RbdsNone, |
|
202 RbdsNews, |
|
203 RbdsInformation, |
|
204 RbdsSports, |
|
205 RbdsTalk, |
|
206 RbdsRock, |
|
207 RbdsClassicRock, |
|
208 RbdsAdultHits, |
|
209 RbdsSoftRock, |
|
210 RbdsTop40, |
|
211 RbdsCountry, |
|
212 RbdsOldies, |
|
213 RbdsSoft, |
|
214 RbdsNostalgia, |
|
215 RbdsJazz, |
|
216 RbdsClassical, |
|
217 RbdsRhythmAndBlues, |
|
218 RbdsSoftRhythmAndBlues, |
|
219 RbdsLanguage, |
|
220 RbdsReligiousMusic, |
|
221 RbdsReligiousTalk, |
|
222 RbdsPersonality, |
|
223 RbdsPublic, |
|
224 RbdsCollege, |
|
225 RbdsUnassigned1, |
|
226 RbdsUnassigned2, |
|
227 RbdsUnassigned3, |
|
228 RbdsUnassigned4, |
|
229 RbdsUnassigned5, |
|
230 RbdsWeather, |
|
231 RbdsEmergencyTest, |
|
232 RbdsEmergency |
|
233 }; |
|
234 } |
|
235 |
|
236 #endif // RADIO_GLOBAL_H_ |
|