|
1 /* |
|
2 * Copyright (c) 2007 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: Radio FM Tuner Utility interface implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <RadioFmTunerUtility.h> |
|
20 #include "RadioFmTunerUtilityBody.h" |
|
21 |
|
22 // ----------------------------------------------------------------------------- |
|
23 // CRadioFmTunerUtility::NewL |
|
24 // Destructor |
|
25 // ----------------------------------------------------------------------------- |
|
26 // |
|
27 CRadioFmTunerUtility* CRadioFmTunerUtility::NewL( |
|
28 RRadioSession& aRadioSession, |
|
29 MRadioFmTunerObserver& aObserver) |
|
30 { |
|
31 CRadioFmTunerUtility* self = new(ELeave) CRadioFmTunerUtility; |
|
32 CleanupStack::PushL(self); |
|
33 self->iBody = CRadioFmTunerUtility::CBody::NewL(aRadioSession, aObserver); |
|
34 CleanupStack::Pop(); |
|
35 return self; |
|
36 } |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CRadioFmTunerUtility::~CRadioFmTunerUtility |
|
40 // Destructor |
|
41 // ----------------------------------------------------------------------------- |
|
42 // |
|
43 EXPORT_C CRadioFmTunerUtility::~CRadioFmTunerUtility() |
|
44 { |
|
45 delete iBody; |
|
46 } |
|
47 |
|
48 // ----------------------------------------------------------------------------- |
|
49 // CRadioFmTunerUtility::CRadioFmTunerUtility |
|
50 // (other items were commented in a header). |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 CRadioFmTunerUtility::CRadioFmTunerUtility() |
|
54 { |
|
55 } |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // CRadioFmTunerUtility::RequestTunerControl |
|
59 // (other items were commented in a header). |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 EXPORT_C void CRadioFmTunerUtility::RequestTunerControl() |
|
63 { |
|
64 ASSERT(iBody); |
|
65 iBody->RequestTunerControl(); |
|
66 } |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // CRadioFmTunerUtility::Close |
|
70 // (other items were commented in a header). |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 EXPORT_C void CRadioFmTunerUtility::Close() |
|
74 { |
|
75 ASSERT(iBody); |
|
76 iBody->Close(); |
|
77 } |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CRadioFmTunerUtility::GetCapabilities |
|
81 // (other items were commented in a header). |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 EXPORT_C TInt CRadioFmTunerUtility::GetCapabilities( |
|
85 TFmTunerCapabilities& aCaps) |
|
86 { |
|
87 ASSERT(iBody); |
|
88 return iBody->GetCapabilities(aCaps); |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CRadioFmTunerUtility::EnableTunerInOfflineMode |
|
93 // (other items were commented in a header). |
|
94 // ----------------------------------------------------------------------------- |
|
95 // |
|
96 EXPORT_C TInt CRadioFmTunerUtility::EnableTunerInOfflineMode( |
|
97 TBool aEnable ) |
|
98 |
|
99 { |
|
100 ASSERT(iBody); |
|
101 return iBody->EnableTunerInOfflineMode(aEnable); |
|
102 } |
|
103 |
|
104 // ----------------------------------------------------------------------------- |
|
105 // CRadioFmTunerUtility::SetFrequency |
|
106 // (other items were commented in a header). |
|
107 // ----------------------------------------------------------------------------- |
|
108 // |
|
109 EXPORT_C void CRadioFmTunerUtility::SetFrequency( |
|
110 TInt aFrequency ) |
|
111 { |
|
112 ASSERT(iBody); |
|
113 iBody->SetFrequency(aFrequency); |
|
114 } |
|
115 |
|
116 // ----------------------------------------------------------------------------- |
|
117 // CRadioFmTunerUtility::CancelSetFrequency |
|
118 // (other items were commented in a header). |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 EXPORT_C void CRadioFmTunerUtility::CancelSetFrequency() |
|
122 { |
|
123 ASSERT(iBody); |
|
124 iBody->CancelSetFrequency(); |
|
125 } |
|
126 |
|
127 // ----------------------------------------------------------------------------- |
|
128 // CRadioFmTunerUtility::GetFrequency |
|
129 // (other items were commented in a header). |
|
130 // ----------------------------------------------------------------------------- |
|
131 // |
|
132 EXPORT_C TInt CRadioFmTunerUtility::GetFrequency( |
|
133 TInt& aFrequency ) const |
|
134 { |
|
135 ASSERT(iBody); |
|
136 return iBody->GetFrequency(aFrequency); |
|
137 } |
|
138 |
|
139 // ----------------------------------------------------------------------------- |
|
140 // CRadioFmTunerUtility::SetFrequencyRange |
|
141 // (other items were commented in a header). |
|
142 // ----------------------------------------------------------------------------- |
|
143 // |
|
144 EXPORT_C void CRadioFmTunerUtility::SetFrequencyRange( |
|
145 TFmRadioFrequencyRange aRange ) |
|
146 { |
|
147 ASSERT(iBody); |
|
148 iBody->SetFrequencyRange(aRange); |
|
149 } |
|
150 |
|
151 // ----------------------------------------------------------------------------- |
|
152 // CRadioFmTunerUtility::CancelSetFrequencyRange |
|
153 // (other items were commented in a header). |
|
154 // ----------------------------------------------------------------------------- |
|
155 // |
|
156 EXPORT_C void CRadioFmTunerUtility::CancelSetFrequencyRange() |
|
157 { |
|
158 ASSERT(iBody); |
|
159 iBody->CancelSetFrequencyRange(); |
|
160 } |
|
161 |
|
162 // ----------------------------------------------------------------------------- |
|
163 // CRadioFmTunerUtility::GetFrequencyRange |
|
164 // (other items were commented in a header). |
|
165 // ----------------------------------------------------------------------------- |
|
166 // |
|
167 EXPORT_C TInt CRadioFmTunerUtility::GetFrequencyRange( |
|
168 TFmRadioFrequencyRange& aRange, |
|
169 TInt& aMinFreq, |
|
170 TInt& aMaxFreq ) const |
|
171 { |
|
172 ASSERT(iBody); |
|
173 return iBody->GetFrequencyRange(aRange, aMinFreq, aMaxFreq); |
|
174 } |
|
175 |
|
176 // ----------------------------------------------------------------------------- |
|
177 // CRadioFmTunerUtility::StationSeek |
|
178 // (other items were commented in a header). |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 EXPORT_C void CRadioFmTunerUtility::StationSeek( |
|
182 TBool aUpwards ) |
|
183 { |
|
184 ASSERT(iBody); |
|
185 iBody->StationSeek(aUpwards); |
|
186 } |
|
187 |
|
188 // ----------------------------------------------------------------------------- |
|
189 // CRadioFmTunerUtility::CancelStationSeek |
|
190 // (other items were commented in a header). |
|
191 // ----------------------------------------------------------------------------- |
|
192 // |
|
193 EXPORT_C void CRadioFmTunerUtility::CancelStationSeek() |
|
194 { |
|
195 ASSERT(iBody); |
|
196 iBody->CancelStationSeek(); |
|
197 } |
|
198 |
|
199 // ----------------------------------------------------------------------------- |
|
200 // CRadioFmTunerUtility::GetSignalStrength |
|
201 // (other items were commented in a header). |
|
202 // ----------------------------------------------------------------------------- |
|
203 // |
|
204 EXPORT_C TInt CRadioFmTunerUtility::GetSignalStrength( |
|
205 TInt& aSignalStrength ) const |
|
206 { |
|
207 ASSERT(iBody); |
|
208 return iBody->GetSignalStrength(aSignalStrength); |
|
209 } |
|
210 |
|
211 // ----------------------------------------------------------------------------- |
|
212 // CRadioFmTunerUtility::GetMaxSignalStrength |
|
213 // (other items were commented in a header). |
|
214 // ----------------------------------------------------------------------------- |
|
215 // |
|
216 EXPORT_C TInt CRadioFmTunerUtility::GetMaxSignalStrength( |
|
217 TInt& aMaxSignalStrength ) const |
|
218 { |
|
219 ASSERT(iBody); |
|
220 return iBody->GetMaxSignalStrength(aMaxSignalStrength); |
|
221 } |
|
222 |
|
223 // ----------------------------------------------------------------------------- |
|
224 // CRadioFmTunerUtility::GetStereoMode |
|
225 // (other items were commented in a header). |
|
226 // ----------------------------------------------------------------------------- |
|
227 // |
|
228 EXPORT_C TInt CRadioFmTunerUtility::GetStereoMode( |
|
229 TBool& aStereo ) const |
|
230 { |
|
231 ASSERT(iBody); |
|
232 return iBody->GetStereoMode(aStereo); |
|
233 } |
|
234 |
|
235 // ----------------------------------------------------------------------------- |
|
236 // CRadioFmTunerUtility::ForceMonoReception |
|
237 // (other items were commented in a header). |
|
238 // ----------------------------------------------------------------------------- |
|
239 // |
|
240 EXPORT_C TInt CRadioFmTunerUtility::ForceMonoReception( |
|
241 TBool aForcedMono ) |
|
242 { |
|
243 ASSERT(iBody); |
|
244 return iBody->ForceMonoReception(aForcedMono); |
|
245 } |
|
246 |
|
247 // ----------------------------------------------------------------------------- |
|
248 // CRadioFmTunerUtility::GetForcedMonoReception |
|
249 // (other items were commented in a header). |
|
250 // ----------------------------------------------------------------------------- |
|
251 // |
|
252 EXPORT_C TInt CRadioFmTunerUtility::GetForcedMonoReception( |
|
253 TBool& aForcedMono ) const |
|
254 { |
|
255 ASSERT(iBody); |
|
256 return iBody->GetForcedMonoReception(aForcedMono); |
|
257 } |
|
258 |
|
259 // ----------------------------------------------------------------------------- |
|
260 // CRadioFmTunerUtility::SetSquelch |
|
261 // (other items were commented in a header). |
|
262 // ----------------------------------------------------------------------------- |
|
263 // |
|
264 EXPORT_C TInt CRadioFmTunerUtility::SetSquelch( |
|
265 TBool aSquelch ) |
|
266 { |
|
267 ASSERT(iBody); |
|
268 return iBody->SetSquelch(aSquelch); |
|
269 } |
|
270 |
|
271 // ----------------------------------------------------------------------------- |
|
272 // CRadioFmTunerUtility::GetSquelch |
|
273 // (other items were commented in a header). |
|
274 // ----------------------------------------------------------------------------- |
|
275 // |
|
276 EXPORT_C TInt CRadioFmTunerUtility::GetSquelch( |
|
277 TBool& aSquelch ) const |
|
278 { |
|
279 ASSERT(iBody); |
|
280 return iBody->GetSquelch(aSquelch); |
|
281 } |
|
282 |
|
283 // End of File |