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 RADIOINTERNALPSKEYS_H |
|
19 #define RADIOINTERNALPSKEYS_H |
|
20 |
|
21 #include <e32cmn.h> |
|
22 |
|
23 #include "radiouid.hrh" |
|
24 |
|
25 /**< The UID of the category we use. Must be the same as Visual Radio's UID3 ( SID ). */ |
|
26 //TODO: Change |
|
27 const TUid KRadioPSUid = {0x101FF976}; |
|
28 |
|
29 /////////////////////////////////////////////////////////////////////////////////////////////////////// |
|
30 /// /// |
|
31 /// Data properties. These properties are published by Visual Radio and used by other applications. /// |
|
32 /// /// |
|
33 /////////////////////////////////////////////////////////////////////////////////////////////////////// |
|
34 |
|
35 /** |
|
36 * Currently active channel's ID. |
|
37 * Value <code>KErrNone</code> means that no preset channel is active. |
|
38 * Type <code>RProperty::EInt</code>. |
|
39 */ |
|
40 const TUint32 KRadioPSDataChannel = 0x00000000; |
|
41 |
|
42 /** |
|
43 * Currently active frequency. |
|
44 * Frequency unit is in kHz. |
|
45 * Type <code>RProperty::EInt</code>. |
|
46 */ |
|
47 const TUint32 KRadioPSDataFrequency = 0x00000001; |
|
48 |
|
49 /** |
|
50 * Current power state of the radio. |
|
51 * Type <code>RProperty::EInt</code>. |
|
52 * @see TRadioRadioPowerState. |
|
53 */ |
|
54 const TUint32 KRadioPSDataRadioPowerState = 0x00000002; |
|
55 |
|
56 /** |
|
57 * Power state of the radio. |
|
58 */ |
|
59 enum TRadioPSRadioPowerState |
|
60 { |
|
61 ERadioPSRadioPowerStateUninitialized, /**< The key is not yet initialized. */ |
|
62 ERadioPSRadioPowerOn, /**< Radio power on. */ |
|
63 ERadioPSRadioPowerOff /**< Radio power off. */ |
|
64 }; |
|
65 |
|
66 /** |
|
67 * Current volume level. |
|
68 * Scale is from 1-10. |
|
69 * Type <code>RProperty::EInt</code>. |
|
70 */ |
|
71 const TUint32 KRadioPSDataVolume = 0x00000003; |
|
72 |
|
73 /** |
|
74 * Changing of this value means that channel |
|
75 * data of specified channel ID has changed. |
|
76 * The value remains indicating the last changed channel ID. |
|
77 * Value <code>KErrNone</code> means that no channel data has been changed yet. |
|
78 * Type <code>RProperty::EInt</code>. |
|
79 */ |
|
80 const TUint32 KRadioPSDataChannelDataChanged = 0x00000004; |
|
81 |
|
82 /** |
|
83 * Removed. Do not use. |
|
84 */ |
|
85 const TUint32 KRadioPSDataRemoved = 0x00000005; |
|
86 |
|
87 /** |
|
88 * The current tuning state. |
|
89 * Type <code>RProperty::EInt</code>. |
|
90 * @see TRadioPSTuningState. |
|
91 */ |
|
92 const TUint32 KRadioPSDataTuningState = 0x00000006; |
|
93 |
|
94 /** |
|
95 * Possible tuning states. |
|
96 */ |
|
97 enum TRadioPSTuningState |
|
98 { |
|
99 ERadioPSTuningUninitialized, /**< Currently not tuning. */ |
|
100 ERadioPSTuningStarted, /**< Tuning has been started an lasted less than one second. */ |
|
101 ERadioPSTuningContinues /**< Tuning has taken more than one second. */ |
|
102 }; |
|
103 |
|
104 /** |
|
105 * Current mute state of radio. |
|
106 * Type <code>RProperty::EInt</code>. |
|
107 * @see TRadioPSRadioMuteState. |
|
108 */ |
|
109 const TUint32 KRadioPSDataRadioMuteState = 0x00000007; |
|
110 |
|
111 /** |
|
112 * Mute state of radio. |
|
113 */ |
|
114 enum TRadioPSRadioMuteState |
|
115 { |
|
116 ERadioPSMuteStateUninitialized, /**< The key has not yet been initialized. */ |
|
117 ERadioPSMuteStateOn, /**< Radio mute state is on. */ |
|
118 ERadioPSMuteStateOff /**< Radio mute state is off. */ |
|
119 }; |
|
120 |
|
121 /** |
|
122 * Indicates if Visual Radio is running or closing. |
|
123 * Type <code>RProperty::EInt</code>. |
|
124 * @see TRadioPSApplicationRunningState. |
|
125 */ |
|
126 const TUint32 KRadioPSDataApplicationRunning = 0x00000008; |
|
127 |
|
128 /** |
|
129 * Visual Radio application running states. |
|
130 */ |
|
131 enum TRadioPSApplicationRunningState |
|
132 { |
|
133 ERadioPSApplicationUninitialized, /**< Visual Radio application's state is not yet initialized. */ |
|
134 ERadioPSApplicationRunning, /**< Visual Radio application is running. */ |
|
135 ERadioPSApplicationClosing /**< Visual Radio application is closing. */ |
|
136 }; |
|
137 |
|
138 /** |
|
139 * Indicates the current headset connectivity status. |
|
140 * Type <code>RProperty::EInt</code>. |
|
141 * @see TRadioHeadsetStatus |
|
142 */ |
|
143 const TUint32 KRadioPSDataHeadsetStatus = 0x00000009; |
|
144 |
|
145 /** |
|
146 * Current headset status. |
|
147 */ |
|
148 enum TRadioPSHeadsetStatus |
|
149 { |
|
150 ERadioPSHeadsetUninitialized, /**< The headset status is uninitialized. */ |
|
151 ERadioPSHeadsetDisconnected, /**< The headset is disconnected. */ |
|
152 ERadioPSHeadsetConnected /**< The headset is connected. */ |
|
153 }; |
|
154 |
|
155 /** |
|
156 * The current frequency decimal count. |
|
157 * Type <code>RProperty::EInt</code>. |
|
158 * @see TRadioFrequencyDecimalCount. |
|
159 */ |
|
160 const TUint32 KRadioPSDataFrequencyDecimalCount = 0x00000010; |
|
161 |
|
162 /** |
|
163 * The current frequency decimal count. |
|
164 */ |
|
165 enum TRadioPSFrequencyDecimalCount |
|
166 { |
|
167 ERadioPSFrequencyDecimalCountUninitialized, /**< Frequency decimal count has not yet been initialized. */ |
|
168 ERadioPSFrequencyOneDecimal, /**< Frequency accuracy is one decimal. */ |
|
169 ERadioPSFrequencyTwoDecimals, /**< Frequency accuracy is two decimals. */ |
|
170 ERadioPSFrequencyThreeDecimals /**< Frequency accuracy is three decimals. */ |
|
171 }; |
|
172 |
|
173 /** |
|
174 * Removed. Do not use. |
|
175 */ |
|
176 const TUint32 KRadioPSRemoved1 = 0x00000014; |
|
177 |
|
178 /** |
|
179 * Flag to indicate if loudspeaker is in use |
|
180 */ |
|
181 const TUint32 KRadioPSDataLoudspeakerStatus = 0x00000015; |
|
182 /** |
|
183 * Current speaker status. |
|
184 */ |
|
185 enum TRadioPSLoudspeakerStatus |
|
186 { |
|
187 ERadioPSLoudspeakerUninitialized, /**< The speaker status is uninitialized. */ |
|
188 ERadioPSLoudspeakerNotInUse, /**< The speaker is not in use. */ |
|
189 ERadioPSLoudpeakerInUse /**< The speaker is in use. */ |
|
190 }; |
|
191 |
|
192 /** |
|
193 * Rds Program Service information, property type is text. |
|
194 */ |
|
195 const TUint32 KRadioPSDataRdsProgramService = 0x00000016; |
|
196 |
|
197 /** |
|
198 * Rds Radio Text information. |
|
199 * Type <code>RProperty::EText</code>. |
|
200 */ |
|
201 const TUint32 KRadioPSDataRdsRadioText = 0x00000017; |
|
202 |
|
203 /** |
|
204 * Name of the current channel. |
|
205 * Type <code>RProperty::EText</code>. |
|
206 */ |
|
207 const TUint32 KRadioPSDataChannelName = 0x00000018; |
|
208 |
|
209 /** |
|
210 * The amount of presets in active preset list. |
|
211 * In situations where the amount is undefined, value KErrNotFound |
|
212 * is used. |
|
213 * Type <code>RProperty::EInt</code>. |
|
214 */ |
|
215 const TUint32 KRadioPSDataActivePresetListCount = 0x00000019; |
|
216 |
|
217 /** |
|
218 * The active focus in active preset list. |
|
219 * In situations where the amount is undefined, value KErrNotFound |
|
220 * is used. |
|
221 * Type <code>RProperty::EInt</code>. |
|
222 */ |
|
223 const TUint32 KRadioPSDataActivePresetListFocus = 0x00000020; |
|
224 |
|
225 /** |
|
226 * Current antenna state of the radio. |
|
227 * Type <code>RProperty::EInt</code>. |
|
228 * @see TRadioRadioAntennaState. |
|
229 */ |
|
230 const TUint32 KRadioPSDataRadioAntennaState = 0x00000021; |
|
231 |
|
232 /** |
|
233 * Power state of the radio. |
|
234 */ |
|
235 enum TRadioPSRadioAntennaState |
|
236 { |
|
237 ERadioPSRadioAntennaStateUninitialized, /**< The key is not yet initialized. */ |
|
238 ERadioPSRadioAntennaAttached, /**< Antenna attached. */ |
|
239 ERadioPSRadioAntennaDetached /**< Antenna detached. */ |
|
240 }; |
|
241 |
|
242 ////////////////////////////////////////////////////////////////////////////////////////////////////////// |
|
243 /// /// |
|
244 /// Control properties. These properties are published by other applications and used by Visual Radio. /// |
|
245 /// /// |
|
246 ////////////////////////////////////////////////////////////////////////////////////////////////////////// |
|
247 |
|
248 /** |
|
249 * Steps up or down a channel in channel list. |
|
250 * Type <code>RProperty::EInt</code>. |
|
251 * @see TRadioPSStepToChannel. |
|
252 */ |
|
253 const TUint32 KRadioPSControlStepToChannel = 0x00001000; |
|
254 |
|
255 /** |
|
256 * Step direction of channel step. |
|
257 */ |
|
258 enum TRadioPSStepToChannel |
|
259 { |
|
260 ERadioPSStepToChannelUninitialized, /**< Value of the key has not yet been initialized. */ |
|
261 ERadioPSStepToChannelUp, /**< Step to next channel up. */ |
|
262 ERadioPSStepToChannelDown /**< Step to next channel down. */ |
|
263 }; |
|
264 |
|
265 /** |
|
266 * Switches to the specified channel ID. |
|
267 * Visual Radio ignores channel IDs that are out of scope. |
|
268 * Type <code>RProperty::EInt</code>. |
|
269 */ |
|
270 const TUint32 KRadioPSControlSetChannel = 0x00001001; |
|
271 |
|
272 /** |
|
273 * Seeks to next active frequency up or down. |
|
274 * Type <code>RProperty::EInt</code>. |
|
275 * @see TRadioPSSeek. |
|
276 */ |
|
277 const TUint32 KRadioPSControlSeek = 0x00001002; |
|
278 |
|
279 /** |
|
280 * Seek direction. |
|
281 */ |
|
282 enum TRadioPSSeek |
|
283 { |
|
284 ERadioPSSeekUninitialized, /**< Value of the key has not yet been initialized. */ |
|
285 ERadioPSSeekUp, /**< Seek up. */ |
|
286 ERadioPSSeekDown /**< Seek down. */ |
|
287 }; |
|
288 |
|
289 /** |
|
290 * Steps up or down frequency, using the frequency step that is defined in radio. |
|
291 * Type <code>RProperty::EInt</code>. |
|
292 * @see TRadioPSStepToFrequency. |
|
293 */ |
|
294 const TUint32 KRadioPSControlStepToFrequency = 0x00001003; |
|
295 |
|
296 /** |
|
297 * Frequency step direction. |
|
298 */ |
|
299 enum TRadioPSStepToFrequency |
|
300 { |
|
301 ERadioPSStepToFrequencyUninitialized, /**< The key has not yet been initialized. */ |
|
302 ERadioPSStepToFrequencyUp, /**< Step up a frequency. */ |
|
303 ERadioPSStepToFrequencyDown /**< Step down a frequency. */ |
|
304 }; |
|
305 |
|
306 /** |
|
307 * Switches to specified frequency. |
|
308 * Frequency unit is kHz. |
|
309 * Type <code>RProperty::EInt</code>. |
|
310 */ |
|
311 const TUint32 KRadioPSControlSetFrequency = 0x00001004; |
|
312 |
|
313 /** |
|
314 * Increases or decreases volume level. |
|
315 * Type <code>RProperty::EInt</code>. |
|
316 * @see TRadioPSAdjustVolume. |
|
317 */ |
|
318 const TUint32 KRadioPSControlAdjustVolume = 0x00001005; |
|
319 |
|
320 /** |
|
321 * Volume step direction. |
|
322 */ |
|
323 enum TRadioPSAdjustVolume |
|
324 { |
|
325 ERadioPSAdjustVolumeUninitialized = 0, /**< The key has not yet been initialized. */ |
|
326 ERadioPSIncreaseVolume, /**< Increase volume. */ |
|
327 ERadioPSDecreaseVolume /**< Decrease volume. */ |
|
328 }; |
|
329 |
|
330 /** |
|
331 * Sets mute state on or off. |
|
332 * Type <code>RProperty::EInt</code>. |
|
333 * @see TRadioPSRadioMuteState. |
|
334 */ |
|
335 const TUint32 KRadioPSControlSetRadioMuteState = 0x00001006; |
|
336 |
|
337 /** |
|
338 * Sets the output source |
|
339 * Type <code>RProperty::EInt</code>. |
|
340 * @see TRadioPSAudioOutput |
|
341 */ |
|
342 const TUint32 KRadioPSControlSetAudioOutput = 0x00001008; |
|
343 |
|
344 /** |
|
345 * Audio output target. |
|
346 */ |
|
347 enum TRadioPSAudioOutput |
|
348 { |
|
349 ERadioPSAudioOutputUninitialized = 0, /**< The key has not yet been initialized. */ |
|
350 ERadioPSAudioOutputHeadset, /**< Headset in use. */ |
|
351 ERadioPSAudioOutputSpeaker /**< Speaker in use. */ |
|
352 }; |
|
353 |
|
354 #endif // RADIOINTERNALPSKEYS_H |
|