Revision: 201015 RCL_3 PDK_3.0.i
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 17:11:02 +0300
branchRCL_3
changeset 13 f5c5c82a163e
parent 11 03a293c97d5c
child 17 3570217d8c21
Revision: 201015 Kit: 201017
mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Src/AdvancedAudioPlayController.cpp
mmmw_plat/enhanced_media_client_api/tsrc/Conf/EnhanMediaTestClass.cfg
mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/inc/CEMCConstants.h
mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/inc/EnhanMediaTestClass.h
mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/src/EnhanMediaTestClassBlocks.cpp
mmmw_plat/telephony_multimedia_service_api/inc/tms.h
mmmw_plat/telephony_multimedia_service_api/inc/tmsclientsinkobsrvr.h
mmmw_plat/telephony_multimedia_service_api/inc/tmsclientsourceobsrvr.h
mmmw_plat/telephony_multimedia_service_api/inc/tmseffectobsrvr.h
mmmw_plat/telephony_multimedia_service_api/inc/tmsglobalroutingobsrvr.h
mmmw_plat/telephony_multimedia_service_api/inc/tmsstreamobsrvr.h
mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/inc/TMSAudioServicesTestClass.h
mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TimeoutController.cpp
mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocks.cpp
mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocksCallbacks.cpp
mmserv/audioeffectsui/equalizer/src/EqualizerPresetsDialog.cpp
mmserv/metadatautility/Src/MetaDataParserRA.cpp
mmserv/tms/inc/tmsclientserver.h
mmserv/tms/inc/tmsproxy.h
mmserv/tms/inc/tmsqueuehandler.h
mmserv/tms/tmscallserver/src/ipcalldownlinkds.cpp
mmserv/tms/tmscallserver/src/ipcalluplinkds.cpp
mmserv/tms/tmscallserver/src/tmscallsession.cpp
mmserv/tms/tmsfactory/src/tmsfactoryimpl.cpp
mmserv/tms/tmsimpl/inc/tmsvolumeeffectbodyimpl.h
mmserv/tms/tmsimpl/src/tmsamrbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsamrimpl.cpp
mmserv/tms/tmsimpl/src/tmsbufferimpl.cpp
mmserv/tms/tmsimpl/src/tmscallimpl.cpp
mmserv/tms/tmsimpl/src/tmsclientsinkbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsclientsinkimpl.cpp
mmserv/tms/tmsimpl/src/tmsclientsourcebodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsclientsourceimpl.cpp
mmserv/tms/tmsimpl/src/tmseffectimpl.cpp
mmserv/tms/tmsimpl/src/tmsformatbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsformatimpl.cpp
mmserv/tms/tmsimpl/src/tmsg711bodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsg711impl.cpp
mmserv/tms/tmsimpl/src/tmsg729bodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsg729impl.cpp
mmserv/tms/tmsimpl/src/tmsgaineffectbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsgaineffectimpl.cpp
mmserv/tms/tmsimpl/src/tmsglobalgaineffectimpl.cpp
mmserv/tms/tmsimpl/src/tmsglobalroutingimpl.cpp
mmserv/tms/tmsimpl/src/tmsglobalvoleffectimpl.cpp
mmserv/tms/tmsimpl/src/tmsilbcbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsilbcimpl.cpp
mmserv/tms/tmsimpl/src/tmsmembuffer.cpp
mmserv/tms/tmsimpl/src/tmsmicsourcebodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsmicsourceimpl.cpp
mmserv/tms/tmsimpl/src/tmsmodemsinkbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsmodemsinkimpl.cpp
mmserv/tms/tmsimpl/src/tmsmodemsourcebodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsmodemsourceimpl.cpp
mmserv/tms/tmsimpl/src/tmspcmbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmspcmimpl.cpp
mmserv/tms/tmsimpl/src/tmsqueuehandler.cpp
mmserv/tms/tmsimpl/src/tmssinkimpl.cpp
mmserv/tms/tmsimpl/src/tmssourceimpl.cpp
mmserv/tms/tmsimpl/src/tmsspeakersinkbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsspeakersinkimpl.cpp
mmserv/tms/tmsimpl/src/tmsstreambodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsstreamimpl.cpp
mmserv/tms/tmsimpl/src/tmsvolumeeffectbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsvolumeeffectimpl.cpp
mmserv/tms/tmsproxy/src/tmsproxy.cpp
mmserv/tms/tmsproxy/src/tmsqueuehandler.cpp
mmserv/tms/tmsserver/inc/tmsserversession.h
mmserv/tms/tmsserver/src/tmscenrepaudiohandler.cpp
mmserv/tms/tmsserver/src/tmsserver.cpp
mmserv/tms/tmsserver/src/tmsserversession.cpp
mmserv/tms/tmsutility/src/tmsutility.cpp
mmserv/voipaudioservices/VoIPServer/src/VoIPDownlinkThread.cpp
mmserv/voipaudioservices/VoIPServer/src/VoIPServerSession.cpp
mmserv/voipaudioservices/VoIPServer/src/VoIPUplinkThread.cpp
--- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Src/AdvancedAudioPlayController.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Src/AdvancedAudioPlayController.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -2219,8 +2219,12 @@
 	DP0(_L("CAdvancedAudioPlayController::DoInitializeSinkL"));
 	iSinkInitDataReady = EFalse;
 	
+	  if (!iAudioOutput)
+	        {
+	        User::Leave(KErrNotReady);
+	        }	
 	//both source and sink have been added
-     if(iAudioOutput && iDataSourceAdapter)     
+     if(iDataSourceAdapter)     
          {
          iAudioOutput->SetDataSourceAdapter(iDataSourceAdapter);
          }
@@ -2248,20 +2252,15 @@
     // Read the default codec configuration parameters from resource file
 	RArray<TInt>& codecConfigData = const_cast<RArray<TInt>&>(iAudioResource->CodecConfigParametersL());
 	// Override default values with values found from header, if available
-	GetCodecConfigData(codecConfigData);
-         if (!iAudioOutput)
-	   {		
-		User::Leave(KErrNotReady);
-           }  
-        else
-           {
-	       iAudioOutput->ConfigureL(iSampleRate, iSinkNumChannels, iDataType, codecConfigData);
-               DP0(_L("CAdvancedAudioPlayController::DoInitializeSinkL, output configured"));
-	       iAudioOutput->PrimeL();
-               DP0(_L("CAdvancedAudioPlayController::DoInitializeSinkL, output primed"));
-	   }		    
-	// we would use this code when we have a NULL sink
-/*	if (iDuration > 0)
+	 GetCodecConfigData(codecConfigData);
+   iAudioOutput->ConfigureL(iSampleRate, iSinkNumChannels, iDataType, codecConfigData);
+   DP0(_L("CAdvancedAudioPlayController::DoInitializeSinkL, output configured"));
+   iAudioOutput->PrimeL();
+   DP0(_L("CAdvancedAudioPlayController::DoInitializeSinkL, output primed"));
+   
+   	// we would use this code when we have a NULL sink
+	
+	/*	if (iDuration > 0)
 		{
 		DP0(_L("CAdvancedAudioPlayController::BufferFilledL, unblocking duration"));
 		iBlockDuration = EFalse;
--- a/mmmw_plat/enhanced_media_client_api/tsrc/Conf/EnhanMediaTestClass.cfg	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/enhanced_media_client_api/tsrc/Conf/EnhanMediaTestClass.cfg	Tue Apr 27 17:11:02 2010 +0300
@@ -55,8 +55,8 @@
 AudioEnhs CreateSink
 AudioEnhs AddObserver 4
 AudioEnhs StreamAddSink 4
-AudioEnhs ControlTypeL 4
-AudioEnhs ControlControlTypeL 4
+AudioEnhs Control_Type 4
+AudioEnhs Control_ControlType 4
 //waittestclass AudioEnhs
 AudioEnhs StreamRemoveSink 4
 AudioEnhs RemoveObserver 4
@@ -72,11 +72,22 @@
 AudioEnhs CreateStream
 AudioEnhs CreateEffect 7
 AudioEnhs AddObserver 7
+AudioEnhs CreateEffect 20
+AudioEnhs AddObserver 20
 AudioEnhs StreamAddEffect 7
 waittestclass AudioEnhs
+AudioEnhs StreamAddEffect 20
+waittestclass AudioEnhs
+AudioEnhs Control_Type 20
+AudioEnhs Control_ControlType 20
+
+AudioEnhs BalGetBalance
 AudioEnhs RemoveObserver 7
 AudioEnhs RemoveEffect 7
 AudioEnhs DeleteEffect 7
+AudioEnhs RemoveObserver 20
+AudioEnhs RemoveEffect 20
+AudioEnhs DeleteEffect 20
 AudioEnhs DeleteFactory
 delete AudioEnhs
 [Endtest]
@@ -90,13 +101,6 @@
 AudioEnhs AddObserver 9
 AudioEnhs StreamAddEffect 9
 waittestclass AudioEnhs
-allownextresult -18
-AudioEnhs AudioEffect_Enable 9
-allownextresult -18
-AudioEnhs EffectApply 7
-allownextresult -18
-AudioEnhs AudioEffect_Disable 9
-allownextresult -18
 AudioEnhs RemoveObserver 9
 AudioEnhs RemoveEffect 9
 AudioEnhs DeleteEffect 9
@@ -111,8 +115,8 @@
 AudioEnhs CreateStream
 AudioEnhs AddObserver 3
 //waittestclass AudioEnhs
-AudioEnhs ControlTypeL 3
-AudioEnhs ControlControlTypeL 3
+AudioEnhs Control_Type 3
+AudioEnhs Control_ControlType 3
 AudioEnhs RemoveObserver 3
 AudioEnhs DeleteStream
 AudioEnhs DeleteFactory
@@ -132,9 +136,11 @@
 AudioEnhs AddObserver 4
 AudioEnhs CreateEffect 7
 AudioEnhs AddObserver 7
+
 AudioEnhs StreamAddSource 0
 AudioEnhs StreamAddSink 4
 AudioEnhs StreamAddEffect 7
+
 waittestclass AudioEnhs
 AudioEnhs FileSOpen
 AudioEnhs StreamOpen
@@ -195,6 +201,11 @@
 AudioEnhs EffectApply 7
 pause 5000
 AudioEnhs StreamStart
+
+AudioEnhs AudioEffect_Disable 7
+
+
+
 AudioEnhs CloseSource
 AudioEnhs StreamClose
 waittestclass AudioEnhs
@@ -279,8 +290,8 @@
 AudioEnhs DRMRemoveAllowedOutputDevice 2
 //AudioEnhs DRMGetAllowedOutputDevice 4
 //AudioEnhs DRMRemoveAllowedOutputDevice 4
-AudioEnhs ControlTypeL 1
-AudioEnhs ControlControlTypeL 1
+AudioEnhs Control_Type 1
+AudioEnhs Control_ControlType 1
 pause 3000
 AudioEnhs StreamStart
 pause 5000
@@ -316,10 +327,10 @@
 AudioEnhs StreamStart
 pause 4000
 AudioEnhs StreamPause
-AudioEnhs ControlTypeL 2
-AudioEnhs ControlControlTypeL 2 
-AudioEnhs ControlTypeL 3
-AudioEnhs ControlControlTypeL 3 
+AudioEnhs Control_Type 2
+AudioEnhs Control_ControlType 2 
+AudioEnhs Control_Type 3
+AudioEnhs Control_ControlType 3 
 AudioEnhs DescSGetBitRate
 AudioEnhs DSGetSize
 pause 2000
@@ -358,8 +369,8 @@
 AudioEnhs StreamStart
 pause 4000
 AudioEnhs StreamPause
-AudioEnhs ControlTypeL 2
-AudioEnhs ControlControlTypeL 2 
+AudioEnhs Control_Type 2
+AudioEnhs Control_ControlType 2 
 AudioEnhs DescSGetBitRate
 AudioEnhs DSGetSize
 pause 2000
@@ -401,10 +412,10 @@
 AudioEnhs AudioEffect_Enforce 1
 AudioEnhs AudioEffect_IsEnabled
 AudioEnhs AudioEffect_HaveUpdateRights
-AudioEnhs ControlTypeL 0
-AudioEnhs ControlControlTypeL 0
-AudioEnhs ControlTypeL 5
-AudioEnhs ControlControlTypeL 5
+AudioEnhs Control_Type 0
+AudioEnhs Control_ControlType 0
+AudioEnhs Control_Type 5
+AudioEnhs Control_ControlType 5
 AudioEnhs FileSGetSize
 AudioEnhs FileSGetBitRate
 AudioEnhs StreamStart
@@ -470,10 +481,10 @@
 AudioEnhs StreamGetPositionL
 AudioEnhs StreamSetPositionL 0
 AudioEnhs StreamGetPositionL
-AudioEnhs ControlTypeL 0
-AudioEnhs ControlControlTypeL 0
-AudioEnhs ControlTypeL 5
-AudioEnhs ControlControlTypeL 5
+AudioEnhs Control_Type 0
+AudioEnhs Control_ControlType 0
+AudioEnhs Control_Type 5
+AudioEnhs Control_ControlType 5
 pause 3000
 AudioEnhs StreamStart
 pause 4000
@@ -563,8 +574,8 @@
 AudioEnhs ER_SetRoomHFLevel 0
 AudioEnhs ER_SetRoomLevel -1000
 AudioEnhs AudioEffect_IsEnabled
-//AudioEnhs AudioEffect_IsEnforced
-//AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
 AudioEnhs AudioEffect_HaveUpdateRights
 AudioEnhs AudioEffect_Enforce 1
 pause 2000
@@ -574,8 +585,8 @@
 AudioEnhs EffectApply 8
 AudioEnhs StreamPause
 pause 2000
-AudioEnhs ControlTypeL 8
-AudioEnhs ControlControlTypeL 8
+AudioEnhs Control_Type 8
+AudioEnhs Control_ControlType 8
 AudioEnhs StreamStart
 AudioEnhs CloseSource
 AudioEnhs StreamClose
@@ -629,10 +640,20 @@
 waittestclass AudioEnhs
 AudioEnhs StreamPrime
 waittestclass AudioEnhs
-AudioEnhs ControlTypeL 9
-AudioEnhs ControlControlTypeL 9
+AudioEnhs Control_Type 9
+AudioEnhs Control_ControlType 9
 AudioEnhs StreamStart
 pause 5000
+
+AudioEnhs AudioEffect_IsEnabled
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Enable 9
+AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_HaveUpdateRights
+AudioEnhs AudioEffect_Enforce 1
+AudioEnhs EffectApply 9
+AudioEnhs AudioEffect_Disable 9
+
 AudioEnhs CloseSource
 AudioEnhs StreamClose
 waittestclass AudioEnhs
@@ -675,16 +696,16 @@
 AudioEnhs SW_SetStereoWideningLevelL 100
 waittestclass AudioEnhs
 AudioEnhs AudioEffect_IsEnabled
-//AudioEnhs AudioEffect_IsEnforced
-//AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
 AudioEnhs AudioEffect_HaveUpdateRights
 AudioEnhs AudioEffect_Enforce 1
 pause 2000
 AudioEnhs StreamStart
 AudioEnhs EffectApply 10
 pause 5000
-AudioEnhs ControlTypeL 10
-AudioEnhs ControlControlTypeL 10
+AudioEnhs Control_Type 10
+AudioEnhs Control_ControlType 10
 AudioEnhs AudioEffect_Disable 10
 AudioEnhs CloseSource
 AudioEnhs StreamClose
@@ -725,12 +746,12 @@
 waittestclass AudioEnhs
 AudioEnhs AudioEffect_Enable 11
 AudioEnhs AudioEffect_IsEnabled
-//AudioEnhs AudioEffect_IsEnforced
-//AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
 AudioEnhs AudioEffect_HaveUpdateRights
 AudioEnhs AudioEffect_Enforce 1
-AudioEnhs ControlTypeL 11
-AudioEnhs ControlControlTypeL 11
+AudioEnhs Control_Type 11
+AudioEnhs Control_ControlType 11
 pause 2000
 AudioEnhs StreamStart
 AudioEnhs EffectApply 11
@@ -769,6 +790,7 @@
 AudioEnhs AddObserver 12
 AudioEnhs StreamAddSource 0
 AudioEnhs StreamAddSink 4
+AudioEnhs AttachReverb
 AudioEnhs StreamAddEffect 8
 AudioEnhs StreamAddEffect 12
 waittestclass AudioEnhs
@@ -776,23 +798,26 @@
 AudioEnhs StreamOpen
 waittestclass AudioEnhs
 AudioEnhs StreamPrime
+waittestclass AudioEnhs
 AudioEnhs EffectApply 8
 AudioEnhs EffectApply 12
-waittestclass AudioEnhs
+AudioEnhs AudioEffect_Enable 12
 AudioEnhs RL_LevelRangeL
 AudioEnhs RL_SetRoomLevelL -200
 AudioEnhs RL_LevelL
-AudioEnhs ControlTypeL 12
-AudioEnhs ControlControlTypeL 12
-pause 2000
+AudioEnhs Control_Type 12
+AudioEnhs Control_ControlType 12
+pause 1000
 AudioEnhs AudioEffect_IsEnabled
-//AudioEnhs AudioEffect_IsEnforced
-//AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
 AudioEnhs AudioEffect_HaveUpdateRights
 AudioEnhs AudioEffect_Enforce 1
 pause 2000
 AudioEnhs StreamStart
 pause 5000
+AudioEnhs AudioEffect_Enable 8
+
 AudioEnhs AudioEffect_Disable 12
 AudioEnhs AudioEffect_Disable 8
 pause 2000
@@ -800,9 +825,11 @@
 AudioEnhs StreamClose
 waittestclass AudioEnhs
 AudioEnhs RemoveObserver 12
+AudioEnhs RemoveObserver 8
 AudioEnhs RemoveObserver 4
 AudioEnhs RemoveObserver 0
 AudioEnhs RemoveObserver 3
+AudioEnhs DetachReverb
 AudioEnhs RemoveEffect 12
 AudioEnhs RemoveEffect 8
 AudioEnhs DeleteStream
@@ -838,12 +865,19 @@
 AudioEnhs DA_DistanceAttenuationL
 AudioEnhs DA_RollOffFactorMaxL
 AudioEnhs DA_RoomRollOffFactorMaxL
-AudioEnhs ControlTypeL 13
-AudioEnhs ControlControlTypeL 13
+AudioEnhs Control_Type 13
+AudioEnhs Control_ControlType 13
 waittestclass AudioEnhs
 AudioEnhs StreamStart
 AudioEnhs EffectApply 13
 pause 5000
+
+AudioEnhs AudioEffect_IsEnabled
+AudioEnhs AudioEffect_Enforce 1
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_HaveUpdateRights
+
 AudioEnhs AudioEffect_Disable 13
 AudioEnhs CloseSource
 AudioEnhs StreamClose
@@ -884,14 +918,22 @@
 AudioEnhs AudioEffect_Enable 17
 AudioEnhs SL_LocationCartesianL 17
 AudioEnhs SL_LocationSphericalL 17
-AudioEnhs ControlTypeL 17
-AudioEnhs ControlControlTypeL 17
+AudioEnhs Control_Type 17
+AudioEnhs Control_ControlType 17
 waittestclass AudioEnhs
 AudioEnhs StreamStart
 AudioEnhs EffectApply 17
 pause 5000
 AudioEnhs SL_SetLocationCartesianL 17 0 0 0
 AudioEnhs SL_SetLocationSphericalL 17 0 0 0
+
+AudioEnhs AudioEffect_IsEnabled
+AudioEnhs AudioEffect_Enforce 1
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_HaveUpdateRights
+
+
 AudioEnhs AudioEffect_Disable 17
 AudioEnhs CloseSource
 AudioEnhs StreamClose
@@ -932,14 +974,22 @@
 AudioEnhs AudioEffect_Enable 16
 AudioEnhs SL_LocationCartesianL 16
 AudioEnhs SL_LocationSphericalL 16
-AudioEnhs ControlTypeL 16
-AudioEnhs ControlControlTypeL 16
+AudioEnhs Control_Type 16
+AudioEnhs Control_ControlType 16
 waittestclass AudioEnhs
 AudioEnhs StreamStart
 AudioEnhs EffectApply 16
 pause 5000
 AudioEnhs SL_SetLocationCartesianL 16 0 0 0
 AudioEnhs SL_SetLocationSphericalL 16 0 0 0
+
+AudioEnhs AudioEffect_IsEnabled
+AudioEnhs AudioEffect_Enforce 1
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_HaveUpdateRights
+
+
 AudioEnhs AudioEffect_Disable 16
 pause 2000
 AudioEnhs CloseSource
@@ -982,10 +1032,18 @@
 AudioEnhs AudioEffect_Enable 18
 AudioEnhs LO_OrientationL 18
 AudioEnhs LO_OrientationVectorsL 18
-AudioEnhs ControlTypeL 18
-AudioEnhs ControlControlTypeL 18
+AudioEnhs Control_Type 18
+AudioEnhs Control_ControlType 18
 AudioEnhs StreamStart
+AudioEnhs EffectApply 18
 pause 5000
+
+AudioEnhs AudioEffect_IsEnabled
+AudioEnhs AudioEffect_Enforce 1
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_HaveUpdateRights
+
 AudioEnhs AudioEffect_Disable 18
 AudioEnhs CloseSource
 AudioEnhs StreamClose
@@ -1023,17 +1081,22 @@
 AudioEnhs StreamOpen
 waittestclass AudioEnhs
 AudioEnhs StreamPrime
-//AudioEnhs AudioEffect_Enable 19
-pause 1000
-//AudioEnhs EffectApply 19
-//AudioEnhs LO_OrientationL 19
-//AudioEnhs LO_OrientationVectorsL 19
+waittestclass AudioEnhs
+AudioEnhs AudioEffect_Enable 19
+AudioEnhs LO_OrientationL 19
+AudioEnhs LO_OrientationVectorsL 19
 waittestclass AudioEnhs
 AudioEnhs StreamStart
+AudioEnhs EffectApply 19
 pause 5000
-//AudioEnhs AudioEffect_Disable 19
-AudioEnhs ControlTypeL 19
-AudioEnhs ControlControlTypeL 19
+AudioEnhs AudioEffect_IsEnabled
+AudioEnhs AudioEffect_Enforce 1
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_HaveUpdateRights
+AudioEnhs AudioEffect_Disable 19
+AudioEnhs Control_Type 19
+AudioEnhs Control_ControlType 19
 AudioEnhs CloseSource
 AudioEnhs StreamClose
 waittestclass AudioEnhs
@@ -1073,6 +1136,14 @@
 AudioEnhs StreamPrime
 waittestclass AudioEnhs
 AudioEnhs AudioEffect_Enable 15
+
+AudioEnhs AudioEffect_IsEnabled
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_HaveUpdateRights
+AudioEnhs AudioEffect_Enforce 1
+AudioEnhs EffectApply 15
+
 AudioEnhs SD_CartesianVelocityL 15
 AudioEnhs SD_SphericalVelocityL 15
 AudioEnhs SD_FactorL 15 
@@ -1082,8 +1153,8 @@
 AudioEnhs SD_SetCartesianVelocityL 15 0 0 0     
 AudioEnhs StreamStart
 pause 5000
-AudioEnhs ControlTypeL 15
-AudioEnhs ControlControlTypeL 15
+AudioEnhs Control_Type 15
+AudioEnhs Control_ControlType 15
 AudioEnhs AudioEffect_Disable 15
 AudioEnhs CloseSource
 AudioEnhs StreamClose
@@ -1124,6 +1195,13 @@
 AudioEnhs StreamPrime
 waittestclass AudioEnhs
 AudioEnhs AudioEffect_Enable 14
+AudioEnhs AudioEffect_IsEnabled
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_HaveUpdateRights
+AudioEnhs AudioEffect_Enforce 1
+AudioEnhs EffectApply 14
+
 AudioEnhs SD_CartesianVelocityL 14
 AudioEnhs SD_SphericalVelocityL 14
 AudioEnhs SD_FactorL 15 
@@ -1131,8 +1209,8 @@
 AudioEnhs SD_FactorMaxL 15
 AudioEnhs SD_SetSphericalVelocityL 14 0 0 0
 AudioEnhs SD_SetCartesianVelocityL 14 0 0 0     
-AudioEnhs ControlTypeL 14
-AudioEnhs ControlControlTypeL 14
+AudioEnhs Control_Type 14
+AudioEnhs Control_ControlType 14
 AudioEnhs StreamStart
 pause 5000
 AudioEnhs AudioEffect_Disable 14
@@ -1182,8 +1260,8 @@
 #AudioEnhs PDLSGetDLRateL
 #AudioEnhs PDLSGetBitRateL
 #AudioEnhs PDLSResumeDownloadL
-#AudioEnhs ControlTypeL 6
-#AudioEnhs ControlControlTypeL 6
+#AudioEnhs Control_Type 6
+#AudioEnhs Control_ControlType 6
 #AudioEnhs PDLSGetSize
 #pause 10000
 #AudioEnhs StreamStart
@@ -1288,6 +1366,7 @@
 AudioEnhs ER_ReflectionLevelRange
 AudioEnhs ER_ReverbDelay
 AudioEnhs ER_ReverbDelayMax
+AudioEnhs ER_DelayMaxMax
 AudioEnhs ER_ReverbLevel
 AudioEnhs ER_ReverbLevelRange
 AudioEnhs ER_RoomHFLevel
@@ -1309,8 +1388,8 @@
 AudioEnhs RL_SetRoomLevelL -200
 AudioEnhs RL_LevelL
 AudioEnhs AudioEffect_IsEnabled
-//AudioEnhs AudioEffect_IsEnforced
-//AudioEnhs AudioEffect_Uid
+AudioEnhs AudioEffect_IsEnforced
+AudioEnhs AudioEffect_Uid
 AudioEnhs AudioEffect_HaveUpdateRights
 AudioEnhs AudioEffect_Enforce 1
 AudioEnhs StreamStart
--- a/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/inc/CEMCConstants.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/inc/CEMCConstants.h	Tue Apr 27 17:11:02 2010 +0300
@@ -273,7 +273,7 @@
 	EMC_LLLocationSphericalL,
 	EMC_LLSetLocationCartesianL,
 	EMC_LLSetLocationSphericalL,
-
+	EMC_ER_DelayMaxMax,
     EMC_NoCommand
 
 };
--- a/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/inc/EnhanMediaTestClass.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/inc/EnhanMediaTestClass.h	Tue Apr 27 17:11:02 2010 +0300
@@ -437,7 +437,9 @@
 	    TInt HandleAudioEffectEnableL(CStifItemParser& aItem);
 	    TInt HandleAudioEffectDisableL(CStifItemParser& aItem);
 	    TInt AudioEffectIsEnforced (CStifItemParser& aItem);
-
+//added
+	    TInt  AudioCreateEffect (CStifItemParser& aItem);
+	    
 	    TInt AudioEffectUid (CStifItemParser& aItem);
 	    TInt AudioEffectHaveUpdateRights (CStifItemParser& aItem);
 	    TInt AudioEffectEnforce (CStifItemParser& aItem);
@@ -472,6 +474,7 @@
 	    TInt HandleReverbSetRoomLevelL(CStifItemParser& aItem);
 	    TInt HandleReverbDelayMaxL(CStifItemParser& aItem);
 
+	    TInt HandleDelayMaxL(CStifItemParser& aItem);
 
 	    TInt HandleSWIsContinuousLevelSupportedL(CStifItemParser& aItem);
 	    TInt HandleSWSetStereoWideningLevelL(CStifItemParser& aItem);
--- a/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/src/EnhanMediaTestClassBlocks.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/src/EnhanMediaTestClassBlocks.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -296,7 +296,8 @@
 
 		ENTRY( "AttachReverb",CEnhanMediaTestClass::AttachReverb ),
 		ENTRY( "DetachReverb",CEnhanMediaTestClass::DetachReverb ),
-
+	  //added
+		ENTRY( "ER_DelayMaxMax",CEnhanMediaTestClass::HandleDelayMaxL ),
 
         };
 
@@ -3171,12 +3172,16 @@
 
     iLog->Log(_L("CEnhanMediaTestClass::BalGetBalance "));
 	TInt status(KErrNone);
+	TInt status1(KErrNone);
+	TInt status2(KErrNone);
 	TInt balance=0;
 	if(!iMBalanceControl)
 	    {
 	    return status = KErrNotReady;
 	    }
-	status = iMBalanceControl->GetBalance(balance);
+	status1 = iMBalanceControl->GetBalance(balance);
+	status2=iMBalanceControl->SetBalance(balance);
+	status = status1 || status2;
     iLog->Log(_L("CEnhanMediaTestClass::BalGetBalance [%d]"),balance);
     return status;
 	}
@@ -4399,6 +4404,30 @@
 	return status;
 	}
 
+///*TInt CEnhanMediaTestClass::AudioCreateEffect (CStifItemParser& /*aItem*/)
+ /*  {
+    TInt status(KErrNone);
+    TBool enabled;
+
+    if(!iEffectControl)
+        {
+        status = KErrNotReady;
+        }
+   // CEqualizerEffect *ptr=iEffectControl;
+    //status = static_cast<MControl*>(iEffectControl);
+   // status = ptr->CreateEffectProxy();
+    if (status == KErrNone)
+        {
+        iLog->Log(_L("AudioEffectIsEnabled status = %d"), status);
+        }
+    else
+        {
+        iLog->Log(_L("AudioEffectIsEnabled ERROR = [%d]"), status);
+        }
+
+    return status;
+    }
+*/
 TInt CEnhanMediaTestClass::AudioEffectIsEnforced (CStifItemParser& /*aItem*/)
 	{
 	TInt status(KErrNone);
@@ -4863,6 +4892,7 @@
 	return status;
     }
 
