--- a/phoneengine/audiohandling/inc/cpeaudiodata.h Thu Aug 19 09:54:27 2010 +0300
+++ b/phoneengine/audiohandling/inc/cpeaudiodata.h Tue Aug 31 15:14:29 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description: This file contains the header file of the class CPEAudioData
+* Description: This file contains the header file of the class CPEAudioData
* which is the interface class for Audio Handling Module
*
*/
@@ -23,8 +23,12 @@
// INCLUDES
#include "mpeaudiodata.h"
#include <PSVariables.h>
-
+
#include <TelephonyAudioRouting.h>
+#include <tmseffect.h>
+#include <tmseffectobsrvr.h>
+
+
// CONSTANTS
// None.
@@ -37,6 +41,8 @@
// FUNCTION PROTOTYPES
// None.
+using namespace TMS;
+
// FORWARD DECLARATIONS
class MPEPhoneModelInternal;
class CPEAudioDtmfTonePlayer;
@@ -44,22 +50,23 @@
class CPECallAudioRoutingHandler;
class CPEAudioFactory;
class CTelephonyAudioRouting;
+class CPEAudioEffect;
// CLASS DECLARATION
/**
-* This file contains the header file of the class CPEAudioData,
-* which is an interface class to audio
+* This file contains the header file of the class CPEAudioData,
+* which is an interface class to audio
* properties of the system
*
* @lib audiohandling.lib
* @since S60_5.0
*/
-class CPEAudioData:
- public CBase,
- public MPEAudioData
+class CPEAudioData : public CBase,
+ public MPEAudioData,
+ public TMSEffectObserver
{
-
+
public:
/**
@@ -75,7 +82,7 @@
CPEAudioData( MPEPhoneModelInternal& aPhoneModel );
public: // from MPEAudioData
-
+
/**
* Retrieves Audio mute synchronously.
* @param aAudioMute, audio mute is returned in this parameter.
@@ -87,7 +94,7 @@
* @param aAudioVolume, audio volume is returned in this parameter.
*/
IMPORT_C void GetAudioVolumeSync( TInt& aAudioVolume ) const;
-
+
/**
* Makes synchronous request to set Audio Mute.
* @param aAudioMute, mute to be set.
@@ -106,47 +113,42 @@
* @param aShowNote, audio note status
* @return KErrNone or possible errorcode.
*/
- IMPORT_C TInt SetAudioOutput(
+ IMPORT_C TInt SetAudioOutput(
const TPEAudioOutput aOutput,
TBool aShowNote );
-
+
/**
- * Gets volume levels, audio mute, audio mode and audio volume
+ * Gets volume levels, audio mute, audio mode and audio volume
* at startup and starts monitors.
* @param None.
* @return None.
*/
IMPORT_C void StartUp();
-
- /**
- * Sets default volume level if muted when call ended
- */
- IMPORT_C void SetDefaultVolume();
-
+
/**
* Handles call audio route preference changed
*/
IMPORT_C TInt CallAudioRoutePreferenceChanged();
-
+
/**
* Initialises call audio route when call is alerting or answered
*/
IMPORT_C TInt HandleCallStarting( TBool aVideoCall );
-
+
/**
* Initialises energency call audio route
*/
IMPORT_C TInt HandleEnergencyCallStarting();
-
+
/**
* Ends call audio route when call disconnected
*/
IMPORT_C void HandleCallEnding();
-
+
public: // new
-
+
/**
- * Sends AudioHandlingError message to PhoneEngine and saves
+ * Sends AudioHandlingError message to PhoneEngine and saves
* errorcode to member variable.
* @param aErrorCode, errorcode that is saved to member variable.
* @return None.
@@ -158,7 +160,7 @@
* @param aMessage, message to be forwarded.
* @return None.
*/
- void SendMessage(
+ void SendMessage(
const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage );
/**
@@ -167,7 +169,7 @@
* @param aOutput, audio output path that is saved in member variable.
* @return None.
*/
- void SendMessage( const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage,
+ void SendMessage( const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage,
const CTelephonyAudioRouting::TAudioOutput aOutput );
/**
@@ -176,82 +178,87 @@
* @param aOutput, audio output path that is saved in member variable.
* @return None.
*/
- void SendMessage( const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage,
+ void SendMessage( const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage,
CTelephonyAudioRouting& aTelephonyAudioRouting );
/**
* Sets value of audio routing preference
- */
+ */
void SetRoutePreference( TBool aShowNote );
/**
* Return value of audio routing preference
*/
CTelephonyAudioRouting::TAudioOutput RoutePreference();
-
+
/**
* Return value of previous output
- */
+ */
CTelephonyAudioRouting::TAudioOutput PreviousOutput();
-
+
/**
* Return value of current output
- */
+ */
CTelephonyAudioRouting::TAudioOutput Output();
-
+
/**
* Return status of wired accessory availability
*/
TBool IsWiredAvailable();
-
+
/**
* Return status of BT accessory availability
- */
+ */
TBool IsBTAvailable();
/**
* Return status of TTY accessory availability
- */
+ */
TBool IsTTYAvailable();
-
+
/**
* Set new audio route to TAR
*/
void SetTAROutput( CTelephonyAudioRouting::TAudioOutput aOutput,
TBool aShowNote );
-
+
+ /**
+ * From TMSEffectObserver
+ */
+ void EffectsEvent(const TMSEffect& tmseffect, TMSSignalEvent event);
protected:
/**
- * By default Symbian 2nd phase constructor is private, but we use
+ * By default Symbian 2nd phase constructor is private, but we use
* it at generalized class.
*/
- void ConstructL( CPEAudioFactory& aAudioFactory );
+ void ConstructL( CPEAudioFactory& aAudioFactory );
protected: // New functions
-
+
/**
- * Protected function for derived classes to implement for
- * extended volume handling. Default implementation is empty.
+ * Updates volume on DataStore and if aSendMsg==ETrue sends
+ * notification to engine monitor.
* @since S60 v5.0
* @param aVolume New volume value.
+ * @param aSendMsg ETrue will send notification.
*/
- virtual void DoHandleVolumeChange( TInt aVolume );
-
+ virtual void DoHandleVolumeChange( TInt aVolume, TBool aSendMsg=EFalse );
+
private:
-
+
/**
- * Gets all audio volume values from reporitory and update member variables
+ * Gets all audio volume value and update member variable
*/
- void InitializeAudioVolumes();
-
-
+ void InitializeAudioVolume();
+
+
/**
* Makes request to Telephony Audio Routing to get available audio outputs
* @return list of available outputs
*/
- TArray< TPEAudioOutput> GetAvailableOutputs(
+ TArray< TPEAudioOutput> GetAvailableOutputs(
CTelephonyAudioRouting& aTelephonyAudioRouting );
/**
@@ -261,15 +268,11 @@
/**
* Converts PE route value to TAR value
- */
+ */
CTelephonyAudioRouting::TAudioOutput ConvertToTAR( TPEAudioOutput aOutput );
- /**
- * Return status of mic mute
- */
- TBool IsMuted() const;
protected:
- // CPhoneModel object which owns this object.
+ // CPhoneModel object which owns this object.
MPEPhoneModelInternal& iPhoneModel;
// Audio Routing Monitor
CPEAudioRoutingMonitor* iAudioRoutingMonitor;
@@ -281,19 +284,10 @@
RArray<TPEAudioOutput> iPEavailableOutputs;
//Flag to indicate whether is Call audio route initialized
TBool iRouteInitialized;
- #ifdef __WINSCW__
- // dummy implementation for WINSCW
- TInt iVolume;
- TBool iMute;
- #endif
- // HeadSet Mode Audio volume
- TInt iHeadSetVolume;
- // Loudspeaker Mode Audio volume
- TInt iLoudspeakerVolume;
- // ETrue when audio output changed
- TBool iAudioOutputChanged;
+
+ CPEAudioEffect* iAudioEffect;
};
-#endif // CPEAUDIODATA_H
-
+#endif // CPEAUDIODATA_H
+
// End of File