CHWRMFmTx Class Reference

class CHWRMFmTx : public CBase

Base class of FM Tx Client API of HWRM

The HWRM FM Tx API provides the ability to control the device's FM radio transmitter

Inherits from

Member Functions Documentation

CancelGetNextClearFrequency()

voidCancelGetNextClearFrequency()[pure virtual]

The CancelGetNextClearFrequency method cancels any outstanding GetNextClearFrequency requests. If no requests have been made, then this has no effect. Note that the request may complete, before it can be cancelled.

CancelSetNextClearFrequency()

voidCancelSetNextClearFrequency()[pure virtual]

The CancelSetNextClearFrequency method cancels any outstanding SetNextClearFrequency requests. If no requests have been made, then this has no effect. Note that the request may complete, before it can be cancelled.

ClearRadiotextData()

voidClearRadiotextData()[pure virtual]

The ClearRdsData method clears any Radiotext or Radiotext+ data previously set by clients.

ClearRdsData()

voidClearRdsData()[pure virtual]

The ClearRdsData method clears any RDS data previously set by clients. This does not include Radiotext or Radiotext+ data.

DisableAutoFrequencyL()

voidDisableAutoFrequencyL()[pure virtual]

The DisableAutoFrequency method disables the FM Tx automatic frequency tuning mode.

Exceptions
KErrInUse

if reserved by another client. KErrGeneral if there is a hardware error.

DisableL()

voidDisableL()[pure virtual]

The DisableL method switches the FM transmitter off. This is a synchronous method that will block the client application.

Exceptions
KErrInUse

if reserved by another client. KErrGeneral if there is a hardware error.

EnableAutoFrequencyL()

voidEnableAutoFrequencyL()[pure virtual]

The EnableAutoFrequency method enables the FM Tx automatic frequency tuning mode. In this mode, the transmitter will continuously scan for interference from other transmitters. When interference is detected, the FM Tx frequency will change automatically, resulting in a MHWRMFmTxObserver::FmTxFrequencyChanged indication.

Exceptions
KErrInUse

if reserved by another client. KErrNotSupported if auto frequency is unsupported KErrGeneral if there is a hardware error. KErrNotReady if FM Tx is not enabled

EnableL(TInt)

voidEnableL(TIntaFrequency = 0)[pure virtual]

The EnableL method switches the FM transmitter on. This is a synchronous method that will block the client application.

Exceptions
KErrInUse

if reserved by another client. KErrArgument if frequency is out of range KErrNotReady if there is a wired accessory conflict. Some accessories are mutually exclusive with FM Tx. KErrNoMemory if there is a memory allocation failure. KErrGeneral if there is a hardware error.

Parameters

TInt aFrequency = 0The initial transmitter frequency. Defaults to the previous frequency setting in Central Repository.

Frequency()

TInt Frequency()const [pure virtual]

The Frequency method queries the current FM Tx frequency

GetFrequencyRangeL(TFmTxFrequencyRange &)

voidGetFrequencyRangeL(TFmTxFrequencyRange &aFrequencyRange)const [pure virtual]

The GetFrequencyRangeL method queries the valid FM frequency range

Exceptions
KErrInUse

if reserved by another client KErrGeneral if there is a hardware error

Parameters

TFmTxFrequencyRange & aFrequencyRangeOn return, min. and max. frequencies and step size of the FM range (kHz)

GetNextClearFrequency(TRequestStatus &, TInt &)

voidGetNextClearFrequency(TRequestStatus &aStatus,
TInt &aClearFrequency
)[pure virtual]

The GetNextClearFrequency method requests a new clear frequency suggestion. This results in a RSSI scan at the hardware level, starting from the frequency increment after the previous suggested clear frequency. This is an asynchronous method.

Parameters

TRequestStatus & aStatusThis will be completed when a clear frequency is found
TInt & aClearFrequencyThe clear frequency is returned in this parameter, which is only valid when aStatus == KErrNone.

