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