+
 TInt CEnhanMediaTestClass::HandleReverbReflectionsDelayMaxL(CStifItemParser& /*aItem*/)
 	{
 
@@ -5202,6 +5232,21 @@
 	return status;
 	}
 
+TInt CEnhanMediaTestClass::HandleDelayMaxL(CStifItemParser& /*aItem*/)
+    {
+    iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDelayMaxL"));
+    TInt status(KErrNone);
+    //status = aItem.GetNextInt(controltype);
+    TUint value;
+    if(!iEffectControl)
+        {
+        return status = KErrNotReady;
+        }
+    status = static_cast<MReverbControl*>(iEffectControl)->DelayMax(value);
+    iLog->Log(_L("CEnhanMediaTestClass::HandleDelayMaxL value = [%d]"),value);
+    return status;
+    }
+
 TInt CEnhanMediaTestClass::HandleSWIsContinuousLevelSupportedL(CStifItemParser& /*aItem*/)
 	{
     iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDelayMaxL"));
@@ -5248,7 +5293,9 @@
 
 TInt CEnhanMediaTestClass::LO_OrientationL (CStifItemParser& aItem)
 	{
-	TInt status(KErrNone);
+    TInt status(KErrNone);
+	TInt status1(KErrNone);
+	TInt status2(KErrNone);
 
 	if(!iEffectControl)
 	    {
@@ -5264,13 +5311,15 @@
 
    if (TControl(control) == ELISTORIENTCONTROL)
 	   {
-	   status = static_cast<MListenerOrientationControl*>(iEffectControl)->Orientation(a,b,c);
+	   status1 = static_cast<MListenerOrientationControl*>(iEffectControl)->Orientation(a,b,c);
+	   status2=static_cast<MListenerOrientationControl*>(iEffectControl)->SetOrientation(a,b,c);
 	   }
    else if (TControl(control) == ESOURORIENTCONTROL)
 	   {
-	   status = static_cast<MSourceOrientationControl*>(iEffectControl)->Orientation(a,b,c);
+	   status1 = static_cast<MSourceOrientationControl*>(iEffectControl)->Orientation(a,b,c);
+	   status2= static_cast<MSourceOrientationControl*>(iEffectControl)->SetOrientation(a,b,c);
 	   }
-
+    status=status1 || status2;
     if (status == KErrNone)
     	{
     	iLog->Log(_L("LO_OrientationL status = %d"), status);
@@ -5286,6 +5335,8 @@
 TInt CEnhanMediaTestClass::LO_OrientationVectorsL (CStifItemParser& aItem)
 	{
 	TInt status(KErrNone);
+	TInt status1(KErrNone);
+	TInt status2(KErrNone);
 
 	if(!iEffectControl)
 	    {
@@ -5298,13 +5349,15 @@
     status = aItem.GetNextInt(control);
     if (TControl(control) == ELISTORIENTCONTROL)
  	   {
- 	    status = static_cast<MListenerOrientationControl*>(iEffectControl)->OrientationVectors(a,b,c,d,e,f);
+ 	    status1 = static_cast<MListenerOrientationControl*>(iEffectControl)->OrientationVectors(a,b,c,d,e,f);
+ 	    status2=  static_cast<MListenerOrientationControl*>(iEffectControl)->SetOrientationVectors(a,b,c,d,e,f);
  	   }
     else if (TControl(control) == ESOURORIENTCONTROL)
  	   {
-	    status = static_cast<MSourceOrientationControl*>(iEffectControl)->OrientationVectors(a,b,c,d,e,f);
+	    status1 = static_cast<MSourceOrientationControl*>(iEffectControl)->OrientationVectors(a,b,c,d,e,f);
+	    status2=  static_cast<MSourceOrientationControl*>(iEffectControl)->SetOrientationVectors(a,b,c,d,e,f);
  	   }
-
+    status = status1 || status2;
 
     if (status == KErrNone)
     	{
@@ -5377,6 +5430,8 @@
     TUint d,e;
     status = static_cast<MDistanceAttenuationControl*>(iEffectControl)->DistanceAttenuation(a,b,c,d,e);
     iLog->Log(_L("CEnhanMediaTestClass::HandleDADistanceAttenuationL a = [%d] - b = [%d] - c = [%d] - d = [%d]- e = [%d]"),a,b,c,d,e);
+    //added
+    status=static_cast<MDistanceAttenuationControl*>(iEffectControl)->SetDistanceAttenuation(a,b,c,d,e);
 	return status;
 	}
 TInt CEnhanMediaTestClass::HandleDARollOffFactorMaxL(CStifItemParser& /*aItem*/)
@@ -6118,11 +6173,13 @@
 
     if (TControl(control) == ELISTDOPPCONTROL)
     	{
-        status = static_cast<MListenerDopplerControl*>(iEffectControl)->SetCartesianVelocity(a,b,c);
+    
+        status = static_cast<MListenerDopplerControl*>(iEffectControl)->SetSphericalVelocity(a,b,c);
     	}
     if (TControl(control) == ESOURDOPPCONTROL)
     	{
-        status = static_cast<MSourceDopplerControl*>(iEffectControl)->SetCartesianVelocity(a,b,c);
+    
+        status = static_cast<MSourceDopplerControl*>(iEffectControl)->SetSphericalVelocity(a,b,c);
     	}
     iLog->Log(_L("CEnhanMediaTestClass::HandleSDSetSphericalVelocityL END"));
 	return status;
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tms.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tms.h	Tue Apr 27 17:11:02 2010 +0300
@@ -155,7 +155,7 @@
 #define TMS_AUDIO_OUTPUT_ETTY                   ((gint)7)
 #define TMS_AUDIO_OUTPUT_NOT_ACTIVE             ((gint)8)
 
-// TMSSignalEvent structure for callback notifications
+// Structure signalling callback notifications
 struct TMSSignalEvent
     {
     guint type;
@@ -166,12 +166,12 @@
     gint prev_state;
     };
 
-// TMSRTPStreamDescription for RTP
-struct TMSRTPStreamDescription
+// Structure for global volume effect change event
+struct TMSVolumeEventChangeData
     {
-    gint filler1;
-    gint filler2;
-    gint filler3;
+    guint level;
+    TMSAudioOutput output;
+    gboolean output_changed;
     };
 
 } //namespace TMS
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tmsclientsinkobsrvr.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tmsclientsinkobsrvr.h	Tue Apr 27 17:11:02 2010 +0300
@@ -11,7 +11,8 @@
  *
  * Contributors:
  *
- * Description: Telephony Multimedia Service
+ * Description: This class provides callback mechanism for TMSClientSink
+ * listeners.
  *
  */
 
@@ -57,7 +58,7 @@
      *      Buffer with recorded data to be emptied by the client.
      *
      */
-    virtual void ProcessBuffer(TMSBuffer* buffer) = 0;
+    virtual void ProcessBuffer(const TMSBuffer* buffer) = 0;
     };
 
 } //namespace TMS
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tmsclientsourceobsrvr.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tmsclientsourceobsrvr.h	Tue Apr 27 17:11:02 2010 +0300
@@ -11,7 +11,7 @@
  *
  * Contributors:
  *
- * Description:This class provides callback mechanism for TMSClientSource
+ * Description: This class provides callback mechanism for TMSClientSource
  * listeners.
  *
  */
@@ -72,7 +72,7 @@
      *      The status of the operation.
      *
      */
-    virtual void BufferProcessed(TMSBuffer* buffer, gint reason) = 0;
+    virtual void BufferProcessed(const TMSBuffer* buffer, gint reason) = 0;
     };
 
 } //namespace TMS
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tmseffectobsrvr.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tmseffectobsrvr.h	Tue Apr 27 17:11:02 2010 +0300
@@ -11,7 +11,7 @@
  *
  * Contributors:
  *
- * Description:This class provides callback mechanism for TMSEffect listeners.
+ * Description: This class provides callback mechanism for TMSEffect listeners.
  *
  */
 
@@ -74,13 +74,14 @@
      *  TMS_EVENT_EFFECT_GAIN_CHANGED
      *
      * @param  tmseffect
-     *      Pointer to the object that is being signaled.
+     *      Reference to the object that is being signaled.
      *
      * @param  event
      *      Event descriptor.
      *
      */
-    virtual void EffectsEvent(TMSEffect* tmseffect, TMSSignalEvent event) = 0;
+    virtual void EffectsEvent(const TMSEffect& tmseffect,
+            TMSSignalEvent event) = 0;
     };
 
 } //namespace TMS
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tmsglobalroutingobsrvr.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tmsglobalroutingobsrvr.h	Tue Apr 27 17:11:02 2010 +0300
@@ -11,7 +11,8 @@
  *
  * Contributors:
  *
