RRadioSession Class Reference

class RRadioSession : public RSessionBase

Main interface to the Radio Server. Implements the client-side session.

RadioSession.lib
Since
S60 3.0

Inherits from

Public Member Functions
RRadioSession()
IMPORT_C voidCancelAFSearch()
IMPORT_C voidCancelGetFreqByPTY()
IMPORT_C voidCancelGetFreqByTA()
IMPORT_C voidCancelGetPSByPTY()
IMPORT_C voidCancelGetPSByTA()
IMPORT_C voidCancelNotifyRadioTextPlusChange()
IMPORT_C voidCancelNotifyRdsDataChange()
IMPORT_C voidCancelRdsStationSeek()
voidCancelRequest(TInt)
IMPORT_C voidCancelSetFrequency()
IMPORT_C voidCancelSetFrequencyRange()
IMPORT_C voidCancelStationSeek()
IMPORT_C voidClose()
IMPORT_C TIntConnect(MRadioObserver &, TBool)
IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)
IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)
IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)
IMPORT_C TIntEnableTunerInOfflineMode(TBool)
IMPORT_C TIntForceMonoReception(TBool)
IMPORT_C TIntGetAutomaticSwitching(TBool &)
IMPORT_C TIntGetAutomaticTrafficAnnouncement(TBool &)
IMPORT_C TIntGetBalance(TInt &, TInt &)
IMPORT_C TIntGetClockTime(TDateTime &)
IMPORT_C TIntGetForceMonoReception(TBool &)
IMPORT_C voidGetFreqByPTY(TRsRdsProgrammeType)
IMPORT_C voidGetFreqByTA()
IMPORT_C TIntGetFrequency(TInt &)
IMPORT_C TIntGetFrequencyRange(TRsFrequencyRange &, TInt &, TInt &)
IMPORT_C TIntGetMaxSignalStrength(TInt &)
IMPORT_C TIntGetMaxVolume(TInt &)
IMPORT_C TIntGetMuteStatus(TBool &)
IMPORT_C voidGetPSByPTY(TRsRdsProgrammeType)
IMPORT_C voidGetPSByTA()
IMPORT_C TIntGetProgrammeIdentification(TInt &)
IMPORT_C TIntGetProgrammeService(TRsRdsPSName &)
IMPORT_C TIntGetProgrammeType(TRsRdsProgrammeType &)
IMPORT_C TIntGetRadioText(TRsRdsRadioText &)
IMPORT_C TIntGetRadioTextPlus(TRsRdsRTplusClass, TRsRdsRadioText &)
IMPORT_C TIntGetRdsCapabilities(TRsRdsCapabilities &)
IMPORT_C TIntGetRdsSignalStatus(TBool &)
IMPORT_C TIntGetSignalStrength(TInt &)
IMPORT_C TIntGetSquelch(TBool &)
IMPORT_C TIntGetStereoMode(TBool &)
IMPORT_C TIntGetTrafficAnnouncementStatus(TBool &)
IMPORT_C TIntGetTrafficProgrammeStatus(TBool &)
IMPORT_C TIntGetTunerCapabilities(TRsTunerCapabilities &)
IMPORT_C TIntGetVolume(TInt &)
IMPORT_C TIntMute(TBool)
IMPORT_C TIntNotifyRadioTextPlusChange(RArray< TInt > &)
IMPORT_C TIntNotifyRdsDataChange(TRsRdsData)
IMPORT_C voidPlay()
IMPORT_C TIntPlayerState(TRsPlayerState &)
IMPORT_C voidRequestTunerControl(TRsTuner)
IMPORT_C TIntSetAutomaticSwitching(TBool)
IMPORT_C TIntSetAutomaticTrafficAnnouncement(TBool)
IMPORT_C TIntSetBalance(TInt, TInt)
IMPORT_C voidSetFrequency(TInt)
IMPORT_C voidSetFrequencyRange(TRsFrequencyRange)
IMPORT_C TIntSetSquelch(TBool)
IMPORT_C TIntSetVolume(TInt)
IMPORT_C TIntSetVolumeRamp(const TTimeIntervalMicroSeconds &)
IMPORT_C voidStationSeek(TBool)
IMPORT_C voidStationSeekByPTY(TRsRdsProgrammeType, TBool)
IMPORT_C voidStationSeekByTA(TBool)
IMPORT_C voidStationSeekByTP(TBool)
IMPORT_C voidStop(TBool)
IMPORT_C TVersionVersion()
Private Member Functions
voidStartEventHandlersL(MRadioObserver &)
voidStartRdsEventHandlersL(TUint32)
voidStartRequestHandlersL(MRadioObserver &)
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
TBool iConnected
TMMFMessageDestinationPckg iDestinationPckg
RPointerArray< CRadioEventHandler >iEventHandlers
MRadioObserver *iObserver
TBool iPrimaryClient
RPointerArray< CRadioEventHandler >iRdsEventHandlers
TBool iRdsNotify
RPointerArray< CRadioRequest >iRequests
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RRadioSession()

