201029
authorhgs
Fri, 23 Jul 2010 17:29:03 -0500
changeset 36 73253677b50a
parent 33 5e8b14bae8c3
child 38 9e9fc5ab059f
201029
khronosfws/openmax_al/data/openmaxal.cfg
khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.c
mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/ActiveScheduledTestModule/data/mmc/metadata/DRM_NRTmeta.dcf
mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/data/mmc/metadata/DRM_NRTmeta.dcf
mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/data/mmc/metadata/DRM_NRTmeta.dcf
mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioStreamTestModule/data/mmc/metadata/DRM_NRTmeta.dcf
mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioToneTestModule/data/mmc/metadata/DRM_NRTmeta.dcf
mmmw_plat/system_tone_service_api/inc/systemtoneservice.h
mmmw_plat/system_tone_service_api/tsrc/inc/systemtoneservicestif.h
mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicestifblocks.cpp
mmserv/sts/bwins/systemtoneservice.def
mmserv/sts/eabi/systemtoneservice.def
mmserv/sts/src/systemtoneservice.cpp
mmserv/sts/sts/inc/sts.h
mmserv/sts/sts/src/sts.cpp
mmserv/sts/sts/src/stsplayer.cpp
mmserv/sts/stsproxy/inc/stsimplementation.h
mmserv/sts/stsproxy/src/rstssession.cpp
mmserv/sts/stsproxy/src/rstssession.h
mmserv/sts/stsproxy/src/stsimplementation.cpp
mmserv/sts/stsserver/inc/stsclientservercommon.h
mmserv/sts/stsserver/src/stsserversession.cpp
mmserv/sts/stsserver/src/stsserversession.h
mmserv/tms/inc/tmsclientserver.h
mmserv/tms/inc/tmsproxy.h
mmserv/tms/tmscallserver/eabi/tmscallserver.def
mmserv/tms/tmscallserver/group/tmscallserver.mmp
mmserv/tms/tmscallserver/inc/tmscallcsadpt.h
mmserv/tms/tmscallserver/inc/tmssyncvol.h
mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp
mmserv/tms/tmscallserver/src/tmscallipadpt.cpp
mmserv/tms/tmscallserver/src/tmsyncvol.cpp
mmserv/tms/tmsimpl/src/tmsdtmfbodyimpl.cpp
mmserv/tms/tmsproxy/bwins/tmsproxy.def
mmserv/tms/tmsproxy/eabi/tmsproxy.def
mmserv/tms/tmsproxy/src/tmsproxy.cpp
mmserv/tms/tmsserver/group/tmsserver.mmp
mmserv/tms/tmsserver/inc/tmsaudioinbandtoneplayer.h
mmserv/tms/tmsserver/inc/tmsdtmfeventhandler.h
mmserv/tms/tmsserver/inc/tmsdtmfnotifier.h
mmserv/tms/tmsserver/inc/tmsglobaleffectssettings.h
mmserv/tms/tmsserver/inc/tmsserver.h
mmserv/tms/tmsserver/src/tmsdtmfeventhandler.cpp
mmserv/tms/tmsserver/src/tmsdtmfnotifier.cpp
mmserv/tms/tmsserver/src/tmsglobaleffectssettings.cpp
mmserv/tms/tmsserver/src/tmsserver.cpp
mmserv/tms/tmsserver/src/tmsserversession.cpp
--- a/khronosfws/openmax_al/data/openmaxal.cfg	Fri Jul 09 16:43:35 2010 -0500
+++ b/khronosfws/openmax_al/data/openmaxal.cfg	Fri Jul 23 17:29:03 2010 -0500
@@ -21,7 +21,7 @@
 <mmf>
 <urischeme>
 # Num of entries followed by actual entries all ending with a comma
-3,file,http,rtsp,
+6,file,http,rtsp,rtspu,rtspt,mms,
 </urischeme>
 <fileext>
 15,3gp,wma,wmv,wav,amr,mp3,mp4,rm,ra,avi,mkv,aac,mid,awb,3g2,
@@ -40,15 +40,15 @@
 </mediaplayer>
 
 <mediarecorder>
-#<mmf>
-#<urischeme>
+<mmf>
+<urischeme>
 # Num of entries followed by actual entries all ending with a comma
-#1,file,
-#</urischeme>
-#<fileext>
-#2,amr,mp4,
-#</fileext>
-#</mmf>
+0,
+</urischeme>
+<fileext>
+0,
+</fileext>
+</mmf>
 
 <gst>
 <urischeme>
--- a/khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.c	Fri Jul 09 16:43:35 2010 -0500
+++ b/khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.c	Fri Jul 23 17:29:03 2010 -0500
@@ -82,13 +82,11 @@
     FrameworkMap *curNode = NULL;
     FWMgrBool newNode;
     FrameworkMap *frameworkMap = NULL;
-    FILE* fp = fopen(configFileLocationZ, "r");
 
+    FILE* fp = fopen(configFileLocationC, "r");
     if (fp == NULL)
         {
-        createDefaultRules(configFileLocationC);
-
-        fp = fopen(configFileLocationC, "r");
+        fp = fopen(configFileLocationZ, "r");
         }
 
     if (fp != NULL)
@@ -553,70 +551,4 @@
         }
     return FWMgrTrue;
     }
-
-int createDefaultRules(const char * filename)
-    {
-    FILE* fp = fopen(filename, "w");
-    if (fp == NULL)
-        return /*KErrAccessDenied*/-21;
-    fputs("#/*\r\n", fp);
-    fputs(
-            "#* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\r\n",
-            fp);
-    fputs("#* All rights reserved.\r\n", fp);
-    fputs(
-            "#* This component and the accompanying materials are made available\r\n",
-            fp);
-    fputs("#* under the terms of \"Eclipse Public License v1.0\"\r\n", fp);
-    fputs("#* which accompanies this distribution, and is available\r\n", fp);
-    fputs("#* at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\r\n",
-            fp);
-    fputs("#*\r\n", fp);
-    fputs("#* Initial Contributors:\r\n", fp);
-    fputs("#* Nokia Corporation - initial contribution.\r\n", fp);
-    fputs("#*\r\n", fp);
-    fputs("#* Contributors:\r\n", fp);
-    fputs("#*\r\n", fp);
-    fputs("#* Description:\r\n", fp);
-    fputs("#*\r\n", fp);
-    fputs("#*/\r\n", fp);
-    fputs(
-            "#============================================================================>|\r\n",
-            fp);
-    fputs(
-            "# Must not exceed 80 chars each line=========================================>|\r\n",
-            fp);
-    fputs(
-            "#============================================================================>|\r\n",
-            fp);
-    fputs("<mediaplayer>\r\n", fp);
-    fputs("<mmf>\r\n", fp);
-    fputs("<urischeme>\r\n", fp);
-    fputs(
-            "# Num of entries followed by actual entries all ending with a comma\r\n",
-            fp);
-    fputs("6,file,http,rtsp,rtspu,rtspt,mms,\r\n", fp);
-    fputs("</urischeme>\r\n", fp);
-    fputs("<fileext>\r\n", fp);
-    fputs(
-            "15,3gp,wma,wmv,wav,amr,mp3,mp4,rm,ra,avi,mkv,aac,mid,awb,3g2,\r\n",
-            fp);
-    fputs("</fileext>\r\n", fp);
-    fputs("</mmf>\r\n", fp);
-    fputs("</mediaplayer>\r\n", fp);
-    fputs("<mediarecorder>\r\n", fp);
-    fputs("<gst>\r\n", fp);
-    fputs("<urischeme>\r\n", fp);
-    fputs(
-            "# Num of entries followed by actual entries all ending with a comma\r\n",
-            fp);
-    fputs("1,file,\r\n", fp);
-    fputs("</urischeme>\r\n", fp);
-    fputs("<fileext>\r\n", fp);
-    fputs("3,wav,amr,mp4,\r\n", fp);
-    fputs("</fileext>\r\n", fp);
-    fputs("</gst>\r\n", fp);
-    fputs("</mediarecorder>\r\n", fp);
-    fclose(fp);
-    return 0;
-    }
+	
--- a/mmmw_plat/system_tone_service_api/inc/systemtoneservice.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmmw_plat/system_tone_service_api/inc/systemtoneservice.h	Fri Jul 23 17:29:03 2010 -0500
@@ -223,6 +223,8 @@
      * @param[in] aAlarmContext The context to the specific alarm that is to be stopped.
      */
     IMPORT_C void StopAlarm(unsigned int aAlarmContext);
+    
+    IMPORT_C void PlayAlarm(TToneType aTone, unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
 
 protected:
     // Protected constructors and destructors
--- a/mmmw_plat/system_tone_service_api/tsrc/inc/systemtoneservicestif.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmmw_plat/system_tone_service_api/tsrc/inc/systemtoneservicestif.h	Fri Jul 23 17:29:03 2010 -0500
@@ -136,6 +136,8 @@
         virtual TInt  PlayAlarm( CStifItemParser& aItem );
         
         virtual TInt  StopAlarm( CStifItemParser& aItem );
+        
+        virtual TInt  PlayToneWithStop( CStifItemParser& aItem);
 
 
 
--- a/mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicestifblocks.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicestifblocks.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -37,6 +37,7 @@
         ENTRY( "PlayTone", CSystemToneServiceStif::PlayTone ),
         ENTRY( "PlayAlarm", CSystemToneServiceStif::PlayAlarm ),
         ENTRY( "StopAlarm", CSystemToneServiceStif::StopAlarm ),
+        ENTRY( "PlayToneWithStop", CSystemToneServiceStif::PlayToneWithStop ),	
         
 
 
@@ -216,6 +217,40 @@
 }
 
 
