16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #include <RadioFmTunerUtility.h> |
19 #include <RadioFmTunerUtility.h> |
20 #include "RadioFmTunerUtilityBody.h" |
20 #include "RadioFmTunerUtilityBody.h" |
|
21 #include "trace.h" |
21 |
22 |
22 // ----------------------------------------------------------------------------- |
23 // ----------------------------------------------------------------------------- |
23 // CRadioFmTunerUtility::NewL |
24 // CRadioFmTunerUtility::NewL |
24 // Destructor |
25 // Destructor |
25 // ----------------------------------------------------------------------------- |
26 // ----------------------------------------------------------------------------- |
26 // |
27 // |
27 CRadioFmTunerUtility* CRadioFmTunerUtility::NewL( |
28 CRadioFmTunerUtility* CRadioFmTunerUtility::NewL( |
28 RRadioSession& aRadioSession, |
29 RRadioSession& aRadioSession, |
29 MRadioFmTunerObserver& aObserver) |
30 MRadioFmTunerObserver& aObserver) |
30 { |
31 { |
|
32 FUNC_LOG; |
31 CRadioFmTunerUtility* self = new(ELeave) CRadioFmTunerUtility; |
33 CRadioFmTunerUtility* self = new(ELeave) CRadioFmTunerUtility; |
32 CleanupStack::PushL(self); |
34 CleanupStack::PushL(self); |
33 self->iBody = CRadioFmTunerUtility::CBody::NewL(aRadioSession, aObserver); |
35 self->iBody = CRadioFmTunerUtility::CBody::NewL(aRadioSession, aObserver); |
34 CleanupStack::Pop(); |
36 CleanupStack::Pop(); |
35 return self; |
37 return self; |
40 // Destructor |
42 // Destructor |
41 // ----------------------------------------------------------------------------- |
43 // ----------------------------------------------------------------------------- |
42 // |
44 // |
43 EXPORT_C CRadioFmTunerUtility::~CRadioFmTunerUtility() |
45 EXPORT_C CRadioFmTunerUtility::~CRadioFmTunerUtility() |
44 { |
46 { |
|
47 FUNC_LOG; |
45 delete iBody; |
48 delete iBody; |
46 } |
49 } |
47 |
50 |
48 // ----------------------------------------------------------------------------- |
51 // ----------------------------------------------------------------------------- |
49 // CRadioFmTunerUtility::CRadioFmTunerUtility |
52 // CRadioFmTunerUtility::CRadioFmTunerUtility |
50 // (other items were commented in a header). |
53 // (other items were commented in a header). |
51 // ----------------------------------------------------------------------------- |
54 // ----------------------------------------------------------------------------- |
52 // |
55 // |
53 CRadioFmTunerUtility::CRadioFmTunerUtility() |
56 CRadioFmTunerUtility::CRadioFmTunerUtility() |
54 { |
57 { |
|
58 FUNC_LOG; |
55 } |
59 } |
56 |
60 |
57 // ----------------------------------------------------------------------------- |
61 // ----------------------------------------------------------------------------- |
58 // CRadioFmTunerUtility::RequestTunerControl |
62 // CRadioFmTunerUtility::RequestTunerControl |
59 // (other items were commented in a header). |
63 // (other items were commented in a header). |
60 // ----------------------------------------------------------------------------- |
64 // ----------------------------------------------------------------------------- |
61 // |
65 // |
62 EXPORT_C void CRadioFmTunerUtility::RequestTunerControl() |
66 EXPORT_C void CRadioFmTunerUtility::RequestTunerControl() |
63 { |
67 { |
|
68 FUNC_LOG; |
64 ASSERT(iBody); |
69 ASSERT(iBody); |
65 iBody->RequestTunerControl(); |
70 iBody->RequestTunerControl(); |
66 } |
71 } |
67 |
72 |
68 // ----------------------------------------------------------------------------- |
73 // ----------------------------------------------------------------------------- |
82 // ----------------------------------------------------------------------------- |
88 // ----------------------------------------------------------------------------- |
83 // |
89 // |
84 EXPORT_C TInt CRadioFmTunerUtility::GetCapabilities( |
90 EXPORT_C TInt CRadioFmTunerUtility::GetCapabilities( |
85 TFmTunerCapabilities& aCaps) |
91 TFmTunerCapabilities& aCaps) |
86 { |
92 { |
|
93 FUNC_LOG; |
87 ASSERT(iBody); |
94 ASSERT(iBody); |
88 return iBody->GetCapabilities(aCaps); |
95 return iBody->GetCapabilities(aCaps); |
89 } |
96 } |
90 |
97 |
91 // ----------------------------------------------------------------------------- |
98 // ----------------------------------------------------------------------------- |
118 // (other items were commented in a header). |
127 // (other items were commented in a header). |
119 // ----------------------------------------------------------------------------- |
128 // ----------------------------------------------------------------------------- |
120 // |
129 // |
121 EXPORT_C void CRadioFmTunerUtility::CancelSetFrequency() |
130 EXPORT_C void CRadioFmTunerUtility::CancelSetFrequency() |
122 { |
131 { |
|
132 FUNC_LOG; |
123 ASSERT(iBody); |
133 ASSERT(iBody); |
124 iBody->CancelSetFrequency(); |
134 iBody->CancelSetFrequency(); |
125 } |
135 } |
126 |
136 |
127 // ----------------------------------------------------------------------------- |
137 // ----------------------------------------------------------------------------- |
130 // ----------------------------------------------------------------------------- |
140 // ----------------------------------------------------------------------------- |
131 // |
141 // |
132 EXPORT_C TInt CRadioFmTunerUtility::GetFrequency( |
142 EXPORT_C TInt CRadioFmTunerUtility::GetFrequency( |
133 TInt& aFrequency ) const |
143 TInt& aFrequency ) const |
134 { |
144 { |
|
145 FUNC_LOG; |
135 ASSERT(iBody); |
146 ASSERT(iBody); |
136 return iBody->GetFrequency(aFrequency); |
147 return iBody->GetFrequency(aFrequency); |
137 } |
148 } |
138 |
149 |
139 // ----------------------------------------------------------------------------- |
150 // ----------------------------------------------------------------------------- |
142 // ----------------------------------------------------------------------------- |
153 // ----------------------------------------------------------------------------- |
143 // |
154 // |
144 EXPORT_C void CRadioFmTunerUtility::SetFrequencyRange( |
155 EXPORT_C void CRadioFmTunerUtility::SetFrequencyRange( |
145 TFmRadioFrequencyRange aRange ) |
156 TFmRadioFrequencyRange aRange ) |
146 { |
157 { |
|
158 FUNC_LOG; |
147 ASSERT(iBody); |
159 ASSERT(iBody); |
148 iBody->SetFrequencyRange(aRange); |
160 iBody->SetFrequencyRange(aRange); |
149 } |
161 } |
150 |
162 |
151 // ----------------------------------------------------------------------------- |
163 // ----------------------------------------------------------------------------- |
153 // (other items were commented in a header). |
165 // (other items were commented in a header). |
154 // ----------------------------------------------------------------------------- |
166 // ----------------------------------------------------------------------------- |
155 // |
167 // |
156 EXPORT_C void CRadioFmTunerUtility::CancelSetFrequencyRange() |
168 EXPORT_C void CRadioFmTunerUtility::CancelSetFrequencyRange() |
157 { |
169 { |
|
170 FUNC_LOG; |
158 ASSERT(iBody); |
171 ASSERT(iBody); |
159 iBody->CancelSetFrequencyRange(); |
172 iBody->CancelSetFrequencyRange(); |
160 } |
173 } |
161 |
174 |
162 // ----------------------------------------------------------------------------- |
175 // ----------------------------------------------------------------------------- |
167 EXPORT_C TInt CRadioFmTunerUtility::GetFrequencyRange( |
180 EXPORT_C TInt CRadioFmTunerUtility::GetFrequencyRange( |
168 TFmRadioFrequencyRange& aRange, |
181 TFmRadioFrequencyRange& aRange, |
169 TInt& aMinFreq, |
182 TInt& aMinFreq, |
170 TInt& aMaxFreq ) const |
183 TInt& aMaxFreq ) const |
171 { |
184 { |
|
185 FUNC_LOG; |
172 ASSERT(iBody); |
186 ASSERT(iBody); |
173 return iBody->GetFrequencyRange(aRange, aMinFreq, aMaxFreq); |
187 return iBody->GetFrequencyRange(aRange, aMinFreq, aMaxFreq); |
174 } |
188 } |
175 |
189 |
176 // ----------------------------------------------------------------------------- |
190 // ----------------------------------------------------------------------------- |
190 // (other items were commented in a header). |
205 // (other items were commented in a header). |
191 // ----------------------------------------------------------------------------- |
206 // ----------------------------------------------------------------------------- |
192 // |
207 // |
193 EXPORT_C void CRadioFmTunerUtility::CancelStationSeek() |
208 EXPORT_C void CRadioFmTunerUtility::CancelStationSeek() |
194 { |
209 { |
|
210 FUNC_LOG; |
195 ASSERT(iBody); |
211 ASSERT(iBody); |
196 iBody->CancelStationSeek(); |
212 iBody->CancelStationSeek(); |
197 } |
213 } |
198 |
214 |
199 // ----------------------------------------------------------------------------- |
215 // ----------------------------------------------------------------------------- |
202 // ----------------------------------------------------------------------------- |
218 // ----------------------------------------------------------------------------- |
203 // |
219 // |
204 EXPORT_C TInt CRadioFmTunerUtility::GetSignalStrength( |
220 EXPORT_C TInt CRadioFmTunerUtility::GetSignalStrength( |
205 TInt& aSignalStrength ) const |
221 TInt& aSignalStrength ) const |
206 { |
222 { |
|
223 FUNC_LOG; |
207 ASSERT(iBody); |
224 ASSERT(iBody); |
208 return iBody->GetSignalStrength(aSignalStrength); |
225 return iBody->GetSignalStrength(aSignalStrength); |
209 } |
226 } |
210 |
227 |
211 // ----------------------------------------------------------------------------- |
228 // ----------------------------------------------------------------------------- |
214 // ----------------------------------------------------------------------------- |
231 // ----------------------------------------------------------------------------- |
215 // |
232 // |
216 EXPORT_C TInt CRadioFmTunerUtility::GetMaxSignalStrength( |
233 EXPORT_C TInt CRadioFmTunerUtility::GetMaxSignalStrength( |
217 TInt& aMaxSignalStrength ) const |
234 TInt& aMaxSignalStrength ) const |
218 { |
235 { |
|
236 FUNC_LOG; |
219 ASSERT(iBody); |
237 ASSERT(iBody); |
220 return iBody->GetMaxSignalStrength(aMaxSignalStrength); |
238 return iBody->GetMaxSignalStrength(aMaxSignalStrength); |
221 } |
239 } |
222 |
240 |
223 // ----------------------------------------------------------------------------- |
241 // ----------------------------------------------------------------------------- |
226 // ----------------------------------------------------------------------------- |
244 // ----------------------------------------------------------------------------- |
227 // |
245 // |
228 EXPORT_C TInt CRadioFmTunerUtility::GetStereoMode( |
246 EXPORT_C TInt CRadioFmTunerUtility::GetStereoMode( |
229 TBool& aStereo ) const |
247 TBool& aStereo ) const |
230 { |
248 { |
|
249 FUNC_LOG; |
231 ASSERT(iBody); |
250 ASSERT(iBody); |
232 return iBody->GetStereoMode(aStereo); |
251 return iBody->GetStereoMode(aStereo); |
233 } |
252 } |
234 |
253 |
235 // ----------------------------------------------------------------------------- |
254 // ----------------------------------------------------------------------------- |
250 // ----------------------------------------------------------------------------- |
270 // ----------------------------------------------------------------------------- |
251 // |
271 // |
252 EXPORT_C TInt CRadioFmTunerUtility::GetForcedMonoReception( |
272 EXPORT_C TInt CRadioFmTunerUtility::GetForcedMonoReception( |
253 TBool& aForcedMono ) const |
273 TBool& aForcedMono ) const |
254 { |
274 { |
|
275 FUNC_LOG; |
255 ASSERT(iBody); |
276 ASSERT(iBody); |
256 return iBody->GetForcedMonoReception(aForcedMono); |
277 return iBody->GetForcedMonoReception(aForcedMono); |
257 } |
278 } |
258 |
279 |
259 // ----------------------------------------------------------------------------- |
280 // ----------------------------------------------------------------------------- |