- * Description:This class provides callback mechanism for TMSGlobalRouting listeners.
+ * Description: This class provides callback mechanism for TMSGlobalRouting
+ * listeners.
  *
  */
 
@@ -72,7 +73,7 @@
      *  TMS_EVENT_ROUTING_SET_OUTPUT_COMPLETE
      *
      * @param  routing
-     *      Pointer to the object that is being signaled.
+     *      Reference to the object that is being signaled.
      *
      * @param  event
      *      Event descriptor.
@@ -81,7 +82,7 @@
      *      Indicates the output device that audio will be routed to.
      *
      */
-    virtual void GlobalRoutingEvent(TMSGlobalRouting* routing,
+    virtual void GlobalRoutingEvent(const TMSGlobalRouting& routing,
             TMSSignalEvent event, TMSAudioOutput output) = 0;
     };
 
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tmsstreamobsrvr.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tmsstreamobsrvr.h	Tue Apr 27 17:11:02 2010 +0300
@@ -11,7 +11,7 @@
  *
  * Contributors:
  *
- * Description: Telephony Multimedia Service
+ * Description: This class provides callback mechanism for TMSStream listeners.
  *
  */
 
@@ -64,13 +64,14 @@
      *
      *
      * @param  stream
-     *      Pointer to the object that is being signaled.
+     *      Reference to the object that is being signaled.
      *
      * @param  event
      *      Event descriptor.
      *
      */
-    virtual void TMSStreamEvent(TMSStream* stream, TMSSignalEvent event) = 0;
+    virtual void TMSStreamEvent(const TMSStream& stream,
+            TMSSignalEvent event) = 0;
     };
 
 } //namespace TMS
--- a/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/inc/TMSAudioServicesTestClass.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/inc/TMSAudioServicesTestClass.h	Tue Apr 27 17:11:02 2010 +0300
@@ -209,20 +209,20 @@
     void HandleTimeout(TInt error);
 
     //From TMSStreamObserver
-    void TMSStreamEvent(TMSStream* stream, TMSSignalEvent event);
+    void TMSStreamEvent(const TMSStream& stream, TMSSignalEvent event);
 
     //From TMSClientSourceObserver
     void FillBuffer(TMSBuffer& buffer);
-    void BufferProcessed(TMSBuffer* buffer, gint reason);
+    void BufferProcessed(const TMSBuffer* buffer, gint reason);
 
     //From TMSClientSinkObserver
-    void ProcessBuffer(TMSBuffer* buffer);
+    void ProcessBuffer(const TMSBuffer* buffer);
 
     //From TMSClientSinkObserver starts
-    void EffectsEvent(TMSEffect* tmseffect, TMSSignalEvent event);
+    void EffectsEvent(const TMSEffect& tmseffect, TMSSignalEvent event);
 
     // from TMSGlobalRoutingObserver
-    void GlobalRoutingEvent(TMSGlobalRouting* /*routing*/,
+    void GlobalRoutingEvent(const TMSGlobalRouting& /*routing*/,
             TMSSignalEvent event, TMSAudioOutput output);
 
 private:
--- a/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TimeoutController.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TimeoutController.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -175,7 +175,7 @@
     miliseconds /= 1000;
 
     TBuf<30> dateString;
-    TRAPD(ignore, endTime.FormatL(dateString, KFormatTimeStamp));
+    TRAP_IGNORE(endTime.FormatL(dateString, KFormatTimeStamp));
     iLog->Log(_L("Timer=%LD ms, EndTime=%S"), miliseconds, &dateString);
 
     // Store absolute timeout
@@ -248,9 +248,7 @@
         {
         if (iTestCaseTimeout > timeout)
             {
-            RDebug::Print(
-                    _L("Absolute timer still valid. Restaring timer. iStatus: %d"),
-                    iStatus.Int());
+            RDebug::Print(_L("Absolute timer still valid. Restaring timer. iStatus: %d"), iStatus.Int());
             // Start new timer
             iStatus = KErrNone; // reset value
             iTimer.At(iStatus, iTestCaseTimeout); // restart timer
--- a/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocks.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocks.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -112,7 +112,7 @@
     iExpectedEvents.Close();
     iOcurredEvents.Close();
 
-    iLog->Log(_L("Deleti ng test class..."));
+    iLog->Log(_L("Deleting test class..."));
     iLog->Log(_L(""));
     iLog->Log(_L(""));
 
@@ -305,8 +305,7 @@
 // CTmsAudioServicesTestClass::RemoveExpectedEvent
 // Remove the indicated event from the expected events' list
 // -----------------------------------------------------------------------------
-TBool CTmsAudioServicesTestClass::RemoveExpectedEvent(
-        TTmsExpectedEvent aEvent)
+TBool CTmsAudioServicesTestClass::RemoveExpectedEvent(TTmsExpectedEvent aEvent)
     {
     FTRACE(FPrint(_L("CTmsAudioServicesTestClass::RemoveExpectedEvent")));
     iLog->Log(_L("CTmsAudioServicesTestClass::RemoveExpectedEvent"));
@@ -538,9 +537,7 @@
             case TMS_CALL_IP:
                 {
                 error = iFactory->CreateCall(calltype, iTmsCall, 0);
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::CreateCall, error [%d]"),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::CreateCall, error [%d]"), error);
                 }
                 break;
             default:
@@ -569,58 +566,49 @@
 
         if (iFactory && !iTmsFormat)
             {
-            iLog ->Log(
-                    _L("CTmsAudioServicesTestClass::CreateFormat - input format"));
+            iLog ->Log(_L("CTmsAudioServicesTestClass::CreateFormat - input format"));
 
             if (formatType == KTagG711)
                 {
                 format = TMS_FORMAT_G711;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::CreateFormat - input format TMS_FORMAT_G711"));
+                iLog->Log(_L("CTmsAudioServicesTestClass::CreateFormat - input format TMS_FORMAT_G711"));
                 }
             else if (formatType == KTagG729)
                 {
                 format = TMS_FORMAT_G729;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::CreateFormat - input format TMS_FO RMAT_G729"));
+                iLog->Log(_L("CTmsAudioServicesTestClass::CreateFormat - input format TMS_FO RMAT_G729"));
                 }
             else if (formatType == KTagILBC)
                 {
                 format = TMS_FORMAT_ILBC;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::CreateFormat - input format TMS_FORMAT_ILBC"));
+                iLog->Log(_L("CTmsAudioServicesTestClass::CreateFormat - input format TMS_FORMAT_ILBC"));
                 }
             else if (formatType == KTagAMRNB)
                 {
                 format = TMS_FORMAT_AMR;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::CreateFormat - input format TMS_FORMAT_AMR"));
+                iLog->Log(_L("CTmsAudioServicesTestClass::CreateFormat - input format TMS_FORMAT_AMR"));
                 }
             else if (formatType == KTagPCM16)
                 {
                 format = TMS_FORMAT_PCM;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::CreateFormat - input format TMS_FORMAT_PCM"));
+                iLog->Log(_L("CTmsAudioServicesTestClass::CreateFormat - input format TMS_FORMAT_PCM"));
                 }
             else
                 {
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::CreateFormat failed, format not supported"));
+                iLog->Log(_L("CTmsAudioServicesTestClass::CreateFormat failed, format not supported"));
                 error = KErrNotSupported;
                 return error;
                 }
 
             if (StreamType == KTagDnlink)
                 {
-                iLog ->Log(
-                        _L("CTmsAudioServicesTestClass::CreateFormat - iTmsFormatDn"));
+                iLog ->Log(_L("CTmsAudioServicesTestClass::CreateFormat - iTmsFormatDn"));
                 error = iFactory->CreateFormat(format, iTmsFormatDn);
                 iDnLinkCodec = format;
                 }
             else if (StreamType == KTagUplink)
                 {
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::CreateFormat - iTmsFormatUp"));
+                iLog->Log(_L("CTmsAudioServicesTestClass::CreateFormat - iTmsFormatUp"));
                 error = iFactory->CreateFormat(format, iTmsFormatUp);
                 iUpLinkCodec = format;
                 }
@@ -723,8 +711,7 @@
     else
         {
         error = KErrNotReady;
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::CreateGlobalRouting - Need create TMSFactory first" ));
+        iLog->Log(_L("CTmsAudioServicesTestClass::CreateGlobalRouting - Need create TMSFactory first" ));
         }
     return error;
 
@@ -855,9 +842,7 @@
 
     if (itSourceType != sourcetype)
         {
-        iLog->Log(
-                _L("returned souece type is not same as expected, returned sourcetype :[%d]"),
-                itSourceType);
+        iLog->Log(_L("returned souece type is not same as expected, returned sourcetype :[%d]"), itSourceType);
         error = KErrUnexpectedValue;
         }
     return error;
@@ -900,9 +885,7 @@
 
         if (itSinkType != sinktype)
             {
-            iLog->Log(
-                    _L("retur ned sink type is not sameas expected, returned sinktype :[%d]"),
-                    itSinkType);
+            iLog->Log(_L("retur ned sink type is not sameas expected, returned sinktype :[%d]"), itSinkType);
             error = KErrUnexpectedValue;
             }
         }
@@ -967,9 +950,7 @@
 
     if (itEffectType != effecttype)
         {
-        iLog->Log(
-                _L("returned effecttype type is not same as expected, returned effecttype :[%d]"),
-                itEffectType);
+        iLog->Log(_L("returned effecttype type is not same as expected, returned effecttype :[%d]"), itEffectType);
         error = KErrUnexpectedValue;
         }
     return error;
@@ -987,9 +968,7 @@
             error = iFactory->DeleteSource(iTmsClientSource);
             if (error != KErrNone)
                 {
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::DeleteClientSource, failed [%d]"),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::DeleteClientSource, failed [%d]"), error);
                 return error;
                 }
             }
@@ -998,9 +977,7 @@
             error = iFactory->DeleteSource(iTmsModemSource);
             if (error != KErrNone)
                 {
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::DeleteModemSource, failed [%d]"),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::DeleteModemSource, failed [%d]"), error);
                 return error;
                 }
             }
@@ -1009,9 +986,7 @@
             error = iFactory->DeleteSource(iTmsMicSource);
             if (error != KErrNone)
                 {
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::DeleteMicSource, failed [%d]"),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::DeleteMicSource, failed [%d]"), error);
                 return error;
                 }
             }
@@ -1032,9 +1007,7 @@
             error = iFactory->DeleteSink(iTmsClientSink);
             if (error != KErrNone)
                 {
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::DeleteClientSource, failed [%d]"),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::DeleteClientSource, failed [%d]"), error);
                 return error;
                 }
             }
@@ -1043,9 +1016,7 @@
             error = iFactory->DeleteSink(iTmsModemSink);
             if (error != KErrNone)
                 {
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::DeleteModemSource, failed [%d]"),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::DeleteModemSource, failed [%d]"), error);
                 return error;
                 }
             }
@@ -1054,9 +1025,7 @@
             error = iFactory->DeleteSink(iTmsSpkrSink);
             if (error != KErrNone)
                 {
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::DeleteSpkrSource, failed [%d]"),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::DeleteSpkrSource, failed [%d]"), error);
                 return error;
                 }
             }
@@ -1076,9 +1045,7 @@
         error = iTmsCall->CreateStream(TMS_STREAM_DOWNLINK, iTmsDnlink);
         }
 
-    iLog->Log(
-            _L("CTmsAudioServicesTestClass::CreateDownlinkStream Error [%d]"),
-            error);
+    iLog->Log(_L("CTmsAudioServicesTestClass::CreateDownlinkStream Error [%d]"), error);
     return error;
     }
 
@@ -1130,9 +1097,7 @@
             }
         else
             {
-            error
-                    = iFactory->GetSupportedFormats(TMS_STREAM_DOWNLINK,
-                            iCodec);
+            error = iFactory->GetSupportedFormats(TMS_STREAM_DOWNLINK, iCodec);
             }
 
         if (error != KErrNone)
@@ -1158,7 +1123,6 @@
                 iCodec.erase(itCodecs);
                 //delete *itDnlCodecs;
                 iFactory->DeleteFormat(*itCodecs);
-
                 }
             }
         }
@@ -1207,8 +1171,7 @@
                 || (formatType == KTagAMRNB && fmttype != TMS_FORMAT_AMR)
                 || (formatType == KTagPCM16 && fmttype != TMS_FORMAT_PCM))
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::GetType failed, Format is same as expected"));
+            iLog->Log(_L("CTmsAudioServicesTestClass::GetType failed, Format is same as expected"));
             error = KErrUnexpectedValue;
             }
         }
@@ -1233,8 +1196,7 @@
 
         if (error != KErrNone)
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetDownlinkFormat - failed, return error = %d" ),
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetDownlinkFormat - failed, return error = %d" ),
                     error);
             return error;
             }
@@ -1242,8 +1204,7 @@
     else
         {
         error = KErrNotReady;
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::SetDownlinkFormat - Need create TMSStream & TMSFormat first" ));
+        iLog->Log(_L("CTmsAudioServicesTestClass::SetDownlinkFormat - Need create TMSStream & TMSFormat first" ));
         }
 
     return error;
@@ -1260,8 +1221,7 @@
         error = iTmsDnlink->ResetFormat(iTmsFormatDn);
         if (error != KErrNone)
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::ReSetDownlinkFormat - failed, return error = %d" ),
+            iLog->Log(_L("CTmsAudioServicesTestClass::ReSetDownlinkFormat - failed, return error = %d" ),
                     error);
             return error;
             }
@@ -1269,8 +1229,7 @@
     else
         {
         error = KErrNotReady;
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::ReSetDownlinkFormat - Need create TMSStream & TMSFormat first" ));
+        iLog->Log(_L("CTmsAudioServicesTestClass::ReSetDownlinkFormat - Need create TMSStream & TMSFormat first" ));
         }
     return error;
     }
@@ -1284,8 +1243,7 @@
         {
         if (iTmsDnlink)
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::OpenDownlink - init Downlink"));
+            iLog->Log(_L("CTmsAudioServicesTestClass::OpenDownlink - init Downlink"));
             iTmsDnlink->AddObserver(*this, NULL);
             error = iTmsDnlink->Init();
             }
@@ -1321,15 +1279,13 @@
             }
         else
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetUplinkFormat - iTmsFormat"));
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetUplinkFormat - iTmsFormat"));
             error = iTmsUplink->SetFormat(iTmsFormat);
             }
 
         if (error != KErrNone)
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetUplinkFormat - failed, return error = %d" ),
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetUplinkFormat - failed, return error = %d" ),
                     error);
             return error;
             }
@@ -1337,8 +1293,7 @@
     else
         {
         error = KErrNotReady;
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::SetUplinkFormat - Need create TMSStream & TMSFormat first" ));
+        iLog->Log(_L("CTmsAudioServicesTestClass::SetUplinkFormat - Need create TMSStream & TMSFormat first" ));
         }
     return error;
     }
@@ -1354,17 +1309,14 @@
         error = iTmsUplink->ResetFormat(iTmsFormatUp);
         if (error != KErrNone)
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::ReSetUplinkFormat - failed, return error = %d" ),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::ReSetUplinkFormat - failed, return error = %d" ), error);
             return error;
             }
         }
     else
         {
         error = KErrNotReady;
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::ReSetUplinkFormat - Need create TMSStream & TMSFormat first" ));
+        iLog->Log(_L("CTmsAudioServicesTestClass::ReSetUplinkFormat - Need create TMSStream & TMSFormat first" ));
         }
     return error;
     }
@@ -1379,8 +1331,7 @@
         {
         if (iTmsUplink)
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::OpenDownlink - init Uplink"));
+            iLog->Log(_L("CTmsAudioServicesTestClass::OpenDownlink - init Uplink"));
             iTmsUplink->AddObserver(*this, NULL);
             error = iTmsUplink->Init();
             }
