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 void CancelAFSearch ()
IMPORT_C void CancelGetFreqByPTY ()
IMPORT_C void CancelGetFreqByTA ()
IMPORT_C void CancelGetPSByPTY ()
IMPORT_C void CancelGetPSByTA ()
IMPORT_C void CancelNotifyRadioTextPlusChange ()
IMPORT_C void CancelNotifyRdsDataChange ()
IMPORT_C void CancelRdsStationSeek ()
void CancelRequest ( TInt )
IMPORT_C void CancelSetFrequency ()
IMPORT_C void CancelSetFrequencyRange ()
IMPORT_C void CancelStationSeek ()
IMPORT_C void Close ()
IMPORT_C TInt Connect ( MRadioObserver &, TBool )
IMPORT_C void CustomCommandAsync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TRequestStatus &)
IMPORT_C void CustomCommandAsync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
IMPORT_C TInt CustomCommandSync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &)
IMPORT_C TInt CustomCommandSync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TDes8 &)
IMPORT_C TInt EnableTunerInOfflineMode ( TBool )
IMPORT_C TInt ForceMonoReception ( TBool )
IMPORT_C TInt GetAutomaticSwitching ( TBool &)
IMPORT_C TInt GetAutomaticTrafficAnnouncement ( TBool &)
IMPORT_C TInt GetBalance ( TInt &, TInt &)
IMPORT_C TInt GetClockTime ( TDateTime &)
IMPORT_C TInt GetForceMonoReception ( TBool &)
IMPORT_C void GetFreqByPTY ( TRsRdsProgrammeType )
IMPORT_C void GetFreqByTA ()
IMPORT_C TInt GetFrequency ( TInt &)
IMPORT_C TInt GetFrequencyRange ( TRsFrequencyRange &, TInt &, TInt &)
IMPORT_C TInt GetMaxSignalStrength ( TInt &)
IMPORT_C TInt GetMaxVolume ( TInt &)
IMPORT_C TInt GetMuteStatus ( TBool &)
IMPORT_C void GetPSByPTY ( TRsRdsProgrammeType )
IMPORT_C void GetPSByTA ()
IMPORT_C TInt GetProgrammeIdentification ( TInt &)
IMPORT_C TInt GetProgrammeService ( TRsRdsPSName &)
IMPORT_C TInt GetProgrammeType ( TRsRdsProgrammeType &)
IMPORT_C TInt GetRadioText ( TRsRdsRadioText &)
IMPORT_C TInt GetRadioTextPlus ( TRsRdsRTplusClass , TRsRdsRadioText &)
IMPORT_C TInt GetRdsCapabilities ( TRsRdsCapabilities &)
IMPORT_C TInt GetRdsSignalStatus ( TBool &)
IMPORT_C TInt GetSignalStrength ( TInt &)
IMPORT_C TInt GetSquelch ( TBool &)
IMPORT_C TInt GetStereoMode ( TBool &)
IMPORT_C TInt GetTrafficAnnouncementStatus ( TBool &)
IMPORT_C TInt GetTrafficProgrammeStatus ( TBool &)
IMPORT_C TInt GetTunerCapabilities ( TRsTunerCapabilities &)
IMPORT_C TInt GetVolume ( TInt &)
IMPORT_C TInt Mute ( TBool )
IMPORT_C TInt NotifyRadioTextPlusChange ( RArray < TInt > &)
IMPORT_C TInt NotifyRdsDataChange ( TRsRdsData )
IMPORT_C void Play ()
IMPORT_C TInt PlayerState ( TRsPlayerState &)
IMPORT_C void RequestTunerControl ( TRsTuner )
IMPORT_C TInt SetAutomaticSwitching ( TBool )
IMPORT_C TInt SetAutomaticTrafficAnnouncement ( TBool )
IMPORT_C TInt SetBalance ( TInt , TInt )
IMPORT_C void SetFrequency ( TInt )
IMPORT_C void SetFrequencyRange ( TRsFrequencyRange )
IMPORT_C TInt SetSquelch ( TBool )
IMPORT_C TInt SetVolume ( TInt )
IMPORT_C TInt SetVolumeRamp (const TTimeIntervalMicroSeconds &)
IMPORT_C void StationSeek ( TBool )
IMPORT_C void StationSeekByPTY ( TRsRdsProgrammeType , TBool )
IMPORT_C void StationSeekByTA ( TBool )
IMPORT_C void StationSeekByTP ( TBool )
IMPORT_C void Stop ( TBool )
IMPORT_C TVersion Version ()
Private Member Functions
void StartEventHandlersL ( MRadioObserver &)
void StartRdsEventHandlersL ( TUint32 )
void StartRequestHandlersL ( 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_C RRadioSession ( )

C++ default constructor.

Member Functions Documentation

CancelAFSearch()

IMPORT_C void CancelAFSearch ( )

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 void CancelGetFreqByPTY ( )

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 void CancelGetFreqByTA ( )

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 void CancelGetPSByPTY ( )

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 void CancelGetPSByTA ( )

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 void CancelNotifyRadioTextPlusChange ( )

Cancel NotifyRadioTextPlusChange request.

Since
S60 3.2

CancelNotifyRdsDataChange()

IMPORT_C void CancelNotifyRdsDataChange ( )

Cancel NotifyRdsDataChange request.

Since
S60 3.2

CancelRdsStationSeek()

IMPORT_C void CancelRdsStationSeek ( )

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)