IMPORT_CRRadioSession()

C++ default constructor.

Member Functions Documentation

CancelAFSearch()

IMPORT_C voidCancelAFSearch()

Cancel ongoing search for an Alternate Frequency (AF) with stronger signal.

Client can issue this request to interrupt the search indicated with MRadioObserver::RadioEventRdsSearchBeginAF.

Since
S60 3.2

CancelGetFreqByPTY()

IMPORT_C voidCancelGetFreqByPTY()

Cancels an ongoing request to find all frequencies sending a given Programme Type (PTY). The usual callback will not occur if this has been called.

Since
S60 3.2

CancelGetFreqByTA()

IMPORT_C voidCancelGetFreqByTA()

Cancels an ongoing request to find all frequencies sending Traffic Announcement. The usual callback will not occur if this has been called.

Since
S60 3.2

CancelGetPSByPTY()

IMPORT_C voidCancelGetPSByPTY()

Cancels an ongoing request to find all Programme Service names (PS) sending a given Programme Type (PTY). The usual callback will not occur if this has been called.

Since
S60 3.2

CancelGetPSByTA()

IMPORT_C voidCancelGetPSByTA()

Cancels an ongoing request to find all Programme Service names (PS) sending Traffic Announcement. The usual callback will not occur if this has been called.

Since
S60 3.2

CancelNotifyRadioTextPlusChange()

IMPORT_C voidCancelNotifyRadioTextPlusChange()

Cancel NotifyRadioTextPlusChange request.

Since
S60 3.2

CancelNotifyRdsDataChange()

IMPORT_C voidCancelNotifyRdsDataChange()

Cancel NotifyRdsDataChange request.

Since
S60 3.2

CancelRdsStationSeek()

IMPORT_C voidCancelRdsStationSeek()

Cancels an ongoing retune operation, as initiated by a call to StationSeekByPTY, StationSeekByTA, or StationSeekByTP. The usual callback will not occur if this has been called.

Since
S60 3.2

CancelRequest(TInt)

voidCancelRequest(TIntaRequest)

Used internally to cancel outstanding asynchronous requests. This is triggered by CRadioRequest.

Since
S60 3.0

Parameters

TInt aRequestThe outstanding asynchronous request being cancelled

CancelSetFrequency()

IMPORT_C voidCancelSetFrequency()

Cancels an outstanding SetFrequency request. Note that SetFrequency may complete before cancel can occur and a callback to MRadioObserver::SetFrequencyComplete may occur.

Since
S60 3.0

CancelSetFrequencyRange()

IMPORT_C voidCancelSetFrequencyRange()

Cancels an outstanding SetFrequencyRange request. Note that SetFrequencyRange may complete before cancel can occur and a callback may occur.

Since
S60 3.2

CancelStationSeek()

IMPORT_C voidCancelStationSeek()

Cancels an outstanding StationSeek request. Note that StationSeek may complete before cancel can occur and a callback to MRadioObserver::StationSeekComplete may occur.

Since
S60 3.0

Close()

IMPORT_C voidClose()

Closes connection to the radio server.

Since
S60 3.0

Connect(MRadioObserver &, TBool)

IMPORT_C TIntConnect(MRadioObserver &aObserver,
TBoolaPrimaryClient
)
Connects a client to the radio server.
Since
S60 3.0

Parameters

