equal
deleted
inserted
replaced
19 #include <RadioFmTunerUtility.h> |
19 #include <RadioFmTunerUtility.h> |
20 #include <RadioPlayerUtility.h> |
20 #include <RadioPlayerUtility.h> |
21 #include <RadioRdsUtility.h> |
21 #include <RadioRdsUtility.h> |
22 #include "RadioUtilityBody.h" |
22 #include "RadioUtilityBody.h" |
23 #include "RadioServerData.h" |
23 #include "RadioServerData.h" |
|
24 #include "trace.h" |
24 |
25 |
25 // ======== MEMBER FUNCTIONS ======== |
26 // ======== MEMBER FUNCTIONS ======== |
26 |
27 |
27 // ----------------------------------------------------------------------------- |
28 // ----------------------------------------------------------------------------- |
28 // CRadioUtility::CBody::NewL |
29 // CRadioUtility::CBody::NewL |
30 // ----------------------------------------------------------------------------- |
31 // ----------------------------------------------------------------------------- |
31 // |
32 // |
32 CRadioUtility::CBody* CRadioUtility::CBody::NewL( |
33 CRadioUtility::CBody* CRadioUtility::CBody::NewL( |
33 TBool aPrimaryClient ) |
34 TBool aPrimaryClient ) |
34 { |
35 { |
|
36 FUNC_LOG; |
35 CRadioUtility::CBody* self = new (ELeave) CRadioUtility::CBody(); |
37 CRadioUtility::CBody* self = new (ELeave) CRadioUtility::CBody(); |
36 CleanupStack::PushL(self); |
38 CleanupStack::PushL(self); |
37 self->ConstructL(aPrimaryClient); |
39 self->ConstructL(aPrimaryClient); |
38 CleanupStack::Pop(); |
40 CleanupStack::Pop(self); |
39 return self; |
41 return self; |
40 } |
42 } |
41 |
43 |
42 // ----------------------------------------------------------------------------- |
44 // ----------------------------------------------------------------------------- |
43 // CRadioUtility::CBody::ConstructL |
45 // CRadioUtility::CBody::ConstructL |
45 // ----------------------------------------------------------------------------- |
47 // ----------------------------------------------------------------------------- |
46 // |
48 // |
47 void CRadioUtility::CBody::ConstructL( |
49 void CRadioUtility::CBody::ConstructL( |
48 TBool aPrimaryClient ) |
50 TBool aPrimaryClient ) |
49 { |
51 { |
|
52 FUNC_LOG; |
|
53 INFO_1("Size of RRadioSession: %i", sizeof(RRadioSession) ); |
50 iRadioSession = new (ELeave) RRadioSession(); |
54 iRadioSession = new (ELeave) RRadioSession(); |
51 User::LeaveIfError(iRadioSession->Connect(*this, aPrimaryClient)); |
55 User::LeaveIfError(iRadioSession->Connect(*this, aPrimaryClient)); |
52 } |
56 } |
53 |
57 |
54 // ----------------------------------------------------------------------------- |
58 // ----------------------------------------------------------------------------- |
60 : iRadioSession(NULL), |
64 : iRadioSession(NULL), |
61 iFmTunerUtility(NULL), |
65 iFmTunerUtility(NULL), |
62 iPlayerUtility(NULL), |
66 iPlayerUtility(NULL), |
63 iRdsUtility(NULL) |
67 iRdsUtility(NULL) |
64 { |
68 { |
|
69 FUNC_LOG; |
65 } |
70 } |
66 |
71 |
67 // ----------------------------------------------------------------------------- |
72 // ----------------------------------------------------------------------------- |
68 // Destructor. |
73 // Destructor. |
69 // ----------------------------------------------------------------------------- |
74 // ----------------------------------------------------------------------------- |
70 // |
75 // |
71 CRadioUtility::CBody::~CBody() |
76 CRadioUtility::CBody::~CBody() |
72 { |
77 { |
73 #ifdef _DEBUG |
78 FUNC_LOG; |
74 RDebug::Print(_L("CRadioUtility::CBody::~CBody")); |
|
75 #endif |
|
76 delete iFmTunerUtility; |
79 delete iFmTunerUtility; |
77 delete iPlayerUtility; |
80 delete iPlayerUtility; |
78 delete iRdsUtility; |
81 delete iRdsUtility; |
79 if ( iRadioSession ) |
82 if ( iRadioSession ) |
80 { |
83 { |
89 // ----------------------------------------------------------------------------- |
92 // ----------------------------------------------------------------------------- |
90 // |
93 // |
91 CRadioFmTunerUtility& CRadioUtility::CBody::RadioFmTunerUtilityL( |
94 CRadioFmTunerUtility& CRadioUtility::CBody::RadioFmTunerUtilityL( |
92 MRadioFmTunerObserver& aObserver) |
95 MRadioFmTunerObserver& aObserver) |
93 { |
96 { |
94 #ifdef _DEBUG |
97 FUNC_LOG; |
95 RDebug::Print(_L("CRadioUtility::CBody::RadioFmTunerUtilityL")); |
|
96 #endif |
|
97 |
98 |
98 if ( !iFmTunerUtility ) |
99 if ( !iFmTunerUtility ) |
99 { |
100 { |
100 iFmTunerUtility = CRadioFmTunerUtility::NewL( *iRadioSession, aObserver ); |
101 iFmTunerUtility = CRadioFmTunerUtility::NewL( *iRadioSession, aObserver ); |
101 iTunerObserver = &aObserver; |
102 iTunerObserver = &aObserver; |
114 // ----------------------------------------------------------------------------- |
115 // ----------------------------------------------------------------------------- |
115 // |
116 // |
116 CRadioPlayerUtility& CRadioUtility::CBody::RadioPlayerUtilityL( |
117 CRadioPlayerUtility& CRadioUtility::CBody::RadioPlayerUtilityL( |
117 MRadioPlayerObserver& aObserver) |
118 MRadioPlayerObserver& aObserver) |
118 { |
119 { |
119 #ifdef _DEBUG |
120 FUNC_LOG; |
120 RDebug::Print(_L("CRadioUtility::CBody::RadioPlayerUtilityL")); |
|
121 #endif |
|
122 |
121 |
123 if ( !iPlayerUtility ) |
122 if ( !iPlayerUtility ) |
124 { |
123 { |
125 iPlayerUtility = CRadioPlayerUtility::NewL( *iRadioSession, aObserver ); |
124 iPlayerUtility = CRadioPlayerUtility::NewL( *iRadioSession, aObserver ); |
126 iPlayerObserver = &aObserver; |
125 iPlayerObserver = &aObserver; |
139 // ----------------------------------------------------------------------------- |
138 // ----------------------------------------------------------------------------- |
140 // |
139 // |
141 CRadioRdsUtility& CRadioUtility::CBody::RadioRdsUtilityL( |
140 CRadioRdsUtility& CRadioUtility::CBody::RadioRdsUtilityL( |
142 MRadioRdsObserver& aObserver) |
141 MRadioRdsObserver& aObserver) |
143 { |
142 { |
144 #ifdef _DEBUG |
143 FUNC_LOG; |
145 RDebug::Print(_L("CRadioUtility::CBody::RadioRdsUtility")); |
|
146 #endif |
|
147 |
144 |
148 if ( !iRdsUtility ) |
145 if ( !iRdsUtility ) |
149 { |
146 { |
150 iRdsUtility = CRadioRdsUtility::NewL( *iRadioSession, aObserver ); |
147 iRdsUtility = CRadioRdsUtility::NewL( *iRadioSession, aObserver ); |
151 iRdsObserver = &aObserver; |
148 iRdsObserver = &aObserver; |
165 // --------------------------------------------------------------------------- |
162 // --------------------------------------------------------------------------- |
166 // |
163 // |
167 void CRadioUtility::CBody::RequestTunerControlComplete( |
164 void CRadioUtility::CBody::RequestTunerControlComplete( |
168 TRadioServerError aError ) |
165 TRadioServerError aError ) |
169 { |
166 { |
170 #ifdef _DEBUG |
167 FUNC_LOG; |
171 RDebug::Print(_L("CRadioUtility::CBody::RequestTunerControlComplete")); |
|
172 #endif |
|
173 if ( iTunerObserver ) |
168 if ( iTunerObserver ) |
174 { |
169 { |
175 iTunerObserver->MrftoRequestTunerControlComplete( aError ); |
170 iTunerObserver->MrftoRequestTunerControlComplete( aError ); |
176 } |
171 } |
177 } |
172 } |
182 // --------------------------------------------------------------------------- |
177 // --------------------------------------------------------------------------- |
183 // |
178 // |
184 void CRadioUtility::CBody::SetFrequencyRangeComplete( |
179 void CRadioUtility::CBody::SetFrequencyRangeComplete( |
185 TRadioServerError aError ) |
180 TRadioServerError aError ) |
186 { |
181 { |
187 #ifdef _DEBUG |
182 FUNC_LOG; |
188 RDebug::Print(_L("CRadioUtility::CBody::SetFrequencyRangeComplete")); |
|
189 #endif |
|
190 if ( iTunerObserver ) |
183 if ( iTunerObserver ) |
191 { |
184 { |
192 iTunerObserver->MrftoSetFrequencyRangeComplete( aError ); |
185 iTunerObserver->MrftoSetFrequencyRangeComplete( aError ); |
193 } |
186 } |
194 } |
187 } |
199 // --------------------------------------------------------------------------- |
192 // --------------------------------------------------------------------------- |
200 // |
193 // |
201 void CRadioUtility::CBody::SetFrequencyComplete( |
194 void CRadioUtility::CBody::SetFrequencyComplete( |
202 TRadioServerError aError ) |
195 TRadioServerError aError ) |
203 { |
196 { |
204 #ifdef _DEBUG |
197 FUNC_LOG; |
205 RDebug::Print(_L("CRadioUtility::CBody::SetFrequencyComplete")); |
|
206 #endif |
|
207 if ( iTunerObserver ) |
198 if ( iTunerObserver ) |
208 { |
199 { |
209 iTunerObserver->MrftoSetFrequencyComplete( aError ); |
200 iTunerObserver->MrftoSetFrequencyComplete( aError ); |
210 } |
201 } |
211 } |
202 } |
217 // |
208 // |
218 void CRadioUtility::CBody::StationSeekComplete( |
209 void CRadioUtility::CBody::StationSeekComplete( |
219 TRadioServerError aError, |
210 TRadioServerError aError, |
220 TInt aFrequency ) |
211 TInt aFrequency ) |
221 { |
212 { |
222 #ifdef _DEBUG |
213 FUNC_LOG; |
223 RDebug::Print(_L("CRadioUtility::CBody::StationSeekComplete")); |
|
224 #endif |
|
225 if ( iTunerObserver ) |
214 if ( iTunerObserver ) |
226 { |
215 { |
227 iTunerObserver->MrftoStationSeekComplete( aError, aFrequency ); |
216 iTunerObserver->MrftoStationSeekComplete( aError, aFrequency ); |
228 } |
217 } |
229 } |
218 } |
234 // --------------------------------------------------------------------------- |
223 // --------------------------------------------------------------------------- |
235 // |
224 // |
236 void CRadioUtility::CBody::RadioEventTransmitterStatusChange( |
225 void CRadioUtility::CBody::RadioEventTransmitterStatusChange( |
237 TBool aActive ) |
226 TBool aActive ) |
238 { |
227 { |
239 #ifdef _DEBUG |
228 FUNC_LOG; |
240 RDebug::Print(_L("CRadioUtility::CBody::TransmitterStatusChange")); |
|
241 #endif |
|
242 if ( iTunerObserver ) |
229 if ( iTunerObserver ) |
243 { |
230 { |
244 iTunerObserver->MrftoFmTransmitterStatusChange( aActive ); |
231 iTunerObserver->MrftoFmTransmitterStatusChange( aActive ); |
245 } |
232 } |
246 } |
233 } |
251 // --------------------------------------------------------------------------- |
238 // --------------------------------------------------------------------------- |
252 // |
239 // |
253 void CRadioUtility::CBody::RadioEventAntennaStatusChange( |
240 void CRadioUtility::CBody::RadioEventAntennaStatusChange( |
254 TBool aAttached ) |
241 TBool aAttached ) |
255 { |
242 { |
256 #ifdef _DEBUG |
243 FUNC_LOG; |
257 RDebug::Print(_L("CRadioUtility::CBody::RadioEventAntennaStatusChange")); |
|
258 #endif |
|
259 if ( iTunerObserver ) |
244 if ( iTunerObserver ) |
260 { |
245 { |
261 iTunerObserver->MrftoAntennaStatusChange( aAttached ); |
246 iTunerObserver->MrftoAntennaStatusChange( aAttached ); |
262 } |
247 } |
263 } |
248 } |
268 // --------------------------------------------------------------------------- |
253 // --------------------------------------------------------------------------- |
269 // |
254 // |
270 void CRadioUtility::CBody::RadioEventOfflineModeChange( |
255 void CRadioUtility::CBody::RadioEventOfflineModeChange( |
271 TBool aOfflineMode ) |
256 TBool aOfflineMode ) |
272 { |
257 { |
273 #ifdef _DEBUG |
258 FUNC_LOG; |
274 RDebug::Print(_L("CRadioUtility::CBody::RadioEventOfflineModeChange Start offline mode = %d"), aOfflineMode); |
|
275 #endif |
|
276 if ( iTunerObserver ) |
259 if ( iTunerObserver ) |
277 { |
260 { |
278 iTunerObserver->MrftoOfflineModeStatusChange( aOfflineMode ); |
261 iTunerObserver->MrftoOfflineModeStatusChange( aOfflineMode ); |
279 } |
262 } |
280 } |
263 } |
285 // --------------------------------------------------------------------------- |
268 // --------------------------------------------------------------------------- |
286 // |
269 // |
287 void CRadioUtility::CBody::RadioEventFrequencyRangeChanged( |
270 void CRadioUtility::CBody::RadioEventFrequencyRangeChanged( |
288 TRsFrequencyRange aNewRange ) |
271 TRsFrequencyRange aNewRange ) |
289 { |
272 { |
290 #ifdef _DEBUG |
273 FUNC_LOG; |
291 RDebug::Print(_L("CRadioUtility::CBody::RadioEventFrequencyRangeChanged")); |
|
292 #endif |
|
293 |
274 |
294 if ( iTunerObserver ) |
275 if ( iTunerObserver ) |
295 { |
276 { |
296 TFmRadioFrequencyRange band = EFmRangeEuroAmerica; |
277 TFmRadioFrequencyRange band = EFmRangeEuroAmerica; |
297 |
278 |
316 // --------------------------------------------------------------------------- |
297 // --------------------------------------------------------------------------- |
317 // |
298 // |
318 void CRadioUtility::CBody::RadioEventFrequencyChange( |
299 void CRadioUtility::CBody::RadioEventFrequencyChange( |
319 TInt aNewFrequency ) |
300 TInt aNewFrequency ) |
320 { |
301 { |
321 #ifdef _DEBUG |
302 FUNC_LOG; |
322 RDebug::Print(_L("CRadioUtility::CBody::RadioEventFrequencyChange")); |
|
323 #endif |
|
324 if ( iTunerObserver ) |
303 if ( iTunerObserver ) |
325 { |
304 { |
326 iTunerObserver->MrftoFrequencyChange( aNewFrequency ); |
305 iTunerObserver->MrftoFrequencyChange( aNewFrequency ); |
327 } |
306 } |
328 } |
307 } |
333 // --------------------------------------------------------------------------- |
312 // --------------------------------------------------------------------------- |
334 // |
313 // |
335 void CRadioUtility::CBody::RadioEventForcedMonoChanged( |
314 void CRadioUtility::CBody::RadioEventForcedMonoChanged( |
336 TBool aForceMono ) |
315 TBool aForceMono ) |
337 { |
316 { |
338 #ifdef _DEBUG |
317 FUNC_LOG; |
339 RDebug::Print(_L("CRadioUtility::CBody::RadioEventForcedMonoChanged")); |
|
340 #endif |
|
341 if ( iTunerObserver ) |
318 if ( iTunerObserver ) |
342 { |
319 { |
343 iTunerObserver->MrftoForcedMonoChange( aForceMono ); |
320 iTunerObserver->MrftoForcedMonoChange( aForceMono ); |
344 } |
321 } |
345 } |
322 } |
350 // --------------------------------------------------------------------------- |
327 // --------------------------------------------------------------------------- |
351 // |
328 // |
352 void CRadioUtility::CBody::RadioEventSquelchChanged( |
329 void CRadioUtility::CBody::RadioEventSquelchChanged( |
353 TBool aSquelch ) |
330 TBool aSquelch ) |
354 { |
331 { |
355 #ifdef _DEBUG |
332 FUNC_LOG; |
356 RDebug::Print(_L("CRadioUtility::CBody::RadioEventSquelchChanged")); |
|
357 #endif |
|
358 if ( iTunerObserver ) |
333 if ( iTunerObserver ) |
359 { |
334 { |
360 iTunerObserver->MrftoSquelchChange( aSquelch ); |
335 iTunerObserver->MrftoSquelchChange( aSquelch ); |
361 } |
336 } |
362 } |
337 } |
368 // |
343 // |
369 void CRadioUtility::CBody::RadioEventStateChange( |
344 void CRadioUtility::CBody::RadioEventStateChange( |
370 TBool aRadioOn, |
345 TBool aRadioOn, |
371 TRadioServerError aError ) |
346 TRadioServerError aError ) |
372 { |
347 { |
373 #ifdef _DEBUG |
348 FUNC_LOG; |
374 RDebug::Print(_L("CRadioUtility::CBody::RadioEventStateChange")); |
|
375 #endif |
|
376 if ( iPlayerObserver ) |
349 if ( iPlayerObserver ) |
377 { |
350 { |
378 TPlayerState state = ERadioPlayerIdle; |
351 TPlayerState state = ERadioPlayerIdle; |
379 |
352 |
380 if ( aRadioOn ) |
353 if ( aRadioOn ) |
391 // --------------------------------------------------------------------------- |
364 // --------------------------------------------------------------------------- |
392 // |
365 // |
393 void CRadioUtility::CBody::RadioEventVolumeChange( |
366 void CRadioUtility::CBody::RadioEventVolumeChange( |
394 TInt aVolume ) |
367 TInt aVolume ) |
395 { |
368 { |
396 #ifdef _DEBUG |
369 FUNC_LOG; |
397 RDebug::Print(_L("CRadioUtility::CBody::RadioEventVolumeChange")); |
|
398 #endif |
|
399 if ( iPlayerObserver ) |
370 if ( iPlayerObserver ) |
400 { |
371 { |
401 iPlayerObserver->MrpoVolumeChange( aVolume ); |
372 iPlayerObserver->MrpoVolumeChange( aVolume ); |
402 } |
373 } |
403 } |
374 } |
408 // --------------------------------------------------------------------------- |
379 // --------------------------------------------------------------------------- |
409 // |
380 // |
410 void CRadioUtility::CBody::RadioEventMuteChange( |
381 void CRadioUtility::CBody::RadioEventMuteChange( |
411 TBool aMute ) |
382 TBool aMute ) |
412 { |
383 { |
413 #ifdef _DEBUG |
384 FUNC_LOG; |
414 RDebug::Print(_L("CRadioUtility::CBody::RadioEventMuteChange")); |
|
415 #endif |
|
416 if ( iPlayerObserver ) |
385 if ( iPlayerObserver ) |
417 { |
386 { |
418 iPlayerObserver->MrpoMuteChange( aMute ); |
387 iPlayerObserver->MrpoMuteChange( aMute ); |
419 } |
388 } |
420 } |
389 } |
426 // |
395 // |
427 void CRadioUtility::CBody::RadioEventBalanceChange( |
396 void CRadioUtility::CBody::RadioEventBalanceChange( |
428 TInt aLeftPercentage, |
397 TInt aLeftPercentage, |
429 TInt aRightPercentage ) |
398 TInt aRightPercentage ) |
430 { |
399 { |
431 #ifdef _DEBUG |
400 FUNC_LOG; |
432 RDebug::Print(_L("CRadioUtility::CBody::RadioEventBalanceChange")); |
|
433 #endif |
|
434 if ( iPlayerObserver ) |
401 if ( iPlayerObserver ) |
435 { |
402 { |
436 iPlayerObserver->MrpoBalanceChange( aLeftPercentage, aRightPercentage ); |
403 iPlayerObserver->MrpoBalanceChange( aLeftPercentage, aRightPercentage ); |
437 } |
404 } |
438 } |
405 } |
444 // |
411 // |
445 void CRadioUtility::CBody::StationSeekByPTYComplete( |
412 void CRadioUtility::CBody::StationSeekByPTYComplete( |
446 TInt aError, |
413 TInt aError, |
447 TInt aFrequency ) |
414 TInt aFrequency ) |
448 { |
415 { |
449 #ifdef _DEBUG |
416 FUNC_LOG; |
450 RDebug::Print(_L("CRadioUtility::CBody::StationSeekByPTYComplete")); |
|
451 #endif |
|
452 if ( iRdsObserver ) |
417 if ( iRdsObserver ) |
453 { |
418 { |
454 iRdsObserver->MrroStationSeekByPTYComplete(aError, aFrequency ); |
419 iRdsObserver->MrroStationSeekByPTYComplete(aError, aFrequency ); |
455 } |
420 } |
456 } |
421 } |
463 // |
428 // |
464 void CRadioUtility::CBody::StationSeekByTAComplete( |
429 void CRadioUtility::CBody::StationSeekByTAComplete( |
465 TInt aError, |
430 TInt aError, |
466 TInt aFrequency ) |
431 TInt aFrequency ) |
467 { |
432 { |
468 #ifdef _DEBUG |
433 FUNC_LOG; |
469 RDebug::Print(_L("CRadioUtility::CBody::StationSeekByTAComplete")); |
|
470 #endif |
|
471 |
434 |
472 if ( iRdsObserver ) |
435 if ( iRdsObserver ) |
473 { |
436 { |
474 iRdsObserver->MrroStationSeekByTAComplete( aError, aFrequency ); |
437 iRdsObserver->MrroStationSeekByTAComplete( aError, aFrequency ); |
475 } |
438 } |
482 // |
445 // |
483 void CRadioUtility::CBody::StationSeekByTPComplete( |
446 void CRadioUtility::CBody::StationSeekByTPComplete( |
484 TInt aError, |
447 TInt aError, |
485 TInt aFrequency ) |
448 TInt aFrequency ) |
486 { |
449 { |
487 #ifdef _DEBUG |
450 FUNC_LOG; |
488 RDebug::Print(_L("CRadioUtility::CBody::StationSeekByTPComplete")); |
|
489 #endif |
|
490 |
451 |
491 if ( iRdsObserver ) |
452 if ( iRdsObserver ) |
492 { |
453 { |
493 iRdsObserver->MrroStationSeekByTPComplete( aError, aFrequency ); |
454 iRdsObserver->MrroStationSeekByTPComplete( aError, aFrequency ); |
494 } |
455 } |
501 // |
462 // |
502 void CRadioUtility::CBody::GetFreqByPTYComplete( |
463 void CRadioUtility::CBody::GetFreqByPTYComplete( |
503 TInt aError, |
464 TInt aError, |
504 RArray<TInt>& aFreqList ) |
465 RArray<TInt>& aFreqList ) |
505 { |
466 { |
506 #ifdef _DEBUG |
467 FUNC_LOG; |
507 RDebug::Print(_L("CRadioUtility::CBody::GetFreqByPTYComplete")); |
|
508 #endif |
|
509 if ( iRdsObserver ) |
468 if ( iRdsObserver ) |
510 { |
469 { |
511 iRdsObserver->MrroGetFreqByPTYComplete( aError, aFreqList ); |
470 iRdsObserver->MrroGetFreqByPTYComplete( aError, aFreqList ); |
512 } |
471 } |
513 } |
472 } |
519 // |
478 // |
520 void CRadioUtility::CBody::GetFreqByTAComplete( |
479 void CRadioUtility::CBody::GetFreqByTAComplete( |
521 TInt aError, |
480 TInt aError, |
522 RArray<TInt>& aFreqList ) |
481 RArray<TInt>& aFreqList ) |
523 { |
482 { |
524 #ifdef _DEBUG |
483 FUNC_LOG; |
525 RDebug::Print(_L("CRadioUtility::CBody::GetFreqByTAComplete")); |
|
526 #endif |
|
527 if ( iRdsObserver ) |
484 if ( iRdsObserver ) |
528 { |
485 { |
529 iRdsObserver->MrroGetFreqByTAComplete( aError, aFreqList ); |
486 iRdsObserver->MrroGetFreqByTAComplete( aError, aFreqList ); |
530 } |
487 } |
531 } |
488 } |
537 // |
494 // |
538 void CRadioUtility::CBody::GetPSByPTYComplete( |
495 void CRadioUtility::CBody::GetPSByPTYComplete( |
539 TInt aError, |
496 TInt aError, |
540 RArray<TRsRdsPSName>& aPsList ) |
497 RArray<TRsRdsPSName>& aPsList ) |
541 { |
498 { |
542 #ifdef _DEBUG |
499 FUNC_LOG; |
543 RDebug::Print(_L("CRadioUtility::CBody::GetPSByPTYComplete")); |
|
544 #endif |
|
545 if ( iRdsObserver ) |
500 if ( iRdsObserver ) |
546 { |
501 { |
547 RArray<TRdsPSName> psList; |
502 RArray<TRdsPSName> psList; |
548 if ( aError == KErrNone ) |
503 if ( aError == KErrNone ) |
549 { |
504 { |
567 // |
522 // |
568 void CRadioUtility::CBody::GetPSByTAComplete( |
523 void CRadioUtility::CBody::GetPSByTAComplete( |
569 TInt aError, |
524 TInt aError, |
570 RArray<TRsRdsPSName>& aPsList ) |
525 RArray<TRsRdsPSName>& aPsList ) |
571 { |
526 { |
572 #ifdef _DEBUG |
527 FUNC_LOG; |
573 RDebug::Print(_L("CRadioUtility::CBody::GetPSByTAComplete")); |
|
574 #endif |
|
575 if ( iRdsObserver ) |
528 if ( iRdsObserver ) |
576 { |
529 { |
577 RArray<TRdsPSName> psList; |
530 RArray<TRdsPSName> psList; |
578 if ( aError == KErrNone ) |
531 if ( aError == KErrNone ) |
579 { |
532 { |
596 // --------------------------------------------------------------------------- |
549 // --------------------------------------------------------------------------- |
597 // |
550 // |
598 void CRadioUtility::CBody::RadioEventRdsDataPI( |
551 void CRadioUtility::CBody::RadioEventRdsDataPI( |
599 TInt aPi ) |
552 TInt aPi ) |
600 { |
553 { |
601 #ifdef _DEBUG |
554 FUNC_LOG; |
602 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataPI")); |
|
603 #endif |
|
604 if ( iRdsObserver ) |
555 if ( iRdsObserver ) |
605 { |
556 { |
606 iRdsObserver->MrroRdsDataPI( aPi ); |
557 iRdsObserver->MrroRdsDataPI( aPi ); |
607 } |
558 } |
608 } |
559 } |
613 // --------------------------------------------------------------------------- |
564 // --------------------------------------------------------------------------- |
614 // |
565 // |
615 void CRadioUtility::CBody::RadioEventRdsDataPTY( |
566 void CRadioUtility::CBody::RadioEventRdsDataPTY( |
616 TRsRdsProgrammeType aPty ) |
567 TRsRdsProgrammeType aPty ) |
617 { |
568 { |
618 #ifdef _DEBUG |
569 FUNC_LOG; |
619 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataPTY")); |
|
620 #endif |
|
621 if ( iRdsObserver ) |
570 if ( iRdsObserver ) |
622 { |
571 { |
623 iRdsObserver->MrroRdsDataPTY( aPty ); |
572 iRdsObserver->MrroRdsDataPTY( aPty ); |
624 } |
573 } |
625 } |
574 } |
630 // --------------------------------------------------------------------------- |
579 // --------------------------------------------------------------------------- |
631 // |
580 // |
632 void CRadioUtility::CBody::RadioEventRdsDataPS( |
581 void CRadioUtility::CBody::RadioEventRdsDataPS( |
633 TRsRdsPSName& aPs ) |
582 TRsRdsPSName& aPs ) |
634 { |
583 { |
635 #ifdef _DEBUG |
584 FUNC_LOG; |
636 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataPS")); |
|
637 #endif |
|
638 if ( iRdsObserver ) |
585 if ( iRdsObserver ) |
639 { |
586 { |
640 TRdsPSName ps; |
587 TRdsPSName ps; |
641 |
588 |
642 if ( aPs.Length() > 0 ) |
589 if ( aPs.Length() > 0 ) |
653 // --------------------------------------------------------------------------- |
600 // --------------------------------------------------------------------------- |
654 // |
601 // |
655 void CRadioUtility::CBody::RadioEventRdsDataRT( |
602 void CRadioUtility::CBody::RadioEventRdsDataRT( |
656 TRsRdsRadioText& aRt ) |
603 TRsRdsRadioText& aRt ) |
657 { |
604 { |
658 #ifdef _DEBUG |
605 FUNC_LOG; |
659 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataRT")); |
|
660 #endif |
|
661 if ( iRdsObserver ) |
606 if ( iRdsObserver ) |
662 { |
607 { |
663 TRdsRadioText rt; |
608 TRdsRadioText rt; |
664 |
609 |
665 if ( aRt.Length() > 0 ) |
610 if ( aRt.Length() > 0 ) |
678 // |
623 // |
679 void CRadioUtility::CBody::RadioEventRdsDataRTplus( |
624 void CRadioUtility::CBody::RadioEventRdsDataRTplus( |
680 TRsRdsRTplusClass aRtPlusClass, |
625 TRsRdsRTplusClass aRtPlusClass, |
681 TRsRdsRadioText& aRtPlusData ) |
626 TRsRdsRadioText& aRtPlusData ) |
682 { |
627 { |
683 #ifdef _DEBUG |
628 FUNC_LOG; |
684 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataRTplus")); |
|
685 #endif |
|
686 if ( iRdsObserver ) |
629 if ( iRdsObserver ) |
687 { |
630 { |
688 TRdsRTplusClass rtPlusClass; |
631 TRdsRTplusClass rtPlusClass; |
689 TRdsRadioText rtPlusData; |
632 TRdsRadioText rtPlusData; |
690 |
633 |
704 // --------------------------------------------------------------------------- |
647 // --------------------------------------------------------------------------- |
705 // |
648 // |
706 void CRadioUtility::CBody::RadioEventRdsDataCT( |
649 void CRadioUtility::CBody::RadioEventRdsDataCT( |
707 TDateTime& aCt ) |
650 TDateTime& aCt ) |
708 { |
651 { |
709 #ifdef _DEBUG |
652 FUNC_LOG; |
710 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataCT")); |
|
711 #endif |
|
712 if ( iRdsObserver ) |
653 if ( iRdsObserver ) |
713 { |
654 { |
714 iRdsObserver->MrroRdsDataCT( aCt ); |
655 iRdsObserver->MrroRdsDataCT( aCt ); |
715 } |
656 } |
716 } |
657 } |
721 // --------------------------------------------------------------------------- |
662 // --------------------------------------------------------------------------- |
722 // |
663 // |
723 void CRadioUtility::CBody::RadioEventRdsDataTA( |
664 void CRadioUtility::CBody::RadioEventRdsDataTA( |
724 TBool aTaOn ) |
665 TBool aTaOn ) |
725 { |
666 { |
726 #ifdef _DEBUG |
667 FUNC_LOG; |
727 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataTA")); |
|
728 #endif |
|
729 if ( iRdsObserver ) |
668 if ( iRdsObserver ) |
730 { |
669 { |
731 iRdsObserver->MrroRdsDataTA( aTaOn ); |
670 iRdsObserver->MrroRdsDataTA( aTaOn ); |
732 } |
671 } |
733 } |
672 } |
737 // Handles alternate frequency search begin event. |
676 // Handles alternate frequency search begin event. |
738 // --------------------------------------------------------------------------- |
677 // --------------------------------------------------------------------------- |
739 // |
678 // |
740 void CRadioUtility::CBody::RadioEventRdsSearchBeginAF() |
679 void CRadioUtility::CBody::RadioEventRdsSearchBeginAF() |
741 { |
680 { |
742 #ifdef _DEBUG |
681 FUNC_LOG; |
743 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsSearchBeginAF")); |
|
744 #endif |
|
745 if ( iRdsObserver ) |
682 if ( iRdsObserver ) |
746 { |
683 { |
747 iRdsObserver->MrroRdsSearchBeginAF(); |
684 iRdsObserver->MrroRdsSearchBeginAF(); |
748 } |
685 } |
749 } |
686 } |
756 // |
693 // |
757 void CRadioUtility::CBody::RadioEventRdsSearchEndAF( |
694 void CRadioUtility::CBody::RadioEventRdsSearchEndAF( |
758 TInt aError, |
695 TInt aError, |
759 TInt aFrequency ) |
696 TInt aFrequency ) |
760 { |
697 { |
761 #ifdef _DEBUG |
698 FUNC_LOG; |
762 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsSearchEndAF")); |
|
763 #endif |
|
764 if ( iRdsObserver ) |
699 if ( iRdsObserver ) |
765 { |
700 { |
766 iRdsObserver->MrroRdsSearchEndAF( aError, aFrequency ); |
701 iRdsObserver->MrroRdsSearchEndAF( aError, aFrequency ); |
767 } |
702 } |
768 } |
703 } |
773 // --------------------------------------------------------------------------- |
708 // --------------------------------------------------------------------------- |
774 // |
709 // |
775 void CRadioUtility::CBody::RadioEventRdsStationChangeTA( |
710 void CRadioUtility::CBody::RadioEventRdsStationChangeTA( |
776 TInt aFrequency ) |
711 TInt aFrequency ) |
777 { |
712 { |
778 #ifdef _DEBUG |
713 FUNC_LOG; |
779 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsStationChangeTA")); |
|
780 #endif |
|
781 if ( iRdsObserver ) |
714 if ( iRdsObserver ) |
782 { |
715 { |
783 iRdsObserver->MrroRdsStationChangeTA( aFrequency ); |
716 iRdsObserver->MrroRdsStationChangeTA( aFrequency ); |
784 } |
717 } |
785 } |
718 } |
790 // --------------------------------------------------------------------------- |
723 // --------------------------------------------------------------------------- |
791 // |
724 // |
792 void CRadioUtility::CBody::RadioEventRdsAutomaticSwitchingChange( |
725 void CRadioUtility::CBody::RadioEventRdsAutomaticSwitchingChange( |
793 TBool aAuto ) |
726 TBool aAuto ) |
794 { |
727 { |
795 #ifdef _DEBUG |
728 FUNC_LOG; |
796 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsAutomaticSwitchingChange")); |
|
797 #endif |
|
798 if ( iRdsObserver ) |
729 if ( iRdsObserver ) |
799 { |
730 { |
800 iRdsObserver->MrroRdsEventAutomaticSwitchingChange( aAuto ); |
731 iRdsObserver->MrroRdsEventAutomaticSwitchingChange( aAuto ); |
801 } |
732 } |
802 } |
733 } |
807 // --------------------------------------------------------------------------- |
738 // --------------------------------------------------------------------------- |
808 // |
739 // |
809 void CRadioUtility::CBody::RadioEventRdsAutomaticTrafficAnnouncement( |
740 void CRadioUtility::CBody::RadioEventRdsAutomaticTrafficAnnouncement( |
810 TBool aAuto ) |
741 TBool aAuto ) |
811 { |
742 { |
812 #ifdef _DEBUG |
743 FUNC_LOG; |
813 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsAutomaticTrafficAnnouncement")); |
|
814 #endif |
|
815 if ( iRdsObserver ) |
744 if ( iRdsObserver ) |
816 { |
745 { |
817 iRdsObserver->MrroRdsEventAutomaticTrafficAnnouncement( aAuto ); |
746 iRdsObserver->MrroRdsEventAutomaticTrafficAnnouncement( aAuto ); |
818 } |
747 } |
819 } |
748 } |
824 // --------------------------------------------------------------------------- |
753 // --------------------------------------------------------------------------- |
825 // |
754 // |
826 void CRadioUtility::CBody::RadioEventRdsSignalChange( |
755 void CRadioUtility::CBody::RadioEventRdsSignalChange( |
827 TBool aSignal ) |
756 TBool aSignal ) |
828 { |
757 { |
829 #ifdef _DEBUG |
758 FUNC_LOG; |
830 RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsSignalChange")); |
|
831 #endif |
|
832 if ( iRdsObserver ) |
759 if ( iRdsObserver ) |
833 { |
760 { |
834 iRdsObserver->MrroRdsEventSignalChange( aSignal ); |
761 iRdsObserver->MrroRdsEventSignalChange( aSignal ); |
835 } |
762 } |
836 } |
763 } |