CTelephonyAudioRouting Class Reference

class CTelephonyAudioRouting : public CBase

Used by telephony applications to query outputs and to configure the output where audio will be routed.

TelephonyAudioRouting.lib
Since
Series 60 3.1

Inherits from

Member Functions Documentation

AvailableOutputs()

const TArray < TAudioOutput > & AvailableOutputs ( ) [pure virtual]
Returns array of currently available outputs. The array contains list of following outputs depending on whether the output is available or not at the time of query:
  • EHandset

  • ELoudspeaker

  • EWiredAudioAccessory,

  • EWiredAccessory,

  • EBTAudioAccessory

  • ETTY Audio can be routed to any of the available outputs in the list.

Since
Series 60 3.1

GetShowNote(TBool &)

TInt GetShowNote ( TBool & aMode ) [pure virtual]

Parameters

TBool & aMode

NewL(MTelephonyAudioRoutingObserver &)

IMPORT_C CTelephonyAudioRouting * NewL ( MTelephonyAudioRoutingObserver & aObserver ) [static]

Factory interface returning a new instance of CTelephonyAudioRouting .

If the server is not created by the Adaptation, this leaves with KErrNotReady. If the client does not have MultimediaDD capability, this leaves with KErrPermissionDenied.

Leaves on failure.

Since
Series 60 3.1

Parameters

MTelephonyAudioRoutingObserver & aObserver

Output()

TAudioOutput Output ( ) [pure virtual]
Returns the current output configured by the client application to play telephony audio. Possible values are:
  • ENotActive : If output has not been set by any or one of the telephony apps has called SetOutputL(ENotActive) successfully.

  • ENone : If user has destroyed audio link by long key press on the BT device.

  • EHandset or ELoudspeaker or EWiredAudioAccessory or EBTAudioAccessory or ETTY depending on the last successful SetOutputL() call. EBTAudioAccessory is also returned when adaptation routes audio from device to BT accessory automatically when user initiated long key press event occurs.

Since
Series 60 3.1

PreviousOutput()

TAudioOutput PreviousOutput ( ) [pure virtual]
Returns the second last output that was successfully configured to play telephony audio. Possible values are:
  • ENotActive : If output had not been set or one of the telephony apps had previously called SetOutputL(ENotActive) successfully.

  • EHandset or ELoudspeaker or EWiredAudioAccessory or EBTAudioAccessory or ETTY depending on the second last successful SetOutputL() call.

Since
Series 60 3.1

SetOutputL(TAudioOutput)

void SetOutputL ( TAudioOutput aOutput = ENotActive ) [pure virtual]

Sends an asynchronous request to Adaptation to set the output where telephony audio will be routed. This request is completed only when the application receives MTelephonyAudioRoutingObserver::SetOutputComplete callback.

If MTelephonyAudioRoutingObserver::SetOutputComplete returns KErrNone, aOutput requested by this application is configured by Adaptation. Otherwise there was error configuring aOutput and application should call CTelephonyAudioRouting::Output to get the active output.

Leaves on following cases:
  • System wide error code when failure to send request.

  • KErrArgument when parameter is ENone.

  • KErrHardwareNotAvailable if aOutput is not in the list of available outputs.

Since
Series 60 3.1

Parameters

TAudioOutput aOutput = ENotActive : output requested by application. This can only be any of the outputs from AvailableOutputs() list or ENotActive.

SetShowNote(TBool)

TInt SetShowNote ( TBool aMode ) [pure virtual]

Parameters

TBool aMode

Member Enumerations Documentation

Enum TAudioOutput

Enumerators

ENotActive
ENone
EHandset
ELoudspeaker
EWiredAudioAccessory
EBTAudioAccessory
ETTY