@@ -1640,72 +1591,59 @@
     if (effecttype == TMS_EFFECT_GAIN)
         {
         RDebug::Printf("[TMS STIF] GAIN, GetMaxLevel");
-        ret = ((TMSGainEffect*) iTmsUplinkEffect)->GetMaxLevel(iMaxGain);
-        RDebug::Printf(
-                "[TMS STIF] GAIN, GetMaxLevel Level [%d] Ret Err [%d]",
-                iMaxGain, ret);
+        ret = static_cast<TMSGainEffect*>(iTmsUplinkEffect)->GetMaxLevel(
+                iMaxGain);
+        RDebug::Printf("[TMS STIF] GAIN, GetMaxLevel Level [%d] Ret Err [%d]", iMaxGain, ret);
         RDebug::Printf("[TMS STIF] GAIN, SetLevel to [%d]", iMaxGain);
-        ret = ((TMSGainEffect*) iTmsUplinkEffect)->SetLevel(iMaxGain);
+        ret = static_cast<TMSGainEffect*>(iTmsUplinkEffect)->SetLevel(iMaxGain);
         RDebug::Printf("[TMS STIF] GAIN, SetLevel ret [%d]", ret);
         iLog->Log(_L("SetMaxGain: %d"), iMaxGain);
         RDebug::Printf("[TMS STIF] GAIN, GetLevel");
-        ret = ((TMSGainEffect*) iTmsUplinkEffect)->GetLevel(iGain);
-        RDebug::Printf(
-                "[TMS STIF] GAIN, Exp Level [%d] Ret Level [%d] Ret Err [%d]",
-                iMaxGain, iGain, ret);
+        ret = static_cast<TMSGainEffect*>(iTmsUplinkEffect)->GetLevel(iGain);
+        RDebug::Printf("[TMS STIF] GAIN, Exp Level [%d] Ret Level [%d] Ret Err [%d]", iMaxGain, iGain, ret);
         if (iGain != iMaxGain)
             {
-            iLog->Log(
-                    _L("GetGain doesn't return expected MaxGain!!! returned Gain = %d"),
-                    iGain);
+            iLog->Log(_L("GetGain doesn't return expected MaxGain!!! returned Gain = %d"), iGain);
             return KErrUnexpectedValue;
             }
 
-        ((TMSGainEffect*) iTmsUplinkEffect)->SetLevel(0);
+        static_cast<TMSGainEffect*>(iTmsUplinkEffect)->SetLevel(0);
         iLog->Log(_L("MuteMic"));
-        ((TMSGainEffect*) iTmsUplinkEffect)->GetLevel(iGain);
+        static_cast<TMSGainEffect*>(iTmsUplinkEffect)->GetLevel(iGain);
 
         if (iGain != 0)
             {
-            iLog->Log(
-                    _L("GetGain does not return expected Mute value!!! returned Gain = %d"),
-                    iGain);
+            iLog->Log(_L("GetGain does not return expected Mute value!!! returned Gain = %d"), iGain);
             return KErrUnexpectedValue;
             }
         }
     else if (effecttype == TMS_EFFECT_GLOBAL_GAIN)
         {
         RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetMaxLevel");
-        ret = ((TMSGlobalGainEffect*) iGlobalGain)->GetMaxLevel(iMaxGain);
-        RDebug::Printf(
-                "[TMS STIF] GLOBAL GAIN, GetMaxLevel Level [%d] Ret Err [%d]",
-                iMaxGain, ret);
+        ret = static_cast<TMSGlobalGainEffect*>(iGlobalGain)->GetMaxLevel(
+                iMaxGain);
+        RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetMaxLevel Level [%d] Ret Err [%d]", iMaxGain, ret);
         RDebug::Printf("[TMS STIF] GLOBAL GAIN, SetLevel to [%d]", iMaxGain);
-        ret = ((TMSGlobalGainEffect*) iGlobalGain)->SetLevel(iMaxGain);
+        ret = static_cast<TMSGlobalGainEffect*>(iGlobalGain)->SetLevel(
+                iMaxGain);
         RDebug::Printf("[TMS STIF] GLOBAL GAIN, SetLevel ret [%d]", ret);
         iLog->Log(_L("SetGlobleMaxGain: %d"), iMaxGain);
         RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetLevel");
-        ret = ((TMSGlobalGainEffect*) iGlobalGain)->GetLevel(iGain);
-        RDebug::Printf(
-                "[TMS STIF] GLOBAL GAIN, Exp Level [%d] Ret Level [%d] Ret Err [%d]",
-                iMaxGain, iGain, ret);
+        ret = static_cast<TMSGlobalGainEffect*>(iGlobalGain)->GetLevel(iGain);
+        RDebug::Printf("[TMS STIF] GLOBAL GAIN, Exp Level [%d] Ret Level [%d] Ret Err [%d]", iMaxGain, iGain, ret);
         if (iGain != iMaxGain)
             {
-            iLog->Log(
-                    _L("GetGain doesn't return expected Globle MaxGain!!! returned Gain = %d"),
-                    iGain);
+            iLog->Log(_L("GetGain doesn't return expected Globle MaxGain!!! returned Gain = %d"), iGain);
             return KErrUnexpectedValue;
             }
 
-        ((TMSGlobalGainEffect*) iGlobalGain)->SetLevel(0);
+        static_cast<TMSGlobalGainEffect*>(iGlobalGain)->SetLevel(0);
         iLog->Log(_L("MuteMic"));
-        ((TMSGlobalGainEffect*) iGlobalGain)->GetLevel(iGain);
+        static_cast<TMSGlobalGainEffect*>(iGlobalGain)->GetLevel(iGain);
 
         if (iGain != 0)
             {
-            iLog->Log(
-                    _L("GetGain does not return expected loble Mute value!!! returned Gain = %d"),
-                    iGain);
+            iLog->Log(_L("GetGain does not return expected loble Mute value!!! returned Gain = %d"), iGain);
             return KErrUnexpectedValue;
             }
         }
@@ -1727,76 +1665,68 @@
     if (effecttype == TMS_EFFECT_VOLUME)
         {
         RDebug::Printf("[TMS STIF] Volume, GetMaxLevel");
-        ret = ((TMSVolumeEffect*) iTmsDnlinkEffect)->GetMaxLevel(iMaxVolume);
-        RDebug::Printf("[TMS STIF] MaxLevel [%d] Ret Error [%d]", iMaxVolume,
-                ret);
-        RDebug::Printf("[TMS STIF] Volume, SetLevel to MaxLevel [%d]",
+        ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->GetMaxLevel(
                 iMaxVolume);
-        ret = ((TMSVolumeEffect*) iTmsDnlinkEffect)->SetLevel(iMaxVolume);
+        RDebug::Printf("[TMS STIF] MaxLevel [%d] Ret Error [%d]", iMaxVolume, ret);
+        RDebug::Printf("[TMS STIF] Volume, SetLevel to MaxLevel [%d]", iMaxVolume);
+        ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->SetLevel(
+                iMaxVolume);
         RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret);
         iLog->Log(_L("SetMaxVolume: %d"), iMaxVolume);
         RDebug::Printf("[TMS STIF] GetLevel");
-        ret = ((TMSVolumeEffect*) iTmsDnlinkEffect)->GetLevel(iVolume);
+        ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->GetLevel(
+                iVolume);
         RDebug::Printf("[TMS STIF] Level [%d] Ret Error [%d]", iVolume, ret);
         if (iVolume != iMaxVolume)
             {
-            iLog->Log(
-                    _L("GetVolume doesn't return expected MaxVolume!!! returned Volume = %d"),
-                    iVolume);
+            iLog->Log(_L("GetVolume doesn't return expected MaxVolume!!! returned Volume = %d"), iVolume);
             return KErrUnexpectedValue;
             }
 
         RDebug::Printf("[TMS STIF] Volume, SetLevel to 0 ");
-        ret = ((TMSVolumeEffect*) iTmsDnlinkEffect)->SetLevel(0);
+        ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->SetLevel(0);
         RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret);
         iLog->Log(_L("Mute Volume"));
-        ret = ((TMSVolumeEffect*) iTmsDnlinkEffect)->GetLevel(iVolume);
+        ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->GetLevel(
+                iVolume);
         RDebug::Printf("[TMS STIF] Level [%d] Ret Error [%d]", iVolume, ret);
         if (iVolume != 0)
             {
-            iLog->Log(
-                    _L("GetVolume does not return expected Mute value!!! returned Volume = %d"),
-                    iVolume);
+            iLog->Log(_L("GetVolume does not return expected Mute value!!! returned Volume = %d"), iVolume);
             return KErrUnexpectedValue;
             }
         }
     else if (effecttype == TMS_EFFECT_GLOBAL_VOL)
         {
         RDebug::Printf("[TMS STIF] GLOBAL_VOL, Get Current Level");
-        ret = ((TMSGlobalVolEffect*) iGlobalVol)->GetLevel(iVolume);
-        RDebug::Printf("[TMS STIF] Current Vol Level [%d] Ret Error [%d]",
-                iVolume, ret);
+        ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetLevel(iVolume);
+        RDebug::Printf("[TMS STIF] Current Vol Level [%d] Ret Error [%d]", iVolume, ret);
         RDebug::Printf("[TMS STIF] GLOBAL_VOL, GetMaxLevel");
-        ret = ((TMSGlobalVolEffect*) iGlobalVol)->GetMaxLevel(iMaxVolume);
-        RDebug::Printf("[TMS STIF] MaxLevel [%d] Ret Error [%d]", iMaxVolume,
-                ret);
+        ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetMaxLevel(
+                iMaxVolume);
+        RDebug::Printf("[TMS STIF] MaxLevel [%d] Ret Error [%d]", iMaxVolume, ret);
         RDebug::Printf("[TMS STIF] GLOBAL_VOL, SetLevel to [%d]", iMaxVolume);
-        ret = ((TMSGlobalVolEffect*) iGlobalVol)->SetLevel(iMaxVolume);
+        ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->SetLevel(
+                iMaxVolume);
         RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret);
         iLog->Log(_L("SetMaxGlobleVolume: %d"), iMaxVolume);
         RDebug::Printf("[TMS STIF] GLOBAL_VOL,GetLevel");
-        ret = ((TMSGlobalVolEffect*) iGlobalVol)->GetLevel(iVolume);
-        RDebug::Printf(
-                "[TMS STIF] Expected Level [%d] Ret Level [%d] Ret Error [%d]",
-                iMaxVolume, iVolume, ret);
+        ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetLevel(iVolume);
+        RDebug::Printf("[TMS STIF] Expected Level [%d] Ret Level [%d] Ret Error [%d]", iMaxVolume, iVolume, ret);
         iLog->Log(_L("GetMaxGlobleVolume: %d"), iVolume);
         if (iVolume != iMaxVolume)
             {
-            iLog->Log(
-                    _L("GetGlobleVolume doesn't return expected MaxVolume!!! returned Volume = %d"),
-                    iVolume);
+            iLog->Log(_L("GetGlobleVolume doesn't return expected MaxVolume!!! returned Volume = %d"), iVolume);
             return KErrUnexpectedValue;
             }
 
-        ((TMSGlobalVolEffect*) iGlobalVol)->SetLevel(0);
+        static_cast<TMSGlobalVolEffect*>(iGlobalVol)->SetLevel(0);
         iLog->Log(_L("Mute Globle Volume"));
-        ((TMSGlobalVolEffect*) iGlobalVol)->GetLevel(iVolume);
+        static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetLevel(iVolume);
 
         if (iVolume != 0)
             {
-            iLog->Log(
-                    _L("GetGlobleVolume does not return expected Mute value!!! returned Volume = %d"),
-                    iVolume);
+            iLog->Log(_L("GetGlobleVolume does not return expected Mute value!!! returned Volume = %d"), iVolume);
             return KErrUnexpectedValue;
             }
         }
@@ -1890,9 +1820,7 @@
 
     if (error != KErrNone)
         {
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::AddGlobalRoutingObserver failed error [%d]"),
-                error);
+        iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobalRoutingObserver failed error [%d]"), error);
         }
     return error;
     }
@@ -1909,9 +1837,7 @@
 
     if (error != KErrNone)
         {
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::DeleteGlobalRoutingObserver failed error [%d]"),
-                error);
+        iLog->Log(_L("CTmsAudioServicesTestClass::DeleteGlobalRoutingObserver failed error [%d]"), error);
         }
     return error;
     }
@@ -1927,59 +1853,43 @@
         if (OutputType == KTagNone)
             {
             error = iTmsGlobalRouting->SetOutput(TMS_AUDIO_OUTPUT_NONE);
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_NONE, error:[%d] "),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_NONE, error:[%d] "), error);
             }
         else if (OutputType == KTagPublic)
             {
             error = iTmsGlobalRouting->SetOutput(TMS_AUDIO_OUTPUT_PUBLIC);
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_PUBLIC, error:[%d] "),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_PUBLIC, error:[%d] "), error);
             }
         else if (OutputType == KTagPrivate)
             {
             error = iTmsGlobalRouting->SetOutput(TMS_AUDIO_OUTPUT_PRIVATE);
-            iLog->Log(
-                    _L ("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_PRIVATE, error:[%d] "),
-                    error);
+            iLog->Log(_L ("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_PRIVATE, error:[%d] "), error);
             }
         else if (OutputType == KTagHandset)
             {
             error = iTmsGlobalRouting->SetOutput(TMS_AUDIO_OUTPUT_HANDSET);
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_HANDSET, error:[%d] "),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_HANDSET, error:[%d] "), error);
             }
         else if (OutputType == KTagLoudspeaker)
             {
             error = iTmsGlobalRouting->SetOutput(TMS_AUDIO_OUTPUT_LOUDSPEAKER);
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_LOUDSPEAKER, error:[%d] "),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_LOUDSPEAKER, error:[%d] "), error);
             }
         else if (OutputType == KTagWiredAccessory)
             {
             error = iTmsGlobalRouting->SetOutput(
                     TMS_AUDIO_OUTPUT_WIRED_ACCESSORY);
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_WIRED_ACCESSORY, error:[%d] "),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_WIRED_ACCESSORY, error:[%d] "), error);
             }
         else if (OutputType == KTagAccessory)
             {
             error = iTmsGlobalRouting->SetOutput(TMS_AUDIO_OUTPUT_ACCESSORY);
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_ACCESSORY, error:[%d] "),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_ACCESSORY, error:[%d] "), error);
             }
         else if (OutputType == KTagTTY)
             {
             error = iTmsGlobalRouting->SetOutput(TMS_AUDIO_OUTPUT_ETTY);
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_ETTY, error:[%d] "),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetOutputDevice - TMS_AUDIO_OUTPUT_ETTY, error:[%d] "), error);
             }
         else
             {
@@ -2002,9 +1912,7 @@
     if (iTmsGlobalRouting)
         {
         error = iTmsGlobalRouting->GetOutput(iDevice);
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::GetOutput, error:[%d] iDevice:[%d]"),
-                error, iDevice);
+        iLog->Log(_L("CTmsAudioServicesTestClass::GetOutput, error:[%d] iDevice:[%d]"), error, iDevice);
         }
 
     if (error != KErrNone)
@@ -2021,9 +1929,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_NONE)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagPublic)
@@ -2031,9 +1937,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_PUBLIC)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetOutput - TMS_AUDIO_OUTPUT_PUBLIC, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetOutput - TMS_AUDIO_OUTPUT_PUBLIC, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagPrivate)
@@ -2041,9 +1945,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_PRIVATE)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetOutput - TMS_AUDIO_OUTPUT_PRIVATE, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetOutput - TMS_AUDIO_OUTPUT_PRIVATE, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagHandset)
@@ -2051,9 +1953,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_HANDSET)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagLoudspeaker)
@@ -2061,9 +1961,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_LOUDSPEAKER)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagWiredAccessory)
@@ -2071,9 +1969,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_WIRED_ACCESSORY)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagAccessory)
@@ -2081,9 +1977,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_ACCESSORY)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagTTY)
@@ -2091,9 +1985,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_ETTY)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetOutput - not expected output, error:[%d] "), error);
                 }
             }
         else
@@ -2114,9 +2006,7 @@
     if (iTmsGlobalRouting)
         {
         error = iTmsGlobalRouting->GetPreviousOutput(iDevice);
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::GetPreviousOutput, error:[%d] "),
-                error);
+        iLog->Log(_L("CTmsAudioServicesTestClass::GetPreviousOutput, error:[%d] "), error);
         }
 
     if (error != KErrNone)
@@ -2133,9 +2023,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_NONE)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetPreviousOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetPreviousOutput - not expected output, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagPublic)
@@ -2143,9 +2031,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_PUBLIC)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetPreviousOutput - TMS_AUDIO_OUTPUT_PUBLIC, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetPreviousOutput - TMS_AUDIO_OUTPUT_PUBLIC, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagPrivate)
@@ -2153,9 +2039,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_PRIVATE)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetPreviousOutput - TMS_AUDIO_OUTPUT_PRIVATE, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetPreviousOutput - TMS_AUDIO_OUTPUT_PRIVATE, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagHandset)
@@ -2163,9 +2047,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_HANDSET)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetPreviousOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetPreviousOutput - not expected output, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagLoudspeaker)
@@ -2173,9 +2055,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_LOUDSPEAKER)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetPreviousOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetPreviousOutput - not expected output, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagWiredAccessory)
@@ -2183,9 +2063,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_WIRED_ACCESSORY)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetPreviousOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetPreviousOutput - not expected output, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagAccessory)
@@ -2193,9 +2071,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_ACCESSORY)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetPreviousOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetPreviousOutput - not expected output, error:[%d] "), error);
                 }
             }
         else if (OutputType == KTagTTY)
@@ -2203,9 +2079,7 @@
             if (iDevice != TMS_AUDIO_OUTPUT_ETTY)
                 {
                 error = KErrUnexpectedValue;
-                iLog->Log(
-                        _L("CTmsAudioServicesTestClass::GetPr eviousOutput - not expected output, error:[%d] "),
-                        error);
+                iLog->Log(_L("CTmsAudioServicesTestClass::GetPr eviousOutput - not expected output, error:[%d] "), error);
                 }
             }
         else
@@ -2229,8 +2103,7 @@
 
         if (error == KErrNone)
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::GetAvailableOutputs, display output"));
+            iLog->Log(_L("CTmsAudioServicesTestClass::GetAvailableOutputs, display output"));
             std::vector<guint>::iterator iteroutputs =
                     iAvailableoutputs.begin();
 
@@ -2241,9 +2114,7 @@
             }
         else
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::GetAvailableOutputs failed, error = %d"),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::GetAvailableOutputs failed, error = %d"), error);
             }
         }
     else