void CancelRequest ( TInt aRequest )

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

Since
S60 3.0

Parameters

TInt aRequest The outstanding asynchronous request being cancelled

CancelSetFrequency()

IMPORT_C void CancelSetFrequency ( )

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 void CancelSetFrequencyRange ( )

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 void CancelStationSeek ( )

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 void Close ( )

Closes connection to the radio server.

Since
S60 3.0

Connect(MRadioObserver &, TBool)

IMPORT_C TInt Connect ( MRadioObserver & aObserver,
TBool aPrimaryClient
)
Connects a client to the radio server.
Since
S60 3.0

Parameters

MRadioObserver & aObserver The observer object for receiving async completion callbacks.
TBool aPrimaryClient Indicates 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 void CustomCommandAsync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
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 & aDestination The destination of the message, consisting of the uid of the interface of this message
TInt aFunction The function number to indicate which function is to be called on the interface defined in the aDestination parameter
const TDesC8 & aDataTo1 The 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 & aDataTo2 The 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 & aStatus The 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 void CustomCommandAsync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
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 & aDestination The destination of the message, consisting of the uid of the interface of this message
TInt aFunction The function number to indicate which function is to be called on the interface defined in the aDestination parameter
const TDesC8 & aDataTo1 The 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 & aDataTo2 The 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 & aDataFrom The area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8.
TRequestStatus & aStatus The 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 TInt CustomCommandSync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
const TDesC8 & aDataTo1,
const TDesC8 & aDataTo2
)

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

Since
S60 3.0

Parameters

const TMMFMessageDestinationPckg & aDestination The destination of the message, consisting of the uid of the interface of this message
TInt aFunction The function number to indicate which function is to be called on the interface defined in the aDestination parameter
const TDesC8 & aDataTo1 The 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 & aDataTo2 The 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 TInt CustomCommandSync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
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 & aDestination The destination of the message, consisting of the uid of the interface of this message
TInt aFunction The function number to indicate which function is to be called on the interface defined in the aDestination parameter
const TDesC8 & aDataTo1 The 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 & aDataTo2 The 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 & aDataFrom The 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 TInt EnableTunerInOfflineMode ( TBool aEnable )

EnableTunerInOfflineMode on the device.

Since
S60 3.2

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.

Since
S60 3.2

Parameters

TBool aForcedMono

GetAutomaticSwitching(TBool &)

IMPORT_C TInt GetAutomaticSwitching ( TBool & aAuto )

Find out whether automatic switching is on or off.

Since
S60 3.2

Parameters

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

GetAutomaticTrafficAnnouncement(TBool &)

IMPORT_C TInt GetAutomaticTrafficAnnouncement ( TBool & aAuto )

Find out whether automatic traffic announcement is enabled.

Since
S60 3.2

Parameters

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

GetBalance(TInt &, TInt &)

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

Get the current speaker balance setting.

Since
S60 3.2

Parameters

TInt & aLeftPercentage On return contains the left speaker volume percentage.
TInt & aRightPercentage On return contains the right speaker volume percentage.

GetClockTime(TDateTime &)