MRadioObserver & aObserverThe observer object for receiving async completion callbacks.
TBool aPrimaryClientIndicates whether the client is a primary client. Primary clients are clients that can control the radio tuner such as FM Radio Application, Visual Radio, or a Java Radio App. Non-primary clients are observers of the tuner, player, and RDS utilities and cannot exist without a primary client such as Active Idle, Cover UI, or a smart accessory driver.

CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)

IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TRequestStatus &aStatus
)

From MCustomCommand Sends an asynchronous custom command to the radio server.

Since
S60 3.0

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the uid of the interface of this message
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter
const TDesC8 & aDataTo1The first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2The second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
TRequestStatus & aStatusThe TRequestStatus of an active object. This will contain the result of the request on completion. The exact range of result values is dependent on the interface.

CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)

IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TDes8 &aDataFrom,
TRequestStatus &aStatus
)

From MCustomCommand Sends an asynchronous custom command to the radio server.

Since
S60 3.0

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the uid of the interface of this message
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter
const TDesC8 & aDataTo1The first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2The second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
TDes8 & aDataFromThe area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8.
TRequestStatus & aStatusThe TRequestStatus of an active object. This will contain the result of the request on completion. The exact range of result values is dependent on the interface.

CustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)

IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2
)

From MCustomCommand Sends a synchronous custom command to the radio server.

Since
S60 3.0

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the uid of the interface of this message
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter
const TDesC8 & aDataTo1The first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2The second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.

CustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)

IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TDes8 &aDataFrom
)

From MCustomCommand Sends a synchronous custom command to the radio server.

Since
S60 3.0

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the uid of the interface of this message
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter
const TDesC8 & aDataTo1The first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2The second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
TDes8 & aDataFromThe area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8.

EnableTunerInOfflineMode(TBool)

IMPORT_C TIntEnableTunerInOfflineMode(TBoolaEnable)

EnableTunerInOfflineMode on the device.

Since
S60 3.2

Parameters

TBool aEnableETrue to enable tuner functions in offline mode, EFalse to disable.

ForceMonoReception(TBool)

IMPORT_C TIntForceMonoReception(TBoolaForcedMono)

Indicates whether the reception should be forced into monophonic mode.

Since
S60 3.2

Parameters

TBool aForcedMono

GetAutomaticSwitching(TBool &)

IMPORT_C TIntGetAutomaticSwitching(TBool &aAuto)

Find out whether automatic switching is on or off.

Since
S60 3.2

Parameters

TBool & aAutoOn return, ETrue indicates that automatic switching is enabled.

GetAutomaticTrafficAnnouncement(TBool &)

IMPORT_C TIntGetAutomaticTrafficAnnouncement(TBool &aAuto)

Find out whether automatic traffic announcement is enabled.

Since
S60 3.2

Parameters

TBool & aAutoOn return, ETrue indicates that automatic traffic announcement is on.

GetBalance(TInt &, TInt &)

IMPORT_C TIntGetBalance(TInt &aLeftPercentage,
TInt &aRightPercentage
)const

Get the current speaker balance setting.

Since
S60 3.2

Parameters

TInt & aLeftPercentageOn return contains the left speaker volume percentage.
TInt & aRightPercentageOn return contains the right speaker volume percentage.

GetClockTime(TDateTime &)

IMPORT_C TIntGetClockTime(TDateTime &aCt)

Get the current Clock Time and date. RDS data is received over the air and may not be available immediately following tune operation. If data is not available, this function will return KErrNotFound. If a value is returned, this is the last known value, which may not be up to date. To be notified of the most recent value, client should use NotifyRdsDataChange.

Since
S60 3.2

Parameters

TDateTime & aCtOn return contains current time and date

GetForceMonoReception(TBool &)

IMPORT_C TIntGetForceMonoReception(TBool &aForcedMono)const
Checks whether force mono reception is on or not.
Since
S60 3.2

Parameters

TBool & aForcedMono

GetFreqByPTY(TRsRdsProgrammeType)

IMPORT_C voidGetFreqByPTY(TRsRdsProgrammeTypeaPty)

Asynchronous request to find all frequencies sending the given Programme Type (PTY). User must be ready to receive callback method GetFreqByPTYComplete.

