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 TInt CallAudioRoutePreferenceChanged ()
IMPORT_C void GetAudioMuteSync ( TBool &)
IMPORT_C void GetAudioVolumeSync ( TInt &)
IMPORT_C void HandleCallEnding ()
IMPORT_C TInt HandleCallStarting ( TBool )
IMPORT_C TInt HandleEnergencyCallStarting ()
TBool IsBTAvailable ()
TBool IsTTYAvailable ()
TBool IsWiredAvailable ()
CTelephonyAudioRouting::TAudioOutput Output ()
CTelephonyAudioRouting::TAudioOutput PreviousOutput ()
CTelephonyAudioRouting::TAudioOutput RoutePreference ()
void SendErrorMessage (const TInt )
void SendMessage (const MEngineMonitor::TPEMessagesFromPhoneEngine )
void SendMessage (const MEngineMonitor::TPEMessagesFromPhoneEngine , const CTelephonyAudioRouting::TAudioOutput )
void SendMessage (const MEngineMonitor::TPEMessagesFromPhoneEngine , CTelephonyAudioRouting &)
IMPORT_C void SetAudioMuteSync (const TBool )
IMPORT_C TInt SetAudioOutput (const TPEAudioOutput , TBool )
IMPORT_C void SetAudioVolumeSync (const TInt )
IMPORT_C void SetDefaultVolume ()
void SetRoutePreference ( TBool )
void SetTAROutput ( CTelephonyAudioRouting::TAudioOutput , TBool )
IMPORT_C void StartUp ()
Protected Member Functions
CPEAudioData ( MPEPhoneModelInternal &)
void ConstructL (CPEAudioFactory &)
void DoHandleVolumeChange ( TInt )
Private Member Functions
TPEAudioOutput ConvertToPE ( CTelephonyAudioRouting::TAudioOutput )
CTelephonyAudioRouting::TAudioOutput ConvertToTAR ( TPEAudioOutput )
TArray < TPEAudioOutput > GetAvailableOutputs ( CTelephonyAudioRouting &)
void InitializeAudioVolumes ()
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 TInt CallAudioRoutePreferenceChanged ( )

Handles call audio route preference changed

ConstructL(CPEAudioFactory &)

void ConstructL ( 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::TAudioOutput aOutput ) [private]

Converts TAR route value to PE value

ConvertToTAR(TPEAudioOutput)

CTelephonyAudioRouting::TAudioOutput ConvertToTAR ( TPEAudioOutput aOutput ) [private]

Converts PE route value to TAR value

Parameters

TPEAudioOutput aOutput

DoHandleVolumeChange(TInt)

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

Parameters

TInt aVolume New volume value.

GetAudioMuteSync(TBool &)

IMPORT_C void GetAudioMuteSync ( TBool & aAudioMute ) const

Retrieves Audio mute synchronously.

Parameters

TBool & aAudioMute

GetAudioVolumeSync(TInt &)

IMPORT_C void GetAudioVolumeSync ( 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 void HandleCallEnding ( )

Ends call audio route when call disconnected

HandleCallStarting(TBool)

IMPORT_C TInt HandleCallStarting ( TBool aVideoCall )

Initialises call audio route when call is alerting or answered

Parameters

TBool aVideoCall

HandleEnergencyCallStarting()

IMPORT_C TInt HandleEnergencyCallStarting ( )

Initialises energency call audio route

InitializeAudioVolumes()

void InitializeAudioVolumes ( ) [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)

void SendErrorMessage ( const TInt aErrorCode )

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

Parameters

const TInt aErrorCode

SendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngine)

void SendMessage ( const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage )

Forwards message given as parameter to PhoneEngine.

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

void SendMessage ( const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage,
const CTelephonyAudioRouting::TAudioOutput aOutput
)

Forwards message given as parameter to Phone Engine

SendMessage(const MEngineMonitor::TPEMessagesFromPhoneEngine, CTelephonyAudioRouting &)

void SendMessage ( const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage,
CTelephonyAudioRouting & aTelephonyAudioRouting
)

Forwards message given as parameter to Phone Engine

Parameters

const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage
CTelephonyAudioRouting & aTelephonyAudioRouting

SetAudioMuteSync(const TBool)

IMPORT_C void SetAudioMuteSync ( const TBool aAudioMute )

Makes synchronous request to set Audio Mute.

Parameters

const TBool aAudioMute

SetAudioOutput(const TPEAudioOutput, TBool)

IMPORT_C TInt SetAudioOutput ( const TPEAudioOutput aOutput,
TBool aShowNote
)

Makes request to Telephony Audio Routing to set audio output path

Parameters

const TPEAudioOutput aOutput
TBool aShowNote

SetAudioVolumeSync(const TInt)

IMPORT_C void SetAudioVolumeSync ( const TInt aAudioVolume )

Makes synchronous request to set Audio Volume.

Parameters

const TInt aAudioVolume

SetDefaultVolume()

IMPORT_C void SetDefaultVolume ( )

Sets default volume level if muted when call ended

SetRoutePreference(TBool)

void SetRoutePreference ( TBool aShowNote )

Sets value of audio routing preference

Parameters

TBool aShowNote

SetTAROutput(CTelephonyAudioRouting::TAudioOutput, TBool)

void SetTAROutput ( CTelephonyAudioRouting::TAudioOutput aOutput,
TBool aShowNote
)

Set new audio route to TAR

StartUp()

IMPORT_C void StartUp ( )

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]