GetNextClearFrequencyL(TInt &)

voidGetNextClearFrequencyL(TInt &aClearFrequency)[pure virtual]

The GetNextClearFrequency method requests a new clear frequency suggestion. This results in a RSSI scan at the hardware level, starting from the frequency increment after the previous suggested clear frequency. This is a synchronous method that will block the client application.

Exceptions
KErrInUse

if reserved by another client KErrNotSupported if RSSI scanning is unsupported KErrGeneral if there is a hardware error KErrNotReady if FM Tx is not enabled

Parameters

TInt & aClearFrequencyOn return, this is set to a new (suggested) clear frequency.

GetNextClearFrequencyL(TClearFrequencyArray &, TUint &)

voidGetNextClearFrequencyL(TClearFrequencyArray &aClearFrequencyArray,
TUint &aCount
)[pure virtual]

The GetNextClearFrequency method requests a new clear frequency suggestion. This results in a RSSI scan at the hardware level, starting from the frequency increment after the previous suggested clear frequency. This is a synchronous method that will block the client application.

Exceptions
KErrInUse

if reserved by another client KErrArgument If aCount is out of range KErrNotSupported if RSSI scanning is unsupported KErrGeneral if there is a hardware error KErrNotReady if FM Tx is not enabled

Parameters

TClearFrequencyArray & aClearFrequencyArrayOn return, this contains 0-KClearFrequencyArrayMax clear frequencies.
TUint & aCountThe number of clear frequencies requested (1-KClearFrequencyArrayMax) On return, this is set to the actual number of clear frequencies found.

GetNextClearFrequencyL(TRequestStatus &, TClearFrequencyArray &, TUint &)

voidGetNextClearFrequencyL(TRequestStatus &aStatus,
TClearFrequencyArray &aClearFrequencyArray,
TUint &aCount
)[pure virtual]

The GetNextClearFrequency method requests a new clear frequency suggestion. This results in a RSSI scan at the hardware level, starting from the frequency increment after the previous suggested clear frequency. This is an asynchronous method.

Exceptions
KErrArgument

if aCount is out of range

Parameters

TRequestStatus & aStatusThis will be completed when a clear frequency is found
TClearFrequencyArray & aClearFrequencyArrayOn return, this contains 0-KClearFrequencyArrayMax clear frequencies.
TUint & aCountThe number of clear frequencies requested (1-KClearFrequencyArrayMax). On completion, this is set to the actual number of clear frequencies found.

GetRdsData(TFmTxRdsData &)

voidGetRdsData(TFmTxRdsData &aData)[pure virtual]

The GetRdsData method Queries the current FM Tx RDS data. If FM Tx is enabled, then this data is being transmitted.

Parameters

TFmTxRdsData & aDataThe current FM Tx RDS data.

IsAutoFrequencyEnabled()

TBool IsAutoFrequencyEnabled()[pure virtual]

The IsAutoFrequencyEnabled method queries whether auto frequency mode is enabled.

NewL(MHWRMFmTxObserver *)

IMPORT_C CHWRMFmTx *NewL(MHWRMFmTxObserver *aCallback = NULL)[static]

Two-phased constructor for implementation class. Use this method for creating a FM Tx client with callbacks.

Exceptions
KErrNotSupported

Device doesn't support FM Tx feature. KErrNoMemory if there is a memory allocation failure.

Parameters

MHWRMFmTxObserver * aCallback = NULLPointer to callback instance (NULL if callbacks are not required).

NewLC(MHWRMFmTxObserver *)

IMPORT_C CHWRMFmTx *NewLC(MHWRMFmTxObserver *aCallback = NULL)[static]

Two-phased constructor for implementation class. Use this method for creating a FM Tx client with callbacks. Leaves instance on cleanup stack.

Exceptions
KErrNotSupported

Device doesn't support FM Tx feature. KErrNoMemory if there is a memory allocation failure.

Parameters