NOTE: This is only supported in dual tuner configuration since the secondary tuner needs to perform continuous scanning for frequencies broadcasting given Programme Type while the primary tuner is used for normal tuner activities. Client should first check the tuner capabilities. Will return KErrNotSupported in callback method if this feature is not supported.

Parameters

TRsRdsProgrammeType aPtyThe type of programme to search for

GetFreqByTA()

IMPORT_C voidGetFreqByTA()

Asynchronous request to find all frequencies sending Traffic Announcement (TA). User must be ready to receive callback method GetFreqByTAComplete.

NOTE: This is only supported in dual tuner configuration since the secondary tuner needs to perform continuous scanning for frequencies broadcasting given Traffic Announcement while the primary tuner is used for normal tuner activities. Client should first check the tuner capabilities. Will return KErrNotSupported in callback method if this feature is not supported.

GetFrequency(TInt &)

IMPORT_C TIntGetFrequency(TInt &aFrequency)const

Get the current frequency.

Since
S60 3.2

Parameters

TInt & aFrequencyOn return contains the current frequency(Hz).

GetFrequencyRange(TRsFrequencyRange &, TInt &, TInt &)

IMPORT_C TIntGetFrequencyRange(TRsFrequencyRange &aRange,
TInt &aMinFreq,
TInt &aMaxFreq
)const

Get the current frequency range. It also returns the minimum and maximum frequencies(Hz) for the returned range.

Since
S60 3.2

Parameters

TRsFrequencyRange & aRangeOn return contains the current frequency range.
TInt & aMinFreqOn return contains the minimum frequency for the current frequency range.
TInt & aMaxFreqOn return contains the maximum frequency for the current frequency range.

GetMaxSignalStrength(TInt &)

IMPORT_C TIntGetMaxSignalStrength(TInt &aMaxSignalStrength)const

Gets the maximum possible signal strength of a tuned signal.

Since
S60 3.2

Parameters

TInt & aMaxSignalStrength

GetMaxVolume(TInt &)

IMPORT_C TIntGetMaxVolume(TInt &aMaxVolume)const

Retrieves the maximum volume supported.

Since
S60 3.0

Parameters

TInt & aMaxVolume

GetMuteStatus(TBool &)

IMPORT_C TIntGetMuteStatus(TBool &aMute)const

Find out if the audio is muted or not.

Since
S60 3.2

Parameters

TBool & aMute

GetPSByPTY(TRsRdsProgrammeType)

IMPORT_C voidGetPSByPTY(TRsRdsProgrammeTypeaPty)

Asynchronous request to find all Programme Service names (PS) sending the given Programme Type (PTY). User must be ready to receive callback method GetPSByPTYComplete.

NOTE: This is only supported in dual tuner configuration since the secondary tuner needs to perform continuous scanning for frequencies broadcasting given Programme Type while the primary tuner is used for normal tuner activities. Client should first check the tuner capabilities. Will return KErrNotSupported in callback method if this feature is not supported.

Parameters

TRsRdsProgrammeType aPtyThe type of programme to search for

GetPSByTA()

IMPORT_C voidGetPSByTA()

Asynchronous request to find all Programme Service names (PS) sending Traffic Announcement (TA). User must be ready to receive callback method GetPSByTAComplete.

NOTE: This is only supported in dual tuner configuration since the secondary tuner needs to perform continuous scanning for frequencies broadcasting given Traffic Announcement while the primary tuner is used for normal tuner activities. Client should first check the tuner capabilities. Will return KErrNotSupported in callback method if this feature is not supported.

GetProgrammeIdentification(TInt &)

IMPORT_C TIntGetProgrammeIdentification(TInt &aPi)

Get the current Programme Identification code. RDS data is received over the air and may not be available immediately following tune operation. If data is not available, this function will return KErrNotFound. If a value is returned, this is the last known value, which may not be up to date. To be notified of the most recent value, client should use NotifyRdsDataChange.

Since
S60 3.2

Parameters

TInt & aPiOn return contains Programme Identification code

GetProgrammeService(TRsRdsPSName &)

IMPORT_C TIntGetProgrammeService(TRsRdsPSName &aPs)

Get the current Programme Service name. RDS data is received over the air and may not be available immediately following tune operation. If data is not available, this function will return KErrNotFound. If a value is returned, this is the last known value, which may not be up to date. To be notified of the most recent value, client should use NotifyRdsDataChange.