+TInt CSystemToneServiceStif::PlayToneWithStop( CStifItemParser& aItem )
+    {
+        // Print to UI
+            _LIT( Ksystemtoneservicestif, "systemtoneservicestif" );
+            _LIT( KPrint, "In PlaySystemToneServiceWithContext" );
+            TestModuleIf().Printf( 0, Ksystemtoneservicestif, KPrint );
+            // Print to log file
+            iLog->Log( KPrint );
+            
+               TInt lRetVal = KErrNone;
+               TInt alarmType = 0;
+
+               lRetVal = aItem.GetNextInt(alarmType);
+
+               if ( lRetVal != KErrNone )
+                {
+                   iLog->Log(_L("CSystemToneServiceStif::PlaySystemToneService tone type missing in config file "));
+                   iLog->Log(_L("Playing Default Tone"));
+                   
+            iSts->PlayAlarm(CSystemToneService::EClockAlarm, iCurrentContext, *this);
+        }
+			  else
+        {
+            //iSts->PlayTone(CSystemToneService::EClockAlarm, iCurrentContext);
+            iSts->PlayAlarm(CSystemToneService::TToneType(alarmType), iCurrentContext, *this);
+            iLog->Log(_L("CSystemToneService::TAlarmType(alarmType) %d"),CSystemToneService::TAlarmType(alarmType) );
+        }
+        
+        return lRetVal;       
+            
+        }
+
+
+
 void CSystemToneServiceStif::HandleEvent()
 	{
 		TEventIf event( TEventIf::ESetEvent, _L("Event_PlayAlarmComplete") );
--- a/mmserv/sts/bwins/systemtoneservice.def	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/bwins/systemtoneservice.def	Fri Jul 23 17:29:03 2010 -0500
@@ -4,4 +4,5 @@
 	?PlayAlarm@CSystemToneService@@QAEXW4TAlarmType@1@AAIAAVMStsPlayAlarmObserver@@@Z @ 3 NONAME ; void CSystemToneService::PlayAlarm(enum CSystemToneService::TAlarmType, unsigned int &, class MStsPlayAlarmObserver &)
 	?Create@CSystemToneService@@SAPAV1@XZ @ 4 NONAME ; class CSystemToneService * CSystemToneService::Create(void)
 	?PlayTone@CSystemToneService@@QAEXW4TToneType@1@@Z @ 5 NONAME ; void CSystemToneService::PlayTone(enum CSystemToneService::TToneType)
+	?PlayAlarm@CSystemToneService@@QAEXW4TToneType@1@AAIAAVMStsPlayAlarmObserver@@@Z @ 6 NONAME ; void CSystemToneService::PlayAlarm(enum CSystemToneService::TToneType, unsigned int &, class MStsPlayAlarmObserver &)
 
--- a/mmserv/sts/eabi/systemtoneservice.def	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/eabi/systemtoneservice.def	Fri Jul 23 17:29:03 2010 -0500
@@ -4,4 +4,5 @@
 	_ZN18CSystemToneService8PlayToneENS_9TToneTypeE @ 3 NONAME
 	_ZN18CSystemToneService9PlayAlarmENS_10TAlarmTypeERjR21MStsPlayAlarmObserver @ 4 NONAME
 	_ZN18CSystemToneService9StopAlarmEj @ 5 NONAME
+	_ZN18CSystemToneService9PlayAlarmENS_9TToneTypeERjR21MStsPlayAlarmObserver @ 6 NONAME
 
--- a/mmserv/sts/src/systemtoneservice.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/src/systemtoneservice.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -68,3 +68,10 @@
     {
     iImplementation.StopAlarm(aAlarmContext);
     }
+
+EXPORT_C void CSystemToneService::PlayAlarm(TToneType aTone,
+				unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
+		{
+		iImplementation.PlayAlarm(aTone, aAlarmContext, aObserver);
+		}			
+	    
--- a/mmserv/sts/sts/inc/sts.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/sts/inc/sts.h	Fri Jul 23 17:29:03 2010 -0500
@@ -41,6 +41,8 @@
     void PlayAlarm(CSystemToneService::TAlarmType aAlarm,
             unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
     void StopAlarm(unsigned int aAlarmContext);
+    void PlayToneStop(CSystemToneService::TToneType aTone,
+    	      unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
 
 protected:
     CSts();
--- a/mmserv/sts/sts/src/sts.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/sts/src/sts.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -308,6 +308,95 @@
         }
     }
 
+
+void CSts::PlayToneStop(CSystemToneService::TToneType aTone,
+        unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
+    {
+    
+    if(iProfile)
+    
+    {
+    	MProEngTones&         tones = iProfile->ProfileTones();
+		
+			switch (aTone)
+				{
+				case CSystemToneService::EEmailAlert:
+					{
+				    	iFileName.Set(tones.EmailAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS;
+				    	iAudioPriority = KAudioPriorityRecvMsg ;
+				    	break;
+				    }
+				case CSystemToneService::ESmsAlert:
+					{
+				    	iFileName.Set(tones.MessageAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS;
+				    	iAudioPriority = KAudioPriorityRecvMsg;
+				    	break; 
+				    }
+				case CSystemToneService::EMmsAlert:
+					{
+				    	iFileName.Set(tones.MessageAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS;
+				    	iAudioPriority = KAudioPriorityRecvMsg;
+				    	break;
+				  	}
+				case CSystemToneService::EChatAlert:
+					{
+				    	iFileName.Set(tones.MessageAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS ;
+				    	iAudioPriority = KAudioPriorityRecvMsg;
+				    	break;
+				    } 
+				case CSystemToneService::EWarningBeep:
+				    {
+				    	iAudioPreference = KAudioPrefWarning;
+				    	iAudioPriority =  KAudioPriorityWarningTone ;
+				    	if (iWarningToneEnabled)
+				      	  iFileName.Set(KDefaultFile);
+				    	else
+				      	  iVolume = 0;
+				    
+				    	break;
+				    }
+				default:
+					{
+					  	iFileName.Set(KDefaultFile);
+					  	iAudioPreference = KAudioPrefDefaultTone;
+				        iAudioPriority = KAudioPriorityWarningTone ;
+				      break;
+				    }
+				}
+			}
+			
+		else
+		{			 
+				 iFileName.Set(KDefaultFile);
+				 iAudioPreference = KAudioPrefDefaultTone;
+				 iAudioPriority = KAudioPriorityWarningTone ;
+		}
+    	
+    CStsPlayer* player = CStsPlayer::CreateTonePlayer(*this, aTone,
+             iNextContext, iFileName, iVolume, 
+             iAudioPreference, iAudioPriority);
+    if (player != 0)
+        {
+        iPlayerMap[iNextContext] = new CPlayerNode(player, aObserver);
+        aAlarmContext = iNextContext;
+        iNextContext++;
+        if (iNextContext == 0)
+            iNextContext++;
+        player->Play();
+        }
+    else
+        {
+        //TODO: Add trace here
+        aAlarmContext = 0;
+        }
+    }
+
+
+
 void CSts::CleanUpPlayers()
     {
         while (!iPlayerMap.empty())
--- a/mmserv/sts/sts/src/stsplayer.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/sts/src/stsplayer.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -28,7 +28,8 @@
     {
     CStsPlayer* self = 0;
     
-    
+   
+
     self = new CStsPlayer(aObserver, aFileName, 0, aContext, aVolume, aAudioPreference, aAudioPriority);
     
            	        
@@ -51,6 +52,7 @@
        	TUint aAudioPreference, TUint  aAudioPriority)
     {
     CStsPlayer* self = 0;
+   
    	
    	self = new CStsPlayer(aObserver, aFileName, 10, aContext, aVolume, aAudioPreference, aAudioPriority);
    	
--- a/mmserv/sts/stsproxy/inc/stsimplementation.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/stsproxy/inc/stsimplementation.h	Fri Jul 23 17:29:03 2010 -0500
@@ -34,6 +34,9 @@
     PlayAlarm(CSystemToneService::TAlarmType aAlarm,
             unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
     void StopAlarm(unsigned int aAlarmContext);
+    void
+    PlayAlarm(CSystemToneService::TToneType aTone,
+            unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
 private:
     CStsImplementation();
     bool Init();
--- a/mmserv/sts/stsproxy/src/rstssession.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/stsproxy/src/rstssession.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -295,6 +295,26 @@
         }
     }
 
+void RStsSession::SendPlayToneForStop(CSystemToneService::TToneType aTone,
+        unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
+    {
+    TPckg<unsigned int> alarmContextPckg(aAlarmContext);
+    TInt err = SendReceive(StsMsg_PlayTone, TIpcArgs(aTone,
+            &alarmContextPckg, &aObserver));
+    if (err != KErrNone)
+        {
+        //TODO: Log a message
+        aObserver.PlayAlarmComplete(aAlarmContext);
+        }
+    else
+        {
+        iObserverMutex.Wait();
+        iObserverMap[aAlarmContext] = &aObserver;
+        iObserverMutex.Signal();
+        }
+   }   
+    
+
 void RStsSession::CleanUpObservers()
     {
     iObserverMutex.Wait();
--- a/mmserv/sts/stsproxy/src/rstssession.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/stsproxy/src/rstssession.h	Fri Jul 23 17:29:03 2010 -0500
@@ -39,6 +39,9 @@
             unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
 
     void SendStopAlarm(unsigned int aAlarmContext);
+    
+    void SendPlayToneForStop(CSystemToneService::TToneType aTone,
+    	      unsigned int& aAlarmContext,  MStsPlayAlarmObserver& aObserver);
 
 private:
 
--- a/mmserv/sts/stsproxy/src/stsimplementation.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/stsproxy/src/stsimplementation.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -78,3 +78,9 @@
     //TODO: Add logging and error checking
     iSession->SendStopAlarm(aAlarmContext);
     }
+    
+void CStsImplementation::PlayAlarm(CSystemToneService::TToneType aTone,
+	      unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) 
+	   {  
+	   	iSession->SendPlayToneForStop(aTone, aAlarmContext, aObserver);  
+		 }
--- a/mmserv/sts/stsserver/inc/stsclientservercommon.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/stsserver/inc/stsclientservercommon.h	Fri Jul 23 17:29:03 2010 -0500
@@ -38,6 +38,7 @@
     StsMsg_StopAlarm,
     StsMsg_PlayTone,
     StsMsg_PlayAlarm,
+    StsMsg_PlayToneStop,
     StsMsg_ENDMARKER
     };
 
--- a/mmserv/sts/stsserver/src/stsserversession.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/stsserver/src/stsserversession.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -114,6 +114,27 @@
     iSts.StopAlarm(context);
     }
 
+void CStsServerSession::DoPlayToneStopL(const RMessage2& aMessage)
+    {
+    CSystemToneService::TToneType tone =
+            (CSystemToneService::TToneType) aMessage.Int0();
+    unsigned int context = 0;
+    //SR
+    //iSts.PlayTone(tone, context, *this);
+    iSts.PlayToneStop(tone, context, *this);
+    iObserverMap[context] = (MStsPlayAlarmObserver*) aMessage.Ptr2();
+    TPckg<unsigned int> contextPckg(context);
+    TRAPD(err,aMessage.WriteL(1,contextPckg));
+    aMessage.Complete(err);
+    // if the context is 0 there was a problem with the PlayAlarm,
+    // so trigger the PlayAlarmComplete callback.
+    if (context == 0)
+        {
+        PlayAlarmComplete(0);
+        }
+    }
+
+
 void CStsServerSession::CleanUpObservers()
     {
     while (!iObserverMap.empty())
--- a/mmserv/sts/stsserver/src/stsserversession.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/sts/stsserver/src/stsserversession.h	Fri Jul 23 17:29:03 2010 -0500
@@ -47,6 +47,7 @@
     void DoPlayToneL(const RMessage2& aMessage);
     void DoPlayAlarmL(const RMessage2& aMessage);
     void DoStopAlarmL(const RMessage2& aMessage);
+    void DoPlayToneStopL(const RMessage2& aMessage);
 
     void CleanUpObservers();
     
--- a/mmserv/tms/inc/tmsclientserver.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/inc/tmsclientserver.h	Fri Jul 23 17:29:03 2010 -0500
@@ -58,8 +58,6 @@
     ETMSRingTonePause,
     ETMSRingToneStop,
     ETMSRingToneMute,
-    ETMSStartDTMFNotifier,
-    ETMSCancelDTMFNotifier,
     ETMSInitDTMF,
     ETMSStartDTMF,
     ETMSStopDTMF,
@@ -83,7 +81,8 @@
     EGlobalEffectsPsVolume = 10,
     EGlobalEffectsPsGain,
     ERoutingPs,
-    EDtmfPs
+    EDtmfPs,
+    ESyncVolume
     };
 
 // TMSServer message queue notifier type keys
--- a/mmserv/tms/inc/tmsproxy.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/inc/tmsproxy.h	Fri Jul 23 17:29:03 2010 -0500
@@ -103,8 +103,6 @@
     IMPORT_C gint StopInbandTone();
 
     // Global notifiers
-    IMPORT_C gint StartDTMFNotifier();
-    IMPORT_C gint CancelDTMFNotifier();
     IMPORT_C gint StartGlobalEffectNotifier();
     IMPORT_C gint CancelGlobalEffectNotifier();
     IMPORT_C gint StartRoutingNotifier();
--- a/mmserv/tms/tmscallserver/eabi/tmscallserver.def	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmscallserver/eabi/tmscallserver.def	Fri Jul 23 17:29:03 2010 -0500
@@ -20,4 +20,6 @@
 	_ZTVN3TMS14TMSTarSettingsE @ 19 NONAME
 	_ZTVN3TMS17TMSCallDelayTimerE @ 20 NONAME
 	_ZTVN3TMS19TMSIPCallStreamBaseE @ 21 NONAME
+	_ZTIN3TMS10TMSSyncVolE @ 22 NONAME
+	_ZTVN3TMS10TMSSyncVolE @ 23 NONAME
 
--- a/mmserv/tms/tmscallserver/group/tmscallserver.mmp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmscallserver/group/tmscallserver.mmp	Fri Jul 23 17:29:03 2010 -0500
@@ -52,6 +52,7 @@
 SOURCE          tmscsdownlink.cpp
 SOURCE          tmscsuplink.cpp
 SOURCE          tmstarsettings.cpp
+SOURCE          tmsyncvol.cpp
 
 USERINCLUDE     ../inc
 USERINCLUDE     ../../inc
--- a/mmserv/tms/tmscallserver/inc/tmscallcsadpt.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmscallserver/inc/tmscallcsadpt.h	Fri Jul 23 17:29:03 2010 -0500
@@ -34,9 +34,7 @@
 class TMSCSUplink;
 class TMSCSDownlink;
 class TMSTarSettings;
-class TMSAudioDtmfTonePlayer;
-class TMSDTMFProvider;
-class TMSDtmfNotifier;
+class TMSSyncVol;
 
 /*
  * TMSCallCSAdpt class
@@ -148,6 +146,7 @@
 
     gint iUplinkStreamId;
     gint iDnlinkStreamId;
+    TMSSyncVol* iResetVolNotifier;
     };
 
 } //namespace TMS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmscallserver/inc/tmssyncvol.h	Fri Jul 23 17:29:03 2010 -0500
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Telephony Multimedia Service
+ *
+ */
+
+#ifndef TMSSYNCVOL_H
+#define TMSSYNCVOL_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <e32property.h>
+#include <sounddevice.h>
+#include "tmsclientserver.h"
+
+namespace TMS {
+
+// CLASS DECLARATION
+class TMSSyncVol
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Two-phased constructor.
+     */
+    static TMSSyncVol* NewL();
+
+    /**
+     * Destructor.
+     */
+    virtual ~TMSSyncVol();
+
+public:
+    // New functions
+
+    void SetSyncVol(TBool syncvol = ETrue);
+
+private:
+
+    /**
+     * C++ default constructor.
+     */
+    TMSSyncVol();
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     */
+    void ConstructL();
+
+private:
+    gint iVolume; //Volume
+    };
+
+} //namespace TMS
+
+#endif // TMSSYNCVOL_H
+
+// End of File
--- a/mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -26,6 +26,7 @@
 #include "tmsshared.h"
 #include "tmsclientserver.h"
 #include "tmstarsettings.h"
+#include "tmssyncvol.h"
 
 using namespace TMS;
 
@@ -55,6 +56,7 @@
     iCSUplink = NULL;
     iRouting = NULL;
     iTarSettings = NULL;
+    iResetVolNotifier = NULL;
     TRACE_PRN_FN_EXT;
     }
 
@@ -80,6 +82,7 @@
     delete iTarSettings;
     delete iCSUplink;
     delete iCSDownlink;
+    delete iResetVolNotifier;
 
     if (iMsgQueueUp.Handle() > 0)
         {
@@ -282,6 +285,14 @@
             }
         case TMS_STREAM_DOWNLINK:
             {
+            if(!iResetVolNotifier)
+                {
+                TRAP(status, iResetVolNotifier = TMSSyncVol::NewL());
+                }
+            if(iResetVolNotifier)
+                {
+                iResetVolNotifier->SetSyncVol();
+                }
             if (iCSDownlink && strmId == iDnlinkStreamId &&
                     iDnlState == EInitialized)
                 {
@@ -329,8 +340,7 @@
         {
         case TMS_STREAM_UPLINK:
             {
-            if (iCSUplink && strmId == iUplinkStreamId &&
-                    iUplState == EActivated)
+            if (iCSUplink && strmId == iUplinkStreamId)
                 {
                 iCSUplink->Deactivate();
                 iUplState = EInitialized;
@@ -341,8 +351,7 @@
             }
         case TMS_STREAM_DOWNLINK:
             {
-            if (iCSDownlink && strmId == iDnlinkStreamId &&
-                    iDnlState == EActivated)
+            if (iCSDownlink && strmId == iDnlinkStreamId)
                 {
                 iCSDownlink->Deactivate();
                 iDnlState = EInitialized;
@@ -376,7 +385,7 @@
         {
         case TMS_STREAM_UPLINK:
             {
-            if (iCSUplink && strmId == iUplinkStreamId && iUplState != EIdle)
+            if (iCSUplink && strmId == iUplinkStreamId)
                 {
                 iCSUplink->Deactivate();
                 iUplState = EIdle;
@@ -387,7 +396,7 @@
             }
         case TMS_STREAM_DOWNLINK:
             {
-            if (iCSDownlink && strmId == iDnlinkStreamId && iDnlState != EIdle)
+            if (iCSDownlink && strmId == iDnlinkStreamId)
                 {
                 iCSDownlink->Deactivate();
                 iDnlState = EIdle;
--- a/mmserv/tms/tmscallserver/src/tmscallipadpt.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmscallserver/src/tmscallipadpt.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -1040,7 +1040,7 @@
      * 2) KAudioPrefVoipAudioUplink             -NOK native VoIP?
      *    KAudioPriorityVoipAudioUplink         -NOK native VoIP?
      */
-    iPriority.iPref = KAudioPrefVoipAudioUplink;
+    iPriority.iPref = KAudioPrefVoipAudioUplinkNonSignal;
     iPriority.iPriority = KAudioPriorityVoipAudioUplink;
 
     delete iIPUplink;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmscallserver/src/tmsyncvol.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Telephony Multimedia Service
+ *
+ */
+
+// INCLUDE FILES
+#include "tmssyncvol.h"
+#include "tmsclientserver.h"
+#include "tmsutility.h"
+
+using namespace TMS;
+
+// CONSTANTS
+_LIT_SECURITY_POLICY_PASS(KTMSServerReadPolicy);
+_LIT_SECURITY_POLICY_C1(KTMSServerWritePolicy, ECapabilityWriteUserData);
+
+// -----------------------------------------------------------------------------
+// TMSSyncVol::TMSSyncVol
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+TMSSyncVol::TMSSyncVol()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// TMSSyncVol::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void TMSSyncVol::ConstructL()
+    {
+    TRACE_PRN_FN_ENT;
+    TInt err = RProperty::Define(ESyncVolume, RProperty::EInt,
+            KTMSServerReadPolicy, KTMSServerWritePolicy);
+    TRACE_PRN_N1(_L("TMSSyncVol::ConstructL err:%d"),err);
+
+    if (err != KErrAlreadyExists)
+        {
+        User::LeaveIfError(err);
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSSyncVol::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+TMSSyncVol* TMSSyncVol::NewL()
+    {
+    TMSSyncVol* self = new (ELeave) TMSSyncVol();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// Destructor
+TMSSyncVol::~TMSSyncVol()
+    {
+    TRACE_PRN_FN_ENT;
+    TInt err = RProperty::Delete(KTMSPropertyCategory, ESyncVolume);
+    TRACE_PRN_N1(_L("TMSSyncVol::~TMSSyncVol err:%d"),err);
+    TRACE_PRN_FN_ENT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSSyncVol::SetSyncVol
+// -----------------------------------------------------------------------------
+//
+void TMSSyncVol::SetSyncVol(TBool syncvol)
+    {
+    TRACE_PRN_FN_ENT;
+    //    TInt err(KErrNone);
+    if (syncvol)
+        {
+        /*err =*/RProperty::Set(KTMSPropertyCategory, ESyncVolume, syncvol);
+        }
+
+    //TRACE_PRN_N1(_L("TMSSyncVol::SetSyncVol err:%d"),err);
+    TRACE_PRN_FN_EXT;
+    }
+
+//  End of File
--- a/mmserv/tms/tmsimpl/src/tmsdtmfbodyimpl.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsimpl/src/tmsdtmfbodyimpl.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -83,7 +83,11 @@
         }
     else
         {
-        if (iProxy->Connect() != TMS_RESULT_SUCCESS)
+        if (iProxy->Connect() == TMS_RESULT_SUCCESS)
+            {
+            ret = iProxy->InitDTMFPlayer(iStreamType);
+            }
+        else
             {
             delete iProxy;
             iProxy = NULL;
@@ -105,11 +109,6 @@
             {
             ret = iProxy->SetMsgQueueNotifier(EMsgQueueDTMFType, iObserver,
                     iParent, iClientId);
-            if (ret == TMS_RESULT_SUCCESS)
-                {
-                ret = iProxy->StartDTMFNotifier();
-                ret |= iProxy->InitDTMFPlayer(iStreamType);
-                }
             }
         else
             {
@@ -130,7 +129,6 @@
         {
         ret = iProxy->RemoveMsgQueueNotifier(EMsgQueueDTMFType, iObserver);
         iObserver = NULL;
-        iProxy->CancelDTMFNotifier();
         }
     else
         {
--- a/mmserv/tms/tmsproxy/bwins/tmsproxy.def	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsproxy/bwins/tmsproxy.def	Fri Jul 23 17:29:03 2010 -0500
@@ -1,40 +1,38 @@
 EXPORTS
 	?RemoveMsgQueueNotifier@TMSProxy@TMS@@QAEHW4TMSMsgQueueNotifierType@2@PAX@Z @ 1 NONAME ; int TMS::TMSProxy::RemoveMsgQueueNotifier(enum TMS::TMSMsgQueueNotifierType, void *)
-	?StartDTMFNotifier@TMSProxy@TMS@@QAEHXZ @ 2 NONAME ; int TMS::TMSProxy::StartDTMFNotifier(void)
-	?GetMaxLevel@TMSProxy@TMS@@QAEHAAI@Z @ 3 NONAME ; int TMS::TMSProxy::GetMaxLevel(unsigned int &)
-	?GetSupportedDecoders@TMSProxy@TMS@@QAEHAAV?$RArray@K@@AAH@Z @ 4 NONAME ; int TMS::TMSProxy::GetSupportedDecoders(class RArray<unsigned long> &, int &)
-	?Connect@TMSProxy@TMS@@QAEHXZ @ 5 NONAME ; int TMS::TMSProxy::Connect(void)
-	?SetLevel@TMSProxy@TMS@@QAEHI@Z @ 6 NONAME ; int TMS::TMSProxy::SetLevel(unsigned int)
-	?InitRT@TMSProxy@TMS@@QAEHHPAU_GString@@0@Z @ 7 NONAME ; int TMS::TMSProxy::InitRT(int, struct _GString *, struct _GString *)
-	?GetGain@TMSProxy@TMS@@QAEHAAI@Z @ 8 NONAME ; int TMS::TMSProxy::GetGain(unsigned int &)
-	?PlayRT@TMSProxy@TMS@@QAEHXZ @ 9 NONAME ; int TMS::TMSProxy::PlayRT(void)
-	?StartInbandTone@TMSProxy@TMS@@QAEHH@Z @ 10 NONAME ; int TMS::TMSProxy::StartInbandTone(int)
-	?Version@TMSProxy@TMS@@QBE?AVTVersion@@XZ @ 11 NONAME ; class TVersion TMS::TMSProxy::Version(void) const
-	?GetTMSCallSessionHandle@TMSProxy@TMS@@QAEHXZ @ 12 NONAME ; int TMS::TMSProxy::GetTMSCallSessionHandle(void)
-	?StopRT@TMSProxy@TMS@@QAEHXZ @ 13 NONAME ; int TMS::TMSProxy::StopRT(void)
-	?GetSupportedEncoders@TMSProxy@TMS@@QAEHAAV?$RArray@K@@AAH@Z @ 14 NONAME ; int TMS::TMSProxy::GetSupportedEncoders(class RArray<unsigned long> &, int &)
-	?ContinueDTMFStringSending@TMSProxy@TMS@@QAEHH@Z @ 15 NONAME ; int TMS::TMSProxy::ContinueDTMFStringSending(int)
-	?StopInbandTone@TMSProxy@TMS@@QAEHXZ @ 16 NONAME ; int TMS::TMSProxy::StopInbandTone(void)
-	?GetOutput@TMSProxy@TMS@@QAEHAAH@Z @ 17 NONAME ; int TMS::TMSProxy::GetOutput(int &)
-	?MuteRT@TMSProxy@TMS@@QAEHXZ @ 18 NONAME ; int TMS::TMSProxy::MuteRT(void)
-	?StopDTMF@TMSProxy@TMS@@QAEHH@Z @ 19 NONAME ; int TMS::TMSProxy::StopDTMF(int)
-	??1TMSProxy@TMS@@UAE@XZ @ 20 NONAME ; TMS::TMSProxy::~TMSProxy(void)
-	?SetMsgQueueNotifier@TMSProxy@TMS@@QAEHW4TMSMsgQueueNotifierType@2@PAX1H@Z @ 21 NONAME ; int TMS::TMSProxy::SetMsgQueueNotifier(enum TMS::TMSMsgQueueNotifierType, void *, void *, int)
-	?StartRoutingNotifier@TMSProxy@TMS@@QAEHXZ @ 22 NONAME ; int TMS::TMSProxy::StartRoutingNotifier(void)
-	?GetAvailableOutputs@TMSProxy@TMS@@QAEHAAV?$vector@IV?$allocator@I@std@@@std@@@Z @ 23 NONAME ; int TMS::TMSProxy::GetAvailableOutputs(class std::vector<unsigned int, class std::allocator<unsigned int> > &)
-	?PauseRT@TMSProxy@TMS@@QAEHXZ @ 24 NONAME ; int TMS::TMSProxy::PauseRT(void)
-	?StartDTMF@TMSProxy@TMS@@QAEHHPAU_GString@@@Z @ 25 NONAME ; int TMS::TMSProxy::StartDTMF(int, struct _GString *)
-	?CancelRoutingNotifier@TMSProxy@TMS@@QAEHXZ @ 26 NONAME ; int TMS::TMSProxy::CancelRoutingNotifier(void)
-	?SetGain@TMSProxy@TMS@@QAEHI@Z @ 27 NONAME ; int TMS::TMSProxy::SetGain(unsigned int)
-	?GetLevel@TMSProxy@TMS@@QAEHAAI@Z @ 28 NONAME ; int TMS::TMSProxy::GetLevel(unsigned int &)
-	?GetPreviousOutput@TMSProxy@TMS@@QAEHAAH@Z @ 29 NONAME ; int TMS::TMSProxy::GetPreviousOutput(int &)
-	?Close@TMSProxy@TMS@@QAEXXZ @ 30 NONAME ; void TMS::TMSProxy::Close(void)
-	??0TMSProxy@TMS@@QAE@XZ @ 31 NONAME ; TMS::TMSProxy::TMSProxy(void)
-	?SetOutput@TMSProxy@TMS@@QAEHH@Z @ 32 NONAME ; int TMS::TMSProxy::SetOutput(int)
-	?InitDTMFPlayer@TMSProxy@TMS@@QAEHH@Z @ 33 NONAME ; int TMS::TMSProxy::InitDTMFPlayer(int)
-	?DeinitRT@TMSProxy@TMS@@QAEHXZ @ 34 NONAME ; int TMS::TMSProxy::DeinitRT(void)
-	?CancelGlobalEffectNotifier@TMSProxy@TMS@@QAEHXZ @ 35 NONAME ; int TMS::TMSProxy::CancelGlobalEffectNotifier(void)
-	?GetMaxGain@TMSProxy@TMS@@QAEHAAI@Z @ 36 NONAME ; int TMS::TMSProxy::GetMaxGain(unsigned int &)
-	?StartGlobalEffectNotifier@TMSProxy@TMS@@QAEHXZ @ 37 NONAME ; int TMS::TMSProxy::StartGlobalEffectNotifier(void)
-	?CancelDTMFNotifier@TMSProxy@TMS@@QAEHXZ @ 38 NONAME ; int TMS::TMSProxy::CancelDTMFNotifier(void)
+	?GetMaxLevel@TMSProxy@TMS@@QAEHAAI@Z @ 2 NONAME ; int TMS::TMSProxy::GetMaxLevel(unsigned int &)
+	?GetSupportedDecoders@TMSProxy@TMS@@QAEHAAV?$RArray@K@@AAH@Z @ 3 NONAME ; int TMS::TMSProxy::GetSupportedDecoders(class RArray<unsigned long> &, int &)
+	?Connect@TMSProxy@TMS@@QAEHXZ @ 4 NONAME ; int TMS::TMSProxy::Connect(void)
+	?SetLevel@TMSProxy@TMS@@QAEHI@Z @ 5 NONAME ; int TMS::TMSProxy::SetLevel(unsigned int)
+	?InitRT@TMSProxy@TMS@@QAEHHPAU_GString@@0@Z @ 6 NONAME ; int TMS::TMSProxy::InitRT(int, struct _GString *, struct _GString *)
+	?GetGain@TMSProxy@TMS@@QAEHAAI@Z @ 7 NONAME ; int TMS::TMSProxy::GetGain(unsigned int &)
+	?PlayRT@TMSProxy@TMS@@QAEHXZ @ 8 NONAME ; int TMS::TMSProxy::PlayRT(void)
+	?StartInbandTone@TMSProxy@TMS@@QAEHH@Z @ 9 NONAME ; int TMS::TMSProxy::StartInbandTone(int)
+	?Version@TMSProxy@TMS@@QBE?AVTVersion@@XZ @ 10 NONAME ; class TVersion TMS::TMSProxy::Version(void) const
+	?GetTMSCallSessionHandle@TMSProxy@TMS@@QAEHXZ @ 11 NONAME ; int TMS::TMSProxy::GetTMSCallSessionHandle(void)
+	?StopRT@TMSProxy@TMS@@QAEHXZ @ 12 NONAME ; int TMS::TMSProxy::StopRT(void)
+	?GetSupportedEncoders@TMSProxy@TMS@@QAEHAAV?$RArray@K@@AAH@Z @ 13 NONAME ; int TMS::TMSProxy::GetSupportedEncoders(class RArray<unsigned long> &, int &)
+	?ContinueDTMFStringSending@TMSProxy@TMS@@QAEHH@Z @ 14 NONAME ; int TMS::TMSProxy::ContinueDTMFStringSending(int)
+	?StopInbandTone@TMSProxy@TMS@@QAEHXZ @ 15 NONAME ; int TMS::TMSProxy::StopInbandTone(void)
+	?GetOutput@TMSProxy@TMS@@QAEHAAH@Z @ 16 NONAME ; int TMS::TMSProxy::GetOutput(int &)
+	?MuteRT@TMSProxy@TMS@@QAEHXZ @ 17 NONAME ; int TMS::TMSProxy::MuteRT(void)
+	?StopDTMF@TMSProxy@TMS@@QAEHH@Z @ 18 NONAME ; int TMS::TMSProxy::StopDTMF(int)
+	??1TMSProxy@TMS@@UAE@XZ @ 19 NONAME ; TMS::TMSProxy::~TMSProxy(void)
+	?SetMsgQueueNotifier@TMSProxy@TMS@@QAEHW4TMSMsgQueueNotifierType@2@PAX1H@Z @ 20 NONAME ; int TMS::TMSProxy::SetMsgQueueNotifier(enum TMS::TMSMsgQueueNotifierType, void *, void *, int)
+	?GetAvailableOutputs@TMSProxy@TMS@@QAEHAAV?$vector@IV?$allocator@I@std@@@std@@@Z @ 21 NONAME ; int TMS::TMSProxy::GetAvailableOutputs(class std::vector<unsigned int, class std::allocator<unsigned int> > &)
+	?PauseRT@TMSProxy@TMS@@QAEHXZ @ 22 NONAME ; int TMS::TMSProxy::PauseRT(void)
+	?StartRoutingNotifier@TMSProxy@TMS@@QAEHXZ @ 23 NONAME ; int TMS::TMSProxy::StartRoutingNotifier(void)
+	?StartDTMF@TMSProxy@TMS@@QAEHHPAU_GString@@@Z @ 24 NONAME ; int TMS::TMSProxy::StartDTMF(int, struct _GString *)
+	?CancelRoutingNotifier@TMSProxy@TMS@@QAEHXZ @ 25 NONAME ; int TMS::TMSProxy::CancelRoutingNotifier(void)
+	?SetGain@TMSProxy@TMS@@QAEHI@Z @ 26 NONAME ; int TMS::TMSProxy::SetGain(unsigned int)
+	?GetLevel@TMSProxy@TMS@@QAEHAAI@Z @ 27 NONAME ; int TMS::TMSProxy::GetLevel(unsigned int &)
+	?GetPreviousOutput@TMSProxy@TMS@@QAEHAAH@Z @ 28 NONAME ; int TMS::TMSProxy::GetPreviousOutput(int &)
+	?Close@TMSProxy@TMS@@QAEXXZ @ 29 NONAME ; void TMS::TMSProxy::Close(void)
+	??0TMSProxy@TMS@@QAE@XZ @ 30 NONAME ; TMS::TMSProxy::TMSProxy(void)
+	?SetOutput@TMSProxy@TMS@@QAEHH@Z @ 31 NONAME ; int TMS::TMSProxy::SetOutput(int)
+	?InitDTMFPlayer@TMSProxy@TMS@@QAEHH@Z @ 32 NONAME ; int TMS::TMSProxy::InitDTMFPlayer(int)
+	?DeinitRT@TMSProxy@TMS@@QAEHXZ @ 33 NONAME ; int TMS::TMSProxy::DeinitRT(void)
+	?CancelGlobalEffectNotifier@TMSProxy@TMS@@QAEHXZ @ 34 NONAME ; int TMS::TMSProxy::CancelGlobalEffectNotifier(void)
+	?GetMaxGain@TMSProxy@TMS@@QAEHAAI@Z @ 35 NONAME ; int TMS::TMSProxy::GetMaxGain(unsigned int &)
+	?StartGlobalEffectNotifier@TMSProxy@TMS@@QAEHXZ @ 36 NONAME ; int TMS::TMSProxy::StartGlobalEffectNotifier(void)
 
--- a/mmserv/tms/tmsproxy/eabi/tmsproxy.def	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsproxy/eabi/tmsproxy.def	Fri Jul 23 17:29:03 2010 -0500
@@ -5,41 +5,39 @@
 	_ZN3TMS8TMSProxy14StopInbandToneEv @ 4 NONAME
 	_ZN3TMS8TMSProxy15StartInbandToneEi @ 5 NONAME
 	_ZN3TMS8TMSProxy17GetPreviousOutputERi @ 6 NONAME
-	_ZN3TMS8TMSProxy17StartDTMFNotifierEv @ 7 NONAME
-	_ZN3TMS8TMSProxy18CancelDTMFNotifierEv @ 8 NONAME
-	_ZN3TMS8TMSProxy19GetAvailableOutputsERSt6vectorIjSaIjEE @ 9 NONAME
-	_ZN3TMS8TMSProxy19SetMsgQueueNotifierENS_23TMSMsgQueueNotifierTypeEPvS2_i @ 10 NONAME
-	_ZN3TMS8TMSProxy20GetSupportedDecodersER6RArrayImERi @ 11 NONAME
-	_ZN3TMS8TMSProxy20GetSupportedEncodersER6RArrayImERi @ 12 NONAME
-	_ZN3TMS8TMSProxy20StartRoutingNotifierEv @ 13 NONAME
-	_ZN3TMS8TMSProxy21CancelRoutingNotifierEv @ 14 NONAME
-	_ZN3TMS8TMSProxy22RemoveMsgQueueNotifierENS_23TMSMsgQueueNotifierTypeEPv @ 15 NONAME
-	_ZN3TMS8TMSProxy23GetTMSCallSessionHandleEv @ 16 NONAME
-	_ZN3TMS8TMSProxy25ContinueDTMFStringSendingEi @ 17 NONAME
-	_ZN3TMS8TMSProxy25StartGlobalEffectNotifierEv @ 18 NONAME
-	_ZN3TMS8TMSProxy26CancelGlobalEffectNotifierEv @ 19 NONAME
-	_ZN3TMS8TMSProxy5CloseEv @ 20 NONAME
-	_ZN3TMS8TMSProxy6InitRTEiP8_GStringS2_ @ 21 NONAME
-	_ZN3TMS8TMSProxy6MuteRTEv @ 22 NONAME
-	_ZN3TMS8TMSProxy6PlayRTEv @ 23 NONAME
-	_ZN3TMS8TMSProxy6StopRTEv @ 24 NONAME
-	_ZN3TMS8TMSProxy7ConnectEv @ 25 NONAME
-	_ZN3TMS8TMSProxy7GetGainERj @ 26 NONAME
-	_ZN3TMS8TMSProxy7PauseRTEv @ 27 NONAME
-	_ZN3TMS8TMSProxy7SetGainEj @ 28 NONAME
-	_ZN3TMS8TMSProxy8DeinitRTEv @ 29 NONAME
-	_ZN3TMS8TMSProxy8GetLevelERj @ 30 NONAME
-	_ZN3TMS8TMSProxy8SetLevelEj @ 31 NONAME
-	_ZN3TMS8TMSProxy8StopDTMFEi @ 32 NONAME
-	_ZN3TMS8TMSProxy9GetOutputERi @ 33 NONAME
-	_ZN3TMS8TMSProxy9SetOutputEi @ 34 NONAME
-	_ZN3TMS8TMSProxy9StartDTMFEiP8_GString @ 35 NONAME
-	_ZN3TMS8TMSProxyC1Ev @ 36 NONAME
-	_ZN3TMS8TMSProxyC2Ev @ 37 NONAME
-	_ZN3TMS8TMSProxyD0Ev @ 38 NONAME
-	_ZN3TMS8TMSProxyD1Ev @ 39 NONAME
-	_ZN3TMS8TMSProxyD2Ev @ 40 NONAME
-	_ZNK3TMS8TMSProxy7VersionEv @ 41 NONAME
-	_ZTIN3TMS8TMSProxyE @ 42 NONAME
-	_ZTVN3TMS8TMSProxyE @ 43 NONAME
+	_ZN3TMS8TMSProxy19GetAvailableOutputsERSt6vectorIjSaIjEE @ 7 NONAME
+	_ZN3TMS8TMSProxy19SetMsgQueueNotifierENS_23TMSMsgQueueNotifierTypeEPvS2_i @ 8 NONAME
+	_ZN3TMS8TMSProxy20GetSupportedDecodersER6RArrayImERi @ 9 NONAME
+	_ZN3TMS8TMSProxy20GetSupportedEncodersER6RArrayImERi @ 10 NONAME
+	_ZN3TMS8TMSProxy20StartRoutingNotifierEv @ 11 NONAME
+	_ZN3TMS8TMSProxy21CancelRoutingNotifierEv @ 12 NONAME
+	_ZN3TMS8TMSProxy22RemoveMsgQueueNotifierENS_23TMSMsgQueueNotifierTypeEPv @ 13 NONAME
+	_ZN3TMS8TMSProxy23GetTMSCallSessionHandleEv @ 14 NONAME
+	_ZN3TMS8TMSProxy25ContinueDTMFStringSendingEi @ 15 NONAME
+	_ZN3TMS8TMSProxy25StartGlobalEffectNotifierEv @ 16 NONAME
+	_ZN3TMS8TMSProxy26CancelGlobalEffectNotifierEv @ 17 NONAME
+	_ZN3TMS8TMSProxy5CloseEv @ 18 NONAME
+	_ZN3TMS8TMSProxy6InitRTEiP8_GStringS2_ @ 19 NONAME
+	_ZN3TMS8TMSProxy6MuteRTEv @ 20 NONAME
+	_ZN3TMS8TMSProxy6PlayRTEv @ 21 NONAME
+	_ZN3TMS8TMSProxy6StopRTEv @ 22 NONAME
+	_ZN3TMS8TMSProxy7ConnectEv @ 23 NONAME
+	_ZN3TMS8TMSProxy7GetGainERj @ 24 NONAME
+	_ZN3TMS8TMSProxy7PauseRTEv @ 25 NONAME
+	_ZN3TMS8TMSProxy7SetGainEj @ 26 NONAME
+	_ZN3TMS8TMSProxy8DeinitRTEv @ 27 NONAME
+	_ZN3TMS8TMSProxy8GetLevelERj @ 28 NONAME
+	_ZN3TMS8TMSProxy8SetLevelEj @ 29 NONAME
+	_ZN3TMS8TMSProxy8StopDTMFEi @ 30 NONAME
+	_ZN3TMS8TMSProxy9GetOutputERi @ 31 NONAME
+	_ZN3TMS8TMSProxy9SetOutputEi @ 32 NONAME
+	_ZN3TMS8TMSProxy9StartDTMFEiP8_GString @ 33 NONAME
+	_ZN3TMS8TMSProxyC1Ev @ 34 NONAME
+	_ZN3TMS8TMSProxyC2Ev @ 35 NONAME
+	_ZN3TMS8TMSProxyD0Ev @ 36 NONAME
+	_ZN3TMS8TMSProxyD1Ev @ 37 NONAME
+	_ZN3TMS8TMSProxyD2Ev @ 38 NONAME
+	_ZNK3TMS8TMSProxy7VersionEv @ 39 NONAME
+	_ZTIN3TMS8TMSProxyE @ 40 NONAME
+	_ZTVN3TMS8TMSProxyE @ 41 NONAME
 
--- a/mmserv/tms/tmsproxy/src/tmsproxy.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsproxy/src/tmsproxy.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -609,20 +609,6 @@
     return TMSRESULT(status);
     }
 
-EXPORT_C gint TMSProxy::StartDTMFNotifier()
-    {
-    gint status(TMS_RESULT_SUCCESS);
-    status = RSessionBase::SendReceive(ETMSStartDTMFNotifier); //DTMFHandler
-    return TMSRESULT(status);
-    }
-
-EXPORT_C gint TMSProxy::CancelDTMFNotifier()
-    {
-    gint status(TMS_RESULT_SUCCESS);
-    status = RSessionBase::SendReceive(ETMSCancelDTMFNotifier); //DTMFHandler
-    return TMSRESULT(status);
-    }
-
 EXPORT_C gint TMSProxy::StartGlobalEffectNotifier()
     {
     gint status(TMS_RESULT_SUCCESS);
--- a/mmserv/tms/tmsserver/group/tmsserver.mmp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsserver/group/tmsserver.mmp	Fri Jul 23 17:29:03 2010 -0500
@@ -37,7 +37,6 @@
 SOURCE          tmstareventhandler.cpp
 SOURCE          tmscenreplistener.cpp
 SOURCE          tmscenrepaudiohandler.cpp
-SOURCE          tmsdtmfeventhandler.cpp
 SOURCE          tmsaudiotoneutilityimpl.cpp
 SOURCE          tmsaudioinbandtoneplayer.cpp
 SOURCE          tmspubsublistener.cpp
@@ -49,7 +48,6 @@
 SOURCE          tmsdtmfprovider.cpp
 SOURCE          tmseteldtmfmonitor.cpp
 SOURCE          tmseteldtmfstopmonitor.cpp
-SOURCE          tmsdtmfnotifier.cpp
 
 USERINCLUDE     ../inc
 USERINCLUDE     ../../inc
--- a/mmserv/tms/tmsserver/inc/tmsaudioinbandtoneplayer.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsserver/inc/tmsaudioinbandtoneplayer.h	Fri Jul 23 17:29:03 2010 -0500
@@ -19,6 +19,7 @@
 #define TMSAUDIOINBANDTONEPLAYER_H
 
 // INCLUDES
+#include <AudioPreference.h>
 #include <mdaaudiotoneplayer.h>
 #include <barsc.h>
 #include <barsread.h>
--- a/mmserv/tms/tmsserver/inc/tmsdtmfeventhandler.h	Fri Jul 09 16:43:35 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Telephony Multimedia Service
- *
- */
-
-#ifndef DTMFEVENTHANDLER_H
-#define DTMFEVENTHANDLER_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <e32property.h>
-#include "tmsserver.h"
-
-namespace TMS {
-
-// CLASS DECLARATION
-class TMSDtmfEventHandler : public CActive
-    {
-public:
-    /**
-     * Two-phased constructor.
-     */
-    static TMSDtmfEventHandler* NewL(TMSServer* aServer);
-
-    /**
-     * Destructor.
-     */
-    virtual ~TMSDtmfEventHandler();
-
-private:
-    /**
-     * From CActive
-     * Cancel outstanding request
-     */
-    void DoCancel();
-
-    /**
-     * From CActive
-     * Implementation of CActive::RunL.
-     * Called when server request has completed.
-     */
-    void RunL();
-
-    /**
-     * From CActive
-     * Implementation of CActive::RunError.
-     * Called when RunL leaves.
-     */
-    TInt RunError(TInt aError);
-
-private:
-
-    /**
-     * C++ default constructor.
-     */
-    TMSDtmfEventHandler(TMSServer* aServer);
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     */
-    void ConstructL();
-
-private:
-    TMSServer* iTMSSer;
-    RProperty iProperty;
-    };
-
-} //namespace TMS
-
-#endif      // DTMFEVENTHANDLER_H
-
-// End of File
--- a/mmserv/tms/tmsserver/inc/tmsdtmfnotifier.h	Fri Jul 09 16:43:35 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Telephony Multimedia Service
- *
- */
-
-#ifndef DTMFNOTIFIER_H
-#define DTMFNOTIFIER_H
-
-//  INCLUDES
-#include <e32property.h>
-#include <sounddevice.h>
-#include "tmsclientserver.h"
-
-namespace TMS {
-
-// CLASS DECLARATION
-class TMSDtmfNotifier
-    {
-public:
-    // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static TMSDtmfNotifier* NewL();
-
-    /**
-     * Destructor.
-     */
-    virtual ~TMSDtmfNotifier();
-
-public:
-    // New functions
-
-    void SetDtmf(TmsMsgBufPckg dtmfpckg, gboolean publish = TRUE);
-
-private:
-
-    /**
-     * C++ default constructor.
-     */
-    TMSDtmfNotifier();
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     */
-    void ConstructL();
-
-private:
-    gint iVolume;
-    };
-
-} //namespace TMS
-
-#endif // DTMFNOTIFIER_H
-
-// End of File
--- a/mmserv/tms/tmsserver/inc/tmsglobaleffectssettings.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsserver/inc/tmsglobaleffectssettings.h	Fri Jul 23 17:29:03 2010 -0500
@@ -90,6 +90,12 @@
      */
     TInt MaxGain() const;
 
+    /**
+     * Resets volume to default if level is 0 when new call starts.
+     * @return
+     */
+    void ResetDefaultVolume();
+
 private:
 
     /**
--- a/mmserv/tms/tmsserver/inc/tmsserver.h	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsserver/inc/tmsserver.h	Fri Jul 23 17:29:03 2010 -0500
@@ -27,6 +27,7 @@
 #include "tmsrtplayer.h"
 #include "tmsdtmfobserver.h"
 #include "tmsdtmftoneplayerobserver.h"
+#include "tmspubsubobserver.h"
 
 namespace TMS {
 
@@ -38,10 +39,9 @@
 class TMSTarEventHandler;
 class TMSCSPCenRepListener;
 class TMSCenRepAudioHandler;
-class TMSDtmfEventHandler;
 class TMSAudioDtmfTonePlayer;
 class TMSDTMFProvider;
-class TMSDtmfNotifier;
+class TMSPubSubListener;
 
 // -----------------------------------------------------------------------------
 // TMSServer class
@@ -50,7 +50,8 @@
 class TMSServer : public CServer2,
                   private TMSRtPlayerObsrv,
                   private TMSDTMFObserver,
-                  private TMSDTMFTonePlayerObserver
+                  private TMSDTMFTonePlayerObserver,
+                  public TMSPubSubObserver
     {
 public:
     static void RunServerL();
@@ -81,12 +82,10 @@
     TInt StartDTMF(const RMessage2& aMessage);
     TInt StopDTMF(const RMessage2& aMessage);
     TInt ContinueSendingDTMF(const RMessage2& aMessage);
-    TInt NotifyDtmfClients(TmsMsgBufPckg dtmfpckg);
+    TInt NotifyDtmfClients(gint aEventType, gint aError);
     gint FindActiveCallType();
 
     TInt NotifyTarClients(TRoutingMsgBufPckg routingpckg);
-    void StartDTMFNotifierL();
-    void CancelDTMFNotifier();
     void StartRoutingNotifierL();
     void CancelRoutingNotifier();
     void StartCenRepHandlerL();
@@ -110,14 +109,18 @@
     // from TMSRtPlayerObsrv
     void RtPlayerEvent(TInt aEventType, TInt aError);
 
-    //From TMSDTMFTonePlayerObserver
+    // from TMSDTMFTonePlayerObserver
     void DTMFInitCompleted(gint status);
     void DTMFToneFinished(gint status);
 
-    //From TMSDTMFObserver
+    // from TMSDTMFObserver
     void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event,
             const gint status, const TChar tone);
 
+    // from TMSPubSubObserver
+    void HandleNotifyPSL(const TUid aUid, const TInt& aKey,
+                const TRequestStatus& aStatus);
+
 private:
     static TMSServer* NewLC();
     TMSServer();
@@ -139,7 +142,6 @@
     TMSTarEventHandler* iTarHandler;
     TMSCenRepAudioHandler* iAudioCenRepHandler;
     TMSAudioOutput iCurrentRouting;
-    TMSDtmfEventHandler* iDTMFHandler;
     TInt iTarHandlerCount;
     TInt iAudioCenRepHandlerCount;
     TInt iDTMFHandlerCount;
@@ -153,13 +155,13 @@
 
     // for DTMF
     TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer;
-    TMSDtmfNotifier* iDTMFNotifier;
     TMSAudioDtmfTonePlayer* iDTMFUplinkPlayer;
     TMSDTMFProvider* iDTMFUplinkPlayerEtel;
 
     // for codecs count
     RArray<TFourCC> iDnlCodecs;
     RArray<TFourCC> iUplCodecs;
+    TMSPubSubListener* iSyncVol;
     };
 
 // -----------------------------------------------------------------------------
--- a/mmserv/tms/tmsserver/src/tmsdtmfeventhandler.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Telephony Multimedia Service
- *
- */
-
-// INCLUDE FILES
-#include "tmsdtmfeventhandler.h"
-#include "tmsclientserver.h"
-#include "tmsutility.h"
-
-using namespace TMS;
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::TMSDtmfEventHandler
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-TMSDtmfEventHandler::TMSDtmfEventHandler(TMSServer* aServer) :
-    CActive(EPriorityStandard),
-    iTMSSer(aServer)
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void TMSDtmfEventHandler::ConstructL()
-    {
-    TRACE_PRN_FN_ENT;
-    CActiveScheduler::Add(this);
-    User::LeaveIfError(iProperty.Attach(KTMSPropertyCategory, EDtmfPs));
-    iStatus = KRequestPending;
-    iProperty.Subscribe(iStatus);
-    SetActive();
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-TMSDtmfEventHandler* TMSDtmfEventHandler::NewL(TMSServer* aServer)
-    {
-    TMSDtmfEventHandler* self = new (ELeave) TMSDtmfEventHandler(aServer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// Destructor
-TMSDtmfEventHandler::~TMSDtmfEventHandler()
-    {
-    TRACE_PRN_FN_ENT;
-    if (IsActive())
-        {
-        Cancel();
-        }
-    iProperty.Close();
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::DoCancel
-// -----------------------------------------------------------------------------
-//
-void TMSDtmfEventHandler::DoCancel()
-    {
-    TRACE_PRN_FN_ENT;
-    iProperty.Cancel();
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::RunL
-// -----------------------------------------------------------------------------
-//
-void TMSDtmfEventHandler::RunL()
-    {
-    TRACE_PRN_FN_ENT;
-// Subscribe immediately before analyzing the notification to ensure that we
-// don't miss further updates.
-    iStatus = KRequestPending;
-    iProperty.Subscribe(iStatus);
-    SetActive();
-    TmsMsgBufPckg dtmfpckg;
-    iProperty.Get(dtmfpckg);
-    iTMSSer->NotifyDtmfClients(dtmfpckg);
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::RunError
-// -----------------------------------------------------------------------------
-//
-TInt TMSDtmfEventHandler::RunError(TInt aError)
-    {
-    return aError;
-    }
-
--- a/mmserv/tms/tmsserver/src/tmsdtmfnotifier.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Telephony Multimedia Service
- *
- */
-
-// INCLUDE FILES
-#include "tmsdtmfnotifier.h"
-#include "tmsclientserver.h"
-#include "tmsutility.h"
-
-using namespace TMS;
-
-// CONSTANTS
-_LIT_SECURITY_POLICY_PASS(KTMSServerReadPolicy);
-_LIT_SECURITY_POLICY_C1(KTMSServerWritePolicy, ECapabilityWriteUserData);
-
-// -----------------------------------------------------------------------------
-// TMSDtmfNotifier::TMSDtmfNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-TMSDtmfNotifier::TMSDtmfNotifier()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfNotifier::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void TMSDtmfNotifier::ConstructL()
-    {
-    TRACE_PRN_FN_ENT;
-    gint err = RProperty::Define(EDtmfPs, RProperty::EByteArray,
-            KTMSServerReadPolicy, KTMSServerWritePolicy);
-    TRACE_PRN_N1(_L("DtmfSetting::ConstructL err:%d"), err);
-
-    if (err != KErrAlreadyExists)
-        {
-        User::LeaveIfError(err);
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfNotifier::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-TMSDtmfNotifier* TMSDtmfNotifier::NewL()
-    {
-    TMSDtmfNotifier* self = new (ELeave) TMSDtmfNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// Destructor
-TMSDtmfNotifier::~TMSDtmfNotifier()
-    {
-    TRACE_PRN_FN_ENT;
-    gint err = RProperty::Delete(KTMSPropertyCategory, EDtmfPs);
-    TRACE_PRN_N1(_L("DtmfSetting::~TMSDtmfNotifier err:%d"), err);
-    TRACE_PRN_FN_ENT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfNotifier::SetDtmf
-// -----------------------------------------------------------------------------
-//
-void TMSDtmfNotifier::SetDtmf(TmsMsgBufPckg dtmfpckg, gboolean publish)
-    {
-    TRACE_PRN_FN_ENT;
-    if (publish)
-        {
-        gint err = RProperty::Set(KTMSPropertyCategory, EDtmfPs, dtmfpckg);
-        TRACE_PRN_N1(_L("DtmfSetting::SetDtmf err:%d"), err);
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-//  End of File
--- a/mmserv/tms/tmsserver/src/tmsglobaleffectssettings.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsserver/src/tmsglobaleffectssettings.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -18,6 +18,7 @@
 // INCLUDE FILES
 #include "tmsglobaleffectssettings.h"
 #include "tmsclientserver.h"
+#include "tmsutility.h"
 
 using namespace TMS;
 
@@ -59,13 +60,17 @@
 //
 void TMSGlobalEffectsSettings::ConstructL()
     {
+    TRACE_PRN_FN_ENT;
     // Create repository instance
     iRepository = CRepository::NewL(KCRUidTmseffects);
     if (iRepository)
         {
         iRepository->Get(KTmsLoudSpkrVolume, iLoudSpkrVolume);
         iRepository->Get(KTmsEarPieceVolume, iEarVolume);
+        TRACE_PRN_N1(_L("loud spkr vol %d"),iLoudSpkrVolume);
+        TRACE_PRN_N1(_L("ear piece vol %d"),iEarVolume);
         }
+    TRACE_PRN_FN_EXT;
     }
 
 // -----------------------------------------------------------------------------
@@ -94,15 +99,27 @@
 //
 void TMSGlobalEffectsSettings::SetLoudSpkrVolume(TInt aVolume)
     {
+    TRACE_PRN_FN_ENT;
     TInt status(KErrNone);
     if (iRepository)
         {
-        status = iRepository->Set(KTmsLoudSpkrVolume, aVolume);
+        if (aVolume > 0)
+            {
+            status = iRepository->Set(KTmsLoudSpkrVolume, aVolume);
+            TRACE_PRN_N2(_L("status %d loud spkr vol %d"),status,aVolume);
+            }
+        else
+            {
+            status = iRepository->Set(KTmsLoudSpkrVolume, KDefaultVolume);
+            TRACE_PRN_N(_L("loud spkr level 0 store default"));
+            }
         if (status == KErrNone)
             {
             iLoudSpkrVolume = aVolume;
+            TRACE_PRN_N1(_L("cached loud spkr vol %d"),iLoudSpkrVolume);
             }
         }
+    TRACE_PRN_FN_EXT;
     }
 
 // -----------------------------------------------------------------------------
@@ -111,15 +128,27 @@
 //
 void TMSGlobalEffectsSettings::SetEarPieceVolume(TInt aVolume)
     {
+    TRACE_PRN_FN_ENT;
     TInt status(KErrNone);
     if (iRepository)
         {
-        status = iRepository->Set(KTmsEarPieceVolume, aVolume);
+        if (aVolume > 0)
+            {
+            status = iRepository->Set(KTmsEarPieceVolume, aVolume);
+            TRACE_PRN_N2(_L("status %d ear vol %d"),status,aVolume);
+            }
+        else
+            {
+            status = iRepository->Set(KTmsEarPieceVolume, KDefaultVolume);
+            TRACE_PRN_N(_L("ear piece vol level 0 store default"));
+            }
         if (status == KErrNone)
             {
             iEarVolume = aVolume;
+            TRACE_PRN_N1(_L("cached ear piece vol %d"),iEarVolume);
             }
         }
+    TRACE_PRN_FN_EXT;
     }
 
 // -----------------------------------------------------------------------------
@@ -129,6 +158,7 @@
 void TMSGlobalEffectsSettings::GetLoudSpkrVolume(TInt& aVolume)
     {
     aVolume = iLoudSpkrVolume;
+    TRACE_PRN_N1(_L("TMSGlobalEffectsSettings GetLoudSpkrVolume %d"),aVolume);
     }
 
 // -----------------------------------------------------------------------------
@@ -138,6 +168,7 @@
 void TMSGlobalEffectsSettings::GetEarPieceVolume(TInt& aVolume)
     {
     aVolume = iEarVolume;
+    TRACE_PRN_N1(_L("TMSGlobalEffectsSettings GetEarPieceVolume  %d"),aVolume);
     }
 
 // -----------------------------------------------------------------------------
@@ -176,3 +207,21 @@
     return iMaxGain;
     }
 
+// -----------------------------------------------------------------------------
+// TMSGlobalEffectsSettings::ResetDefaultVolume
+// -----------------------------------------------------------------------------
+//
+void TMSGlobalEffectsSettings::ResetDefaultVolume()
+    {
+    if (iLoudSpkrVolume == 0)
+        {
+        iRepository->Get(KTmsLoudSpkrVolume, iLoudSpkrVolume);
+        TRACE_PRN_N1(_L("Needed to reset default loudspkr vol %d"),iLoudSpkrVolume);
+        }
+    if (iEarVolume == 0)
+        {
+        iRepository->Get(KTmsEarPieceVolume, iEarVolume);
+        TRACE_PRN_N1(_L("Needed to reset default ear vol %d"),iEarVolume);
+        }
+    }
+
--- a/mmserv/tms/tmsserver/src/tmsserver.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsserver/src/tmsserver.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -32,8 +32,7 @@
 #include "tmscenrepaudiohandler.h"
 #include "tmsdtmftoneplayer.h"
 #include "tmsdtmfprovider.h"
-#include "tmsdtmfnotifier.h"
-#include "tmsdtmfeventhandler.h"
+#include "tmspubsublistener.h"
 #include "tmsrtparam.h"
 #include "tmsserver.h"
 
@@ -86,14 +85,12 @@
     delete iEffectSettings;
     delete iTarHandler;
     delete iAudioCenRepHandler;
-    delete iDTMFHandler;
     DeinitRingTonePlayer();
     delete iTMSRtPlayer;
     delete iDTMFUplinkPlayer;
     delete iDTMFUplinkPlayerEtel;
     delete iDTMFDnlinkPlayer;
-    delete iDTMFNotifier;
-
+    delete iSyncVol;
     TRACE_PRN_FN_EXT;
     }
 
@@ -141,12 +138,11 @@
     iEffectSettings = TMSGlobalEffectsSettings::NewL();
     iTarHandler = NULL;
     iAudioCenRepHandler = NULL;
-    iDTMFHandler = NULL;
     iCurrentRouting = TMS_AUDIO_OUTPUT_PRIVATE;
     iDTMFDnlinkPlayer = NULL;
     iDTMFUplinkPlayer = NULL;
     iDTMFUplinkPlayerEtel = NULL;
-    iDTMFNotifier = NULL;
+    iSyncVol = TMSPubSubListener::NewL(KTMSPropertyCategory,ESyncVolume, this);
 
     //TODO: EUnit fails to initialize ProfileEngine in RT in eshell mode
     TRAP_IGNORE(InitRingTonePlayerL());
@@ -268,11 +264,13 @@
                 case TMS_AUDIO_OUTPUT_LOUDSPEAKER:
                     {
                     iEffectSettings->GetLoudSpkrVolume(volume);
+                    TRACE_PRN_N1(_L("loudspk vol %d"),volume);
                     }
                     break;
                 default:
                     {
                     iEffectSettings->GetEarPieceVolume(volume);
+                    TRACE_PRN_N1(_L("ear vol %d"),volume);
                     }
                     break;
                 }
@@ -360,40 +358,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// TMSServer::StartDTMFNotifierL
-//
-// -----------------------------------------------------------------------------
-//
-void TMSServer::StartDTMFNotifierL()
-    {
-    TRACE_PRN_FN_ENT;
-
-    if (!iDTMFHandler)
-        {
-        iDTMFHandlerCount = 0;
-        iDTMFHandler = TMSDtmfEventHandler::NewL(
-                (const_cast<TMSServer*> (this)));
-        }
-    iDTMFHandlerCount++;
-
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSServer::CancelDTMFNotifier
-//
-// -----------------------------------------------------------------------------
-//
-void TMSServer::CancelDTMFNotifier()
-    {
-    if (--iDTMFHandlerCount <= 0)
-        {
-        delete iDTMFHandler;
-        iDTMFHandler = NULL;
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // TMSServer::SetOutput
 //
 // -----------------------------------------------------------------------------
@@ -579,9 +543,11 @@
         case TMS_AUDIO_OUTPUT_PUBLIC:
         case TMS_AUDIO_OUTPUT_LOUDSPEAKER:
             iEffectSettings->GetLoudSpkrVolume(volume);
+            TRACE_PRN_N1(_L("TMSServer::GetLevel loudspkr vol %d"),volume);
             break;
         default:
             iEffectSettings->GetEarPieceVolume(volume);
+            TRACE_PRN_N1(_L("TMSServer::GetLevel ear vol %d"),volume);
             break;
         }
 
@@ -839,10 +805,12 @@
             iCurrentRouting == TMS_AUDIO_OUTPUT_LOUDSPEAKER)
         {
         iEffectSettings->GetLoudSpkrVolume(vol);
+        TRACE_PRN_N1(_L("TMSServer::NotifyTarClients loudspkr vol %d"),vol);
         }
     else
         {
         iEffectSettings->GetEarPieceVolume(vol);
+        TRACE_PRN_N1(_L("TMSServer::NotifyTarClients ear vol %d"),vol);
         }
 
     TInt status = SendMessageToCallServ(TMS_EFFECT_GLOBAL_VOL_SET, vol);
@@ -890,6 +858,7 @@
             }
         if (!iDTMFUplinkPlayer) //IP call
             {
+            // TODO: Ongoing work with Audio Policy team...
             TRAP(status, iDTMFUplinkPlayer = TMSAudioDtmfTonePlayer::NewL(*this,
 //                    KAudioPrefVoipAudioUplinkNonSignal,
 //                    KAudioPrefVoipAudioUplink,
@@ -906,10 +875,6 @@
                     KAudioDTMFString, KAudioPriorityDTMFString));
             }
         }
-    if (!iDTMFNotifier && status == TMS_RESULT_SUCCESS)
-        {
-        TRAP(status, iDTMFNotifier = TMSDtmfNotifier::NewL());
-        }
 
     aMessage.Complete(status);
     TRACE_PRN_FN_EXT;
@@ -939,54 +904,45 @@
             TPtr ptr = tone->Des();
             status = aMessage.Read(1, ptr);
             TRACE_PRN_N(ptr);
-            TmsMsgBufPckg dtmfpckg;
-            dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
 
             if (strmtype == TMS_STREAM_UPLINK)
                 {
-//#ifdef __WINSCW__
-                // Just to test playback in wins
-//                iActiveCallType = TMS_CALL_IP;
-//#else
+#ifdef __WINSCW__
+                // Just to hear DTMF tones in Wins
+                iActiveCallType = TMS_CALL_IP;
+#else
                 FindActiveCallType();
-//#endif
+#endif
                 if (iActiveCallType == TMS_CALL_IP && iDTMFUplinkPlayer)
                     {
                     iDTMFUplinkPlayer->PlayDtmfTone(ptr);
                     status = TMS_RESULT_SUCCESS;
-                    dtmfpckg().iRequest = ECmdDTMFToneUplPlayStarted;
                     }
                 else if (iActiveCallType == TMS_CALL_CS &&
                         iDTMFUplinkPlayerEtel)
                     {
                     status = iDTMFUplinkPlayerEtel->SendDtmfToneString(ptr);
-                    dtmfpckg().iRequest = ECmdDTMFToneUplPlayStarted;
                     }
                 else
                     {
                     status = TMS_RESULT_INVALID_STATE;
                     }
+                NotifyDtmfClients(ECmdDTMFToneUplPlayStarted, status);
                 }
             else if (strmtype == TMS_STREAM_DOWNLINK)
                 {
-                //status = TMS_RESULT_UNINITIALIZED_OBJECT;
+                status = TMS_RESULT_INVALID_STATE;
                 if (iDTMFDnlinkPlayer)
                     {
                     iDTMFDnlinkPlayer->PlayDtmfTone(ptr);
                     status = TMS_RESULT_SUCCESS;
-                    dtmfpckg().iRequest = ECmdDTMFToneDnlPlayStarted;
                     }
+                NotifyDtmfClients(ECmdDTMFToneDnlPlayStarted, status);
                 }
             else
                 {
                 status = TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED;
                 }
-
-            if (iDTMFNotifier)
-                {
-                dtmfpckg().iStatus = TMSUtility::EtelToTMSResult(status);
-                iDTMFNotifier->SetDtmf(dtmfpckg);
-                }
             }
         delete tone;
         tone = NULL;
@@ -1032,14 +988,7 @@
             status = TMS_RESULT_SUCCESS;
             }
         }
-    if (iDTMFNotifier)
-        {
-        TmsMsgBufPckg dtmfpckg;
-        dtmfpckg().iStatus = status;
-        dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
-        iDTMFNotifier->SetDtmf(dtmfpckg);
-        }
-
+    NotifyDtmfClients(ECmdDTMFTonePlayFinished, status);
     aMessage.Complete(status);
     TRACE_PRN_FN_EXT;
     return status;
@@ -1073,14 +1022,14 @@
 //
 // -----------------------------------------------------------------------------
 //
-TInt TMSServer::NotifyDtmfClients(TmsMsgBufPckg dtmfpckg)
+TInt TMSServer::NotifyDtmfClients(gint aEventType, gint aError)
     {
     TRACE_PRN_FN_ENT;
     iSessionIter.SetToFirst();
     TMSServerSession* ss = static_cast<TMSServerSession*> (iSessionIter++);
     while (ss != NULL)
         {
-        ss->NotifyClient(dtmfpckg().iRequest, dtmfpckg().iStatus);
+        ss->NotifyClient(aEventType, aError);
         ss = static_cast<TMSServerSession*> (iSessionIter++);
         }
     TRACE_PRN_FN_EXT;
@@ -1093,10 +1042,13 @@
 //
 // -----------------------------------------------------------------------------
 //
-void TMSServer::DTMFInitCompleted(gint /*status*/)
+void TMSServer::DTMFInitCompleted(gint status)
     {
     TRACE_PRN_FN_ENT;
-    // TODO: process error
+    if (status != TMS_RESULT_SUCCESS)
+        {
+        NotifyDtmfClients(ECmdDTMFTonePlayFinished, status);
+        }
     TRACE_PRN_FN_EXT;
     }
 
@@ -1109,19 +1061,13 @@
     {
     TRACE_PRN_FN_ENT;
     TRACE_PRN_IF_ERR(status);
-    TmsMsgBufPckg dtmfpckg;
 
     // KErrUnderflow indicates end of DTMF playback.
     if (status == KErrUnderflow /*|| status == KErrInUse*/)
         {
         status = TMS_RESULT_SUCCESS;
         }
-    dtmfpckg().iStatus = TMSRESULT(status);
-    dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
-    if (iDTMFNotifier)
-        {
-        iDTMFNotifier->SetDtmf(dtmfpckg);
-        }
+    NotifyDtmfClients(ECmdDTMFTonePlayFinished, status);
     TRACE_PRN_FN_EXT;
     }
 
@@ -1165,8 +1111,7 @@
     {
     TRACE_PRN_FN_ENT;
     TRACE_PRN_IF_ERR(status);
-    TmsMsgBufPckg dtmfpckg;
-    dtmfpckg().iStatus = TMSUtility::EtelToTMSResult(status);
+    gint cmd = ECmdDTMFTonePlayFinished;
 
     switch (event)
         {
@@ -1174,7 +1119,7 @@
             break;
         case ECCPDtmfManualStart:           //DTMF sending started manually
         case ECCPDtmfSequenceStart:         //Automatic DTMF sending initialized
-            dtmfpckg().iRequest = ECmdDTMFToneUplPlayStarted;
+            cmd = ECmdDTMFToneUplPlayStarted;
             break;
         case ECCPDtmfManualStop:            //DTMF sending stopped manually
         case ECCPDtmfManualAbort:           //DTMF sending aborted manually
@@ -1182,16 +1127,11 @@
         case ECCPDtmfSequenceAbort:         //Automatic DTMF sending aborted
         case ECCPDtmfStopInDtmfString:      //There was stop mark in DTMF string
         case ECCPDtmfStringSendingCompleted://DTMF sending success
-            dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
-            break;
         default:
             break;
         }
 
-    if (iDTMFNotifier)
-        {
-        iDTMFNotifier->SetDtmf(dtmfpckg);
-        }
+    NotifyDtmfClients(cmd, status);
     TRACE_PRN_FN_EXT;
     }
 
@@ -1482,6 +1422,22 @@
     }
 
 // -----------------------------------------------------------------------------
+// TMSServer::HandleNotifyPSL
+//
+// -----------------------------------------------------------------------------
+//
+void TMSServer::HandleNotifyPSL(const TUid aUid, const TInt& aKey,
+            const TRequestStatus& aStatus)
+    {
+    TRACE_PRN_FN_ENT;
+    if(iEffectSettings)
+        {
+        iEffectSettings->ResetDefaultVolume();
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
 // TMSServer::RunServerL
 //
 // -----------------------------------------------------------------------------
--- a/mmserv/tms/tmsserver/src/tmsserversession.cpp	Fri Jul 09 16:43:35 2010 -0500
+++ b/mmserv/tms/tmsserver/src/tmsserversession.cpp	Fri Jul 23 17:29:03 2010 -0500
@@ -15,7 +15,6 @@
  *
  */
 
-#include <AudioPreference.h>
 #include "tmsutility.h"
 #include "tmsclientserver.h"
 #include "tmsshared.h"
@@ -231,14 +230,6 @@
             iServer.MuteRingTone();
             aMessage.Complete(TMS_RESULT_SUCCESS);
             break;
-        case ETMSStartDTMFNotifier:
-            iServer.StartDTMFNotifierL();
-            aMessage.Complete(TMS_RESULT_SUCCESS);
-            break;
-        case ETMSCancelDTMFNotifier:
-            iServer.CancelDTMFNotifier();
-            aMessage.Complete(TMS_RESULT_SUCCESS);
-            break;
         case ETMSInitDTMF:
             iServer.InitDTMF(aMessage);
             break;