MHWRMFmTxObserver * aCallback = NULLPointer to callback instance (NULL if callbacks are not required).

Release()

voidRelease()[pure virtual]

Releases FM Tx resource, if it was previously reserved for this client. If this client has not reserved FM Tx, then this method does nothing.

ReserveL(TBool)

voidReserveL(TBoolaForceNoCCoeEnv)[pure virtual]

Reserves FM Tx resource exclusively for this client. A higher priority client may cause lower priority client reservation to be temporarily suspended. If FM Tx is already reserved by a higher or equal priority application, reserving will still succeed, but reservation is immediately suspended. The suspended client will not get any notification about suspension. Any ongoing commands will be cancelled, when a client s reservation is suspended. Only reservation and status query commands may be issued, in the suspended state.

Exceptions
KErrAccessDenied

if aForceNoCCoeEnv is ETrue and client is not trusted. KErrBadHandle if aForceNoCCoeEnv is EFalse and no CCoeEnv present. KErrNotReady if trying to reserve while on background and aForceNoCCoeEnv is EFalse. KErrNoMemory if there is a memory allocation failure.

Parameters

TBool aForceNoCCoeEnvIf EFalse, then reservation requires that this client is on the foreground at the time of reservation and FM Tx will be automatically released and re-reserved based on background/foreground status of the this client. This also implies that CCoeEnv::Static() != NULL is required. If ETrue, the client will not require CCoeEnv to be present nor does it automatically reserve/release FM Tx. Only trusted clients are allowed to set this flag to ETrue.

SetFrequencyL(TInt)

voidSetFrequencyL(TIntaFrequency)[pure virtual]

The SetFrequencyL method sets the FM transmission frequency. FM Tx does not need to be enabled. This is a synchronous method that will block the client application.

Exceptions
KErrInUse

if reserved by another client KErrArgument if frequency parameter is out of range KErrGeneral if there is a hardware error

Parameters

TInt aFrequency

SetNextClearFrequency(TRequestStatus &, TInt &)

voidSetNextClearFrequency(TRequestStatus &aStatus,
TInt &aClearFrequency
)[pure virtual]

The SetNextClearFrequency method sets the FM Tx frequency to a new clear frequency suggested. This is equivalent to calling SetFrequencyL, with a result returned from GetNextClearFrequency. This is an asynchronous method.

Parameters

TRequestStatus & aStatusThis will be completed when a clear frequency is found
TInt & aClearFrequencyThe clear frequency is returned in this parameter, which is only valid when aStatus == KErrNone.

SetNextClearFrequencyL(TInt &)

voidSetNextClearFrequencyL(TInt &aClearFrequency)[pure virtual]

The SetNextClearFrequency method sets the FM Tx frequency to a new clear frequency suggested. This is equivalent to calling SetFrequencyL, with a result returned from GetNextClearFrequency. This is a synchronous method that will block the client application.

Exceptions
KErrInUse

if reserved by another client. KErrNotSupported if RSSI scanning is unsupported KErrGeneral if there is a hardware error. KErrNotReady if FM Tx is not enabled

Parameters

TInt & aClearFrequencyOn return, this is set to the new Tx frequency.

SetRadiotextL(TDes &)

voidSetRadiotextL(TDes &aText)[pure virtual]

The SetRadiotext method sets the Radiotext to be transmitted.

Exceptions
KErrInUse

if reserved by another client. KErrNotSupported if Radiotext is unsupported KErrArgument if non-latin characters are supplied KErrGeneral if there is a hardware error. KErrNotReady if FM Tx is not enabled

Parameters

TDes & aTextThe new Radiotext data.

SetRadiotextPlusL(TDes &, TRtPlusContentType)

voidSetRadiotextPlusL(TDes &aText,
TRtPlusContentTypeaContentType
)[pure virtual]

The SetRadiotextPlus method sets the Radiotext+ to be transmitted.

Exceptions
KErrInUse