Programme Service name is fixed to 8 characters.

Since
S60 3.2

Parameters

TRsRdsPSName & aPsOn return contains Programme Service name

GetProgrammeType(TRsRdsProgrammeType &)

IMPORT_C TIntGetProgrammeType(TRsRdsProgrammeType &aPty)

Get the current Programme Type. RDS data is received over the air and may not be available immediately following tune operation. If data is not available, this function will return KErrNotFound. If a value is returned, this is the last known value, which may not be up to date. To be notified of the most recent value, client should use NotifyRdsDataChange.

Since
S60 3.2

Parameters

TRsRdsProgrammeType & aPtyOn return contains Programme Type

GetRadioText(TRsRdsRadioText &)

IMPORT_C TIntGetRadioText(TRsRdsRadioText &aRt)

Get the current Radio Text. RDS data is received over the air and may not be available immediately following tune operation. If data is not available, this function will return KErrNotFound. If a value is returned, this is the last known value, which may not be up to date. To be notified of the most recent value, client should use NotifyRdsDataChange.

The maximum possible length for radio text field is 64 characters.

Since
S60 3.2

Parameters

TRsRdsRadioText & aRtOn return contains Radio Text

GetRadioTextPlus(TRsRdsRTplusClass, TRsRdsRadioText &)

IMPORT_C TIntGetRadioTextPlus(TRsRdsRTplusClassaRtPlusClass,
TRsRdsRadioText &aRtPlusData
)

Get the current Radio Text+. RDS data is received over the air and may not be available immediately following tune operation. If data is not available, this function will return KErrNotFound. If a value is returned, this is the last known value, which may not be up to date. To be notified of the most recent value, client should use NotifyRdsDataChange.

The maximum possible length for radio text+ field is 64 characters.

Since
S60 3.2

Parameters

TRsRdsRTplusClass aRtPlusClassRadio text plus class
TRsRdsRadioText & aRtPlusDataOn return contains Radio Text+ field

GetRdsCapabilities(TRsRdsCapabilities &)

IMPORT_C TIntGetRdsCapabilities(TRsRdsCapabilities &aCaps)const

Get the capabilities of the RDS control on the device.

Since
S60 3.2

Parameters

TRsRdsCapabilities & aCapsThe capabilities object to fill

GetRdsSignalStatus(TBool &)

IMPORT_C TIntGetRdsSignalStatus(TBool &aRdsSignal)const

Get the status of the RDS reception.

Since
S60 3.2

Parameters

TBool & aRdsSignalOn return, will be ETrue if RDS signal can be recepted, EFalse otherwise.

GetSignalStrength(TInt &)

IMPORT_C TIntGetSignalStrength(TInt &aSignalStrength)const

Gets the signal strength of the currently tuned signal.

Since
S60 3.2

Parameters

TInt & aSignalStrength

GetSquelch(TBool &)

IMPORT_C TIntGetSquelch(TBool &aSquelch)const

Retrieves the current squelching (muting in frequencies without reception) setting

Since
S60 3.2

Parameters

TBool & aSquelchETrue if a squelching is currently enabled

GetStereoMode(TBool &)

IMPORT_C TIntGetStereoMode(TBool &aStereo)const

Get the stereo mode of the radio.

Since
S60 3.2

Parameters

TBool & aStereoOn return, will be ETrue if signal is stereo.

GetTrafficAnnouncementStatus(TBool &)

IMPORT_C TIntGetTrafficAnnouncementStatus(TBool &aTaStatus)

Get Traffic Announcement status at the current station.

Since
S60 3.2

Parameters

TBool & aTaStatusOn return, will be ETrue if current station has ongoing traffic announcement

GetTrafficProgrammeStatus(TBool &)

IMPORT_C TIntGetTrafficProgrammeStatus(TBool &aTpStatus)

Get Traffic Programme status at the current station.

Since
S60 3.2

Parameters

TBool & aTpStatusOn return, will be ETrue if current station supports traffic programme

GetTunerCapabilities(TRsTunerCapabilities &)

IMPORT_C TIntGetTunerCapabilities(TRsTunerCapabilities &aCaps)const

