CPEAudioData Class Reference

class CPEAudioData : public CBase

This file contains the header file of the class CPEAudioData, which is an interface class to audio properties of the system

audiohandling.lib
Since
S60_5.0

Inherits from

Public Member Functions
~CPEAudioData()
IMPORT_C TIntCallAudioRoutePreferenceChanged()
IMPORT_C voidGetAudioMuteSync(TBool &)
IMPORT_C voidGetAudioVolumeSync(TInt &)
IMPORT_C voidHandleCallEnding()
IMPORT_C TIntHandleCallStarting(TBool)
IMPORT_C TIntHandleEnergencyCallStarting()
TBool IsBTAvailable()
TBool IsTTYAvailable()
TBool IsWiredAvailable()
CTelephonyAudioRouting::TAudioOutput Output()
CTelephonyAudioRouting::TAudioOutput PreviousOutput()
CTelephonyAudioRouting::TAudioOutput RoutePreference()
voidSendErrorMessage(const TInt)
voidSendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngine)
voidSendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngine, const CTelephonyAudioRouting::TAudioOutput)
voidSendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngine, CTelephonyAudioRouting &)
IMPORT_C voidSetAudioMuteSync(const TBool)
IMPORT_C TIntSetAudioOutput(const TPEAudioOutput, TBool)
IMPORT_C voidSetAudioVolumeSync(const TInt)
IMPORT_C voidSetDefaultVolume()
voidSetRoutePreference(TBool)
voidSetTAROutput(CTelephonyAudioRouting::TAudioOutput, TBool)
IMPORT_C voidStartUp()
Protected Member Functions
CPEAudioData(MPEPhoneModelInternal &)
voidConstructL(CPEAudioFactory &)
voidDoHandleVolumeChange(TInt)
Private Member Functions
TPEAudioOutput ConvertToPE(CTelephonyAudioRouting::TAudioOutput)
CTelephonyAudioRouting::TAudioOutput ConvertToTAR(TPEAudioOutput)
TArray< TPEAudioOutput >GetAvailableOutputs(CTelephonyAudioRouting &)
voidInitializeAudioVolumes()
TBool IsMuted()
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()
Protected Attributes
TBool iAudioOutputChanged
CTelephonyAudioRouting *iAudioRouting
CPECallAudioRoutingHandler *iAudioRoutingHandler
CPEAudioRoutingMonitor *iAudioRoutingMonitor
TInt iHeadSetVolume
TInt iLoudspeakerVolume
RArray< TPEAudioOutput >iPEavailableOutputs
MPEPhoneModelInternal &iPhoneModel
TBool iRouteInitialized

Constructor & Destructor Documentation

CPEAudioData(MPEPhoneModelInternal &)

CPEAudioData(MPEPhoneModelInternal &aPhoneModel)[protected]

C++ default constructor.

Parameters

MPEPhoneModelInternal & aPhoneModel

~CPEAudioData()

IMPORT_C~CPEAudioData()[virtual]

Destructor.

Member Functions Documentation

CallAudioRoutePreferenceChanged()

IMPORT_C TIntCallAudioRoutePreferenceChanged()

Handles call audio route preference changed

ConstructL(CPEAudioFactory &)

voidConstructL(CPEAudioFactory &aAudioFactory)[protected]

By default Symbian 2nd phase constructor is private, but we use it at generalized class.

Parameters

CPEAudioFactory & aAudioFactory

ConvertToPE(CTelephonyAudioRouting::TAudioOutput)

TPEAudioOutput ConvertToPE(CTelephonyAudioRouting::TAudioOutputaOutput)[private]

Converts TAR route value to PE value

ConvertToTAR(TPEAudioOutput)

CTelephonyAudioRouting::TAudioOutput ConvertToTAR(TPEAudioOutputaOutput)[private]

Converts PE route value to TAR value

Parameters

TPEAudioOutput aOutput

DoHandleVolumeChange(TInt)

voidDoHandleVolumeChange(TIntaVolume)[protected, virtual]
Protected function for derived classes to implement for extended volume handling. Default implementation is empty.
Since
S60 v5.0

Parameters

TInt aVolumeNew volume value.

GetAudioMuteSync(TBool &)

IMPORT_C voidGetAudioMuteSync(TBool &aAudioMute)const

Retrieves Audio mute synchronously.

Parameters

TBool & aAudioMute

GetAudioVolumeSync(TInt &)

IMPORT_C voidGetAudioVolumeSync(TInt &aAudioVolume)const

Retrieves Audio volume synchronously.

Parameters

TInt & aAudioVolume

GetAvailableOutputs(CTelephonyAudioRouting &)

TArray< TPEAudioOutput >GetAvailableOutputs(CTelephonyAudioRouting &aTelephonyAudioRouting)[private]