IMPORT_C TInt GetClockTime ( 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 & aCt On return contains current time and date

GetForceMonoReception(TBool &)

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

Parameters

TBool & aForcedMono

GetFreqByPTY(TRsRdsProgrammeType)

IMPORT_C void GetFreqByPTY ( TRsRdsProgrammeType aPty )

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 aPty The type of programme to search for

GetFreqByTA()

IMPORT_C void GetFreqByTA ( )

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 TInt GetFrequency ( TInt & aFrequency ) const

Get the current frequency.

Since
S60 3.2

Parameters

TInt & aFrequency On return contains the current frequency(Hz).

GetFrequencyRange(TRsFrequencyRange &, TInt &, TInt &)

IMPORT_C TInt GetFrequencyRange ( 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 & 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

Gets the maximum possible signal strength of a tuned signal.

Since
S60 3.2

Parameters

TInt & aMaxSignalStrength

GetMaxVolume(TInt &)

IMPORT_C TInt GetMaxVolume ( TInt & aMaxVolume ) const

Retrieves the maximum volume supported.

Since
S60 3.0

Parameters

TInt & aMaxVolume

GetMuteStatus(TBool &)

IMPORT_C TInt GetMuteStatus ( TBool & aMute ) const

Find out if the audio is muted or not.

Since
S60 3.2

Parameters

TBool & aMute

GetPSByPTY(TRsRdsProgrammeType)

IMPORT_C void GetPSByPTY ( TRsRdsProgrammeType aPty )

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 aPty The type of programme to search for

GetPSByTA()

IMPORT_C void GetPSByTA ( )

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 TInt GetProgrammeIdentification ( 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 & aPi On return contains Programme Identification code

GetProgrammeService(TRsRdsPSName &)

IMPORT_C TInt GetProgrammeService ( 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 & aPs On return contains Programme Service name

GetProgrammeType(TRsRdsProgrammeType &)

IMPORT_C TInt GetProgrammeType ( 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 & aPty On return contains Programme Type

GetRadioText(TRsRdsRadioText &)

IMPORT_C TInt GetRadioText ( 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 & aRt On return contains Radio Text

GetRadioTextPlus(TRsRdsRTplusClass, TRsRdsRadioText &)

IMPORT_C TInt GetRadioTextPlus ( TRsRdsRTplusClass aRtPlusClass,
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 aRtPlusClass Radio text plus class
TRsRdsRadioText & aRtPlusData On return contains Radio Text+ field

GetRdsCapabilities(TRsRdsCapabilities &)

IMPORT_C TInt GetRdsCapabilities ( TRsRdsCapabilities & aCaps ) const

Get the capabilities of the RDS control on the device.

Since
S60 3.2

Parameters

TRsRdsCapabilities & aCaps The capabilities object to fill

GetRdsSignalStatus(TBool &)

IMPORT_C TInt GetRdsSignalStatus ( TBool & aRdsSignal ) const

Get the status of the RDS reception.

Since
S60 3.2

Parameters

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

GetSignalStrength(TInt &)

IMPORT_C TInt GetSignalStrength ( TInt & aSignalStrength ) const

Gets the signal strength of the currently tuned signal.

Since
S60 3.2

Parameters

TInt & aSignalStrength

GetSquelch(TBool &)

IMPORT_C TInt GetSquelch ( TBool & aSquelch ) const

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

Since
S60 3.2

Parameters

TBool & aSquelch ETrue if a squelching is currently enabled

GetStereoMode(TBool &)

IMPORT_C TInt GetStereoMode ( TBool & aStereo ) const

Get the stereo mode of the radio.

Since
S60 3.2

Parameters

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

GetTrafficAnnouncementStatus(TBool &)

IMPORT_C TInt GetTrafficAnnouncementStatus ( TBool & aTaStatus )

Get Traffic Announcement status at the current station.

Since
S60 3.2

Parameters

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

GetTrafficProgrammeStatus(TBool &)

IMPORT_C TInt GetTrafficProgrammeStatus ( TBool & aTpStatus )

Get Traffic Programme status at the current station.

Since
S60 3.2

Parameters

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

GetTunerCapabilities(TRsTunerCapabilities &)

IMPORT_C TInt GetTunerCapabilities ( TRsTunerCapabilities & aCaps ) const

Get the capabilities of the radio on the device.

Since
S60 3.2

Parameters

TRsTunerCapabilities & aCaps The capabilities object to fill

GetVolume(TInt &)

IMPORT_C TInt GetVolume ( TInt & aVolume ) const

Get the current volume.

Since
S60 3.2

Parameters

TInt & aVolume On return contains the current volume.

Mute(TBool)

IMPORT_C TInt Mute ( TBool aMute )

Mutes or unmutes playback.

Since
S60 3.0

Parameters

TBool aMute ETrue to mute the audio, EFalse to unmute it.

NotifyRadioTextPlusChange(RArray< TInt > &)

IMPORT_C TInt NotifyRadioTextPlusChange ( 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 > & aRtPlusClasses Array of RT+ class to be notified

NotifyRdsDataChange(TRsRdsData)

IMPORT_C TInt NotifyRdsDataChange ( TRsRdsData aRdsData )

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 aRdsData Bitfield indicating notification request.

Play()

IMPORT_C void Play ( )

Starts radio playback.

Since
S60 3.0

PlayerState(TRsPlayerState &)

IMPORT_C TInt PlayerState ( 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 void RequestTunerControl ( TRsTuner aTuner )

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 TInt SetAutomaticSwitching ( TBool aAuto )

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 aAuto ETrue to turn automatic switching on, EFalse to turn it off.

SetAutomaticTrafficAnnouncement(TBool)

IMPORT_C TInt SetAutomaticTrafficAnnouncement ( TBool aAuto )

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 aAuto ETrue indicates that automatic switching is on.

SetBalance(TInt, TInt)

IMPORT_C TInt SetBalance ( TInt aLeftPercentage,
TInt aRightPercentage
)

Set the speaker balance for playing.

Since
S60 3.2

Parameters

TInt aLeftPercentage Left speaker volume percentage. This value ranges from 0 to 100.
TInt aRightPercentage Right speaker volume percentage. This value ranges from 0 to 100.

SetFrequency(TInt)

IMPORT_C void SetFrequency ( TInt aFrequency )

Asynchronous request to tune the tuner to the specified frequency.

Since
S60 3.2
MRadioObserver::SetFrequecyComplete

Parameters

TInt aFrequency The frequency (Hz) to tune to

SetFrequencyRange(TRsFrequencyRange)

IMPORT_C void SetFrequencyRange ( TRsFrequencyRange aRange )

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

Parameters

TRsFrequencyRange aRange Frequency range

SetSquelch(TBool)

IMPORT_C TInt SetSquelch ( TBool aEnabled )

Enable or disable quelch.

Since
S60 3.2

Parameters

TBool aEnabled ETrue to enable squelching, EFalse to disable it.

SetVolume(TInt)

IMPORT_C TInt SetVolume ( TInt aVolume )

Sets the volume to the specified level.

Since
S60 3.0

Parameters

TInt aVolume The volume level to set

SetVolumeRamp(const TTimeIntervalMicroSeconds &)

IMPORT_C TInt SetVolumeRamp ( const TTimeIntervalMicroSeconds & aRampInterval )

Set a volume ramp.

Since
S60 3.2

Parameters

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

StartEventHandlersL(MRadioObserver &)

void StartEventHandlersL ( MRadioObserver & aObserver ) [private]

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

Parameters

MRadioObserver & aObserver

StartRdsEventHandlersL(TUint32)

void StartRdsEventHandlersL ( TUint32 aRdsFunctions ) [private]

Creates event handlers for RDS events from radio tuner.

Parameters

TUint32 aRdsFunctions

StartRequestHandlersL(MRadioObserver &)

void StartRequestHandlersL ( MRadioObserver & aObserver ) [private]

Creates request handlers for each asynchronous request.

Parameters

MRadioObserver & aObserver

StationSeek(TBool)

IMPORT_C void StationSeek ( TBool aUpwards )

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 void StationSeekByPTY ( TRsRdsProgrammeType aPty,
TBool aSeekUp
)

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 aPty The type of programme to search for.
TBool aSeekUp The direction to search in. Searches upwards if set to ETrue.

StationSeekByTA(TBool)

IMPORT_C void StationSeekByTA ( TBool aSeekUp )

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 aSeekUp The direction to search in. Searches upwards if set to ETrue.

StationSeekByTP(TBool)

IMPORT_C void StationSeekByTP ( TBool aSeekUp )

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 aSeekUp The direction to search in. Searches upwards if set to ETrue.

Stop(TBool)

IMPORT_C void Stop ( TBool aIfOnlyPrimaryClient = EFalse )

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

Since
S60 3.0

Parameters

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

Version()

IMPORT_C TVersion Version ( ) 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]