Get the capabilities of the radio on the device.

Since
S60 3.2

Parameters

TRsTunerCapabilities & aCapsThe capabilities object to fill

GetVolume(TInt &)

IMPORT_C TIntGetVolume(TInt &aVolume)const

Get the current volume.

Since
S60 3.2

Parameters

TInt & aVolumeOn return contains the current volume.

Mute(TBool)

IMPORT_C TIntMute(TBoolaMute)

Mutes or unmutes playback.

Since
S60 3.0

Parameters

TBool aMuteETrue to mute the audio, EFalse to unmute it.

NotifyRadioTextPlusChange(RArray< TInt > &)

IMPORT_C TIntNotifyRadioTextPlusChange(RArray< TInt > &aRtPlusClasses)

Subscribe for notification for the specified RadioText+ data. Client should first check the capabilities to see if RT+ feature is supported. Returns KErrNotSupported if RT+ is not supported.

Note that if the client wishes to receive the entire radio text data chunk, client should subscribe for ERsRdsRadioText using NotifyRdsDataChange instead.

Parameters

RArray< TInt > & aRtPlusClassesArray of RT+ class to be notified

NotifyRdsDataChange(TRsRdsData)

IMPORT_C TIntNotifyRdsDataChange(TRsRdsDataaRdsData)

Subscribe for notification for the specified RDS data. Client should first check the capabilities to see if a feature is supported. Request for notification for non-supported features will simply be ignored.

Parameters

TRsRdsData aRdsDataBitfield indicating notification request.

Play()

IMPORT_C voidPlay()

Starts radio playback.

Since
S60 3.0

PlayerState(TRsPlayerState &)

IMPORT_C TIntPlayerState(TRsPlayerState &aState)const

Retrieve the current state of the player. If the radio is already playing, client should simply retrieve current settings such as volume, etc.

Since
S60 3.2

Parameters

TRsPlayerState & aState

RequestTunerControl(TRsTuner)

IMPORT_C voidRequestTunerControl(TRsTuneraTuner)

Request for control of a tuner. If this method returns KErrNone, control of the tuner has been granted. Control to the tuner must be granted before any other request can be made.

Parameters

TRsTuner aTuner

SetAutomaticSwitching(TBool)

IMPORT_C TIntSetAutomaticSwitching(TBoolaAuto)

Turn on/off automatic switching of frequency based on Alternate Frequency. This will cause RDS device to search for alternate frequency when the signal strength deteriorates. User should be ready to receive RadioEventRdsSearchBeginAF and RadioEventRdsSearchEndAF. Automatic switching is off by default.

Parameters

TBool aAutoETrue to turn automatic switching on, EFalse to turn it off.

SetAutomaticTrafficAnnouncement(TBool)

IMPORT_C TIntSetAutomaticTrafficAnnouncement(TBoolaAuto)

Turns on/off automatic switching of frequency based on Traffic Announcement. This will cause RDS device to search for frequencies broadcasting traffic announcement. Client will be notified of frequency change though the tuner event. It's up to the client to return to the previous frequency when the traffic announcement is finished.

NOTE: This is only supported in dual tuner configuration since the secondary tuner needs to perform continuous scanning for frequency broadcasting traffic announcement, while the primary tuner is used for normal tuner activities.

Since
S60 3.2

Parameters

TBool aAutoETrue indicates that automatic switching is on.

SetBalance(TInt, TInt)

IMPORT_C TIntSetBalance(TIntaLeftPercentage,
TIntaRightPercentage
)

Set the speaker balance for playing.

Since
S60 3.2

Parameters

TInt aLeftPercentageLeft speaker volume percentage. This value ranges from 0 to 100.
TInt aRightPercentageRight speaker volume percentage. This value ranges from 0 to 100.

SetFrequency(TInt)

IMPORT_C voidSetFrequency(TIntaFrequency)

Asynchronous request to tune the tuner to the specified frequency.

Since
S60 3.2
MRadioObserver::SetFrequecyComplete

Parameters

TInt aFrequencyThe frequency (Hz) to tune to

SetFrequencyRange(TRsFrequencyRange)

IMPORT_C voidSetFrequencyRange(TRsFrequencyRangeaRange)

