CRadioFmTunerUtility Class Reference
class CRadioFmTunerUtility : public CBase
|
This class provides an interface to allow clients to control the FM tuner hardware present on a device.
RadioUtility.lib
-
Since
-
S60 3.2
Nested Classes and Structures
Constructor & Destructor Documentation
CRadioFmTunerUtility()
CRadioFmTunerUtility
|
(
|
)
|
[private]
|
~CRadioFmTunerUtility()
~CRadioFmTunerUtility
|
(
|
)
|
[private, virtual]
|
Member Functions Documentation
CancelSetFrequency()
IMPORT_C void
|
CancelSetFrequency
|
(
|
)
|
|
Cancels an ongoing tune operation, as initiated by a call to Tune. The usual callback will not occur if this has been called.
Has not effect if no tune operation is ongoing.
CancelSetFrequencyRange()
IMPORT_C void
|
CancelSetFrequencyRange
|
(
|
)
|
|
Cancels an ongoing set frequency range operation, as initiated by a call to SetFrequencyRange. The usual callback will not occur if this has been called.
Has not effect if no set frequency range operation is ongoing.
CancelStationSeek()
IMPORT_C void
|
CancelStationSeek
|
(
|
)
|
|
Cancels an ongoing station seek operation, as initiated by a call to StationSeek. The usual callback will not occur if this has been called.
Has not effect if no station seek operation is ongoing.
Close()
Close the tuner and free all memory allocated. Any ongoing playing activity will be stopped, control of the tuner will be released, and the hardware will be powered down if no other clients need it.
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
EnableTunerInOfflineMode(TBool)
IMPORT_C
TInt
|
EnableTunerInOfflineMode
|
(
|
TBool
|
aEnable
|
)
|
|
Enable tuner functions when the device is in offline mode. Client should first check the capabilities to see if this feature is supported.
When requested prior to requesting tuner control, this function will succeed with KErrNone, however, tuner will only be enabled in offline mode if supported by the tuner device.
Tuner functions are disabled in offline mode by default.
Parameters
TBool
aEnable
|
ETrue to enable tuner functions in offline mode, EFalse to disable.
|
ForceMonoReception(TBool)
IMPORT_C
TInt
|
ForceMonoReception
|
(
|
TBool
|
aForcedMono
|
)
|
|
Indicates whether the reception should be forced into monophonic mode.
GetCapabilities(TFmTunerCapabilities &)
Get the capabilities of the FM tuner on the device.
GetForcedMonoReception(TBool &)
IMPORT_C
TInt
|
GetForcedMonoReception
|
(
|
TBool
&
|
aForcedMono
|
)
|
const
|
Find out whether reception is forced into monophonic mode or not.
Parameters
TBool
& aForcedMono
|
On return, will be ETrue if a forced mono is currently enabled.
|
GetFrequency(TInt &)
IMPORT_C
TInt
|
GetFrequency
|
(
|
TInt
&
|
aFrequency
|
)
|
const
|
Get the currently tuned frequency.
Parameters
TInt
& aFrequency
|
On return contains the current frequency (Hz).
|
GetFrequencyRange(TFmRadioFrequencyRange &, TInt &, TInt &)
IMPORT_C
TInt
|
GetFrequencyRange
|
(
|
TFmRadioFrequencyRange
&
|
aRange,
|
|
TInt
&
|
aMinFreq,
|
|
TInt
&
|
aMaxFreq
|
|
)
|
const
|
Get the current frequency range. It also returns the minimum and maximum frequencies (Hz) for the returned range. Client should always use the minimum and maximum frequencies returned by the tuner device, since it may vary slightly depending on the hardware.
Parameters
TFmRadioFrequencyRange
& aRange
|
On return contains the current frequency range.
|
TInt
& aMinFreq
|
On return contains the minimum frequency for the current frequency range.
|
TInt
& aMaxFreq
|
On return contains the maximum frequency for the current frequency range.
|
GetMaxSignalStrength(TInt &)
IMPORT_C
TInt
|
GetMaxSignalStrength
|
(
|
TInt
&
|
aMaxSignalStrength
|
)
|
const
|
Get the maximum possible signal strength of a tuned frequency.
Parameters
TInt
& aMaxSignalStrength
|
On return contains the maximum signal strength.
|
GetSignalStrength(TInt &)
IMPORT_C
TInt
|
GetSignalStrength
|
(
|
TInt
&
|
aSignalStrength
|
)
|
const
|
Get the signal strenth of the currently tuned frequency.
Parameters
TInt
& aSignalStrength
|
On return contains the signal strength.
|
GetSquelch(TBool &)
IMPORT_C
TInt
|
GetSquelch
|
(
|
TBool
&
|
aSquelch
|
)
|
const
|
Get the current squelching (muting in frequencies without reception) setting.
Parameters
TBool
& aSquelch
|
On return, will be ETrue if a squelching is currently enabled.
|
GetStereoMode(TBool &)
IMPORT_C
TInt
|
GetStereoMode
|
(
|
TBool
&
|
aStereo
|
)
|
const
|
Get the current frequency's stereo mode (stereo or mono).
Parameters
TBool
& aStereo
|
On return, will be ETrue if a stereo signal is currently being received.
|
NewL(RRadioSession &, MRadioFmTunerObserver &)
Factory function to create a new instance of the FM tuner.
RequestTunerControl()
IMPORT_C void
|
RequestTunerControl
|
(
|
)
|
|
Asynchronous request to get control of the FM tuner. This method call must be made before any other method calls in this API.
User
must be ready to receive callback method MrftoRequestTunerControlComplete. Control to the tuner must be granted before any functions that require control of the tuner (such as SetFrequency) can be made. The only API call that doesn't require tuner control to be granted is
EnableTunerInOfflineMode()
.
SetFrequency(TInt)
IMPORT_C void
|
SetFrequency
|
(
|
TInt
|
aFrequency
|
)
|
|
Asynchronous request to tune the tuner to the speficied frequency (Hz).
User
must be ready to receive callback method MrftoTuneComplete.
-
Since
-
S60 3.2
MRadioFmTunerObserver::MrftoTuneComplete
Parameters
TInt
aFrequency
|
The frequency to tune to
|
SetFrequencyRange(TFmRadioFrequencyRange)
IMPORT_C void
|
SetFrequencyRange
|
(
|
TFmRadioFrequencyRange
|
aRange
|
)
|
|
Asynchronous request to set the frequency range.
User
must be ready to receive callback method MrftoSetFrequencyRangeComplete. If not set, it will be defaulted to EFmRangeEuroAmerica.
Parameters
TFmRadioFrequencyRange
aRange
|
Frequency range
|
SetSquelch(TBool)
Set the current squleching (muting in frequencies without reception) setting. Squelching is enabled by default.
StationSeek(TBool)
IMPORT_C void
|
StationSeek
|
(
|
TBool
|
aUpwards
|
)
|
|
Asynchronous request to find a radio station, starting from the currently tuned frequency and searching in the direction specified (i.e. up or down).
User
must be ready to receive callback method MrftoSeekComplete. The station found is returned in the callback.
If no station is found after a complete loop, seek will stop and return KErrNotfound in the callback method and frequency will not change.
Parameters
TBool
aUpwards
|
The direction to search in. Searches upwards if set to ETrue.
|
Member Data Documentation
CBody * iBody
FM tuner utility implementation body Own.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.