CRadioRdsUtility::CBody Class Reference

class CRadioRdsUtility::CBody : public CBase

This class encapsulates the implementation body of CRadioRdsUtility interface.

Radio_Utility.lib
Since
S60 3.2

Inherits from

Public Member Functions
~CBody ()
void CancelAFSearch ()
void CancelGetFreqByPTY ()
void CancelGetFreqByTA ()
void CancelGetPSByPTY ()
void CancelGetPSByTA ()
void CancelNotifyRdsDataChange ()
void CancelRdsStationSeek ()
void Close ()
TInt GetAutomaticSwitching ( TBool &)
IMPORT_C TInt GetAutomaticTrafficAnnouncement ( TBool &)
TInt GetCapabilities ( TRdsCapabilities &)
TInt GetClockTime ( TDateTime &)
void GetFreqByPTY ( TRdsProgrammeType )
void GetFreqByTA ()
void GetPSByPTY ( TRdsProgrammeType )
void GetPSByTA ()
TInt GetProgrammeIdentification ( TInt &)
TInt GetProgrammeService ( TRdsPSName &)
TInt GetProgrammeType ( TRdsProgrammeType &)
TInt GetRadioText ( TRdsRadioText &)
TInt GetRadioTextPlus ( TRdsRTplusClass , TRdsRadioText &)
TInt GetRdsSignalStatus ( TBool &)
TInt GetTrafficAnnouncementStatus ( TBool &)
TInt GetTrafficProgrammeStatus ( TBool &)
CBody * NewL ( RRadioSession &, MRadioRdsObserver &)
TInt NotifyRdsDataChange ( TRdsData )
TInt SetAutomaticSwitching ( TBool )
TInt SetAutomaticTrafficAnnouncement ( TBool )
IMPORT_C void StationSeekByPTY ( TRdsProgrammeType , TBool )
void StationSeekByTA ( TBool )
void StationSeekByTP ( TBool )
Private Member Functions
CBody ()
void ConstructL ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
MRadioRdsObserver * iRadioRdsUtilityClient
RRadioSession * iRadioSession
TRsRdsData iRdsDataReq

Constructor & Destructor Documentation

CBody()

CBody ( ) [private]

~CBody()

~CBody ( )

Member Functions Documentation

CancelAFSearch()

void CancelAFSearch ( )

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

Client can issue this request to interrupt the search indicated with MRadioRdsObserver::MrroRdsSearchBeginAF .

Since
S60 3.2

CancelGetFreqByPTY()

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

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

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

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

CancelNotifyRdsDataChange()

void CancelNotifyRdsDataChange ( )

Cancel NotifyRdsDataChange request.

Since
S60 3.2

CancelRdsStationSeek()

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

Close()

void Close ( )

Close the RDS utility and free all memory allocated.

Since
S60 3.2

ConstructL()

void ConstructL ( ) [private]

GetAutomaticSwitching(TBool &)

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.

GetCapabilities(TRdsCapabilities &)

TInt GetCapabilities ( TRdsCapabilities & aCaps ) const

Get the capabilities of the RDS control on the device.

Since
S60 3.2

Parameters

TRdsCapabilities & aCaps The capabilities object to fill

GetClockTime(TDateTime &)

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

GetFreqByPTY(TRdsProgrammeType)

void GetFreqByPTY ( TRdsProgrammeType aPty )

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

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

TRdsProgrammeType aPty The type of programme to search for

GetFreqByTA()

void GetFreqByTA ( )

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

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.

GetPSByPTY(TRdsProgrammeType)

void GetPSByPTY ( TRdsProgrammeType aPty )

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

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

TRdsProgrammeType aPty The type of programme to search for

GetPSByTA()

void GetPSByTA ( )

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

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 &)

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(TRdsPSName &)

TInt GetProgrammeService ( TRdsPSName & 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

TRdsPSName & aPs On return contains Programme Service name

GetProgrammeType(TRdsProgrammeType &)

TInt GetProgrammeType ( TRdsProgrammeType & 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

TRdsProgrammeType & aPty On return contains Programme Type

GetRadioText(TRdsRadioText &)

TInt GetRadioText ( TRdsRadioText & 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 is 64 characters.

Since
S60 3.2

Parameters

TRdsRadioText & aRt On return contains Radio Text

GetRadioTextPlus(TRdsRTplusClass, TRdsRadioText &)

TInt GetRadioTextPlus ( TRdsRTplusClass aRtPlusClass,
TRdsRadioText & 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

TRdsRTplusClass aRtPlusClass Radio text plus class
TRdsRadioText & aRtPlusData On return contains Radio Text+ field

GetRdsSignalStatus(TBool &)

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.

GetTrafficAnnouncementStatus(TBool &)

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 &)

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

NewL(RRadioSession &, MRadioRdsObserver &)

CBody * NewL ( RRadioSession & aRadioSession,
MRadioRdsObserver & aObserver
) [static]

Parameters

RRadioSession & aRadioSession
MRadioRdsObserver & aObserver

NotifyRdsDataChange(TRdsData)

TInt NotifyRdsDataChange ( TRdsData 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.

For example, if the client wishes to be notified when new Programme Type and Traffic Announcement is available: iRdsData = ERdsProgrammeType | ERdsTrafficAnnouncement; iRdsUtility->NotifyRdsDataChange(iRdsData);

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.

For example, if the client wishes to be notified only when new Title and Genre are available: iRtPlusClassArray.Append(ERTplusItemTitle); iRtPlusClassArray.Append(ERTplusItemTitle); iRdsUtility->NotifyRadioTextPlusChangeL(iRtPlusClassArray);

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

Parameters

TRdsData aRdsData Bitfield indicating notification request.

SetAutomaticSwitching(TBool)

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 MrroRdsSearchBeginAF and MrroRdsSearchEndAF. Automatic switching is off by default.

Parameters

TBool aAuto ETrue to turn automatic switching on, EFalse to turn it off.

SetAutomaticTrafficAnnouncement(TBool)

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.

StationSeekByPTY(TRdsProgrammeType, TBool)

IMPORT_C void StationSeekByPTY ( TRdsProgrammeType 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 MrroStationSeekByPTYComplete The station found is returned in the callback.

Parameters

TRdsProgrammeType aPty The type of programme to search for.
TBool aSeekUp The direction to search in. Searches upwards if set to ETrue.

StationSeekByTA(TBool)

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 MrroStationSeekByTAComplete The station found is returned in the callback.

Parameters

TBool aSeekUp The direction to search in. Searches upwards if set to ETrue.

StationSeekByTP(TBool)

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 MrroStationSeekByTPComplete The station found is returned in the callback.

Parameters

TBool aSeekUp The direction to search in. Searches upwards if set to ETrue.

Member Data Documentation

MRadioRdsObserver * iRadioRdsUtilityClient

MRadioRdsObserver * iRadioRdsUtilityClient [private]

RRadioSession * iRadioSession

RRadioSession * iRadioSession [private]

TRsRdsData iRdsDataReq

TRsRdsData iRdsDataReq [private]