equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
|
19 #ifndef CRADIOENGINE_H_ |
18 #ifndef CRADIOENGINE_H_ |
20 #define CRADIOENGINE_H_ |
19 #define CRADIOENGINE_H_ |
21 |
20 |
22 // User includes |
21 // User includes |
23 #include "cradioroutableaudio.h" |
22 #include "cradioroutableaudio.h" |
29 class CRadioAudioRouter; |
28 class CRadioAudioRouter; |
30 class CRadioSettings; |
29 class CRadioSettings; |
31 class MRadioApplicationSettings; |
30 class MRadioApplicationSettings; |
32 class MRadioEngineSettings; |
31 class MRadioEngineSettings; |
33 class CRadioSystemEventCollector; |
32 class CRadioSystemEventCollector; |
34 class CRadioPubSub; |
|
35 class CRadioRepositoryManager; |
33 class CRadioRepositoryManager; |
36 class MRadioPresetSettings; |
34 class MRadioPresetSettings; |
37 class MRadioSettingsSetter; |
35 class MRadioSettingsSetter; |
38 class MRadioScanObserver; |
|
39 class MRadioEngineObserver; |
36 class MRadioEngineObserver; |
40 class MRadioRdsReceiver; |
37 class MRadioRdsReceiver; |
41 |
38 |
42 /** |
39 /** |
43 * Convenience class to handle engine startup and the ownership of the related classes |
40 * Convenience class to handle engine startup and the ownership of the related classes |
74 * @return Reference to the application settings |
71 * @return Reference to the application settings |
75 */ |
72 */ |
76 virtual CRadioSettings& Settings() const = 0; |
73 virtual CRadioSettings& Settings() const = 0; |
77 |
74 |
78 /** |
75 /** |
79 * Returns a reference to the publish & subscribe handler |
|
80 * |
|
81 * @return Reference to the publish & subscribe handler |
|
82 */ |
|
83 virtual CRadioPubSub* PubSub() const = 0; |
|
84 |
|
85 /** |
|
86 * Determines radio region |
76 * Determines radio region |
87 */ |
77 */ |
88 virtual TRadioRegion DetermineRegion() = 0; |
78 virtual TRadioRegion DetermineRegion() = 0; |
89 |
79 |
90 /** |
80 /** |
91 * ( Re )initializes the radio. |
81 * ( Re )initializes the radio. |
92 * |
82 * |
93 * @param aRegionId Region id |
83 * @param aRegionId Region id |
94 * @param aPubSub Pointer to Publish&Subscribe object |
84 */ |
95 */ |
85 virtual void InitRadioL( TInt aRegionId ) = 0; |
96 virtual void InitRadioL( TInt aRegionId, CRadioPubSub* aPubSub = 0 ) = 0; |
|
97 |
86 |
98 /** |
87 /** |
99 * Has the radio been initialized |
88 * Has the radio been initialized |
100 * |
89 * |
101 * @return ETrue if radio is initialized, otherwise EFalse |
90 * @return ETrue if radio is initialized, otherwise EFalse |
161 * @return ETrue, if frequency is within radio range. |
150 * @return ETrue, if frequency is within radio range. |
162 */ |
151 */ |
163 virtual TBool IsFrequencyValid( TUint32 aFrequency = 0 ) const = 0; |
152 virtual TBool IsFrequencyValid( TUint32 aFrequency = 0 ) const = 0; |
164 |
153 |
165 /** |
154 /** |
|
155 * Sets or unsets the manual seek mode |
|
156 * |
|
157 * @param aManualSeekActive ETrue if active EFalse if not |
|
158 */ |
|
159 virtual void SetManualSeekMode( TBool aManualSeekActive ) = 0; |
|
160 |
|
161 /** |
|
162 * Returns the manual seek mode status |
|
163 */ |
|
164 virtual TBool IsInManualSeekMode() const = 0; |
|
165 |
|
166 /** |
166 * Tunes to frequency |
167 * Tunes to frequency |
167 * If radio is not initialized by InitRadioL, frequency is just |
168 * If radio is not initialized by InitRadioL, frequency is just |
168 * set to settings. |
169 * set to settings. |
169 * |
170 * |
170 * @param aFrequency frequency to tune to |
171 * @param aFrequency frequency to tune to |
172 */ |
173 */ |
173 virtual void SetFrequency( TUint32 aFrequency, |
174 virtual void SetFrequency( TUint32 aFrequency, |
174 RadioEngine::TRadioFrequencyEventReason aReason = RadioEngine::ERadioFrequencyEventReasonUnknown ) = 0; |
175 RadioEngine::TRadioFrequencyEventReason aReason = RadioEngine::ERadioFrequencyEventReasonUnknown ) = 0; |
175 |
176 |
176 /** |
177 /** |
177 * Test function to try to make the tuning as fast as possible. |
|
178 * Use with care since this will skip a lot of checks done by the SetFrequency() function |
|
179 */ |
|
180 virtual void SetFrequencyFast( TUint32 aFrequency, |
|
181 RadioEngine::TRadioFrequencyEventReason aReason = RadioEngine::ERadioFrequencyEventReasonUnknown ) = 0; |
|
182 |
|
183 /** |
|
184 * Steps to next frequency according to direction |
|
185 * |
|
186 * @param aDirection The direciton to step to |
|
187 */ |
|
188 virtual void StepToFrequency( RadioEngine::TRadioTuneDirection aDirection ) = 0; |
|
189 |
|
190 /** |
|
191 * Performs seeking operation. |
178 * Performs seeking operation. |
192 * |
179 * |
193 * @param aDirection direction of seeking operation. |
180 * @param aDirection direction of seeking operation. |
194 */ |
181 */ |
195 virtual void Seek( RadioEngine::TRadioTuneDirection aDirection ) = 0; |
182 virtual void Seek( RadioEngine::TRadioTuneDirection aDirection ) = 0; |
205 * @return Seeking state. |
192 * @return Seeking state. |
206 */ |
193 */ |
207 virtual RadioEngine::TRadioSeeking Seeking() const = 0; |
194 virtual RadioEngine::TRadioSeeking Seeking() const = 0; |
208 |
195 |
209 /** |
196 /** |
210 * Starts scanning all available stations from the minimum frequency |
|
211 * |
|
212 * Calling this method also cancels any existing scan or seek operations. |
|
213 * |
|
214 * @param aObserver Observer to be notified of the progress of the scan. |
|
215 * If a scan is currently in progress or the radio is not on, then |
|
216 * the new scan is not performed at all and an error is passed on completion event. |
|
217 * |
|
218 */ |
|
219 virtual void StartScan( MRadioScanObserver& aObserver ) = 0; |
|
220 |
|
221 /** |
|
222 * Stops any scans currently in progress and notifies the observer |
|
223 * |
|
224 * @param aError The error code for completing the scanning. |
|
225 */ |
|
226 virtual void StopScan( TInt aError = KErrCancel ) = 0; |
|
227 |
|
228 /** |
|
229 * Changes volume by one level. |
197 * Changes volume by one level. |
230 * |
198 * |
231 * @param aDirection Direction of the volume change. |
199 * @param aDirection Direction of the volume change. |
232 */ |
200 */ |
233 virtual void AdjustVolume( RadioEngine::TRadioVolumeSetDirection aDirection ) = 0; |
201 virtual void AdjustVolume( RadioEngine::TRadioVolumeSetDirection aDirection ) = 0; |
242 /** |
210 /** |
243 * Sets volume to be muted. |
211 * Sets volume to be muted. |
244 * |
212 * |
245 * @param aMute mute status. |
213 * @param aMute mute status. |
246 */ |
214 */ |
247 virtual void SetVolumeMuted( TBool aMute ) = 0; |
215 virtual void SetVolumeMuted( TBool aMute, TBool aUpdateSettings = ETrue ) = 0; |
248 |
216 |
249 /** |
217 /** |
250 * Retrieves current antenna state. |
218 * Retrieves current antenna state. |
251 * |
219 * |
252 * @return ETrue if antenna is attached, EFalse otherwise. |
220 * @return ETrue if antenna is attached, EFalse otherwise. |