Revision: 201011
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 16:18:45 +0300
changeset 13 cef4ff1e6c4f
parent 12 e978f818f9bd
child 14 af68f9c297e3
child 16 ef634fd8dac3
Revision: 201011 Kit: 201015
accessoryservices/accessorymonitor/tsrc/public/basic/accmonconnectionemulator/src/AccMonConnectionEmulator.cpp
accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/src/accMonitoringTestModuleCases.cpp
accessoryservices/accessorymonitor/tsrc/public/basic/stubs/AsyStub/src/AsyStubMainServiceBase.cpp
accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp
accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp
accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconcontrol.cpp
accessoryservices/accessoryremotecontrol/tsrc/stub/audio/src/audioclientstubAppUi.cpp
accessoryservices/accessoryremotecontrol/tsrc/stub/remcon/src/remconstub.cpp
accessoryservices/accessoryserver/BWINS/AccPolComU.DEF
accessoryservices/accessoryserver/EABI/AccPolComU.DEF
accessoryservices/accessoryserver/inc/Common/AccPolAccessoryPolicy.h
accessoryservices/accessoryserver/inc/Server/AccSrvConnectionController.h
accessoryservices/accessoryserver/inc/Server/AccSrvServerModel.h
accessoryservices/accessoryserver/inc/Server/AccSrvSettingsHandler.h
accessoryservices/accessoryserver/src/Policy/AccPolAccessoryPolicy.cpp
accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp
accessoryservices/accessoryserver/src/Server/AccSrvConnectionHandler.cpp
accessoryservices/accessoryserver/src/Server/AccSrvServerModel.cpp
accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp
accessoryservices/accessoryserver/src/Server/AccSrvWiredConnectionPublisher.cpp
accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/src/TfAccessoryTestControlPlugin.cpp
accessoryservices/accessoryserver/tsrc/public/basic/Stubs/AsyStub/src/AsyStubService.cpp
accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp
accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp
accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp
accessoryservices/headsetstatusapi/tsrc/public/basic/headsettestmodule/src/headsetTestModuleCases.cpp
accessoryservices/pluggeddisplay/pluggeddisplayengine/inc/tvoutconfigforhdmi.h
accessoryservices/pluggeddisplay/pluggeddisplayengine/src/compositecablestateconnected.cpp
accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp
accessoryservices/pluggeddisplay/pluggeddisplayengine/src/pdengine.cpp
accessoryservices/pluggeddisplay/pluggeddisplayengine/src/tvoutconfigforhdmi.cpp
accessoryservices/tspclientmapper/tsrc/public/basic/tspclienttestmodule/src/tspclientTestModuleCases.cpp
commonservices/PlatformEnv/platformver/tsrc/platformvertest/src/platformvertestcases.cpp
commonservices/PlatformEnv/sysversioninfo/tsrc/sysutiltests/src/sysutiltests.cpp
commonservices/PlatformEnv/tsrc/platformenvtest/src/PlatformEnvTestCases.cpp
commonservices/activitymanager/group/activitymanager.mrp
commonservices/commonengine/conf/commonengine.confml
commonservices/commonengine/conf/commonengine_1020503B.crml
commonservices/sysutil/group/sysutil.mrp
devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp
devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiocontrolbase.h
devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiounitbase.h
devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolterminalbase.h
devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectbase.h
devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectcon.h
devicesrv_plat/display_language_definition_api/inc/CommonEngineDomainCRKeys.h
devicesrv_plat/tv_out_config_api/inc/tvoutconfig.h
devicesrv_plat/tv_out_config_api/inc/tvoutconfigdef.h
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/data/20021204.rss
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/group/bld.inf
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/group/hwrmhapticsivtgetterplugin.mmp
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/basisivtgetters.h
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/hwrmhapticsivtgetter.h
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/ivtconstants.h
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/ivthelper.h
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/ivtinternal.h
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/timelineivtgetters.h
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/rom/hwrmhapticsivtgetterplugin.iby
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/basisivtgetters.cpp
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/hwrmhapticsivtgetter.cpp
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/ivthelper.cpp
hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/timelineivtgetters.cpp
hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/data/20021206.rss
hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/group/bld.inf
hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/group/hwrmhapticsvibepacketizerplugin.mmp
hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/inc/hwrmhapticsvibeconstants.h
hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/inc/hwrmhapticsvibepacketizer.h
hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/inc/hwrmhapticsvibepackets.h
hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/rom/hwrmhapticsvibepacketizerplugin.iby
hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/src/hwrmhapticsvibepacketizer.cpp
mediator/data/MediatorDebug.rss
mediator/inc/Client/MediatorCommandInitiatorBody.h
mediator/inc/Client/MediatorCommandResponderBody.h
mediator/inc/Client/MediatorEventConsumerBody.h
mediator/inc/Server/MediatorDebug.hrh
mediator/src/Client/MediatorCommandInitiatorBody.cpp
mediator/src/Client/MediatorCommandResponderBody.cpp
mediator/src/Client/MediatorEventConsumerBody.cpp
mediator/tsrc/public/basic/src/MediatorTestCases.cpp
resourceinterfaces/fmtransmittercontrol/group/telephony_hwrmfmtx.mrp
resourcemgmt/hwresourcesmgr/documentation/HWRM Central Repository keys.xls
resourcemgmt/hwresourcesmgr/group/telephony_hwrm.mrp
resourcemgmt/hwresourcesmgrconfig/telephony_hwrm-config.mrp
resourcemgmt/hwrmfmtxwatcherplugin/data/20012401.rss
resourcemgmt/hwrmtargetmodifierplugin/data/10281B9B.rss
resourcemgmt/powerandmemorynotificationservice/group/syslibs_pwrcli.mrp
sensorservices/orientationssy/src/SsyChannel.cpp
sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp
sysstatemgmt/inc/ssmcommonlocale.h
sysstatemgmt/inc/ssmlocalepskeys.h
sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist.rss
sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_ext.rss
sysstatemgmt/ssmcmdlists/data/securitycheckcmdlist.rss
sysstatemgmt/ssmcmdlists/data/uiservicescmdlist.rss
sysstatemgmt/ssmcmdlists/data/uiservicescmdlist_ext.rss
sysstatemgmt/ssmcmdlists/data/usbwatcher_hw.rss
sysstatemgmt/ssmcmdlists/group/ssmcmdlists.mmp
sysstatemgmt/ssmcmdlists/rom/ssmcmdlists.iby
sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp
sysstatemgmt/ssmmapperutility/inc/ssmmapperutility.h
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/bwins/ssmlocaleobserversupu.def
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/eabi/ssmlocaleobserversupu.def
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/group/ssmlocaleobserversup.mmp
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmcollationobserversup.h
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmlocaleobserversup.h
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmregionobserversup.h
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmuilanguageobserversup.h
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmcollationobserversup.cpp
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmlocaleobserversup.cpp
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmregionobserversup.cpp
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmuilanguageobserversup.cpp
sysstatemgmt/syslangutil/rom/syslangutil.iby
sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlangselcmd.h
sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlanguageloader.h
sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlangselcmd.cpp
sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlanguageloader.cpp
sysstatemgmt/systemstarter/documentation/9.5/SSA HowTo Diagrams.ppt
sysstatemgmt/systemstarter/group/app-framework_sysstart.mrp
sysstatemgmt/systemstarter/test/testappgood/testappgood_reg.rss
sysstatemgmt/systemstarter/test/tsysstart/inc/appfwk_sysstart_test_dll.rh
sysstatemgmt/systemstatemgr/cle/src/cmdlistexecutor.cpp
sysstatemgmt/systemstatemgr/cmd/src/ssmcommandfactory.cpp
sysstatemgmt/systemstatemgr/group/app-framework_ssma.mrp
sysstatemgmt/systemstatemgr/test/tcmd/resource/tcmd_cmdlist_swp_builtincmd.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmcletestapplication_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppanic_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppaniczero_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprvafterretry_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprverror_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappslow_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry_reg.rss
sysstatemgmt/systemstateplugins/group/app-framework_ssplugins.mrp
sysstatemgmt/systemstateplugins/test/testapps/src/gsatestappgood_reg.rss
sysstatemgmt/systemstateplugins/test/tunitconditionevaluator/resource/tunitconditionevaluator.rss
sysstatemgmt/systemstateplugins/test/tunitutilityplugin/src/tutilityplugin_step.cpp
sysstatemgmt/systemstatereferenceplugins/group/app-framework_ssrefplugins.mrp
systemhealthmanagement/systemhealthmgr/group/app-framework_shma.mrp
systemhealthmanagement/systemhealthmgr/test/testappgood/shmatestappgood_reg.rss
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/accmonconnectionemulator/src/AccMonConnectionEmulator.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/accmonconnectionemulator/src/AccMonConnectionEmulator.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -98,10 +98,10 @@
     TPckgBuf< TTFAccessoryPublishAndSubscribe > buf;
     
     // Reset the values and then order the connect
-    TTFASYReference method;
+    TTFASYReference method( ETFAsyNone );
     TInt64 param1( 0 );
     TBool wired( EFalse );
-    TUint64 btaddress;
+    TUint64 btaddress( 0 );
     RArray< TUint32 > capabilityArray;
     TUint8 deviceType;
     
@@ -192,7 +192,6 @@
         {
 #ifdef TEST_BT
         TBTDevAddr btaddr( btaddress );
-        TBool oldTest( EFalse );
         TRequestStatus status;
         RAccessoryServer server;
         server.Connect();
@@ -322,10 +321,10 @@
     TPckgBuf< TTFAccessoryPublishAndSubscribe > buf;
     
     // Reset the values and then order the connect
-    TTFASYReference method;
+    TTFASYReference method( ETFAsyNone );
     TInt64 param1( 0 );
     TBool wired( EFalse );
-    TUint64 btaddress;
+    TUint64 btaddress( 0 );
     RArray< TUint32 > capabilityArray;
     
     switch( aAccDefintion )
@@ -444,13 +443,11 @@
     
     if( aAccInfo->AccPhysicalConnection() == KAccMonWired )
         {
-        TInt err( KErrNone );
         TPckgBuf< TTFAccessoryPublishAndSubscribe > buf;
         
         // Reset the values and then order the connect
         TTFASYReference method;
         TInt64 param1( 0 );
-        TBool wired( EFalse );
         RArray< TUint32 > capabilityArray;
         
         method = ETFAsyDisc;
@@ -516,4 +513,5 @@
     return retval;
     }
   
-// End of file
\ No newline at end of file
+// End of file
+
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/src/accMonitoringTestModuleCases.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/src/accMonitoringTestModuleCases.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -37,9 +37,9 @@
 //extern ?external_function( ?arg_type,?arg_type );
 
 // CONSTANTS
-_LIT( KEnter, "Enter" );
-_LIT( KOnGoing, "On-going" );
-_LIT( KExit, "Exit" );
+//_LIT( KEnter, "Enter" );
+//_LIT( KOnGoing, "On-going" );
+//_LIT( KExit, "Exit" );
 
 // MACROS
 //#define ?macro ?macro_def
@@ -139,21 +139,21 @@
     static TCaseInfoInternal const KCases[] =
         {
         // To add new test cases, add new items to this array
-        ENTRY( "Get connected accessories (no accessories connected)", 	AccMonitorTestNoL ),
-        ENTRY( "Get connected accessories test(one accessory)", 	    AccMonitorTestOneL ),
-        ENTRY( "Get connected accessories test(multiple accessories)", 	AccMonitorTestMultiL ),
-        ENTRY( "Test has accessory capa", 								TestHasAccessoryCapaL ),
-        ENTRY( "Test has accessory different capas", 					TestHasAccessoryDifferentCapasL ),
-        ENTRY( "Start Observer test(all connections)",      			StartObservingL ),
-        ENTRY( "Start Observer test(defined type)",   					StartObserving1L ),
-        ENTRY( "Start Observer test(defined accessory)",   				StartObserving2L ),
-        ENTRY( "Start Observer test(wrong accessory)",   				StartObserving3L ),
-        ENTRY( "Start Observer test(monitor non-existing accessory)",   StartObserving4L ),
-        ENTRY( "StopObserving test",    								StopObservingL ),
-        ENTRY( "Compare Infos test",    								CompareInfosL ),
-        ENTRY( "Get value test",    									GetValueTestL ),
-        ENTRY( "Run error test",    									RunErrTestL ),
-        ENTRY( "Start observing all capas test",						StartObserverAllCapasL )        
+        ENTRY( "Get connected accessories (no accessories connected)", 	&CAccMonitoringTestModule::AccMonitorTestNoL ),
+        ENTRY( "Get connected accessories test(one accessory)", 	    &CAccMonitoringTestModule::AccMonitorTestOneL ),
+        ENTRY( "Get connected accessories test(multiple accessories)", 	&CAccMonitoringTestModule::AccMonitorTestMultiL ),
+        ENTRY( "Test has accessory capa", 								&CAccMonitoringTestModule::TestHasAccessoryCapaL ),
+        ENTRY( "Test has accessory different capas", 					&CAccMonitoringTestModule::TestHasAccessoryDifferentCapasL ),
+        ENTRY( "Start Observer test(all connections)",      			&CAccMonitoringTestModule::StartObservingL ),
+        ENTRY( "Start Observer test(defined type)",   					&CAccMonitoringTestModule::StartObserving1L ),
+        ENTRY( "Start Observer test(defined accessory)",   				&CAccMonitoringTestModule::StartObserving2L ),
+        ENTRY( "Start Observer test(wrong accessory)",   				&CAccMonitoringTestModule::StartObserving3L ),
+        ENTRY( "Start Observer test(monitor non-existing accessory)",   &CAccMonitoringTestModule::StartObserving4L ),
+        ENTRY( "StopObserving test",    								&CAccMonitoringTestModule::StopObservingL ),
+        ENTRY( "Compare Infos test",    								&CAccMonitoringTestModule::CompareInfosL ),
+        ENTRY( "Get value test",    									&CAccMonitoringTestModule::GetValueTestL ),
+        ENTRY( "Run error test",    									&CAccMonitoringTestModule::RunErrTestL ),
+        ENTRY( "Start observing all capas test",						&CAccMonitoringTestModule::StartObserverAllCapasL )        
         };
 
     // Verify that case number is valid
@@ -747,8 +747,7 @@
     TTestResult& aResult )
     {
     __UHEAP_MARK;
-    _LIT( KStatusTest, "StartObservingTest" );
-	
+    
 	iConnectedAccessory->Reset();
 	// Enter
     CAccMonitor* api = CAccMonitor::NewL();
@@ -963,7 +962,7 @@
     	}
     
     result = iConnectedAccessory->Exists( array );
-    if( ( err = KErrNone ) && result )
+    if( ( err == KErrNone ) && result )
     	{
     	_LIT( KDescription, "Observer set without errors");
     	aResult.SetResult( err, KDescription );
@@ -1014,7 +1013,6 @@
     TTestResult& aResult )
     {
     __UHEAP_MARK;
-    _LIT( KStatusTest, "StartObservingTest" );
     iConnectedAccessory->Reset();
     
     // Enter
@@ -1303,8 +1301,8 @@
     CleanupStack::Pop( api );
     delete api;
     someArray.Close();
-    __UHEAP_MARKEND;
-    return err;*/
+    __UHEAP_MARKEND;*/
+    return err;
     }
 
 TInt CAccMonitoringTestModule::ConnectBTHeadsetL( 
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/AsyStub/src/AsyStubMainServiceBase.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/AsyStub/src/AsyStubMainServiceBase.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -87,7 +87,6 @@
     {
     COMPONENT_TRACE( ( _L( "ASYStub - CASYStubMainServiceBase::GetAndRemoveCapability()" ) ) );
     return iService->GetAndRemoveCapability();
-    COMPONENT_TRACE( ( _L( "ASYStub - CASYStubMainServiceBase::GetAndRemoveCapability() - return" ) ) );
     }
 
 // End of file  
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -35,8 +35,6 @@
 // CONSTANTS
 
 const TUid KScreenOutputChannel = {0x00000666};
-_LIT(KAccFwUiNotifierResource, "accfwnoteuinotifier.rsc"); 
-
 
 // MACROS
 
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -38,8 +38,7 @@
 
 // CONSTANTS
 const TUid KScreenOutputChannel = {0x00000666};
-
-_LIT(KAccFwUiNotifierResource, "accfwnoteuinotifier.rsc");                             
+                      
 // MACROS
 
 // LOCAL CONSTANTS AND MACROS
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -70,8 +70,8 @@
 	TBool booli( EFalse );
 	booli = 1 & buf().iParam2;
 	
-	//iService->SetObserverSelection( some, booli/*buf().iParam1, buf().iParam2*/ //);
-/*	
+	iService->SetObserverSelection( some, boolibuf().iParam1, buf().iParam2);
+	
 	if( !IsActive() )
 		{
 		iStatus = KRequestPending;
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconcontrol.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconcontrol.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -472,6 +472,7 @@
         	break;                
 
         case ETFRemCon_LaunchAudioClient:
+            {
             // reset return channel
             TRemConClientKeyDataBuf keyDatabuf;     
             TRemConClientKeyData keyData;
@@ -495,6 +496,7 @@
                     retval = status.Int();
                     }
                 }
+            }
             break;
             
         case ETFRemCon_CloseAudioClient:
@@ -506,6 +508,7 @@
             break;
 
         case ETFRemCon_CheckClientKey:
+            {
             TRemConClientKeyDataBuf keyDataBuf;
             retval = RProperty::Get( KTFRemConTestProperty, KTFRemConClientKey, keyDataBuf );
             if ( retval == KErrNone )
@@ -521,6 +524,7 @@
                     }
                 
                 }
+            }
             break;
             
         default:
--- a/accessoryservices/accessoryremotecontrol/tsrc/stub/audio/src/audioclientstubAppUi.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audio/src/audioclientstubAppUi.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -31,7 +31,6 @@
 #include "audioclientstubAppView.h"
 #include "audioclientstubremconobserver.h"
 
-_LIT(KText, "Hello World!");
 
 // ============================ MEMBER FUNCTIONS ===============================
 
--- a/accessoryservices/accessoryremotecontrol/tsrc/stub/remcon/src/remconstub.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/remcon/src/remconstub.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -84,7 +84,6 @@
 	
 	COMPONENT_TRACE( ( _L( "REMCONSTUB - CRemConStub::ConstructL() - Enter" ) ) );
 	
-	TInt retval(KErrNone);
 	TRemConAddress addr;
 	addr.BearerUid() = Uid();	// implementation UID of this bearer 
 	Observer().ConnectIndicate(addr);
@@ -291,7 +290,7 @@
 			// This branch is used for following test cases
 						
 			TPhoneCmdHandlerKeyEventBuf cmdDataBuf;
-			cmdDataBuf().iOperationId = -1;
+			cmdDataBuf().iOperationId = (TUint)-1;
 			(void)iSubcribeToControl.Set(KTFPhoneCmdHandlerProperty, KTFPhoneCmdHandlerKey,cmdDataBuf);
 	    				
 			}
--- a/accessoryservices/accessoryserver/BWINS/AccPolComU.DEF	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/BWINS/AccPolComU.DEF	Fri Apr 16 16:18:45 2010 +0300
@@ -60,4 +60,5 @@
 	?ValueInt@CCapValue@@QBEHAAJ@Z @ 59 NONAME ; int CCapValue::ValueInt(long &) const
 	?CompareCriticalValuesL@CCapabilityStorage@@QAEHABVTAccPolGenericID@@@Z @ 60 NONAME ; int CCapabilityStorage::CompareCriticalValuesL(class TAccPolGenericID const &)
 	?GetGenericID@CCapabilityStorage@@QAEHAAVTAccPolGenericID@@@Z @ 61 NONAME ; int CCapabilityStorage::GetGenericID(class TAccPolGenericID &)
+	?IsCapabilityDefinedL@CAccPolAccessoryPolicy@@QAEHABVTAccPolGenericID@@ABK@Z @ 62 NONAME ; int CAccPolAccessoryPolicy::IsCapabilityDefinedL(class TAccPolGenericID const &, unsigned long const &)
 
--- a/accessoryservices/accessoryserver/EABI/AccPolComU.DEF	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/EABI/AccPolComU.DEF	Fri Apr 16 16:18:45 2010 +0300
@@ -69,5 +69,8 @@
 	_ZTV22CAccPolAccessoryPolicy @ 68 NONAME ; #<VT>#
 	_ZTV9CCapValue @ 69 NONAME ; #<VT>#
 	_ZTVN18CCapabilityStorage14CListContainerE @ 70 NONAME ; #<VT>#
-	
+	_ZN22CAccPolAccessoryPolicy20IsCapabilityDefinedLERK16TAccPolGenericIDRKm @ 71 NONAME
+	_ZN22CAccPolAccessoryPolicyD0Ev @ 72 NONAME
+	_ZN22CAccPolAccessoryPolicyD1Ev @ 73 NONAME
+	_ZN22CAccPolAccessoryPolicyD2Ev @ 74 NONAME
 
--- a/accessoryservices/accessoryserver/inc/Common/AccPolAccessoryPolicy.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/inc/Common/AccPolAccessoryPolicy.h	Fri Apr 16 16:18:45 2010 +0300
@@ -195,6 +195,17 @@
         * @see AccessoryTypes.h for supported HW device types.
         */        
         IMPORT_C TUint32 SupportedHWDevicesL();           
+        
+        /**
+        * Check to see if the requested capability is defined for the genericId
+        *
+        * @since S60 3.1
+        * @param aGenericID Generic ID of the list to be used
+        * @param aName Name of the capability
+        * @return True if the requested capability is defined for the genericId. Else False. 
+        */
+        IMPORT_C TBool IsCapabilityDefinedL(const TAccPolGenericID& aGenericId,
+                                            const TUint32& aName );
                          
     public: // Functions from base classes
         
--- a/accessoryservices/accessoryserver/inc/Server/AccSrvConnectionController.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/inc/Server/AccSrvConnectionController.h	Fri Apr 16 16:18:45 2010 +0300
@@ -298,7 +298,13 @@
 												TAccPolGenericID& aOldGenericId,
 												const CAccSrvConnectionHandler* aCaller, 
 												TInt aError  );
-        
+		
+
+		void HandleConnectionUpdateValidationL( const TAccPolGenericID& aGenericID, 
+                                                TAccPolGenericID& aOldGenericId,
+		                                        const CAccSrvSettingsHandler* aCaller, 
+		                                        TInt aError  );
+       
         
         /**
         * From MAccSrvConnectionControllerObserver
--- a/accessoryservices/accessoryserver/inc/Server/AccSrvServerModel.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/inc/Server/AccSrvServerModel.h	Fri Apr 16 16:18:45 2010 +0300
@@ -172,6 +172,17 @@
         void GetLastConnectedAccessoryL( TAccPolGenericID& aGenericID ) const;
 
         /**
+        * Get last connected wired accessory.
+        *
+        * @since S60 3.1
+        * @param aGenericID On succesful return, contains the Generic ID of
+        *                   last connected wired accessory.
+        * @return TBool     On successful return will be ETrue, else EFalse
+        */
+        TBool GetLastConnectedWiredAccessory( TAccPolGenericID& aGenericID ) const;
+        
+
+        /**
         * Remove the physical connection from array of detected accessories.
         *
         * @since S60 3.1
--- a/accessoryservices/accessoryserver/inc/Server/AccSrvSettingsHandler.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/inc/Server/AccSrvSettingsHandler.h	Fri Apr 16 16:18:45 2010 +0300
@@ -23,6 +23,7 @@
 #include <e32base.h>
 #include <AccModeSettingArray.h>
 #include "AccSrvServerModel.h"
+#include "AccPolAccessoryPolicy.h"
 
 // CONSTANTS
 _LIT_SECURITY_POLICY_C1(KNoCapability, ECapability_None);
@@ -60,7 +61,8 @@
         * Two-phased constructor.
         */
         static CAccSrvSettingsHandler* NewL( CAccSrvConnectionController* aConCtrl,
-                                             CAccSrvServerModel& aModel );
+                                             CAccSrvServerModel& aModel,
+                                             CAccPolAccessoryPolicy* aPolicy );
 
         /**
         * Destructor.
@@ -179,7 +181,8 @@
         * C++ default constructor.
         */
         CAccSrvSettingsHandler( CAccSrvConnectionController* aConCtrl,
-                                CAccSrvServerModel& aModel );
+                                CAccSrvServerModel& aModel,
+                                CAccPolAccessoryPolicy* aPolicy );
 
         /**
         * By default Symbian 2nd phase constructor is private.
@@ -253,6 +256,10 @@
         // Tells wheter lights set on or off by accessory server.
         TAccSettingsLights iLightsOn;
 
+        //Handle to the Accessory Policy
+        CAccPolAccessoryPolicy*         iPolicy;//Not owned
+
+
     public:     // Friend classes
 
     protected:  // Friend classes
--- a/accessoryservices/accessoryserver/src/Policy/AccPolAccessoryPolicy.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/src/Policy/AccPolAccessoryPolicy.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -80,7 +80,7 @@
     }
 
 // Destructor
-CAccPolAccessoryPolicy::~CAccPolAccessoryPolicy()
+EXPORT_C CAccPolAccessoryPolicy::~CAccPolAccessoryPolicy()
     {
     API_TRACE_( "[AccFW: ACCPOLICY] CAccPolAccessoryPolicy::~CAccPolAccessoryPolicy()" );
     
@@ -1234,4 +1234,13 @@
     return supportedDevices;
     }
 
+EXPORT_C TBool CAccPolAccessoryPolicy::IsCapabilityDefinedL(
+        const TAccPolGenericID& aGenericId,
+        const TUint32& aName )
+    {
+    if(iCapabilityStorage->GetCapability(aGenericId,aName) != NULL)
+        return ETrue;
+    else
+        return EFalse;
+    }
 //  End of File
--- a/accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -99,7 +99,7 @@
     iConnectionStatusHandler = CAccSrvConnectionStatusHandler::NewL( this );
     iModeHandler             = CAccSrvModeHandler::NewL( this );
     iASYProxyHandler         = CAccSrvASYProxyHandler::NewL( this );
-    iSettingsHandler         = CAccSrvSettingsHandler::NewL( this, *aServerModel );
+    iSettingsHandler         = CAccSrvSettingsHandler::NewL( this, *aServerModel, iPolicy );
     iWiredConnPublisher      = CAccSrvWiredConnectionPublisher::NewL();
     TRAPD( err, iChargingContextController = CAccSrvChargingContextController::NewL() );
     if ( err != KErrNone ) // Server does not need to die on charging context fail.
@@ -459,6 +459,95 @@
     }
 
 // -----------------------------------------------------------------------------
+// CAccSrvConnectionController::HandleConnectionUpdateValidationL
+// -----------------------------------------------------------------------------
+//
+void CAccSrvConnectionController::HandleConnectionUpdateValidationL( 
+    const TAccPolGenericID& aGenericID, 
+    TAccPolGenericID& aOldGenericId,
+    const CAccSrvSettingsHandler* aCaller,    
+    TInt aError )
+    {
+    COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::HandleConnectionUpdateValidationL()" );
+    
+    TInt err ( KErrNone );
+    TAccSrvConnection isValidConnection(EAccSrvConnect);
+    TBool isConnected( iServerModel->IsConnected( aGenericID ) );
+
+    if( KErrNone == aError )
+        {   
+        isValidConnection = iPolicy->IsValidConnectionL( aGenericID, err );
+        }
+    else
+        {
+        err = aError;
+        isValidConnection = EAccSrvDeny;
+        }
+
+    if( iServerModel->FindAndRemoveCancelledConnectAccessory( aGenericID.UniqueID() ) )
+        {
+        //Connection of this accessory is cancelled.
+        err = KErrCancel;
+        isValidConnection = EAccSrvDeny;
+        }
+    
+    switch( isValidConnection )
+        {
+        case EAccSrvDetect:
+            {
+            }
+            break;
+
+        case EAccSrvConnect:
+            {
+            if( isConnected )
+                {
+                //update connection generic id array
+                iServerModel->UpdateConnectionL( aGenericID);
+                
+                // Complete all possible connection status related requests
+                iNotificationQueue->CompleteControlMessageL( EAccessoryConnectionStatusChanged,
+                                                             KErrNone,
+                                                             aGenericID.UniqueID() );
+                iNotificationQueue->CompleteControlMessageL( EAccessoryDisconnected,
+                                                             KErrNone,
+                                                             aOldGenericId.UniqueID() );
+                iNotificationQueue->CompleteControlMessageL( ENewAccessoryConnected,
+                                                             KErrNone,
+                                                             aGenericID.UniqueID() );
+                }
+
+            }
+            break;
+
+        case EAccSrvDeny:
+            {
+            iServerModel->RemovePhysicalConnection( aGenericID );
+            iServerModel->RemoveASYThreadID( aGenericID.UniqueID() );//Remove ThreadID GID mapping
+            iServerModel->CapabilityStorage().RemoveCapabilityList( aGenericID);
+            
+         
+            }
+            break;
+
+        default:
+            {
+            TRACE_ASSERT_ALWAYS;//unhandled enum
+            }
+            break;
+        }
+
+    iNotificationQueue->CompleteControlMessageL( EConnectAccessory,
+                                                 err,
+                                                 aGenericID.UniqueID() );
+    
+
+    COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::HandleConnectionUpdateValidationL - return void" );
+    }
+
+
+
+// -----------------------------------------------------------------------------
 // CAccSrvConnectionController::ConnectionHandlingCancel
 // -----------------------------------------------------------------------------
 //
--- a/accessoryservices/accessoryserver/src/Server/AccSrvConnectionHandler.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvConnectionHandler.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -246,95 +246,82 @@
     if ( aEvaluateConnectionRules )
         {
   		COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling() - Evaluate connection rules" );
- 
-    	//check rules
-    	TUint32 selectionListBitmask( 0 );	
-    	iPolicy->EvaluateConnectionRulesL( iGenericID, selectionListBitmask );
-    	
-    	if ( selectionListBitmask )
-    	    {
-	  		COM_TRACE_1( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling() - Selection bitmask: 0x%bb", selectionListBitmask);
-    		
-    		//remove not supported items...
-    		selectionListBitmask = selectionListBitmask & iModel->SupportedDevicesL();
-    			
-    		//Check default selection
-    		TInt defaultSelection( iModel->DeviceType() );
-    		
-    		if ( selectionListBitmask == ( KASTTY | KASHeadset ) )
-    		    {
-    			if ( defaultSelection != KASTTY )
-    			    {
-    				defaultSelection = KASHeadset;
-    			    }
-    			else
-    			    {
-    				defaultSelection = KASTTY;
-    			    }
-    		    }
-    		else
-    		    {
-    			if ( defaultSelection == KASHeadset )
-    			    {
-    				defaultSelection = 0;
-    			    }
-    			
-    			defaultSelection = selectionListBitmask & defaultSelection;	
-    		    }
-    		
-    		if ( defaultSelection )
-    		    {
-    			iReplyValue = defaultSelection;
-    			iCallback->SetDefaultAccessoryInformation( iGenericID, defaultSelection );
-    			CAccSrvHandlerBase::IssueRequest();
-    		    }
-    		else
-    		    {
-    			//check that more than one accessories in the selection list
-    			TUint32 bitmask( 1 );
-    			TInt accCount( 0 ); 
-    			for ( TInt i( 0 ); i < 32; i++  )
-    			    {
-    				if ( selectionListBitmask & bitmask )
-    				    {
-    					if ( ++accCount > 1 )
-    					    {
-    						//more than one accessories, stop the loop
-    						break;
-    					    }
-    				    }
-    				bitmask <<= 1;
-    			    }
-    		
-    			if ( accCount > 1 )
-    			    {
-	    			//if there is possible selection show UI
-		    		SetupSelectionDialogL( selectionListBitmask );    			
-    			    }
-    			else
-    			    {
-    				//only one selection, don't show selection dialog
-    				iState = EGetSelectionFromUser;	
-    				iReplyValue = selectionListBitmask;
-    				iCallback->SetDefaultAccessoryInformation( iGenericID, selectionListBitmask );
-    				CAccSrvHandlerBase::IssueRequest();
-    			    }
-    		    }
-    		
-    	    }
-    	else
-    	    {
-    		iState = EInitializeConnection;	
-        	}
-    	
+
         }
     else
         {
   		COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling() - No connection rules" );
-    	iState = EInitializeConnection;
+  		
+        //Check default selection
+        TInt defaultSelection( iModel->DeviceType() );
+        
+        // Device Type Supplied
+        if( (iGenericID.PhysicalConnectionCaps() & KPCWired) && 
+            (iGenericID.DeviceTypeCaps(KDTHeadset)) && 
+            (iPolicy->IsCapabilityDefinedL(iGenericID,KAccIntegratedAudioInput)) )		
+            {
+            // This is a Headset
+            if(KASTTY == defaultSelection)
+                {
+                iReplyValue = defaultSelection;
+                }
+            else
+                {
+                iReplyValue = KASHeadset;
+                }
+            
+            if(KASHeadset != iReplyValue)
+                {
+                COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling- TTY Case" );
+                //only one selection, don't show selection dialog
+                iState = EGetSelectionFromUser; 
+                iCallback->SetDefaultAccessoryInformation( iGenericID, iReplyValue );
+                CAccSrvHandlerBase::IssueRequest();
+                }
+            else
+                {
+                COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling- Headset Case" );
+                iState = EInitializeConnection;    
+                }
+            }
+        else if( (iGenericID.PhysicalConnectionCaps() & KPCWired) && 
+                 (iGenericID.DeviceTypeCaps(KDTHeadset)) && 
+                 !(iPolicy->IsCapabilityDefinedL(iGenericID,KAccIntegratedAudioInput)) )                    
+            {
+            // This is a Headphone
+            if((KASLineOut == defaultSelection) || 
+               (KASMusicStand == defaultSelection) ||
+               (KASHeadphones == defaultSelection))
+                {
+                iReplyValue = defaultSelection;
+                }
+            else
+                {
+                iReplyValue = KASHeadphones;                
+                }
+            
+            if(KASHeadphones != iReplyValue)
+                {
+                COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling- LineOut/MusicStand Case" );
+                //only one selection, don't show selection dialog
+                iState = EGetSelectionFromUser; 
+                iCallback->SetDefaultAccessoryInformation( iGenericID, iReplyValue );
+                CAccSrvHandlerBase::IssueRequest();
+                
+                }
+            else
+                {
+                COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling- Headphone Case" );
+                iState = EInitializeConnection;
+                }
+            }
+
+        else
+            {
+            iState = EInitializeConnection;
+            }
         }
 
-
     // Atleas one Asynchronous request is made for ourselves,
     // clients ConnectAccessory asynchronous request will be completed
     // during it.
--- a/accessoryservices/accessoryserver/src/Server/AccSrvServerModel.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvServerModel.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -501,6 +501,43 @@
 
     COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::GetLastConnectedAccessoryL - return" );
     }
+	
+// -----------------------------------------------------------------------------
+// CAccSrvServerModel::GetLastConnectedWiredAccessory
+//
+// Last connected wired accessory is to be searched in the iConnectionArray 
+// -----------------------------------------------------------------------------
+//
+TBool CAccSrvServerModel::GetLastConnectedWiredAccessory( TAccPolGenericID& aGenericID ) const
+    {
+    COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::GetLastConnectedWiredAccessoryL()" );
+    
+    TInt arrCount = 0;
+    
+    if ( (arrCount = iConnectionArray.Count()) != 0 )
+        {
+        TUint arrIndex = 0;
+        TAccPolGenericID iGenericID;
+        
+        while(arrIndex < arrCount)
+            {
+            iGenericID = iConnectionArray[arrIndex];
+            
+            if( iGenericID.PhysicalConnectionCaps(KPCWired) )
+                {
+                aGenericID = iGenericID;
+                return ETrue;
+                }
+            arrIndex++;
+            }        
+        }
+        
+    COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::GetLastConnectedWiredAccessory - return" );
+    
+    return EFalse;
+    
+    }
+
 
 // -----------------------------------------------------------------------------
 // CAccSrvServerModel::SetAccessoryMode
--- a/accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -73,10 +73,12 @@
 // -----------------------------------------------------------------------------
 //
 CAccSrvSettingsHandler::CAccSrvSettingsHandler( CAccSrvConnectionController* aConCtrl,
-                                                CAccSrvServerModel& aModel )
+                                                CAccSrvServerModel& aModel,
+                                                CAccPolAccessoryPolicy* aPolicy )
     : iConCtrl( aConCtrl ),
       iModel( aModel ),
-      iLightsOn( EAccSettingsLightsNotSet )
+      iLightsOn( EAccSettingsLightsNotSet ),
+      iPolicy( aPolicy )
     {
     COM_TRACE_( "[AccFW:AccServer] CAccSrvSettingsHandler::CAccSrvSettingsHandler()" );
 
@@ -122,13 +124,15 @@
 //
 CAccSrvSettingsHandler* CAccSrvSettingsHandler::NewL(
                                            CAccSrvConnectionController* aConCtrl,
-                                           CAccSrvServerModel& aModel )
+                                           CAccSrvServerModel& aModel,
+                                           CAccPolAccessoryPolicy* aPolicy )
     {
     COM_TRACE_( "[AccFW:AccServer] CAccSrvSettingsHandler::NewL()" );
 
     CAccSrvSettingsHandler* self = new( ELeave ) CAccSrvSettingsHandler(
                                                     aConCtrl,
-                                                    aModel );
+                                                    aModel,
+                                                    aPolicy );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -285,7 +289,8 @@
 
     // Valid settings
     TUint32 settings = ResolveNewSettingsL( aSettings, aEnable, aForce );
-
+    TUint32 iOldDeviceType = iModel.DeviceType();
+    
     // Update model
     iModel.SetDeviceType( settings );
 
@@ -296,6 +301,99 @@
     delete repository;
     repository = NULL;
 
+        //Check default selection. The newly set device-type after the model update.
+        TInt defaultSelection( iModel.DeviceType() );
+        TInt iReplyValue = KASNoDevice;
+        TAccPolGenericID iGenericID;
+       
+        // get the last connected wired accessory
+        if(iModel.GetLastConnectedWiredAccessory(iGenericID))
+            {
+            // Device Type Supplied
+            if( iGenericID.DeviceTypeCaps(KDTHeadset) )
+                {       
+                // This is a Headset
+                if( iPolicy->IsCapabilityDefinedL(iGenericID, KAccIntegratedAudioInput) ) 
+                    {
+                    if(KASTTY == defaultSelection)
+                        {
+                        iReplyValue = defaultSelection;
+                        }
+                    else
+                        {
+                        iReplyValue = KASHeadset;
+                        }             
+                    }
+                // This is a Headphone
+                else 
+                    {
+                    if(KASMusicStand == defaultSelection) 
+                        {
+                        iReplyValue = defaultSelection;
+                        }
+                    else
+                        {
+                        iReplyValue = KASHeadphones;
+                        }
+                    }
+                }
+            else if( iGenericID.DeviceTypeCaps(KDTTTY) )
+                {
+                if( iPolicy->IsCapabilityDefinedL(iGenericID, KAccIntegratedAudioInput) )
+                    {
+                    if(KASHeadset == defaultSelection)
+                        {
+                        iReplyValue = defaultSelection;
+                        }
+                    else
+                        {
+                        iReplyValue = KASTTY;
+                        }
+                    }
+                }
+            else if( iGenericID.DeviceTypeCaps(KDTOffice) )
+                {
+                if(KASHeadphones == defaultSelection)
+                    {
+                    iReplyValue = defaultSelection;
+                    }
+                else
+                    {
+                    iReplyValue = KASMusicStand;
+                    }
+                }
+            // Device Type Not Supplied
+            else if( iGenericID.DeviceTypeCaps() == KASNoDevice )
+                {
+                iReplyValue = defaultSelection;
+                }
+
+            if( (KASNoDevice != iReplyValue) && (iReplyValue != iOldDeviceType) )
+                {
+                //update generic id
+                iPolicy->UpdateGenericIDL( iGenericID, iReplyValue);
+                // Update the "iConnectionArray" of CAccSrvServerModel, 
+                // to reflect the update on generic-id done earlier.
+                TAccPolGenericID oldGenericId; 
+                iModel.FindWithUniqueIDL( iGenericID.UniqueID(), oldGenericId );
+                
+                iConCtrl->HandleConnectionUpdateValidationL( 
+                            iGenericID, oldGenericId, this, KErrNone );
+        
+                TASYCommandParamRecord asyCommandParamRecord;
+                asyCommandParamRecord.iCmdValue   = 0;//Not used in update command
+                asyCommandParamRecord.iGenericID  = iGenericID;     
+
+                //Send request to ASY Proxy Handler
+                COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::RunL() - Send update request");
+                TInt trId = iConCtrl->HandleASYCommsL( ECmdAccessoryUpdated,
+                                                    asyCommandParamRecord );
+                
+                iConCtrl->HandleAccessoryModeChangedL();
+          
+                }            
+            }
+       
     COM_TRACE_( "[AccFW:AccServer] CAccSrvSettingsHandler::SetHWDeviceSettingsL() - return" );
     }
 
--- a/accessoryservices/accessoryserver/src/Server/AccSrvWiredConnectionPublisher.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvWiredConnectionPublisher.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -78,7 +78,7 @@
     COM_TRACE_2( "[AccFW:AccServer] CAccSrvWiredConnectionPublisher::HandleConnectL: physConnCaps=0x%x, iConnectionCount=%d", 
                         physConnCaps, iConnectionCount );
     
-    if ( physConnCaps & KPCWired )
+    if ( physConnCaps & (KPCWired | KPCHDMI) )
         {
         if ( !iConnectionCount++ )
             {
@@ -102,7 +102,7 @@
     COM_TRACE_2( "[AccFW:AccServer] CAccSrvWiredConnectionPublisher::HandleDisconnectL: physConnCaps=0x%x, iConnectionCount=%d", 
                         physConnCaps, iConnectionCount );
     
-    if ( (physConnCaps & KPCWired) && iConnectionCount )
+    if ( (physConnCaps & (KPCWired | KPCHDMI)) && iConnectionCount )
         {
         if ( !(--iConnectionCount) )
             {
--- a/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/src/TfAccessoryTestControlPlugin.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/src/TfAccessoryTestControlPlugin.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -1545,6 +1545,7 @@
     { ETFAccessoryConnection_Close,                       0, 0,              0, 0, 0, 10807, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
     };
 
+#if 0
 //
 // [M10808] [[AccServer] Set TTY Mode After Connection]
 //
@@ -1568,8 +1569,94 @@
     { ETFAccessorySettings_Close,                         0, 0,              0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
     { ETFAccessoryConnection_Close,                       0, 0,              0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
     };
+#endif	
 
 //
+// [M10808] [[AccServer] Set TTY Mode After Connection]
+//
+const TTFAccessoryTestCaseStateControl KTFSetTTYModeAfterConnectionStates[]=
+    {
+    { ETFAccessoryConnection_Open,                        0, 0,              0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryMode_Open,                              0, 0,              0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessorySettings_Open,                          0, 0,              0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFSetHWDeviceSettings,                             0, KASNoDevice,    1, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 100000},
+    { ETFAccessoryNotifyAccessoryModeChanged,             0, 2,              0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 2000000},
+    { ETFConnectWiredAccessory,                           0, 0,              1, 0, 0, 10808, ETFAsyConnectHeadset, ReqAccRequestNone,               KErrNone, 2000000}, 
+    { ETFFindAndCheckRequest,                             0, 1,              0, 0, 0, 10808, ETFAsyNone, ReqNotifyAccessoryModeChanged,             KErrNone, 2000000}, // Headset Connected !
+    { ETFSetHWDeviceSettings,                             0, KASTTY,         1, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 3000000},
+    { ETFSetHWDeviceSettings,                             0, KASTTY,         0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFDisconnectWiredAccessory,                        0, 0,              0, 0, 0, 10808, ETFAsyDisc, ReqAccRequestNone,                         KErrNone, 2000000},
+    { ETFClearStack,                                      0, 0,              0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryMode_Close,                             0, 0,              0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessorySettings_Close,                         0, 0,              0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryConnection_Close,                       0, 0,              0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    };
+
+//
+// [M10809] [[AccServer] Set MusicStand Mode After Connection]
+//
+const TTFAccessoryTestCaseStateControl KTFSetLoopsetModeBeforeConnectionStates[]=
+    {    
+    { ETFAccessoryConnection_Open,                        0, 0,              0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryMode_Open,                              0, 0,              0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessorySettings_Open,                          0, 0,              0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFSetHWDeviceSettings,                             0, KASNoDevice,    1, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 100000},
+    { ETFAccessoryNotifyAccessoryModeChanged,             0, 2,              0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 2000000},
+    { ETFConnectWiredAccessory,                           0, 0,              1, 0, 0, 10809, ETFAsyConnectOpenCable3Poles, ReqAccRequestNone,       KErrNone, 1000000},
+    { ETFFindAndCheckRequest,                             0, 9,              0, 0, 0, 10809, ETFAsyNone, ReqNotifyAccessoryModeChanged,             KErrNone, 2000000}, // Headphone Connected !
+    { ETFSetHWDeviceSettings,                             0, KASMusicStand,  1, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 3000000},
+    { ETFSetHWDeviceSettings,                             0, KASMusicStand,  0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFDisconnectWiredAccessory,                        0, 0,              0, 0, 0, 10809, ETFAsyDisc, ReqAccRequestNone,                         KErrNone, 2000000},
+    { ETFClearStack,                                      0, 0,              0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryMode_Close,                             0, 0,              0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessorySettings_Close,                         0, 0,              0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryConnection_Close,                       0, 0,              0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    };
+    
+//
+// [M10810] [[AccServer] Default Accessory Set To MusicStand; Connect Headphone; Change accessory settings to Headphones]
+//
+const TTFAccessoryTestCaseStateControl KTFSetTTYModeBeforeConnectionStates[]=
+    {
+    { ETFAccessoryConnection_Open,                        0, 0,              0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryMode_Open,                              0, 0,              0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessorySettings_Open,                          0, 0,              0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFSetHWDeviceSettings,                             0, KASMusicStand,  1, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 100000},
+    { ETFAccessoryNotifyAccessoryModeChanged,             0, 2,              0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 2000000},
+    { ETFConnectWiredAccessory,                           0, 0,              1, 0, 0, 10810, ETFAsyConnectOpenCable3Poles, ReqAccRequestNone,       KErrNone, 1000000},
+    { ETFFindAndCheckRequest,                             0, 7,              0, 0, 0, 10810, ETFAsyNone, ReqNotifyAccessoryModeChanged,             KErrNone, 2000000}, // MusicStand Connected !
+    { ETFSetHWDeviceSettings,                             0, KASHeadphones,  1, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 3000000},
+    { ETFSetHWDeviceSettings,                             0, KASMusicStand,  0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFDisconnectWiredAccessory,                        0, 0,              0, 0, 0, 10810, ETFAsyDisc, ReqAccRequestNone,                         KErrNone, 2000000},
+    { ETFClearStack,                                      0, 0,              0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryMode_Close,                             0, 0,              0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessorySettings_Close,                         0, 0,              0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryConnection_Close,                       0, 0,              0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    };
+
+//
+// [M10811] [[AccServer] Default Accessory Set To TTY; Connect Headset; Change accessory settings to Headset]
+//
+const TTFAccessoryTestCaseStateControl KTFGetSupportedHWDevicesStates[]=
+    {
+    { ETFAccessoryConnection_Open,                        0, 0,              0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryMode_Open,                              0, 0,              0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessorySettings_Open,                          0, 0,              0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFSetHWDeviceSettings,                             0, KASTTY,         1, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 100000},
+    { ETFAccessoryNotifyAccessoryModeChanged,             0, 2,              0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 2000000},
+    { ETFConnectWiredAccessory,                           0, 0,              1, 0, 0, 10811, ETFAsyConnectHeadset, ReqAccRequestNone,               KErrNone, 2000000},
+    { ETFFindAndCheckRequest,                             0, 5,              0, 0, 0, 10811, ETFAsyNone, ReqNotifyAccessoryModeChanged,             KErrNone, 2000000}, // Headset identified as TTY!
+    { ETFSetHWDeviceSettings,                             0, KASHeadset,     1, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 3000000},
+    { ETFSetHWDeviceSettings,                             0, KASTTY,         0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFDisconnectWiredAccessory,                        0, 0,              0, 0, 0, 10811, ETFAsyDisc, ReqAccRequestNone,                         KErrNone, 2000000},
+    { ETFClearStack,                                      0, 0,              0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryMode_Close,                             0, 0,              0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessorySettings_Close,                         0, 0,              0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    { ETFAccessoryConnection_Close,                       0, 0,              0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
+    };
+
+#if 0
+//
 // [M10809] [[AccServer] Set Loopset Mode Before Connection]
 //
 const TTFAccessoryTestCaseStateControl KTFSetLoopsetModeBeforeConnectionStates[15]=
@@ -1623,6 +1710,7 @@
     { ETFAccessorySettings_Close,      0, 0,      0,          0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
     };
 
+#endif
 //
 // [M10812] [[AccServer] Accessory Mode Settings (TInt)]
 //
@@ -2218,11 +2306,11 @@
 //
 // [M11102] [[AccServer] Cancel connect Accessory]
 //
-const TTFAccessoryTestCaseStateControl KTFCallTClassMethods[1]=
+/*const TTFAccessoryTestCaseStateControl KTFCallTClassMethods[1]=
     {
     { ETFCallTClassMethods, 0, 0, 0, 0, 0, 11102, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
     };
-
+*/
 /************************                                            ****************************/
 /************************  CAccPolObjectBase related testcases (USB) ****************************/
 /************************                                            ****************************/
@@ -2891,6 +2979,10 @@
     TF_ADD_TEST_CASE_L( 10804, _L( "[M10804] [[AccServer] Set TTY Mode] ") );
     TF_ADD_TEST_CASE_L( 10805, _L( "[M10805] [[AccServer] Get TTY Mode] ") );
     TF_ADD_TEST_CASE_L( 10806, _L( "[M10806] [[AccServer] Set And Get TTY Mode] ") );
+    TF_ADD_TEST_CASE_L( 10808, _L( "[M10808] [[AccServer] Set TTY Mode After Connection] ") );
+    TF_ADD_TEST_CASE_L( 10809, _L( "[M10809] [[AccServer] Set MusicStand Mode After Connection] ") );
+    TF_ADD_TEST_CASE_L( 10810, _L( "[M10810] [[AccServer] Default Accessory Set To MusicStand; Connect Headphone; Change accessory settings to Headphones] ") );    
+    TF_ADD_TEST_CASE_L( 10811, _L( "[M10811] [[AccServer] Default Accessory Set To TTY; Connect Headset; Change accessory settings to Headset] ") );
     TF_ADD_TEST_CASE_L( 10812, _L( "[M10812] [[AccServer] Accessory Mode Settings (TInt)] ") );
     TF_ADD_TEST_CASE_L( 10813, _L( "[M10813] [[AccServer] Accessory Mode Settings (TBool)] ") );
     TF_ADD_TEST_CASE_L( 10814, _L( "[M10814] [[AccServer] Accessory Mode Settings (TDes)] ") );
@@ -2924,9 +3016,9 @@
 
     TF_ADD_TEST_CASE_L( 11001, _L( "[M11001] [[AccServer] Selection dialog test] "));
     TF_ADD_TEST_CASE_L( 11002, _L( "[M11002] [[AccServer] Selection dialog open/cancel] "));
-    TF_ADD_TEST_CASE_L( 11003, _L( "[M11003] [[AccServer] Connect open cable, user select tv-out]"));
+    //TF_ADD_TEST_CASE_L( 11003, _L( "[M11003] [[AccServer] Connect open cable, user select tv-out]"));
     TF_ADD_TEST_CASE_L( 11004, _L( "[M11004] [[AccServer] Connect open cable, ASY selects tv-out]"));
-    TF_ADD_TEST_CASE_L( 11005, _L( "[M11005] [[AccServer] Connect open cable, User selection device, after that ASY selects tv-out]"));
+    //TF_ADD_TEST_CASE_L( 11005, _L( "[M11005] [[AccServer] Connect open cable, User selection device, after that ASY selects tv-out]"));
     TF_ADD_TEST_CASE_L( 11006, _L( "[M11006] [[AccServer] Connect open cable, open selection dialog, disconnect]"));
     TF_ADD_TEST_CASE_L( 11007, _L( "[M11007] [[AccServer] Connect open cable, connect headset, user select headset]"));
     TF_ADD_TEST_CASE_L( 11008, _L( "[M11008] [[AccServer] Connect ECI accessory]"));
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/AsyStub/src/AsyStubService.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/AsyStub/src/AsyStubService.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -123,6 +123,10 @@
             break;
 
         case ETFAsyConnOpenCable:
+            {            
+            }
+            break;
+//        case ETFAsyConnOpenCable:
         case ETFAsyConnectOpenCable3Poles:
             {
             TRequestStatus status;
@@ -140,7 +144,7 @@
             TBuf<KHWModelIDMaxLength> HWModelID( _L("opencable"));
 
             //Set GenericID header
-            iGenericIDHeader.iAccessoryDeviceType = KDTAVDevice;
+            iGenericIDHeader.iAccessoryDeviceType = KDTHeadset;
             iGenericIDHeader.iPhysicalConnection = KPCWired;
             iGenericIDHeader.iApplicationProtocol = 0x0;
 
@@ -170,7 +174,7 @@
                 nameValueArray );
             nameValueArray.Close();
 
-            iAccessoryControl.ConnectAccessory( status, genericID, ETrue );
+            iAccessoryControl.ConnectAccessory( status, genericID, EFalse );
             User::WaitForRequest( status );
             TInt retval = status.Int();
 
@@ -311,7 +315,7 @@
                 nameValueArray );
             nameValueArray.Close();
 
-            iAccessoryControl.ConnectAccessory( status, genericID, ETrue );
+            iAccessoryControl.ConnectAccessory( status, genericID, EFalse );
             User::WaitForRequest( status );
             TInt retval = status.Int();
 
@@ -377,7 +381,7 @@
                 nameValueArray );
             nameValueArray.Close();
 
-            iAccessoryControl.ConnectAccessory( status, genericID, ETrue );
+            iAccessoryControl.ConnectAccessory( status, genericID, EFalse );
             User::WaitForRequest( status );
             TInt retval = status.Int();
 
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -35,7 +35,6 @@
 // CONSTANTS
 
 const TUid KScreenOutputChannel = {0x00000666};
-_LIT(KAccFwUiNotifierResource, "accfwnoteuinotifier.rsc"); 
 
 
 // MACROS
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -38,8 +38,7 @@
 
 // CONSTANTS
 const TUid KScreenOutputChannel = {0x00000666};
-
-_LIT(KAccFwUiNotifierResource, "accfwnoteuinotifier.rsc");                             
+                            
 // MACROS
 
 // LOCAL CONSTANTS AND MACROS
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -70,8 +70,8 @@
 	TBool booli( EFalse );
 	booli = 1 & buf().iParam2;
 	
-	//iService->SetObserverSelection( some, booli/*buf().iParam1, buf().iParam2*/ //);
-/*	
+	iService->SetObserverSelection( some, boolibuf().iParam1, buf().iParam2);
+	
 	if( !IsActive() )
 		{
 		iStatus = KRequestPending;
--- a/accessoryservices/headsetstatusapi/tsrc/public/basic/headsettestmodule/src/headsetTestModuleCases.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/headsetstatusapi/tsrc/public/basic/headsettestmodule/src/headsetTestModuleCases.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -131,14 +131,14 @@
     static TCaseInfoInternal const KCases[] =
         {
         // To add new test cases, add new items to this array
-        ENTRY( "HeadsetStatus test", HeadsetStatusTestL ),
+        ENTRY( "HeadsetStatus test", &CheadsetTestModule::HeadsetStatusTestL ),
         // Example how to use OOM functionality
         //OOM_ENTRY( "Loop test with OOM", LoopTest, ETrue, 2, 3),
         //OOM_FUNCENTRY( PrintTest, ETrue, 1, 3 ),
         
-        ENTRY( "SetObserver test",      SetObserverL ),
-        ENTRY( "StartObserving test",   StartObservingL ),
-        ENTRY( "StopObserving test",    StopObservingL )
+        ENTRY( "SetObserver test",      &CheadsetTestModule::SetObserverL ),
+        ENTRY( "StartObserving test",   &CheadsetTestModule::StartObservingL ),
+        ENTRY( "StopObserving test",    &CheadsetTestModule::StopObservingL )
         };
 
     // Verify that case number is valid
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/inc/tvoutconfigforhdmi.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/inc/tvoutconfigforhdmi.h	Fri Apr 16 16:18:45 2010 +0300
@@ -23,7 +23,7 @@
 #include <e32base.h>
 #include "multifinitestatemachine.h"
 #include "myasynconeshottimercallback.h"
-
+#include "pdengine.h"
 
 
 // CONSTANTS
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/compositecablestateconnected.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/compositecablestateconnected.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -359,7 +359,12 @@
         if ( EPDEIfCentralRepositoryWatchEventKeyChanged == aEvent )
             {
             INFO( "Event: EPDEIfCentralRepositoryWatchEventKeyChanged" );
-            iResettingInput = ETrue;
+            iCRWatchForFlickerFilter->Cancel();
+            iCRWatchForAspectRatio->Cancel();
+            iCRWatchForTvSystem->Cancel();
+            ClearAvailableTvOutConfig();
+            iTVOutConfigForComposite.Disable();
+			iResettingInput = ETrue;
             Enter();
             }
         else
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -1367,7 +1367,7 @@
 		{
 		TInt availableIndex = 0;
 		TBool found( EFalse );
-		TBool defaultCEAmode( EFalse );
+		TBool defaultCEAmode( EFalse ), ceaMode( EFalse );
 		supportedCount = supportedModes.Count();
 		INFO_1( "HDMI CONFIGS --- From HW -- Total : %d", supportedCount );
 
@@ -1383,6 +1383,7 @@
 					(TSupportedHdmiDviMode::ECea == supportedModes[ supportedIndex ].iStandardModeType) &&
 					(aHdmiConfigs[ availableIndex ].iCeaMode == supportedModes[ supportedIndex ].iStandardMode) )
 					{
+					ceaMode = ETrue;
 					found = ETrue;
 					if( aHdmiConfigs[ availableIndex].iCeaMode == KDefaultCEAMode )
 					    {
@@ -1441,15 +1442,20 @@
 		    {
 				TInt modecount = aHdmiConfigs.Count();
 				
-				INFO( "<<<<<<<<<<<<<<It is DVI connector>>>>>>>>>>>>>>" );
 				while( modecount-- )
 				  {
-					// Change it to DVI mode as it is existing in both Supported and available configurations
-					aHdmiConfigs[ modecount ].iConnector = TTvSettings::EDVI;
+
+				    if( aHdmiConfigs[ modecount ].iDmtMode && (EFalse == ceaMode) )
+				    	{
+						INFO( "<<<<<<<<<<<<<<It is DVI connector>>>>>>>>>>>>>>" );
+						
+					    // Change it to DVI mode as it is existing in both Supported and available configurations
+					    aHdmiConfigs[ modecount ].iConnector = TTvSettings::EDVI;
 					
-					// Version should be zeroed for non-HDMI
-					aHdmiConfigs[ modecount ].iTvHdmiVersion = 0;
-					aHdmiConfigs[ modecount ].iTvHdmiRevision = 0;			  
+					    // Version should be zeroed for non-HDMI
+					    aHdmiConfigs[ modecount ].iTvHdmiVersion = 0;
+					    aHdmiConfigs[ modecount ].iTvHdmiRevision = 0;
+				    	}
 				  }
 		    }
 
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/pdengine.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/pdengine.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -129,7 +129,7 @@
             if( iFSMPtr[EPDEFSMIdCompositeCableStatus]->CurrentStateID() != ECompositeCableStateIdle )
                 {
                 // Forcefully transit CompositeCable FSM to Idle state
-                ((CCompositeCableStatusFSM*)iFSMPtr[EPDEFSMIdCompositeCableStatus])->Transit(ECompositeCableStateIdle);
+                ((CCompositeCableStatusFSM*)iFSMPtr[EPDEFSMIdCompositeCableStatus])->Input(EPDEIfAccessoryConnection, EPDEIfAccessoryConnectionEventCableDisconnected);
                 }
             iFSMPtr[ aFSMId ]->Input( aInterfaceId, aEvent );            
             }
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/tvoutconfigforhdmi.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/tvoutconfigforhdmi.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -34,6 +34,11 @@
 // CONSTANTS
 
 // MACROS
+#define SEND_VIA_PDENGINE(event) \
+                        ((CHDMICableStatusFSM*)&iFSM)->GetPDEngine()->Input( \
+                        EPDEFSMIdHDMICableStatus, \
+                        EPDEIfTVOutConfig, \
+                        event )
 
 // LOCAL CONSTANTS AND MACROS
 
@@ -435,9 +440,8 @@
                 }
             else if ( iTvConfig->HdmiCableConnected() )
                 {
-                iFSM.Input( 
-                        EPDEIfTVOutConfig, 
-                        EIfTVOutConfigEventCableConnected );
+                    // Send connected event to FSM via PDEngine where the multiple connection(analog and hdmi) logic is handled.
+                    SEND_VIA_PDENGINE(EIfTVOutConfigEventCableConnected);
                 }
             else
                 {
--- a/accessoryservices/tspclientmapper/tsrc/public/basic/tspclienttestmodule/src/tspclientTestModuleCases.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/accessoryservices/tspclientmapper/tsrc/public/basic/tspclienttestmodule/src/tspclientTestModuleCases.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -33,9 +33,6 @@
 //extern ?external_function( ?arg_type,?arg_type );
 
 // CONSTANTS
-_LIT( KEnter, "Enter" );
-_LIT( KOnGoing, "On-going" );
-_LIT( KExit, "Exit" );
 
 // MACROS
 //#define ?macro ?macro_def
@@ -138,20 +135,20 @@
     static TCaseInfoInternal const KCases[] =
         {
         // To add new test cases, add new items to this array
-        ENTRY( "Set a process id playing", 	            SetProcessIdPlayingL ),
-        ENTRY( "Set and move a process id playing", 	SetAndMoveProcessIdPlayingL ),
-        ENTRY( "Set and remove a process id playing", 	SetAndRemoveProcessIdPlayingL ),
-        ENTRY( "Set two and set first process id playing", 	SetTwoAndSetFirstProcessIdPlayingL ),
-        ENTRY( "Set a process id registered", 	            SetProcessIdRegisteredL ),
-        ENTRY( "Set and move a process id registered", 	SetAndMoveProcessIdRegisteredL ),
-        ENTRY( "Set and remove a process id registered", 	SetAndRemoveProcessIdRegisteredL ),
-        ENTRY( "Set two and set first process id registered", 	SetTwoAndSetFirstProcessIdRegisteredL ),
-        ENTRY( "Set a process id stopped", 	            SetProcessIdStoppedL ),
-        ENTRY( "Set and move a process id stopped", 	SetAndMoveProcessIdStoppedL ),
-        ENTRY( "Set and remove a process id stopped", 	SetAndRemoveProcessIdStoppedL ),
-        ENTRY( "Set two and set first process id stopped", 	SetTwoAndSetFirstProcessIdStoppedL ),
-        ENTRY( "Check out of range", 	CheckOutOfRangeL ),
-        ENTRY( "AddAPI Usage from Multiple Threads Simultaneously", MultiThreadTestSyncL ),
+        ENTRY( "Set a process id playing", 	            &CTspClientTestModule::SetProcessIdPlayingL ),
+        ENTRY( "Set and move a process id playing", 	&CTspClientTestModule::SetAndMoveProcessIdPlayingL ),
+        ENTRY( "Set and remove a process id playing", 	&CTspClientTestModule::SetAndRemoveProcessIdPlayingL ),
+        ENTRY( "Set two and set first process id playing", 	&CTspClientTestModule::SetTwoAndSetFirstProcessIdPlayingL ),
+        ENTRY( "Set a process id registered", 	            &CTspClientTestModule::SetProcessIdRegisteredL ),
+        ENTRY( "Set and move a process id registered", 	&CTspClientTestModule::SetAndMoveProcessIdRegisteredL ),
+        ENTRY( "Set and remove a process id registered", 	&CTspClientTestModule::SetAndRemoveProcessIdRegisteredL ),
+        ENTRY( "Set two and set first process id registered", 	&CTspClientTestModule::SetTwoAndSetFirstProcessIdRegisteredL ),
+        ENTRY( "Set a process id stopped", 	            &CTspClientTestModule::SetProcessIdStoppedL ),
+        ENTRY( "Set and move a process id stopped", 	&CTspClientTestModule::SetAndMoveProcessIdStoppedL ),
+        ENTRY( "Set and remove a process id stopped", 	&CTspClientTestModule::SetAndRemoveProcessIdStoppedL ),
+        ENTRY( "Set two and set first process id stopped", 	&CTspClientTestModule::SetTwoAndSetFirstProcessIdStoppedL ),
+        ENTRY( "Check out of range", 	&CTspClientTestModule::CheckOutOfRangeL ),
+        ENTRY( "AddAPI Usage from Multiple Threads Simultaneously", &CTspClientTestModule::MultiThreadTestSyncL ),
         };
 
     // Verify that case number is valid
--- a/commonservices/PlatformEnv/platformver/tsrc/platformvertest/src/platformvertestcases.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/commonservices/PlatformEnv/platformver/tsrc/platformvertest/src/platformvertestcases.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -134,8 +134,8 @@
         {
         // To add new test cases, add new items to this array
         //FUNCENTRY( PrintTest ),
-        ENTRY( "[PlatformVer] GetPlatformVersion", GetPlatformVersion ),
-        OOM_ENTRY( "[OOM_PlatformVer] GetPlatformVersion", GetPlatformVersion ,ETrue,1,5)
+        ENTRY( "[PlatformVer] GetPlatformVersion", &CPlatformVerTest::GetPlatformVersion ),
+        OOM_ENTRY( "[OOM_PlatformVer] GetPlatformVersion", &CPlatformVerTest::GetPlatformVersion ,ETrue,1,5)
 
         // Example how to use OOM functionality
         //OOM_ENTRY( "Loop test with OOM", LoopTest, ETrue, 2, 3),
--- a/commonservices/PlatformEnv/sysversioninfo/tsrc/sysutiltests/src/sysutiltests.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/commonservices/PlatformEnv/sysversioninfo/tsrc/sysutiltests/src/sysutiltests.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -110,21 +110,21 @@
         {
 
 		// To add new test cases, add new items to this array
-        ENTRY( "[SYSUTIL] GetVersionInfo test", CSysUtiltests::GetVersionInfo ),
-        ENTRY( "[SYSUTIL] GetVersionInfo2 test", CSysUtiltests::GetVersionInfo2 ),
-        ENTRY( "[SYSUTIL] GetOSVersionInfo test", CSysUtiltests::GetOSVersionInfo ),
-        ENTRY( "[SYSUTIL] GetProductVersionInfo test", CSysUtiltests::GetProductVersionInfo ),
-        ENTRY( "[SYSUTIL] GetOSVersionInfo2 test", CSysUtiltests::GetOSVersionInfo2 ),
-        ENTRY( "[SYSUTIL] GetProductVersionInfo2 test", CSysUtiltests::GetProductVersionInfo2 ),
-        ENTRY( "[SYSUTIL] GetProductCode test", CSysUtiltests::GetProductCode ),
+        ENTRY( "[SYSUTIL] GetVersionInfo test", &CSysUtiltests::GetVersionInfo ),
+        ENTRY( "[SYSUTIL] GetVersionInfo2 test", &CSysUtiltests::GetVersionInfo2 ),
+        ENTRY( "[SYSUTIL] GetOSVersionInfo test", &CSysUtiltests::GetOSVersionInfo ),
+        ENTRY( "[SYSUTIL] GetProductVersionInfo test", &CSysUtiltests::GetProductVersionInfo ),
+        ENTRY( "[SYSUTIL] GetOSVersionInfo2 test", &CSysUtiltests::GetOSVersionInfo2 ),
+        ENTRY( "[SYSUTIL] GetProductVersionInfo2 test", &CSysUtiltests::GetProductVersionInfo2 ),
+        ENTRY( "[SYSUTIL] GetProductCode test", &CSysUtiltests::GetProductCode ),
         
-        OOM_ENTRY( "[OOM_SYSUTIL] GetVersionInfo test", CSysUtiltests::GetVersionInfo ,ETrue,1,5 ),
-        OOM_ENTRY( "[OOM_SYSUTIL] GetVersionInfo2 test", CSysUtiltests::GetVersionInfo2,ETrue,1,5 ),
-        OOM_ENTRY( "[OOM_SYSUTIL] GetOSVersionInfo test", CSysUtiltests::GetOSVersionInfo ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_SYSUTIL] GetProductVersionInfo test", CSysUtiltests::GetProductVersionInfo ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_SYSUTIL] GetOSVersionInfo2 test", CSysUtiltests::GetOSVersionInfo2 ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_SYSUTIL] GetProductVersionInfo2 test", CSysUtiltests::GetProductVersionInfo2 ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_SYSUTIL] GetProductCode test", CSysUtiltests::GetProductCode ,ETrue,1,5)
+        OOM_ENTRY( "[OOM_SYSUTIL] GetVersionInfo test", &CSysUtiltests::GetVersionInfo ,ETrue,1,5 ),
+        OOM_ENTRY( "[OOM_SYSUTIL] GetVersionInfo2 test", &CSysUtiltests::GetVersionInfo2,ETrue,1,5 ),
+        OOM_ENTRY( "[OOM_SYSUTIL] GetOSVersionInfo test", &CSysUtiltests::GetOSVersionInfo ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_SYSUTIL] GetProductVersionInfo test", &CSysUtiltests::GetProductVersionInfo ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_SYSUTIL] GetOSVersionInfo2 test", &CSysUtiltests::GetOSVersionInfo2 ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_SYSUTIL] GetProductVersionInfo2 test", &CSysUtiltests::GetProductVersionInfo2 ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_SYSUTIL] GetProductCode test", &CSysUtiltests::GetProductCode ,ETrue,1,5)
         
         };
 
--- a/commonservices/PlatformEnv/tsrc/platformenvtest/src/PlatformEnvTestCases.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/commonservices/PlatformEnv/tsrc/platformenvtest/src/PlatformEnvTestCases.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -132,35 +132,35 @@
         {
         // To add new test cases, add new items to this array
         //FUNCENTRY( PrintTest ),
-        ENTRY( "[PLATFORMENV] PathTest", PathTest ),
-        ENTRY( "[PLATFORMENV] GetPathTest", GetPathTest ),       
-        ENTRY( "[PLATFORMENV] GetRootPathTest", GetRootPathTest ),
-        ENTRY( "[PLATFORMENV] GetFullPathTest", GetFullPathTest ),
-        ENTRY( "[PLATFORMENV] PathTypeTest", PathTypeTest ),
-        ENTRY( "[PLATFORMENV] GetListOfPathsTest", GetListOfPathsTest ),
-        ENTRY( "[PLATFORMENV] GetDefaultDriveTest", GetDefaultDriveTest ),
-        ENTRY( "[PLATFORMENV] GetDefaultDriveTest2", GetDefaultDriveTest2 ),
-        ENTRY( "[PLATFORMENV] GetDriveStatusTest", GetDriveStatusTest ),
-        ENTRY( "[PLATFORMENV] GetUserVisibleDrivesTest", GetUserVisibleDrivesTest ),
-        ENTRY( "[PLATFORMENV] StripUserHiddenDrivesTest", StripUserHiddenDrivesTest ),
-        ENTRY( "[PLATFORMENV] DriveCountTest", DriveCountTest ),
-        ENTRY( "[PLATFORMENV] DriveArrayTest", DriveArrayTest ),
-        ENTRY( "[PLATFORMENV] GetUserVisibleDrivesTest2", GetUserVisibleDrivesTest2 ),
+        ENTRY( "[PLATFORMENV] PathTest", &CPlatformEnvTest::PathTest ),
+        ENTRY( "[PLATFORMENV] GetPathTest", &CPlatformEnvTest::GetPathTest ),       
+        ENTRY( "[PLATFORMENV] GetRootPathTest", &CPlatformEnvTest::GetRootPathTest ),
+        ENTRY( "[PLATFORMENV] GetFullPathTest", &CPlatformEnvTest::GetFullPathTest ),
+        ENTRY( "[PLATFORMENV] PathTypeTest", &CPlatformEnvTest::PathTypeTest ),
+        ENTRY( "[PLATFORMENV] GetListOfPathsTest", &CPlatformEnvTest::GetListOfPathsTest ),
+        ENTRY( "[PLATFORMENV] GetDefaultDriveTest", &CPlatformEnvTest::GetDefaultDriveTest ),
+        ENTRY( "[PLATFORMENV] GetDefaultDriveTest2", &CPlatformEnvTest::GetDefaultDriveTest2 ),
+        ENTRY( "[PLATFORMENV] GetDriveStatusTest", &CPlatformEnvTest::GetDriveStatusTest ),
+        ENTRY( "[PLATFORMENV] GetUserVisibleDrivesTest", &CPlatformEnvTest::GetUserVisibleDrivesTest ),
+        ENTRY( "[PLATFORMENV] StripUserHiddenDrivesTest", &CPlatformEnvTest::StripUserHiddenDrivesTest ),
+        ENTRY( "[PLATFORMENV] DriveCountTest", &CPlatformEnvTest::DriveCountTest ),
+        ENTRY( "[PLATFORMENV] DriveArrayTest", &CPlatformEnvTest::DriveArrayTest ),
+        ENTRY( "[PLATFORMENV] GetUserVisibleDrivesTest2", &CPlatformEnvTest::GetUserVisibleDrivesTest2 ),
      
-        OOM_ENTRY( "[OOM_PLATFORMENV] PathTest", PathTest ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_PLATFORMENV] GetPathTest", GetPathTest ,ETrue,1,5),  
-        OOM_ENTRY( "[OOM_PLATFORMENV] GetRootPathTest", GetRootPathTest ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_PLATFORMENV] GetFullPathTest", GetFullPathTest ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_PLATFORMENV] PathTypeTest", PathTypeTest ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_PLATFORMENV] GetListOfPathsTest", GetListOfPathsTest,ETrue,1,5 ),
-        OOM_ENTRY( "[OOM_PLATFORMENV] GetDefaultDriveTest", GetDefaultDriveTest ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_PLATFORMENV] GetDefaultDriveTest2", GetDefaultDriveTest2 ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_PLATFORMENV] GetDriveStatusTest", GetDriveStatusTest ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_PLATFORMENV] GetUserVisibleDrivesTest", GetUserVisibleDrivesTest,ETrue,1,5 ),
-        OOM_ENTRY( "[OOM_PLATFORMENV] StripUserHiddenDrivesTest", StripUserHiddenDrivesTest ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_PLATFORMENV] DriveCountTest", DriveCountTest ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_PLATFORMENV] DriveArrayTest", DriveArrayTest ,ETrue,1,5),
-        OOM_ENTRY( "[OOM_PLATFORMENV] GetUserVisibleDrivesTest2", GetUserVisibleDrivesTest2 ,ETrue,1,5)
+        OOM_ENTRY( "[OOM_PLATFORMENV] PathTest", &CPlatformEnvTest::PathTest ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_PLATFORMENV] GetPathTest", &CPlatformEnvTest::GetPathTest ,ETrue,1,5),  
+        OOM_ENTRY( "[OOM_PLATFORMENV] GetRootPathTest", &CPlatformEnvTest::GetRootPathTest ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_PLATFORMENV] GetFullPathTest", &CPlatformEnvTest::GetFullPathTest ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_PLATFORMENV] PathTypeTest", &CPlatformEnvTest::PathTypeTest ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_PLATFORMENV] GetListOfPathsTest", &CPlatformEnvTest::GetListOfPathsTest,ETrue,1,5 ),
+        OOM_ENTRY( "[OOM_PLATFORMENV] GetDefaultDriveTest", &CPlatformEnvTest::GetDefaultDriveTest ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_PLATFORMENV] GetDefaultDriveTest2", &CPlatformEnvTest::GetDefaultDriveTest2 ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_PLATFORMENV] GetDriveStatusTest", &CPlatformEnvTest::GetDriveStatusTest ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_PLATFORMENV] GetUserVisibleDrivesTest", &CPlatformEnvTest::GetUserVisibleDrivesTest,ETrue,1,5 ),
+        OOM_ENTRY( "[OOM_PLATFORMENV] StripUserHiddenDrivesTest", &CPlatformEnvTest::StripUserHiddenDrivesTest ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_PLATFORMENV] DriveCountTest", &CPlatformEnvTest::DriveCountTest ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_PLATFORMENV] DriveArrayTest", &CPlatformEnvTest::DriveArrayTest ,ETrue,1,5),
+        OOM_ENTRY( "[OOM_PLATFORMENV] GetUserVisibleDrivesTest2", &CPlatformEnvTest::GetUserVisibleDrivesTest2 ,ETrue,1,5)
                 
         // Example how to use OOM functionality
         //OOM_ENTRY( "Loop test with OOM", LoopTest, ETrue, 2, 3),
--- a/commonservices/activitymanager/group/activitymanager.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/commonservices/activitymanager/group/activitymanager.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component activitymanager
 source	\sf\os\devicesrv\commonservices\activitymanager
 binary \sf\os\devicesrv\commonservices\activitymanager\group all
Binary file commonservices/commonengine/conf/commonengine.confml has changed
Binary file commonservices/commonengine/conf/commonengine_1020503B.crml has changed
--- a/commonservices/sysutil/group/sysutil.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/commonservices/sysutil/group/sysutil.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component sysutil
 source	\sf\os\devicesrv\commonservices\sysutil
 binary \sf\os\devicesrv\commonservices\sysutil\group all
--- a/devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component           devicesrv_metadata
 source   \sf\os\devicesrv\devicesrv_info\devicesrv_metadata 
 source   \sf\os\devicesrv\package_definition.xml
--- a/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiocontrolbase.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiocontrolbase.h	Fri Apr 16 16:18:45 2010 +0300
@@ -49,7 +49,7 @@
     /**
      * Destructor.
      */
-    virtual ~CAccPolAudioControlBase();
+    IMPORT_C virtual ~CAccPolAudioControlBase();
 
     /**
      * Assign operator for audio control base class.
@@ -112,13 +112,13 @@
     /**
      * C++ default constructor.
      */
-    CAccPolAudioControlBase( TTopologyConObjectType aObjectType,
+    IMPORT_C CAccPolAudioControlBase( TTopologyConObjectType aObjectType,
         CAccPolObjectCon* aObject = NULL );
 
     /**
      * C++ default constructor.
      */
-    CAccPolAudioControlBase( TTopologyConObjectType aObjectType,
+    IMPORT_C CAccPolAudioControlBase( TTopologyConObjectType aObjectType,
         TUint32 aChannel );
 
 private:
--- a/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiounitbase.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiounitbase.h	Fri Apr 16 16:18:45 2010 +0300
@@ -37,7 +37,7 @@
     /**
      * Destructor.
      */
-    virtual ~CAccPolAudioUnitBase();
+    IMPORT_C virtual ~CAccPolAudioUnitBase();
 
     /**
      * Assign operator for audio unit base class.
--- a/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolterminalbase.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolterminalbase.h	Fri Apr 16 16:18:45 2010 +0300
@@ -32,7 +32,7 @@
     /**
      * Destructor.
      */
-    virtual ~CAccPolTerminalBase();
+    IMPORT_C virtual ~CAccPolTerminalBase();
 
     /**
      * Assign operator for audio terminal base class.
--- a/devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectbase.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectbase.h	Fri Apr 16 16:18:45 2010 +0300
@@ -38,7 +38,7 @@
     /**
      * Destructor.
      */
-    virtual ~CAccPolObjectBase();        
+    IMPORT_C virtual ~CAccPolObjectBase();        
         
     /**
      * Sets the object type.
--- a/devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectcon.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectcon.h	Fri Apr 16 16:18:45 2010 +0300
@@ -34,7 +34,7 @@
     /**
      * Destructor.
      */
-    virtual ~CAccPolObjectCon();                              
+    IMPORT_C virtual ~CAccPolObjectCon();                              
     
     /**
      * Resets the object container.
--- a/devicesrv_plat/display_language_definition_api/inc/CommonEngineDomainCRKeys.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/devicesrv_plat/display_language_definition_api/inc/CommonEngineDomainCRKeys.h	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-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"
@@ -41,4 +41,26 @@
 **/
 const TUint32  KGSDisplayTxtLang = 0x00000001;
 
+/**
+* Collation code, integer value
+*
+* Possible values are:
+* 0 (automatic)
+* Valid Symbian OS collation(language) code
+*
+* Default value: 0
+**/
+const TUint32  KGSCollation = 0x00000002;
+
+/**
+* Region code, integer value
+*
+* Possible values are:
+* 0 (automatic)
+* Valid Symbian OS region code
+*
+* Default value: 0
+**/
+const TUint32  KGSRegion = 0x00000003;
+
 #endif // COMMONENGINEDOMAINCRKEYS_H
--- a/devicesrv_plat/tv_out_config_api/inc/tvoutconfig.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/devicesrv_plat/tv_out_config_api/inc/tvoutconfig.h	Fri Apr 16 16:18:45 2010 +0300
@@ -124,18 +124,18 @@
 
         //-- Standby Figure ---------------------------------------------------
 
-        /** Returns maximum size of TStandByFigure.iTable in bytes.
+        /** Returns maximum size of TStandByFigure.iTable in bytes. Deprecated since TB10.2.
             @param  aMaxFigureSize  Max size of standByFigure in bytes
             @return  KErrNotSupported if not supported. */
         virtual TInt StandByFigureMaxSizeInBytes(TUint& aMaxFigureSize) = 0;
 
-        /** Sets user defined figure to show on tv.
+        /** Sets user defined figure to show on tv. Deprecated since TB10.2.
             @pre SetConfig() is called without errors.
             @param  aStandByFigure  TStandByFigure object.
             @return KErrNone if all success */
         virtual TInt StandByFigure(const TStandByFigure& aStandByFigure) = 0;
 
-        /** Gets user defined figure to show on tv.
+        /** Gets user defined figure to show on tv. Deprecated since TB10.2.
             @see CTvOutConfig::StandByFigureMaxSizeInBytes for getting size of TStandByFigure.iTable.
             @pre StandByFigure() is called without errors.
             @param  aStandByFigure  TStandByFigure object.
--- a/devicesrv_plat/tv_out_config_api/inc/tvoutconfigdef.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/devicesrv_plat/tv_out_config_api/inc/tvoutconfigdef.h	Fri Apr 16 16:18:45 2010 +0300
@@ -431,11 +431,11 @@
 
         ///ETrue if iLeftTopCorner&iRightBottomCorner are used instead of iHorizontalOverScan&iVerticalOverScan
         TBool iCornerPointsUsed;
-        /** Overscan in pixels. Set Left Top corner point. Zero when Tv supports overscan (0=underscan enabled)
+        /** Overscan in pixels. Set Left Top corner point. Zero when Tv supports underscan (0=underscan enabled)
             This should be "point" to active image area. Cannot point out of active image area.
             Cannot across with iRightBottomCorner. And this allows overscan and position tuning. */
         TPoint iLeftTopCorner;
-        /** Overscan in pixels. Set Right Bottom corner point (offset from left top corner).
+        /** Overscan in pixels. Set Right Bottom corner point (offset from Tv's left top corner).
             @see iLeftTopCorner
             Driver returns KErrExtensionNotSupported if driver does not support this settings.
             If driver supports centralizing only, then this has to be same as iLeftTopCorner. */
@@ -571,17 +571,18 @@
         ///Vertical sync polarity, EFalse=Negative, ETrue=Positive. With CEA mode 1 this is EFalse.
         TBool iVerticalSyncPolarity;
         /** Wanted pixel repeat, can be used if mode supports. Otherwise horisontal resolution can be increased also.
+            Value minus one. 0 -> sent once. 9 -> pixel sent 10 times.
             0 when repeat is disabled. With CEA mode 1 this is 0. */
         TUint8 iPixelRepeat;
 
         /** ETrue if Tv supports underscan, and it is enabled (to be always enabled when supported/possible),
             EFalse otherwise */
         TBool iUnderscanEnabled;
-        /** Overscan in pixels. Set Left Top corner point. Zero when Tv supports overscan (0=underscan enabled)
+        /** Overscan in pixels. Set Left Top corner point. Zero when Tv supports underscan (0=underscan enabled)
             This should be "point" to active image area. Cannot point out of active image area.
             Cannot across with iRightBottomCorner. And this allows overscan and position tuning. */
         TPoint iLeftTopCorner;
-        /** Overscan in pixels. Set Right Bottom corner point (offset from left top corner).
+        /** Overscan in pixels. Set Right Bottom corner point (offset from Tv's left top corner).
             @see iLeftTopCorner. Has not affect if iCentralizingOnly==ETrue. */
         TPoint iRightBottomCorner;
 
@@ -614,7 +615,13 @@
     };
 
 /**
-Standby Figure Format
+Standby Figure Format. Fully deprecated since TB10.2.
+Note for TB9.2 and TB10.1: 
+- iLeftTopColumn & iLeftTopRow are deprecated and those can be ignored.
+- the icon of iColumns x iRows is scaled by (iScaleNumeratorWidth/iScaleDenominatorWidth) and (iScaleNumeratorHeight/iScaleDenominatorHeight)
+- the resulting icon is centered to the layer's extent which contained the protected surface
+- the scaled and centered icon is clipped against layer extent and screen size.
+- pixels inside the layer's extent not covered by the scaled and centered icon are filled with iBackGroundColor.
 */
 class TStandByFigure
     {
@@ -659,9 +666,9 @@
         TUint16 iScaleNumeratorHeight;
         ///Height scaler denominator
         TUint16 iScaleDenominatorHeight;
-        ///Start column
+        ///Start column. Deprecated!
         TUint16 iLeftTopColumn;
-        ///Start row
+        ///Start row. Deprecated!
         TUint16 iLeftTopRow;
         ///Back ground color. Input RGB565 RRRR RGGG GGGB BBBB.
         TUint16 iBackGroundColor;
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/data/20021204.rss	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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:  Haptics effect data getter plugin ECom resource file
-*
-*/
-
-#include <ecom/registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
-    {
-    dll_uid = 0x20021204; 
-    interfaces = 
-        {
-        INTERFACE_INFO
-            {
-            interface_uid = 0x20021202;
-            implementations = 
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid = 0x20021203;
-                    version_no = 1; 
-                    display_name = "";
-                    default_data = "";
-                    opaque_data = ""; 
-                    }
-                };
-            }
-        };
-    }
-
-// End of file
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/group/bld.inf	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Build file for effect data getter ECom plugin.
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../rom/hwrmhapticsivtgetterplugin.iby CORE_OS_LAYER_IBY_EXPORT_PATH(hwrmhapticsivtgetterplugin.iby)
-
-PRJ_MMPFILES
-hwrmhapticsivtgetterplugin.mmp
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/group/hwrmhapticsivtgetterplugin.mmp	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Project definition file for effect data getter ECom plugin.
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET                  hwrmhapticsivtgetterplugin.dll
-TARGETTYPE              PLUGIN
-UID                     0x10009D8D 0x20021204
-
-CAPABILITY              CAP_ECOM_PLUGIN
-VENDORID                VID_DEFAULT
-
-SOURCEPATH              ../src
-SOURCE                  hwrmhapticsivtgetter.cpp
-SOURCE                  basisivtgetters.cpp
-SOURCE                  ivthelper.cpp
-SOURCE                  timelineivtgetters.cpp
-
-USERINCLUDE             ../inc
-USERINCLUDE             ../../../../inc
-
-// Default system include paths for osext layer modules.
-OS_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE           /epoc32/include/stdapis
-
-SOURCEPATH              ../data
-START RESOURCE          20021204.rss
-TARGETPATH              ECOM_RESOURCE_DIR
-TARGET                  hwrmhapticsivtgetterplugin.rsc
-END
-
-LIBRARY                 euser.lib
-LIBRARY                 efsrv.lib
-LIBRARY                 estlib.lib
-LIBRARY                 ecom.lib
-LIBRARY                 hwrmhapticseffectdatagetterfw.lib
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/basisivtgetters.h	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Basis effect internal getters header file.
-*
-*/
-
-#ifndef BASISIVTGETTERS_H
-#define BASISIVTGETTERS_H
-
-
-#include "ivtinternal.h"
-
-
-/**
- * Utility class for getting various basis effect specific information
- * from data buffer.
- */
-class BasisIVTGetters
-    {
-public:
-
-    /** 
-     * Method for getting basis effect properties.
-     *
-     * @param aMsg         Pointer to the data buffer containing the 
-     *                     effect definition.
-     * @param aDuration    Duration of the effect (out param).
-     * @param aStartDelay  Start delay of the effect (out param). 
-     * @param aMagnitude   Magnitude of the effect (out param). 
-     * @param aStartFlag   Start flag of the effect (out param). 
-     * @param aType        Type of the effect (out param). 
-     * @param aFreqPer     Period of the effect (out param). 
-     * @param aControlMode Control mode of the effect (out param). 
-     */
-    static void VibeIVTGetPeriodic( 
-        const TUint8*        aMsg,
-        TVibeIVTMessageTime* aDuration,
-        TVibeIVTMessageTime* aStartDelay,
-        TVibeIVTMagnitude*   aMagnitude,
-        TInt*                aStartFlag,
-        TInt*                aType,
-        TVibeIVTFreqPer*     aFreqPer,
-        TInt*                aControlMode );
-
-    /** 
-     * Method for getting basis effect modifier (envelope) properties.
-     *
-     * @param aMsg          Pointer to the data buffer containing the 
-     *                      effect definition.
-     * @param aImpulseTime  Impulse (attack) time of the effect 
-     *                      (out param). 
-     * @param aFadeTime     Fade time of the effect (out param). 
-     * @param aImpulseLevel Impulse (attack) level of the effect 
-     *                      (out param). 
-     * @param aFadeLevel    Fade level of the effect (out param). 
-     */
-    static void VibeIVTGetPeriodicModifier( 
-        const TUint8*        aMsg,
-        TVibeIVTMessageTime* aImpulseTime,
-        TVibeIVTMessageTime* aFadeTime,
-        TVibeIVTMagnitude*   aImpulseLevel,
-        TVibeIVTMagnitude*   aFadeLevel );
-
-};
-
-#endif /* BASISIVTGETTERS_H */
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/hwrmhapticsivtgetter.h	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Plugin for reading effect information from IVT effect data.
-*
-*/
-
-#ifndef C_HWRMHAPTICSIVTGETTER_H
-#define C_HWRMHAPTICSIVTGETTER_H
-
-#include <e32base.h>
-
-#include <hwrmhapticseffectdatagetter.h>
-#include "ivtinternal.h"
-
-/**
- *  Ecom plugin for getting haptics ivt data.
- *
- *  @lib hapticsivtgetterplugin.lib
- *  @since S60 5.1
- */
-NONSHARABLE_CLASS( CHWRMHapticsIVTGetter ): public CHWRMHapticsEffectDataGetter
-    {
-public:
-
-    /**
-     * 2-phased constructor.
-     * @return An instance of haptics ivt getter.
-     */
-    static CHWRMHapticsIVTGetter* NewL();
-
-    /**
-     * Destructor.
-     */
-    virtual ~CHWRMHapticsIVTGetter();
-
-public: // From CHWRMHapticsEffectDataGetter
-
-    /**
-     * @see CHWRMHapticsEffectDataGetter
-     */
-    TInt GetEffectCount( const TDesC8& aData, TInt& aCount );
-
-    /**
-     * @see CHWRMHapticsEffectDataGetter
-     */
-    TInt GetEffectName( const TDesC8& aData,
-                        TInt aEffectIndex, 
-                        TDes8& aEffectName );
-
-    /**
-     * @see CHWRMHapticsEffectDataGetter
-     */
-    TInt GetEffectIndexFromName( const TDesC8& aData,
-                                 const TDesC8& aEffectName,
-                                 TInt& aEffectIndex );
-
-    /**
-     * @see CHWRMHapticsEffectDataGetter
-     */
-    TInt GetEffectType( const TDesC8& aData, 
-                        TInt aEffectIndex, 
-                        TInt& aEffectType );
-
-    /**
-     * @see CHWRMHapticsEffectDataGetter
-     */ 
-    TInt GetMagSweepEffectDefinition( 
-                      const TDesC8& aData, 
-                      TInt aEffectIndex, 
-                      CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect );
-                                                 
-    /**
-     * @see CHWRMHapticsEffectDataGetter
-     */
-    TInt GetPeriodicEffectDefinition( 
-                      const TDesC8& aData, 
-                      TInt aEffectIndex, 
-                      CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect );
-                
-    /**
-     * @see CHWRMHapticsEffectDataGetter
-     */
-    TInt GetEffectDuration( const TDesC8& aData, 
-                            TInt aEffectIndex, 
-                            TInt& aEffectDuration );
-
-private:
-
-    /**
-     * Constructor.
-     */
-    CHWRMHapticsIVTGetter();
-
-    /**
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-    
-private:
-
-    /**
-     * Utility method for fetching the effect definition using effect data
-     * and index.
-     */
-    TInt GetEffectByIndex( const TDesC8& aData,  
-                           TInt aEffectIndex,  
-                           TVibeEffectDefinition* aEffectDefinition );
-
-    };
-
-
-#endif // C_HWRMHAPTICSIVTGETTER_H
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/ivtconstants.h	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2008 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:  VibeTonz related const definitions header file
-*
-*/
-
-#ifndef _HWRMHAPTICSIVTCONSTANTS_H
-#define _HWRMHAPTICSIVTCONSTANTS_H
-
-#include <e32def.h>
-#include <limits.h>
-
-/**
- *  Invalid index constant
- */
-const TInt KVibeInvalidIndex = -1;
-
-/**
- *  Maximum effect name length constant 
- */
-const TInt KVibeMaxEffectNameLength       = 128; // Maximum effect name length
-
-/**
- * 'Infinite' time 
- */
-const TInt KVibeTimeInfinite = INT_MAX;
-
-/**
- * 'Infinite' repeat count value
- */
-const TUint8 KVibeRepeatCountInfinite = 255;
-
-
-
-#endif // _HWRMHAPTICSIVTCONSTANTS_H
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/ivthelper.h	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,339 +0,0 @@
-/*
-* Copyright (c) 2008 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:  IVT effect getter methods high level helper functions header file.
-*
-*/
-
-#ifndef IVTHELPER_H
-#define IVTHELPER_H
-
-#include "ivtinternal.h"
-
-/**
- * Utility class for parsing various information from effect data buffer.
- */
-class IVTHelper
-    {
-public:
-    /**
-     * Method for checking that the IVT header is correctly formatted.
-     * (This includes also version number check).
-     *
-     * @param aIVT Pointer to the effect data buffer.
-     *
-     * @return ETrue if header is correctly formatted, EFalse otherwise.
-     */
-    static TBool IsValidIVTAddress( const TUint8* aIVT );
-
-    /**
-     * Method for getting number of effects within an effect data buffer.
-     *
-     * @param aIVT Pointer to the effect data buffer.
-     *
-     * @return Number (count) of effects contained within the effect data 
-     *         buffer.
-     */
-    static TUint16 GetNumEffects( const TUint8* aIVT );
-
-    /**
-     * Method for getting the start address of the sub-buffer (from the 
-     * effect data buffer containing possibly several effect definitions)
-     * that contains effect definition of the given effect.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     * @param aEffectIndex Index of the effect (within the effect data 
-     *                     buffer).
-     *
-     * @return Pointer to the effect definition sub-buffer. In case of 
-     *         any error, NULL is returned.
-     */
-    static TUint8* GetEffectStorage( const TUint8* aIVT, TInt aEffectIndex );
-
-    /**
-     * Method for extracting envelope (attack and fade times and levels) from
-     * a buffer of effect-specific data. I.e., this is given an address to the 
-     * effect specific part in effect data buffer, not the whole effect data 
-     * buffer. The aPacket param can be obtained e.g. by first calling the
-     * above GetEffectStorage method.
-     *
-     * @param aPacket   Pointer to effect specific data (sub-)buffer.
-     * @param aEnvelope Pointer to a TVibeEnvelopeParams structure to which 
-     *                  the envelope params are read.
-     *
-     * @return ETrue on success, EFalse otherwise.
-     */
-    static TBool ExtractEnvelopeFromPacket( 
-        const TUint8*       aPacket, 
-        TVibeEnvelopeParams* aEnvelope );
-        
-    /**
-     * Method for extracting effect definition from a buffer of effect-
-     * specific data. I.e., this is given an address to the effect-specific
-     * part in effect data buffer, not the whole effect data 
-     * buffer. The aPacket param can be obtained e.g. by first calling the
-     * above GetEffectStorage method.
-     *
-     * @param aPacket           Pointer to effect specific data (sub-)buffer.
-     * @param aEffectDefinition Pointer to a TVibeEffectDefinition structure 
-     *                          to which the effect definition params are
-     *                          read.
-     * @param aPeriodicType     The type of the effect (basis vs timeline) is
-     *                          written to the TInt located in this address.
-     *
-     * @return ETrue on success, EFalse otherwise.
-     */
-    static TBool ExtractEffectDefinitionFromPacket( 
-        const TUint8*          aPacket, 
-        TVibeEffectDefinition* aEffectDefinition,
-        TInt*                  aPeriodicType );
-
-    /**
-     * Method for getting the effect name data sub-buffer address.
-     * 
-     * @param aIVT         Pointer to the effect data buffer.
-     * @param aEffectIndex Index of the effect (within the effect data 
-     *                     buffer) which name data is queried.
-     *
-     * @return Pointer to the (sub-)buffer containing the effect name data.
-     *         In case of error, returns NULL pointer.
-     */ 
-    static TUint8* GetEffectNameData( const TUint8* aIVT, TInt aEffectIndex );
-    
-    /**
-     * Method for getting the effect duration.
-     * 
-     * @param aIVT         Pointer to the effect data buffer.
-     * @param aEffectIndex Index of the effect (within the effect data 
-     *                     buffer) which duration is queried.
-     *
-     * @return Duration of the effect.
-     *         In case of error, one of Vibe error codes.
-     */ 
-    static TInt GetIVTEffectDuration( const TUint8* aIVT, TInt aEffectIndex );
-
-private:
-
-    /**
-     * Internal structure for repeat bar.
-     * iEvent not owned.
-     */
-    struct TVibeRepeatBar
-        {
-        TInt          iTimeOffsetEnd;
-        TInt          iTimeDuration;
-        TVibeIVTCount iCount;
-        const TUint8* iEvent;
-        };
-
-    /**
-     * Structure for timeline effect information
-     * None of the pointer members are owned.
-     */ 
-    struct TVibeTimeLineInfo 
-        {
-        TVibeRepeatBar   iRepeatBarStack[KRepeatBarStackMaxSize];
-        TInt           iRepeatBarStackTop;
-        TUint8*        iOffsetSubBlock;
-        TUint8*        iDataSubBlock;
-        const TUint8*  iNextEvent;
-        TInt           iTimeAllEffectsEnd;
-        // all events times offest are relative to this time 
-        // when computing effect end time
-        TInt           iTimeOffsetZero;
-        TInt           iTimeRepeat;
-        TInt           iTimeEvent;
-        };
-
-    /**
-     * Method for getting the IVT header from effect data buffer.
-     * 
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return Pointer to the IVT header.
-     */
-    static TVibeIVTHeader* GetIVTHeader( const TUint8* aIVT );
-
-    /**
-     * Method for checking if the given effect data buffer contains any effect
-     * definitions or not.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return ETrue if the buffer contains effect definition, EFalse otherwise.
-     */
-    static TBool IsEmpty( const TUint8* aIVT);
-
-    /**
-     * Method for getting storage block size from effect data buffer.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return Storage block size.
-     */
-    static TUint16 GetStorageBlockSize( const TUint8* aIVT );
-
-    /**
-     * Method for getting name block size from effect data buffer.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return Name block size.
-     */
-    static TUint16 GetNameBlockSize( const TUint8* aIVT );
-
-    /**
-     * Method for checking if the given effect data buffer contains any effect
-     * name block(s) or not.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return ETrue if the buffer contains effect name block(s), EFalse otherwise.
-     */
-    static TBool HasNameBlock( const TUint8* aIVT );
-
-    /**
-     * Method for getting the start address of the storage block within the 
-     * effect data buffer.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return Pointer to the start of the storage block. In case of error 
-     *         returns NULL.
-     */
-    static TUint8* GetStorageBlock( const TUint8* aIVT );
-
-    /**
-     * Method for getting the start address of the storage offset subblock
-     * within the effect data buffer.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return Pointer to the start of the storage offset subblock. 
-     *         In case of error returns NULL.
-     */
-    static TUint8* GetStorageOffsetSubBlock( const TUint8* aIVT );
-    
-    /**
-     * Method for getting the start address of the storage data subblock
-     * within the effect data buffer.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return Pointer to the start of the storage data subblock. 
-     *         In case of error returns NULL.
-     */
-    static TUint8* GetStorageDataSubBlock( const TUint8* aIVT );
-    
-    /**
-     * Method for getting the start address of the name block within the 
-     * effect data buffer.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return Pointer to the start of the name block. In case of error 
-     *         returns NULL.
-     */
-    static TUint8* GetNameBlock( const TUint8* aIVT );
-    
-    /**
-     * Method for getting the start address of the name offset subblock
-     * within the effect data buffer.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return Pointer to the start of the name offset subblock. 
-     *         In case of error returns NULL.
-     */
-    static TUint8* GetNameOffsetSubBlock( const TUint8* aIVT );
-    
-    /**
-     * Method for getting the start address of the name data subblock
-     * within the effect data buffer.
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return Pointer to the start of the name data subblock. 
-     *         In case of error returns NULL.
-     */
-    static TUint8* GetNameDataSubBlock( const TUint8* aIVT );
-
-    /**
-     * Method for getting size of the effect data buffer (as calculated
-     * from the header fields).
-     *
-     * @param aIVT         Pointer to the effect data buffer.
-     *
-     * @return Size of the effect data buffer.
-     */
-    static TUint GetIVTSize( const TUint8* aIVT );
-
-    /**
-     * Method for converting firmware representation of magnitude to the
-     * one used in user interface (i.e., returned by various magnitude
-     * getters).
-     *
-     * @param aFwMagnitude Magnitude in firmware representation.
-     *
-     * @return Magnitude as seen by users.
-     */
-    static TInt ConvertToUserMagnitude( TInt aFwMagnitude );
-
-    /**
-     * Method for converting firmware representation of duration to the
-     * one used in user interface (i.e., returned by various duration
-     * getters).
-     *
-     * @param aFwDuration Duration in firmware representation.
-     *
-     * @return Duration as seen by users.
-     */
-    static TInt ConvertToUserDuration( TVibeIVTMessageTime aFwDuration );
-    
-    /**
-     * Method for converting firmware representation of frequency period to
-     * the one used in user interface (i.e., returned by various frequency
-     * period getters).
-     *
-     * @param aFwFrequency Frequency period in firmware representation.
-     *
-     * @return Frequency period as seen by users.
-     */
-    static TInt ConvertToUserFrequency( TVibeIVTFreqPer aFwFrequency );
-    
-    /**
-     * Helper method for processing Launch Playback events when calculating
-     * timeline effect's duration.
-     *
-     * @param Pointer to a timeline info structure which is to be processed.
-     *
-     * @return KVibeStatusSuccess in case of successful processing, otherwise
-     *         one of Vibe error statuses.
-     */
-    static TInt TimelineDurationProcessEvent( 
-        TVibeTimeLineInfo* aTimelineInfo );
-        
-    /**
-     * Helper method for processing Repeat Bar events when calculating
-     * timeline effect's duration.
-     *
-     * @param Pointer to a timeline info structure which is to be processed.
-     *
-     * @return KVibeStatusSuccess in case of successful processing, otherwise
-     *         one of Vibe error statuses.
-     */
-    static TInt TimelineDurationProcessRepeatInStack( 
-        TVibeTimeLineInfo* aTimelineInfo );
-    };
-    
-#endif /* IVTHELPER_H */
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/ivtinternal.h	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,336 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Basis and timeline effects related constant, macro and function
-*               prototype definition header file. 
-*/
-
-#ifndef _HWRMHAPTICSVIBEIVTINTERNAL_H
-#define _HWRMHAPTICSVIBEIVTINTERNAL_H
-
-
-#include "ivtconstants.h"
-
-/**
- * A few typedefs for internal Vibe (integer) types
- */
- 
-typedef TUint16 TVibeIVTMessageTime;
-typedef TUint16 TVibeIVTEffectID;
-typedef TUint8  TVibeIVTOverrideFlags;
-typedef TInt8   TVibeIVTMagnitude;
-typedef TUint16 TVibeIVTFreqPer;
-typedef TUint8  TVibeIVTCount;
-
-/**
- * Number of bytes in a basis effect message
- */
-const TInt KVibeIvtMessageSize = 8;
-
-/**
- * Basis effect message types 
- */
-const TUint8 KVibeMessageTypeSetPeriodic         = 2;
-const TUint8 KVibeMessageTypeSetPeriodicModifier = 3;
-
-/**
- * Periodic type constants. MagSweep effects use KVibePeriodicTypeConstant
- * and Periodic effects KVibePeriodicTypeSquare.
- * Others are reserved for future developement.
- */
-const TInt KVibePeriodicTypeConstant         = 0;
-const TInt KVibePeriodicTypeSquare           = 1;
-const TInt KVibePeriodicTypeTriangle         = 2; // For future dev
-const TInt KVibePeriodicTypeSine             = 3; // For future dev
-const TInt KVibePeriodicTypeSawtooth         = 4; // For future dev
-const TInt KVibePeriodicTypeInvertedSawtooth = 5; // For future dev
-
-/**
- * Timeline effect message property types 
- */
-const TUint8 KVibeIvtPropertyTypeLaunchPlayback = 0xf1;
-const TUint8 KVibeIvtPropertyTypeRepeatBar      = 0xf2;
-const TUint8 KVibeIvtPropertyTypeEndOfList      = 0xff;
-const TUint8 KVibeIvtPropertyTypeEffectIdU8     = 0xe0;
-const TUint8 KVibeIvtPropertyTypeEffectIdU16    = 0xe1;
-const TUint8 KVibeIvtPropertyTypeTimeOffsetU16  = 0xe2;
-const TUint8 KVibeIvtPropertyTypeTimeOffsetU24  = 0xe3;
-const TUint8 KVibeIvtPropertyTypeTimeOffsetU32  = 0xe4;
-const TUint8 KVibeIvtPropertyTypeCountU8        = 0xe5;
-const TUint8 KVibeIvtPropertyTypeDurationMsU16  = 0xd0;
-const TUint8 KVibeIvtPropertyTypeMagnitudeS8    = 0xd1;
-const TUint8 KVibeIvtPropertyTypeFreqPeriodU16  = 0xd2;
-
-/**
- * Override flags
- */
-const TUint8 KVibeIvtOverrideFlagDuration   = ( 1 << 0 );
-const TUint8 KVibeIvtOverrideFlagMagnitude  = ( 1 << 1 );
-const TUint8 KVibeIvtOverrideFlagFreqPeriod = ( 1 << 2 );
-
-/**
- * Style mask
- */
-// #define VIBE_STYLE_MASK     0x0F
-const TInt KVibeStyleMask = 0x0f;
-
-/**
- * Wave type bit shift value and mask
- */
-const TInt KVibeWavetypeShift = 4;
-const TInt KVibeWavetypeMask  = 0xf0;
-
-/**
- * Const for repeat bar stack size
- */
-const TInt KRepeatBarStackMaxSize = 4;
-
-/**
- * Couple of firmware (IVT player) specific constants
- */
-const TInt KVibeFirmwareTimeInfinite = 0xFFFF;
-const TInt KVibeMaxFirmwareMagnitude = 127;
-/**
- * General macro for extracting bits from buffer (pointed by p) with mask (m)
- * and then shifting right with given shift (s) value
- */ 
-#define VIBE_GET_BIT_FIELD(p,m,s) \
-    ( ( *( p ) & ( m ) ) >> ( s ) )
-
-/**
- * Basis effect macros for extracting values from IVT buffer 
- */
-#define VIBE_IVT_GET_MESSAGE_TYPE(p) \
-    VIBE_GET_BIT_FIELD(p, 0xf0, 4)
-
-#define VIBE_IVT_GET_PERIODIC_DURATION(p) \
-    ( ( ( ( VIBE_GET_BIT_FIELD( ( p ) + 1, 0xff, 0 ) ) | \
-    ( VIBE_GET_BIT_FIELD( ( p ) + 2, 0x0f, 0 ) << 8 ) ) << 4 ) | \
-    ( VIBE_GET_BIT_FIELD( ( p ) + 7, 0xf0, 4 ) ) )
-
-#define VIBE_IVT_GET_PERIODIC_START_DELAY(p) \
-    ( VIBE_GET_BIT_FIELD( ( p ) + 2, 0xf0, 0 ) | \
-    ( VIBE_GET_BIT_FIELD( ( p ) + 3, 0xff, 0 ) << 4 ) )
-
-#define VIBE_IVT_GET_PERIODIC_MAGNITUDE(p) \
-    VIBE_GET_BIT_FIELD( ( p ) + 4, 0x7f, 0 )
-    
-#define VIBE_IVT_GET_PERIODIC_START_FLAG(p) \
-    VIBE_GET_BIT_FIELD( ( p ) + 4, 0x80, 7 )
-
-#define VIBE_IVT_GET_PERIODIC_TYPE(p) \
-    VIBE_GET_BIT_FIELD( ( p ) + 5, 0x0f, 0 )
-    
-#define VIBE_IVT_GET_PERIODIC_CONTROLMODE(p) \
-    VIBE_GET_BIT_FIELD( ( p ) + 7, 0x0f, 0 )
-    
-#define VIBE_IVT_GET_PERIODIC_FREQPER(p) \
-    ( VIBE_GET_BIT_FIELD( ( p ) + 5, 0xf0, 4 ) | \
-    ( VIBE_GET_BIT_FIELD( ( p ) + 6, 0xff, 0 ) << 4 ) )
-    
-#define VIBE_IVT_GET_PERIODIC_MODIFIER_IMPULSE_TIME(p) \
-    ( VIBE_GET_BIT_FIELD( ( p ) + 1, 0xff, 0 ) | \
-    ( VIBE_GET_BIT_FIELD( (p ) + 2, 0x3f, 0 ) << 8 ) )
-    
-#define VIBE_IVT_GET_PERIODIC_MODIFIER_FADE_TIME(p) \
-    ( VIBE_GET_BIT_FIELD( ( p ) + 3, 0xff, 0 ) | \
-    ( VIBE_GET_BIT_FIELD( ( p ) + 4, 0x3f, 0 ) << 8 ) )
-    
-#define VIBE_IVT_GET_PERIODIC_MODIFIER_IMPULSE_LEVEL(p) \
-    VIBE_GET_BIT_FIELD( ( p ) + 5, 0x7f, 0 )
-    
-#define VIBE_IVT_GET_PERIODIC_MODIFIER_FADE_LEVEL(p) \
-    VIBE_GET_BIT_FIELD( ( p ) + 6, 0x7f, 0 )
-
-/** 
- * Timeline effect specific macro 
- */
-#define VIBE_IVT_IS_OVERRIDE(p) \
-    ( 0xd0 == ( *( p ) & 0xf0 ) )
-
-/**
- * Macros to determine effect type macros */
-#define VIBE_IVT_IS_BASIS_EFFECT(p) \
-    ( 0 == ( 0x0f & *( p ) ) )
-    
-#define VIBE_IVT_IS_TIMELINE_EFFECT(p) \
-    ( 0xf0 == ( 0xf0 & *( p ) ) )
-
-/**
- * Structure for IVT header
- */
-struct TVibeIVTHeader
-    {
-    /**
-     * IVT file format major version. (In current version: 0x1)
-     */
-    TUint8 iVersionMajor;
-
-    /**
-     * IVT file format major version. (In current version: 0x0)
-     */
-    TUint8 iVersionMinor;
-    
-    /**
-     * Lower byte of Number of effects (within the IVT data)
-     */
-    TUint8 iEffects_0_7;
-    
-    /**
-     * Upper byte of Number of effects (within the IVT data)
-     */
-    TUint8 iEffects_8_15;
-
-    /** 
-     * Lower byte of effect storage block size
-     */
-    TUint8 iEffectStorageBlockSize_0_7;
-
-    /** 
-     * Upper byte of effect storage block size
-     */
-    TUint8 iEffectStorageBlockSize_8_15;
-    
-    /** 
-     * Lower byte of effect name block size
-     */
-    TUint8 iEffectNameBlockSize_0_7;
-    
-    /** 
-     * Upper byte of effect name block size
-     */
-    TUint8 iEffectNameBlockSize_8_15;
-    };
-
-/**
- * Structure for effect's envelope parameters (attack and fade params)
- */
-struct TVibeEnvelopeParams
-    {
-    /**
-     * Magnitude at the start of the envelope
-     */
-    TInt iAttackLevel;
-    
-    /**
-     * Time to reach the sustain level, in milliseconds
-     */
-    TInt iAttackTime;
-    
-    /**
-     * Magnitude at the end of the envelope
-     */
-    TInt iFadeLevel;
-    
-    /**
-     * Time to reach the fade level, in milliseonds
-     */
-    TInt iFadeTime;
-    };
-
-/**
- * Stucture for Periodic effect definition.
- */
-struct TVibePeriodicEffectDefinition
-    {
-    /**
-     * Type (bitmasked Wave Type) of the effect
-     */
-    TInt iType;
-
-    /**
-     * Magnitude of the effect
-     */
-    TInt iMagnitude;
-
-    /**
-     * Period of the effect
-     */
-    TInt iPeriod;
-    
-    /**
-     * Envelope params of the effect
-     */
-    TVibeEnvelopeParams iEnvelope;
-    };
-
-/**
- * Stucture for MagSweep effect definition.
- */                 
-struct TVibeMagSweepEffectDefinition
-    {
-    /**
-     * Magnitude of the effect
-     */
-    TInt iMagnitude;
-    
-    /**
-     * Envelope params of the effect
-     */
-    TVibeEnvelopeParams iEnvelope;            
-    };  
-
-/**
- * Union that contains either Periodic or MagSweep effect definition
- */
-union TVibeEffectDefTypeParams
-    {
-    /**
-     * Periodic effect definition
-     */
-    TVibePeriodicEffectDefinition iPeriodicEffectDefinition;
-    
-    /**
-     * MagSweep effect definition
-     */
-    TVibeMagSweepEffectDefinition iMagSweepEffectDefinition;
-    };
-
-/**
- * Structure for common effect parameters
- */
-struct TVibeEffectCommonParams
-    {
-    /** 
-     * Type of the effect
-     */
-    TInt iEffectType;           
-
-    /**
-     * Playing duration of the effect in milliseconds
-     */
-    TInt iDuration;        
-
-    /** 
-     * Control mode (a.k.a. Style) of the effect
-     */
-    TInt iControlMode;
-    };
-
-/**
- * Structure for complete effect definition 
- */
-struct TVibeEffectDefinition
-    {
-    /**
-     * Common effect parameters (a structure)
-     */
-    TVibeEffectCommonParams  iEffectCommonParams;
-    
-    /**
-     * Effect type specific parameters (an union)
-     */
-    TVibeEffectDefTypeParams iEffectTypeParams;
-    };
-
-#endif /* _HWRMHAPTICSVIBEIVTINTERNAL_H */
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/timelineivtgetters.h	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Timeline effect internal getters header file.
-*
-*/
-
-#ifndef TIMELINEIVTGETTERS_H
-#define TIMELINEIVTGETTERS_H
-
-
-#include "ivtinternal.h"
-
-/**
- * Utility class for getting various timeline effect specific information
- * from data buffer.
- */
-class TimelineIVTGetters
-    {
-public:
-    /**
-     * Method for getting the effect Id from effect data buffer.
-     * Takes pointer to the current position in effect data buffer (i.e.,
-     * position from which the Id is read) and sets the pointer to next
-     * position.
-     *
-     * @param aProp  Pointer to the current position in effect data buffer
-     * @param aPProp Double pointer to which new position in effect data
-     *               buffer is written (out param).
-     *
-     * @return Id of the effect (that is in current position of the effect
-     *         data buffer).
-     */
-    static TVibeIVTEffectID VibeIVTGetEffectID( const TUint8*  aProp,
-                                                const TUint8** aPProp );
-
-    /**
-     * Method for getting the effect time offset from effect data buffer.
-     * Takes pointer to the current position in effect data buffer (i.e.,
-     * position from which the time offset is read) and sets the pointer 
-     * to next position.
-     *
-     * @param aProp  Pointer to the current position in effect data buffer
-     * @param aPProp Double pointer to which new position in effect data
-     *               buffer is written (out param).
-     *
-     * @return Time offset of the effect (that is in current position of 
-     *         the effect data buffer).
-     */
-    static TInt VibeIVTGetTimeOffset( const TUint8*  aProp,
-                                      const TUint8** aPProp );
-
-    /**
-     * Method for getting the count value from effect data buffer.
-     * Takes pointer to the current position in effect data buffer (i.e.,
-     * position from which the count is read) and sets the pointer to next
-     * position.
-     *
-     * @param aProp  Pointer to the current position in effect data buffer
-     * @param aPProp Double pointer to which new position in effect data
-     *               buffer is written (out param).
-     *
-     * @return Count value (that is in current position of the effect
-     *         data buffer).
-     */
-    static TVibeIVTCount VibeIVTGetCount( const TUint8*  aProp,
-                                          const TUint8** aPProp );
-
-    /**
-     * Method for getting the effect duration from effect data buffer.
-     * Takes pointer to the current position in effect data buffer (i.e.,
-     * position from which the duration is read) and sets the pointer to next
-     * position.
-     *
-     * @param aProp  Pointer to the current position in effect data buffer
-     * @param aPProp Double pointer to which new position in effect data
-     *               buffer is written (out param).
-     *
-     * @return Duration of the effect (that is in current position of the 
-     *         effect data buffer).
-     */
-    static TVibeIVTMessageTime VibeIVTGetDuration( const TUint8*  aProp,
-                                                   const TUint8** aPProp );
-
-    /**
-     * Method for getting the effect magnitude from effect data buffer.
-     * Takes pointer to the current position in effect data buffer (i.e.,
-     * position from which the magnitude is read) and sets the pointer to next
-     * position.
-     *
-     * @param aProp  Pointer to the current position in effect data buffer
-     * @param aPProp Double pointer to which new position in effect data
-     *               buffer is written (out param).
-     *
-     * @return Magnitude of the effect (that is in current position of the 
-     *         effect data buffer).
-     */
-    static TVibeIVTMagnitude VibeIVTGetMagnitude( 
-        const TUint8*  aProp,
-        const TUint8** aPProp );
-
-    /**
-     * Method for getting the effect frequency period from effect data buffer.
-     * Takes pointer to the current position in effect data buffer (i.e.,
-     * position from which the frequency period is read) and sets the pointer
-     * to nextposition.
-     *
-     * @param aProp  Pointer to the current position in effect data buffer.
-     * @param aPProp Double pointer to which new position in effect data
-     *               buffer is written (out param).
-     *
-     * @return Frequency period of the effect (that is in current position of
-     *         the effect data buffer).
-     */
-    static TVibeIVTFreqPer VibeIVTGetFreqPer( const TUint8*  aProp,
-                                              const TUint8** aPProp );
-                                   
-    /**
-     * Method for getting the event time offset from effect data buffer.
-     * Takes pointer to the current position in effect data buffer (i.e.,
-     * position from which the event offset is read).
-     *
-     * @param aProp  Pointer to the current position in effect data buffer
-     *
-     * @return Time offset of the event (that is in current position of 
-     *         the effect data buffer). Time unit depends on the given data.
-     */
-    static TInt VibeIVTGetEventTimeOffset( const TUint8* aProp );
-
-private:
-
-    /**
-     * Method for getting the override values from effect data buffer.
-     * Takes pointer to the current position in effect data buffer (i.e.,
-     * position from which the overrides are read) and sets the pointer 
-     * to next position.
-     *
-     * @param aProp          Pointer to the current position in effect data 
-     *                       buffer.
-     * @param aOverrideFlags Override flags are read into this (out) param.
-     * @param aDuration      Override duration is read into this (out) param.
-     * @param aMagnitude     Override magnitude is read into this (out) param.
-     * @param aFreqPer       Override frequency period is read into this (out)
-     *                       param.
-     * @param aPProp         Double pointer to which new position in effect 
-     *                       data buffer is written (out param).
-     *
-     */
-    static void VibeIVTGetOverrides( const TUint8*          aProp,
-                                     TVibeIVTOverrideFlags* aOverrideFlags,
-                                     TVibeIVTMessageTime*   aDuration,
-                                     TVibeIVTMagnitude*     aMagnitude,
-                                     TVibeIVTFreqPer*       aFreqPer,
-                                     const TUint8**         aPProp );
-
-    /**
-     * Method for getting the launch playback event time offset from effect
-     * data buffer.
-     * 
-     * @param aProp  Pointer to the current position in effect data buffer.
-     *
-     * @return The time offset of the launch playback event. Time unit 
-     * depends on the given data.
-     */
-    static TInt VibeIVTGetLaunchPlaybackEventTimeOffset( 
-        const TUint8* aProp );
-
-    /**
-     * Method for getting the repeat bar event time offset from effect
-     * data buffer.
-     * 
-     * @param aProp  Pointer to the current position in effect data buffer.
-     *
-     * @return The time offset of the repeat bar event.  Time unit
-     * depends on the given data.
-     */
-    static TInt VibeIVTGetRepeatBarEventTimeOffset( const TUint8* aProp );      
-    };
-
-#endif /* TIMELINEIVTGETTERS_H*/
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/rom/hwrmhapticsivtgetterplugin.iby	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2008 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:  IBY file for effect data getter ECom plugin.
-*
-*/
-
-#ifndef HAPTICSIVTGETTERPLUGIN_IBY
-#define HAPTICSIVTGETTERPLUGIN_IBY
-
-#include <data_caging_paths_for_iby.hrh>
-
-ECOM_PLUGIN(hwrmhapticsivtgetterplugin.dll, hwrmhapticsivtgetterplugin.rsc)
-
-#endif // HAPTICSIVTGETTERPLUGIN_IBY
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/basisivtgetters.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2008 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:  IVT effect get functions' high level helper functions 
-*               (for basis effects) implementation file.
-*/
-
-#include "basisivtgetters.h"
-
-// ---------------------------------------------------------------------------
-// Gets the periodic effect data from the effect data buffer to which pointer
-// is given as argument.
-// ---------------------------------------------------------------------------
-//
-void BasisIVTGetters::VibeIVTGetPeriodic(
-        const TUint8* aMsg, 
-        TVibeIVTMessageTime* aDuration, 
-        TVibeIVTMessageTime* aStartDelay, 
-        TVibeIVTMagnitude* aMagnitude, 
-        TInt* aStartFlag, 
-        TInt* aType, 
-        TVibeIVTFreqPer* aFreqPer, 
-        TInt* aControlMode )
-    {
-    if ( aMsg )
-        {
-        if ( aDuration )
-            {
-            *aDuration = VIBE_IVT_GET_PERIODIC_DURATION( aMsg );
-            }
-        if ( aStartDelay )
-            {
-            *aStartDelay = VIBE_IVT_GET_PERIODIC_START_DELAY( aMsg );
-            }
-        if ( aMagnitude )
-            {
-            *aMagnitude = VIBE_IVT_GET_PERIODIC_MAGNITUDE( aMsg );
-            }
-        if ( aStartFlag )
-            {
-            *aStartFlag = VIBE_IVT_GET_PERIODIC_START_FLAG( aMsg );
-            }
-        if ( aType )
-            {
-            *aType = VIBE_IVT_GET_PERIODIC_TYPE( aMsg );
-            }
-        if ( aFreqPer )
-            {
-            *aFreqPer = VIBE_IVT_GET_PERIODIC_FREQPER( aMsg );
-            }
-        if ( aControlMode )
-            {
-            *aControlMode   = VIBE_IVT_GET_PERIODIC_CONTROLMODE( aMsg );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the periodic modifier data from the effect data buffer to which
-// pointer is given as argument.
-// ---------------------------------------------------------------------------
-//
-void BasisIVTGetters::VibeIVTGetPeriodicModifier( 
-        const TUint8* aMsg, 
-        TVibeIVTMessageTime* aImpulseTime, 
-        TVibeIVTMessageTime* aFadeTime, 
-        TVibeIVTMagnitude* aImpulseLevel, 
-        TVibeIVTMagnitude* aFadeLevel )
-    {
-    if ( aMsg )
-        {
-        if ( aImpulseTime )
-            {
-            *aImpulseTime =
-                VIBE_IVT_GET_PERIODIC_MODIFIER_IMPULSE_TIME( aMsg );
-            }
-        if ( aFadeTime )
-            {
-            *aFadeTime = VIBE_IVT_GET_PERIODIC_MODIFIER_FADE_TIME( aMsg );
-            }
-        if ( aImpulseLevel )
-            {
-            *aImpulseLevel =
-                VIBE_IVT_GET_PERIODIC_MODIFIER_IMPULSE_LEVEL( aMsg );
-            }
-        if ( aFadeLevel )
-            {
-            *aFadeLevel = VIBE_IVT_GET_PERIODIC_MODIFIER_FADE_LEVEL( aMsg );
-            }
-        }
-    }
-
-// end of file
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/hwrmhapticsivtgetter.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,560 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Plugin for reading effect information from IVT effect data.
-*
-*/
-
-#include <ecom/implementationproxy.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <hwrmhaptics.h>
-
-#include "hwrmhapticsivtgetter.h"
-#include "hwrmhapticstrace.h"
-#include "ivtinternal.h"
-#include "ivthelper.h"
-
-// ---------------------------------------------------------------------------
-// Constructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsIVTGetter::CHWRMHapticsIVTGetter()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// 2nd phase constructor.
-// ---------------------------------------------------------------------------
-//
-void CHWRMHapticsIVTGetter::ConstructL()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// 2-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsIVTGetter* CHWRMHapticsIVTGetter::NewL()
-    {
-    CHWRMHapticsIVTGetter* self = new ( ELeave ) CHWRMHapticsIVTGetter();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsIVTGetter::~CHWRMHapticsIVTGetter()
-    {
-    }
-    
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//    
-TInt CHWRMHapticsIVTGetter::GetEffectCount( const TDesC8& aData, 
-                                            TInt& aCount  )
-    {
-    TInt status( KErrArgument );
-    if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) )
-        {
-        aCount = IVTHelper::GetNumEffects( aData.Ptr() );        
-        status = KErrNone;
-        }
-    return status;
-    }
-    
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectName(  const TDesC8& aData,
-                                            TInt aEffectIndex, 
-                                            TDes8& aEffectName )
-    {
-    TUint8* effectNameData( 0 );
-    char effectNameTemp[KVibeMaxEffectNameLength];
-    memset( effectNameTemp, 0, 
-            KVibeMaxEffectNameLength * sizeof( char ) );
-    TInt status( KErrNone );
-
-    if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) &&
-         0 <= aEffectIndex && 
-         aEffectIndex < IVTHelper::GetNumEffects( aData.Ptr() ) )
-        {
-        effectNameData = IVTHelper::GetEffectNameData( aData.Ptr(), aEffectIndex );
-        if ( effectNameData )
-            {
-            // Convert the name from wchar (VibeWChar) into the 
-            // temporary char format buffer first
-            TInt stringSize = 
-                wcstombs( effectNameTemp, 
-                          reinterpret_cast<const wchar_t*>( effectNameData ), 
-                          KVibeMaxEffectNameLength );                          
-            if ( aData.Size() < stringSize )
-                {
-                status = KErrArgument;
-                }
-            else
-                {
-                aEffectName.Copy( reinterpret_cast<TUint8*>( effectNameTemp ),
-                                  stringSize );
-                }    
-            }
-        else
-            {
-            // IVT data doesn't contain effect name block
-            // so return empty string
-            aEffectName.Copy( KNullDesC );
-            }
-        }
-    else    
-        {
-        COMPONENT_TRACE( _L("ImmVibeGetIVTEffectName: invalid args.") );
-        status = KErrArgument;
-        }
-    return status;
-    }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectIndexFromName( const TDesC8& aData,
-                                                    const TDesC8& aEffectName,
-                                                    TInt& aEffectIndex )
-    {
-    TInt i( 0 );
-    TInt numEffects( 0 );
-    TInt status( KErrGeneral );
-
-    if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) )
-        {
-        HBufC8* temp = HBufC8::New( aEffectName.Size() + 1 );
-        if ( temp )
-            {
-            TPtr8 effectName = temp->Des();
-            effectName.Copy( aEffectName );
-            effectName.ZeroTerminate();
-        
-            aEffectIndex = KVibeInvalidIndex;
-            numEffects = IVTHelper::GetNumEffects( aData.Ptr() );
-            for (i = 0; i < numEffects; i++)
-                {
-                TUint8 *effectNameData = IVTHelper::GetEffectNameData( aData.Ptr(), i );
-                if ( effectNameData )
-                    {
-                    // Convert the name from wchar (VibeWChar) into char format
-                    char effectNameFromIVT[KVibeMaxEffectNameLength];
-                    memset( effectNameFromIVT, 0, 
-                            KVibeMaxEffectNameLength * sizeof( char ) );
-                    wcstombs( effectNameFromIVT, 
-                              reinterpret_cast<const wchar_t*>( effectNameData ),
-                              KVibeMaxEffectNameLength );
-                              
-                    if ( !strcmp( reinterpret_cast<const char*>
-                            ( effectName.Ptr() ), effectNameFromIVT ) )
-                        {
-                        // Match found, break from the for loop
-                        aEffectIndex = i;
-                        i = numEffects;
-                        status = KErrNone;
-                        }
-                    }
-                }       
-            delete temp;
-            temp = NULL;
-            }
-        }
-    else
-        {
-        COMPONENT_TRACE( _L("ImmVibeGetIVTEffectIndexFromName: invalid args.") );
-        status = KErrArgument;   
-        }
-    return status;
-    }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectType( const TDesC8& aData, 
-                                           TInt aEffectIndex, 
-                                           TInt& aEffectType )
-    {
-    TUint8 *effectPtr( 0 );
-    TInt status( KErrNone );
-
-    if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) &&
-         0 <= aEffectIndex && 
-         aEffectIndex < IVTHelper::GetNumEffects( aData.Ptr() ) )
-        {
-        aEffectType = 0;
-        effectPtr = IVTHelper::GetEffectStorage( aData.Ptr(), aEffectIndex );
-        if ( effectPtr )
-            {
-            // Skip over periodic modifier, if any
-            if ( KVibeMessageTypeSetPeriodicModifier == 
-                 VIBE_IVT_GET_MESSAGE_TYPE( effectPtr ) )
-                {
-                effectPtr += KVibeIvtMessageSize;
-                }
-            if ( KVibeMessageTypeSetPeriodic ==
-                 VIBE_IVT_GET_MESSAGE_TYPE( effectPtr ) )
-                {
-                // It is either MagSweep or Periodic effect
-                aEffectType = KVibePeriodicTypeConstant == 
-                               VIBE_IVT_GET_PERIODIC_TYPE( effectPtr ) ?
-                                CHWRMHaptics::EHWRMHapticsTypeMagSweep :
-                                CHWRMHaptics::EHWRMHapticsTypePeriodic;
-                }
-            else
-                {
-                // It has to be timeline effect
-                aEffectType = CHWRMHaptics::EHWRMHapticsTypeTimeline;    
-                }   
-            }
-        else
-            {
-            COMPONENT_TRACE( _L("ImmVibeGetIVTEffectType: GetEffectStorage failed.") );
-            status = KErrGeneral;
-            }
-        }
-    else    
-        {
-        COMPONENT_TRACE( _L("ImmVibeGetIVTEffectType: invalid args.") );
-        status = KErrArgument;
-        }
-
-    return status;
-    }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetMagSweepEffectDefinition( 
-                      const TDesC8& aData, 
-                      TInt aEffectIndex, 
-                      CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect )
-    {                                 
-    TVibeEffectDefinition effectDefinition;
-    TInt effectType( 0 );
-    TInt status ( KErrNone );
-
-    memset( &effectDefinition, 0, sizeof( effectDefinition ) );
-
-    // Validity of aEffectIndex is already done in ImmVibeGetIVTEffectType
-    // For params NULL values just mean "not to be returned"
-    if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) )
-        {
-        status = GetEffectType( aData, aEffectIndex, effectType );
-        if ( KErrNone == status )
-            {
-            if ( CHWRMHaptics::EHWRMHapticsTypeMagSweep == effectType )
-                {
-                status = 
-                    GetEffectByIndex( aData, 
-                                      aEffectIndex, 
-                                      &effectDefinition );
-                if ( KErrNone == status )
-                    {
-                    aEffect.iDuration = 
-                            effectDefinition.iEffectCommonParams.iDuration;
-
-                    aEffect.iMagnitude = 
-                            effectDefinition.iEffectTypeParams.
-                                iMagSweepEffectDefinition.iMagnitude;
-
-                    aEffect.iStyle = 
-                            effectDefinition.iEffectCommonParams.iControlMode;
-
-                    aEffect.iAttackTime = 
-                            effectDefinition.iEffectTypeParams.
-                                iMagSweepEffectDefinition.iEnvelope.
-                                    iAttackTime;
-
-                    aEffect.iAttackLevel = 
-                            effectDefinition.iEffectTypeParams.
-                                iMagSweepEffectDefinition.iEnvelope.
-                                    iAttackLevel;
-
-                    aEffect.iFadeTime =
-                            effectDefinition.iEffectTypeParams.
-                                iMagSweepEffectDefinition.iEnvelope.iFadeTime;
-
-                    aEffect.iFadeLevel = 
-                            effectDefinition.iEffectTypeParams.
-                                iMagSweepEffectDefinition.iEnvelope.
-                                    iFadeLevel;
-                    }
-                else
-                    {
-                    COMPONENT_TRACE( _L("ImmVibeGetIVTMagSweepEffectDefinition: VibeAPIInternalGetIVTEffectByIndex failed.") );
-                    }    
-                }
-            else
-                {
-                COMPONENT_TRACE( _L("ImmVibeGetIVTMagSweepEffectDefinition: EffectType invalid.") );
-                status = KErrNotSupported;
-                }
-            }
-        else
-            {
-            COMPONENT_TRACE( _L("ImmVibeGetIVTMagSweepEffectDefinition: ImmVibeGetIVTEffectType failed.") );
-            }
-        }
-    else
-        {
-        COMPONENT_TRACE( _L("ImmVibeGetIVTMagSweepEffectDefinition: invalid data buffer.") );
-        status = KErrArgument;
-        }
-    return status;
-    }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetPeriodicEffectDefinition( 
-                      const TDesC8& aData, 
-                      TInt aEffectIndex, 
-                      CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect )
-    {
-    TVibeEffectDefinition effectDefinition;
-    TInt effectType( 0 );
-    TInt status( KErrNone );
-
-    memset( &effectDefinition, 0, sizeof( effectDefinition ) );
-
-    // Validity of aEffectIndex is already done in ImmVibeGetIVTEffectType
-    // For params NULL values just mean "not to be returned"
-    if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) )
-        {
-        status = GetEffectType( aData, aEffectIndex, effectType );
-        if ( KErrNone == status )
-            {
-            if ( CHWRMHaptics::EHWRMHapticsTypePeriodic == effectType )
-                {
-                status = 
-                    GetEffectByIndex( aData, 
-                                      aEffectIndex, 
-                                      &effectDefinition );
-                if ( KErrNone == status )
-                    {
-                    aEffect.iDuration = 
-                            effectDefinition.iEffectCommonParams.iDuration;
-
-                    aEffect.iMagnitude = 
-                            effectDefinition.iEffectTypeParams.
-                                iPeriodicEffectDefinition.iMagnitude;
-
-                    aEffect.iPeriod = 
-                            effectDefinition.iEffectTypeParams.
-                                iPeriodicEffectDefinition.iPeriod;
-
-                    aEffect.iStyle = 
-                            (effectDefinition.iEffectCommonParams.iControlMode
-                             & KVibeStyleMask) | 
-                            ( ( effectDefinition.iEffectTypeParams.
-                                iPeriodicEffectDefinition.iType
-                                << KVibeWavetypeShift ) & KVibeWavetypeMask );
-
-                    aEffect.iAttackTime =
-                            effectDefinition.iEffectTypeParams.
-                                iPeriodicEffectDefinition.iEnvelope.
-                                    iAttackTime;
- 
-                    aEffect.iAttackLevel = 
-                            effectDefinition.iEffectTypeParams.
-                                iPeriodicEffectDefinition.iEnvelope.
-                                    iAttackLevel;
-
-                    aEffect.iFadeTime = 
-                            effectDefinition.iEffectTypeParams.
-                                iPeriodicEffectDefinition.iEnvelope.iFadeTime;
-
-                    aEffect.iFadeLevel = 
-                            effectDefinition.iEffectTypeParams.
-                                iPeriodicEffectDefinition.iEnvelope.
-                                    iFadeLevel;
-                    }
-                else
-                    {
-                    COMPONENT_TRACE( _L("ImmVibeGetIVTPeriodicEffectDefinition: VibeAPIInternalGetIVTEffectByIndex failed.") );    
-                    }    
-                }
-            else
-                {
-                COMPONENT_TRACE( _L("ImmVibeGetIVTPeriodicEffectDefinition: EffectType invalid.") );
-                status = KErrNotSupported;
-                }    
-            }
-        else
-            {
-            COMPONENT_TRACE( _L("ImmVibeGetIVTPeriodicEffectDefinition: ImmVibeGetIVTEffectType failed.") );
-            }    
-        }
-    else
-        {
-        COMPONENT_TRACE( _L("ImmVibeGetIVTPeriodicEffectDefinition: pIVT invalid.") );
-        status = KErrArgument;
-        }
-    return status;
-    }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectDuration( const TDesC8& aData, 
-                                               TInt aEffectIndex, 
-                                               TInt& aEffectDuration )
-    {
-    TInt status( KErrNone );
-
-    if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) &&
-         0 <= aEffectIndex && 
-         aEffectIndex < IVTHelper::GetNumEffects( aData.Ptr() ) )
-        {
-        aEffectDuration = 0;
-        TInt effectCount = 
-            IVTHelper::GetIVTEffectDuration( aData.Ptr(), aEffectIndex );
-        if ( effectCount < 0 )
-            {
-            COMPONENT_TRACE( _L("ImmVibeGetIVTEffectDuration failed.") );
-            aEffectDuration = 0;
-            status = effectCount;
-            }
-        else
-            {
-            // On success, GetIVTEffectDuration returns the duration
-            aEffectDuration = effectCount;
-            }
-        }
-    else 
-        {
-        COMPONENT_TRACE( _L("ImmVibeGetIVTEffectDuration: invalid args.") );
-        status = KErrArgument;
-        }
-            
-    return status;
-    }
-                            
-                         
-// ---------------------------------------------------------------------------
-// Internal helper method for getting effect definition by its index 
-// from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectByIndex( 
-                                      const TDesC8& aData,  
-                                      TInt aEffectIndex,  
-                                      TVibeEffectDefinition* aEffectDefinition )
-    {   
-    TInt periodicType;
-    TUint8* effectPtr;
-    TVibeEnvelopeParams envelope;
-    TInt status( KErrNone );
-
-    memset( &envelope, 0, sizeof( envelope ) );
-
-    if ( aEffectDefinition && IVTHelper::IsValidIVTAddress( aData.Ptr() ) && 
-         0 <= aEffectIndex && 
-         aEffectIndex < IVTHelper::GetNumEffects( aData.Ptr() ) )
-        {
-        memset( reinterpret_cast<void*>( aEffectDefinition ), 
-                0, 
-                sizeof( TVibeEffectDefinition ) );
-        effectPtr = IVTHelper::GetEffectStorage( aData.Ptr(), aEffectIndex );
-        if ( effectPtr )
-            {
-            // Get IVT basis effect envelope
-            if ( KVibeMessageTypeSetPeriodicModifier == 
-                 VIBE_IVT_GET_MESSAGE_TYPE( effectPtr ) )
-                {
-                IVTHelper::ExtractEnvelopeFromPacket( effectPtr, &envelope );
-                effectPtr += KVibeIvtMessageSize;
-                }
-            if ( KVibeMessageTypeSetPeriodic == 
-                 VIBE_IVT_GET_MESSAGE_TYPE( effectPtr ) )
-                {
-                // Get IVT basis effect definition excluding envelope
-                IVTHelper::ExtractEffectDefinitionFromPacket( 
-                    effectPtr, 
-                    aEffectDefinition, 
-                    &periodicType );
-                if ( KVibePeriodicTypeConstant == periodicType )
-                    {
-                    memcpy( &( aEffectDefinition->iEffectTypeParams.
-                                    iMagSweepEffectDefinition.iEnvelope ),
-                            &envelope, sizeof( envelope ) );
-                    }
-                else
-                    {
-                    memcpy( &( aEffectDefinition->iEffectTypeParams.
-                                    iPeriodicEffectDefinition.iEnvelope ),
-                            &envelope, sizeof( envelope ) );
-
-                    }
-                }
-            else
-                {
-                COMPONENT_TRACE( _L("VibeAPIInternalGetIVTEffectByIndex: Invalid vibe message type.") );
-                status = KErrGeneral;   
-                }    
-            }
-        else
-            {
-            COMPONENT_TRACE( _L("VibeAPIInternalGetIVTEffectByIndex: GetEffectStorage failed.") );
-            status = KErrGeneral;
-            }    
-        }
-    else
-        {
-        COMPONENT_TRACE( _L("VibeAPIInternalGetIVTEffectByIndex: invalid arguments.") ); 
-        status = KErrArgument;
-        }
-        
-    return status;
-    }
-                            
-                                
-
-//---------------------------------------------------------------------------
-// ImplementationTable[]
-//
-//---------------------------------------------------------------------------
-//
-const TImplementationProxy ImplementationTable[] = 
-    {
-    IMPLEMENTATION_PROXY_ENTRY( 0x20021203, CHWRMHapticsIVTGetter::NewL )
-    };
-
-//---------------------------------------------------------------------------
-// TImplementationProxy* ImplementationGroupProxy()
-//
-//---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
-    {
-    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
-    return ImplementationTable;
-    }
-   
-// End of file
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/ivthelper.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,774 +0,0 @@
-/*
-* Copyright (c) 2008 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:  IVT effect get functions' high level helper functions 
-*               implementation file.
-*/
-
-#include <string.h>
-#include <hwrmhaptics.h>
-
-#include "ivtinternal.h"
-#include "ivthelper.h"
-#include "timelineivtgetters.h"
-#include "basisivtgetters.h"
-
-// ---------------------------------------------------------------------------
-// Checks the validity of IVT header. I.e., basic sanity check.
-// ---------------------------------------------------------------------------
-//
-TBool IVTHelper::IsValidIVTAddress( const TUint8* aIVT )
-    {
-    TBool validity( EFalse );
-    // For now, all IVT have the following version number: 
-    //   major version number = 1, 
-    //   minor version number = 0
-    if ( aIVT &&
-         1 == GetIVTHeader( aIVT )->iVersionMajor &&
-         0 == GetIVTHeader( aIVT )->iVersionMinor )
-        {
-        if ( IsEmpty ( aIVT ) )
-            {
-            // IVT containing zero effects is considered valid.
-            validity = ETrue;
-            }
-        else
-            {
-            // For Non empty IVT, StorageDataSubBlock must start with 
-            // basic effect or timeline definition.
-            if ( VIBE_IVT_IS_BASIS_EFFECT( 
-                    GetStorageDataSubBlock( aIVT ) ) ||
-                 VIBE_IVT_IS_TIMELINE_EFFECT( 
-                    GetStorageDataSubBlock( aIVT ) ) )
-                {
-                validity = ETrue;
-                }
-            }
-        }
-    return validity;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the number of contained effect definitions from the effect data buffer.
-// For empty data buffer returns 0.
-// ---------------------------------------------------------------------------
-//
-TUint16 IVTHelper::GetNumEffects( const TUint8* aIVT ) 
-    {
-    return aIVT ? 
-        GetIVTHeader( aIVT )->iEffects_0_7 + 
-            ( GetIVTHeader( aIVT )->iEffects_8_15 << 8 ) : 0;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the effect storage of the given effect (as indicated by index 
-// argument) from the effect data buffer. 
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetEffectStorage( const TUint8* aIVT, TInt aEffectIndex ) 
-    { 
-    // First get the storage data subblock pointer, and then advance that 
-    // according to correct effect's storage offset.
-    // The offset is stored in two bytes (corresponding to the index of the 
-    // effect) of the storage offset subblock data area.
-    return ( IsEmpty( aIVT ) || aEffectIndex >= GetNumEffects( aIVT ) ) ? 0 : 
-            GetStorageDataSubBlock( aIVT ) 
-            + GetStorageOffsetSubBlock( aIVT )[2 * aEffectIndex]
-            + ( GetStorageOffsetSubBlock( aIVT )[2 * aEffectIndex + 1] << 8 );
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the the envelope params (attack and fade params) from the effect data.
-//       The effect data pointer must point to a specific effect data, not the
-//       whole effect data buffer as in above functions. 
-// ---------------------------------------------------------------------------
-//   
-TBool IVTHelper::ExtractEnvelopeFromPacket( const TUint8* aPacket, 
-                                            TVibeEnvelopeParams* aEnvelope )
-    {
-    TBool status( ETrue );
-    if ( aPacket && aEnvelope )
-        {
-        TVibeIVTMessageTime attackTime( 0 );
-        TVibeIVTMessageTime fadeTime( 0 );
-        TVibeIVTMagnitude attackLevel( 0 );
-        TVibeIVTMagnitude fadeLevel( 0 );
-
-        BasisIVTGetters::VibeIVTGetPeriodicModifier( aPacket,
-                                                     &attackTime,
-                                                     &fadeTime,
-                                                     &attackLevel,
-                                                     &fadeLevel );
-
-        aEnvelope->iAttackTime  = attackTime;
-        aEnvelope->iFadeTime    = fadeTime;
-        aEnvelope->iAttackLevel = ConvertToUserMagnitude( attackLevel );
-        aEnvelope->iFadeLevel   = ConvertToUserMagnitude( fadeLevel );
-        }
-    else
-        {
-        status = EFalse;
-        }
-    return status;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the the effect definition from the effect data.
-//       The effect data pointer must point to a specific effect data, not the
-//       whole effect data buffer as in above functions. 
-// ---------------------------------------------------------------------------
-// 
-TBool IVTHelper::ExtractEffectDefinitionFromPacket( 
-        const TUint8*          aPacket, 
-        TVibeEffectDefinition* aEffectDefinition, 
-        TInt*                  aPeriodicType )
-    {
-    TBool status( ETrue );
-    if ( aPacket && aEffectDefinition && aPeriodicType )
-        {
-        TVibeIVTMessageTime duration( 0 );
-        TVibeIVTMessageTime startDelay( 0 );
-        TVibeIVTMagnitude   magnitude( 0 );
-        TInt                type( 0 );
-        TVibeIVTFreqPer     freqPer( 0 );
-        TInt                controlMode( 0 );
-
-        BasisIVTGetters::VibeIVTGetPeriodic( aPacket,
-                                             &duration,
-                                             &startDelay,
-                                             &magnitude,
-                                             0,
-                                             &type,
-                                             &freqPer,
-                                             &controlMode );
-
-        *aPeriodicType = VIBE_IVT_GET_PERIODIC_TYPE( aPacket );
-
-        if ( KVibePeriodicTypeSquare == *aPeriodicType )
-            {
-            // Fill the Periodic specific definition data
-            aEffectDefinition->iEffectCommonParams.iEffectType = 
-                CHWRMHaptics::EHWRMHapticsTypePeriodic;
-            aEffectDefinition->iEffectCommonParams.iDuration = 
-                ConvertToUserDuration( duration );
-            aEffectDefinition->iEffectCommonParams.iControlMode = 
-                controlMode;
-            aEffectDefinition->iEffectTypeParams.
-                iPeriodicEffectDefinition.iType = type;
-            aEffectDefinition->iEffectTypeParams.
-                iPeriodicEffectDefinition.iPeriod = 
-                    ConvertToUserFrequency( freqPer );
-            aEffectDefinition->iEffectTypeParams.
-                iPeriodicEffectDefinition.iMagnitude = 
-                    ConvertToUserMagnitude( magnitude );
-            }
-        else if ( KVibePeriodicTypeConstant == *aPeriodicType )
-            {
-            // Fill the MagSweep specific definition data
-            aEffectDefinition->iEffectCommonParams.iEffectType = 
-                CHWRMHaptics::EHWRMHapticsTypeMagSweep;
-            aEffectDefinition->iEffectCommonParams.iDuration = 
-                ConvertToUserDuration( duration );
-            aEffectDefinition->iEffectCommonParams.iControlMode = 
-                controlMode;
-            aEffectDefinition->iEffectTypeParams.
-                iMagSweepEffectDefinition.iMagnitude = 
-                    ConvertToUserMagnitude( magnitude );
-            }
-        else
-            {
-            status = EFalse;
-            }    
-        }
-    else
-        {
-        status = EFalse;
-        }    
-    return status;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the effect name data of the given effect (as indicated by index 
-// argument) from the effect data buffer. 
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetEffectNameData( const TUint8* aIVT, TInt aEffectIndex ) 
-    {
-    // First get the name data subblock pointer, and then advance that
-    // according to effect's name offset.
-    // The offset is stored in two bytes (corresponding to the index of the 
-    // effect) of the name offset subblock data area.
-    return HasNameBlock( aIVT ) ?
-        ( GetNameDataSubBlock( aIVT ) 
-          + GetNameOffsetSubBlock( aIVT )[2 * aEffectIndex]
-          + ( GetNameOffsetSubBlock( aIVT )[2 * aEffectIndex + 1] << 8 ) ) :
-        0; 
-    }
-
-// ---------------------------------------------------------------------------
-//  GetIVTEffectDuration()
-//
-// IVT effect duration computation:
-// - For Basis effect: this function extracts duration from the BasicEffect 
-//   definition
-// - For Timeline effects, this function loops trough all the timeline events 
-//   and compute each basic effects's end time and keep the biggest value of
-//   them.
-//
-// The formula:
-// BasicEffect's End time = ZeroOffsetTime + EventOffsetTime + 
-//    EffectDuration (Effect definition's duration or override duration)
-//
-// Every time the end of repeat event is reached, "ZeroOffsetTime" is always 
-// adjusted (ZeroOffsetTime = ZeroOffsetTime + Repeat duration) and this ´
-// function goes back to the next event following the current repeat event.
-// 
-// Return values:
-//   -negative values: errors
-//   -Positive values: duration
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::GetIVTEffectDuration( const TUint8* aIVT, TInt aEffectIndex )
-    {
-    TInt status( KErrNone );
-    TInt duration( 0 );
-    
-    if ( aIVT && 0 <= aEffectIndex && aEffectIndex < GetNumEffects( aIVT ) )
-        {
-        TUint8* effectPtr( 0 );
-        TVibeTimeLineInfo timelineInfo;
-        memset( &timelineInfo, 0, sizeof( timelineInfo ) );
-        
-        timelineInfo.iOffsetSubBlock = 
-            reinterpret_cast<TUint8*>( GetIVTHeader( aIVT ) + 1 );
-        timelineInfo.iDataSubBlock = 
-            timelineInfo.iOffsetSubBlock
-            + 2*( GetIVTHeader( aIVT )->iEffects_0_7 
-                  + ( GetIVTHeader( aIVT )->iEffects_8_15 << 8 ) );
-        effectPtr = 
-            timelineInfo.iDataSubBlock 
-            + timelineInfo.iOffsetSubBlock[2*aEffectIndex] 
-            + ( timelineInfo.iOffsetSubBlock[2*aEffectIndex+1] << 8 );
-
-        // Effect type specific handling
-        if ( VIBE_IVT_IS_BASIS_EFFECT( effectPtr ) )
-            {
-            // Basis effect
-            // Skip any messages preceding the SetPeriodic message
-            while ( KVibeMessageTypeSetPeriodic != 
-                    VIBE_IVT_GET_MESSAGE_TYPE( effectPtr ) )
-                {
-                effectPtr += KVibeIvtMessageSize;
-                }
-            duration = ConvertToUserDuration( 
-                VIBE_IVT_GET_PERIODIC_DURATION( effectPtr ) );
-            }
-        else if ( VIBE_IVT_IS_TIMELINE_EFFECT( effectPtr ) )
-            {
-            // Timeline effect
-            timelineInfo.iNextEvent = effectPtr;
-            timelineInfo.iTimeRepeat = KVibeTimeInfinite;
-            timelineInfo.iRepeatBarStackTop = -1;
-
-            // Process the timeline effect
-            // The looping stops either:
-            //    - due to processing error (e.g. invalid effect data)
-            //    - when it has been determined that effect is 'infinite'
-            //    - when the whole effect has been processed
-            do
-            {
-            // Process next event or next closing of repeat bar,
-            // whichever comes first, provided that its time is up
-            if ( timelineInfo.iTimeEvent < timelineInfo.iTimeRepeat )
-                {
-                status = TimelineDurationProcessEvent( &timelineInfo );
-                }
-            else
-                {
-                status = 
-                    TimelineDurationProcessRepeatInStack( &timelineInfo );
-                }
-
-            // Only continue loop if the above succeeded and didn't result
-            // in infinite all effects end value
-            if ( KErrNone == status &&
-                 KVibeTimeInfinite != timelineInfo.iTimeAllEffectsEnd )
-                {
-                
-                // Check whether there are more events
-                if ( timelineInfo.iNextEvent )
-                    {
-                    // Update times for the next event handling round
-                    timelineInfo.iTimeEvent =
-                        TimelineIVTGetters::VibeIVTGetEventTimeOffset( 
-                            timelineInfo.iNextEvent );
-                    }
-                else
-                    {
-                    timelineInfo.iTimeEvent = KVibeTimeInfinite;
-                    }
-                
-                // Check whether there are more repeat bars in stack
-                if ( 0 <= timelineInfo.iRepeatBarStackTop )
-                    {
-                    // Update repeat time value for next repeat bar 
-                    // handling round
-                    timelineInfo.iTimeRepeat = 
-                        timelineInfo.iRepeatBarStack
-                            [timelineInfo.iRepeatBarStackTop].iTimeOffsetEnd;
-                    }
-                else
-                    {
-                    timelineInfo.iTimeRepeat = KVibeTimeInfinite;
-                    }
-                }
-            } while( KErrNone == status &&
-                     KVibeTimeInfinite != timelineInfo.iTimeAllEffectsEnd &&
-                     ! ( KVibeTimeInfinite == timelineInfo.iTimeEvent &&
-                         KVibeTimeInfinite == timelineInfo.iTimeRepeat ) );
-
-            duration = timelineInfo.iTimeAllEffectsEnd;
-            }
-        else
-            {
-            // Invalid effect type
-            status = KErrGeneral;
-            }
-        }
-    else
-        {
-        status = KErrGeneral;
-        }
-    // return either duration or error status
-    return KErrNone == status ? duration : status;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the TVibeIVTHeader from the effect data buffer. Basically just a cast
-// ---------------------------------------------------------------------------
-//
-TVibeIVTHeader* IVTHelper::GetIVTHeader( const TUint8* aIVT )
-    { 
-    return reinterpret_cast<TVibeIVTHeader*>( const_cast<TUint8*>( aIVT ) ); 
-    }
-
-// ---------------------------------------------------------------------------
-// Returns ETrue if data buffer is either empty or contains zero effects.
-// ---------------------------------------------------------------------------
-//
-TBool IVTHelper::IsEmpty( const TUint8* aIVT )
-    {
-    // If aIVT is NULL, the GetNumEffects returns 0, i.e., no need
-    // to check for NULL here.
-    return 0 == GetNumEffects( aIVT ) ? ETrue : EFalse;  
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the effect storage block size from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint16 IVTHelper::GetStorageBlockSize( const TUint8* aIVT ) 
-    { 
-    return IsEmpty( aIVT ) ? 0 : 
-        GetIVTHeader( aIVT )->iEffectStorageBlockSize_0_7 + 
-        ( GetIVTHeader( aIVT )->iEffectStorageBlockSize_8_15 << 8 ); 
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the effect storage block size from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint16 IVTHelper::GetNameBlockSize( const TUint8* aIVT ) 
-    { 
-    return IsEmpty( aIVT ) ? 0 : 
-        GetIVTHeader( aIVT )->iEffectNameBlockSize_0_7 + 
-        ( GetIVTHeader( aIVT )->iEffectNameBlockSize_8_15 << 8 );
-    }
-
-// ---------------------------------------------------------------------------
-// Returns ETrue if data buffer contains name block.
-// ---------------------------------------------------------------------------
-//
-TBool IVTHelper::HasNameBlock( const TUint8* aIVT ) 
-    { 
-    return 0 != GetNameBlockSize( aIVT ) ? ETrue : EFalse; 
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the storage block from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetStorageBlock( const TUint8* aIVT ) 
-    {
-    // Storage block starts after the IVT header
-    return IsEmpty( aIVT ) ? 0 : 
-        reinterpret_cast<TUint8*>( GetIVTHeader( aIVT ) + 1 ); 
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the storage offset subblock from the effect data buffer. 
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetStorageOffsetSubBlock( const TUint8* aIVT )
-    {
-    // The storage offset subblock is in the beginning of the storage block
-    return GetStorageBlock( aIVT ); 
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the storage data subblock from the effect data buffer. 
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetStorageDataSubBlock( const TUint8* aIVT )
-    {
-    // First get the storage offset subblock start point and then advance
-    // over the offsets (there are 2 bytes of offset value per effect)
-    return IsEmpty( aIVT ) ? 0 : 
-        GetStorageOffsetSubBlock( aIVT ) + 2* GetNumEffects( aIVT ); 
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the name block from the effect data buffer. 
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetNameBlock( const TUint8* aIVT ) 
-    {
-    // Name block starts right after the storage block
-    return IsEmpty( aIVT ) ? 0 : 
-        GetStorageBlock( aIVT ) + GetStorageBlockSize( aIVT ); 
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the name offset subblock from the effect data buffer. 
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetNameOffsetSubBlock( const TUint8* aIVT ) 
-    {
-    // Name offset subblock is in the beginning of the name block
-    return GetNameBlock( aIVT );
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the name data subblock from the effect data buffer. 
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetNameDataSubBlock( const TUint8* aIVT ) 
-    {
-    // First get the name offset subblock start point and then advance
-    // over the offsets (there are 2 bytes of offset value per effect)
-    return IsEmpty( aIVT ) ? 0 : 
-        GetNameOffsetSubBlock( aIVT ) + 2 * GetNumEffects( aIVT ); 
-    }
-
-
-// ---------------------------------------------------------------------------
-// Calculates the size of the effect data buffer. 
-// ---------------------------------------------------------------------------
-//
-TUint IVTHelper::GetIVTSize( const TUint8* aIVT)
-    {
-    TUint size( 0 );
-    if ( aIVT )
-        {
-        size = sizeof( TVibeIVTHeader )
-            + GetIVTHeader( aIVT )->iEffectNameBlockSize_0_7
-            + ( GetIVTHeader( aIVT )->iEffectNameBlockSize_8_15 << 8 )
-            + GetIVTHeader( aIVT )->iEffectStorageBlockSize_0_7
-            + ( GetIVTHeader( aIVT )->iEffectStorageBlockSize_8_15 << 8 );
-        }
-    return size;
-    }
-
-// ---------------------------------------------------------------------------
-// Converts magnitude from firmware to user interface representation
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::ConvertToUserMagnitude( TInt aFwMagnitude )
-    {
-    return ( aFwMagnitude * KHWRMHapticsMaxMagnitude ) / KVibeMaxFirmwareMagnitude; 
-    };
-    
-// ---------------------------------------------------------------------------
-// Converts duration from firmware to user interface representation
-// ---------------------------------------------------------------------------
-//  
-TInt IVTHelper::ConvertToUserDuration( TVibeIVTMessageTime aFwDuration )
-    {
-    return KVibeFirmwareTimeInfinite == aFwDuration ? KVibeTimeInfinite :
-            static_cast<TInt>( aFwDuration );
-    };
-
-// ---------------------------------------------------------------------------
-// Converts frequency from firmware to user interface representation
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::ConvertToUserFrequency( TVibeIVTFreqPer aFwFrequency )
-    {
-    // map received value to a value between 100 and 1000000
-    TInt tmpFreq = aFwFrequency >= 2900 ? 
-                    1000000 :
-                   aFwFrequency >= 2000 ? 
-                    static_cast<TInt>( ( aFwFrequency - 1900 ) * 1000 ) :
-                   aFwFrequency >= 1000 ? 
-                    static_cast<TInt>( ( aFwFrequency - 900 ) * 100 ) :
-                   aFwFrequency > 0 ?
-                    static_cast<TInt>( ( aFwFrequency + 10 ) * 10 ) :
-                    100;
-                    
-    return 1000000 / tmpFreq ;
-    };
-
-// ---------------------------------------------------------------------------
-// Helper function to process timeline events (substructures within timeline
-// effects).
-// Used by GetIVTEffectDuration in case it is called for timeline effect.
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::TimelineDurationProcessEvent( TVibeTimeLineInfo* aTimelineInfo )
-    {
-    TInt status( KErrNone );
-
-    if ( aTimelineInfo && aTimelineInfo->iNextEvent )
-        {
-        // pointer for propagating through the timeline info
-        const TUint8* propPtr = aTimelineInfo->iNextEvent;
-
-        // event specific handling
-        switch ( *propPtr )
-            {
-            case KVibeIvtPropertyTypeLaunchPlayback:
-                // Process launch playback event
-                {
-                TVibeIVTMessageTime timeLaunchEventDuration( 0 );
-                TBool overrides( EFalse );
-                TInt effectID = TimelineIVTGetters::VibeIVTGetEffectID( 
-                                    propPtr + 1, &propPtr );
-                TInt timeOffset = TimelineIVTGetters::VibeIVTGetTimeOffset( 
-                                    propPtr, &propPtr );
-                
-                // loop through overrides and save override duration if found
-                while ( VIBE_IVT_IS_OVERRIDE( propPtr ) )
-                    {
-                    // override-type specific handling
-                    switch ( *propPtr )
-                        {
-                        case KVibeIvtPropertyTypeDurationMsU16:
-                            {
-                            overrides = ETrue;
-                            timeLaunchEventDuration = 
-                                TimelineIVTGetters::VibeIVTGetDuration( 
-                                    propPtr, &propPtr );   
-                            if ( KVibeFirmwareTimeInfinite == 
-                                 timeLaunchEventDuration )
-                                {
-                                aTimelineInfo->iTimeAllEffectsEnd = 
-                                    KVibeTimeInfinite;
-                                }
-                            break;    
-                            }
-                        case KVibeIvtPropertyTypeMagnitudeS8:
-                            {
-                            // skip this, following updates propPtr correctly
-                            TimelineIVTGetters::VibeIVTGetMagnitude( 
-                                propPtr, &propPtr );
-                            break;
-                            }
-                        case KVibeIvtPropertyTypeFreqPeriodU16:
-                            {
-                            // skip this, following updates propPtr correctly
-                            TimelineIVTGetters::VibeIVTGetFreqPer( 
-                                propPtr, &propPtr );
-                            break;    
-                            }    
-                        }
-                    } // override looping
-
-                // We only need to continue if there was no override 
-                // for duration
-                if ( !overrides )
-                    {
-                    // No override for duration. Get the basis effect 
-                    // duration instead.
-                    // First, get a pointer to the beginning of the effect 
-                    // definition of the corresponding effect.
-                    TUint8* timelineBasisEffect = 
-                        aTimelineInfo->iDataSubBlock 
-                        + aTimelineInfo->iOffsetSubBlock[2*effectID] 
-                        + ( aTimelineInfo->iOffsetSubBlock[2*effectID+1]
-                            << 8 );
-                    
-                    // Skip any (possible) preceding messages before the
-                    // SetPeriodic message
-                    while ( KVibeMessageTypeSetPeriodic != 
-                            VIBE_IVT_GET_MESSAGE_TYPE( timelineBasisEffect ) )
-                        {
-                        timelineBasisEffect += KVibeIvtMessageSize;
-                        }
-                    
-                    timeLaunchEventDuration = 
-                        VIBE_IVT_GET_PERIODIC_DURATION( timelineBasisEffect );
-                        
-                    if ( KVibeFirmwareTimeInfinite == 
-                         timeLaunchEventDuration )
-                        {
-                        // Set the all effects end to infinite value
-                        aTimelineInfo->iTimeAllEffectsEnd = KVibeTimeInfinite;
-                        }
-                    }
-                    
-                if ( KVibeTimeInfinite != aTimelineInfo->iTimeAllEffectsEnd )
-                    {
-                    // If the all effects end value is not 'infinite',
-                    // we need to set that value to current effects end
-                    // value (but only if its later than the current all 
-                    // effects end value)
-                    TInt timeEffectEnd = 
-                        aTimelineInfo->iTimeOffsetZero 
-                        + ConvertToUserDuration( timeLaunchEventDuration )
-                        + timeOffset;
-                    if ( timeEffectEnd > aTimelineInfo->iTimeAllEffectsEnd )
-                        {
-                        aTimelineInfo->iTimeAllEffectsEnd = timeEffectEnd;
-                        }
-                    
-                    // also update the iNextEvent pointer (note this too has
-                    // only meaning if the all effects end value is not 
-                    // 'infinite'
-                    aTimelineInfo->iNextEvent = propPtr;
-                    }
-                break;
-                }
-            case KVibeIvtPropertyTypeRepeatBar:
-                {
-                // Process repeat playback event
-                TInt timeOffsetStart = 
-                    TimelineIVTGetters::VibeIVTGetTimeOffset( 
-                        propPtr + 1, &propPtr );
-                TInt timeOffsetEnd = 
-                    TimelineIVTGetters::VibeIVTGetTimeOffset( propPtr, &propPtr );
-                TInt count = 
-                    TimelineIVTGetters::VibeIVTGetCount( propPtr, &propPtr );
-                    
-                if ( KVibeRepeatCountInfinite == count )
-                    {
-                    aTimelineInfo->iTimeAllEffectsEnd = KVibeTimeInfinite;
-                    }
-                else if ( KRepeatBarStackMaxSize > 
-                          aTimelineInfo->iRepeatBarStackTop + 1 )
-                    {
-                    // Push repeat bar to repeat bar stack
-                    ++aTimelineInfo->iRepeatBarStackTop;
-                    TVibeRepeatBar& tmp =
-                        aTimelineInfo->iRepeatBarStack
-                            [aTimelineInfo->iRepeatBarStackTop];
-                    tmp.iTimeOffsetEnd = timeOffsetEnd;
-                    tmp.iTimeDuration = timeOffsetEnd - timeOffsetStart;
-                    tmp.iCount = count;
-                    tmp.iEvent = propPtr; // First event following this repeat
-                                          // event, could be outside the 
-                                          // repeat bar
-
-                    // update the iNextEvent pointer
-                    aTimelineInfo->iNextEvent = propPtr;
-                    }
-                else
-                    {
-                    // More than KHpeRepeatBarStackNum repeat bars in
-                    // the timeline. Bail out.
-                    status = KErrGeneral;
-                    }    
-                break;
-                }
-            case KVibeIvtPropertyTypeEndOfList:
-                {
-                // End of event list
-                aTimelineInfo->iNextEvent = 0;
-                break;
-                }
-            default:
-                {
-                status = KErrGeneral;
-                break;
-                }
-            }
-        }
-    else
-        {
-        status = KErrGeneral;   
-        }
-    return status;
-    }
-
-// ---------------------------------------------------------------------------
-// Helper function to process timeline repeat bars that are closing.
-// Used by GetIVTEffectDuration in case it is called for timeline effect.
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::TimelineDurationProcessRepeatInStack( 
-        TVibeTimeLineInfo* aTimelineInfo )
-    {
-    TInt status( KErrNone );
-    
-    // sanity check
-    if ( aTimelineInfo &&
-         0 <= aTimelineInfo->iRepeatBarStackTop &&
-         KVibeRepeatCountInfinite != 
-            aTimelineInfo->
-                iRepeatBarStack[aTimelineInfo->iRepeatBarStackTop].iCount )
-        {
-        // Processing needed only if count isn't already zero
-        if ( 0 < 
-             aTimelineInfo->
-                iRepeatBarStack[aTimelineInfo->iRepeatBarStackTop].iCount-- )
-            {
-            // update iNextEvent pointer
-            aTimelineInfo->iNextEvent = 
-                aTimelineInfo->iRepeatBarStack
-                    [aTimelineInfo->iRepeatBarStackTop].iEvent;
-
-            // Update the all effects end value if the end of repeat
-            // is later than the current value
-            TInt timeRepeat =
-                aTimelineInfo->iTimeOffsetZero 
-                + aTimelineInfo->
-                    iRepeatBarStack[aTimelineInfo->iRepeatBarStackTop].
-                        iTimeOffsetEnd;
-            if ( timeRepeat > aTimelineInfo->iTimeAllEffectsEnd )
-                {
-                aTimelineInfo->iTimeAllEffectsEnd = timeRepeat;
-                }
-            
-            // Add the repeat bar duration to the effect start time:
-            // repeating the last T time is like adding T to the ZeroTime
-            aTimelineInfo->iTimeOffsetZero += 
-                aTimelineInfo->iRepeatBarStack
-                    [aTimelineInfo->iRepeatBarStackTop].iTimeDuration;
-               
-            // If count has reached zero, update the repeat bar stack
-            // top value (the current top has now been handled)     
-            if (0 == aTimelineInfo->iRepeatBarStack
-                        [aTimelineInfo->iRepeatBarStackTop].iCount)
-                {
-                --aTimelineInfo->iRepeatBarStackTop;
-                }
-            }
-        }
-    else
-        {
-        status = KErrGeneral;
-        }
-    return status;
-    }
-
-// end of file
-
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/timelineivtgetters.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +0,0 @@
-/*
-* Copyright (c) 2008 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:  IVT effect get functions' high level helper functions 
-*               (for timeline effects) implementation file.
-*/
-
-#include "timelineivtgetters.h"
-
-// ---------------------------------------------------------------------------
-// Gets the effectID from the current location of the data as pointed by the
-// aProp pointer argument and advances the aPProp argument's pointer value to 
-// the next data location
-// ---------------------------------------------------------------------------
-//
-TVibeIVTEffectID TimelineIVTGetters::VibeIVTGetEffectID(    
-        const TUint8* aProp, 
-        const TUint8** aPProp )
-    {
-    TVibeIVTEffectID effectID( 0 );
-
-    // aPProp can be NULL if the caller doesn't want to retrieve it
-    if ( aProp )
-        {
-        switch ( *( aProp++ ) ) 
-            {
-            case KVibeIvtPropertyTypeEffectIdU16:
-                effectID |= *( aProp++ ) << 8;
-                // fall through
-            case KVibeIvtPropertyTypeEffectIdU8:
-                effectID |= *( aProp++ );
-                break;
-            default:
-                {
-                // We shouldn't come here
-                break;
-                }
-            }
-        if ( aPProp ) 
-            {
-            *aPProp = aProp;
-            }
-        }
-    return effectID;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the time offset from the current location of the data as pointed by 
-// the aProp pointer argument and advances the aPProp argument's pointer value 
-// to the next data location
-// ---------------------------------------------------------------------------
-//
-TInt TimelineIVTGetters::VibeIVTGetTimeOffset( const TUint8* aProp, 
-                                               const TUint8** aPProp )
-    {
-    TInt time( 0 );
-
-    // aPProp can be NULL if the caller doesn't want to retrieve it
-    if ( aProp )
-        {   
-        switch ( *( aProp++ ) ) 
-            {
-            case KVibeIvtPropertyTypeTimeOffsetU32:
-                time |= *( aProp++ ) << 24;
-                // fall through
-            case KVibeIvtPropertyTypeTimeOffsetU24: 
-                time |= *( aProp++ ) << 16;
-                // fall through
-            case KVibeIvtPropertyTypeTimeOffsetU16: 
-                time |= *( aProp++ ) << 8;
-                time |= *( aProp++ );
-                break;
-            default:
-                {
-                // We should never come here.
-                break;
-                }    
-            }
-        if ( aPProp )
-            {
-            *aPProp = aProp;
-            }
-        }
-    return time;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the count value from the current location of the data as pointed by 
-// the aProp pointer argument and advances the aPProp argument's pointer value
-// to the next data location
-// ---------------------------------------------------------------------------
-//
-TVibeIVTCount TimelineIVTGetters::VibeIVTGetCount( const TUint8* aProp,
-                                                   const TUint8** aPProp )
-    {
-    TVibeIVTCount count( 0 );
-
-    // aPProp can be NULL if the caller doesn't want to retrieve it
-    if ( aProp )
-        {
-        switch ( *( aProp++ ) ) 
-            {
-            case KVibeIvtPropertyTypeCountU8: 
-                count |= *( aProp++ );
-                break;
-            default:
-                {
-                // We should never come here.
-                break;
-                }
-            }
-        if ( aPProp ) 
-            {
-            *aPProp = aProp;
-            }
-        }
-    return count;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the duration value from the current location of the data as pointed by
-// the aProp pointer argument and advances the aPProp argument's pointer value
-// to the next data location
-// ---------------------------------------------------------------------------
-//
-TVibeIVTMessageTime TimelineIVTGetters::VibeIVTGetDuration( 
-        const TUint8* aProp,
-        const TUint8** aPProp )
-    {
-    TVibeIVTMessageTime duration( 0 );
-
-    // aPProp can be NULL if the caller doesn't want to retrieve it
-    if ( aProp )
-        {
-        switch ( *( aProp++ ) )
-            {
-            case KVibeIvtPropertyTypeDurationMsU16: 
-                duration |= *( aProp++ ) << 8;
-                duration |= *( aProp++ );
-                break;
-            default:
-                {
-                // We should never come here.
-                break;
-                }
-            }
-        if ( aPProp ) 
-            {
-            *aPProp = aProp;
-            }
-        }
-    return duration;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the magnitude from the current location of the data as pointed by the
-// aProp pointer argument and advances the aPProp argument's pointer value to 
-// the next data location
-// ---------------------------------------------------------------------------
-//
-TVibeIVTMagnitude TimelineIVTGetters::VibeIVTGetMagnitude( 
-        const TUint8* aProp, 
-        const TUint8** aPProp )
-    {
-    TVibeIVTMagnitude magnitude( 0 );
-
-    // aPProp can be NULL if the caller doesn't want to retrieve it
-    if ( aProp )
-        {
-        switch ( *( aProp++ ) ) 
-            {
-            case KVibeIvtPropertyTypeMagnitudeS8: 
-                magnitude |= *( aProp++ );
-                break;
-            default:
-                {
-                // We should never come here.
-                break;
-                }
-            }
-        if ( aPProp )
-            {
-            *aPProp = aProp;
-            }
-        }
-    return magnitude;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the frequency value from the current location of the data as pointed 
-// by the aProp pointer argument and advances the aPProp argument's pointer 
-// value to the next data location
-// ---------------------------------------------------------------------------
-//
-TVibeIVTFreqPer TimelineIVTGetters::VibeIVTGetFreqPer( 
-        const TUint8* aProp, 
-        const TUint8** aPProp )
-    {
-    TVibeIVTFreqPer freqper( 0 );
-
-    // aPProp can be NULL if the caller doesn't want to retrieve it
-    if ( aProp )
-        {
-        switch ( *( aProp++ ) ) 
-            {
-            case KVibeIvtPropertyTypeFreqPeriodU16: 
-                freqper |= *( aProp++ ) << 8;
-                freqper |= *( aProp++ );
-                break;
-            default:
-                {
-                // We should never come here.
-                break;
-                }
-            }
-        if ( aPProp )
-            {
-            *aPProp = aProp;
-            }
-        }
-    return freqper;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the event offset time from the current location of the 
-// data as pointed by the aProp pointer argument.
-// This is the generic version that usually is called and that in turn uses
-// the above more specific getters.
-// ---------------------------------------------------------------------------
-//
-TInt TimelineIVTGetters::VibeIVTGetEventTimeOffset( const TUint8* aProp )
-    {
-    // Default return value a time that's guaranteed to never play
-    TInt offset( KVibeTimeInfinite );
-    if ( aProp )
-        {
-        // Return the start time depending on the event type
-        switch ( *aProp ) 
-            {
-            case KVibeIvtPropertyTypeLaunchPlayback:
-                offset = VibeIVTGetLaunchPlaybackEventTimeOffset( aProp );
-                break;
-            case KVibeIvtPropertyTypeRepeatBar:
-                offset = VibeIVTGetRepeatBarEventTimeOffset( aProp );
-                break;
-            default:
-                {
-                // We should never come here.
-                break;
-                }
-            }
-        }
-    return offset;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the override value(s) from the current location of the data as pointed
-// by the aProp pointer argument and advances the aPProp argument's pointer 
-// value to the next data location
-// ---------------------------------------------------------------------------
-//
-void TimelineIVTGetters::VibeIVTGetOverrides( 
-        const TUint8* aProp, 
-        TVibeIVTOverrideFlags* aOverrideFlags, 
-        TVibeIVTMessageTime* aDuration, 
-        TVibeIVTMagnitude* aMagnitude, 
-        TVibeIVTFreqPer* aFreqPer, 
-        const TUint8** aPProp )
-    {
-    // aPProp can be NULL if the caller doesn't want to retrieve it
-    if ( aProp && aOverrideFlags && aDuration && aMagnitude && aFreqPer )
-        {
-        *aOverrideFlags = 0;
-        while ( VIBE_IVT_IS_OVERRIDE( aProp ) ) 
-            {
-            switch ( *aProp ) 
-                {
-                case KVibeIvtPropertyTypeDurationMsU16:
-                    *aOverrideFlags |= KVibeIvtOverrideFlagDuration;
-                    *aDuration = VibeIVTGetDuration( aProp, &aProp );
-                    break;
-                case KVibeIvtPropertyTypeMagnitudeS8:
-                    *aOverrideFlags |= KVibeIvtOverrideFlagMagnitude;
-                    *aMagnitude = VibeIVTGetMagnitude( aProp, &aProp );
-                    break;
-                case KVibeIvtPropertyTypeFreqPeriodU16:
-                    *aOverrideFlags |= KVibeIvtOverrideFlagFreqPeriod;
-                    *aFreqPer = VibeIVTGetFreqPer( aProp, &aProp );
-                    break;
-                default:
-                    {
-                    // We should never come here.
-                    break;
-                    }
-                }
-            }
-        if ( aPProp )
-            {
-            *aPProp = aProp;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the launch playback event offset time from the current location of the 
-// data as pointed by the aProp pointer argument
-// ---------------------------------------------------------------------------
-//
-TInt TimelineIVTGetters::VibeIVTGetLaunchPlaybackEventTimeOffset( 
-        const TUint8* aProp )
-    {
-    TInt offset( 0 );
-    if ( aProp )
-        {
-        VibeIVTGetEffectID( aProp + 1, &aProp ); // skip the return value
-        offset = VibeIVTGetTimeOffset( aProp, 0 );
-        }
-    return offset;    
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the repeat event offset time from the current location of the 
-// data as pointed by the aProp pointer argument
-// ---------------------------------------------------------------------------
-//
-TInt TimelineIVTGetters::VibeIVTGetRepeatBarEventTimeOffset( 
-        const TUint8* aProp )
-    {
-    return aProp ? VibeIVTGetTimeOffset( aProp + 1, 0 ) : 0;
-    }
-
-// end of file
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/data/20021206.rss	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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:  Vibe packetizer plugin's ECom resource file.
-*
-*/
-
-#include <ecom/registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
-    {
-    dll_uid = 0x20021206;
-    interfaces = 
-        {
-        INTERFACE_INFO
-            {
-            interface_uid = 0x20021205;
-            implementations = 
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid = 0x20021207;
-                    version_no = 1; 
-                    display_name = "";
-                    default_data = "";
-                    opaque_data = ""; 
-                    }
-                };
-            }
-        };
-    }
-
-// End of file
\ No newline at end of file
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/group/bld.inf	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Plugin for VibeTonz Haptics command packetizer.
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../rom/hwrmhapticsvibepacketizerplugin.iby CORE_OS_LAYER_IBY_EXPORT_PATH(hwrmhapticsvibepacketizerplugin.iby)
-
-PRJ_MMPFILES
-hwrmhapticsvibepacketizerplugin.mmp
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/group/hwrmhapticsvibepacketizerplugin.mmp	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Project definition file for Vibe Packetizer ECom plugin.
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET                  hwrmhapticsvibepacketizerplugin.dll
-TARGETTYPE              PLUGIN
-UID                     0x10009D8D 0x20021206
-
-CAPABILITY              CAP_ECOM_PLUGIN
-VENDORID                VID_DEFAULT
-
-SOURCEPATH              ../src
-SOURCE                  hwrmhapticsvibepacketizer.cpp
-
-USERINCLUDE             ../inc
-
-// Default system include paths for osext layer modules.
-OS_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE           /epoc32/include/stdapis
-
-SOURCEPATH              ../data
-START RESOURCE          20021206.rss
-TARGETPATH              ECOM_RESOURCE_DIR
-TARGET                  hwrmhapticsvibepacketizerplugin.rsc
-END
-
-LIBRARY                 euser.lib
-LIBRARY                 bafl.lib
-LIBRARY                 ecom.lib
-LIBRARY                 hwrmhapticspacketizer.lib
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/inc/hwrmhapticsvibeconstants.h	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2008 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:  VibeTonz related const definitions header file
-*
-*/
-
-#ifndef _HWRMHAPTICSVIBECONSTANTS_H
-#define _HWRMHAPTICSVIBECONSTANTS_H
-
-#include <e32def.h>
-#include <limits.h>
-
-/**
- *  Invalid index constant
- */
-const TInt KVibeInvalidIndex = -1;
-
-/**
- *  String maximum length constants 
- */
-const TInt KVibeMaxEffectNameLength       = 128; // Maximum effect name length
-const TInt KVibeMaxDeviceNameLength       = 64;  // Maximum device name length
-const TInt KVibeMaxCapabilityStringLength = 64;  // Maximum capability string length
-const TInt KVibeMaxPropertyStringLength   = 64;  // Maximum property string length
-
-/**
- * 'Infinite' time 
- */
-const TInt KVibeTimeInfinite = INT_MAX;
-
-/**
- *  Device Default priority value 
- */
-const TInt KVibeDevicePriorityDefault = 0;
-
-/**
- * 'Infinite' repeat count value
- */
-const TUint8 KVibeRepeatCountInfinite = 255;
-
-/**
- * Maximum size of streaming sample (in bytes)
- */
-const TInt KVibeMaxStreamingSampleSize = 255;
-
-/**
- * Data value types (used as property and capability data value type)
- */
-const TUint8 KVibeValuetypeUnspecified = 0;
-const TUint8 KVibeValuetypeInt32       = 1;         
-const TUint8 KVibeValuetypeBool        = 2;
-const TUint8 KVibeValuetypeString      = 3;
-
-/**
- *  Error and Return value codes.
- */
-// Success
-const TInt KVibeStatusSuccess = 0;
-
-// Effect is not playing
-const TInt KVibeWarningNotPlaying = 1;
-
-// Effect doesn't have enough priority to play,
-// higher priority effect is playing on the device
-const TInt KVibeWarningInsufficientPriority = 2;
-
-// Effects are disabled on the device
-const TInt KVibeWarningEffectsDisabled = 3;
-
-// Trying to resume an effect that is not paused
-const TInt KVibeWarningNotPaused = 4;
-
-// The API is already initialized (this code is obsolete)
-const TInt KVibeErrAlreadyInitialized = -1;
-
-// The API is not initialized
-const TInt KVibeErrNotInitialized = -2;
-
-// Invalid argument was used in a API function call
-const TInt KVibeErrInvalidArgument = -3;
-
-// Generic error
-const TInt KVibeErrFail = -4;
-
-// Incompatible Effect type has been passed into an API call
-const TInt KVibeErrIncompatibleEffectType = -5;
-
-// Incompatible Capability type was used in one of the following API call:
-//    -ImmVibeGetDeviceCapabilityString
-//    -ImmVibeSetDeviceCapabilityString
-//    -ImmVibeGetDeviceCapabilityInt32
-//    -ImmVibeGetDeviceCapabilityInt32
-const TInt KVibeErrIncompatibleCapabilityType = -6;
-
-// Incompatible Property type was used in on of the following API calls:
-//    -ImmVibeGetDevicePropertyString
-//    -ImmVibeSetDevicePropertyString
-//    -ImmVibeGetDevicePropertyBool
-//    -ImmVibeGetDevicePropertyInt32
-//    -ImmVibeSetDevicePropertyInt32 
-const TInt KVibeErrIncompatiblePropertyType = -7;
-
-// Access to the instance of haptics is locked until a valid license key is provided.
-// Use ImmVibeSetDevicePropertyString to set the license key.
-// The following API functions may return this error
-//    -ImmVibeGetDevicePropertyBool
-//    -ImmVibeSetDevicePropertyBool
-//    -ImmVibeGetDevicePropertyInt32
-//    -ImmVibeSetDevicePropertyInt32
-//    -ImmVibeGetDevicePropertyString
-//    -ImmVibeSetDevicePropertyString (except for setting the license key)
-//    -ImmVibePlayIVTEffect
-//    -ImmVibePlayIVTEffectRepeat
-//    -ImmVibeStopPlayingEffect
-//    -ImmVibePlayMagSweepEffect
-//    -ImmVibePlayPeriodicEffect
-//    -ImmVibeModifyPlayingMagSweepEffect
-//    -ImmVibeModifyPlayingPeriodicEffect
-//    -ImmVibeStopAllPlayingEffects
-const TInt KVibeErrDeviceNeedsLicense = -8;
-
-// Cannot allocate memory to complete the request
-const TInt KVibeErrNotEnoughMemory = -9;
-
-// ImmVibe service is not running
-const TInt KVibeErrServiceNotRunning = -10;
-
-// Insufficient priority to complete the request (insufficient license key priority)
-const TInt KVibeErrInsufficientPriority = -11;
-
-// ImmVibe service is busy and failed to complete the request
-const TInt KVibeErrServiceBusy = -12;
-
-#endif // _HWRMHAPTICSVIBECONSTANTS_H
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/inc/hwrmhapticsvibepacketizer.h	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,377 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Plugin for handling vibe command packages.
-*
-*/
-
-#ifndef C_HWRMHAPTICSVIBEPACKETIZER_H
-#define C_HWRMHAPTICSVIBEPACKETIZER_H
-
-#include <e32base.h>
-#include <hwrmhapticspacketizer.h>
-
-class CDesC8ArraySeg;
-
-/**
- *  ECom plugin for handling vibe command packages.
- *
- *  @lib hwrmhapticsvibepacketizerplugin.lib
- *  @since S60 v5.1
- */
-NONSHARABLE_CLASS( CHWRMHapticsVibePacketizer ): public CHWRMHapticsPacketizer
-    {
-public:
-
-    /**
-     * Two phased constructor.
-     * 
-     * @return An instance of haptics vibe packetizer.
-     */
-    static CHWRMHapticsVibePacketizer* NewL();
-
-    /**
-     * Destructor.
-     */
-    virtual ~CHWRMHapticsVibePacketizer();
-
-public: // From CHWRMHapticsPacketizer
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncOpenDeviceReq( THWRMLogicalActuators aLogicalActuator,
-                                   RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncCloseDeviceReq( TInt aDeviceHandle, RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncPlayMagSweepEffectReq( 
-                        TInt aDeviceHandle, 
-                        CHWRMHaptics::THWRMHapticsMagSweepEffect aEffect,
-                        RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncPlayPeriodicEffectReq( 
-                        TInt aDeviceHandle, 
-                        CHWRMHaptics::THWRMHapticsPeriodicEffect aEffect,
-                        RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncModifyPlayingMagSweepEffectReq( 
-                        TInt aDeviceHandle, 
-                        TInt aEffectHandle, 
-                        CHWRMHaptics::THWRMHapticsMagSweepEffect aEffect,
-                        RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncModifyPlayingPeriodicEffectReq( 
-                        TInt aDeviceHandle, 
-                        TInt aEffectHandle, 
-                        CHWRMHaptics::THWRMHapticsPeriodicEffect aEffect,
-                        RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncPausePlayingEffectReq( TInt aDeviceHandle,
-                                           TInt aEffectHandle,
-                                           RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncResumePausedEffectReq( TInt aDeviceHandle, 
-                                           TInt aEffectHandle,
-                                           RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncStopPlayingEffectReq( TInt aDeviceHandle, 
-                                          TInt aEffectHandle,
-                                          RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncStopAllPlayingEffectsReq( TInt aDeviceHandle,
-                                              RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncPlayEffectIncludeEffectDataReq( TInt aDeviceHandle,
-                                                    const TDesC8& aData, 
-                                                    TInt aEffectIndex,
-                                                    RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncPlayEffectRepeatIncludeEffectDataReq( TInt aDeviceHandle,
-                                                          const TDesC8& aData,
-                                                          TInt aEffectIndex, 
-                                                          TUint8 aRepeat,
-                                                          RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncPlayEffectRepeatNoDataReq( TInt aDeviceHandle,
-                                               TInt aEffectIndex, 
-                                               TUint8 aRepeat,
-                                               RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncPlayEffectNoDataReq( TInt aDeviceHandle,
-                                         TInt aEffectIndex,
-                                         RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncCreateStreamingEffectReq( TInt aDeviceHandle, 
-                                              RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncDestroyStreamingEffectReq( TInt aDeviceHandle,
-                                               TInt aEffectHandle,
-                                               RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncPlayStreamingSampleReq( TInt aDeviceHandle,
-                                            const TDesC8& aStreamingSample, 
-                                            TInt aEffectHandle,
-                                            RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncPlayStreamingSampleWithOffsetReq( 
-                                            TInt aDeviceHandle,
-                                            const TDesC8& aStreamingSample,
-                                            TInt aOffsetTime,
-                                            TInt aEffectHandle,
-                                            RBuf8& aBuffer );
-    
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncGetEffectStateReq( TInt aDeviceHandle, 
-                                       TInt aEffectHandle,
-                                       RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncSetDevicePropertyBoolReq( TInt aDeviceHandle, 
-                                              TBool aDevPropValue,
-                                              TInt aDevPropType,
-                                              RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncSetDevicePropertyIntReq( TInt aDeviceHandle, 
-                                             TInt aDevPropValue, 
-                                             TInt aDevPropType,
-                                             RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncSetDevicePropertyStringReq( TInt aDeviceHandle, 
-                                                const TDesC8& aDevPropValue,
-                                                TInt aDevPropType,
-                                                RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncSetPlatformLicenseKeyReq( TInt aDeviceHandle,
-                                              RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncGetDevicePropertyBoolReq( TInt aDeviceHandle,
-                                              TInt aDevPropType,
-                                              RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncGetDevicePropertyIntReq( TInt aDeviceHandle,
-                                             TInt aDevPropType,
-                                             RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncGetDevicePropertyStringReq( TInt aDeviceHandle,
-                                                TInt aDevPropType,
-                                                RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncGetDeviceCapabilityIntReq( TInt aDeviceHandle, 
-                                               TInt aDevCapType,
-                                               RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt EncGetDeviceCapabilityStringReq( TInt aDeviceHandle,
-                                                  TInt aDevCapType,
-                                                  RBuf8& aBuffer );
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual CDesC8ArraySeg* DecodeMessageL( const TDesC8& aData, 
-                                            TInt& aStatus );
-    
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt DeviceHandle();
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt InfiniteRepeat();
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt InfiniteDuration();
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt MaxEffectNameLength();
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt MaxDeviceNameLength();
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt MaxCapabilityStringLength();
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt MaxPropertyStringLength();
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt MaxStreamingSampleSize();
-
-    /**
-     * @see MHWRMHapticsPacketizer
-     */ 
-    virtual TInt DefaultDevicePriority();
-
-private:
-
-    /**
-     * Constructor.
-     */
-    CHWRMHapticsVibePacketizer();
-
-    /**
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-
-    /**
-     * Internal helper method. Fills Get Device Capability request data.
-     */
-    TInt EncGetDeviceCapabilityReqInternal( TInt aValueType,
-                                            TInt aDeviceHandle,
-                                            TInt aDevCapType,
-                                            RBuf8& aBuffer );
-                                                     
-    /**
-     * Internal helper method. Fills Get Device Property request data.
-     */                                                 
-    TInt EncGetDevicePropertyReqInternal( TInt aValueType,
-                                          TInt aDeviceHandle,
-                                          TInt aDevPropType,
-                                          RBuf8& aBuffer );
-    
-    /**
-     * Internal helper method. Fills Play Streaming Sample request data. 
-     */
-    TInt EncPlayStreamingSampleInternal( TInt aDeviceHandle,
-                                         TInt aEffectHandle,
-                                         const TDesC8& aStreamingSample,
-                                         TInt aOffsetTime,
-                                         RBuf8& aBuffer );
-
-    /**
-     * Maps Vibe error code to Symbian error code.
-     * 
-     * @param  aVibeError Vibe error code.
-     * @return Symbian system wide error code.
-     */
-    TInt MapError( TInt aVibeError );
-
-private: // data
-
-    /**
-     * Buffer for request data.
-     */ 
-    RBuf8 iReqBuf;
-    
-    /**
-     * Buffer for streaming or IVT data.
-     */ 
-    RBuf8 iDataBuf;
-
-    /**
-     * Array used for decoded values in DecodeMessageL. Owned.
-     */
-    CDesC8ArraySeg* iReturnArray;
-    
-    /**
-     * Stores the latest value of opened device handle. Initiated
-     * to KErrNotFound.
-     */
-    TInt iDeviceHandle;
-    };
-
-#endif // C_HWRMHAPTICSVIBEPACKETIZER_H
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/inc/hwrmhapticsvibepackets.h	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,735 +0,0 @@
-/*
-* Copyright (c) 2008 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:  VibeTonz API protocol packet definition header file
-*
-*/
-
-#ifndef _HWRMHAPTICSVIBEPACKETS_H_
-#define _HWRMHAPTICSVIBEPACKETS_H_
-
-/** 
- * Byte alignment is set to 1 byte boundary with this pragma.
- */
-#pragma pack( push, 1 )
-
-/**
- * Const for largest allowable packet size.  It is used
- * by packetizer functions that piggyback IVT or streaming 
- * data in their packets.
- */
-const TInt KVibePacketMaxSize = 0xFFFF;
-
-/**
- * Haptics command codes (VibeTonz API command codes)
- */
-const TUint16 KVibeCmdProtocolVersion             = 0xFF;
-const TUint16 KVibeCmdApiVersion                  = 0x00;
-const TUint16 KVibeCmdInitialize                  = 0x01;
-const TUint16 KVibeCmdTerminate                   = 0x02;
-const TUint16 KVibeCmdPlayBasisEffect             = 0x03;
-const TUint16 KVibeCmdPlayIVTEffectIncludeData    = 0x04;
-const TUint16 KVibeCmdPlayIVTEffectNoData         = 0x05;
-const TUint16 KVibeCmdModifyBasisEffect           = 0x06;
-const TUint16 KVibeCmdStopEffect                  = 0x07;
-const TUint16 KVibeCmdStopAllEffects              = 0x08;
-const TUint16 KVibeCmdGetDeviceCapabilities       = 0x09;
-const TUint16 KVibeCmdDebugBuffer                 = 0x0A;
-const TUint16 KVibeCmdResetDebugBuffer            = 0x0B;
-const TUint16 KVibeCmdStopDesignedBridge          = 0x0C;
-const TUint16 KVibeCmdGetDeviceState              = 0x0D;
-const TUint16 KVibeCmdSetKernelParameter          = 0x0E;
-const TUint16 KVibeCmdGetKernelParameter          = 0x0F;
-const TUint16 KVibeCmdSetDeviceProperty           = 0x10;
-const TUint16 KVibeCmdGetDeviceProperty           = 0x11;
-const TUint16 KVibeCmdOpenDevice                  = 0x12;
-const TUint16 KVibeCmdCloseDevice                 = 0x13;
-const TUint16 KVibeCmdStartDesignerBridge         = 0x14;
-const TUint16 KVibeCmdDeviceCount                 = 0x15;
-const TUint16 KVibeCmdPlayStreamingSample         = 0x16;
-const TUint16 KVibeCmdCreateStreamingEffect       = 0x17;
-const TUint16 KVibeCmdDestroyStreamingEffect      = 0x18;
-const TUint16 KVibeCmdPausePlayingEffect          = 0x19;
-const TUint16 KVibeCmdResumePausedEffect          = 0x1A;
-const TUint16 KVibeCmdGetEffectState              = 0x1B;
-const TUint16 KVibeCmdPlayMagSweepEffect          = 0x1C;
-const TUint16 KVibeCmdPlayPeriodicEffect          = 0x1D;
-const TUint16 KVibeCmdModifyPlayingMagSweepEffect = 0x1E;
-const TUint16 KVibeCmdModifyPlayingPeriodicEffect = 0x1F;
-const TUint16 KVibeCmdSetLicense                  = 0x20;
-
-/** 
- * Simple request struct contains just command code
- */
-struct TVibePacketSimpleRequest
-    {
-    TUint16  iCmdCode;
-    };
-
-/**
- * Simple response struct contains just command code and status.
- */
-struct TVibePacketSimpleResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    };
-
-/**
- * Packet structures for Protocol Version request and response
- * (Implemented since Mobile 2.0 protocol)
- */
-typedef TVibePacketSimpleRequest TVibePacketProtocolVersionRequest;
-
-struct TVibePacketProtocolVersionResponse
-    {
-    TUint16 iCmdCode;
-    TUint8  iVersionMinor;
-    TUint8  iVersionMajor;
-    };
-
-
-/**
- * Packet structures for API Version request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketApiVersionRequest;
-
-struct TVibePacketApiVersionResponse
-    {
-    TUint16 iCmdCode;
-    TUint8  iVersionMajor;
-    TUint8  iVersionMinor;
-    TUint8  iVersionBuild_7_0;
-    TUint8  iVersionBuild_15_8;
-    };
-
-/**
- * Packet structures for Initialize request and response
- */
-struct TVibePacketInitializeRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iVersionMajor;
-    TUint8  iVersionMinor;
-    TUint8  iVersionBuild_7_0;
-    TUint8  iVersionBuild_15_8;
-    };
-
-typedef TVibePacketSimpleResponse TVibePacketInitializeResponse;
-
-/**
- * Packet structures for Terminate request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketTerminateRequest;
-
-typedef TVibePacketSimpleResponse TVibePacketTerminateResponse;
-
-/** 
- * Packet structures for PlayBasisEffect request and response.
- * Used with following commands:
- *    - KVibeCmdPlayBasisEffect
- *    - KVibeCmdPlayMagSweepEffect 
- *    - KVibeCmdPlayPeriodicEffect
- */
-struct TVibePacketPlayBasisEffectRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    TUint8  iDuration_7_0;
-    TUint8  iDuration_15_8;
-    TUint8  iDuration_23_16;
-    TUint8  iDuration_31_24;
-    TUint8  iMagnitude_7_0;
-    TUint8  iMagnitude_15_8;
-    TUint8  iMagnitude_23_16;
-    TUint8  iMagnitude_31_24;
-    TUint8  iEffectTypeStyle;
-    TUint8  iPeriod_7_0;
-    TUint8  iPeriod_15_8;
-    TUint8  iPeriod_23_16;
-    TUint8  iPeriod_31_24;
-    TUint8  iImpulseTime_7_0;
-    TUint8  iImpulseTime_15_8;
-    TUint8  iImpulseTime_23_16;
-    TUint8  iImpulseTime_31_24;
-    TUint8  iImpulseLevel_7_0;
-    TUint8  iImpulseLevel_15_8;
-    TUint8  iImpulseLevel_23_16;
-    TUint8  iImpulseLevel_31_24;
-    TUint8  iFadeTime_7_0;
-    TUint8  iFadeTime_15_8;
-    TUint8  iFadeTime_23_16;
-    TUint8  iFadeTime_31_24;
-    TUint8  iFadeLevel_7_0;
-    TUint8  iFadeLevel_15_8;
-    TUint8  iFadeLevel_23_16;
-    TUint8  iFadeLevel_31_24;
-    };
-    
-struct TVibePacketPlayBasisEffectResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TUint8  iEffectHandle_7_0;
-    TUint8  iEffectHandle_15_8;
-    TUint8  iEffectHandle_23_16;
-    TUint8  iEffectHandle_31_24;
-    };
-
-/**  
- * Packet structures for PlayIVTEffect requests and responses.
- * Used with following commands:
- *    - KVibeCmdPlayIVTEffectIncludeData
- *    - KVibeCmdPlayIVTEffectNoData
- */
-struct TVibePacketPlayIVTEffectRequest
-    {
-    TUint16 iCmdCode;
-    TUint16 iIvtDataSize;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    TUint8  iIvtIndex_7_0;
-    TUint8  iIvtIndex_15_8;
-    TUint8  iRepeat;
-    TUint8  iIvtData[1];
-    };
-
-struct TVibePacketPlayIVTEffectResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TUint8  iEffectHandle_7_0;
-    TUint8  iEffectHandle_15_8;
-    TUint8  iEffectHandle_23_16;
-    TUint8  iEffectHandle_31_24;
-    };
-
-/** 
- * Packet structures for ModifyBasisEffect request and response.
- * Used with following commands:
- *    - KVibeCmdModifyBasisEffect
- *    - KVibeCmdModifyPlayingMagSweepEffect
- *    - KVibeCmdModifyPlayingPeriodicEffect
- */
-struct TVibePacketModifyBasisEffectRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    TUint8  iEffectHandle_7_0;
-    TUint8  iEffectHandle_15_8;
-    TUint8  iEffectHandle_23_16;
-    TUint8  iEffectHandle_31_24;
-    TUint8  iDuration_7_0;
-    TUint8  iDuration_15_8;
-    TUint8  iDuration_23_16;
-    TUint8  iDuration_31_24;
-    TUint8  iMagnitude_7_0;
-    TUint8  iMagnitude_15_8;
-    TUint8  iMagnitude_23_16;
-    TUint8  iMagnitude_31_24;
-    TUint8  iEffectTypeStyle;
-    TUint8  iPeriod_7_0;
-    TUint8  iPeriod_15_8;
-    TUint8  iPeriod_23_16;
-    TUint8  iPeriod_31_24;
-    TUint8  iImpulseTime_7_0;
-    TUint8  iImpulseTime_15_8;
-    TUint8  iImpulseTime_23_16;
-    TUint8  iImpulseTime_31_24;
-    TUint8  iImpulseLevel_7_0;
-    TUint8  iImpulseLevel_15_8;
-    TUint8  iImpulseLevel_23_16;
-    TUint8  iImpulseLevel_31_24;
-    TUint8  iFadeTime_7_0;
-    TUint8  iFadeTime_15_8;
-    TUint8  iFadeTime_23_16;
-    TUint8  iFadeTime_31_24;
-    TUint8  iFadeLevel_7_0;
-    TUint8  iFadeLevel_15_8;
-    TUint8  iFadeLevel_23_16;
-    TUint8  iFadeLevel_31_24;
-    };
-
-typedef TVibePacketSimpleResponse TVibePacketModifyBasisEffectResponse;
-
-/** 
- * Packet structures for StopEffect request and response
- */
-struct TVibePacketStopEffectRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iEffectHandle_7_0;
-    TUint8  iEffectHandle_15_8;
-    TUint8  iEffectHandle_23_16;
-    TUint8  iEffectHandle_31_24;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    };
-
-typedef TVibePacketSimpleResponse TVibePacketStopEffectResponse;
-
-/**
- * Packet structures for StopAllEffects request and response
- */
-struct TVibePacketStopAllEffectsRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    };
-
-typedef TVibePacketSimpleResponse TVibePacketStopAllEffectsResponse;
-
-/**
- * Packet structures for GetDeviceCapabilities request and response
- */
-struct TVibePacketGetDeviceCapabilitiesRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iCapabilityValueType;
-    TUint8  iDeviceIndex_7_0;
-    TUint8  iDeviceIndex_15_8;
-    TUint8  iDeviceIndex_23_16;
-    TUint8  iDeviceIndex_31_24;
-    TUint8  iCapabilityType_7_0;
-    TUint8  iCapabilityType_15_8;
-    TUint8  iCapabilityType_23_16;
-    TUint8  iCapabilityType_31_24;
-    };
-
-struct TVibePacketGetDeviceCapabilitiesResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TUint8  iCapabilityType_7_0;
-    TUint8  iCapabilityType_15_8;
-    TUint8  iCapabilityType_23_16;
-    TUint8  iCapabilityType_31_24;
-    TUint8  iCapabilityValueType;
-    TUint8  iSize;
-    TUint8  iCapabilityValue[1];
-    };
-
-/**
- * Packet structures for Get DebugBuffer request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketGetDebugBufferRequest;
-
-struct TVibePacketGetDebugBufferResponse
-    {
-    TUint16 iCmdCode;
-    TUint8  iBufferSize_7_0;
-    TUint8  iBufferSize_15_8;
-    TUint8  iBuffer[1];
-    };
-
-/**
- * Packet structures for ResetDebugBuffer request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketResetDebugBufferRequest;
-
-typedef TVibePacketSimpleResponse TVibePacketResetDebugBufferResponse;
-
-/**
- * Packet structures for Stop designer Bridge request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketStopDesignerBridgeRequest;
-
-typedef TVibePacketSimpleResponse TVibePacketStopDesignerBridgeResponse;
-
-/**
- * Packet structures for GetDeviceState request and response
- */
-struct TVibePacketGetDeviceStateRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceIndex_7_0;
-    TUint8  iDeviceIndex_15_8;
-    TUint8  iDeviceIndex_23_16;
-    TUint8  iDeviceIndex_31_24;
-    };
-
-struct TVibePacketGetDeviceStateResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TUint8  iDeviceState_7_0;
-    TUint8  iDeviceState_15_8;
-    TUint8  iDeviceState_23_16;
-    TUint8  iDeviceState_31_24;
-    };
-
-/**
- * Packet structures for Set Device Kernel Parameter request and response
- */
-struct TVibePacketSetKernelParameterRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceIndex_7_0;
-    TUint8  iDeviceIndex_15_8;
-    TUint8  iDeviceIndex_23_16;
-    TUint8  iDeviceIndex_31_24;
-    TUint8  iKernelParameterID_7_0;
-    TUint8  iKernelParameterID_15_8;
-    TUint8  iKernelParameterValue_7_0;
-    TUint8  iKernelParameterValue_15_8;
-    };
-
-struct TVibePacketSetKernelParameterResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TUint8  iKernelParameterID_7_0;
-    TUint8  iKernelParameterID_15_8;
-    };
-
-/**
- * Get Device Kernel Parameter request and response
- */
- struct TVibePacketGetKernelParameterRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceIndex_7_0;
-    TUint8  iDeviceIndex_15_8;
-    TUint8  iDeviceIndex_23_16;
-    TUint8  iDeviceIndex_31_24;
-    TUint8  iKernelParameterID_7_0;
-    TUint8  iKernelParameterID_15_8;
-    };
-
-struct TVibePacketGetKernelParameterResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TUint8  iKernelParameterID_7_0;
-    TUint8  iKernelParameterID_15_8;
-    TUint8  iKernelParameterValue_7_0;
-    TUint8  iKernelParameterValue_15_8;
-    };
-
-/** 
- * Packet structures for SetDeviceProperty request and response
- */
-struct TVibePacketSetDevicePropertyRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    TUint8  iPropertyType_7_0;
-    TUint8  iPropertyType_15_8;
-    TUint8  iPropertyType_23_16;
-    TUint8  iPropertyType_31_24;
-    TUint8  iPropertyValueType;
-    TUint8  iSize;
-    TUint8  iPropertyValue[1];
-    };
-
-struct TVibePacketSetDevicePropertyResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TUint8  iPropertyType_7_0;
-    TUint8  iPropertyType_15_8;
-    TUint8  iPropertyType_23_16;
-    TUint8  iPropertyType_31_24;
-    TUint8  iPropertyValueType;
-    };
-
-/**
- * Packet structures for GetDeviceProperty request and response
- */
-struct TVibePacketGetDevicePropertyRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iPropertyValueType;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    TUint8  iPropertyType_7_0;
-    TUint8  iPropertyType_15_8;
-    TUint8  iPropertyType_23_16;
-    TUint8  iPropertyType_31_24;
-    };
-
-struct TVibePacketGetDevicePropertyResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TUint8  iPropertyType_7_0;
-    TUint8  iPropertyType_15_8;
-    TUint8  iPropertyType_23_16;
-    TUint8  iPropertyType_31_24;
-    TUint8  iPropertyValueType;
-    TUint8  iSize;
-    TUint8  iPropertyValue[1];
-    };
-
-/**
- * Packet structures for OpenDevice 
- */
-struct TVibePacketOpenDeviceRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceIndex_7_0;
-    TUint8  iDeviceIndex_15_8;
-    TUint8  iDeviceIndex_23_16;
-    TUint8  iDeviceIndex_31_24;
-    };
-
-struct TVibePacketOpenDeviceResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    };
-
-/**
- * Packet structures for CloseDevice request and response
- */
-struct TVibePacketCloseDeviceRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    };
-
-typedef TVibePacketSimpleResponse TVibePacketCloseDeviceResponse;
-
-/**
- * Packet structures for Start designer Bridge request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketStartDesignedBridgeRequest;
-
-typedef TVibePacketSimpleResponse TVibePacketStartDesignedBridgeResponse;
-
-/**
- * Packet structures for DeviceCount request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketDeviceCountRequest;
-
-// Uses simple response packet struct where vibe_status contains 
-// the device count (or negative error value)
-typedef TVibePacketSimpleResponse TVibePacketDeviceCountResponse;
-
-/** 
- * Packet structures for Upload SPE data request and response
- */
-struct TVibePacketPlayStreamingSampleRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    TUint8  iEffectHandle_7_0;
-    TUint8  iEffectHandle_15_8;
-    TUint8  iEffectHandle_23_16;
-    TUint8  iEffectHandle_31_24;
-    TUint8  iSize;
-    TUint8  iEffectOffsetTime_7_0;
-    TUint8  iEffectOffsetTime_15_8;
-    TUint8  iStreamingData[1];
-    };
-
-typedef TVibePacketSimpleResponse TVibePacketPlayStreamingSampleResponse;
-
-/**
- * Packet structures for Create streaming effect request and response
- */
-struct TVibePacketCreateStreamingEffectRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    };
-
-struct TVibePacketCreateStreamingEffectResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TUint8  iEffectHandle_7_0;
-    TUint8  iEffectHandle_15_8;
-    TUint8  iEffectHandle_23_16;
-    TUint8  iEffectHandle_31_24;
-    };
-
-/**
- * Packet structures for Destroy streaming effect request and response
- */
-struct TVibePacketDestroyStreamingEffectRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iEffectHandle_7_0;
-    TUint8  iEffectHandle_15_8;
-    TUint8  iEffectHandle_23_16;
-    TUint8  iEffectHandle_31_24;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    };
-
-typedef TVibePacketSimpleResponse TVibePacketDestroyStreamingEffectResponse;
-
-/**
- * Packet structures for Pause Playing Effect request and response
- */
-struct TVibePacketPausePlayingEffectRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iEffectHandle_7_0;
-    TUint8  iEffectHandle_15_8;
-    TUint8  iEffectHandle_23_16;
-    TUint8  iEffectHandle_31_24;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    };
-    
-typedef TVibePacketSimpleResponse TVibePacketPausePlayingEffectResponse;
-
-/**
- * Packet structures for Resume Paused Effect request and response
- */
-typedef TVibePacketPausePlayingEffectRequest TVibePacketResumePlayingEffectRequest;
-
-typedef TVibePacketSimpleResponse TVibePacketResumePlayingEffectResponse;
-
-/**
- * Packet structures for Get effect state request and response
- */
-struct TVibePacketGetEffectStateRequest
-    {
-    TUint16 iCmdCode;
-    TUint8  iEffectHandle_7_0;
-    TUint8  iEffectHandle_15_8;
-    TUint8  iEffectHandle_23_16;
-    TUint8  iEffectHandle_31_24;
-    TUint8  iDeviceHandle_7_0;
-    TUint8  iDeviceHandle_15_8;
-    TUint8  iDeviceHandle_23_16;
-    TUint8  iDeviceHandle_31_24;
-    };
-
-struct TVibePacketGetEffectStateResponse
-    {
-    TUint16 iCmdCode;
-    TInt8   iVibeStatus;
-    TInt8   iEffectState;
-    };
-
-/**
- * Packet structures for license request and response
- * (Uses currently same packet structs as SetProperty)
- */
-typedef TVibePacketSetDevicePropertyRequest TVibePacketSetLicenseRequest;
-
-typedef TVibePacketSetDevicePropertyResponse TVibePacketSetLicenseResponse;
-
-/**
- * Packet union definition, useful for decoder function
- */
-union TVibePacket
-    {
-    TVibePacketSimpleRequest                  iSimpleReq;
-    TVibePacketSimpleResponse                 iSimpleRsp;
-    TVibePacketProtocolVersionRequest         iProtocolVersionReq;
-    TVibePacketProtocolVersionResponse        iProtocolVersionRsp;
-    TVibePacketApiVersionRequest              iAPIVersionReq;
-    TVibePacketApiVersionResponse             iAPIVersionRsp;
-    TVibePacketInitializeRequest              iInitializeReq;
-    TVibePacketInitializeResponse             iInitializeRsp;
-    TVibePacketTerminateRequest               iTerminateReq;
-    TVibePacketTerminateResponse              iTerminateRsp;
-    TVibePacketPlayBasisEffectRequest         iPlayBasisEffectReq;
-    TVibePacketPlayBasisEffectResponse        iPlayBasisEffectRsp;
-    TVibePacketPlayIVTEffectRequest           iPlayIVTEffectReq;
-    TVibePacketPlayIVTEffectResponse          iPlayIVTEffectRsp;
-    TVibePacketModifyBasisEffectRequest       iModifyBasisEffectReq;
-    TVibePacketModifyBasisEffectResponse      iModifyBasisEffectRsp;
-    TVibePacketStopEffectRequest              iStopEffectReq;
-    TVibePacketStopEffectResponse             iStopEffectRsp;
-    TVibePacketStopAllEffectsRequest          iStopAllEffectsReq;
-    TVibePacketStopAllEffectsResponse         iStopAllEffectsRsp;
-    TVibePacketGetDeviceCapabilitiesRequest   iGetDeviceCapsReq;
-    TVibePacketGetDeviceCapabilitiesResponse  iGetDeviceCapsRsp;
-    TVibePacketGetDebugBufferRequest          iDebugBufferReq;
-    TVibePacketGetDebugBufferResponse         iDebugBufferRsp;
-    TVibePacketResetDebugBufferRequest        iResetDebugBufferReq;
-    TVibePacketResetDebugBufferResponse       iResetDebugBufferRsp;
-    TVibePacketStopDesignerBridgeRequest      iStopDesignerBridgeReq;
-    TVibePacketStopDesignerBridgeResponse     iStopDesignerBridgeRsp;
-    TVibePacketGetDeviceStateRequest          iGetDeviceStateReq;
-    TVibePacketGetDeviceStateResponse         iGetDeviceStateRsp;
-    TVibePacketSetKernelParameterRequest      iSetKernelParamsReq;
-    TVibePacketSetKernelParameterResponse     iSetKernelParamsRsp;
-    TVibePacketGetKernelParameterRequest      iGetKernelParamsReq;
-    TVibePacketGetKernelParameterResponse     iGetKernelParamsRsp;
-    TVibePacketOpenDeviceRequest              iOpenDeviceReq;
-    TVibePacketOpenDeviceResponse             iOpenDeviceRsp;
-    TVibePacketCloseDeviceRequest             iCloseDeviceReq;
-    TVibePacketCloseDeviceResponse            iCloseDeviceRsp;
-    TVibePacketSetDevicePropertyRequest       iSetDevicePropertyReq;
-    TVibePacketSetDevicePropertyResponse      iSetDevicePropertyRsp;
-    TVibePacketGetDevicePropertyRequest       iGetDevicePropertyReq;
-    TVibePacketGetDevicePropertyResponse      iGetDevicePropertyRsp;
-    TVibePacketDeviceCountRequest             iGetDeviceCountReq;
-    TVibePacketDeviceCountResponse            iGetDeviceCountRsp;
-    TVibePacketStartDesignedBridgeRequest     iStartDesignerBridgeReq;
-    TVibePacketStartDesignedBridgeResponse    iStartDesignerBridgeRsp;
-    TVibePacketPlayStreamingSampleRequest     iPlayStreamingSampleReq;
-    TVibePacketPlayStreamingSampleResponse    iPlayStreamingSampleRsp;
-    TVibePacketCreateStreamingEffectRequest   iCreateStreamingEffectReq;
-    TVibePacketCreateStreamingEffectResponse  iCreateStreamingEffectRsp;
-    TVibePacketDestroyStreamingEffectRequest  iDestroyStreamingEffectReq;
-    TVibePacketDestroyStreamingEffectResponse iDestroyStreamingEffectRsp;
-    TVibePacketPausePlayingEffectRequest      iPausePlayingEffectReq;
-    TVibePacketPausePlayingEffectResponse     iPausePlayingEffectRsp;
-    TVibePacketResumePlayingEffectRequest     iResumePausedEffectReq;
-    TVibePacketResumePlayingEffectResponse    iResumePausedEffectRsp;
-    TVibePacketGetEffectStateRequest          iGetEffectStateReq;
-    TVibePacketGetEffectStateResponse         iGetEffectStateRsp;
-    TVibePacketSetLicenseRequest              iSetLicenseReq;
-    TVibePacketSetLicenseResponse             iSetLicenseRsp;
-    };
-
-/** 
- * The 1-byte alignment pack pragma definitions pop'ed out of stack.
- */
-#pragma pack( pop )
-
-#endif /* _HWRMHAPTICSVIBEPACKETS_H_ */
-
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/rom/hwrmhapticsvibepacketizerplugin.iby	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2008 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:  IBY file for the Vibe Packetizer plugin.
-*
-*/
-
-#ifndef HWRMHAPTICSVIBEPACKETIZERPLUGIN_IBY
-#define HWRMHAPTICSVIBEPACKETIZERPLUGIN_IBY
-
-#include <data_caging_paths_for_iby.hrh>
-
-ECOM_PLUGIN(hwrmhapticsvibepacketizerplugin.dll, hwrmhapticsvibepacketizerplugin.rsc)
-
-#endif // HWRMHAPTICSVIBEPACKETIZERPLUGIN_IBY
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/src/hwrmhapticsvibepacketizer.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1905 +0,0 @@
-/*
-* Copyright (c) 2008 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:  Plugin for handling vibe command packages.
-*
-*/
-
-#include <ecom/implementationproxy.h>
-#include <badesca.h> 
-#include <hwrmhaptics.h>
-
-#include "hwrmhapticsvibepacketizer.h"
-#include "hwrmhapticsvibepackets.h"
-#include "hwrmhapticsvibeconstants.h"
-
-// Default request message size (enough for any request message)
-const TInt KMsgDefaultSize = 80;
-
-// const for shifts
-const TInt KShiftByte = 8;
-const TInt KShift2Bytes = 16;
-const TInt KShift3Bytes = 24;
-
-const TInt KArrayElements = 10;
-
-// ---------------------------------------------------------------------------
-// Two phased constructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsVibePacketizer* CHWRMHapticsVibePacketizer::NewL()
-    {
-    CHWRMHapticsVibePacketizer* self = 
-        new ( ELeave ) CHWRMHapticsVibePacketizer();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsVibePacketizer::~CHWRMHapticsVibePacketizer()
-    {
-    iReqBuf.Close();
-    iDataBuf.Close();
-
-    if( iReturnArray )
-        {
-        delete iReturnArray;
-        iReturnArray = NULL;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Constructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsVibePacketizer::CHWRMHapticsVibePacketizer()
-    : iDeviceHandle( KErrNotFound )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// 2nd phase constructor.
-// ---------------------------------------------------------------------------
-//
-void CHWRMHapticsVibePacketizer::ConstructL()
-    {
-    User::LeaveIfError( iReqBuf.CreateMax( KMsgDefaultSize ) ); 
-    User::LeaveIfError( iDataBuf.CreateMax( KMsgDefaultSize ) );
-
-    iReturnArray = new (ELeave) CDesC8ArraySeg( KArrayElements );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncOpenDeviceReq( 
-    THWRMLogicalActuators aLogicalActuator, RBuf8& aBuffer )
-    {
-    TVibePacketOpenDeviceRequest* pReq = 
-        reinterpret_cast<TVibePacketOpenDeviceRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdOpenDevice;
-        pReq->iDeviceIndex_7_0 = 
-            static_cast<TUint8>( aLogicalActuator & 0xFF );
-        pReq->iDeviceIndex_15_8 = 
-            static_cast<TUint8>( ( aLogicalActuator >> KShiftByte ) & 0xFF );
-        pReq->iDeviceIndex_23_16 = 
-            static_cast<TUint8>( 
-                ( aLogicalActuator >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceIndex_31_24 = 
-            static_cast<TUint8>( 
-                ( aLogicalActuator >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof ( TVibePacketOpenDeviceRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncCloseDeviceReq( TInt aDeviceHandle, 
-                                                    RBuf8& aBuffer )
-    {
-    TVibePacketCloseDeviceRequest* pReq = 
-        reinterpret_cast<TVibePacketCloseDeviceRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdCloseDevice;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes) & 0xFF );
-        iReqBuf.SetLength( sizeof( TVibePacketCloseDeviceRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }    
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayMagSweepEffectReq( 
-    TInt aDeviceHandle, CHWRMHaptics::THWRMHapticsMagSweepEffect aEffect, 
-    RBuf8& aBuffer )
-    {
-    TVibePacketPlayBasisEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketPlayBasisEffectRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-    
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdPlayMagSweepEffect;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iDuration_7_0 = 
-            static_cast<TUint8>( aEffect.iDuration & 0xFF );
-        pReq->iDuration_15_8 = 
-            static_cast<TUint8>( ( aEffect.iDuration >> KShiftByte ) & 0xFF );
-        pReq->iDuration_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iDuration >> KShift2Bytes ) & 0xFF );
-        pReq->iDuration_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iDuration >> KShift3Bytes ) & 0xFF );
-        pReq->iMagnitude_7_0 = 
-            static_cast<TUint8>( aEffect.iMagnitude & 0xFF );
-        pReq->iMagnitude_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShiftByte ) & 0xFF );
-        pReq->iMagnitude_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShift2Bytes ) & 0xFF );
-        pReq->iMagnitude_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShift3Bytes ) & 0xFF );
-        pReq->iEffectTypeStyle = 
-            static_cast<TUint8>( ( aEffect.iStyle << 4 ) & 0xF0 );
-        pReq->iPeriod_7_0 = 0x0;
-        pReq->iPeriod_15_8 = 0x0;
-        pReq->iPeriod_23_16 = 0x0;
-        pReq->iPeriod_31_24 = 0x0;
-        pReq->iImpulseTime_7_0 = 
-            static_cast<TUint8>( aEffect.iAttackTime & 0xFF );
-        pReq->iImpulseTime_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShiftByte ) & 0xFF );
-        pReq->iImpulseTime_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShift2Bytes ) & 0xFF );
-        pReq->iImpulseTime_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShift3Bytes ) & 0xFF );
-        pReq->iImpulseLevel_7_0 = 
-            static_cast<TUint8>( aEffect.iAttackLevel & 0xFF );
-        pReq->iImpulseLevel_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShiftByte ) & 0xFF );
-        pReq->iImpulseLevel_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShift2Bytes ) & 0xFF );
-        pReq->iImpulseLevel_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShift3Bytes ) & 0xFF );
-        pReq->iFadeTime_7_0 = 
-            static_cast<TUint8>( aEffect.iFadeTime & 0xFF );
-        pReq->iFadeTime_15_8 = 
-            static_cast<TUint8>( ( aEffect.iFadeTime >> KShiftByte ) & 0xFF );
-        pReq->iFadeTime_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeTime >> KShift2Bytes ) & 0xFF );
-        pReq->iFadeTime_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeTime >> KShift3Bytes ) & 0xFF );
-        pReq->iFadeLevel_7_0 = 
-            static_cast<TUint8>( aEffect.iFadeLevel & 0xFF );
-        pReq->iFadeLevel_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShiftByte ) & 0xFF );
-        pReq->iFadeLevel_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShift2Bytes ) & 0xFF );
-        pReq->iFadeLevel_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof( TVibePacketPlayBasisEffectRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayPeriodicEffectReq( TInt aDeviceHandle,
-    CHWRMHaptics::THWRMHapticsPeriodicEffect aEffect, RBuf8& aBuffer )
-    {
-    TVibePacketPlayBasisEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketPlayBasisEffectRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdPlayPeriodicEffect;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iDuration_7_0 = 
-            static_cast<TUint8>( aEffect.iDuration & 0xFF );
-        pReq->iDuration_15_8 = 
-            static_cast<TUint8>( ( aEffect.iDuration >> KShiftByte ) & 0xFF );
-        pReq->iDuration_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iDuration >> KShift2Bytes ) & 0xFF );
-        pReq->iDuration_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iDuration >> KShift3Bytes ) & 0xFF );
-        pReq->iMagnitude_7_0 = 
-            static_cast<TUint8>( aEffect.iMagnitude & 0xFF );
-        pReq->iMagnitude_15_8 = 
-            static_cast<TUint8>(    
-                ( aEffect.iMagnitude >> KShiftByte ) & 0xFF );
-        pReq->iMagnitude_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShift2Bytes ) & 0xFF );
-        pReq->iMagnitude_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShift3Bytes ) & 0xFF );
-        pReq->iEffectTypeStyle = 
-            static_cast<TUint8>( ( ( aEffect.iStyle << 4 ) & 0xF0 ) | 0x01 );
-        pReq->iPeriod_7_0 = 
-            static_cast<TUint8>( aEffect.iPeriod & 0xFF );
-        pReq->iPeriod_15_8 = 
-            static_cast<TUint8>( ( aEffect.iPeriod >> KShiftByte ) & 0xFF );
-        pReq->iPeriod_23_16 = 
-            static_cast<TUint8>( ( aEffect.iPeriod >> KShift2Bytes ) & 0xFF );
-        pReq->iPeriod_31_24 = 
-            static_cast<TUint8>( ( aEffect.iPeriod >> KShift3Bytes ) & 0xFF );
-        pReq->iImpulseTime_7_0 = 
-            static_cast<TUint8>( aEffect.iAttackTime & 0xFF );
-        pReq->iImpulseTime_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShiftByte ) & 0xFF );
-        pReq->iImpulseTime_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShift2Bytes ) & 0xFF );
-        pReq->iImpulseTime_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShift3Bytes ) & 0xFF );
-        pReq->iImpulseLevel_7_0 = 
-            static_cast<TUint8>( aEffect.iAttackLevel & 0xFF );
-        pReq->iImpulseLevel_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShiftByte ) & 0xFF );
-        pReq->iImpulseLevel_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShift2Bytes ) & 0xFF );
-        pReq->iImpulseLevel_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShift3Bytes ) & 0xFF );
-        pReq->iFadeTime_7_0 = 
-            static_cast<TUint8>( aEffect.iFadeTime & 0xFF );
-        pReq->iFadeTime_15_8 = 
-            static_cast<TUint8>( ( aEffect.iFadeTime >> KShiftByte ) & 0xFF );
-        pReq->iFadeTime_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeTime >> KShift2Bytes ) & 0xFF );
-        pReq->iFadeTime_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeTime >> KShift3Bytes ) & 0xFF );
-        pReq->iFadeLevel_7_0 = 
-            static_cast<TUint8>( aEffect.iFadeLevel & 0xFF );
-        pReq->iFadeLevel_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShiftByte ) & 0xFF );
-        pReq->iFadeLevel_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShift2Bytes ) & 0xFF );
-        pReq->iFadeLevel_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof( TVibePacketPlayBasisEffectRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-    
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncModifyPlayingMagSweepEffectReq( 
-    TInt aDeviceHandle, TInt aEffectHandle, 
-    CHWRMHaptics::THWRMHapticsMagSweepEffect aEffect, RBuf8& aBuffer )
-    {
-    TVibePacketModifyBasisEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketModifyBasisEffectRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdModifyPlayingMagSweepEffect;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iEffectHandle_7_0 = 
-            static_cast<TUint8>( aEffectHandle & 0xFF );
-        pReq->iEffectHandle_15_8 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
-        pReq->iEffectHandle_23_16 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iEffectHandle_31_24 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iDuration_7_0 = 
-            static_cast<TUint8>( aEffect.iDuration & 0xFF );
-        pReq->iDuration_15_8 = 
-            static_cast<TUint8>( ( aEffect.iDuration >> KShiftByte ) & 0xFF );
-        pReq->iDuration_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iDuration >> KShift2Bytes ) & 0xFF );
-        pReq->iDuration_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iDuration >> KShift3Bytes ) & 0xFF );
-        pReq->iMagnitude_7_0 = 
-            static_cast<TUint8>( aEffect.iMagnitude & 0xFF );
-        pReq->iMagnitude_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShiftByte ) & 0xFF );
-        pReq->iMagnitude_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShift2Bytes ) & 0xFF );
-        pReq->iMagnitude_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShift3Bytes ) & 0xFF );
-        pReq->iEffectTypeStyle = 
-            static_cast<TUint8>( ( aEffect.iStyle << 4 ) & 0xF0 );
-        pReq->iPeriod_7_0 = 0x0;
-        pReq->iPeriod_15_8 = 0x0;
-        pReq->iPeriod_23_16 = 0x0;
-        pReq->iPeriod_31_24 = 0x0;
-        pReq->iImpulseTime_7_0 = 
-            static_cast<TUint8>( aEffect.iAttackTime & 0xFF );
-        pReq->iImpulseTime_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShiftByte ) & 0xFF );
-        pReq->iImpulseTime_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShift2Bytes ) & 0xFF );
-        pReq->iImpulseTime_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShift3Bytes ) & 0xFF );
-        pReq->iImpulseLevel_7_0 = 
-            static_cast<TUint8>( aEffect.iAttackLevel & 0xFF );
-        pReq->iImpulseLevel_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShiftByte ) & 0xFF );
-        pReq->iImpulseLevel_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShift2Bytes ) & 0xFF );
-        pReq->iImpulseLevel_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShift3Bytes ) & 0xFF );
-        pReq->iFadeTime_7_0 = 
-            static_cast<TUint8>( aEffect.iFadeTime & 0xFF );
-        pReq->iFadeTime_15_8 = 
-            static_cast<TUint8>( ( aEffect.iFadeTime >> KShiftByte ) & 0xFF );
-        pReq->iFadeTime_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeTime >> KShift2Bytes ) & 0xFF );
-        pReq->iFadeTime_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeTime >> KShift3Bytes ) & 0xFF );
-        pReq->iFadeLevel_7_0 = 
-            static_cast<TUint8>( aEffect.iFadeLevel & 0xFF );
-        pReq->iFadeLevel_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShiftByte ) & 0xFF );
-        pReq->iFadeLevel_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShift2Bytes ) & 0xFF );
-        pReq->iFadeLevel_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof( TVibePacketModifyBasisEffectRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        } 
-    
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncModifyPlayingPeriodicEffectReq( 
-    TInt aDeviceHandle, TInt aEffectHandle, 
-    CHWRMHaptics::THWRMHapticsPeriodicEffect aEffect, RBuf8& aBuffer )
-    {
-    TVibePacketModifyBasisEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketModifyBasisEffectRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdModifyPlayingPeriodicEffect;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iEffectHandle_7_0 = 
-            static_cast<TUint8>( aEffectHandle & 0xFF );
-        pReq->iEffectHandle_15_8 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
-        pReq->iEffectHandle_23_16 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iEffectHandle_31_24 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iDuration_7_0 = 
-            static_cast<TUint8>( aEffect.iDuration & 0xFF );
-        pReq->iDuration_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iDuration >> KShiftByte ) & 0xFF );
-        pReq->iDuration_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iDuration >> KShift2Bytes ) & 0xFF );
-        pReq->iDuration_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iDuration >> KShift3Bytes ) & 0xFF );
-        pReq->iMagnitude_7_0 = 
-            static_cast<TUint8>( aEffect.iMagnitude & 0xFF );
-        pReq->iMagnitude_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShiftByte ) & 0xFF );
-        pReq->iMagnitude_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShift2Bytes ) & 0xFF );
-        pReq->iMagnitude_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iMagnitude >> KShift3Bytes ) & 0xFF );
-        pReq->iEffectTypeStyle = 
-            static_cast<TUint8>( ( ( aEffect.iStyle << 4 ) & 0xF0 ) | 0x01 );
-        pReq->iPeriod_7_0 = 
-            static_cast<TUint8>( aEffect.iPeriod & 0xFF );
-        pReq->iPeriod_15_8 = 
-            static_cast<TUint8>( ( aEffect.iPeriod >> KShiftByte ) & 0xFF );
-        pReq->iPeriod_23_16 = 
-            static_cast<TUint8>( ( aEffect.iPeriod >> KShift2Bytes ) & 0xFF );
-        pReq->iPeriod_31_24 = 
-            static_cast<TUint8>( ( aEffect.iPeriod >> KShift3Bytes ) & 0xFF );
-        pReq->iImpulseTime_7_0 = 
-            static_cast<TUint8>( aEffect.iAttackTime & 0xFF );
-        pReq->iImpulseTime_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShiftByte ) & 0xFF );
-        pReq->iImpulseTime_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShift2Bytes ) & 0xFF );
-        pReq->iImpulseTime_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackTime >> KShift3Bytes ) & 0xFF );
-        pReq->iImpulseLevel_7_0 = 
-            static_cast<TUint8>( aEffect.iAttackLevel & 0xFF );
-        pReq->iImpulseLevel_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShiftByte ) & 0xFF );
-        pReq->iImpulseLevel_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShift2Bytes ) & 0xFF );
-        pReq->iImpulseLevel_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iAttackLevel >> KShift3Bytes ) & 0xFF );
-        pReq->iFadeTime_7_0 = 
-            static_cast<TUint8>( aEffect.iFadeTime & 0xFF );
-        pReq->iFadeTime_15_8 = 
-            static_cast<TUint8>( ( aEffect.iFadeTime >> KShiftByte ) & 0xFF );
-        pReq->iFadeTime_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeTime >> KShift2Bytes ) & 0xFF );
-        pReq->iFadeTime_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeTime >> KShift3Bytes ) & 0xFF );
-        pReq->iFadeLevel_7_0 = 
-            static_cast<TUint8>( aEffect.iFadeLevel & 0xFF );
-        pReq->iFadeLevel_15_8 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShiftByte ) & 0xFF );
-        pReq->iFadeLevel_23_16 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShift2Bytes ) & 0xFF );
-        pReq->iFadeLevel_31_24 = 
-            static_cast<TUint8>( 
-                ( aEffect.iFadeLevel >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof( TVibePacketModifyBasisEffectRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPausePlayingEffectReq( 
-    TInt aDeviceHandle, TInt aEffectHandle, RBuf8& aBuffer )
-    {
-    TVibePacketPausePlayingEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketPausePlayingEffectRequest*>
-            (const_cast<TUint8*>( iReqBuf.Ptr() ) );
-    
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdPausePlayingEffect;
-        pReq->iEffectHandle_7_0 = 
-            static_cast<TUint8>( aEffectHandle & 0xFF );
-        pReq->iEffectHandle_15_8 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
-        pReq->iEffectHandle_23_16 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iEffectHandle_31_24 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );        
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof( TVibePacketPausePlayingEffectRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }    
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncResumePausedEffectReq( 
-    TInt aDeviceHandle, TInt aEffectHandle, RBuf8& aBuffer )
-    {
-    TVibePacketResumePlayingEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketResumePlayingEffectRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdResumePausedEffect;
-        pReq->iEffectHandle_7_0 = 
-            static_cast<TUint8>( aEffectHandle & 0xFF );
-        pReq->iEffectHandle_15_8 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
-        pReq->iEffectHandle_23_16 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iEffectHandle_31_24 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof( TVibePacketResumePlayingEffectRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-    
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncStopPlayingEffectReq( 
-    TInt aDeviceHandle, TInt aEffectHandle, RBuf8& aBuffer )
-    {
-    TVibePacketStopEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketStopEffectRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdStopEffect;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iEffectHandle_7_0 = 
-            static_cast<TUint8>( aEffectHandle & 0xFF );
-        pReq->iEffectHandle_15_8 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
-        pReq->iEffectHandle_23_16 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iEffectHandle_31_24 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof( TVibePacketStopEffectRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncStopAllPlayingEffectsReq( 
-    TInt aDeviceHandle, RBuf8& aBuffer )
-    {
-    TVibePacketStopAllEffectsRequest* pReq = 
-        reinterpret_cast<TVibePacketStopAllEffectsRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdStopAllEffects;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof( TVibePacketStopAllEffectsRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-    
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayEffectIncludeEffectDataReq( 
-    TInt aDeviceHandle, const TDesC8& aData, TInt aEffectIndex, 
-    RBuf8& aBuffer )
-    {
-    iDataBuf.Close();
-    TInt err = iDataBuf.Create( aData.Size() + KMsgDefaultSize );
-
-    TVibePacketPlayIVTEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketPlayIVTEffectRequest*>
-            ( const_cast<TUint8*>( iDataBuf.Ptr() ) );
-
-    if ( !err && pReq && 
-         ( ( aData.Size() + KMsgDefaultSize ) <= KVibePacketMaxSize ) )
-        {
-        pReq->iCmdCode = KVibeCmdPlayIVTEffectIncludeData;
-        pReq->iIvtDataSize = aData.Size();
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iIvtIndex_7_0 = 
-            static_cast<TUint8>( aEffectIndex & 0xFF );
-        pReq->iIvtIndex_15_8 = 
-            static_cast<TUint8>( ( aEffectIndex >> KShiftByte ) & 0xFF );
-        pReq->iRepeat = 0x0;
-        
-        memcpy( pReq->iIvtData, aData.Ptr(), aData.Size() );
-
-        // the data buffer length is set to the size of the request packet
-        // plus size of the data minus 1 (minus 1, because first byte of the
-        // data is already calculated as part of the request packet size).
-        iDataBuf.SetLength( 
-            sizeof( TVibePacketPlayIVTEffectRequest ) + aData.Size() -1 );
-        }
-    else
-        {
-        iDataBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iDataBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayEffectRepeatIncludeEffectDataReq( 
-    TInt aDeviceHandle, const TDesC8& aData, TInt aEffectIndex, 
-    TUint8 aRepeat, RBuf8& aBuffer )
-    {
-    iDataBuf.Close();
-    TInt err = iDataBuf.Create( aData.Size() + KMsgDefaultSize );
-
-    TVibePacketPlayIVTEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketPlayIVTEffectRequest*>
-            ( const_cast<TUint8*>( iDataBuf.Ptr() ) );
-
-    if ( !err && pReq && 
-        ( ( aData.Size() + KMsgDefaultSize ) <= KVibePacketMaxSize ) )
-        {
-        pReq->iCmdCode = KVibeCmdPlayIVTEffectIncludeData;
-        pReq->iIvtDataSize = aData.Size();
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iIvtIndex_7_0 = 
-            static_cast<TUint8>( aEffectIndex & 0xFF );
-        pReq->iIvtIndex_15_8 = 
-            static_cast<TUint8>( ( aEffectIndex >> KShiftByte ) & 0xFF );
-        pReq->iRepeat = aRepeat;
-        
-        memcpy( pReq->iIvtData, aData.Ptr(), aData.Size() );
-        
-        // the data buffer length is set to the size of the request packet
-        // plus size of the data minus 1 (minus 1, because first byte of the
-        // data is already calculated as part of the request packet size).
-        iDataBuf.SetLength( 
-            sizeof( TVibePacketPlayIVTEffectRequest ) + aData.Size() -1 );
-        } 
-    else
-        {
-        iDataBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iDataBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayEffectRepeatNoDataReq( 
-    TInt aDeviceHandle, TInt aEffectIndex, TUint8 aRepeat, RBuf8& aBuffer )
-    {
-    TVibePacketPlayIVTEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketPlayIVTEffectRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdPlayIVTEffectNoData;
-        pReq->iIvtDataSize = 0x0;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iIvtIndex_7_0 = 
-            static_cast<TUint8>( aEffectIndex & 0xFF );
-        pReq->iIvtIndex_15_8 = 
-            static_cast<TUint8>( ( aEffectIndex >> KShiftByte ) & 0xFF );
-        pReq->iRepeat = aRepeat;
-        iReqBuf.SetLength( sizeof( TVibePacketPlayIVTEffectRequest ) );
-        } 
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayEffectNoDataReq( 
-    TInt aDeviceHandle, TInt aEffectIndex, RBuf8& aBuffer )
-    {
-    TVibePacketPlayIVTEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketPlayIVTEffectRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdPlayIVTEffectNoData;
-        pReq->iIvtDataSize = 0x0;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iIvtIndex_7_0 = 
-            static_cast<TUint8>( aEffectIndex & 0xFF );
-        pReq->iIvtIndex_15_8 = 
-            static_cast<TUint8>( ( aEffectIndex >> KShiftByte ) & 0xFF );
-        pReq->iRepeat = 0x0;
-        iReqBuf.SetLength( sizeof( TVibePacketPlayIVTEffectRequest ) );
-        } 
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncCreateStreamingEffectReq( 
-    TInt aDeviceHandle, RBuf8& aBuffer )
-    {
-    TVibePacketCreateStreamingEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketCreateStreamingEffectRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdCreateStreamingEffect;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( 
-            sizeof( TVibePacketCreateStreamingEffectRequest ) );
-        } 
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncDestroyStreamingEffectReq( 
-    TInt aDeviceHandle, TInt aEffectHandle, RBuf8& aBuffer )
-    {
-    TVibePacketDestroyStreamingEffectRequest* pReq = 
-        reinterpret_cast<TVibePacketDestroyStreamingEffectRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdDestroyStreamingEffect;
-        pReq->iEffectHandle_7_0 = 
-            static_cast<TUint8>( aEffectHandle & 0xFF );
-        pReq->iEffectHandle_15_8 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
-        pReq->iEffectHandle_23_16 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iEffectHandle_31_24 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( 
-            sizeof( TVibePacketDestroyStreamingEffectRequest ) );
-        } 
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayStreamingSampleReq( 
-    TInt aDeviceHandle, const TDesC8& aStreamingSample, TInt aEffectHandle,
-    RBuf8& aBuffer )
-    {
-    return EncPlayStreamingSampleInternal( aDeviceHandle,
-                                           aEffectHandle,
-                                           aStreamingSample,
-                                           0, aBuffer );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayStreamingSampleWithOffsetReq(
-    TInt aDeviceHandle, const TDesC8& aStreamingSample, TInt aOffsetTime, 
-    TInt aEffectHandle, RBuf8& aBuffer )
-    {
-    return EncPlayStreamingSampleInternal( aDeviceHandle,
-                                           aEffectHandle,
-                                           aStreamingSample,
-                                           aOffsetTime,
-                                           aBuffer );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetEffectStateReq( 
-    TInt aDeviceHandle, TInt aEffectHandle, RBuf8& aBuffer )
-    {
-    TVibePacketGetEffectStateRequest* pReq = 
-        reinterpret_cast<TVibePacketGetEffectStateRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdGetEffectState;
-        pReq->iEffectHandle_7_0 = 
-            static_cast<TUint8>( aEffectHandle & 0xFF );
-        pReq->iEffectHandle_15_8 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
-        pReq->iEffectHandle_23_16 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iEffectHandle_31_24 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof( TVibePacketGetEffectStateRequest ) );
-        } 
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncSetDevicePropertyBoolReq( 
-    TInt aDeviceHandle, TBool aDevPropValue, TInt aDevPropType,
-    RBuf8& aBuffer )
-    {
-    TVibePacketSetDevicePropertyRequest* pReq = 
-        reinterpret_cast<TVibePacketSetDevicePropertyRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-   
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdSetDeviceProperty;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iPropertyType_7_0 = 
-            static_cast<TUint8>( aDevPropType & 0xFF );
-        pReq->iPropertyType_15_8 = 
-            static_cast<TUint8>( ( aDevPropType >> KShiftByte ) & 0xFF );
-        pReq->iPropertyType_23_16 = 
-            static_cast<TUint8>( ( aDevPropType >> KShift2Bytes ) & 0xFF );
-        pReq->iPropertyType_31_24 = 
-            static_cast<TUint8>( ( aDevPropType >> KShift3Bytes ) & 0xFF );
-        pReq->iPropertyValueType = 
-            static_cast<TUint8>( KVibeValuetypeBool );
-        pReq->iSize = 1; // size of bool data is 1 byte
-        pReq->iPropertyValue[0] = 
-            static_cast<TUint8>( aDevPropValue );
-        iReqBuf.SetLength( sizeof( TVibePacketSetDevicePropertyRequest ) );
-        } 
-    else
-        {
-        iReqBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncSetDevicePropertyIntReq( 
-    TInt aDeviceHandle, TInt aDevPropValue, TInt aDevPropType, 
-    RBuf8& aBuffer )
-    {
-    TVibePacketSetDevicePropertyRequest* pReq = 
-        reinterpret_cast<TVibePacketSetDevicePropertyRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-   
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdSetDeviceProperty;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iPropertyType_7_0 = 
-            static_cast<TUint8>( aDevPropType & 0xFF );
-        pReq->iPropertyType_15_8 = 
-            static_cast<TUint8>( ( aDevPropType >> KShiftByte ) & 0xFF );
-        pReq->iPropertyType_23_16 = 
-            static_cast<TUint8>( ( aDevPropType >> KShift2Bytes ) & 0xFF );
-        pReq->iPropertyType_31_24 = 
-            static_cast<TUint8>( ( aDevPropType >> KShift3Bytes ) & 0xFF );
-        pReq->iPropertyValueType = 
-            static_cast<TUint8>( KVibeValuetypeInt32 );
-        pReq->iSize = 4; // Size of int32 value is 4 bytes
-        pReq->iPropertyValue[0] = 
-            static_cast<TUint8>( aDevPropValue & 0xFF );
-        pReq->iPropertyValue[1] = 
-            static_cast<TUint8>( ( aDevPropValue >> KShiftByte ) & 0xFF );
-        pReq->iPropertyValue[2] = 
-            static_cast<TUint8>( ( aDevPropValue >> KShift2Bytes ) & 0xFF );
-        pReq->iPropertyValue[3] = 
-            static_cast<TUint8>( ( aDevPropValue >> KShift3Bytes ) & 0xFF );
-        // the data buffer length is set to the size of the request packet
-        // plus size of the data minus 1. Since int32 type data is always 
-        // 4 bytes, the extra size needed for data is 3 bytes (4-1).
-        iReqBuf.SetLength(  
-            sizeof( TVibePacketSetDevicePropertyRequest ) +3 );
-        } 
-    else
-        {
-        iReqBuf.SetLength( 0 );
-        }
-
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncSetDevicePropertyStringReq( 
-    TInt aDeviceHandle, const TDesC8& aDevPropValue, TInt aDevPropType,
-    RBuf8& aBuffer )
-    {
-    iDataBuf.Close();
-    TInt err = iDataBuf.Create( aDevPropValue.Size() + KMsgDefaultSize );
-
-    TVibePacketSetDevicePropertyRequest* pReq = 
-        reinterpret_cast<TVibePacketSetDevicePropertyRequest*>
-            ( const_cast<TUint8*>( iDataBuf.Ptr() ) );
-   
-    if ( !err && pReq && 
-        ( ( aDevPropValue.Size() + KMsgDefaultSize ) <= KVibePacketMaxSize ) )
-        {
-        pReq->iCmdCode = KVibeCmdSetDeviceProperty;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iPropertyType_7_0 = 
-            static_cast<TUint8>( aDevPropType & 0xFF );
-        pReq->iPropertyType_15_8 = 
-            static_cast<TUint8>( ( aDevPropType >> KShiftByte ) & 0xFF );
-        pReq->iPropertyType_23_16 = 
-            static_cast<TUint8>( ( aDevPropType >> KShift2Bytes ) & 0xFF );
-        pReq->iPropertyType_31_24 = 
-            static_cast<TUint8>( ( aDevPropType >> KShift3Bytes ) & 0xFF );
-        pReq->iPropertyValueType = 
-            static_cast<TUint8>( KVibeValuetypeString );
-        pReq->iSize = 
-            static_cast<TUint8>( aDevPropValue.Size() );
-        
-        memcpy ( pReq->iPropertyValue, 
-                 reinterpret_cast<TUint8*>( 
-                    const_cast<TUint8*>( aDevPropValue.Ptr() ) ), 
-                 aDevPropValue.Size() );
-        
-        // the data buffer length is set to the size of the request packet
-        // plus size of the data minus 1 (minus 1, because first byte of the
-        // data is already calculated as part of the request packet size).
-        iDataBuf.SetLength( 
-            sizeof( TVibePacketSetDevicePropertyRequest ) + pReq->iSize -1 );
-        } 
-    else
-        {
-        iDataBuf.SetLength( 0 );    
-        }
-
-    return aBuffer.Create( iDataBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncSetPlatformLicenseKeyReq( 
-    TInt aDeviceHandle, RBuf8& aBuffer )
-    {
-    TInt ret = EncSetDevicePropertyStringReq( aDeviceHandle, KNullDesC8, 
-                                         CHWRMHaptics::EHWRMHapticsLicensekey,
-                                         aBuffer );
-    
-    // change the command id from general device property to setting
-    // license key
-    if ( ret == KErrNone )
-        {
-        TVibePacketSetDevicePropertyRequest* tmpReq =
-            reinterpret_cast<TVibePacketSetDevicePropertyRequest*>
-                ( const_cast<TUint8*>( aBuffer.Ptr() ) );
-        
-        if ( tmpReq )
-            {
-            tmpReq->iCmdCode = KVibeCmdSetLicense;
-            }
-        }
-
-    return ret;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDevicePropertyBoolReq( 
-    TInt aDeviceHandle, TInt aDevPropType, RBuf8& aBuffer )
-    {
-    return EncGetDevicePropertyReqInternal( 
-        KVibeValuetypeBool, aDeviceHandle, aDevPropType, aBuffer );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDevicePropertyIntReq( 
-    TInt aDeviceHandle, TInt aDevPropType, RBuf8& aBuffer )
-    {
-    return EncGetDevicePropertyReqInternal( 
-        KVibeValuetypeInt32, aDeviceHandle, aDevPropType, aBuffer );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDevicePropertyStringReq( 
-    TInt aDeviceHandle, TInt aDevPropType, RBuf8& aBuffer )
-    {
-    return EncGetDevicePropertyReqInternal( 
-        KVibeValuetypeString, aDeviceHandle, aDevPropType, aBuffer );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDeviceCapabilityIntReq( 
-    TInt aDeviceHandle, TInt aDevCapType, RBuf8& aBuffer )
-    {
-    return EncGetDeviceCapabilityReqInternal( KVibeValuetypeInt32, 
-                                              aDeviceHandle, 
-                                              aDevCapType,
-                                              aBuffer );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDeviceCapabilityStringReq( 
-    TInt aDeviceHandle, TInt aDevCapType, RBuf8& aBuffer )
-    {
-    return EncGetDeviceCapabilityReqInternal( KVibeValuetypeString, 
-                                              aDeviceHandle, 
-                                              aDevCapType,
-                                              aBuffer );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-CDesC8ArraySeg* CHWRMHapticsVibePacketizer::DecodeMessageL( 
-    const TDesC8& aData, TInt& aStatus )
-    {
-    // Clear Array before use
-    iReturnArray->Reset();
-    
-    TVibePacket* pRsp = 
-        reinterpret_cast<TVibePacket*>( const_cast<TUint8*>( aData.Ptr() ) );
-
-    switch( pRsp->iSimpleRsp.iCmdCode )
-        {
-         case KVibeCmdOpenDevice:
-            {
-            aStatus = pRsp->iOpenDeviceRsp.iVibeStatus;
-            iDeviceHandle = 
-                pRsp->iOpenDeviceRsp.iDeviceHandle_7_0 |
-                pRsp->iOpenDeviceRsp.iDeviceHandle_15_8  << KShiftByte  |
-                pRsp->iOpenDeviceRsp.iDeviceHandle_23_16 << KShift2Bytes |
-                pRsp->iOpenDeviceRsp.iDeviceHandle_31_24 << KShift3Bytes;
-            
-            TPckg<TInt> deviceHandlePckg( iDeviceHandle );
-                              
-            iReturnArray->AppendL( deviceHandlePckg );
-            break;
-            }
-        
-         case KVibeCmdCloseDevice:
-             {
-             aStatus = pRsp->iCloseDeviceRsp.iVibeStatus;
-             iDeviceHandle = KErrNotFound;
-             break;
-             }
-        
-        case KVibeCmdSetDeviceProperty: // flow through
-        case KVibeCmdSetLicense:
-            {
-            aStatus = pRsp->iSetDevicePropertyRsp.iVibeStatus;
-            break;
-            }
-         
-        case KVibeCmdGetDeviceProperty:
-            {
-            TInt propertyValueType =
-                pRsp->iGetDevicePropertyRsp.iPropertyValueType;
-             
-            switch( propertyValueType )
-                {
-                case KVibeValuetypeBool:
-                    {
-                    aStatus =  pRsp->iGetDevicePropertyRsp.iVibeStatus;
-                    
-                    TUint8* intArr = 
-                        pRsp->iGetDevicePropertyRsp.iPropertyValue;
-    
-                    TUint value = ( TUint( intArr[0] ) );
-                    TPckg<TBool> devicePropertyValuePckg( value );
-                       
-                    iReturnArray->AppendL( devicePropertyValuePckg );
-                    break;
-                    }
-                case KVibeValuetypeInt32:
-                    {
-                    aStatus =  pRsp->iGetDevicePropertyRsp.iVibeStatus;
-                    
-                    TUint8* intArr = 
-                        pRsp->iGetDevicePropertyRsp.iPropertyValue;
-    
-                    TUint value = ( TUint( intArr[0] ) )
-                                | ( TUint( intArr[1] ) << KShiftByte )
-                                | ( TUint( intArr[2] ) << KShift2Bytes )
-                                | ( TUint( intArr[3] ) << KShift3Bytes );
-                    TPckg<TInt> devicePropertyValuePckg( value );
-                       
-                    iReturnArray->AppendL( devicePropertyValuePckg );
-                    break;
-                    }
-                     
-                case KVibeValuetypeString:
-                    {
-                    aStatus = pRsp->iGetDevicePropertyRsp.iVibeStatus;
-                    TInt stringSize = pRsp->iGetDevicePropertyRsp.iSize;
-                    
-                    if( stringSize > MaxPropertyStringLength() )
-                        {
-                        // truncate string if too long
-                        stringSize = MaxPropertyStringLength();
-                        }
-                    
-                    TUint8* text = reinterpret_cast<TUint8*>( 
-                            pRsp->iGetDevicePropertyRsp.iPropertyValue );
-                    TPtrC8 ptr( text, stringSize );
-                        
-                    iReturnArray->AppendL( ptr );
-                    break;
-                    }
-                default:
-                    break;
-                }// switch
-             break;
-             }
-         
-         case KVibeCmdPlayMagSweepEffect: // flow through
-         case KVibeCmdPlayPeriodicEffect:
-             {
-             aStatus = pRsp->iPlayBasisEffectRsp.iVibeStatus;
-             TInt effectHandle = 
-                pRsp->iPlayBasisEffectRsp.iEffectHandle_7_0 |
-                pRsp->iPlayBasisEffectRsp.iEffectHandle_15_8  << KShiftByte  |
-                pRsp->iPlayBasisEffectRsp.iEffectHandle_23_16 << KShift2Bytes |
-                pRsp->iPlayBasisEffectRsp.iEffectHandle_31_24 << KShift3Bytes;
-                        
-             TPckg<TInt> effectHandlePckg( effectHandle );
-             iReturnArray->AppendL( effectHandlePckg );
-             break;
-             }
-     
-         case KVibeCmdPlayIVTEffectIncludeData: // flow through
-         case KVibeCmdPlayIVTEffectNoData:   
-             {
-             aStatus = pRsp->iPlayIVTEffectRsp.iVibeStatus;
-             TInt effectHandle = 
-                pRsp->iPlayIVTEffectRsp.iEffectHandle_7_0 |
-                pRsp->iPlayIVTEffectRsp.iEffectHandle_15_8  << KShiftByte  |
-                pRsp->iPlayIVTEffectRsp.iEffectHandle_23_16 << KShift2Bytes |
-                pRsp->iPlayIVTEffectRsp.iEffectHandle_31_24 << KShift3Bytes;
-           
-             TPckg<TInt> effectHandlePckg( effectHandle );
-             iReturnArray->AppendL( effectHandlePckg );
-             break;
-             }
-                      
-         case KVibeCmdModifyPlayingMagSweepEffect: // flow through
-         case KVibeCmdModifyPlayingPeriodicEffect:
-             {
-             aStatus = pRsp->iModifyBasisEffectRsp.iVibeStatus;
-             break;
-             }
-
-        case KVibeCmdStopEffect:
-             {
-             aStatus = pRsp->iStopEffectRsp.iVibeStatus;
-             break;
-             }
-
-        case KVibeCmdStopAllEffects:
-             {
-             aStatus = pRsp->iStopAllEffectsRsp.iVibeStatus;
-             break;
-             }
-         
-        case KVibeCmdGetDeviceCapabilities:
-            {
-            TInt capabilityValueType = 
-                pRsp->iGetDeviceCapsRsp.iCapabilityValueType;
-            
-            switch( capabilityValueType )
-                {
-                case KVibeValuetypeInt32:
-                    {
-                    aStatus = pRsp->iGetDeviceCapsRsp.iVibeStatus;
-                    TUint8* intArr = 
-                        pRsp->iGetDeviceCapsRsp.iCapabilityValue;
-
-                    TUint value = ( TUint( intArr[0] ) )
-                                | ( TUint( intArr[1] ) << KShiftByte )
-                                | ( TUint( intArr[2] ) << KShift2Bytes )
-                                | ( TUint( intArr[3] ) << KShift3Bytes );
-                     
-                    TPckg<TInt> deviceCapabilityValuePckg( value );
-                    iReturnArray->AppendL( deviceCapabilityValuePckg );
-                    break;
-                    }
-                 
-                case KVibeValuetypeString:
-                    {
-                    aStatus = pRsp->iGetDeviceCapsRsp.iVibeStatus;
-                    TUint8* text = 
-                        reinterpret_cast<TUint8*>(
-                            pRsp->iGetDeviceCapsRsp.iCapabilityValue );
-                    TInt stringSize ( pRsp->iGetDeviceCapsRsp.iSize );
-
-                    if( stringSize > MaxCapabilityStringLength() )
-                        {
-                        // truncate string if too long
-                        stringSize = MaxCapabilityStringLength();
-                        }
-                    TPtrC8 ptr( text, stringSize );
-
-                    iReturnArray->AppendL( ptr );
-                    break;
-                    }
-                default:
-                   break;
-                }// switch
-            break;
-            }
-         
-        case KVibeCmdPlayStreamingSample:
-            {
-            aStatus = pRsp->iPlayStreamingSampleRsp.iVibeStatus;
-            break;
-            }
-         
-        case KVibeCmdCreateStreamingEffect:
-            {
-            aStatus = pRsp->iCreateStreamingEffectRsp.iVibeStatus;
-            
-            TInt effectHandle = 
-                pRsp->iCreateStreamingEffectRsp.iEffectHandle_7_0 |
-                pRsp->iCreateStreamingEffectRsp.iEffectHandle_15_8  
-                    << KShiftByte  |
-                pRsp->iCreateStreamingEffectRsp.iEffectHandle_23_16     
-                    << KShift2Bytes |
-                pRsp->iCreateStreamingEffectRsp.iEffectHandle_31_24 
-                    << KShift3Bytes;
-                                 
-            TPckg<TInt> effectHandlePckg( effectHandle );
-            iReturnArray->AppendL( effectHandlePckg );
-            break;
-            }
-         
-        case KVibeCmdDestroyStreamingEffect:
-             {
-             aStatus = pRsp->iDestroyStreamingEffectRsp.iVibeStatus;
-             break;
-             }
-         
-        case KVibeCmdPausePlayingEffect:
-             {
-             aStatus = pRsp->iPausePlayingEffectRsp.iVibeStatus;
-             break;
-             }
-         
-        case KVibeCmdResumePausedEffect:
-             {
-             aStatus = pRsp->iResumePausedEffectRsp.iVibeStatus;
-             break;
-             }
-         
-        case KVibeCmdGetEffectState:
-             {
-             aStatus = pRsp->iGetEffectStateRsp.iVibeStatus;
-             TInt effectState = pRsp->iGetEffectStateRsp.iEffectState;
-             
-             TPckg<TInt> effectStatePckg( effectState );
-             iReturnArray->AppendL( effectStatePckg );
-             break;
-             }
-                   
-        default:
-            User::Leave( KErrGeneral );
-        }
-    
-    // convert vibe error code to Symbian error code
-    aStatus = MapError( aStatus );
-    
-    return iReturnArray;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::DeviceHandle()
-    {
-    return iDeviceHandle;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::InfiniteRepeat()
-    {
-    return static_cast<TInt>( KVibeRepeatCountInfinite );
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::InfiniteDuration()
-    {
-    return KVibeTimeInfinite;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MaxEffectNameLength()
-    {
-    return KVibeMaxEffectNameLength;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MaxDeviceNameLength()
-    {
-    return KVibeMaxDeviceNameLength;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MaxCapabilityStringLength()
-    {
-    return KVibeMaxCapabilityStringLength;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MaxPropertyStringLength()
-    {
-    return KVibeMaxPropertyStringLength;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MaxStreamingSampleSize()
-    {
-    return KVibeMaxStreamingSampleSize;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::DefaultDevicePriority()
-    {
-    return KVibeDevicePriorityDefault;
-    }
-    
-// ---------------------------------------------------------------------------
-// Internal helper method. Fills Get Device Capability request data.
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDeviceCapabilityReqInternal( 
-    TInt aValueType, TInt aDeviceHandle, TInt aDevCapType, RBuf8& aBuffer )
-    {
-    TVibePacketGetDeviceCapabilitiesRequest* pReq = 
-        reinterpret_cast<TVibePacketGetDeviceCapabilitiesRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-        
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdGetDeviceCapabilities;
-        pReq->iCapabilityValueType = 
-            static_cast<TUint8>( aValueType );
-        pReq->iDeviceIndex_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceIndex_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceIndex_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceIndex_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iCapabilityType_7_0 = 
-            static_cast<TUint8>( aDevCapType & 0xFF );
-        pReq->iCapabilityType_15_8 = 
-            static_cast<TUint8>( ( aDevCapType >> KShiftByte ) & 0xFF );
-        pReq->iCapabilityType_23_16 = 
-            static_cast<TUint8>( ( aDevCapType >> KShift2Bytes ) & 0xFF );
-        pReq->iCapabilityType_31_24 = 
-            static_cast<TUint8>( ( aDevCapType >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( 
-            sizeof ( TVibePacketGetDeviceCapabilitiesRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );
-        }
-    
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// Internal helper method. Fills Get Device Property request data.
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDevicePropertyReqInternal( 
-    TInt aValueType, TInt aDeviceHandle, TInt aDevPropType, RBuf8& aBuffer )
-    {
-    TVibePacketGetDevicePropertyRequest* pReq = 
-        reinterpret_cast<TVibePacketGetDevicePropertyRequest*>
-            ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-        
-    if ( pReq )
-        {
-        pReq->iCmdCode = KVibeCmdGetDeviceProperty;
-        pReq->iPropertyValueType = 
-            static_cast<TUint8>( aValueType );
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iPropertyType_7_0 = 
-            static_cast<TUint8>( aDevPropType & 0xFF );
-        pReq->iPropertyType_15_8 = 
-            static_cast<TUint8>( ( aDevPropType >> KShiftByte ) & 0xFF );
-        pReq->iPropertyType_23_16 = 
-            static_cast<TUint8>( ( aDevPropType >> KShift2Bytes ) & 0xFF );
-        pReq->iPropertyType_31_24 = 
-            static_cast<TUint8>( ( aDevPropType >> KShift3Bytes ) & 0xFF );
-        iReqBuf.SetLength( sizeof ( TVibePacketGetDevicePropertyRequest ) );
-        }
-    else
-        {
-        iReqBuf.SetLength( 0 );
-        }
-    
-    return aBuffer.Create( iReqBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// Internal helper method. Fills Play Streaming Sample request data. 
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayStreamingSampleInternal( 
-    TInt aDeviceHandle, TInt aEffectHandle, const TDesC8& aStreamingSample, 
-    TInt aOffsetTime, RBuf8& aBuffer )
-    {
-    iDataBuf.Close();
-    TInt err = iDataBuf.Create( aStreamingSample.Size() + KMsgDefaultSize );
-
-    TVibePacketPlayStreamingSampleRequest* pReq = 
-        reinterpret_cast<TVibePacketPlayStreamingSampleRequest*>
-            ( const_cast<TUint8*>( iDataBuf.Ptr() ) );
-    
-    if ( !err && pReq && 
-        ( ( aStreamingSample.Size() + KMsgDefaultSize ) <= 
-            KVibePacketMaxSize ) )
-        {
-        pReq->iCmdCode = KVibeCmdPlayStreamingSample;
-        pReq->iDeviceHandle_7_0 = 
-            static_cast<TUint8>( aDeviceHandle & 0xFF );
-        pReq->iDeviceHandle_15_8 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
-        pReq->iDeviceHandle_23_16 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iDeviceHandle_31_24 = 
-            static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iEffectHandle_7_0 = 
-            static_cast<TUint8>( aEffectHandle & 0xFF );
-        pReq->iEffectHandle_15_8 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
-        pReq->iEffectHandle_23_16 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
-        pReq->iEffectHandle_31_24 = 
-            static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
-        pReq->iSize = static_cast<TUint8>( aStreamingSample.Size() );
-        pReq->iEffectOffsetTime_7_0 = 
-            static_cast<TUint8>( aOffsetTime & 0xFF );
-        pReq->iEffectOffsetTime_15_8 = 
-            static_cast<TUint8>( ( aOffsetTime >> KShiftByte ) & 0xFF );
-        
-        memcpy( pReq->iStreamingData, 
-                reinterpret_cast<TUint8*>( 
-                    const_cast<TUint8*>( aStreamingSample.Ptr() ) ),
-                aStreamingSample.Size() );
-
-        iDataBuf.SetLength( 
-            sizeof ( TVibePacketPlayStreamingSampleRequest ) 
-                + aStreamingSample.Size() -1 );
-        }
-    else
-        {
-        iDataBuf.SetLength( 0 );
-        }
-    
-    return aBuffer.Create( iDataBuf );
-    }
-
-// ---------------------------------------------------------------------------
-// Maps Vibe error code to Symbian error code.
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MapError( TInt aVibeError )
-    {
-    TInt error = KErrNone;
-    
-    switch ( aVibeError )
-        {
-        case KVibeErrAlreadyInitialized:
-            {
-            error = KErrAlreadyExists;
-            break;
-            }
-
-        case KVibeErrNotInitialized:
-            {
-            error = KErrNotReady;
-            break;
-            }
-
-        case KVibeWarningNotPlaying: // flow through
-        case KVibeErrInvalidArgument:
-            {
-            error = KErrArgument;
-            break;
-            }
-
-        case KVibeErrFail:
-            {
-            error = KErrGeneral;
-            break;
-            }
-
-        case KVibeErrIncompatibleEffectType: // flow through
-        case KVibeErrIncompatibleCapabilityType: // flow through
-        case KVibeErrIncompatiblePropertyType:
-            {
-            error = KErrNotSupported;
-            break;
-            }
-
-        case KVibeErrDeviceNeedsLicense:
-            {
-            error = KErrAccessDenied;
-            break;
-            }
-
-        case KVibeErrNotEnoughMemory:
-            {
-            error = KErrNoMemory;
-            break;
-            }
-
-        case KVibeErrServiceNotRunning:
-            {
-            error = KErrNotReady;
-            break;
-            }
-
-        case KVibeErrInsufficientPriority:
-            {
-            error = KErrAccessDenied;
-            break;
-            }
-
-        case KVibeErrServiceBusy:
-            {
-            error = KErrInUse; 
-            break;
-            }
-        
-        case KVibeStatusSuccess:
-            {
-            error = KErrNone;
-            break;
-            }
-
-        default: 
-            {
-            // All the warning codes, except KVibeWarningNotPlaying
-            // are handled here. Thus they are converted to KErrNone.
-            break;
-            }
-        }
-    
-    return error;
-    }
-
-// ---------------------------------------------------------------------------
-// ImplementationTable[]
-// ---------------------------------------------------------------------------
-//
-const TImplementationProxy ImplementationTable[] = 
-    {
-    IMPLEMENTATION_PROXY_ENTRY( 0x20021207, CHWRMHapticsVibePacketizer::NewL )
-    };
-
-// ---------------------------------------------------------------------------
-// TImplementationProxy* ImplementationGroupProxy()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
-    {
-    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
-    return ImplementationTable;
-    }
-   
-// End of file
--- a/mediator/data/MediatorDebug.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/mediator/data/MediatorDebug.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -32,4 +32,5 @@
     categories={};
     options=KLogCommands+KLogEvents+KLogParameterData;
     output_file = "mediator.txt";
-    }
\ No newline at end of file
+    }
+
--- a/mediator/inc/Client/MediatorCommandInitiatorBody.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/mediator/inc/Client/MediatorCommandInitiatorBody.h	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2009 - 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"
@@ -93,6 +93,11 @@
         * From CActive::DoCancel()
         */
         void DoCancel();
+		
+		/**
+		* From CActive::RunError()
+		*/
+		TInt RunError( TInt aError );
     
     private:    // new functions
         /**
--- a/mediator/inc/Client/MediatorCommandResponderBody.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/mediator/inc/Client/MediatorCommandResponderBody.h	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2009 - 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"
@@ -153,6 +153,11 @@
         * From CActive::DoCancel()
         */
         void DoCancel();
+		
+		/**
+		* From CActive::RunError()
+		*/
+		TInt RunError( TInt aError );
     
     private: // new functions
         
--- a/mediator/inc/Client/MediatorEventConsumerBody.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/mediator/inc/Client/MediatorEventConsumerBody.h	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2009 - 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"
@@ -121,6 +121,11 @@
         * From CActive::DoCancel()
         */
         void DoCancel();
+		
+		/**
+		* From CActive::RunError()
+		*/
+		TInt RunError( TInt aError );
     
     private: // New functions
     
--- a/mediator/inc/Server/MediatorDebug.hrh	Fri Mar 19 09:58:42 2010 +0200
+++ b/mediator/inc/Server/MediatorDebug.hrh	Fri Apr 16 16:18:45 2010 +0300
@@ -33,4 +33,5 @@
 #define KLogStatus          0x04 // status reporting
 #define KLogParameterData   0x08 // log parameter data
 
-#endif // MEDIATORDEBUG_HRH
\ No newline at end of file
+#endif // MEDIATORDEBUG_HRH
+
--- a/mediator/src/Client/MediatorCommandInitiatorBody.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/mediator/src/Client/MediatorCommandInitiatorBody.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2009-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"
@@ -172,6 +172,23 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMediatorCommandInitiatorBody::RunError
+// This will be called when there is a leave from ResetDataBufferL() or CommandResponseL() from RunL
+// 
+// -----------------------------------------------------------------------------
+//
+#ifdef _DEBUG
+TInt CMediatorCommandInitiatorBody::RunError( TInt aError )
+#else
+TInt CMediatorCommandInitiatorBody::RunError( TInt /*aError*/ )
+#endif //_DEBUG
+	{
+	ERROR_TRACE(Print(_L("[Mediator Server]\t CMediatorCommandInitiatorBody::RunError called with Error %d\n"), aError ));
+	//Ignore the error.
+	return KErrNone;
+	}
+
+// -----------------------------------------------------------------------------
 // CMediatorCommandInitiatorBody::WaitForCommandResponse
 //  
 // (other items were commented in a header).
--- a/mediator/src/Client/MediatorCommandResponderBody.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/mediator/src/Client/MediatorCommandResponderBody.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2009 - 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"
@@ -162,6 +162,23 @@
     StartCommandReceiving();           
     
     }
+	
+// -----------------------------------------------------------------------------
+// CMediatorCommandResponderBody::RunError
+// This will be called when there is a leave from ResetDataBufferL()
+// 
+// -----------------------------------------------------------------------------
+//
+#ifdef _DEBUG
+TInt CMediatorCommandResponderBody::RunError( TInt aError )
+#else
+TInt CMediatorCommandResponderBody::RunError( TInt /*aError*/ )
+#endif //_DEBUG
+	{
+	ERROR_TRACE(Print(_L("[Mediator Server]\t CMediatorCommandResponderBody::RunError called with Error %d\n"), aError )); 
+	//Ignore the error
+	return KErrNone;
+	}
     
 // -----------------------------------------------------------------------------
 // CMediatorCommandResponderBody::RegisterCommandL
--- a/mediator/src/Client/MediatorEventConsumerBody.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/mediator/src/Client/MediatorEventConsumerBody.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2009 - 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"
@@ -120,7 +120,24 @@
         }
     StartEventReceiving();
     }
-        
+ 
+// -----------------------------------------------------------------------------
+// CMediatorEventConsumerBody::RunError
+// This will be called when there is a leave from ResetDataBufferL() and MediatorEventL() of RunL()
+// 
+// -----------------------------------------------------------------------------
+//
+#ifdef _DEBUG
+TInt CMediatorEventConsumerBody::RunError( TInt aError )
+#else
+TInt CMediatorEventConsumerBody::RunError( TInt /*aError*/ )
+#endif //_DEBUG
+	{
+	ERROR_TRACE(Print(_L("[Mediator Server]\t CMediatorEventConsumerBody::RunError called with Error %d\n"), aError ));
+	//Ignore the error
+	return KErrNone;
+	}
+	
 // -----------------------------------------------------------------------------
 // CMediatorEventConsumerBody::DoCancel
 //  
--- a/mediator/tsrc/public/basic/src/MediatorTestCases.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/mediator/tsrc/public/basic/src/MediatorTestCases.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -154,101 +154,101 @@
     static TCaseInfoInternal const KCases[] =
         {
         // To add new test cases, add new items to this array
-        FUNCENTRY( RegisterOneEvent ),
-        FUNCENTRY( GetListOfDomainsInitL ),        
-        FUNCENTRY( GetListOfDomains1DomainL ),
-        FUNCENTRY( GetListOfEvents1EventInCategoryL ),
-        FUNCENTRY( RegisterMultipleEventsL ),
-        FUNCENTRY( RegisterOver500EventsL ),
-        FUNCENTRY( UnregisterNonExistingEventDom ),
-        FUNCENTRY( GetListOfDomainsMultipleDomainsL ),
-        FUNCENTRY( UnregisterNonExistingEventCat ),
-        FUNCENTRY( UnregisterNonExistingEventEve ),
-        FUNCENTRY( UnregisterExistingEvent ),
-        FUNCENTRY( UnregisterRxistingEventDifferentSID ),
-        FUNCENTRY( UnregisterAListOfEventsL ),
-        FUNCENTRY( UnregisterAListOfEventsNotRegisteredL ),
-        FUNCENTRY( SubscribeToNonExistingEventDom ),
-        FUNCENTRY( SubscribeToNonExistingEventCat ),
-        FUNCENTRY( SubscribeToNonExistingEventEve ),
-        FUNCENTRY( SubscribeToWrongEventVersionMajor ),
-        FUNCENTRY( SubscribeToEventNonExistCapabilities ),
-        FUNCENTRY( SubscribeToEventCorrectParam ),
-        FUNCENTRY( SubscribeToListOfEventsCorrectParamL ),
-        FUNCENTRY( SubscribeToListOfEventsOneInfoIncorrectL ),
-        FUNCENTRY( RaiseNonExistingEventWrongDomainL ),
-        FUNCENTRY( RaiseNonExistingEventWrongCatL ),
-        FUNCENTRY( RaiseNonExistingEventEveL ),
-        FUNCENTRY( RaiseEventWithWrongEventVerMajorL ),
-        FUNCENTRY( RaiseEventRequiresNotExistingCapsInPubL ),
-        FUNCENTRY( RaiseExistingEventL ),
-        FUNCENTRY( SubscribeExistingEventRaiseFromPublisherSideL ),
-        FUNCENTRY( SubscribeExistingEventRaiseFromPublisherSideDataOver1kBL ),
-        FUNCENTRY( SubscribeToEventDeleteConsumerInstanceRaiseEventFromPublisherL ),
-        FUNCENTRY( Add2ndSubscriberToEventRaiseEventFromPublisherL ),
-        FUNCENTRY( UnsubscribeFrom1stSubscriberL ),
-        FUNCENTRY( SubscribeToEventRaise500TimesInLoopL ),
-        FUNCENTRY( RegisterOneCommandToMediator ),
-        FUNCENTRY( RegisterMultipleCommandsToMediatorL ),
-        FUNCENTRY( RegisterOver500CommandsWithinOneCatL ),
-        FUNCENTRY( RegisterCommandWithDomainUID0 ),
-        FUNCENTRY( RegisterCommandWithCategoryUID0 ),
-        FUNCENTRY( RegisterCommandWithCommandID0 ),
-        FUNCENTRY( RegisterCommandWithTimeoutValue0 ),
-        FUNCENTRY( IssueNonExistingCommandWrongDomainL ),
-        FUNCENTRY( IssueNonExistingCommandWrongCatL ),
-        FUNCENTRY( IssueNonExistingCommandIdL ),
-        FUNCENTRY( IssueCommandWrongCommandVerMajorL ),
-        FUNCENTRY( IssueCommandL ),
-        FUNCENTRY( IssueCommand2L ),
-        FUNCENTRY( IssueExistingCommandSameInitiatorWhileProcessingL ),
-        FUNCENTRY( IssueCommandWaitWithoutRespondingToCommandL ),
-        FUNCENTRY( IssueCommandCancelFromInitiatorBeforeTimeoutL ),
-        FUNCENTRY( IssueCommandRespondCorrectlyFromResponderL ),
-        FUNCENTRY( IssueCommandALotOfParameterDataL ),
-        FUNCENTRY( IssueCommandRespondALotOfResponseDataL ),
-        //FUNCENTRY( GetListOfDomainsOver500Domains ),
-        FUNCENTRY( GetListOfCategoriesNoCategoriesL ),
-        FUNCENTRY( GetListOfCategoriesIncorrectDomainUIDL ),
-        FUNCENTRY( GetListOfCategoriesMultipleCategoriesL ),
-        FUNCENTRY( GetListOfCommandsL ),
-        FUNCENTRY( GetListOfCommandsIncorrectDomainUIDL ),
-        FUNCENTRY( GetListOfCommandsIncorrectCategoryUIDL ),
-        FUNCENTRY( GetListOfCommands1CommandL ),
-        FUNCENTRY( GetListOfCommandsMultipleCommandsL ),
-        FUNCENTRY( GetListOfCommandsOver500CommandsL ),
-        FUNCENTRY( GetListOfEventsNoEventsInCategoryL ),
-        FUNCENTRY( GetListOfEventsWithIncorrectDomainUIDL ),
-        FUNCENTRY( GetListOfEventsWithIncorrectCategoryUIDL ),
-        FUNCENTRY( GetListOfEventsMultipleEventsInCategoryL ),
-        FUNCENTRY( GetListOfEventsOver500EventsInCategoryL ),
-        FUNCENTRY( SubscribeNotificationReceiver ),
-        FUNCENTRY( ReSubscribeNotificationReceiver ),
-        FUNCENTRY( ReUnsubscribeNotificationReceiver ),
-        FUNCENTRY( SubscribeNotificationReceiverRegisterCommandsL ),
-        FUNCENTRY( SubscribeNotificationReceiverUnregCommandsSoThatCatIsEmptyL ),
-        FUNCENTRY( SubscribeNotificationReceiverRegisterEventsL ),
-        FUNCENTRY( SubscribeNotificationReceiverUnregisterEventsL ),
-        FUNCENTRY( SubscribeNotificationReceiverUnregisterEventsSoThatCatIsEmptyL ),
-        FUNCENTRY( SubscribeNotificationReceiverRegisterCommandsSoThatErrorInRegistrationL ),
-        FUNCENTRY( SubscribeNotificationReceiverUnegisterCommandsSoThatErrorInRegistrationL ),
-        FUNCENTRY( SubscribeNotificationReceiverRegisterEventsSoThatErrorInRegistration ),
-        FUNCENTRY( SubscribeNotificationReceiverUnregisterEventsSoThatErrorInRegistration ),
-        FUNCENTRY( IssueCommandCancelAndReissueL ),
-        FUNCENTRY( IssueCommandCancelAndIssueNewCommandL ),
-        FUNCENTRY( InstantiateAndDeleteMediatorPluginL ),
-        FUNCENTRY( IssueCommandNoDataL ),
-        FUNCENTRY( RaiseEventNoDataL ),
-        FUNCENTRY( RegisterMultipleEventsWithMultipleUIDsL ),
-        FUNCENTRY( RegisterMultipleCommandsWithMultipleUIDsL ),
-        FUNCENTRY( IssueCommandRespondIncorrectlyFromResponderL ),
-        FUNCENTRY( OOMForEventProviderTestL ),
-        FUNCENTRY( OOMForEventConsumerTestL ),
-        FUNCENTRY( OOMForEventProviderwithListTestL ),
-        FUNCENTRY( OOMForEventConsumerWithEventTestL ),
-        FUNCENTRY( OOMForCommandInitiatorTestL ),
-        FUNCENTRY( OOMForCommandInitiatorCommandListTestL ),
-        FUNCENTRY( OOMForMediatorNotificationsTestL )
+        ENTRY( "[CMediatorTest] RegisterOneEvent", &CMediatorTest::RegisterOneEvent ),
+        ENTRY( "[CMediatorTest] GetListOfDomainsInitL", &CMediatorTest::GetListOfDomainsInitL ),
+        ENTRY( "[CMediatorTest] GetListOfDomains1DomainL", &CMediatorTest::GetListOfDomains1DomainL ),
+        ENTRY( "[CMediatorTest] GetListOfEvents1EventInCategoryL", &CMediatorTest::GetListOfEvents1EventInCategoryL ),
+        ENTRY( "[CMediatorTest] RegisterMultipleEventsL", &CMediatorTest::RegisterMultipleEventsL ),
+        ENTRY( "[CMediatorTest] RegisterOver500EventsL", &CMediatorTest::RegisterOver500EventsL ),
+        ENTRY( "[CMediatorTest] UnregisterNonExistingEventDom", &CMediatorTest::UnregisterNonExistingEventDom ),
+        ENTRY( "[CMediatorTest] GetListOfDomainsMultipleDomainsL", &CMediatorTest::GetListOfDomainsMultipleDomainsL ),
+        ENTRY( "[CMediatorTest] UnregisterNonExistingEventCat", &CMediatorTest::UnregisterNonExistingEventCat ),
+        ENTRY( "[CMediatorTest] UnregisterNonExistingEventEve", &CMediatorTest::UnregisterNonExistingEventEve ),
+        ENTRY( "[CMediatorTest] UnregisterExistingEvent", &CMediatorTest::UnregisterExistingEvent ),
+        ENTRY( "[CMediatorTest] UnregisterRxistingEventDifferentSID", &CMediatorTest::UnregisterRxistingEventDifferentSID ),
+        ENTRY( "[CMediatorTest] UnregisterAListOfEventsL", &CMediatorTest::UnregisterAListOfEventsL ),
+        ENTRY( "[CMediatorTest] UnregisterAListOfEventsNotRegisteredL", &CMediatorTest::UnregisterAListOfEventsNotRegisteredL ),
+        ENTRY( "[CMediatorTest] SubscribeToNonExistingEventDom", &CMediatorTest::SubscribeToNonExistingEventDom ),
+        ENTRY( "[CMediatorTest] SubscribeToNonExistingEventCat", &CMediatorTest::SubscribeToNonExistingEventCat ),
+        ENTRY( "[CMediatorTest] SubscribeToNonExistingEventEve", &CMediatorTest::SubscribeToNonExistingEventEve ),
+        ENTRY( "[CMediatorTest] SubscribeToWrongEventVersionMajor", &CMediatorTest::SubscribeToWrongEventVersionMajor ),
+        ENTRY( "[CMediatorTest] SubscribeToEventNonExistCapabilities", &CMediatorTest::SubscribeToEventNonExistCapabilities ),
+        ENTRY( "[CMediatorTest] SubscribeToEventCorrectParam", &CMediatorTest::SubscribeToEventCorrectParam ),
+        ENTRY( "[CMediatorTest] SubscribeToListOfEventsCorrectParamL", &CMediatorTest::SubscribeToListOfEventsCorrectParamL ),
+        ENTRY( "[CMediatorTest] SubscribeToListOfEventsOneInfoIncorrectL", &CMediatorTest::SubscribeToListOfEventsOneInfoIncorrectL ),
+        ENTRY( "[CMediatorTest] RaiseNonExistingEventWrongDomainL", &CMediatorTest::RaiseNonExistingEventWrongDomainL ),
+        ENTRY( "[CMediatorTest] RaiseNonExistingEventWrongCatL", &CMediatorTest::RaiseNonExistingEventWrongCatL ),
+        ENTRY( "[CMediatorTest] RaiseNonExistingEventEveL", &CMediatorTest::RaiseNonExistingEventEveL ),
+        ENTRY( "[CMediatorTest] RaiseEventWithWrongEventVerMajorL", &CMediatorTest::RaiseEventWithWrongEventVerMajorL ),
+        ENTRY( "[CMediatorTest] RaiseEventRequiresNotExistingCapsInPubL", &CMediatorTest::RaiseEventRequiresNotExistingCapsInPubL ),
+        ENTRY( "[CMediatorTest] RaiseExistingEventL", &CMediatorTest::RaiseExistingEventL ),
+        ENTRY( "[CMediatorTest] SubscribeExistingEventRaiseFromPublisherSideL", &CMediatorTest::SubscribeExistingEventRaiseFromPublisherSideL ),
+        ENTRY( "[CMediatorTest] SubscribeExistingEventRaiseFromPublisherSideDataOver1kBL", &CMediatorTest::SubscribeExistingEventRaiseFromPublisherSideDataOver1kBL ),
+        ENTRY( "[CMediatorTest] SubscribeToEventDeleteConsumerInstanceRaiseEventFromPublisherL", &CMediatorTest::SubscribeToEventDeleteConsumerInstanceRaiseEventFromPublisherL ),
+        ENTRY( "[CMediatorTest] Add2ndSubscriberToEventRaiseEventFromPublisherL", &CMediatorTest::Add2ndSubscriberToEventRaiseEventFromPublisherL ),
+        ENTRY( "[CMediatorTest] UnsubscribeFrom1stSubscriberL", &CMediatorTest::UnsubscribeFrom1stSubscriberL ),
+        ENTRY( "[CMediatorTest] SubscribeToEventRaise500TimesInLoopL", &CMediatorTest::SubscribeToEventRaise500TimesInLoopL ),
+        ENTRY( "[CMediatorTest] RegisterOneCommandToMediator", &CMediatorTest::RegisterOneCommandToMediator ),
+        ENTRY( "[CMediatorTest] RegisterMultipleCommandsToMediatorL", &CMediatorTest::RegisterMultipleCommandsToMediatorL ),
+        ENTRY( "[CMediatorTest] RegisterOver500CommandsWithinOneCatL", &CMediatorTest::RegisterOver500CommandsWithinOneCatL ),
+        ENTRY( "[CMediatorTest] RegisterCommandWithDomainUID0", &CMediatorTest::RegisterCommandWithDomainUID0 ),
+        ENTRY( "[CMediatorTest] RegisterCommandWithCategoryUID0", &CMediatorTest::RegisterCommandWithCategoryUID0 ),
+        ENTRY( "[CMediatorTest] RegisterCommandWithCommandID0", &CMediatorTest::RegisterCommandWithCommandID0 ),
+        ENTRY( "[CMediatorTest] RegisterCommandWithTimeoutValue0", &CMediatorTest::RegisterCommandWithTimeoutValue0 ),
+        ENTRY( "[CMediatorTest] IssueNonExistingCommandWrongDomainL", &CMediatorTest::IssueNonExistingCommandWrongDomainL ),
+        ENTRY( "[CMediatorTest] IssueNonExistingCommandWrongCatL", &CMediatorTest::IssueNonExistingCommandWrongCatL ),
+        ENTRY( "[CMediatorTest] IssueNonExistingCommandIdL", &CMediatorTest::IssueNonExistingCommandIdL ),
+        ENTRY( "[CMediatorTest] IssueCommandWrongCommandVerMajorL", &CMediatorTest::IssueCommandWrongCommandVerMajorL ),
+        ENTRY( "[CMediatorTest] IssueCommandL", &CMediatorTest::IssueCommandL ),
+        ENTRY( "[CMediatorTest] IssueCommand2L", &CMediatorTest::IssueCommand2L ),
+        ENTRY( "[CMediatorTest] IssueExistingCommandSameInitiatorWhileProcessingL", &CMediatorTest::IssueExistingCommandSameInitiatorWhileProcessingL ),
+        ENTRY( "[CMediatorTest] IssueCommandWaitWithoutRespondingToCommandL", &CMediatorTest::IssueCommandWaitWithoutRespondingToCommandL ),
+        ENTRY( "[CMediatorTest] IssueCommandCancelFromInitiatorBeforeTimeoutL", &CMediatorTest::IssueCommandCancelFromInitiatorBeforeTimeoutL ),
+        ENTRY( "[CMediatorTest] IssueCommandRespondCorrectlyFromResponderL", &CMediatorTest::IssueCommandRespondCorrectlyFromResponderL ),
+        ENTRY( "[CMediatorTest] IssueCommandALotOfParameterDataL", &CMediatorTest::IssueCommandALotOfParameterDataL ),
+        ENTRY( "[CMediatorTest] IssueCommandRespondALotOfResponseDataL", &CMediatorTest::IssueCommandRespondALotOfResponseDataL ),
+        //ENTRY( "[CMediatorTest] GetListOfDomainsOver500Domains", &CMediatorTest::GetListOfDomainsOver500Domains ),
+        ENTRY( "[CMediatorTest] GetListOfCategoriesNoCategoriesL", &CMediatorTest::GetListOfCategoriesNoCategoriesL ),
+        ENTRY( "[CMediatorTest] GetListOfCategoriesIncorrectDomainUIDL", &CMediatorTest::GetListOfCategoriesIncorrectDomainUIDL ),
+        ENTRY( "[CMediatorTest] GetListOfCategoriesMultipleCategoriesL", &CMediatorTest::GetListOfCategoriesMultipleCategoriesL ),
+        ENTRY( "[CMediatorTest] GetListOfCommandsL", &CMediatorTest::GetListOfCommandsL ),
+        ENTRY( "[CMediatorTest] GetListOfCommandsIncorrectDomainUIDL", &CMediatorTest::GetListOfCommandsIncorrectDomainUIDL ),
+        ENTRY( "[CMediatorTest] GetListOfCommandsIncorrectCategoryUIDL", &CMediatorTest::GetListOfCommandsIncorrectCategoryUIDL ),
+        ENTRY( "[CMediatorTest] GetListOfCommands1CommandL", &CMediatorTest::GetListOfCommands1CommandL ),
+        ENTRY( "[CMediatorTest] GetListOfCommandsMultipleCommandsL", &CMediatorTest::GetListOfCommandsMultipleCommandsL ),
+        ENTRY( "[CMediatorTest] GetListOfCommandsOver500CommandsL", &CMediatorTest::GetListOfCommandsOver500CommandsL ),
+        ENTRY( "[CMediatorTest] GetListOfEventsNoEventsInCategoryL", &CMediatorTest::GetListOfEventsNoEventsInCategoryL ),
+        ENTRY( "[CMediatorTest] GetListOfEventsWithIncorrectDomainUIDL", &CMediatorTest::GetListOfEventsWithIncorrectDomainUIDL ),
+        ENTRY( "[CMediatorTest] GetListOfEventsWithIncorrectCategoryUIDL", &CMediatorTest::GetListOfEventsWithIncorrectCategoryUIDL ),
+        ENTRY( "[CMediatorTest] GetListOfEventsMultipleEventsInCategoryL", &CMediatorTest::GetListOfEventsMultipleEventsInCategoryL ),
+        ENTRY( "[CMediatorTest] GetListOfEventsOver500EventsInCategoryL", &CMediatorTest::GetListOfEventsOver500EventsInCategoryL ),
+        ENTRY( "[CMediatorTest] SubscribeNotificationReceiver", &CMediatorTest::SubscribeNotificationReceiver ),
+        ENTRY( "[CMediatorTest] ReSubscribeNotificationReceiver", &CMediatorTest::ReSubscribeNotificationReceiver ),
+        ENTRY( "[CMediatorTest] ReUnsubscribeNotificationReceiver", &CMediatorTest::ReUnsubscribeNotificationReceiver ),
+        ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterCommandsL", &CMediatorTest::SubscribeNotificationReceiverRegisterCommandsL ),
+        ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregCommandsSoThatCatIsEmptyL", &CMediatorTest::SubscribeNotificationReceiverUnregCommandsSoThatCatIsEmptyL ),
+        ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterEventsL", &CMediatorTest::SubscribeNotificationReceiverRegisterEventsL ),
+        ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregisterEventsL", &CMediatorTest::SubscribeNotificationReceiverUnregisterEventsL ),
+        ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregisterEventsSoThatCatIsEmptyL", &CMediatorTest::SubscribeNotificationReceiverUnregisterEventsSoThatCatIsEmptyL ),
+        ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterCommandsSoThatErrorInRegistrationL", &CMediatorTest::SubscribeNotificationReceiverRegisterCommandsSoThatErrorInRegistrationL ),
+        ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnegisterCommandsSoThatErrorInRegistrationL", &CMediatorTest::SubscribeNotificationReceiverUnegisterCommandsSoThatErrorInRegistrationL ),
+        ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterEventsSoThatErrorInRegistration", &CMediatorTest::SubscribeNotificationReceiverRegisterEventsSoThatErrorInRegistration ),
+        ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregisterEventsSoThatErrorInRegistration", &CMediatorTest::SubscribeNotificationReceiverUnregisterEventsSoThatErrorInRegistration ),
+        ENTRY( "[CMediatorTest] IssueCommandCancelAndReissueL", &CMediatorTest::IssueCommandCancelAndReissueL ),
+        ENTRY( "[CMediatorTest] IssueCommandCancelAndIssueNewCommandL", &CMediatorTest::IssueCommandCancelAndIssueNewCommandL ),
+        ENTRY( "[CMediatorTest] InstantiateAndDeleteMediatorPluginL", &CMediatorTest::InstantiateAndDeleteMediatorPluginL ),
+        ENTRY( "[CMediatorTest] IssueCommandNoDataL", &CMediatorTest::IssueCommandNoDataL ),
+        ENTRY( "[CMediatorTest] RaiseEventNoDataL", &CMediatorTest::RaiseEventNoDataL ),
+        ENTRY( "[CMediatorTest] RegisterMultipleEventsWithMultipleUIDsL", &CMediatorTest::RegisterMultipleEventsWithMultipleUIDsL ),
+        ENTRY( "[CMediatorTest] RegisterMultipleCommandsWithMultipleUIDsL", &CMediatorTest::RegisterMultipleCommandsWithMultipleUIDsL ),
+        ENTRY( "[CMediatorTest] IssueCommandRespondIncorrectlyFromResponderL", &CMediatorTest::IssueCommandRespondIncorrectlyFromResponderL ),
+        ENTRY( "[CMediatorTest] OOMForEventProviderTestL", &CMediatorTest::OOMForEventProviderTestL ),
+        ENTRY( "[CMediatorTest] OOMForEventConsumerTestL", &CMediatorTest::OOMForEventConsumerTestL ),
+        ENTRY( "[CMediatorTest] OOMForEventProviderwithListTestL", &CMediatorTest::OOMForEventProviderwithListTestL ),
+        ENTRY( "[CMediatorTest] OOMForEventConsumerWithEventTestL", &CMediatorTest::OOMForEventConsumerWithEventTestL ),
+        ENTRY( "[CMediatorTest] OOMForCommandInitiatorTestL", &CMediatorTest::OOMForCommandInitiatorTestL ),
+        ENTRY( "[CMediatorTest] OOMForCommandInitiatorCommandListTestL", &CMediatorTest::OOMForCommandInitiatorCommandListTestL ),
+        ENTRY( "[CMediatorTest] OOMForMediatorNotificationsTestL", &CMediatorTest::OOMForMediatorNotificationsTestL )
         // Example how to use OOM functionality
         //OOM_ENTRY( "Loop test with OOM", LoopTest, ETrue, 2, 3 ),
         //OOM_FUNCENTRY( PrintTest, ETrue, 1, 3 ),
--- a/resourceinterfaces/fmtransmittercontrol/group/telephony_hwrmfmtx.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/resourceinterfaces/fmtransmittercontrol/group/telephony_hwrmfmtx.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component	telephony_hwrmfmtx
 source		\sf\os\devicesrv\resourceinterfaces\fmtransmittercontrol
 binary		\sf\os\devicesrv\resourceinterfaces\fmtransmittercontrol\group	all
Binary file resourcemgmt/hwresourcesmgr/documentation/HWRM Central Repository keys.xls has changed
--- a/resourcemgmt/hwresourcesmgr/group/telephony_hwrm.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/resourcemgmt/hwresourcesmgr/group/telephony_hwrm.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component	telephony_hwrm
 
 source		\sf\os\devicesrv\resourcemgmt\hwresourcesmgr\client
--- a/resourcemgmt/hwresourcesmgrconfig/telephony_hwrm-config.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/resourcemgmt/hwresourcesmgrconfig/telephony_hwrm-config.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component	telephony_hwrm-config
 
 source			\sf\os\devicesrv\resourcemgmt\hwresourcesmgrconfig
--- a/resourcemgmt/hwrmfmtxwatcherplugin/data/20012401.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/resourcemgmt/hwrmfmtxwatcherplugin/data/20012401.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -43,4 +43,5 @@
                 };
             }
         };
-    }
\ No newline at end of file
+    }
+
--- a/resourcemgmt/hwrmtargetmodifierplugin/data/10281B9B.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/resourcemgmt/hwrmtargetmodifierplugin/data/10281B9B.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -45,4 +45,5 @@
                 };
             }
         };
-    }
\ No newline at end of file
+    }
+
--- a/resourcemgmt/powerandmemorynotificationservice/group/syslibs_pwrcli.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/resourcemgmt/powerandmemorynotificationservice/group/syslibs_pwrcli.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component	syslibs_pwrcli
 source	\sf\os\devicesrv\resourcemgmt\powerandmemorynotificationservice
 binary	\sf\os\devicesrv\resourcemgmt\powerandmemorynotificationservice\group	all
--- a/sensorservices/orientationssy/src/SsyChannel.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sensorservices/orientationssy/src/SsyChannel.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -808,7 +808,9 @@
         {
         aChannelPropertyList.Append( channelProperties[index] );
         }
-
+    
+    channelProperties.Close();
+    
     SSY_TRACE_OUT();
     }
 
--- a/sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -30,6 +30,10 @@
 #include "sensrvclientserver.h"
 #include "sensrvthreadmonitor.h"
 #include "sensrvchanneldatareader.h"
+#include <e32std.h>
+#include <e32cmn.h>
+
+
 
 // ---------------------------------------------------------------------------
 // 2-phase constructor
@@ -251,14 +255,13 @@
             {
 
             buf->Des().AppendNum(iProxyManager.GenerateUniqueId());
+           
 
             err = iSsyThread.Create(*buf,
                                     SsyThreadFunction,
                                     ProxyManager().SsyStackSize(),
-                                    KSensrvSsyHeapInitialSize,
-                                    ProxyManager().SsyHeapMaxSize(),
+                                    NULL,
                                     (TAny*)this);
-
             if (err == KErrAlreadyExists)
                 {
                 COMPONENT_TRACE( ( _L( "Sensor Server - CSensrvPluginProxy::InitializePluginL - Thread name is already in use, recreating..." ) ) );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/inc/ssmcommonlocale.h	Fri Apr 16 16:18:45 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* 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: Declaration of TLanguageRegion structure.
+*
+*/
+#ifndef __SSMCOMMONLOCALE_H__
+#define __SSMCOMMONLOCALE_H__
+#include <e32base.h>
+
+_LIT( KLanguageDllNameBase, "elocl_lan" );
+_LIT( KRegionDllNameBase, "elocl_reg" );
+_LIT( KCollationDllNameBase, "elocl_col" );
+_LIT( KDllExtensionFormat, ".%u" );
+_LIT( KDllExtensionPadding, "0" );
+const TInt KMaxDllNameLength = 16;
+const TInt KMaxDllExtensionLength = 6;
+const TInt KMinDllExtensionLength = 4;
+const TInt KDllExtensionPaddingPosition = 1;
+
+/**
+* Used for mapping associated regions for the languages
+*/
+class TLanguageRegion 
+    {
+public:
+
+    /**
+    * Default constructor.
+    */
+    TLanguageRegion () : iLanguage( 0 ), iRegion ( 0 )
+        {
+        }
+
+    /**
+    * Overloaded constructor.
+    */
+    TLanguageRegion ( const TInt aLanguage )
+                    : iLanguage( aLanguage ), iRegion ( 0 )
+        {
+        }
+
+    /**
+    * Overloaded constructor.
+    */
+    TLanguageRegion (const TInt aLanguage, const TInt aRegion)
+                    : iLanguage( aLanguage ), iRegion ( aRegion )
+        {
+        }
+
+public:
+    /** Mapped language code */
+    TInt iLanguage;
+
+    /** Mapped region code */
+    TInt iRegion;
+};
+  
+#endif // __SSMCOMMONLOCALE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/inc/ssmlocalepskeys.h	Fri Apr 16 16:18:45 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* 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: PSKey definition.
+*
+*/
+#ifndef __SSMLOCALEPSKEYS_H__
+#define __SSMLOCALEPSKEYS_H__
+#include <e32base.h>
+
+/** Publish and Subscribe key used for observing Collation code changes. */
+static const TInt KSSMCollationPSKey = 501;
+
+/** Publish and Subscribe key used for observing Region code changes. */
+static const TInt KSSMRegionPSKey = 502;
+
+/** Publish and Subscribe key used for observing UI Language code changes. */
+static const TInt KSSMUILanguagePSKey = 503;
+
+#endif // __SSMLOCALEPSKEYS_H__
--- a/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:
-* Command list for the Non-critical startup state.
+* Command list for the Non-critical startup state in minimal startup mode.
 *
 */
 
@@ -73,7 +73,7 @@
         r_cmd_psstate,          // prio 0xFFF0
         // prio 0xFFE7
         r_cmd_simcheck,
-	r_cmd_clearstartupreason,
+        r_cmd_clearstartupreason,
         r_cmd_createswp_uiphase,
         r_cmd_createswp_rfstatus,
         r_cmd_waitforofflinequery,
@@ -83,68 +83,7 @@
         // prio 0xFFC7
         r_cmd_setswp_rfon,
         r_cmd_setswp_rfoff,
-        // prio 0xFFB7
-#ifdef __JAVA        
-        r_cmd_javacaptain,
-#endif // __JAVA
-        r_cmd_watcher,
-        r_cmd_dmutilsrv,
-        // prio 0xFFA7
-        r_cmd_contentharvester,
-        r_cmd_mdswatchdog,
-        r_cmd_satsrv,
-        r_cmd_cbssrv,
-        r_cmd_schedsrv,
-        r_cmd_aosrv,
-        r_cmd_ippushman,
-        r_cmd_remotefe,
-        r_cmd_supllistener,
-        r_cmd_autolock,
-        r_cmd_dmallreasons,
-        r_cmd_locod,
-#ifdef FF_LBT_ENGINE
-        r_cmd_lbtsrv,
-#endif // FF_LBT_ENGINE
-        r_cmd_dmfirstbootreason,
-        r_cmd_fota,
-        // prio 0x7F87
-        r_cmd_waitcleanbootinfo,
-        // prio 0x7F97
-	r_cmd_dcmo,
-        r_cmd_amastart,
-        // prio 0x7EFF
-        r_cmd_activitymonitor1,
-        // prio 0x7EFE
-        r_cmd_activitymonitor2,
-        // prio 0x7EFC
-        r_cmd_activitymonitor3,
-        // prio 0x7EFA
-        r_cmd_activitymonitor4,
-        // prio 0x7EF8
-        r_cmd_activitymonitor5,
-        // prio 0x7EF6
-        r_cmd_videocenter,
-        // prio 0x7EF5
-        r_cmd_activitymonitor6,
-        // prio 0x7EF4
-        r_cmd_iaupdatebg,
-        // prio 0x7EF3
-        r_cmd_activitymonitor7,
-        // prio 0x7EF2
-	r_cmd_activitymonitor8,
-	// prio 0x7EEE
-	r_cmd_autosync,
-	// prio 0x7EED
-	r_cmd_activitymonitor9,
-	// prio 0x7EEC
-	r_cmd_mylocationsengine,
-#ifdef FF_ATT_ADDRESS_BK
-	//prio 0x7EEA
-	r_cmd_activitymonitor10,
-	//prio 0x7EE9
-	r_cmd_aab,
-#endif
-	r_cmd_startupready      // Last command, prio 0x0000
+        r_cmd_startupready      // Last command, prio 0x0000
         };
     }
 
@@ -152,209 +91,6 @@
 // Command items in alphabetical order
 // ===========================================================================
 //
-
-// -----------------------------------------------------------------------------
-// r_cmd_aab
-// -----------------------------------------------------------------------------
-//
-#ifdef FF_ATT_ADDRESS_BK 
-RESOURCE SSM_START_APP_INFO r_cmd_aab
-    {
-    priority = 0x7EE9;
-    name = "z:\\sys\\bin\\AABPhonebookapp.exe";
-    retries = 2;
-    background = 1; // To background
-    monitor_info = r_mon_3_restarts_ignore;
-    }
-#endif
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor1
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor1
-    {
-    priority = 0x7EFF;
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "ssmactivitycmd.dll";
-    ordinal = 1; // SsmActivityCmdNewL
-    retries = 2;
-    dll_data = r_dlldata_activitymonitor_timeout;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor2
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor2
-    {
-    priority = 0x7EFD;
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "ssmactivitycmd.dll";
-    ordinal = 1; // SsmActivityCmdNewL
-    retries = 2;
-    dll_data = r_dlldata_activitymonitor_timeout;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor3
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor3
-    {
-    priority = 0x7EFB;
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "ssmactivitycmd.dll";
-    ordinal = 1; // SsmActivityCmdNewL
-    retries = 2;
-    dll_data = r_dlldata_activitymonitor_timeout;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor4
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor4
-    {
-    priority = 0x7EF9;
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "ssmactivitycmd.dll";
-    ordinal = 1; // SsmActivityCmdNewL
-    retries = 2;
-    dll_data = r_dlldata_activitymonitor_timeout;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor5
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor5
-    {
-    priority = 0x7EF7;
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "ssmactivitycmd.dll";
-    ordinal = 1; // SsmActivityCmdNewL
-    retries = 2;
-    dll_data = r_dlldata_activitymonitor_timeout;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor6
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor6
-    {
-    priority = 0x7EF5;
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "ssmactivitycmd.dll";
-    ordinal = 1; // SsmActivityCmdNewL
-    retries = 2;
-    dll_data = r_dlldata_activitymonitor_timeout;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor7
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor7
-    {
-    priority = 0x7EF3;
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "ssmactivitycmd.dll";
-    ordinal = 1; // SsmActivityCmdNewL
-    retries = 2;
-    dll_data = r_dlldata_activitymonitor_timeout;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor8
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor8
-    {
-    priority = 0x7EEF;
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "ssmactivitycmd.dll";
-    ordinal = 1; // SsmActivityCmdNewL
-    retries = 2;
-    dll_data = r_dlldata_activitymonitor_timeout;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor9
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor9
-    {
-    priority = 0x7EED;
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "ssmactivitycmd.dll";
-    ordinal = 1; // SsmActivityCmdNewL
-    retries = 2;
-    dll_data = r_dlldata_activitymonitor_timeout;
-    }
-	
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor10
-// ---------------------------------------------------------------------------
-//
-#ifdef FF_ATT_ADDRESS_BK
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor10
-    {
-    priority = 0x7EEA;
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "ssmactivitycmd.dll";
-    ordinal = 1; // SsmActivityCmdNewL
-    retries = 2;
-    dll_data = r_dlldata_activitymonitor_timeout;
-    }
-#endif
-	
-// ---------------------------------------------------------------------------
-// r_cmd_amastart
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_AMA_STARTER r_cmd_amastart
-    {
-    priority = 0x7F97;
-    conditional_information = r_cond_ps_normalboot;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_autosync
-// ---------------------------------------------------------------------------
-//	
-RESOURCE SSM_START_PROCESS_INFO r_cmd_autosync
-    {
-    priority = 0x7EEE;
-    execution_behaviour = ESsmFireAndForget;
-    retries = 3;
-    name = "cctautosync.exe";
-    }
-	
-// ---------------------------------------------------------------------------
-// r_cmd_aosrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_aosrv
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\alwaysonlinestarter.exe";
-    execution_behaviour = ESsmFireAndForget;
-    conditional_information = r_cond_feat_alwaysonline;
-    monitor_info = r_mon_3_restarts_ignore;
-    }
-
 // ---------------------------------------------------------------------------
 // r_cmd_bsengine
 // ---------------------------------------------------------------------------
@@ -368,34 +104,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_autolock
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_autolock
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\lockapp.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    background = 1; // To background
-    monitor_info = r_mon_3_restarts_ignore;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_cbssrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_cbssrv
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\cbsserver.exe";
-    execution_behaviour = ESsmFireAndForget;
-    conditional_information = r_cond_feat_cellbroadcast;
-    monitor_info = r_mon_3_restarts_ignore;
-    }
-
-
-// ---------------------------------------------------------------------------
 // r_cmd_createswp_rfstatus
 // ---------------------------------------------------------------------------
 //
@@ -420,151 +128,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_contentharvester
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_contentharvester
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\contentharvester.exe";
-    execution_behaviour = ESsmFireAndForget;	//behavior changed from ESsmWaitForSignal as part of SCB CR MSOI-7XARNT
-    monitor_info = r_mon_3_restarts_ignore;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_dcmo
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dcmo
-    {
-    priority = 0x7F97;
-    execution_behaviour = ESsmFireAndForget;
-    dllname = "dcmostartupcustcmd.dll";
-    ordinal = 1; // DCMO command
-    conditional_information = r_cond_feat_runtime_dcmo;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_dmallreasons
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dmallreasons
-    {
-    priority = 0xFFA7;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "fotacustcmds.dll";
-    ordinal = 1; // AllReasons command
-    retries = 2;
-    conditional_information = r_cond_syncml_dm_or_pnp_mobile_services;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_dmfirstbootreason
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dmfirstbootreason
-    {
-    priority = 0xFFA6;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "fotacustcmds.dll";
-    ordinal = 3; // FirstBoot command
-    retries = 2;
-    conditional_information = r_cond_pnp_mobile_services_and_firstboot;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_dmutilsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_dmutilsrv
-    {
-    priority = 0xFFB7;
-    name = "z:\\sys\\bin\\dmutilserver.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    monitor_info = r_mon_3_restarts_reset;
-    conditional_information = r_cond_feat_sappolicymgmt;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_fota
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_fota
-    {
-    priority = 0xFFA6;
-    execution_behaviour = ESsmWaitForSignal;
-    dllname = "fotacustcmds.dll";
-    ordinal = 2; // Fota command
-    retries = 2;
-    conditional_information = r_cond_syncml_dm_fota_and_fotareset;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_mdswatchdog
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_mdswatchdog
-    {
-    priority = 0xFFA7;
-    name = "mdswatchdog.exe";
-    execution_behaviour = ESsmFireAndForget;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_iaupdatebg
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_iaupdatebg
-    {
-    priority = 0x7EF4;
-    name = "iaupdatebg.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    conditional_information = r_cond_feat_iadv2;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_loadsup_ippushman
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_ippushman
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\ippushman.exe";
-    execution_behaviour = ESsmFireAndForget; // -- does not call Rendezvous() --
-    conditional_information = r_cond_feat_ippush;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_lbtsrv
-// ---------------------------------------------------------------------------
-//
-#ifdef FF_LBT_ENGINE
-RESOURCE SSM_START_PROCESS_INFO r_cmd_lbtsrv
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\lbtserver.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    }
-#endif // FF_LBT_ENGINE
-
-// ---------------------------------------------------------------------------
-// r_cmd_locod
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_locod
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\locod.exe";
-    execution_behaviour = ESsmFireAndForget;
-    monitor_info = r_mon_3_restarts_ignore;
-    }
-
-	
-
-// ---------------------------------------------------------------------------
 // r_cmd_psstate
 // ---------------------------------------------------------------------------
 //
@@ -589,19 +152,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_remotefe
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_remotefe
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\rsfwbootmounter.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    conditional_information = r_cond_feat_remotestoragefw;
-    }
-
-// ---------------------------------------------------------------------------
 // r_cmd_sastate
 // ---------------------------------------------------------------------------
 //
@@ -617,32 +167,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_satsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_satsrv
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\satserver.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    monitor_info = r_mon_3_restarts_ignore;
-    conditional_information = r_cond_feat_simcard;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_schedsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_schedsrv
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\schexe.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    }
-
-// ---------------------------------------------------------------------------
 // r_cmd_setswp_rfoff
 // ---------------------------------------------------------------------------
 //
@@ -708,49 +232,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_supllistener
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_supllistener
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\epos_omasupllistener.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    monitor_info = r_mon_3_restarts_ignore;
-    conditional_information = r_cond_feat_omasuplplugins;
-    }
-
-
-// ---------------------------------------------------------------------------
-// r_cmd_videocenter
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_videocenter
-    {
-    priority = 0x7EF6;
-    name = "cseschedulerserver.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_waitcleanbootinfo
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_waitcleanbootinfo
-    {
-    priority = 0x7F87;
-    severity = ECmdCriticalSeverity;
-    dllname = "ssmsystemcmds.dll";
-    ordinal = 6; // WaitPsKeyRange
-    dll_data = r_dlldata_waitcleanbootinfo;
-    retries = 2;
-    execution_behaviour = ESsmWaitForSignal;
-    }
-
-
-// ---------------------------------------------------------------------------
 // r_cmd_waitforofflinequery
 // ---------------------------------------------------------------------------
 //
@@ -767,17 +248,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_watcher
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_watcher
-    {
-    priority = 0xFFB7;
-    name = "z:\\sys\\bin\\watcher.exe";
-    monitor_info = r_mon_3_restarts_ignore;
-    }
-	
-// ---------------------------------------------------------------------------
 // r_cmd_clearstartupreason
 // ---------------------------------------------------------------------------
 //
@@ -791,20 +261,6 @@
     execution_behaviour = ESsmWaitForSignal;
     }
 
-// ---------------------------------------------------------------------------
-// r_cmd_javacaptain
-// ---------------------------------------------------------------------------
-//
-#ifdef __JAVA
-RESOURCE SSM_START_PROCESS_INFO r_cmd_javacaptain
-    {
-    priority = 0xFFB7;
-    name = "javacaptain.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    }
-#endif // __JAVA
-
 // ===========================================================================
 // DLL data items in alphabetical order
 // ===========================================================================
@@ -842,17 +298,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_dlldata_waitidle
-// ---------------------------------------------------------------------------
-//
-RESOURCE CMD_PARAM_WAIT_PS r_dlldata_waitidle
-    {
-    category = 0x101F8766;  // KPSUidStartup
-    key = 0x00000043;       // KPSIdlePhase1Ok
-    target = 101;           // EIdlePhase1Ok
-    }
-
-// ---------------------------------------------------------------------------
 // r_dlldata_waitofflinequery
 // ---------------------------------------------------------------------------
 //
@@ -875,18 +320,6 @@
     target = 101;           // EPhonePhase1Ok
     }
 	
-	
-// ---------------------------------------------------------------------------
-// r_cmd_mylocationsengine
-// ---------------------------------------------------------------------------
-//	
-RESOURCE SSM_START_PROCESS_INFO r_cmd_mylocationsengine
-    {
-    priority = 0x7EEC;
-    name = "z:\\sys\\bin\\mylocationsengine.exe";
-    execution_behaviour = ESsmFireAndForget;
-    }
-
 // ===========================================================================
 // Conditional blocks in alphabetical order
 // ===========================================================================
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_ext.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -0,0 +1,1030 @@
+/*
+* 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:
+* Command list for the Non-critical startup state in extended startup mode.
+*
+*/
+
+#include <ssm/conditionresourcetypes.rh>
+#include <ssm/ssmcmd.rh>
+#include <ssm/startupreason.h>
+#include <ssm/clayerswp.hrh>
+
+#include "ssmswp.hrh"
+#include "ssmsubstateext.hrh"
+#include "ssmdlldatadefs.rh"
+
+// Identify command list type
+UID2 KUidSsmCommandListResourceFile
+
+// ---------------------------------------------------------------------------
+// r_entry_point
+// This must be the first resource
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST_ROOT r_entry_point
+    {
+    command_list_mapping = r_map;
+    }
+
+// ---------------------------------------------------------------------------
+// r_map
+// Mapping of command list ids to resource ids.
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST_MAPPING r_map
+    {
+    mappings =
+        {
+        SSM_COMMANDLISTID_TO_RESOURCEID
+            {
+            command_list_id = ESsmStateNonCritical;
+            resource_id = r_cmds;
+            }
+        };
+    }
+
+// ===========================================================================
+// Command lists in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cmds
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST r_cmds
+    {
+    commands =
+        {
+        // prio 0xFFB7
+#ifdef __JAVA        
+        r_cmd_javacaptain,
+#endif // __JAVA
+        r_cmd_watcher,
+        r_cmd_dmutilsrv,
+        // prio 0xFFA7
+        r_cmd_contentharvester,
+        r_cmd_mdswatchdog,
+        r_cmd_satsrv,
+        r_cmd_cbssrv,
+        r_cmd_schedsrv,
+        r_cmd_aosrv,
+        r_cmd_ippushman,
+        r_cmd_remotefe,
+        r_cmd_supllistener,
+        r_cmd_autolock,
+        r_cmd_dmallreasons,
+        r_cmd_locod,
+#ifdef FF_LBT_ENGINE
+        r_cmd_lbtsrv,
+#endif // FF_LBT_ENGINE
+        r_cmd_taskswitcher,
+        //prio 0xFFA6
+        r_cmd_dmfirstbootreason,
+        r_cmd_fota,
+        // prio 0x7F87
+        r_cmd_waitcleanbootinfo,
+        // prio 0x7F97
+        r_cmd_dcmo,
+        r_cmd_amastart,
+        // prio 0x7F96
+        r_cmd_multiple_wait,
+        // prio 0x7EFF
+        r_cmd_activitymonitor1,
+        // prio 0x7EFD
+        r_cmd_activitymonitor2,
+        // prio 0x7EFB
+        r_cmd_activitymonitor3,
+        // prio 0x7EF9
+        r_cmd_activitymonitor4,
+        // prio 0x7EF7
+        r_cmd_activitymonitor5,
+        // prio 0x7EF6
+        r_cmd_videocenter,
+        // prio 0x7EF5
+        r_cmd_activitymonitor6,
+        // prio 0x7EF4
+        r_cmd_iaupdatebg,
+        // prio 0x7EF3
+        r_cmd_activitymonitor7,
+        // prio 0x7EF2
+        r_cmd_activitymonitor8,
+        // prio 0x7EEE
+        r_cmd_autosync,
+        // prio 0x7EED
+        r_cmd_activitymonitor9,
+        // prio 0x7EEC
+        r_cmd_mylocationsengine,
+        //prio 0x7EEA
+        r_cmd_activitymonitor10,
+        //prio 0x7EE9
+        r_cmd_conversationserver,	//SBSA-7YZGCQ
+        //prio 0x7EE8
+        r_cmd_activitymonitor11,
+        //prio 0x7EE7
+        r_cmd_msgnotifier		//SBSA-82ZBMC
+#ifdef FF_ATT_ADDRESS_BK
+        //prio 0x7EE6
+        ,r_cmd_activitymonitor12,
+        //prio 0x7EE5
+        r_cmd_aab
+#endif
+        };
+    }
+
+// ===========================================================================
+// Command items in alphabetical order
+// ===========================================================================
+//
+
+// -----------------------------------------------------------------------------
+// r_cmd_aab
+// -----------------------------------------------------------------------------
+//
+#ifdef FF_ATT_ADDRESS_BK 
+RESOURCE SSM_START_APP_INFO r_cmd_aab
+    {
+    priority = 0x7EE5;
+    name = "z:\\sys\\bin\\AABPhonebookapp.exe";
+    retries = 2;
+    background = 1; // To background
+    monitor_info = r_mon_3_restarts_ignore;
+    }
+#endif
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor1
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor1
+    {
+    priority = 0x7EFF;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor2
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor2
+    {
+    priority = 0x7EFD;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor3
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor3
+    {
+    priority = 0x7EFB;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor4
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor4
+    {
+    priority = 0x7EF9;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor5
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor5
+    {
+    priority = 0x7EF7;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor6
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor6
+    {
+    priority = 0x7EF5;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor7
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor7
+    {
+    priority = 0x7EF3;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor8
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor8
+    {
+    priority = 0x7EEF;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor9
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor9
+    {
+    priority = 0x7EED;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor10
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor10
+    {
+    priority = 0x7EEA;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+	
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor11
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor11
+    {
+    priority = 0x7EE8;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+	
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor12
+// ---------------------------------------------------------------------------
+//
+#ifdef FF_ATT_ADDRESS_BK
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor12
+    {
+    priority = 0x7EE6;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+#endif
+	
+// ---------------------------------------------------------------------------
+// r_cmd_amastart
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_AMA_STARTER r_cmd_amastart
+    {
+    priority = 0x7F97;
+    conditional_information = r_cond_ps_normalboot;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_autosync
+// ---------------------------------------------------------------------------
+//	
+RESOURCE SSM_START_PROCESS_INFO r_cmd_autosync
+    {
+    priority = 0x7EEE;
+    execution_behaviour = ESsmFireAndForget;
+    retries = 3;
+    name = "cctautosync.exe";
+    }
+	
+// ---------------------------------------------------------------------------
+// r_cmd_aosrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_aosrv
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\alwaysonlinestarter.exe";
+    execution_behaviour = ESsmFireAndForget;
+    conditional_information = r_cond_feat_alwaysonline;
+    monitor_info = r_mon_3_restarts_ignore;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_autolock
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_APP_INFO r_cmd_autolock
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\lockapp.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    timeout = 10000;
+    background = 1; // To background
+    monitor_info = r_mon_3_restarts_ignore;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_cbssrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_cbssrv
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\cbsserver.exe";
+    execution_behaviour = ESsmFireAndForget;
+    conditional_information = r_cond_feat_cellbroadcast;
+    monitor_info = r_mon_3_restarts_ignore;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_conversationserver
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_conversationserver
+    {
+    priority = 0x7EE9;
+    name = "csserver.exe";
+    execution_behaviour = ESsmFireAndForget;
+    }
+    
+// ---------------------------------------------------------------------------
+// r_cmd_contentharvester
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_contentharvester
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\contentharvester.exe";
+    execution_behaviour = ESsmFireAndForget;	//behavior changed from ESsmWaitForSignal as part of SCB CR MSOI-7XARNT
+    monitor_info = r_mon_3_restarts_ignore;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_dcmo
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dcmo
+    {
+    priority = 0x7F97;
+    execution_behaviour = ESsmFireAndForget;
+    dllname = "dcmostartupcustcmd.dll";
+    ordinal = 1; // DCMO command
+    conditional_information = r_cond_feat_runtime_dcmo;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_dmallreasons
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dmallreasons
+    {
+    priority = 0xFFA7;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "fotacustcmds.dll";
+    ordinal = 1; // AllReasons command
+    retries = 2;
+    conditional_information = r_cond_syncml_dm_or_pnp_mobile_services;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_dmfirstbootreason
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dmfirstbootreason
+    {
+    priority = 0xFFA6;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "fotacustcmds.dll";
+    ordinal = 3; // FirstBoot command
+    retries = 2;
+    conditional_information = r_cond_pnp_mobile_services_and_firstboot;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_dmutilsrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_dmutilsrv
+    {
+    priority = 0xFFB7;
+    name = "z:\\sys\\bin\\dmutilserver.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    timeout = 10000;
+    monitor_info = r_mon_3_restarts_reset;
+    conditional_information = r_cond_feat_sappolicymgmt;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_fota
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_fota
+    {
+    priority = 0xFFA6;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "fotacustcmds.dll";
+    ordinal = 2; // Fota command
+    retries = 2;
+    conditional_information = r_cond_syncml_dm_fota_and_fotareset;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_mdswatchdog
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_mdswatchdog
+    {
+    priority = 0xFFA7;
+    name = "mdswatchdog.exe";
+    execution_behaviour = ESsmFireAndForget;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_iaupdatebg
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_iaupdatebg
+    {
+    priority = 0x7EF4;
+    name = "iaupdatebg.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    timeout = 10000;
+    conditional_information = r_cond_feat_iadv2;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_ippushman
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_ippushman
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\ippushman.exe";
+    execution_behaviour = ESsmFireAndForget; // -- does not call Rendezvous() --
+    conditional_information = r_cond_feat_ippush;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_lbtsrv
+// ---------------------------------------------------------------------------
+//
+#ifdef FF_LBT_ENGINE
+RESOURCE SSM_START_PROCESS_INFO r_cmd_lbtsrv
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\lbtserver.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    timeout = 10000;
+    }
+#endif // FF_LBT_ENGINE
+
+// ---------------------------------------------------------------------------
+// r_cmd_locod
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_locod
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\locod.exe";
+    execution_behaviour = ESsmFireAndForget;
+    monitor_info = r_mon_3_restarts_ignore;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_msgnotifier
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_msgnotifier
+    {
+    priority = 0x7EE7;
+    name = "msgnotifier.exe";
+    execution_behaviour = ESsmFireAndForget;
+    retries = 3;
+    }	
+
+// ---------------------------------------------------------------------------
+// r_cmd_psstate
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_cmd_psstate
+    {
+    priority = 0xFFF0;
+    severity = ECmdCriticalSeverity;
+    category = 0x101F8766; // KPSUidStartup
+    key      = 0x00000041; // KPSGlobalSystemState
+    value    = 104;        // ESwStateCriticalPhaseOK
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_remotefe
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_remotefe
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\rsfwbootmounter.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    timeout = 10000;
+    conditional_information = r_cond_feat_remotestoragefw;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_satsrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_satsrv
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\satserver.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    timeout = 10000;
+    monitor_info = r_mon_3_restarts_ignore;
+    conditional_information = r_cond_feat_simcard;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_schedsrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_schedsrv
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\schexe.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    timeout = 10000;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_supllistener
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_supllistener
+    {
+    priority = 0xFFA7;
+    name = "z:\\sys\\bin\\epos_omasupllistener.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    timeout = 10000;
+    monitor_info = r_mon_3_restarts_ignore;
+    conditional_information = r_cond_feat_omasuplplugins;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_taskswitcher
+// ---------------------------------------------------------------------------  
+RESOURCE SSM_START_APP_INFO r_cmd_taskswitcher
+     {
+     priority = 0xFFA7;
+     name = "z:\\sys\\bin\\tsapplication.exe";
+     execution_behaviour = ESsmDeferredWaitForSignal;
+     background = 1; // To background
+     monitor_info = r_mon_3_restarts_ignore;
+     }
+
+// ---------------------------------------------------------------------------
+// r_cmd_multiple_wait
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_MULTIPLE_WAIT r_cmd_multiple_wait
+     {
+     priority = 0x7F96;     
+     }
+
+// ---------------------------------------------------------------------------
+// r_cmd_videocenter
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_videocenter
+    {
+    priority = 0x7EF6;
+    name = "cseschedulerserver.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    timeout = 10000;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_waitcleanbootinfo
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_waitcleanbootinfo
+    {
+    priority = 0x7F87;
+    severity = ECmdCriticalSeverity;
+    dllname = "ssmsystemcmds.dll";
+    ordinal = 6; // WaitPsKeyRange
+    dll_data = r_dlldata_waitcleanbootinfo;
+    retries = 2;
+    execution_behaviour = ESsmWaitForSignal;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_watcher
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_watcher
+    {
+    priority = 0xFFB7;
+    name = "z:\\sys\\bin\\watcher.exe";
+    monitor_info = r_mon_3_restarts_ignore;
+    }
+	
+// ---------------------------------------------------------------------------
+// r_cmd_javacaptain
+// ---------------------------------------------------------------------------
+//
+#ifdef __JAVA
+RESOURCE SSM_START_PROCESS_INFO r_cmd_javacaptain
+    {
+    priority = 0xFFB7;
+    name = "javacaptain.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    timeout = 10000;
+    }
+#endif // __JAVA
+
+// ===========================================================================
+// DLL data items in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_dlldata_activitymonitor_timeout
+// ---------------------------------------------------------------------------
+//
+RESOURCE CMD_PARAM_TIMEOUT r_dlldata_activitymonitor_timeout
+    {
+    timeout = 2;
+    }
+
+// ---------------------------------------------------------------------------
+// r_dlldata_waitcleanbootinfo
+// ---------------------------------------------------------------------------
+//
+RESOURCE CMD_PARAM_WAIT_PS_2 r_dlldata_waitcleanbootinfo
+    {
+    category = 0x101F8766;  // KPSUidStartup
+    key = 0x00000012;       // KStartupCleanBoot
+    target1 = 101;          // EStartupNormalBoot
+    target2 = 102;          // EStartupCleanBoot
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_mylocationsengine
+// ---------------------------------------------------------------------------
+//	
+RESOURCE SSM_START_PROCESS_INFO r_cmd_mylocationsengine
+    {
+    priority = 0x7EEC;
+    name = "z:\\sys\\bin\\mylocationsengine.exe";
+    execution_behaviour = ESsmFireAndForget;
+    }
+
+// ===========================================================================
+// Conditional blocks in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_firstboot
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_firstboot
+    {
+    category      = 0x101F8766; // KPSUidStartup
+    key           = 0x00000013; // KPSStartupFirstBoot
+    value         = 101;        // EPSStartupFirstBoot
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_alwaysonline
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_alwaysonline
+    {
+    feature_id = KFeatureIdAlwaysOnLine;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_cellbroadcast
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_cellbroadcast
+    {
+    feature_id = KFeatureIdCellBroadcast;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_iadv2
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_iadv2
+    {
+    feature_id = KFeatureIdFfIaupdatePhase2;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_ippush
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_ippush
+    {
+    feature_id = KFeatureIdIpPush;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_omasuplplugins
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_omasuplplugins
+    {
+    feature_id = KFeatureIdOmaSuplPlugins;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_pnp_mobile_services
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_pnp_mobile_services
+    {
+    feature_id = KFeatureIdPlugAndPlayMobileServices;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_remotestoragefw
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_remotestoragefw
+    {
+    feature_id = KFeatureIdRemoteStorageFw;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_runtime_dcmo;
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_runtime_dcmo
+    {
+    feature_id = KFeatureIdFfRuntimeDeviceCapabilityConfiguration;
+    }
+	
+// ---------------------------------------------------------------------------
+// r_cond_feat_sappolicymgmt
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_sappolicymgmt
+    {
+    feature_id = KFeatureIdSapPolicyManagement;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_sdnd
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_sdnd
+    {
+    feature_id = KFeatureIdSdnd;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_simcard
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_simcard
+    {
+    feature_id = KFeatureIdSimCard;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_sind
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_sind
+    {
+    feature_id = KFeatureIdSind;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_syncml_dm
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_syncml_dm
+    {
+    feature_id = KFeatureIdSyncMlDm;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_syncml_dm_fota
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_syncml_dm_fota
+    {
+    feature_id = KFeatureIdSyncMlDmFota;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_no_sdnd
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_NOT r_cond_no_sdnd
+    {
+    sub_condition = r_cond_feat_sdnd;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_pnp_mobile_services_and_firstboot
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_AND r_cond_pnp_mobile_services_and_firstboot
+    {
+    lhs = r_cond_feat_pnp_mobile_services;
+    rhs = r_cond_ps_firstboot;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_bootoffline
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_bootoffline
+    {
+    category = 0x101F8766; // KPSUidStartup
+    key = 0x00000011;      // KStartupBootIntoOffline
+    value = 102;           // EBootIntoOfflineMode
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_bootonline
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_bootonline
+    {
+    category = 0x101F8766; // KPSUidStartup
+    key = 0x00000011;      // KStartupBootIntoOffline
+    value = 101;           // EBootIntoOnlineMode
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_fotareset
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_fotareset
+    {
+    category = 0x101F8766; // KPSUidStartup
+    key = 0x00000045;      // KPSStartupReason
+    value = EFirmwareUpdate;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_normalboot
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_normalboot
+    {
+    category = 0x101F8766; // KPSUidStartup
+    key = 0x00000012;      // KStartupCleanBoot
+    value = 101;           // EStartupNormalBoot
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_simusable
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_simusable
+    {
+    category = 0x101F8766; // KPSUidStartup
+    key = 0x00000031;      // KPSSimStatus
+    value = 101;           // ESimUsable
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_simnotusable
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_NOT r_cond_simnotusable
+    {
+    sub_condition = r_cond_ps_simusable;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_simnotusable_or_bootoffline
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_OR r_cond_simnotusable_or_bootoffline
+    {
+    lhs = r_cond_simnotusable;
+    rhs = r_cond_ps_bootoffline;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_simusable_and_bootonline
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_AND r_cond_simusable_and_bootonline
+    {
+    lhs = r_cond_ps_simusable;
+    rhs = r_cond_ps_bootonline;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_sind_and_no_sdnd
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_AND r_cond_sind_and_no_sdnd
+    {
+    lhs = r_cond_feat_sind;
+    rhs = r_cond_no_sdnd;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_syncml_dm_fota_and_fotareset
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_AND r_cond_syncml_dm_fota_and_fotareset
+    {
+    lhs = r_cond_feat_syncml_dm_fota;
+    rhs = r_cond_ps_fotareset;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_syncml_dm_or_pnp_mobile_services
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_OR r_cond_syncml_dm_or_pnp_mobile_services
+    {
+    lhs = r_cond_feat_syncml_dm;
+    rhs = r_cond_feat_pnp_mobile_services;
+    }
+
+// monitoring.rss contains resource definitions, so it may not be included
+// before entry point.
+#include "monitoring.rss"
--- a/sysstatemgmt/ssmcmdlists/data/securitycheckcmdlist.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmcmdlists/data/securitycheckcmdlist.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 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"
@@ -75,6 +75,7 @@
         // prio 0xFFE3
         r_cmd_startup,
         r_cmd_phone,
+        r_cmd_clockserver,
         r_cmd_multiwaitforever2,
         // prio 0xFFDF
         r_cmd_idle,
@@ -93,7 +94,17 @@
 // Command items in alphabetical order
 // ===========================================================================
 //
-
+// -----------------------------------------------------------------------------
+// r_cmd_clockserver
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_clockserver
+	{
+	priority = 0xFFE3;
+	name = "clockserver.exe";
+	execution_behaviour = ESsmDeferredWaitForSignal;
+	}
+	
 // ---------------------------------------------------------------------------
 // r_cmd_createswp_simstatus
 // ---------------------------------------------------------------------------
@@ -165,8 +176,7 @@
     {
     priority = 0xFFE3;
     name = "z:\\sys\\bin\\phoneui.exe";
-    execution_behaviour = ESsmDeferredWaitForSignal;
-    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmFireAndForget;
     retries = 2;
     background = 1; // To background
     monitor_info = r_mon_reset;
--- a/sysstatemgmt/ssmcmdlists/data/uiservicescmdlist.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmcmdlists/data/uiservicescmdlist.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:
-* Command list for the UI-Services startup state (UI shell version).
+* Command list for the UI-Services startup state (UI shell version) for minimal startup.
 *
 */
 
@@ -80,21 +80,19 @@
         r_cmd_initramdrive,
         // prio 0xFFA7
         r_cmd_splash,
-        // prio 0xFF97
-        r_cmd_tzsrv,
-        r_cmd_mediator,
-        r_cmd_hwrmsrv,
-        r_cmd_rtc,
-        // prio 0xFF96 - tzsrv, mediator, hwrmsrv
+        r_cmd_rtc,              // prio 0xFF97
+        // prio 0xFF96 -  rtc (tzsrv, mediator & hwrmsrv have been moved to extended startuplist but uses the same multiplewait command )
         r_cmd_multiwaitforever1,
         // prio 0xFF87
-        r_cmd_dbrecovery,
         r_cmd_accsrv,
         r_cmd_selectlanguage,   // Select UI language to use
-        // prio 0xFF86 - dbrecovery, accsrv, seleclanguage
+        // prio 0xFF86 - accsrv, seleclanguage (dbrecovery has been moved to extended startup list but uses the same multiplewait command))
         r_cmd_multiwaitforever2,
         // prio 0xFF85
         r_cmd_loadlocalesup,    // Observes changes in locale data
+        r_cmd_loadcollation,	// Observes changes in Collation setting
+        r_cmd_loadregion,	// Observes changes in Region setting
+        r_cmd_loaduilanguage,	// Observes changes in UI Language setting
         // prio 0xFF79
         r_cmd_aknstart,         // UI Framework
         // prio 0xFF77
@@ -146,44 +144,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_dbrecovery
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_dbrecovery
-    {
-    priority = 0xFF87;
-    name = "z:\\sys\\bin\\dbrecovery.exe";
-    execution_behaviour = ESsmDeferredWaitForSignal;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_hwrmsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_hwrmsrv
-    {
-    priority = 0xFF97;
-    name = "Z:\\sys\\bin\\hwrmserver.exe";
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmDeferredWaitForSignal;
-    retries = 2;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_mediator
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_mediator
-    {
-    priority = 0xFF97;
-    name = "Z:\\sys\\bin\\mediatorserver.exe";
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmDeferredWaitForSignal;
-    monitor_info = r_mon_3_restarts_reset;
-    conditional_information = r_cond_feat_mediator;
-    }
-
-// ---------------------------------------------------------------------------
 // r_cmd_initclkeys
 // ---------------------------------------------------------------------------
 //
@@ -225,6 +185,39 @@
     }
 
 // ---------------------------------------------------------------------------
+// r_cmd_loadcollation
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_SSM_UTILITY_PLUGIN r_cmd_loadcollation
+    {
+    priority = 0xFF85;
+    filename = "ssmlocaleobserversup.dll";
+    ordinal = 2;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_loadregion
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_SSM_UTILITY_PLUGIN r_cmd_loadregion
+    {
+    priority = 0xFF85;
+    filename = "ssmlocaleobserversup.dll";
+    ordinal = 3;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_loaduilanguage
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_SSM_UTILITY_PLUGIN r_cmd_loaduilanguage
+    {
+    priority = 0xFF85;
+    filename = "ssmlocaleobserversup.dll";
+    ordinal = 4;
+    }
+
+// ---------------------------------------------------------------------------
 // r_cmd_loadpowersup
 // ---------------------------------------------------------------------------
 //
@@ -396,18 +389,6 @@
     retries = 2;
     }
 
-// ---------------------------------------------------------------------------
-// r_cmd_tzsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_tzsrv
-    {
-    priority = 0xFF97;
-    name = "Z:\\sys\\bin\\tzserver.exe";
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmDeferredWaitForSignal;
-    }
-
 // ===========================================================================
 // DLL data items in alphabetical order
 // ===========================================================================
@@ -461,14 +442,6 @@
     value         = 102;        // ENormalRFSReset
     }
 
-// ---------------------------------------------------------------------------
-// r_cond_feat_mediator
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_mediator
-    {
-    feature_id = KFeatureIdMediator;
-    }
 
 // monitoring.rss contains resource definitions, so it may not be included
 // before entry point.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmcmdlists/data/uiservicescmdlist_ext.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -0,0 +1,148 @@
+/*
+* 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:
+* Command list for the UI-Services startup state (UI shell version) for extended startup.
+*
+*/
+
+#include <ssm/conditionresourcetypes.rh>
+#include <ssm/ssmcmd.rh>
+
+#include "ssmsubstateext.hrh"
+#include "ssmdlldatadefs.rh"
+
+// Identify command list type
+UID2 KUidSsmCommandListResourceFile
+
+// ---------------------------------------------------------------------------
+// r_entry_point
+// This must be the first resource
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST_ROOT r_entry_point
+    {
+    command_list_mapping = r_map;
+    }
+
+// ---------------------------------------------------------------------------
+// r_map
+// Mapping of command list ids to resource ids.
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST_MAPPING r_map
+    {
+    mappings =
+        {
+        SSM_COMMANDLISTID_TO_RESOURCEID
+            {
+            command_list_id = ESsmStateStartingUiServices;
+            resource_id = r_cmds;
+            }
+        };
+    }
+
+// ===========================================================================
+// Command lists in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cmds
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST r_cmds
+    {
+    commands =
+        {
+        // prio 0xFF99
+        r_cmd_tzsrv,
+        r_cmd_mediator,
+        r_cmd_hwrmsrv,
+        // prio 0xFF89
+        r_cmd_dbrecovery
+        };
+    }
+
+// ===========================================================================
+// Command items in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cmd_dbrecovery
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_dbrecovery
+    {
+    priority = 0xFF89;
+    name = "z:\\sys\\bin\\dbrecovery.exe";
+    execution_behaviour = ESsmDeferredWaitForSignal;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_hwrmsrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_hwrmsrv
+    {
+    priority = 0xFF99;
+    name = "Z:\\sys\\bin\\hwrmserver.exe";
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmDeferredWaitForSignal;
+    retries = 2;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_mediator
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_mediator
+    {
+    priority = 0xFF99;
+    name = "Z:\\sys\\bin\\mediatorserver.exe";
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmDeferredWaitForSignal;
+    monitor_info = r_mon_3_restarts_reset;
+    conditional_information = r_cond_feat_mediator;
+    }
+
+
+// ---------------------------------------------------------------------------
+// r_cmd_tzsrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_tzsrv
+    {
+    priority = 0xFF99;
+    name = "Z:\\sys\\bin\\tzserver.exe";
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmDeferredWaitForSignal;
+    }
+
+// ===========================================================================
+// DLL data items in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_mediator
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_mediator
+    {
+    feature_id = KFeatureIdMediator;
+    }
+// monitoring.rss contains resource definitions, so it may not be included
+// before entry point.
+#include "monitoring.rss"
--- a/sysstatemgmt/ssmcmdlists/data/usbwatcher_hw.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmcmdlists/data/usbwatcher_hw.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -74,7 +74,7 @@
         {
 #ifdef RD_USB_CHARGING
         r_cmd_usbwatcher
-#endif RD_USB_CHARGING
+#endif //RD_USB_CHARGING
         };
     }
 
--- a/sysstatemgmt/ssmcmdlists/group/ssmcmdlists.mmp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmcmdlists/group/ssmcmdlists.mmp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -29,7 +29,7 @@
 TARGETPATH      /private/2000d75b/startup/0          // Private directory of sysstatemgr.exe
 END
 
-START RESOURCE  uiservicescmdlist.rss                // Starting UI-Services startup state
+START RESOURCE  uiservicescmdlist.rss                // Starting UI-Services startup state for minimal bootup
 TARGETPATH      /private/2000d75b/startup/0          // Private directory of sysstatemgr.exe
 END
 
@@ -49,7 +49,7 @@
 TARGETPATH      /private/2000d75b/startup/0          // Private directory of sysstatemgr.exe
 END
 
-START RESOURCE  noncriticalcmdlist.rss               // Non-critical startup state
+START RESOURCE  noncriticalcmdlist.rss               // Non-critical startup state for minimal bootup
 TARGETPATH      /private/2000d75b/startup/0          // Private directory of sysstatemgr.exe
 END
 
@@ -57,6 +57,14 @@
 TARGETPATH      /private/2000d75b/startup/0          // Private directory of sysstatemgr.exe
 END
 
+START RESOURCE  noncriticalcmdlist_ext.rss           // Non-critical startup state for extended bootup
+TARGETPATH      /private/2000d75b/startup/0_ext 	 // Private directory of sysstatemgr.exe
+END
+
+START RESOURCE  uiservicescmdlist_ext.rss            // Starting UI-Services startup state for extended bootup
+TARGETPATH      /private/2000d75b/startup/0_ext		 // Private directory of sysstatemgr.exe
+END
+
 // Command lists specific to HW
 
 START RESOURCE  wserv_hw.rss                         // Window server command list (HW version)
--- a/sysstatemgmt/ssmcmdlists/rom/ssmcmdlists.iby	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmcmdlists/rom/ssmcmdlists.iby	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -27,6 +27,8 @@
 data=DATAZ_\private\2000D75B\startup\0\securitycheckcmdlist.rsc         \private\2000D75B\startup\0\securitycheckcmdlist.rsc
 data=DATAZ_\private\2000D75B\startup\0\noncriticalcmdlist.rsc           \private\2000D75B\startup\0\noncriticalcmdlist.rsc
 data=DATAZ_\private\2000D75B\startup\0\emergencycallsonlycmdlist.rsc    \private\2000D75B\startup\0\emergencycallsonlycmdlist.rsc
+data=DATAZ_\private\2000D75B\startup\0_ext\uiservicescmdlist_ext.rsc    \private\2000D75B\startup\0\uiservicescmdlist_ext.rsc
+data=DATAZ_\private\2000D75B\startup\0_ext\noncriticalcmdlist_ext.rsc   \private\2000D75B\startup\0\noncriticalcmdlist_ext.rsc
 data=DATAZ_\private\2000D75B\hw\wserv_hw.rsc                            \private\2000D75B\startup\0\wserv.rsc
 data=DATAZ_\private\2000D75B\hw\noncriticalcmdlist_hw.rsc               \private\2000D75B\startup\0\noncriticalcmdlist_hw.rsc
 data=DATAZ_\private\2000D75B\hw\usbwatcher_hw.rsc                       \private\2000D75B\startup\0\usbwatcher.rsc
--- a/sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -20,6 +20,7 @@
 #include "ssmmapperutility.h"
 #include "ssmmapperutilityinternalpskeys.h"
 #include "ssmcustcmdsprivatepskeys.h"
+#include "ssmlocalepskeys.h"
 #include "trace.h"
 
 #include <ssm/startupdomainpskeys.h>
@@ -273,7 +274,32 @@
              KReadDeviceDataPolicy,
              KWriteDeviceDataPolicy );
     SetL( KPSStarterUid, KRTCPropertyKey, 0 );
-    
+
+    //Used for observing the Collation code change in CSsmCollationObserver
+    INFO( "KPSStarterUid::KSSMCollationPSKey" );
+    DefineL( KPSStarterUid,
+             KSSMCollationPSKey,
+             KReadDeviceDataPolicy,
+             KWriteDeviceDataPolicy );
+    SetL( KPSStarterUid, KSSMCollationPSKey, 0 );
+
+    //Used for observing the Region code change in CSsmRegionObserver 
+    INFO( "KPSStarterUid::KSSMRegionPSKey" );
+    DefineL( KPSStarterUid,
+             KSSMRegionPSKey,
+             KReadDeviceDataPolicy,
+             KWriteDeviceDataPolicy );
+    SetL( KPSStarterUid, KSSMRegionPSKey, 0 );
+
+
+    INFO( "KPSStarterUid::KSSMUiLanguagePSKey " );
+    DefineL( KPSStarterUid,
+             KSSMUILanguagePSKey ,
+             KReadDeviceDataPolicy,
+             KWriteDeviceDataPolicy );
+    SetL( KPSStarterUid, KSSMUILanguagePSKey , 0 );
+
+
 // Store FirstBoot Value from cenrep
 TInt csVal( 0 );
 TInt psVal( 0 );
--- a/sysstatemgmt/ssmmapperutility/inc/ssmmapperutility.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmmapperutility/inc/ssmmapperutility.h	Fri Apr 16 16:18:45 2010 +0300
@@ -105,7 +105,7 @@
      * @aMessage Client message
      * @return ETrue if capabilities ok, otherwise EFalse
      */
-    virtual TBool CheckCaps( const RMessagePtr2& aMessage );
+    IMPORT_C virtual TBool CheckCaps( const RMessagePtr2& aMessage );
     
     /**
     * First phase constructor. Exported for 
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/bwins/ssmlocaleobserversupu.def	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/bwins/ssmlocaleobserversupu.def	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,6 @@
 EXPORTS
 	?NewL@CSsmLocaleObserverSup@@SAPAVMSsmUtility@@XZ @ 1 NONAME ; class MSsmUtility * CSsmLocaleObserverSup::NewL(void)
+	?NewL@CSsmCollationObserver@@SAPAVMSsmUtility@@XZ @ 2 NONAME ; class MSsmUtility * CSsmCollationObserver::NewL(void)
+	?NewL@CSsmRegionObserver@@SAPAVMSsmUtility@@XZ @ 3 NONAME ; class MSsmUtility * CSsmRegionObserver::NewL(void)
+	?NewL@CSsmUiLanguageObserver@@SAPAVMSsmUtility@@XZ @ 4 NONAME ; class MSsmUtility * CSsmUiLanguageObserver::NewL(void)
 
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/eabi/ssmlocaleobserversupu.def	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/eabi/ssmlocaleobserversupu.def	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,6 @@
 EXPORTS
 	_ZN21CSsmLocaleObserverSup4NewLEv @ 1 NONAME
+	_ZN18CSsmRegionObserver4NewLEv @ 2 NONAME
+	_ZN21CSsmCollationObserver4NewLEv @ 3 NONAME
+	_ZN22CSsmUiLanguageObserver4NewLEv @ 4 NONAME
 
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/group/ssmlocaleobserversup.mmp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/group/ssmlocaleobserversup.mmp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -28,6 +28,9 @@
 
 SOURCEPATH      ../src
 SOURCE          ssmlocaleobserversup.cpp
+SOURCE          ssmcollationobserversup.cpp
+SOURCE          ssmregionobserversup.cpp 
+SOURCE          ssmuilanguageobserversup.cpp
 
 USERINCLUDE     ../inc
 USERINCLUDE     ../../inc
@@ -41,6 +44,8 @@
 LIBRARY         euser.lib
 LIBRARY         ssmcmn.lib
 LIBRARY         ssmmapperutility.lib
+LIBRARY         centralrepository.lib
+
 
 // >>> uncomment to enable function-level tracing
 // MACRO        __SSM_FUNC_TRACE__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmcollationobserversup.h	Fri Apr 16 16:18:45 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* 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: Declaration of CSsmCollationObserver class.
+*
+*/
+
+#ifndef __SSMCOLLATIONOBSERVER_H__
+#define __SSMCOLLATIONOBSERVER_H__
+
+#include <e32base.h>
+#include <ssm/ssmutility.h>
+#include <e32property.h>
+
+/**
+* SSM Utility plugin to observe the Collation code changes and load the new collation
+* when it is changed.
+*/
+NONSHARABLE_CLASS( CSsmCollationObserver ) : public CActive, public MSsmUtility
+    {
+public:
+	//From MSsmUtility
+	void InitializeL();
+	void StartL();
+	void Release();
+    
+public:
+    /**
+     * Two-phased constructor.
+     */
+    IMPORT_C static MSsmUtility* NewL();
+
+protected:
+    // from base class CActive
+
+    /**
+     * Implements cancellation of an outstanding request.
+     */
+    void DoCancel();
+
+    /**
+     * Handles an active object’s request completion event.
+     * This RunL will never leave, so RunError not needed.
+     */
+    void RunL();
+
+private:
+    /**
+    * Destructor.
+    */
+    ~CSsmCollationObserver();
+    
+    /**
+     * C++ default constructor.
+     */
+    CSsmCollationObserver();
+
+    /**
+    * Activate the active object.
+    */
+    void Activate();
+
+    /**
+    * Loads the Collation set in the PS key.
+    */
+    void LoadCollation();
+    
+    /**
+    * Store the Collation code to Central Repository.
+    * @param aCollation The Collation code to store.
+    */
+	void StoreCollationToCentRep( const TInt aCollation );
+	
+private: // data
+
+    /**
+    * Used for observing Collation code changes.
+    */
+	RProperty iCollationProperty;
+    };
+#endif // __SSMCOLLATIONOBSERVER_H__
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmlocaleobserversup.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmlocaleobserversup.h	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -15,13 +15,15 @@
 *
 */
 
-#ifndef C_SSMLOCALEOBSERVERSUP_H
-#define C_SSMLOCALEOBSERVERSUP_H
+#ifndef __SSMLOCALEOBSERVERSUP_H__
+#define __SSMLOCALEOBSERVERSUP_H__
 
+#include "ssmcommonlocale.h"
 #include <e32base.h>
 #include <e32property.h>
 #include <f32file.h>
 #include <ssm/ssmutility.h>
+#include <e32hashtab.h> 
 
 class CEnvironmentChangeNotifier;
 
@@ -75,34 +77,32 @@
     /**
     * Copied fron SysLocale.
     * SaveLocaleL saves TLocale class to the given directory
-    * and initiates missing independent data, if any.
-    * Note, that independent data is created only once and it is
-    * shared by all the locales. Therefore, it is recommended
-    * to call this method upon early boot phase of a device.
+    * 
     * @param aPath Directory path containing locale data files.
     *              (e.g. "c:\dir" or c:\dir\")
     */
-    void SaveLocaleL( const TDesC& aPath );
+    void SaveRegionL( const TDesC& aPath );
 
     /**
     * Copied fron SysLocale.
-    * LoadLocaleL restores TLocale class from the given directory.
-    * If locale independent data (see note)
-    * exists, its data overrides the restored TLocale data.
+    * LoadRegionL restores TLocale class from the given directory.
+    *
     * @param aPath Directory path containing locale data files
     *              (e.g. "c:\dir" or c:\dir\")
     */
-    void LoadLocaleL( const TDesC& aPath );
-
+    void LoadRegionL( const TDesC& aPath );
+    
     /**
-    * Stores locale independent data.
+    * Initialize the language region mapping
+    * 
     */
-    void SaveIndependentDataL( const TLocale& aLocale, const TDesC& aPath );
-
+    void InitializeRegionMappingL();
+    
     /**
-    * Loads locale independent data.
+    * Gets the associated region for the given language
+    * 
     */
-    void LoadIndependentDataL( TLocale& aLocale, const TDesC& aPath );
+    TInt MappedRegionL(const TInt aLanguage);
 
 private: // data
 
@@ -127,6 +127,10 @@
     */
     RFs iFs;
 
+    /**
+    * Array of  language and region mappings.
+    */
+    RHashSet<TLanguageRegion>  iLangRegionMappingHashSet;
     };
 
-#endif // C_SSMLOCALEOBSERVERSUP_H
+#endif // __SSMLOCALEOBSERVERSUP_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmregionobserversup.h	Fri Apr 16 16:18:45 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* 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: Declaration of CSsmRegionObserver class.
+*
+*/
+#ifndef __SSMREGIONOBSERVER_H__
+#define __SSMREGIONOBSERVER_H__
+
+#include <e32base.h>
+#include <ssm/ssmutility.h>
+#include <e32property.h>
+#include "trace.h"
+
+/**
+* SSM Utility plugin to observe the Region code changes and load the new Region
+* when it is changed.
+*/
+NONSHARABLE_CLASS( CSsmRegionObserver ) : public CActive, public MSsmUtility
+    {
+public:
+    //From MSsmUtility
+    void InitializeL();
+    void StartL();
+    void Release();
+    
+public:
+    /**
+     * Two-phased constructor.
+     */
+    IMPORT_C static MSsmUtility* NewL();
+
+protected:
+    // from base class CActive
+
+    /**
+     * Implements cancellation of an outstanding request.
+     */
+    void DoCancel();
+
+    /**
+     * Handles an active object’s request completion event.
+     * This RunL will never leave, so RunError not needed.
+     */
+    void RunL();
+
+private:
+    /**
+    * Destructor.
+    */
+    ~CSsmRegionObserver();
+    
+    /**
+     * C++ default constructor.
+     */
+    CSsmRegionObserver();
+
+    /**
+    * Activate the active object.
+    */
+    void Activate();
+
+    /**
+    * Loads the Region set in the PS key.
+    */
+    void LoadRegion();
+    
+    /**
+    * Store the Region code to Central Repository.
+    * @param aRegion The Region code to store.
+    */
+    void StoreRegionToCentRep( const TInt aRegion);
+    
+private: // data
+
+    /**
+    * Used for observing Region code changes.
+    */
+    RProperty iRegionProperty;
+    };
+#endif // __SSMREGIONOBSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmuilanguageobserversup.h	Fri Apr 16 16:18:45 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* 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: Declaration of CSsmUiLanguageObserver class.
+*
+*/
+#ifndef __SSMUILANGUAGEOBSERVER_H__
+#define __SSMUILANGUAGEOBSERVER_H__
+
+#include <e32base.h>
+#include <ssm/ssmutility.h>
+#include <e32property.h>
+#include "trace.h"
+
+/**
+* SSM Utility plugin to observe the UI Language code changes and load the new UI Language
+* when it is changed.
+*/
+NONSHARABLE_CLASS( CSsmUiLanguageObserver ) : public CActive, public MSsmUtility
+    {
+public:
+	//From MSsmUtility
+	void InitializeL();
+	void StartL();
+	void Release();
+    
+public:
+    /**
+     * Two-phased constructor.
+     */
+    IMPORT_C static MSsmUtility* NewL();
+
+protected:
+    // from base class CActive
+
+    /**
+     * Implements cancellation of an outstanding request.
+     */
+    void DoCancel();
+
+    /**
+     * Handles an active object’s request completion event.
+     * This RunL will never leave, so RunError not needed.
+     */
+    void RunL();
+
+private:
+    /**
+    * Destructor.
+    */
+    ~CSsmUiLanguageObserver();
+    
+    /**
+     * C++ default constructor.
+     */
+    CSsmUiLanguageObserver();
+
+    /**
+    * Activate the active object.
+    */
+    void Activate();
+
+    /**
+    * Loads the Language set in the PS key.
+    */
+    void LoadUILanguage();
+
+    /**
+    * Store the Language code to Central Repository.
+    * @param aUILanguage The Language code to store.
+    */
+    void StoreUILanguageToCentRep( const TInt aUILanguage);
+	
+private: // data
+
+    /**
+    * Used for observing UI Language code changes.
+    */
+	RProperty iUILanguageProperty;
+    };
+#endif // __SSMUILANGUAGEOBSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmcollationobserversup.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -0,0 +1,195 @@
+/*
+* 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: Implementation of CSsmCollationObserver class.
+*
+*/
+#include "ssmcollationobserversup.h"
+#include "ssmlocalepskeys.h"
+#include "ssmmapperutilityinternalpskeys.h"
+#include "ssmcommonlocale.h"
+#include "trace.h"
+#include <centralrepository.h>
+#include <CommonEngineDomainCRKeys.h>
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::NewL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C MSsmUtility* CSsmCollationObserver::NewL()
+    {
+    FUNC_LOG;
+    CSsmCollationObserver* self = new( ELeave ) CSsmCollationObserver();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::InitializeL()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::InitializeL()
+	{
+
+	}
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::StartL()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::StartL()
+	{
+	FUNC_LOG;
+	TInt errorCode = iCollationProperty.Attach( KPSStarterUid, KSSMCollationPSKey );
+	ERROR_2( errorCode, "Failed to attach to property 0x%08x::0x%08x", KPSStarterUid.iUid, KSSMCollationPSKey );
+	Activate();
+	}
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::Release()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::Release()
+	{
+	FUNC_LOG;
+	delete this;
+	}
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::~CSsmCollationObserver()
+// ---------------------------------------------------------------------------
+//
+CSsmCollationObserver::~CSsmCollationObserver()
+    {
+    FUNC_LOG;
+    Cancel();
+    iCollationProperty.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::DoCancel()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::DoCancel()
+    {
+    FUNC_LOG;
+    iCollationProperty.Cancel();
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::RunL()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::RunL()
+    {
+    FUNC_LOG;
+    const TInt errorCode = iStatus.Int();
+    if (KErrNone == errorCode )
+        {
+        Activate();
+        LoadCollation();
+        }
+    else
+    	{
+    	INFO_1( "CSsmCollationObserver::RunL()completed with: %d - not reactivating", iStatus.Int() );
+    	}
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::LoadCollation()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::LoadCollation()
+    {
+    FUNC_LOG;
+    TInt collation(0);
+    TInt errorCode = iCollationProperty.Get( collation );
+
+    if( KErrNone != errorCode )
+        {
+        INFO_1( "Failed to get KSSMCollationPSKey value with error  %d", errorCode );
+        return;
+        }
+
+    // Dot plus three digit locale
+    TBuf<KMaxDllExtensionLength> extension; 
+    extension.Format( KDllExtensionFormat, collation );
+
+    // Padd ".1" to ".001" for compatibility.   
+    for( ; extension.Length() < KMinDllExtensionLength ;) 
+        {
+        extension.Insert( KDllExtensionPaddingPosition,
+                          KDllExtensionPadding );
+        }
+
+    TBuf<KMaxDllNameLength> collationDllName( KCollationDllNameBase );
+    collationDllName.Append( extension );
+    INFO_1( "Loading Collation DLL named '%S'", &collationDllName );
+
+    TExtendedLocale extLocale;
+    extLocale.LoadSystemSettings();
+    errorCode = extLocale.LoadLocaleAspect( collationDllName );
+
+    if ( KErrNone == errorCode )
+        {
+        errorCode = extLocale.SaveSystemSettings();
+        ERROR( errorCode, "Failed to save locale (Collation) settings" );
+        TLocale().Set();
+        StoreCollationToCentRep( collation );
+        }
+    else
+        {
+        INFO_1( "Failed to load locale (Collation) with error  %d", errorCode );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::StoreCollationToCentRep
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::StoreCollationToCentRep( const TInt aCollation )
+    {
+    FUNC_LOG;
+    CRepository* cenrep = NULL;
+    TRAPD( errorCode, cenrep = CRepository::NewL( KCRUidCommonEngineKeys ) );
+    ERROR_1( errorCode, "Failed to initialize cen rep %d", errorCode );
+    
+    if ( KErrNone == errorCode )
+        {
+        errorCode = cenrep->Set( KGSCollation, aCollation);
+        ERROR_1( errorCode, "Failed to store collation code to CentRep, %d", 
+                                                                  errorCode );
+        delete cenrep;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::CSsmCollationObserver()
+// ---------------------------------------------------------------------------
+//
+CSsmCollationObserver::CSsmCollationObserver() : CActive( EPriorityStandard )
+    {
+    FUNC_LOG;
+    CActiveScheduler::Add( this );
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::Activate()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::Activate()
+    {
+	FUNC_LOG;
+    ASSERT( !IsActive() );
+    iCollationProperty.Subscribe( iStatus );
+    SetActive();
+    }
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmlocaleobserversup.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmlocaleobserversup.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -19,6 +19,7 @@
 #include <bautils.h>
 #include <connect/sbdefs.h>
 #include <s32file.h>
+#include <e32reg.h>
 
 #include "ssmmapperutilitystatic.h"
 #include "ssmlocaleobserversup.h"
@@ -30,9 +31,8 @@
 */
 _LIT( KLocaleDataDir, "\\private\\2000d766\\localedata\\" );
 
-/** Name is LocaleData.Dnn or CommonData.D00 */
-_LIT( KFileName, "LocaleData.D" );
-_LIT( KCommonFileName, "CommonData.D" );
+/** Name is RegionData.Dnn */
+_LIT( KFileName, "RegionData.D" );
 
 /**
 * Version number from 1..255 to indicate data
@@ -41,6 +41,9 @@
 */
 const TInt KCurrentVersionNumber = 2; // For fixing TChar r/w
 
+/** The maximum number of regions to be appended to the hash set. */
+const TInt KMaxNumberOfRegions = 56;
+
 // ======== LOCAL FUNCTIONS ========
 
 // ---------------------------------------------------------------------------
@@ -64,7 +67,7 @@
 static HBufC* MakeFileNameL( const TDesC& aPath, const TDesC& aName, const TInt aCode )
     {
     FUNC_LOG;
-    INFO_3( "Locale data dir: %S, file name base: %S, lang code: %d", &aPath, &aName, aCode );
+    INFO_3( "Region data dir: %S, file name base: %S, region code: %d", &aPath, &aName, aCode );
 
     TInt length = aPath.Length();
 
@@ -84,11 +87,21 @@
         }
     ptr.AppendNum( aCode );
 
-    INFO_1( "Locale data file: %S", buffer );
+    INFO_1( "Region data file: %S", buffer );
 
     return buffer;
     }
 
+inline TUint32 HashLangRegionMappingFunction(const TLanguageRegion& aMapping)
+    {
+    return aMapping.iLanguage;
+    }
+
+inline TBool HashLangRegionMappingIdentityRelation(const TLanguageRegion& aMapping1,
+    const TLanguageRegion& aMapping2)
+    {
+    return (aMapping1.iLanguage == aMapping2.iLanguage);
+    }
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -112,6 +125,7 @@
     FUNC_LOG;
 
     Cancel();
+    iLangRegionMappingHashSet.Close();
     delete iEnvChangeNotifier;
     iFs.Close();
     iProperty.Close();
@@ -133,7 +147,7 @@
     if ( !iRestoreActive && ( changes & EChangesLocale ) )
         {
         TParsePtrC parse( KLocaleDataDir );
-        SaveLocaleL( parse.FullName() );
+        SaveRegionL( parse.FullName() );
         }
 
     if( changes & EChangesSystemTime )
@@ -185,9 +199,9 @@
                 iRestoreActive = EFalse;
 
                 TParsePtrC parse( KLocaleDataDir );
-                TRAP( err, LoadLocaleL( parse.FullName() ) );
+                TRAP( err, LoadRegionL( parse.FullName() ) );
                 ERROR( err, "Failed to load locale" );
-                // Can not do anything about the error - just continue.
+                // Cannot do anything about the error - just continue.
                 }
             }
         }
@@ -218,6 +232,8 @@
     ERROR( err, "Failed to connect to file server" );
     User::LeaveIfError( err );
 
+    InitializeRegionMappingL();
+    
     TRAP( err, iEnvChangeNotifier = CEnvironmentChangeNotifier::NewL(
         CActive::EPriorityStandard,
         TCallBack( EnvChangeNotifierCallback, this ) ) );
@@ -235,8 +251,8 @@
     FUNC_LOG;
 
     TParsePtrC parse( KLocaleDataDir );
-    TRAPD_ERR( err, LoadLocaleL( parse.FullName() ) );
-    ERROR( err, "Failed to load locale data the first time" );
+    TRAPD_ERR( err, LoadRegionL( parse.FullName() ) );
+    ERROR( err, "Failed to load region data the first time" );
 
     if ( iEnvChangeNotifier )
         {
@@ -268,7 +284,8 @@
 //
 CSsmLocaleObserverSup::CSsmLocaleObserverSup()
   : CActive( EPriorityNormal ),
-    iRestoreActive( EFalse )
+    iRestoreActive( EFalse ),
+    iLangRegionMappingHashSet( &::HashLangRegionMappingFunction, &::HashLangRegionMappingIdentityRelation )
     {
     FUNC_LOG;
 
@@ -291,15 +308,16 @@
 
 
 // ---------------------------------------------------------------------------
-// CSsmLocaleObserverSup::SaveLocaleL
+// CSsmLocaleObserverSup::SaveRegionL
 // ---------------------------------------------------------------------------
 //
-void CSsmLocaleObserverSup::SaveLocaleL( const TDesC& aPath )
+void CSsmLocaleObserverSup::SaveRegionL( const TDesC& aPath )
     {
     FUNC_LOG;
-    INFO( "Saving locale data" );
-
-    HBufC* fName = MakeFileNameL( aPath, KFileName, User::Language() );
+    INFO( "Saving region data" );
+    
+    TInt region = MappedRegionL(User::Language());
+    HBufC* fName = MakeFileNameL( aPath, KFileName, region);
     CleanupStack::PushL( fName );
 
     RFileWriteStream fStream;
@@ -365,9 +383,6 @@
     fStream.WriteInt8L( locale.NegativeCurrencySymbolOpposite() );
     fStream.WriteInt16L( locale.DigitType() );
 
-    // Then save display language independent data
-    SaveIndependentDataL( locale, aPath );
-
     // If CommitL leaves it means probably full disk.
     // It is here assumed that data has not been changed if this leaves.
     fStream.CommitL();
@@ -378,15 +393,16 @@
 
 
 // ---------------------------------------------------------------------------
-// CSsmLocaleObserverSup::LoadLocaleL
+// CSsmLocaleObserverSup::LoadRegionL
 // ---------------------------------------------------------------------------
 //
-void CSsmLocaleObserverSup::LoadLocaleL( const TDesC& aPath )
+void CSsmLocaleObserverSup::LoadRegionL( const TDesC& aPath )
     {
     FUNC_LOG;
-    INFO( "Loading locale data" );
+    INFO( "Loading region data" );
 
-    HBufC* fName = MakeFileNameL( aPath, KFileName, User::Language() );
+    TInt region = MappedRegionL(User::Language());
+    HBufC* fName = MakeFileNameL( aPath, KFileName, region);
     CleanupStack::PushL( fName );
 
     TLocale locale; // copy current values
@@ -404,7 +420,7 @@
     if ( err == KErrNone  )
         {
         TInt version = fStream.ReadInt8L();
-        INFO_1( "Locale file version: %d", version );
+        INFO_1( "Region file version: %d", version );
 
         locale.SetCountryCode( fStream.ReadInt16L() );
         fStream.ReadInt16L(); // obsolete
@@ -450,10 +466,6 @@
         locale.SetDigitType( static_cast< TDigitType >( fStream.ReadInt16L() ) );
         }
 
-    // Then patch data with locale independent data (code 00)
-    // No changes to locale if no independent data can be found (the very first boot)
-    LoadIndependentDataL( locale, aPath );
-
     // Save changes to the system.
     locale.Set();
 
@@ -461,93 +473,83 @@
     CleanupStack::PopAndDestroy( fName );
     }
 
+void CSsmLocaleObserverSup::InitializeRegionMappingL()
+    {
+    //Reserve the memory for the number of mappings to be appended
+    iLangRegionMappingHashSet.ReserveL( KMaxNumberOfRegions );
+    
+    //Insert the Language - Region mapping
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish,             ERegGBR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFrench,              ERegFRA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGerman,              ERegDEU ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSpanish,             ERegESP ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangItalian,             ERegITA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSwedish,             ERegSWE ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangDanish,              ERegDNK ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangNorwegian,           ERegNOR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFinnish,             ERegFIN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangAmerican,            ERegUSA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPortuguese,          ERegPRT ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTurkish,             ERegTUR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangIcelandic,           ERegISL ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangRussian,             ERegRUS ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHungarian,           ERegHUN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangDutch,               ERegNLD ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBelgianFlemish,      ERegBEL ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCzech,               ERegCZE ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSlovak,              ERegSVK ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPolish,              ERegPOL ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSlovenian,           ERegSVN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTaiwanChinese,       ERegTWN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHongKongChinese,     ERegHKG ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPrcChinese,          ERegCHN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangJapanese,            ERegJPN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangThai,                ERegTHA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangArabic,              ERegARE ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTagalog,             ERegPHL ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBulgarian,           ERegBGR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCatalan,             ERegESP ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCroatian,            ERegHRV ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEstonian,            ERegEST ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFarsi,               ERegIRN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCanadianFrench,      ERegCAN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGreek,               ERegGRC ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHebrew,              ERegISR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHindi,               ERegIND ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangIndonesian,          ERegIDN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLatvian,             ERegLVA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLithuanian,          ERegLTU ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangMalay,               ERegMYS ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBrazilianPortuguese, ERegBRA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangRomanian,            ERegROU ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSerbian,             ERegSCG ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLatinAmericanSpanish, ERegMEX ));
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangUkrainian,           ERegUKR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangUrdu,                ERegPAK ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangVietnamese,          ERegVNM ) );
+#ifdef __E32LANG_H__
+    // 5.0
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBasque,              ERegESP ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGalician,            ERegESP ) );
+#endif //__E32LANG_H__
+#if !defined(__SERIES60_31__)
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Apac,        ERegGBR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Taiwan,      ERegTWN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_HongKong,    ERegHKG ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Prc,         ERegCHN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Japan,       ERegJPN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Thailand,    ERegTHA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangMalay_Apac,          ERegMYS ) );
+#endif //!defined(__SERIES60_31__)
+    }
 
 // ---------------------------------------------------------------------------
-// CSsmLocaleObserverSup::SaveIndependentDataL
+// CSsmLocaleObserverSup::MappedRegionL
 // ---------------------------------------------------------------------------
 //
-void CSsmLocaleObserverSup::SaveIndependentDataL(
-    const TLocale& aLocale,
-    const TDesC& aPath )
+TInt CSsmLocaleObserverSup::MappedRegionL(const TInt aLanguage)
     {
     FUNC_LOG;
-
-    // Get old independent data, if any.
-    TLocale savedLoc;
-    TRAPD( err, LoadIndependentDataL( savedLoc, aPath ) );
-    ERROR( err, "Failed to load locale independent data" );
-
-    HBufC* fName = MakeFileNameL( aPath, KCommonFileName, 0 );
-    CleanupStack::PushL( fName );
-    RFileWriteStream fStream;
-    CleanupClosePushL( fStream );
-
-    err = iFs.MkDirAll( *fName ); // Ignore errors
-    err = fStream.Create( iFs, *fName, EFileWrite );
-    if ( err == KErrAlreadyExists )
-        {
-        // Override
-        err = fStream.Open( iFs, *fName, EFileWrite );
-        ERROR_1( err, "Failed to create stream %S", fName );
-        }
-    User::LeaveIfError( err );
-
-    // Write first the version number to enable support for file format changes.
-    fStream.WriteInt8L( KCurrentVersionNumber );
-    fStream.WriteInt32L( 0 ); // Universal time offset is not part of TLocale
-                              // any more. Write zero here to keep file structure.
-    // Clock format is also common.
-    fStream.WriteUint32L( aLocale.ClockFormat() );
-    fStream.WriteUint32L( 0 );  // reserved 2
-    fStream.WriteUint32L( 0 );  // reserved 3
-
-    fStream.CommitL();
-
-    CleanupStack::PopAndDestroy( &fStream );
-    CleanupStack::PopAndDestroy( fName );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLocaleObserverSup::LoadIndependentDataL
-// ---------------------------------------------------------------------------
-//
-void CSsmLocaleObserverSup::LoadIndependentDataL(
-    TLocale& aLocale,
-    const TDesC& aPath )
-    {
-    FUNC_LOG;
-
-    HBufC* fName = MakeFileNameL( aPath, KCommonFileName, 0 );
-    CleanupStack::PushL( fName );
-
-    RFileReadStream fStream;
-    CleanupClosePushL( fStream );
-    TInt err = fStream.Open( iFs, *fName, EFileRead );
-    if ( err != KErrNotFound && err != KErrPathNotFound )
-        {
-        ERROR_1( err, "Failed to open stream %S", fName );
-        // Data file is missing upon the first boot or when switching into a
-        // language for the first time
-        }
-
-    if ( err == KErrNotFound || err == KErrPathNotFound )
-        {
-        // File not found --> Not an error because
-        // this is a new file and older builds do not have this file.
-        INFO( "No locale data found" );
-        }
-    else
-        {
-        User::LeaveIfError( err );
-
-        fStream.ReadInt8L();    // Version.
-        fStream.ReadInt32L();   // Universal time offset was stored here.
-        aLocale.SetClockFormat( ( TClockFormat ) fStream.ReadUint32L() );
-        fStream.ReadUint32L(); // reserved 2
-        fStream.ReadUint32L(); // reserved 3
-        }
-
-    CleanupStack::PopAndDestroy( &fStream );
-    CleanupStack::PopAndDestroy( fName );
-    }
+    TLanguageRegion langRegion = iLangRegionMappingHashSet.FindL(TLanguageRegion(aLanguage));
+    return langRegion.iRegion;
+    }    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmregionobserversup.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -0,0 +1,191 @@
+/*
+* 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: Implementation of CSsmRegionObserver class.
+*
+*/
+#include "ssmregionobserversup.h"
+#include "ssmlocalepskeys.h"
+#include "ssmmapperutilityinternalpskeys.h"
+#include "ssmcommonlocale.h"
+#include "trace.h"
+#include <centralrepository.h>
+#include <CommonEngineDomainCRKeys.h>
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C MSsmUtility* CSsmRegionObserver::NewL()
+    {
+    FUNC_LOG;
+    CSsmRegionObserver* self = new( ELeave ) CSsmRegionObserver();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::InitializeL
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::InitializeL()
+    {
+
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::StartL
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::StartL()
+    {
+    FUNC_LOG;
+    TInt errorCode = iRegionProperty.Attach( KPSStarterUid, KSSMRegionPSKey );
+    ERROR_2( errorCode, "Failed to attach to property 0x%08x::0x%08x", KPSStarterUid.iUid, KSSMRegionPSKey );
+    Activate();
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::Release
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::Release()
+    {
+    FUNC_LOG;
+    delete this;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::~CSsmRegionObserver
+// ---------------------------------------------------------------------------
+//
+CSsmRegionObserver::~CSsmRegionObserver()
+    {
+    FUNC_LOG;
+    Cancel();
+    iRegionProperty.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::DoCancel
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::DoCancel()
+    {
+    FUNC_LOG;
+    iRegionProperty.Cancel();
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::RunL
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::RunL()
+    {
+    FUNC_LOG;
+    const TInt errorCode = iStatus.Int();
+    if ( KErrNone == errorCode )
+        {
+        Activate();
+        LoadRegion();
+        }
+    else
+        {
+        INFO_1("CSsmRegionObserver::RunL()completed with: %d - not reactivating", iStatus.Int());
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::LoadRegion
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::LoadRegion()
+    {
+    TInt region(0);
+    TInt errorCode = iRegionProperty.Get( region);
+    if( KErrNone != errorCode )
+         {
+         INFO_1( "Failed to get KSSMRegionPSKey value with error  %d", errorCode );
+         return;
+         }
+
+    // Dot plus five digit locale
+    TBuf<KMaxDllExtensionLength> extension; 
+    extension.Format( KDllExtensionFormat, region);
+    
+    // Padd ".1" to ".01" for compatibility.   
+    for( ; extension.Length() < KMinDllExtensionLength ;) 
+        {
+        extension.Insert( KDllExtensionPaddingPosition,
+                          KDllExtensionPadding );
+        }
+
+    TBuf<KMaxDllNameLength> regionDllName( KRegionDllNameBase );
+    regionDllName.Append( extension );
+    INFO_1( "Loading region DLL named '%S'", &regionDllName );
+
+    TExtendedLocale extLocale;
+    extLocale.LoadSystemSettings();
+    errorCode = extLocale.LoadLocaleAspect(regionDllName );
+    
+    ERROR( errorCode, "Failed to load region" );
+
+    if ( KErrNone == errorCode )
+        {
+        errorCode = extLocale.SaveSystemSettings();
+        ERROR( errorCode, "Failed to set region" );
+        TLocale().Set();
+        StoreRegionToCentRep( region );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::StoreRegionToCentRep
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::StoreRegionToCentRep( const TInt aRegion )
+    {
+    FUNC_LOG;
+    CRepository* cenrep = NULL;
+    TRAPD( errorCode, cenrep = CRepository::NewL( KCRUidCommonEngineKeys ) );
+    ERROR_1( errorCode, "Failed to initialize cen rep %d", errorCode );
+    
+    if ( KErrNone == errorCode )
+        {
+        errorCode = cenrep->Set( KGSRegion, aRegion);
+        ERROR_1( errorCode, "Failed to store region code to CentRep, %d", 
+                                                                  errorCode );
+        delete cenrep;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::CSsmRegionObserver
+// ---------------------------------------------------------------------------
+//
+CSsmRegionObserver::CSsmRegionObserver() : CActive( EPriorityStandard )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::Activate
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::Activate()
+    {
+    FUNC_LOG;
+    ASSERT( !IsActive() );
+    iRegionProperty.Subscribe( iStatus );
+    SetActive();
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmuilanguageobserversup.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -0,0 +1,192 @@
+/*
+* 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: Implementation of CSsmUiLanguageObserver class.
+*
+*/
+#include "ssmuilanguageobserversup.h"
+#include "ssmlocalepskeys.h"
+#include "ssmmapperutilityinternalpskeys.h"
+#include "ssmcommonlocale.h"
+#include "trace.h"
+#include <centralrepository.h>
+#include <CommonEngineDomainCRKeys.h>
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C MSsmUtility* CSsmUiLanguageObserver::NewL()
+    {
+    FUNC_LOG;
+    CSsmUiLanguageObserver* self = new( ELeave ) CSsmUiLanguageObserver();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::InitializeL
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::InitializeL()
+	{
+
+	}
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::StartL
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::StartL()
+	{
+	FUNC_LOG;
+	TInt errorCode = iUILanguageProperty.Attach( KPSStarterUid, KSSMUILanguagePSKey );
+	ERROR_2( errorCode, "Failed to attach to property 0x%08x::0x%08x", KPSStarterUid.iUid, KSSMUILanguagePSKey );
+	Activate();
+	}
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::Release
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::Release()
+	{
+	FUNC_LOG;
+	delete this;
+	}
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::~CSsmUiLanguageObserver
+// ---------------------------------------------------------------------------
+//
+CSsmUiLanguageObserver::~CSsmUiLanguageObserver()
+    {
+    FUNC_LOG;
+    Cancel();
+    iUILanguageProperty.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::DoCancel
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::DoCancel()
+    {
+    FUNC_LOG;
+    iUILanguageProperty.Cancel();
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::RunL
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::RunL()
+    {
+    FUNC_LOG;
+    const TInt errorCode = iStatus.Int();
+    if (KErrNone == errorCode )
+        {
+        Activate();
+        LoadUILanguage();
+        }
+    else
+    	{
+    	INFO_1("CSsmUiLanguageObserver::RunL()completed with: %d - not reactivating", iStatus.Int());
+    	}
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::LoadUILanguage
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::LoadUILanguage()
+    {
+    FUNC_LOG;
+    TInt uiLanguage(0);
+    TInt errorCode = iUILanguageProperty.Get( uiLanguage );
+
+    if( KErrNone != errorCode )
+         {
+         INFO_1( "Failed to get KSSMUILanguagePSKey value with error  %d", errorCode );
+         return;
+         }
+
+    // Dot plus five digit locale
+    TBuf<KMaxDllExtensionLength> extension; 
+    extension.Format( KDllExtensionFormat, uiLanguage );
+    
+    // Padd ".1" to ".001" for compatibility.   
+    for( ; extension.Length() < KMinDllExtensionLength ;) 
+        {
+        extension.Insert( KDllExtensionPaddingPosition,
+                          KDllExtensionPadding );
+        }
+
+    TBuf<KMaxDllNameLength> uiLanguageDllName( KLanguageDllNameBase );
+    uiLanguageDllName.Append( extension );
+    INFO_1( "Loading UI Language DLL named '%S'", &uiLanguageDllName );
+
+    TExtendedLocale extLocale;
+    extLocale.LoadSystemSettings();
+    errorCode = extLocale.LoadLocaleAspect( uiLanguageDllName );
+    ERROR( errorCode, "Failed to load locale" );
+
+    if ( errorCode == KErrNone )
+        {
+        errorCode = extLocale.SaveSystemSettings();
+        ERROR( errorCode, "Failed to set locale" );
+        TLocale().Set();
+        StoreUILanguageToCentRep( uiLanguage );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::StoreUILanguageToCentRep
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::StoreUILanguageToCentRep( const TInt aUILanguage )
+    {
+    FUNC_LOG;
+    CRepository* cenrep = NULL;
+    TRAPD( errorCode, cenrep = CRepository::NewL( KCRUidCommonEngineKeys ) );
+    ERROR_1( errorCode, "Failed to initialize cen rep %d", errorCode );
+    
+    if ( KErrNone == errorCode )
+        {
+        errorCode = cenrep->Set( KGSDisplayTxtLang, aUILanguage);
+        ERROR_1( errorCode, "Failed to store UI Language code to CentRep, %d", 
+                                                                  errorCode );
+        delete cenrep;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::CSsmUiLanguageObserver
+// ---------------------------------------------------------------------------
+//
+CSsmUiLanguageObserver::CSsmUiLanguageObserver() : CActive( EPriorityStandard )
+    {
+    FUNC_LOG;
+    CActiveScheduler::Add( this );
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::Activate
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::Activate()
+    {
+	FUNC_LOG;
+    ASSERT( !IsActive() );
+    iUILanguageProperty.Subscribe( iStatus );
+    SetActive();
+    }
--- a/sysstatemgmt/syslangutil/rom/syslangutil.iby	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/syslangutil/rom/syslangutil.iby	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -22,4 +22,20 @@
 file=ABI_DIR\BUILD_DIR\ssmlangselcmd.dll SHARED_LIB_DIR\ssmlangselcmd.dll
 file=ABI_DIR\BUILD_DIR\syslangutil.dll   SHARED_LIB_DIR\syslangutil.dll
 
+
+//If elocl.iby changes doesnt come on time then the epoc will not boot. Hence adding 
+//these dlls temporarily to avoid such problems
+//Remove this once elocl.iby is updated with these dlls
+
+#ifdef EKA2
+file=ABI_DIR\BUILD_DIR\elocl_lan.001                SHARED_LIB_DIR\elocl_lan.001
+file=ABI_DIR\BUILD_DIR\elocl_reg.826                SHARED_LIB_DIR\elocl_reg.826
+file=ABI_DIR\BUILD_DIR\elocl_col.001                SHARED_LIB_DIR\elocl_col.001
+#else
+file=\epoc32\release\armi\DEBUG_DIR\elocl_lan.001   System\libs\elocl_lan.001
+file=\epoc32\release\armi\DEBUG_DIR\elocl_reg.826   System\libs\elocl_reg.826
+file=\epoc32\release\armi\DEBUG_DIR\elocl_col.001   System\libs\elocl_col.001
+#endif	//EKA2
+//
+
 #endif // SYSLANGUTIL_IBY
--- a/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlangselcmd.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlangselcmd.h	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2009-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"
@@ -19,9 +19,11 @@
 #ifndef SSMLANGSELCMD_H
 #define SSMLANGSELCMD_H
 
+#include "ssmcommonlocale.h"
 #include <e32base.h>
 #include <ssm/ssmcustomcommand.h>
 #include <ssm/ssmadaptationcli.h>
+#include <e32hashtab.h> 
 
 class CSsmMapperUtility;
 
@@ -157,6 +159,97 @@
      */
     void UseLanguage(const TInt aLang);
 
+    /**
+    * Initialize the language region mapping
+    * 
+    */
+    void InitializeRegionMappingL();
+
+    /**
+    * Used to check whether the region is valid or not
+    * 
+    * @param aRegion Region to be validated
+    * 
+    * @return ETrue if the region code was found in the list, EFalse otherwise.
+    */
+    TBool IsRegionValidL(const TInt aRegion) const;
+    
+    /**
+    * Get the stored Region and Collation code from Central Repository
+    * 
+    * @param aRegion On return, will store the Region code fetched from CR
+    * @param aCollation On return, will store the Collation code fetched from CR
+    * 
+    */
+    void GetIndividualSettingsFromCentRepL(TInt& aRegion, TInt& aCollation);
+
+    /**
+    * Store the given Region and Collation code to Central Repository
+    * 
+    * @param aRegion Region code to be stored in CR
+    * @param aCollation Collation code to be stored in CR
+    * 
+    * @return Success code, Contains any of the error code in case of any error.
+    */
+    TInt SetIndividualSettingsToCentRep(const TInt aRegion, const TInt aCollation);
+
+    /**
+    * Gets the selected Region and Collation codes. If not set will get the asscoiated codes 
+    * for the language
+    * 
+    * @param aLastSelectedLang Contains the seleted Language code
+    * @param aLastSelectedRegion On success contains the Region code
+    * @param aLastSelectedCollation On success contains the Collation code
+    * 
+    * @return ETrue If the Region and Collation codes are valid or found the mapped Region 
+    * incase of auto selection, EFalse otherwise.
+    */
+    TBool ValidateAndGetSettings(const TInt aLastSelectedLang, TInt& aLastSelectedRegion, TInt& aLastSelectedCollation);
+
+    /**
+    * Gets the selected Region and Collation codes. If not set will get the asscoiated codes 
+    * for the language
+    * 
+    * @param aLastSelectedLang Contains the seleted Language code
+    * @param aLastSelectedRegion On success contains the Region code
+    * @param aLastSelectedCollation On success contains the Collation code
+    * 
+    * @return ETrue If the Region and Collation codes are valid or found the mapped Region 
+    * incase of auto selection, EFalse otherwise. Leaves with any of error code incase of any error
+    */
+    TBool ValidateAndGetSettingsL(const TInt aLastSelectedLang, TInt& aLastSelectedRegion, TInt& aLastSelectedCollation);
+
+    /**
+    * Loads the default language setting if it is valid
+    * 
+    * @return KErrNone if the default language settings are valid and loaded successfully,
+    * any of the error code otherwise.
+    */
+    TInt ValidateAndUseDefaultLanguage();
+
+    /**
+    * Loads the corresponsing locale codes
+    * 
+    * @param aLang Language code to be loaded
+    * @param aRegion Region code to be loaded
+    * @param aCollation Collation code to be loaded
+    * 
+    * @return Success code, Contains any of the error code in case of any error.
+    */
+    TInt UseLocale( const TInt aLang, const TInt aRegion, const TInt aCollation );
+
+    /**
+    * Gets the region mapped with the given language after validating
+    * 
+    * @param aLanguage Language code for getting associated Region code
+    * @param aRegion On return contains the Region code associated with 
+    * the given language code
+    * 
+    * @return ETrue if the region code was found in the list, EFalse otherwise.
+    */
+
+    TBool ValidateAndGetMappedRegion( const TInt aLanguage, TInt& aRegion );
+
 private: // data
 
     /** Custom command environment. Not owned. Set in Initialise. */
@@ -191,14 +284,20 @@
     /** Internal state of the object. */
     enum TState
         {
+        EQueryListNone = 0,
         EQueryListSize = 1,
-        EQueryListContent
+        EQueryListContent = 2
         };
     TState iState;
     
     // The mapper utility instance, owned.
     CSsmMapperUtility* iMapperUtility;
 
+    /** Array of  language and region mappings. */
+    RHashSet<TLanguageRegion>  iLangRegionMappingHashSet;
+    
+    /** Array of  valid regions. */
+    RArray<TLanguageRegion>  iRegionsArray;
     };
 
 #endif // SSMLANGSELCMD_H
--- a/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlanguageloader.h	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlanguageloader.h	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,8 +11,7 @@
 *
 * Contributors:
 *
-* Description:
-* Declaration of SsmLanguageLoader class.
+* Description: Declaration of SsmLanguageLoader class.
 *
 */
 
@@ -34,15 +33,15 @@
 public:
 
     /**
-    * Store language code to HAL and load corresponding locale DLL.
+    * Store language code to HAL and load corresponding Language, Region and Collation DLLs.
     *
-    * @since S60 3.2
-    * @param aLanguage Language code identifying which locale DLL to load.
+    * @param aLanguage Language code identifying which language DLL to load.
+    * @param aRegion Region code identifying which region DLL to load.
+    * @param aCollation Collation code identifying which collation DLL to load.
     * @return KErrNone if loading was successful, one of Symbian error codes
     * otherwise.
     */
-    static TInt LoadLanguage( const TInt aLanguage );
-
+    static TInt LoadLocale( const TInt aLanguage, const TInt aRegion, const TInt aCollation);
 private:
 
     /**
@@ -55,23 +54,13 @@
     static TInt StoreLanguageToHal( const TInt aLanguage );
 
     /**
-    * Find the correct locale DLL to use by language code and take it to
-    * use.
+    * Loads the given Language, Region and Collation DLLs and saves the settings
     *
-    * @param aLanguageCode The language code to find a locale dll for.
+    * @param aLanguageDllName The name of the Language DLL to load.
+    * @param aRegionDllName The name of the Region DLL to load.
+    * @param aCollationDllName The name of the Collation DLL to load.
     * @return KErrNone if successful, one of Symbian error codes otherwise.
     */
-    static TInt LoadLocaleDll( const TInt aLanguage );
-
-    /**
-    * Take a locale DLL to use by name.
-    *
-    * @param aLocaleDllName The name of the locale DLL to load.
-    * @return KErrNone if successful, one of Symbian error codes otherwise.
-    */
-    static TInt ChangeLocale( const TDesC& aLocaleDllName );
-
+    static TInt ChangeLocale( const TDesC& aLanguageDllName,  const TDesC& aRegionDllName, const TDesC& aCollationDllName );
     };
-
-
 #endif // SSMLANGUAGELOADER_H
--- a/sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlangselcmd.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlangselcmd.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -22,7 +22,10 @@
 #include "ssmlanguageloader.h"
 #include "syslangutilprivatecrkeys.h"
 #include "trace.h"
+#include "ssmlocalepskeys.h"
+#include "ssmmapperutilityinternalpskeys.h"
 
+#include <e32property.h>
 #include <syslangutil.h>
 #include <CommonEngineDomainCRKeys.h>
 #include <centralrepository.h>
@@ -31,6 +34,55 @@
 /** Default granularity for list of installed languages. */
 const TInt KLanguageListGranularity( 4 );
 
+/** Any of the code set to zero means auto selection is enabled. */
+const TInt KSettingAutomatic = 0;
+
+/** The maximum number of regions to be appended to the hash set. */
+const TInt KMaxNumberOfRegions = 56;
+
+// ======== LOCAL FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// HashLangRegionMappingFunction
+// ---------------------------------------------------------------------------
+//
+inline TUint32 HashLangRegionMappingFunction(const TLanguageRegion& aMapping)
+    {
+    return aMapping.iLanguage;
+    }
+
+// ---------------------------------------------------------------------------
+// LangRegionMappingIdentityRelation
+// ---------------------------------------------------------------------------
+//
+inline TBool LangRegionMappingIdentityRelation(const TLanguageRegion& aMapping1,
+    const TLanguageRegion& aMapping2)
+    {
+    return (aMapping1.iLanguage == aMapping2.iLanguage);
+    }
+
+// ---------------------------------------------------------------------------
+// RegionLangMappingIdentityRelation
+// ---------------------------------------------------------------------------
+//
+inline TBool RegionLangMappingIdentityRelation(const TLanguageRegion& aMapping1,
+    const TLanguageRegion& aMapping2)
+    {
+    return (aMapping1.iRegion == aMapping2.iRegion);
+    }
+
+// ---------------------------------------------------------------------------
+// CompareLanguageMapping
+// ---------------------------------------------------------------------------
+//
+static TInt CompareLanguageMapping(TLanguageRegion const &aLanguage1, TLanguageRegion const &aLanguage2)
+    {
+    if( aLanguage1.iLanguage == aLanguage2.iLanguage )
+        {
+        return 0;
+        }
+    return ( aLanguage1.iLanguage < aLanguage2.iLanguage ) ? -1 : 1;
+    }
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -48,6 +100,18 @@
 	return self;	
 	}
 
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::CSsmLangSelCmd
+// ---------------------------------------------------------------------------
+//
+CSsmLangSelCmd::CSsmLangSelCmd() : CActive( EPriorityNormal ),
+    iState( EQueryListNone ),
+    iLangRegionMappingHashSet( &::HashLangRegionMappingFunction, &::LangRegionMappingIdentityRelation )
+    {
+    FUNC_LOG;
+
+    CActiveScheduler::Add( this );
+    }
 
 // ---------------------------------------------------------------------------
 // CSsmLangSelCmd::~CSsmLangSelCmd
@@ -56,11 +120,501 @@
 CSsmLangSelCmd::~CSsmLangSelCmd()
     {
     FUNC_LOG;
+    Cancel();
     delete iLangList;
     delete iMapperUtility;
     }
 
 // ---------------------------------------------------------------------------
+// CSsmLangSelCmd::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::ConstructL()
+    {
+    FUNC_LOG;
+    iMapperUtility = CSsmMapperUtility::NewL();
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::Initialize
+// ---------------------------------------------------------------------------
+//
+ TInt CSsmLangSelCmd::Initialize( CSsmCustomCommandEnv* aCmdEnv )
+     {
+     FUNC_LOG;
+
+     iEnv = aCmdEnv;
+     TRAPD( errorCode, InitializeL() );
+     return errorCode;
+     }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::InitializeL
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::InitializeL()
+    {
+    FUNC_LOG;
+    ASSERT_TRACE( iEnv );
+
+    iValidLanguages = new ( ELeave ) CArrayFixFlat<TInt>( KLanguageListGranularity );
+    
+    RFs* fsSession = &( const_cast<RFs&>( iEnv->Rfs() ) );
+    
+    //Get the list of installed languages
+    TInt errorCode = SysLangUtil::GetInstalledLanguages( iValidLanguages,
+                                                         fsSession );
+
+    ERROR( errorCode, "Failed to get installed languages" );
+    User::LeaveIfError( errorCode );
+    
+    //Initialize the Language and Region mapping hash set
+    InitializeRegionMappingL();
+
+    //Get the number of installed languages
+    const TInt validLangCount = iValidLanguages->Count();
+    TLinearOrder<TLanguageRegion> order(&CompareLanguageMapping);
+    
+    //Get the mapped regions for the installed languages
+    for(TInt index = 0; index < validLangCount; ++index) 
+        {
+        TLanguageRegion region = iLangRegionMappingHashSet.FindL(TLanguageRegion(iValidLanguages->At(index)));
+        INFO_2( "Found Region code = %d for language %d", region.iRegion, region.iLanguage );
+        iRegionsArray.InsertInOrderL(region, order);
+        }
+
+    //Connect to Misc adaptation
+    errorCode = iAdaptation.Connect();
+    ERROR( errorCode, "Failed to connect to RSsmMiscAdaptation" );
+    User::LeaveIfError( errorCode );
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::InitializeRegionMappingL
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::InitializeRegionMappingL()
+    {
+    //Reserve the memory for the number of mappings to be appended
+    iLangRegionMappingHashSet.ReserveL( KMaxNumberOfRegions );
+
+    //Insert the Language - Region mapping
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish,             ERegGBR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFrench,              ERegFRA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGerman,              ERegDEU ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSpanish,             ERegESP ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangItalian,             ERegITA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSwedish,             ERegSWE ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangDanish,              ERegDNK ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangNorwegian,           ERegNOR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFinnish,             ERegFIN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangAmerican,            ERegUSA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPortuguese,          ERegPRT ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTurkish,             ERegTUR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangIcelandic,           ERegISL ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangRussian,             ERegRUS ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHungarian,           ERegHUN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangDutch,               ERegNLD ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBelgianFlemish,      ERegBEL ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCzech,               ERegCZE ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSlovak,              ERegSVK ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPolish,              ERegPOL ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSlovenian,           ERegSVN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTaiwanChinese,       ERegTWN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHongKongChinese,     ERegHKG ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPrcChinese,          ERegCHN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangJapanese,            ERegJPN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangThai,                ERegTHA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangArabic,              ERegARE ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTagalog,             ERegPHL ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBulgarian,           ERegBGR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCatalan,             ERegESP ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCroatian,            ERegHRV ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEstonian,            ERegEST ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFarsi,               ERegIRN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCanadianFrench,      ERegCAN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGreek,               ERegGRC ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHebrew,              ERegISR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHindi,               ERegIND ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangIndonesian,          ERegIDN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLatvian,             ERegLVA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLithuanian,          ERegLTU ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangMalay,               ERegMYS ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBrazilianPortuguese, ERegBRA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangRomanian,            ERegROU ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSerbian,             ERegSCG ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLatinAmericanSpanish, ERegMEX ));
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangUkrainian,           ERegUKR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangUrdu,                ERegPAK ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangVietnamese,          ERegVNM ) );
+#ifdef __E32LANG_H__
+    // 5.0
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBasque,              ERegESP ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGalician,            ERegESP ) );
+#endif //__E32LANG_H__
+#if !defined(__SERIES60_31__)
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Apac,        ERegGBR ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Taiwan,      ERegTWN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_HongKong,    ERegHKG ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Prc,         ERegCHN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Japan,       ERegJPN ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Thailand,    ERegTHA ) );
+    iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangMalay_Apac,          ERegMYS ) );
+#endif //!defined(__SERIES60_31__)
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::Execute
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::Execute( const TDesC8& /*aParams*/, TRequestStatus& aRequest )
+    {
+    FUNC_LOG;
+    
+    ASSERT_TRACE( !iClientStatus );
+    ASSERT_TRACE( !IsActive() );
+    ASSERT_TRACE( iEnv );
+
+    aRequest = KRequestPending;
+    iClientStatus = &aRequest;
+
+    RFs* fsSession = &( const_cast<RFs&>( iEnv->Rfs() ) );
+    
+    //Get the default language
+    TInt errorCode = SysLangUtil::GetDefaultLanguage( iDefaultLanguage, fsSession );
+    ERROR( errorCode, "Failed to get default language" );
+
+    //Get the language selected
+    TInt lastSelectedLang = GetLastSelectedLang();
+    TInt lastSelectedRegion ( KErrNotFound );
+    TInt lastSelectedCollation ( KErrNotFound );
+    
+    //Reset error code to KErrNotFound
+    errorCode = KErrNotFound;
+    
+    if ( KSettingAutomatic == lastSelectedLang )
+        {
+        //Auto selection is enabled
+        SetIndividualSettingsToCentRep( KSettingAutomatic, KSettingAutomatic );
+        PrepareNextList();
+        }
+    else if ( ValidateAndGetSettings( lastSelectedLang, lastSelectedRegion, lastSelectedCollation ) )
+        {
+        //Validate and get the selected Language, Region and Collation code
+        errorCode = UseLocale( lastSelectedLang , lastSelectedRegion, lastSelectedCollation );
+        ERROR( errorCode, "Failed to load selected Language, Region and Collation" );
+        }
+
+    //Load the default Language, Region and Collation in case of loading selected codes failed 
+    //and auto selection is disabled.
+    if( KErrNone != errorCode && KSettingAutomatic != lastSelectedLang )
+        {
+        //Validate and use the default codes 
+        errorCode = ValidateAndUseDefaultLanguage();
+        ERROR( errorCode, "Failed to load default Language, Region and Collation" );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::GetLastSelectedLang
+//
+// ---------------------------------------------------------------------------
+//
+TInt CSsmLangSelCmd::GetLastSelectedLang()
+    {
+    FUNC_LOG;
+
+    TInt value( 0 );
+    TInt errorCode = iMapperUtility->CrValue( KCRUidCommonEngineKeys, 
+                                              KGSDisplayTxtLang,
+                                              value );
+    if( KErrNone == errorCode )
+        {
+        errorCode = RProperty::Set( KPSStarterUid, KSSMUILanguagePSKey, value );
+        ERROR_1( errorCode, "Failed to set read KSSMUILanguagePSKey PS key %d", errorCode );
+        }
+    else
+        {
+        INFO_1( "Failed read KGSDisplayTxtLang CenRep key with error= %d", errorCode );
+        }
+    
+    INFO_1( "Last selected language is %d", value );
+    return value;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::SetIndividualSettingsToCentRep
+//
+// ---------------------------------------------------------------------------
+//
+TInt CSsmLangSelCmd::SetIndividualSettingsToCentRep( const TInt aRegion, const TInt aCollation )
+    {
+    FUNC_LOG;
+    CRepository* cenrep = NULL;
+    TRAPD( errorCode, cenrep = CRepository::NewL( KCRUidCommonEngineKeys ) );
+  
+    if ( KErrNone == errorCode )
+        {
+        //Set the Region CR with the given value
+        errorCode = cenrep->Set( KGSRegion, aRegion );
+        if ( KErrNone == errorCode )
+            {
+            //Set the Region PS key which is used in Region SUP  
+             TInt err = RProperty::Set( KPSStarterUid, KSSMRegionPSKey, aRegion );
+             ERROR( err, "Failed to Set Region PS key");
+            }
+        else
+            {
+            INFO_1( "Failed to Set Region code to CentRep, %d", errorCode );            
+            }
+        }
+    else
+        {
+        INFO_1( "Failed to initialize cen rep %d", errorCode );        
+        }
+
+    if ( KErrNone == errorCode )
+        {
+        //Set the Collation CR with the given value
+        errorCode = cenrep->Set( KGSCollation, aCollation );
+        if ( KErrNone == errorCode )
+            {
+            //Set the Collation PS key which is used in Collation SUP  
+            errorCode = RProperty::Set( KPSStarterUid, KSSMCollationPSKey, aCollation );
+            ERROR( errorCode, "Failed to Set Collation  PS key " );
+            }
+        else
+            {
+            INFO_1( "Failed to Set Collation code to CentRep, %d", errorCode );            
+            }
+        }
+    delete cenrep;
+    return errorCode;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::ValidateAndGetSettings
+//
+// ---------------------------------------------------------------------------
+//
+TBool CSsmLangSelCmd::ValidateAndGetSettings( const TInt aLastSelectedLang, TInt& aLastSelectedRegion, TInt& aLastSelectedCollation )
+    {
+    TBool isValid( EFalse );
+    //Validate and get the selected settings
+    TRAPD( errorCode, isValid = ValidateAndGetSettingsL( aLastSelectedLang, aLastSelectedRegion, aLastSelectedCollation ) );
+    ERROR_1( errorCode, "Validation failed for the selected Language, region and Collation with error %d", errorCode );
+    return isValid;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::ValidateAndGetSettingsL
+//
+// ---------------------------------------------------------------------------
+//
+TBool CSsmLangSelCmd::ValidateAndGetSettingsL( const TInt aLastSelectedLang, TInt& aLastSelectedRegion, TInt& aLastSelectedCollation )
+    {
+    TBool isValid( EFalse );
+
+    //Get the selected Region and Collation 
+    GetIndividualSettingsFromCentRepL( aLastSelectedRegion, aLastSelectedCollation );
+
+    //Check whether the selected Language is valid or not
+    if( IsValid( aLastSelectedLang ) )
+        {
+         if (KSettingAutomatic >= aLastSelectedRegion )
+            {
+            //Selected Region is Automatic. Get the Region associated 
+            //with the Language being loaded
+            if( ValidateAndGetMappedRegion( aLastSelectedLang, aLastSelectedRegion ) )
+                {
+                isValid = ETrue;
+                }
+            }
+         else if( IsRegionValidL( aLastSelectedRegion ) )
+                {
+                //Selected Region is a valid Region
+                isValid = ETrue;
+                }
+            
+         if ( KSettingAutomatic >= aLastSelectedCollation )
+             {
+             //Collation is not set. Use the language code as the collation code
+             aLastSelectedCollation = aLastSelectedLang;
+             }
+        }
+    
+    return isValid;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::IsValid
+//
+// ---------------------------------------------------------------------------
+//
+TBool CSsmLangSelCmd::IsValid( const TInt aLanguage ) const
+    {
+    FUNC_LOG;
+    ASSERT_TRACE( iValidLanguages );
+
+    TBool valid( EFalse );
+    TKeyArrayFix keyProp( 0, ECmpTInt );
+    TInt index( KErrNotFound );
+    // Returns zero if element is found.
+    if ( 0 == iValidLanguages->Find( aLanguage, keyProp, index ) )
+        {
+        valid = ETrue;
+        }
+    
+    return valid;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::GetLanguageFromCentRep
+//
+// ---------------------------------------------------------------------------
+//
+TInt CSsmLangSelCmd::GetLanguageFromCentRep()
+    {
+    FUNC_LOG;
+
+    TInt lang = iDefaultLanguage;
+    TInt errorCode = iMapperUtility->CrValue( KCRUidSysLangUtil,
+                                              KSysLangUtilSimLanguage,
+                                              lang );
+    
+    ERROR_1( errorCode, "Failed to read language code from CenRep %d", 
+             errorCode );
+    return lang;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::IsRegionValidL
+//
+// ---------------------------------------------------------------------------
+//
+TBool CSsmLangSelCmd::IsRegionValidL( const TInt aRegion ) const
+    {
+    FUNC_LOG;
+    TInt index = iRegionsArray.FindL(TLanguageRegion(0, aRegion), &::RegionLangMappingIdentityRelation);
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::ValidRegionAndGetMappedLanguage
+//
+// ---------------------------------------------------------------------------
+//
+TBool CSsmLangSelCmd::ValidateAndGetMappedRegion( const TInt aLanguage, TInt& aRegion )
+    {
+    FUNC_LOG;
+
+    TBool valid( EFalse );
+    TLanguageRegion lang( aLanguage );
+
+    //Find the Language - Region mapping for the given Language
+    TInt index = iRegionsArray.Find( lang, &::LangRegionMappingIdentityRelation );
+    if( 0 <= index )
+        {
+        //Set the Region associated with the given Language
+        aRegion = iRegionsArray[index].iRegion;
+        INFO_1( "ValidRegionAndGetMappedLanguage:: Found region %d", aRegion);
+        valid = ETrue;
+        }
+    else
+        {
+        INFO_1( "ValidRegionAndGetMappedLanguage:: Not Found region for lang %d", aLanguage);    
+        }
+
+    return valid;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::GetIndividualSettingsFromCentRepL
+//
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::GetIndividualSettingsFromCentRepL( TInt& aRegion, TInt& aCollation )
+    {
+    FUNC_LOG;
+    CRepository* cenrep = CRepository::NewL( KCRUidCommonEngineKeys );
+    CleanupStack::PushL( cenrep );
+    
+    //Get the last selected Region from central repository
+    User::LeaveIfError(cenrep->Get( KGSRegion, aRegion));
+    
+    //Set the Region PS key which is used in Region SUP
+    User::LeaveIfError(RProperty::Set( KPSStarterUid, KSSMRegionPSKey, aRegion ));
+    
+    //Get the last selected Collation from central repository
+    User::LeaveIfError(cenrep->Get( KGSCollation, aCollation));
+    
+    //Set the Collation PS key which is used in Collation SUP
+    User::LeaveIfError(RProperty::Set( KPSStarterUid, KSSMCollationPSKey, aCollation ));
+
+    INFO_2( "Last selected region %d and collation %d", aRegion, aCollation );
+    CleanupStack::PopAndDestroy( cenrep );
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::ValidateAndUseDefaultLanguage
+//
+// ---------------------------------------------------------------------------
+//
+TInt CSsmLangSelCmd::ValidateAndUseDefaultLanguage()
+    {
+    FUNC_LOG;
+    TLanguageRegion langRegion;
+    
+    //Get the Region associated with default Language
+    TRAPD( error, langRegion = iLangRegionMappingHashSet.FindL( TLanguageRegion( iDefaultLanguage ) ) );
+    if( KErrNone == error )
+       {
+       //Load the settings for default Language
+       error = UseLocale( iDefaultLanguage, langRegion.iRegion, iDefaultLanguage );
+       ERROR_1( error, "Failed to load default language setting %d", error );
+       }
+    else
+        {
+        INFO_1( "Failed to find the Region associated with default Language %d", error );
+        }
+
+    if ( iClientStatus )
+        {
+        ERROR_1( error, "Language selection custom command completed with error %d", error );
+        User::RequestComplete( iClientStatus, error );
+        iClientStatus = NULL;
+        }
+
+    return error;
+    }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::UseLocale
+//
+// ---------------------------------------------------------------------------
+//
+TInt CSsmLangSelCmd::UseLocale( const TInt aLang, const TInt aRegion, const TInt aCollation )
+    {
+    FUNC_LOG;
+    TInt errorCode(KErrNotFound);
+
+    //Load the given Language, Region and Collation DLLs
+    errorCode = SsmLanguageLoader::LoadLocale( aLang, aRegion, aCollation );
+
+    if( KErrNone != errorCode )
+        {
+        INFO_1( "Loading failed with error  %d", errorCode);
+        }
+    else if ( iClientStatus )
+        {
+        User::RequestComplete( iClientStatus, errorCode );
+        iClientStatus = NULL;
+        }
+    return errorCode;
+    }
+
+// ---------------------------------------------------------------------------
 // CSsmLangSelCmd::RunL
 //
 // ---------------------------------------------------------------------------
@@ -86,74 +640,41 @@
         }
     }
 
-
 // ---------------------------------------------------------------------------
-// CSsmLangSelCmd::DoCancel
+// CSsmLangSelCmd::UseLanguage
 //
 // ---------------------------------------------------------------------------
 //
-void CSsmLangSelCmd::DoCancel()
-    {
-    FUNC_LOG;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::Initialize
-// ---------------------------------------------------------------------------
-//
-TInt CSsmLangSelCmd::Initialize( CSsmCustomCommandEnv* aCmdEnv )
+void CSsmLangSelCmd::UseLanguage( const TInt aLang )
     {
     FUNC_LOG;
-
-    iEnv = aCmdEnv;
-    TRAPD( errorCode, InitializeL() );
-    return errorCode;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::Execute
-// ---------------------------------------------------------------------------
-//
-void CSsmLangSelCmd::Execute(
-    const TDesC8& /*aParams*/,
-    TRequestStatus& aRequest )
-    {
-    FUNC_LOG;
-    
-    ASSERT_TRACE( !iClientStatus );
-    ASSERT_TRACE( !IsActive() );
-    ASSERT_TRACE( iEnv );
+    TInt errorCode = KErrNotFound;
+    TInt region = KErrNotFound;
 
-    aRequest = KRequestPending;
-    iClientStatus = &aRequest;
-    
-
-    RFs* fsSession = &( const_cast<RFs&>( iEnv->Rfs() ) );
-    TInt errorCode = SysLangUtil::GetDefaultLanguage( iDefaultLanguage,
-                                                      fsSession );
-    ERROR( errorCode, "Failed to get default language" );
-
-    TInt lastSelectedLang = GetLastSelectedLang();
-    // Revert to automatic selection if fetching last used language
-    // fails, last used language is not valid (and obviously when last
-    // selection is automatic).
-    if ( lastSelectedLang == 0 )
+    //Validate and get associated Region
+    if( ValidateAndGetMappedRegion( aLang, region ) )
         {
-        PrepareNextList();
-        }
-    else if ( IsValid( lastSelectedLang ) )
-        {
-        UseLanguage( lastSelectedLang );
+        errorCode = SsmLanguageLoader::LoadLocale( aLang, region, aLang );
         }
     else
         {
-        UseLanguage( iDefaultLanguage );
-        }    
+        INFO_1( "Validation failed for the language (auto) %d", aLang );
+        }
+
+    if( KErrNone != errorCode )
+        {
+        INFO_1( "Loading the auto settings failed with error %d", errorCode );
+        
+        //Use the default setting as the selected one failed
+        errorCode = ValidateAndUseDefaultLanguage();
+        }
+    else if ( iClientStatus )
+        {
+        User::RequestComplete( iClientStatus, errorCode );
+        iClientStatus = NULL;
+        }
     }
 
-
 // ---------------------------------------------------------------------------
 // CSsmLangSelCmd::ExecuteCancel
 // ---------------------------------------------------------------------------
@@ -165,6 +686,27 @@
     Cancel();
     }
 
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::DoCancel
+//
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::DoCancel()
+    {
+    FUNC_LOG;
+    
+    //Cancel the pending request with misc adaptation
+    if( EQueryListNone != iState )
+        {
+        iAdaptation.Cancel();
+        }
+    
+    if ( iClientStatus )
+        {
+        User::RequestComplete( iClientStatus, KErrCancel );
+        iClientStatus = NULL;
+        }
+    }
 
 // ---------------------------------------------------------------------------
 // CSsmLangSelCmd::Close
@@ -175,7 +717,8 @@
     FUNC_LOG;
     delete iValidLanguages;
     iValidLanguages = NULL;
-    
+    iRegionsArray.Close();
+    iLangRegionMappingHashSet.Close();
     iAdaptation.Close();
     }
 
@@ -190,95 +733,6 @@
 
 	delete this;
     }
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::CSsmLangSelCmd
-// ---------------------------------------------------------------------------
-//
-
-CSsmLangSelCmd::CSsmLangSelCmd()
-  : CActive( EPriorityNormal )
-    {
-    FUNC_LOG;
-
-    CActiveScheduler::Add( this );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CSsmLangSelCmd::ConstructL()
-    {
-    iMapperUtility = CSsmMapperUtility::NewL();
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::InitializeL
-// ---------------------------------------------------------------------------
-//
-void CSsmLangSelCmd::InitializeL()
-    {
-
-    FUNC_LOG;
-    ASSERT_TRACE( iEnv );
-    
-    iValidLanguages = new ( ELeave ) CArrayFixFlat<TInt>( 
-                                                    KLanguageListGranularity );
-    RFs* fsSession = &( const_cast<RFs&>( iEnv->Rfs() ) );
-    TInt errorCode = SysLangUtil::GetInstalledLanguages( iValidLanguages,
-                                                         fsSession );
-    
-    ERROR( errorCode, "Failed to get installed languages" );
-    User::LeaveIfError( errorCode );
-    
-    errorCode = iAdaptation.Connect();
-    ERROR( errorCode, "Failed to connect to RSsmMiscAdaptation" );
-    User::LeaveIfError( errorCode );
-    }
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::GetLastSelectedLang
-//
-// ---------------------------------------------------------------------------
-//
-TInt CSsmLangSelCmd::GetLastSelectedLang()
-    {
-    FUNC_LOG;
-
-    TInt value( 0 );
-    TInt errorCode = iMapperUtility->CrValue( KCRUidCommonEngineKeys, 
-                                              KGSDisplayTxtLang,
-                                              value );
-    
-    ERROR( errorCode, "Failed read KGSDisplayTxtLang CenRep key" );
-    INFO_1( "Last selected language = %d", value );
-    return value;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::IsValid
-//
-// ---------------------------------------------------------------------------
-//
-TBool CSsmLangSelCmd::IsValid( const TInt aLanguage ) const
-    {
-    FUNC_LOG;
-    ASSERT_TRACE( iValidLanguages );
-
-    TBool valid( EFalse );
-    TKeyArrayFix keyProp( 0, ECmpTInt );
-    TInt index( KErrNotFound );
-    // Returns zero if element is found.
-    if ( 0 == iValidLanguages->Find( aLanguage, keyProp, index ) )
-        {
-        valid = ETrue;
-        }
-    return valid;
-    }
-
 
 // ---------------------------------------------------------------------------
 // CSsmLangSelCmd::PrepareNextList
@@ -329,7 +783,6 @@
         }
     }
 
-
 // ---------------------------------------------------------------------------
 // CSsmLangSelCmd::InterpretResult
 //
@@ -437,7 +890,6 @@
         }
     }
 
-
 // ---------------------------------------------------------------------------
 // CSsmLangSelCmd::StoreLanguageToCentRep
 //
@@ -459,49 +911,3 @@
         delete cenrep;
         }
     }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::GetLanguageFromCentRep
-//
-// ---------------------------------------------------------------------------
-//
-TInt CSsmLangSelCmd::GetLanguageFromCentRep()
-    {
-    FUNC_LOG;
-
-    TInt lang = iDefaultLanguage;
-    TInt errorCode = iMapperUtility->CrValue( KCRUidSysLangUtil,
-                                              KSysLangUtilSimLanguage,
-                                              lang );
-    
-    ERROR_1( errorCode, "Failed to read language code from CenRep %d", 
-             errorCode );
-    return lang;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::UseLanguage
-//
-// ---------------------------------------------------------------------------
-//
-void CSsmLangSelCmd::UseLanguage( const TInt aLang )
-    {
-    FUNC_LOG;
-
-    TInt errorCode = aLang;
-    if ( aLang > KErrNone )
-        {
-        errorCode = SsmLanguageLoader::LoadLanguage( aLang );
-        ERROR( errorCode, "Failed to load language" );
-        }
-
-    ERROR( errorCode, "Language selection failed" );
-
-    if ( iClientStatus )
-        {
-        User::RequestComplete( iClientStatus, errorCode );
-        }
-    }
-
--- a/sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlanguageloader.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlanguageloader.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -20,39 +20,11 @@
 #include <hal.h>
 
 #include "ssmlanguageloader.h"
+#include "ssmcommonlocale.h"
 #include "trace.h"
 
-_LIT( KLocaleDllNameBase, "ELOCL" );
-_LIT( KLocaleDllExtensionFormat, ".%u" );
-_LIT( KLocaleDllExtensionPadding, "0" );
-_LIT( KDefaultLocaleDllNameExtension, ".LOC" );
-const TInt KMaxLocaleDllNameLength = 16;
-const TInt KMaxLocaleDllExtensionLength = 6;
-const TInt KMinLocaleDllExtensionLength = 3;
-const TInt KLocaleDllExtensionPaddingPosition = 1;
-
 // ======== MEMBER FUNCTIONS ========
 
-// ---------------------------------------------------------------------------
-// SsmLanguageLoader::LoadLanguage
-//
-// ---------------------------------------------------------------------------
-//
-TInt SsmLanguageLoader::LoadLanguage( const TInt aLanguage )
-    {
-    FUNC_LOG;
-    INFO_1( "Loading language %d", aLanguage );
-
-    TInt errorCode = StoreLanguageToHal( aLanguage );
-    ERROR( errorCode, "Failed to store language code to HAL" );
-
-    errorCode = LoadLocaleDll( aLanguage );
-    ERROR( errorCode, "Failed to load locale DLL" );
-
-    return errorCode;
-    }
-
-
 // -----------------------------------------------------------------------------
 // SsmLanguageLoader::StoreLanguageToHal
 //
@@ -67,70 +39,96 @@
     }
 
 
-// -----------------------------------------------------------------------------
-// SsmLanguageLoader::LoadLocaleDll
+// ---------------------------------------------------------------------------
+// SsmLanguageLoader::LoadLocale
 //
-// -----------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
 //
-TInt SsmLanguageLoader::LoadLocaleDll( const TInt aLanguage )
+TInt SsmLanguageLoader::LoadLocale( const TInt aLanguage, const TInt aRegion, const TInt aCollation)
     {
     FUNC_LOG;
 
-    // Dot plus five digit locale
-    TBuf<KMaxLocaleDllExtensionLength> extension; 
-    extension.Format( KLocaleDllExtensionFormat, aLanguage );
-    
-    // Padd ".1" to ".01" for compatibility.
-    if ( extension.Length() < KMinLocaleDllExtensionLength ) 
+    TInt errorCode = StoreLanguageToHal( aLanguage );
+    ERROR( errorCode, "Failed to store language code to HAL" );
+
+    //Format the language dll to be loaded
+    //Dot plus four to six digit locale
+    TBuf<KMaxDllExtensionLength> extension; 
+    extension.Format( KDllExtensionFormat, aLanguage );
+
+    //Padd with zero to make the file extension length to be minimum of four
+    for( ; extension.Length() < KMinDllExtensionLength ;) 
         {
-        extension.Insert( KLocaleDllExtensionPaddingPosition,
-                          KLocaleDllExtensionPadding );
-        }
-    
-    TBuf<KMaxLocaleDllNameLength> localeDllName;
-    localeDllName = KLocaleDllNameBase;
-    localeDllName.Append( extension );
-
-    INFO_1( "Loading DLL named '%S'", &localeDllName );
-
-    TInt errorCode = ChangeLocale( localeDllName );
-
-    if ( errorCode == KErrNotFound ) // Try default locale
-        {
-        INFO( "SsmLanguageLoader: Loading default locale" );
-
-        localeDllName = KLocaleDllNameBase;
-        localeDllName.Append( KDefaultLocaleDllNameExtension );
-
-        errorCode = ChangeLocale( localeDllName );
+        extension.Insert( KDllExtensionPaddingPosition, KDllExtensionPadding );
         }
 
+    TBuf<KMaxDllNameLength> languageDllName( KLanguageDllNameBase );
+    languageDllName.Append( extension );
+    INFO_1( "Loading language DLL named '%S'", &languageDllName );
+
+    //Format the region dll to be loaded
+    //Dot plus four to six digit locale
+    extension.Zero();
+    extension.Format( KDllExtensionFormat, aRegion );
+
+    //Padd with zero to make the file extension length to be minimum of four
+    for( ; extension.Length() < KMinDllExtensionLength ;) 
+        {
+        extension.Insert( KDllExtensionPaddingPosition, KDllExtensionPadding );
+        }
+
+    TBuf<KMaxDllNameLength> regionDllName( KRegionDllNameBase );
+    regionDllName.Append( extension );
+    INFO_1( "Loading Region DLL named '%S'", &regionDllName );
+
+
+    //Format the collation file to be loaded
+    //Dot plus four to six digit locale
+    extension.Zero();
+    extension.Format( KDllExtensionFormat, aCollation );
+
+    //Padd with zero to make the file extension length to be minimum of four
+    for( ; extension.Length() < KMinDllExtensionLength ;) 
+        {
+        extension.Insert( KDllExtensionPaddingPosition, KDllExtensionPadding );
+        }
+
+    TBuf<KMaxDllNameLength> collationDllName( KCollationDllNameBase );
+    collationDllName.Append( extension );
+    INFO_1( "Loading Collation DLL named '%S'", &collationDllName );
+    
+    //Load the given Language, Region and Collation dlls
+    errorCode = ChangeLocale( languageDllName, regionDllName, collationDllName );
     if ( errorCode == KErrNone )
         {
         TLocale().Set();
         }
-
     return errorCode;
     }
 
-
-// -----------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
 // SsmLanguageLoader::ChangeLocale
 //
-// -----------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
 //
-TInt SsmLanguageLoader::ChangeLocale( const TDesC& aLocaleDllName )
+TInt SsmLanguageLoader::ChangeLocale( const TDesC& aLanguageDllName,  const TDesC& aRegionDllName, const TDesC& aCollationDllName )
     {
     FUNC_LOG;
+    TExtendedLocale extLocale;
 
-    TExtendedLocale extLocale;
-    TInt errorCode = extLocale.LoadLocale( aLocaleDllName );
-    ERROR( errorCode, "Failed to load locale" );
-
+    INFO_3( "Loading Language dll '%S', Region dll '%S' and Collation dll '%S'",
+            &aLanguageDllName, &aRegionDllName, &aCollationDllName );
+    TInt errorCode = extLocale.LoadLocale( aLanguageDllName, aRegionDllName, aCollationDllName);
     if ( errorCode == KErrNone )
         {
+        //Save the loaded locale settings
         errorCode = extLocale.SaveSystemSettings();
-        ERROR( errorCode, "Failed to set locale" );
+        ERROR( errorCode, "Failed to save locale settings" );
+        }
+    else
+        {
+        INFO_3( "Failed to load Language dll '%S', Region dll '%S' and Collation dll '%S'",
+                    &aLanguageDllName, &aRegionDllName, &aCollationDllName );
         }
 
     return errorCode;
Binary file sysstatemgmt/systemstarter/documentation/9.5/SSA HowTo Diagrams.ppt has changed
--- a/sysstatemgmt/systemstarter/group/app-framework_sysstart.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstarter/group/app-framework_sysstart.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component	app-framework_sysstart
 source	\sf\os\devicesrv\sysstatemgmt\systemstarter
 binary	\sf\os\devicesrv\sysstatemgmt\systemstarter\group	all
--- a/sysstatemgmt/systemstarter/test/testappgood/testappgood_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstarter/test/testappgood/testappgood_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="testappgood";
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstarter/test/tsysstart/inc/appfwk_sysstart_test_dll.rh	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstarter/test/tsysstart/inc/appfwk_sysstart_test_dll.rh	Fri Apr 16 16:18:45 2010 +0300
@@ -41,5 +41,3 @@
 WORD arg2  = 22;
 WORD arg3  = 23;
 }
- 
- 
\ No newline at end of file
--- a/sysstatemgmt/systemstatemgr/cle/src/cmdlistexecutor.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/cle/src/cmdlistexecutor.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-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"
@@ -198,6 +198,7 @@
 	if (iCommandList)
 		{
 		iCommandList->DeferredDelete();
+		iCommandList = NULL;
 		}
 	}
 
--- a/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandfactory.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandfactory.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -333,6 +333,7 @@
     {
     CSsmCommandBase* cmd = NULL;
     TSsmCommandType const cmdType = aSsmCommand.Type();
+    DEBUGPRINT2A("Adding command type in CLE commandlist: %d", cmdType);    
     
     switch(cmdType)
         {
--- a/sysstatemgmt/systemstatemgr/group/app-framework_ssma.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/group/app-framework_ssma.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component	app-framework_ssma
 source	\sf\os\devicesrv\sysstatemgmt\systemstatemgr
 binary	\sf\os\devicesrv\sysstatemgmt\systemstatemgr\group	all
--- a/sysstatemgmt/systemstatemgr/test/tcmd/resource/tcmd_cmdlist_swp_builtincmd.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/resource/tcmd_cmdlist_swp_builtincmd.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -347,4 +347,4 @@
 	severity = ECmdMediumSeverity;
 	power_state = 1;
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmcletestapplication_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmcletestapplication_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -30,4 +30,4 @@
 	app_file="ssmcletestapplication";
 	newfile = KAppDoesNotSupportNewFile;
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -30,4 +30,4 @@
 	app_file="ssmtestappgood";
 	newfile = KAppDoesNotSupportNewFile;
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="ssmtestappnorv";
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppanic_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppanic_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="ssmtestapppanic";
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppaniczero_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppaniczero_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="ssmtestapppaniczero";
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprvafterretry_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprvafterretry_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="ssmtestapprvafterretry";
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprverror_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprverror_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="ssmtestapprverror";
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappslow_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappslow_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="ssmtestappslow";
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="ssmtestappsucessfulafterretry";
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstateplugins/group/app-framework_ssplugins.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstateplugins/group/app-framework_ssplugins.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component	app-framework_ssplugins
 source	\sf\os\devicesrv\sysstatemgmt\systemstateplugins
 binary	\sf\os\devicesrv\sysstatemgmt\systemstateplugins\group	all
--- a/sysstatemgmt/systemstateplugins/test/testapps/src/gsatestappgood_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstateplugins/test/testapps/src/gsatestappgood_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="gsatestappgood";
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstateplugins/test/tunitconditionevaluator/resource/tunitconditionevaluator.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstateplugins/test/tunitconditionevaluator/resource/tunitconditionevaluator.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -176,4 +176,5 @@
 	{
 	key = 0x2;
 	bitmask = 0x0010;
-	}
\ No newline at end of file
+	}
+
--- a/sysstatemgmt/systemstateplugins/test/tunitutilityplugin/src/tutilityplugin_step.cpp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstateplugins/test/tunitutilityplugin/src/tutilityplugin_step.cpp	Fri Apr 16 16:18:45 2010 +0300
@@ -157,27 +157,27 @@
 // OOM tests start here
 
 		__UHEAP_MARK;
-		TRAP(err, doOOMTestL(&doTest1L));
+		TRAP(err, doOOMTestL(&CUtilityPluginTest::doTest1L));
 		TEST(err == KErrNone);
 		__UHEAP_MARKEND;
 
 		__UHEAP_MARK;
-		TRAP(err, doOOMTestL(&doTest2L));
+		TRAP(err, doOOMTestL(&CUtilityPluginTest::doTest2L));
 		TEST(err == KErrNone);
 		__UHEAP_MARKEND;
 
 		__UHEAP_MARK;
-		TRAP(err, doOOMTestL(&doTest3L));
+		TRAP(err, doOOMTestL(&CUtilityPluginTest::doTest3L));
 		TEST(err == KErrNone);
 		__UHEAP_MARKEND;
 
 		__UHEAP_MARK;
-		TRAP(err, doOOMTestL(&doTest5L));
+		TRAP(err, doOOMTestL(&CUtilityPluginTest::doTest5L));
 		TEST(err == KErrNone);
 		__UHEAP_MARKEND;
 
 		__UHEAP_MARK;
-		TRAP(err, doOOMTestL(&doTest6L));
+		TRAP(err, doOOMTestL(&CUtilityPluginTest::doTest6L));
 		TEST(err == KErrNone);
 		__UHEAP_MARKEND;
 
--- a/sysstatemgmt/systemstatereferenceplugins/group/app-framework_ssrefplugins.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/sysstatemgmt/systemstatereferenceplugins/group/app-framework_ssrefplugins.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component	app-framework_ssrefplugins
 source	\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins
 binary	\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\group	all
--- a/systemhealthmanagement/systemhealthmgr/group/app-framework_shma.mrp	Fri Mar 19 09:58:42 2010 +0200
+++ b/systemhealthmanagement/systemhealthmgr/group/app-framework_shma.mrp	Fri Apr 16 16:18:45 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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: 
+#
+
 component	app-framework_shma
 source	\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr
 binary	\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\group	all
--- a/systemhealthmanagement/systemhealthmgr/test/testappgood/shmatestappgood_reg.rss	Fri Mar 19 09:58:42 2010 +0200
+++ b/systemhealthmanagement/systemhealthmgr/test/testappgood/shmatestappgood_reg.rss	Fri Apr 16 16:18:45 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="shmatestappgood";
 	}
-	
\ No newline at end of file
+