CCallAudioControl Class Reference

class CCallAudioControl : public CBase

Inherits from

Public Member Functions
~CCallAudioControl ()
IMPORT_C TInt AppendDownlinkVolumeObserver ( CDownlinkVolumeObserver &)
IMPORT_C TInt AppendRoutingObserver ( CRoutingObserver &)
IMPORT_C TInt AppendUplinkGainObserver ( CUplinkGainObserver &)
IMPORT_C TInt GetAvailableOutputs ( RArray < CCallAudioControl::TAudioOutput > &)
IMPORT_C TInt GetDownlinkVolume ( TUint &)
IMPORT_C TInt GetMaxDownlinkVolume ( TUint &)
IMPORT_C TInt GetMinDownlinkVolume ( TUint &)
IMPORT_C TInt GetOutput ( CCallAudioControl::TAudioOutput &)
IMPORT_C TInt GetUplinkMute ( TBool &)
IMPORT_C CCallAudioControl * NewL ()
IMPORT_C TInt PreviousOutput ( CCallAudioControl::TAudioOutput &)
IMPORT_C TInt RemoveDownlinkVolumeObserver ( CDownlinkVolumeObserver &)
IMPORT_C TInt RemoveRoutingObserver ( CRoutingObserver &)
IMPORT_C TInt RemoveUplinkGainObserver ( CUplinkGainObserver &)
IMPORT_C TInt SetDownlinkVolume ( TUint )
IMPORT_C TInt SetOutput ( CCallAudioControl::TAudioOutput )
IMPORT_C TInt SetUplinkMute ( TBool )
Private Member Functions
CCallAudioControl ()
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()
Public Member Enumerations
enum TAudioOutput {
ENotActive , ENone , EHandset , ELoudspeaker , EWiredAudioAccessory , EBTAudioAccessory , ETTY
}
Private Attributes
CCallAudioControlImpl * iImpl

Constructor & Destructor Documentation

CCallAudioControl()

CCallAudioControl ( ) [private]

~CCallAudioControl()

IMPORT_C ~CCallAudioControl ( )

Destrurctor

Since
Series 60 3.1, 3.2
capability
None

Member Functions Documentation

AppendDownlinkVolumeObserver(CDownlinkVolumeObserver &)

IMPORT_C TInt AppendDownlinkVolumeObserver ( CDownlinkVolumeObserver & aObserver )

Appends downlink volume observer to list.

Since
Series 60 3.1, 3.2
capability
None

Parameters

CDownlinkVolumeObserver & aObserver

AppendRoutingObserver(CRoutingObserver &)

IMPORT_C TInt AppendRoutingObserver ( CRoutingObserver & aObserver )

Appends routing observer to list.

Since
Series 60 3.1, 3.2
capability
None

Parameters

CRoutingObserver & aObserver

AppendUplinkGainObserver(CUplinkGainObserver &)

IMPORT_C TInt AppendUplinkGainObserver ( CUplinkGainObserver & aObserver )

Appends uplink gain observer to list.

Since
Series 60 3.1, 3.2
capability
None

Parameters

CUplinkGainObserver & aObserver

ConstructL()

void ConstructL ( ) [private]

GetAvailableOutputs(RArray< CCallAudioControl::TAudioOutput > &)

IMPORT_C TInt GetAvailableOutputs ( RArray < CCallAudioControl::TAudioOutput > & aAvailableOutputs )

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, 3.2
capability
None

Parameters

RArray < CCallAudioControl::TAudioOutput > & aAvailableOutputs

GetDownlinkVolume(TUint &)

IMPORT_C TInt GetDownlinkVolume ( TUint & aVolume )

Returns the call audio speaker volume level that is used for call audio.

When a call is active, for devices on which volume can be set viz EHandset, ELoudspeaker, EWiredAudioAccessory, this function returns the volume level of the current active output device. For devices on which volume cannot be set viz EBTAudioAccessory, ETTY, or ENone this function returns KErrUnknown.

When there is no active call, this function returns the volume level of the earpiece that will be used for next active call.

Since
Series 60 3.1, 3.2
capability
None

Parameters

TUint & aVolume

GetMaxDownlinkVolume(TUint &)

IMPORT_C TInt GetMaxDownlinkVolume ( TUint & aVolume )

Returns the maximum volume level that can be set on speaker for call audio.

Since
Series 60 3.1, 3.2
capability
None

Parameters

TUint & aVolume

GetMinDownlinkVolume(TUint &)

IMPORT_C TInt GetMinDownlinkVolume ( TUint & aVolume )

