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 T_CRADIORDSRECEIVERSIMULATOR_H |
|
19 #define T_CRADIORDSRECEIVERSIMULATOR_H |
|
20 |
|
21 // User includes |
|
22 #include "mradiordsdataobserver.h" |
|
23 #include "cradiordsreceiverbase.h" |
|
24 |
|
25 // Class declaration |
|
26 NONSHARABLE_CLASS( CRadioRdsReceiverSimulator ) : public CRadioRdsReceiverBase |
|
27 { |
|
28 public: |
|
29 |
|
30 static CRadioRdsReceiverSimulator* NewL( MRadioEngineSettings& aSettings ); |
|
31 |
|
32 virtual ~CRadioRdsReceiverSimulator(); |
|
33 |
|
34 // from base class MRadioRdsReceiver |
|
35 |
|
36 void InitL( CRadioUtility& aRadioUtility, CRadioPubSub* aPubSub ); |
|
37 void StartReceiver(); |
|
38 void StopReceiver(); |
|
39 |
|
40 private: |
|
41 |
|
42 /** The simulated events */ |
|
43 enum TRadioRdsSimulationEvent |
|
44 { |
|
45 ERadioRdsEventSignalOn, |
|
46 ERadioRdsEventSignalOff, |
|
47 ERadioRdsEventPS, |
|
48 ERadioRdsEventAFBegin, |
|
49 ERadioRdsEventAFEnd, |
|
50 ERadioRdsEventRadioText, |
|
51 ERadioRdsEventRadioTextPlus |
|
52 }; |
|
53 |
|
54 CRadioRdsReceiverSimulator( MRadioEngineSettings& aSettings ); |
|
55 |
|
56 void ConstructL(); |
|
57 |
|
58 void ParseRdsDataL(); |
|
59 |
|
60 void startRTPlusTimer(); |
|
61 |
|
62 /** |
|
63 * StaticRdsSimulationCallback Callback for RDS simulation |
|
64 */ |
|
65 static TInt StaticRdsSimulationCallback( TAny* aSelfPtr ); |
|
66 |
|
67 /** |
|
68 * Callback for RT+ simulation |
|
69 */ |
|
70 static TInt StaticRdsSimulationCallback2( TAny* aSelfPtr ); |
|
71 |
|
72 private: // data |
|
73 |
|
74 /** Timer for RDS event simulation */ |
|
75 CPeriodic* iEventSimulatorTimer; |
|
76 |
|
77 /** Timer for RT+ events */ |
|
78 CPeriodic* iEventSimulatorTimer2; |
|
79 |
|
80 /** The iterator for RDS events */ |
|
81 TInt iEventIterator; |
|
82 |
|
83 /** The iterator for RT+ events */ |
|
84 TInt iRtPlusIterator; |
|
85 |
|
86 /** The iterator for RT events */ |
|
87 TInt iRtIterator; |
|
88 |
|
89 /** The iterator for PS names */ |
|
90 TInt iPsIterator; |
|
91 |
|
92 /** The iterator for frequencies */ |
|
93 TInt iFrequencyIterator; |
|
94 |
|
95 /** The iterator for RT and RT+ information */ |
|
96 TInt iRadioTextIterator; |
|
97 |
|
98 }; |
|
99 |
|
100 #endif // T_CRADIORDSRECEIVERSIMULATOR_H |
|