if reserved by another client. KErrNotSupported if Radiotext+ is unsupported KErrArgument if non-latin characters are supplied or if content type not valid. KErrGeneral if there is a hardware error. KErrNotReady if FM Tx is not enabled

Parameters

TDes & aTextThe new Radiotext+ data.
TRtPlusContentType aContentType

SetRadiotextPlusL(TDes &, TRtPlusTag)

voidSetRadiotextPlusL(TDes &aText,
TRtPlusTagaTag
)[pure virtual]

The SetRadiotextPlus method sets the Radiotext+ to be transmitted.

Exceptions
KErrInUse

if reserved by another client. KErrNotSupported if Radiotext+ is unsupported KErrArgument if non-latin characters are supplied or if RT-plus tag content not valid. KErrGeneral if there is a hardware error. KErrNotReady if FM Tx is not enabled

Parameters

TDes & aTextThe new Radiotext+ data.
TRtPlusTag aTagA Radiotext+ tag.

SetRadiotextPlusL(TDes &, TRtPlusTag, TRtPlusTag)

voidSetRadiotextPlusL(TDes &aText,
TRtPlusTagaTag1,
TRtPlusTagaTag2
)[pure virtual]

The SetRadiotextPlus method sets the Radiotext+ to be transmitted.

Exceptions
KErrInUse

if reserved by another client. KErrNotSupported if Radiotext+ is unsupported KErrArgument if non-latin characters are supplied or if RT-plus tag content not valid. KErrGeneral if there is a hardware error. KErrNotReady if FM Tx is not enabled

Parameters

TDes & aTextThe new Radiotext+ data.
TRtPlusTag aTag1
TRtPlusTag aTag2

SetRdsLanguageIdL(TRdsLanguageIdType)

voidSetRdsLanguageIdL(TRdsLanguageIdTypeaLanguageId)[pure virtual]

The SetRdsLanguageId method sets the RDS language ID. Only relevant if MS flag is set to Speech.

Exceptions
KErrInUse

if reserved by another client. KErrNotSupported if RDS is unsupported KErrArgument if aLanguageId out of range KErrGeneral if there is a hardware error. KErrNotReady if FM Tx is not enabled

Parameters

TRdsLanguageIdType aLanguageIdThe new language ID.

SetRdsMsL(TBool)

voidSetRdsMsL(TBoolaMusic)[pure virtual]

The SetRdsMS method sets the RDS Music/Speech flag

Exceptions
KErrInUse

if reserved by another client. KErrNotSupported if RDS is unsupported KErrGeneral if there is a hardware error. KErrNotReady if FM Tx is not enabled

Parameters

TBool aMusicETrue if transmitting music. EFalse if transmitting speech.

SetRdsPtyL(TRdsProgrammeType)

voidSetRdsPtyL(TRdsProgrammeTypeaPty)[pure virtual]

The SetRdsPTY method sets the RDS Programme Type to be transmitted.

Exceptions
KErrInUse

if reserved by another client. KErrNotSupported if RDS is unsupported KErrArgument if aPty out of range KErrGeneral if there is a hardware error. KErrNotReady if FM Tx is not enabled

Parameters

TRdsProgrammeType aPtyThe new Programme Type

SetRdsPtynL(TRdsProgrammeTypeName &)

voidSetRdsPtynL(TRdsProgrammeTypeName &aPtyn)[pure virtual]

The SetRdsPTYN method sets the RDS Programme Type Name to be transmitted.

Exceptions
KErrInUse

if reserved by another client. KErrNotSupported if RDS is unsupported KErrArgument if non-latin characters are supplied or programme type name too long KErrGeneral if there is a hardware error. KErrNotReady if FM Tx is not enabled

Parameters

TRdsProgrammeTypeName & aPtynThe new Programme Type Name

Status()

TFmTxState Status()const [pure virtual]

This method retrieves the current FM Tx state.

MHWRMFmTxObserver