Returns the minumum volume level that can be set on speaker for call audio.

Since
Series 60 3.1, 3.2
capability
None

Parameters

TUint & aVolume

GetOutput(CCallAudioControl::TAudioOutput &)

IMPORT_C TInt GetOutput ( CCallAudioControl::TAudioOutput & aOutput )

Returns the current output.

The value returned represents output enumeration where call audio is currently routed.

Possible values are:
  • ENotActive : If output has not been set by any application or if output is disabled.

  • 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 SetOutput() call. EBTAudioAccessory is also returned when system routes audio from device to BT accessory automatically when user initiated long key press event occurs.

Since
Series 60 3.1, 3.2
capability
None

GetUplinkMute(TBool &)

IMPORT_C TInt GetUplinkMute ( TBool & aMute )

Returns call audio uplink (microphone) mute attribute.

If returned value is ETrue, call audio uplink is muted. If returned value is EFalse, call audio uplink is un-muted.

Since
Series 60 3.1, 3.2
capability
None

Parameters

TBool & aMute

NewL()

IMPORT_C CCallAudioControl * NewL ( ) [static]

Factory interface returning a new instance of CCallAudioControl .

Leaves on failure.

Since
Series 60 3.1, 3.2
capability
None

PreviousOutput(CCallAudioControl::TAudioOutput &)

IMPORT_C TInt PreviousOutput ( CCallAudioControl::TAudioOutput & aPrevOutput )

Returns the previous output.

Returns the second last output that was successfully configured to play call audio by this client. Possible values are:
  • ENotActive : If output had not been set or one of the call apps had previously called SetOutput(ENotActive) successfully.

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

Since
Series 60 3.1, 3.2
capability
None

Parameters

CCallAudioControl::TAudioOutput & aPrevOutput

RemoveDownlinkVolumeObserver(CDownlinkVolumeObserver &)

IMPORT_C TInt RemoveDownlinkVolumeObserver ( CDownlinkVolumeObserver & aObserver )

Remove downlink observer from list.

Since
Series 60 3.1, 3.2
capability
None

Parameters

CDownlinkVolumeObserver & aObserver

RemoveRoutingObserver(CRoutingObserver &)

IMPORT_C TInt RemoveRoutingObserver ( CRoutingObserver & aObserver )

Remove routing observer from list.

Since
Series 60 3.1, 3.2
capability
None

Parameters

CRoutingObserver & aObserver

RemoveUplinkGainObserver(CUplinkGainObserver &)

IMPORT_C TInt RemoveUplinkGainObserver ( CUplinkGainObserver & aObserver )

Remove uplink gain observer from list.

Since
Series 60 3.1, 3.2
capability
None

Parameters

CUplinkGainObserver & aObserver

SetDownlinkVolume(TUint)

IMPORT_C TInt SetDownlinkVolume ( TUint aVolume )

Sets the speaker volume level for current call audio.

The volume level specified should be in the range of minimum and maximum volume level (both inclusive).

Setting downlink volume to minimum will mute the downlink stream.

When a call is active, for devices on which volume can be set viz EHandset, ELoudspeaker, EWiredAudioAccessory, this function sets the volume level of the current active output device. For devices on which volume cannot be set viz EBTAudioAccessory, ETTY, or ENone this function returns KErrNotSupported.

Since
Series 60 3.1, 3.2
capability
WriteDeviceData

Parameters

TUint aVolume

SetOutput(CCallAudioControl::TAudioOutput)

IMPORT_C TInt SetOutput ( CCallAudioControl::TAudioOutput aOutput )

Request to route call audio to a specific device.

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

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

Since
Series 60 3.1, 3.2
capability
MultimediaDD

Parameters

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

SetUplinkMute(TBool)

IMPORT_C TInt SetUplinkMute ( TBool aMute )

Sets the call audio uplink (microphone) mute to on or off.

Setting attribute to ETrue will mute call audio uplink. Calling this function with EFalse will unmutes call audio uplink.

Since
Series 60 3.1, 3.2
capability
WriteDeviceData

Parameters

TBool aMute

Member Enumerations Documentation

Enum TAudioOutput

Enumerators

ENotActive

NotActive

ENone

None

EHandset

Handset

ELoudspeaker

Loudspeaker

EWiredAudioAccessory

Wired Audio Accessory

EBTAudioAccessory

BT Audio Accessory

ETTY

TTY

Member Data Documentation

CCallAudioControlImpl * iImpl

CCallAudioControlImpl * iImpl [private]