Makes request to Telephony Audio Routing to get available audio outputs

Parameters

CTelephonyAudioRouting & aTelephonyAudioRouting

HandleCallEnding()

IMPORT_C voidHandleCallEnding()

Ends call audio route when call disconnected

HandleCallStarting(TBool)

IMPORT_C TIntHandleCallStarting(TBoolaVideoCall)

Initialises call audio route when call is alerting or answered

Parameters

TBool aVideoCall

HandleEnergencyCallStarting()

IMPORT_C TIntHandleEnergencyCallStarting()

Initialises energency call audio route

InitializeAudioVolumes()

voidInitializeAudioVolumes()[private]

Gets all audio volume values from reporitory and update member variables

IsBTAvailable()

TBool IsBTAvailable()

Return status of BT accessory availability

IsMuted()

TBool IsMuted()const [private]

Return status of mic mute

IsTTYAvailable()

TBool IsTTYAvailable()

Return status of TTY accessory availability

IsWiredAvailable()

TBool IsWiredAvailable()

Return status of wired accessory availability

Output()

CTelephonyAudioRouting::TAudioOutput Output()

Return value of current output

PreviousOutput()

CTelephonyAudioRouting::TAudioOutput PreviousOutput()

Return value of previous output

RoutePreference()

CTelephonyAudioRouting::TAudioOutput RoutePreference()

Return value of audio routing preference

SendErrorMessage(const TInt)

voidSendErrorMessage(const TIntaErrorCode)

Sends AudioHandlingError message to PhoneEngine and saves errorcode to member variable.

Parameters

const TInt aErrorCode

SendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngine)

voidSendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngineaMessage)

Forwards message given as parameter to PhoneEngine.

SendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngine, const CTelephonyAudioRouting::TAudioOutput)

voidSendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngineaMessage,
const CTelephonyAudioRouting::TAudioOutputaOutput
)

Forwards message given as parameter to Phone Engine

SendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngine, CTelephonyAudioRouting &)

voidSendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngineaMessage,
CTelephonyAudioRouting &aTelephonyAudioRouting
)

Forwards message given as parameter to Phone Engine

Parameters

const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage
CTelephonyAudioRouting & aTelephonyAudioRouting

SetAudioMuteSync(const TBool)

IMPORT_C voidSetAudioMuteSync(const TBoolaAudioMute)

Makes synchronous request to set Audio Mute.

Parameters

const TBool aAudioMute

SetAudioOutput(const TPEAudioOutput, TBool)

IMPORT_C TIntSetAudioOutput(const TPEAudioOutputaOutput,
TBoolaShowNote
)

Makes request to Telephony Audio Routing to set audio output path

Parameters

const TPEAudioOutput aOutput
TBool aShowNote

SetAudioVolumeSync(const TInt)

IMPORT_C voidSetAudioVolumeSync(const TIntaAudioVolume)

Makes synchronous request to set Audio Volume.

Parameters

const TInt aAudioVolume

SetDefaultVolume()

IMPORT_C voidSetDefaultVolume()

Sets default volume level if muted when call ended

SetRoutePreference(TBool)

voidSetRoutePreference(TBoolaShowNote)

Sets value of audio routing preference

Parameters

TBool aShowNote

SetTAROutput(CTelephonyAudioRouting::TAudioOutput, TBool)

voidSetTAROutput(CTelephonyAudioRouting::TAudioOutputaOutput,
TBoolaShowNote
)

Set new audio route to TAR

Parameters

CTelephonyAudioRouting::TAudioOutput aOutput
TBool aShowNote

StartUp()

IMPORT_C voidStartUp()

Gets volume levels, audio mute, audio mode and audio volume at startup and starts monitors.

Member Data Documentation

TBool iAudioOutputChanged

TBool iAudioOutputChanged[protected]

CTelephonyAudioRouting * iAudioRouting

CTelephonyAudioRouting *iAudioRouting[protected]

CPECallAudioRoutingHandler * iAudioRoutingHandler

CPECallAudioRoutingHandler *iAudioRoutingHandler[protected]

CPEAudioRoutingMonitor * iAudioRoutingMonitor

CPEAudioRoutingMonitor *iAudioRoutingMonitor[protected]

TInt iHeadSetVolume

TInt iHeadSetVolume[protected]

TInt iLoudspeakerVolume

TInt iLoudspeakerVolume[protected]

RArray< TPEAudioOutput > iPEavailableOutputs

RArray< TPEAudioOutput >iPEavailableOutputs[protected]

MPEPhoneModelInternal & iPhoneModel

MPEPhoneModelInternal &iPhoneModel[protected]

TBool iRouteInitialized

TBool iRouteInitialized[protected]