Asynchronous request to set the frequency range. If the frequency range is not set, it will be defaulted to ERsTunerFM.

Parameters

TRsFrequencyRange aRangeFrequency range

SetSquelch(TBool)

IMPORT_C TIntSetSquelch(TBoolaEnabled)

Enable or disable quelch.

Since
S60 3.2

Parameters

TBool aEnabledETrue to enable squelching, EFalse to disable it.

SetVolume(TInt)

IMPORT_C TIntSetVolume(TIntaVolume)

Sets the volume to the specified level.

Since
S60 3.0

Parameters

TInt aVolumeThe volume level to set

SetVolumeRamp(const TTimeIntervalMicroSeconds &)

IMPORT_C TIntSetVolumeRamp(const TTimeIntervalMicroSeconds &aRampInterval)

Set a volume ramp.

Since
S60 3.2

Parameters

const TTimeIntervalMicroSeconds & aRampIntervalThe time interval over which the volume should be increased from zero to the current volume setting.

StartEventHandlersL(MRadioObserver &)

voidStartEventHandlersL(MRadioObserver &aObserver)[private]

Creates event handlers for tuner and playback events from radio tuner.

Parameters

MRadioObserver & aObserver

StartRdsEventHandlersL(TUint32)

voidStartRdsEventHandlersL(TUint32aRdsFunctions)[private]

Creates event handlers for RDS events from radio tuner.

Parameters

TUint32 aRdsFunctions

StartRequestHandlersL(MRadioObserver &)

voidStartRequestHandlersL(MRadioObserver &aObserver)[private]

Creates request handlers for each asynchronous request.

Parameters

MRadioObserver & aObserver

StationSeek(TBool)

IMPORT_C voidStationSeek(TBoolaUpwards)

Asynchronous request to find a radio station, starting from current frequency and seaching in the direction specified (i.e. up or down).

Parameters

TBool aUpwards

StationSeekByPTY(TRsRdsProgrammeType, TBool)

IMPORT_C voidStationSeekByPTY(TRsRdsProgrammeTypeaPty,
TBoolaSeekUp
)

Asynchronous request to find a radio station with the specified Programme Type(PTY), 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 StationSeekByPTYComplete The station found is returned in the callback.

Parameters

TRsRdsProgrammeType aPtyThe type of programme to search for.
TBool aSeekUpThe direction to search in. Searches upwards if set to ETrue.

StationSeekByTA(TBool)

IMPORT_C voidStationSeekByTA(TBoolaSeekUp)

Asynchronous request to find a radio station with Traffic Announcement(TA), 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 StationSeekByTAComplete The station found is returned in the callback.

Parameters

TBool aSeekUpThe direction to search in. Searches upwards if set to ETrue.

StationSeekByTP(TBool)

IMPORT_C voidStationSeekByTP(TBoolaSeekUp)

Asynchronous request to find a radio station with Traffic Programme(TP), 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 StationSeekByTPComplete The station found is returned in the callback.

Parameters

TBool aSeekUpThe direction to search in. Searches upwards if set to ETrue.

Stop(TBool)

IMPORT_C voidStop(TBoolaIfOnlyPrimaryClient = EFalse)

Stops playback, and release the output device for use by other clients.

Since
S60 3.0

Parameters

TBool aIfOnlyPrimaryClient = EFalseETrue to stop playback only if there are no other primary clients

Version()

IMPORT_C TVersionVersion()const

Gets the client side version number.

Since
S60 3.0

Member Data Documentation

TBool iConnected

TBool iConnected[private]

TMMFMessageDestinationPckg iDestinationPckg

TMMFMessageDestinationPckg iDestinationPckg[private]

RPointerArray< CRadioEventHandler > iEventHandlers

RPointerArray< CRadioEventHandler >iEventHandlers[private]

MRadioObserver * iObserver

MRadioObserver *iObserver[private]

TBool iPrimaryClient

TBool iPrimaryClient[private]

RPointerArray< CRadioEventHandler > iRdsEventHandlers

RPointerArray< CRadioEventHandler >iRdsEventHandlers[private]

TBool iRdsNotify

TBool iRdsNotify[private]

RPointerArray< CRadioRequest > iRequests

RPointerArray< CRadioRequest >iRequests[private]