@@ -2262,21 +2133,16 @@
 
     if (error == KErrNone)
         {
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::GetBitRateList - display supported bitRate list"));
+        iLog->Log(_L("CTmsAudioServicesTestClass::GetBitRateList - display supported bitRate list"));
         std::vector<guint>::iterator itBitrates = iBitratesVector.begin();
         for (; itBitrates <= iBitratesVector.end(); itBitrates++)
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::GetBitRateList BR: %d"),
-                    *itBitrates);
+            iLog->Log(_L("CTmsAudioServicesTestClass::GetBitRateList BR: %d"), *itBitrates);
             }
         }
     else
         {
-        iLog->Log(
-                _L("CTmsAudioServicesTestClass::GetBitRateList failed. error: %d"),
-                error);
+        iLog->Log(_L("CTmsAudioServicesTestClass::GetBitRateList failed. error: %d"), error);
         }
     return error;
     }
@@ -2375,13 +2241,13 @@
     switch (iUpLinkCodec)
         {
         case TMS_FORMAT_G711:
-            error = ((TMSG711Format*) iTmsFormatUp)->GetVADMode(aVad);
+            error = static_cast<TMSG711Format*>(iTmsFormatUp)->GetVADMode(aVad);
             break;
         case TMS_FORMAT_G729:
-            error = ((TMSG729Format*) iTmsFormatUp)->GetVADMode(aVad);
+            error = static_cast<TMSG729Format*>(iTmsFormatUp)->GetVADMode(aVad);
             break;
         case TMS_FORMAT_ILBC:
-            error = ((TMSILBCFormat*) iTmsFormatUp)->GetVADMode(aVad);
+            error = static_cast<TMSILBCFormat*>(iTmsFormatUp)->GetVADMode(aVad);
             break;
         default:
             break;
@@ -2406,13 +2272,13 @@
     switch (iUpLinkCodec)
         {
         case TMS_FORMAT_G711:
-            error = ((TMSG711Format*) iTmsFormatUp)->SetVADMode(iVad);
+            error = static_cast<TMSG711Format*>(iTmsFormatUp)->SetVADMode(iVad);
             break;
         case TMS_FORMAT_G729:
-            error = ((TMSG729Format*) iTmsFormatUp)->SetVADMode(iVad);
+            error = static_cast<TMSG729Format*>(iTmsFormatUp)->SetVADMode(iVad);
             break;
         case TMS_FORMAT_ILBC:
-            error = ((TMSILBCFormat*) iTmsFormatUp)->SetVADMode(iVad);
+            error = static_cast<TMSILBCFormat*>(iTmsFormatUp)->SetVADMode(iVad);
             break;
         default:
             break;
@@ -2432,7 +2298,7 @@
         if ((linkType == KTagUplink) && (iUpLinkCodec == TMS_FORMAT_G711))
             {
             TMSG711CodecMode aMode;
-            ((TMSG711Format*) iTmsFormatUp)->GetMode(aMode);
+            static_cast<TMSG711Format*>(iTmsFormatUp)->GetMode(aMode);
 
             if (aMode == TMS_G711_CODEC_MODE_ALAW)
                 {
@@ -2451,7 +2317,7 @@
                 && (iUpLinkCodec == TMS_FORMAT_ILBC))
             {
             TMSILBCCodecMode aMode;
-            ((TMSILBCFormat*) iTmsFormatUp)->GetMode(aMode);
+            static_cast<TMSILBCFormat*>(iTmsFormatUp)->GetMode(aMode);
 
             if (aMode == TMS_ILBC_CODEC_MODE_20MS_FRAME)
                 {
@@ -2470,7 +2336,7 @@
                 && (iDnLinkCodec == TMS_FORMAT_G711))
             {
             TMSG711CodecMode aMode;
-            ((TMSG711Format*) iTmsFormatDn)->GetMode(aMode);
+            static_cast<TMSG711Format*>(iTmsFormatDn)->GetMode(aMode);
 
             if (aMode == TMS_G711_CODEC_MODE_ALAW)
                 {
@@ -2489,7 +2355,7 @@
                 && (iDnLinkCodec == TMS_FORMAT_ILBC))
             {
             TMSILBCCodecMode aMode;
-            ((TMSILBCFormat*) iTmsFormatDn)->GetMode(aMode);
+            static_cast<TMSILBCFormat*>(iTmsFormatDn)->GetMode(aMode);
 
             if (aMode == TMS_ILBC_CODEC_MODE_20MS_FRAME)
                 {
@@ -2532,54 +2398,56 @@
                 && (mode == KTagALaw))
             {
             iLog->Log(_L("UPL Mode Set: aLaw"));
-            ((TMSG711Format*) iTmsFormatUp)->SetMode(TMS_G711_CODEC_MODE_ALAW);
+            static_cast<TMSG711Format*>(iTmsFormatUp)->SetMode(
+                    TMS_G711_CODEC_MODE_ALAW);
             }
         else if ((linkType == KTagUplink)
                 && (iUpLinkCodec == TMS_FORMAT_G711) && (mode == KTagULaw))
             {
             iLog->Log(_L("UPL Mode Set: uLaw"));
-            ((TMSG711Format*) iTmsFormatUp)->SetMode(
+            static_cast<TMSG711Format*>(iTmsFormatUp)->SetMode(
                     TMS_G711_CODEC_MODE_MULAW);
             }
         else if ((linkType == KTagUplink)
                 && (iUpLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag20ms))
             {
             iLog->Log(_L("UPL Mode Set: 20ms frame"));
-            ((TMSILBCFormat*) iTmsFormatUp)->SetMode(
+            static_cast<TMSILBCFormat*>(iTmsFormatUp)->SetMode(
                     TMS_ILBC_CODEC_MODE_20MS_FRAME);
             }
         else if ((linkType == KTagUplink)
                 && (iUpLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag30ms))
             {
             iLog->Log(_L("UPL Mode Set: 30ms frame"));
-            ((TMSILBCFormat*) iTmsFormatUp)->SetMode(
+            static_cast<TMSILBCFormat*>(iTmsFormatUp)->SetMode(
                     TMS_ILBC_CODEC_MODE_30MS_FRAME);
             }
         else if ((linkType == KTagDnlink)
                 && (iDnLinkCodec == TMS_FORMAT_G711) && (mode == KTagALaw))
             {
             iLog->Log(_L("DNL Mode Set: aLaw"));
-            ((TMSG711Format*) iTmsFormatDn)->SetMode(TMS_G711_CODEC_MODE_ALAW);
+            static_cast<TMSG711Format*>(iTmsFormatDn)->SetMode(
+                    TMS_G711_CODEC_MODE_ALAW);
             }
         else if ((linkType == KTagDnlink)
                 && (iDnLinkCodec == TMS_FORMAT_G711) && (mode == KTagULaw))
             {
             iLog->Log(_L("DNL Mode Set: uLaw"));
-            ((TMSG711Format*) iTmsFormatDn)->SetMode(
+            static_cast<TMSG711Format*>(iTmsFormatDn)->SetMode(
                     TMS_G711_CODEC_MODE_MULAW);
             }
         else if ((linkType == KTagDnlink)
                 && (iDnLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag20ms))
             {
             iLog->Log(_L("DNL Mode Set: 20ms frame"));
-            ((TMSILBCFormat*) iTmsFormatDn)->SetMode(
+            static_cast<TMSILBCFormat*>(iTmsFormatDn)->SetMode(
                     TMS_ILBC_CODEC_MODE_20MS_FRAME);
             }
         else if ((linkType == KTagDnlink)
                 && (iDnLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag30ms))
             {
             iLog->Log(_L("DNL Mode Set: 30ms frame"));
-            ((TMSILBCFormat*) iTmsFormatDn)->SetMode(
+            static_cast<TMSILBCFormat*>(iTmsFormatDn)->SetMode(
                     TMS_ILBC_CODEC_MODE_30MS_FRAME);
             }
         else
@@ -2600,11 +2468,11 @@
     switch (iDnLinkCodec)
         {
         case TMS_FORMAT_G711:
-            error = ((TMSG711Format*) iTmsFormatDn)->GetCNG(aCng);
+            error = static_cast<TMSG711Format*>(iTmsFormatDn)->GetCNG(aCng);
             iLog->Log(_L("CNG: %d"), aCng);
             break;
         case TMS_FORMAT_ILBC:
-            error = ((TMSILBCFormat*) iTmsFormatDn)->GetCNG(aCng);
+            error = static_cast<TMSILBCFormat*>(iTmsFormatDn)->GetCNG(aCng);
             iLog->Log(_L("CNG: %d"), aCng);
             break;
         default:
@@ -2628,11 +2496,11 @@
     switch (iDnLinkCodec)
         {
         case TMS_FORMAT_G711:
-            ((TMSG711Format*) iTmsFormatDn)->SetCNG(iCng);
+            static_cast<TMSG711Format*>(iTmsFormatDn)->SetCNG(iCng);
             iLog->Log(_L("CNG set: %d"), iCng);
             break;
         case TMS_FORMAT_ILBC:
-            ((TMSILBCFormat*) iTmsFormatDn)->SetCNG(iCng);
+            static_cast<TMSILBCFormat*>(iTmsFormatDn)->SetCNG(iCng);
             iLog->Log(_L("CNG set: %d"), iCng);
             break;
         default:
@@ -2648,7 +2516,7 @@
     TBool aPlc = EFalse;
     if (iDnLinkCodec == TMS_FORMAT_G711)
         {
-        ((TMSG711Format*) iTmsFormatDn)->GetPlc(aPlc);
+        static_cast<TMSG711Format*>(iTmsFormatDn)->GetPlc(aPlc);
         iLog->Log(_L("PLC: %d"), aPlc);
         }
 
@@ -2668,7 +2536,7 @@
     iPlc = (iPlc) ? EFalse : ETrue;
     if (iDnLinkCodec == TMS_FORMAT_G711)
         {
-        error = ((TMSG711Format*) iTmsFormatDn)->SetPlc(iPlc);
+        error = static_cast<TMSG711Format*>(iTmsFormatDn)->SetPlc(iPlc);
         iLog->Log(_L("PLC set: %d"), iPlc);
         }
 
@@ -2707,9 +2575,7 @@
         {
         error = iTmsUplink->AddSource(iTmsMicSource);
         }
-    iLog->Log(
-            _L("CTmsAudioServicesTestClass::AddMicSrcToUplStream Error [%d]"),
-            error);
+    iLog->Log(_L("CTmsAudioServicesTestClass::AddMicSrcToUplStream Error [%d]"), error);
     return error;
     }
 
@@ -2722,9 +2588,7 @@
         {
         error = iTmsDnlink->AddSource(iTmsModemSource);
         }
-    iLog->Log(
-            _L("CTmsAudioServicesTestClass::AddModemSrcToDnlStream Error [%d]"),
-            error);
+    iLog->Log(_L("CTmsAudioServicesTestClass::AddModemSrcToDnlStream Error [%d]"), error);
     return error;
     }
 
@@ -2738,14 +2602,13 @@
         {
         error = iTmsDnlink->RemoveSource(iTmsClientSource);
         }
-    iLog->Log(
-            _L("CTmsAudioServicesTestClass::RemoveClientSrcFromDnlStream Error [%d]"),
-            error);
+    iLog->Log(_L("CTmsAudioServicesTestClass::RemoveClientSrcFromDnlStream Error [%d]"), error);
     return error;
     }
 
 // Note: CS and IP
-TInt CTmsAudioServicesTestClass::RemoveMicSrcFromUplStream(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::RemoveMicSrcFromUplStream(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::RemoveMicSrcFromUplStream"));
     TInt error = KErrNone;
@@ -2753,14 +2616,13 @@
         {
         error = iTmsUplink->RemoveSource(iTmsMicSource);
         }
-    iLog->Log(
-            _L("CTmsAudioServicesTestClass::RemoveMicSrcFromUplStream Error [%d]"),
-            error);
+    iLog->Log(_L("CTmsAudioServicesTestClass::RemoveMicSrcFromUplStream Error [%d]"), error);
     return error;
     }
 
 // Note: CS ONLY
-TInt CTmsAudioServicesTestClass::RemoveModemSrcFromDnlStream(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::RemoveModemSrcFromDnlStream(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::RemoveModemSrcFromDnlStream"));
     TInt error = KErrNone;
@@ -2768,9 +2630,7 @@
         {
         error = iTmsDnlink->RemoveSource(iTmsModemSource);
         }
-    iLog->Log(
-            _L("CTmsAudioServicesTestClass::RemoveModemSrcFromDnlStream Error [%d]"),
-            error);
+    iLog->Log(_L("CTmsAudioServicesTestClass::RemoveModemSrcFromDnlStream Error [%d]"), error);
     return error;
     }
 
@@ -2780,48 +2640,53 @@
     TInt error = KErrNone;
     if (iTmsClientSource)
         {
-        error = ((TMSClientSource*) iTmsClientSource)->AddObserver(*this,
-                NULL);
+        error = static_cast<TMSClientSource*>(iTmsClientSource)->AddObserver(
+                *this, NULL);
         }
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::RemoveSourceObserver(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::RemoveSourceObserver(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::RemoveSourceObserver"));
     TInt error = KErrNone;
     if (iTmsClientSource)
         {
-        error = ((TMSClientSource*) iTmsClientSource)->RemoveObserver(*this);
+        error = static_cast<TMSClientSource*>(iTmsClientSource)->RemoveObserver(
+                *this);
         }
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::AddClientSinkToUplStream(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::AddClientSinkToUplStream(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::AddClientSinkToUplStream"));
     TInt error = KErrNone;
     if (iTmsUplink && iTmsClientSink)
         {
-        //((TMSClientSink*) iTmsSink)->AddObserver(*this, NULL);
+        //static_cast<TMSClientSink*>(iTmsSink)->AddObserver(*this, NULL);
         error = iTmsUplink->AddSink(iTmsClientSink);
         }
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::AddModemSinkToUplStream(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::AddModemSinkToUplStream(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::AddModemSinkToUplStream"));
     TInt error = KErrNone;
     if (iTmsUplink && iTmsModemSink)
         {
-        //((TMSClientSink*) iTmsSink)->AddObserver(*this, NULL);
+        //static_cast<TMSClientSink*>(iTmsSink)->AddObserver(*this, NULL);
         error = iTmsUplink->AddSink(iTmsModemSink);
         }
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::AddSpkrSinkToDnlStream(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::AddSpkrSinkToDnlStream(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::AddSpkrSinkToDnlStream"));
     TInt error = KErrNone;
@@ -2856,7 +2721,8 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::RemoveSpkrSinkFromDnlStream(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::RemoveSpkrSinkFromDnlStream(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::RemoveSpkrSinkFromDnlStream"));
     TInt error = KErrNone;
@@ -2873,7 +2739,8 @@
     TInt error = KErrNone;
     if (iTmsUplink && iTmsClientSink)
         {
-        error = ((TMSClientSink*) iTmsClientSink)->AddObserver(*this, NULL);
+        error = static_cast<TMSClientSink*>(iTmsClientSink)->AddObserver(*this,
+                NULL);
         }
     return error;
     }
@@ -2884,7 +2751,8 @@
     TInt error = KErrNone;
     if (iTmsUplink && iTmsClientSink)
         {
-        error = ((TMSClientSink*) iTmsClientSink)->RemoveObserver(*this);
+        error = static_cast<TMSClientSink*>(iTmsClientSink)->RemoveObserver(
+                *this);
         }
     return error;
     }
@@ -2898,7 +2766,8 @@
         status = iFactory->CreateEffect(TMS_EFFECT_VOLUME, iTmsDnlinkEffect);
         if (status == KErrNone)
             {
-            ((TMSVolumeEffect*) iTmsDnlinkEffect)->AddObserver(*this, NULL);
+            static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->AddObserver(*this,
+                    NULL);
             }
         }
     RDebug::Printf("[TMS STIF] CreateVolumeEffect Return [%d]", status);
@@ -2915,16 +2784,17 @@
 
         if (status == KErrNone)
             {
-            ((TMSGlobalVolEffect*) iGlobalVol)->AddObserver(*this, NULL);
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::CreateVolumeGlobleEffect - AddObserver"));
+            static_cast<TMSGlobalVolEffect*>(iGlobalVol)->AddObserver(*this,
+                    NULL);
+            iLog->Log(_L("CTmsAudioServicesTestClass::CreateVolumeGlobleEffect - AddObserver"));
             }
         }
     RDebug::Printf("[TMS STIF] CreateVolumeGlobleEffect Return [%d]", status);
     return status;
     }
 
-TInt CTmsAudioServicesTestClass::AddVolumeEffectToStream(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::AddVolumeEffectToStream(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::AddVolumeEffectToStream"));
     TInt error = KErrNone;
@@ -2950,8 +2820,7 @@
 TInt CTmsAudioServicesTestClass::RemoveGlobleVolumeEffectToStream(
         CStifItemParser& /*aItem*/)
     {
-    iLog->Log(
-            _L("CTmsAudioServicesTestClass::RemoveGlobleVolumeEffectToStream"));
+    iLog->Log(_L("CTmsAudioServicesTestClass::RemoveGlobleVolumeEffectToStream"));
     TInt error = KErrNone;
     if (iTmsDnlink && iGlobalVol)
         {
@@ -2970,7 +2839,8 @@
         status = iFactory->CreateEffect(TMS_EFFECT_GAIN, iTmsUplinkEffect);
         if (status == KErrNone)
             {
-            ((TMSGainEffect*) iTmsUplinkEffect)->AddObserver(*this, NULL);
+            static_cast<TMSGainEffect*>(iTmsUplinkEffect)->AddObserver(*this,
+                    NULL);
             }
         }
     RDebug::Printf("[TMS STIF] CreateGainEffect Return [%d]", status);
@@ -2986,14 +2856,16 @@
         status = iFactory->CreateEffect(TMS_EFFECT_GLOBAL_GAIN, iGlobalGain);
         if (status == KErrNone)
             {
-            ((TMSGlobalGainEffect*) iGlobalGain)->AddObserver(*this, NULL);
+            static_cast<TMSGlobalGainEffect*>(iGlobalGain)->AddObserver(*this,
+                    NULL);
             }
         }
     RDebug::Printf("[TMS STIF] CreateGlobleGainEffect Return [%d]", status);
     return status;
     }
 
-TInt CTmsAudioServicesTestClass::AddGainEffectToStream(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::AddGainEffectToStream(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::AddGainEffectToStream"));
     TInt error = KErrNone;
@@ -3004,7 +2876,8 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::AddGlobleGainEffectToStream(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::AddGlobleGainEffectToStream(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobleGainEffectToStream"));
     TInt error = KErrNone;
@@ -3018,8 +2891,7 @@
 TInt CTmsAudioServicesTestClass::RemoveGlobleGainEffectToStream(
         CStifItemParser& /*aItem*/)
     {
-    iLog->Log(
-            _L("CTmsAudioServicesTestClass::RemoveGlobleGainEffectToStream"));
+    iLog->Log(_L("CTmsAudioServicesTestClass::RemoveGlobleGainEffectToStream"));
     TInt error = KErrNone;
     if (iTmsUplink && iGlobalGain)
         {
@@ -3053,8 +2925,9 @@
 
         Mem::Copy(desptr, srcptr, srcsize);
 
-        ((TMSClientSource*) iTmsClientSource)->BufferFilled(*iPlayBuf);
-        ((TMSClientSink*) iTmsClientSink)->BufferProcessed(iRecBuf);
+        static_cast<TMSClientSource*>(iTmsClientSource)->BufferFilled(
+                *iPlayBuf);
+        static_cast<TMSClientSink*>(iTmsClientSink)->BufferProcessed(iRecBuf);
 
         iPlayBufReady = EFalse; // buf filled, ready for FillBuffer
         iRecBufReady = EFalse; // buf consumed, ready for EmptyBuffer
--- a/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocksCallbacks.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocksCallbacks.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -19,11 +19,11 @@
 #include "TmsAudioServicesTestClass.h"
 #include "debug.h"
 
-void CTmsAudioServicesTestClass::TMSStreamEvent(TMSStream* stream,
+void CTmsAudioServicesTestClass::TMSStreamEvent(const TMSStream& stream,
         TMSSignalEvent event)
     {
     iLog->Log(_L("[tms cb]CTmsAudioServicesTestClass::TMSStreamEvent"));
-    switch (stream->GetStreamType())
+    switch (const_cast<TMSStream&>(stream).GetStreamType())
         {
         case TMS_STREAM_UPLINK:
             {
@@ -36,26 +36,22 @@
                         {
                         case TMS_STREAM_INITIALIZED:
                             iUpLinkStatus = INITIALIZED;
-                            iLog->Log(
-                                    _L("[tms cb]TMSStreamEvent EOpenUplinkComplete"));
+                            iLog->Log(_L("[tms cb]TMSStreamEvent EOpenUplinkComplete"));
                             ProcessEvent(EOpenUplinkComplete, KErrNone);
                             break;
                         case TMS_STREAM_UNINITIALIZED:
                             iUpLinkStatus = UNINITIALIZED;
-                            iLog->Log(
-                                    _L("[tms cb]TMSStreamEvent EUplinkClosed"));
+                            iLog->Log(_L("[tms cb]TMSStreamEvent EUplinkClosed"));
                             ProcessEvent(EUplinkClosed, KErrNone);
                             break;
                         case TMS_STREAM_PAUSED:
                             iUpLinkStatus = PAUSED;
-                            iLog->Log(
-                                    _L("[tms cb]TMSStreamEvent EStreamPaused"));
+                            iLog->Log(_L("[tms cb]TMSStreamEvent EStreamPaused"));
                             ProcessEvent(EStreamPaused, KErrNone);
                             break;
                         case TMS_STREAM_STARTED:
                             iUpLinkStatus = STARTED;
-                            iLog->Log(
-                                    _L("[tms cb]TMSStreamEvent EStreamStarted"));
+                            iLog->Log(_L("[tms cb]TMSStreamEvent EStreamStarted"));
                             ProcessEvent(EStreamStarted, KErrNone);
                             break;
                         default:
@@ -78,26 +74,22 @@
                         {
                         case TMS_STREAM_INITIALIZED:
                             iDnLinkStatus = INITIALIZED;
-                            iLog->Log(
-                                    _L("[tms cb]TMSStreamEvent EOpenDownlinkComplete"));
+                            iLog->Log(_L("[tms cb]TMSStreamEvent EOpenDownlinkComplete"));
                             ProcessEvent(EOpenDownlinkComplete, KErrNone);
                             break;
                         case TMS_STREAM_UNINITIALIZED:
                             iDnLinkStatus = UNINITIALIZED;
-                            iLog->Log(
-                                    _L("[tms cb]TMSStreamEvent EDownlinkClosed"));
+                            iLog->Log(_L("[tms cb]TMSStreamEvent EDownlinkClosed"));
                             ProcessEvent(EDownlinkClosed, KErrNone);
                             break;
                         case TMS_STREAM_PAUSED:
                             iDnLinkStatus = PAUSED;
-                            iLog->Log(
-                                    _L("[tms cb]TMSStreamEvent EStreamPaused"));
+                            iLog->Log(_L("[tms cb]TMSStreamEvent EStreamPaused"));
                             ProcessEvent(EStreamPaused, KErrNone);
                             break;
                         case TMS_STREAM_STARTED:
                             iDnLinkStatus = STARTED;
-                            iLog->Log(
-                                    _L("[tms cb]TMSStreamEvent EStreamStarted"));
+                            iLog->Log(_L("[tms cb]TMSStreamEvent EStreamStarted"));
                             ProcessEvent(EStreamStarted, KErrNone);
                             break;
                         default:
@@ -128,32 +120,32 @@
         }
     }
 
-void CTmsAudioServicesTestClass::BufferProcessed(TMSBuffer* /*buffer*/,
+void CTmsAudioServicesTestClass::BufferProcessed(const TMSBuffer* /*buffer*/,
         gint /*reason*/)
     {
     iLog->Log(_L("[tms cb]CTmsAudioServicesTestClass::BufferProcessed"));
     }
 
 //From TMSClientSinkObserver
-void CTmsAudioServicesTestClass::ProcessBuffer(TMSBuffer* buffer)
+void CTmsAudioServicesTestClass::ProcessBuffer(const TMSBuffer* buffer)
     {
     iLog->Log(_L("[tms cb]CTmsAudioServicesTestClass::ProcessBuffer"));
     ProcessEvent(EEmptyBuffer, KErrNone);
     iRecBufReady = ETrue;
-    iRecBuf = buffer;
+    iRecBuf = const_cast<TMSBuffer*>(buffer);
     if (iUpLinkStatus == STARTED)
         {
         // Process recorded buffer here.
         DoLoopback();
-        //  ((TMSClientSink*)iTmsSink)->BufferProcessed(iRecBuf);
+        //static_cast<TMSClientSink*>(iTmsSink)->BufferProcessed(iRecBuf);
         }
     }
 
-void CTmsAudioServicesTestClass::EffectsEvent(TMSEffect* tmseffect,
+void CTmsAudioServicesTestClass::EffectsEvent(const TMSEffect& tmseffect,
         TMSSignalEvent /*event*/)
     {
     TMSEffectType effecttype;
-    tmseffect->GetType(effecttype);
+    const_cast<TMSEffect&>(tmseffect).GetType(effecttype);
     switch (effecttype)
         {
         case TMS_EFFECT_VOLUME:
@@ -166,7 +158,7 @@
 
 // From TMSGlobalRoutingObserver
 void CTmsAudioServicesTestClass::GlobalRoutingEvent(
-        TMSGlobalRouting* /*routing*/, TMSSignalEvent event,
+        const TMSGlobalRouting& /*routing*/, TMSSignalEvent event,
         TMSAudioOutput /*output*/)
     {
     iLog->Log(_L("[tms cb]CTmsAudioServicesTestClass::GlobalRoutingEvent"));
--- a/mmserv/audioeffectsui/equalizer/src/EqualizerPresetsDialog.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/audioeffectsui/equalizer/src/EqualizerPresetsDialog.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -357,6 +357,14 @@
 	   // To prevent two tickmarks from appearing sometimes
 	   iListBox->DrawNow(); 
 	   }
+   else
+       {
+	   #ifdef _DEBUG
+       	RDebug::Print(_L("CEqualizerPresetsDialog::ActivateEqrPresetL err = %d "), err);
+	   #endif
+        // To prevent multiple tickmarks from appearing 
+        iListBox->DrawNow(); 
+       }
    }
 
 // ---------------------------------------------------------------------------
--- a/mmserv/metadatautility/Src/MetaDataParserRA.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/metadatautility/Src/MetaDataParserRA.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -51,6 +51,7 @@
     {
 	if ( ValidateL() )
 		{
+	    iExists = TRUE;
 		iHxMetaDataUtility = CHXMetaDataUtility::NewL();
 		}
 	else
--- a/mmserv/tms/inc/tmsclientserver.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/inc/tmsclientserver.h	Tue Apr 27 17:11:02 2010 +0300
@@ -128,6 +128,7 @@
     gint iStatus;
     gboolean iBool;
     gint iInt;
+    gint iInt2;
     gint64 iInt64;
     guint iUint;
     guint32 iUint32;
--- a/mmserv/tms/inc/tmsproxy.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/inc/tmsproxy.h	Tue Apr 27 17:11:02 2010 +0300
@@ -92,7 +92,7 @@
             gpointer obsrvr);
 
     // From MQueueHandlerObserver
-    virtual void QueueEvent(gint aEventType, gint aError, void* user_data);
+    virtual void QueueEvent(gint aEventType, gint aError, void* event_data);
 
 private:
     void PopulateArrayL(TMSClientServerRequest aRequest,
--- a/mmserv/tms/inc/tmsqueuehandler.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/inc/tmsqueuehandler.h	Tue Apr 27 17:11:02 2010 +0300
@@ -37,7 +37,8 @@
 class MQueueHandlerObserver
     {
 public:
-    virtual void QueueEvent(gint aEventType, gint aError, void* user_data) = 0;
+    virtual void QueueEvent(gint aEventType, gint aError,
+	        void* event_data) = 0;
     };
 
 /**
--- a/mmserv/tms/tmscallserver/src/ipcalldownlinkds.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/ipcalldownlinkds.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -156,7 +156,7 @@
 void TMSIPDownlink::BufferToBeFilled(CMMFBuffer* aBuffer)
     {
     // Store pointer to the received buffer
-    iDevSoundBufPtr = static_cast<CMMFDataBuffer*> (aBuffer);
+    iDevSoundBufPtr = static_cast<CMMFDataBuffer*>(aBuffer);
     iBufLen = iDevSoundBufPtr->RequestSize();
     TRACE_PRN_N1(_L("TMS->DNL->BTBF: LEN[%d]"), iBufLen);
 
--- a/mmserv/tms/tmscallserver/src/ipcalluplinkds.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/ipcalluplinkds.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -158,7 +158,7 @@
 //
 void TMSIPUplink::BufferToBeEmptied(CMMFBuffer* aBuffer)
     {
-    iDevSoundBufPtr = static_cast<CMMFDataBuffer*> (aBuffer);
+    iDevSoundBufPtr = static_cast<CMMFDataBuffer*>(aBuffer);
     TDes8& data = iDevSoundBufPtr->Data();
 
     iBufLen = iDevSoundBufPtr->BufferSize();
--- a/mmserv/tms/tmscallserver/src/tmscallsession.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscallsession.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -1053,7 +1053,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_DOES_NOT_EXIST);
-    TMSAudioOutput outputtype;
+    TMSAudioOutput outputtype(TMS_AUDIO_OUTPUT_NONE);
     if (iCallAdpt)
         {
         status = iCallAdpt->GetOutput(outputtype);
@@ -1073,7 +1073,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_DOES_NOT_EXIST);
-    TMSAudioOutput outputtype;
+    TMSAudioOutput outputtype(TMS_AUDIO_OUTPUT_NONE);
     if (iCallAdpt)
         {
         status = iCallAdpt->GetPreviousOutput(outputtype);
--- a/mmserv/tms/tmsfactory/src/tmsfactoryimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsfactory/src/tmsfactoryimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -65,8 +65,6 @@
         case TMS_CALL_IP:
             flag = ETrue;
             break;
-        case TMS_CALL_ECS: //from TB 10.1
-        case TMS_CALL_RTP: //from TB 10.1
         default:
             flag = EFalse;
             break;
--- a/mmserv/tms/tmsimpl/inc/tmsvolumeeffectbodyimpl.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/inc/tmsvolumeeffectbodyimpl.h	Tue Apr 27 17:11:02 2010 +0300
@@ -46,7 +46,7 @@
     virtual gint GetType(TMSEffectType& effecttype);
 
     // From MQueueHandlerObserver
-    virtual void QueueEvent(TInt aEventType, TInt aError, void* user_data);
+    virtual void QueueEvent(TInt aEventType, TInt aError, void* event_data);
 
     void SetParent(TMSEffect*& parent);
     void SetProxy(TMSCallProxy* aProxy, gpointer queuehandler);
--- a/mmserv/tms/tmsimpl/src/tmsamrbodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsamrbodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -74,7 +74,8 @@
         iProxy = context->CallProxy;
         iStreamType = context->StreamType;
         TMSFormatBodyImpl::SetProxy(iProxy, queuehandler);
-        ((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_FORMAT_AMR);
+        static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
+                TMS_FORMAT_AMR);
         }
     }
 
--- a/mmserv/tms/tmsimpl/src/tmsamrimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsamrimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -43,7 +43,7 @@
     if (ret == TMS_RESULT_SUCCESS)
         {
         this->iBody = bodyimpl;
-        this->iFormatBody = (TMSAMRFormatBodyImpl*) bodyimpl;
+        this->iFormatBody = static_cast<TMSAMRFormatBodyImpl*>(bodyimpl);
         }
     TRACE_PRN_FN_EXT;
     return ret;
@@ -75,7 +75,8 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSAMRFormatBodyImpl*) this->iBody)->SetProxy(context, queuehandler);
+        static_cast<TMSAMRFormatBodyImpl*>(this->iBody)->SetProxy(context,
+                queuehandler);
         }
     else
         {
--- a/mmserv/tms/tmsimpl/src/tmsbufferimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsbufferimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -61,7 +61,7 @@
     switch (buffertype)
         {
         case TMS_BUFFER_MEMORY:
-            delete (TMSMemBuffer*) (tmsbuffer);
+            delete (static_cast<TMSMemBuffer*>(tmsbuffer));
             tmsbuffer = NULL;
             ret = TMS_RESULT_SUCCESS;
             break;
--- a/mmserv/tms/tmsimpl/src/tmscallimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmscallimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -87,9 +87,9 @@
     {
     TRACE_PRN_FN_ENT;
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
-    delete (TMSCallImpl*) (tmscall);
+    delete (static_cast<TMSCallImpl*>(tmscall));
     tmscall = NULL;
-    TRACE_PRN_FN_EXT;    
+    TRACE_PRN_FN_EXT;
     return ret;
     }
 
--- a/mmserv/tms/tmsimpl/src/tmsclientsinkbodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsclientsinkbodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -95,10 +95,9 @@
 
     if (iProxy)
         {
-        ret = iProxy->BufferEmptied(TMS_CALL_IP,
-                                    TMS_STREAM_UPLINK,
-                                    1, //TODO: must use strm_id
-                                    *buffer);
+        //TODO: must use strm_id instead of 1
+        ret = iProxy->BufferEmptied(TMS_CALL_IP, TMS_STREAM_UPLINK, 1,
+		        *buffer);
         }
     else
         {
@@ -120,7 +119,8 @@
     iProxy = aProxy;
     if (queuehandler)
         {
-        ((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_SINK_CLIENT);
+        static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
+                TMS_SINK_CLIENT);
         }
     }
 
@@ -132,7 +132,7 @@
         switch (aEventType)
             {
             case TMS_EVENT_SINK_PROCESS_BUFFER:
-                iObserver->ProcessBuffer(((TMSBuffer*) user_data));
+                iObserver->ProcessBuffer(static_cast<TMSBuffer*>(user_data));
                 break;
             default:
                 break;
--- a/mmserv/tms/tmsimpl/src/tmsclientsinkimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsclientsinkimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -73,7 +73,8 @@
     gint ret = TMS_RESULT_SUCCESS;
     if (this->iBody)
         {
-        ((TMSClientSinkBodyImpl*) this->iBody)->SetProxy(aProxy, queuehandler);
+        static_cast<TMSClientSinkBodyImpl*>(this->iBody)->SetProxy(aProxy,
+                queuehandler);
         }
     else
         {
--- a/mmserv/tms/tmsimpl/src/tmsclientsourcebodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsclientsourcebodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -111,10 +111,8 @@
     {
     // TODO send stream attributes here
     gint ret(TMS_RESULT_SUCCESS);
-    ret = iProxy->BufferFilled(TMS_CALL_IP,
-                               TMS_STREAM_DOWNLINK,
-                               iStreamId,
-                               buffer);
+    ret = iProxy->BufferFilled(TMS_CALL_IP, TMS_STREAM_DOWNLINK, iStreamId,
+            buffer);
     return ret;
     }
 
@@ -161,7 +159,8 @@
     {
     iProxy = aProxy;
     iStreamId = strmid;
-    ((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_SOURCE_CLIENT);
+    static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
+            TMS_SOURCE_CLIENT);
     }
 
 void TMSClientSourceBodyImpl::QueueEvent(TInt aEventType, TInt aError,
@@ -172,10 +171,11 @@
         switch (aEventType)
             {
             case TMS_EVENT_SOURCE_FILL_BUFFER:
-                iObserver->FillBuffer(*((TMSBuffer*) user_data));
+                iObserver->FillBuffer(*(static_cast<TMSBuffer*>(user_data)));
                 break;
             case TMS_EVENT_SOURCE_PROCESSED_BUFFER:
-                iObserver->BufferProcessed((TMSBuffer*) user_data, aError);
+                iObserver->BufferProcessed(static_cast<TMSBuffer*>(user_data),
+                        aError);
                 break;
             default:
                 break;
--- a/mmserv/tms/tmsimpl/src/tmsclientsourceimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsclientsourceimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -72,8 +72,8 @@
         gpointer queuehandler)
     {
     gint ret = TMS_RESULT_SUCCESS;
-    ((TMSClientSourceBodyImpl*) this->iBody)->SetProxy(aProxy, strmid,
-            queuehandler);
+    static_cast<TMSClientSourceBodyImpl*>(this->iBody)->SetProxy(aProxy,
+            strmid, queuehandler);
     return ret;
     }
 
--- a/mmserv/tms/tmsimpl/src/tmseffectimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmseffectimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -73,19 +73,19 @@
     switch (effecttype)
         {
         case TMS_EFFECT_VOLUME:
-            delete (TMSVolumeEffectImpl*) (tmseffect);
+            delete (static_cast<TMSVolumeEffectImpl*>(tmseffect));
             tmseffect = NULL;
             break;
         case TMS_EFFECT_GAIN:
-            delete (TMSGainEffectImpl*) (tmseffect);
+            delete (static_cast<TMSGainEffectImpl*>(tmseffect));
             tmseffect = NULL;
             break;
         case TMS_EFFECT_GLOBAL_VOL:
-            delete (TMSGlobalVolEffectImpl*) (tmseffect);
+            delete (static_cast<TMSGlobalVolEffectImpl*>(tmseffect));
             tmseffect = NULL;
             break;
         case TMS_EFFECT_GLOBAL_GAIN:
-            delete (TMSGlobalGainEffectImpl*) (tmseffect);
+            delete (static_cast<TMSGlobalGainEffectImpl*>(tmseffect));
             tmseffect = NULL;
             break;
         default:
--- a/mmserv/tms/tmsimpl/src/tmsformatbodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsformatbodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -77,7 +77,7 @@
 void TMSFormatBodyImpl::SetProxy(TMSCallProxy* aProxy, gpointer /*queuehandler*/)
     {
     iProxy = aProxy;
-    //  ((TMSQueueHandler*)queuehandler)->AddObserver(*this,TMS_FORMAT_TYPE);
+    //static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this, TMS_FORMAT_TYPE);
     }
 
 // End of file
--- a/mmserv/tms/tmsimpl/src/tmsformatimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsformatimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -78,23 +78,23 @@
     switch (fmttype)
         {
         case TMS_FORMAT_PCM:
-            delete (TMSPCMFormatImpl*) (tmsfmt);
+            delete (static_cast<TMSPCMFormatImpl*>(tmsfmt));
             tmsfmt = NULL;
             break;
         case TMS_FORMAT_AMR:
-            delete (TMSAMRFormatImpl*) (tmsfmt);
+            delete (static_cast<TMSAMRFormatImpl*>(tmsfmt));
             tmsfmt = NULL;
             break;
         case TMS_FORMAT_G711:
-            delete (TMSG711FormatImpl*) (tmsfmt);
+            delete (static_cast<TMSG711FormatImpl*>(tmsfmt));
             tmsfmt = NULL;
             break;
         case TMS_FORMAT_G729:
-            delete (TMSG729FormatImpl*) (tmsfmt);
+            delete (static_cast<TMSG729FormatImpl*>(tmsfmt));
             tmsfmt = NULL;
             break;
         case TMS_FORMAT_ILBC:
-            delete (TMSILBCFormatImpl*) (tmsfmt);
+            delete (static_cast<TMSILBCFormatImpl*>(tmsfmt));
             tmsfmt = NULL;
             break;
         default:
--- a/mmserv/tms/tmsimpl/src/tmsg711bodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsg711bodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -154,7 +154,8 @@
         iProxy = context->CallProxy;
         iStreamType = context->StreamType;
         TMSFormatBodyImpl::SetProxy(iProxy, queuehandler);
-        ((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_FORMAT_G711);
+        static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
+                TMS_FORMAT_G711);
         }
     }
 
--- a/mmserv/tms/tmsimpl/src/tmsg711impl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsg711impl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -43,7 +43,7 @@
     if (ret == TMS_RESULT_SUCCESS)
         {
         this->iBody = bodyimpl;
-        this->iFormatBody = (TMSG711FormatBodyImpl*) bodyimpl;
+        this->iFormatBody = static_cast<TMSG711FormatBodyImpl*>(bodyimpl);
         }
     TRACE_PRN_FN_EXT;
     return ret;
@@ -75,7 +75,8 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSG711FormatBodyImpl*) this->iBody)->SetProxy(context, queuehandler);
+        static_cast<TMSG711FormatBodyImpl*>(this->iBody)->SetProxy(context,
+                queuehandler);
         }
     else
         {
--- a/mmserv/tms/tmsimpl/src/tmsg729bodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsg729bodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -94,7 +94,8 @@
         iProxy = context->CallProxy;
         iStreamType = context->StreamType;
         TMSFormatBodyImpl::SetProxy(iProxy, queuehandler);
-        ((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_FORMAT_G729);
+        static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
+                TMS_FORMAT_G729);
         }
     }
 
--- a/mmserv/tms/tmsimpl/src/tmsg729impl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsg729impl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -43,7 +43,7 @@
     if (ret == TMS_RESULT_SUCCESS)
         {
         this->iBody = bodyimpl;
-        this->iFormatBody = (TMSG729FormatBodyImpl*) bodyimpl;
+        this->iFormatBody = static_cast<TMSG729FormatBodyImpl*>(bodyimpl);
         }
     TRACE_PRN_FN_EXT;
     return ret;
@@ -75,7 +75,8 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSG729FormatBodyImpl*) this->iBody)->SetProxy(context, queuehandler);
+        static_cast<TMSG729FormatBodyImpl*>(this->iBody)->SetProxy(context,
+                queuehandler);
         }
     else
         {
--- a/mmserv/tms/tmsimpl/src/tmsgaineffectbodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsgaineffectbodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -150,29 +150,21 @@
     iProxy = aProxy;
     if (queuehandler)
         {
-        ((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_EFFECT_GAIN);
+        static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
+                TMS_EFFECT_GAIN);
         }
     }
 
 void TMSGainEffectBodyImpl::QueueEvent(TInt aEventType, TInt aError,
         void* /*user_data*/)
     {
-    TMSSignalEvent event;
+    TMSSignalEvent event = {}; //all elements initialized to zeros
     event.type = TMS_EVENT_EFFECT_GAIN_CHANGED;
     event.reason = aError;
 
-    switch (aEventType)
+    if (iObserver && iParent && aEventType == TMS_EVENT_EFFECT_GAIN_CHANGED)
         {
-        case TMS_EVENT_EFFECT_GAIN_CHANGED:
-            {
-            if (iObserver && iParent)
-                {
-                iObserver->EffectsEvent(iParent, event);
-                }
-            }
-            break;
-        default:
-            break;
+        iObserver->EffectsEvent(*iParent, event);
         }
     }
 
--- a/mmserv/tms/tmsimpl/src/tmsgaineffectimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsgaineffectimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -77,7 +77,8 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSGainEffectBodyImpl*) this->iBody)->SetProxy(aProxy, queuehandler);
+        static_cast<TMSGainEffectBodyImpl*>(this->iBody)->SetProxy(aProxy,
+                queuehandler);
         }
     else
         {
@@ -91,7 +92,7 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSGainEffectBodyImpl*) this->iBody)->SetParent(parent);
+        static_cast<TMSGainEffectBodyImpl*>(this->iBody)->SetParent(parent);
         }
     else
         {
--- a/mmserv/tms/tmsimpl/src/tmsglobalgaineffectimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsglobalgaineffectimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -77,7 +77,8 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSGlobalGainEffectBodyImpl*) this->iBody)->SetParent(parent);
+        static_cast<TMSGlobalGainEffectBodyImpl*>(this->iBody)->SetParent(
+                parent);
         }
     else
         {
--- a/mmserv/tms/tmsimpl/src/tmsglobalroutingimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsglobalroutingimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -76,7 +76,7 @@
     {
     gint ret(TMS_RESULT_SUCCESS);
     TRACE_PRN_FN_ENT;
-    delete (TMSGlobalRoutingImpl*) globrouting;
+    delete (static_cast<TMSGlobalRoutingImpl*>(globrouting));
     globrouting = NULL;
     TRACE_PRN_FN_EXT;
     return ret;
@@ -87,7 +87,7 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSGlobalRoutingBodyImpl*) this->iBody)->SetParent(parent);
+        static_cast<TMSGlobalRoutingBodyImpl*>(this->iBody)->SetParent(parent);
         }
     else
         {
--- a/mmserv/tms/tmsimpl/src/tmsglobalvoleffectimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsglobalvoleffectimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -77,7 +77,8 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSGlobalVolEffectBodyImpl*) this->iBody)->SetParent(parent);
+        static_cast<TMSGlobalVolEffectBodyImpl*>(this->iBody)->SetParent(
+                parent);
         }
     else
         {
--- a/mmserv/tms/tmsimpl/src/tmsilbcbodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsilbcbodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -134,7 +134,8 @@
         iProxy = context->CallProxy;
         iStreamType = context->StreamType;
         TMSFormatBodyImpl::SetProxy(iProxy, queuehandler);
-        ((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_FORMAT_ILBC);
+        static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
+                TMS_FORMAT_ILBC);
         }
     }
 
--- a/mmserv/tms/tmsimpl/src/tmsilbcimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsilbcimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -43,7 +43,7 @@
     if (ret == TMS_RESULT_SUCCESS)
         {
         this->iBody = bodyimpl;
-        this->iFormatBody = (TMSILBCFormatBodyImpl*) bodyimpl;
+        this->iFormatBody = static_cast<TMSILBCFormatBodyImpl*>(bodyimpl);
         }
     TRACE_PRN_FN_EXT;
     return ret;
@@ -75,7 +75,8 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSILBCFormatBodyImpl*) this->iBody)->SetProxy(context, queuehandler);
+        static_cast<TMSILBCFormatBodyImpl*>(this->iBody)->SetProxy(context,
+                queuehandler);
         }
     else
         {
--- a/mmserv/tms/tmsimpl/src/tmsmembuffer.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsmembuffer.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -74,7 +74,7 @@
     {
     gint ret(TMS_RESULT_SUCCESS);
     TRACE_PRN_FN_ENT;
-    iDataPtr = (guint8*) malloc(size);
+    iDataPtr = static_cast<guint8*>(malloc(size));
     if (!iDataPtr)
         {
         ret = TMS_RESULT_INSUFFICIENT_MEMORY;
--- a/mmserv/tms/tmsimpl/src/tmsmicsourcebodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsmicsourcebodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -64,7 +64,7 @@
         gpointer /*queuehandler*/)
     {
     iProxy = aProxy;
-    //((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_SOURCE_MIC);
+    //static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this, TMS_SOURCE_MIC);
     }
 
 // End of file
--- a/mmserv/tms/tmsimpl/src/tmsmicsourceimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsmicsourceimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -72,7 +72,7 @@
         gpointer /*queuehandler*/)
     {
     gint ret = TMS_RESULT_SUCCESS;
-//   ((TMSMicSourceBodyImpl*) this->iBody)->SetProxy(aProxy, queuehandler);
+    //static_cast<TMSMicSourceBodyImpl*>(this->iBody)->SetProxy(aProxy, queuehandler);
     return ret;
     }
 
--- a/mmserv/tms/tmsimpl/src/tmsmodemsinkbodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsmodemsinkbodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -64,7 +64,7 @@
         gpointer /*queuehandler*/)
     {
     iProxy = aProxy;
-    //((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_SINK_MODEM);
+    //static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this, TMS_SINK_MODEM);
     }
 
 // End of file
--- a/mmserv/tms/tmsimpl/src/tmsmodemsinkimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsmodemsinkimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -71,7 +71,7 @@
         gpointer /*queuehandler*/)
     {
     gint ret = TMS_RESULT_SUCCESS;
-//   ((TMSModemSinkBodyImpl*) this->iBody)->SetProxy(aProxy, queuehandler);
+    //static_cast<TMSModemSinkBodyImpl*>(this->iBody)->SetProxy(aProxy, queuehandler);
     return ret;
     }
 
--- a/mmserv/tms/tmsimpl/src/tmsmodemsourcebodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsmodemsourcebodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -64,7 +64,7 @@
         gpointer /*queuehandler*/)
     {
     iProxy = aProxy;
-    //((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_SOURCE_MODEM);
+    //static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this, TMS_SOURCE_MODEM);
     }
 
 // End of file
--- a/mmserv/tms/tmsimpl/src/tmsmodemsourceimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsmodemsourceimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -71,7 +71,7 @@
         gpointer /*queuehandler*/)
     {
     gint ret = TMS_RESULT_SUCCESS;
-//   ((TMSModemSourceBodyImpl*) this->iBody)->SetProxy(aProxy, queuehandler);
+    //static_cast<TMSModemSourceBodyImpl*>(this->iBody)->SetProxy(aProxy, queuehandler);
     return ret;
     }
 
--- a/mmserv/tms/tmsimpl/src/tmspcmbodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmspcmbodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -74,7 +74,8 @@
         iProxy = context->CallProxy;
         iStreamType = context->StreamType;
         TMSFormatBodyImpl::SetProxy(iProxy, queuehandler);
-        ((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_FORMAT_PCM);
+        static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
+                TMS_FORMAT_PCM);
         }
     }
 
--- a/mmserv/tms/tmsimpl/src/tmspcmimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmspcmimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -44,7 +44,7 @@
     if (ret == TMS_RESULT_SUCCESS)
         {
         this->iBody = bodyimpl;
-        this->iFormatBody = (TMSPCMFormatBodyImpl*) bodyimpl;
+        this->iFormatBody = static_cast<TMSPCMFormatBodyImpl*>(bodyimpl);
         }
     TRACE_PRN_FN_EXT;
     return ret;
@@ -76,7 +76,8 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSPCMFormatBodyImpl*) this->iBody)->SetProxy(context, queuehandler);
+        static_cast<TMSPCMFormatBodyImpl*>(this->iBody)->SetProxy(context,
+                queuehandler);
         }
     else
         {
--- a/mmserv/tms/tmsimpl/src/tmsqueuehandler.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsqueuehandler.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -301,7 +301,7 @@
         if (!iBuffer)
             {
             TMSMemBuffer::Create((guint) aBufLen,
-                    const_cast<guint8*> (iChunkDataPtr.Ptr()), iBuffer);
+                    const_cast<guint8*>(iChunkDataPtr.Ptr()), iBuffer);
             }
         iBuffer->SetDataSize(aBufLen);
 
@@ -362,7 +362,7 @@
         if (!iBuffer)
             {
             TMSMemBuffer::Create((guint) aBufLen,
-                    const_cast<guint8*> (iChunkDataPtr.Ptr()), iBuffer);
+                    const_cast<guint8*>(iChunkDataPtr.Ptr()), iBuffer);
             }
         iBuffer->SetDataSize(aBufLen);
         gint index = iClientList.Find(TMS_SINK_CLIENT);
--- a/mmserv/tms/tmsimpl/src/tmssinkimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmssinkimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -69,21 +69,21 @@
         {
         case TMS_SINK_CLIENT:
             {
-            delete (TMSClientSinkImpl*) (tmssink);
+            delete (static_cast<TMSClientSinkImpl*>(tmssink));
             tmssink = NULL;
             ret = TMS_RESULT_SUCCESS;
             }
             break;
         case TMS_SINK_MODEM:
             {
-            delete (TMSModemSinkImpl*) (tmssink);
+            delete (static_cast<TMSModemSinkImpl*>(tmssink));
             tmssink = NULL;
             ret = TMS_RESULT_SUCCESS;
             }
             break;
         case TMS_SINK_SPEAKER:
             {
-            delete (TMSSpeakerSinkImpl*) (tmssink);
+            delete (static_cast<TMSSpeakerSinkImpl*>(tmssink));
             tmssink = NULL;
             ret = TMS_RESULT_SUCCESS;
             }
--- a/mmserv/tms/tmsimpl/src/tmssourceimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmssourceimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -69,20 +69,20 @@
     switch (sourcetype)
         {
         case TMS_SOURCE_CLIENT:
-            delete (TMSClientSourceImpl*) (tmssource);
+            delete (static_cast<TMSClientSourceImpl*>(tmssource));
             tmssource = NULL;
             ret = TMS_RESULT_SUCCESS;
             break;
         case TMS_SOURCE_MODEM:
             {
-            delete (TMSModemSourceImpl*) (tmssource);
+            delete (static_cast<TMSModemSourceImpl*>(tmssource));
             tmssource = NULL;
             ret = TMS_RESULT_SUCCESS;
             }
             break;
         case TMS_SOURCE_MIC:
             {
-            delete (TMSMicSourceImpl*) (tmssource);
+            delete (static_cast<TMSMicSourceImpl*>(tmssource));
             tmssource = NULL;
             ret = TMS_RESULT_SUCCESS;
             }
--- a/mmserv/tms/tmsimpl/src/tmsspeakersinkbodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsspeakersinkbodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -64,7 +64,7 @@
         gpointer /*queuehandler*/)
     {
     iProxy = aProxy;
-    //((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_SINK_SPEAKER);
+    //static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this, TMS_SINK_SPEAKER);
     }
 
 // End of file
--- a/mmserv/tms/tmsimpl/src/tmsspeakersinkimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsspeakersinkimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -68,7 +68,7 @@
         gpointer /*queuehandler*/)
     {
     gint ret = TMS_RESULT_SUCCESS;
-    //((TMSSpeakerSinkBodyImpl*) this->iBody)->SetProxy(aProxy, queuehandler);
+    //static_cast<TMSSpeakerSinkBodyImpl*>(this->iBody)->SetProxy(aProxy, queuehandler);
     return ret;
     }
 
--- a/mmserv/tms/tmsimpl/src/tmsstreambodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsstreambodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -342,7 +342,7 @@
 
     RET_REASON_IF_ERR(ret);
 
-    TMSFormatType fmttype;
+    TMSFormatType fmttype(TMS_FORMAT_PCM);
     if (!iFormat && iContext.CallType == TMS_CALL_IP)
         {
         return TMS_RESULT_FORMAT_TYPE_UNSPECIFIED;
@@ -373,12 +373,13 @@
             switch (effecttype)
                 {
                 case TMS_EFFECT_GAIN:
-                    ((TMSGainEffectImpl*) iEffectsList[i])->SetProxy(
+                    static_cast<TMSGainEffectImpl*>(iEffectsList[i])->SetProxy(
                             iContext.CallProxy, iMsgQHandler);
                     break;
                 case TMS_EFFECT_VOLUME:
-                    ((TMSVolumeEffectImpl*) iEffectsList[i])->SetProxy(
-                            iContext.CallProxy, iMsgQHandler);
+                    static_cast<TMSVolumeEffectImpl*>
+                        (iEffectsList[i])->SetProxy(iContext.CallProxy,
+                        iMsgQHandler);
                     break;
                 default:
                     ret = TMS_RESULT_INVALID_ARGUMENT;
@@ -394,23 +395,23 @@
         switch (fmttype)
             {
             case TMS_FORMAT_PCM:
-                ((TMSPCMFormatImpl*) iFormat)->SetProxy(&iContext,
+                static_cast<TMSPCMFormatImpl*>(iFormat)->SetProxy(&iContext,
                         iMsgQHandler);
                 break;
             case TMS_FORMAT_AMR:
-                ((TMSAMRFormatImpl*) iFormat)->SetProxy(&iContext,
+                static_cast<TMSAMRFormatImpl*>(iFormat)->SetProxy(&iContext,
                         iMsgQHandler);
                 break;
             case TMS_FORMAT_G711:
-                ((TMSG711FormatImpl*) iFormat)->SetProxy(&iContext,
+                static_cast<TMSG711FormatImpl*>(iFormat)->SetProxy(&iContext,
                         iMsgQHandler);
                 break;
             case TMS_FORMAT_G729:
-                ((TMSG729FormatImpl*) iFormat)->SetProxy(&iContext,
+                static_cast<TMSG729FormatImpl*>(iFormat)->SetProxy(&iContext,
                         iMsgQHandler);
                 break;
             case TMS_FORMAT_ILBC:
-                ((TMSILBCFormatImpl*) iFormat)->SetProxy(&iContext,
+                static_cast<TMSILBCFormatImpl*>(iFormat)->SetProxy(&iContext,
                         iMsgQHandler);
                 break;
             default:
@@ -428,7 +429,7 @@
             switch (sinkType)
                 {
                 case TMS_SINK_CLIENT:
-                    ((TMSClientSinkImpl*) iSink)->SetProxy(
+                    static_cast<TMSClientSinkImpl*>(iSink)->SetProxy(
                             iContext.CallProxy, iMsgQHandler);
                     break;
                 case TMS_SINK_MODEM:
@@ -453,7 +454,7 @@
             switch (sourceType)
                 {
                 case TMS_SOURCE_CLIENT:
-                    ((TMSClientSourceImpl*) iSource)->SetProxy(
+                    static_cast<TMSClientSourceImpl*>(iSource)->SetProxy(
                             iContext.CallProxy, iContext.StreamId,
                             iMsgQHandler);
                     break;
@@ -717,7 +718,7 @@
 void TMSStreamBodyImpl::QueueEvent(TInt aEventType, TInt aError,
         void* user_data)
     {
-    TMSSignalEvent event;
+    TMSSignalEvent event = {}; //all elements initialized to zeros
     event.reason = aError;
     event.user_data = user_data;
     iStreamState = aEventType;
@@ -734,7 +735,7 @@
             if (iObserver)
                 {
                 event.type = TMS_EVENT_STREAM_STATE_CHANGED;
-                iObserver->TMSStreamEvent(iParent, event);
+                iObserver->TMSStreamEvent(*iParent, event);
                 }
             break;
             }
--- a/mmserv/tms/tmsimpl/src/tmsstreamimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsstreamimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -71,7 +71,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint ret(TMS_RESULT_SUCCESS);
-    delete (TMSStreamImpl*) (strm);
+    delete (static_cast<TMSStreamImpl*>(strm));
     strm = NULL;
     TRACE_PRN_FN_EXT;
     return ret;
--- a/mmserv/tms/tmsimpl/src/tmsvolumeeffectbodyimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsvolumeeffectbodyimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -150,30 +150,27 @@
     iProxy = aProxy;
     if (queuehandler)
         {
-        ((TMSQueueHandler*) queuehandler)->AddObserver(*this,
+        static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
                 TMS_EFFECT_VOLUME);
         }
     }
 
 void TMSVolumeEffectBodyImpl::QueueEvent(TInt aEventType, TInt aError,
-        void* /*user_data*/)
+        void* event_data)
     {
-    TMSSignalEvent event;
+    TMSSignalEvent event = {}; //all elements initialized to zeros
+    event.user_data = NULL; //use only to return data passed in by the user
     event.type = TMS_EVENT_EFFECT_VOL_CHANGED;
     event.reason = aError;
 
-    switch (aEventType)
+    if (event_data)
         {
-        case TMS_EVENT_EFFECT_VOL_CHANGED:
-            {
-            if (iObserver && iParent)
-                {
-                iObserver->EffectsEvent(iParent, event);
-                }
-            }
-            break;
-        default:
-            break;
+        event.event_data = static_cast<gpointer>(event_data);
+        }
+
+    if (iObserver && iParent && aEventType == TMS_EVENT_EFFECT_VOL_CHANGED)
+        {
+        iObserver->EffectsEvent(*iParent, event);
         }
     }
 
--- a/mmserv/tms/tmsimpl/src/tmsvolumeeffectimpl.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsvolumeeffectimpl.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -77,7 +77,7 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSVolumeEffectBodyImpl*) this->iBody)->SetProxy(aProxy,
+        static_cast<TMSVolumeEffectBodyImpl*>(this->iBody)->SetProxy(aProxy,
                 queuehandler);
         }
     else
@@ -92,7 +92,7 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        ((TMSVolumeEffectBodyImpl*) this->iBody)->SetParent(parent);
+        static_cast<TMSVolumeEffectBodyImpl*>(this->iBody)->SetParent(parent);
         }
     else
         {
--- a/mmserv/tms/tmsproxy/src/tmsproxy.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsproxy/src/tmsproxy.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -435,12 +435,14 @@
         {
         case EMsgQueueGlobalVolumeType:
         case EMsgQueueGlobalGainType:
-            status = AddGlobalEffectObserver((*(TMSEffectObserver*) obsrv),
-                    (*(TMSEffect*) parent), clientid);
-            break;
+            status = AddGlobalEffectObserver(
+                    *(static_cast<TMSEffectObserver*>(obsrv)),
+                    *(static_cast<TMSEffect*>(parent)), clientid);
+			break;
         case EMsgQueueGlobalRoutingType:
-            status = AddRoutingObserver((*(TMSGlobalRoutingObserver*) obsrv),
-                    (*(TMSGlobalRouting*) parent), clientid);
+            status = AddRoutingObserver(
+                    *(static_cast<TMSGlobalRoutingObserver*>(obsrv)),
+                    *(static_cast<TMSGlobalRouting*>(parent)), clientid);
             break;
         default:
             status = TMS_RESULT_INVALID_ARGUMENT;
@@ -462,11 +464,12 @@
         {
         case EMsgQueueGlobalVolumeType:
         case EMsgQueueGlobalGainType:
-            status = RemoveGlobalEffectObserver((*(TMSEffectObserver*) obsrv));
+            status = RemoveGlobalEffectObserver(
+                    *(static_cast<TMSEffectObserver*>(obsrv)));
             break;
         case EMsgQueueGlobalRoutingType:
-            status = RemoveRoutingObserver((*(TMSGlobalRoutingObserver*)
-                    obsrv));
+            status = RemoveRoutingObserver(
+                    *(static_cast<TMSGlobalRoutingObserver*>(obsrv)));
             break;
         default:
             status = TMS_RESULT_INVALID_ARGUMENT;
@@ -614,21 +617,33 @@
 // Call from QueueHandler as a result of TMS Server callback.
 // ---------------------------------------------------------------------------
 //
-void TMSProxy::QueueEvent(gint aEventType, gint aError, void* user_data)
+void TMSProxy::QueueEvent(gint aEventType, gint aError, void* event_data)
     {
-    TMSSignalEvent event;
+    TMSSignalEvent event = {}; //all elements initialized to zeros
     event.type = aEventType;
     event.reason = aError;
-    event.user_data = user_data;
+    event.user_data = NULL; //use only to return data passed in by the user
 
     switch (aEventType)
         {
         case TMS_EVENT_EFFECT_VOL_CHANGED:
+            {
+            if (event_data)
+                {
+                event.event_data = static_cast<gpointer>(event_data);
+                }
+            for (gint i = 0; i < iEffectsObsrvrList.Count(); i++)
+                {
+                iEffectsObsrvrList[i]->EffectsEvent(*iEffectsParentList[i],
+                        event);
+                }
+            break;
+            }
         case TMS_EVENT_EFFECT_GAIN_CHANGED:
             {
             for (gint i = 0; i < iEffectsObsrvrList.Count(); i++)
                 {
-                iEffectsObsrvrList[i]->EffectsEvent(iEffectsParentList[i],
+                iEffectsObsrvrList[i]->EffectsEvent(*iEffectsParentList[i],
                         event);
                 }
             break;
@@ -638,14 +653,14 @@
         case TMS_EVENT_ROUTING_SET_OUTPUT_COMPLETE:
             {
             guint output(0);
-            if (user_data != NULL)
+            if (event_data != NULL)
                 {
-                output = *((guint*) user_data);
+                output = *(static_cast<guint*>(event_data));
                 }
             for (gint i = 0; i < iRoutingObsrvrList.Count(); i++)
                 {
                 iRoutingObsrvrList[i]->GlobalRoutingEvent(
-                        iRoutingParentList[i], event, output);
+                        *iRoutingParentList[i], event, output);
                 }
             break;
             }
--- a/mmserv/tms/tmsproxy/src/tmsqueuehandler.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsproxy/src/tmsqueuehandler.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -178,7 +178,11 @@
         switch (msgBuf.iRequest)
             {
             case ECmdGlobalEffectChange:
-                iObserver->QueueEvent(msgBuf.iInt, msgBuf.iStatus, NULL);
+                TMSVolumeEventChangeData event;
+                event.level = msgBuf.iUint;
+                event.output = static_cast<TMSAudioOutput>(msgBuf.iInt2);
+                event.output_changed = msgBuf.iBool;
+                iObserver->QueueEvent(msgBuf.iInt, msgBuf.iStatus, &event);
                 break;
             case ECmdGlobalRoutingChange:
                 iObserver->QueueEvent(msgBuf.iInt, msgBuf.iStatus,
--- a/mmserv/tms/tmsserver/inc/tmsserversession.h	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsserver/inc/tmsserversession.h	Tue Apr 27 17:11:02 2010 +0300
@@ -43,7 +43,9 @@
     // Destructor
     ~TMSServerSession();
 
-    void HandleGlobalEffectChange(TInt globalevent);
+    void HandleGlobalEffectChange(TInt globalevent, TInt level,
+            TBool output_change = EFalse,
+            TMSAudioOutput output = TMS_AUDIO_OUTPUT_PRIVATE);
     void HandleRoutingChange(TRoutingMsgBufPckg routinginfo);
 
     // Send notifications to clients
--- a/mmserv/tms/tmsserver/src/tmscenrepaudiohandler.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmscenrepaudiohandler.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -75,17 +75,23 @@
         {
         err = iMuteListener->Get(muteVal);
         }
-    if (iTMSSer && err == KErrNone && muteVal == EPSTelMicMuteOn)
+    if (err == KErrNone && muteVal == EPSTelMicMuteOn)
         {
 #if !defined(__WINSCW__)
-        iTMSSer->SetGain(NULL, 0);
+        if (iTMSSer)
+            {
+            iTMSSer->SetGain(NULL, 0);
+            }
 #endif //__WINSCW__
         }
     else if (err == KErrNone)
         {
 #if !defined(__WINSCW__)
         // Change when gain is really changed
-        iTMSSer->SetGain(NULL, KDefaultMaxGain);
+        if (iTMSSer)
+            {
+            iTMSSer->SetGain(NULL, KDefaultMaxGain);
+            }
 #endif //__WINSCW__
         }
     }
--- a/mmserv/tms/tmsserver/src/tmsserver.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsserver.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -79,7 +79,7 @@
     iUplCodecs.Reset();
     iUplCodecs.Close();
     delete iEffectSettings;
-    CancelRoutingNotifier();
+    delete iTarHandler;
     CancelCenRepHandler();
 
     TRACE_PRN_FN_EXT;
@@ -129,7 +129,10 @@
     iEffectSettings = TMSGlobalEffectsSettings::NewL();
     iTarHandler = NULL;
     iAudioCenRepHandler = NULL;
-    iCurrentRouting = TMS_AUDIO_OUTPUT_NONE;
+    iCurrentRouting = TMS_AUDIO_OUTPUT_PRIVATE;
+
+    // We need it running for global volume change updates
+    StartRoutingNotifierL();
 
     TRACE_PRN_FN_EXT;
     }
@@ -333,7 +336,7 @@
 //
 void TMSServer::CancelRoutingNotifier()
     {
-    if (--iTarHandlerCount <= 0)
+    if (--iTarHandlerCount < 1)
         {
         delete iTarHandler;
         iTarHandler = NULL;
@@ -628,7 +631,8 @@
         while (serverSession != NULL)
             {
             serverSession->HandleGlobalEffectChange(
-                    TMS_EVENT_EFFECT_VOL_CHANGED);
+                    TMS_EVENT_EFFECT_VOL_CHANGED, level, EFalse,
+                    iCurrentRouting);
 
             serverSession = static_cast<TMSServerSession*> (iSessionIter++);
             }
@@ -703,7 +707,7 @@
         while (serverSession != NULL)
             {
             serverSession->HandleGlobalEffectChange(
-                    TMS_EVENT_EFFECT_GAIN_CHANGED);
+                    TMS_EVENT_EFFECT_GAIN_CHANGED, level);
             serverSession = static_cast<TMSServerSession*> (iSessionIter++);
             }
         }
@@ -822,19 +826,37 @@
     {
     TRACE_PRN_FN_ENT;
 
+    TInt vol;
     iCurrentRouting = routingpckg().iOutput;
+    if (iCurrentRouting == TMS_AUDIO_OUTPUT_PUBLIC ||
+            iCurrentRouting == TMS_AUDIO_OUTPUT_LOUDSPEAKER)
+        {
+        iEffectSettings->GetLoudSpkrVolume(vol);
+        }
+    else
+        {
+        iEffectSettings->GetEarPieceVolume(vol);
+        }
+
+    TInt status = SendMessageToCallServ(TMS_EFFECT_GLOBAL_VOL_SET, vol);
+
     iSessionIter.SetToFirst();
     TMSServerSession* serverSession =
             static_cast<TMSServerSession*> (iSessionIter++);
-
     while (serverSession != NULL)
         {
-        serverSession->HandleRoutingChange(routingpckg);
+        // Send only if there is a subscriber to TMS routing notifications.
+        if (iTarHandlerCount > 1)
+            {
+            serverSession->HandleRoutingChange(routingpckg);
+            }
+        serverSession->HandleGlobalEffectChange(TMS_EVENT_EFFECT_VOL_CHANGED,
+                vol, ETrue, iCurrentRouting);
         serverSession = static_cast<TMSServerSession*> (iSessionIter++);
         }
 
     TRACE_PRN_FN_EXT;
-    return TMS_RESULT_SUCCESS;
+    return status;
     }
 
 // -----------------------------------------------------------------------------
--- a/mmserv/tms/tmsserver/src/tmsserversession.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsserversession.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -230,10 +230,14 @@
 // TMSServerSession::HandleGlobalEffectChange
 // -----------------------------------------------------------------------------
 //
-void TMSServerSession::HandleGlobalEffectChange(TInt globalevent)
+void TMSServerSession::HandleGlobalEffectChange(TInt globalevent, TInt level,
+        TBool output_change, TMSAudioOutput output)
     {
     TRACE_PRN_FN_ENT;
     iMsgBuffer.iInt = globalevent;
+    iMsgBuffer.iUint = (guint)level;
+    iMsgBuffer.iInt2 = (gint)output;
+    iMsgBuffer.iBool = output_change;
     NotifyClient(ECmdGlobalEffectChange);
     TRACE_PRN_FN_EXT;
     }
@@ -287,7 +291,7 @@
         codecsCount = codecs->Count();
         }
 
-    if (codecsCount <= 0)
+    if (codecs && codecsCount <= 0)
         {
         delete iDevSound;
         iDevSound = NULL;
--- a/mmserv/tms/tmsutility/src/tmsutility.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/tms/tmsutility/src/tmsutility.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -141,7 +141,6 @@
         case KErrEtelCallNotActive: //-2007
             result = TMS_REASON_CALL_NOT_ACTIVE;//add TMS_RESULT_CALL_NOT_ACTIVE
             break;
-        /**********************************/
         //case KErrEtelCoreBase: //-2000
         case KErrEtelNotCallOwner: //-2000
         case KErrEtelDuplicatePhoneName: //-2001
--- a/mmserv/voipaudioservices/VoIPServer/src/VoIPDownlinkThread.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/voipaudioservices/VoIPServer/src/VoIPDownlinkThread.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -123,6 +123,7 @@
 
     if (!cleanupStack)
         {
+        shared.iMutex.Signal();
         return KErrNoMemory;
         }
 
@@ -130,6 +131,7 @@
     TRAPD(err, thread = CVoIPDownlinkThread::NewL(shared));
     if (err != KErrNone)
         {
+        shared.iMutex.Signal();
         return err;
         }
 
--- a/mmserv/voipaudioservices/VoIPServer/src/VoIPServerSession.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/voipaudioservices/VoIPServer/src/VoIPServerSession.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -127,8 +127,8 @@
     iShared.iMainThreadID = tID;
     iAO = new (ELeave) CVoIPServerAO(this, tID);
     iShared.iMnThreadStatus = &(this->iAO->iStatus);
+    iShared.iCodecSettings.iG711FrameRate = TVoIPCodecSettings::E20MS;
     iShared.iMutex.Signal();
-    iShared.iCodecSettings.iG711FrameRate = TVoIPCodecSettings::E20MS;
     iAO->Request();
     iSessionType = ENone;
 
--- a/mmserv/voipaudioservices/VoIPServer/src/VoIPUplinkThread.cpp	Wed Apr 14 16:29:54 2010 +0300
+++ b/mmserv/voipaudioservices/VoIPServer/src/VoIPUplinkThread.cpp	Tue Apr 27 17:11:02 2010 +0300
@@ -115,6 +115,7 @@
 
     if (!cleanupStack)
         {
+        shared.iMutex.Signal();
         return KErrNoMemory;
         }
 
@@ -122,6 +123,7 @@
     TRAPD(err, thread = CVoIPUplinkThread::NewL(shared));
     if (err != KErrNone)
         {
+        shared.iMutex.Signal();
         return err;
         }