Revision: 201033 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 16:29:05 +0300
branchRCL_3
changeset 21 ccb4f6b3db21
parent 20 1ddbe54d0645
child 22 8cb079868133
Revision: 201033 Kit: 201035
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/rom/accremcon.iby
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/EABI/dsytfstifadapterU.DEF
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envrecall.cmd
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envsetup.cmd
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/howto_use_test_setup_scripts.txt
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/src/tfastifentrypoint.cpp
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/inc/remcontestcases.h
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconcontrol.cpp
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconcore.cpp
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconsync.cpp
accessoryservices/accessoryremotecontrol/tsrc/stub/audio/src/audioclientstubAppUi.cpp
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audioclientstubremconobserver.cpp
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audioclientstubremconobserver.h
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.cpp
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.h
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.mmp
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.pro
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.rss
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit_installer.pkg
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit_reg.rss
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit_stub.pkg
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit_template.pkg
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/bld.inf
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/main.cpp
accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/moc_audiostuborbit.cpp
accessoryservices/accessoryremotecontrol/tsrc/stub/group/bld.inf
accessoryservices/accessoryremotecontrol/tsrc/stub/remcon/src/remconstub.cpp
accessoryservices/accessoryremotecontrol/tsrc/stub/rom/remconteststub.iby
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/rom/AccServer.iby
accessoryservices/accessoryserver/src/ASYProxy/ASYProxyAsyHandler.cpp
accessoryservices/accessoryserver/src/ASYProxy/ASYProxyCommandObserver.cpp
accessoryservices/accessoryserver/src/ASYProxy/ASYProxyCommsService.cpp
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/AccSrvSubControl.cpp
accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/inc/TfAccessoryTestControlTypes.h
accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/src/TfAccessoryTestControlPlugin.cpp
accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envrecall.cmd
accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envsetup.cmd
accessoryservices/accessoryserver/tsrc/public/basic/Stubs/AsyStub/group/AsyStub.mmp
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/autoaudioasy/data/2002F9A3.rss
accessoryservices/autoaudioasy/group/autoaudioasy.mmp
accessoryservices/autoaudioasy/group/bld.inf
accessoryservices/autoaudioasy/inc/acc_debug.h
accessoryservices/autoaudioasy/inc/cautoaudioasymainservicebase.h
accessoryservices/autoaudioasy/inc/cautoaudioasypropertyobserver.h
accessoryservices/autoaudioasy/inc/cautoaudioasyservice.h
accessoryservices/autoaudioasy/inc/mautoaudioasypropertylistener.h
accessoryservices/autoaudioasy/rom/autoaudioasy.iby
accessoryservices/autoaudioasy/src/autoaudioasyproxy.cpp
accessoryservices/autoaudioasy/src/cautoaudioasymainservicebase.cpp
accessoryservices/autoaudioasy/src/cautoaudioasypropertyobserver.cpp
accessoryservices/autoaudioasy/src/cautoaudioasyservice.cpp
accessoryservices/group/bld.inf
accessoryservices/headsetstatusapi/tsrc/public/basic/headsettestmodule/src/headsetTestModuleCases.cpp
accessoryservices/pluggeddisplay/pluggeddisplayengine/group/pluggeddisplayengine.mmp
accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp
accessoryservices/pluggeddisplay/pluggeddisplayengine/src/hdmicablestateconnected.cpp
accessoryservices/pluggeddisplay/pluggeddisplayengine/src/tvoutconfigforhdmi.cpp
accessoryservices/remotecontrolfw/client/coreapi/public/remconcoreapicontrollerobserver.h
accessoryservices/remotecontrolfw/client/intermediate/group/bld.inf
accessoryservices/remotecontrolfw/client/intermediate/src/interfaceselector.cpp
accessoryservices/remotecontrolfw/group/remotecontrol.iby
accessoryservices/remotecontrolfw/server/group/remconserver.mmp
accessoryservices/remotecontrolfw/server/inc/session.h
accessoryservices/remotecontrolfw/server/src/server.cpp
accessoryservices/remotecontrolfw/server/src/session.cpp
accessoryservices/remotecontrolfw/types/group/bld.inf
accessoryservices/tspclientmapper/tsrc/public/basic/tspclienttestmodule/src/tspclientTestModuleCases.cpp
commonservices/PlatformEnv/platformver/tsrc/platformvertest/src/platformvertestcases.cpp
commonservices/PlatformEnv/rom/PlatformEnv.iby
commonservices/PlatformEnv/sysversioninfo/tsrc/sysutiltests/src/sysutiltests.cpp
commonservices/PlatformEnv/tsrc/platformenvtest/src/PlatformEnvTestCases.cpp
commonservices/activitymanager/test/tef/group/te_activitymanagerteftests.pkg
commonservices/commonengine/conf/ci_commonengine.confml
commonservices/commonengine/conf/commonengine.confml
commonservices/commonengine/conf/commonengine_1020503B.crml
commonservices/commonengine/config/export.mk
commonservices/commonengine/group/bld.inf
commonservices/group/bld.inf
commonservices/layers.sysdef.xml
commonservices/sysutil/layers.sysdef.xml
commonservices/sysutil/src/sysutil.cpp
commonservices/sysutil/test/data/lang_test.txt
commonservices/sysutil/test/data/langsw_test.txt
commonservices/sysutil/test/data/purpose_test.txt
commonservices/sysutil/test/data/sw_test.txt
commonservices/sysutil/test/data/te_sysutildata.ini
commonservices/sysutil/test/tef/group/bld.inf
commonservices/sysutil/test/tef/group/te_sysutilteftests.iby
commonservices/sysutil/test/tef/group/te_sysutilteftests.pkg
commonservices/sysutil/test/tef/te_sysutilburtestsuite/src/te_sysutiltestversioninfo.cpp
commonservices/sysutil/test/tef/te_sysutiltestsuite/scripts/te_sysutiltestsuite.script
commonservices/sysutil/test/tef/te_sysutiltestsuite/src/sysutilplugin.cpp
commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetlangswversion.cpp
commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetlangversion.cpp
commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetprinformation.cpp
commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetswversion.cpp
commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsoomtest.cpp
devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp
devicesrv_plat/accessory_key_event_handling_api/inc/RemConKeyEventData.h
devicesrv_plat/accessory_policy_definitions_api/inc/AccPolCommonNameValuePairs.h
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/autoaudio_plugin_api/group/bld.inf
devicesrv_plat/autoaudio_plugin_api/inc/autoaudiopskeys.h
devicesrv_plat/ddc_access_api/inc/ddc_access.h
devicesrv_plat/display_language_definition_api/inc/CommonEngineDomainCRKeys.h
devicesrv_plat/group/bld.inf
devicesrv_plat/syslangutil_api/inc/syslangutil.h
devicesrv_pub/common_platform_security_definitions_api/inc/data_caged_locations.mk
devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_path_literals.hrh
devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths.hrh
devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths_for_iby.hrh
devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths_strings.hrh
devicesrv_pub/platform_path_definitions_api/inc/platform_paths.hrh
devicesrvapitest/accessorieshaitest/accessories/group/t_accessories.mmp
devicesrvapitest/accessorieshaitest/accessories/inc/t_accessoriesserver.h
devicesrvapitest/accessorieshaitest/common/inc/datawrapperbase.h
devicesrvapitest/hwrmhaitest/common/inc/DataWrapperBase.h
devicesrvapitest/hwrmhaitest/hwrm/group/T_HWRM.mmp
devicesrvapitest/hwrmhaitest/hwrm/inc/T_HwrmServer.h
dosservices/commondsy/rom/CommonDSY.iby
dosservices/dosserver/rom/dosserver.iby
group/bld.inf
hwrmhaptics/hapticsclient/group/hwrmhapticsclient.mmp
hwrmhaptics/hapticsclient/src/hwrmhapticsimpl.cpp
hwrmhaptics/hapticsclient/src/hwrmhapticssession.cpp
hwrmhaptics/hapticseffectdatagetterfw/group/hwrmhapticseffectdatagetterfw.mmp
hwrmhaptics/hapticspacketizer/group/hwrmhapticspacketizer.mmp
hwrmhaptics/hapticspluginmanager/group/hwrmhapticspluginmanager.mmp
hwrmhaptics/hapticspluginservice/group/hwrmhapticspluginservice.mmp
hwrmhaptics/hapticsserver/group/hwrmhapticsserver.mmp
mediator/data/MediatorDebug.rss
mediator/inc/Server/MediatorDebug.hrh
mediator/inc/Server/MediatorServerObjects.h
mediator/src/Client/MediatorServerClient.cpp
mediator/src/Server/MediatorServerObjects.cpp
mediator/tsrc/public/basic/src/MediatorTestCases.cpp
package_definition.xml
package_definition_v2.xml
package_map.xml
psmservices/psmserver/inc/client/psmclientimpl.h
psmservices/psmserver/inc/engine/psmmanager.h
psmservices/psmserver/inc/engine/psmstorage.h
psmservices/psmserver/inc/server/psmsrvmessage.h
psmservices/psmserver/inc/server/psmsrvsession.h
psmservices/psmserver/inc/util/psmclientserver.h
psmservices/psmserver/src/client/psmclientimpl.cpp
psmservices/psmserver/src/engine/psmbackupstorage.cpp
psmservices/psmserver/src/engine/psmmanager.cpp
psmservices/psmserver/src/engine/psmsettingshandler.cpp
psmservices/psmserver/src/engine/psmstorage.cpp
psmservices/psmserver/src/server/psmsrvmessage.cpp
psmservices/psmserver/src/server/psmsrvsession.cpp
psmservices/psmserver/tsrc/PsmTestModule/conf/PsmTestModule.cfg
psmservices/psmserver/tsrc/PsmTestModule/group/PsmTestModule.mmp
psmservices/psmserver/tsrc/PsmTestModule/inc/PSMTest.h
psmservices/psmserver/tsrc/PsmTestModule/src/PSMTestBlocks.cpp
resourceinterfaces/fmtransmittercontrol/group/FmTx_HWRM.iby
resourceinterfaces/fmtransmittercontrol/src/HWRMFmTxStatusObserver.cpp
resourceinterfaces/group/bld.inf
resourceinterfaces/layers.sysdef.xml
resourcemgmt/data/bld.inf
resourcemgmt/group/bld.inf
resourcemgmt/hwresourcesmgr/documentation/HWRM Central Repository keys.xls
resourcemgmt/hwresourcesmgr/group/HWResourceManager.iby
resourcemgmt/hwresourcesmgr/power/inc/HWRMChargingStatusObserver.h
resourcemgmt/hwresourcesmgr/power/inc/HWRMPower.h
resourcemgmt/hwresourcesmgr/server/src/HWRMPluginHandler.cpp
resourcemgmt/hwresourcesmgr/server/src/HWRMPowerCommonData.cpp
resourcemgmt/hwresourcesmgr/test/TestCapsHWRMPolicing/group/Cap_HWRM_API_Policing.mmp
resourcemgmt/hwresourcesmgr/test/TestCapsHWRMPolicing/inc/CSuite.h
resourcemgmt/hwresourcesmgr/test/data/cenrep/10205043.txt
resourcemgmt/hwresourcesmgr/test/data/featreg/RemovableFeatures.iby
resourcemgmt/hwresourcesmgr/test/group/bld.inf
resourcemgmt/hwresourcesmgr/test/group/howto_test_hwrm.txt
resourcemgmt/hwresourcesmgr/test/group/hwrm_rtests.pkg
resourcemgmt/hwresourcesmgr/test/group/te_hwrm.iby
resourcemgmt/hwresourcesmgr/test/group/te_hwrm.pkg
resourcemgmt/hwresourcesmgr/test/multiclient/HWRMLightTestB/group/HWRMLightTestB.mmp
resourcemgmt/hwresourcesmgr/test/multiclient/HWRMLightTestF/group/HWRMLightTestF.mmp
resourcemgmt/hwresourcesmgr/test/multiclient/common/testcasecontroller.h
resourcemgmt/hwresourcesmgr/test/multiclient/hwrmtests/hwrmtests.cpp
resourcemgmt/hwresourcesmgr/test/multiclient/hwrmtests/hwrmtests.mmp
resourcemgmt/hwresourcesmgr/test/multiclient/mctest_b/mctest_b.mmp
resourcemgmt/hwresourcesmgr/test/multiclient/mctest_f/mctest_f.cpp
resourcemgmt/hwresourcesmgr/test/multiclient/mctest_f/mctest_f.mmp
resourcemgmt/hwresourcesmgr/test/plugins/MockHwrmSY/MockHwrmDll/group/mockhwrm.mmp
resourcemgmt/hwresourcesmgr/test/plugins/MockHwrmSY/MockHwrmSY/group/mockhwrmsy.mmp
resourcemgmt/hwresourcesmgr/test/plugins/MockHwrmSY/MockHwrmSY/src/proxy.cpp
resourcemgmt/hwresourcesmgr/test/plugins/fmtxwatcherplugin/group/hwrmfmtxwatcherplugin.mmp
resourcemgmt/hwresourcesmgr/test/plugins/fmtxwatcherplugin/src/hwrmfmtxwatcherplugin.cpp
resourcemgmt/hwresourcesmgr/test/plugins/targetmodifierplugin/group/hwrmdefaultlighttargetmodifierplugin.mmp
resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_b/group/hwrmtestuiplugin_b.mmp
resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_b/src/proxy.cpp
resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_f/group/hwrmtestuiplugin_f.mmp
resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_f/src/proxy.cpp
resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtest.cpp
resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtestbase.h
resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtestserver.cpp
resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtestserver_pr.cpp
resourcemgmt/hwresourcesmgr/test/te_hwrm/te_hwrm.mmp
resourcemgmt/hwresourcesmgr/test/te_hwrm/te_hwrm_pr.mmp
resourcemgmt/hwresourcesmgrconfig/bld.inf
resourcemgmt/hwresourcesmgrconfig/conf/ci_hwresourcesandenhancements.confml
resourcemgmt/hwresourcesmgrconfig/conf/hwresourcesandenhancements.confml
resourcemgmt/hwrmfmtxwatcherplugin/data/20012401.rss
resourcemgmt/hwrmtargetmodifierplugin/data/10281B9B.rss
resourcemgmt/hwrmtargetmodifierplugin/group/bld.inf
resourcemgmt/layers.sysdef.xml
resourcemgmt/powerandmemorynotificationservice/group/PwrCliTests.pkg
resourcemgmt/powerandmemorynotificationservice/group/bld.inf
resourcemgmt/powerandmemorynotificationservice/group/t_pwrbasic.mmp
resourcemgmt/powerandmemorynotificationservice/group/t_pwroffevents.mmp
resourcemgmt/powerandmemorynotificationservice/group/t_shutdownserver.mmp
resourcemgmt/powerandmemorynotificationservice/inc/e32consf.h
resourcemgmt/powerandmemorynotificationservice/tsrc/t_pwrbasic.cpp
resourcemgmt/powerandmemorynotificationservice/tsrc/t_pwroffevents.cpp
resourcemgmt/powerandmemorynotificationservice/tsrc/t_shutdownserver.cpp
sensorservices/orientationssy/inc/OrientationCRListener.h
sensorservices/orientationssy/inc/SsyConfiguration.h
sensorservices/orientationssy/inc/SsyOrientation.h
sensorservices/orientationssy/src/OrientationCRListener.cpp
sensorservices/orientationssy/src/SsyChannel.cpp
sensorservices/orientationssy/src/SsyControlOrientation.cpp
sensorservices/orientationssy/src/SsyOrientation.cpp
sensorservices/orientationssy/src/SsyProperty.cpp
sensorservices/sensorserver/inc/server/senserverchannel.h
sensorservices/sensorserver/rom/SensorServer.iby
sensorservices/sensorserver/src/server/sensrvchannel.cpp
sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp
sensorservices/sensorserver/src/server/sensrvproxymanager.cpp
sensorservices/tiltcompensationssy/inc/tcsendeventtimer.h
sensorservices/tiltcompensationssy/inc/tcstatetiltlistendata.h
sensorservices/tiltcompensationssy/src/tccenrepobserver.cpp
sensorservices/tiltcompensationssy/src/tcchanneltilt.cpp
sensorservices/tiltcompensationssy/src/tcsendeventtimer.cpp
sensorservices/tiltcompensationssy/src/tcstatetiltidle.cpp
sensorservices/tiltcompensationssy/src/tcstatetiltlistendata.cpp
sysstatemgmt/group/bld.inf
sysstatemgmt/inc/ssmcommonlocale.h
sysstatemgmt/layers.sysdef.xml
sysstatemgmt/ssmcmdlists/data/criticalappscmdlist.rss
sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist.rss
sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_ext.rss
sysstatemgmt/ssmcmdlists/data/noncriticalswpcmdlists.rss
sysstatemgmt/ssmcmdlists/data/securitycheckcmdlist.rss
sysstatemgmt/ssmcmdlists/data/uiservicescmdlist.rss
sysstatemgmt/ssmcmdlists/data/uiservicescmdlist_ext.rss
sysstatemgmt/ssmcmdlists/data/uiswpcmdlists.rss
sysstatemgmt/ssmcustcmds/rom/ssmcompatibility.iby
sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp
sysstatemgmt/ssmmapperutility/inc/ssmmapperutility.h
sysstatemgmt/ssmpolicyplugins/ssmfailpolicy/src/ssmfailpolicy.cpp
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/group/ssmlocaleobserversup.mmp
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmlocaleobserversup.h
sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmlocaleobserversup.cpp
sysstatemgmt/syslangutil/bwins/syslangutilu.def
sysstatemgmt/syslangutil/eabi/syslangutilu.def
sysstatemgmt/syslangutil/inc/syslangutiltrace.h
sysstatemgmt/syslangutil/rom/syslangutil.iby
sysstatemgmt/syslangutil/src/syslangutil.cpp
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/group/loadamastart.mmp
sysstatemgmt/systemstarter/inc/loadamastart.h
sysstatemgmt/systemstarter/src/StartupSplashScreen.cpp
sysstatemgmt/systemstarter/test/tamastarter/group/tamastarter_server.mmp
sysstatemgmt/systemstarter/test/tamastarter/resource/emulator/tamastarter_amaadder_ssma.rss
sysstatemgmt/systemstarter/test/tamastarter/resource/hardware/tamastarter_amaadder_ssma.rss
sysstatemgmt/systemstarter/test/testappgood/testappgood_reg.rss
sysstatemgmt/systemstarter/test/tsysstart/group/sysstarttest.pkg
sysstatemgmt/systemstarter/test/tsysstart/inc/appfwk_sysstart_test_dll.rh
sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistimpl.cpp
sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistresourcereaderimpl.cpp
sysstatemgmt/systemstatemgr/ssm/src/ssmsession.cpp
sysstatemgmt/systemstatemgr/ssm/src/ssmstatetransitionengine.cpp
sysstatemgmt/systemstatemgr/sus/src/ssmsuscli.cpp
sysstatemgmt/systemstatemgr/sus/src/susemergencycallrfadaptation.cpp
sysstatemgmt/systemstatemgr/sus/src/susmiscadaptation.cpp
sysstatemgmt/systemstatemgr/sus/src/susstateadaptation.cpp
sysstatemgmt/systemstatemgr/test/tcle/group/ssmatest_tcle.pkg
sysstatemgmt/systemstatemgr/test/tcmd/group/ssmatest_tcmd.pkg
sysstatemgmt/systemstatemgr/test/tcmd/resource/tcmd_cmdlist_swp_builtincmd.rss
sysstatemgmt/systemstatemgr/test/tcmd/src/tcmd_step_resourcereader.cpp
sysstatemgmt/systemstatemgr/test/tcmn/group/ssmatest_tcmn.pkg
sysstatemgmt/systemstatemgr/test/testapps/group/ssmcletestapplication.mmp
sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappgood.mmp
sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappnorv.mmp
sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapppanic.mmp
sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapppaniczero.mmp
sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapprvafterretry.mmp
sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapprverror.mmp
sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappslow.mmp
sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappsucessfulafterretry.mmp
sysstatemgmt/systemstatemgr/test/testapps/inc/ssmtestapps.h
sysstatemgmt/systemstatemgr/test/testapps/inc/ssmtestappsucessfulafterretry.h
sysstatemgmt/systemstatemgr/test/testapps/src/ssmcletestapplication_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppanic.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppanic_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppaniczero.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppaniczero_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprvafterretry.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprvafterretry_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprverror.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprverror_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappslow.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappslow_reg.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry.cpp
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry.rss
sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry_reg.rss
sysstatemgmt/systemstatemgr/test/tipcfuzz/group/tipcfuzz.pkg
sysstatemgmt/systemstatemgr/test/tss/group/ssmatest_tss.pkg
sysstatemgmt/systemstatemgr/test/tss/src/tss_apptimeout.cpp
sysstatemgmt/systemstatemgr/test/tss/src/tss_procstartwithfandf.cpp
sysstatemgmt/systemstatemgr/test/tssm/group/ssmatest_tssm.pkg
sysstatemgmt/systemstatemgr/test/tssm/src/tssm_step_swptransitionengine.cpp
sysstatemgmt/systemstatemgr/test/tssm/src/tssm_step_validswplist.cpp
sysstatemgmt/systemstatemgr/test/tsus/group/ssmatest_tsus.pkg
sysstatemgmt/systemstateplugins/adptplugin/group/stateadaptationref.mmp
sysstatemgmt/systemstateplugins/adptplugin/inc/emergencycallrfadaptationref.h
sysstatemgmt/systemstateplugins/adptplugin/inc/miscadaptationref.h
sysstatemgmt/systemstateplugins/adptplugin/inc/rtcadaptationref.h
sysstatemgmt/systemstateplugins/adptplugin/inc/simadaptationref.h
sysstatemgmt/systemstateplugins/adptplugin/inc/stateadaptationref.h
sysstatemgmt/systemstateplugins/adptplugin/src/emergencycallrfadaptationref.cpp
sysstatemgmt/systemstateplugins/adptplugin/src/miscadaptationref.cpp
sysstatemgmt/systemstateplugins/adptplugin/src/rtcadaptationref.cpp
sysstatemgmt/systemstateplugins/adptplugin/src/simadaptationref.cpp
sysstatemgmt/systemstateplugins/adptplugin/src/stateadaptationref.cpp
sysstatemgmt/systemstateplugins/conditionevaluator/src/cndsystemwideproperty.cpp
sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyfail.mmp
sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicynormal.mmp
sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyshutdown.mmp
sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicystartup.mmp
sysstatemgmt/systemstateplugins/gsapolicy/group/sspluginsgsa.iby
sysstatemgmt/systemstateplugins/test/tappgsapolicy/resource/sspluginstest_tappgsapolicy.rss
sysstatemgmt/systemstateplugins/test/tcmncustomcmd/group/sspluginstest_tcmncustomcmd.pkg
sysstatemgmt/systemstateplugins/test/testapps/group/gsatestappgood.mmp
sysstatemgmt/systemstateplugins/test/testapps/src/gsatestappgood_reg.rss
sysstatemgmt/systemstateplugins/test/tintadptplugin/group/bld.inf
sysstatemgmt/systemstateplugins/test/tintadptplugin/group/definetestps.iby
sysstatemgmt/systemstateplugins/test/tintadptplugin/group/definetestps.mmp
sysstatemgmt/systemstateplugins/test/tintadptplugin/group/sspluginstest_i_adaptation.iby
sysstatemgmt/systemstateplugins/test/tintadptplugin/group/sspluginstest_i_tadaptation.pkg
sysstatemgmt/systemstateplugins/test/tintadptplugin/group/tiadaptation_plugin.mmp
sysstatemgmt/systemstateplugins/test/tintadptplugin/inc/definetestps.h
sysstatemgmt/systemstateplugins/test/tintadptplugin/inc/ti_adaptationplugin_stepbase.h
sysstatemgmt/systemstateplugins/test/tintadptplugin/src/definetestps.cpp
sysstatemgmt/systemstateplugins/test/tintadptplugin/src/definetestps_reg.rss
sysstatemgmt/systemstateplugins/test/tintadptplugin/src/temergencycallrf_adaptationplugin_step.cpp
sysstatemgmt/systemstateplugins/test/tintadptplugin/src/ti_adaptationplugin_stepbase.cpp
sysstatemgmt/systemstateplugins/test/tintadptplugin/src/tmisc_adaptationplugin_step.cpp
sysstatemgmt/systemstateplugins/test/tintadptplugin/src/trtc_adaptationplugin_step.cpp
sysstatemgmt/systemstateplugins/test/tintadptplugin/src/tsim_adaptationplugin_step.cpp
sysstatemgmt/systemstateplugins/test/tintadptplugin/src/tstate_adaptationplugin_step.cpp
sysstatemgmt/systemstateplugins/test/tintconditionevaluator/group/sspluginstest_tintconditionevaluator.pkg
sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/bld.inf
sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/teststatetransition.iby
sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsa_i_server.mmp
sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsastatetranfromnormal.mmp
sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsastatetranfromshutdown.mmp
sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsastatetranfromstartup.mmp
sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsastatetrantoshutdown.mmp
sysstatemgmt/systemstateplugins/test/tintgsapolicy/inc/tgsa_step_statetrantodiffstates.h
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_1.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_10.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_11.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_12.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_13.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_14.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_15.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_16.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_17.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_18.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_19.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_2.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_20.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_21.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_22.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_23.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_24.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_25.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_26.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_27.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_28.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_29.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_3.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_30.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_31.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_32.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_33.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_34.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_35.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_36.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_37.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_38.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_39.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_4.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_40.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_41.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_42.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_43.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_44.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_45.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_46.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_47.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_48.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_49.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_5.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_50.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_6.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_7.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_8.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_9.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_diffss1.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_diffss2.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_samess.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_sortdifffile1.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_sortdifffile2.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_sortsamefile.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetranfromnormal.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetranfromshutdown.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetranfromstartup.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetranfromstartuptoshutdown.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetransition.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetrantoshutdown.rss
sysstatemgmt/systemstateplugins/test/tintgsapolicy/scripts/sspluginstest_statetranfromshutdown.script
sysstatemgmt/systemstateplugins/test/tintgsapolicy/scripts/sspluginstest_statetranfromstartuptoshutdown.script
sysstatemgmt/systemstateplugins/test/tintgsapolicy/scripts/sspluginstest_statetrantoshutdown.script
sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsa_i_server.cpp
sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsa_step_statetrantodiffstates.cpp
sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsastatetranfromnormal.cpp
sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsastatetranfromshutdown.cpp
sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsastatetranfromstartup.cpp
sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsastatetrantoshutdown.cpp
sysstatemgmt/systemstateplugins/test/tunitadptplugin/group/sspluginstest_tadaptation.pkg
sysstatemgmt/systemstateplugins/test/tunitadptplugin/group/tadaptation_plugin.mmp
sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/temergencycallrf_adaptationplugin_step.cpp
sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tmisc_adaptationplugin_step.cpp
sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/trtc_adaptationplugin_step.cpp
sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tsim_adaptationplugin_step.cpp
sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tstate_adaptationplugin_step.cpp
sysstatemgmt/systemstateplugins/test/tunitconditionevaluator/group/sspluginstest_tunitconditionevaluator.pkg
sysstatemgmt/systemstateplugins/test/tunitconditionevaluator/resource/tunitconditionevaluator.rss
sysstatemgmt/systemstateplugins/test/tunitgsapolicy/group/sspluginstest_tgsa.pkg
sysstatemgmt/systemstateplugins/test/tunitgsapolicy/group/tgsa_server.mmp
sysstatemgmt/systemstateplugins/test/tunitgsapolicy/src/tgsa_step_fail.cpp
sysstatemgmt/systemstateplugins/test/tunitgsapolicy/src/tgsa_step_shutdown.cpp
sysstatemgmt/systemstateplugins/test/tunitgsapolicy/src/tgsa_step_startup.cpp
sysstatemgmt/systemstateplugins/test/tunitutilityplugin/group/sspluginstest_tutility.pkg
sysstatemgmt/systemstateplugins/test/tunitutilityplugin/src/tutilityplugin_step.cpp
sysstatemgmt/systemstatereferenceplugins/custcmd/group/ssmuiproviderdlldefault.mmp
sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmuiproviderdll.h
sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmuiproviderdlldefault.cpp
sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmuiproviderdllref.cpp
sysstatemgmt/systemstatereferenceplugins/test/tclayer/group/ssrefpluginstest_tclayer.pkg
sysstatemgmt/systemstatereferenceplugins/test/tclayer/group/tclayer_server.mmp
sysstatemgmt/systemstatereferenceplugins/test/tclayer/scripts/ssrefpluginstest_clayer_ssmsimstatusobserver.script
sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_ssmsecurityeventobserver.cpp
sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_ssmsimstatusobserver.cpp
sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_startersession.cpp
sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_startersessionwithssm.cpp
sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_startupadaptationadapter.cpp
sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/group/definesecuritystateps.mmp
sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/group/ssrefpluginstest_tintcustcmd.pkg
sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/group/tcustomcmd_server.mmp
sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/inc/tcustcmd_const.h
sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/definesecuritystateps.cpp
sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_activateemergencycall.cpp
sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_deactivateemergencycall.cpp
sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_devicesecuritypincheck.cpp
sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_simsecuritypincheck.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/defineemergencycallps.mmp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/definestartupps.mmp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/ssrefpluginstest_tuintcustcmd.pkg
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/testpinnotifier.rss
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/testpinnotifierplugin.mmp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/tunitcustcmd_server.mmp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/inc/testpinnotifierplugin.h
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/scripts/ssrefpluginstest_custcmd_activaterfforemergencycall.script
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/scripts/ssrefpluginstest_custcmd_deactivaterfforemergencycall.script
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_activaterfforemergencycall.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysperformrestartactions.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysperformrfsactions.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysperformshutdownactions.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysselftest.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysstatechange.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_deactivaterfforemergencycall.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_devicesecuritycheck.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_execute.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_publishstartupmode.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_simsecuritycheck.cpp
sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/testpinnotifierplugin.cpp
sysstatemgmt/tsrc/public/basic/MT_SysLangUtil/MT_SysLangUtil.cpp
sysstatemgmt/tsrc/public/basic/MT_SysLangUtil/MT_SysLangUtil.h
sysstatemgmt/tsrc/public/basic/MT_SysLangUtil/MT_SysLangUtil_DllMain.cpp
sysstatemgmt/tsrc/public/basic/bwins/mt_rstartersessionU.DEF
sysstatemgmt/tsrc/public/basic/eabi/mt_rstartersessionU.DEF
sysstatemgmt/tsrc/public/basic/group/MT_SysLangUtil.mmp
sysstatemgmt/tsrc/public/basic/group/bld.inf
sysstatemgmt/tsrc/public/basic/group/mt_rstartersession.mmp
sysstatemgmt/tsrc/public/basic/group/mt_rstartersession.pkg
sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession.cpp
sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession.h
sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession_DllMain.cpp
sysstatemgmt/tsrc/public/basic/rom/mt_rstartersession.iby
systemhealthmanagement/layers.sysdef.xml
systemhealthmanagement/systemhealthmgr/sysmonsrc/monitor.cpp
systemhealthmanagement/systemhealthmgr/sysmonsrc/monitor.h
systemhealthmanagement/systemhealthmgr/test/testappgood/shmatestappgood_reg.rss
systemhealthmanagement/systemhealthmgr/test/trestartsys/group/shmatest_trestartsys.pkg
systemhealthmanagement/systemhealthmgr/test/tstartsafe/group/shmatest_tstartsafe.pkg
systemhealthmanagement/systemhealthmgr/test/tstartupproperties/group/shmatest_tstartupproperties.pkg
systemhealthmanagement/systemhealthmgr/test/tsysmon/data/tsysmon.ini
systemhealthmanagement/systemhealthmgr/test/tsysmon/eabi/sysmontesthelperu.def
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/bld.inf
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/shmatest_tsysmon.pkg
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/sysmon_iof_tests.iby
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/sysmon_osrestart_tests.iby
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/sysmontest.iby
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/sysmontesthelper.mmp
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_failcount2failwait.mmp
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_faileiofcount0.mmp
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_faileiofcount1fail.mmp
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_startupregeiof.mmp
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_startupregeioffailstart1.mmp
systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_server.mmp
systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-0033_hardware0.rss
systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-0034_hardware0.rss
systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-0038_hardware0.rss
systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-0043_hardware0.rss
systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-0044_hardware0.rss
systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-eiof_hardware0.rss
systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_criticalnoretries.script
systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_failcount2failwait.script
systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_faileiofcount0.script
systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_faileiofcount1fail.script
systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_restartos.script
systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_startupregeiof.script
systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_startupregeioffailstart1.script
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/sysmontesthelper.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/sysmontesthelper.h
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_donothing.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_failcount2failwait.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_failcount2failwait_slave.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_faileiofcount0.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_faileiofcount1fail.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_startupregeiof.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_startupregeioffailstart1.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_server.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_server_defs.h
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_step_result_check.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_step_run_count_check.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_stepcancelallmonitors.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_steposrestarttest.cpp
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_steposrestarttest.h
systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_steprestartthrottle.cpp
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/accmonconnectionemulator/src/AccMonConnectionEmulator.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/accmonconnectionemulator/src/AccMonConnectionEmulator.cpp	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/src/accMonitoringTestModuleCases.cpp	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/AsyStub/src/AsyStubMainServiceBase.cpp	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp	Tue Aug 31 16:29:05 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/rom/accremcon.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/rom/accremcon.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -20,14 +20,14 @@
 #ifndef ACCREMCON_IBY
 #define ACCREMCON_IBY
 
-file=ABI_DIR\BUILD_DIR\RemConExtensionApi.dll          	SHARED_LIB_DIR\RemConExtensionApi.dll
+file=ABI_DIR\BUILD_DIR\remconextensionapi.dll          	SHARED_LIB_DIR\RemConExtensionApi.dll
 
-ECOM_PLUGIN( RemConKeyEventConverter.dll, RemConKeyEventConverter.rsc )
+ECOM_PLUGIN( remconkeyeventconverter.dll, remconkeyeventconverter.rsc )
 
 #ifndef __PRODUCT_REMCON_TSP
 
 #ifndef RD_TSP_CLIENT_MAPPER
-ECOM_PLUGIN( RemConTspController.dll, RemConTspController.rsc )
+ECOM_PLUGIN( remcontspcontroller.dll, remcontspcontroller.rsc )
 #endif // RD_TSP_CLIENT_MAPPER
 
 #endif
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/EABI/dsytfstifadapterU.DEF	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/EABI/dsytfstifadapterU.DEF	Tue Aug 31 16:29:05 2010 +0300
@@ -1,3 +1,4 @@
 EXPORTS
 	_Z9LibEntryLv @ 1 NONAME
+	_Z15SetRequirementsRP16CTestModuleParamRm @ 2 NONAME
 
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envrecall.cmd	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envrecall.cmd	Tue Aug 31 16:29:05 2010 +0300
@@ -30,7 +30,12 @@
 pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\accessoryadaptation\group\
 REM call bldmake bldfiles
 REM call abld build remconadaptation
-call sbs -p remconadaptation
+if not "%1"=="" goto default
+call sbs -p remconadaptation.mmp -c armv5.%1
+:default
+call sbs -p remconadaptation.mmp -c armv5
+call sbs -p remconadaptation.mmp -c winscw
+REM Add other variants if applicable
 popd
 @echo build remconadaptation... Finished
 
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envsetup.cmd	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envsetup.cmd	Tue Aug 31 16:29:05 2010 +0300
@@ -22,8 +22,12 @@
 REM call bldmake bldfiles
 REM call abld makefile remconadaptation
 REM call abld reallyclean remconadaptation
-call sbs -p remconadaptation -c armv5 REALLYCLEAN
-call sbs -p remconadaptation -c winscw REALLYCLEAN
+if not "%1"=="" goto default
+call sbs -p remconadaptation.mmp -c armv5.%1 CLEAN
+:default
+call sbs -p remconadaptation.mmp -c armv5 CLEAN
+call sbs -p remconadaptation.mmp -c winscw CLEAN
+REM Add other variants if applicable
 popd
 @echo Cleaning remconadaptation... Finished
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/howto_use_test_setup_scripts.txt	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,11 @@
+The envsetup.cmd and envrecall.cmd scripts are by default meant for ARMV5 and WINSCW platforms only.
+If the armv5 variant needs to be handled, the variant name should be passed as parameter to envsetup.cmd
+and envrecall.cmd scripts.
+
+For example:
+If testing only on winscw
+use envsetup.cmd (to clean the production executables and setup stubs)
+(and envrecall.cmd to revert to stub free state)
+
+If testing for platsim
+use envsetup.cmd platsim79 (this would build for armv5.platsim79 apart from armv5 and winscw)
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/src/tfastifentrypoint.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/src/tfastifentrypoint.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -159,4 +159,21 @@
     COMPONENT_TRACE( ( _L( "    DSYTESTTOOL - CTFAStifEntryPoint::CreateEnvironmentL - return 0x%x" ), env ) );
     return env;
     }
+
+
+EXPORT_C TInt SetRequirements( CTestModuleParam*& aTestModuleParam, 
+                               TUint32& aParameterValid )
+
+    {
+    aParameterValid = KStifTestModuleParameterChanged;
+    CTestModuleParamVer01* param = CTestModuleParamVer01::NewL();
+
+    // Stack size
+    param->iTestThreadStackSize= 65536; // 64KB stack
+    // Heap sizes
+    param->iTestThreadMinHeap = 4096;   // 4K heap min
+    param->iTestThreadMaxHeap = 1260480;// 1.2M heap max
+    aTestModuleParam = param;
+    return KErrNone;
+    } 
     
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/inc/remcontestcases.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/inc/remcontestcases.h	Tue Aug 31 16:29:05 2010 +0300
@@ -89,7 +89,9 @@
         { ETFRemCon_LaunchAudioClient,            {}, 0, (TText8*) L"", ETrue, ETFRemConEvent_None },
         { ETFRemCon_Subscribe,                      { ERemConKeyCodeVolumeUp, ERemConKeyModifierNone,ERemConKeyStateDown, ERemConKeyEventNone },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},0, (TText8*) L"", ETrue, ETFRemConEvent_VolumeUp},
-        { ETFRemCon_CloseAudioClient,            {}, 0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,            {}, 0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
 
 //
@@ -98,10 +100,14 @@
 const TRemConControlTestCaseState KVolumeUpReleaseShortStates[] =
     {   
         { ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-        { ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+        /*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
         { ETFRemCon_Subscribe,                      { ERemConKeyCodeVolumeUp, ERemConKeyModifierNone,ERemConKeyStateUp, ERemConKeyEventShortPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},1, (TText8*) L"", ETrue, ETFRemConEvent_VolumeUp },
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
 
 //
@@ -110,10 +116,14 @@
 const TRemConControlTestCaseState KVolumeUpReleaseLongStates[] =
     {
     	{ ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-    	{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+    	/*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
     	{ ETFRemCon_Subscribe,                      { ERemConKeyCodeVolumeUp, ERemConKeyModifierNone,ERemConKeyStateUp, ERemConKeyEventLongPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},1, (TText8*) L"", ETrue, ETFRemConEvent_VolumeUp },
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
 
 //
@@ -122,10 +132,14 @@
 const TRemConControlTestCaseState KVolumeDownPressStates[] =
     {
         { ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-        { ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+        /*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
         { ETFRemCon_Subscribe,                      { ERemConKeyCodeVolumeDown, ERemConKeyModifierNone,ERemConKeyStateDown, ERemConKeyEventNone },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},0, (TText8*) L"", ETrue, ETFRemConEvent_VolumeDown },
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
 
 //
@@ -134,10 +148,14 @@
 const TRemConControlTestCaseState KVolumeDownReleaseShortStates[] =
     {
     	{ ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-    	{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+    	/*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
     	{ ETFRemCon_Subscribe,                      { ERemConKeyCodeVolumeDown, ERemConKeyModifierNone,ERemConKeyStateUp, ERemConKeyEventShortPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},1, (TText8*) L"", ETrue, ETFRemConEvent_VolumeDown },
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
 
 //
@@ -146,7 +164,9 @@
 const TRemConControlTestCaseState KVolumeDownReleaseLongStates[] =
     {
     	{ ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-    	{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+    	/*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
     	{ ETFRemCon_Subscribe,                      { ERemConKeyCodeVolumeDown, ERemConKeyModifierNone,ERemConKeyStateUp, ERemConKeyEventLongPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},1, (TText8*) L"", ETrue, ETFRemConEvent_VolumeDown},
         { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
@@ -161,7 +181,9 @@
     	{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
     	{ ETFRemCon_Subscribe,                      { ERemConKeyCodeVolumeDown, ERemConKeyModifierNone,ERemConKeyStateDown, ERemConKeyEventLongPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
     	{ ETFRemCon_CheckClientKey,                {},0, (TText8*) L"", ETrue, ETFRemConEvent_None},
-    	{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+    	/*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
 
 
@@ -173,10 +195,14 @@
 const TRemConControlTestCaseState KMediaPlayAndPauseStates[] =
     {
         { ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-        { ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+        /*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
         { ETFRemCon_Subscribe,                      { ERemConKeyCodePlayPause, ERemConKeyModifierNone,ERemConKeyStateUp, ERemConKeyEventShortPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},2, (TText8*) L"", ETrue, ETFRemConEvent_CoreApiPlaybackSpeedX1},
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
                                     
 //
@@ -185,10 +211,14 @@
 const TRemConControlTestCaseState KMediaStopStates[] =
     {
     	{ ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-    	{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+    	/*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
     	{ ETFRemCon_Subscribe,                      { ERemConKeyCodeStop, ERemConKeyModifierNone,ERemConKeyStateUp, ERemConKeyEventShortPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},2, (TText8*) L"", ETrue, ETFRemConEvent_CodeStop },
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
     
 //
@@ -197,10 +227,14 @@
 const TRemConControlTestCaseState KMediaForwardPressStates[] =
     {
         { ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-        { ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+        /*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
         { ETFRemCon_Subscribe,                      { ERemConKeyCodeForward, ERemConKeyModifierNone,ERemConKeyStateDown, ERemConKeyEventRepeat },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},0, (TText8*) L"", ETrue, ETFRemConEvent_CodeForward},
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
 
 //
@@ -209,10 +243,14 @@
 const TRemConControlTestCaseState KMediaForwardReleaseStates[] =
     {
     	{ ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-    	{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+    	/*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
     	{ ETFRemCon_Subscribe,                      { ERemConKeyCodeForward, ERemConKeyModifierNone,ERemConKeyStateUp, ERemConKeyEventLongPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},1, (TText8*) L"", ETrue, ETFRemConEvent_CodeForward},
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
     
 //
@@ -221,10 +259,14 @@
 const TRemConControlTestCaseState KMediaRewindPressStates[] =
     {
         { ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-        { ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+        /*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
         { ETFRemCon_Subscribe,                      { ERemConKeyCodeBack, ERemConKeyModifierNone,ERemConKeyStateDown, ERemConKeyEventRepeat },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },        
         { ETFRemCon_CheckClientKey,                {},0, (TText8*) L"", ETrue, ETFRemConEvent_CodeBack},
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
 
 //
@@ -233,10 +275,14 @@
 const TRemConControlTestCaseState KMediaRewindReleaseStates[] =
     {
     	{ ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-    	{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+    	/*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
     	{ ETFRemCon_Subscribe,                      { ERemConKeyCodeBack, ERemConKeyModifierNone,ERemConKeyStateUp, ERemConKeyEventLongPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},1, (TText8*) L"", ETrue, ETFRemConEvent_CodeBack},
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
     };
 
 //
@@ -245,10 +291,14 @@
 const TRemConControlTestCaseState KMediaNextTrackStates[] =
     {
         { ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-        { ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+        /*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
         { ETFRemCon_Subscribe,                      { ERemConKeyCodeForward, ERemConKeyModifierNone,ERemConKeyStateUp, ERemConKeyEventShortPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},2, (TText8*) L"", ETrue, ETFRemConEvent_CodeForward },
-        { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
+
+        /*{ ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }*/
+
 	};
 //
 // ACCREMCON [Media Previous Track Event]
@@ -256,7 +306,9 @@
 const TRemConControlTestCaseState KMediaPreviousTrackStates[] =
     {
         { ETFRemConEvent_NormalHandler,             {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
-        { ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },
+
+        /*{ ETFRemCon_LaunchAudioClient,            {},0, (TText8*) L"", ETrue, ETFRemConEvent_None },*/
+
         { ETFRemCon_Subscribe,                      { ERemConKeyCodeBack, ERemConKeyModifierNone,ERemConKeyStateUp, ERemConKeyEventShortPress },0, (TText8*) L"", ETrue, ETFRemConEvent_None  },
         { ETFRemCon_CheckClientKey,                {},2, (TText8*) L"", ETrue, ETFRemConEvent_CodeBack },
         { ETFRemCon_CloseAudioClient,          {},0, (TText8*) L"", ETrue, ETFRemConEvent_None }
@@ -492,7 +544,9 @@
         { ETFRemConEvent_CmdHandler,                {},0, (TText8*) L"", EFalse, ETFRemConEvent_None }, 
         { ETFRemConEvent_SetCallState,  {}, EPSCTsyCallStateNone,  (TText8*) L"",      EFalse, ETFRemConEvent_None               },
         { ETFRemCon_Subscribe,          {}, ERemConExtSpeedDial,        (TText8*) L"1", EFalse, ETFRemConEvent_None               },
-        { ETFRemConEvent_CheckEvent,             {}, 0,(TText8*) L"",                    EFalse, ETFRemConEvent_SpeedDial          },
+
+        { ETFRemConEvent_CheckEvent,             {}, 0,(TText8*) L"",                    EFalse, ETFRemConEvent_None          },
+
     };
 
 //
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconcontrol.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconcontrol.cpp	Tue Aug 31 16:29:05 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/remcontestcontrol/remcontestcontrolplugin/src/remconcore.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconcore.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -262,9 +262,10 @@
 void CRemConCore::Play()
 {
 		TUint numRemotes;		
+		
+		iActive->iStatus = KRequestPending;
  		iCoreController->Play(iActive->iStatus, numRemotes, ERemConCoreApiButtonPress);
- 		iActive->iStatus = KRequestPending;
-		iActive->SetActive();
+ 		iActive->SetActive();
 }
  
  // -----------------------------------------------------------------------------
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconsync.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconsync.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -110,9 +110,10 @@
 //	   
 void CRemConSync::SynchronizeResponse()
     {
-		iSync->SynchronizeResponse(iActive->iStatus, iError);
-		iActive->iStatus = KRequestPending;
-		iActive->SetActive();
+    iActive->iStatus = KRequestPending;
+    iSync->SynchronizeResponse(iActive->iStatus, iError);
+    iActive->SetActive();
+    COMPONENT_TRACE( ( _L( "REMCONTESTCONTROL -  SynchronizeResponse return" )) );
 	}
    
 void CRemConSync::GetCommandSourceInfo(TRemConExtCmdSource& aSource)
--- a/accessoryservices/accessoryremotecontrol/tsrc/stub/audio/src/audioclientstubAppUi.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audio/src/audioclientstubAppUi.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -31,7 +31,6 @@
 #include "audioclientstubAppView.h"
 #include "audioclientstubremconobserver.h"
 
-_LIT(KText, "Hello World!");
 
 // ============================ MEMBER FUNCTIONS ===============================
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audioclientstubremconobserver.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* 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 observer class for remote control keys
+*
+*/
+
+
+// INCLUDE FILES
+#include <remconcoreapitarget.h>
+#include <remconinterfaceselector.h>
+#include <e32property.h>
+#include <e32debug.h>
+#include "audioclientstubremconobserver.h"
+#include "accremconpstypes.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CAudioClientStubRemConObserver::CAudioClientStubRemConObserver
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CAudioClientStubRemConObserver::CAudioClientStubRemConObserver( ) 
+ : iInterfaceSelector( NULL ),
+   iCoreTarget( NULL )
+   
+    {
+    // Nothing
+    }
+
+// -----------------------------------------------------------------------------
+// CAudioClientStubRemConObserver::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CAudioClientStubRemConObserver::ConstructL()
+    {
+   RDebug::Print( _L("CAudioClientStubRemConObserver::ConstructL") ) ;  
+    
+    iInterfaceSelector = CRemConInterfaceSelector::NewL();
+    
+    iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this );
+    
+    iInterfaceSelector->OpenTargetL();
+    }
+
+// -----------------------------------------------------------------------------
+// CAudioClientStubRemConObserver::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CAudioClientStubRemConObserver* CAudioClientStubRemConObserver::NewL()
+    {   
+    RDebug::Print( _L("CAudioClientStubRemConObserver::NewL") ) ;
+    
+    CAudioClientStubRemConObserver* self = new( ELeave ) CAudioClientStubRemConObserver();
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CAudioClientStubRemConObserver::~CSysApRemConObserver
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CAudioClientStubRemConObserver::~CAudioClientStubRemConObserver()
+    {
+    RDebug::Print( _L("CAudioClientStubRemConObserver::~CAudioClientStubRemConObserver") ) ;
+    delete iInterfaceSelector; // Internally deletes iCoreTarget 
+    }
+    
+// -----------------------------------------------------------------------------
+// CAudioClientStubRemConObserver::MrccatoCommand
+// Handles remote key event
+// -----------------------------------------------------------------------------
+//
+void CAudioClientStubRemConObserver::MrccatoCommand( TRemConCoreApiOperationId aOperationId, 
+                                        TRemConCoreApiButtonAction aButtonAct )
+	{
+    RDebug::Print( _L("CAudioClientStubRemConObserver::MrccatoCommand: aOperationId=%d, aButtonAct=%d"), aOperationId, aButtonAct );
+	
+    TRemConClientKeyDataBuf keyDatabuf;     
+    TRemConClientKeyData keyData;
+    keyData.iOperationId = aOperationId;
+    keyData.iButtonAct = aButtonAct;
+    keyDatabuf = keyData;
+    
+    TInt err = RProperty::Set( KTFRemConTestProperty, KTFRemConClientKey, keyDatabuf );
+    
+    if ( err != KErrNone )
+        {
+        RDebug::Print( _L("CAudioClientStubRemConObserver::MrccatoCommand: err=%d"), err );
+        }
+	}
+
+//  End of File 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audioclientstubremconobserver.h	Tue Aug 31 16:29:05 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:  Observer class for remote control keys
+*
+*/
+
+
+#ifndef AUDIOCLIENTSTUBREMCONOBSERVER_H
+#define AUDIOCLIENTSTUBREMCONOBSERVER_H
+
+//  INCLUDES
+#include <remconcoreapitargetobserver.h>
+
+// FORWARD DECLARATIONS
+class CRemConInterfaceSelector;  
+class CRemConCoreApiTarget;
+
+
+// CLASS DECLARATION
+
+/**
+*/
+class CAudioClientStubRemConObserver : public CBase, public MRemConCoreApiTargetObserver
+    {
+    public:  // Constructor and destructor
+        
+        /**
+        * Two-phased constructor.
+        */
+        static CAudioClientStubRemConObserver* NewL();
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CAudioClientStubRemConObserver();
+
+    protected: // Functions from base classes
+
+        /**
+        *
+        * A command has been received. 
+        * @param aOperationId The operation ID of the command.
+        * @param aButtonAct The button action associated with the command.
+        */
+        void MrccatoCommand( TRemConCoreApiOperationId aOperationId, 
+                             TRemConCoreApiButtonAction aButtonAct);
+
+
+    private: // Functions
+        /**
+        * C++ default constructor.
+        * Not accessible. 
+        */
+        CAudioClientStubRemConObserver();
+        
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+        
+        
+    private: // Data
+
+		/**
+		* Remote Controller interface selector.
+		* Own.
+		*/
+        CRemConInterfaceSelector* iInterfaceSelector;  
+        
+        /** 
+        * Remote Controller target. 
+        * Not own.
+        */
+        CRemConCoreApiTarget* iCoreTarget;
+
+    };
+
+#endif // 
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* 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:  Backend for the Qt app. Starts the Remcon observer.
+*
+*/
+
+#include <tspclientmapper.h>
+#include "audiostuborbit.h"
+#include "audioclientstubremconobserver.h"
+
+audiostuborbit::audiostuborbit(QWidget *parent)
+    : HbMainWindow(parent)
+{
+//	ui.setupUi(this);
+	iTspClientMapper = CTspClientMapper::NewL();
+	iTspClientMapper->SetTspTargetClient( CTspClientMapper::EPlayingClients, RProcess().Id() );
+	iRemConObserver = CAudioClientStubRemConObserver::NewL();
+}
+
+audiostuborbit::~audiostuborbit()
+{
+    if ( iTspClientMapper )
+        {
+        iTspClientMapper->RemoveTspTargetClient( CTspClientMapper::EPlayingClients, RProcess().Id() );
+        }
+    delete iTspClientMapper;
+    delete iRemConObserver;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.h	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* 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:  Backend for the Qt app
+*
+*/
+
+#ifndef AUDIOSTUBORBIT_H
+#define AUDIOSTUBORBIT_H
+
+#include <HbMainWindow>
+
+class CTspClientMapper;
+class CAudioClientStubRemConObserver;
+
+class audiostuborbit : public HbMainWindow
+{
+    Q_OBJECT
+
+public:
+	audiostuborbit(QWidget *parent = 0);
+    ~audiostuborbit();
+
+private:
+    CTspClientMapper* iTspClientMapper;
+    CAudioClientStubRemConObserver* iRemConObserver;
+};
+
+#endif // AUDIOSTUBORBIT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,132 @@
+// ==============================================================================
+// Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-07-19T09:07:14
+// This file is generated by qmake and should not be modified by the
+// user.
+//  Name        : audiostuborbit.mmp
+// ==============================================================================
+
+TARGET		audiostuborbit.exe
+TARGETTYPE		EXE
+
+UID		0x100039CE 0xE51D7B4B
+SECUREID		0xE51D7B4B
+
+EPOCSTACKSIZE		0x14000
+EPOCHEAPSIZE		0x020000 0x800000
+
+SOURCEPATH			. 
+START RESOURCE		audiostuborbit.rss
+LANGUAGE_IDS
+HEADER
+TARGETPATH			/resource/apps
+END
+
+SOURCEPATH			.
+START RESOURCE		audiostuborbit_reg.rss
+DEPENDS audiostuborbit.rsg
+TARGETPATH		/private/10003a3f/import/apps
+END
+
+
+// Qt Macros
+MACRO		UNICODE
+MACRO		QT_KEYPAD_NAVIGATION
+MACRO		QT_SOFTKEYS_ENABLED
+MACRO		QT_USE_MATH_H_FLOATS
+MACRO		HB_HAVE_QT_MOBILITY
+MACRO		HB_HAVE_PROTECTED_CHUNK
+MACRO		HB_TOUCHFEEDBACK_TYPE_IS_LONGPRESS
+MACRO		HB_GESTURE_FW
+MACRO		HB_EFFECTS
+MACRO		HB_TEXT_MEASUREMENT_UTILITY
+MACRO		QT_SVG_LIB
+MACRO		QT_GUI_LIB
+MACRO		QT_NETWORK_LIB
+MACRO		QT_CORE_LIB
+
+SYSTEMINCLUDE		/epoc32/include/mw/QtCore
+SYSTEMINCLUDE		/epoc32/include/mw/QtNetwork
+SYSTEMINCLUDE		/epoc32/include/mw/QtGui
+SYSTEMINCLUDE		/epoc32/include/mw/QtSvg
+SYSTEMINCLUDE		/epoc32/include/mw
+SYSTEMINCLUDE		../../../../../../../mw/qt/mkspecs/common/symbian
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/stdapis
+SYSTEMINCLUDE		/epoc32/include/stdapis/sys
+SYSTEMINCLUDE		/epoc32/include/mw/hb/hbcore
+SYSTEMINCLUDE		/epoc32/include/mw/hb/hbwidgets
+SYSTEMINCLUDE		/epoc32/include/mw/hb/hbutils
+SYSTEMINCLUDE		/epoc32/include/stdapis/stlportv5
+SYSTEMINCLUDE		/epoc32/include/platform/mw
+SYSTEMINCLUDE		/epoc32/include/platform
+SYSTEMINCLUDE		/epoc32/include/platform/loc
+SYSTEMINCLUDE		/epoc32/include/platform/mw/loc
+SYSTEMINCLUDE		/epoc32/include/platform/loc/sc
+SYSTEMINCLUDE		/epoc32/include/platform/mw/loc/sc
+SYSTEMINCLUDE		/epoc32/include/app
+SYSTEMINCLUDE		/epoc32/include/platform/app
+SYSTEMINCLUDE		/epoc32/include/platform/app/loc
+SYSTEMINCLUDE		/epoc32/include/platform/app/loc/sc
+SYSTEMINCLUDE		.
+
+SOURCEPATH 	.
+SOURCE		main.cpp
+SOURCE		audiostuborbit.cpp
+SOURCE		audioclientstubremconobserver.cpp
+SOURCE		moc_audiostuborbit.cpp
+
+
+LIBRARY		tspclientmapper.lib
+LIBRARY		remconcoreapi.lib
+LIBRARY		remconinterfacebase.lib
+LIBRARY		HbCore.lib
+LIBRARY		HbWidgets.lib
+LIBRARY		HbUtils.lib
+LIBRARY		libstdcppv5.lib
+LIBRARY		QtSvg.lib
+LIBRARY		QtGui.lib
+LIBRARY		QtNetwork.lib
+LIBRARY		QtCore.lib
+LIBRARY		libc.lib
+LIBRARY		libm.lib
+LIBRARY		euser.lib
+LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
+STATICLIBRARY	qtmain.lib
+
+CAPABILITY		ALL -TCB
+
+OPTION CW -wchar_t on
+OPTION ARMCC --visibility_inlines_hidden
+#if defined(ARMCC_4_0)
+OPTION ARMCC --import_all_vtbl
+#endif
+OPTION GCCE -fvisibility-inlines-hidden
+
+VERSION 10.0
+
+ARMFPU softvfp
+
+PAGED
+
+BYTEPAIRCOMPRESSTARGET
+
+OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl
+
+USERINCLUDE .
+
+STDCPP
+
+USERINCLUDE .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.pro	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,15 @@
+TEMPLATE = app
+TARGET = audiostuborbit
+CONFIG += hb
+HEADERS += audiostuborbit.h \
+		   audioclientstubremconobserver.h
+SOURCES += main.cpp \
+           audiostuborbit.cpp \
+           audioclientstubremconobserver.cpp
+           
+# Libs
+LIBS += -ltspclientmapper \
+		-lremconcoreapi \
+		-lremconinterfacebase
+
+symbian:TARGET.UID3 = 0xE51D7B4B
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,21 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-07-19T09:07:14
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <appinfo.rh>
+#include <audiostuborbit.loc>
+
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+	{
+	short_caption = STRING_r_short_caption;
+	caption_and_icon =
+	CAPTION_AND_ICON_INFO
+		{
+		caption = STRING_r_caption;
+		number_of_icons = 0;
+		icon_file = "";
+		};
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit_installer.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,30 @@
+; audiostuborbit_installer.pkg generated by qmake at 2010-07-19T09:07:14
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"audiostuborbit installer"},(0xA000D7CE),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+
+
+"Y:/sf/os/devicesrv/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.sis" - "c:\adm\audiostuborbit.sis"
+@"Y:/sf/mw/qt/smartinstaller.sis",(0x2002CCCD)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit_reg.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,18 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-07-19T09:07:14
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <audiostuborbit.rsg>
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xE51D7B4B
+
+RESOURCE APP_REGISTRATION_INFO
+	{
+	app_file="audiostuborbit";
+	localisable_resource_file="\\resource\\apps\\audiostuborbit";
+
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit_stub.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,27 @@
+; Y:/sf/app/audiostuborbit//audiostuborbit_stub.pkg generated by qmake at 2010-07-16T16:45:33
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"audiostuborbit"},(0xE51D7B4B),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+; Default HW/platform dependencies
+ 
+
+"" - "z:\sys\bin\audiostuborbit.exe"
+"" - "z:\resource\apps\audiostuborbit.rsc"
+"" - "z:\private\10003a3f\import\apps\audiostuborbit_reg.rsc"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit_template.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,34 @@
+; audiostuborbit_template.pkg generated by qmake at 2010-07-19T09:07:14
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"audiostuborbit"},(0xE51D7B4B),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 6, 3, {"Qt"}
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+
+; Executable and default resource files
+"/epoc32/release/$(PLATFORM)/$(TARGET)/audiostuborbit.exe"    - "!:\sys\bin\audiostuborbit.exe"
+"/epoc32/data/z/resource/apps/audiostuborbit.rsc"    - "!:\resource\apps\audiostuborbit.rsc"
+"/epoc32/data/z/private/10003a3f/import/apps/audiostuborbit_reg.rsc"    - "!:\private\10003a3f\import\apps\audiostuborbit_reg.rsc"
+
+; Manual PKG post-rules from PRO files
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* 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:  This file provides the information required for building the
+*				whole of a audioclientstub (Qt app).
+*
+*/
+
+#define BLD_INF_AUDIOSTUBORBIT
+
+
+prj_platforms
+
+WINSCW GCCE ARMV5 ARMV6
+
+
+prj_mmpfiles
+
+audiostuborbit.mmp
+
+prj_extensions
+
+START EXTENSION qt/qmake_extra_pre_targetdep.export
+OPTION PREDEP_TARGET Y:/sf/os/devicesrv/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/moc_audiostuborbit.cpp
+OPTION DEPS Y:/sf/os/devicesrv/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.h 
+OPTION COMMAND /epoc32/tools/moc.exe  -DSYMBIAN  -DUNICODE -DQT_KEYPAD_NAVIGATION -DQT_SOFTKEYS_ENABLED -DQT_USE_MATH_H_FLOATS -DHB_HAVE_QT_MOBILITY -DHB_HAVE_PROTECTED_CHUNK -DHB_TOUCHFEEDBACK_TYPE_IS_LONGPRESS -DHB_GESTURE_FW -DHB_EFFECTS -DHB_TEXT_MEASUREMENT_UTILITY -DQT_SVG_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB  -I"Y:/epoc32/include/mw/QtCore"  -I"Y:/epoc32/include/mw/QtNetwork"  -I"Y:/epoc32/include/mw/QtGui"  -I"Y:/epoc32/include/mw/QtSvg"  -I"Y:/epoc32/include/mw"  -I"Y:/sf/mw/qt/mkspecs/common/symbian"  -I"Y:/epoc32/include"  -I"Y:/epoc32/include/stdapis"  -I"Y:/epoc32/include/stdapis/sys"  -I"Y:/epoc32/include/mw/hb/hbcore"  -I"Y:/epoc32/include/mw/hb/hbwidgets"  -I"Y:/epoc32/include/mw/hb/hbutils"  -I"Y:/epoc32/include/stdapis/stlportv5"  -I"Y:/epoc32/include/platform/mw"  -I"Y:/epoc32/include/platform"  -I"Y:/epoc32/include/platform/loc"  -I"Y:/epoc32/include/platform/mw/loc"  -I"Y:/epoc32/include/platform/loc/sc"  -I"Y:/epoc32/include/platform/mw/loc/sc"  -I"Y:/epoc32/include/app"  -I"Y:/epoc32/include/platform/app"  -I"Y:/epoc32/include/platform/app/loc"  -I"Y:/epoc32/include/platform/app/loc/sc"  -I"Y:/sf/os/devicesrv/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit" -DSYMBIAN y:/sf/os/devicesrv/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/audiostuborbit.h -o y:/sf/os/devicesrv/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/moc_audiostuborbit.cpp
+END
+
+#if defined(WINSCW)
+#endif
+
+START EXTENSION qt/qmake_store_build
+END
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/main.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* 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:  Creates the Qt app and bring to foreground
+*
+*/
+
+#include "audiostuborbit.h"
+
+#include <HbApplication>
+
+int main(int argc, char *argv[])
+{
+    HbApplication a(argc, argv);
+    a.setApplicationName("audiostuborbit");
+    audiostuborbit *w = new audiostuborbit();
+    w->show();
+    int ret = a.exec();
+    delete w;
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audiostuborbit/moc_audiostuborbit.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* 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:
+*
+*/
+
+#include "audiostuborbit.h"
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#error "The header file 'audiostuborbit.h' doesn't include <QObject>."
+#elif Q_MOC_OUTPUT_REVISION != 62
+#error "This file was generated using the moc from 4.6.3. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+QT_BEGIN_MOC_NAMESPACE
+static const uint qt_meta_data_audiostuborbit[] = {
+
+ // content:
+       4,       // revision
+       0,       // classname
+       0,    0, // classinfo
+       0,    0, // methods
+       0,    0, // properties
+       0,    0, // enums/sets
+       0,    0, // constructors
+       0,       // flags
+       0,       // signalCount
+
+       0        // eod
+};
+
+static const char qt_meta_stringdata_audiostuborbit[] = {
+    "audiostuborbit\0"
+};
+
+const QMetaObject audiostuborbit::staticMetaObject = {
+    { &HbMainWindow::staticMetaObject, qt_meta_stringdata_audiostuborbit,
+      qt_meta_data_audiostuborbit, 0 }
+};
+
+#ifdef Q_NO_DATA_RELOCATION
+const QMetaObject &audiostuborbit::getStaticMetaObject() { return staticMetaObject; }
+#endif //Q_NO_DATA_RELOCATION
+
+const QMetaObject *audiostuborbit::metaObject() const
+{
+    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
+}
+
+void *audiostuborbit::qt_metacast(const char *_clname)
+{
+    if (!_clname) return 0;
+    if (!strcmp(_clname, qt_meta_stringdata_audiostuborbit))
+        return static_cast<void*>(const_cast< audiostuborbit*>(this));
+    return HbMainWindow::qt_metacast(_clname);
+}
+
+int audiostuborbit::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
+{
+    _id = HbMainWindow::qt_metacall(_c, _id, _a);
+    if (_id < 0)
+        return _id;
+    return _id;
+}
+QT_END_MOC_NAMESPACE
--- a/accessoryservices/accessoryremotecontrol/tsrc/stub/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -28,6 +28,7 @@
 PRJ_TESTMMPFILES
 ../remcon/group/remconstub.mmp
 ../phone/group/phoneclient.mmp
-../audio/group/audioclientstub.mmp
+//../audio/group/audioclientstub.mmp
+../audiostuborbit/audiostuborbit.mmp
 
 // End of file
--- a/accessoryservices/accessoryremotecontrol/tsrc/stub/remcon/src/remconstub.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/remcon/src/remconstub.cpp	Tue Aug 31 16:29:05 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/accessoryremotecontrol/tsrc/stub/rom/remconteststub.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/rom/remconteststub.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -21,9 +21,13 @@
 
 
 ECOM_PLUGIN(remconstub.dll, remconstub.rsc)
-S60_APP_EXE(audioclientstub)
-S60_APP_RESOURCE(audioclientstub)
-S60_APP_AIF_RSC(audioclientstub)
-data=DATAZ_\APP_RESOURCE_DIR\audioclientstub.mif APP_RESOURCE_DIR\audioclientstub.mif
+//S60_APP_EXE(audioclientstub)
+//S60_APP_RESOURCE(audioclientstub)
+//S60_APP_AIF_RSC(audioclientstub)
+//data=DATAZ_\APP_RESOURCE_DIR\audioclientstub.mif APP_RESOURCE_DIR\audioclientstub.mif
+
+file=ABI_DIR\UREL\audiostuborbit.exe		\sys\bin\audiostuborbit.exe
+data=DATAZ_\resource\apps\audiostuborbit.rsc	resource\apps\audiostuborbit.rsc
+data=DATAZ_\private\10003a3f\import\apps\audiostuborbit_reg.rsc		private\10003a3f\import\apps\audiostuborbit_reg.rsc
 
 #endif //__REMCOMTESTSTUB_IBY__
--- a/accessoryservices/accessoryserver/BWINS/AccPolComU.DEF	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/BWINS/AccPolComU.DEF	Tue Aug 31 16:29:05 2010 +0300
@@ -60,5 +60,6 @@
 	?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 &)
-	?RemoveIndexFromGenericIDArray@TAccPolGenericIDArrayAccessor@@SAXAAVTAccPolGenericIDArray@@H@Z @ 62 NONAME ; void TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray(class TAccPolGenericIDArray &, int)
+	?IsCapabilityDefinedL@CAccPolAccessoryPolicy@@QAEHABVTAccPolGenericID@@ABK@Z @ 62 NONAME ; int CAccPolAccessoryPolicy::IsCapabilityDefinedL(class TAccPolGenericID const &, unsigned long const &)
+	?RemoveIndexFromGenericIDArray@TAccPolGenericIDArrayAccessor@@SAXAAVTAccPolGenericIDArray@@H@Z @ 63 NONAME ; void TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray(class TAccPolGenericIDArray &, int)
 
--- a/accessoryservices/accessoryserver/EABI/AccPolComU.DEF	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/EABI/AccPolComU.DEF	Tue Aug 31 16:29:05 2010 +0300
@@ -69,5 +69,9 @@
 	_ZTV22CAccPolAccessoryPolicy @ 68 NONAME ; #<VT>#
 	_ZTV9CCapValue @ 69 NONAME ; #<VT>#
 	_ZTVN18CCapabilityStorage14CListContainerE @ 70 NONAME ; #<VT>#
-	_ZN29TAccPolGenericIDArrayAccessor29RemoveIndexFromGenericIDArrayER21TAccPolGenericIDArrayi @ 71 NONAME
+	_ZN22CAccPolAccessoryPolicy20IsCapabilityDefinedLERK16TAccPolGenericIDRKm @ 71 NONAME
+	_ZN22CAccPolAccessoryPolicyD0Ev @ 72 NONAME
+	_ZN22CAccPolAccessoryPolicyD1Ev @ 73 NONAME
+	_ZN22CAccPolAccessoryPolicyD2Ev @ 74 NONAME
+	_ZN29TAccPolGenericIDArrayAccessor29RemoveIndexFromGenericIDArrayER21TAccPolGenericIDArrayi @ 75 NONAME
 
--- a/accessoryservices/accessoryserver/inc/Common/AccPolAccessoryPolicy.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/inc/Common/AccPolAccessoryPolicy.h	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/inc/Server/AccSrvConnectionController.h	Tue Aug 31 16:29:05 2010 +0300
@@ -176,8 +176,7 @@
 *  @lib AccServer.lib
 *  @since S60 3.1
 */
-NONSHARABLE_CLASS( CAccSrvConnectionController ) : public CActive,
-                                                   public MAccSrvConnectionControllerObserver
+NONSHARABLE_CLASS( CAccSrvConnectionController ) : public MAccSrvConnectionControllerObserver
     {
     public  :// Constructors and destructor
 
@@ -297,7 +296,13 @@
 												TAccPolGenericID& aOldGenericId,
 												const CAccSrvConnectionHandler* aCaller, 
 												TInt aError  );
-        
+		
+
+		void HandleConnectionUpdateValidationL( const TAccPolGenericID& aGenericID, 
+                                                TAccPolGenericID& aOldGenericId,
+		                                        const CAccSrvSettingsHandler* aCaller, 
+		                                        TInt aError  );
+       
         
         /**
         * From MAccSrvConnectionControllerObserver
@@ -335,12 +340,6 @@
 		void SetDefaultAccessoryInformation( const TAccPolGenericID& aGenericID, 
 													 const TUint32 aDefaultValue);
 
-        /**
-        * From CActive
-        */
-        void RunL();
-        void DoCancel();
-
     protected:  // New functions
 
     protected:  // Functions from base classes
@@ -385,19 +384,8 @@
 	    TUint32                                 iInformationNoteUID;	  
 	    TUint32                                 iInformationNoteDefault;
 
-        // Indicates should accfw show notes about connected accessory. This is 
-        // set to ETrue when accessory is connected and EFalse after note is shown.
-        // The reason for this is to prevent multiple notes one after another
-        TBool                                   iShowNotes;
         CAccSrvWiredConnectionPublisher*        iWiredConnPublisher; // Owned
 
-		// Ui notifier
-		RNotifier iNotifier;
-		
-		// Response data from notifier
-		TInt iReplyValue;
-		TPckg<TInt> iReplyPck;
-	
     public:     // Friend classes
 
     protected:  // Friend classes
--- a/accessoryservices/accessoryserver/inc/Server/AccSrvServerModel.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/inc/Server/AccSrvServerModel.h	Tue Aug 31 16:29:05 2010 +0300
@@ -172,13 +172,24 @@
         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
         * @param aGenericID Generic ID of the detected accessory.
-        * @return void
+        * @return index in the array
         */
-        void RemovePhysicalConnection( const TAccPolGenericID& aGenericID );
+        TInt RemovePhysicalConnection( const TAccPolGenericID& aGenericID );
 
         /**
         * Get current connection status, ie. all active connections.
--- a/accessoryservices/accessoryserver/inc/Server/AccSrvSettingsHandler.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/inc/Server/AccSrvSettingsHandler.h	Tue Aug 31 16:29:05 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/rom/AccServer.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/rom/AccServer.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -21,20 +21,20 @@
 
 #ifdef __ACCESSORY_FW
 
-file=ABI_DIR\BUILD_DIR\AccAudioControl.dll              SHARED_LIB_DIR\AccAudioControl.dll
-file=ABI_DIR\BUILD_DIR\AccBTControl.dll                 SHARED_LIB_DIR\AccBTControl.dll
-file=ABI_DIR\BUILD_DIR\AccClient.dll                    SHARED_LIB_DIR\AccClient.dll
-file=ABI_DIR\BUILD_DIR\AccControl.dll                   SHARED_LIB_DIR\AccControl.dll
-file=ABI_DIR\BUILD_DIR\AccPolicy.dll                    SHARED_LIB_DIR\AccPolicy.dll
-file=ABI_DIR\BUILD_DIR\AccPolCom.dll                    SHARED_LIB_DIR\AccPolCom.dll
-file=ABI_DIR\BUILD_DIR\AccPolicyDB.dll                  SHARED_LIB_DIR\AccPolicyDB.dll
-file=ABI_DIR\BUILD_DIR\AccServer.exe                    PROGRAMS_DIR\AccServer.exe
-file=ABI_DIR\BUILD_DIR\AsyComms.dll                     SHARED_LIB_DIR\AsyComms.dll
-file=ABI_DIR\BUILD_DIR\AsyProxy.dll                     SHARED_LIB_DIR\AsyProxy.dll
+file=ABI_DIR\BUILD_DIR\accaudiocontrol.dll              SHARED_LIB_DIR\AccAudioControl.dll
+file=ABI_DIR\BUILD_DIR\accbtcontrol.dll                 SHARED_LIB_DIR\AccBTControl.dll
+file=ABI_DIR\BUILD_DIR\accclient.dll                    SHARED_LIB_DIR\AccClient.dll
+file=ABI_DIR\BUILD_DIR\acccontrol.dll                   SHARED_LIB_DIR\AccControl.dll
+file=ABI_DIR\BUILD_DIR\accpolicy.dll                    SHARED_LIB_DIR\AccPolicy.dll
+file=ABI_DIR\BUILD_DIR\accpolcom.dll                    SHARED_LIB_DIR\AccPolCom.dll
+file=ABI_DIR\BUILD_DIR\accpolicydb.dll                  SHARED_LIB_DIR\AccPolicyDB.dll
+file=ABI_DIR\BUILD_DIR\accserver.exe                    PROGRAMS_DIR\AccServer.exe
+file=ABI_DIR\BUILD_DIR\asycomms.dll                     SHARED_LIB_DIR\AsyComms.dll
+file=ABI_DIR\BUILD_DIR\asyproxy.dll                     SHARED_LIB_DIR\AsyProxy.dll
 file=ABI_DIR\BUILD_DIR\accsrvutil.dll                   SHARED_LIB_DIR\accsrvutil.dll
 file=ABI_DIR\BUILD_DIR\accpolaudiodevicetopology.dll	SHARED_LIB_DIR\accpolaudiodevicetopology.dll
 
-data=ZPRIVATE\100012A5\policy\10205030.spd              \private\100012A5\policy\10205030.spd
+data=ZPRIVATE\100012a5\policy\10205030.spd              \private\100012A5\policy\10205030.spd
 
 #endif // __ACCESSORY_FW
 
--- a/accessoryservices/accessoryserver/src/ASYProxy/ASYProxyAsyHandler.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/src/ASYProxy/ASYProxyAsyHandler.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -30,7 +30,7 @@
 
 // CONSTANTS
 const TInt KMinASYHeapSize      = 0x2000;
-const TInt KDefaultASYHeapSize  = 0x4000;
+const TInt KDefaultASYHeapSize  = 0x8000;
 const TInt KMaxASYHeapSize      = 0x8000;
 
 const TInt KMinASYStackSize     = 0x1000;
--- a/accessoryservices/accessoryserver/src/ASYProxy/ASYProxyCommandObserver.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/src/ASYProxy/ASYProxyCommandObserver.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -181,25 +181,28 @@
     {
     COM_TRACE_( "[AccFW:AsyProxy] CASYProxyCommandObserver::DoCancel()" );
 
-    iAsyProxyCommsSrvc->iAsyComms.CancelNotifyProcessCommand();
-
-    if ( !iInDestructionPhase )
+    if ( iAsyProxyCommsSrvc )
         {
-        COM_TRACE_( "[AccFW:AsyProxy] Proxy Command Observation is Cancelled while Destruction is not in Progress" );
-    #ifdef _DEBUG
-        TRAPD( errUpdate, iAsyProxyCommsSrvc->UpdateAsyCommsStackL() );
-        TRAPD( errCreate, iAsyProxyCommsSrvc->CreateAsyCommandHandlerL( this ) );
+        iAsyProxyCommsSrvc->iAsyComms.CancelNotifyProcessCommand();
+    
+        if ( !iInDestructionPhase )
+            {
+            COM_TRACE_( "[AccFW:AsyProxy] Proxy Command Observation is Cancelled while Destruction is not in Progress" );
+        #ifdef _DEBUG
+            TRAPD( errUpdate, iAsyProxyCommsSrvc->UpdateAsyCommsStackL() );
+            TRAPD( errCreate, iAsyProxyCommsSrvc->CreateAsyCommandHandlerL( this ) );
+            
+            COM_TRACE_1( "[AccFW:AsyProxy] CASYProxyCommandObserver::DoCancel - errUpdate == %d", errUpdate );
+            COM_TRACE_1( "[AccFW:AsyProxy] CASYProxyCommandObserver::DoCancel - errCreate == %d", errCreate );
+        #else
+            TRAP_IGNORE( iAsyProxyCommsSrvc->UpdateAsyCommsStackL() );
+            TRAP_IGNORE( iAsyProxyCommsSrvc->CreateAsyCommandHandlerL( this ) );
+        #endif
+            }
         
-        COM_TRACE_1( "[AccFW:AsyProxy] CASYProxyCommandObserver::DoCancel - errUpdate == %d", errUpdate );
-        COM_TRACE_1( "[AccFW:AsyProxy] CASYProxyCommandObserver::DoCancel - errCreate == %d", errCreate );
-    #else
-        TRAP_IGNORE( iAsyProxyCommsSrvc->UpdateAsyCommsStackL() );
-        TRAP_IGNORE( iAsyProxyCommsSrvc->CreateAsyCommandHandlerL( this ) );
-    #endif
+        iAsyProxyCommsSrvc->Destroy( KErrNotFound ); // Transaction Id is not known know
         }
-    
-    iAsyProxyCommsSrvc->Destroy( KErrNotFound ); // Transaction Id is not known know
-
+        
     COM_TRACE_( "[AccFW:AsyProxy] CASYProxyCommandObserver::DoCancel - return void" );
     }
 
--- a/accessoryservices/accessoryserver/src/ASYProxy/ASYProxyCommsService.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/src/ASYProxy/ASYProxyCommsService.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -99,7 +99,7 @@
     // Zero handler needs CASYProxyCommsStack just to get simple Active Object
     //  because CActiveScheduler will be start later in any way
 
-    CASYProxyCommandObserver* iZeroObserver = CASYProxyCommandObserver::NewL( NULL );
+    iZeroObserver = CASYProxyCommandObserver::NewL( NULL );
 
     COM_TRACE_( "[AccFW:AsyProxy] CASYProxyCommsService::ConstructL - return void" );
     }
@@ -148,7 +148,11 @@
         delete iAsyProxyCommsStack;
         iAsyProxyCommsStack = 0;
         }
-
+    if ( iZeroObserver )
+        {
+        delete iZeroObserver;
+        }
+    
     COM_TRACE_( "[AccFW:AsyProxy] CASYProxyCommsService::~CASYProxyCommsService" );
     }
 
--- a/accessoryservices/accessoryserver/src/Policy/AccPolAccessoryPolicy.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Policy/AccPolAccessoryPolicy.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -35,7 +35,11 @@
 
 // CONSTANTS
 
+#ifdef FF_AUTOMOTIVESTACK
+const TInt KAccMaxRules = 8;
+#else
 const TInt KAccMaxRules = 7;
+#endif
 
 const TInt  KAccConfigMaxCapabilityGroups = 64;
 const TInt  KAccGidIntBuf                 = 100;
@@ -80,7 +84,7 @@
     }
 
 // Destructor
-CAccPolAccessoryPolicy::~CAccPolAccessoryPolicy()
+EXPORT_C CAccPolAccessoryPolicy::~CAccPolAccessoryPolicy()
     {
     API_TRACE_( "[AccFW: ACCPOLICY] CAccPolAccessoryPolicy::~CAccPolAccessoryPolicy()" );
     
@@ -387,6 +391,9 @@
      {KPCWired,     KAccMonoAudio},
      {KPCBluetooth, KAccStereoAudio},
      {KPCBluetooth, KAccMonoAudio},
+#ifdef FF_AUTOMOTIVESTACK	 
+	 {KPCUSB,   	KAccStereoAudio},
+#endif
      {KPCWired,     0},
      {KPCBluetooth, 0}
     };
@@ -466,7 +473,11 @@
             }
         }
     else if ( gID.PhysicalConnectionCaps( KPCWired ) ||
-              gID.PhysicalConnectionCaps( KPCHDMI ) )
+              gID.PhysicalConnectionCaps( KPCHDMI )
+#ifdef FF_AUTOMOTIVESTACK
+			  || gID.PhysicalConnectionCaps ( KPCUSB )
+#endif
+			)
         {
         if( gID.DeviceTypeCaps( KDTHeadset ) )
             {
@@ -1239,4 +1250,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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -40,8 +40,6 @@
 
 // CONSTANTS
 
-const TUid KAccFwUiNoteNotifierUid = { 0x10205061 };
-
 // MACROS
 
 // LOCAL CONSTANTS AND MACROS
@@ -63,21 +61,16 @@
 // -----------------------------------------------------------------------------
 //
 CAccSrvConnectionController::CAccSrvConnectionController()
-    : CActive( EPriorityStandard ),
-      iPolicy( NULL ),
+    : iPolicy( NULL ),
       iServerModel( NULL ),
       iNotificationQueue( NULL ),
       iConnectionStatusHandler( NULL ),
       iModeHandler( NULL ),
       iASYProxyHandler( NULL ),
-      iShowNotes( EFalse ),
-      iWiredConnPublisher( NULL ),
-      iReplyPck( iReplyValue)
+      iWiredConnPublisher( NULL )
     {
     COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::CAccSrvConnectionController()" );
 
-    CActiveScheduler::Add( this );//Add the active object to the active scheduler
-
     COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::CAccSrvConnectionController - return" );
     }
 
@@ -98,7 +91,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();
 
     COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::ConstructL - return void" );
@@ -166,12 +159,6 @@
     // (used from handlers).
     iConnectionHandler.ResetAndDestroy();
     
-    if ( iNotifier.Handle() )
-        {
-        iNotifier.Close();
-        }
-    Cancel();
-
     COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::~CAccSrvConnectionController - return" );
     }
 
@@ -447,6 +434,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
 // -----------------------------------------------------------------------------
 //
@@ -622,14 +698,16 @@
     {
     COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::PromoteToConnectedL()" );
 
-    iServerModel->RemovePhysicalConnection( aGenericID ); //Move GID from physical connection array
-    iServerModel->AddConnectionL( aGenericID );            //to connection array
+    if( KErrNotFound != iServerModel->RemovePhysicalConnection( aGenericID )) //Move GID from physical connection array
+      {
+	    iServerModel->AddConnectionL( aGenericID );            //to connection array
 
-    iNotificationQueue->CompleteControlMessageL( ENewAccessoryConnected,
-                                                 KErrNone,
-                                                 aGenericID.UniqueID() );
+	    iNotificationQueue->CompleteControlMessageL( ENewAccessoryConnected,
+	                                                 KErrNone,
+	                                                 aGenericID.UniqueID() );
 
-    iConnectionStatusHandler->IssueRequest();
+	    iConnectionStatusHandler->IssueRequest();
+	  }
 
     COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::PromoteToConnectedL - return void" );
     }
@@ -728,8 +806,6 @@
                                                  KErrNotFound );
     iSettingsHandler->ConnectionStatusChangedL( genericIDArray );
 
-    // Able to show notes
-    iShowNotes = ETrue;
     iModeHandler->IssueRequest();
 
     COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::HandleConnectionStatusChangedL - return void" );
@@ -779,7 +855,6 @@
                                                   iServerModel->UniqueID() );
         }
 
-
     
 
     if( iServerModel->SetAccessoryMode( accMode, aDbId ) ) //Store accessory mode
@@ -796,96 +871,6 @@
                                                          KErrNone,
                                                          KErrNotFound );
             }
-	
-		    COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::HandleAccessoryModeChangedL - Show information note!" );			
-
-		    TBool showNote( EFalse );
-		    TInt noteValue( 0 );
-			
-		    switch ( accMode.iAccessoryMode )
-		      {
-			    case EAccModeWiredHeadset:
-			    case EAccModeWiredCarKit:
-			    case EAccModeTextDevice:
-			    case EAccModeLoopset:
-			    case EAccModeMusicStand:
-			    case EAccModeTVOut:
-			    case EAccModeHeadphones:
-			    {
-				  TAccPolGenericID genericID;
-				  iServerModel->GetLastConnectedAccessoryL( genericID );
-				  TUint32 num = genericID.SubblockCaps();
-				  if ( genericID.PhysicalConnectionCaps() != KPCHDMI ) // No info note for HDMI
-				      {
-                      if( num & KSBAudioSubblock )
-                          {
-                            CCapValue* capValue = iServerModel->CapabilityStorage().GetCapability( genericID, KAccIntegratedAudioInput );
-                            if( iInformationNoteDefault )
-                                  {
-                                  noteValue = iInformationNoteDefault;
-                                  showNote = ETrue;
-                                  }
-                            if( !capValue && !iInformationNoteDefault )
-                                  {
-                                  showNote = ETrue;
-                                  }
-                            }
-                        else
-                            {
-                            if( iInformationNoteDefault )
-                                  {
-                                  noteValue = iInformationNoteDefault;
-                                  showNote = ETrue;
-                                  }
-                            }
-				      }
-				  }
-			    break;			  
-			    default:
-			    {
-				  showNote = EFalse;				
-			    }
-			    break;
-		    }
-
-		    if ( showNote && iShowNotes )
-		        {		    	
-		        if( iServerModel->IdleDetected() )
-		            {
-                    if ( iNotifier.Handle() )
-                        {
-                        iNotifier.Close();
-                        }
-			        if( IsActive() )
-			            {
-    		            Cancel();
-    		            }
-
-			        //connect to notifier
-		            COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::HandleAccessoryModeChangedL - notifier.Connect" );
-		            TInt err = iNotifier.Connect();
-		            if(err != KErrNone)
-		                {
-		                //ok if cannot show note, this is possible during boot
-		                COM_TRACE_1( "[AccFW:AccServer] CAccSrvConnectionController::HandleAccessoryModeChangedL - Couldn't connect to notifier: err = %d", err);	
-		                }
-		            else
-		                {
-		                TPckg<TInt> valuePckg( noteValue );
-		                iStatus = KRequestPending;
-                        iNotifier.StartNotifierAndGetResponse( 
-                                        iStatus, 
-                                        KAccFwUiNoteNotifierUid, 
-                                        valuePckg, 
-                                        iReplyPck);
-                        SetActive();
-    		            }
-    		        }
-		        //reset values
-	            iShowNotes = EFalse;
-			    iInformationNoteUID = 0;
-			    iInformationNoteDefault = 0;			      
-    		    }
         }        
     else
         {
@@ -911,28 +896,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CAccSrvConnectionController::RunL
-// -----------------------------------------------------------------------------
-//
-void CAccSrvConnectionController::RunL()
-    {
-    COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::RunL()" );
-    
-    iNotifier.Close();
-    }
-
-// -----------------------------------------------------------------------------
-// CAccSrvConnectionController::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CAccSrvConnectionController::DoCancel()
-    {
-    COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::DoCancel()" );
-
-    COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::DoCancel - return void" );
-    }
-
-// -----------------------------------------------------------------------------
 // CAccSrvConnectionController::RegisterControlMessageL
 // -----------------------------------------------------------------------------
 //
--- a/accessoryservices/accessoryserver/src/Server/AccSrvConnectionHandler.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvConnectionHandler.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -238,7 +238,6 @@
     TBool aUpdatedConnection )
     {
     COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling()" );
-    #define UNMASK_LINE_OUT(selectionListBitmask)  (selectionListBitmask & (~KASLineOut))
 
     iGenericID = aGenericID;
     iConnectionUpdate = aUpdatedConnection;
@@ -247,96 +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
-	    			selectionListBitmask = UNMASK_LINE_OUT(selectionListBitmask);
-		    		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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvServerModel.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -316,7 +316,7 @@
 // CAccSrvServerModel::RemovePhysicalConnectionL
 // -----------------------------------------------------------------------------
 //
-void CAccSrvServerModel::RemovePhysicalConnection( const TAccPolGenericID& aGenericID )
+TInt CAccSrvServerModel::RemovePhysicalConnection( const TAccPolGenericID& aGenericID )
     {
     COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::RemovePhysicalConnection()" );
 
@@ -329,7 +329,9 @@
         iPhysicalConnectionArray.Remove( index );
         }
 
-    COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::RemovePhysicalConnection - return void" );
+    COM_TRACE_1( "[AccFW:AccServer] CAccSrvServerModel::RemovePhysicalConnection - return %d", index );
+
+	return index;
     }
 
 // -----------------------------------------------------------------------------
@@ -501,6 +503,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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp	Tue Aug 31 16:29:05 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 );
@@ -264,7 +268,7 @@
     l.Val( temp );
     settings = static_cast< TUint32 >( temp );
 
-	CleanupStack::PopAndDestroy ( &session );
+    CleanupStack::PopAndDestroy ( &session );
     CleanupStack::PopAndDestroy ( buf );
 
     COM_TRACE_1( "[AccFW:AccServer] CAccSrvSettingsHandler::GetSupportedHWDevicesL() - return %d", settings );
@@ -286,7 +290,8 @@
 
     // Valid settings
     TUint32 settings = ResolveNewSettingsL( aSettings, aEnable, aForce );
-
+    TUint32 iOldDeviceType = iModel.DeviceType();
+    
     // Update model
     iModel.SetDeviceType( settings );
 
@@ -297,6 +302,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/AccSrvSubControl.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvSubControl.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -235,12 +235,18 @@
             }
         else
             {
-            err = notifier.StartNotifier( KAccFwUiNoteNotifierUid, KNullDesC8 );
-            if ( err != KErrNone )
-                {
-                COM_TRACE_1( "[AccFW:AccServer] CAccSrvSubControl::ConnectAccessoryL - Couldn't start notifier: err = %d", err);	
-                }
-            notifier.Close();
+            TPckg<TInt>iReplyPck(0);
+			TRequestStatus iStatus =KRequestPending;
+			notifier.StartNotifierAndGetResponse(iStatus,
+						KAccFwUiNoteNotifierUid,
+						KNullDesC8,iReplyPck);
+			User::WaitForRequest(iStatus);
+			err = iStatus.Int();
+			if(KErrNone != err) 
+				{
+				COM_TRACE_1( "[AccFW:AccServer] CAccSrvSubControl::ConnectAccessoryL - Couldn't start notifier: err = %d", err);				
+				}
+			notifier.Close();
             }
 	    }
     else
--- a/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/inc/TfAccessoryTestControlTypes.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/inc/TfAccessoryTestControlTypes.h	Tue Aug 31 16:29:05 2010 +0300
@@ -206,7 +206,10 @@
     ETFAsyConnectOpenCable3Poles,
     ETFAsyConnUSB,
     ETFAsyConnUSB2,
-    ETFAsyConnHDMI
+    ETFAsyConnHDMI,    
+#ifdef FF_AUTOMOTIVESTACK
+    ETFAsyRTPStreamingConn
+#endif
     };
 
 
--- a/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/src/TfAccessoryTestControlPlugin.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/src/TfAccessoryTestControlPlugin.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -26,7 +26,9 @@
 #include "CtfAccessoryTestCaseControl.h"
 #include <AccPolProprietaryNameValuePairs.h>
 
-
+#ifdef FF_AUTOMOTIVESTACK
+#include <autoaudiopskeys.h>
+#endif
 
 //M10703 KAccAudioOutConnector
 
@@ -43,6 +45,9 @@
 static void PolicyModuleTestSuiteL( CTFATestSuite* aSuite );
 static void UsbObjectModuleTestSuiteL( CTFATestSuite* aSuite );
 static void HdmiObjectModuleTestSuiteL( CTFATestSuite* aSuite );
+#ifdef FF_AUTOMOTIVESTACK
+static void AutoAudioAsyModuleTestSuiteL( CTFATestSuite* aSuite );
+#endif
 
 //
 // [M10101] [[AccServer] Open And Close Accessory Connection]
@@ -1545,6 +1550,7 @@
     { ETFAccessoryConnection_Close,                       0, 0,              0, 0, 0, 10807, ETFAsyNone, ReqAccRequestNone,                         KErrNone, 0},
     };
 
+#if 0
 //
 // [M10808] [[AccServer] Set TTY Mode After Connection]
 //
@@ -1568,8 +1574,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 +1715,7 @@
     { ETFAccessorySettings_Close,      0, 0,      0,          0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
     };
 
+#endif
 //
 // [M10812] [[AccServer] Accessory Mode Settings (TInt)]
 //
@@ -2218,11 +2311,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) ****************************/
 /************************                                            ****************************/
@@ -2538,7 +2631,86 @@
     { ETFCheckHdmiObject, 0, EAccPolHdmiVideoFormatObject,       0, 0, 0, 11306, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
     };
 
+#ifdef FF_AUTOMOTIVESTACK
+/************************                                             ****************************/
+/************************  AutoAudio ASY related testcases ****************************/
+/************************                                             ****************************/
 
+//
+// [M11401] AccServer [ Connect RTP streaming device ]
+//
+
+const TTFAccessoryTestCaseStateControl KTFConnectRTPStreamingDeviceStates[]=
+    {
+    { ETFAccessorySingleConnection_Open,        0, 0, 0,     0,                         0, 11401, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 0},
+    { ETFAccessoryNotifyNewAccessoryConnected,  0, 0, 0,     0,                         0, 11401, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 1000000},
+    { ETFConnectWiredAccessory,                 0, EAudioConnectionStatusUnidirectional, 0,     0,           0, 11401, ETFAsyRTPStreamingConn, ReqAccRequestNone,              KErrNone, 2000000},
+    { ETFFindAndCheckRequest,                   0, 0, 0,     0,                         0, 11401, ETFAsyNone,     ReqNotifyNewAccessoryConnected, KErrNone, 0},
+    { ETFCheckCapability,                       0, 0, ETrue, KAccAudioOutputType,       0, 11401, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 0},
+    { ETFCheckCapability,                       0, 0, ETrue, KAccStereoAudio,           0, 11401, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 0},
+    { ETFCheckCapability,                       0, 0, ETrue, KAccIntegratedAudioOutput, 0, 11401, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 0},
+    { ETFCheckCapability,                       0, 0, ETrue, KAccRTPStreaming,          0, 11401, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 0},
+    { ETFAccessoryNotifyAccessoryDisconnected,  0, 0, 0,     0,                         0, 11401, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 2000000},
+    { ETFDisconnectWiredAccessory,              0, EAudioConnectionStatusNone, 0,     0,                     0, 11401, ETFAsyRTPStreamingConn,     ReqAccRequestNone,              KErrNone, 2000000},
+    { ETFFindAndCheckRequest,                   0, 0, 0,     0,                         0, 11401, ETFAsyNone,     ReqNotifyAccessoryDisconnected, KErrNone, 0},
+
+    { ETFClearStack,                            0, 0, 0,     0,                         0, 11401, ETFAsyNone,             ReqAccRequestNone,              KErrNone, 0},
+        
+    { ETFAccessorySingleConnection_Close,       0, 0, 0,     0,                         0, 11401, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 0},
+    };
+
+//
+// [M11402] [[AccServer] [RTP Streaming device Accessory Mode]
+//
+const TTFAccessoryTestCaseStateControl KTFRTPStreamingAccessoryModeStates[]=
+    {
+    { ETFAccessoryMode_Open,                 0, 0,         0, 0,          0, 11402, ETFAsyNone,          ReqAccRequestNone,             KErrNone, 1000000},
+    { ETFAccessoryNotifyAccessoryModeChanged,0, 0,         0, 0,          0, 11402, ETFAsyNone,          ReqAccRequestNone,             KErrNone, 1000000},
+    { ETFConnectWiredAccessory,              0, EAudioConnectionStatusUnidirectional, 0, 0,    0, 11402, ETFAsyRTPStreamingConn, ReqAccRequestNone,              KErrNone, 2000000},
+    { ETFFindAndCheckRequest,                0, 3,         0, 0,          0, 11402, ETFAsyNone,          ReqNotifyAccessoryModeChanged, KErrNone, 1000000},
+    { ETFClearStack,                         0, 0,         0, 0,          0, 11402, ETFAsyNone,          ReqAccRequestNone,             KErrNone, 1000000},
+    { ETFDisconnectWiredAccessory,           0, EAudioConnectionStatusNone, 0,     0,          0, 11402, ETFAsyRTPStreamingConn,     ReqAccRequestNone,              KErrNone, 2000000},
+    { ETFAccessoryMode_Close,                0, 0,         0, 0,          0, 11402, ETFAsyNone,          ReqAccRequestNone,             KErrNone, 1000000},
+    };
+
+//
+// [M11403] AccServer [ Improper publish of RTP Streaming status ]
+//
+const TTFAccessoryTestCaseStateControl KTFConnectRTPStreamingDeviceStates1[]=
+    {
+    { ETFAccessorySingleConnection_Open,        0, 0, 0,     0,                         0, 11403, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 0},
+    { ETFAccessoryNotifyNewAccessoryConnected,  0, 0, 0,     0,                         0, 11403, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 1000000},
+    { ETFConnectWiredAccessory,                 0, EAudioConnectionStatusNone, 0,     0,           0, 11403, ETFAsyRTPStreamingConn, ReqAccRequestNone,              KErrNone, 2000000},
+    { ETFFindAndCheckRequest,                   0, 0, 0,     0,                         0, 11403, ETFAsyNone,     ReqNotifyNewAccessoryConnected, KErrNone, 0},        
+    { ETFConnectWiredAccessory,                 0, EAudioConnectionStatusBidirectional, 0,     0,           0, 11403, ETFAsyRTPStreamingConn, ReqAccRequestNone,              KErrNone, 2000000},            
+    { ETFFindAndCheckRequest,                   0, 0, 0,     0,                         0, 11403, ETFAsyNone,     ReqNotifyNewAccessoryConnected, KErrNone, 0},
+    { ETFCancelNotifyNewAccessoryConnected,     0, 0, 0,     0,                         0, 11403, ETFAsyNone,          ReqAccRequestNone,              KErrNone, 0},
+
+    { ETFClearStack,                            0, 0, 0,     0,                         0, 11403, ETFAsyNone,             ReqAccRequestNone,              KErrNone, 0},
+        
+    { ETFAccessorySingleConnection_Close,       0, 0, 0,     0,                         0, 11403, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 0},
+    };
+
+//
+// [M11404] AccServer [ Publish Improper And Connect RTP streaming device ]
+//
+const TTFAccessoryTestCaseStateControl KTFConnectRTPStreamingDeviceStates2[]=
+    {
+    { ETFAccessorySingleConnection_Open,        0, 0, 0,     0,                         0, 11404, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 0},
+    { ETFAccessoryNotifyNewAccessoryConnected,  0, 0, 0,     0,                         0, 11404, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 1000000},
+    { ETFConnectWiredAccessory,                 0, EAudioConnectionStatusBidirectional, 0,     0,           0, 11404, ETFAsyRTPStreamingConn, ReqAccRequestNone,              KErrNone, 2000000},            
+    { ETFConnectWiredAccessory,                 0, EAudioConnectionStatusUnidirectional, 0,     0,           0, 11404, ETFAsyRTPStreamingConn, ReqAccRequestNone,              KErrNone, 3000000},        
+    { ETFFindAndCheckRequest,                   0, 0, 0,     0,                         0, 11404, ETFAsyNone,     ReqNotifyNewAccessoryConnected, KErrNone, 0},
+    { ETFAccessoryNotifyAccessoryDisconnected,  0, 0, 0,     0,                         0, 11404, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 2000000},
+    { ETFDisconnectWiredAccessory,              0, EAudioConnectionStatusNone, 0,     0,                     0, 11404, ETFAsyRTPStreamingConn,     ReqAccRequestNone,              KErrNone, 2000000},
+    { ETFFindAndCheckRequest,                   0, 0, 0,     0,                         0, 11404, ETFAsyNone,     ReqNotifyAccessoryDisconnected, KErrNone, 0},
+
+    { ETFClearStack,                            0, 0, 0,     0,                         0, 11404, ETFAsyNone,             ReqAccRequestNone,              KErrNone, 0},
+        
+    { ETFAccessorySingleConnection_Close,       0, 0, 0,     0,                         0, 11404, ETFAsyNone,     ReqAccRequestNone,              KErrNone, 0},
+    };
+
+#endif // FF_AUTOMOTIVESTACK
 /*****************************             *********************************/
 /*****************************  End Tests  *********************************/
 /*****************************             *********************************/
@@ -2587,6 +2759,10 @@
             TF_ADD_TEST_SUITE_FUNCTION_L( _L( "Policy Tests" ),                     PolicyModuleTestSuiteL );
             TF_ADD_TEST_SUITE_FUNCTION_L( _L( "USB Object Tests" ),                 UsbObjectModuleTestSuiteL );
             TF_ADD_TEST_SUITE_FUNCTION_L( _L( "HDMI Object Tests" ),                HdmiObjectModuleTestSuiteL );
+#ifdef FF_AUTOMOTIVESTACK
+            TF_ADD_TEST_SUITE_FUNCTION_L( _L( "AutoAudio ASY Tests" ),              AutoAudioAsyModuleTestSuiteL );
+#endif
+            
         TF_END_TEST_SUITE();
     TF_END_TEST_DECLARATION();
     }
@@ -2767,6 +2943,14 @@
     TF_ACCESSORY_SERVER_CONTROL_TEST_CASE_L( 11304, KTFGetHDMIVideoFormatStates );
     TF_ACCESSORY_SERVER_CONTROL_TEST_CASE_L( 11305, KTFNotifyHDMIVideoFormatChangedStates );
     TF_ACCESSORY_SERVER_CONTROL_TEST_CASE_L( 11306, KTCheckHdmiObjectsStates );
+
+/************************  AutoAudio related testcases (RTPStreaming) ****************************/
+#ifdef FF_AUTOMOTIVESTACK
+    TF_ACCESSORY_SERVER_CONTROL_TEST_CASE_L( 11401, KTFConnectRTPStreamingDeviceStates );
+    TF_ACCESSORY_SERVER_CONTROL_TEST_CASE_L( 11402, KTFRTPStreamingAccessoryModeStates );
+    TF_ACCESSORY_SERVER_CONTROL_TEST_CASE_L( 11403, KTFConnectRTPStreamingDeviceStates1 );
+    TF_ACCESSORY_SERVER_CONTROL_TEST_CASE_L( 11404, KTFConnectRTPStreamingDeviceStates2 );
+#endif 
     
     TF_END_STUB_TEST_CASES();
     }
@@ -2891,6 +3075,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 +3112,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]"));
@@ -2953,8 +3141,7 @@
 {
     TF_INIT_TEST_SUITE_FUNCTION( aSuite );
 
-    TF_ADD_TEST_CASE_L( 11201, _L( "[M11201] [[AccServer] Connect USB headset] "));
-    TF_ADD_TEST_CASE_L( 11202, _L( "[M11202] [[AccServer] Get and Set USB headset audio streams format parameter] "));   
+    
     TF_ADD_TEST_CASE_L( 11203, _L( "[M11203] [[AccServer] Get USB audio units (Audio Topology) ] "));   
     TF_ADD_TEST_CASE_L( 11204, _L( "[M11204] [[AccServer] Set/Get volume control] "));   
     TF_ADD_TEST_CASE_L( 11205, _L( "[M11205] [[AccServer] Set/Get mute control] "));   
@@ -2962,6 +3149,8 @@
     TF_ADD_TEST_CASE_L( 11207, _L( "[M11207] [[AccServer] Cancel accessory object value changed notify]"));
     TF_ADD_TEST_CASE_L( 11208, _L( "[M11208] [[AccServer] Accessory object value changed notify]"));
     TF_ADD_TEST_CASE_L( 11209, _L( "[M11209] [[AccServer] Accessory object value changed notify and cancel]"));
+	TF_ADD_TEST_CASE_L( 11201, _L( "[M11201] [[AccServer] Connect USB headset] "));
+    TF_ADD_TEST_CASE_L( 11202, _L( "[M11202] [[AccServer] Get and Set USB headset audio streams format parameter] "));   
 }
 
 static void HdmiObjectModuleTestSuiteL( CTFATestSuite* aSuite )
@@ -2976,5 +3165,16 @@
     TF_ADD_TEST_CASE_L( 11306, _L( "[M11306] [[AccServer] Check HDMI objects] "));
 }
 
+#ifdef FF_AUTOMOTIVESTACK
+static void AutoAudioAsyModuleTestSuiteL( CTFATestSuite* aSuite )
+    {
+    TF_INIT_TEST_SUITE_FUNCTION( aSuite );
+    TF_ADD_TEST_CASE_L( 11401, _L( "[M11401] [[AccServer] Connect RTP Streaming device] "));
+    TF_ADD_TEST_CASE_L( 11402, _L( "[M11402] [[AccServer] RTP Streaming device Accessory Mode] "));
+    TF_ADD_TEST_CASE_L( 11403, _L( "[M11403] [[AccServer] Improper publish of RTP Streaming status] "));
+    TF_ADD_TEST_CASE_L( 11404, _L( "[M11404] [[AccServer] Publish Improper And Connect RTP streaming device] "));
+    }
+#endif
+
 // End of File
 
--- a/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envrecall.cmd	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envrecall.cmd	Tue Aug 31 16:29:05 2010 +0300
@@ -55,7 +55,7 @@
 call sbs -c armv5 EXPORT
 call sbs -c winscw EXPORT
 REM call abld build accessoryadaptation
-call sbs -p accessoryadaptation
+call sbs -p accessoryadaptation.mmp
 popd
 @echo build accessoryadaptation... Finished
 
--- a/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envsetup.cmd	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envsetup.cmd	Tue Aug 31 16:29:05 2010 +0300
@@ -22,8 +22,8 @@
 REM call bldmake bldfiles
 REM call abld makefile btaudiomanclient
 REM call abld reallyclean btaudiomanclient
-call sbs -p btaudiomanclient -c armv5 REALLYCLEAN
-call sbs -p btaudiomanclient -c winscw REALLYCLEAN
+call sbs -p btaudiomanclient.mmp -c armv5 CLEAN
+call sbs -p btaudiomanclient.mmp -c winscw CLEAN
 popd
 @echo Cleaning BT Audioman Client... Finished
 
@@ -33,8 +33,8 @@
 REM call bldmake bldfiles
 REM call abld makefile 
 REM call abld reallyclean
-call sbs -c armv5 REALLYCLEAN
-call sbs -c winscw REALLYCLEAN
+call sbs -c armv5 CLEAN
+call sbs -c winscw CLEAN
 popd
 @echo Cleaning accfwuinotifier... Finished
 
@@ -44,8 +44,8 @@
 REM call bldmake bldfiles
 REM call abld makefile accessoryadaptation
 REM call abld clean accessoryadaptation
-call sbs -p accessoryadaptation -c armv5 CLEAN
-call sbs -p accessoryadaptation -c winscw CLEAN
+call sbs -p accessoryadaptation.mmp -c armv5 CLEAN
+call sbs -p accessoryadaptation.mmp -c winscw CLEAN
 popd
 @echo Cleaning accessoryadaptation... Finished
 
@@ -54,8 +54,8 @@
 pushd \sf\os\devicesrv\accessoryservices\pluggeddisplay\pluggeddisplayasy\group
 REM call bldmake bldfiles
 REM call abld reallyclean
-call sbs -c armv5 REALLYCLEAN
-call sbs -c winscw REALLYCLEAN
+call sbs -c armv5 CLEAN
+call sbs -c winscw CLEAN
 popd
 @echo Cleaning Plugged Display ASY... Finished
 
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/AsyStub/group/AsyStub.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/AsyStub/group/AsyStub.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -40,7 +40,7 @@
 // System include macro
 OS_LAYER_SYSTEMINCLUDE
 SYSTEMINCLUDE   ../../../AccessoryTestControl/dsytfcore/inc
-
+SYSTEMINCLUDE   ../../../../../../../../inc
 // The resource name should be same as the second UID above
 
 SOURCEPATH      ../data
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/AsyStub/src/AsyStubService.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/AsyStub/src/AsyStubService.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -27,6 +27,10 @@
 #include <accpolobjecttypes.h>
 #include <s32mem.h>
 #include <accpolhdmiobjectcon.h>
+#include <accessoryservicesinternalpskeys.h>
+#ifdef FF_AUTOMOTIVESTACK
+#include <autoaudiopskeys.h>
+#endif
 
 // ----------------------------------------------------------------------------------
 // CASYStubService::CASYStubService() 
@@ -123,6 +127,10 @@
             break;
 
         case ETFAsyConnOpenCable:
+            {            
+            }
+            break;
+//        case ETFAsyConnOpenCable:
         case ETFAsyConnectOpenCable3Poles:
             {
             TRequestStatus status;
@@ -140,7 +148,7 @@
             TBuf<KHWModelIDMaxLength> HWModelID( _L("opencable"));
 
             //Set GenericID header
-            iGenericIDHeader.iAccessoryDeviceType = KDTAVDevice;
+            iGenericIDHeader.iAccessoryDeviceType = KDTHeadset;
             iGenericIDHeader.iPhysicalConnection = KPCWired;
             iGenericIDHeader.iApplicationProtocol = 0x0;
 
@@ -170,7 +178,7 @@
                 nameValueArray );
             nameValueArray.Close();
 
-            iAccessoryControl.ConnectAccessory( status, genericID, ETrue );
+            iAccessoryControl.ConnectAccessory( status, genericID, EFalse );
             User::WaitForRequest( status );
             TInt retval = status.Int();
 
@@ -311,7 +319,7 @@
                 nameValueArray );
             nameValueArray.Close();
 
-            iAccessoryControl.ConnectAccessory( status, genericID, ETrue );
+            iAccessoryControl.ConnectAccessory( status, genericID, EFalse );
             User::WaitForRequest( status );
             TInt retval = status.Int();
 
@@ -377,7 +385,7 @@
                 nameValueArray );
             nameValueArray.Close();
 
-            iAccessoryControl.ConnectAccessory( status, genericID, ETrue );
+            iAccessoryControl.ConnectAccessory( status, genericID, EFalse );
             User::WaitForRequest( status );
             TInt retval = status.Int();
 
@@ -846,6 +854,20 @@
 
             break;
             }
+#ifdef FF_AUTOMOTIVESTACK           
+        case ETFAsyRTPStreamingConn:
+            {
+            RProperty property;          
+            CleanupClosePushL ( property );
+            COMPONENT_TRACE( ( _L( "ASYSTUB - CTFTestControlObserver::Service - Attaching to RTP streaming key" ) ) );
+            User::LeaveIfError ( property.Attach ( KPSUidAccessoryServices, KPSAutoKeyRTPStreamingConnectionStatus ) );
+            COMPONENT_TRACE( ( _L( "ASYSTUB - CTFTestControlObserver::Service - publishing to RTP streaming key" ) ) );                        
+            User::LeaveIfError ( property.Set ( aParam1 ) );
+            CleanupStack::PopAndDestroy (); // property
+            }
+            break;
+#endif
+            
         default:
 
             COMPONENT_TRACE( ( _L( "ASYSTUB - CASYStubService::Service - Subscribe destination is WIRELESS ASY" ) ) );
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp	Tue Aug 31 16:29:05 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;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/data/2002F9A3.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* 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:  Resource definitions for project autoaudioasy
+*
+*/
+#include <ecom/registryinfov2.rh>
+#include "AsyServiceUids.h"
+
+// Declares info for two implementations
+RESOURCE REGISTRY_INFO autoaudioasy
+    {
+    // UID for the DLL.
+    resource_format_version = RESOURCE_FORMAT_VERSION_2;
+    dll_uid = 0x2002F9A3;
+    interfaces = 
+        {
+        INTERFACE_INFO
+            {
+            // UID of interface that is implemented
+            interface_uid = KACCESSORYPLUGINAPIUID;
+            implementations = 
+                {
+                IMPLEMENTATION_INFO
+                    {
+                    implementation_uid = 0x2002F9A4;
+                    version_no         = 1;
+                    display_name       = "0x2002F9A3";
+                    default_data       = KACCESSORYPLUGINAPIMAINSERVICE;
+                    opaque_data        = "autoaudioasy";
+                    rom_only           = 1;
+                    }
+                };
+            }
+        };
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/group/autoaudioasy.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* 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:  Project definition file for project usbaudioasy
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET          autoaudioasy.dll
+TARGETTYPE      PLUGIN
+VENDORID        VID_DEFAULT
+
+// ECom Dll recognition UID followed by the unique UID for this dll
+UID             0x10009D8D 0x2002F9A3
+
+CAPABILITY      CAP_ECOM_PLUGIN 
+
+SOURCEPATH      ../src
+SOURCE          autoaudioasyproxy.cpp
+SOURCE          cautoaudioasymainservicebase.cpp
+SOURCE          cautoaudioasypropertyobserver.cpp
+SOURCE          cautoaudioasyservice.cpp
+
+USERINCLUDE     ../inc
+
+SYSTEMINCLUDE 	../../../inc
+OS_LAYER_SYSTEMINCLUDE
+
+// The resource name should be same as the second UID above
+SOURCEPATH      ../data
+START RESOURCE  2002F9A3.rss
+TARGET          autoaudioasy.rsc
+END
+
+LIBRARY euser.lib 
+LIBRARY estor.lib
+LIBRARY	ASYProxy.lib
+LIBRARY	accclient.lib
+LIBRARY	acccontrol.lib
+LIBRARY	accpolicy.lib
+LIBRARY	accpolcom.lib
+LIBRARY	accsrvutil.lib
+
+MACRO             API_TRACE_FLAG
+MACRO             COMPONENT_TRACE_FLAG
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* 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:  Build information file for project AUTO Audio ASY
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+../group/autoaudioasy.mmp
+
+PRJ_TESTMMPFILES
+
+PRJ_EXPORTS
+../rom/autoaudioasy.iby   CORE_OS_LAYER_IBY_EXPORT_PATH(autoaudioasy.iby)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/inc/acc_debug.h	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,258 @@
+/*
+* 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:  Macro definitions for tracing and debugging purposes.
+*
+*/
+
+
+#ifndef ACC_DEBUG_H
+#define ACC_DEBUG_H
+
+#ifdef _DEBUG
+
+// INCLUDES
+#include <e32svr.h>
+
+// CONSTANTS
+_LIT( KComponent, "[AccFW:Component]" );
+_LIT( KThisFile,  "[AccFW:Component] - Trace this file: %s, line: %d, compiled: %s %s" );
+_LIT( KAssertion, "[AccFW:Component] - Assertion failed: File: %s, line: %d, compiled: %s %s" );
+_LIT( KPanic,     "[AccFW:Component] - Panic occurred: File: %s, line: %d, compiled: %s %s" );
+_LIT( KMystic,    "[AccFW:Component] - Mystic failure: File: %s, line: %d, compiled: %s %s" );
+_LIT8( KDATE, __DATE__ );
+_LIT8( KTIME, __TIME__ );
+
+const TInt KTraceMaxSize = 256;
+
+// DATA TYPES
+enum TTraceType
+    {
+    ETraceInit,
+    ETraceAssert,
+    ETracePanic
+    };
+
+// INLINE FUNCTIONS
+
+    // -----------------------------------------------------------------------------
+    // ThisFileFunc
+    // -----------------------------------------------------------------------------
+    inline void ThisFileFunc( const TDesC8& aFile,
+                              TInt aLine,
+                              TTraceType aType = ETraceInit )
+        {
+        HBufC* fileBuf = HBufC::New( aFile.Length() + 1 );
+        HBufC* dateBuf = HBufC::New( 32 );
+        HBufC* timeBuf = HBufC::New( 32 );
+
+        if ( fileBuf != NULL && dateBuf != NULL && timeBuf != NULL )
+            {
+            fileBuf->Des().Copy( aFile );
+            timeBuf->Des().Copy( KTIME );
+            dateBuf->Des().Copy( KDATE );
+
+            if ( aType == ETraceInit )
+                {
+                RDebug::Print( KThisFile,
+                               fileBuf->Des().PtrZ(),
+                               aLine,
+                               dateBuf->Des().PtrZ(),
+                               timeBuf->Des().PtrZ() );
+                }
+
+            else if ( aType == ETraceAssert )
+                {
+                RDebug::Print( KAssertion,
+                               fileBuf->Des().PtrZ(),
+                               aLine,
+                               dateBuf->Des().PtrZ(),
+                               timeBuf->Des().PtrZ() );
+                }
+
+            else if ( aType == ETracePanic )
+                {
+                RDebug::Print( KPanic,
+                               fileBuf->Des().PtrZ(),
+                               aLine,
+                               dateBuf->Des().PtrZ(),
+                               timeBuf->Des().PtrZ() );
+                }
+
+            else
+                {
+                RDebug::Print( KMystic,
+                               fileBuf->Des().PtrZ(),
+                               aLine,
+                               dateBuf->Des().PtrZ(),
+                               timeBuf->Des().PtrZ() );
+                }
+            }
+
+        else
+            {
+            RDebug::Print( _L( "Assertion and memory allocation failed!" ) );
+            }
+
+        delete fileBuf;
+        delete dateBuf;
+        delete timeBuf;
+        }
+
+    // -----------------------------------------------------------------------------
+    // TraceAssertFunc
+    // -----------------------------------------------------------------------------
+    inline void TraceAssertFunc( const TDesC8& aFile, TInt aLine )
+        {
+        ThisFileFunc( aFile, aLine, ETraceAssert );
+        }
+
+    // -----------------------------------------------------------------------------
+    // TracePanicFunc
+    // -----------------------------------------------------------------------------
+    inline void TracePanicFunc( const TDesC8& aFile, TInt aLine )
+        {
+        ThisFileFunc( aFile, aLine, ETracePanic );
+        User::Panic( KComponent, KErrGeneral );
+        }
+
+// MACROS
+    #define PANIC_IF_FALSE( a ) if ( !( a ) )\
+            TracePanicFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ )
+
+    #define PANIC_IF_TRUE( a ) if ( ( a ) )\
+            TracePanicFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ )
+
+    #define PANIC_ALWAYS\
+            TracePanicFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ )
+
+    // -----------------------------------------------------------------------------
+    // COMPONENT_TRACE_FLAG
+    // -----------------------------------------------------------------------------
+    #ifdef COMPONENT_TRACE_FLAG
+
+        #define COMPONENT_TRACE_THIS_FILE\
+            ThisFileFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ )
+
+        #define COM_TRACE_( AAA ) do\
+            { _LIT( logStr, AAA ); RDebug::Print( logStr ); } while ( 0 )
+
+        #define COM_TRACE_1( AAA, BBB ) do\
+             { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB ); } while ( 0 )
+
+        #define COM_TRACE_2( AAA, BBB, CCC ) do\
+             { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC ); } while ( 0 )
+
+        #define COM_TRACE_3( AAA, BBB, CCC, DDD ) do\
+             { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD ); } while ( 0 )
+
+        #define COM_TRACE_4( AAA, BBB, CCC, DDD, EEE ) do\
+             { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD, EEE ); } while ( 0 )
+
+        #define COM_TRACE_RAW_( AAA ) do\
+            { RDebug::RawPrint( AAA ); } while ( 0 )
+            
+        #define COM_TRACE_RAW_1( AAA, BBB ) do\
+             { _LIT( logStr, AAA ); TBuf<KTraceMaxSize> buffer; buffer.Append( logStr ); buffer.Append( BBB );\
+             RDebug::RawPrint( buffer ); } while ( 0 )
+        
+    #else
+
+        #define COMPONENT_TRACE_THIS_FILE
+
+        #define COM_TRACE_( AAA )
+        #define COM_TRACE_1( AAA, BBB )
+        #define COM_TRACE_2( AAA, BBB, CCC )
+        #define COM_TRACE_3( AAA, BBB, CCC, DDD )
+        #define COM_TRACE_4( AAA, BBB, CCC, DDD, EEE )
+        #define COM_TRACE_RAW_( AAA )
+        #define COM_TRACE_RAW_1( AAA, BBB )
+
+    #endif // COMPONENT_TRACE_FLAG
+
+    #define TRACE_ASSERT( a ) if ( !( a ) )\
+            TraceAssertFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ )
+
+    #define TRACE_ASSERT_RETURN( a ) if ( !( ( a ) == KErrNone ) )\
+            TraceAssertFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ )
+
+    #define TRACE_ASSERT_ALWAYS\
+            TraceAssertFunc( TPtrC8( ( TText8* ) __FILE__ ), __LINE__ )
+
+    // -----------------------------------------------------------------------------
+    // API_TRACE_FLAG
+    // -----------------------------------------------------------------------------
+    #ifdef API_TRACE_FLAG
+
+        #define API_TRACE_( AAA ) do\
+            { _LIT( logStr, AAA ); RDebug::Print( logStr ); } while ( 0 )
+
+        #define API_TRACE_1( AAA, BBB ) do\
+             { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB ); } while ( 0 )
+
+        #define API_TRACE_2( AAA, BBB, CCC ) do\
+             { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC ); } while ( 0 )
+
+        #define API_TRACE_3( AAA, BBB, CCC, DDD ) do\
+             { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD ); } while ( 0 )
+
+        #define API_TRACE_4( AAA, BBB, CCC, DDD, EEE ) do\
+             { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD, EEE ); } while ( 0 )
+             
+        #define API_TRACE_RAW_1( AAA, BBB ) do\
+             { _LIT( logStr, AAA ); TBuf<KTraceMaxSize> buffer; buffer.Append( logStr ); buffer.Append( BBB );\
+             RDebug::RawPrint( buffer ); } while ( 0 )
+
+    #else
+
+        #define API_TRACE_( AAA )
+        #define API_TRACE_1( AAA, BBB )
+        #define API_TRACE_2( AAA, BBB, CCC )
+        #define API_TRACE_3( AAA, BBB, CCC, DDD )
+        #define API_TRACE_4( AAA, BBB, CCC, DDD, EEE )
+        #define API_TRACE_RAW_1( AAA, BBB )
+
+    #endif // API_TRACE_FLAG
+
+#else // _DEBUG
+
+    #define TRACE_ASSERT( a )
+    #define TRACE_ASSERT_RETURN( a ) a
+    #define TRACE_ASSERT_ALWAYS
+
+    #define COM_TRACE_( AAA )
+    #define COM_TRACE_1( AAA, BBB )
+    #define COM_TRACE_2( AAA, BBB, CCC )
+    #define COM_TRACE_3( AAA, BBB, CCC, DDD )
+    #define COM_TRACE_4( AAA, BBB, CCC, DDD, EEE )
+    #define COM_TRACE_RAW_( AAA )
+    #define COM_TRACE_RAW_1( AAA, BBB )
+
+    #define API_TRACE_( AAA )
+    #define API_TRACE_1( AAA, BBB )
+    #define API_TRACE_2( AAA, BBB, CCC )
+    #define API_TRACE_3( AAA, BBB, CCC, DDD )
+    #define API_TRACE_4( AAA, BBB, CCC, DDD, EEE )
+    #define API_TRACE_RAW_1( AAA, BBB )
+
+    #define COMPONENT_TRACE_THIS_FILE
+
+    #define PANIC_IF_FALSE( a )
+    #define PANIC_IF_TRUE( a )
+    #define PANIC_ALWAYS
+
+#endif // _DEBUG
+
+#endif // ACC_DEBUG_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/inc/cautoaudioasymainservicebase.h	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* 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:  Header file for autoaudioasy main service
+*
+*/
+
+#ifndef CAUTOAUDIOASYMAINSERVICEBASE_H_
+#define CAUTOAUDIOASYMAINSERVICEBASE_H_
+
+#include <asymainservicebase.h>
+
+//Forward declarations
+class CAutoAudioAsyService;
+
+
+/**
+ *  Creates ASY main service
+ */
+NONSHARABLE_CLASS(CAutoAudioAsyMainServiceBase): public CASYMainServiceBase
+    {
+public:  // Constructors and destructor
+        
+    static CAutoAudioAsyMainServiceBase* NewL ();
+    virtual ~CAutoAudioAsyMainServiceBase ();
+
+public: // From CASYMainServiceBase
+                
+    TInt StartL();
+
+private: // Functions
+
+    CAutoAudioAsyMainServiceBase (); 
+    void ConstructL ();
+	
+	void InitPSAutoAudioL ();
+
+private: //Data
+
+    /**
+     * Handle to service class.
+     * Own.
+     */
+    CAutoAudioAsyService* iService;
+    };
+
+#endif // CAUTOAUDIOASYMAINSERVICEBASE_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/inc/cautoaudioasypropertyobserver.h	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Header file for property observer
+*
+*/
+#ifndef CAUTOAUDIOASYPROPERTYOBSERVER_H__
+#define CAUTOAUDIOASYPROPERTYOBSERVER_H__
+
+#include <e32base.h>
+#include <e32property.h>
+
+class MAutoAudioAsyPropertyListener;
+
+/**
+ * This class follows PS key (informs when RTP streaming is enabled or disabled).
+ */
+NONSHARABLE_CLASS(CAutoAudioAsyPropertyObserver): public CActive
+    {
+public:
+    /**
+     * Two-phase constructor
+     */
+    static CAutoAudioAsyPropertyObserver* NewL ( TUid aCategory, TUint aKey, MAutoAudioAsyPropertyListener& aListener ); 
+    virtual ~CAutoAudioAsyPropertyObserver ();
+
+protected:
+    // CActive
+    void DoCancel ();
+    void RunL ();
+    TInt RunError ( TInt aError );
+
+private:
+    CAutoAudioAsyPropertyObserver ( TUid aCategory, TUint aKey, MAutoAudioAsyPropertyListener& aListener );
+
+private:
+    /**
+     * Handle to P&S property.
+     * Own.
+     */
+    RProperty iProperty;
+
+    /**
+     * The UID of the property we are listening for
+     */
+    TUid iCategory;
+
+    /**
+     * The key we are listening for
+     */
+    TUint iKey;
+
+    /**
+     * Reference to listener class.
+     * Now own.
+     */
+    MAutoAudioAsyPropertyListener& iListener;
+    };
+
+#endif // CAUTOAUDIOASYPROPERTYOBSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/inc/cautoaudioasyservice.h	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* 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:  This class handles connect and disconnect to AccFw.
+*
+*/
+
+#ifndef C_AUTOAUDIOASYSERVICE_H__
+#define C_AUTOAUDIOASYSERVICE_H__
+
+#include <accessoryserver.h>
+#include <accessorycontrol.h>
+#include <accpolgenericid.h>
+#include <accpolgenericidarray.h>
+
+#include "mautoaudioasypropertylistener.h"
+
+class CAutoAudioAsyPropertyObserver;
+
+
+/**
+ * This class will notification for enabling/disabling RTP streaming channel
+   and handles connect and disconnect to AccFW.
+ */
+NONSHARABLE_CLASS(CAutoAudioAsyService): public CActive,
+										 public MAutoAudioAsyPropertyListener
+    {
+public:
+    /**
+     * Two-phased constructor
+     */
+    static CAutoAudioAsyService* NewL ();
+
+    virtual ~CAutoAudioAsyService ();    
+
+	/**
+    * Starts ASY service
+    */
+	void StartL ();
+	
+    /**
+     * Free resources on disconnect or on error
+     */
+    void FreeResources ();
+
+    /**
+     * @param aPS Handle to the property
+     * @param aUid The Uid of the property
+     * @param aKey The property key
+     * @param aStatus The property change status
+     * @return void
+     */
+    void PropertyChange ( RProperty& aPS, TUid aUid, TUint aKey, TInt aStatus );
+
+protected:
+
+    // CActive
+    void DoCancel ();
+    void RunL ();
+    TInt RunError ( TInt aError );
+
+private: //methods
+
+    CAutoAudioAsyService ();
+
+    void ConstructL ();
+    void ConnectAccessoryL ();
+    void AccessoryDisconnected ();
+
+private: //data
+    /**
+     * State of the service class.
+     */
+    enum TServiceState
+        {
+        EServiceStateIdle,
+        EServiceStateConnecting,
+        EServiceStateConnected
+        };
+
+    /**
+     * Handle to accessory server
+     * Own.
+     */
+    RAccessoryServer  iAccessoryServer;
+
+    /**
+     * Handle to accessory control
+     * Own.
+     */
+    RAccessoryControl iAccessoryControl;
+
+    /**
+     * Generic id header
+     */
+    TAccPolGIDHeader  iGenericIDHeader;
+
+    /**
+     * State of the service class
+     */
+    TServiceState iState;
+
+    /**
+     * Generic id
+     * Own.
+     */
+    CAccConGenericID* iGenericId;
+
+    /**
+     * Observer that receives notifications about RTP Channel
+     * Own.
+     */
+    CAutoAudioAsyPropertyObserver* iPropertyObserver;
+    };
+
+#endif // C_AUTOAUDIOASYSERVICE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/inc/mautoaudioasypropertylistener.h	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* 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:  Notify service class about property changes.
+*
+*/
+
+#ifndef MAUTOAUDIOASYPROPERTYLISTENER_H
+#define MAUTOAUDIOASYPROPERTYLISTENER_H
+
+#include <e32property.h>
+
+/**
+ * Methods needed to handle Publish & Subscribe property changes.
+ */
+class MAutoAudioAsyPropertyListener
+    {
+public:
+    /**
+     *
+     * @param aProperty Handle to the property
+     * @param aCategory The Uid of the property
+     * @param aKey The property key
+     * @param aStatus The property change status
+     * @return void
+     */
+    virtual void PropertyChange ( RProperty& aProperty, TUid aCategory,
+        TUint aKey, TInt aStatus ) = 0;
+    };
+
+#endif // MAUTOAUDIOASYPROPERTYLISTENER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/rom/autoaudioasy.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* 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:  Image description file for project Autoaudio ASY
+*
+*/
+
+
+#ifndef AUTOAUDIOASY_IBY__
+#define AUTOAUDIOASY_IBY__
+
+ECOM_PLUGIN ( autoaudioasy.dll, 2002F9A3.rsc )
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/src/autoaudioasyproxy.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* 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:  Implementations for autoaudioasy
+*
+*/
+
+#include <e32std.h>
+#include <ecom/implementationproxy.h>
+
+#include "cautoaudioasymainservicebase.h"
+
+// Map the interface implementation UIDs to implementation factory functions
+const TImplementationProxy ImplementationTable[] =
+    {
+    {{0x2002F9A4}, (TProxyNewLPtr) CAutoAudioAsyMainServiceBase::NewL}
+    };
+
+//
+// ---------------------------------------------------------
+// TImplementationProxy* ImplementationGroupProxy( TInt&)
+// ---------------------------------------------------------
+//  
+// Exported proxy for instantiation method resolution.
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+    {
+    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+    return ImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/src/cautoaudioasymainservicebase.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* 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:  Service base for autoaudioasy
+*
+*/
+// global headers
+#include <accessoryservicesinternalpskeys.h>
+#include <autoaudiopskeys.h>
+
+// local headers
+#include "cautoaudioasymainservicebase.h"
+#include "cautoaudioasyservice.h"
+#include "acc_debug.h"
+
+
+_LIT_SECURITY_POLICY_C1(KPSAutoAudioReadPolicy, ECapabilityReadDeviceData);
+_LIT_SECURITY_POLICY_C1(KPSAutoAudioWritePolicy, ECapabilityWriteDeviceData);
+
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyMainServiceBase::CAutoAudioAsyMainServiceBase ()
+// ----------------------------------------------------------------------------------
+CAutoAudioAsyMainServiceBase::CAutoAudioAsyMainServiceBase ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyMainServiceBase::CAutoAudioAsyMainServiceBase()");
+    }
+
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyMainServiceBase::NewL ()
+// ----------------------------------------------------------------------------------
+CAutoAudioAsyMainServiceBase* CAutoAudioAsyMainServiceBase::NewL ()
+    {
+    CAutoAudioAsyMainServiceBase* self = new ( ELeave ) CAutoAudioAsyMainServiceBase ();
+    CleanupStack::PushL ( self );
+    self->ConstructL ();
+    CleanupStack::Pop ( self );
+    return self;
+    }
+
+void CAutoAudioAsyMainServiceBase::ConstructL ()
+    {
+    iService = CAutoAudioAsyService::NewL ();
+    }
+
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyMainServiceBase::~CAutoAudioAsyMainServiceBase ()
+// ----------------------------------------------------------------------------------
+CAutoAudioAsyMainServiceBase::~CAutoAudioAsyMainServiceBase ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyMainServiceBase::~CAutoAudioAsyMainServiceBase" );
+    delete iService;	
+	RProperty::Delete ( KPSUidAccessoryServices, KPSAutoKeyRTPStreamingConnectionStatus );
+    }
+
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyMainServiceBase::StartL ()
+// In this method we define & start listening for property changes
+// ----------------------------------------------------------------------------------
+TInt CAutoAudioAsyMainServiceBase::StartL ()
+	{
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyMainServiceBase::StartL" );
+	InitPSAutoAudioL ();
+	
+	iService->StartL ();
+	
+	Signal ();
+    
+	return KErrNone;
+	}
+	
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyMainServiceBase::InitPSAutoAudioL ()
+// In this method we define and intialise P&S keys
+// ----------------------------------------------------------------------------------
+void CAutoAudioAsyMainServiceBase::InitPSAutoAudioL ()
+	{
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyMainServiceBase::InitPSAutoAudioL" );
+	TInt ret = RProperty::Define ( KPSUidAccessoryServices,
+				KPSAutoKeyRTPStreamingConnectionStatus, RProperty::EInt,				
+				KPSAutoAudioReadPolicy, KPSAutoAudioWritePolicy );
+
+	if ( ret != KErrNone )
+		{
+		COM_TRACE_1 ( "[AccFW:AutoAudioAsy] CAutoAudioAsyMainServiceBase::InitPSAutoAudioL RTP Streaming Property Define failed with %d", ret );
+        User::Leave ( ret );
+		}
+	
+	ret = RProperty::Set ( KPSUidAccessoryServices, KPSAutoKeyRTPStreamingConnectionStatus, EAudioConnectionStatusNone );
+	if ( ret != KErrNone )
+	    {
+        COM_TRACE_1 ( "[AccFW:AutoAudioAsy] CAutoAudioAsyMainServiceBase::InitPSAutoAudioL RTP Streaming key init failed with %d", ret );
+        User::Leave ( ret );
+	    }
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/src/cautoaudioasypropertyobserver.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,92 @@
+/*
+* 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:  Notify service class about connection state.
+*
+*/
+
+#include "cautoaudioasypropertyobserver.h" 
+#include "autoaudiopskeys.h"
+#include "mautoaudioasypropertylistener.h"
+
+#include "acc_debug.h"
+
+// ---------------------------------------------------------------------------
+// CAutoAudioAsyPropertyObserver::NewL
+// ---------------------------------------------------------------------------
+CAutoAudioAsyPropertyObserver* CAutoAudioAsyPropertyObserver::NewL ( TUid aCategory, TUint aKey,
+        MAutoAudioAsyPropertyListener& aListener )
+	{
+    COM_TRACE_1 ( "[AccFW:AutoAudioAsy] CAutoAudioAsyPropertyObserver::NewL(), key- %d", aKey );
+    return new ( ELeave ) CAutoAudioAsyPropertyObserver ( aCategory, aKey, aListener );
+	}
+
+// ---------------------------------------------------------------------------
+// CAutoAudioAsyPropertyObserver::CAutoAudioAsyPropertyObserver
+// ---------------------------------------------------------------------------
+CAutoAudioAsyPropertyObserver::CAutoAudioAsyPropertyObserver ( TUid aCategory, TUint aKey,
+        MAutoAudioAsyPropertyListener& aListener ):
+    CActive ( EPriorityStandard ),
+    iCategory ( aCategory ), iKey ( aKey ), iListener ( aListener )
+    {
+    CActiveScheduler::Add ( this );    
+    iProperty.Attach ( iCategory, iKey );
+    iProperty.Subscribe ( iStatus );
+    SetActive ();
+    }
+
+// ---------------------------------------------------------------------------
+// CAutoAudioAsyPropertyObserver::~CAutoAudioAsyPropertyObserver
+// ---------------------------------------------------------------------------
+CAutoAudioAsyPropertyObserver::~CAutoAudioAsyPropertyObserver ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyPropertyObserver::~CAutoAudioAsyPropertyObserver");
+    Cancel ();
+    iProperty.Close ();
+    }
+
+// ---------------------------------------------------------------------------
+// CAutoAudioAsyPropertyObserver::RunL
+// ---------------------------------------------------------------------------
+void CAutoAudioAsyPropertyObserver::RunL ()
+    {                      
+    COM_TRACE_ ( "AccFW:AutoAudioAsy] CAutoAudioAsyPropertyObserver::RunL");
+
+    TInt status = iStatus.Int ();
+    COM_TRACE_3 ( "[AccFW:AutoAudioAsy] key 0x%08x/%u changed, status %d", iCategory.iUid, iKey, status );
+    // Subscribe for the next change BEFORE invoking the listener to make sure
+    // that we never miss any property changes.
+    iProperty.Subscribe ( iStatus );
+    SetActive ();
+
+    // Notify the listener
+    iListener.PropertyChange ( iProperty, iCategory, iKey, status );
+    }
+
+// ---------------------------------------------------------------------------
+// CAutoAudioAsyPropertyObserver::DoCancel
+// ---------------------------------------------------------------------------
+void CAutoAudioAsyPropertyObserver::DoCancel ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyPropertyObserver::DoCancel" );
+    iProperty.Cancel ();
+    }    
+
+// ---------------------------------------------------------------------------
+// CAutoAudioAsyPropertyObserver::RunError
+// ---------------------------------------------------------------------------
+TInt CAutoAudioAsyPropertyObserver::RunError ( TInt /* aError */ )
+	{
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyPropertyObserver::RunError" );
+    return KErrNone;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accessoryservices/autoaudioasy/src/cautoaudioasyservice.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,273 @@
+/*
+* 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:  This class handles connect and disconnect to AccFw.
+*
+*/
+
+#include <acccongenericid.h>
+#include <accpolobjectcon.h>
+#include <accpolnamevaluerecord.h>
+#include <accconfigfileparser.h>
+#include <accpolcommonnamevaluepairs.h>
+#include <accessoryservicesinternalpskeys.h>
+#include <autoaudiopskeys.h>
+
+#include "cautoaudioasyservice.h"
+#include "cautoaudioasypropertyobserver.h"
+#include "acc_debug.h"
+
+#define SET_STATE(state) (iState=state)
+ 
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyService::CAutoAudioAsyService() 
+// ----------------------------------------------------------------------------------
+CAutoAudioAsyService::CAutoAudioAsyService ()
+	: CActive ( EPriorityStandard )
+    {
+    CActiveScheduler::Add ( this );
+    }
+
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyService::NewL ()
+// ----------------------------------------------------------------------------------
+CAutoAudioAsyService* CAutoAudioAsyService::NewL ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::NewL" );
+    CAutoAudioAsyService* self = new ( ELeave ) CAutoAudioAsyService ();
+    CleanupStack::PushL ( self );
+    self->ConstructL ();
+    CleanupStack::Pop ( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyService::ConstructL ()
+// ----------------------------------------------------------------------------------
+void CAutoAudioAsyService::ConstructL ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::ConstructL" );
+    User::LeaveIfError ( iAccessoryServer.Connect () );
+    User::LeaveIfError ( iAccessoryControl.CreateSubSession ( iAccessoryServer ) );
+    SET_STATE ( EServiceStateIdle );	
+    }
+
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyService::~CAutoAudioAsyService()
+// ----------------------------------------------------------------------------------
+CAutoAudioAsyService::~CAutoAudioAsyService ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::~CAutoAudioAsyService" );
+    Cancel ();
+	
+	delete iPropertyObserver;
+    iAccessoryControl.CloseSubSession ();
+    iAccessoryServer.Close ();
+    
+	FreeResources ();
+    }
+	
+void CAutoAudioAsyService::StartL ()
+	{
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::StartL" );
+	iPropertyObserver = CAutoAudioAsyPropertyObserver::NewL ( KPSUidAccessoryServices, KPSAutoKeyRTPStreamingConnectionStatus, *this );
+	}
+
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyService::PropertyChange ()
+// Defined in MAutoAudioAsyPropertyListener interface.
+// Receives notifications about RTP Streaming channel property changes. Property changes occur
+// when accessory is connected or disconnected or headunit attached or detached
+// ----------------------------------------------------------------------------------
+void CAutoAudioAsyService::PropertyChange ( RProperty& aProperty, TUid aUid, TUint aKey, TInt aStatus )
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::PropertyChange" );
+
+    TInt propValue;
+    TInt status = aProperty.Get ( propValue );
+    COM_TRACE_1 ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::PropertyChange -- request property value %d", propValue );
+    
+    if ( aUid == KPSUidAccessoryServices && aKey == KPSAutoKeyRTPStreamingConnectionStatus )
+        {
+        // Check if audio accessory has been connected
+        if ( ( status == KErrNone ) && ( aStatus == KErrNone ) )
+            {
+			if ( propValue == EAudioConnectionStatusUnidirectional ) // Current release supports only UniDirectional, so other key values ignored.
+				{
+				TInt err;
+				switch ( iState )
+					{
+					case EServiceStateIdle:
+						TRAP ( err, ConnectAccessoryL () );
+						if ( err != KErrNone )
+							{
+							COM_TRACE_1 ("[AccFW:AutoAudioAsy] ConnectAccessoryL error %d", err );
+							FreeResources (); // switch to EServiceStateIdle							
+							}
+						break;
+						
+					case EServiceStateConnecting:
+					case EServiceStateConnected:
+						// Nothing to do
+						break;
+					}
+				return;
+				}
+            }
+			
+        // Otherwise assume that it's disconnected
+        AccessoryDisconnected ();
+        }
+    }
+
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyService::AccessoryDisconnected ()
+// Called when a disconnect notification is received
+// ----------------------------------------------------------------------------------
+void CAutoAudioAsyService::AccessoryDisconnected ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::AccessoryDisconnected" );
+    TRequestStatus status;
+    switch ( iState )
+        {
+        case EServiceStateConnected:
+            iAccessoryControl.DisconnectAccessory ( status, iGenericId->GenericID () );
+            User::WaitForRequest ( status );
+            FreeResources (); // sets state to EServiceStateIdle
+            break;
+
+        case EServiceStateConnecting:
+            Cancel ();
+            break;
+
+        default:
+            // nothing to do in this case
+            break;
+        }
+    }
+
+// ----------------------------------------------------------------------------------
+// CAutoAudioAsyService::ConnectAccessoryL ()
+// Notifies the accessory server and switches to EServiceStateConnecting state.
+// ----------------------------------------------------------------------------------
+void CAutoAudioAsyService::ConnectAccessoryL ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::ConnectAccessoryL" );
+
+    RArray<TAccPolNameValueRecord> nameValueArray;
+    CleanupClosePushL ( nameValueArray );
+
+    // Set GenericID header
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] Set generic header" );
+    iGenericIDHeader.iAccessoryDeviceType   = KDTCarKit;
+    iGenericIDHeader.iPhysicalConnection    = KPCUSB;
+    iGenericIDHeader.iApplicationProtocol   = 0x0;
+    iGenericIDHeader.iCapabilitiesSubblocks = KSBAudioSubblock;
+    iGenericIDHeader.iHWDeviceID            = 0x0;
+    iGenericIDHeader.iHWModelID				= KNullDesC;
+
+    iGenericId = CAccConGenericID::NewL ();
+
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] Set capabilities" );
+    
+    // Set "Audio Output Type" capability
+	COM_TRACE_ ( "[AccFW:AutoAudioAsy] KAccAudioOutputType " );
+    nameValueArray.AppendL ( TAccPolNameValueRecord ( KAccAudioOutputType,
+        EAccAudioOutPutTypePublic, EAPVInt, EAPVPolicy ) );
+
+    // Set "Audio stereo" capability
+	COM_TRACE_ ( "[AccFW:AutoAudioAsy] KAccStereoAudio " );
+	nameValueArray.AppendL ( TAccPolNameValueRecord ( KAccStereoAudio ) );
+
+    // Set "Integrated audio output"
+	COM_TRACE_ ( "[AccFW:AutoAudioAsy] KAccIntegratedAudioOutput " );
+	nameValueArray.AppendL ( TAccPolNameValueRecord ( KAccIntegratedAudioOutput ) );
+
+	// Set "RTP streaming"
+	COM_TRACE_ ( "[AccFW:AutoAudioAsy] KAccRTPStreaming " );
+	nameValueArray.AppendL ( TAccPolNameValueRecord ( KAccRTPStreaming ) );
+
+    // Make generic id
+    CAccConfigFileParser* accConfigFileParser = CAccConfigFileParser::NewL ( KNullDesC );
+    CleanupStack::PushL ( accConfigFileParser );
+    accConfigFileParser->ParseGenericIDL ( iGenericId, iGenericIDHeader, nameValueArray );
+
+    // Connect accessory
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] Connecting accessory..." );
+    iAccessoryControl.ConnectAccessory ( iStatus, iGenericId, EFalse );
+    SET_STATE ( EServiceStateConnecting );
+    SetActive ();
+
+    CleanupStack::PopAndDestroy ( accConfigFileParser );
+    CleanupStack::PopAndDestroy ( &nameValueArray );
+    }    
+
+// ----------------------------------------------------------------------------------
+// CActive methods
+// ----------------------------------------------------------------------------------
+void CAutoAudioAsyService::DoCancel ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::DoCancel" );
+    iAccessoryControl.CancelConnectAccessory ();
+    FreeResources ();
+    }
+
+TInt CAutoAudioAsyService::RunError ( TInt /*aError*/ )
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::RunError" );
+    return KErrNone;
+    }
+
+void CAutoAudioAsyService::RunL ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::RunL" );
+	TInt retVal ( iStatus.Int () );
+	COM_TRACE_1 ( "[AccFW:AutoAudioAsy] Connected with return value %d", retVal );
+	
+    if ( KErrNone == retVal )
+		{
+			switch ( iState )
+			{
+			case EServiceStateConnecting:				
+				SET_STATE ( EServiceStateConnected );
+				break;
+			
+			case EServiceStateIdle:
+			case EServiceStateConnected:
+			default:
+				COM_TRACE_ ( "State machine broken" );
+				break;
+			}
+		}
+	else
+		{
+		COM_TRACE_ ( "[AccFW:AutoAudioAsy] Accessory Server failed to accept connection, freeing up resources" );		
+		FreeResources ();
+		}
+	}	
+	
+// ----------------------------------------------------------------------------------
+// Frees resources and set state to EServiceStateIdle
+// ----------------------------------------------------------------------------------
+void CAutoAudioAsyService::FreeResources ()
+    {
+    COM_TRACE_ ( "[AccFW:AutoAudioAsy] CAutoAudioAsyService::FreeResources" );
+
+    if ( iState != EServiceStateIdle )
+        {
+        SET_STATE ( EServiceStateIdle );
+        }
+
+    delete iGenericId;
+    iGenericId = NULL;
+    }
--- a/accessoryservices/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -26,9 +26,13 @@
 #include "../accessoryremotecontrol/group/bld.inf"
 #include "../accessoryserver/group/bld.inf"
 #include "../pluggeddisplay/group/bld.inf"
+#include "../remotecontrolfw/group/bld.inf"
 #include "../headsetstatusapi/Group/bld.inf"
 #include "../tspclientmapper/group/bld.inf"
 #include "../gid_pc_tool/group/bld.inf"
+#ifdef FF_AUTOMOTIVESTACK
+#include "../autoaudioasy/group/bld.inf"
+#endif
 
 PRJ_TESTMMPFILES
 
--- a/accessoryservices/headsetstatusapi/tsrc/public/basic/headsettestmodule/src/headsetTestModuleCases.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/headsetstatusapi/tsrc/public/basic/headsettestmodule/src/headsetTestModuleCases.cpp	Tue Aug 31 16:29:05 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/group/pluggeddisplayengine.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/group/pluggeddisplayengine.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -66,6 +66,7 @@
 LIBRARY					accclient.lib
 LIBRARY					efsrv.lib
 LIBRARY					fbscli.lib
+LIBRARY					sysutil.lib
 
 #ifdef TRACE_INTO_FILE
 LIBRARY					flogger.lib
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -25,6 +25,7 @@
 #include <e32math.h>
 #include <accessoriescrkeys.h>
 #include <centralrepository.h>
+#include <sysutil.h>
 
 #include "pdeconstants.h"
 #include "tvoutconfigforhdmi.h"
@@ -192,7 +193,7 @@
         {
         hdmiSink = CAccPolHdmiSink::NewL(
             iExtensionParserPtr->BasicAudio(),
-            iTVOutConfigForHDMI.GetTvOutConfig()->CopyProtectionStatus() );
+            ETrue );
         }
     else
         {
@@ -636,7 +637,7 @@
 // RunL
 //------------------------------------------------------------------------------
 //
-TInt CEDIDHandler::RunError( TInt aError )
+TInt CEDIDHandler::RunError( TInt /*aError*/ )
     {
     FUNC_LOG;
     
@@ -770,7 +771,65 @@
 		}
     Mem::FillZ( ( TAny* )&aTimings.iProductName, ( sizeof( TChar ) * KProductNameChars ) );
     Mem::FillZ( ( TAny* )&aTimings.iProductDescription, ( sizeof( TChar ) * KProductDescriptorsChars ) );
-    aTimings.iSourceType = THdmiDviTimings::ESourceTypeUnknown;
+    	
+    TInt err = KErrNone;
+    CDeviceTypeInformation* deviceTypeInfo = NULL;
+    TRAP(err, deviceTypeInfo = SysUtil::GetDeviceTypeInfoL());
+    
+    if(KErrNone == err)
+        {
+        #define MAX(a, b) (((a)>(b)) ? (a) : (b))
+        #define MIN(a, b) (((a)<(b)) ? (a) : (b))
+        
+        TPtrC16 bufPtrModelCode;
+        TPtrC16 bufPtrManufacturerName;
+        TUint loopCount;
+        TUint maxLen;
+        TUint maxCharsLen;
+        TUint minNameCharsLen;
+        TUint minDescritopCharsLen;
+        
+        deviceTypeInfo->GetManufacturerName(bufPtrManufacturerName);
+        deviceTypeInfo->GetModelCode(bufPtrModelCode);
+        maxLen = MAX(bufPtrModelCode.Length(),bufPtrManufacturerName.Length());
+        maxCharsLen = MAX(KProductNameChars,KProductDescriptorsChars);
+        minNameCharsLen = MIN(KProductNameChars, bufPtrModelCode.Length());
+        minDescritopCharsLen = MIN(KProductDescriptorsChars, bufPtrManufacturerName.Length());
+        
+        INFO_1( "maxLen : %d", maxLen);
+        INFO_1( "maxCharsLen : %d", maxCharsLen);
+        INFO_1( "minNameCharsLen : %d", minNameCharsLen);
+        INFO_1( "minDescritopCharsLen : %d", minDescritopCharsLen);
+        
+        for(loopCount = 0; loopCount < maxLen; loopCount++)
+            {
+            if(loopCount >= maxCharsLen)
+                {
+                        break;
+                }
+            else
+                {
+                    if(loopCount <  minNameCharsLen)
+                        {
+                        aTimings.iProductName[loopCount] = bufPtrModelCode[loopCount];
+                        INFO_1( "aTimings.iProductName : %d", aTimings.iProductName[loopCount].GetLowerCase());
+                        }
+                    if(loopCount <  minDescritopCharsLen)
+                        {
+                        aTimings.iProductDescription[loopCount] = bufPtrManufacturerName[loopCount];
+                        INFO_1( "aTimings.iProductDescription : %d", aTimings.iProductDescription[loopCount].GetLowerCase());
+                        }
+                }
+            }
+        INFO("Before Deleting Pointer deviceTypeInfo");
+        delete deviceTypeInfo;
+        INFO("After Deleting Pointer deviceTypeInfo");
+        aTimings.iSourceType = THdmiDviTimings::ESourceTypePCGeneral;
+        }
+    else
+        {
+        aTimings.iSourceType = THdmiDviTimings::ESourceTypeUnknown;
+        }
     }
 
 //------------------------------------------------------------------------------
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/hdmicablestateconnected.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/hdmicablestateconnected.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -829,13 +829,13 @@
             {
             INFO( "Event: EIfAsyCommandHandlerEventSetCopyProtectionOn" );
             TInt retVal = iTVOutConfigForCopyProtect->GetTvOutConfig()->CopyProtection( ETrue );
-            iHDMICableStatusFSM.CopyProtectionSettingDone( retVal );
+            iHDMICableStatusFSM.CopyProtectionSettingDone( retVal, iTVOutConfigForCopyProtect->GetTvOutConfig()->CopyProtectionStatus() );
             }
         else if ( EIfAsyCommandHandlerEventSetCopyProtectionOff == aEvent )
             {
             INFO( "Event: EIfAsyCommandHandlerEventSetCopyProtectionOff" );
             TInt retVal = iTVOutConfigForCopyProtect->GetTvOutConfig()->CopyProtection( EFalse );
-            iHDMICableStatusFSM.CopyProtectionSettingDone( retVal );
+            iHDMICableStatusFSM.CopyProtectionSettingDone( retVal, iTVOutConfigForCopyProtect->GetTvOutConfig()->CopyProtectionStatus() );
             }
         else if ( EIfAsyCommandHandlerEventGetCopyProtectStatus == aEvent )
             {
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/tvoutconfigforhdmi.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/tvoutconfigforhdmi.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -221,7 +221,7 @@
     if  ( iLastRecordedCopyProtectEnabledStatus != currentCopyProtectStatus )
         {
         INFO("Copy Protection status changed while not listening.");
-		iLastRecordedCopyProtectEnabledStatus = currentCopyProtectStatus;
+        iLastRecordedCopyProtectEnabledStatus = currentCopyProtectStatus;
         retStruct.iFSMEventId = EIfTVOutConfigEventSetCopyProtectStatusChanged;
         }
     else if ( !IsActive() )
@@ -645,7 +645,7 @@
 //
 // ----------------------------------------------------------------------------
 //
-TInt CTVOutConfigForHDMI::RunError( TInt aError )
+TInt CTVOutConfigForHDMI::RunError( TInt /*aError*/ )
     {
     FUNC_LOG;
 
--- a/accessoryservices/remotecontrolfw/client/coreapi/public/remconcoreapicontrollerobserver.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/remotecontrolfw/client/coreapi/public/remconcoreapicontrollerobserver.h	Tue Aug 31 16:29:05 2010 +0300
@@ -41,7 +41,7 @@
 	command of this type.
 	@param The response error.
 	*/
-	virtual void MrccacoResponse(TRemConCoreApiOperationId aOperationId, TInt aError);
+	IMPORT_C virtual void MrccacoResponse(TRemConCoreApiOperationId aOperationId, TInt aError);
 	};
 
 #endif // REMCONCOREAPICONTROLLEROBSERVER_H
--- a/accessoryservices/remotecontrolfw/client/intermediate/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/remotecontrolfw/client/intermediate/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -23,7 +23,7 @@
 
 PRJ_EXPORTS
 ../public/remconinterfaceselector.h 	SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(remconinterfaceselector.h)
-../public/remconinterfacebase.h 		SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(remcon/remconinterfacebase.h)
-../public/remconinterfaceif.h 			SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(remcon/remconinterfaceif.h)
+../public/remconinterfacebase.h 		SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(remcon/remconinterfacebase.h)
+../public/remconinterfaceif.h 			SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(remcon/remconinterfaceif.h)
 ../public/remconerrorobserver.h 			SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(remconerrorobserver.h)
 ../public/remconinterfacefeatures.h		SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(remcon/remconinterfacefeatures.h)
--- a/accessoryservices/remotecontrolfw/client/intermediate/src/interfaceselector.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/remotecontrolfw/client/intermediate/src/interfaceselector.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -103,10 +103,11 @@
 		}
 	CleanupStack::PopAndDestroy(currentHeap);
 	
-	iLock = new (ELeave) RNestableLock();
-	CleanupStack::PushL(iLock);
-	LEAVEIFERRORL(iLock->CreateLocal());
-	CleanupStack::Pop(iLock);
+	RNestableLock* lock = new (ELeave) RNestableLock;
+    CleanupStack::PushL(lock);
+	LEAVEIFERRORL(lock->CreateLocal());
+	CleanupStack::Pop(lock);
+	iLock = lock;
 	}
 
 CRemConInterfaceSelector::CRemConInterfaceSelector()
@@ -441,15 +442,15 @@
 void CRemConInterfaceSelector::BulkSessionConnectL()
 	{
 	LOG_FUNC
-	iBulkSession = new(ELeave)RRemConBulk();
-	CleanupStack::PushL(iBulkSession);
-	LEAVEIFERRORL(iBulkSession->Connect());
-	CleanupStack::Pop(iBulkSession);
 
-	CleanupCloseDeleteAndNullPushL(reinterpret_cast<RRemCon**>(&iBulkSession));
+	RRemConBulk* bulkSession = new(ELeave)RRemConBulk;
+	CleanupStack::PushL(bulkSession);
+	LEAVEIFERRORL(bulkSession->Connect());
+	CleanupClosePushL(*bulkSession);
 	RCIS_VERBOSE_ASSERT(iBulkReceiver, ERemConIfSelInternalError);
-	iBulkReceiver->InitialiseL(*iBulkSession, iBulkMaxDataLength);
-	CleanupStack::Pop(&iBulkSession);
+	iBulkReceiver->InitialiseL(*bulkSession, iBulkMaxDataLength);
+	CleanupStack::Pop(2, bulkSession);
+	iBulkSession = bulkSession;
 	}
 
 /**
--- a/accessoryservices/remotecontrolfw/group/remotecontrol.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/remotecontrolfw/group/remotecontrol.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -56,7 +56,7 @@
 REM *** Now for things which should only be included if the device
 REM *** supports bluetooth, to save ROM space...
 
-#ifdef SYMBIAN_EXCLUDE_BLUETOOTH
+#ifndef __BT
 REM Feature BLUETOOTH is not in this ROM (remotecontrol.iby)
 #else
 // Server
@@ -74,6 +74,6 @@
 // The concrete Target Selector Plugin.
 #include <tsp.iby>
 
-#endif // SYMBIAN_EXCLUDE_BLUETOOTH
+#endif // __BT
 
 #endif // __REMCON_IBY__
--- a/accessoryservices/remotecontrolfw/server/group/remconserver.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/remotecontrolfw/server/group/remconserver.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -30,6 +30,10 @@
 UID 			0x0 0x101f9067
 VENDORID		0x70000001
 
+// Non-default stack size to allow for plugins which use Qt APIs. 
+// (The value is a standard for Symbian Qt apps, generated by qmake.)
+EPOCSTACKSIZE 0x14000
+
 SOURCEPATH		../src
 SOURCE			activehelper.cpp
 SOURCE			bearermanager.cpp
--- a/accessoryservices/remotecontrolfw/server/inc/session.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/remotecontrolfw/server/inc/session.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -142,8 +142,6 @@
 	TInt SupportedBulkInterfaces(RArray<TUid>& aUids);
 	TInt SupportedOperations(TUid aInterfaceUid, RArray<TUint>& aOperations);
 
-	TBool ClientAvailable() const;
-
 	/**
 	Panics the client's current Send message with the given code.
 	*/
--- a/accessoryservices/remotecontrolfw/server/src/server.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/remotecontrolfw/server/src/server.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -1740,36 +1740,28 @@
 	LOGINCOMINGDELIVERED;
 	TInt err = KErrNone;
 
-	if ( aSess.ClientAvailable() )
+	// First off check if the client supports this
+	if(!aSess.SupportedMessage(aMsg))
+        {
+        err = KErrArgument;
+        
+        // 'Take ownership' of it by destroying it- it's finished with.
+        delete &aMsg;
+        }
+	else if ( aSess.CurrentReceiveMessage().Handle() )
 		{
-		// First off check if the client supports this
-		if(!aSess.SupportedMessage(aMsg))
-			{
-			err = KErrArgument;
-
-			// 'Take ownership' of it by destroying it- it's finished with.
-			delete &aMsg;
-			}
-		else if ( aSess.CurrentReceiveMessage().Handle() )
-			{
-			// If the client can take the message now put it on the right queue.
+		// If the client can take the message now put it on the right queue.
 
-			err = aSess.WriteMessageToClient (aMsg);
-			// If the message was a command, and it was delivered with no error,
-			// then put it in the 'incoming delivered' log. Otherwise, delete it
-			// because it's finished with.
-			if ((aMsg.MsgType() == ERemConCommand) || (aMsg.MsgType() == ERemConNotifyCommand))
+		err = aSess.WriteMessageToClient (aMsg);
+		// If the message was a command, and it was delivered with no error, 
+		// then put it in the 'incoming delivered' log. Otherwise, delete it 
+		// because it's finished with.
+		if ((aMsg.MsgType() == ERemConCommand) || (aMsg.MsgType() == ERemConNotifyCommand))
+			{
+			if (err == KErrNone )
 				{
-				if (err == KErrNone )
-					{
-					// We'll need to remember it for the response coming back.
-					IncomingDelivered().Append(aMsg);
-					}
-				else
-					{
-					// 'Take ownership' of it by destroying it- it's finished with.
-					delete &aMsg;
-					}
+				// We'll need to remember it for the response coming back.
+				IncomingDelivered().Append(aMsg); 
 				}
 			else
 				{
@@ -1779,19 +1771,12 @@
 			}
 		else
 			{
-			IncomingPendingDelivery().Append(aMsg);
+			// 'Take ownership' of it by destroying it- it's finished with.			
+			delete &aMsg;
 			}
 		}
 	else
 		{
-		// The client has not yet registered the interfaces they're interested
-		// in, so put the message on the incoming pending delivery queue until
-		// they do.
-		// Return KErrNone to avoid sending a reject. We're assuming that the
-		// client will eventually successfully receive the message, as we
-		// don't have a better basis on which to operate. This is identical to
-		// the case where a client doesn't have an outstanding receive request
-		// at this time.
 		IncomingPendingDelivery().Append(aMsg);
 		}
 	
--- a/accessoryservices/remotecontrolfw/server/src/session.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/remotecontrolfw/server/src/session.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -1794,13 +1794,6 @@
 	return err;
 	}
 
-TBool CRemConSession::ClientAvailable() const
-	{
-	// Client is available as soon as it has registered the APIs
-	// it is interested in.
-	return !!iInterestedAPIs;
-	}
-
 CRemConInterfaceDetails* CRemConSession::FindInterfaceByUid(TUid aUid) const
 	{
 	LOG_FUNC
--- a/accessoryservices/remotecontrolfw/types/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/remotecontrolfw/types/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -24,7 +24,7 @@
 PRJ_EXPORTS
 ../public/remconaddress.h				SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(remconaddress.h)
 ../public/playertype.h					SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(remcon/playertype.h)
-../public/messagetype.h 				SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(remcon/messagetype.h)
-../public/clienttype.h					SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(remcon/clienttype.h)
+../public/messagetype.h 				SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(remcon/messagetype.h)
+../public/clienttype.h					SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(remcon/clienttype.h)
 ../public/clientid.h					SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(remcon/clientid.h)
 ../public/remconifdetails.h				SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(remcon/remconifdetails.h)
--- a/accessoryservices/tspclientmapper/tsrc/public/basic/tspclienttestmodule/src/tspclientTestModuleCases.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/accessoryservices/tspclientmapper/tsrc/public/basic/tspclienttestmodule/src/tspclientTestModuleCases.cpp	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/PlatformEnv/platformver/tsrc/platformvertest/src/platformvertestcases.cpp	Tue Aug 31 16:29:05 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/rom/PlatformEnv.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/PlatformEnv/rom/PlatformEnv.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -19,14 +19,14 @@
 #ifndef __PLATFORMENV_IBY__
 #define __PLATFORMENV_IBY__
 
-file=ABI_DIR\BUILD_DIR\PlatformEnv.dll       SHARED_LIB_DIR\PlatformEnv.dll
+file=ABI_DIR\BUILD_DIR\platformenv.dll       SHARED_LIB_DIR\platformenv.dll
 
 #ifdef FF_USE_MASS_STORAGE_CONFIG
-patchdata PlatformEnv.dll@KDriveInfoDefaultRemovableMassStorage FF_DEFAULT_REMOVABLE_MASS_STORAGE
-patchdata PlatformEnv.dll@KDriveInfoLogicallyRemovableDrive1 FF_LOGICALLY_REMOVABLE_DRIVE1
+patchdata platformenv.dll@KDriveInfoDefaultRemovableMassStorage FF_DEFAULT_REMOVABLE_MASS_STORAGE
+patchdata platformenv.dll@KDriveInfoLogicallyRemovableDrive1 FF_LOGICALLY_REMOVABLE_DRIVE1
 #endif // FF_USE_MASS_STORAGE_CONFIG
 
-patchdata PlatformEnv.dll@KDriveInfoUsbDrivesStart FF_USB_DRIVE_START
+patchdata platformenv.dll@KDriveInfoUsbDrivesStart FF_USB_DRIVE_START
 
 file=ABI_DIR\BUILD_DIR\disknotifyhandler.dll SHARED_LIB_DIR\disknotifyhandler.dll
 file=ABI_DIR\BUILD_DIR\sysversioninfo.dll    SHARED_LIB_DIR\sysversioninfo.dll
--- a/commonservices/PlatformEnv/sysversioninfo/tsrc/sysutiltests/src/sysutiltests.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/PlatformEnv/sysversioninfo/tsrc/sysutiltests/src/sysutiltests.cpp	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/PlatformEnv/tsrc/platformenvtest/src/PlatformEnvTestCases.cpp	Tue Aug 31 16:29:05 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),
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/commonservices/activitymanager/test/tef/group/te_activitymanagerteftests.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,28 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"activitymanagerteftests EN"}
+
+; Vendor name
+: "activitymanagerteftests"
+
+"\sf\os\devicesrv\commonservices\activitymanager\test\tef\group\te_activitymanagerteftests.script"-"c:\devicesrv\activitymanagertest\te_activitymanagerteftests.script"
Binary file commonservices/commonengine/conf/ci_commonengine.confml has changed
Binary file commonservices/commonengine/conf/commonengine.confml has changed
Binary file commonservices/commonengine/conf/commonengine_1020503B.crml has changed
--- a/commonservices/commonengine/config/export.mk	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/commonengine/config/export.mk	Tue Aug 31 16:29:05 2010 +0300
@@ -21,6 +21,7 @@
 $(call push,MAKEFILE_STACK,$(MAKEFILE))
 
 CONFFILES =		$(MAKEFILEDIR)../conf/commonengine.confml              	$(EPOCROOT)/epoc32/rom/config/confml_data/s60/ \
+			$(MAKEFILEDIR)../conf/ci_commonengine.confml            $(EPOCROOT)/epoc32/rom/config/confml_data/s60/ \
 							$(MAKEFILEDIR)../conf/commonengine_1020503B.crml 	     	$(EPOCROOT)/epoc32/rom/config/confml_data/s60/
 		
 commonengine_config					:: commonengine_config-conf
--- a/commonservices/commonengine/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/commonengine/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -23,6 +23,7 @@
 PRJ_EXPORTS
 //Configuration tool migration
 ../conf/commonengine.confml          	OS_LAYER_CONFML(commonengine.confml)
+../conf/ci_commonengine.confml          	OS_LAYER_CONFML(ci_commonengine.confml)
 ../conf/commonengine_1020503B.crml 	  OS_LAYER_CRML(commonengine_1020503B.crml)
 ../rom/diskspacereserver.iby            CORE_OS_LAYER_IBY_EXPORT_PATH(diskspacereserver.iby)
 
--- a/commonservices/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -22,9 +22,11 @@
 
 PRJ_MMPFILES
 
+#include "../activitymanager/group/bld.inf"
 #include "../commonengine/group/bld.inf"
 #include "../commonengineresources/group/bld.inf"
 #include "../PlatformEnv/group/bld.inf"
+#include "../sysutil/group/bld.inf"
 
 PRJ_TESTMMPFILES
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/commonservices/layers.sysdef.xml	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!DOCTYPE SystemDefinition [
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+  name CDATA #REQUIRED
+  schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED
+  span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset 
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED  
+  span CDATA #IMPLIED
+  level CDATA #IMPLIED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+  name CDATA #REQUIRED
+  level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+  unitID ID #REQUIRED
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  bldFile CDATA #REQUIRED
+  priority CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+  name CDATA #REQUIRED
+  version CDATA #REQUIRED
+  late (Y|N) #IMPLIED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+  name ID #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+  name ID #REQUIRED
+  abldTarget CDATA #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+  name ID #REQUIRED
+  abldOption CDATA #REQUIRED
+  description CDATA #REQUIRED
+  enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+  command CDATA #REQUIRED
+  targetList IDREFS #IMPLIED
+  unitParallel (Y | N | y | n) #REQUIRED
+  targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+  name CDATA #REQUIRED
+  cwd CDATA #REQUIRED
+  command CDATA #REQUIRED>
+  <!ENTITY layer_real_source_path "sf/os/devicesrv/commonservices" >
+]>
+
+<SystemDefinition name="Dvscode" schema="1.4.0">
+  <systemModel>
+    <layer name="os_layer">
+		<module name="DeviceSrv_NCP">
+			<unit name="activitymanager" unitID="sos.activitymanager" bldFile="&layer_real_source_path;/activitymanager/group" mrp="&layer_real_source_path;/activitymanager/group/activitymanager.mrp"/>
+		</module>
+    </layer>
+	
+	<layer name="api_test_layer">
+		<module name="DeviceSrv_NCP">
+			<unit name="activitymanager" unitID="sos.activitymanager_test" bldFile="&layer_real_source_path;/activitymanager/group" mrp="&layer_real_source_path;/activitymanager/group/activitymanager.mrp"/>
+		</module>
+	</layer>
+
+  </systemModel>
+</SystemDefinition>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/commonservices/sysutil/layers.sysdef.xml	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!DOCTYPE SystemDefinition [
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+  name CDATA #REQUIRED
+  schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED
+  span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset 
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED  
+  span CDATA #IMPLIED
+  level CDATA #IMPLIED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+  name CDATA #REQUIRED
+  level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+  unitID ID #REQUIRED
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  bldFile CDATA #REQUIRED
+  priority CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+  name CDATA #REQUIRED
+  version CDATA #REQUIRED
+  late (Y|N) #IMPLIED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+  name ID #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+  name ID #REQUIRED
+  abldTarget CDATA #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+  name ID #REQUIRED
+  abldOption CDATA #REQUIRED
+  description CDATA #REQUIRED
+  enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+  command CDATA #REQUIRED
+  targetList IDREFS #IMPLIED
+  unitParallel (Y | N | y | n) #REQUIRED
+  targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+  name CDATA #REQUIRED
+  cwd CDATA #REQUIRED
+  command CDATA #REQUIRED>
+  <!ENTITY layer_real_source_path "sf/os/devicesrv/commonservices/sysutil" >
+]>
+
+<SystemDefinition name="Dvscode" schema="1.4.0">
+  <systemModel>
+    <layer name="os_layer">
+		<module name="DeviceSrv_DFS">
+			<unit name="sysutil" unitID="sos.sysutil" bldFile="&layer_real_source_path;/group" mrp="&layer_real_source_path;/group/sysutil.mrp"/>
+		</module>
+    </layer>
+	
+	<layer name="api_test_layer">
+		<module name="DeviceSrv_DFS">
+			<unit name="sysutil" unitID="sos.sysutil_test" bldFile="&layer_real_source_path;/group" mrp="&layer_real_source_path;/group/sysutil.mrp"/>
+		</module>
+	</layer>
+
+  </systemModel>
+</SystemDefinition>
\ No newline at end of file
--- a/commonservices/sysutil/src/sysutil.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/src/sysutil.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -834,7 +834,7 @@
 	_LIT( KWildCardChar, "*" );
 	
 	RFs fs;
-	fs.Connect();
+	User::LeaveIfError( fs.Connect() );
 	CleanupClosePushL( fs );
 	
 	// Get the localised version of deviceattributes.ini, if available, and use
Binary file commonservices/sysutil/test/data/lang_test.txt has changed
Binary file commonservices/sysutil/test/data/langsw_test.txt has changed
Binary file commonservices/sysutil/test/data/purpose_test.txt has changed
Binary file commonservices/sysutil/test/data/sw_test.txt has changed
--- a/commonservices/sysutil/test/data/te_sysutildata.ini	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/data/te_sysutildata.ini	Tue Aug 31 16:29:05 2010 +0300
@@ -822,7 +822,7 @@
 ModelNameError = 0
 
 ModelCode = Symbian
-ModelCodeError = 1
+ModelCodeError = 0
 
 RevisionID = 001.234
 RevisionIDError = 0
@@ -830,8 +830,8 @@
 DefaultDeviceName = Symbian
 DefaultDeviceNameError = 1
 
-UIPlatformName = Symbian
-UIPlatformNameError = 1
+UIPlatformName = S60
+UIPlatformNameError = 0
 
 UIPlatformVersion = 654.987
 UIPlatformVersionStringError = 0
--- a/commonservices/sysutil/test/tef/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/tef/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -62,6 +62,10 @@
 ../../data/lang_valid.txt														z:/resource/versions/lang_valid.txt
 ../../data/langsw_valid.txt														z:/resource/versions/langsw_valid.txt
 ../../data/purpose_valid.txt													z:/resource/versions/purpose_valid.txt
+../../data/sw_test.txt															z:/resource/versions/test/sw.txt
+../../data/lang_test.txt														z:/resource/versions/test/lang.txt
+../../data/langsw_test.txt														z:/resource/versions/test/langsw.txt
+../../data/purpose_test.txt														z:/resource/versions/test/purpose.txt
 
 ../../data/deviceattributes_empty_file.ini										z:/resource/versions/deviceattributes_empty_file.ini
 ../../data/deviceattributes_invalid_format.ini									z:/resource/versions/deviceattributes_invalid_format.ini
--- a/commonservices/sysutil/test/tef/group/te_sysutilteftests.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/tef/group/te_sysutilteftests.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -44,10 +44,14 @@
 #define SYSUTIL_Z_DRIVE_FILES_PRESENT
 data = EPOCROOT##epoc32\data\z\resource\versions\lang.txt										\resource\versions\lang.txt
 data = EPOCROOT##epoc32\data\z\resource\versions\langsw.txt										\resource\versions\langsw.txt
-data = EPOCROOT##epoc32\data\z\resource\versions\sw.txt											\resource\versions\sw.txt
 data = EPOCROOT##epoc32\data\z\resource\versions\purpose.txt									\resource\versions\purpose.txt
 #endif
 
+data = EPOCROOT##epoc32\data\z\resource\versions\test\lang.txt									\resource\versions\test\lang.txt
+data = EPOCROOT##epoc32\data\z\resource\versions\test\langsw.txt								\resource\versions\test\langsw.txt
+data = EPOCROOT##epoc32\data\z\resource\versions\test\sw.txt									\resource\versions\test\sw.txt
+data = EPOCROOT##epoc32\data\z\resource\versions\test\purpose.txt								\resource\versions\test\purpose.txt
+
 data = EPOCROOT##epoc32\data\z\resource\versions\nocontent\lang.txt								\resource\versions\nocontent\lang.txt
 data = EPOCROOT##epoc32\data\z\resource\versions\nocontent\langsw.txt							\resource\versions\nocontent\langsw.txt
 data = EPOCROOT##epoc32\data\z\resource\versions\nocontent\sw.txt								\resource\versions\nocontent\sw.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/commonservices/sysutil/test/tef/group/te_sysutilteftests.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,28 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SysUtilTefTests EN"}
+
+; Vendor name
+: "SysUtilTefTests"
+
+"\sf\os\devicesrv\commonservices\sysutil\test\tef\group\te_sysutilteftests.script"-"c:\devicesrv\sysutiltest\te_sysutilteftests.script"
--- a/commonservices/sysutil/test/tef/te_sysutilburtestsuite/src/te_sysutiltestversioninfo.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/tef/te_sysutilburtestsuite/src/te_sysutiltestversioninfo.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -98,9 +98,13 @@
 */
 void CSysUtilTestVersionInfoStep::TestAllAPIsL()
 	{
-	SetTestPath(EFalse);
-	
-	TBool passed = ETrue;
+    TBool passed = ETrue;
+	TInt error = SetTestPath(ETrue);
+	if(KErrNone != error)
+	    {
+	    RDebug::Printf("Setting test path to ETrue failed with error %d", error);
+	    passed = EFalse;
+	    }
 	
 	TBuf16<KSysUtilVersionTextLength> actualValue;
 	RDebug::Printf("Testing SW Version \n");
--- a/commonservices/sysutil/test/tef/te_sysutiltestsuite/scripts/te_sysutiltestsuite.script	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/tef/te_sysutiltestsuite/scripts/te_sysutiltestsuite.script	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,12 +19,15 @@
 
 RUN_UTILS MkDir c:\versions
 
+RUN_UTILS CopyFile z:\resource\versions\test\purpose.txt c:\versions\purpose.txt
+RUN_UTILS MakeReadWrite c:\versions\purpose.txt
+
 START_TESTCASE				SYSLIB-BAFL-CT-4068
 //!@SYMTestCaseID			SYSLIB-BAFL-CT-4068
 //!@SYMTestCaseDesc			To ensure the pr information can be obtained correctly and 
 //!@SYMTestCaseDesc			contains the correct information.
 //!@SYMTestPriority			High
-//!@SYMTestActions			Get the pr information from Z:\resource\versions\purpose.txt 
+//!@SYMTestActions			Get the pr information from Z:\resource\versions\test\purpose.txt 
 //!@SYMTestActions			using the SysUtil::GetPRInformation method and compare it against 
 //!@SYMTestActions			a string literal set in an ini file. The ini file is located 
 //!@SYMTestActions			in z:\testdata\inifiles\.
@@ -34,12 +37,17 @@
 RUN_TEST_STEP 1000 te_sysutiltestsuite SysUtilsGetPRInformation z:\testdata\inifiles\te_sysutildata.ini ResourceFiles
 END_TESTCASE				SYSLIB-BAFL-CT-4068
 
+RUN_UTILS DeleteFile c:\versions\purpose.txt
+
+RUN_UTILS CopyFile z:\resource\versions\test\sw.txt c:\versions\sw.txt
+RUN_UTILS MakeReadWrite c:\versions\sw.txt
+
 START_TESTCASE				SYSLIB-BAFL-CT-4001
 //!@SYMTestCaseID			SYSLIB-BAFL-CT-4001
 //!@SYMTestCaseDesc			To ensure the software version can be obtained correctly and 
 //!@SYMTestCaseDesc			contains the correct information.
 //!@SYMTestPriority			High
-//!@SYMTestActions			Get the software version from Z:\resource\versions\sw.txt 
+//!@SYMTestActions			Get the software version from Z:\resource\versions\test\sw.txt 
 //!@SYMTestActions			using the SysUtil::GetSWVersion method and compare it against 
 //!@SYMTestActions			a string literal set in an ini file. The ini file is located 
 //!@SYMTestActions			in z:\testdata\inifiles\.
@@ -49,13 +57,17 @@
 RUN_TEST_STEP 1000 te_sysutiltestsuite SysUtilsGetSWVersion z:\testdata\inifiles\te_sysutildata.ini ResourceFiles
 END_TESTCASE				SYSLIB-BAFL-CT-4001
 
+RUN_UTILS DeleteFile c:\versions\sw.txt
+
+RUN_UTILS CopyFile z:\resource\versions\test\langsw.txt c:\versions\langsw.txt
+RUN_UTILS MakeReadWrite c:\versions\langsw.txt
 
 START_TESTCASE				SYSLIB-BAFL-CT-4002
 //!@SYMTestCaseID			SYSLIB-BAFL-CT-4002
 //!@SYMTestCaseDesc			To ensure the language software version can be obtained 
 //!@SYMTestCaseDesc			correctly and contains the correct information.
 //!@SYMTestPriority			High
-//!@SYMTestActions			Get the software language version from Z:\resource\versions\langsw.txt 
+//!@SYMTestActions			Get the software language version from Z:\resource\versions\test\langsw.txt 
 //!@SYMTestActions			using the SysUtil::GetLangSWVersion method and compare it 
 //!@SYMTestActions			against a string literal set in an ini file. The ini file is 
 //!@SYMTestActions			located in z:\testdata\inifiles\.
@@ -66,13 +78,17 @@
 RUN_TEST_STEP 1000 te_sysutiltestsuite SysUtilsGetLangSWVersion z:\testdata\inifiles\te_sysutildata.ini ResourceFiles
 END_TESTCASE				SYSLIB-BAFL-CT-4002
 
+RUN_UTILS DeleteFile c:\versions\langsw.txt
+
+RUN_UTILS CopyFile z:\resource\versions\test\lang.txt c:\versions\lang.txt
+RUN_UTILS MakeReadWrite c:\versions\lang.txt
 
 START_TESTCASE				SYSLIB-BAFL-CT-4003
 //!@SYMTestCaseID			SYSLIB-BAFL-CT-4003
 //!@SYMTestCaseDesc			To ensure the language version can be obtained correctly and 
 //!@SYMTestCaseDesc			contains the correct information.
 //!@SYMTestPriority			High
-//!@SYMTestActions			Get the language version from Z:\resource\versions\lang.txt 
+//!@SYMTestActions			Get the language version from Z:\resource\versions\test\lang.txt 
 //!@SYMTestActions			using the SysUtil::GetLangVersion method an compare it against 
 //!@SYMTestActions			a string literal set in an ini file. The ini file is located 
 //!@SYMTestActions			in z:\testdata\inifiles\.
@@ -82,6 +98,8 @@
 RUN_TEST_STEP 1000 te_sysutiltestsuite SysUtilsGetLangVersion z:\testdata\inifiles\te_sysutildata.ini ResourceFiles
 END_TESTCASE				SYSLIB-BAFL-CT-4003
 
+RUN_UTILS DeleteFile c:\versions\lang.txt
+
 
 START_TESTCASE				SYSLIB-BAFL-CT-4004
 //!@SYMTestCaseID			SYSLIB-BAFL-CT-4004
--- a/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/sysutilplugin.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/sysutilplugin.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -33,6 +33,11 @@
 	value.Set(KModelNameValue);
 	aKeys.Append(KModelNameUid.iUid);
 	aValues.AppendL(value);
+
+    _LIT16(KModelCodeValue, "Symbian");
+    value.Set(KModelCodeValue);
+    aKeys.Append(KModelCodeUid.iUid);
+    aValues.AppendL(value);	
 	
 	_LIT16(KRevisionIDValue, "001.234");
 	value.Set(KRevisionIDValue);
--- a/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetlangswversion.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetlangswversion.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,7 @@
  */
 CSysUtilsGetLangSWVersionStep::~CSysUtilsGetLangSWVersionStep()
 	{
+    SetTestPath(EFalse);
 	}
 
 /**
@@ -61,7 +62,7 @@
 
 	version.Insert(0,KDummy);
 
-	TInt fileErr = CheckIsFileExist( _L("Z:\\resource\\versions\\langsw.txt"));
+	TInt fileErr = CheckIsFileExist( _L("C:\\versions\\langsw.txt"));
 
 	if(fileErr == KErrNone)
 		{
@@ -74,7 +75,7 @@
 			}
 		INFO_PRINTF1(_L("Deleted P&S properties successfully."));
 		
-		err = SetTestPath(EFalse);
+		err = SetTestPath(ETrue);
 		if( err != KErrNone )
 			{
 			ERR_PRINTF2(_L("Could not turn test path off. Error = %d"), err);
@@ -113,7 +114,11 @@
 			if (version.Compare(testBuf)!=0)
 				{
 				ERR_PRINTF1(_L("software language formatted incorrectly"));
-				INFO_PRINTF1(testBuf);
+				ERR_PRINTF1(_L("From ini file: "));
+				ERR_PRINTF1(testBuf);
+				ERR_PRINTF1(_L("From txt file: "));
+				ERR_PRINTF1(version);
+				ERR_PRINTF2(_L("Comparison returned value %d"), version.Compare(testBuf));
 				SetTestStepResult(EFail);
 				}
 			else
@@ -132,6 +137,7 @@
 		SetTestStepResult(EFail);
 		}
 		
+	SetTestPath(EFalse);
 	return TestStepResult(); 	
 	}
 
--- a/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetlangversion.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetlangversion.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,7 @@
 CSysUtilsGetLangVersionStep::~CSysUtilsGetLangVersionStep()
 
 	{
+    SetTestPath(EFalse);
 	}
 
 /**
@@ -63,7 +64,7 @@
 	
 	version.Insert(0,KDummy);
 	
-	TInt fileErr = CheckIsFileExist( _L("Z:\\resource\\versions\\lang.txt"));
+	TInt fileErr = CheckIsFileExist( _L("C:\\versions\\lang.txt"));
 	
 	/* This test is not valid if file does not exist
 	 * Reason for missing file is that "english engineering" package
@@ -80,7 +81,7 @@
 			}
 		INFO_PRINTF1(_L("Deleted P&S properties successfully."));
 		
-		err = SetTestPath(EFalse);
+		err = SetTestPath(ETrue);
 		if( err != KErrNone )
 			{
 			ERR_PRINTF2(_L("Could not turn test path off. Error = %d"), err);
@@ -119,7 +120,11 @@
 			if (version.Compare(testBuf)!=0)
 				{
 				ERR_PRINTF1(_L("language version formatted incorrectly"));
+				INFO_PRINTF1(_L("From ini file: "));
 				INFO_PRINTF1(testBuf);
+				INFO_PRINTF1(_L("From txt file: "));
+				INFO_PRINTF1(version);
+				INFO_PRINTF2(_L("Comparison returned value %d"), version.Compare(testBuf)); 
 				SetTestStepResult(EFail);
 				}
 			else
@@ -137,7 +142,8 @@
 		ERR_PRINTF1(_L("Lang.txt is missing, should be included to base packets"));
 		SetTestStepResult(EFail);
 		}
-
+	
+	SetTestPath(EFalse);
 	return TestStepResult();
 	}
 
--- a/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetprinformation.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetprinformation.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// 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,7 @@
  */
 CSysUtilsGetPRInformationStep::~CSysUtilsGetPRInformationStep()
 	{
+    SetTestPath(EFalse);
 	}
 
 /**
@@ -62,8 +63,7 @@
 	TBuf16<KSysUtilVersionTextLength> version;
 	version.Insert(0,KDummy);
 	
-	TInt fileErr = CheckIsFileExist( _L("Z:\\resource\\versions\\purpose.txt"));
-
+	TInt fileErr = CheckIsFileExist( _L("C:\\versions\\purpose.txt"));
 	if(fileErr == KErrNone)
 		{
 		err = DeletePSProperties();
@@ -75,7 +75,7 @@
 			}
 		INFO_PRINTF1(_L("Deleted P&S properties successfully."));
 		
-		err = SetTestPath(EFalse);
+		err = SetTestPath(ETrue);
 		if( err != KErrNone )
 			{
 			ERR_PRINTF2(_L("Could not turn test path off. Error = %d"), err);
@@ -112,7 +112,11 @@
 	        if (version.Compare(testBuf)!=0)
 				{
 				ERR_PRINTF1(_L("PR Information formatted incorrectly"));
-				INFO_PRINTF1(testBuf);
+				INFO_PRINTF1(_L("From ini file: "));
+                INFO_PRINTF1(testBuf);
+                INFO_PRINTF1(_L("From txt file: "));
+                INFO_PRINTF1(version);
+                INFO_PRINTF2(_L("Comparison returned value %d"), version.Compare(testBuf));
 				SetTestStepResult(EFail);
 				}
 			else
@@ -130,6 +134,8 @@
 		ERR_PRINTF1(_L("purpose.txt is missing, should be included to base packets"));
 		SetTestStepResult(EFail);
 		}
+	
+	err = SetTestPath(EFalse);
 
 	return TestStepResult();
 	}
--- a/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetswversion.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetswversion.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,7 @@
  */
 CSysUtilsGetSWVersionStep::~CSysUtilsGetSWVersionStep()
 	{
+    SetTestPath(EFalse);
 	}
 
 /**
@@ -61,7 +62,7 @@
 	TBuf16<KSysUtilVersionTextLength> version;
 	version.Insert(0,KDummy);
 	
-	TInt fileErr = CheckIsFileExist( _L("Z:\\resource\\versions\\sw.txt"));
+	TInt fileErr = CheckIsFileExist( _L("C:\\versions\\sw.txt"));
 
 	if(fileErr == KErrNone)
 		{
@@ -74,7 +75,7 @@
 			}
 		INFO_PRINTF1(_L("Deleted P&S properties successfully."));
 		
-		err = SetTestPath(EFalse);
+		err = SetTestPath(ETrue);
 		if( err != KErrNone )
 			{
 			ERR_PRINTF2(_L("Could not turn test path off. Error = %d"), err);
@@ -113,7 +114,11 @@
 	        if (version.Compare(testBuf)!=0)
 				{
 				ERR_PRINTF1(_L("software version formatted incorrectly"));
-				INFO_PRINTF1(testBuf);
+				INFO_PRINTF1(_L("From ini file: "));
+                INFO_PRINTF1(testBuf);
+                INFO_PRINTF1(_L("From txt file: "));
+                INFO_PRINTF1(version);
+                INFO_PRINTF2(_L("Comparison returned value %d"), version.Compare(testBuf));
 				SetTestStepResult(EFail);
 				}
 			else
@@ -131,7 +136,8 @@
 		ERR_PRINTF1(_L("sw.txt is missing, should be included to base packets"));
 		SetTestStepResult(EFail);
 		}
-
+	
+	SetTestPath(EFalse);
 	return TestStepResult();
 	}
 
--- a/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsoomtest.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsoomtest.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -79,7 +79,14 @@
 	TBuf16<KSysUtilVersionTextLength> version;
 	version.Insert(0,kDummy);
 	
-	TInt err = DeletePSProperties();
+	TInt err = SetTestPath(EFalse);
+	if(err != KErrNone)
+	    {
+	    WARN_PRINTF2(_L("Could not set test path to EFalse. Error = %d"), err);
+	    SetTestStepResult(EAbort);
+	    return TestStepResult();
+	    }
+	err = DeletePSProperties();
 	if(err != KErrNone)
 		{
 		WARN_PRINTF2(_L("Could not delete P&S properties. Error = %d"), err);
--- a/devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp	Tue Aug 31 16:29:05 2010 +0300
@@ -2,6 +2,5 @@
 source   \sf\os\devicesrv\devicesrv_info\devicesrv_metadata 
 source   \sf\os\devicesrv\package_definition.xml
 source   \sf\os\devicesrv\distribution.policy.s60
-source   \sf\os\devicesrv\package_definition_v2.xml
 notes_source      \component_defs\release.src
 ipr T 
--- a/devicesrv_plat/accessory_key_event_handling_api/inc/RemConKeyEventData.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/accessory_key_event_handling_api/inc/RemConKeyEventData.h	Tue Aug 31 16:29:05 2010 +0300
@@ -22,7 +22,9 @@
 #define TREMCONKEYEVENTDATA_H
 
 //  INCLUDES
+#ifndef __KERNEL_MODE__
 #include <e32std.h>
+#endif
 
 // CONSTANTS
 
--- a/devicesrv_plat/accessory_policy_definitions_api/inc/AccPolCommonNameValuePairs.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/accessory_policy_definitions_api/inc/AccPolCommonNameValuePairs.h	Tue Aug 31 16:29:05 2010 +0300
@@ -293,8 +293,27 @@
 // I/O Type:      From terminal to accessory.
 // Description:   Gets value(s) of specific Audio Control object(s).
 //                Sets value(s) for specific Audio Control object(s).
+// Bitmask:       000000 00000 10010
+const TUint32 KAccAudioControl = 0x0012;
+
+// REQ-417-64804: In-Car optimized Device
+// Name:          RTP Streaming
+// Value:         N/A
+// Dynamic Type:  Static
+// I/O:           From accessory to terminal, input.
+// Description:   indicates that accessory supports RPT streaming channel for audio data.
 // Bitmask:       000000 00000 10011
-const TUint32 KAccAudioControl = 0x0012;
+const TUint32 KAccRTPStreaming = 0x0013;
+// REQ-417-64804: In-Car optimized Device
+
+// Name:          FM Antenna Support
+// Value:         N/A
+// Dynamic Type:  Static
+// I/O:           From accessory to terminal, input.
+// Description:   indicates that accessory has FM antenna support for audio data.
+// Bitmask:       000000 00000 10100
+const TUint32 KAccFMAntennaSupport = 0x0014;
+
 
 // CAR KIT SB NAME-VALUE PAIRS:
 
--- a/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiocontrolbase.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiocontrolbase.h	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiounitbase.h	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolterminalbase.h	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectbase.h	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectcon.h	Tue Aug 31 16:29:05 2010 +0300
@@ -34,7 +34,7 @@
     /**
      * Destructor.
      */
-    virtual ~CAccPolObjectCon();                              
+    IMPORT_C virtual ~CAccPolObjectCon();                              
     
     /**
      * Resets the object container.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/devicesrv_plat/autoaudio_plugin_api/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* 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:  Exports the files of Automotive Audio Plugin API.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/autoaudiopskeys.h       OS_LAYER_PLATFORM_EXPORT_PATH(autoaudiopskeys.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/devicesrv_plat/autoaudio_plugin_api/inc/autoaudiopskeys.h	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* 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:  Provides P&S Key Defintions for Autoaudio ASY
+*
+*/
+
+#ifndef _AUTOAUDIO_PS_KEYS_
+#define _AUTOAUDIO_PS_KEYS_
+
+#include <e32std.h>
+
+/// header for defining P&S keys for automotive audio use cases
+/// accessory server is responsible for defining below P&S keys during start-up
+/// Automotive Server is responsible for publishing key values
+
+/// key for monitoring the connection status of RTP Streaming
+/// client : AutoAudio ASY, publisher : automotive server
+/// value : TPSAutoAudioConnectionStatus
+const TUint KPSAutoKeyRTPStreamingConnectionStatus = 0x2; 
+
+enum TPSAutoAudioConnectionStatus 
+{
+    EAudioConnectionStatusNone,	         // Notifies Accessory Disconnection
+    EAudioConnectionStatusUnidirectional, // application sound only
+    EAudioConnectionStatusBidirectional   // application sound + phone call
+};
+
+
+/// key for monitoring the connection status of USB Audio
+/// client : accessory FW, publisher : USB audio class controller
+/// value : TPSAutoAudioConnectionStatus
+// const TUint KPSAutoKeyUSBAudioConnectionStatus = 0x3; 
+
+/// key for monitoring the successful launch of USB Audio.
+/// client : USB audio class controller, publisher : USB Audio streaming implementation
+/// value : TPSAutoAudioRunningStatus
+// const TUint KPSAutoKeyUSBAudioRunningStatus = 0x4;
+
+#endif // _AUTOAUDIO_PS_KEYS_
--- a/devicesrv_plat/ddc_access_api/inc/ddc_access.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/ddc_access_api/inc/ddc_access.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -11,9 +11,57 @@
 *
 * Contributors:
 *
-* Description:  This API provides access to the display driver.
+* Description: API for DDC (E-EDID and displayID) read from DVI/HDMI display
 *
 */
+/*
+
+
+
+
+
+
+
+            ddc_access.dll
+            ----------------
+
+            SW Include Document - C++
+
+
+
+
+
+
+
+
+Module name:    ddc_access.dll
+
+Filename:       ddc_access.h
+
+Working copy:   ddc_access
+
+*  Continuus version  :
+*   %version: 2 %,
+    %date_modified: Thu May 06 12:35:27 2010 %
+
+---------------------------------------------------------------------------*/
+/**
+
+  @mainpage
+  @section intro_sec Introduction
+
+  <p>This is adaptation component which hides hw-drivers from users.
+     Because this is adaptation API, and user is also adaptation, this
+     API is not binary compatible, only source compatible.</p>
+
+  <p>API for DDC (E-EDID and displayID) read from DVI/HDMI display.</p>
+
+  <p>@see EDDCv1_2.pdf/DisplayIDv1.pdf/EEDIDrAr2.pdf (or newer) for more details</p>
+
+*/
+/** @file
+
+*///=========================================================================
 
 
 #ifndef __DDC_ACCESS_H__
@@ -22,18 +70,23 @@
 
 //- Include Files  ----------------------------------------------------------
 
-#include <e32base.h>
+#ifndef __KERNEL_MODE__
+ #include <e32base.h>
+#else
+ #include <e32cmn.h>
+#endif //__KERNEL_MODE__
 
 //- Enumerations and consts -------------------------------------------------
 
 /** API version number:
+ 2:  __KERNEL_MODE__ definitions, capability ECapabilityReadDeviceData
  1:  First version */
 const TUint KDdcAccessVersion = 1;
 
-///One DDC segment size
+///One DDC segment size. See that EDID block size is just 128 bytes, so base-EDID read might contain one EDID extension
 const TUint KSizeOfSegment = 256;
 
-/** One data block array, See that EDID block size is just 128 bytes, so one read contains one EDID extension (if exists) */
+/** One data block array */
 typedef TUint8 TDataBlock[ KSizeOfSegment ];
 
 ///DDC port enumerations
@@ -69,6 +122,7 @@
 
 
 //- Class Definitions -------------------------------------------------------
+#ifndef __KERNEL_MODE__
 
 /**
 Adaptation API for VESA's E-DDC (Enhanced Display Data Channel) raw read
@@ -94,20 +148,19 @@
 
             DisplayID is "second generation" of EDID, and it is proposed to be used.
 
-            See the method reads one TDataBlock, and it size is double of one EDID block,
-            so the first EDID read might get base-EDID and first extension, if exists.
-            With variable size DisplayID, method reads anyway whole size of TDataBlock,
-            even DisplayID section is smaller.
+            The method reads one TDataBlock, and its size is double of one EDID block,
+            so the first EDID read might get base-EDID and first extension, if such exists.
+            With variable size DisplayID, method reads the whole size of TDataBlock anyway,
+            even if DisplayID section is smaller.
 
-            @param  aDdcPort            DDC port which to be read
-            @param  aBlockNumber        Datablock which to be read (parameter maps to segment-register 0x60)
+            @param  aDdcPort            DDC port which needs to be read
+            @param  aBlockNumber        Datablock which needs to be read (parameter maps to segment-register 0x60)
             @param  aDataBlock          Method fills this with read values. Ensure that this data exists all the time, be careful if local variable.
             @param  aCompletedWhenRead  Will be completed when ready, if no errors, then aDataBlock contains read values
             @return KErrNone if success */
         virtual TInt Read(TDdcPort aDdcPort, TUint aBlockNumber, TDataBlock& aDataBlock, TRequestStatus& aCompletedWhenRead) = 0;
 
-        /** Cancels all TRequestStatuses.
-            @return KErrNone if success */
+        /** Cancels all TRequestStatuses. */
         virtual void CancelAll() = 0;
 
     protected:
@@ -117,7 +170,7 @@
         virtual void ConstructL() = 0;
     };
 
-
+#endif //__KERNEL_MODE__
 //- Global Function Prototypes ----------------------------------------------
 
 
--- a/devicesrv_plat/display_language_definition_api/inc/CommonEngineDomainCRKeys.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/display_language_definition_api/inc/CommonEngineDomainCRKeys.h	Tue Aug 31 16:29:05 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/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -68,3 +68,6 @@
 #include "../sensor_data_compensator_plugin_api/group/bld.inf"
 #include "../ddc_access_api/group/bld.inf"
 #include "../tv_out_behaviour_api/group/bld.inf"
+#ifdef FF_AUTOMOTIVESTACK
+#include "../autoaudio_plugin_api/group/bld.inf"
+#endif
--- a/devicesrv_plat/syslangutil_api/inc/syslangutil.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_plat/syslangutil_api/inc/syslangutil.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2000-2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2000-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"
@@ -84,13 +84,67 @@
     IMPORT_C static TInt RestoreSIMLanguage(
         TInt &aLanguage,
         RFs* aFileServerSession = NULL );
+	
+	/**
+    * Changes the Language to the one which is passed as an argument.
+	* @param aLanguageCode  Language to be set .
+    * 
+    * @return returns KErrNone if everything is OK, otherwise returns
+    *           errorcode.
+    */
+	IMPORT_C static TInt SysLangUtil::ChangeLanguage(const TInt aLanguageCode);
+	
+	/**
+    * Changes the region to the one which is passed as an argument.
+	* @param aRegionCode  region code to be set .
+    * 
+    * @return returns KErrNone if everything is OK, otherwise returns
+    *           errorcode.
+    */
+	IMPORT_C static TInt SysLangUtil::ChangeRegion(const TInt aRegionCode);
+	
+	/**
+    * Changes the collation to the one which is passed as an argument.
+    * @param aCollationCode  collation to be set .
+    * 
+    * @return returns KErrNone if everything is OK, otherwise returns
+    *           errorcode.
+    */
+	
+	IMPORT_C static TInt SysLangUtil::ChangeCollation(const TInt aCollationCode);
+	
+	/**
+    * Checks and returns installed regions in a param given.
+    * @param aRegions  Symbian regions as a arrayfixflat<int>, ownership
+    *           given to user, so user must take care of proper cleanup!
+    * @param aFileServerSession Optional file server session handle. If
+    *           omitted, new one will be created.
+    * @return returns KErrNone if everything went OK, otherwise returns
+    *           the errorcode.
+    */
+	IMPORT_C static TInt SysLangUtil::GetInstalledRegions(CArrayFixFlat<TInt>*& aRegions,
+															RFs* aFileServerSession = NULL );
+	
+	/**
+    * Checks and returns installed collations in a param given.
+    * @param aRegions  Symbian collations as a arrayfixflat<int>, ownership
+    *           given to user, so user must take care of proper cleanup!
+    * @param aFileServerSession Optional file server session handle. If
+    *           omitted, new one will be created.
+    * @return returns KErrNone if everything went OK, otherwise returns
+    *           the errorcode.
+    */
+															
+	IMPORT_C static TInt SysLangUtil::GetInstalledCollations(CArrayFixFlat<TInt>*& aCollations,
+															RFs* aFileServerSession = NULL );													
 
 private:
 
     // Utility:
 
     static RFs* CheckFS( RFs* aRFs, TBool &aExist, TInt &aErr );
-
+	static void LoadDllL( const TUint32 aCategory,const TInt aCode, const TDesC& aDllNameBase );
+	static void ReadFileL(CArrayFixFlat<TInt>*& aArray, const TDesC& aFilePath, RFs* aFileServerSession = NULL );
     };
 
 #endif // SYSLANGUTIL_H
--- a/devicesrv_pub/common_platform_security_definitions_api/inc/data_caged_locations.mk	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_pub/common_platform_security_definitions_api/inc/data_caged_locations.mk	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of "Eclipse Public License v1.0"
@@ -44,4 +44,5 @@
 
 DC_BOOTDATA_DIR=\resource\bootdata
 DC_SKINS_DIR=\private\10207114
+DC_QT_TRANSLATIONS_DIR=\resource\qt\translations
 
--- a/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_path_literals.hrh	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_path_literals.hrh	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -58,6 +58,7 @@
 _LIT(KDC_WINDOW_SERVER_INI_DIR,"\\private\\10003b20\\");          //  Window server INI
 _LIT(KDC_SKINS_DIR,"\\private\\10207114\\");         		  //  Skins
 _LIT(KDC_BOOTDATA_DIR,"\\resource\\bootdata\\");         	  //  Bootdata
+_LIT(KDC_QT_TRANSLATIONS_DIR,"\\resource\\qt\\translations\\");   //Qt Localization
 
 #endif
 
--- a/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths.hrh	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths.hrh	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -57,6 +57,7 @@
 #define  WINDOW_SERVER_INI_DIR   private/10003b20
 #define  SKINS_DIR               private/10207114
 #define  BOOTDATA_DIR            resource/bootdata
+#define  QT_TRANSLATIONS_DIR     resource/qt/translations
 
 #endif
 
--- a/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths_for_iby.hrh	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths_for_iby.hrh	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -57,7 +57,7 @@
 define  WINDOW_SERVER_INI_DIR   private/10003b20
 define  SKINS_DIR               private/10207114
 define  BOOTDATA_DIR            resource/bootdata
-
+define  QT_TRANSLATIONS_DIR     resource/qt/translations
 
 #endif
 
--- a/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths_strings.hrh	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths_strings.hrh	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -57,5 +57,6 @@
 #define  WINDOW_SERVER_INI_DIR   "\\private\\10003b20"
 #define  SKINS_DIR               "\\private\\10207114"
 #define  BOOTDATA_DIR            "\\resource\\bootdata"
+#define  QT_TRANSLATIONS_DIR     "\\resource\\qt\\translations"
 
 #endif
--- a/devicesrv_pub/platform_path_definitions_api/inc/platform_paths.hrh	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrv_pub/platform_path_definitions_api/inc/platform_paths.hrh	Tue Aug 31 16:29:05 2010 +0300
@@ -11,171 +11,7 @@
 *
 * Contributors:
 *
-* Description:  Predefined include paths to be used in the mmp-files for the 
-*                components in the layered model. There is one definition for
-*                each layer. The mmp-file should use the statement that is 
-*                intended for the same layer as where the mmp-file resides.
-*
-*                There is also macros to be used in the bld.inf-files to 
-*                export of Public  and Platform headers into 
-*                correct locations. 
-*
-* Usage examples:
-*     ---------------------------------------------
-*      How to include this file in bld.inf and mmp-files.
-*       Reasoning: The build system is such that at the time the 
-*                  bld.inf and mmp-files are "compiled" the available
-*                  include paths are limited. Only the /epoc32/include
-*                  can be guaranteed. Thus to get this file available
-*                  you need to make include relative to the mentioned
-*                  directory. 
-*     ---------------------------------------------
-*
-*      #include <platform_paths.hrh>
-*    
-*     *************************************************************
-*     * MMP file related macro usages to add the system include paths
-*     * 
-*     * The include paths has to be related to the layer in which your SW 
-*     * resides. Thus as an example: a component residing in middleware
-*     * layer should use the MW specific macro.
-*     * Keep this as a separate line in the mmp-files. If you need to
-*     * add your own SYSTEMINCLUDE paths, please defined them as
-*     * separate statement.
-*     *************************************************************
-*         APP_LAYER_SYSTEMINCLUDE
-*         MW_LAYER_SYSTEMINCLUDE
-*         OS_LAYER_SYSTEMINCLUDE
-**
-*     *************************************************************
-*     * Macros related to using various parts of stdapis
-*     *************************************************************
-*       To use STLLIB you need to have this in your mmp-file
-*         STLLIB_USAGE_DEFINITIONS
-*
-*       Depending on what module you are using from stdapis you need to have
-*       one or more of the following macros in your mmp-file (every one in 
-*       separate line !)
-*
-*          OS_LAYER_LIBC_SYSTEMINCLUDE
-*          OS_LAYER_GLIB_SYSTEMINCLUDE
-*          OS_LAYER_SSL_SYSTEMINCLUDE
-*          OS_LAYER_STDCPP_SYSTEMINCLUDE
-*          OS_LAYER_BOOST_SYSTEMINCLUDE
-*          OS_LAYER_DBUS_SYSTEMINCLUDE
-*          OS_LAYER_LIBUTILITY_SYSTEMINCLUDE
-*
-*     *************************************************************
-*     * Macros related to exporting Public and Platform APIs into 
-*     * correct place in the new system. 
-*     *
-*     * The macro that you should use depends on 2 things:
-*     *  - in which layer your package, which exports the APIs resides
-*     *  - what is the visibility of the API (public or platform)
-*     *************************************************************
-*      // the exporting of public APIs should use one of below macros
-*      // depending on which layer the API belogs to
-*      APP_LAYER_PUBLIC_EXPORT_PATH
-*      MW_LAYER_PUBLIC_EXPORT_PATH
-*      OS_LAYER_PUBLIC_EXPORT_PATH
-*
-*      // the exporting of platform APIs should use one of below macros
-*      // depending on which layer the API belogs to
-*      APP_LAYER_PLATFORM_EXPORT_PATH
-*      MW_LAYER_PLATFORM_EXPORT_PATH
-*      OS_LAYER_PLATFORM_EXPORT_PATH
-*
-*      The hierarchy how APIs should reside in foundation has been specified
-*      in developer documentation. See further details from documentation.
-*      Below is example case relying on the structure
-*        my_own_api/group/bld.inf
-*        my_own_api/inc/header1.h
-*        my_own_api/inc/subdir/header2.h
-*  
-*      Assuming that the API is in middleware layer and a public API. 
-*      Then the bld.inf should have the following      
-*        ../inc/header1.h  APP_LAYER_PUBLIC_EXPORT_PATH(header1.h)
-*        ../inc/subdir/header2.h  APP_LAYER_PUBLIC_EXPORT_PATH(subdir/header2.h)
-*  
-*      In the above case the locations are as follow (with current MACRO settings):
-*        header1.h in /epoc32/include/app
-*        header2.h in /epoc32/include/app/subdir
-*
-*
-*     *************************************************************
-*     * Macros related to IBY file exporting
-*     *************************************************************
-*			
-*	    Component bld.inf files need to include platform_paths.hrh, see
-*           beginning of this file on how to do this correctly. Component bld.inf 
-*           files need to use these macros in PRJ_EXPORTS to get their IBY files 
-*           to ROM image.
-*
-*     ---------------------------------------------
-*     Usage for Core image (ROM+ROFS1):
-*     ---------------------------------------------
-*	 // Layer specific specific macros. Use the macro, which is specified
-*        // for the layer, in which your component resides
-*        <somepath>/<file1.iby>  CORE_APP_LAYER_IBY_EXPORT_PATH(<file1.iby>)
-*	 <somepath>/<file2.iby>  CORE_MW_LAYER_IBY_EXPORT_PATH(<file2.iby>)
-*	 <somepath>/<file3.iby>  CORE_OS_LAYER_IBY_EXPORT_PATH(<file3.iby>)
-*
-*	 //stub iby files
-*	 <somepath>/<file4.iby>  CORE_IBY_EXPORT_PATH(stubs,<file4.iby>)
-*	 //tool iby files
-*	 <somepath>/<file5.iby>  CORE_IBY_EXPORT_PATH(tools,<file5.iby>)
-*		
-*     ---------------------------------------------
-*     Usage for Variant image, Language part (ROFS2):
-*     ---------------------------------------------
-*	 // Layer specific specific macros. Use the macro, which is specified
-*        // for the layer, in which your component resides
-*        <somepath>/<file1.iby>  LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(<file1.iby>)
-*	 <somepath>/<file2.iby>  LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(<file2.iby>)
-*	 <somepath>/<file3.iby>  LANGUAGE_OS_LAYER_IBY_EXPORT_PATH(<file3.iby>)			
-*
-*     ---------------------------------------------
-*     Usage for Variant image, Language part  (ROFS2):
-*     ---------------------------------------------
-*	 // Layer specific specific macros. Use the macro, which is specified
-*        // for the layer, in which your component resides
-*        <somepath>/<file1.iby>  CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(<file1.iby>)
-*	 <somepath>/<file2.iby>  CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(<file2.iby>)
-*	 <somepath>/<file3.iby>  CUSTOMER_OS_LAYER_IBY_EXPORT_PATH(<file3.iby>)			
-*
-*     ---------------------------------------------
-*     Usage for Customer Variant image, (ROFS3):
-*     ---------------------------------------------
-*	 // Layer specific specific macros. Use the macro, which is specified
-*        // for the layer, in which your component resides
-*        <somepath>/<f1.iby> CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(<f1.iby>)
-*	 <somepath>/<f2.iby> CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH(<f2.iby>)
-*	 <somepath>/<f3.iby> CUSTOMER_VARIANT_OS_LAYER_IBY_EXPORT_PATH(<f3.iby>)			
-*	
-*
-*     *************************************************************
-*     * Macro related to Exporting localization .loc files into 
-*     * correct place in the system. 
-*     *************************************************************
-*
-*     ---------------------------------------------
-*     Usage for components:
-*     ---------------------------------------------
-*	    Component bld.inf files need to include platform_paths.hrh, see
-*           beginning of this file on how to do this correctly. Component bld.inf 
-*           files need to use these macros in PRJ_EXPORTS to get their loc files 
-*           for localization.
-*     loc files that should be localized by localisation team should be in 
-*     loc-folder in the source tree (see developer guidelines)
-*
-*	 // Layer specific specific macros. Use the macro, which is specified
-*        // for the layer, in which your component resides
-*	 <somepath>/loc/<file>.loc  APP_LAYER_LOC_EXPORT_PATH(<file>.loc)
-*	 <somepath>/loc/<file>.loc  MW_LAYER_LOC_EXPORT_PATH(<file>.loc)
-*	 <somepath>/loc/<file>.loc  OS_LAYER_LOC_EXPORT_PATH(<file>.loc)
-*
-* 
-*
+* Description:
 *
 */
 
@@ -183,403 +19,6 @@
 #ifndef PLATFORM_PATHS_HRH
 #define PLATFORM_PATHS_HRH
 
-/**
-**************************************************************************
-* General comments about the exporting of headers macros
-*  1) The definitions point currently to the old locations. (which makes some 
-*     macros to have same values. The idea is that you can already start using
-*     them now and those will be later on changed => change affects everybody.
-***************************************************************************
-*/
-
-/**
-* ---------------------------------------
-* Location, where the applications layer specific public headers should be exported
-* See usage on top of this hrh-file.
-* ---------------------------------------
-*/
-
-#if __GNUC__ >= 3
-#define APP_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error
-#define APP_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/app/exported
-#else
-#define APP_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error
-#define APP_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/app/##exported
-#endif
-
-/**
-* ---------------------------------------
-* Location, where the applications layer specific platform headers should be exported
-* See usage on top of this hrh-file.
-* ---------------------------------------
-*/
-#if __GNUC__ >= 3
-#define APP_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error
-#define APP_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/app/exported
-#else
-#define APP_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error
-#define APP_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/app/##exported
-#endif
-
-/**
-* ---------------------------------------
-* Location, where the middleware layer specific public headers should be exported
-* See usage on top of this hrh-file.
-* ---------------------------------------
-*/
-#if __GNUC__ >= 3
-#define MW_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error
-#define MW_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/mw/exported
-#else
-#define MW_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error
-#define MW_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/mw/##exported
-#endif
-
-/**
-* ---------------------------------------
-* Location, where the middleware layer specific platform headers should be exported
-* ---------------------------------------
-*/
-#if __GNUC__ >= 3
-#define MW_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error
-#define MW_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/mw/exported
-#else
-#define MW_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error
-#define MW_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/mw/##exported
-#endif
-
-/**
-* ---------------------------------------
-* Location, where the os layer specific public headers should be exported
-* ---------------------------------------
-*/
-#if __GNUC__ >= 3
-#define  OSEXT_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error
-#define  OS_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/exported
-#else
-#define  OSEXT_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error
-#define  OS_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/##exported
-#endif
-
-/**
-* ---------------------------------------
-* Location, where the os specific platform headers should be exported
-* ---------------------------------------
-*/
-#if __GNUC__ >= 3
-#define OSEXT_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error
-#define OS_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/exported
-#else
-#define OSEXT_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error
-#define OS_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/##exported
-#endif
-
-/**
-* ---------------------------------------
-* Location, where the  cenrep excel sheets should be exported
-* Deprecated: should no longer be used. Kept for compability.
-* ---------------------------------------
-*/
-#if __GNUC__ >= 3
-#define CENREP_XLS_EXPORT_PATH(exported) /epoc32/tools/cenrep/data/src/exported
-#else
-#define CENREP_XLS_EXPORT_PATH(exported) /epoc32/tools/cenrep/data/src/##exported
-#endif
-
-/**
-**************************************************************************
-*  General comments about the 3 define statements related to include paths:
-*  1) the /epoc32/include/oem is now defined there for backward compability.
-*     Once the directory is empty, the directory will be removed. However this 
-*     enables us to ensure that if you use these define statements => you do 
-*     not have to remove the statements later on, when the directory no longer 
-*     exists.
-*  2) These statements should be enough in normal cases. For certain specific 
-*     cases you migth need to add some specific directory from /epoc32/include
-*     (for instance /epoc32/include/ecom).
-*     In normal cases the include staments in code should be relative to one of 
-*     the system include paths, but in certain cases, the included files requires
-*     that the subdirectory is also part of the system include paths.
-****************************************************************************
-*/
-
-/**
-* This define statements defines the SYSTEMINCLUDE-line, which is intended to be 
-* used in the mmp-files that are part of the applications-layer. It includes all 
-* the needed directories from the /epoc32/include, that are valid ones for the 
-* application-layer components. 
-*
-* Applications layer is the last one in the list, since most likely the most of 
-* the headers come from middleware or os-layer  => thus they are first.
-*/
-#define APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
- /epoc32/include \
- /epoc32/include/mw \
- /epoc32/include/platform/mw \
- /epoc32/include/platform \
- /epoc32/include/app \
- /epoc32/include/platform/app \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/mw/loc \
- /epoc32/include/platform/app/loc \
- /epoc32/include/platform/loc/sc \
- /epoc32/include/platform/mw/loc/sc \
- /epoc32/include/platform/app/loc/sc
- 
-/**
-* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
-* used in the mmp-files that are part of the middleware-layer. It includes all 
-* the needed directories from the /epoc32/include, that are valid ones for the 
-* middleware-layer components. 
-*/
-#define MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
- /epoc32/include \
- /epoc32/include/mw \
- /epoc32/include/platform/mw \
- /epoc32/include/platform \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/mw/loc \
- /epoc32/include/platform/loc/sc \
- /epoc32/include/platform/mw/loc/sc
-
-/**
-* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
-* used in the mmp-files that are part of the  osextensions-layer. It includes all
-* the needed directories from the /epoc32/include, that are valid ones for the
-* os-layer components. 
-*/
-#define OS_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
- /epoc32/include \
- /epoc32/include/platform \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/loc/sc
-
-// Below statement is Deprecated and the OS_LAYER_SYSTEMINCLUDE-macro has to be
-// used.
-// Removed, use teh OS_LAYER_SYSTEMINCLUDE instead.
-// #define OSEXT_LAYER_SYSTEMINCLUDE OS_LAYER_SYSTEMINCLUDE
-
-/**
-* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
-* used in the mmp-files that are part of the os-layer. This is intended 
-* to be only used by those components which need to use in their mmp-file either
-* kern_ext.mmh or nkern_ext.mmh. Reason is that those
-* 2 files already contain the /epoc32/include  as system include path.
-* 
-*/
-#define OS_LAYER_KERNEL_SYSTEMINCLUDE SYSTEMINCLUDE \
- /epoc32/include/platform
-
-// Below statement is Deprecated and the OS_LAYER_KERNEL_SYSTEMINCLUDE-macro 
-// has to be used.
-// Removed, use the OS_LAYER_KERNER_SYSTEMINCLUDE instead.
-// #define OSEXT_LAYER_KERNEL_SYSTEMINCLUDE OS_LAYER_KERNEL_SYSTEMINCLUDE
-
-/**
-****************************************************************************
-* Definitions that also define the systeminclude paths for various
-* part of stdapis. Each statement has to be in its own line in the using
-* mmp-file. There are be more than 1 statement in single mmp-file.
-****************************************************************************
-*/
-#define OS_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(stdapis)
-
-#define OS_LAYER_GLIB_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0) \
-                                                   OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/glib) \
-                                                   OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/gobject)
-
-
-#define OS_LAYER_SSL_SYSTEMINCLUDE SYSTEMINCLUDE   OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl)
-                  
-#define OS_LAYER_STDCPP_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) 
-
-#define OS_LAYER_BOOST_SYSTEMINCLUDE SYSTEMINCLUDE   OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/boost)
-
-#define OS_LAYER_DBUS_SYSTEMINCLUDE SYSTEMINCLUDE    OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0) \
-                                                     OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0/dbus)
-#define OS_LAYER_LIBUTILITY_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility)
-
-#define OS_LAYER_LIBOIL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/liboil)
-
-#define MW_LAYER_GSTREAMER_SYSTEMINCLUDE SYSTEMINCLUDE \
- /epoc32/include/platform/mw/gstreamer/10_18 \
- /epoc32/include/platform/mw/gstreamer/10_18/gst \
- /epoc32/include/platform/mw/gstreamer/10_18/gst/gstcontroller \
- /epoc32/include/stdapis/machine
-
-// You need to add STLLIB_USAGE_DEFINITIONS as a separate line into your mmp-file, if you are using
-// the stllib. 
-#define STLLIB_USAGE_DEFINITIONS OPTION CW -wchar_t on\
-        MACRO _WCHAR_T_DECLARED
-
-
-/**
-****************************************************************************
-* Definitions that also define the paths to the layer specific source directories.
-****************************************************************************
-*/
-/**
-* The below 3 macros define the paths to the layer-specific source dirs.
-* See usage on top of this hrh-file, these are used the same way as 
-* for instance the OS_LAYER_DOMAIN_EXPORT_PATH
-* Deprecated: is not allowed to be using in Symbian Foundation
-*/
-#if __GNUC__ >= 3
-#define APP_LAYER_SOURCE_PATH(rest)    do not use intentionally generates error in export
-#define MW_LAYER_SOURCE_PATH(rest)     do not use intentionally generates error in export
-#define OSEXT_LAYER_SOURCE_PATH(rest)  do not use intentionally generates error in export
-#else
-#define APP_LAYER_SOURCE_PATH(rest)    do not use intentionally generates error in export
-#define MW_LAYER_SOURCE_PATH(rest)     do not use intentionally generates error in export
-#define OSEXT_LAYER_SOURCE_PATH(rest)  do not use intentionally generates error in export
-#endif
-
-/**
-****************************************************************************
-* Definitions to export IBY files to different folders where they will be taken 
-* to ROM image
-****************************************************************************
-*/
-
-// Following three definitions are used for exporting IBY files to 
-// Core image (ROM+ROFS1). IBY files are exported according to their layer.
-#if __GNUC__ >= 3
-#define CORE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/app/exported
-#define CORE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/mw/exported
-#define CORE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error
-#define CORE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/os/exported
-#define CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/exported
-#else
-#define CORE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/app/##exported
-#define CORE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/mw/##exported
-#define CORE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error
-#define CORE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/os/##exported
-#define CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/##exported
-#endif
-
-// Following three definitions are used for exporting IBY files to Variant image, 
-// Language part (ROFS2). IBY files are exported according to their layer.
-#if __GNUC__ >= 3
-#define LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/app/exported
-#define LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/mw/exported
-#define LANGUAGE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error
-#define LANGUAGE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/os/exported
-#else
-#define LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/app/##exported
-#define LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/mw/##exported
-#define LANGUAGE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error
-#define LANGUAGE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/os/##exported
-#endif
-
-// Following three definitions are used for exporting IBY files to Variant image, (ROFS2). 
-// BY files are exported according to their layer.
-#if __GNUC__ >= 3
-#define CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/app/exported
-#define CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/mw/exported
-#define CUSTOMER_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error
-#define CUSTOMER_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/os/exported
-#else
-#define CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/app/##exported
-#define CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/mw/##exported
-#define CUSTOMER_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error
-#define CUSTOMER_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/os/##exported
-#endif
-
-// Following three definitions are used for exporting IBY files to 
-// Variant Customer part, (ROFS3). IBY files are exported according to 
-// their layer.
-#if __GNUC__ >= 3
-#define CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/app/exported
-#define CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/mw/exported
-#define CUSTOMER_VARIANT_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error
-#define CUSTOMER_VARIANT_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/os/exported
-#else
-#define CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/app/##exported
-#define CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/mw/##exported
-#define CUSTOMER_VARIANT_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error
-#define CUSTOMER_VARIANT_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/os/##exported
-#endif
-
-
-// Following definition is used for exporting tools and stubs IBY files to 
-// Core image.
-#if __GNUC__ >= 3
-#define CORE_IBY_EXPORT_PATH(path,exported)  /epoc32/rom/include/core/path/exported
-#else
-#define CORE_IBY_EXPORT_PATH(path,exported)  /epoc32/rom/include/core/##path##/##exported
-#endif
-
-/**
-* ---------------------------------------
-* Location, where the localization .loc file should be exported
-* ---------------------------------------
-*/
-// Location, where the os layer localization .loc file should be 
-// exported
-#if __GNUC__ >= 3
-// Deprecated: use the OS_LAYER_LOC_EXPORT_PATH instead
-#define OSEXT_LAYER_LOC_EXPORT_PATH(exported) do not use intentionally generates error
-#define OS_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/loc/sc/exported
-
-// Location, where the middleware layer localization .loc file should be 
-// exported
-#define MW_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/mw/loc/sc/exported
-
-// Location, where the application layer localization .loc file should be 
-// exported
-#define APP_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/app/loc/sc/exported
-
-#else
-
-// Deprecated: use the OS_LAYER_LOC_EXPORT_PATH instead
-#define OSEXT_LAYER_LOC_EXPORT_PATH(exported) do not use intentionally generates error
-#define OS_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/loc/sc/##exported
-
-// Location, where the middleware layer localization .loc file should be exported
-#define MW_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/mw/loc/sc/##exported
-
-// Location, where the application layer localization .loc file should be exported
-#define APP_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/app/loc/sc/##exported
-#endif
-
-/**
-* ---------------------------------------
-* Macros for Configuration tool migration. 
-* The below macros define the location under epoc32, where the confml 
-* (Configuration Markup Language) and crml (Central Repository Markup Language) 
-* files should be exported.
-* ---------------------------------------
-*/
-#if __GNUC__ >= 3
-#define CONFML_EXPORT_PATH(file,category)           /epoc32/rom/config/confml_data/category/file
-#define CRML_EXPORT_PATH(file,category)             /epoc32/rom/config/confml_data/category/file
-#define GCFML_EXPORT_PATH(file,category)            /epoc32/rom/config/confml_data/category/file
-#define CONFML_CONFIG_EXPORT_PATH(file,category)    /epoc32/rom/config/confml_data/category/config/file
-#else
-#define CONFML_EXPORT_PATH(file,category)           /epoc32/rom/config/confml_data/##category##/##file
-#define CRML_EXPORT_PATH(file,category)             /epoc32/rom/config/confml_data/##category##/##file
-#define GCFML_EXPORT_PATH(file,category)            /epoc32/rom/config/confml_data/##category##/##file
-#define CONFML_CONFIG_EXPORT_PATH(file,category)    /epoc32/rom/config/confml_data/##category##/config/##file
-#endif
-
-#define APP_LAYER_CONFML(exported)                  CONFML_EXPORT_PATH(exported,s60)
-#define APP_LAYER_CRML(exported)                    CRML_EXPORT_PATH(exported,s60)
-#define APP_LAYER_GCFML(exported)                   GCFML_EXPORT_PATH(exported,s60)
-#define APP_LAYER_CONFML_CONFIG(exported)           CONFML_CONFIG_EXPORT_PATH(exported,s60)
-                                                    
-#define MW_LAYER_CONFML(exported)                   CONFML_EXPORT_PATH(exported,s60)
-#define MW_LAYER_CRML(exported)                     CRML_EXPORT_PATH(exported,s60)
-#define MW_LAYER_GCFML(exported)                    GCFML_EXPORT_PATH(exported,s60)
-#define MW_LAYER_CONFML_CONFIG(exported)            CONFML_CONFIG_EXPORT_PATH(exported,s60)
-       
-// Deprecate: Use the OS_LAYER_* macros instead of OSEXT_LAYER_*                                             
-#define OSEXT_LAYER_CONFML(exported)                do not use intentionally generates error
-#define OSEXT_LAYER_CRML(exported)                  do not use intentionally generates error
-#define OSEXT_LAYER_GCFML(exported)                 do not use intentionally generates error
-#define OSEXT_LAYER_CONFML_CONFIG(exported)         do not use intentionally generates error
-#define OS_LAYER_CONFML(exported)                   CONFML_EXPORT_PATH(exported,s60)
-#define OS_LAYER_CRML(exported)                     CRML_EXPORT_PATH(exported,s60)
-#define OS_LAYER_GCFML(exported)                    GCFML_EXPORT_PATH(exported,s60)
-#define OS_LAYER_CONFML_CONFIG(exported)            CONFML_CONFIG_EXPORT_PATH(exported,s60)
+#include <variant/platform_paths.hrh>
 
 #endif  // end of PLATFORM_PATHS_HRH
--- a/devicesrvapitest/accessorieshaitest/accessories/group/t_accessories.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrvapitest/accessorieshaitest/accessories/group/t_accessories.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -33,12 +33,7 @@
 USERINCLUDE		../inc
 USERINCLUDE		../../common/inc 
 
-SYSTEMINCLUDE	/epoc32/include
-SYSTEMINCLUDE	/epoc32/include/oem
-SYSTEMINCLUDE	/epoc32/include/test
-SYSTEMINCLUDE	/epoc32/include/kernel
-
-
+OS_LAYER_SYSTEMINCLUDE
 
 LIBRARY			euser.lib
 LIBRARY			efsrv.lib
--- a/devicesrvapitest/accessorieshaitest/accessories/inc/t_accessoriesserver.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrvapitest/accessorieshaitest/accessories/inc/t_accessoriesserver.h	Tue Aug 31 16:29:05 2010 +0300
@@ -20,7 +20,7 @@
 #define T_ACCESSORIES_SERVER_H
 
 //EPOC Includes
-#include <testserver2.h>
+#include <test/testserver2.h>
 
 /**
  * This wrapper class extends the test server and creates test server for Accessories
--- a/devicesrvapitest/accessorieshaitest/common/inc/datawrapperbase.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrvapitest/accessorieshaitest/common/inc/datawrapperbase.h	Tue Aug 31 16:29:05 2010 +0300
@@ -20,7 +20,7 @@
 #define DATA_WRAPPER_BASE_H
 
 //	EPOC includes
-#include <datawrapper.h>
+#include <test/datawrapper.h>
 #define SECS_TO_MS(x)  (x*1000000)
 
 _LIT(KConsname,				"Test Console");
--- a/devicesrvapitest/hwrmhaitest/common/inc/DataWrapperBase.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrvapitest/hwrmhaitest/common/inc/DataWrapperBase.h	Tue Aug 31 16:29:05 2010 +0300
@@ -20,7 +20,7 @@
 #define DATA_WRAPPER_BASE_H
 
 //	EPOC includes
-#include <datawrapper.h>
+#include <test/datawrapper.h>
 #define SECS_TO_MS(x)  (x*1000000)
 
 _LIT(KConsname,				"Test Console");
--- a/devicesrvapitest/hwrmhaitest/hwrm/group/T_HWRM.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrvapitest/hwrmhaitest/hwrm/group/T_HWRM.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -35,10 +35,7 @@
 USERINCLUDE		../inc
 USERINCLUDE		../../common/inc 
 
-SYSTEMINCLUDE	/epoc32/include
-SYSTEMINCLUDE	/epoc32/include/oem
-SYSTEMINCLUDE	/epoc32/include/test
-SYSTEMINCLUDE	/epoc32/include/kernel
+OS_LAYER_SYSTEMINCLUDE
 
 LIBRARY			euser.lib
 LIBRARY			efsrv.lib
--- a/devicesrvapitest/hwrmhaitest/hwrm/inc/T_HwrmServer.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/devicesrvapitest/hwrmhaitest/hwrm/inc/T_HwrmServer.h	Tue Aug 31 16:29:05 2010 +0300
@@ -20,7 +20,7 @@
 #define T_HWRM_SERVER_H
 
 //EPOC Includes
-#include <testserver2.h>
+#include <test/testserver2.h>
 
 /**
  * This wrapper class extends the test server and creates test server for Accessories
--- a/dosservices/commondsy/rom/CommonDSY.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/dosservices/commondsy/rom/CommonDSY.iby	Tue Aug 31 16:29:05 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,7 +22,7 @@
 //	CommonDSY.IBY
 
 #ifdef __COMMON_DSY
-file=ABI_DIR\BUILD_DIR\CommonDSY.DLL			SHARED_LIB_DIR\CommonDSY.DLL
+file=ABI_DIR\BUILD_DIR\commondsy.dll			SHARED_LIB_DIR\commondsy.dll
 
 data=ABI_DIR\BUILD_DIR\Z\private\101f6efa\dosserver.ini     \private\101f6efa\dosserver.ini
 
--- a/dosservices/dosserver/rom/dosserver.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/dosservices/dosserver/rom/dosserver.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -19,9 +19,9 @@
 #ifndef __DosServer_IBY__
 #define __DosServer_IBY__
 
-file=ABI_DIR\BUILD_DIR\DosSrv.dll       SHARED_LIB_DIR\DosSrv.dll
-file=ABI_DIR\BUILD_DIR\DosServer.exe    PROGRAMS_DIR\DosServer.exe
-file=ABI_DIR\BUILD_DIR\DSClient.dll     SHARED_LIB_DIR\DSClient.dll
+file=ABI_DIR\BUILD_DIR\dossrv.dll       SHARED_LIB_DIR\dossrv.dll
+file=ABI_DIR\BUILD_DIR\dosserver.exe    PROGRAMS_DIR\dosserver.exe
+file=ABI_DIR\BUILD_DIR\dsclient.dll    SHARED_LIB_DIR\dsclient.dll
 
 #endif  //__DosServer_IBY__
 
--- a/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -32,7 +32,9 @@
 #include "../mediator/group/bld.inf"
 #include "../psmservices/group/bld.inf"
 #include "../resourcemgmt/group/bld.inf"
+#include "../resourceinterfaces/group/bld.inf"
 #include "../sysstatemgmt/group/bld.inf"
+#include "../systemhealthmanagement/systemhealthmgr/group/bld.inf"
 
 
 PRJ_TESTMMPFILES
--- a/hwrmhaptics/hapticsclient/group/hwrmhapticsclient.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/hwrmhaptics/hapticsclient/group/hwrmhapticsclient.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -41,8 +41,8 @@
 OS_LAYER_SYSTEMINCLUDE
 
 LIBRARY         euser.lib
-LIBRARY         ws32.lib
 LIBRARY         ecom.lib
 LIBRARY         hwrmhapticspacketizer.lib 
 LIBRARY         hwrmhapticseffectdatagetterfw.lib
 
+SMPSAFE
--- a/hwrmhaptics/hapticsclient/src/hwrmhapticsimpl.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/hwrmhaptics/hapticsclient/src/hwrmhapticsimpl.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -427,20 +427,11 @@
 
         // send command to haptics server
         if ( KErrNone == err )
-            {
-            if( aDevicePropertyType == EHWRMHapticsLicensekey )
-                {
-                err = iClient.ExecuteOperation( 
+            {            
+            err = iClient.ExecuteOperation( 
                        EHWRMHapticsSetLicenseProp, 
-                       TIpcArgs( &iReqData, aDevicePropertyValue.Length() ) );
-                }
-            else
-                {
-                err = iClient.ExecuteOperation( EHWRMHaptics,  
-                                                TIpcArgs( &iReqData ) );
-                }
-            }
-         
+                       TIpcArgs( &iReqData, aDevicePropertyValue.Length() ) );                     
+	         }
         }
     
     API_TRACE( ( _L( "CHWRMHapticsImpl::SetDeviceProperty() - const TDesC8 overloaded - return %d" ), err ) );
--- a/hwrmhaptics/hapticsclient/src/hwrmhapticssession.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/hwrmhaptics/hapticsclient/src/hwrmhapticssession.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -61,6 +61,7 @@
     // server components
     if ( err == KErrNone )
         {
+		aStatus = KRequestPending;
         SendReceive( EHWRMHapticsService, aStatus );
         }
     else
@@ -115,7 +116,9 @@
                                             TRequestStatus& aStatus ) const
     {
     COMPONENT_TRACE( ( _L( "RHWRMHapticsSession::ExecuteAsyncOperation - commandId(%d), aStatus(%d)" ), aCommand, aStatus.Int() ) );
-    
+
+    aStatus = KRequestPending;
+
     SendReceive( aCommand, aArgs, aStatus );
     
     COMPONENT_TRACE( ( _L( "RHWRMHapticsSession::ExecuteAsyncOperation - return" ) ) );
--- a/hwrmhaptics/hapticseffectdatagetterfw/group/hwrmhapticseffectdatagetterfw.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/hwrmhaptics/hapticseffectdatagetterfw/group/hwrmhapticseffectdatagetterfw.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -36,3 +36,4 @@
 LIBRARY                 euser.lib
 LIBRARY                 ecom.lib
 
+SMPSAFE
--- a/hwrmhaptics/hapticspacketizer/group/hwrmhapticspacketizer.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/hwrmhaptics/hapticspacketizer/group/hwrmhapticspacketizer.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -36,3 +36,5 @@
 LIBRARY         euser.lib
 LIBRARY         ecom.lib
 LIBRARY         centralrepository.lib
+
+SMPSAFE
--- a/hwrmhaptics/hapticspluginmanager/group/hwrmhapticspluginmanager.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/hwrmhaptics/hapticspluginmanager/group/hwrmhapticspluginmanager.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -45,7 +45,7 @@
 USERINCLUDE     ../../hapticsserver/inc
 
 OS_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE /epoc32/include/stdapis
+OS_LAYER_LIBC_SYSTEMINCLUDE
 
 LIBRARY         efsrv.lib
 LIBRARY         estor.lib
@@ -59,3 +59,4 @@
 
 LANG            SC
 
+SMPSAFE
--- a/hwrmhaptics/hapticspluginservice/group/hwrmhapticspluginservice.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/hwrmhaptics/hapticspluginservice/group/hwrmhapticspluginservice.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -36,4 +36,6 @@
 LIBRARY                 bafl.lib
 LIBRARY                 estor.lib
 
+SMPSAFE
+
 // end of file
--- a/hwrmhaptics/hapticsserver/group/hwrmhapticsserver.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/hwrmhaptics/hapticsserver/group/hwrmhapticsserver.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -46,3 +46,5 @@
 LIBRARY         euser.lib
 LIBRARY         ecom.lib
 LIBRARY         hwrmhapticspluginmanager.lib
+
+SMPSAFE
--- a/mediator/data/MediatorDebug.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/mediator/data/MediatorDebug.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -32,4 +32,5 @@
     categories={};
     options=KLogCommands+KLogEvents+KLogParameterData;
     output_file = "mediator.txt";
-    }
\ No newline at end of file
+    }
+
--- a/mediator/inc/Server/MediatorDebug.hrh	Thu Aug 19 11:09:10 2010 +0300
+++ b/mediator/inc/Server/MediatorDebug.hrh	Tue Aug 31 16:29:05 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/inc/Server/MediatorServerObjects.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/mediator/inc/Server/MediatorServerObjects.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2005 - 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"
@@ -827,14 +827,7 @@
         */  
         RPointerArray<MMediatorServerEventObserver>& GetObservers();
         
-        /**
-        * Adds an array of observers to event
-        * @since S60 3.1
-        * @param aObservers reference to observer array
-        * @return None.
-        */      
-        void AddObservers( RPointerArray<MMediatorServerEventObserver>& aObservers );
-        
+              
         /**
         * Gets TEvent structure of the current event
         * @since S60 3.1
--- a/mediator/src/Client/MediatorServerClient.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/mediator/src/Client/MediatorServerClient.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2005-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"
@@ -465,7 +465,7 @@
     command.iCommandId = aCommandId;
     command.iVersion = aVersion;
     //Time out is initiatilized to 0 as its not used on the server side.  
-    //this is just to compress the tool warnings.
+    //this is just to supress the tool warnings.
     command.iTimeout = 0;
     TCommandBuffer commandBuffer( command );
         
@@ -504,6 +504,12 @@
     // And command
     TCommand command;
     command.iCommandId = aCommandId;
+    //All the remaining parameters of TCommand are initiatilized to 0 as its not used on the server side.  
+    //this is just to suppress the tool warnings.
+    command.iVersion = TVersion(0,0,0);
+	command.iCaps.SetEmpty();
+    command.iTimeout = 0;
+
     TCommandBuffer commandBuffer( command );
         
     // Status
@@ -542,6 +548,12 @@
     // And command
     TCommand command;
     command.iCommandId = aCommandId;
+    //All the remaining parameters of TCommand are initiatilized to 0 as its not used on the server side.  
+    //this is just to suppress the tool warnings.
+	command.iVersion = TVersion(0,0,0);
+	command.iCaps.SetEmpty();
+    command.iTimeout = 0;
+
     TCommandBuffer commandBuffer( command );
         
     // Send the command                                 
--- a/mediator/src/Server/MediatorServerObjects.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/mediator/src/Server/MediatorServerObjects.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2005 - 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"
@@ -1079,20 +1079,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CEvent::AddObservers
-// 
-// -----------------------------------------------------------------------------
-//
-void CEvent::AddObservers( RPointerArray<MMediatorServerEventObserver>& aObservers )
-    {
-    // Check that observer does not exists already for this event
-    for (TInt index = 0; index < aObservers.Count(); index++ )
-        {
-        iObservers.Append( aObservers[index] );
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // CEvent::Event
 // Returns EItemEvent
 // -----------------------------------------------------------------------------
--- a/mediator/tsrc/public/basic/src/MediatorTestCases.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/mediator/tsrc/public/basic/src/MediatorTestCases.cpp	Tue Aug 31 16:29:05 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/package_definition.xml	Thu Aug 19 11:09:10 2010 +0300
+++ b/package_definition.xml	Tue Aug 31 16:29:05 2010 +0300
@@ -1,295 +1,468 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <SystemDefinition schema="3.0.0">
-  <package id="devicesrv" name="Device Services" levels="adaptation hw-if plugin framework server app-if">
-    <collection id="accessoryservices" name="Accessory Services" level="framework">
-      <component id="accessorymonitor" filter="s60" name="Accessory Monitor">
-        <unit bldFile="accessoryservices/accessorymonitor/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/accmonconnectionemulator/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/tests/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/accmontesttimer/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/stubs/asystub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/stubs/group"/> -->
-      </component>
-      <component id="accessoryremotecontrol" filter="s60" name="Accessory Remote Control">
-        <unit bldFile="accessoryservices/accessoryremotecontrol/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/dsytesttool/dosservercontrol/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/dsytesttool/dsytfcore/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/dsytesttool/dsytfstifadapter/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/dsytesttool/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/stub/audio/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/stub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/stub/phone/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/stub/remcon/group"/> -->
-      </component>
-      <component id="accessoryserver" filter="s60" name="Accessory Server">
-        <unit bldFile="accessoryservices/accessoryserver/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/dsytesttool/dosservercontrol/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/dsytesttool/dsytfcore/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/dsytesttool/dsytfstifadapter/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/dsytesttool/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/accessorytestcontrol/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/stubs/accfwuinotifierstub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/stubs/asystub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/stubs/btasystub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/stubs/group"/> -->
-      </component>
-      <component id="headsetstatusapi" filter="s60" name="Headset Status API">
-        <unit bldFile="accessoryservices/headsetstatusapi/group"/>
-         <!-- is this test bld.inf needed for the build? -->
-        <!-- <unit bldFile="accessoryservices/headsetstatusapi/tsrc/public/basic/group"/> -->
-      </component>
-      <component id="tspclientmapper" filter="s60" name="TSP Client Mapper">
-        <unit bldFile="accessoryservices/tspclientmapper/group"/>
-         <!-- is this test bld.inf needed for the build? -->
-        <!-- <unit bldFile="accessoryservices/tspclientmapper/tsrc/public/basic/group"/> -->
-      </component>
-      <component id="remotecontrolfw" name="Remote Control Framework" introduced="9.1" purpose="optional">
-        <unit bldFile="accessoryservices/remotecontrolfw/group" mrp="accessoryservices/remotecontrolfw/group/bluetooth_remotecontrol.mrp"/>
-      </component>
-      <component id="gid_pc_tool" filter="s60" name="Generic ID PC Tool" target="desktop" class="tool">
-	<unit bldFile="accessoryservices/gid_pc_tool/group"/>
-      </component>
-    </collection>
-    <collection id="commonservices" name="Common Services" level="app-if">
-      <component id="commonengine" filter="s60" name="Common Engine">
-        <unit bldFile="commonservices/commonengine/group"/>
-         <!-- is this test bld.inf needed for the build? -->
-        <!-- <unit bldFile="commonservices/commonengine/tsrc/public/basic/group"/> -->
-      </component>
-      <component id="commonengineresources" filter="s60" name="Common Engine Resources" class="config">
-        <unit bldFile="commonservices/commonengineresources/group"/>
-      </component>
-      <component id="platformenv" filter="s60" name="Platform Environment">
-        <unit bldFile="commonservices/platformenv/group"/>
-        <!-- <unit bldFile="commonservices/platformenv/disknotifyhandler/group"/> -->
-         <!-- are these bld.infs needed? Can they be included from bld.inf?-->
-        <!-- <unit bldFile="commonservices/platformenv/platformver/group"/> -->
-        <!-- <unit bldFile="commonservices/platformenv/sysversioninfo/group"/> -->
-         <!-- is this test bld.inf needed for the build? -->
-        <!-- <unit bldFile="commonservices/platformenv/tsrc/public/basic/group"/> -->
-      </component>
-      <component id="sysutil" name="System Utilities" purpose="mandatory" introduced="ER5">
-        <unit bldFile="commonservices/sysutil/group" mrp="commonservices/sysutil/group/sysutil.mrp"/>
-      </component>
-      <component id="activitymanager" name="Activity Manager" purpose="mandatory" introduced="ER5">
-        <unit bldFile="commonservices/activitymanager/group" mrp="commonservices/activitymanager/group/activitymanager.mrp"/>
-      </component>
-    </collection>
-    <collection id="dosservices" name="Domestic Operating System Services" level="hw-if">
-      <component id="dosserver" filter="s60" name="Domestic OS Server">
-        <unit bldFile="dosservices/dosserver/group"/>
-      </component>
-      <component id="commondsy" filter="s60" name="Common DSY" class="plugin">
-        <unit bldFile="dosservices/commondsy/group"/>
-      </component>
-      <component id="dosservices_test" filter="s60" purpose="development" name="DOS Services Test">
-        <!-- is this component needed? If so, can these be #included from a single master test bld.inf?-->
-        <!-- <unit bldFile="dosservices/tsrc/dsytesttool/dosservercontrol/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/public/basic/stubs/dsystub/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/public/basic/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/dsytesttool/dsytfcore/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/public/basic/dosservertestplugin/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/dsytesttool/dsytfstifadapter/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/dsytesttool/group"/> -->
-      </component>
-    </collection>
-    <collection id="resourcemgmt" name="Resource Management" level="hw-if">
-      <component id="serverexe" filter="s60" name="Hardware Resource Manager Server">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/serverexe/group"/> -->
-      </component>
-      <component id="hwrmfmtxwatcherplugin" filter="s60" name="HWRM FM Transmitter Watcher Plugin" class="plugin">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component. Should this be purpose="development" -->
-        <!-- <unit bldFile="resourcemgmt/hwrmfmtxwatcherplugin/group"/> -->
-      </component>
-      <component id="clientdll" filter="s60" name="HWRM Client">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/clientdll/group"/> -->
-      </component>
-      <component id="commondll" filter="s60" name="HWRM Common">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/commondll/group"/> -->
-      </component>
-      <component id="vibraclientdll" filter="s60" name="Vibra Client">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/vibraclientdll/group"/> -->
-      </component>
-      <component id="extendedlightclientdll" filter="s60" name="Extended Light Client">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/extendedlightclientdll/group"/> -->
-      </component>
-      <component id="lightclientdll" filter="s60" name="Light Client">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/lightclientdll/group"/> -->
-      </component>
-      <component id="fmtxclientdll" filter="s60" name="FM Transmitter Client">
-       <!-- this needs to be resolved with the equivalent in the fmtransmittercontrol component -->
-        <!-- <unit bldFile="resourcemgmt/fmtxclientdll/group"/> -->
-      </component>
-      <component id="hwrmtargetmodifierplugin" filter="s60" name="HWRM Target Modifier Plugin" class="plugin">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component. Should this be purpose="development" -->
-        <!-- <unit bldFile="resourcemgmt/hwrmtargetmodifierplugin/group"/> -->
-        <!-- <unit bldFile="resourcemgmt/hwrmtargetmodifierplugin/tsrc/hwrmtargetmodifierplugintest/group"/> -->
-      </component>
-      <component id="vibractrl" filter="s60" name="Vibra Control" deprecated="9.1">
-        <unit bldFile="resourcemgmt/vibractrl/group"/>
-      </component>
-      <component id="hwresourcesmgr" name="Hardware Resources Manager" introduced="^2" purpose="optional">
-        <unit bldFile="resourcemgmt/hwresourcesmgr/group" mrp="resourcemgmt/hwresourcesmgr/group/telephony_hwrm.mrp"/>
-      </component>
-      <component id="hwresourcesmgrconfig" name="Hardware Resources Manager Config" introduced="^3" purpose="optional" class="config">
-        <unit bldFile="resourcemgmt/hwresourcesmgrconfig" mrp="resourcemgmt/hwresourcesmgrconfig/telephony_hwrm-config.mrp"/>
-      </component>
-      <component id="resourcemgmt_build" filter="s60" name="Resource Management Build">
-         <!-- need to reconcile this with the above components -->
-        <unit bldFile="resourcemgmt/group"/>
-      </component>
-      <component id="resourcemgmt_test" filter="s60" purpose="development" name="Resource Management Test">
-        <!-- is this component needed?-->
-        <!-- <unit bldFile="resourcemgmt/tsrc/public/basic/group"/> -->
-      </component>
-      <component id="powerandmemorynotificationservice" name="Power and Memory Notification Service" introduced="6.0" purpose="mandatory">
-        <unit bldFile="resourcemgmt/powerandmemorynotificationservice/group" mrp="resourcemgmt/powerandmemorynotificationservice/group/syslibs_pwrcli.mrp"/>
-      </component>
-    </collection>
-    <collection id="hwrmhaptics" name="HWRM Haptics" level="plugin">
-      <component id="hapticseffectdatagetterfw" filter="s60" name="Haptics Effect Data Getter Framework">
-        <unit bldFile="hwrmhaptics/hapticseffectdatagetterfw/group"/>
-      </component>
-      <component id="hapticspluginservice" filter="s60" name="Haptics Plugin Service">
-        <unit bldFile="hwrmhaptics/hapticspluginservice/group"/>
-      </component>
-      <component id="hapticspacketizer" filter="s60" name="Haptics Packetizer">
-        <unit bldFile="hwrmhaptics/hapticspacketizer/group"/>
-      </component>
-      <component id="hapticspluginmanager" filter="s60" name="Haptics Plugin Manager">
-        <unit bldFile="hwrmhaptics/hapticspluginmanager/group"/>
-      </component>
-      <component id="hapticsserver" filter="s60" name="Haptics Server">
-        <unit bldFile="hwrmhaptics/hapticsserver/group"/>
-      </component>
-      <component id="hapticsclient" filter="s60" name="Haptics Client">
-        <unit bldFile="hwrmhaptics/hapticsclient/group"/>
-      </component>
-      <component id="hwrmhaptics_build" filter="s60" name="HWRM Haptics Build">
-        <!-- can these exports be put in the appropriate above components? -->
-        <unit bldFile="hwrmhaptics/group"/>
-      </component>
-    </collection>
-    <collection id="mediator" name="Mediator" level="app-if">
-      <component id="mediator_build" filter="s60" name="Mediator Build">
-        <unit bldFile="mediator/group"/>
-      </component>
-      <component id="mediator_test" filter="s60" purpose="development" name="Mediator Test">
-          <!-- need to have a single unit in this component. Either #include one bld.inf from the other or remove the component -->
-        <!-- <unit bldFile="mediator/tsrc/public/basic/group"/> -->
-        <!-- <unit bldFile="mediator/tsrc/public/basic/stub/group"/> -->
-      </component>
-    </collection>
-    <collection id="psmservices" name="Power Save Mode Services" level="app-if">
-      <component id="psmserver" filter="s60" name="PSM Server">
-        <unit bldFile="psmservices/psmserver/group"/>
-         <!-- is this test bld.inf needed for the build? -->
-        <!-- <unit bldFile="psmservices/psmserver/tsrc/public/basic/group"/> -->
-      </component>
-    </collection>
-    <collection id="sensorservices" name="Sensor Services" level="framework">
-      <component id="sensorserver" filter="s60" name="Sensor Server">
-        <unit bldFile="sensorservices/sensorserver/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/sensortestmodule/condevalstub/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/sensortestmodule/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/sensortestmodule/sensrvcondevalplugin/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/sensortestmodule/ssystub/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/sensortestmodule/stubprocess/group"/> -->
-      </component>
-      <component id="orientationssy" filter="s60" name="Orientation SSY" class="plugin">
-        <unit bldFile="sensorservices/orientationssy/group"/>
-      </component>
-      <component id="tiltcompensationssy" filter="s60" name="Tilt Compensation SSY" class="plugin">
-        <unit bldFile="sensorservices/tiltcompensationssy/group"/>
-      </component>
-      <component id="sensordatacompensator" filter="s60" name="Sensor Data Compensator">
-        <unit bldFile="sensorservices/sensordatacompensator/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="sensorservices/sensordatacompensator/tsrc/sensordatacompensatorpluginstub/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensordatacompensator/tsrc/sensordatacompensatortest/group"/> -->
-      </component>
-    </collection>
-	<collection id="sysstatemgmt" name="System State Management" level="server">
-      <component id="starter" filter="s60" name="Starter">
-        <unit bldFile="sysstatemgmt/starter/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="sysstatemgmt/starter/strtsecnote/group"/> -->
-        <!-- <unit bldFile="sysstatemgmt/starter/strtsecobs/group"/> -->
-      </component>
-      <component id="systemstarter" name="System Starter" introduced="9.1" deprecated="^3" purpose="mandatory">
-        <unit bldFile="sysstatemgmt/systemstarter/group" mrp="sysstatemgmt/systemstarter/group/app-framework_sysstart.mrp"/>
-      </component>
-      <component id="systemstatemgr" name="System State Manager" introduced="^3" purpose="mandatory">
-        <unit bldFile="sysstatemgmt/systemstatemgr/group" mrp="sysstatemgmt/systemstatemgr/group/app-framework_ssma.mrp"/>
-      </component>
-      <component id="systemstateplugins" name="System State Plugins" introduced="^3" purpose="optional" class="plugin">
-        <unit bldFile="sysstatemgmt/systemstateplugins/group" mrp="sysstatemgmt/systemstateplugins/group/app-framework_ssplugins.mrp"/>
-      </component>
-      <component id="systemstatereferenceplugins" name="System State Reference Plugins" introduced="^3" purpose="optional" class="plugin">
-        <unit bldFile="sysstatemgmt/systemstatereferenceplugins/group" mrp="sysstatemgmt/systemstatereferenceplugins/group/app-framework_ssrefplugins.mrp"/>
-      </component>
-      <component id="sysstatemgmt_test" filter="s60" purpose="development" name="System State Management Test">
-        <!-- <unit bldFile="sysstatemgmt/tsrc/public/basic/group"/> -->
-      </component>
-    </collection>
-    <collection id="resourceinterfaces" name="Resource Interfaces" level="hw-if">
-      <component id="fmtransmittercontrol" name="FM Transmitter Control" introduced="^3" purpose="optional">
-        <unit bldFile="resourceinterfaces/fmtransmittercontrol/group" mrp="resourceinterfaces/fmtransmittercontrol/group/telephony_hwrmfmtx.mrp"/>
-      </component>
-    </collection>
-    <collection id="systemhealthmanagement" name="System Health Management" level="server">
-      <component id="systemhealthmgr" name="System Health Manager" introduced="^3" purpose="optional">
-        <unit bldFile="systemhealthmanagement/systemhealthmgr/group" mrp="systemhealthmanagement/systemhealthmgr/group/app-framework_shma.mrp"/>
-      </component>
-    </collection>
-    <collection id="devicesrvapitest" name="Devices Services API Tests" level="app-if">
-      <component id="accessorieshaitest" name="Accessories HAI Tests" introduced="^2" purpose="development" filter="test">
-        <unit mrp="devicesrvapitest/accessorieshaitest/group/accessorieshaitest.mrp" bldFile="devicesrvapitest/accessorieshaitest/group"/>
-      </component>
-      <component id="hwrmhaitest" name="HWRM HAI Tests" introduced="^2" purpose="development" filter="test">
-        <unit mrp="devicesrvapitest/hwrmhaitest/group/hwrmhaitest.mrp" bldFile="devicesrvapitest/hwrmhaitest/group"/>
-      </component>
-    </collection>
-    <collection id="devicesrv_info" name="Device Services Info" level="app-if">
-      <component id="devicesrv_pub" filter="s60" name="Device Services Public Interfaces" class="api">
-        <unit bldFile="devicesrv_pub/group"/>
-        <!-- <unit bldFile="devicesrv_pub/accessory_monitoring_api/tsrc/bc/accmonapibctests/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/feature_discovery_api/tsrc/bc/featurediscovery/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/find_item_api/tsrc/bc/finditem/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/hwrm_power_state_api/tsrc/bc/powerstate/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/light_api/tsrc/bc/light/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/phone_parser_api/tsrc/bc/phoneparser/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/platform_environment_api/tsrc/bc/platformenv/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/sensor_channel_api/tsrc/bc/sensor/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/sensor_data_compensator_api/tsrc/bc/sensordatacompensatortest/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/sysutil_api/tsrc/bc/sysutil/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/text_resolver_api/tsrc/bc/textresolver/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/version_info_api/tsrc/bc/platformvertest/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/vibra_api/tsrc/bc/vibra/group"/> -->
-      </component>
-      <component id="devicesrv_plat" filter="s60" name="Device Services Platform Interfaces" class="api">
-        <unit bldFile="devicesrv_plat/group"/>
-        <!-- <unit bldFile="devicesrv_plat/activity_manager_api/tsrc/group"/> -->
-      </component>
-      <component id="devicesrv_metadata" name="Device Services Metadata" class="config" introduced="^2" purpose="development" target="desktop">
-        <unit mrp="devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp"/>
-      </component>
-    </collection>
-  </package>
+ <package id="devicesrv" name="Device Services" levels="adaptation hw-if plugin framework server app-if">
+  <collection id="devicesrv_pub" name="Device Services Public Interfaces" level="app-if">
+   <component id="platform_path_definitions_api" name="Platform Path Definitions API" class="api" filter="s60,bldmefirst">
+	<!-- this needs to be moved to deviceplatformrelease -->
+    <meta rel="Api" href="devicesrv_pub/platform_path_definitions_api/platform_path_definitions_api.metaxml"/>
+    <unit bldFile="devicesrv_pub/platform_path_definitions_api/group"/>
+   </component>
+   <component id="common_platform_security_definitions_api" name="Common Platform Security Definitions API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_pub/common_platform_security_definitions_api/common_platform_security_definitions_api.metaxml"/>
+    <unit bldFile="devicesrv_pub/common_platform_security_definitions_api/group"/>
+   </component>
+   <component id="feature_discovery_api" name="Feature Discovery API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_pub/feature_discovery_api/feature_discovery_api.metaxml"/>
+    <unit bldFile="devicesrv_pub/feature_discovery_api/group"/>
+   </component>
+   <component id="platform_environment_api" name="Platform Environment API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_pub/platform_environment_api/platform_environment_api.metaxml"/>
+    <unit bldFile="devicesrv_pub/platform_environment_api/group"/>
+   </component>
+   <component id="sensor_channel_api" name="Sensor Channel API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_pub/sensor_channel_api/sensor_channel_api.metaxml"/>
+    <unit bldFile="devicesrv_pub/sensor_channel_api/group"/>
+   </component>
+   <component id="sensor_definitions_api" name="Sensor Definitions API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_pub/sensor_definitions_api/sensor_definitions_api.metaxml"/>
+    <unit bldFile="devicesrv_pub/sensor_definitions_api/group"/>
+   </component>
+   <component id="version_info_api" name="Version Info API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_pub/version_info_api/version_info_api.metaxml"/>
+    <unit bldFile="devicesrv_pub/version_info_api/group"/>
+   </component>
+   <component id="accessory_monitoring_api" name="Accessory Monitoring API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_pub/accessory_monitoring_api/accessory_monitoring_api.metaxml"/>
+    <unit bldFile="devicesrv_pub/accessory_monitoring_api/group"/>
+   </component>
+   <component id="haptics_api" name="Haptics API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_pub/haptics_api/haptics_api.metaxml"/>
+    <unit bldFile="devicesrv_pub/haptics_api/group"/>
+   </component>
+   <component id="sensor_data_compensator_api" name="Sensor Data Compensator API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_pub/sensor_data_compensator_api/sensor_data_compensator_api.metaxml"/>
+    <unit bldFile="devicesrv_pub/sensor_data_compensator_api/group"/>
+   </component>
+  </collection>
+  <collection id="devicesrv_plat" name="Device Services Platform Interfaces" level="app-if">
+   <component id="configuration_file_parser_api" name="Configuration File Parser API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/configuration_file_parser_api/configuration_file_parser_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/configuration_file_parser_api/group"/>
+   </component>
+   <component id="dos_extension_plugin_api" name="DOS Extension Plug-In API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/dos_extension_plugin_api/dos_extension_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/dos_extension_plugin_api/group"/>
+   </component>
+   <component id="mediator_command_initiator_api" name="Mediator Command Initiator API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/mediator_command_initiator_api/mediator_command_initiator_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/mediator_command_initiator_api/group"/>
+   </component>
+   <component id="syslangutil_api" name="SysLangUtil API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/syslangutil_api/syslangutil_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/syslangutil_api/group"/>
+   </component>
+   <component id="wakeup_alarm_api" name="Wakeup Alarm API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/wakeup_alarm_api/wakeup_alarm_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/wakeup_alarm_api/group"/>
+   </component>
+   <component id="disk_and_memory_level_keys_api" name="Disk and Memory Level Keys API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/disk_and_memory_level_keys_api/disk_and_memory_level_keys_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/disk_and_memory_level_keys_api/group"/>
+   </component>
+   <component id="mediator_plugin_api" name="Mediator Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/mediator_plugin_api/mediator_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/mediator_plugin_api/group"/>
+   </component>
+   <component id="headset_status_api" name="Headset Status API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/headset_status_api/headset_status_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/headset_status_api/group"/>
+   </component>
+   <component id="system_startup_extension_plugin_api" name="System Startup Extension Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/system_startup_extension_plugin_api/system_startup_extension_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/system_startup_extension_plugin_api/group"/>
+   </component>
+   <component id="sensor_plugin_api" name="Sensor Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/sensor_plugin_api/sensor_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/sensor_plugin_api/group"/>
+   </component>
+   <component id="accessory_api" name="Accessory API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_api/accessory_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_api/group"/>
+   </component>
+   <component id="display_language_definition_api" name="Display Language Definition API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/display_language_definition_api/display_language_definition_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/display_language_definition_api/group"/>
+   </component>
+   <component id="mediator_command_responder_api" name="Mediator Command Responder API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/mediator_command_responder_api/mediator_command_responder_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/mediator_command_responder_api/group"/>
+   </component>
+   <component id="accessory_policy_definitions_api" name="Accessory Policy Definitions API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_policy_definitions_api/accessory_policy_definitions_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_policy_definitions_api/group"/>
+   </component>
+   <component id="hw_settings_api" name="Hardware Settings API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/hw_settings_api/hw_settings_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/hw_settings_api/group"/>
+   </component>
+   <component id="mediator_domain_definitions_api" name="Mediator Domain Definitions API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/mediator_domain_definitions_api/mediator_domain_definitions_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/mediator_domain_definitions_api/group"/>
+   </component>
+   <component id="sensor_extension_api" name="Sensor Extension API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/sensor_extension_api/sensor_extension_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/sensor_extension_api/group"/>
+   </component>
+   <component id="accessory_plugin_api" name="Accessory Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_plugin_api/accessory_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_plugin_api/group"/>
+   </component>
+   <component id="sae_api" name="SAE API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/sae_api/sae_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/sae_api/group"/>
+   </component>
+   <component id="accessory_control_api" name="Accessory Control API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_control_api/accessory_control_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_control_api/group"/>
+   </component>
+   <component id="mediator_static_registration_api" name="Mediator Static Registration API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/mediator_static_registration_api/mediator_static_registration_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/mediator_static_registration_api/group"/>
+   </component>
+   <component id="accessory_key_event_handling_api" name="Accessory Key Event Handling API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_key_event_handling_api/accessory_key_event_handling_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_key_event_handling_api/group"/>
+   </component>
+   <component id="mediator_notification_api" name="Mediator Notification API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/mediator_notification_api/mediator_notification_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/mediator_notification_api/group"/>
+   </component>
+   <component id="accessory_policy_utility_api" name="Accessory Policy Utility API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_policy_utility_api/accessory_policy_utility_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_policy_utility_api/group"/>
+   </component>
+   <component id="common_dsy_plugin_api" name="Common DSY Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/common_dsy_plugin_api/common_dsy_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/common_dsy_plugin_api/group"/>
+   </component>
+   <component id="remote_control_extension_api" name="Remote Control Extension API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/remote_control_extension_api/remote_control_extension_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/remote_control_extension_api/group"/>
+   </component>
+   <component id="sensor_channel_filter_api" name="Sensor Channel Filter API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/sensor_channel_filter_api/sensor_channel_filter_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/sensor_channel_filter_api/group"/>
+   </component>
+   <component id="dos_extension_api" name="DOS Extension API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/dos_extension_api/dos_extension_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/dos_extension_api/group"/>
+   </component>
+   <component id="accessory_audio_control_api" name="Accessory Audio Control API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_audio_control_api/accessory_audio_control_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_audio_control_api/group"/>
+   </component>
+   <component id="mediator_event_consumer_api" name="Mediator Event Consumer API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/mediator_event_consumer_api/mediator_event_consumer_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/mediator_event_consumer_api/group"/>
+   </component>
+   <component id="shared_data_api" name="Shared Data API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/shared_data_api/shared_data_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/shared_data_api/group"/>
+   </component>
+   <component id="accessory_settings_api" name="Accessory Settings API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_settings_api/accessory_settings_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_settings_api/group"/>
+   </component>
+   <component id="accessory_bluetooth_control_api" name="Accessory Bluetooth Control API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_bluetooth_control_api/accessory_bluetooth_control_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_bluetooth_control_api/group"/>
+   </component>
+   <component id="extended_version_info_api" name="Extended Version Info API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/extended_version_info_api/extended_version_info_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/extended_version_info_api/group"/>
+   </component>
+   <component id="mediator_event_provider_api" name="Mediator Event Provider API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/mediator_event_provider_api/mediator_event_provider_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/mediator_event_provider_api/group"/>
+   </component>
+   <component id="tv_out_config_api" name="TV Out Config API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/tv_out_config_api/tv_out_config_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/tv_out_config_api/group"/>
+   </component>
+   <component id="tspclientmapper_api" name="TSP Client Mapper API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/tspclientmapper_api/tspclientmapper_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/tspclientmapper_api/group"/>
+   </component>
+   <component id="powersave_api" name="Power Save API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/powersave_api/powersave_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/powersave_api/group"/>
+   </component>
+   <component id="powersave_definitions_api" name="Power Save Definitions API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/powersave_definitions_api/powersave_definitions_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/powersave_definitions_api/group"/>
+   </component>
+   <component id="powersave_plugin_api" name="Power Save Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/powersave_plugin_api/powersave_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/powersave_plugin_api/group"/>
+   </component>
+   <component id="extended_version_info_plugin_api" name="Extended Version Info Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/extended_version_info_plugin_api/extended_version_info_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/extended_version_info_plugin_api/group"/>
+   </component>
+   <component id="haptics_plugin_api" name="Haptics Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/haptics_plugin_api/haptics_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/haptics_plugin_api/group"/>
+   </component>
+   <component id="haptics_effect_data_getter_plugin_api" name="Haptics Effect Data Getter Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/haptics_effect_data_getter_plugin_api/haptics_effect_data_getter_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/haptics_effect_data_getter_plugin_api/group"/>
+   </component>
+   <component id="haptics_packetizer_plugin_api" name="Haptics Packetizer Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/haptics_packetizer_plugin_api/haptics_packetizer_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/haptics_packetizer_plugin_api/group"/>
+   </component>
+   <component id="tiltcompensation_api" name="Tilt Compensation API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/tiltcompensation_api/tilt_compensation_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/tiltcompensation_api/group"/>
+   </component>
+   <component id="disk_notification_handler_api" name="Disk Notification Handler API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/disk_notification_handler_api/disk_notification_handler_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/disk_notification_handler_api/group"/>
+   </component>
+   <component id="accessory_policy_usb_audio_api" name="Accessory Policy USB Audio API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_policy_usb_audio_api/accessory_policy_usb_audio_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_policy_usb_audio_api/group"/>
+   </component>
+   <component id="accessory_policy_hdmi_audio_api" name="Accessory Policy HDMI Audio API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/accessory_policy_hdmi_audio_api/accessory_policy_hdmi_audio_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/accessory_policy_hdmi_audio_api/group"/>
+   </component>
+   <component id="sensor_data_compensator_plugin_api" name="Sensor Data Compensator Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/sensor_data_compensator_plugin_api/sensor_data_compensator_plugin_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/sensor_data_compensator_plugin_api/group"/>
+   </component>
+   <component id="ddc_access_api" name="DDC Access API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/ddc_access_api/ddc_access_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/ddc_access_api/group"/>
+   </component>
+   <component id="tv_out_behaviour_api" name="TV Out Behaviour API" class="api" filter="s60">
+    <meta rel="Api" href="devicesrv_plat/tv_out_behaviour_api/tv_out_behaviour_api.metaxml"/>
+    <unit bldFile="devicesrv_plat/tv_out_behaviour_api/group"/>
+   </component>
+   <component id="autoaudio_plugin_api" name="Auto Audio Plugin API" class="api" filter="s60" introduced="^4">
+    <meta rel="config"> 
+      <defined condition="FF_AUTOMOTIVESTACK"/>
+    </meta>
+    <unit bldFile="devicesrv_plat/autoaudio_plugin_api/group"/>
+   </component>
+  </collection>
+  <collection id="accessoryservices" name="Accessory Services" level="framework">
+   <component id="accessorymonitor" filter="s60" name="Accessory Monitor">
+    <unit bldFile="accessoryservices/accessorymonitor/group"/>
+   </component>
+   <component id="accessoryremotecontrol" filter="s60" name="Accessory Remote Control">
+    <unit bldFile="accessoryservices/accessoryremotecontrol/group"/>
+   </component>
+   <component id="accessoryserver" filter="s60" name="Accessory Server">
+    <unit bldFile="accessoryservices/accessoryserver/group"/>
+   </component>
+   <component id="pluggeddisplay" filter="s60" name="Plugged Display" introduced="^3">
+    <unit bldFile="accessoryservices/pluggeddisplay/group"/>
+   </component>
+   <component id="headsetstatusapi" filter="s60" name="Headset Status API">
+    <unit bldFile="accessoryservices/headsetstatusapi/group"/>
+   </component>
+   <component id="tspclientmapper" filter="s60" name="TSP Client Mapper">
+    <unit bldFile="accessoryservices/tspclientmapper/group"/>
+   </component>
+   <component id="remotecontrolfw" name="Remote Control Framework" introduced="9.1" purpose="optional">
+    <unit bldFile="accessoryservices/remotecontrolfw/group" mrp="accessoryservices/remotecontrolfw/group/bluetooth_remotecontrol.mrp"/>
+   </component>
+   <component id="gid_pc_tool" filter="s60" name="Generic ID PC Tool" target="desktop" class="tool">
+    <unit bldFile="accessoryservices/gid_pc_tool/group"/>
+   </component>
+   <component id="autoaudioasy" filter="s60" name="Auto Audio Plugin" introduced="^4" class="plugin">
+    <meta rel="config"> 
+      <defined condition="FF_AUTOMOTIVESTACK"/>
+    </meta>
+    <unit bldFile="accessoryservices/autoaudioasy/group"/>
+   </component>
+  </collection>
+  <collection id="commonservices" name="Common Services" level="app-if">
+   <component id="commonengine" filter="s60" name="Common Engine">
+    <unit bldFile="commonservices/commonengine/group"/>
+   </component>
+   <component id="commonengineresources" filter="s60" name="Common Engine Resources" class="config">
+    <unit bldFile="commonservices/commonengineresources/group"/>
+   </component>
+   <component id="platformenv" filter="s60" name="Platform Environment">
+    <unit bldFile="commonservices/platformenv/group"/>
+   </component>
+   <component id="sysutil" name="System Utilities" purpose="mandatory" introduced="ER5">
+    <meta rel="config"> 
+      <defined condition="SYMBIAN_BAFL_SYSUTIL"/>
+    </meta>
+    <unit bldFile="commonservices/sysutil/group" mrp="commonservices/sysutil/group/sysutil.mrp"/>
+   </component>
+   <component id="activitymanager" name="Activity Manager" purpose="mandatory" introduced="ER5">
+    <meta rel="config"> 
+      <defined condition="SYMBIAN_BAFL_SYSUTIL"/>
+    </meta>
+    <unit bldFile="commonservices/activitymanager/group" mrp="commonservices/activitymanager/group/activitymanager.mrp"/>
+   </component>
+  </collection>
+  <collection id="dosservices" name="Domestic Operating System Services" level="hw-if">
+   <component id="commondsy" filter="s60" name="Common DSY" class="plugin">
+    <unit bldFile="dosservices/commondsy/group"/>
+   </component>
+   <component id="dosserver" filter="s60" name="Domestic OS Server">
+    <unit bldFile="dosservices/dosserver/group"/>
+   </component>
+  </collection>
+  <collection id="sensorservices" name="Sensor Services" level="framework">
+   <component id="sensorserver" filter="s60" name="Sensor Server">
+    <unit bldFile="sensorservices/sensorserver/group"/>
+   </component>
+   <component id="orientationssy" filter="s60" name="Orientation SSY" class="plugin">
+    <unit bldFile="sensorservices/orientationssy/group"/>
+   </component>
+   <component id="tiltcompensationssy" filter="s60" name="Tilt Compensation SSY" class="plugin">
+    <unit bldFile="sensorservices/tiltcompensationssy/group"/>
+   </component>
+   <component id="sensordatacompensator" filter="s60" name="Sensor Data Compensator">
+    <unit bldFile="sensorservices/sensordatacompensator/group"/>
+   </component>
+  </collection>
+  <collection id="hwrmhaptics" name="HWRM Haptics" level="plugin">
+   <component id="hapticseffectdatagetterfw" filter="s60" name="Haptics Effect Data Getter Framework">
+    <unit bldFile="hwrmhaptics/hapticseffectdatagetterfw/group"/>
+   </component>
+   <component id="hapticspluginservice" filter="s60" name="Haptics Plugin Service">
+    <unit bldFile="hwrmhaptics/hapticspluginservice/group"/>
+   </component>
+   <component id="hapticspacketizer" filter="s60" name="Haptics Packetizer">
+    <unit bldFile="hwrmhaptics/hapticspacketizer/group"/>
+   </component>
+   <component id="hapticspluginmanager" filter="s60" name="Haptics Plugin Manager">
+    <unit bldFile="hwrmhaptics/hapticspluginmanager/group"/>
+   </component>
+   <component id="hapticsserver" filter="s60" name="Haptics Server">
+    <unit bldFile="hwrmhaptics/hapticsserver/group"/>
+   </component>
+   <component id="hapticsclient" filter="s60" name="Haptics Client">
+    <unit bldFile="hwrmhaptics/hapticsclient/group"/>
+   </component>
+   <component id="hwrmhaptics_build" filter="s60" name="HWRM Haptics Build">
+    <!-- move these exports into the appropriate above components and delete this component-->
+    <unit bldFile="hwrmhaptics/group"/>
+   </component>
+  </collection>
+  <collection id="mediator" name="Mediator" level="app-if">
+   <!--collection is really a component. Move it down a directory -->
+   <component id="mediator_build" filter="s60" name="Mediator Build">
+    <unit bldFile="mediator/group"/>
+   </component>
+  </collection>
+  <collection id="psmservices" name="Power Save Mode Services" level="app-if">
+   <component id="psmserver" filter="s60" name="PSM Server">
+    <unit bldFile="psmservices/psmserver/group"/>
+   </component>
+  </collection>
+  <collection id="resourcemgmt" name="Resource Management" level="hw-if">
+   <component id="hwrmfmtxwatcherplugin" filter="s60" name="HWRM FM Transmitter Watcher Plugin" class="plugin">
+    <unit bldFile="resourcemgmt/hwrmfmtxwatcherplugin/group"/>
+   </component>
+   <component id="hwrmtargetmodifierplugin" filter="s60" name="HWRM Target Modifier Plugin" class="plugin">
+    <meta rel="config">
+     <defined condition="__HWRM_TARGET_MODIFIER_PLUGIN"/>
+    </meta>
+    <unit bldFile="resourcemgmt/hwrmtargetmodifierplugin/group"/>
+   </component>
+   <component id="vibractrl" filter="s60" name="Vibra Control" deprecated="9.1">
+    <unit bldFile="resourcemgmt/vibractrl/group"/>
+   </component>
+   <component id="hwresourcesmgr" name="Hardware Resources Manager" introduced="^2" purpose="optional">
+    <unit bldFile="resourcemgmt/hwresourcesmgr/group" mrp="resourcemgmt/hwresourcesmgr/group/telephony_hwrm.mrp"/>
+   </component>
+   <component id="hwresourcesmgrconfig" name="Hardware Resources Manager Config" introduced="^3" purpose="optional" class="config">
+    <unit bldFile="resourcemgmt/hwresourcesmgrconfig" mrp="resourcemgmt/hwresourcesmgrconfig/telephony_hwrm-config.mrp"/>
+   </component>
+   <component id="resourcemgmt_data" filter="s60" name="Resource Management Data" class="config">
+    <unit bldFile="resourcemgmt/data"/>
+   </component>
+   <component id="powerandmemorynotificationservice" name="Power and Memory Notification Service" introduced="6.0" purpose="mandatory">
+    <unit bldFile="resourcemgmt/powerandmemorynotificationservice/group" mrp="resourcemgmt/powerandmemorynotificationservice/group/syslibs_pwrcli.mrp"/>
+   </component>
+  </collection>
+  <collection id="sysstatemgmt" name="System State Management" level="server">
+   <component id="ssmmapperutility" filter="s60" name="SSM Mapper Utility" introduced="^3">
+    <unit bldFile="sysstatemgmt/ssmmapperutility/group"/>
+   </component>
+   <component id="ssmpolicyplugins" filter="s60" name="SSM Policy Plugins" class="plugin" introduced="^3">
+    <unit bldFile="sysstatemgmt/ssmpolicyplugins/group"/>
+   </component>
+   <component id="ssmutilityplugins" filter="s60" name="SSM Utility Plugins" class="plugin" introduced="^3">
+    <unit bldFile="sysstatemgmt/ssmutilityplugins/group"/>
+   </component>
+   <component id="ssmcmdlists" filter="s60" name="SSM Command Lists" introduced="^3">
+    <unit bldFile="sysstatemgmt/ssmcmdlists/group"/>
+   </component>
+   <component id="ssmcustcmds" filter="s60" name="SSM Custom Commands" introduced="^3">
+    <unit bldFile="sysstatemgmt/ssmcustcmds/group"/>
+   </component>
+   <component id="syslangutil" filter="s60" name="System Language Utility" introduced="^3">
+    <unit bldFile="sysstatemgmt/syslangutil/group"/>
+   </component>
+   <component id="sysrestart" filter="s60" name="System Restart" introduced="^3">
+    <unit bldFile="sysstatemgmt/sysrestart/group"/>
+   </component>
+   <component id="sysuiprovider" filter="s60" name="System UI Provider" introduced="^3">
+    <unit bldFile="sysstatemgmt/sysuiprovider/group"/>
+   </component>
+   <component id="systemstarter" name="System Starter" introduced="9.1" deprecated="^3" purpose="mandatory">
+    <unit bldFile="sysstatemgmt/systemstarter/group" mrp="sysstatemgmt/systemstarter/group/app-framework_sysstart.mrp"/>
+   </component>
+   <component id="systemstatemgr" name="System State Manager" introduced="^3" purpose="mandatory">
+    <meta rel="config"> 
+      <defined condition="SYMBIAN_SYSTEM_STATE_MANAGEMENT"/>
+    </meta>
+    <unit bldFile="sysstatemgmt/systemstatemgr/group" mrp="sysstatemgmt/systemstatemgr/group/app-framework_ssma.mrp"/>
+   </component>
+   <component id="systemstateplugins" name="System State Plugins" introduced="^3" purpose="optional" class="plugin">
+    <meta rel="config">
+      <defined condition="SYMBIAN_SYSTEM_STATE_MANAGEMENT"/>
+    </meta>
+    <unit bldFile="sysstatemgmt/systemstateplugins/group" mrp="sysstatemgmt/systemstateplugins/group/app-framework_ssplugins.mrp"/>
+   </component>
+    <meta rel="config">
+      <defined condition="SYMBIAN_SYSTEM_STATE_MANAGEMENT"/>
+    </meta>
+   <component id="systemstatereferenceplugins" name="System State Reference Plugins" introduced="^3" purpose="optional" class="plugin">
+    <unit bldFile="sysstatemgmt/systemstatereferenceplugins/group" mrp="sysstatemgmt/systemstatereferenceplugins/group/app-framework_ssrefplugins.mrp"/>
+   </component>
+  </collection>
+  <collection id="resourceinterfaces" name="Resource Interfaces" level="hw-if">
+   <component id="fmtransmittercontrol" name="FM Transmitter Control" introduced="^3" purpose="optional">
+    <unit bldFile="resourceinterfaces/fmtransmittercontrol/group" mrp="resourceinterfaces/fmtransmittercontrol/group/telephony_hwrmfmtx.mrp"/>
+   </component>
+  </collection>
+  <collection id="systemhealthmanagement" name="System Health Management" level="server">
+   <component id="systemhealthmgr" name="System Health Manager" introduced="^3" purpose="optional">
+    <unit bldFile="systemhealthmanagement/systemhealthmgr/group" mrp="systemhealthmanagement/systemhealthmgr/group/app-framework_shma.mrp"/>
+   </component>
+  </collection>
+  <collection id="devicesrvapitest" name="Devices Services API Tests" level="app-if">
+   <component id="accessorieshaitest" name="Accessories HAI Tests" introduced="^2" purpose="development" filter="test">
+    <unit mrp="devicesrvapitest/accessorieshaitest/group/accessorieshaitest.mrp" bldFile="devicesrvapitest/accessorieshaitest/group"/>
+   </component>
+   <component id="hwrmhaitest" name="HWRM HAI Tests" introduced="^2" purpose="development" filter="test">
+    <unit mrp="devicesrvapitest/hwrmhaitest/group/hwrmhaitest.mrp" bldFile="devicesrvapitest/hwrmhaitest/group"/>
+   </component>
+  </collection>
+  <collection id="devicesrv_info" name="Device Services Info" level="app-if">
+   <component id="devicesrv_metadata" name="Device Services Metadata" class="config" introduced="^2" purpose="development" target="desktop">
+    <unit mrp="devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp"/>
+   </component>
+  </collection>
+ </package>
 </SystemDefinition>
--- a/package_definition_v2.xml	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,295 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SystemDefinition schema="3.0.0">
-  <package id="devicesrv" name="Device Services" levels="adaptation hw-if plugin framework server app-if">
-    <collection id="accessoryservices" name="Accessory Services" level="framework">
-      <component id="accessorymonitor" filter="s60" name="Accessory Monitor">
-        <unit bldFile="accessoryservices/accessorymonitor/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/accmonconnectionemulator/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/tests/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/accmontesttimer/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/stubs/asystub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessorymonitor/tsrc/public/basic/stubs/group"/> -->
-      </component>
-      <component id="accessoryremotecontrol" filter="s60" name="Accessory Remote Control">
-        <unit bldFile="accessoryservices/accessoryremotecontrol/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/dsytesttool/dosservercontrol/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/dsytesttool/dsytfcore/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/dsytesttool/dsytfstifadapter/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/dsytesttool/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/stub/audio/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/stub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/stub/phone/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryremotecontrol/tsrc/stub/remcon/group"/> -->
-      </component>
-      <component id="accessoryserver" filter="s60" name="Accessory Server">
-        <unit bldFile="accessoryservices/accessoryserver/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/dsytesttool/dosservercontrol/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/dsytesttool/dsytfcore/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/dsytesttool/dsytfstifadapter/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/dsytesttool/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/accessorytestcontrol/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/stubs/accfwuinotifierstub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/stubs/asystub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/stubs/btasystub/group"/> -->
-        <!-- <unit bldFile="accessoryservices/accessoryserver/tsrc/public/basic/stubs/group"/> -->
-      </component>
-      <component id="headsetstatusapi" filter="s60" name="Headset Status API">
-        <unit bldFile="accessoryservices/headsetstatusapi/group"/>
-         <!-- is this test bld.inf needed for the build? -->
-        <!-- <unit bldFile="accessoryservices/headsetstatusapi/tsrc/public/basic/group"/> -->
-      </component>
-      <component id="tspclientmapper" filter="s60" name="TSP Client Mapper">
-        <unit bldFile="accessoryservices/tspclientmapper/group"/>
-         <!-- is this test bld.inf needed for the build? -->
-        <!-- <unit bldFile="accessoryservices/tspclientmapper/tsrc/public/basic/group"/> -->
-      </component>
-      <component id="remotecontrolfw" name="Remote Control Framework" introduced="9.1" purpose="optional">
-        <unit bldFile="accessoryservices/remotecontrolfw/group" mrp="accessoryservices/remotecontrolfw/group/bluetooth_remotecontrol.mrp"/>
-      </component>
-      <component id="gid_pc_tool" filter="s60" name="Generic ID PC Tool" target="desktop" class="tool">
-	<unit bldFile="accessoryservices/gid_pc_tool/group"/>
-      </component>
-    </collection>
-    <collection id="commonservices" name="Common Services" level="app-if">
-      <component id="commonengine" filter="s60" name="Common Engine">
-        <unit bldFile="commonservices/commonengine/group"/>
-         <!-- is this test bld.inf needed for the build? -->
-        <!-- <unit bldFile="commonservices/commonengine/tsrc/public/basic/group"/> -->
-      </component>
-      <component id="commonengineresources" filter="s60" name="Common Engine Resources" class="config">
-        <unit bldFile="commonservices/commonengineresources/group"/>
-      </component>
-      <component id="platformenv" filter="s60" name="Platform Environment">
-        <unit bldFile="commonservices/platformenv/group"/>
-        <!-- <unit bldFile="commonservices/platformenv/disknotifyhandler/group"/> -->
-         <!-- are these bld.infs needed? Can they be included from bld.inf?-->
-        <!-- <unit bldFile="commonservices/platformenv/platformver/group"/> -->
-        <!-- <unit bldFile="commonservices/platformenv/sysversioninfo/group"/> -->
-         <!-- is this test bld.inf needed for the build? -->
-        <!-- <unit bldFile="commonservices/platformenv/tsrc/public/basic/group"/> -->
-      </component>
-      <component id="sysutil" name="System Utilities" purpose="mandatory" introduced="ER5">
-        <unit bldFile="commonservices/sysutil/group" mrp="commonservices/sysutil/group/sysutil.mrp"/>
-      </component>
-      <component id="activitymanager" name="Activity Manager" purpose="mandatory" introduced="ER5">
-        <unit bldFile="commonservices/activitymanager/group" mrp="commonservices/activitymanager/group/activitymanager.mrp"/>
-      </component>
-    </collection>
-    <collection id="dosservices" name="Domestic Operating System Services" level="hw-if">
-      <component id="dosserver" filter="s60" name="Domestic OS Server">
-        <unit bldFile="dosservices/dosserver/group"/>
-      </component>
-      <component id="commondsy" filter="s60" name="Common DSY" class="plugin">
-        <unit bldFile="dosservices/commondsy/group"/>
-      </component>
-      <component id="dosservices_test" filter="s60" purpose="development" name="DOS Services Test">
-        <!-- is this component needed? If so, can these be #included from a single master test bld.inf?-->
-        <!-- <unit bldFile="dosservices/tsrc/dsytesttool/dosservercontrol/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/public/basic/stubs/dsystub/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/public/basic/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/dsytesttool/dsytfcore/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/public/basic/dosservertestplugin/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/dsytesttool/dsytfstifadapter/group"/> -->
-        <!-- <unit bldFile="dosservices/tsrc/dsytesttool/group"/> -->
-      </component>
-    </collection>
-    <collection id="resourcemgmt" name="Resource Management" level="hw-if">
-      <component id="serverexe" filter="s60" name="Hardware Resource Manager Server">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/serverexe/group"/> -->
-      </component>
-      <component id="hwrmfmtxwatcherplugin" filter="s60" name="HWRM FM Transmitter Watcher Plugin" class="plugin">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component. Should this be purpose="development" -->
-        <!-- <unit bldFile="resourcemgmt/hwrmfmtxwatcherplugin/group"/> -->
-      </component>
-      <component id="clientdll" filter="s60" name="HWRM Client">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/clientdll/group"/> -->
-      </component>
-      <component id="commondll" filter="s60" name="HWRM Common">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/commondll/group"/> -->
-      </component>
-      <component id="vibraclientdll" filter="s60" name="Vibra Client">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/vibraclientdll/group"/> -->
-      </component>
-      <component id="extendedlightclientdll" filter="s60" name="Extended Light Client">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/extendedlightclientdll/group"/> -->
-      </component>
-      <component id="lightclientdll" filter="s60" name="Light Client">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component -->
-        <!-- <unit bldFile="resourcemgmt/lightclientdll/group"/> -->
-      </component>
-      <component id="fmtxclientdll" filter="s60" name="FM Transmitter Client">
-       <!-- this needs to be resolved with the equivalent in the fmtransmittercontrol component -->
-        <!-- <unit bldFile="resourcemgmt/fmtxclientdll/group"/> -->
-      </component>
-      <component id="hwrmtargetmodifierplugin" filter="s60" name="HWRM Target Modifier Plugin" class="plugin">
-       <!-- this needs to be resolved with the equivalent in the hwresourcesmgr component. Should this be purpose="development" -->
-        <!-- <unit bldFile="resourcemgmt/hwrmtargetmodifierplugin/group"/> -->
-        <!-- <unit bldFile="resourcemgmt/hwrmtargetmodifierplugin/tsrc/hwrmtargetmodifierplugintest/group"/> -->
-      </component>
-      <component id="vibractrl" filter="s60" name="Vibra Control" deprecated="9.1">
-        <unit bldFile="resourcemgmt/vibractrl/group"/>
-      </component>
-      <component id="hwresourcesmgr" name="Hardware Resources Manager" introduced="^2" purpose="optional">
-        <unit bldFile="resourcemgmt/hwresourcesmgr/group" mrp="resourcemgmt/hwresourcesmgr/group/telephony_hwrm.mrp"/>
-      </component>
-      <component id="hwresourcesmgrconfig" name="Hardware Resources Manager Config" introduced="^3" purpose="optional" class="config">
-        <unit bldFile="resourcemgmt/hwresourcesmgrconfig" mrp="resourcemgmt/hwresourcesmgrconfig/telephony_hwrm-config.mrp"/>
-      </component>
-      <component id="resourcemgmt_build" filter="s60" name="Resource Management Build">
-         <!-- need to reconcile this with the above components -->
-        <unit bldFile="resourcemgmt/group"/>
-      </component>
-      <component id="resourcemgmt_test" filter="s60" purpose="development" name="Resource Management Test">
-        <!-- is this component needed?-->
-        <!-- <unit bldFile="resourcemgmt/tsrc/public/basic/group"/> -->
-      </component>
-      <component id="powerandmemorynotificationservice" name="Power and Memory Notification Service" introduced="6.0" purpose="mandatory">
-        <unit bldFile="resourcemgmt/powerandmemorynotificationservice/group" mrp="resourcemgmt/powerandmemorynotificationservice/group/syslibs_pwrcli.mrp"/>
-      </component>
-    </collection>
-    <collection id="hwrmhaptics" name="HWRM Haptics" level="plugin">
-      <component id="hapticseffectdatagetterfw" filter="s60" name="Haptics Effect Data Getter Framework">
-        <unit bldFile="hwrmhaptics/hapticseffectdatagetterfw/group"/>
-      </component>
-      <component id="hapticspluginservice" filter="s60" name="Haptics Plugin Service">
-        <unit bldFile="hwrmhaptics/hapticspluginservice/group"/>
-      </component>
-      <component id="hapticspacketizer" filter="s60" name="Haptics Packetizer">
-        <unit bldFile="hwrmhaptics/hapticspacketizer/group"/>
-      </component>
-      <component id="hapticspluginmanager" filter="s60" name="Haptics Plugin Manager">
-        <unit bldFile="hwrmhaptics/hapticspluginmanager/group"/>
-      </component>
-      <component id="hapticsserver" filter="s60" name="Haptics Server">
-        <unit bldFile="hwrmhaptics/hapticsserver/group"/>
-      </component>
-      <component id="hapticsclient" filter="s60" name="Haptics Client">
-        <unit bldFile="hwrmhaptics/hapticsclient/group"/>
-      </component>
-      <component id="hwrmhaptics_build" filter="s60" name="HWRM Haptics Build">
-        <!-- can these exports be put in the appropriate above components? -->
-        <unit bldFile="hwrmhaptics/group"/>
-      </component>
-    </collection>
-    <collection id="mediator" name="Mediator" level="app-if">
-      <component id="mediator_build" filter="s60" name="Mediator Build">
-        <unit bldFile="mediator/group"/>
-      </component>
-      <component id="mediator_test" filter="s60" purpose="development" name="Mediator Test">
-          <!-- need to have a single unit in this component. Either #include one bld.inf from the other or remove the component -->
-        <!-- <unit bldFile="mediator/tsrc/public/basic/group"/> -->
-        <!-- <unit bldFile="mediator/tsrc/public/basic/stub/group"/> -->
-      </component>
-    </collection>
-    <collection id="psmservices" name="Power Save Mode Services" level="app-if">
-      <component id="psmserver" filter="s60" name="PSM Server">
-        <unit bldFile="psmservices/psmserver/group"/>
-         <!-- is this test bld.inf needed for the build? -->
-        <!-- <unit bldFile="psmservices/psmserver/tsrc/public/basic/group"/> -->
-      </component>
-    </collection>
-    <collection id="sensorservices" name="Sensor Services" level="framework">
-      <component id="sensorserver" filter="s60" name="Sensor Server">
-        <unit bldFile="sensorservices/sensorserver/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/sensortestmodule/condevalstub/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/sensortestmodule/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/sensortestmodule/sensrvcondevalplugin/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/sensortestmodule/ssystub/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensorserver/tsrc/public/basic/sensortestmodule/stubprocess/group"/> -->
-      </component>
-      <component id="orientationssy" filter="s60" name="Orientation SSY" class="plugin">
-        <unit bldFile="sensorservices/orientationssy/group"/>
-      </component>
-      <component id="tiltcompensationssy" filter="s60" name="Tilt Compensation SSY" class="plugin">
-        <unit bldFile="sensorservices/tiltcompensationssy/group"/>
-      </component>
-      <component id="sensordatacompensator" filter="s60" name="Sensor Data Compensator">
-        <unit bldFile="sensorservices/sensordatacompensator/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="sensorservices/sensordatacompensator/tsrc/sensordatacompensatorpluginstub/group"/> -->
-        <!-- <unit bldFile="sensorservices/sensordatacompensator/tsrc/sensordatacompensatortest/group"/> -->
-      </component>
-    </collection>
-	<collection id="sysstatemgmt" name="System State Management" level="server">
-      <component id="starter" filter="s60" name="Starter">
-        <unit bldFile="sysstatemgmt/starter/group"/>
-         <!-- are these test bld.infs needed for the build? -->
-        <!-- <unit bldFile="sysstatemgmt/starter/strtsecnote/group"/> -->
-        <!-- <unit bldFile="sysstatemgmt/starter/strtsecobs/group"/> -->
-      </component>
-      <component id="systemstarter" name="System Starter" introduced="9.1" deprecated="^3" purpose="mandatory">
-        <unit bldFile="sysstatemgmt/systemstarter/group" mrp="sysstatemgmt/systemstarter/group/app-framework_sysstart.mrp"/>
-      </component>
-      <component id="systemstatemgr" name="System State Manager" introduced="^3" purpose="mandatory">
-        <unit bldFile="sysstatemgmt/systemstatemgr/group" mrp="sysstatemgmt/systemstatemgr/group/app-framework_ssma.mrp"/>
-      </component>
-      <component id="systemstateplugins" name="System State Plugins" introduced="^3" purpose="optional" class="plugin">
-        <unit bldFile="sysstatemgmt/systemstateplugins/group" mrp="sysstatemgmt/systemstateplugins/group/app-framework_ssplugins.mrp"/>
-      </component>
-      <component id="systemstatereferenceplugins" name="System State Reference Plugins" introduced="^3" purpose="optional" class="plugin">
-        <unit bldFile="sysstatemgmt/systemstatereferenceplugins/group" mrp="sysstatemgmt/systemstatereferenceplugins/group/app-framework_ssrefplugins.mrp"/>
-      </component>
-      <component id="sysstatemgmt_test" filter="s60" purpose="development" name="System State Management Test">
-        <!-- <unit bldFile="sysstatemgmt/tsrc/public/basic/group"/> -->
-      </component>
-    </collection>
-    <collection id="resourceinterfaces" name="Resource Interfaces" level="hw-if">
-      <component id="fmtransmittercontrol" name="FM Transmitter Control" introduced="^3" purpose="optional">
-        <unit bldFile="resourceinterfaces/fmtransmittercontrol/group" mrp="resourceinterfaces/fmtransmittercontrol/group/telephony_hwrmfmtx.mrp"/>
-      </component>
-    </collection>
-    <collection id="systemhealthmanagement" name="System Health Management" level="server">
-      <component id="systemhealthmgr" name="System Health Manager" introduced="^3" purpose="optional">
-        <unit bldFile="systemhealthmanagement/systemhealthmgr/group" mrp="systemhealthmanagement/systemhealthmgr/group/app-framework_shma.mrp"/>
-      </component>
-    </collection>
-    <collection id="devicesrvapitest" name="Devices Services API Tests" level="app-if">
-      <component id="accessorieshaitest" name="Accessories HAI Tests" introduced="^2" purpose="development" filter="test">
-        <unit mrp="devicesrvapitest/accessorieshaitest/group/accessorieshaitest.mrp" bldFile="devicesrvapitest/accessorieshaitest/group"/>
-      </component>
-      <component id="hwrmhaitest" name="HWRM HAI Tests" introduced="^2" purpose="development" filter="test">
-        <unit mrp="devicesrvapitest/hwrmhaitest/group/hwrmhaitest.mrp" bldFile="devicesrvapitest/hwrmhaitest/group"/>
-      </component>
-    </collection>
-    <collection id="devicesrv_info" name="Device Services Info" level="app-if">
-      <component id="devicesrv_pub" filter="s60" name="Device Services Public Interfaces" class="api">
-        <unit bldFile="devicesrv_pub/group"/>
-        <!-- <unit bldFile="devicesrv_pub/accessory_monitoring_api/tsrc/bc/accmonapibctests/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/feature_discovery_api/tsrc/bc/featurediscovery/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/find_item_api/tsrc/bc/finditem/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/hwrm_power_state_api/tsrc/bc/powerstate/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/light_api/tsrc/bc/light/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/phone_parser_api/tsrc/bc/phoneparser/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/platform_environment_api/tsrc/bc/platformenv/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/sensor_channel_api/tsrc/bc/sensor/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/sensor_data_compensator_api/tsrc/bc/sensordatacompensatortest/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/sysutil_api/tsrc/bc/sysutil/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/text_resolver_api/tsrc/bc/textresolver/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/version_info_api/tsrc/bc/platformvertest/group"/> -->
-        <!-- <unit bldFile="devicesrv_pub/vibra_api/tsrc/bc/vibra/group"/> -->
-      </component>
-      <component id="devicesrv_plat" filter="s60" name="Device Services Platform Interfaces" class="api">
-        <unit bldFile="devicesrv_plat/group"/>
-        <!-- <unit bldFile="devicesrv_plat/activity_manager_api/tsrc/group"/> -->
-      </component>
-      <component id="devicesrv_metadata" name="Device Services Metadata" class="config" introduced="^2" purpose="development" target="desktop">
-        <unit mrp="devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp"/>
-      </component>
-    </collection>
-  </package>
-</SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_map.xml	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,1 @@
+<PackageMap root="sf" layer="os"/>
--- a/psmservices/psmserver/inc/client/psmclientimpl.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/inc/client/psmclientimpl.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007 - 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"
@@ -74,6 +74,14 @@
          */
         CPsmSettings& PsmSettings() const;
 
+#ifdef _DEBUG  
+        // these functions are used only for testing   
+        virtual TInt HeapMark();
+        virtual TInt HeapMarkEnd();
+        virtual TInt HeapReset();
+        virtual TInt SetHeapFailure(TInt aFailureRate);		
+#endif //_DEBUG     
+
     private:
 
         /**
--- a/psmservices/psmserver/inc/engine/psmmanager.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/inc/engine/psmmanager.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007 - 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"
@@ -72,7 +72,7 @@
         /**
          * Register new PSM observer. Adds observer to the list of registered observers
          */
-        void RegisterObserver( MPsmModeChangeObserver* aObserver );
+        void RegisterObserverL( MPsmModeChangeObserver* aObserver );
 
         /**
          * Unreqister observer. Removes observer from the list of registered observers
@@ -89,6 +89,19 @@
          */
         void IssueRequest();
 
+#ifdef _DEBUG        
+        /**
+         * Delete plugin loader. Used only for testing purpose
+         */         
+        void ClosePluginLoader();
+
+        /**
+         * Compress ModeObservers Array. Used only for testing purpose
+         */        
+        void CompressModeObserversArray();
+
+#endif //_DEBUG     
+
     protected: // From CActive
 
         /**
--- a/psmservices/psmserver/inc/engine/psmstorage.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/inc/engine/psmstorage.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-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,7 +20,7 @@
 #define PSMSTORAGE_H
 
 #include <e32base.h>
-#include <xmlengdom.h>
+#include <xml/dom/xmlengdom.h>
 #include <psmtypes.h>
 
 /**
--- a/psmservices/psmserver/inc/server/psmsrvmessage.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/inc/server/psmsrvmessage.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-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"
@@ -74,6 +74,11 @@
          * Observes the mode change completion
          */
         void NotifyPsmModeChangeComplete( const TInt aError );
+		
+		/**
+         * Returns the message handle
+         */
+		TInt MessageHandle( ) const;
 
     private:
 
--- a/psmservices/psmserver/inc/server/psmsrvsession.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/inc/server/psmsrvsession.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007 - 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"
@@ -61,6 +61,11 @@
          * Service requests
          */
         void ServiceL( const RMessage2& aMessage );
+		
+		/**
+         * ServiceError handling
+         */
+		void ServiceError(const RMessage2 &aMessage, TInt aError);
 
     private:
 
@@ -74,10 +79,6 @@
          */
         void ConstructL();
 
-        /**
-         * Handles client requests
-         */
-        void DispatchL( const RMessage2& aMessage );
 
         /**
          * Handles settings related requests
@@ -106,11 +107,6 @@
          */
         CPsmMessage* iNotifyModeMessage;
 
-        /**
-         * Config array for Settings handling
-         */
-        RConfigInfoArray iConfigArray;
-
     };
 
 #endif // PSMSRVSESSION_H 
--- a/psmservices/psmserver/inc/util/psmclientserver.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/inc/util/psmclientserver.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006 - 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"
@@ -66,6 +66,16 @@
      */
     EPsmServerCancelModeChangeNotificationRequest,
 
+    /**
+     * Used only for testing purpose and in debug builds only. 
+     * Not declared under _DEBUG because command ids will be 
+     * different in udeb and urel version, will lead to confusion
+     */
+    EDebugHeapMark,
+    EDebugHeapMarkEnd,
+    EDebugSetHeapFailure,
+    EDebugHeapReset,   
+
 // ---------------------------------------------------------------
 // End of enum
 // ---------------------------------------------------------------
--- a/psmservices/psmserver/src/client/psmclientimpl.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/src/client/psmclientimpl.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -63,12 +63,10 @@
 CPsmClientImpl::~CPsmClientImpl()
     {
     COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::~CPsmClientImpl()" ) ) );
-
+    
     CancelPowerSaveModeChange();
-
     delete iActive;
     delete iSettings;
-
     iPsmServer.Close();
 
     COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::~CPsmClientImpl - return" ) ) );
@@ -169,4 +167,39 @@
     return *iSettings;
     }
 
+#ifdef _DEBUG     
+TInt CPsmClientImpl::HeapMark()
+    {
+    COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapMark()" ) ) );
+    TInt err = iPsmServer.SendReceiveSync( EDebugHeapMark, TIpcArgs() );
+    COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapMark - return" ) ) );   
+    return err;
+    }
+
+TInt CPsmClientImpl::HeapMarkEnd()
+    {
+    COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapMarkEnd()" ) ) );
+    TInt err = iPsmServer.SendReceiveSync( EDebugHeapMarkEnd, TIpcArgs() );   
+    COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapMarkEnd - return" ) ) );   
+    return err;    
+    }
+
+TInt CPsmClientImpl::SetHeapFailure(TInt aFailureRate)
+    {
+    COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::SetHeapFailure()" ) ) );
+    TInt err = iPsmServer.SendReceiveSync( EDebugSetHeapFailure, TIpcArgs(aFailureRate) );
+    COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::SetHeapFailure - return" ) ) );   
+    return err; 
+    }
+
+TInt CPsmClientImpl::HeapReset()
+    {
+    COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapReset()" ) ) );
+    TInt err = iPsmServer.SendReceiveSync( EDebugHeapReset, TIpcArgs() );
+    COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapReset - return" ) ) );   
+    return err; 
+    }
+
+#endif //_DEBUG     
+
 // End of file
--- a/psmservices/psmserver/src/engine/psmbackupstorage.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/src/engine/psmbackupstorage.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -274,7 +274,10 @@
         // reset error value
         trapErr = KErrNone;
         }
-
+    else if ( KErrNoMemory == trapErr )
+        {
+        User::Leave(trapErr);
+        }    
     COMPONENT_TRACE( ( _L( "PSM Server - CPsmBackupStorage::UpdateBackupL() - Config count: %i" ), aConfigArray.Count() ) );
 
     // Loop config array and update storage
@@ -287,9 +290,19 @@
         // Search set element from config and create new if not found
         TXmlEngElement setItem;
         TRAP( trapErr, setItem = FindSetItemL( settings, configInfo.iConfigId ) );
-
-        // If not found, create new
-        if ( KErrNotFound == trapErr && setItem.IsNull() )
+        
+        COMPONENT_TRACE( ( _L( "PSM Server - FindSetItemL() TRAP error -  %d" ), trapErr ) );
+        
+        if ( KErrNoMemory == trapErr && setItem.IsNull() )
+            {
+            User::Leave(trapErr);
+            }
+        else if (KErrNoMemory == trapErr)
+            {
+            setItem.RemoveAttributeL( KPsmSetItemValue );
+            User::Leave(trapErr);
+            }
+        else if ( KErrNotFound == trapErr && setItem.IsNull() )
             {
             // First param indicates that cannot have childs, 
             // second is the owner document and last is tag
--- a/psmservices/psmserver/src/engine/psmmanager.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/src/engine/psmmanager.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-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"
@@ -113,8 +113,8 @@
     if ( iPluginLoader )
         {
         delete iPluginLoader;
-        }
-
+        }    
+    
     // Close mode observers array
     iModeObservers.Close();
 
@@ -286,14 +286,14 @@
     }
 
 // -----------------------------------------------------------------------------
-// CPsmManager::RegisterObserver
+// CPsmManager::RegisterObserverL
 // -----------------------------------------------------------------------------
 //
-void CPsmManager::RegisterObserver( MPsmModeChangeObserver* aObserver )
+void CPsmManager::RegisterObserverL( MPsmModeChangeObserver* aObserver )
     {
-    COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserver()" ) ) );
-    iModeObservers.Append( aObserver );
-    COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserver - return" ) ) );
+    COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserverL()" ) ) );
+    iModeObservers.AppendL( aObserver );    
+    COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserverL() return" ) ) );
     }
 
 // -----------------------------------------------------------------------------
@@ -326,4 +326,27 @@
     return *iSettingsHandler; 
     }
 
+#ifdef _DEBUG 
+// -----------------------------------------------------------------------------
+// CPsmManager::ClosePluginLoader
+// For testing purpose 
+// -----------------------------------------------------------------------------
+void CPsmManager::ClosePluginLoader()
+    {
+    if(iPluginLoader)
+        {
+        delete iPluginLoader;
+        iPluginLoader=NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CPsmManager::CompressModeObserversArray
+// For testing purpose 
+// -----------------------------------------------------------------------------
+void CPsmManager::CompressModeObserversArray()
+    {
+    iModeObservers.Compress();
+    }
+#endif // _DEBUG 
 // End of file
--- a/psmservices/psmserver/src/engine/psmsettingshandler.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/src/engine/psmsettingshandler.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -25,6 +25,29 @@
 #include "psmtrace.h"
 
 // -----------------------------------------------------------------------------
+// CloseHandler
+// closes the storage handler
+// -----------------------------------------------------------------------------
+//
+void CleanupStorage(TAny* aPtr)
+    {
+    CPsmStorage* self = static_cast<CPsmStorage*> (aPtr);
+    //Ignore the Trap as Cleanup can't leave.
+    TRAP_IGNORE(self->CloseStorageL());
+    }
+
+// -----------------------------------------------------------------------------
+// CloseHandler
+// closes the backup storage handler
+// -----------------------------------------------------------------------------
+//
+void CleanupBackupStorage(TAny* aPtr)
+    {
+    CPsmBackupStorage* self = static_cast<CPsmBackupStorage*> (aPtr);
+    //Ignore the Trap as Cleanup can't leave.
+    TRAP_IGNORE(self->CloseStorageL());
+    }
+	
 // CPsmSettingsHandler::NewL
 // Two-phased constructor.
 // -----------------------------------------------------------------------------
@@ -114,10 +137,13 @@
     RConfigInfoArray& aPsmConfigArray, TUint32 aRepository )
     {
     COMPONENT_TRACE( ( _L( "PSM Server - CPsmSettingsHandler::BackupAndGetSettingsL()" ) ) );
+    //Close config handle in case of any error
+    CleanupStack::PushL(TCleanupItem(CleanupStorage, iConfigStorage));
     // Change settings from normal config storage
     iConfigStorage->InitStorageL( aRepository );
     ChangeSettingsL( aPsmConfigArray, aRepository, *iConfigStorage );
     iConfigStorage->CloseStorageL();
+    CleanupStack::Pop(iConfigStorage);
     COMPONENT_TRACE( ( _L( "PSM Server - CPsmSettingsHandler::BackupAndGetSettingsL() - return" ) ) );
     }
 
@@ -226,7 +252,9 @@
     // First, get current settings
     RConfigInfoArray currentSettings;
     CleanupClosePushL( currentSettings );
-
+    
+    //Close backup handler in case of any error
+    CleanupStack::PushL(TCleanupItem(CleanupBackupStorage, iBackupStorage));
     iBackupStorage->InitStorageL( aRepository );
     iBackupStorage->ListCurrentSettingSetL( currentSettings );
 
@@ -245,8 +273,8 @@
         if ( !found )
             {
             // Add new settings to backup
-            settingsToBackUp.Append( aPsmConfigArray[ i ] );
-            currentSettings.Append( aPsmConfigArray[ i ] );
+            settingsToBackUp.AppendL( aPsmConfigArray[ i ] );
+            currentSettings.AppendL( aPsmConfigArray[ i ] );
             }
         }
 
@@ -272,7 +300,7 @@
     RConfigInfoArray settingsFromBackUp;
     CleanupClosePushL( settingsFromBackUp );
 
-    for ( TInt i = 0; currentSettings.Count() != i; i++ )
+    for ( TInt i = 0; currentSettings.Count() != i; ++i )
         {
         TPsmsrvConfigInfo& currentInfo = currentSettings[ i ];
         TBool found = EFalse;
@@ -287,9 +315,9 @@
         if ( !found )
             {
             // not found, get setting from backup
-            settingsFromBackUp.Append( currentInfo );
+            settingsFromBackUp.AppendL( currentInfo );
             currentSettings.Remove( i );
-            i--;
+            --i;
             }
         else
             {
@@ -312,12 +340,14 @@
     // add settings from backup to settings
     for ( TInt i = 0; i < settingsFromBackUp.Count(); i++ )
         {
-        aPsmConfigArray.Append( settingsFromBackUp[ i ] );
+        //Ignore the error returned by Append  
+        aPsmConfigArray.Append( settingsFromBackUp[ i ]);
         }
 
     // Cleanup config arrays
     CleanupStack::PopAndDestroy( &settingsFromBackUp );
     CleanupStack::PopAndDestroy( &settingsToBackUp );
+    CleanupStack::Pop( iBackupStorage );
     CleanupStack::PopAndDestroy( &currentSettings );
 
     User::LeaveIfError( err );
@@ -348,15 +378,19 @@
         CleanupClosePushL( psmConfigArray );
 
         const TUint32 repository = passiveConfigs[i];
-
+        //Close Cenrep handler in case of any error
+        CleanupStack::PushL(TCleanupItem(CleanupStorage, iCenRepStorage));
         iCenRepStorage->InitStorageL( repository );
 
         if ( EPsmsrvModeNormal == iMode )
             {
+            //Close Cenrep handler in case of any error
+    		CleanupStack::PushL(TCleanupItem(CleanupBackupStorage, iBackupStorage));	
             // Moving to normal mode, get passive config set from baskup storage
             iBackupStorage->InitStorageL( repository );
             iBackupStorage->ListPassiveConfigSetL( psmConfigArray );
             iBackupStorage->CloseStorageL();
+            CleanupStack::Pop( iBackupStorage );
             }
         else
             {
@@ -369,6 +403,7 @@
 
         // close storage
         iCenRepStorage->CloseStorageL();
+        CleanupStack::Pop( iCenRepStorage );
         CleanupStack::PopAndDestroy( &psmConfigArray );
         }
 
--- a/psmservices/psmserver/src/engine/psmstorage.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/src/engine/psmstorage.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -204,7 +204,7 @@
             }
 
         // Add info to list
-        aPsmConfigArray.Append( configInfo );
+        aPsmConfigArray.AppendL( configInfo );
 
         // handle next element set
         setElement = nodeList.Next().AsElement();
--- a/psmservices/psmserver/src/server/psmsrvmessage.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/src/server/psmsrvmessage.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-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"
@@ -154,4 +154,13 @@
     COMPONENT_TRACE( ( _L( "PSM Server - CPsmMessage::NotifyPsmModeChangeComplete - return" ) ) );
     }
 
+// -----------------------------------------------------------------------------
+// CPsmMessage::MessageHandle
+// -----------------------------------------------------------------------------
+//
+TInt CPsmMessage::MessageHandle() const
+        {
+        return iMessage.Handle();
+        }
+
 // End of file
--- a/psmservices/psmserver/src/server/psmsrvsession.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/src/server/psmsrvsession.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -14,7 +14,8 @@
 * Description:  PSM Server session
 *
 */
-
+#include <centralrepository.h>
+#include <psmsrvdomaincrkeys.h>
 #include <e32property.h>
 #include <connect/sbdefs.h>
 #include <psmsettingsprovider.h>
@@ -111,9 +112,6 @@
         COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::~CPsmSession - No pending requests") ) );
         }
 
-    // Reset and close config array
-    iConfigArray.Reset();
-    iConfigArray.Close();
 
     COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::~CPsmSession - return") ) );
     }
@@ -125,41 +123,28 @@
 void CPsmSession::ServiceL( const RMessage2& aMessage )
     {
     COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceL()" ) ) );
-
-    TRAPD( error, DispatchL( aMessage ) );
-
-    // Complete message with error code if there were errors
-    if ( KErrNone != error )
-        {
-        COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceL() - Error: %i" ), error ) );
-        aMessage.Complete( error );
-        }
-
-    COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceL - return" ) ) );
-    }
-
-// -----------------------------------------------------------------------------
-// CPsmSession::DispatchL
-// -----------------------------------------------------------------------------
-//
-void CPsmSession::DispatchL( const RMessage2& aMessage )
-    {
-    COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::DispatchL()" ) ) );
-
     switch ( aMessage.Function() )
         {
         case EPsmServerNotifyModeChange: // For power save mode change
             {
             TInt mode = aMessage.Int0();
-            if ( !iNotifyModeMessage )
-                {
-                // Create message wrapper if not yet created
-                iNotifyModeMessage = CPsmMessage::NewL( iPsmManager );
-                iPsmManager.RegisterObserver( iNotifyModeMessage );
-                }
-
-            // Check that mode to be set is valid, otherwise error code.
-            if( mode == iPsmManager.SettingsProvider().Mode() )
+			if ( !iNotifyModeMessage )
+				{
+				// Create message wrapper if not yet created
+				CPsmMessage* notifyModeMessage = CPsmMessage::NewL( iPsmManager );
+				CleanupStack::PushL(notifyModeMessage);
+				iPsmManager.RegisterObserverL( notifyModeMessage );
+				CleanupStack::Pop(notifyModeMessage);
+				iNotifyModeMessage = notifyModeMessage;
+				}
+				
+			//Check whether the mode is already set .
+			TInt cenrepMode( 0 );
+			CRepository* cenrep = CRepository::NewLC( KCRUidPowerSaveMode );
+			User::LeaveIfError(cenrep->Get( KPsmCurrentMode, cenrepMode ));
+			CleanupStack::PopAndDestroy( cenrep );
+			// Check that mode to be set is valid, otherwise error code.
+            if( mode == cenrepMode )
                 {
                 User::Leave( KErrAlreadyExists );
                 }
@@ -188,12 +173,6 @@
         case EPsmServerGetSettings: // For PSM settings
         case EPsmServerBackupSettings: // For PSM settings
             {
-            // Check previous config
-            if ( iConfigArray.Count() > 0 )
-                {
-                iConfigArray.Reset();
-                }
-
             // Handle settings requests in different function
             HandleSettingsRequestL( aMessage );
             break;
@@ -224,8 +203,11 @@
             if ( !iNotifyModeMessage )
                 {
                 // Create message wrapper if not yet created
-                iNotifyModeMessage = CPsmMessage::NewL( iPsmManager );
-                iPsmManager.RegisterObserver( iNotifyModeMessage );
+                CPsmMessage* notifyModeMessage = CPsmMessage::NewL( iPsmManager );
+				CleanupStack::PushL(notifyModeMessage);
+				iPsmManager.RegisterObserverL( notifyModeMessage );
+				CleanupStack::Pop(notifyModeMessage);
+				iNotifyModeMessage = notifyModeMessage;
                 }
             iNotifyModeMessage->Initialize( aMessage );
             break;
@@ -247,16 +229,78 @@
             aMessage.Complete( KErrNone );
             break;
             }
+#ifdef _DEBUG    
+        case EDebugHeapMark:
+            {        
+            COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession - EDebugMarkHeap: Alloc Cells: %d."), User::CountAllocCells()));            
+            __UHEAP_MARK;
+            aMessage.Complete(KErrNone);
+            break;
+            }
+            
+        case EDebugHeapMarkEnd:
+            {
+            COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession - EDebugMarkHeapEnd: Alloc Cells: %d."), User::CountAllocCells()));
+            if ( iNotifyModeMessage )
+                {
+                // Unregister observer from manager
+                iPsmManager.UnregisterObserver( iNotifyModeMessage );
+                // Compress the observer array
+                iPsmManager.CompressModeObserversArray();
+                // Finally delete message
+                delete iNotifyModeMessage;
+                iNotifyModeMessage = NULL;
+                }
+            iPsmManager.ClosePluginLoader();
+            __UHEAP_MARKEND;
+            aMessage.Complete(KErrNone);
+            break;
+            }
+            
+        case EDebugSetHeapFailure:
+            {
+            COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession - EDebugSetHeapFailure: Value of Failure Rate: %d."), aMessage.Int0()));            
+            __UHEAP_SETFAIL(RAllocator::EFailNext,aMessage.Int0());
+            aMessage.Complete(KErrNone);
+            break;
+            }
+            
+        case EDebugHeapReset:
+            {
+            COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession - EDebugHeapReset ")));            
+            __UHEAP_RESET;
+            aMessage.Complete(KErrNone);
+            break;
+            }            
+#endif
         default:
             {
             COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceL() - unknown request: %i - ERROR" ), aMessage.Function() ) );
             User::Leave( KErrUnknown );
             }
         }
+    COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceL - return" ) ) );
+    }
 
-    COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::DispatchL - return" ) ) );
+// -----------------------------------------------------------------------------
+// CPsmSession::ServiceError
+// -----------------------------------------------------------------------------
+//
+void CPsmSession::ServiceError(const RMessage2 &aMessage, TInt aError)
+    {
+    // Complete message with error code if there were errors
+    COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceError() - Error: %i" ), aError ) );
+    if (iNotifyModeMessage && (aMessage.Handle() == iNotifyModeMessage->MessageHandle()) )
+        {
+        iNotifyModeMessage->Complete( aError );           
+        }
+    else
+        {
+        aMessage.Complete( aError );
+        }
     }
 
+
 // -----------------------------------------------------------------------------
 // CPsmSession::HandleSettingsRequestL
 // -----------------------------------------------------------------------------
@@ -265,37 +309,62 @@
     {
     COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL()" ) ) );
 
+    RConfigInfoArray configArray;
+    CleanupClosePushL(configArray);
     // read config array from message
-    ReadConfigArrayL( iConfigArray, aMessage );
+    ReadConfigArrayL( configArray, aMessage );
     // Get storage UID
     TUint32 storage = aMessage.Int2();
 
     TInt err( KErrNone );
 
-    if ( aMessage.Function() == EPsmServerBackupSettings )
+    switch ( aMessage.Function() )
         {
-        iPsmManager.SettingsProvider().BackupSettingsL( iConfigArray, storage );
-        }
-    else 
-        {
-        if ( aMessage.Function() == EPsmServerGetSettings )
+        case EPsmServerBackupSettings: // For server backup settings
             {
-            iPsmManager.SettingsProvider().GetSettingsL( iConfigArray, storage );
+            iPsmManager.SettingsProvider().BackupSettingsL( configArray, storage );
+            break;
             }
-        else
+        case EPsmServerGetSettings: // For getting server settingspower save mode change
             {
-            // EPsmServerChangeSettings
-            iPsmManager.SettingsProvider().BackupAndGetSettingsL( iConfigArray, storage );
+            iPsmManager.SettingsProvider().GetSettingsL( configArray, storage );
+            // check whether the configArray is empty before writing the value back to message.
+            if(configArray.Count() > 0)
+                {
+                // write changed values back to message
+                TInt arraySize( configArray.Count() * sizeof( TPsmsrvConfigInfo ) );
+                TPtr8 arrayPtr( reinterpret_cast<TUint8*>(&configArray[0]), arraySize, arraySize );
+                err = aMessage.Write( 0, arrayPtr );
+                COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL - New data wrote to message: %i" ), err ) );
+                }
+            else
+                {
+                ERROR_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL - Config Array is Empty" )) );
+                }
+            break;
             }
-
-        // We have to write changed values back to message
-        TInt arraySize( iConfigArray.Count() * sizeof( TPsmsrvConfigInfo ) );
-        TPtr8 arrayPtr( reinterpret_cast<TUint8*>(&iConfigArray[0]), arraySize, arraySize );
-        err = aMessage.Write( 0, arrayPtr );
-        ERROR_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL - New data wrote to message: %i" ), err ) );
+        case EPsmServerChangeSettings: // For changing the settings
+            {
+            // We have to write changed values back to message
+            iPsmManager.SettingsProvider().BackupAndGetSettingsL( configArray, storage );
+            // We have to write changed values back to message
+            TInt arraySize( configArray.Count() * sizeof( TPsmsrvConfigInfo ) );
+            TPtr8 arrayPtr( reinterpret_cast<TUint8*>(&configArray[0]), arraySize, arraySize );
+            err = aMessage.Write( 0, arrayPtr );
+            ERROR_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL - New data wrote to message: %i" ), err ) );
+            break;
+            }
+        default:
+            {
+            COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL() - unknown request: %i - ERROR" ), aMessage.Function() ) );
+            User::Leave( KErrUnknown );
+            }
         }
     // Complete message before destroying local config array
     aMessage.Complete( err );
+			
+    CleanupStack::PopAndDestroy(&configArray);
+
     COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL - return" ) ) );
     }
 
@@ -310,10 +379,8 @@
     const TInt configCount( aMessage.Int1() );
     TInt arrayLength( configCount * sizeof( TPsmsrvConfigInfo ) );
 
-    // There is no ResizeL() for RArray
-    // ReserveL() does not change iCount, which will
-    // result array[0] failure (access beyond array index)
-    // That is why we fill the array with dummy items
+    aArray.ReserveL(configCount);    
+    //Fill the array with dummy items
     for(TInt x = 0; x < configCount; ++x )
     	{
         // Append empty config infos to array
--- a/psmservices/psmserver/tsrc/PsmTestModule/conf/PsmTestModule.cfg	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/tsrc/PsmTestModule/conf/PsmTestModule.cfg	Tue Aug 31 16:29:05 2010 +0300
@@ -648,3 +648,51 @@
 delete test
 [Endtest]
 
+[Test]
+title OOM_PSM to power save mode
+create PsmTestModule test
+test OOMChangePsmInit FullPsm
+test ChangePsmEnd
+delete test
+[Endtest]
+
+[Test]
+title OOM_Cancel PSM change
+create PsmTestModule test
+test OOMCancelPsm
+pause 1000
+test ChangePsmEnd
+delete test
+[Endtest]
+
+[Test]
+title OOM_BackupAndGetSettings
+create PsmTestModule test
+test ChangeSettingsInit Normal
+test OOMBackupAndGetSettings
+pause 1000
+test ChangePsmEnd
+delete test
+[Endtest]
+
+[Test]
+title OOM_GetSettings
+create PsmTestModule test
+test ChangeSettingsInit Normal
+test OOMGetSettings
+pause 1000
+test ChangePsmEnd
+delete test
+[Endtest]
+
+[Test]
+title OOM_BackupSettings
+create PsmTestModule test
+test ChangeSettingsInit Normal
+test OOMBackupSettings
+pause 1000
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
--- a/psmservices/psmserver/tsrc/PsmTestModule/group/PsmTestModule.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/tsrc/PsmTestModule/group/PsmTestModule.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -37,6 +37,8 @@
 //RESOURCE        resource_file2
 
 USERINCLUDE     ../inc
+USERINCLUDE     ../../../inc/client
+USERINCLUDE     ../../../inc/util
 
 OS_LAYER_SYSTEMINCLUDE
 
--- a/psmservices/psmserver/tsrc/PsmTestModule/inc/PSMTest.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/tsrc/PsmTestModule/inc/PSMTest.h	Tue Aug 31 16:29:05 2010 +0300
@@ -266,6 +266,13 @@
         // From MPsmChangeCompleteObserver
         virtual void PowerSaveModeChangeError( const TInt aError );
 
+#ifdef _DEBUG
+        TInt OOMNotifyPowerSaveModeChangeInitL( CStifItemParser& aItem );
+        TInt OOMCancelPowerSaveModeChangeL( CStifItemParser& aItem );
+        TInt OOMPsmBackupAndGetSettingsL( CStifItemParser& /*aItem*/ );
+        TInt OOMPsmGetSettingsL( CStifItemParser& /*aItem*/ );
+        TInt OOMPsmBackupSettingsL( CStifItemParser& /*aItem*/ );      
+#endif //_DEBUG     
 
     public:     // Data
         // ?one_line_short_description_of_data
--- a/psmservices/psmserver/tsrc/PsmTestModule/src/PSMTestBlocks.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/psmservices/psmserver/tsrc/PsmTestModule/src/PSMTestBlocks.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -28,7 +28,7 @@
 
 #include <psmsrvdomaincrkeys.h>
 #include <centralrepository.h>
-
+#include "psmclientimpl.h"
 #include "PSMTest.h"
 
 
@@ -126,7 +126,16 @@
         ENTRY( "OpenClosePerformanceChange", CPSMTest::OpenClosePerformanceChange ),
         ENTRY( "OpenClosePerformanceEnd", CPSMTest::OpenClosePerformanceEnd ),
         ENTRY( "ChangePsmPerformance", CPSMTest::ChangePsmPerformance ),
-        ENTRY( "ChangeSettingsPerformance", CPSMTest::ChangeSettingsPerformance )
+
+#ifdef _DEBUG 
+        //OOM tests for psm server
+        ENTRY( "OOMChangePsmInit", CPSMTest::OOMNotifyPowerSaveModeChangeInitL ),
+        ENTRY( "OOMCancelPsm", CPSMTest::OOMCancelPowerSaveModeChangeL ),
+        ENTRY( "OOMBackupAndGetSettings", CPSMTest::OOMPsmBackupAndGetSettingsL ),
+        ENTRY( "OOMGetSettings", CPSMTest::OOMPsmGetSettingsL ),
+        ENTRY( "OOMBackupSettings", CPSMTest::OOMPsmBackupSettingsL ),
+#endif  //_DEBUG       
+        ENTRY( "ChangeSettingsPerformance", CPSMTest::ChangeSettingsPerformance )    
         };
 
     const TInt count = sizeof( KFunctions ) / 
@@ -1242,6 +1251,160 @@
 //
 CPSMTestObserver::~CPSMTestObserver()
     {
-    }
+    }   
 */
+#ifdef _DEBUG 
+// -----------------------------------------------------------------------------
+// CPSMTest::OOMNotifyPowerSaveModeChangeInit
+// -----------------------------------------------------------------------------
+//
+TInt CPSMTest::OOMNotifyPowerSaveModeChangeInitL(CStifItemParser& /*aItem*/)
+    {    
+    CPsmClient* psmClient = CPsmClient::NewL( *this );
+    CleanupStack::PushL(psmClient);
+    CPsmClientImpl* psmImpl = static_cast<CPsmClientImpl*> (psmClient);
+	psmImpl->HeapReset();
+	psmImpl->HeapMark();
+    for (TInt allocFailRate = 1;; allocFailRate++)
+        {        
+        psmImpl->SetHeapFailure( allocFailRate );                
+        psmImpl->ChangePowerSaveMode(1);
+        // Wait for mode to change
+        iSchedulerWait.Start();
+        
+        if (iErrorCode == KErrNone)
+            {
+            iErrorCode = KErrNone;            
+            break;            
+            }     
+        }
+	psmImpl->HeapMarkEnd();
+	psmImpl->HeapReset();   
+    CleanupStack::PopAndDestroy(psmClient);
+    return KErrNone;  
+    }
+
+// -----------------------------------------------------------------------------
+// CPSMTest::OOMCancelPowerSaveModeChange
+// -----------------------------------------------------------------------------
+//
+TInt CPSMTest::OOMCancelPowerSaveModeChangeL( CStifItemParser& /*aItem*/ )
+    {
+    CPsmClient* psmClient = CPsmClient::NewL( *this );
+    CleanupStack::PushL(psmClient);
+    CPsmClientImpl* psmImpl = static_cast<CPsmClientImpl*> (psmClient);
+    psmImpl->ChangePowerSaveMode(0);
+    for (TInt allocFailRate = 1;; allocFailRate++)
+        {
+        psmImpl->HeapReset();
+        psmImpl->SetHeapFailure( allocFailRate );
+        psmImpl->HeapMark();        
+        psmImpl->CancelPowerSaveModeChange();        
+        // Wait for mode to change
+        iSchedulerWait.Start();
+        psmImpl->HeapMarkEnd();
+        if (iErrorCode == KErrNone )
+            {
+            iErrorCode = KErrNone;
+            psmImpl->HeapReset();  
+            break;            
+            }       
+        }
+    CleanupStack::PopAndDestroy(psmClient); 
+    return KErrNone;  
+    }
+
+
+// -----------------------------------------------------------------------------
+// CPSMTest::OOMPsmBackupAndGetSettings
+// -----------------------------------------------------------------------------
+//
+TInt CPSMTest::OOMPsmBackupAndGetSettingsL( CStifItemParser& /*aItem*/ )
+    {
+    CPsmClient* psmClient = CPsmClient::NewL( *this );
+    CleanupStack::PushL(psmClient);
+   
+    CPsmClientImpl* psmImpl = static_cast<CPsmClientImpl*> (psmClient);
+    psmImpl->HeapReset();
+    psmImpl->HeapMark(); 
+    for (TInt allocFailRate = 1;; allocFailRate++)
+        {
+        
+        psmImpl->SetHeapFailure( allocFailRate );
+              
+        TInt err = psmImpl->PsmSettings().BackupAndGetSettings( iPsmConfigArray, KCenRepUid2 );
+       
+        if (err == KErrNone)
+            {
+            
+            break;            
+            }         
+        }
+    psmImpl->HeapMarkEnd();
+    psmImpl->HeapReset();  
+    CleanupStack::PopAndDestroy(psmClient);
+    return KErrNone;  
+    }
+
+// -----------------------------------------------------------------------------
+// CPSMTest::OOMPsmGetSettings
+// -----------------------------------------------------------------------------
+//
+TInt CPSMTest::OOMPsmGetSettingsL( CStifItemParser& /*aItem*/ )
+    {
+    CPsmClient* psmClient = CPsmClient::NewL( *this );
+    CleanupStack::PushL(psmClient);
+    CPsmClientImpl* psmImpl = static_cast<CPsmClientImpl*> (psmClient);
+
+    for (TInt allocFailRate = 1;; allocFailRate++)
+        {
+        psmImpl->HeapReset();
+        psmImpl->SetHeapFailure( allocFailRate );
+        psmImpl->HeapMark();       
+        TInt err = psmImpl->PsmSettings().GetSettings( iPsmConfigArray, KCenRepUid2 );
+        psmImpl->HeapMarkEnd();
+        if (err == KErrNone)
+            {
+            psmImpl->HeapReset();  
+            break;            
+            }         
+        }
+    CleanupStack::PopAndDestroy(psmClient);
+    return KErrNone;  
+    }
+
+// -----------------------------------------------------------------------------
+// CPSMTest::OOMPsmBackupSettings
+// -----------------------------------------------------------------------------
+//
+TInt CPSMTest::OOMPsmBackupSettingsL( CStifItemParser& /*aItem*/ )
+    {
+    CPsmClient* psmClient = CPsmClient::NewL( *this );
+    CleanupStack::PushL(psmClient);
+    CPsmClientImpl* psmImpl = static_cast<CPsmClientImpl*> (psmClient);
+	//IGNORE the error of Powersave mode request. If Powersave mode is not enabled the Backupsettings will fail with KErrWrite.
+    psmImpl->ChangePowerSaveMode(1);
+    iSchedulerWait.Start();    
+    RConfigInfoArray psmConfigArray;
+    GenerateConfigArray( psmConfigArray, EPsmsrvModePowerSave, 0 ); 
+    psmImpl->HeapReset();
+    psmImpl->HeapMark();
+    for (TInt allocFailRate = 1;; allocFailRate++)
+        {       
+        psmImpl->SetHeapFailure( allocFailRate );
+        TInt err = psmImpl->PsmSettings().BackupSettings( psmConfigArray, KCenRepUid2 );
+        iLog->Log( _L("PSMTest: BackupSettings- iPsmConfigArray.Count(): %d"), psmConfigArray.Count() );
+        if (err == KErrNone)
+            {            
+            break;            
+            }      
+        }
+    psmImpl->HeapMarkEnd();
+    psmImpl->HeapReset(); 
+    psmConfigArray.Close();   
+    CleanupStack::PopAndDestroy(psmClient);
+    return KErrNone; 
+    }
+
+#endif //_DEBUG     
 //  End of File
--- a/resourceinterfaces/fmtransmittercontrol/group/FmTx_HWRM.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourceinterfaces/fmtransmittercontrol/group/FmTx_HWRM.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -21,7 +21,7 @@
 
 #include <featreg.iby> // Feature Registry (featreg.dll)
 
-#ifndef SYMBIAN_EXCLUDE_FMTX
+#ifdef FF_FMTX
 file=ABI_DIR\DEBUG_DIR\HWRMFmTxClient.dll 	 SYSTEM_BINDIR\HWRMFmTxClient.dll
 #endif
 
--- a/resourceinterfaces/fmtransmittercontrol/src/HWRMFmTxStatusObserver.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourceinterfaces/fmtransmittercontrol/src/HWRMFmTxStatusObserver.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -203,20 +203,7 @@
 // -----------------------------------------------------------------------------
 //
 TFmTxState CHWRMFmTxStatusObserver::Status()
-    {
-    COMPONENT_TRACE1( _L( "HWRM FM Tx Client - CHWRMFmTxStatusObserver::Status()" ));
-    
-    TInt value(EFmTxStateUnknown);
-    
-    TInt err = RProperty::Get(KPSUidHWRMFmTx, KHWRMFmTxStatus, value);
-    
-    if ( err == KErrNone )
-        {
-		COMPONENT_TRACE1( _L( "HWRM FM Tx Client - CHWRMFmTxStatusObserver::Status - RPropert::Get ok" ) );        	
-        	
-        iFmTxState = static_cast<TFmTxState>(value);
-        }
-    
+    {    
     COMPONENT_TRACE2( _L( "HWRM FM Tx Client - CHWRMFmTxStatusObserver::Status - return 0x%x" ), iFmTxState );
     
     return iFmTxState;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resourceinterfaces/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2006-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:  
+*
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+
+#include "../fmtransmittercontrol/group/bld.inf"
+
+PRJ_TESTMMPFILES
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resourceinterfaces/layers.sysdef.xml	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<!DOCTYPE SystemDefinition [
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+  name CDATA #REQUIRED
+  schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED
+  span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset 
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED  
+  span CDATA #IMPLIED
+  level CDATA #IMPLIED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+  name CDATA #REQUIRED
+  level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+  unitID ID #REQUIRED
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  bldFile CDATA #REQUIRED
+  priority CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+  name CDATA #REQUIRED
+  version CDATA #REQUIRED
+  late (Y|N) #IMPLIED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+  name ID #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+  name ID #REQUIRED
+  abldTarget CDATA #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+  name ID #REQUIRED
+  abldOption CDATA #REQUIRED
+  description CDATA #REQUIRED
+  enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+  command CDATA #REQUIRED
+  targetList IDREFS #IMPLIED
+  unitParallel (Y | N | y | n) #REQUIRED
+  targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+  name CDATA #REQUIRED
+  cwd CDATA #REQUIRED
+  command CDATA #REQUIRED>
+  <!ENTITY layer_real_source_path "sf/os/devicesrv/resourceinterfaces" >
+]>
+
+<SystemDefinition name="Dvscode" schema="1.4.0">
+  <systemModel>
+    <layer name="os_layer">
+		<module name="Hardware Interfaces">
+			<unit name="fmtransmittercontrol" unitID="sos.fmtransmittercontrol" bldFile="&layer_real_source_path;/fmtransmittercontrol/group" mrp="&layer_real_source_path;/fmtransmittercontrol/group/telephony_hwrmfmtx.mrp"/>
+		</module>
+    </layer>
+	
+  </systemModel>
+</SystemDefinition>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resourcemgmt/data/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* 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:  Hardware Resource Manager data files
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+InternalHWRMLightsPolicy.ini           z:/private/101f7a02/customerhwrmlightspolicy.ini
+InternalHWRMVibraPolicy.ini            z:/private/101f7a02/customerhwrmvibrapolicy.ini
+InternalHWRMFmTxPolicy.ini             z:/private/101f7a02/customerhwrmfmtxpolicy.ini
+
+
+//  End of File  
--- a/resourcemgmt/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -21,19 +21,13 @@
 DEFAULT
 
 PRJ_EXPORTS
-../data/InternalHWRMLightsPolicy.ini           z:/private/101f7a02/customerhwrmlightspolicy.ini
-../data/InternalHWRMVibraPolicy.ini            z:/private/101f7a02/customerhwrmvibrapolicy.ini
-../data/InternalHWRMFmTxPolicy.ini             z:/private/101f7a02/customerhwrmfmtxpolicy.ini
 
-
+#include "../data/bld.inf"
+#include "../hwresourcesmgr/group/bld.inf"
+#include "../hwresourcesmgrconfig/bld.inf"
+#include "../powerandmemorynotificationservice/group/bld.inf"
 #include "../hwrmfmtxwatcherplugin/group/bld.inf"
-
-#if  defined(WINSCW) && !defined(__HWRM_TARGET_MODIFIER_PLUGIN)
-// Do nothing
-#else
 #include "../hwrmtargetmodifierplugin/group/bld.inf"
-#endif
-
 #include "../vibractrl/group/bld.inf"
 
 //  End of File  
Binary file resourcemgmt/hwresourcesmgr/documentation/HWRM Central Repository keys.xls has changed
--- a/resourcemgmt/hwresourcesmgr/group/HWResourceManager.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/group/HWResourceManager.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -21,13 +21,13 @@
 
 #include <featreg.iby> // Feature Registry (featreg.dll)
 
-file=ABI_DIR\DEBUG_DIR\HWRMCommon.dll        SYSTEM_BINDIR\HWRMCommon.dll
-file=ABI_DIR\DEBUG_DIR\HWRMServer.exe        SYSTEM_BINDIR\HWRMServer.exe
-file=ABI_DIR\DEBUG_DIR\HWRMClient.dll        SYSTEM_BINDIR\HWRMClient.dll
-file=ABI_DIR\DEBUG_DIR\HWRMVibraClient.dll   SYSTEM_BINDIR\HWRMVibraClient.dll
-file=ABI_DIR\DEBUG_DIR\HWRMLightClient.dll   SYSTEM_BINDIR\HWRMLightClient.dll
-file=ABI_DIR\DEBUG_DIR\HWRMExtendedLightClient.dll   SYSTEM_BINDIR\HWRMExtendedLightClient.dll
-file=ABI_DIR\DEBUG_DIR\HWRMPowerClient.dll   SYSTEM_BINDIR\HWRMPowerClient.dll
+file=ABI_DIR\DEBUG_DIR\hwrmcommon.dll        SYSTEM_BINDIR\hwrmcommon.dll
+file=ABI_DIR\DEBUG_DIR\hwrmserver.exe        SYSTEM_BINDIR\hwrmserver.exe
+file=ABI_DIR\DEBUG_DIR\hwrmclient.dll        SYSTEM_BINDIR\hwrmclient.dll
+file=ABI_DIR\DEBUG_DIR\hwrmvibraclient.dll   SYSTEM_BINDIR\hwrmvibraclient.dll
+file=ABI_DIR\DEBUG_DIR\hwrmlightclient.dll   SYSTEM_BINDIR\hwrmlightclient.dll
+file=ABI_DIR\DEBUG_DIR\hwrmextendedlightclient.dll   SYSTEM_BINDIR\hwrmextendedlightclient.dll
+file=ABI_DIR\DEBUG_DIR\hwrmpowerclient.dll   SYSTEM_BINDIR\hwrmpowerclient.dll
 
 // Backup and Restore
 data=DATAZ_\private\101f7a02\backup_registration.xml	private\101f7a02\backup_registration.xml
@@ -37,17 +37,17 @@
 
 //Product specific policy files, customized on a per product basis, depending on the device requirements.
 //Product specific policy overrides customer specific policy, if same SID is defined in both policies.
-data=DATAZ_\private\101f7a02\ProductHWRMLightsPolicy.ini   private\101f7a02\ProductHWRMLightsPolicy.ini
-data=DATAZ_\private\101f7a02\ProductHWRMVibraPolicy.ini    private\101f7a02\ProductHWRMVibraPolicy.ini
-data=DATAZ_\private\101f7a02\ProductHWRMFmTxPolicy.ini     private\101f7a02\ProductHWRMFmTxPolicy.ini
+data=DATAZ_\private\101f7a02\producthwrmlightspolicy.ini   private\101f7a02\producthwrmlightspolicy.ini
+data=DATAZ_\private\101f7a02\producthwrmvibrapolicy.ini    private\101f7a02\producthwrmvibrapolicy.ini
+data=DATAZ_\private\101f7a02\producthwrmfmtxpolicy.ini     private\101f7a02\producthwrmfmtxpolicy.ini
 
 //Platform internal policies (customer specific), customized by licensees to control policy at a platform level. 
-data=DATAZ_\private\101f7a02\CustomerHWRMLightsPolicy.ini  private\101f7a02\CustomerHWRMLightsPolicy.ini
-data=DATAZ_\private\101f7a02\CustomerHWRMVibraPolicy.ini   private\101f7a02\CustomerHWRMVibraPolicy.ini
-data=DATAZ_\private\101f7a02\CustomerHWRMFmTxPolicy.ini    private\101f7a02\CustomerHWRMFmTxPolicy.ini
+data=DATAZ_\private\101f7a02\customerhwrmlightspolicy.ini  private\101f7a02\customerhwrmlightspolicy.ini
+data=DATAZ_\private\101f7a02\customerhwrmvibrapolicy.ini   private\101f7a02\customerhwrmvibrapolicy.ini
+data=DATAZ_\private\101f7a02\customerhwrmfmtxpolicy.ini    private\101f7a02\customerhwrmfmtxpolicy.ini
 
 // FM Tx RDS text conversion
-data=DATAZ_\private\101f7a02\ConvertFromUnicode.dat     private\101f7a02\ConvertFromUnicode.dat
+data=DATAZ_\private\101f7a02\convertfromunicode.dat     private\101f7a02\convertfromunicode.dat
 
 #endif // __HWRESOURCEMANAGER_IBY__
 
--- a/resourcemgmt/hwresourcesmgr/power/inc/HWRMChargingStatusObserver.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/power/inc/HWRMChargingStatusObserver.h	Tue Aug 31 16:29:05 2010 +0300
@@ -23,7 +23,8 @@
 
 /* Observer class for charging status change */
 
-class CHWRMChargingStatusObs: public MPsPropertyObserver
+class CHWRMChargingStatusObs: public CBase,
+                              public MPsPropertyObserver
     {
     public:
         static CHWRMChargingStatusObs* NewL(MHWRMBatteryChargingStatusObserver* aChargingStatusCallback);
--- a/resourcemgmt/hwresourcesmgr/power/inc/HWRMPower.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/power/inc/HWRMPower.h	Tue Aug 31 16:29:05 2010 +0300
@@ -62,9 +62,20 @@
 * User::WaitForRequest(status);
 * User::LeaveIfError(status.Int());
 * 
-* // Start receiving periodical voltage measurements.
+* // Start receiving periodical power measurements.
+* //
+* // Note: There is a maximum reporting period defined for each product through the
+* //       CenRep Key KPowerMaxReportingPeriod defined in HWRMPowerDomainCRKeys.h.
+* //       The reporting will stop after this maximum reporting period by default.
+* //       The application can configure this dynamically.
+* //       Setting maximum report period to zero results in infinite notifications.
+* //
 * TRequestStatus& statusStart;
-* TIntervalMultiple intervalMultiple = EThreeTimesBaseTimeInterval;
+* TInt intervalMultiple = 3; // Three times the base time interval.
+* //
+* // Note: The base time interval is different for each product.
+* //       GetBaseTimeIntervalL API returns this value.
+* //
 * power->StartAverageVoltageReporting(statusStart, intervalMultiple);
 *  
 * User::WaitForRequest(statusStart);
--- a/resourcemgmt/hwresourcesmgr/server/src/HWRMPluginHandler.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/server/src/HWRMPluginHandler.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -330,7 +330,7 @@
 //
 void CHWRMPluginHandler::RegisterForIndicationsL(MHWRMIndicationHandler* aCallback)
 	{
-    COMPONENT_TRACE2( _L( "HWRM Server - CHWRMPluginHandler::RegisterForIndications(), Count() = %d" ), iIndicationCallbacks.Count() );
+    COMPONENT_TRACE2( _L( "HWRM Server - CHWRMPluginHandler::RegisterForIndicationsL(), Count() = %d" ), iIndicationCallbacks.Count() );
 
 	iIndicationCallbacks.AppendL(aCallback);
 	}
--- a/resourcemgmt/hwresourcesmgr/server/src/HWRMPowerCommonData.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/server/src/HWRMPowerCommonData.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -166,10 +166,13 @@
     delete iPowerService;
     iPowerService = NULL;
     
-    iMaxReportingPeriodNotifyHandler->StopListening();
-    delete iMaxReportingPeriodNotifyHandler;
-    iMaxReportingPeriodNotifyHandler =  NULL;
-
+    if (iMaxReportingPeriodNotifyHandler)
+    	{
+	    iMaxReportingPeriodNotifyHandler->StopListening();
+	    delete iMaxReportingPeriodNotifyHandler;
+	    iMaxReportingPeriodNotifyHandler =  NULL;
+    	}
+    	
     delete iRepository;  
     iRepository = NULL;
     
--- a/resourcemgmt/hwresourcesmgr/test/TestCapsHWRMPolicing/group/Cap_HWRM_API_Policing.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/TestCapsHWRMPolicing/group/Cap_HWRM_API_Policing.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -48,16 +48,7 @@
 SOURCE		HWRMFmTxSetRdsPty_CStep.cpp
 SOURCE		HWRMFmTxSetRdsPtyn_CStep.cpp
 
-#ifndef SYMBIAN_OLD_EXPORT_LOCATION
-SYSTEMINCLUDE	/epoc32/include/test
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE	/epoc32/include/platform/test
-
-#else
-SYSTEMINCLUDE	/epoc32/include 
-SYSTEMINCLUDE	/epoc32/include/test
-SYSTEMINCLUDE	/epoc32/include/hwrm
-#endif
+OS_LAYER_SYSTEMINCLUDE
 
 USERINCLUDE   ../inc
 USERINCLUDE   ../../../include
--- a/resourcemgmt/hwresourcesmgr/test/TestCapsHWRMPolicing/inc/CSuite.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/TestCapsHWRMPolicing/inc/CSuite.h	Tue Aug 31 16:29:05 2010 +0300
@@ -24,8 +24,8 @@
 #include <e32svr.h>
 #include "f32file.h"
 #include "e32test.h"
-#include <testexecutestepbase.h>
-#include <testexecuteserverbase.h>
+#include <test/testexecutestepbase.h>
+#include <test/testexecuteserverbase.h>
 
 //The two ways to get thru
 #define API_RetValue_ServerPanic			0
Binary file resourcemgmt/hwresourcesmgr/test/data/cenrep/10205043.txt has changed
--- a/resourcemgmt/hwresourcesmgr/test/data/featreg/RemovableFeatures.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/data/featreg/RemovableFeatures.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -17,18 +17,18 @@
 #define __REMOVABLEFEATURES_IBY__
 
 #define SYMBIAN_EXCLUDE_FAX
-#define SYMBIAN_EXCLUDE_PRINT
-#define SYMBIAN_EXCLUDE_MMC
+#undef __UPNP_PRINT_FRAMEWORK
+#undef __MMC
 #define SYMBIAN_EXCLUDE_RTP_RTCP
 #define SYMBIAN_EXCLUDE_PC_CONNECTIVITY_EXCEPT_SECURE_BACKUP
-#define SYMBIAN_EXCLUDE_INFRARED
-#define SYMBIAN_EXCLUDE_BLUETOOTH
+#undef __IRDA
+#undef __BT
 #define SYMBIAN_EXCLUDE_OBEX
-#define SYMBIAN_EXCLUDE_USB
+#undef __USB
 #define SYMBIAN_EXCLUDE_DRM_AGENT_PLUGINS
-#define SYMBIAN_EXCLUDE_IPSEC
+#undef __IPSEC
 #define SYMBIAN_EXCLUDE_QOS_PROTPLUGINS
-#define SYMBIAN_EXCLUDE_DHCP
+#undef __DHCP
 #define SYMBIAN_EXCLUDE_MOBILEIP
 #define SYMBIAN_EXCLUDE_LOCATION
 #define SYMBIAN_EXCLUDE_SIP
@@ -36,13 +36,13 @@
 #define SYMBIAN_EXCLUDE_OMA_DATASYNC
 #define SYMBIAN_EXCLUDE_OMA_DEVMAN
 #define SYMBIAN_EXCLUDE_OMA_DS_HOSTSERVERS
-#define SYMBIAN_EXCLUDE_MTP
+#undef __MTP_PROTOCOL_SUPPORT
 
 // Include HWRM features by uncommenting their exclusion macros
-//#define SYMBIAN_EXCLUDE_FMTX
-//#define SYMBIAN_EXCLUDE_VIBRA
-//#define SYMBIAN_EXCLUDE_AMBIENT_LIGHT_SENSOR
-//#define SYMBIAN_EXCLUDE_COVER_DISPLAY
-//#define SYMBIAN_EXCLUDE_KEYPAD_NO_SLIDER
+//#undef FF_FMTX
+//#undef __VIBRA
+//#undef __SERIES60_AMBIENT_LIGHT_SENSOR
+//#undef __COVER_DISPLAY
+//#undef __SERIES60_KEYPAD_NO_SLIDER
 
 #endif
--- a/resourcemgmt/hwresourcesmgr/test/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -40,6 +40,7 @@
 ../data/cenrep/10200C8C.txt /epoc32/data/z/private/10202be9/10200c8c.txt
 ../data/cenrep/10200C8D.txt /epoc32/data/z/private/10202be9/10200c8d.txt
 ../data/cenrep/20008EA6.txt /epoc32/data/z/private/10202be9/20008ea6.txt
+../data/cenrep/10205043.txt /epoc32/data/z/private/10202be9/10205043.txt
 
 ../data/cenrep/10200C8B.txt /epoc32/release/winscw/udeb/z/private/10202be9/10200c8b.txt
 ../data/cenrep/10200C8C.txt /epoc32/release/winscw/udeb/z/private/10202be9/10200c8c.txt
@@ -98,5 +99,5 @@
 ../multiclient/mctest_b/mctest_b.mmp
 ../plugins/testuiplugin_f/group/hwrmtestuiplugin_f.mmp
 ../plugins/testuiplugin_b/group/hwrmtestuiplugin_b.mmp
-../multiclient/HWRMLightTestF/group/HWRMLightTestF.mmp
-../multiclient/HWRMLightTestB/group/HWRMLightTestB.mmp
+//../multiclient/HWRMLightTestF/group/HWRMLightTestF.mmp
+//../multiclient/HWRMLightTestB/group/HWRMLightTestB.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resourcemgmt/hwresourcesmgr/test/group/howto_test_hwrm.txt	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,32 @@
+Steps to test HWRM
+------------------------------
+- Change to \sf\os\devicesrv\resourcemgmt\hwresourcesmgr\test\group directory
+- Build test code by executing 'sbs -c armv5.test' (for armv5 target)
+- Include te_hwrm.iby file in the rom build by adding the following line in 
+	SymbianOS.iby (one such file which is included in rom building)
+	
+	#include <te_hwrm.iby>
+	
+Note: There are certain test specific cenrep files that we export from within 
+			this test code. They might get overridden on certain platforms such as 
+			platsim by the crml files export as part of production code. They should 
+			be removed by manually deletion. List of those crml	files is as follows:
+				
+				Exported from \sf\os\devicesrv\resourcemgmt\hwresourcesmgrconfig\conf
+				1. hwresourcesandenhancements_10200C8B.crml
+				2. hwresourcesandenhancements_10200C8C.crml
+				3. hwresourcesandenhancements_10200C8D.crml
+				4. hwresourcesandenhancements_10205043.crml
+				
+				Exported from \sf\os\devicesrv\resourceinterfaces\fmtransmittercontrol\conf
+				5. hwresourceclientfmtx_20008EA6.crml
+				
+Command to run HWRM tests
+------------------------------
+- After booting the built rom image, switch to eshell
+- For the TEF tests, run the command
+	testexecute z:\testdata\scripts\te_hwrm.script
+			
+- There are additional RTests, run the command
+	hwrmtests.exe
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resourcemgmt/hwresourcesmgr/test/group/hwrm_rtests.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,33 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Hwrm_rtests EN"}
+
+; Vendor name
+: "Hwrm_rtests"
+
+; RTest Cases
+"\epoc32\release\armv5\urel\hwrmtests.exe"-"c:\sys\bin\hwrmtests.exe"
+"\epoc32\release\armv5\urel\mctest_f.exe"-"c:\sys\bin\mctest_f.exe"
+
+
+
--- a/resourcemgmt/hwresourcesmgr/test/group/te_hwrm.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/group/te_hwrm.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,10 @@
 #include <hwresourcemanager.iby>
 //for test purposes, include symbian's FmTx and UI plugin
 #include <fmtx_hwrm.iby>
+// if the feature flag for FF_FMTX is undefined, include the dll here
+#ifndef FF_FMTX
+file=ABI_DIR\DEBUG_DIR\HWRMFmTxClient.dll 	 SYSTEM_BINDIR\HWRMFmTxClient.dll
+#endif //FF_FMTX
 #include <hwrmuiplugin.iby>
 
 #include <hwrmdefaultlighttargetmodifierplugin.iby>
@@ -53,10 +57,10 @@
 #endif
 
 // cenrep registration files
-#ifdef TEXT_ONLY_ROM
+//#ifdef TEXT_ONLY_ROM
 // This is required because the cenrep files are now being included only via techview_base.iby
 data=DATAZ_\private\10202BE9\10205043.txt   private\10202be9\10205043.txt
-#endif
+//#endif
 data=DATAZ_\private\10202BE9\10200C8B.txt 	private\10202be9\10200C8B.txt
 data=DATAZ_\private\10202BE9\10200C8C.txt 	private\10202be9\10200C8C.txt
 data=DATAZ_\private\10202BE9\10200C8D.txt 	private\10202be9\10200C8D.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resourcemgmt/hwresourcesmgr/test/group/te_hwrm.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,29 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Te_Hwrm EN"}
+
+; Vendor name
+: "Te_Hwrm"
+
+"\sf\os\devicesrv\resourcemgmt\hwresourcesmgr\test\te_hwrm\te_hwrm.script"-"c:\devicesrv\hwrmtest\te_hwrm.script"
+"\sf\os\devicesrv\resourcemgmt\hwresourcesmgr\test\TestCapsHWRMPolicing\scripts\Cap_HWRM_API_Policing.script"-"c:\devicesrv\hwrmtest\Cap_HWRM_API_Policing.script"
--- a/resourcemgmt/hwresourcesmgr/test/multiclient/HWRMLightTestB/group/HWRMLightTestB.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/multiclient/HWRMLightTestB/group/HWRMLightTestB.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -56,19 +56,21 @@
 USERINCLUDE		  ../../common
 USERINCLUDE       ../../McFramework
 
-#ifndef SYMBIAN_OLD_EXPORT_LOCATION
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-MW_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE	/epoc32/include/platform/hwrm
-SYSTEMINCLUDE	/epoc32/include/libc
-SYSTEMINCLUDE /epoc32/include/platform/app/techview
-SYSTEMINCLUDE /epoc32/include/platform/app
-#else
-SYSTEMINCLUDE     /epoc32/include
-SYSTEMINCLUDE     /epoc32/include/hwrm
-SYSTEMINCLUDE     /epoc32/include/libc
-SYSTEMINCLUDE 	  /epoc32/include/techview
-#endif
+//This testsuite will be deprecated and for now as per the error ou1cimx1#480368, All system includes are commented.
+//#ifndef SYMBIAN_OLD_EXPORT_LOCATION
+//OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+//MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+//SYSTEMINCLUDE	/epoc32/include/platform/hwrm
+//SYSTEMINCLUDE	/epoc32/include/libc
+//SYSTEMINCLUDE /epoc32/include/platform/app/techview
+//SYSTEMINCLUDE /epoc32/include/platform/app
+//#else
+//SYSTEMINCLUDE     /epoc32/include
+//SYSTEMINCLUDE     /epoc32/include/hwrm
+//SYSTEMINCLUDE     /epoc32/include/libc
+//SYSTEMINCLUDE 	  /epoc32/include/techview
+//#endif
+
 LIBRARY 	euser.lib apparc.lib cone.lib eikcore.lib 
 LIBRARY 	eikcoctl.lib
 LIBRARY		eikdlg.lib
--- a/resourcemgmt/hwresourcesmgr/test/multiclient/HWRMLightTestF/group/HWRMLightTestF.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/multiclient/HWRMLightTestF/group/HWRMLightTestF.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -54,17 +54,18 @@
 USERINCLUDE		  ../../common
 USERINCLUDE       ../../McFramework 
 
-#ifndef SYMBIAN_OLD_EXPORT_LOCATION
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-MW_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE	/epoc32/include/platform/hwrm
-SYSTEMINCLUDE	/epoc32/include/libc
-#else
-SYSTEMINCLUDE     /epoc32/include
-SYSTEMINCLUDE     /epoc32/include/hwrm
-SYSTEMINCLUDE     /epoc32/include/libc
-SYSTEMINCLUDE 	  /epoc32/include/techview
-#endif
+// This testsuite will be deprecated and for now as per the error ou1cimx1#480368, All system includes are commented.
+//#ifndef SYMBIAN_OLD_EXPORT_LOCATION
+//OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+//MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+//SYSTEMINCLUDE	/epoc32/include/platform/hwrm
+//SYSTEMINCLUDE	/epoc32/include/libc
+//#else
+//SYSTEMINCLUDE     /epoc32/include
+//SYSTEMINCLUDE     /epoc32/include/hwrm
+//SYSTEMINCLUDE     /epoc32/include/libc
+//SYSTEMINCLUDE 	  /epoc32/include/techview
+//#endif
 
 
 LIBRARY 	euser.lib apparc.lib cone.lib eikcore.lib 
--- a/resourcemgmt/hwresourcesmgr/test/multiclient/common/testcasecontroller.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/multiclient/common/testcasecontroller.h	Tue Aug 31 16:29:05 2010 +0300
@@ -20,10 +20,10 @@
 #include <e32def.h>
 #include <eikenv.h>
 #include <hwrmlight.h>
-#include <hwrmextendedlight.h>
-#include <hwrmenhancedlight.h>
+#include <hwrm/hwrmextendedlight.h>
+#include <hwrm/hwrmenhancedlight.h>
 #include <hwrmvibra.h>
-#include <hwrmfmtx.h>
+#include <hwrm/hwrmfmtx.h>
 #include "McFramework.h"
 #include "tc_log.h"
 #include "testcaseids.h"
--- a/resourcemgmt/hwresourcesmgr/test/multiclient/hwrmtests/hwrmtests.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/multiclient/hwrmtests/hwrmtests.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -17,7 +17,7 @@
 #include <e32cons.h>
 
 _LIT(KDirectoryPath, "C:\\logs\\");
-_LIT(KLogFile,"C:\\logs\\hwrmtests.log");
+_LIT(KLogFile,"C:\\logs\\testexecute\\hwrmtests.htm");
 _LIT8(KCrLf,"\r\n");
 _LIT8(KRTest,"RTEST:");
 
--- a/resourcemgmt/hwresourcesmgr/test/multiclient/hwrmtests/hwrmtests.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/multiclient/hwrmtests/hwrmtests.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -13,7 +13,7 @@
 // Description:
 //
 
-TARGET          hwrmtests.exe
+TARGET          hwrmtests.exe //RTEST
 TARGETTYPE	    exe
 UID             0x102857BB 0x102857BB // 0
 VENDORID        0x70000001
@@ -34,14 +34,9 @@
 USERINCLUDE     ../common
 USERINCLUDE		../McFramework
 
-#ifndef SYMBIAN_OLD_EXPORT_LOCATION
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-MW_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE	/epoc32/include/platform/hwrm
-#else
-SYSTEMINCLUDE	/epoc32/include
-SYSTEMINCLUDE	/epoc32/include/hwrm
-#endif
+OS_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
+
 LIBRARY         centralrepository.lib
 LIBRARY			euser.lib
 LIBRARY			efsrv.lib 
--- a/resourcemgmt/hwresourcesmgr/test/multiclient/mctest_b/mctest_b.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/multiclient/mctest_b/mctest_b.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -34,14 +34,8 @@
 USERINCLUDE     ../common
 USERINCLUDE		../McFramework
 
-#ifndef SYMBIAN_OLD_EXPORT_LOCATION
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-MW_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE	/epoc32/include/platform/hwrm
-#else
-SYSTEMINCLUDE	/epoc32/include
-SYSTEMINCLUDE	/epoc32/include/hwrm
-#endif
+OS_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY			euser.lib
 LIBRARY			efsrv.lib 
--- a/resourcemgmt/hwresourcesmgr/test/multiclient/mctest_f/mctest_f.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/multiclient/mctest_f/mctest_f.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -16,7 +16,7 @@
 #include "mctest_f.h"
 #include <e32cons.h>
 
-_LIT(KLogFile,"C:\\logs\\mctest_f.log");
+_LIT(KLogFile,"C:\\logs\\testexecute\\mctest_f.htm");
 _LIT8(KCrLf,"\r\n");
 _LIT8(KRTest,"RTEST:");
 
--- a/resourcemgmt/hwresourcesmgr/test/multiclient/mctest_f/mctest_f.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/multiclient/mctest_f/mctest_f.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -13,7 +13,7 @@
 // Description:
 //
 
-TARGET			mctest_f.exe
+TARGET			mctest_f.exe //RTEST
 TARGETTYPE		exe
 UID				0x102857BB	0x102857BB
 VENDORID        0x70000001
@@ -34,14 +34,8 @@
 USERINCLUDE     ../common
 USERINCLUDE		../McFramework
 
-#ifndef SYMBIAN_OLD_EXPORT_LOCATION
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-MW_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE	/epoc32/include/platform/hwrm
-#else
-SYSTEMINCLUDE	/epoc32/include
-SYSTEMINCLUDE	/epoc32/include/hwrm
-#endif
+OS_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY         centralrepository.lib
 LIBRARY			euser.lib
--- a/resourcemgmt/hwresourcesmgr/test/plugins/MockHwrmSY/MockHwrmDll/group/mockhwrm.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/plugins/MockHwrmSY/MockHwrmDll/group/mockhwrm.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -20,8 +20,8 @@
 CAPABILITY 		ALL -Tcb
 
 USERINCLUDE     ../inc
-SYSTEMINCLUDE   /epoc32/include/ecom
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+OS_LAYER_SYSTEMINCLUDE
 
 SOURCEPATH      ../src
 
--- a/resourcemgmt/hwresourcesmgr/test/plugins/MockHwrmSY/MockHwrmSY/group/mockhwrmsy.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/plugins/MockHwrmSY/MockHwrmSY/group/mockhwrmsy.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -27,11 +27,8 @@
 USERINCLUDE     ../inc
 USERINCLUDE     ../../MockHwrmDll/inc
 USERINCLUDE     ../../../../../server/plugininc
-SYSTEMINCLUDE   /epoc32/include/ecom
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-SYSTEMINCLUDE   /epoc32/include/hwrm
-#endif
+
+OS_LAYER_SYSTEMINCLUDE
 
 SOURCEPATH      ../src
 
--- a/resourcemgmt/hwresourcesmgr/test/plugins/MockHwrmSY/MockHwrmSY/src/proxy.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/plugins/MockHwrmSY/MockHwrmSY/src/proxy.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -14,7 +14,7 @@
 //
 
 #include <e32std.h>
-#include <implementationproxy.h>
+#include <ecom/implementationproxy.h>
 #include "cmocklightsy.h"
 #include "cmockvibrasy.h"
 #include "cmockfmtxsy.h"
--- a/resourcemgmt/hwresourcesmgr/test/plugins/fmtxwatcherplugin/group/hwrmfmtxwatcherplugin.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/plugins/fmtxwatcherplugin/group/hwrmfmtxwatcherplugin.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -38,11 +38,8 @@
 #endif // INSECURE_AUDIO_POLICY_KEYS
 
 USERINCLUDE     ../inc
-SYSTEMINCLUDE   /epoc32/include/ecom
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-SYSTEMINCLUDE   /epoc32/include/hwrm
-#endif
+
+OS_LAYER_SYSTEMINCLUDE
 
 SOURCEPATH      ../data
 START RESOURCE  20012401.rss
--- a/resourcemgmt/hwresourcesmgr/test/plugins/fmtxwatcherplugin/src/hwrmfmtxwatcherplugin.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/plugins/fmtxwatcherplugin/src/hwrmfmtxwatcherplugin.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -16,7 +16,7 @@
 
 
 #include <hwrmfmtxcommands.h>
-#include <implementationproxy.h>
+#include <ecom/implementationproxy.h>
 #include "hwrmfmtxwatcherplugin.h"
 //#include "hwrmfmtxaccobserver.h"
 //#include "hwrmfmtxusbobserver.h"
--- a/resourcemgmt/hwresourcesmgr/test/plugins/targetmodifierplugin/group/hwrmdefaultlighttargetmodifierplugin.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/plugins/targetmodifierplugin/group/hwrmdefaultlighttargetmodifierplugin.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -34,13 +34,8 @@
 USERINCLUDE     ../inc
 USERINCLUDE     ../../../../include // telephony/hwrm/include
 
-#ifndef SYMBIAN_OLD_EXPORT_LOCATION
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-#else
-SYSTEMINCLUDE   /epoc32/include
-SYSTEMINCLUDE   /epoc32/include/hwrm
-SYSTEMINCLUDE   /epoc32/include/featmgr
-#endif
+OS_LAYER_SYSTEMINCLUDE
+
 LIBRARY         euser.lib 
 LIBRARY         ecom.lib
 LIBRARY         featmgr.lib
--- a/resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_b/group/hwrmtestuiplugin_b.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_b/group/hwrmtestuiplugin_b.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -31,9 +31,7 @@
 USERINCLUDE     ../inc
 USERINCLUDE		../../../../common/inc
 
-
-SYSTEMINCLUDE   /epoc32/include/ecom
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_SYSTEMINCLUDE
 
 LIBRARY         euser.lib 
 LIBRARY			ecom.lib
--- a/resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_b/src/proxy.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_b/src/proxy.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -14,7 +14,7 @@
 //
 
 #include <e32std.h>
-#include <implementationproxy.h>
+#include <ecom/implementationproxy.h>
 #include "hwrmtestuiplugin_b.h"
 
 // Map the interface implementation UIDs to implementation factory functions
--- a/resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_f/group/hwrmtestuiplugin_f.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_f/group/hwrmtestuiplugin_f.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -31,8 +31,7 @@
 USERINCLUDE     ../inc
 USERINCLUDE		../../../../common/inc
 
-SYSTEMINCLUDE   /epoc32/include/ecom
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_SYSTEMINCLUDE
 
 LIBRARY         euser.lib 
 LIBRARY			ecom.lib
--- a/resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_f/src/proxy.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/plugins/testuiplugin_f/src/proxy.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -14,7 +14,7 @@
 //
 
 #include <e32std.h>
-#include <implementationproxy.h>
+#include <ecom/implementationproxy.h>
 #include "hwrmtestuiplugin_f.h"
 
 // Map the interface implementation UIDs to implementation factory functions
--- a/resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtest.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtest.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -16,10 +16,10 @@
 #include "hwrmtest.h"
 #include "hwrmtestmacros.h"
 
-#include <hwrmvibracommands.h>
-#include <hwrmlightcommands.h>
-#include <hwrmpowercommands.h>
-#include <hwrmfmtxcommands.h>
+#include <hwrm/hwrmvibracommands.h>
+#include <hwrm/hwrmlightcommands.h>
+#include <hwrm/hwrmpowercommands.h>
+#include <hwrm/hwrmfmtxcommands.h>
 
 #include <rmocklight.h>
 #include <rmockvibra.h>
--- a/resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtestbase.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtestbase.h	Tue Aug 31 16:29:05 2010 +0300
@@ -16,13 +16,13 @@
 #ifndef hwrmtestbase_h
 #define hwrmtestbase_h
 
-#include <tefunit.h>
+#include <test/tefunit.h>
 #include <hwrmvibra.h>
 #include <hwrmlight.h>
-#include <hwrmextendedlight.h>
-#include <hwrmenhancedlight.h>
+#include <hwrm/hwrmextendedlight.h>
+#include <hwrm/hwrmenhancedlight.h>
 #include <hwrmpower.h>
-#include <hwrmfmtx.h>
+#include <hwrm/hwrmfmtx.h>
 #include <rmocklight.h>
 #include <rmockpowerstate.h>
 #include <rmockvibra.h>
--- a/resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtestserver.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtestserver.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -13,8 +13,8 @@
 // Description:
 //
 
-#include <ctefunitserver.h>
-#include <tefunit.h>
+#include <test/ctefunitserver.h>
+#include <test/tefunit.h>
 #include "hwrmtest.h"
 
 // Require: return server name : must be the same that the exe name
--- a/resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtestserver_pr.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtestserver_pr.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -13,8 +13,8 @@
 // Description:
 //
 
-#include <ctefunitserver.h>
-#include <tefunit.h>
+#include <test/ctefunitserver.h>
+#include <test/tefunit.h>
 #include "hwrmtest.h"
 
 // Require: return server name : must be the same that the exe name
--- a/resourcemgmt/hwresourcesmgr/test/te_hwrm/te_hwrm.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/te_hwrm/te_hwrm.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -39,16 +39,8 @@
 USERINCLUDE     ../../client/inc
 USERINCLUDE     ../../server/inc
 
-#ifndef SYMBIAN_OLD_EXPORT_LOCATION
-SYSTEMINCLUDE	/epoc32/include/test
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE	/epoc32/include/platform/test
-SYSTEMINCLUDE	/epoc32/include/platform/hwrm
-#else
-SYSTEMINCLUDE	/epoc32/include
-SYSTEMINCLUDE	/epoc32/include/test
-SYSTEMINCLUDE	/epoc32/include/hwrm
-#endif
+OS_LAYER_SYSTEMINCLUDE
+
 STATICLIBRARY	tefunit.lib
 LIBRARY			euser.lib
 LIBRARY			testexecuteutils.lib
--- a/resourcemgmt/hwresourcesmgr/test/te_hwrm/te_hwrm_pr.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/te_hwrm/te_hwrm_pr.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -33,17 +33,7 @@
 USERINCLUDE     ../../include
 USERINCLUDE     ../../server/inc
 
-#ifndef SYMBIAN_OLD_EXPORT_LOCATION
-SYSTEMINCLUDE	/epoc32/include/test
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE	/epoc32/include/platform/test
-SYSTEMINCLUDE	/epoc32/include/platform/hwrm
-#else
-SYSTEMINCLUDE	/epoc32/include
-SYSTEMINCLUDE	/epoc32/include/test
-SYSTEMINCLUDE	/epoc32/include/hwrm
-#endif
-
+OS_LAYER_SYSTEMINCLUDE
 
 STATICLIBRARY	tefunit.lib
 LIBRARY			euser.lib
--- a/resourcemgmt/hwresourcesmgrconfig/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwresourcesmgrconfig/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -34,3 +34,5 @@
 ./conf/hwresourcesandenhancements_1020506A.crml OS_LAYER_EXPORTS_CRML(hwresourcesandenhancements_1020506a.crml)
 ./conf/hwresourcesandenhancements_10200C8D.crml OS_LAYER_EXPORTS_CRML(hwresourcesandenhancements_10200c8d.crml)
 
+// Customization interface confml file
+./conf/ci_hwresourcesandenhancements.confml 		OS_LAYER_EXPORTS_CONFML(ci_hwresourcesandenhancements.confml)
Binary file resourcemgmt/hwresourcesmgrconfig/conf/ci_hwresourcesandenhancements.confml has changed
Binary file resourcemgmt/hwresourcesmgrconfig/conf/hwresourcesandenhancements.confml has changed
--- a/resourcemgmt/hwrmfmtxwatcherplugin/data/20012401.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwrmfmtxwatcherplugin/data/20012401.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -43,4 +43,5 @@
                 };
             }
         };
-    }
\ No newline at end of file
+    }
+
--- a/resourcemgmt/hwrmtargetmodifierplugin/data/10281B9B.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwrmtargetmodifierplugin/data/10281B9B.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -45,4 +45,5 @@
                 };
             }
         };
-    }
\ No newline at end of file
+    }
+
--- a/resourcemgmt/hwrmtargetmodifierplugin/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/hwrmtargetmodifierplugin/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2008-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,6 +15,10 @@
 *                build information file
 *
 */
+#if  defined(WINSCW) && !defined(__HWRM_TARGET_MODIFIER_PLUGIN)
+// Do nothing
+#else
+
 #include <platform_paths.hrh>
 
 PRJ_PLATFORMS
@@ -26,5 +30,5 @@
 PRJ_MMPFILES
 ../group/hwrmdefaultlighttargetmodifierplugin.mmp
 
-
+#endif
 //  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resourcemgmt/layers.sysdef.xml	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,119 @@
+<?xml version="1.0"?>
+<!DOCTYPE SystemDefinition [
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+  name CDATA #REQUIRED
+  schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED
+  span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset 
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED  
+  span CDATA #IMPLIED
+  level CDATA #IMPLIED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+  name CDATA #REQUIRED
+  level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+  unitID ID #REQUIRED
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  bldFile CDATA #REQUIRED
+  priority CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+  name CDATA #REQUIRED
+  version CDATA #REQUIRED
+  late (Y|N) #IMPLIED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+  name ID #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+  name ID #REQUIRED
+  abldTarget CDATA #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+  name ID #REQUIRED
+  abldOption CDATA #REQUIRED
+  description CDATA #REQUIRED
+  enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+  command CDATA #REQUIRED
+  targetList IDREFS #IMPLIED
+  unitParallel (Y | N | y | n) #REQUIRED
+  targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+  name CDATA #REQUIRED
+  cwd CDATA #REQUIRED
+  command CDATA #REQUIRED>
+  <!ENTITY layer_real_source_path "sf/os/devicesrv/resourcemgmt" >
+]>
+
+<SystemDefinition name="Dvscode" schema="1.4.0">
+  <systemModel>
+    <layer name="os_layer">
+		<module name="DeviceSrv_NCP">
+			<unit name="hwresourcesmgr" unitID="sos.hwresourcesmgr" bldFile="&layer_real_source_path;/hwresourcesmgr/group" mrp="&layer_real_source_path;/hwresourcesmgr/group/telephony_hwrm.mrp"/>
+			<unit name="powerandmemorynotificationservice" unitID="sos.powerandmemorynotificationservice" bldFile="&layer_real_source_path;/powerandmemorynotificationservice/group" mrp="&layer_real_source_path;/powerandmemorynotificationservice/group/syslibs_pwrcli.mrp"/>
+		</module>
+    </layer>
+	
+	<layer name="clean_only_layer">
+		<module name="DeviceSrv_NCP">
+			<unit name="hwresourcesmgr" unitID="sos.hwresourcesmgr_clean" bldFile="&layer_real_source_path;/hwresourcesmgrconfig" mrp=""/>
+		</module>
+	</layer>
+	
+	<layer name="api_test_layer">
+		<module name="DeviceSrv_NCP">
+			<unit name="hwresourcesmgr" unitID="sos.hwresourcesmgr_test" bldFile="&layer_real_source_path;/hwresourcesmgr/test/group" mrp="&layer_real_source_path;/hwresourcesmgr/group/telephony_hwrm.mrp"/>
+			<unit name="powerandmemorynotificationservice" unitID="sos.powerandmemorynotificationservice_test" bldFile="&layer_real_source_path;/powerandmemorynotificationservice/group" mrp="&layer_real_source_path;/powerandmemorynotificationservice/group/syslibs_pwrcli.mrp"/>
+		</module>
+	</layer>
+
+  </systemModel>
+</SystemDefinition>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resourcemgmt/powerandmemorynotificationservice/group/PwrCliTests.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,35 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"PwrCliTests EN"}
+
+; Vendor name
+: "PwrCliTests"
+
+; RTest Cases
+"\epoc32\release\armv5\urel\t_pwrbasic.exe"-"c:\sys\bin\t_pwrbasic.exe"
+"\epoc32\release\armv5\urel\t_pwroffevents.exe"-"c:\sys\bin\t_pwroffevents.exe"
+"\epoc32\release\armv5\urel\t_shutdownserver.exe"-"c:\sys\bin\t_shutdownserver.exe"
+
+
+
+
--- a/resourcemgmt/powerandmemorynotificationservice/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/powerandmemorynotificationservice/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1999-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"
@@ -49,6 +49,7 @@
 ../group/PwrCliTests.bat   /epoc32/data/z/system/test/pwrclitests.bat
 #ifdef SYSLIBS_TEST
 ../group/PwrCliTest.iby    /epoc32/rom/include/pwrclitest.iby
+../inc/e32consf.h		   /epoc32/include/e32consf.h
 #endif
 
 PRJ_TESTMMPFILES
--- a/resourcemgmt/powerandmemorynotificationservice/group/t_pwrbasic.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/powerandmemorynotificationservice/group/t_pwrbasic.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -15,7 +15,7 @@
 // 
 //
 
-TARGET          t_pwrbasic.exe
+TARGET          t_pwrbasic.exe  //RTEST
 CAPABILITY      PowerMgmt
 TARGETTYPE      EXE
 
@@ -29,6 +29,8 @@
 SOURCE          t_pwrbasic.cpp
 
 LIBRARY         euser.lib
-LIBRARY         powermgrcli.lib 
+LIBRARY         powermgrcli.lib
+LIBRARY 		efsrv.lib
+LIBRARY 		charconv.lib
 
 SMPSAFE
--- a/resourcemgmt/powerandmemorynotificationservice/group/t_pwroffevents.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/powerandmemorynotificationservice/group/t_pwroffevents.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,7 +16,7 @@
 // 
 //
 
-TARGET          t_pwroffevents.exe
+TARGET          t_pwroffevents.exe //RTEST
 // requires PowerMgmt because it is a unit test of the server code that will call the Power API which requires it
 // requires DiskAdmin because the test will make the server call RFs::FinaliseDrives() as part of power-off sequence
 CAPABILITY      PowerMgmt DiskAdmin 
@@ -41,6 +41,7 @@
 #if defined (SYMBIAN_SSM_GRACEFUL_SHUTDOWN)
 LIBRARY			ssmcmn.lib estor.lib
 #endif
+LIBRARY 		charconv.lib
 
 
 SMPSAFE
--- a/resourcemgmt/powerandmemorynotificationservice/group/t_shutdownserver.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/powerandmemorynotificationservice/group/t_shutdownserver.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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,7 +15,7 @@
 // 
 //
 
-TARGET          t_shutdownserver.exe
+TARGET          t_shutdownserver.exe //RTEST
 CAPABILITY      ProtServ PowerMgmt DiskAdmin 
 TARGETTYPE      EXE
 
@@ -42,6 +42,7 @@
 #if defined (SYMBIAN_SSM_GRACEFUL_SHUTDOWN)
 LIBRARY			ssmcmn.lib estor.lib
 #endif
+LIBRARY 		charconv.lib
 
 
 SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resourcemgmt/powerandmemorynotificationservice/inc/e32consf.h	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,163 @@
+// 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"
+// 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:
+//
+
+#ifndef __E32CONSF_H__
+#define __E32CONSF_H__
+
+#include <e32std.h> 
+#include <e32cons.h>
+#include <e32test.h>
+#include <f32file.h>
+
+#include <utf.h>
+
+class CConsoleFile: public CConsoleBase 
+    {
+public:
+    static CConsoleFile* New(const TDesC& aLogFileName)
+        {
+        CConsoleFile* self = new CConsoleFile();
+        if (self)
+            {
+            if (self->Construct(aLogFileName))
+                {
+                delete self;
+                self = NULL;
+                }
+            }
+        return self;
+        }
+    
+    virtual ~CConsoleFile()
+        {
+        iFile.Close();
+        iFs.Close();
+        }
+
+private:
+    CConsoleFile()
+    :CConsoleBase()
+        {
+        }
+    
+    TInt Construct(const TDesC& aLogFileName)
+        {
+        TInt err=iFs.Connect();
+        if (!err)
+            {
+            (void)iFs.MkDirAll(aLogFileName);
+            if (iFile.Replace(iFs, aLogFileName, EFileShareExclusive | EFileWrite))
+                {
+                err=iFile.Create(iFs, aLogFileName, EFileShareExclusive | EFileWrite);            
+                }
+            }
+        return err;
+        }
+
+    void DoWriteL(const TDesC &aDes)
+        {
+        HBufC8* outBuf = CnvUtfConverter::ConvertFromUnicodeToUtf8L(aDes);
+        (void)iFile.Write(*outBuf);
+        delete outBuf;
+        }
+    
+private: // CConsoleBase
+    virtual TInt Create(const TDesC& /*aTitle*/,TSize /*aSize*/)
+        {
+        return KErrNone;
+        }
+    
+    virtual void Read(TRequestStatus& aStatus)
+        {
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, (TInt)EKeyNull);
+        }
+    
+    virtual void ReadCancel()
+        {
+        }
+    
+    virtual void Write(const TDesC &aDes)
+        {
+        // so that RTest::Title can be called before the TrapHandler has been created
+        CTrapCleanup* tc = NULL;
+        if (!User::TrapHandler())
+            {
+            tc = CTrapCleanup::New();
+            }
+        TRAP_IGNORE(DoWriteL(aDes));
+        delete tc;
+        }
+    
+    virtual TPoint CursorPos() const
+        {
+        return TPoint(0,0);
+        }
+    
+    virtual void SetCursorPosAbs(const TPoint& /*aPoint*/)
+        {
+        }
+    
+    virtual void SetCursorPosRel(const TPoint& /*aPoint*/)
+        {
+        }
+    
+    virtual void SetCursorHeight(TInt /*aPercentage*/)
+        {
+        }
+    
+    virtual void SetTitle(const TDesC& /*aTitle*/)
+        {
+        }
+    
+    virtual void ClearScreen()
+        {
+        }
+    
+    virtual void ClearToEndOfLine()
+        {
+        }
+    
+    virtual TSize ScreenSize() const
+        {
+        return TSize(0,0);
+        }
+    
+    virtual TKeyCode KeyCode() const
+        {
+        return EKeyNull;
+        }
+    
+    virtual TUint KeyModifiers() const
+        {
+        return 0;
+        }
+
+private:
+    RFs iFs;
+    RFile iFile;
+    };
+
+void LogRTestToFile(RTest& aTest)
+    {
+    RProcess myProcess;
+    TParsePtrC parsePtr(myProcess.FileName());
+	TFileName logFileName;
+	TPtrC fileNameWithoutExtension = parsePtr.Name();
+    logFileName.Format(_L("c:\\logs\\testexecute\\%S.htm"), &fileNameWithoutExtension);
+    aTest.SetConsole(CConsoleFile::New(logFileName)); // SMH - Setting NULL console is OK
+    }
+
+#endif // __E32CONSF_H__
--- a/resourcemgmt/powerandmemorynotificationservice/tsrc/t_pwrbasic.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/powerandmemorynotificationservice/tsrc/t_pwrbasic.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -19,6 +19,7 @@
 #include <e32test.h>        //RTest
 #include <e32svr.h>         //RDebug
 #include <savenotf.h>       //RSaveSession, MSaveObserver, CSaveNotifier
+#include <e32consf.h>		//for logging to file
 
 static RTest TheTest(_L("T_PwrBasic"));
 const TInt KOneSec = 1000000;
@@ -447,6 +448,8 @@
 
 TInt E32Main()
 	{
+	LogRTestToFile(TheTest);
+    TheTest.Title();
 	__UHEAP_MARK;
 	CTrapCleanup* tc = CTrapCleanup::New();
     TEST(tc != NULL);
--- a/resourcemgmt/powerandmemorynotificationservice/tsrc/t_pwroffevents.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/powerandmemorynotificationservice/tsrc/t_pwroffevents.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -18,6 +18,7 @@
 #include <e32test.h>        //RTest
 #include <e32svr.h>         //RDebug
 #include <savenotf.h>       //RSaveSession, MSaveObserver, CSaveNotifier
+#include <e32consf.h>		//for logging to file
 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <shutdownsrv.h>    //CServShutdownServer
 #else //SYMBIAN_ENABLE_SPLIT_HEADERS
@@ -288,6 +289,8 @@
 
 TInt E32Main()
 	{
+	LogRTestToFile(TheTest);
+    TheTest.Title();
 	__UHEAP_MARK;
 	CTrapCleanup* tc = CTrapCleanup::New();
     TEST(tc != NULL);
--- a/resourcemgmt/powerandmemorynotificationservice/tsrc/t_shutdownserver.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/resourcemgmt/powerandmemorynotificationservice/tsrc/t_shutdownserver.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -16,6 +16,7 @@
 #include <e32test.h>        //RTest
 #include <e32svr.h>         //RDebug
 #include <savenotf.h>       //RSaveSession, MSaveObserver, CSaveNotifier
+#include <e32consf.h>		//for logging to file
 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <shutdownsrv.h>    //CServShutdownServer
 #else //SYMBIAN_ENABLE_SPLIT_HEADERS
@@ -294,6 +295,8 @@
 
 TInt E32Main()
 	{
+	LogRTestToFile(TheTest);
+    TheTest.Title();
 	CTrapCleanup* tc = CTrapCleanup::New();
     TEST(tc != NULL);
 
--- a/sensorservices/orientationssy/inc/OrientationCRListener.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/orientationssy/inc/OrientationCRListener.h	Tue Aug 31 16:29:05 2010 +0300
@@ -87,7 +87,7 @@
 class MCenRepCallBack
     {
 public:
-    virtual void CreateConfigurations() = 0;
+    virtual TInt CreateConfigurations() = 0;
     };
 
 #endif // ORIENTATIONCRLISTENER_H
--- a/sensorservices/orientationssy/inc/SsyConfiguration.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/orientationssy/inc/SsyConfiguration.h	Tue Aug 31 16:29:05 2010 +0300
@@ -156,8 +156,7 @@
             KNoRealValue,
             0,                                  // iMinValue
             KNoRealValue,
-            ETrue,                             // iReadOnly. Default value is not readonly, it is set
-                                                // to read only when updated.
+            ETrue,                             // iReadOnly. 
             ESensrvIntProperty                  // iPropertyType
         }
     };
--- a/sensorservices/orientationssy/inc/SsyOrientation.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/orientationssy/inc/SsyOrientation.h	Tue Aug 31 16:29:05 2010 +0300
@@ -104,14 +104,14 @@
         /**
         * Create configurations for angles and timers
         */
-        void CreateConfigurations();
+        TInt CreateConfigurations();
         
         /**
         * Used for creating configuration for angle definitions
         *
         * @param aConfigurationForState the configuration to set.
         */
-        void SetConfigurationForState( 
+        TInt SetConfigurationForState( 
         const TOrientationConfiguration&
               aConfigurationForState );
         
--- a/sensorservices/orientationssy/src/OrientationCRListener.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/orientationssy/src/OrientationCRListener.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -91,7 +91,7 @@
 	SSY_TRACE( EExtended, "ORIENTATIONSSY:RunL::Key %d changed", iStatus.Int() );
     iRepository->NotifyRequest( iStatus.Int(), iStatus );
 
-	iCallBack.CreateConfigurations();
+        User::LeaveIfError(iCallBack.CreateConfigurations());
 
     if( !IsActive() )
         {
--- a/sensorservices/orientationssy/src/SsyChannel.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/orientationssy/src/SsyChannel.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -208,7 +208,12 @@
 // CSSYChannel::RunError()
 // ----------------------------------------------------------------------------------
 // 
+#ifdef _DEBUG
 TInt CSSYChannel::RunError( TInt aError )
+#else
+// not used in UREL builds
+TInt CSSYChannel::RunError( TInt /*aError*/ )
+#endif
     {
     SSY_TRACE( EMust, "ORIENTATIONSSY:RunError %d", aError );
     
@@ -303,17 +308,6 @@
             break;
         case EChannelOpening:
             {
-            // Before completing channel opening, get max data rate from actual SSY
-            if ( !iSensorProperties->DataRateUpdated() )
-                {
-                TSensrvProperty maxdatarate;
-                RSensrvChannelList affectedChannels;
-                // Get max data rate
-                iOrientationHandler->GetMaxDataRateL( maxdatarate );
-                // Set property
-                iSensorProperties->SetProperty( maxdatarate, affectedChannels );
-                }
-
             SetChannelState( EChannelOpen );
             iCallback->ChannelOpened( iChannelInfo.iChannelId, iStatus.Int(), this, this );
             break;
--- a/sensorservices/orientationssy/src/SsyControlOrientation.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/orientationssy/src/SsyControlOrientation.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -224,8 +224,8 @@
 
         if ( channel )
             {
-            iChannelArray.Append( channel );
-            channelInfoList.Append( channelInfo );
+            User::LeaveIfError(iChannelArray.Append( channel ));
+            User::LeaveIfError(channelInfoList.Append( channelInfo));
             }
         }
 
--- a/sensorservices/orientationssy/src/SsyOrientation.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/orientationssy/src/SsyOrientation.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -186,7 +186,7 @@
 void CSSYOrientation::ConstructL()
     {
     iRepository = CRepository::NewL( KCRUidOrientationSsySettings );
-    CreateConfigurations();
+     User::LeaveIfError(CreateConfigurations());
     
 #ifdef AUTO_ORIENTAION_TEST
     iCRListener = CSsyOrientationCRListener::NewL( *this, iRepository );
@@ -1090,11 +1090,13 @@
 // CSSYOrientation::SetConfigurationForState()
 // ----------------------------------------------------------------------------------
 //
-void CSSYOrientation::SetConfigurationForState(
+TInt CSSYOrientation::SetConfigurationForState(
  const TOrientationConfiguration& aConfigurationForState )
     {
     SSY_TRACE_IN();
     TBool wasFound( EFalse );
+    TInt retVal( KErrNone );
+    
     // Check if is in array
     for( TInt i = 0; i != iConfigArray.Count(); i++ )
         {
@@ -1102,15 +1104,17 @@
         if( aConfigurationForState.iOrientationState == iConfigArray[ i ].iOrientationState )
             {
             iConfigArray.Remove( i );
-            iConfigArray.Insert( aConfigurationForState, i );
+            retVal = iConfigArray.Insert( aConfigurationForState, i );
             wasFound = ETrue;
             }
         }
     if( !wasFound )
         {
-        iConfigArray.Append( aConfigurationForState );
+        retVal = iConfigArray.Append( aConfigurationForState );
         }
+	
     SSY_TRACE_OUT();
+    return retVal;
     }
 
 // ----------------------------------------------------------------------------------
@@ -1139,11 +1143,12 @@
 // CSSYOrientation::CreteConfigurations()
 // ----------------------------------------------------------------------------------
 //
-void CSSYOrientation::CreateConfigurations()
+TInt CSSYOrientation::CreateConfigurations()
     {
     SSY_TRACE_IN();
     
     TInt repValue( 0 );
+    TInt retVal( KErrNone );
     
     // This is used in initialisation
     if( iConfigForCurrentState.iOrientationState == TSensrvOrientationData::EOrientationUndefined )
@@ -1208,7 +1213,13 @@
     SSY_TRACE( EExtended, "ORIENTATIONSSY:CreteConfigurations::EOrientationDisplayUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds=%d", repValue );
     configForDisplayUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds = repValue;
     
-    SetConfigurationForState( configForDisplayUp );
+    retVal = SetConfigurationForState( configForDisplayUp );
+    if( retVal != KErrNone)
+        {
+        SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState(configForDisplayUp)=%d", retVal);
+        SSY_TRACE_OUT();
+	return retVal;
+         }
     
     // Configuration for display down
     TOrientationConfiguration configForDisplayDown;
@@ -1256,7 +1267,14 @@
     iRepository->Get( KOriStateDisplayDownToDisplayDownwardsTimerKey, repValue );
     SSY_TRACE( EExtended, "ORIENTATIONSSY:CreteConfigurations::EOrientationDisplayDown.iOrientationDisplayDownwards.iTimerValueInMilSeconds=%d", repValue );
     configForDisplayDown.iOrientationDisplayDownwards.iTimerValueInMilSeconds = repValue;
-    SetConfigurationForState( configForDisplayDown );
+
+    retVal = SetConfigurationForState( configForDisplayDown);
+    if( retVal != KErrNone)
+        {
+        SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState(configForDisplayDown)=%d", retVal);
+        SSY_TRACE_OUT();
+	return retVal;
+         }
     
     // Configuration for left up
     TOrientationConfiguration configForDisplayLeftUp;
@@ -1304,7 +1322,14 @@
     iRepository->Get( KOriStateDisplayLeftUpToDisplayDownwardsTimerKey, repValue );
     SSY_TRACE( EExtended, "ORIENTATIONSSY:CreteConfigurations::EOrientationDisplayLeftUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds=%d", repValue );
     configForDisplayLeftUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds = repValue;
-    SetConfigurationForState( configForDisplayLeftUp );
+
+    retVal = SetConfigurationForState( configForDisplayLeftUp );
+    if( retVal != KErrNone)
+        {
+        SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState(configForDisplayLeftUp)=%d", retVal);
+        SSY_TRACE_OUT();
+	return retVal;
+         }
     
     // Configuration for right up
     TOrientationConfiguration configForDisplayRightUp;
@@ -1352,7 +1377,14 @@
     iRepository->Get( KOriStateDisplayRightUpToDisplayDownwardsTimerKey, repValue );
     SSY_TRACE( EExtended, "ORIENTATIONSSY:CreteConfigurations::EOrientationDisplayRightUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds=%d", repValue );
     configForDisplayRightUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds = repValue;
-    SetConfigurationForState( configForDisplayRightUp );
+
+    retVal = SetConfigurationForState( configForDisplayRightUp );
+    if( retVal != KErrNone)
+        {
+        SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState( configForDisplayRightUp)=%d", retVal);
+        SSY_TRACE_OUT();
+	return retVal;
+         }
     
     // Configuration for upwards
     TOrientationConfiguration configForDisplayUpwards;
@@ -1400,7 +1432,14 @@
     iRepository->Get( KOriStateDisplayUpwardsToDisplayDownwardsTimerKey, repValue );
     SSY_TRACE( EExtended, "ORIENTATIONSSY:CreteConfigurations::EOrientationDisplayUpwards.iOrientationDisplayDownwards.iTimerValueInMilSeconds=%d", repValue );
     configForDisplayUpwards.iOrientationDisplayDownwards.iTimerValueInMilSeconds = repValue;
-    SetConfigurationForState( configForDisplayUpwards );
+
+    retVal = SetConfigurationForState( configForDisplayUpwards);
+    if( retVal != KErrNone)
+        {
+        SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState( configForDisplayUpwards)=%d", retVal);
+        SSY_TRACE_OUT();
+	return retVal;
+         }
     
     // Configuration for downwards
     TOrientationConfiguration configForDisplayDownwards;
@@ -1450,7 +1489,14 @@
     configForDisplayDownwards.iOrientationDisplayDownwards.iAngle = 0;
     configForDisplayDownwards.iOrientationDisplayDownwards.iTimerValueInMilSeconds = 0;
     
-    SetConfigurationForState( configForDisplayDownwards );
+
+    retVal = SetConfigurationForState( configForDisplayDownwards);
+    if( retVal != KErrNone)
+        {
+        SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState( configForDisplayDownwards)=%d", retVal);
+        SSY_TRACE_OUT();
+	return retVal;
+        }
     
     if( iConfigForCurrentState.iOrientationState != TSensrvOrientationData::EOrientationUndefined )
         {
@@ -1459,6 +1505,7 @@
         }
     
     SSY_TRACE_OUT();
+    return retVal;
     }
 
 // ----------------------------------------------------------------------------------
--- a/sensorservices/orientationssy/src/SsyProperty.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/orientationssy/src/SsyProperty.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -52,7 +52,11 @@
 
     for ( TInt index = 0; index < aNumberOfProperties ; index++ )
         {
-        iChannelProperties.Append( aProperties[ index ] );
+        if(iChannelProperties.Append( aProperties[ index ])!= KErrNone )
+        {
+         iChannelProperties.Reset();
+         break;
+        }
         }
 
     SSY_TRACE_OUT();
@@ -297,14 +301,13 @@
 
     else if ( aProperty.GetPropertyId() == KSensrvPropIdDataRate )
         {
-        SSY_TRACE( EExtended, "ORIENTATIONSSY: Updating data rate property" );
-        // Data rate property is replaced in a different way than others.
-        // Note that this can be done only once as this property is set to read only.
-        aProperty.GetValue( intValue );
-        // Leave value to 0, update only max value because that is the only value we can provide
+        // Since Orientation is an event, the data rate property is made readonly.
+        // In ssyconfiguration.h file, the datarate property is defined as writable,
+        // it is not modified due to backward compatibility. 
+        // Now it is changed and the orientation channel property is made readonly always.
+        
         if( iChannelProperties.Count() >= index )
             {
-            iChannelProperties[index].iIntMaxValue = intValue;
             iChannelProperties[index].iReadOnly = ETrue;
             }
         
--- a/sensorservices/sensorserver/inc/server/senserverchannel.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/sensorserver/inc/server/senserverchannel.h	Tue Aug 31 16:29:05 2010 +0300
@@ -281,18 +281,6 @@
         CSensrvConditionEvaluator* ConditionEvaluatorL();
 
         /**
-        * Get clients of this channel. The client identified by aCallerSecureId
-        * is not added to the affected clients list.
-        *
-        * @since S60 5.0
-        * @param[in,out] aAffectedClients On return contains client
-        *                 processes priorities for this channel.
-        * @param[in]     aCallerSecureId Identifies the listener which is filtered away.
-        */
-        void GetAffectedClients( RArray<TInt>& aAffectedClients,
-                                 TSecureId aCallerSecureId );
-
-        /**
         * Gets listener for session.
         *
         * @since S60 5.0
--- a/sensorservices/sensorserver/rom/SensorServer.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/sensorserver/rom/SensorServer.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -20,7 +20,7 @@
 #define SENSORSERVER_IBY
 
 file=ABI_DIR\BUILD_DIR\sensorserver.exe          PROGRAMS_DIR\sensorserver.exe
-file=ABI_DIR\BUILD_DIR\SensrvClient.dll          SHARED_LIB_DIR\SensrvClient.dll
+file=ABI_DIR\BUILD_DIR\sensrvclient.dll          SHARED_LIB_DIR\sensrvclient.dll
 file=ABI_DIR\BUILD_DIR\sensrvutil.dll            SHARED_LIB_DIR\sensrvutil.dll
 
 #endif // SENSORSERVER_IBY
--- a/sensorservices/sensorserver/src/server/sensrvchannel.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/sensorserver/src/server/sensrvchannel.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -82,6 +82,7 @@
     {
     COMPONENT_TRACE( ( _L( "Sensor Server - CSensrvChannel::ConstructL()" ) ) );
 
+		// coverity[SIZECHECK]
     iChannelQueue = CSensrvTransactionQueue::NewL( ETrue );
 
     iChannelInfo.iChannelGroup = TSensrvResourceChannelInfo::ESensrvChannelGroupNotSolved;
@@ -979,34 +980,7 @@
     return previousLow;
     }
 
-// ---------------------------------------------------------------------------
-// CSensrvChannel::GetAffectedClients
-//
-// Client is considered as "affected" if the channel is opened by the client.
-// When the channel is open, channel listener also exists.
-// Priorities are queried from ChannelListener.
-// ---------------------------------------------------------------------------
-//
-void CSensrvChannel::GetAffectedClients( RArray<TInt>& aAffectedClients,
-                                         TSecureId aCallerSecureId  )
-    {
-    COMPONENT_TRACE( ( _L( "Sensor Server - CSensrvChannel::GetAffectedClients()" ) ) );
 
-    TInt count(iListenerList.Count());
-    for (TInt i=0; i < count; i++)
-        {
-        if (aCallerSecureId == iListenerList[i]->Session().SecureId() )
-            {
-            //Filter away
-            }
-        else
-            {
-            aAffectedClients.Append( iListenerList[i]->Priority() );
-            }
-        }
-
-    COMPONENT_TRACE( ( _L( "Sensor Server - CSensrvChannel::GetAffectedClients - %d client(s) found - return" ), count ) );
-    }
 
 // ---------------------------------------------------------------------------
 // Creates a new condition evaluator or returns an existing one.
--- a/sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -80,7 +80,8 @@
     User::LeaveIfError(iMutex.CreateLocal());
 
     iMutex.Wait();
-
+    
+		// coverity[SIZECHECK]
     iLoadWaitQueue = CSensrvTransactionQueue::NewL(ETrue);
 
     iTransactionMonitor = CSensrvTransactionMonitor::NewL(*this);
--- a/sensorservices/sensorserver/src/server/sensrvproxymanager.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/sensorserver/src/server/sensrvproxymanager.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -90,7 +90,10 @@
 
     iServerShutdown = CSensrvShutdown::NewL( *this );
 
+		// coverity[SIZECHECK]
     iWaitQueueQueryChannels = CSensrvTransactionQueue::NewL(ETrue);
+    	
+    // coverity[SIZECHECK]	
     iWaitQueueOpenChannel   = CSensrvTransactionQueue::NewL(ETrue);
 
     // Create ecom changelistener, which will make the initial check for plugins
--- a/sensorservices/tiltcompensationssy/inc/tcsendeventtimer.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/tiltcompensationssy/inc/tcsendeventtimer.h	Tue Aug 31 16:29:05 2010 +0300
@@ -72,8 +72,7 @@
         // @see CActive
         TInt RunError( TInt aError );
 	public:
-		void Start( );
-        
+		void Start(TInt aHrz );
     private: // Private data for base channel
     
     // The timer object
--- a/sensorservices/tiltcompensationssy/inc/tcstatetiltlistendata.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/tiltcompensationssy/inc/tcstatetiltlistendata.h	Tue Aug 31 16:29:05 2010 +0300
@@ -173,9 +173,6 @@
         // Pointer to the timer
         CTCSendEventTimer* iTimerToSend;
         
-        // Flag that states if the property has changed
-        TBool iHasChanged;
-        
         // The requested amount of data
         TInt iRequestedDataCount;
         
--- a/sensorservices/tiltcompensationssy/src/tccenrepobserver.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/tiltcompensationssy/src/tccenrepobserver.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -110,8 +110,13 @@
 // CTCCenrepObserver::HandleNotifyError
 // -----------------------------------------------------------------------------
 //
+#ifdef _DEBUG
 void CTCCenrepObserver::HandleNotifyError(
     TUint32 /*aKey*/, TInt aError, CCenRepNotifyHandler* aHandler)
+#else
+void CTCCenrepObserver::HandleNotifyError(
+    TUint32 /*aKey*/, TInt /*aError*/, CCenRepNotifyHandler* aHandler)
+#endif
     {
     ERROR_1( aError, "CTCCenrepObserver::HandleNotifyError - aError: %d ", aError ); 
     
--- a/sensorservices/tiltcompensationssy/src/tcchanneltilt.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/tiltcompensationssy/src/tcchanneltilt.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -898,8 +898,14 @@
 // CTCChannelTilt::DataError
 // ----------------------------------------------------------------------------------
 //
+#ifdef _DEBUG
 void CTCChannelTilt::DataError( CSensrvChannel& /*aChannel*/, 
     TSensrvErrorSeverity aError )
+
+#else
+void CTCChannelTilt::DataError( CSensrvChannel& /*aChannel*/, 
+    TSensrvErrorSeverity /*aError*/ )
+#endif
     {
     FUNC_LOG;
     
@@ -1150,8 +1156,14 @@
 // CTCChannelTilt::PropertyChanged
 // ----------------------------------------------------------------------------------
 //
+#ifdef _DEBUG
 void CTCChannelTilt::PropertyError( CSensrvChannel& /*aChannel*/, 
     TSensrvErrorSeverity aError )
+#else
+// not used in UREL builds
+void CTCChannelTilt::PropertyError( CSensrvChannel& /*aChannel*/, 
+    TSensrvErrorSeverity /*aError*/ )
+#endif
     {
     FUNC_LOG;
     INFO_1( "Property error [%d]", aError );
@@ -1161,7 +1173,12 @@
 // CTCChannelTilt::SetPropertySuccessIndicationChanged
 // -----------------------------------------------------------------------------
 //
+#ifdef _DEBUG
 void CTCChannelTilt::SetPropertySuccessIndicationChanged( TSetPropertySuccessIndicator aIndication )
+#else
+// not used in UREL builds
+void CTCChannelTilt::SetPropertySuccessIndicationChanged( TSetPropertySuccessIndicator /*aIndication*/ )
+#endif
     {
     FUNC_LOG;
     
--- a/sensorservices/tiltcompensationssy/src/tcsendeventtimer.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/tiltcompensationssy/src/tcsendeventtimer.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -75,8 +75,9 @@
 	User::LeaveIfError( ret );
 	iTimerToHzLevel = aSetTimerToHzLevel;
 	}
-void CTCSendEventTimer::Start()
+void CTCSendEventTimer::Start(TInt aHrz)
 	{
+	iTimerToHzLevel = aHrz;
 	TTimeIntervalMicroSeconds32 interval( KOneSecondInMicroSeconds / iTimerToHzLevel );
 		
 	if( !IsActive() )
--- a/sensorservices/tiltcompensationssy/src/tcstatetiltidle.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/tiltcompensationssy/src/tcstatetiltidle.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -75,6 +75,7 @@
         case EEventIdHandleOpenChannel:
             {
             iTransactionHandler.ProcessTransactionL( ETCTransactionIdOpenChannel );
+            break;
             }
         default:
             {
--- a/sensorservices/tiltcompensationssy/src/tcstatetiltlistendata.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sensorservices/tiltcompensationssy/src/tcstatetiltlistendata.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -280,7 +280,6 @@
                 {
                 property.iProperty.GetValue( iHzSamplingRate );
                 INFO_1( "Sampling rate changed to: %d", iHzSamplingRate );
-                iHasChanged = ETrue;
                 HandleStateEntryL();
                 }
             break;
@@ -355,19 +354,8 @@
     if( !iTimerToSend )
         {
         iTimerToSend = CTCSendEventTimer::NewL( iHzSamplingRate, *this );
-		iTimerToSend->Start();
         }
-    else if( iHasChanged )
-        {
-        delete iTimerToSend;
-        iTimerToSend = NULL;
-        iTimerToSend = CTCSendEventTimer::NewL( iHzSamplingRate, *this );
-        iHasChanged = EFalse;
-        }
-	else
-		{
-		iTimerToSend->Start();
-		}
+	iTimerToSend->Start(iHzSamplingRate);
     }
 
 // ----------------------------------------------------------------------------------
@@ -474,7 +462,7 @@
     else
     	{
     	if( iTimerToSend )
-    		iTimerToSend->Start();
+    		iTimerToSend->Start(iHzSamplingRate);
     	}
     }
 
@@ -512,7 +500,11 @@
 // CTCStateTiltListenData::CenrepValueChanged
 // -----------------------------------------------------------------------------
 //
+#ifdef _DEBUG
 void CTCStateTiltListenData::CenrepValueChanged( TUint32 aKey, CRepository& aRepository )
+#else
+void CTCStateTiltListenData::CenrepValueChanged( TUint32 /*aKey*/, CRepository& aRepository )
+#endif
     {
     FUNC_LOG;
 
--- a/sysstatemgmt/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-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"
@@ -24,6 +24,9 @@
 
 PRJ_MMPFILES
 
+#include "../systemstatemgr/group/bld.inf"
+#include "../systemstatereferenceplugins/group/bld.inf"
+#include "../systemstateplugins/group/bld.inf"
 #include "../ssmmapperutility/group/bld.inf"
 #include "../ssmpolicyplugins/group/bld.inf"
 #include "../ssmutilityplugins/group/bld.inf"
@@ -31,6 +34,7 @@
 #include "../ssmcustcmds/group/bld.inf"
 #include "../syslangutil/group/bld.inf"
 #include "../sysrestart/group/bld.inf"
+#include "../systemstarter/group/bld.inf"
 #include "../sysuiprovider/group/bld.inf"
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/inc/ssmcommonlocale.h	Tue Aug 31 16:29:05 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/layers.sysdef.xml	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+<!DOCTYPE SystemDefinition [
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+  name CDATA #REQUIRED
+  schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED
+  span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset 
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED  
+  span CDATA #IMPLIED
+  level CDATA #IMPLIED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+  name CDATA #REQUIRED
+  level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+  unitID ID #REQUIRED
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  bldFile CDATA #REQUIRED
+  priority CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+  name CDATA #REQUIRED
+  version CDATA #REQUIRED
+  late (Y|N) #IMPLIED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+  name ID #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+  name ID #REQUIRED
+  abldTarget CDATA #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+  name ID #REQUIRED
+  abldOption CDATA #REQUIRED
+  description CDATA #REQUIRED
+  enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+  command CDATA #REQUIRED
+  targetList IDREFS #IMPLIED
+  unitParallel (Y | N | y | n) #REQUIRED
+  targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+  name CDATA #REQUIRED
+  cwd CDATA #REQUIRED
+  command CDATA #REQUIRED>
+  <!ENTITY layer_real_source_path "sf/os/devicesrv/sysstatemgmt" >
+]>
+
+<SystemDefinition name="Dvscode" schema="1.4.0">
+  <systemModel>
+    <layer name="os_layer">
+		<module name="DeviceSrv_DFS">
+			<unit name="systemstatemgr" unitID="sos.systemstatemgr" bldFile="&layer_real_source_path;/systemstatemgr/group" mrp="&layer_real_source_path;/systemstatemgr/group/app-framework_ssma.mrp"/>
+			<unit name="systemstateplugins" unitID="sos.systemstateplugins" bldFile="&layer_real_source_path;/systemstateplugins/group" mrp="&layer_real_source_path;/systemstateplugins/group/app-framework_ssplugins.mrp"/>
+			<unit name="systemstatereferenceplugins" unitID="sos.systemstatereferenceplugins" bldFile="&layer_real_source_path;/systemstatereferenceplugins/group" mrp="&layer_real_source_path;/systemstatereferenceplugins/group/app-framework_ssrefplugins.mrp"/>
+			<unit name="systemstarter" unitID="sos.systemstarter" bldFile="&layer_real_source_path;/systemstarter/group" mrp="&layer_real_source_path;/systemstarter/group/app-framework_sysstart.mrp"/>
+		</module>
+    </layer>
+	
+	<layer name="api_test_layer">
+		<module name="DeviceSrv_DFS">
+			<unit name="systemstatemgr" unitID="sos.systemstatemgr_test" bldFile="&layer_real_source_path;/systemstatemgr/group" mrp="&layer_real_source_path;/systemstatemgr/group/app-framework_ssma.mrp"/>
+			<unit name="systemstateplugins" unitID="sos.systemstateplugins_test" bldFile="&layer_real_source_path;/systemstateplugins/group" mrp="&layer_real_source_path;/systemstateplugins/group/app-framework_ssplugins.mrp"/>
+			<unit name="systemstatereferenceplugins" unitID="sos.systemstatereferenceplugins_test" bldFile="&layer_real_source_path;/systemstatereferenceplugins/group" mrp="&layer_real_source_path;/systemstatereferenceplugins/group/app-framework_ssrefplugins.mrp"/>
+			<unit name="systemstarter" unitID="sos.systemstarter_test" bldFile="&layer_real_source_path;/systemstarter/group" mrp="&layer_real_source_path;/systemstarter/group/app-framework_sysstart.mrp"/>
+		</module>
+	</layer>
+
+  </systemModel>
+</SystemDefinition>
\ No newline at end of file
--- a/sysstatemgmt/ssmcmdlists/data/criticalappscmdlist.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmcmdlists/data/criticalappscmdlist.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -72,7 +72,6 @@
         r_cmd_selftest,
         r_cmd_cfserver,
         r_cmd_sysap,
-        r_cmd_calsrv,
         r_cmd_profmon,
         // prio 0xFFE6
         r_cmd_multiwaitforever
@@ -84,17 +83,6 @@
 // ===========================================================================
 //
 
-// ---------------------------------------------------------------------------
-// r_cmd_calsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_calsrv
-    {
-    priority = 0xFFE7;
-    name = "calensvr.exe";
-    execution_behaviour = ESsmFireAndForget;
-    monitor_info = r_mon_100_restarts_reset;
-    }
 
 // ---------------------------------------------------------------------------
 // r_cmd_cfserver
--- a/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -77,8 +77,9 @@
         r_cmd_createswp_uiphase,
         r_cmd_createswp_rfstatus,
         r_cmd_waitforofflinequery,
-        r_cmd_setswp_uistart,   // After offline query has been made // prio 0xFFD7 
-        r_cmd_bsengine,					// prio 0xFFD3      
+        // prio 0xFFD7
+        r_cmd_setswp_uistart,   // After offline query has been made
+        r_cmd_bsengine,
         // prio 0xFFC7
         r_cmd_setswp_rfon,
         r_cmd_setswp_rfoff,
@@ -96,7 +97,7 @@
 //
 RESOURCE SSM_START_PROCESS_INFO r_cmd_bsengine
     {
-    priority = 0xFFD3;
+    priority = 0xFFD7;
     name = "z:\\sys\\bin\\bsengine.exe";
     execution_behaviour = ESsmWaitForSignal;
     timeout = 10000;
@@ -231,8 +232,6 @@
     }
 
 // ---------------------------------------------------------------------------
- 
-// ---------------------------------------------------------------------------
 // r_cmd_waitforofflinequery
 // ---------------------------------------------------------------------------
 //
@@ -310,6 +309,17 @@
     target2 = 102;          // EBootIntoOfflineMode
     }
 
+// ---------------------------------------------------------------------------
+// r_dlldata_waitphone
+// ---------------------------------------------------------------------------
+//
+RESOURCE CMD_PARAM_WAIT_PS r_dlldata_waitphone
+    {
+    category = 0x101F8766;  // KPSUidStartup
+    key = 0x00000044;       // KPSPhonePhase1Ok
+    target = 101;           // EPhonePhase1Ok
+    }
+	
 // ===========================================================================
 // Conditional blocks in alphabetical order
 // ===========================================================================
@@ -327,6 +337,69 @@
     }
 
 // ---------------------------------------------------------------------------
+// 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_emailfw
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_emailfw
+    {
+    feature_id = KFeatureIdFfEmailFramework;
+    }
+
+// ---------------------------------------------------------------------------
+// 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_omapoc
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_omapoc
+    {
+    feature_id = KFeatureIdOmaPoc;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_omasuplplugins
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_omasuplplugins
+    {
+    feature_id = KFeatureIdOmaSuplPlugins;
+    }
+
+// ---------------------------------------------------------------------------
 // r_cond_feat_pnp_mobile_services
 // ---------------------------------------------------------------------------
 //
@@ -336,6 +409,33 @@
     }
 
 // ---------------------------------------------------------------------------
+// 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
 // ---------------------------------------------------------------------------
 //
@@ -345,6 +445,15 @@
     }
 
 // ---------------------------------------------------------------------------
+// r_cond_feat_simcard
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_simcard
+    {
+    feature_id = KFeatureIdSimCard;
+    }
+
+// ---------------------------------------------------------------------------
 // r_cond_feat_sind
 // ---------------------------------------------------------------------------
 //
@@ -372,6 +481,35 @@
     }
 
 // ---------------------------------------------------------------------------
+// r_cond_feat_tvout
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_tvout
+    {
+    feature_id = KFeatureIdTvOut;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_firstboot_or_fotareset_or_deeprfsreset
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_OR r_cond_firstboot_or_fotareset_or_deeprfsreset
+    {
+    lhs = r_cond_fotareset_or_deeprfsreset;
+    rhs = r_cond_ps_firstboot;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cond_fotareset_or_deeprfsreset
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_OR r_cond_fotareset_or_deeprfsreset
+    {
+    lhs = r_cond_ps_fotareset;
+    rhs = r_cond_ps_deeprfsreset;
+    }
+
+// ---------------------------------------------------------------------------
 // r_cond_no_sdnd
 // ---------------------------------------------------------------------------
 //
@@ -381,6 +519,16 @@
     }
 
 // ---------------------------------------------------------------------------
+// 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
 // ---------------------------------------------------------------------------
 //
@@ -403,6 +551,17 @@
     }
 
 // ---------------------------------------------------------------------------
+// r_cond_ps_deeprfsreset
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_deeprfsreset
+    {
+    category = 0x101F8766; // KPSUidStartup
+    key = 0x00000045;      // KPSStartupReason
+    value = EDeepRFSReset;
+    }
+
+// ---------------------------------------------------------------------------
 // r_cond_ps_fotareset
 // ---------------------------------------------------------------------------
 //
@@ -414,6 +573,17 @@
     }
 
 // ---------------------------------------------------------------------------
+// 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
 // ---------------------------------------------------------------------------
 //
--- a/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_ext.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_ext.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -68,8 +68,7 @@
     {
     commands =
         {
-        r_cmd_waitforphone,     // prio 0xFFD1
-        r_cmd_waitidle,         // prio 0xFFC5
+        r_cmd_waitidle, //CR:ETIN-86JCY2
         // prio 0xFFB7
 #ifdef __JAVA        
         r_cmd_javacaptain,
@@ -77,11 +76,7 @@
         r_cmd_watcher,
         r_cmd_dmutilsrv,
         // prio 0xFFA7
-        r_cmd_contentharvester,
         r_cmd_mdswatchdog,
-        r_cmd_predefinedcontacts,
-        r_cmd_xnthemesrv,
-        r_cmd_ncnlist,
         r_cmd_satsrv,
         r_cmd_cbssrv,
         r_cmd_schedsrv,
@@ -90,17 +85,12 @@
         r_cmd_remotefe,
         r_cmd_supllistener,
         r_cmd_autolock,
-        r_cmd_pocstarter,
-        r_cmd_gsserver,
-        r_cmd_vcommandmgr,
         r_cmd_dmallreasons,
         r_cmd_locod,
 #ifdef FF_LBT_ENGINE
         r_cmd_lbtsrv,
 #endif // FF_LBT_ENGINE
-        r_cmd_emailsrvrmon,
-        r_cmd_taskswitcher,
-        // prio 0xFFA6
+        //prio 0xFFA6
         r_cmd_dmfirstbootreason,
         r_cmd_fota,
         // prio 0x7F87
@@ -131,7 +121,7 @@
     priority = 0x7F97;
     conditional_information = r_cond_ps_normalboot;
     }
-
+	
 // ---------------------------------------------------------------------------
 // r_cmd_aosrv
 // ---------------------------------------------------------------------------
@@ -154,7 +144,7 @@
     priority = 0xFFA7;
     name = "z:\\sys\\bin\\lockapp.exe";
     execution_behaviour = ESsmWaitForSignal;
-    timeout = 100000;		//  FCOA-87UBXX
+    timeout = 10000;
     background = 1; // To background
     monitor_info = r_mon_3_restarts_ignore;
     }
@@ -172,16 +162,28 @@
     monitor_info = r_mon_3_restarts_ignore;
     }
 
+
 // ---------------------------------------------------------------------------
-// r_cmd_contentharvester
+// r_cmd_createswp_noncriticalphase
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_PROCESS_INFO r_cmd_contentharvester
+RESOURCE SSM_CREATE_SYSTEM_WIDE_PROPERTY r_cmd_createswp_noncriticalphase
     {
-    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;
+    priority = 0x7F55;
+    severity = ECmdCriticalSeverity;
+    key = SWP_UID_SSM_NONCRITICAL_PHASE;
+    filename = "ssmnoncriticalswppolicy.dll";
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_setswp_noncriticalstart
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_REQUEST_SYSTEM_WIDE_PROPERTY r_cmd_setswp_noncriticalstart
+    {
+    priority = 0x7F54;
+    key = SWP_UID_SSM_NONCRITICAL_PHASE;
+    value = ESsmNonCriticalPhaseStarted;
     }
 
 // ---------------------------------------------------------------------------
@@ -254,32 +256,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_emailsrvrmon
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_emailsrvrmon
-    {
-    priority = 0xFFA7;
-    name = "emailservermonitor.exe";
-    execution_behaviour = ESsmFireAndForget;
-    conditional_information = r_cond_feat_emailfw;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_gsserver
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_gsserver
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\gsserver.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    monitor_info = r_mon_3_restarts_ignore;
-    conditional_information = r_cond_feat_tvout;
-    }
-
-// ---------------------------------------------------------------------------
 // r_cmd_mdswatchdog
 // ---------------------------------------------------------------------------
 //
@@ -291,7 +267,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_loadsup_ippushman
+// r_cmd_ippushman
 // ---------------------------------------------------------------------------
 //
 RESOURCE SSM_START_PROCESS_INFO r_cmd_ippushman
@@ -328,43 +304,18 @@
     monitor_info = r_mon_3_restarts_ignore;
     }
 
-// ---------------------------------------------------------------------------
-// r_cmd_ncnlist
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_ncnlist
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\ncnlist.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    monitor_info = r_mon_3_restarts_ignore;
-    }
 
 // ---------------------------------------------------------------------------
-// r_cmd_pocstarter
+// r_cmd_psstate
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_PROCESS_INFO r_cmd_pocstarter
+RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_cmd_psstate
     {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\pocstarter.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    conditional_information = r_cond_feat_omapoc;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_predefinedcontacts
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_predefinedcontacts
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\predefinedcontacts.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    retries = 2;
-    conditional_information = r_cond_firstboot_or_fotareset_or_deeprfsreset;
+    priority = 0xFFF0;
+    severity = ECmdCriticalSeverity;
+    category = 0x101F8766; // KPSUidStartup
+    key      = 0x00000041; // KPSGlobalSystemState
+    value    = 104;        // ESwStateCriticalPhaseOK
     }
 
 // ---------------------------------------------------------------------------
@@ -421,30 +372,13 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_javacaptain
+// r_cmd_multiple_wait
 // ---------------------------------------------------------------------------
 //
-#ifdef __JAVA
-RESOURCE SSM_START_PROCESS_INFO r_cmd_javacaptain
-    {
-    priority = 0xFFB7;
-    name = "javacaptain.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    }
-#endif // __JAVA
-// ---------------------------------------------------------------------------
-// r_cmd_vcommandmgr
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_vcommandmgr
-    {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\vcommandmanager.exe";
-    background = 1; // To background
-    execution_behaviour = ESsmFireAndForget; // -- does not call Rendezvous() --
-    conditional_information = r_cond_sind_and_no_sdnd;
-    }
+RESOURCE SSM_MULTIPLE_WAIT r_cmd_multiple_wait
+     {
+     priority = 0x7F96;     
+     }
 
 // ---------------------------------------------------------------------------
 // r_cmd_waitcleanbootinfo
@@ -462,7 +396,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_waitforidle
+// r_cmd_waitidle
 // ---------------------------------------------------------------------------
 //
 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_waitidle
@@ -478,19 +412,14 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_waitforphone
+// r_dlldata_waitidle
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_waitforphone
+RESOURCE CMD_PARAM_WAIT_PS r_dlldata_waitidle
     {
-    priority = 0xFFD1;
-    severity = ECmdCriticalSeverity;
-    dllname = "ssmsystemcmds.dll";
-    ordinal = 5; // WaitPsKeyExact
-    dll_data = r_dlldata_waitphone;
-    unload_on_finish = ENeverUnload;
-    retries = 2;
-    execution_behaviour = ESsmWaitForSignal;
+    category = 0x101F8766;  // KPSUidStartup
+    key = 0x00000043;       // KPSIdlePhase1Ok
+    target = 101;           // EIdlePhase1Ok
     }
 
 // ---------------------------------------------------------------------------
@@ -503,20 +432,21 @@
     name = "z:\\sys\\bin\\watcher.exe";
     monitor_info = r_mon_3_restarts_ignore;
     }
-
+	
 // ---------------------------------------------------------------------------
-// r_cmd_xnthemesrv
+// r_cmd_javacaptain
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_PROCESS_INFO r_cmd_xnthemesrv
+#ifdef __JAVA
+RESOURCE SSM_START_PROCESS_INFO r_cmd_javacaptain
     {
-    priority = 0xFFA7;
-    name = "z:\\sys\\bin\\xnthemeserver.exe";
+    priority = 0xFFB7;
+    name = "javacaptain.exe";
     execution_behaviour = ESsmWaitForSignal;
     timeout = 10000;
-    monitor_info = r_mon_3_restarts_ignore;
     }
-	
+#endif // __JAVA
+
 // ===========================================================================
 // DLL data items in alphabetical order
 // ===========================================================================
@@ -534,74 +464,6 @@
     target2 = 102;          // EStartupCleanBoot
     }
 
-// ---------------------------------------------------------------------------
-// r_dlldata_waitidle
-// ---------------------------------------------------------------------------
-//
-RESOURCE CMD_PARAM_WAIT_PS r_dlldata_waitidle
-    {
-    category = 0x101F8766;  // KPSUidStartup
-    key = 0x00000043;       // KPSIdlePhase1Ok
-    target = 101;           // EIdlePhase1Ok
-    }
-
-
-// ---------------------------------------------------------------------------
-// r_dlldata_waitphone
-// ---------------------------------------------------------------------------
-//
-RESOURCE CMD_PARAM_WAIT_PS r_dlldata_waitphone
-    {
-    category = 0x101F8766;  // KPSUidStartup
-    key = 0x00000044;       // KPSPhonePhase1Ok
-    target = 101;           // EPhonePhase1Ok
-    }
-	
-	
-// ---------------------------------------------------------------------------
-// r_cmd_item_taskswitcher
-// ---------------------------------------------------------------------------  
-RESOURCE SSM_START_APP_INFO r_cmd_taskswitcher
-     {
-     priority = 0xFFA7;
-     name = "z:\\sys\\bin\\taskswitcher.exe";
-     execution_behaviour = ESsmDeferredWaitForSignal;     
-     background = 1; // To background
-     monitor_info = r_mon_max_restarts_ignore;
-     }
-
-// ---------------------------------------------------------------------------
-// r_cmd_createswp_noncriticalphase
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CREATE_SYSTEM_WIDE_PROPERTY r_cmd_createswp_noncriticalphase
-    {
-    priority = 0x7F55;
-    severity = ECmdCriticalSeverity;
-    key = SWP_UID_SSM_NONCRITICAL_PHASE;
-    filename = "ssmnoncriticalswppolicy.dll";
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_setswp_noncriticalstart
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_REQUEST_SYSTEM_WIDE_PROPERTY r_cmd_setswp_noncriticalstart
-    {
-    priority = 0x7F54;
-    key = SWP_UID_SSM_NONCRITICAL_PHASE;
-    value = ESsmNonCriticalPhaseStarted;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_multiple_wait
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_MULTIPLE_WAIT r_cmd_multiple_wait
-     {
-     priority = 0x7F96;     
-     }
-
 // ===========================================================================
 // Conditional blocks in alphabetical order
 // ===========================================================================
@@ -613,7 +475,7 @@
 //
 RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_firstboot
     {
-    category		  = 0x101F8766; // KPSUidStartup
+    category      = 0x101F8766; // KPSUidStartup
     key           = 0x00000013; // KPSStartupFirstBoot
     value         = 101;        // EPSStartupFirstBoot
     }
@@ -637,15 +499,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cond_feat_emailfw
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_emailfw
-    {
-    feature_id = KFeatureIdFfEmailFramework;
-    }
-
-// ---------------------------------------------------------------------------
 // r_cond_feat_ippush
 // ---------------------------------------------------------------------------
 //
@@ -655,15 +508,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cond_feat_omapoc
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_omapoc
-    {
-    feature_id = KFeatureIdOmaPoc;
-    }
-
-// ---------------------------------------------------------------------------
 // r_cond_feat_omasuplplugins
 // ---------------------------------------------------------------------------
 //
@@ -754,35 +598,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cond_feat_tvout
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_tvout
-    {
-    feature_id = KFeatureIdTvOut;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cond_firstboot_or_fotareset_or_deeprfsreset
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_LOGICAL_OR r_cond_firstboot_or_fotareset_or_deeprfsreset
-    {
-    lhs = r_cond_fotareset_or_deeprfsreset;
-    rhs = r_cond_ps_firstboot;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cond_fotareset_or_deeprfsreset
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_LOGICAL_OR r_cond_fotareset_or_deeprfsreset
-    {
-    lhs = r_cond_ps_fotareset;
-    rhs = r_cond_ps_deeprfsreset;
-    }
-
-// ---------------------------------------------------------------------------
 // r_cond_no_sdnd
 // ---------------------------------------------------------------------------
 //
@@ -824,17 +639,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cond_ps_deeprfsreset
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_deeprfsreset
-    {
-    category = 0x101F8766; // KPSUidStartup
-    key = 0x00000045;      // KPSStartupReason
-    value = EDeepRFSReset;
-    }
-
-// ---------------------------------------------------------------------------
 // r_cond_ps_fotareset
 // ---------------------------------------------------------------------------
 //
@@ -856,6 +660,45 @@
     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
--- a/sysstatemgmt/ssmcmdlists/data/noncriticalswpcmdlists.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmcmdlists/data/noncriticalswpcmdlists.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -68,51 +68,74 @@
         {
         // prio 0xFFF1
         r_cmd_publishswp,
-        // prio 0x7EFF
+        //prio 0x7EF9
+        r_cmd_activitymonitor_hsrunningapp,
+        //prio 0x7EF8
+        r_cmd_hsrunningappmonitor, //JJAA-85CDEA	
+       // prio 0x7EF7
         r_cmd_activitymonitor1,
-        // prio 0x7EFE
-        r_cmd_logs,
-        // prio 0x7EFD
-        r_cmd_activitymonitor2,
-        // prio 0x7EFC
-        r_cmd_pbk2,
-        // prio 0x7EFB
-        r_cmd_activitymonitor3,
-        // prio 0x7EFA
-        r_cmd_mce,
-        // prio 0x7EF9
-        r_cmd_activitymonitor4,
-        // prio 0x7EF8
-        r_cmd_clock,	//ESLT-842J9W
-        // prio 0x7EF7
-        r_cmd_activitymonitor5,
         // prio 0x7EF6
         r_cmd_videocenter,
         // prio 0x7EF5
-        r_cmd_activitymonitor6,
+        r_cmd_activitymonitor2,
         // prio 0x7EF4
         r_cmd_iaupdatebg,
-        // prio 0x7EF3
-        r_cmd_activitymonitor7,
         // prio 0x7EF2
-        r_cmd_screensaver,
-        // prio 0x7EEF
-        r_cmd_activitymonitor8,
+        r_cmd_activitymonitor3,
         // prio 0x7EEE
-        r_cmd_autosync
-#ifdef FF_ATT_ADDRESS_BK
+        r_cmd_autosync,
+        // prio 0x7EED
+        r_cmd_activitymonitor4,
+        // prio 0x7EEC
+        r_cmd_mylocationsengine,
         //prio 0x7EEA
-        ,r_cmd_activitymonitor9,
+        r_cmd_activitymonitor5,
         //prio 0x7EE9
+        r_cmd_conversationserver,	//SBSA-7YZGCQ
+        //prio 0x7EE8
+        r_cmd_activitymonitor6,
+        //prio 0x7EE7
+        r_cmd_msgnotifier		//SBSA-82ZBMC
+#ifdef FF_ATT_ADDRESS_BK
+        //prio 0x7EE6
+        ,r_cmd_activitymonitor7,
+        //prio 0x7EE5
         r_cmd_aab
 #endif
-		// prio 0x7EE8
-		,r_cmd_activitymonitor10,
-		// prio 0x7EE7
-		r_cmd_calendar //CR:MMUN-82ZHAD
-    	};
+#ifdef FF_SEARCH_SW
+       //prio 0x7EE4
+       ,r_cmd_activitymonitor8,
+       //prio 0x7EE3
+       r_cmd_searchsw 		//SLAR-832C9T
+#endif //FF_SEARCH_SW
+#ifdef FF_EMAIL_FRAMEWORK
+		//prio 0x7EE2
+       ,r_cmd_activitymonitor9,
+       //prio 0x7EE1
+       r_cmd_nmailagent 	//MBEN-83CFQE
+#endif //FF_EMAIL_FRAMEWORK
+	//prio 0x7EE0
+	,r_cmd_activitymonmediamgr,		//FMAO-867HYW
+	//prio 0x7EDF
+	 r_cmd_mediamgr,			//FMAO-867HYW
+	 //prio 0x7EDE
+	 r_cmd_activitywrtserinstaller,	 	//SSEM-877P5J
+	 //prio 0x7EDD
+	 r_cmd_wrtserviceinstaller		//SSEM-877P5J
+#ifndef SYMBIAN_EXCLUDE_LOCATION 	 
+	 //prio 0x7EDC
+	 ,r_cmd_activitylbsroot,	 	//BSER-87REDT
+	 //prio 0x7EDB
+	 r_cmd_lbsroot		//BSER-87REDT
+#endif	//SYMBIAN_EXCLUDE_LOCATION
+    	 };
     }
 
+// ===========================================================================
+// Command items in alphabetical order
+// ===========================================================================
+//
+
 // -----------------------------------------------------------------------------
 // r_cmd_aab
 // -----------------------------------------------------------------------------
@@ -120,7 +143,7 @@
 #ifdef FF_ATT_ADDRESS_BK 
 RESOURCE SSM_START_APP_INFO r_cmd_aab
     {
-    priority = 0x7EE9;
+    priority = 0x7EE5;
     name = "z:\\sys\\bin\\AABPhonebookapp.exe";
     retries = 2;
     background = 1; // To background
@@ -129,12 +152,27 @@
 #endif
 
 // ---------------------------------------------------------------------------
+// r_cmd_activitymonitor_hsrunningapp
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor_hsrunningapp
+    {
+    priority = 0x7EF9;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
 // r_cmd_activitymonitor1
 // ---------------------------------------------------------------------------
 //
 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor1
     {
-    priority = 0x7EFF;
+    priority = 0x7EF7;
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmWaitForSignal;
     dllname = "ssmactivitycmd.dll";
@@ -149,7 +187,7 @@
 //
 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor2
     {
-    priority = 0x7EFD;
+    priority = 0x7EF5;
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmWaitForSignal;
     dllname = "ssmactivitycmd.dll";
@@ -164,7 +202,7 @@
 //
 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor3
     {
-    priority = 0x7EFB;
+    priority = 0x7EF2;
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmWaitForSignal;
     dllname = "ssmactivitycmd.dll";
@@ -179,7 +217,7 @@
 //
 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor4
     {
-    priority = 0x7EF9;
+    priority = 0x7EED;
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmWaitForSignal;
     dllname = "ssmactivitycmd.dll";
@@ -194,22 +232,7 @@
 //
 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;
+    priority = 0x7EEA;
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmWaitForSignal;
     dllname = "ssmactivitycmd.dll";
@@ -217,14 +240,14 @@
     retries = 2;
     dll_data = r_dlldata_activitymonitor_timeout;
     }
-
+	
 // ---------------------------------------------------------------------------
-// r_cmd_activitymonitor7
+// r_cmd_activitymonitor6
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor7
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor6
     {
-    priority = 0x7EF3;
+    priority = 0x7EE8;
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmWaitForSignal;
     dllname = "ssmactivitycmd.dll";
@@ -232,30 +255,15 @@
     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
+// r_cmd_activitymonitor7
 // ---------------------------------------------------------------------------
 //
 #ifdef FF_ATT_ADDRESS_BK
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor9
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor7
     {
-    priority = 0x7EEA;
+    priority = 0x7EE6;
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmWaitForSignal;
     dllname = "ssmactivitycmd.dll";
@@ -266,12 +274,30 @@
 #endif
 
 // ---------------------------------------------------------------------------
-// r_cmd_activitymonitor10
+// r_cmd_activitymonitor8
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor10
+#ifdef FF_SEARCH_SW
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor8
     {
-    priority = 0x7EE8;
+    priority = 0x7EE4;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+#endif //FF_SEARCH_SW
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor9
+// ---------------------------------------------------------------------------
+//
+#ifdef FF_EMAIL_FRAMEWORK
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor9
+    {
+    priority = 0x7EE2;
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmWaitForSignal;
     dllname = "ssmactivitycmd.dll";
@@ -279,6 +305,54 @@
     retries = 2;
     dll_data = r_dlldata_activitymonitor_timeout;
     }
+#endif //FF_EMAIL_FRAMEWORK
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonmediamgr
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonmediamgr
+    {
+    priority = 0x7EE0;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitywrtserinstaller
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitywrtserinstaller
+    {
+    priority = 0x7EDE;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitylbsroot
+// ---------------------------------------------------------------------------
+//
+#ifndef SYMBIAN_EXCLUDE_LOCATION 
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitylbsroot
+    {
+    priority = 0x7EDC;
+    severity = ECmdCriticalSeverity;
+    execution_behaviour = ESsmWaitForSignal;
+    dllname = "ssmactivitycmd.dll";
+    ordinal = 1; // SsmActivityCmdNewL
+    retries = 2;
+    dll_data = r_dlldata_activitymonitor_timeout;
+    }
+#endif	//SYMBIAN_EXCLUDE_LOCATION 	
 
 // ---------------------------------------------------------------------------
 // r_cmd_autosync
@@ -293,30 +367,109 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_calendar
+// r_cmd_conversationserver
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_APP_INFO r_cmd_calendar
-	{
-   	priority = 0x7EE7;
-	name = "calendar.exe";
-	execution_behaviour = ESsmFireAndForget;
-	retries = 3;
-	background = 1; // To background
+RESOURCE SSM_START_PROCESS_INFO r_cmd_conversationserver
+    {
+    priority = 0x7EE9;
+    name = "csserver.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_hsrunningappmonitor
+// ---------------------------------------------------------------------------
+//	
+RESOURCE SSM_START_PROCESS_INFO r_cmd_hsrunningappmonitor
+    {
+    priority = 0x7EF8;
+    name = "z:\\sys\\bin\\hsrunningappmonitor.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    monitor_info = r_mon_3_restarts_ignore;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_lbsroot
+// ---------------------------------------------------------------------------
+//	
+#ifndef SYMBIAN_EXCLUDE_LOCATION
+RESOURCE SSM_START_PROCESS_INFO r_cmd_lbsroot
+    {
+    priority = 0x7EDB;
+    name = "lbsroot.exe";
+    execution_behaviour = ESsmFireAndForget;
+    retries = 2;
+    }
+#endif	//SYMBIAN_EXCLUDE_LOCATION 
+
+// ---------------------------------------------------------------------------
+// r_cmd_mediamgr
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_APP_INFO r_cmd_mediamgr
+    {
+    priority = 0x7EDF;
+    name = "z:\\sys\\bin\\MediaManager.exe";
+    execution_behaviour = ESsmFireAndForget;
+    background = 1; // To background
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_clock
+// r_cmd_msgnotifier
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_APP_INFO r_cmd_msgnotifier
+    {
+    priority = 0x7EE7;
+    name = "msgnotifier.exe";
+    execution_behaviour = ESsmFireAndForget;
+    retries = 3;
+    }	
+
+// ---------------------------------------------------------------------------
+// r_cmd_mylocationsengine
+// ---------------------------------------------------------------------------
+//	
+RESOURCE SSM_START_PROCESS_INFO r_cmd_mylocationsengine
+    {
+    priority = 0x7EEC;
+    name = "z:\\sys\\bin\\mylocationsengine.exe";
+    execution_behaviour = ESsmFireAndForget;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_publishswp
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_APP_INFO r_cmd_clock
+RESOURCE SSM_PUBLISH_SYSTEM_WIDE_PROPERTY r_cmd_publishswp
+    {
+    priority = 0xFFF1;
+    severity = ECmdCriticalSeverity;
+    }
+
+// ---------------------------------------------------------------------------
+// r_cmd_nmailagent
+// ---------------------------------------------------------------------------
+//
+#ifdef FF_EMAIL_FRAMEWORK
+RESOURCE SSM_START_PROCESS_INFO r_cmd_nmailagent
     {
-    priority = 0x7EF8;
-    name = "clock.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    background = 1; // To background
+    priority = 0x7EE1;
+    name = "z:\\sys\\bin\\nmailagent.exe";
+    execution_behaviour = ESsmFireAndForget;
+    conditional_information = r_cond_feat_emailfw;
     }
+    
+// ---------------------------------------------------------------------------
+// r_cond_feat_emailfw
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_emailfw
+    {
+    feature_id = KFeatureIdFfEmailFramework;
+    }
+#endif //FF_EMAIL_FRAMEWORK
 
 // ---------------------------------------------------------------------------
 // r_cmd_iaupdatebg
@@ -330,69 +483,29 @@
     timeout = 10000;
     conditional_information = r_cond_feat_iadv2;
     }
-
-// ---------------------------------------------------------------------------
-// r_cmd_mce
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_mce
-    {
-    priority = 0x7EFA;
-    name = "mce.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    background = 1; // To background
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_pbk2
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_pbk2
-    {
-    priority = 0x7EFC;
-    name = "z:\\sys\\bin\\phonebook2.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    background = 1; // To background
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_publishswp
+	
+//---------------------------------------------------------------------------
+// r_cmd_searchsw
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_PUBLISH_SYSTEM_WIDE_PROPERTY r_cmd_publishswp
-    {
-    priority = 0xFFF1;
-    severity = ECmdCriticalSeverity;
-    }
+#ifdef	FF_SEARCH_SW
+RESOURCE SSM_START_PROCESS_INFO r_cmd_searchsw
+	{
+	priority = 0x7EE3;
+	name = "z:\\sys\\bin\\cpixwatchdog.exe";
+	execution_behaviour = ESsmFireAndForget;
+	conditional_information = r_cond_feat_searchsw;
+	}
 
 // ---------------------------------------------------------------------------
-// r_cmd_logs
+// r_cond_feat_searchsw
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_APP_INFO r_cmd_logs
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_searchsw
     {
-    priority = 0x7EFE;
-    name = "z:\\sys\\bin\\logs.exe";
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    background = 1; // To background
+    feature_id = KFeatureIdFfSearchSw;
     }
-
-// ---------------------------------------------------------------------------
-// r_cmd_screensaver
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_screensaver
-    {
-    priority = 0x7EF2;
-    name = "z:\\sys\\bin\\screensaver.exe";
-    background = 1; // To background
-    execution_behaviour = ESsmWaitForSignal;
-    timeout = 10000;
-    monitor_info = r_mon_3_restarts_ignore;
-    }
+#endif //FF_SEARCH_SW
 
 // ---------------------------------------------------------------------------
 // r_cmd_videocenter
@@ -406,17 +519,15 @@
     timeout = 10000;
     }
 
-// ===========================================================================
-// Conditional blocks in alphabetical order
-// ===========================================================================
-//
 // ---------------------------------------------------------------------------
-// r_cond_feat_iadv2
+// r_cmd_wrtserviceinstaller
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_iadv2
+RESOURCE SSM_START_APP_INFO r_cmd_wrtserviceinstaller
     {
-    feature_id = KFeatureIdFfIaupdatePhase2;
+    priority = 0x7EDD;
+    name = "z:\\sys\\bin\\wrtserviceinstaller.exe";
+    execution_behaviour = ESsmFireAndForget;
     }
 
 // ===========================================================================
@@ -433,6 +544,14 @@
     timeout = 2;
     }
 
+// ---------------------------------------------------------------------------
+// r_cond_feat_iadv2
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_iadv2
+    {
+    feature_id = KFeatureIdFfIaupdatePhase2;
+    }    
 
 // monitoring.rss contains resource definitions, so it may not be included
 // before entry point.
--- a/sysstatemgmt/ssmcmdlists/data/securitycheckcmdlist.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmcmdlists/data/securitycheckcmdlist.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009-2010 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"
@@ -69,21 +69,14 @@
         r_cmd_publishstate, // prio 0xFFF1
         r_cmd_psstate,      // prio 0xFFF0
         // prio 0xFFE7
-		r_cmd_menu,
         r_cmd_idle,
-        // prio 0xFFE6
+	    // prio 0xFFE6
         r_cmd_multiwaitforever1,
         // prio 0xFFE3
         r_cmd_startup,
         r_cmd_phone,
-        r_cmd_nitz,
-        // prio 0xFFE2
+        r_cmd_clockserver,
         r_cmd_multiwaitforever2,
-        // prio 0xFFDF
-        r_cmd_touchscreen,
-        r_cmd_touchplg,
-        // prio 0xFFDE
-        r_cmd_multiwaitforever3,
         // prio 0xFFD8
         r_cmd_createswp_simstatus,
         // prio 0xFFD7
@@ -97,7 +90,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
 // ---------------------------------------------------------------------------
@@ -110,31 +113,20 @@
     filename = "ssm.swp.policy.simstatus.dll";
     }
 
+    
 // ---------------------------------------------------------------------------
 // r_cmd_idle
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_PROCESS_INFO r_cmd_idle
+RESOURCE SSM_START_APP_INFO r_cmd_idle
     {
     priority = 0xFFE7;
-    name = "z:\\sys\\bin\\ailaunch.exe";
+    name = "z:\\sys\\bin\\hsapplicationlauncher.exe";
     execution_behaviour = ESsmDeferredWaitForSignal;
     monitor_info = r_mon_max_restarts_ignore;
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_menu
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_menu
-    {
-    priority = 0xFFE7;
-    name = "z:\\sys\\bin\\matrixmenu.exe";
-    execution_behaviour = ESsmDeferredWaitForSignal;
-    background = 1; // To background
-    }
-
-// ---------------------------------------------------------------------------
 // r_cmd_multiwaitforever1
 // ---------------------------------------------------------------------------
 //
@@ -152,26 +144,6 @@
     priority = 0xFFE2;
     }
 
-// ---------------------------------------------------------------------------
-// r_cmd_multiwaitforever3
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_MULTIPLE_WAIT r_cmd_multiwaitforever3
-    {
-    priority = 0xFFDE;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_nitz
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_nitz
-    {
-    priority = 0xFFE3;
-    name = "z:\\sys\\bin\\clockserver.exe";
-    execution_behaviour = ESsmFireAndForget; // -- does not call Rendezvous() --
-    monitor_info = r_mon_3_restarts_ignore;
-    }
 
 // ---------------------------------------------------------------------------
 // r_cmd_phone
@@ -264,32 +236,6 @@
     retries = 2;
     }
 
-// ---------------------------------------------------------------------------
-// r_cmd_touchplg
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_touchplg
-    {
-    priority = 0xFFDF;
-    severity = ECmdCriticalSeverity;
-    dllname = "tsccustcmds.dll";
-    ordinal = 1;
-    retries = 2;
-    execution_behaviour = ESsmDeferredWaitForSignal;
-    conditional_information = r_cond_firstboot_and_tscinstartup;
-    }
-
-// ---------------------------------------------------------------------------
-// r_cmd_touchscreen
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_touchscreen
-    {
-    priority = 0xFFDF;
-    name = "z:\\sys\\bin\\touchscreencalib.exe";
-    execution_behaviour = ESsmDeferredWaitForSignal;
-    conditional_information = r_cond_firstboot_and_tscinstartup;
-    }
 
 // ===========================================================================
 // DLL data items in alphabetical order
--- a/sysstatemgmt/ssmcmdlists/data/uiservicescmdlist.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmcmdlists/data/uiservicescmdlist.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -78,21 +78,20 @@
         // prio 0xFFC7
         r_cmd_initclkeys,
         r_cmd_initramdrive,
-        // prio 0xFFA7
-        r_cmd_splash,
-        // prio 0xFF97
-        r_cmd_rtc,
-        // prio 0xFF96 - rtc (tzsrv, cntsrv, mediator & hwrmsrv have been moved to extended startup list but use the same multiplewait command)
+        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_accsrv,
         r_cmd_selectlanguage,   // Select UI language to use
-        // prio 0xFF86 - accsrv, seleclanguage (dbrecovery has been moved to extended startup list but uses the same multiplewait command)
+        // 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_loadlocalesup,    // Observes changes in locale data        
         // prio 0xFF79
         r_cmd_aknstart,         // UI Framework
+        r_cmd_hbthemeserver,	//CR:KJLN-7WBEGU
+        r_cmd_devicedialog,     //CR:KJLN-7WBEGU   
         // prio 0xFF77
         r_cmd_apparc_init,      // Init application framework
         // prio 0xFF75
@@ -142,6 +141,29 @@
     }
 
 // ---------------------------------------------------------------------------
+// r_cmd_devicedialog
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_devicedialog
+    {
+    priority = 0xFF79;
+    severity = ECmdCriticalSeverity;             
+    name = "Z:\\sys\\bin\\hbdevicedialogappserver.exe";    
+    execution_behaviour = ESsmWaitForSignal;
+    }    
+
+// ---------------------------------------------------------------------------
+// r_cmd_hbthemeserver
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_hbthemeserver
+    {
+    priority = 0xFF79;
+    name = "z:\\sys\\bin\\hbthemeserver.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    }
+
+// ---------------------------------------------------------------------------
 // r_cmd_initclkeys
 // ---------------------------------------------------------------------------
 //
@@ -182,6 +204,8 @@
     ordinal = 1;
     }
 
+
+
 // ---------------------------------------------------------------------------
 // r_cmd_loadpowersup
 // ---------------------------------------------------------------------------
@@ -331,16 +355,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_splash
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_splash
-    {
-    priority = 0xFFA7;
-    name = "Z:\\sys\\bin\\splashscreen.exe";
-    }
-
-// ---------------------------------------------------------------------------
 // r_cmd_startupmode
 // ---------------------------------------------------------------------------
 //
--- a/sysstatemgmt/ssmcmdlists/data/uiservicescmdlist_ext.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmcmdlists/data/uiservicescmdlist_ext.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -65,9 +65,10 @@
     {
     commands =
         {
-        // prio 0xFFA3
+		//prio 0xFFA7
+		r_cmd_splash,
+        // prio 0xFF99
         r_cmd_tzsrv,
-        r_cmd_cntsrv,
         r_cmd_mediator,
         r_cmd_hwrmsrv,
         // prio 0xFF89
@@ -80,20 +81,6 @@
 // ===========================================================================
 //
 
-
-// ---------------------------------------------------------------------------
-// r_cmd_cntsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_cntsrv
-    {
-    priority = 0xFFA3;
-    name = "Z:\\sys\\bin\\cntsrv.exe";
-    args = "-nontransient";
-    severity = ECmdCriticalSeverity;
-    execution_behaviour = ESsmDeferredWaitForSignal;
-    }
-
 // ---------------------------------------------------------------------------
 // r_cmd_dbrecovery
 // ---------------------------------------------------------------------------
@@ -111,7 +98,7 @@
 //
 RESOURCE SSM_START_PROCESS_INFO r_cmd_hwrmsrv
     {
-    priority = 0xFFA3;
+    priority = 0xFF99;
     name = "Z:\\sys\\bin\\hwrmserver.exe";
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmDeferredWaitForSignal;
@@ -124,7 +111,7 @@
 //
 RESOURCE SSM_START_PROCESS_INFO r_cmd_mediator
     {
-    priority = 0xFFA3;
+    priority = 0xFF99;
     name = "Z:\\sys\\bin\\mediatorserver.exe";
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmDeferredWaitForSignal;
@@ -133,12 +120,22 @@
     }
 
 // ---------------------------------------------------------------------------
+// r_cmd_splash
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_splash
+    {
+    priority = 0xFFA7;
+    name = "Z:\\sys\\bin\\splashscreen.exe";
+    }
+
+// ---------------------------------------------------------------------------
 // r_cmd_tzsrv
 // ---------------------------------------------------------------------------
 //
 RESOURCE SSM_START_PROCESS_INFO r_cmd_tzsrv
     {
-    priority = 0xFFA3;
+    priority = 0xFF99;
     name = "Z:\\sys\\bin\\tzserver.exe";
     severity = ECmdCriticalSeverity;
     execution_behaviour = ESsmDeferredWaitForSignal;
--- a/sysstatemgmt/ssmcmdlists/data/uiswpcmdlists.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmcmdlists/data/uiswpcmdlists.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -71,11 +71,10 @@
         r_cmd_devlockcheck,         // prio 0xFFD7 - Security code query, if needed
         r_cmd_startanim,            // prio 0xFFC7 - Startup animation(s)
         r_cmd_waitanim,             // prio 0xFFB7 - Wait for the animations to finish
-		r_cmd_adtupdater,			// prio 0xFFAA - Location, date & time queries //CR:ESAH-84JFCU
         r_cmd_enableappskey,        // prio 0xFFA7 - Enable applications key
         r_cmd_enableglobalnotes,    // prio 0xFFA7 - Enable global notes
         r_cmd_swidaemon             // prio 0xFF97 - Initializes pre-installed applications from memory card
-		};
+        };
     }
 
 // ===========================================================================
@@ -84,17 +83,6 @@
 //
 
 // ---------------------------------------------------------------------------
-// r_cmd_adtupdater
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_adtupdater
-    {
-    priority = 0xFFAA;
-    name = "adtupdater.exe";
-    execution_behaviour = ESsmFireAndForget;
-    }
-
-// ---------------------------------------------------------------------------
 // r_cmd_devlockcheck
 // ---------------------------------------------------------------------------
 //
--- a/sysstatemgmt/ssmcustcmds/rom/ssmcompatibility.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmcustcmds/rom/ssmcompatibility.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -38,8 +38,4 @@
 
 data=DATAZ_\private\10202be9\2001d2aa.txt                       \private\10202be9\2001d2aa.txt
 
-#ifdef FF_SIM_CONSECUTIVE_6F00_ERRORS_HANDLING
-patchdata ssmcmn.dll @ KSsmInvalidSim 0xFFFFFFFF //enable the feature to check whether sim is invalid
-#endif //FF_SIM_CONSECUTIVE_6F00_ERRORS_HANDLING
-
 #endif // SSMCOMPATIBILITY_IBY
--- a/sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -274,6 +274,7 @@
              KWriteDeviceDataPolicy );
     SetL( KPSStarterUid, KRTCPropertyKey, 0 );
     
+
     INFO( "KPSUidStartup::KIgnoreSecurityEvent" );
     DefineL( KPSUidStartup,
              KIgnoreSecurityEvent,
--- a/sysstatemgmt/ssmmapperutility/inc/ssmmapperutility.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmmapperutility/inc/ssmmapperutility.h	Tue Aug 31 16:29:05 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/ssmpolicyplugins/ssmfailpolicy/src/ssmfailpolicy.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmpolicyplugins/ssmfailpolicy/src/ssmfailpolicy.cpp	Tue Aug 31 16:29:05 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"
@@ -60,7 +60,7 @@
 // ---------------------------------------------------------------------------
 //
 TBool CSsmFailPolicy::GetNextState(
-    TSsmState aCurrentTransition,
+    TSsmState INFO_PARAM( aCurrentTransition ),
     TInt /*aReason*/,
     TInt ERROR_PARAM( aError ),
     TInt ERROR_PARAM( aSeverity ),
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/group/ssmlocaleobserversup.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/group/ssmlocaleobserversup.mmp	Tue Aug 31 16:29:05 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"
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmlocaleobserversup.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmlocaleobserversup.h	Tue Aug 31 16:29:05 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__
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmlocaleobserversup.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmlocaleobserversup.cpp	Tue Aug 31 16:29:05 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;
+    }    
--- a/sysstatemgmt/syslangutil/bwins/syslangutilu.def	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/syslangutil/bwins/syslangutilu.def	Tue Aug 31 16:29:05 2010 +0300
@@ -3,4 +3,10 @@
 	?GetInstalledLanguages@SysLangUtil@@SAHAAPAV?$CArrayFixFlat@H@@PAVRFs@@@Z @ 2 NONAME ; int SysLangUtil::GetInstalledLanguages(class CArrayFixFlat<int> * &, class RFs *)
 	?IsValidLanguage@SysLangUtil@@SAHABHPAVRFs@@@Z @ 3 NONAME ; int SysLangUtil::IsValidLanguage(int const &, class RFs *)
 	?RestoreSIMLanguage@SysLangUtil@@SAHAAHPAVRFs@@@Z @ 4 NONAME ; int SysLangUtil::RestoreSIMLanguage(int &, class RFs *)
+	?ChangeRegion@SysLangUtil@@SAHH@Z @ 5 NONAME ; int SysLangUtil::ChangeRegion(int)	
+	?ChangeLanguage@SysLangUtil@@SAHH@Z @ 6 NONAME ; int SysLangUtil::ChangeLanguage(int)
+	?ChangeCollation@SysLangUtil@@SAHH@Z @ 7 NONAME ; int SysLangUtil::ChangeCollation(int)	
+	?GetInstalledRegions@SysLangUtil@@SAHAAPAV?$CArrayFixFlat@H@@PAVRFs@@@Z @ 8 NONAME ; int SysLangUtil::GetInstalledRegions(class CArrayFixFlat<int> * &, class RFs *)
+	?GetInstalledCollations@SysLangUtil@@SAHAAPAV?$CArrayFixFlat@H@@PAVRFs@@@Z @ 9 NONAME ; int SysLangUtil::GetInstalledCollations(class CArrayFixFlat<int> * &, class RFs *)
+	
 
--- a/sysstatemgmt/syslangutil/eabi/syslangutilu.def	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/syslangutil/eabi/syslangutilu.def	Tue Aug 31 16:29:05 2010 +0300
@@ -3,4 +3,9 @@
 	_ZN11SysLangUtil18GetDefaultLanguageERiP3RFs @ 2 NONAME
 	_ZN11SysLangUtil18RestoreSIMLanguageERiP3RFs @ 3 NONAME
 	_ZN11SysLangUtil21GetInstalledLanguagesERP13CArrayFixFlatIiEP3RFs @ 4 NONAME
+	_ZN11SysLangUtil12ChangeRegionEi @ 5 NONAME
+	_ZN11SysLangUtil14ChangeLanguageEi @ 6 NONAME
+	_ZN11SysLangUtil15ChangeCollationEi @ 7 NONAME
+	_ZN11SysLangUtil19GetInstalledRegionsERP13CArrayFixFlatIiEP3RFs @ 8 NONAME
+	_ZN11SysLangUtil22GetInstalledCollationsERP13CArrayFixFlatIiEP3RFs @ 9 NONAME
 
--- a/sysstatemgmt/syslangutil/inc/syslangutiltrace.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/syslangutil/inc/syslangutiltrace.h	Tue Aug 31 16:29:05 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,10 +28,12 @@
     #define ASSERT_ALWAYS_TRACE     AssertTraceFunc( _L8( __FILE__ ), __LINE__ )
     #define ASSERT_TRACE( a )       if( !( a ) ) { ASSERT_ALWAYS_TRACE; }
     #define ERROR_TRACE_1( a, b )   TraceFunc( _L( a ), b )
+    #define ERROR_TRACE_2( a, b, c )   TraceFunc( _L( a ), b,c )
 #else
     #define ASSERT_ALWAYS_TRACE
     #define ASSERT_TRACE( a )
     #define ERROR_TRACE_1( a, b )
+	#define ERROR_TRACE_2( a, b, c )
 #endif
 
 #if defined _DEBUG && defined __SYSLANG_TRACE__
--- a/sysstatemgmt/syslangutil/rom/syslangutil.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/syslangutil/rom/syslangutil.iby	Tue Aug 31 16:29:05 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=EPOCROOT##epoc32\release\armi\DEBUG_DIR\elocl_lan.001   System\libs\elocl_lan.001
+file=EPOCROOT##epoc32\release\armi\DEBUG_DIR\elocl_reg.826   System\libs\elocl_reg.826
+file=EPOCROOT##epoc32\release\armi\DEBUG_DIR\elocl_col.001   System\libs\elocl_col.001
+#endif	//EKA2
+//
+
 #endif // SYSLANGUTIL_IBY
--- a/sysstatemgmt/syslangutil/src/syslangutil.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/syslangutil/src/syslangutil.cpp	Tue Aug 31 16:29:05 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"
@@ -23,16 +23,25 @@
 #include "syslangutiltrace.h"
 #include "ssmmapperutilitystatic.h"
 #include "syslangutilprivatecrkeys.h"
+#include "ssmcommonlocale.h"
+#include <CommonEngineDomainCRKeys.h>
 
 const TInt KReadBufSize = 10;
-const TInt KLangArraySize = 20;
+const TInt KLangArraySize = 10;
+//Maximum number of retries for starting cenrep transaction.
+const TInt KMaxCountForReiteration = 5;
 
 // R&D support: Use language file in Starters internal directory for module
 // testing purposes.
 #ifdef __STARTER_MODULE_TEST_SUPPORT__
   _LIT( KLanguagesIni, "C:\\private\\100059C9\\languages.txt" );
+  _LIT( KRegionsIni, "C:\\private\\100059C9\\regions.txt" );
+  _LIT( KCollationsIni, "C:\\private\\100059C9\\collations.txt" );
+  
 #else // __STARTER_MODULE_TEST_SUPPORT__
   _LIT( KLanguagesIni, "z:\\resource\\bootdata\\languages.txt" );
+  _LIT( KRegionsIni, "z:\\resource\\bootdata\\regions.txt" );
+  _LIT( KCollationsIni, "z:\\resource\\bootdata\\collations.txt" );
 #endif // __STARTER_MODULE_TEST_SUPPORT__
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -351,3 +360,172 @@
     FUNC_EXIT_TRACE;
     return aRFs;
     }
+
+// -----------------------------------------------------------------------------
+// SysLangUtil::ChangeLanguage
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt SysLangUtil::ChangeLanguage(const TInt  aLanguageCode)
+	{
+    API_FUNC_ENTRY_TRACE;    
+    TRAPD( errorCode, LoadDllL( KGSDisplayTxtLang,aLanguageCode, KLanguageDllNameBase ) );      
+    FUNC_EXIT_RET_TRACE( errorCode );
+    return errorCode;	 
+	}
+
+
+// -----------------------------------------------------------------------------
+// SysLangUtil::ChangeRegion
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt SysLangUtil::ChangeRegion(const TInt aRegionCode)
+	{
+    API_FUNC_ENTRY_TRACE;
+    TRAPD( errorCode, LoadDllL( KGSRegion, aRegionCode, KRegionDllNameBase ) );     
+    FUNC_EXIT_RET_TRACE( errorCode );
+    return errorCode;
+	}
+
+// -----------------------------------------------------------------------------
+// SysLangUtil::ChangeCollation
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt SysLangUtil::ChangeCollation(const TInt aCollationCode)
+	{
+    API_FUNC_ENTRY_TRACE; 
+    TRAPD( errorCode, LoadDllL( KGSCollation, aCollationCode, KCollationDllNameBase ) );      
+    FUNC_EXIT_RET_TRACE( errorCode );
+    return errorCode;
+	}
+	
+
+// -----------------------------------------------------------------------------
+// SysLangUtil::GetInstalledRegions
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt SysLangUtil::GetInstalledRegions(CArrayFixFlat<TInt>*& aRegions,  RFs* aFileServerSession )
+	{
+	API_FUNC_ENTRY_TRACE;	
+	TRAPD(err, ReadFileL(aRegions, KRegionsIni, aFileServerSession ));
+	FUNC_EXIT_RET_TRACE( err );
+	return err;
+	}
+
+// -----------------------------------------------------------------------------
+// SysLangUtil::GetInstalledCollations
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt SysLangUtil::GetInstalledCollations(CArrayFixFlat<TInt>*& aCollations,  RFs* aFileServerSession )
+	{
+	API_FUNC_ENTRY_TRACE;
+	TRAPD(err, ReadFileL(aCollations,  KCollationsIni, aFileServerSession ));
+	FUNC_EXIT_RET_TRACE( err );  
+	return err;	
+	}
+
+void SysLangUtil::LoadDllL( const TUint32 aCategory,const TInt aCode, const TDesC& aDllNameBase )
+    {
+    CRepository* cenrep = NULL; 
+    TUint32 keyInfo;
+    cenrep = CRepository::NewLC( KCRUidCommonEngineKeys );
+    
+    // Re-iterate through StartTransaction, if errorCode returned is KErrLocked
+    TInt errorCode = KErrLocked;
+	//Counter to restrict re-iteration. 
+	TInt counter = KMaxCountForReiteration;
+    while ( KErrLocked == errorCode && counter > 0 )
+        {
+        errorCode = cenrep->StartTransaction(CRepository::EConcurrentReadWriteTransaction);
+		--counter;
+        }
+    User::LeaveIfError(errorCode);
+	cenrep->CleanupCancelTransactionPushL();
+    User::LeaveIfError(cenrep->Set( aCategory, aCode)); 
+           
+    TBuf<KMaxDllExtensionLength> extension;       
+    extension.Format( KDllExtensionFormat, aCode );
+    
+    // Padd ".1" to ".001" for compatibility.   
+    for( ; extension.Length() < KMinDllExtensionLength ;) 
+        {
+        extension.Insert( KDllExtensionPaddingPosition,
+                          KDllExtensionPadding );
+        }
+
+    TBuf<KMaxDllNameLength> dllName( aDllNameBase );
+    dllName.Append( extension );
+    
+    //Loading DLL
+    TExtendedLocale extLocale;
+    extLocale.LoadSystemSettings();
+    errorCode = extLocale.LoadLocaleAspect( dllName );
+    ERROR_TRACE_2( "LoadLocaleAspect returned error %d while loading dll %S" ,errorCode, &dllName );
+    User::LeaveIfError(errorCode);
+	
+    User::LeaveIfError(extLocale.SaveSystemSettings());
+	errorCode = cenrep->CommitTransaction(keyInfo);
+	if ( KErrNone != errorCode )
+        {
+        ERROR_TRACE_2( "CommitTransaction() error: Key Info %d for setting Category %d", keyInfo, aCategory  );
+        User::Leave(errorCode);
+        }
+	CleanupStack::PopAndDestroy();// for CleanupCancelTransactionPushL()
+	CleanupStack::PopAndDestroy(cenrep);
+    User::LeaveIfError(TLocale().Set());    
+    }
+
+void SysLangUtil::ReadFileL(CArrayFixFlat<TInt>*& aArray, const TDesC& aFilePath, RFs* aFileServerSession )
+    {
+    TBool hadFS = EFalse;
+    TInt err = KErrNone;
+    if ( aArray )
+        {
+        delete aArray;
+        aArray = NULL;
+        }
+    aArray = new(ELeave) CArrayFixFlat<TInt>( KLangArraySize );    
+    
+    aFileServerSession = CheckFS( aFileServerSession, hadFS, err );    
+    User::LeaveIfError(err);
+    RFile file;
+    CleanupClosePushL(file);
+    err = file.Open(*aFileServerSession, aFilePath, EFileStream | EFileRead | EFileShareReadersOnly );
+    ERROR_TRACE_2( "SysLangUtil::ReadFileL() : Opening the file : %S failed with error : %d", &aFilePath, err) ; 
+	User::LeaveIfError(err);
+	
+    // Prepare Reader
+    TFileText reader;
+    reader.Set( file );
+    err = reader.Seek( ESeekStart );
+    if ( !err )
+        {
+        TBuf<KReadBufSize> readBuf;
+        for ( TInt i = 0; !reader.Read( readBuf ) && readBuf.Length(); ++i )
+            {
+            TLex lex( readBuf );
+            lex.SkipSpace();
+            TInt value;
+            err = lex.Val( value );
+            if ( err ) 
+                {
+                break;                
+                }
+            // IGNORE the Leave
+            TRAP_IGNORE( aArray->AppendL( value ));                          
+            readBuf.Zero();
+            }
+        }
+    CleanupStack::PopAndDestroy(&file);    
+    if ( !hadFS )
+        {
+        aFileServerSession->Close();
+        delete aFileServerSession;
+        aFileServerSession = NULL;
+        }  
+    }
+
--- a/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlangselcmd.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlangselcmd.h	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlanguageloader.h	Tue Aug 31 16:29:05 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	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlangselcmd.cpp	Tue Aug 31 16:29:05 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,6 +22,7 @@
 #include "ssmlanguageloader.h"
 #include "syslangutilprivatecrkeys.h"
 #include "trace.h"
+#include "ssmmapperutilityinternalpskeys.h"
 
 #include <syslangutil.h>
 #include <CommonEngineDomainCRKeys.h>
@@ -31,6 +32,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 +98,18 @@
 	return self;	
 	}
 
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::CSsmLangSelCmd
+// ---------------------------------------------------------------------------
+//
+CSsmLangSelCmd::CSsmLangSelCmd() : CActive( EPriorityNormal ),
+    iState( EQueryListNone ),
+    iLangRegionMappingHashSet( &::HashLangRegionMappingFunction, &::LangRegionMappingIdentityRelation )
+    {
+    FUNC_LOG;
+
+    CActiveScheduler::Add( this );
+    }
 
 // ---------------------------------------------------------------------------
 // CSsmLangSelCmd::~CSsmLangSelCmd
@@ -56,11 +118,470 @@
 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 );
+    ERROR( errorCode, "Failed read KGSDisplayTxtLang CenRep key with error= %d"  );       
+    
+    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 );
+        ERROR( errorCode, "Failed to Set Region code to CentRep, %d"  );                
+        }
+    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 );
+        ERROR( errorCode, "Failed to Set Collation code to CentRep, %d"  );               
+        }
+    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
+	TInt errorCode = KErrNone;
+    TRAP( 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));   
+        
+    //Get the last selected Collation from central repository
+    User::LeaveIfError(cenrep->Get( KGSCollation, 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 +607,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 +653,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 +684,8 @@
     FUNC_LOG;
     delete iValidLanguages;
     iValidLanguages = NULL;
-    
+    iRegionsArray.Close();
+    iLangRegionMappingHashSet.Close();
     iAdaptation.Close();
     }
 
@@ -190,95 +700,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 +750,6 @@
         }
     }
 
-
 // ---------------------------------------------------------------------------
 // CSsmLangSelCmd::InterpretResult
 //
@@ -437,7 +857,6 @@
         }
     }
 
-
 // ---------------------------------------------------------------------------
 // CSsmLangSelCmd::StoreLanguageToCentRep
 //
@@ -459,49 +878,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	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlanguageloader.cpp	Tue Aug 31 16:29:05 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;
--- a/sysstatemgmt/systemstarter/group/loadamastart.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstarter/group/loadamastart.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -24,8 +24,7 @@
 
 userinclude		../inc
 
-systeminclude  	/epoc32/include
-systeminclude  	/epoc32/include/ssm
+OS_LAYER_SYSTEMINCLUDE
 
 sourcepath		../amastartsrc
 
--- a/sysstatemgmt/systemstarter/inc/loadamastart.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstarter/inc/loadamastart.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -16,7 +16,7 @@
 #ifndef __LOADAMASTART_H__
 #define __LOADAMASTART_H__
 
-#include <ssmloadamastart.h>
+#include <ssm/ssmloadamastart.h>
 
 class CAmaStart;
 
--- a/sysstatemgmt/systemstarter/src/StartupSplashScreen.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstarter/src/StartupSplashScreen.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-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,12 +93,14 @@
    
   	// Define a splash property to control display and removal of
   	// the splash screen on system start up.    
- 	RProperty::Define(KSplashPropertyKey, RProperty::EInt, 
+ 	// Ignoring the error value.
+	TInt err = RProperty::Define(KSplashPropertyKey, RProperty::EInt, 
  							KSplashReadPolicy, KSplashWritePolicy);
-  
+	DEBUGPRINT2(_L("Defining the KSplashPropertyKey completed with %d"), err);
+
  	// Create and set off the splash screen process.
 	RProcess splash;	 
-	TInt err = splash.Create(*iSplashPath, KNullDesC);
+	err = splash.Create(*iSplashPath, KNullDesC);
 	if (err == KErrNone)
 		{
 		splash.Resume();
--- a/sysstatemgmt/systemstarter/test/tamastarter/group/tamastarter_server.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstarter/test/tamastarter/group/tamastarter_server.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-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"
@@ -30,9 +30,6 @@
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
-#ifdef SYMBIAN_SYSTEM_STATE_MANAGEMENT
-SYSTEMINCLUDE     /epoc32/include/ssm
-#endif // SYMBIAN_SYSTEM_STATE_MANAGEMENT
 
 USERINCLUDE	  ../inc
 USERINCLUDE	  ../../../inc
--- a/sysstatemgmt/systemstarter/test/tamastarter/resource/emulator/tamastarter_amaadder_ssma.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstarter/test/tamastarter/resource/emulator/tamastarter_amaadder_ssma.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -16,9 +16,9 @@
 //
 
 #include <ssm/ssmcmd.rh>
-#include <ssmsubstates.hrh>
-#include <cmdpersistreboots.rh>
-#include <cmdpersistreboots.hrh>
+#include <ssm/ssmsubstates.hrh>
+#include <ssm/cmdpersistreboots.rh>
+#include <ssm/cmdpersistreboots.hrh>
 
 UID2 KUidSsmCommandListResourceFile
 
--- a/sysstatemgmt/systemstarter/test/tamastarter/resource/hardware/tamastarter_amaadder_ssma.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstarter/test/tamastarter/resource/hardware/tamastarter_amaadder_ssma.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -16,9 +16,9 @@
 //
 
 #include <ssm/ssmcmd.rh>
-#include <ssmsubstates.hrh>
-#include <cmdpersistreboots.rh>
-#include <cmdpersistreboots.hrh>
+#include <ssm/ssmsubstates.hrh>
+#include <ssm/cmdpersistreboots.rh>
+#include <ssm/cmdpersistreboots.hrh>
 
 UID2 KUidSsmCommandListResourceFile
 
--- a/sysstatemgmt/systemstarter/test/testappgood/testappgood_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstarter/test/testappgood/testappgood_reg.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="testappgood";
 	}
-	
\ No newline at end of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstarter/test/tsysstart/group/sysstarttest.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,29 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SysStartTests EN"}
+
+; Vendor name
+: "SysStartTests"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstarter\test\tsysstart\scripts\appfwk_sysstart_test_ReRunSysStart.script"-"c:\devicesrv\sysstarttest\appfwk_sysstart_test_ReRunSysStart.script"
+
--- a/sysstatemgmt/systemstarter/test/tsysstart/inc/appfwk_sysstart_test_dll.rh	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstarter/test/tsysstart/inc/appfwk_sysstart_test_dll.rh	Tue Aug 31 16:29:05 2010 +0300
@@ -41,5 +41,3 @@
 WORD arg2  = 22;
 WORD arg3  = 23;
 }
- 
- 
\ No newline at end of file
--- a/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistimpl.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistimpl.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -430,7 +430,7 @@
 		User::LeaveIfError(file.Open(rfs, iResourceFileName, EFileRead | EFileShareReadersOnly));
 		CleanupClosePushL(file);
 		// read entire resource file into a buffer
-		TInt fileSize;
+		TInt fileSize(0);
 		User::LeaveIfError(file.Size(fileSize));
 		RBuf8 buf;
 		buf.CreateL(fileSize);
--- a/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistresourcereaderimpl.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistresourcereaderimpl.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -567,7 +567,7 @@
 	User::LeaveIfError(file.Open(iFs, aFileName, EFileRead | EFileShareReadersOnly));
 
 	// read entire resource file into a buffer
-	TInt fileSize;
+	TInt fileSize(0);
 	User::LeaveIfError(file.Size(fileSize));
 	RBuf8 buf;
 	buf.CreateL(fileSize);
--- a/sysstatemgmt/systemstatemgr/ssm/src/ssmsession.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/ssm/src/ssmsession.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -79,7 +79,7 @@
 			const TUint swpKey = {aMessage.Int0()};
 			const TInt deslen = aMessage.GetDesLengthL(1);
 			RBuf filename;
-			filename.Create(deslen);
+			filename.CreateL(deslen);
 			filename.CleanupClosePushL();
 			aMessage.ReadL(1, filename);
 			SsmServer()->RequestRegisterSwpMappingL(swpKey, filename);
@@ -150,7 +150,7 @@
 			const TUint swpKey = {aMessage.Int0()};
 			const TInt length = aMessage.GetDesLengthL(1);
 			RBuf filename;
-			filename.Create(length);
+			filename.CreateL(length);
 			filename.CleanupClosePushL();
 			aMessage.ReadL(1, filename);
 			SsmServer()->RequestDeRegisterSwpMappingL(swpKey, filename);
--- a/sysstatemgmt/systemstatemgr/ssm/src/ssmstatetransitionengine.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/ssm/src/ssmstatetransitionengine.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -533,7 +533,9 @@
 	{
 	iResolver.ReleasePolicyResolver();
 	delete iQueuedTransition;
+	iQueuedTransition = NULL;
 	delete iCurrentTransition;
+	iCurrentTransition = NULL;	
 	iCleSession.ReleaseCle();
 	}
 #endif
--- a/sysstatemgmt/systemstatemgr/sus/src/ssmsuscli.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/sus/src/ssmsuscli.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -109,7 +109,7 @@
  Usage pattern:
  @code
 	RSsmSusCli session;
-	session.Connect();
+	User::LeaveIfError(fs.Connect());
 	CleanupStackClosePushL(session);
 	TPckgC<TSsmSupInfo>* infoBuf = new (ELeave) TPckgC<TSsmSupInfo>(info);
 	session.RequestLoadSup(*infoBuf, status);
--- a/sysstatemgmt/systemstatemgr/sus/src/susemergencycallrfadaptation.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/sus/src/susemergencycallrfadaptation.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -278,8 +278,6 @@
 	DEBUGPRINT2A("CEmergencyCallRfAdaptationRequests processed the request with funtion id: %d", iCurrentMessage->Function());
 	iCurrentMessage->Complete(iStatus.Int());
 	DeleteAdaptationMessage();
-	iCurrentMessage = NULL;  
-
 	if( (iPendingEmergencyRequestsQueue.Count()) > 0 )
 		{
         CEmergencyAdaptationMessage *messageCopy = NULL;
@@ -295,7 +293,6 @@
 		{
         iCurrentMessage->Complete(aError);
 		DeleteAdaptationMessage();
-		iCurrentMessage = NULL;
 		}
 	
 	while( (iPendingEmergencyRequestsQueue.Count() > 0 ))
@@ -303,7 +300,6 @@
         Dequeue(iCurrentMessage);
         iCurrentMessage->Complete(aError);
         DeleteAdaptationMessage();
-        iCurrentMessage = NULL;
         }
 	
 	return KErrNone;
@@ -316,7 +312,6 @@
 		{
 		iCurrentMessage->Complete(KErrCancel);
 		DeleteAdaptationMessage();
-		iCurrentMessage = NULL;
 		}
 		
 	while( (iPendingEmergencyRequestsQueue.Count() > 0 ))
@@ -324,7 +319,6 @@
         Dequeue(iCurrentMessage);
         iCurrentMessage->Complete(KErrCancel);
         DeleteAdaptationMessage();
-        iCurrentMessage = NULL;
 		}
 	}
 
@@ -349,7 +343,8 @@
  */
 void CEmergencyCallRfAdaptation::DeleteAdaptationMessage()
     {
-    if(iCurrentMessage->IsMessageReserved())
+	//Do not delete iCurrentMessage if it is owned by iAdaptationReservedMessageArray.
+	if(iCurrentMessage->IsMessageReserved())
         {
         iCurrentMessage->UnsetMessageStatus(EMsgInUse);
         ++iReserveMsgCount;
@@ -357,7 +352,8 @@
     else
         {
         delete iCurrentMessage;
-        }    
+		}
+	iCurrentMessage = NULL;
     }
 
 void CEmergencyCallRfAdaptation::Dequeue(CEmergencyAdaptationMessage *&aCurrentMessage)
--- a/sysstatemgmt/systemstatemgr/sus/src/susmiscadaptation.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/sus/src/susmiscadaptation.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -128,7 +128,7 @@
 void CMiscAdaptation::DoGetSimLanguagesArrayL(const RMessage2& aMessage)
 	{
 	const TInt simLanguageCount = aMessage.Int1();
-	CBufFlat* const buf=CBufFlat::NewL(simLanguageCount * sizeof(TInt32));
+	CBufFlat* const buf=CBufFlat::NewL(simLanguageCount * sizeof(TInt));
 	CleanupStack::PushL(buf);
 
 	iMiscAdaptation.GetSimLanguagesL(buf, simLanguageCount);
--- a/sysstatemgmt/systemstatemgr/sus/src/susstateadaptation.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/sus/src/susstateadaptation.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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,7 +172,11 @@
 			DEBUGPRINT1A("CStateAdaptationRequests cancelling current request as requested");
 			iStateAdaptation.RequestCancel();
 			}
-		iPendingRequestsQueue.RemoveFromQueueAndComplete(aMessage);  	
+		iPendingRequestsQueue.RemoveFromQueueAndComplete(aMessage); 	
+		if(iPendingRequestsQueue.IsEmpty())
+		    {
+		    iPendingRequestsQueue.Close();
+		    }
 		aMessage.Complete(KErrNone);
 		}
 	else
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tcle/group/ssmatest_tcle.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,36 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SsmCleTests EN"}
+
+; Vendor name
+: "SsmCleTests"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcle\scripts\ssmatest_cle_rclesession.script"-"c:\devicesrv\ssmatest\ssmatest_cle_rclesession.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcle\scripts\ssmatest_cle_pause.script"-"c:\devicesrv\ssmatest\ssmatest_cle_pause.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcle\scripts\ssmatest_cle_dwfs_bad.script"-"c:\devicesrv\ssmatest\ssmatest_cle_dwfs_bad.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcle\scripts\ssmatest_cle_dwfs_bad_norend.script"-"c:\devicesrv\ssmatest\ssmatest_cle_dwfs_bad_norend.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcle\scripts\ssmatest_cle_dwfs_good.script"-"c:\devicesrv\ssmatest\ssmatest_cle_dwfs_good.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcle\scripts\ssmatest_cle_fandf_bad.script"-"c:\devicesrv\ssmatest\ssmatest_cle_fandf_bad.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcle\scripts\ssmatest_cle_fandf_good.script"-"c:\devicesrv\ssmatest\ssmatest_cle_fandf_good.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcle\scripts\ssmatest_cle_wfs_bad.script"-"c:\devicesrv\ssmatest\ssmatest_cle_wfs_bad.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcle\scripts\ssmatest_cle_wfs_good.script"-"c:\devicesrv\ssmatest\ssmatest_cle_wfs_good.script"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/group/ssmatest_tcmd.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,46 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SsmCmdTests EN"}
+
+; Vendor name
+: "SsmCmdTests"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_resourcereader.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_resourcereader.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_amastarter.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_amastarter.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_commandlist.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_commandlist.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_customcommand.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_customcommand.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_finalisedrives.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_finalisedrives.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_loadsup.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_loadsup.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_persisthalattributes.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_persisthalattributes.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_poweroff.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_poweroff.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_publishswp.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_publishswp.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_publishsystemstate.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_publishsystemstate.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_reqswpchange.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_reqswpchange.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_multiplewait.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_multiplewait.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_startapp.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_amastarter.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_startprocess.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_startprocess.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_waitforapparcinit.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_waitforapparcinit.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_setpandskey.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_setpandskey.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_custcmd_neverunload.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_custcmd_neverunload.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_i_bics.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_i_bics.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmd\scripts\ssmatest_cmd_runcletest.script"-"c:\devicesrv\ssmatest\ssmatest_cmd_runcletest.script"
--- a/sysstatemgmt/systemstatemgr/test/tcmd/resource/tcmd_cmdlist_swp_builtincmd.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/resource/tcmd_cmdlist_swp_builtincmd.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -347,4 +347,4 @@
 	severity = ECmdMediumSeverity;
 	power_state = 1;
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/tcmd/src/tcmd_step_resourcereader.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/src/tcmd_step_resourcereader.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1880,6 +1880,7 @@
 	User::WaitForRequest(status);
 	TExitCategoryName category = thread.ExitCategory();
 	RDebug::Print(_L("***** Exit Category = %S *****"),&category);
+	INFO_PRINTF2(_L("***** Exit Category = %S *****"), &category);
 	TEST(category.Compare(KPanicCmdResourceReader) == 0); // always expecting a resource reader panic
 	const TInt exitReason = thread.ExitReason();
 	thread.Close();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tcmn/group/ssmatest_tcmn.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,33 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SsmCmnTests EN"}
+
+; Vendor name
+: "SsmCmnTests"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmn\scripts\ssmatest_cmn_state.script"-"c:\devicesrv\ssmatest\ssmatest_cmn_state.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmn\scripts\ssmatest_cmn_swpvalue.script"-"c:\devicesrv\ssmatest\ssmatest_cmn_swpvalue.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmn\scripts\ssmatest_cmn_systemwideproperty.script"-"c:\devicesrv\ssmatest\ssmatest_cmn_systemwideproperty.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tcmn\scripts\ssmatest_cmn_stateawaresession.script"-"c:\devicesrv\ssmatest\ssmatest_cmn_stateawaresession.script"
+
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/group/ssmcletestapplication.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/group/ssmcletestapplication.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -31,7 +31,7 @@
 USERINCLUDE   	../../../localinc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
-SYSTEMINCLUDE	/epoc32/include/techview
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY     euser.lib 
 LIBRARY		apparc.lib 
--- a/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappgood.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappgood.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,7 +27,7 @@
 USERINCLUDE   	../inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
-SYSTEMINCLUDE	/epoc32/include/techview
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY     euser.lib 
 LIBRARY		apparc.lib 
--- a/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappnorv.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappnorv.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -25,10 +25,10 @@
 
 USERINCLUDE   	.
 USERINCLUDE   	../inc
-SYSTEMINCLUDE	/epoc32/include/techview
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY     euser.lib 
 LIBRARY		apparc.lib 
--- a/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapppanic.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapppanic.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -25,10 +25,10 @@
 
 USERINCLUDE   	.
 USERINCLUDE   	../inc
-SYSTEMINCLUDE	/epoc32/include/techview
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY     	euser.lib 
 LIBRARY			apparc.lib 
--- a/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapppaniczero.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapppaniczero.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -25,10 +25,10 @@
 
 USERINCLUDE   	.
 USERINCLUDE   	../inc
-SYSTEMINCLUDE	/epoc32/include/techview
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY     	euser.lib 
 LIBRARY			apparc.lib 
--- a/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapprvafterretry.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapprvafterretry.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -26,7 +26,7 @@
 USERINCLUDE   	../inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
-SYSTEMINCLUDE	/epoc32/include/techview
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY     euser.lib 
 LIBRARY		apparc.lib 
--- a/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapprverror.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestapprverror.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -25,10 +25,10 @@
 
 USERINCLUDE   	.
 USERINCLUDE   	../inc
-SYSTEMINCLUDE	/epoc32/include/techview
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY     	euser.lib 
 LIBRARY			apparc.lib 
--- a/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappslow.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappslow.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,7 +27,7 @@
 USERINCLUDE   	../inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
-SYSTEMINCLUDE	/epoc32/include/techview
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY     euser.lib 
 LIBRARY		apparc.lib 
--- a/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappsucessfulafterretry.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/group/ssmtestappsucessfulafterretry.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -26,7 +26,8 @@
 USERINCLUDE   	../inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
-SYSTEMINCLUDE	/epoc32/include/techview
+MW_LAYER_SYSTEMINCLUDE
+
 
 LIBRARY     euser.lib 
 LIBRARY		apparc.lib 
@@ -36,16 +37,7 @@
 LIBRARY		estor.lib
 LIBRARY		efsrv.lib 
 
-RESOURCE	 	ssmtestappsucessfulafterretry.rss
-START RESOURCE	ssmtestappsucessfulafterretry.rss
-TARGETPATH		/resource/apps
-END
 
-// Registration file
-SOURCEPATH    	../src
-START RESOURCE	ssmtestappsucessfulafterretry_reg.rss
-TARGETPATH		/private/10003a3f/apps
-END
 
 
 SMPSAFE
--- a/sysstatemgmt/systemstatemgr/test/testapps/inc/ssmtestapps.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/inc/ssmtestapps.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -46,6 +46,7 @@
 _LIT(KTestProcTranFromNormalWoCap, "ssmstatetranfromnormalwocap.exe");
 
 _LIT(KTestAppLogFileLoc, "C:\\logs\\ssmtest\\");
+_LIT(KFileForFAndF, "c:\\countforfnf.dat"); //This file is used by KTestAppForFAndF
 
 const TInt KTestCommandLineMaxLength = 200;
 
--- a/sysstatemgmt/systemstatemgr/test/testapps/inc/ssmtestappsucessfulafterretry.h	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-// Copyright (c) 2007-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:
-//
-
-/**
- @file
- @test
- @internalComponent - Internal Symbian test code
-*/
-
-#ifndef __SSMTESTAPPSUCESSFULAFTERRETRY_H
-#define __SSMTESTAPPSUCESSFULAFTERRETRY_H
-
-#include <s32file.h>
-#include <f32file.h>
-
-_LIT(KFileForFAndF, "c:\\countforfnf.dat");	// this file should be deleted by the test application
-
-/**
-Application class
-*/
-#include <eikapp.h>
-
-class CTestFAndFApplication : public CEikApplication
-	{
-public:
-	static CApaApplication* NewApplication();
-	~CTestFAndFApplication();
-	
-private:
-CTestFAndFApplication();
-	
-	// from CApaApplication
-	TUid AppDllUid() const;
-	CApaDocument* CreateDocumentL();
-	};
-
-/**
-Document class
-*/
-#include <eikdoc.h>
-
-class CEikAppUi;
-class CEikApplication;
-class CTestFAndFDocument : public CEikDocument
-	{
-public:
-	static CTestFAndFDocument* NewL(CEikApplication& aApp);
-	~CTestFAndFDocument();
-	
-private:
-	CTestFAndFDocument(CEikApplication& aApp);
-	
-	// from CEikDocument
-	CEikAppUi* CreateAppUiL();
-	};
-
-/**
-Application UI class, root of all graphical user interface in this application
-*/
-#include <eikappui.h>
-
-class CTestAppAo;
-class CTestFAndFAppUi : public CEikAppUi
-    {
-public:
-	CTestFAndFAppUi();
-	~CTestFAndFAppUi();
-	
-	// from CEikAppUi
-	void ConstructL();
-	};
-
-#endif // __SSMTESTAPPSUCESSFILAFTERRETRY_H
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmcletestapplication_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmcletestapplication_reg.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -30,4 +30,4 @@
 	app_file="ssmcletestapplication";
 	newfile = KAppDoesNotSupportNewFile;
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -22,8 +22,8 @@
 
 NAME STAG
 
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
+#include <eikon.rh>
+#include <eikon.rsg>
 
 RESOURCE RSS_SIGNATURE { }
 
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood_reg.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -30,4 +30,4 @@
 	app_file="ssmtestappgood";
 	newfile = KAppDoesNotSupportNewFile;
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -22,8 +22,8 @@
 
 NAME STAN
 
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
+#include <eikon.rh>
+#include <eikon.rsg>
 
 RESOURCE RSS_SIGNATURE { }
 
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv_reg.rss	Tue Aug 31 16:29:05 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.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppanic.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -22,8 +22,8 @@
 
 NAME STAP
 
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
+#include <eikon.rh>
+#include <eikon.rsg>
 
 RESOURCE RSS_SIGNATURE { }
 
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppanic_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppanic_reg.rss	Tue Aug 31 16:29:05 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.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppaniczero.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -21,8 +21,8 @@
 
 NAME STAZ
 
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
+#include <eikon.rh>
+#include <eikon.rsg>
 
 RESOURCE RSS_SIGNATURE { }
 
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppaniczero_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppaniczero_reg.rss	Tue Aug 31 16:29:05 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.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprvafterretry.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -21,8 +21,8 @@
 
 NAME STAR
 
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
+#include <eikon.rh>
+#include <eikon.rsg>
 
 RESOURCE RSS_SIGNATURE { }
 
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprvafterretry_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprvafterretry_reg.rss	Tue Aug 31 16:29:05 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.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprverror.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -21,8 +21,8 @@
 
 NAME STAE
 
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
+#include <eikon.rh>
+#include <eikon.rsg>
 
 RESOURCE RSS_SIGNATURE { }
 
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprverror_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprverror_reg.rss	Tue Aug 31 16:29:05 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.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappslow.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 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"
@@ -21,8 +21,8 @@
 
 NAME STAS
 
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
+#include <eikon.rh>
+#include <eikon.rsg>
 
 RESOURCE RSS_SIGNATURE { }
 
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappslow_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappslow_reg.rss	Tue Aug 31 16:29:05 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.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,107 +19,14 @@
  @internalComponent - Internal Symbian test code
 */
 
-#include <eikstart.h> 
-#include <eikapp.h>
-#include "ssmtestappsucessfulafterretry.h"
+#include <s32file.h>
+#include <f32file.h>
 #include "ssmtestapps.h"
 
-
-/**
-Standard DLL entry point function.
-Creates and returns an instance of the CApaApplication-derived class.
-@return an instance of the CApaApplication-derived class
-*/
-TInt E32Main()
-	{
-	return EikStart::RunApplication(CTestFAndFApplication::NewApplication);
-	}
-
-CTestFAndFApplication::CTestFAndFApplication()
-	{
-	}
-
-CTestFAndFApplication::~CTestFAndFApplication()
-	{
-	}
-		
-/**
-@return The application's UID 
-*/
-TUid CTestFAndFApplication::AppDllUid() const
-	{
-	const TUid dll = {KTestAppForFAndFUid};
-	return dll;
-	}
-
-/**
-@return CTestFAndFApplication or NULL if KErrNoMemory
-*/
-CApaApplication* CTestFAndFApplication::NewApplication()
-	{
-	// As the framework has at this point not started up enough, and therefore the TRAP-harness and 
-	// exception handlers aren’t available yet, this factory function is a non-leaving function and 
-	// can't use the new(Eleave) operator.
-	return new CTestFAndFApplication();
-	}
-	
-/**
-Called by the UI framework at application start-up to create an instance of the document class.
-@leave	KErrNoMemory
-@return A CTestFAndFDocument
-*/
-CApaDocument* CTestFAndFApplication::CreateDocumentL()
-	{
-	return CTestFAndFDocument::NewL(*this);
-	}
-
-CTestFAndFDocument::CTestFAndFDocument(CEikApplication& aApp) : CEikDocument(aApp)
-	{
-	}
-
-CTestFAndFDocument::~CTestFAndFDocument()
-	{
-	}
-
-/**
-Factory function for this class
-@return a new CEndTaskTestDocument instance.
-*/
-CTestFAndFDocument* CTestFAndFDocument::NewL(CEikApplication& aApp)
-	{
-	return new(ELeave) CTestFAndFDocument(aApp);
-	}
-
-
-
-/**
-Called by the UI framework to construct the application UI class. 
-Note that the app UI's ConstructL() is called by the UI framework.
-*/
-CEikAppUi* CTestFAndFDocument::CreateAppUiL()
-	{
-	return new(ELeave) CTestFAndFAppUi();
-	}
-
-
-
-CTestFAndFAppUi::CTestFAndFAppUi()
-	{
-	}
-
-
-
-CTestFAndFAppUi::~CTestFAndFAppUi()
-	{
-	}
-
-
-
-void CTestFAndFAppUi::ConstructL()
-	{
-	// Complete the UI framework's construction of the App UI.
-	BaseConstructL(CEikAppUi::ENoAppResourceFile);
-	
+// This exe fails to start for a specified number of times given in failCount, 
+// decrements the failCount each time and starts successfully once the fail count is exhausted
+static void StartProcessL()
+{
 	RFs fs;
 	RFileReadStream readStream;
 	RFileWriteStream writeStream;
@@ -159,6 +66,29 @@
 		RProcess::Rendezvous(KErrGeneral);
 		}
 	CleanupStack::PopAndDestroy(3, &fs);
+}
+
+/**
+Process entry point function.
+@return KErrNone if successful; KErrNoMemory if there is insufficient memory; otherwise, one of the other system-wide error codes.
+*/
+TInt E32Main()
+	{
+    CTrapCleanup* cleanup=CTrapCleanup::New();
+	
+	TInt error = KErrNoMemory;
+	if (cleanup)
+		{
+		TRAP(error, StartProcessL());
+		delete cleanup;
+		}
+
+	if (KErrNone != error)
+		{
+		User::Panic(_L("SUCCESSFULRETRY"),error);
+		}
+	User::WaitForAnyRequest();
+	return error;
 	}
 
 
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright (c) 2007-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:
-//
-
-/**
- @file
- @test
- @internalComponent - Internal Symbian test code
-*/
-
-NAME FNDF
-
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf=""; }
-
-
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-// Copyright (c) 2007-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:
-//
-
-/**
- @file
- @test
- @internalComponent - Internal Symbian test code
-*/
-
-#include <appinfo.rh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x20010332
-
-RESOURCE APP_REGISTRATION_INFO
-	{
-	// filename of application binary (minus extension)
-	app_file="ssmtestappsucessfulafterretry";
-	}
-	
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tipcfuzz/group/tipcfuzz.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,28 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SsmIpcFuzzTests EN"}
+
+; Vendor name
+: "SsmIpcFuzzTests"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tipcfuzz\scripts\tipcfuzz.script"-"c:\devicesrv\ssmatest\tipcfuzz.script"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tss/group/ssmatest_tss.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,38 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SsmTssTests EN"}
+
+; Vendor name
+: "SsmTssTests"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tss\scripts\ssmatest_tss_appstart.script"-"c:\devicesrv\ssmatest\ssmatest_tss_appstart.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tss\scripts\ssmatest_tss_appstartapparcinit.script"-"c:\devicesrv\ssmatest\ssmatest_tss_appstartapparcinit.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tss\scripts\ssmatest_tss_apptimeout.script"-"c:\devicesrv\ssmatest\ssmatest_tss_apptimeout.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tss\scripts\ssmatest_tss_procstart.script"-"c:\devicesrv\ssmatest\ssmatest_tss_procstart.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tss\scripts\ssmatest_tss_procstartmon.script"-"c:\devicesrv\ssmatest\ssmatest_tss_procstartmon.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tss\scripts\ssmatest_tss_errors.script"-"c:\devicesrv\ssmatest\ssmatest_tss_errors.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tss\scripts\ssmatest_tss_appstartrverror.script"-"c:\devicesrv\ssmatest\ssmatest_tss_appstartrverror.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tss\scripts\ssmatest_tss_startandcancel.script"-"c:\devicesrv\ssmatest\ssmatest_tss_startandcancel.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tss\scripts\ssmatest_tss_appstartmultiple.script"-"c:\devicesrv\ssmatest\ssmatest_tss_appstartmultiple.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tss\scripts\ssmatest_tss_procstartwithfandf.script"-"c:\devicesrv\ssmatest\ssmatest_tss_procstartwithfandf.script"
+
--- a/sysstatemgmt/systemstatemgr/test/tss/src/tss_apptimeout.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/tss/src/tss_apptimeout.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -26,7 +26,6 @@
 
 #include "tss_apptimeout.h"
 #include "ssmtestapps.h"
-#include "ssmtestappsucessfulafterretry.h"
 #include "ssmtestappslow.h"
 
 const TInt KWaitTime = 300;
--- a/sysstatemgmt/systemstatemgr/test/tss/src/tss_procstartwithfandf.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/tss/src/tss_procstartwithfandf.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -24,8 +24,8 @@
 
 
 #include "tss_procstartwithfandf.h"
-#include "ssmtestappsucessfulafterretry.h"
 #include "ssmtestappslow.h"
+#include "ssmtestapps.h"
 
 const TInt KProcStartStopperTimeout = 5000000;
 const TInt KWaitTimeForTestAppForFAndF = 500;	// 500ms is the delay given for the KTestAppForFAndF test app for each retry.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tssm/group/ssmatest_tssm.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,50 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SsmTSsmTests EN"}
+
+; Vendor name
+: "SsmTSsmTests"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_swptransitionengine.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_swptransitionengine.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_platsec.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_platsec.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_paniccle.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_paniccle.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_server.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_server.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_statefurthertransition.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_statefurthertransition.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_conditionalcommands.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_conditionalcommands.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_ssmcledeadlock.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_ssmcledeadlock.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_repeatedpublishstate.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_repeatedpublishstate.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_statepolicyresolver.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_statepolicyresolver.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_statetransitionengine.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_statetransitionengine.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_swpcommonplugin.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_swpcommonplugin.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_swphandlecleret.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_swphandlecleret.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_swpdependencies.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_swpdependencies.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_swppolicymap.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_swppolicymap.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_swppolicyresolver.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_swppolicyresolver.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_swptransitionscheduler.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_swptransitionscheduler.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_swprequesthandler.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_swprequesthandler.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_validstatelist.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_validstatelist.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_validswplist.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_validswplist.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_notifypropertychange.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_notifypropertychange.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_rswppolicysess.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_rswppolicysess.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tssm\scripts\ssmatest_ssm_cmdexecution_oom.script"-"c:\devicesrv\ssmatest\ssmatest_ssm_cmdexecution_oom.script"
+
--- a/sysstatemgmt/systemstatemgr/test/tssm/src/tssm_step_swptransitionengine.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/tssm/src/tssm_step_swptransitionengine.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -281,7 +281,9 @@
 	CleanupStack::PushL(cleSession);
 
 	// Define and set the rproperty
-	TEST(KErrNone == iProperty.Define(RProcess().SecureId(), KSwpTestKey1, RProperty::EInt));
+	TInt err = (iProperty.Define(RProcess().SecureId(), KSwpTestKey1, RProperty::EInt));
+	INFO_PRINTF2(_L("doTestRequestSimpleL :: Define KSwpTestKey1 returns : %d "), err);
+	TEST ((KErrNone == err) ||(KErrAlreadyExists == err));
 	TEST(KErrNone == iProperty.Set(RProcess().SecureId(), KSwpTestKey1, 0));
 
 	TInt value;
--- a/sysstatemgmt/systemstatemgr/test/tssm/src/tssm_step_validswplist.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatemgr/test/tssm/src/tssm_step_validswplist.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 @@
  @internalComponent - Internal Symbian test code
 */
 
+#include <e32property.h>
 #include "ssmserverpanic.h"
 #include "ssmswppolicyframe.h"
 #include "ssmswppolicyresolver.h"
@@ -33,6 +34,8 @@
 
 
 const TInt KTestInvalidPanicCategory = -988;
+// property uids should be real uids (use these temporarily for test purposes)
+const TUint key={0x01};
 _LIT(KSsmSwpPolicyServerName, "TestSsmSwpPolicyServer");
 
 //----------------------------------------------------------------------------------------------------------------
@@ -65,7 +68,7 @@
 	User::SetJustInTime(EFalse);
 	thread.Resume();
 	User::WaitForRequest(status);
-
+	
 	// always expecting a state transition engine panic
 	TExitCategoryName category = thread.ExitCategory();
 	if (category.Compare(KPanicSysStateMgr) != 0)
@@ -101,9 +104,6 @@
 	CleanupStack::PushL(sched);
 	CActiveScheduler::Install(sched);
 
-	// property uids should be real uids (use these temporarily for test purposes)
-	const TUint key={0x01};
-
 	// Create a swp policy resolver and register our property
 	CSsmSwpPolicyResolver* resolver = CSsmSwpPolicyResolver::NewL();
 	CleanupStack::PushL(resolver);
@@ -129,6 +129,7 @@
 
 	//Request transition according to the reason action, which will define the invalid list
 	const TSsmSwp swp(key, aSsmValidSwpListTest->Function());
+	
 	handler->SubmitRequestL(swp);
 
 	sched->Start();
@@ -200,10 +201,12 @@
 
 	__UHEAP_MARK;
 
+	TInt err = RProperty::Define(RProcess().SecureId(), key, RProperty::EInt);
+	TEST(err == KErrNone || err == KErrAlreadyExists);
 	INFO_PRINTF1(_L("Checking cmd list without a Publish System Swp command"));
 	TInt exitReason(0);
 	SetFunction(ESwpCmdWithoutPublishSwp);
-	TRAPD(err, exitReason = StartSwpInvalidListInThreadL(this));
+	TRAP(err, exitReason = StartSwpInvalidListInThreadL(this));
 	TEST(err == KErrNone);
 	INFO_PRINTF2(_L("    -- StartSwpInvalidListInThreadL method completed with '%d'."), err);
 	TEST(exitReason == ESwpTransitionEngineError16);
@@ -243,12 +246,13 @@
 	TEST(err == KErrNone);
 	INFO_PRINTF2(_L("    -- StartSwpInvalidListInThreadL method completed with '%d'."), err);
 	const TInt threadExitReason = iThread.ExitReason();
+	TBuf<16> threadExitCategory = iThread.ExitCategory();
 	// This is the exit reason for the ssmswppolicyserver
 	TEST(threadExitReason == KSsmTestAppRvError);
 	// this is the exit reason for the engine.
 	TEST(exitReason == ESwpTransitionEngineError20);
 	iThread.Close();
-	INFO_PRINTF3(_L("    -- received panic '%d', expected was '%d'."), threadExitReason, KSsmTestAppRvError);
+	INFO_PRINTF4(_L("    -- received panic '%d', category '%S', expected was '%d'."), threadExitReason, &threadExitCategory, KSsmTestAppRvError);
 
 	INFO_PRINTF1(_L("Checking cmd list with too many Multiple Wait command and and no deferred commands - Validation should be OK - Panic originates in HandleCleReturnValue returning an error"));
 	exitReason=0;
@@ -267,7 +271,9 @@
 	INFO_PRINTF2(_L("    -- StartSwpInvalidListInThreadL method completed with '%d'."), err);
 	TEST(exitReason == ESwpTransitionEngineError20);
 	INFO_PRINTF3(_L("    -- received panic '%d', expected was '%d'."), exitReason, ESwpTransitionEngineError20);
-
+	
+	err = RProperty::Delete(RProcess().SecureId(), key);
+	TEST(err == KErrNone);
 	__UHEAP_MARKEND;
 
 	// this test raises panics due to negative testing - close them to clear the screen.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tsus/group/ssmatest_tsus.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,38 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SsmTSusTests EN"}
+
+; Vendor name
+: "SsmTSusTests"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tsus\scripts\ssmatest_sus_adaptationpluginloader.script"-"c:\devicesrv\ssmatest\ssmatest_sus_adaptationpluginloader.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tsus\scripts\ssmatest_sus_adaptionserver.script"-"c:\devicesrv\ssmatest\ssmatest_sus_adaptionserver.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tsus\scripts\ssmatest_sus_supinfo.script"-"c:\devicesrv\ssmatest\ssmatest_sus_supinfo.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tsus\scripts\ssmatest_sus_suploader.script"-"c:\devicesrv\ssmatest\ssmatest_sus_suploader.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tsus\scripts\ssmatest_sus_platsec.script"-"c:\devicesrv\ssmatest\ssmatest_sus_platsec.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tsus\scripts\ssmatest_sus_platsec2.script"-"c:\devicesrv\ssmatest\ssmatest_sus_platsec2.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tsus\scripts\ssmatest_sus_utilserver.script"-"c:\devicesrv\ssmatest\ssmatest_sus_utilserver.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tsus\scripts\ssmatest_sus_loadplugin.script"-"c:\devicesrv\ssmatest\ssmatest_sus_loadplugin.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatemgr\test\tsus\scripts\ssmatest_sus_adptpluginloaderoom.script"-"c:\devicesrv\ssmatest\ssmatest_sus_adptpluginloaderoom.script"
+
+
--- a/sysstatemgmt/systemstateplugins/adptplugin/group/stateadaptationref.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/group/stateadaptationref.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -36,5 +36,6 @@
 deffile		stateadaptationref.def
 
 library		euser.lib
+library 	ssmcmn.lib
 
 SMPSAFE
--- a/sysstatemgmt/systemstateplugins/adptplugin/inc/emergencycallrfadaptationref.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/inc/emergencycallrfadaptationref.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -37,10 +37,17 @@
 	void ActivateRfForEmergencyCall(TRequestStatus& aStatus);
 	void DeactivateRfForEmergencyCall(TRequestStatus& aStatus);
 	void Cancel();
-
+	
 private:
 	CEmergencyCallRfAdaptationRef();
 	~CEmergencyCallRfAdaptationRef();
+	void ConstructL();
+	//Helper function to check for P&S Key
+    TBool IsTestPsKeyDefined();
+	
+private:    
+	MEmergencyCallRfAdaptation* iSaaEmergencyCallRfAdaptationDll;
+	RLibrary iSaaEmergencyCallRfAdaptationLib;
 	};
 
 #endif // __EMERGENCYCALLRFADAPTATION_H__
--- a/sysstatemgmt/systemstateplugins/adptplugin/inc/miscadaptationref.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/inc/miscadaptationref.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -59,16 +59,20 @@
 	void GetSimLanguagesL(CBufBase* aBuf, TInt aCount);
 	void GetHiddenReset(TDes8& aHiddenResetPckg, TRequestStatus& aStatus);
 	void Cancel();
-
+	
 private:
 	CMiscAdaptationRef();
 	void ConstructL();	
 	~CMiscAdaptationRef();
+	//Helper function to check for P&S Key
+    TBool IsTestPsKeyDefined();
 
 private:
 	TInt iTestCaseNum;
 	RFs iFs;
 	RFileReadStream iFile;
+	MMiscAdaptation* iSaaMiscAdaptationDll;
+	RLibrary iSaaMiscAdaptationLib;
 	};
 
 #endif // __MISCADAPTATION_H__
--- a/sysstatemgmt/systemstateplugins/adptplugin/inc/rtcadaptationref.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/inc/rtcadaptationref.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -37,6 +37,13 @@
 
 private:
 	CRtcAdaptationRef();
+	void ConstructL();
+	//Helper function to check for P&S Key
+    TBool IsTestPsKeyDefined();
+    
+private:	
+	MRtcAdaptation* iSaaRtcAdaptationDll;
+	RLibrary iSaaRtcAdaptationLib;
 	};
 
 #endif // __RTCADAPTATION_H__
--- a/sysstatemgmt/systemstateplugins/adptplugin/inc/simadaptationref.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/inc/simadaptationref.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,8 +27,7 @@
   On a device when NotifySimEvent is called, Sim Adaptation Plug-in would request for notification 
   from the Cooperating System for 'aEvent'.
   
-  On HRP/Techview,the reference implementation has to complete the notification request with KErrNotSupported
-  since there is no Cooperating System on HRP/Techview.
+  The reference implementation has to complete the notification request with KErrNotSupported.
   
   But this implementation will cause problems in the following scenario.
   
@@ -45,7 +44,7 @@
   In this context if NotifySimEvent just completes the message immediately this results in a infinite 
   loop and starves other active objects with same priority.
   
-  This makes testing of Adaptation servers notification functionality impossible on HRP/Techview.
+  This makes testing of Adaptation servers notification functionality impossible on PlatSim/device.
   
   *********Solution*********
 
@@ -97,8 +96,13 @@
 private:
 	CSimAdaptationRef();
 	void ConstructL();
+	//Helper function to check for P&S Key
+    TBool IsTestPsKeyDefined();
+	
 private:
 	CSimRefAdaptationTimer* iTimer;
+	MSimAdaptation* iSaaSimAdaptationDll;
+	RLibrary iSaaSimAdaptationLib;
 	};
 
 
--- a/sysstatemgmt/systemstateplugins/adptplugin/inc/stateadaptationref.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/inc/stateadaptationref.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,8 +27,7 @@
   On a device when NotifyCoopSysEvent is called, State Adaptation Plug-in would request for notification 
   from the Cooperating System for 'aEvent'.
   
-  On HRP/Techview,the reference implementation has to complete the notification request with KErrNotSupported
-  since there is no Cooperating System on HRP/Techview.
+  The reference implementation has to complete the notification request with KErrNotSupported.
   
   But this implementation will cause problems in the following scenario.
   
@@ -45,7 +44,7 @@
   In this context if NotifyCoopSysEvent just completes the message immediately this results in a infinite 
   loop and starves other active objects with same priority.
   
-  This makes testing of Adaptation servers notification functionality impossible on HRP/Techview.
+  This makes testing of Adaptation servers notification functionality impossible on PlatSim/device.
   
   *********Solution*********
 
@@ -97,13 +96,17 @@
 
 	void NotifyCoopSysEvent(TDes8& aEvent, TRequestStatus& aStatus);
 	void NotifyCancel();
-
+	
 private:
 	CStateAdaptationRef();
 	void ConstructL();
+	//Helper function to check for P&S Key
+    TBool IsTestPsKeyDefined();
 
 private:
-	CStateRefAdaptationTimer* iTimer;	
+    CStateRefAdaptationTimer* iTimer;
+	MStateAdaptation* iSaaStateAdaptationDll;
+	RLibrary iSaaStateAdaptationLib;
 	};
 
 
--- a/sysstatemgmt/systemstateplugins/adptplugin/src/emergencycallrfadaptationref.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/src/emergencycallrfadaptationref.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -10,11 +10,21 @@
 //
 // Contributors:
 //
-// Description:
+// Description: This adaptation plugin implementation is for test/reference purposes.   
+// The loading of this plugin is controlled through test macro defined in the iby file "ssmcompatibility.iby".
+// If the macro "TEST_SSM_MACRO" is not defined, original plugins are loaded and this plugin is not loaded.
+// If the test P & S key is set in the test code, the calls are routed to the reference or dummy implementations.
+// Else the actual plugins are loaded and the calls are routed to the actual implementations.
+// The test P & S key which it looks for is KEmergencyCallRfAdaptationPluginPropertyKey(0x2000E657)
 //
 
+#include "ssmdebug.h"
+#include <e32property.h>
 #include "emergencycallrfadaptationref.h"
 
+const TUint32 KEmergencyCallRfAdaptationPluginPropertyKey = 0x2000E657;
+const TUid KPropertyCategory={0x2000D75B};
+
 /**
  Function to create new Emergency Call RF Adaptation Plugin.
 
@@ -32,11 +42,25 @@
 CEmergencyCallRfAdaptationRef* CEmergencyCallRfAdaptationRef::NewL()
 	{
 	CEmergencyCallRfAdaptationRef* self = new(ELeave) CEmergencyCallRfAdaptationRef;
+	
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	
 	return self;
 	}
 
+void CEmergencyCallRfAdaptationRef::ConstructL()
+    {
+    DEBUGPRINT1A("Loading Actual plugins");
+    _LIT(KSaaEmergencyCallRfAdaptationDLL, "saaemergencycallrfadaptation.dll");
+    User::LeaveIfError(iSaaEmergencyCallRfAdaptationLib.Load(KSaaEmergencyCallRfAdaptationDLL));
+    iSaaEmergencyCallRfAdaptationDll = (MEmergencyCallRfAdaptation *)(iSaaEmergencyCallRfAdaptationLib.Lookup(1)());
+    }
+
 CEmergencyCallRfAdaptationRef::~CEmergencyCallRfAdaptationRef()
 	{
+	iSaaEmergencyCallRfAdaptationLib.Close();
 	}
 
 CEmergencyCallRfAdaptationRef::CEmergencyCallRfAdaptationRef()
@@ -48,36 +72,65 @@
 */
 void CEmergencyCallRfAdaptationRef::Release()
 	{
-	delete this;
+    if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("Release:: Calling Actual plugins functions (saaemergencycallrfadaptation.dll)");
+        iSaaEmergencyCallRfAdaptationDll->Release();
+        }
+    else
+        {
+        DEBUGPRINT1A("Release:: Calling Reference plugins functions (emergencycallrfadaptationref.dll)");
+        }
+    delete this;
 	}
 
 /**
  Request RF activation so that an emergency call can be made.
- Reference implementation completes the request with KErrNone as support for RF activation is not available on Techview/H4 hrp.
+ Reference implementation completes the request with KErrNone. This is required for automated testing.
+ Actual plugins return expected values and this can be verified by manual testing
 
  @param aStatus to complete when the operation has finished
  @see TRequestStatus 
 */
 void CEmergencyCallRfAdaptationRef::ActivateRfForEmergencyCall(TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	User::RequestComplete(status, KErrNone);
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("ActivateRfForEmergencyCall:: Calling Actual plugins functions (saaemergencycallrfadaptation.dll)");
+        iSaaEmergencyCallRfAdaptationDll->ActivateRfForEmergencyCall(aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("ActivateRfForEmergencyCall:: Calling Reference plugins functions (emergencycallrfadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, KErrNone);
+        }
 	}
 
 /**
  Request RF deactivation after an emergency call have been made.
- Reference implementation completes the request with KErrNone as support for RF deactivation is not available on Techview/H4 hrp.
-
+ Reference implementation completes the request with KErrNone. This is required for automated testing.
+ Actual plugins return expected values and this can be verified by manual testing
+ 
  @param aStatus to complete when the operation has finished
  @see TRequestStatus 
 */
 void CEmergencyCallRfAdaptationRef::DeactivateRfForEmergencyCall(TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	User::RequestComplete(status, KErrNone);	
-	}
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("DeactivateRfForEmergencyCall:: Calling Actual plugins functions (saaemergencycallrfadaptation.dll)");
+        iSaaEmergencyCallRfAdaptationDll->DeactivateRfForEmergencyCall(aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("DeactivateRfForEmergencyCall:: Calling Reference plugins functions (emergencycallrfadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, KErrNone);
+        }
+ 	}
 
 /**
   Cancel the outstanding request. Reference implementation completes the requests immediately so there is nothing to cancel.
@@ -85,4 +138,26 @@
 */
 void CEmergencyCallRfAdaptationRef::Cancel()
 	{
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("Cancel:: Calling Actual plugins functions (saaemergencycallrfadaptation.dll)");
+        iSaaEmergencyCallRfAdaptationDll->Cancel();
+        }
 	}
+
+/**
+    Helper function to check for P&S Key
+*/
+TBool CEmergencyCallRfAdaptationRef::IsTestPsKeyDefined()
+    {
+    TBool testPsKeyDefined = EFalse;
+    TInt result = RProperty::Get(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, testPsKeyDefined);
+    DEBUGPRINT3(_L("KEmergencyCallRfAdaptationPluginPropertyKey %d Error %d"), testPsKeyDefined, result);
+    if ((KErrNone != result) && (KErrNotFound != result))
+        {
+        //Could not retrieve property value. Tests might fail 
+        DEBUGPRINT1A("IsTestPsKeyDefined ERROR :: Could not retrieve property value)");
+        }
+    return testPsKeyDefined;
+    }
+
--- a/sysstatemgmt/systemstateplugins/adptplugin/src/miscadaptationref.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/src/miscadaptationref.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -10,14 +10,23 @@
 //
 // Contributors:
 //
-// Description:
+// Description: This adaptation plugin implementation is for test/reference purposes.   
+// The loading of this plugin is controlled through test macro defined in the iby file "ssmcompatibility.iby".
+// If the macro "TEST_SSM_MACRO" is not defined, original plugins are loaded and this plugin is not loaded.
+// If the test P & S key is set in the test code, the calls are routed to the reference or dummy implementations.
+// Else the actual plugins are loaded and the calls are routed to the actual implementations.
+// The test P & S key which it looks for is KMiscPluginPropertyKey(0x2000E658)
 //
 
+#include "ssmdebug.h"
 #include "miscadaptationref.h"
 #include <ssm/startupadaptationcommands.h>
+#include <e32property.h> 
 
 _LIT(KTestCmdSecurityCheckTestFile, "c:\\cmdsecuritychecktest\\pinchecksecuritycaseno.txt");
 
+const TUint32 KMiscPluginPropertyKey = 0x2000E658;
+const TUid KPropertyCategory={0x2000D75B};              // tcustomcmd_server SID = KSsmServerName SID (changed in tcustomcmd_server.mmp file)
 /**
  Function to create new Misc Adaptation Plugin. Used for a collection of activities.
 
@@ -42,6 +51,7 @@
 CMiscAdaptationRef::~CMiscAdaptationRef()
 	{
 	iFs.Close();
+	iSaaMiscAdaptationLib.Close();
 	}
 
 CMiscAdaptationRef::CMiscAdaptationRef()
@@ -50,6 +60,11 @@
 
 void CMiscAdaptationRef::ConstructL()
 	{
+	DEBUGPRINT1A("Loading Actual plugins");
+    _LIT(KSaaMiscAdaptationDLL, "saamiscadaptation.dll");
+    User::LeaveIfError(iSaaMiscAdaptationLib.Load(KSaaMiscAdaptationDLL));
+    iSaaMiscAdaptationDll = (MMiscAdaptation *)(iSaaMiscAdaptationLib.Lookup(1)());   
+    
 	iTestCaseNum = 1;
 	User::LeaveIfError(iFs.Connect());
 	}
@@ -59,29 +74,45 @@
 */
 void CMiscAdaptationRef::Release()
 	{
+	if(!IsTestPsKeyDefined())
+	    {
+	    DEBUGPRINT1A("Release :: Calling Actual plugins functions (saamiscadaptation.dll)");
+	    iSaaMiscAdaptationDll->Release();
+	    }
 	delete this;
 	}
 
 /**
  Get the start-up mode from the Cooperating System.
- Reference implementation completes with KErrNone as a cooperating system does not exist on Techview/H4 hrp.
+ Reference implementation completes the request with KErrNone. This is required for automated testing.
+ Actual plugins return expected values and this can be verified by manual testing
 
  @param aModePckg should contain start-up of the Cooperating System on completion
  @param aStatus to complete when the operation has finished
 
  @see TRequestStatus
 */
-void CMiscAdaptationRef::GetGlobalStartupMode(TDes8& /*aModePckg*/, TRequestStatus& aStatus)
+void CMiscAdaptationRef::GetGlobalStartupMode(TDes8& aModePckg, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	User::RequestComplete(status, KErrNone);
+	if(!IsTestPsKeyDefined())
+	    {
+	    DEBUGPRINT1A("GetGlobalStartupMode :: Calling Actual plugins functions (saamiscadaptation.dll)");
+        iSaaMiscAdaptationDll->GetGlobalStartupMode(aModePckg,aStatus);
+	    }
+	else
+	    {
+	    DEBUGPRINT1A("GetGlobalStartupMode :: Calling ref plugins functions (miscadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, KErrNone);        
+	    }
 	}
 
 /**
  Prepare language codes stored in the SIM in preferred language lists. The next call should be GetSimLanguagesL()
- Reference implementation completes with KErrNotSupported as SIM support is not available on Techview/H4 hrp.
-
+ Reference implementation completes with KErrNotSupported. This is required for automated testing.
+ Actual plugins return expected values and this can be verified by manual testing
+ 
  @param aPriority priority for which the language lists need to be prepared
  @param aSizePckg on return contains the size of the buffer, which a client should allocate and pass as one of the parameters (TInt aCount) to GetSimLanguagesL()
  @param aStatus to complete when the operation has finished
@@ -90,34 +121,62 @@
  @see TRequestStatus
  @see GetSimLanguagesL
 */
-void CMiscAdaptationRef::PrepareSimLanguages(TSsmLanguageListPriority /*aPriority*/, TDes8& /*aSizePckg*/, TRequestStatus& aStatus)
+void CMiscAdaptationRef::PrepareSimLanguages(TSsmLanguageListPriority aPriority, TDes8& aSizePckg, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	// No support for SIM on H4hrp/Techview.
-	User::RequestComplete(status, KErrNotSupported);
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("PrepareSimLanguages :: Calling Actual plugins functions (saamiscadaptation.dll)");
+        iSaaMiscAdaptationDll->PrepareSimLanguages(aPriority,aSizePckg,aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("PrepareSimLanguages :: Calling ref plugins functions (miscadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        // No support for SIM on H4hrp/Techview.
+        User::RequestComplete(status, KErrNotSupported);
+        }
 	}
 
 /**
  Get language codes stored in the SIM in preferred language lists. PrepareSimLanguages() call should precede this call.
- Reference implementation completes with KErrNotSupported as SIM support is not available on Techview/H4 hrp.
-
+ Reference implementation completes with KErrNotSupported.  This is required for automated testing.
+ Actual plugins return expected values and this can be verified by manual testing
+ 
  @param aBuf should contain the language lists on completion
  @param aCount to contain the count of the languages
 
  @see PrepareSimLanguages
 */
-void CMiscAdaptationRef::GetSimLanguagesL(CBufBase* /*aBuf*/, TInt /*aCount*/)
+void CMiscAdaptationRef::GetSimLanguagesL(CBufBase* aBuf, TInt aCount)
 	{
-	User::Leave(KErrNotSupported);
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("GetSimLanguagesL :: Calling Actual plugins functions (saamiscadaptation.dll)");
+        iSaaMiscAdaptationDll->GetSimLanguagesL(aBuf,aCount);
+        }
+    else
+        {
+        DEBUGPRINT1A("GetSimLanguagesL :: Calling ref plugins functions (miscadaptationref.dll)");
+        User::Leave(KErrNotSupported);
+        }	
 	}
 
-void CMiscAdaptationRef::GetHiddenReset(TDes8& /*aHiddenResetPckg*/, TRequestStatus& aStatus)
+void CMiscAdaptationRef::GetHiddenReset(TDes8& aHiddenResetPckg, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	// No support for Reset in HRP/Techview.
-	User::RequestComplete(status, KErrNotSupported);
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("GetHiddenReset :: Calling Actual plugins functions (saamiscadaptation.dll)");
+        iSaaMiscAdaptationDll->GetHiddenReset(aHiddenResetPckg,aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("GetHiddenReset :: Calling ref plugins functions (miscadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        // No support for Reset in HRP/Techview.
+        User::RequestComplete(status, KErrNotSupported);        
+        }
 	}
 
 
@@ -127,11 +186,18 @@
 */
 void CMiscAdaptationRef::Cancel()
 	{
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("Cancel :: Calling Actual plugins functions (saamiscadaptation.dll)");
+        iSaaMiscAdaptationDll->Cancel();
+        }
 	}
 
 /**
  Request the next security state.
- Techview/H4hrp does not support SIM operations so a reference implementation would always return 'KErrNotSupported'.
+ Reference implementation would always return 'KErrNotSupported'.  This is required for automated testing.
+ Actual plugins return expected values and this can be verified by manual testing
+  
  The function is modified to suit testing needs for PinCheck Security Command.
  A real implementation is intended to differ a lot based on the runtime changes/events on the device.
  
@@ -155,251 +221,276 @@
 */
 void CMiscAdaptationRef::SecurityStateChange(TInt aState, TDes8& aResponsePckg, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	StartupAdaptation::TSecurityStateInfo info = StartupAdaptation::EYes;
-	
-	//Read Test case number from the file 
-	TInt err = iFile.Open(iFs, KTestCmdSecurityCheckTestFile, EFileRead);
-	if (err == KErrNone)
-		{
-		TRAP(err,iTestCaseNum = iFile.ReadInt32L());
-		iFile.Close();
-		if(err)
-			{
-			RDebug::Printf("Error while reading tst case number from the file pinchecksecuritycaseno.txt");
-			User::RequestComplete(status, err);
-			return;
-			}
-		}	
-	switch(iTestCaseNum)
-		{
-		case EPINCHECK01:
-			switch(aState)
-			{
-			case StartupAdaptation::ESIMPresent:
-				info = StartupAdaptation::EYes;
-				break;
-            case StartupAdaptation::ESIMInvalid:
-                info = StartupAdaptation::ENo;
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("SecurityStateChange:: Calling Actual plugins functions (saamiscadaptation.dll)");
+        iSaaMiscAdaptationDll->SecurityStateChange(aState,aResponsePckg,aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("SecurityStateChange:: Calling ref plugins functions (miscadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        StartupAdaptation::TSecurityStateInfo info = StartupAdaptation::EYes;
+        
+        //Read Test case number from the file 
+        TInt err = iFile.Open(iFs, KTestCmdSecurityCheckTestFile, EFileRead);
+        if (err == KErrNone)
+            {
+            TRAP(err,iTestCaseNum = iFile.ReadInt32L());
+            iFile.Close();
+            if(err)
+                {
+                RDebug::Printf("Error while reading tst case number from the file pinchecksecuritycaseno.txt");
+                User::RequestComplete(status, err);
+                return;
+                }
+            }   
+        switch(iTestCaseNum)
+            {
+            case EPINCHECK01:
+                switch(aState)
+                {
+                case StartupAdaptation::ESIMPresent:
+                    info = StartupAdaptation::EYes;
+                    break;
+                case StartupAdaptation::ESIMInvalid:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMRejected:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMBlocked:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::EPINRequired:
+                    info = StartupAdaptation::EPIN1Required;
+                    break;
+                case StartupAdaptation::ESIMLock:
+                    info = StartupAdaptation::ESimLockOk;
+                    break;
+                case StartupAdaptation::ESecurityCheckOK:
+                    info = StartupAdaptation::EYes; 
+                    break;  
+                case StartupAdaptation::ESecurityCheckFailed:
+                    info = StartupAdaptation::EYes;
+                    break;  
+                default:
+                    break;
+                }
                 break;
-			case StartupAdaptation::ESIMRejected:
-				info = StartupAdaptation::ENo;
-				break;
-			case StartupAdaptation::ESIMBlocked:
-				info = StartupAdaptation::ENo;
-				break;
-			case StartupAdaptation::EPINRequired:
-				info = StartupAdaptation::EPIN1Required;
-				break;
-			case StartupAdaptation::ESIMLock:
-				info = StartupAdaptation::ESimLockOk;
-				break;
-			case StartupAdaptation::ESecurityCheckOK:
-				info = StartupAdaptation::EYes;	
-				break;	
-			case StartupAdaptation::ESecurityCheckFailed:
-				info = StartupAdaptation::EYes;
-				break;	
-			default:
-				break;
-			}
-			break;
-		case EPINCHECK02:
-			switch(aState)
-			{
-			case StartupAdaptation::ESIMPresent:
-				info = StartupAdaptation::EYes;
-				break;
-            case StartupAdaptation::ESIMInvalid:
-                info = StartupAdaptation::ENo;
+            case EPINCHECK02:
+                switch(aState)
+                {
+                case StartupAdaptation::ESIMPresent:
+                    info = StartupAdaptation::EYes;
+                    break;
+                case StartupAdaptation::ESIMInvalid:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMRejected:
+                    info = StartupAdaptation::EYes;
+                    break;
+                case StartupAdaptation::ESecurityCheckFailed:
+                    info = StartupAdaptation::EYes;
+                    break;  
+                default:
+                break;
+                }
                 break;
-			case StartupAdaptation::ESIMRejected:
-				info = StartupAdaptation::EYes;
-				break;
-			case StartupAdaptation::ESecurityCheckFailed:
-				info = StartupAdaptation::EYes;
-				break;	
-			default:
-			break;
-			}
-			break;
-		case EPINCHECK03:
-			switch(aState)
-			{
-			case StartupAdaptation::ESIMPresent:
-				info = StartupAdaptation::EYes;
-				break;
-            case StartupAdaptation::ESIMInvalid:
-                info = StartupAdaptation::ENo;
-                break;
-			case StartupAdaptation::ESIMRejected:
-				info = StartupAdaptation::ENo;
-				break;
-			case StartupAdaptation::ESIMBlocked:
-				info = StartupAdaptation::EPUK1Required;
-				break;	
-			case StartupAdaptation::ESIMLock:
-				info = StartupAdaptation::ESimLockOk;
-				break;
-			case StartupAdaptation::ESecurityCheckOK:
-				info = StartupAdaptation::EYes;	
-				break;	
-			case StartupAdaptation::ESecurityCheckFailed:
-				info = StartupAdaptation::EYes;
-				break;	
-			default:
-				break;
-			}
-			break;
-		case EPINCHECK04:
-			switch(aState)
-			{
-			case StartupAdaptation::ESIMPresent:
-				info = StartupAdaptation::EYes;
-				break;
-            case StartupAdaptation::ESIMInvalid:
-                info = StartupAdaptation::ENo;
+            case EPINCHECK03:
+                switch(aState)
+                {
+                case StartupAdaptation::ESIMPresent:
+                    info = StartupAdaptation::EYes;
+                    break;
+                case StartupAdaptation::ESIMInvalid:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMRejected:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMBlocked:
+                    info = StartupAdaptation::EPUK1Required;
+                    break;  
+                case StartupAdaptation::ESIMLock:
+                    info = StartupAdaptation::ESimLockOk;
+                    break;
+                case StartupAdaptation::ESecurityCheckOK:
+                    info = StartupAdaptation::EYes; 
+                    break;  
+                case StartupAdaptation::ESecurityCheckFailed:
+                    info = StartupAdaptation::EYes;
+                    break;  
+                default:
+                    break;
+                }
                 break;
-			case StartupAdaptation::ESIMRejected:
-				info = StartupAdaptation::ENo;
-				break;
-			case StartupAdaptation::ESIMBlocked:
-				info = StartupAdaptation::EPUK1Required;
-				break;	
-			case StartupAdaptation::ESIMLock:
-				info = StartupAdaptation::ESimLockOk;
-				break;
-			case StartupAdaptation::ESecurityCheckOK:
-				info = StartupAdaptation::EYes;	
-				break;	
-			case StartupAdaptation::ESecurityCheckFailed:
-				info = StartupAdaptation::EYes;
-				break;	
-			default:
-				break;
-			}	
-			break;
-		case EPINCHECK05:
-			switch(aState)
-			{
-			case StartupAdaptation::ESIMPresent:
-				info = StartupAdaptation::EYes;
-				break;
-            case StartupAdaptation::ESIMInvalid:
-                info = StartupAdaptation::ENo;
+            case EPINCHECK04:
+                switch(aState)
+                {
+                case StartupAdaptation::ESIMPresent:
+                    info = StartupAdaptation::EYes;
+                    break;
+                case StartupAdaptation::ESIMInvalid:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMRejected:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMBlocked:
+                    info = StartupAdaptation::EPUK1Required;
+                    break;  
+                case StartupAdaptation::ESIMLock:
+                    info = StartupAdaptation::ESimLockOk;
+                    break;
+                case StartupAdaptation::ESecurityCheckOK:
+                    info = StartupAdaptation::EYes; 
+                    break;  
+                case StartupAdaptation::ESecurityCheckFailed:
+                    info = StartupAdaptation::EYes;
+                    break;  
+                default:
+                    break;
+                }   
                 break;
-			case StartupAdaptation::ESIMRejected:
-				info = StartupAdaptation::ENo;
-				break;
-			case StartupAdaptation::ESIMBlocked:
-				info = StartupAdaptation::EUPUKRequired;
-				break;	
-			case StartupAdaptation::ESIMLock:
-				info = StartupAdaptation::ESimLockRestrictionOn;
-				break;
-			case StartupAdaptation::ESecurityCheckOK:
-				info = StartupAdaptation::EYes;	
-				break;	
-			case StartupAdaptation::ESecurityCheckFailed:
-				info = StartupAdaptation::EYes;
-				break;	
-			default:
-				break;	
-			}	
-			break;
-		case EPINCHECK06:
-			switch(aState)
-			{
-			case StartupAdaptation::ESIMPresent:
-				info = StartupAdaptation::EYes;
-				break;
-            case StartupAdaptation::ESIMInvalid:
-                info = StartupAdaptation::ENo;
+            case EPINCHECK05:
+                switch(aState)
+                {
+                case StartupAdaptation::ESIMPresent:
+                    info = StartupAdaptation::EYes;
+                    break;
+                case StartupAdaptation::ESIMInvalid:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMRejected:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMBlocked:
+                    info = StartupAdaptation::EUPUKRequired;
+                    break;  
+                case StartupAdaptation::ESIMLock:
+                    info = StartupAdaptation::ESimLockRestrictionOn;
+                    break;
+                case StartupAdaptation::ESecurityCheckOK:
+                    info = StartupAdaptation::EYes; 
+                    break;  
+                case StartupAdaptation::ESecurityCheckFailed:
+                    info = StartupAdaptation::EYes;
+                    break;  
+                default:
+                    break;  
+                }   
                 break;
-			case StartupAdaptation::ESIMRejected:
-				info = StartupAdaptation::ENo;
-				break;
-			case StartupAdaptation::ESIMBlocked:
-				info = StartupAdaptation::EUPUKRequired;
-				break;	
-			case StartupAdaptation::ESIMLock:
-				info = StartupAdaptation::ESimLockRestrictionPending;
-				break;
-			case StartupAdaptation::ESecurityCheckOK:
-				info = StartupAdaptation::EYes;	
-				break;	
-			case StartupAdaptation::ESecurityCheckFailed:
-				info = StartupAdaptation::EYes;	
-				break;	
-			default:
-				break;	
-			}
-			break;
-		case EPINCHECK07:
-			switch(aState)
-			{
-			case StartupAdaptation::ESIMPresent:
-				info = StartupAdaptation::EYes;
-				break;
-            case StartupAdaptation::ESIMInvalid:
-                info = StartupAdaptation::ENo;
+            case EPINCHECK06:
+                switch(aState)
+                {
+                case StartupAdaptation::ESIMPresent:
+                    info = StartupAdaptation::EYes;
+                    break;
+                case StartupAdaptation::ESIMInvalid:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMRejected:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMBlocked:
+                    info = StartupAdaptation::EUPUKRequired;
+                    break;  
+                case StartupAdaptation::ESIMLock:
+                    info = StartupAdaptation::ESimLockRestrictionPending;
+                    break;
+                case StartupAdaptation::ESecurityCheckOK:
+                    info = StartupAdaptation::EYes; 
+                    break;  
+                case StartupAdaptation::ESecurityCheckFailed:
+                    info = StartupAdaptation::EYes; 
+                    break;  
+                default:
+                    break;  
+                }
                 break;
-			case StartupAdaptation::ESIMRejected:
-				info = StartupAdaptation::ENo;
-				break;
-			case StartupAdaptation::ESIMBlocked:
-				info = StartupAdaptation::EUPUKRequired;
-				break;	
-			case StartupAdaptation::ESIMLock:
-				info = StartupAdaptation::ESimLockRestricted;
-				break;
-			case StartupAdaptation::ESecurityCheckOK:
-				info = StartupAdaptation::EYes;	
-				break;	
-			case StartupAdaptation::ESecurityCheckFailed:
-				info = StartupAdaptation::EYes;	
-				break;	
-			default:
-				break;	
-			}
-			break;
-		case EPINCHECK08:
-		switch(aState)
-			{
-			case StartupAdaptation::ESIMPresent:
-				info = StartupAdaptation::EYes;
-				break;
-			case StartupAdaptation::ESIMInvalid:
-			    info = StartupAdaptation::ENo;
-			    break;
-			case StartupAdaptation::ESIMRejected:
-				info = StartupAdaptation::ENo;
-				break;
-			case StartupAdaptation::ESIMBlocked:
-				info = StartupAdaptation::ENo;
-				break;
-			case StartupAdaptation::EPINRequired:
-				info = StartupAdaptation::EPIN1Required;
-				break;
-			case StartupAdaptation::ESIMLock:
-				info = StartupAdaptation::ESimLockOk;
-				break;
-			case StartupAdaptation::ESecurityCheckOK:
-				info = StartupAdaptation::EYes;	
-				break;	
-			case StartupAdaptation::ESecurityCheckFailed:
-				info = StartupAdaptation::EYes;	
-				break;	
-			default:
-				break;
-			}	
-			break;	
-		default:
-			break;
-		}
-	TPckgBuf<StartupAdaptation::TSecurityStateInfo> securityStateInfoResult(info);
-	aResponsePckg = securityStateInfoResult;	
-	User::RequestComplete(status, KErrNone);
+            case EPINCHECK07:
+                switch(aState)
+                {
+                case StartupAdaptation::ESIMPresent:
+                    info = StartupAdaptation::EYes;
+                    break;
+                case StartupAdaptation::ESIMInvalid:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMRejected:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMBlocked:
+                    info = StartupAdaptation::EUPUKRequired;
+                    break;  
+                case StartupAdaptation::ESIMLock:
+                    info = StartupAdaptation::ESimLockRestricted;
+                    break;
+                case StartupAdaptation::ESecurityCheckOK:
+                    info = StartupAdaptation::EYes; 
+                    break;  
+                case StartupAdaptation::ESecurityCheckFailed:
+                    info = StartupAdaptation::EYes; 
+                    break;  
+                default:
+                    break;  
+                }
+                break;
+            case EPINCHECK08:
+            switch(aState)
+                {
+                case StartupAdaptation::ESIMPresent:
+                    info = StartupAdaptation::EYes;
+                    break;
+                case StartupAdaptation::ESIMInvalid:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMRejected:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::ESIMBlocked:
+                    info = StartupAdaptation::ENo;
+                    break;
+                case StartupAdaptation::EPINRequired:
+                    info = StartupAdaptation::EPIN1Required;
+                    break;
+                case StartupAdaptation::ESIMLock:
+                    info = StartupAdaptation::ESimLockOk;
+                    break;
+                case StartupAdaptation::ESecurityCheckOK:
+                    info = StartupAdaptation::EYes; 
+                    break;  
+                case StartupAdaptation::ESecurityCheckFailed:
+                    info = StartupAdaptation::EYes; 
+                    break;  
+                default:
+                    break;
+                }   
+                break;  
+            default:
+                break;
+            }
+        TPckgBuf<StartupAdaptation::TSecurityStateInfo> securityStateInfoResult(info);
+        aResponsePckg = securityStateInfoResult;    
+        User::RequestComplete(status, KErrNone);
+        }
 	}
 
+/**
+    Helper function to check for P&S Key
+*/
+TBool CMiscAdaptationRef::IsTestPsKeyDefined()
+    {
+    TBool testPsKeyDefined = EFalse;
+    TInt result = RProperty::Get(KPropertyCategory, KMiscPluginPropertyKey, testPsKeyDefined);
+    DEBUGPRINT3(_L("KMiscPluginPropertyKey %d Error %d"), testPsKeyDefined, result);
+    if ((KErrNone != result) && (KErrNotFound != result))
+        {
+        //Could not retrieve property value. Tests might fail 
+        DEBUGPRINT1A("IsTestPsKeyDefined ERROR :: Could not retrieve property value)");
+        }
+    return testPsKeyDefined;
+    }
+
--- a/sysstatemgmt/systemstateplugins/adptplugin/src/rtcadaptationref.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/src/rtcadaptationref.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -10,16 +10,26 @@
 //
 // Contributors:
 //
-// Description:
+// Description: This adaptation plugin implementation is for test/reference purposes.   
+// The loading of this plugin is controlled through test macro defined in the iby file "ssmcompatibility.iby".
+// If the macro "TEST_SSM_MACRO" is not defined, original plugins are loaded and this plugin is not loaded.
+// If the test P & S key is set in the test code, the calls are routed to the reference or dummy implementations.
+// Else the actual plugins are loaded and the calls are routed to the actual implementations.
+// The test P & S key which it looks for is KRtcAdaptationPluginPropertyKey (0x2000D76A)
 //
 
 #include "rtcadaptationref.h"
 
 #include <e32property.h>
+#include "ssmdebug.h"
 
 const TUid KAlarmServerUID = {0x101f5027};
 const TInt KTestRTCValueKey = 200;
 
+
+const TUint32 KRtcAdaptationPluginPropertyKey = 0x2000D76C;
+const TUid KPropertyCategory={0x2000D75B};
+
 /**
 Function to create new Rtc Adaptation Plugin.
 
@@ -34,11 +44,25 @@
 CRtcAdaptationRef* CRtcAdaptationRef::NewL()
 	{
 	CRtcAdaptationRef* self = new(ELeave) CRtcAdaptationRef;
+	
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	
 	return self;	
 	}
 
+void CRtcAdaptationRef::ConstructL()
+    {
+    DEBUGPRINT1A("Loading Actual plugins");
+    _LIT(KSaaRtcAdaptationDLL, "saartcadaptation.dll");
+    User::LeaveIfError(iSaaRtcAdaptationLib.Load(KSaaRtcAdaptationDLL));
+    iSaaRtcAdaptationDll = (MRtcAdaptation *)(iSaaRtcAdaptationLib.Lookup(1)());    
+    }
+
 CRtcAdaptationRef::~CRtcAdaptationRef()
 	{
+	iSaaRtcAdaptationLib.Close();
 	}
 
 CRtcAdaptationRef::CRtcAdaptationRef()
@@ -50,28 +74,44 @@
 */
 void CRtcAdaptationRef::Release()
 	{
-	delete this;
+    if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("Release:: Calling Actual plugins functions (saartcadaptation.dll)");
+        iSaaRtcAdaptationDll->Release();
+        }
+    delete this;
 	}
 
 /**
  Check that the RTC is valid.
- Reference implementation completes the request with KErrNotSupported as support for RTC is not available on Techview/H4 hrp.
-
+ Reference implementation completes the request with KErrNotSupported. This is required for automated testing.
+ Actual plugins return expected values and this can be verified by manual testing
+ 
  @param aValidityPckg on return contains the status of the validity of the RTC as a boolean value
  @param aStatus to complete when the operation has finished
 
  @see TRequestStatus
 */
-void CRtcAdaptationRef::ValidateRtc(TDes8& /*aValidityPckg*/, TRequestStatus& aStatus)
+void CRtcAdaptationRef::ValidateRtc(TDes8& aValidityPckg, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	User::RequestComplete(status, KErrNotSupported);
+    if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("ValidateRtc:: Calling Actual plugins functions (saartcadaptation.dll)");
+        iSaaRtcAdaptationDll->ValidateRtc(aValidityPckg, aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("ValidateRtc:: Calling ref plugins functions (rtcadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, KErrNotSupported);
+        }
 	}
 
 /**
  Set a device wake-up alarm time, in UTC (coordinated universal time), in the RTC.
- Reference implementation completes the request with KErrNotSupported as support for RTC is not available on Techview/H4 hrp.
+ Reference implementation completes the request with KErrNotSupported. This is required for automated testing.
+ Actual plugins return expected values and this can be verified by manual testing
  For testing purposes it sets a pub sub property defined in test code.
 
  @param aAlarmTimePckg requested wake up time
@@ -81,19 +121,29 @@
 */
 void CRtcAdaptationRef::SetWakeupAlarm(TDesC8& aAlarmTimePckg, TRequestStatus& aStatus)
 	{
-	// Set this pub sub property (for testing purposes)
-	// The property is defined in the test code.  In normal operation this will fail silently because the property has not been defined.
-	RProperty::Set(KAlarmServerUID, KTestRTCValueKey, aAlarmTimePckg);
+    if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("SetWakeupAlarm:: Calling Actual plugins functions (saartcadaptation.dll)");
+        iSaaRtcAdaptationDll->SetWakeupAlarm(aAlarmTimePckg, aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("SetWakeupAlarm:: Calling ref plugins functions (rtcadaptationref.dll)");
+        // Set this pub sub property (for testing purposes)
+        // The property is defined in the test code.  In normal operation this will fail silently because the property has not been defined.
+        RProperty::Set(KAlarmServerUID, KTestRTCValueKey, aAlarmTimePckg);
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        // No support for RTC on HRP/Techview.
+        User::RequestComplete(status, KErrNotSupported);
+        }
+	}
 
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	// No support for RTC on HRP/Techview.
-	User::RequestComplete(status, KErrNotSupported);
-	}
 
 /**
  Delete the current device wake-up alarm time in the RTC.
- Reference implementation completes the request with KErrNotSupported as support for RTC is not available on Techview/H4 hrp.
+ Reference implementation completes the request with KErrNotSupported. This is required for automated testing.
+ Actual plugins return expected values and this can be verified by manual testing
  For testing purposes it sets a pub sub property to a NULL value defined in test code.
 
  @param aStatus to complete when the operation has finished
@@ -102,16 +152,24 @@
 */
 void CRtcAdaptationRef::UnsetWakeupAlarm(TRequestStatus& aStatus)
 	{
-	// Set this pub sub property to a NULL value because we are unsetting the RTC (for testing purposes)
-	// The property is defined in the test code. In normal operation this will fail silently because the property has not been defined.
-	TTime nullTime(Time::NullTTime());
-	TPckgC<TTime> wakeupAlarmTimePckg(nullTime);
-	RProperty::Set(KAlarmServerUID, KTestRTCValueKey, wakeupAlarmTimePckg);
-
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	// No support for RTC on HRP/Techview.
-	User::RequestComplete(status, KErrNotSupported);
+    if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("UnsetWakeupAlarm:: Calling Actual plugins functions (saartcadaptation.dll)");
+        iSaaRtcAdaptationDll->UnsetWakeupAlarm(aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("UnsetWakeupAlarm:: Calling ref plugins functions (rtcadaptationref.dll)");
+        // Set this pub sub property to a NULL value because we are unsetting the RTC (for testing purposes)
+        // The property is defined in the test code. In normal operation this will fail silently because the property has not been defined.
+        TTime nullTime(Time::NullTTime());
+        TPckgC<TTime> wakeupAlarmTimePckg(nullTime);
+        RProperty::Set(KAlarmServerUID, KTestRTCValueKey, wakeupAlarmTimePckg);
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        // No support for RTC on HRP/Techview.
+        User::RequestComplete(status, KErrNotSupported);
+        }
 	}
 
 /**
@@ -120,4 +178,25 @@
 */
 void CRtcAdaptationRef::Cancel()
 	{
+    if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("Cancel:: Calling Actual plugins functions (saartcadaptation.dll)");
+        iSaaRtcAdaptationDll->Cancel();
+        }
 	}
+
+/**
+    Helper function to check for P&S Key
+*/
+TBool CRtcAdaptationRef::IsTestPsKeyDefined()
+    {
+    TBool testPsKeyDefined = EFalse;
+    TInt result = RProperty::Get(KPropertyCategory, KRtcAdaptationPluginPropertyKey, testPsKeyDefined);
+    DEBUGPRINT3(_L("KRtcAdaptationPluginPropertyKey %d Error %d"), testPsKeyDefined, result);
+    if ((KErrNone != result) && (KErrNotFound != result))
+        {
+        //Could not retrieve property value. Tests might fail 
+        DEBUGPRINT1A("IsTestPsKeyDefined ERROR :: Could not retrieve property value)");
+        }
+    return testPsKeyDefined;
+    }
--- a/sysstatemgmt/systemstateplugins/adptplugin/src/simadaptationref.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/src/simadaptationref.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -10,10 +10,20 @@
 //
 // Contributors:
 //
-// Description:
+// Description: This adaptation plugin implementation is for test/reference purposes.   
+// The loading of this plugin is controlled through test macro defined in the iby file "ssmcompatibility.iby".
+// If the macro "TEST_SSM_MACRO" is not defined, original plugins are loaded and this plugin is not loaded.
+// If the test P & S key is set in the test code, the calls are routed to the reference or dummy implementations.
+// Else the actual plugins are loaded and the calls are routed to the actual implementations.
+// The test P & S key which it looks for is KSimPluginPropertyKey (0x2000D76A)
 //
 
 #include "simadaptationref.h"
+#include "ssmdebug.h"
+#include <e32property.h> 
+
+const TUint32 KSimPluginPropertyKey = 0x2000D76B;
+const TUid KPropertyCategory={0x2000D75B};
 
 /**
 Function to create new Sim Adaptation Plugin.
@@ -40,6 +50,7 @@
 CSimAdaptationRef::~CSimAdaptationRef()
 	{
 	delete iTimer;
+	iSaaSimAdaptationLib.Close();
 	}
 
 CSimAdaptationRef::CSimAdaptationRef()
@@ -48,6 +59,11 @@
 
 void CSimAdaptationRef::ConstructL()
 	{
+	DEBUGPRINT1A("Loading Actual plugins");
+    _LIT(KSaaSimAdaptationDLL, "saaSimadaptation.dll");
+    User::LeaveIfError(iSaaSimAdaptationLib.Load(KSaaSimAdaptationDLL));
+    iSaaSimAdaptationDll = (MSimAdaptation *)(iSaaSimAdaptationLib.Lookup(1)()); 
+    
 	iTimer = CSimRefAdaptationTimer::NewL();
 	}
 
@@ -57,11 +73,20 @@
 	delete this;
 	}
 
-void CSimAdaptationRef::GetSimOwned(TDes8& /*aOwnedPckg*/, TRequestStatus& aStatus)
+void CSimAdaptationRef::GetSimOwned(TDes8& aOwnedPckg, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* pStatus = &aStatus;
-	User::RequestComplete(pStatus, KErrNone);
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("GetSimOwned:: Calling Actual plugins functions (saaSimadaptation.dll)");
+        iSaaSimAdaptationDll->GetSimOwned(aOwnedPckg,aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("GetSimOwned :: Calling ref plugins functions (Simadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* pStatus = &aStatus;
+        User::RequestComplete(pStatus, KErrNone);      
+        }	
 	}
 
 /**
@@ -70,10 +95,16 @@
 */
 void CSimAdaptationRef::GetCancel()
 	{
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("GetCancel ::Calling Actual plugins functions (saaSimadaptation.dll)");
+        iSaaSimAdaptationDll->GetCancel();
+        }
 	}
 
 /**
-  The reference implementation completes with KErrNotSupported since there is no SIM support on HRP/Techview.
+  The reference implementation completes with KErrNotSupported. This is required for automated testing.
+  Actual plugins return expected values and this can be verified by manual testing
   On a device, Sim Adaptation Plug-in would complete 'aTypePckg' with one of the event types in TSsmSimEventType.
   
   
@@ -94,8 +125,23 @@
 */
 void CSimAdaptationRef::NotifySimEvent(TDes8& /*aTypePckg*/, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	iTimer->After(2000000,aStatus);
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("NotifySimEvent :: Calling Actual plugins functions (saaSimadaptation.dll)");
+        /* Only clayersup.dll has an outstanding request. If this is passed to the actual plugin, the
+        request will never complete till a SIM event happens. This would add the test code requests in a queue
+        and the test code waits indefinitely. Hence, complete the request with KErrCancel. This would free the 
+        queue for test code to be executed. It has not impact on the test environment */
+        TRequestStatus *request = &aStatus; 
+        User::RequestComplete(request, KErrCancel);
+        }
+    else
+        {
+        DEBUGPRINT1A("NotifySimEvent :: Calling ref plugins functions (Simadaptationref.dll)");
+        aStatus = KRequestPending;
+        iTimer->After(2000000,aStatus);      
+        }   
+
 	}
 
 /**
@@ -104,12 +150,36 @@
 */
 void CSimAdaptationRef::NotifyCancel()
 	{
-	if(iTimer->IsActive())
-		{
-		iTimer->Cancel();			
-		}
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("NotifyCancel :: Calling Actual plugins functions (saaSimadaptation.dll)");
+        iSaaSimAdaptationDll->NotifyCancel();
+        }
+    else
+        {
+        DEBUGPRINT1A("NotifyCancel :: Calling ref plugins functions (Simadaptationref.dll)");
+        if(iTimer->IsActive())
+            {
+            iTimer->Cancel();           
+            }     
+        }	
 	}
 
+/**
+    Helper function to check for P&S Key
+*/
+TBool CSimAdaptationRef::IsTestPsKeyDefined()
+    {
+    TBool testPsKeyDefined = EFalse;
+    TInt result = RProperty::Get(KPropertyCategory, KSimPluginPropertyKey, testPsKeyDefined);
+    DEBUGPRINT3(_L("KSimPluginPropertyKey %d Error %d"), testPsKeyDefined, result);
+    if ((KErrNone != result) && (KErrNotFound != result))
+        {
+        //Could not retrieve property value. Tests might fail 
+        DEBUGPRINT1A("IsTestPsKeyDefined ERROR :: Could not retrieve property value)");
+        }
+    return testPsKeyDefined;
+    }
 
 
 CSimRefAdaptationTimer::CSimRefAdaptationTimer():CTimer(CActive::EPriorityUserInput)
--- a/sysstatemgmt/systemstateplugins/adptplugin/src/stateadaptationref.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/adptplugin/src/stateadaptationref.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -10,10 +10,21 @@
 //
 // Contributors:
 //
-// Description:
+// Description: This adaptation plugin implementation is for test/reference purposes.   
+// The loading of this plugin is controlled through test macro defined in the iby file "ssmcompatibility.iby".
+// If the macro "TEST_SSM_MACRO" is not defined, original plugins are loaded and this plugin is not loaded.
+// If the test P & S key is set in the test code, the calls are routed to the reference or dummy implementations.
+// Else the actual plugins are loaded and the calls are routed to the actual implementations.
+// The test P & S key which it looks for is KStateAdaptationPluginPropertyKey (0x2000D76A)
 //
 
+#include <e32property.h>
+#include <ssm/ssmstate.h>
 #include "stateadaptationref.h"
+#include "ssmdebug.h"
+
+const TUint32 KStateAdaptationPluginPropertyKey = 0x2000D76A;
+const TUid KPropertyCategory={0x2000D75B};
 
 /**
 Static method to create new State Adaptation Plugin.
@@ -40,6 +51,7 @@
 CStateAdaptationRef::~CStateAdaptationRef()
 	{
 	delete iTimer;
+	iSaaStateAdaptationLib.Close();
 	}
 
 CStateAdaptationRef::CStateAdaptationRef()
@@ -48,6 +60,10 @@
 
 void CStateAdaptationRef::ConstructL()
 	{
+    DEBUGPRINT1A("Loading Actual plugins");
+    _LIT(KSaaStateAdaptationDLL, "saastateadaptation.dll");
+    User::LeaveIfError(iSaaStateAdaptationLib.Load(KSaaStateAdaptationDLL));
+    iSaaStateAdaptationDll = (MStateAdaptation *)(iSaaStateAdaptationLib.Lookup(1)()); 
 	iTimer = CStateRefAdaptationTimer::NewL();
 	}
 
@@ -57,39 +73,84 @@
 	delete this;
 	}
 
-void CStateAdaptationRef::RequestCoopSysStateChange(TSsmState /*aState*/, TRequestStatus& aStatus)
+void CStateAdaptationRef::RequestCoopSysStateChange(TSsmState aState, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	User::RequestComplete(status, KErrNone);
+	if(!IsTestPsKeyDefined())
+	    {
+	    DEBUGPRINT1A("RequestCoopSysStateChange:: Calling Actual plugins functions (saastateadaptation.dll)");
+	    iSaaStateAdaptationDll->RequestCoopSysStateChange(aState, aStatus);
+	    }
+	else
+	    {
+	    DEBUGPRINT1A("RequestCoopSysStateChange:: Calling ref plugins functions (stateadaptationref.dll)");
+	    aStatus = KRequestPending;
+	    TRequestStatus* status = &aStatus;
+	    User::RequestComplete(status, KErrNone);
+	    }
 	}
 
 void CStateAdaptationRef::RequestCoopSysSelfTest(TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	User::RequestComplete(status, KErrNone);
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("RequestCoopSysSelfTest:: Calling Actual plugins functions (saastateadaptation.dll)");
+        iSaaStateAdaptationDll->RequestCoopSysSelfTest(aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("RequestCoopSysSelfTest:: Calling ref plugins functions (stateadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, KErrNone);
+        }
 	}
 
-void CStateAdaptationRef::RequestCoopSysPerformRestartActions(TInt /*aReason*/, TRequestStatus& aStatus)
+void CStateAdaptationRef::RequestCoopSysPerformRestartActions(TInt aReason, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	User::RequestComplete(status, KErrNone);
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("RequestCoopSysPerformRestartActions:: Calling Actual plugins functions (saastateadaptation.dll)");
+        iSaaStateAdaptationDll->RequestCoopSysPerformRestartActions(aReason, aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("RequestCoopSysPerformRestartActions:: Calling ref plugins functions (stateadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, KErrNone);
+        }
 	}
 
-void CStateAdaptationRef::RequestCoopSysPerformShutdownActions(TInt /*aReason*/, TRequestStatus& aStatus)
+void CStateAdaptationRef::RequestCoopSysPerformShutdownActions(TInt aReason, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	User::RequestComplete(status, KErrNone);
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("RequestCoopSysPerformShutdownActions:: Calling Actual plugins functions (saastateadaptation.dll)");
+        iSaaStateAdaptationDll->RequestCoopSysPerformShutdownActions(aReason, aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("RequestCoopSysPerformShutdownActions:: Calling ref plugins functions (stateadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, KErrNone);
+        }
 	}
 
-void CStateAdaptationRef::RequestCoopSysPerformRfsActions(TSsmRfsType /*aRfsType*/, TRequestStatus& aStatus)
+void CStateAdaptationRef::RequestCoopSysPerformRfsActions(TSsmRfsType aRfsType, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	TRequestStatus* status = &aStatus;
-	User::RequestComplete(status, KErrNone);
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("RequestCoopSysPerformRfsActions:: Calling Actual plugins functions (saastateadaptation.dll)");
+        iSaaStateAdaptationDll->RequestCoopSysPerformRfsActions(aRfsType, aStatus);
+        }
+    else
+        {
+        DEBUGPRINT1A("RequestCoopSysPerformRfsActions:: Calling ref plugins functions (stateadaptationref.dll)");
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, KErrNone);
+        }
 	}
 
 /**
@@ -98,10 +159,16 @@
 */
 void CStateAdaptationRef::RequestCancel()
 	{
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("RequestCancel:: Calling Actual plugins functions (saastateadaptation.dll)");
+        iSaaStateAdaptationDll->RequestCancel();
+        }
 	}
 
 /**
-  The reference implementation completes with KErrNotSupported since there isn't a Cooperating System on HRP/Techview.
+  The reference implementation completes with KErrNotSupported. This is required for automated testing.
+  Actual plugins return expected values and this can be verified by manual testing
   On a device, State Adaptation Plug-in would request for notification from the Cooperating System for 'aEvent'.
   
   The above mentioned implementation is modified to facilitate testing and increase the code coverage of the Adaptation 
@@ -120,8 +187,22 @@
 */
 void CStateAdaptationRef::NotifyCoopSysEvent(TDes8& /*aEvent*/, TRequestStatus& aStatus)
 	{
-	aStatus = KRequestPending;
-	iTimer->After(2000000,aStatus);
+	if(!IsTestPsKeyDefined())
+        {
+        /* Only ssmpowersup.dll has an outstanding request. If this is passed to the actual plugin, the
+        request will never complete till a power event happens. This would add the test code requests in a queue
+        and the test code waits indefinitely. Hence, complete the request with KErrServerTerminated. This would free 
+        the queue for test code to be executed. It has not impact on the test environment */
+        aStatus = KRequestPending;
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, KErrServerTerminated);
+        }
+    else
+        {
+        DEBUGPRINT1A("NotifyCoopSysEvent:: Calling ref plugins functions (stateadaptationref.dll)");
+        aStatus = KRequestPending;
+        iTimer->After(2000000,aStatus);
+        }
 	}
 
 /**
@@ -130,13 +211,36 @@
 */
 void CStateAdaptationRef::NotifyCancel()
 	{
-	if(iTimer->IsActive())
-		{
-		iTimer->Cancel();			
-		}	
+	if(!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("NotifyCancel:: Calling Actual plugins functions (saastateadaptation.dll)");
+        iSaaStateAdaptationDll->NotifyCancel();
+        }
+    else
+        {
+        DEBUGPRINT1A("NotifyCancel:: Calling ref plugins functions (stateadaptationref.dll)");
+        if(iTimer->IsActive())
+            {
+            iTimer->Cancel();
+            }
+        }
 	}
 
-
+/**
+    Helper function to check for P&S Key
+*/
+TBool CStateAdaptationRef::IsTestPsKeyDefined()
+    {
+    TBool testPsKeyDefined = EFalse;
+    TInt result = RProperty::Get(KPropertyCategory, KStateAdaptationPluginPropertyKey, testPsKeyDefined);
+    DEBUGPRINT3(_L("KStateAdaptationPluginPropertyKey %d Error %d"), testPsKeyDefined, result);
+    if ((KErrNone != result) && (KErrNotFound != result))
+        {
+        //Could not retrieve property value. Tests might fail 
+        DEBUGPRINT1A("IsTestPsKeyDefined ERROR :: Could not retrieve property value)");
+        }
+    return testPsKeyDefined;
+    }
 
 CStateRefAdaptationTimer::CStateRefAdaptationTimer():CTimer(CActive::EPriorityUserInput)
 	{
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndsystemwideproperty.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndsystemwideproperty.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// 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 @@
  @internalComponent
 */
 
+#include "ssmdebug.h"
 #include "cndsystemwideproperty.h"
 #include <ssm/ssmsystemwideproperty.h>
 
@@ -48,8 +49,9 @@
   
     RSsmSystemWideProperty property;
 	User::LeaveIfError(property.Connect(iKey));
-	User::LeaveIfError(property.GetValue(value));
-	property.Close();
+	CleanupClosePushL(property);
+
+	SSMLOGLEAVEIFERROR(property.GetValue(value));
 	
     TBool retVal = EFalse;
     if (iConditionCheckType == ECompareValue)
@@ -60,5 +62,7 @@
         {
         retVal = ((value & iCndValue) == iCndValue);
         }
+
+	CleanupStack::PopAndDestroy(&property);
     return retVal;
     }
--- a/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyfail.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyfail.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,7 +16,7 @@
 #ifdef WINS
 TARGET			ssm.state.policy.0003.dll
 #else
-TARGET			ssm.state.policy.hw.0003.dll
+TARGET			ssm.refrence.state.policy.hw.0003.dll
 #endif
 TARGETTYPE		dll
 UID				0x2000D75D 0x20010330
--- a/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicynormal.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicynormal.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
--- a/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyshutdown.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyshutdown.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,7 +16,7 @@
 #ifdef WINS
 TARGET			ssm.state.policy.0002.dll
 #else
-TARGET			ssm.state.policy.hw.0002.dll
+TARGET			ssm.refrence.state.policy.hw.0002.dll
 #endif
 TARGETTYPE		dll
 UID				0x2000D75D 0x2001032D
--- a/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicystartup.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicystartup.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,7 +16,7 @@
 #ifdef WINS
 TARGET			ssm.state.policy.0000.dll
 #else
-TARGET			ssm.state.policy.hw.0000.dll
+TARGET			ssm.refrence.state.policy.hw.0000.dll
 #endif
 TARGETTYPE		dll
 UID				0x2000D75D 0x2000D75F
@@ -58,14 +58,6 @@
 TARGETPATH		/private/2000d75b/startup/8
 END
 
-// Launch 'sysstart.exe' if startup resource is not found. If 'sysstart.exe' fails, launch 'sysagt2svr.exe' and 'wserv.exe'
-// resource file to fallback to 'sysstart.exe'
-// resource file path format : "z:/private/<SID of SSM>/startup/fallback/"
-SOURCEPATH		../resource/wins
-START RESOURCE	fallbacktosysstart.rss
-TARGETPATH		/private/2000d75b/startup/fallback
-END
-
 #else	//for hardware//
 
 SOURCEPATH		../resource/armv5
--- a/sysstatemgmt/systemstateplugins/gsapolicy/group/sspluginsgsa.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/gsapolicy/group/sspluginsgsa.iby	Tue Aug 31 16:29:05 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"
@@ -17,45 +17,27 @@
 #ifndef __SSPLUGINSGSA_IBY__
 #define __SSPLUGINSGSA_IBY__
 
-file=ABI_DIR\BUILD_DIR\ssm.state.policy.hw.0000.dll		sys\bin\ssm.state.policy.0000.dll
 file=ABI_DIR\BUILD_DIR\ssm.state.policy.0001.dll		sys\bin\ssm.state.policy.0001.dll
-file=ABI_DIR\BUILD_DIR\ssm.state.policy.hw.0002.dll		sys\bin\ssm.state.policy.0002.dll
-file=ABI_DIR\BUILD_DIR\ssm.state.policy.hw.0003.dll		sys\bin\ssm.state.policy.0003.dll
 
-// rsc files for the rom
-data=EPOCROOT##epoc32\data\z\private\2000d75b\startup\fallback\fallbacktosysstart_target.rsc		private\2000d75b\startup\fallback\fallbacktosysstart.rsc
 
 data=EPOCROOT##epoc32\data\z\private\2000d75b\normal\gsanormalcmdlist.rsc		private\2000d75b\normal\gsanormalcmdlist.rsc
+
+// If it is NCP image that is being made (_IMAGE_TYPE_NCP defined)then NCP ssm.state.policy is used. which 
+// is used for textshell mode only.
+#if defined(_IMAGE_TYPE_NCP)
+file=ABI_DIR\BUILD_DIR\ssm.refrence.state.policy.hw.0000.dll		sys\bin\ssm.state.policy.0000.dll
+file=ABI_DIR\BUILD_DIR\ssm.refrence.state.policy.hw.0002.dll		sys\bin\ssm.state.policy.0002.dll
+file=ABI_DIR\BUILD_DIR\ssm.refrence.state.policy.hw.0003.dll		sys\bin\ssm.state.policy.0003.dll
+
 data=EPOCROOT##epoc32\data\z\private\2000d75b\shutdown\gsashutdowncmdlist.rsc		private\2000d75b\shutdown\gsashutdowncmdlist.rsc
 data=EPOCROOT##epoc32\data\z\private\2000d75b\fail\gsafailcmdlist.rsc			private\2000d75b\fail\gsafailcmdlist.rsc
 
+#endif //_IMAGE_TYPE_NCP
 REM Simple startup configuration - install a single resource file 
 REM as the default "mode 0" file.
-REM Note this is a Techview specific way of including just the 
-REM SCL required in the ROM. Licensees are expected to include more 
-REM than one SCL in their devices.
 
-REM If _STARTUPMODE, _STARTUPMODE1, _STARTUPMODE2 etc. are defined
-REM then SysStart fallback should be used so no SCL rss files will be included
-REM thus forcing the startup policy to use 
 REM The macro for selecting SCL lists is _SSMSTARTUPMODE
 
-#if (defined(_STARTUPMODE) || \
-	defined(_STARTUPMODE0) || \
-	defined(_STARTUPMODE1) || \
-	defined(_STARTUPMODE2) || \
-	defined(_STARTUPMODE3) || \
-	defined(_STARTUPMODE4) || \
-	defined(_STARTUPMODE5) || \
-	defined(_STARTUPMODE8))
-
-REM SysStart startup mode defines found, using SysStart startup
-WARNING "Use _SSMSTARTUPMODE instead of _STARTUPMODE as it is deprecated."
-WARNING "_STARTUPMODE can only be used for testing fallback on SysStart by including sysstart.iby and sysstartconfig.iby in buildrom command " 
-
-#else
-
-REM No legacy SysStart startup mode defines found, using SSM startup
 #ifdef _SSMSTARTUPMODE
 
 define _2000D75B_MODE _SSMSTARTUPMODE
@@ -83,6 +65,4 @@
 
 #endif // SSMA_MINIMAL_BOOT
 
-#endif // Legacy SysStart mode defines not found
-
 #endif // __SSPLUGINSGSA_IBY__
--- a/sysstatemgmt/systemstateplugins/test/tappgsapolicy/resource/sspluginstest_tappgsapolicy.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tappgsapolicy/resource/sspluginstest_tappgsapolicy.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -22,8 +22,8 @@
 
 NAME STAG
 
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
+#include <eikon.rh>
+#include <eikon.rsg>
 
 RESOURCE RSS_SIGNATURE { }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tcmncustomcmd/group/sspluginstest_tcmncustomcmd.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,33 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SspluginsCmnCustomcmdTests EN"}
+
+; Vendor name
+: "SspluginsCmnCustomcmdTests"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tcmncustomcmd\scripts\sspluginstest_cmncustomcmd_rendezvouswithestart.script"-"c:\devicesrv\sspluginstest\sspluginstest_cmncustomcmd_rendezvouswithestart.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tcmncustomcmd\scripts\sspluginstest_cmncustomcmd_persistreboots.script"-"c:\devicesrv\sspluginstest\sspluginstest_cmncustomcmd_persistreboots.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tcmncustomcmd\scripts\sspluginstest_cmncustomcmd_cancelmonitoring.script"-"c:\devicesrv\sspluginstest\sspluginstest_cmncustomcmd_cancelmonitoring.script"
+
+
+
--- a/sysstatemgmt/systemstateplugins/test/testapps/group/gsatestappgood.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/testapps/group/gsatestappgood.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,7 +27,7 @@
 USERINCLUDE   	../inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE	/epoc32/include/techview
+MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY     euser.lib 
 LIBRARY		apparc.lib 
--- a/sysstatemgmt/systemstateplugins/test/testapps/src/gsatestappgood_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/testapps/src/gsatestappgood_reg.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="gsatestappgood";
 	}
-	
\ No newline at end of file
+
--- a/sysstatemgmt/systemstateplugins/test/tintadptplugin/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -33,10 +33,12 @@
 
 PRJ_TESTMMPFILES
 tiadaptation_plugin.mmp
+definetestps.mmp
 
 
 PRJ_TESTEXPORTS
 sspluginstest_i_adaptation.iby			/epoc32/rom/include/sspluginstest_i_adaptation.iby
+definetestps.iby						/epoc32/rom/include/definetestps.iby
 
 // batch files for emulator / hardware test execution
 ../scripts/sspluginstest_adaptation_i_run.bat			/epoc32/data/z/sspluginstest/sspluginstest_adaptation_i_run.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/group/definetestps.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,23 @@
+// 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:
+//
+
+#ifndef __DEFINETEST_IBY__
+#define __DEFINETEST_IBY__
+
+file=ABI_DIR\BUILD_DIR\definetestps.exe	sys\bin\definetestps.exe
+
+data=EPOCROOT##epoc32\data\Z\private\10003a3f\apps\definetestps_reg.rsc	private\10003a3f\apps\definetestps_reg.rsc
+
+#endif // __DEFINETEST_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/group/definetestps.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,51 @@
+// 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:
+//
+
+TARGET			definetestps.exe
+TARGETTYPE		exe
+CAPABILITY		WriteDeviceData
+
+UID           	0x100039CE 0x200315B2
+VENDORID 		0x70000001
+
+//Secure id of sysstatemgr.exe
+SECUREID		0x2000D75B
+
+SOURCEPATH    	../src
+SOURCE        	definetestps.cpp
+
+USERINCLUDE   	.
+USERINCLUDE   	../inc
+
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+MW_LAYER_SYSTEMINCLUDE  
+
+
+// Registration file
+SOURCEPATH    	../src
+START RESOURCE	definetestps_reg.rss
+TARGETPATH		/private/10003a3f/apps
+END
+
+LIBRARY     euser.lib
+LIBRARY		apparc.lib
+LIBRARY		apgrfx.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		ssmuiproviderdll.lib
+
+SMPSAFE
--- a/sysstatemgmt/systemstateplugins/test/tintadptplugin/group/sspluginstest_i_adaptation.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/group/sspluginstest_i_adaptation.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,6 +16,8 @@
 #ifndef __SSPLUGINSTEST_I_ADAPTATION_IBY__
 #define __SSPLUGINSTEST_I_ADAPTATION_IBY__
 
+#include <definetestps.iby>
+
 // test server
 data=ABI_DIR\DEBUG_DIR\tiadaptation_plugin.exe			sys\bin\tiadaptation_plugin.exe
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/group/sspluginstest_i_tadaptation.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,35 @@
+;
+; 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: 
+;
+
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"SspluginsiAdaptationTests EN"}
+
+; Vendor name
+: "SspluginsiAdaptationTests"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tintadptplugin\scripts\sspluginstest_adaptation_i_emergency.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_i_emergency.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tintadptplugin\scripts\sspluginstest_adaptation_i_misc.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_i_misc.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tintadptplugin\scripts\sspluginstest_adaptation_i_rtc.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_i_rtc.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tintadptplugin\scripts\sspluginstest_adaptation_i_sim.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_i_sim.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tintadptplugin\scripts\sspluginstest_adaptation_i_state.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_i_state.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tintadptplugin\scripts\sspluginstest_adaptation_i_statenotify.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_i_statenotify.script"
+
+
--- a/sysstatemgmt/systemstateplugins/test/tintadptplugin/group/tiadaptation_plugin.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/group/tiadaptation_plugin.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,9 @@
 UID				0x1000007A 0x10285A52	
 VENDORID		0x70000001
 
+//Secure id of sysstatemgr.exe
+SECUREID		0x2000D75B
+
 CAPABILITY 		PowerMgmt ReadDeviceData WriteDeviceData ProtServ SwEvent ReadUserData WriteUserData DiskAdmin
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/inc/definetestps.h	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,76 @@
+// 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: This is the header file for "DefineTestPs" app. This app is used to define the P & S keys required for activating the reference plugins.
+//
+
+/**
+ @file
+ @test
+ @internalComponent - Internal Symbian test code
+*/
+
+#ifndef __DEFINETESTPS_H
+#define __DEFINETESTPS_H
+
+/**
+Application class
+*/
+#include <eikapp.h>
+class CTestApplication : public CEikApplication
+	{
+public:
+	static CApaApplication* NewApplication();
+	~CTestApplication();
+	
+private:
+	CTestApplication();
+	
+	// from CApaApplication
+	TUid AppDllUid() const;
+	CApaDocument* CreateDocumentL();
+	};
+
+/**
+Document class
+*/
+#include <eikdoc.h>
+class CEikAppUi;
+class CEikApplication;
+class CTestDocument : public CEikDocument
+	{
+public:
+	static CTestDocument* NewL(CEikApplication& aApp);
+	~CTestDocument();
+	
+private:
+	CTestDocument(CEikApplication& aApp);
+	
+	// from CEikDocument
+	CEikAppUi* CreateAppUiL();
+	};
+
+/**
+Application UI class, root of all graphical user interface in this application
+*/
+#include <eikappui.h>
+class CTestAppUi : public CEikAppUi
+    {
+public:
+	CTestAppUi();
+	~CTestAppUi();
+	
+	// from CEikAppUi
+	void ConstructL();
+	};
+
+#endif // __DEFINETESTPS_H
--- a/sysstatemgmt/systemstateplugins/test/tintadptplugin/inc/ti_adaptationplugin_stepbase.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/inc/ti_adaptationplugin_stepbase.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,14 @@
 #include <test/testexecutestepbase.h>
 #include <ssm/ssmadaptationcli.h>
 
+//for define, set and unset of P&S keys.
+const TUint32 KEmergencyCallRfAdaptationPluginPropertyKey = 0x2000E657;
+const TUint32 KStateAdaptationPluginPropertyKey = 0x2000D76A;
+const TUint32 KRtcAdaptationPluginPropertyKey = 0x2000D76C;
+const TUint32 KSimPluginPropertyKey = 0x2000D76B;
+const TUint32 KMiscPluginPropertyKey = 0x2000E658;
+
+const TUid KPropertyCategory={0x2000D75B};
 
 class CTestAdaptStep : public CTestStep
 	{
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/definetestps.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,154 @@
+// 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: This app is used to define the P & S keys required for activating the reference plugins.
+//
+
+/**
+ @file
+ @test
+ @internalComponent - Internal Symbian test code
+*/
+
+#include <eikstart.h> 
+#include <eikapp.h>
+#include <e32property.h>
+#include "definetestps.h"
+#include "ti_adaptationplugin_stepbase.h"
+
+
+/**
+Standard DLL entry point function.
+Creates and returns an instance of the CApaApplication-derived class.
+@return an instance of the CApaApplication-derived class
+*/
+TInt E32Main()
+	{
+	return EikStart::RunApplication( CTestApplication::NewApplication );
+	}
+
+CTestApplication::CTestApplication()
+	{
+	}
+
+CTestApplication::~CTestApplication()
+	{
+ 	}
+		
+/**
+@return The application's UID 
+*/
+TUid CTestApplication::AppDllUid() const
+	{
+	const TUid dll = {0x200315B2};
+	return dll;
+	}
+
+/**
+@return CTestApplication or NULL if KErrNoMemory
+*/
+CApaApplication* CTestApplication::NewApplication()
+	{
+	// As the framework has at this point not started up enough, and therefore the TRAP-harness and 
+	// exception handlers aren’t available yet, this factory function is a non-leaving function and 
+	// can't use the new(Eleave) operator.
+	return new CTestApplication();
+	}
+	
+/**
+Called by the UI framework at application start-up to create an instance of the document class.
+@leave	KErrNoMemory
+@return A CTestDocument
+*/
+CApaDocument* CTestApplication::CreateDocumentL()
+	{
+	return CTestDocument::NewL(*this);
+	}
+
+CTestDocument::CTestDocument(CEikApplication& aApp) : CEikDocument(aApp)
+	{
+	}
+
+CTestDocument::~CTestDocument()
+	{
+	}
+
+/**
+Factory function for this class
+@return a new CEndTaskTestDocument instance.
+*/
+CTestDocument* CTestDocument::NewL(CEikApplication& aApp)
+	{
+	return new(ELeave) CTestDocument(aApp);
+	}
+
+
+/**
+Called by the UI framework to construct the application UI class. 
+Note that the app UI's ConstructL() is called by the UI framework.
+*/
+CEikAppUi* CTestDocument::CreateAppUiL()
+	{
+	return new(ELeave) CTestAppUi();
+	}
+
+CTestAppUi::CTestAppUi()
+	{
+	}
+
+CTestAppUi::~CTestAppUi()
+	{
+	}
+
+void CTestAppUi::ConstructL()
+	{
+	//This appplication is used to define the property for using dummy plugins. Uid3 of the application should be 
+	//same as the SSM's Secure Id. 
+	
+	
+	//Define the property for using Dummy plugins.
+	TInt result = KErrNone;
+	result = RProperty::Define(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, RProperty::EInt);
+	if ((KErrNone != result) && (KErrAlreadyExists !=result))
+        {
+        User::Leave(result);            
+        }
+	
+	
+	result = RProperty::Define(KPropertyCategory, KStateAdaptationPluginPropertyKey, RProperty::EInt);
+	if ((KErrNone != result) && (KErrAlreadyExists !=result))
+        {
+        User::Leave(result);            
+        }	
+	
+    result = RProperty::Define(KPropertyCategory, KRtcAdaptationPluginPropertyKey, RProperty::EInt);
+	if ((KErrNone != result) && (KErrAlreadyExists !=result))
+        {
+        User::Leave(result);            
+        }    
+
+    result = RProperty::Define(KPropertyCategory, KSimPluginPropertyKey, RProperty::EInt);
+	if ((KErrNone != result) && (KErrAlreadyExists !=result))
+        {
+        User::Leave(result);            
+        }   
+
+    result = RProperty::Define(KPropertyCategory, KMiscPluginPropertyKey, RProperty::EInt);
+	if ((KErrNone != result) && (KErrAlreadyExists !=result))
+        {
+        User::Leave(result);            
+        }
+	
+	RProcess::Rendezvous(KErrNone);
+	// Complete the UI framework's construction of the App UI.
+	BaseConstructL(CEikAppUi::ENoAppResourceFile);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/definetestps_reg.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,33 @@
+// 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: This is the registration resource file for "DefineTestPs" app. This app is used 
+// to define the P & S keys required for activating the reference plugins.
+//
+
+/**
+ @file
+ @test
+ @internalComponent - Internal Symbian test code
+*/
+
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x200315B2
+
+RESOURCE APP_REGISTRATION_INFO
+	{
+	// filename of application binary (minus extension)
+	app_file="definetestps";
+	newfile = KAppDoesNotSupportNewFile;
+	}
--- a/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/temergencycallrf_adaptationplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/temergencycallrf_adaptationplugin_step.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -157,10 +157,9 @@
 TInt RTestSsmEmergencyCallRfAdaptation::CleanupAdaptations()
 	{
 	TInt ret = KErrNone;
-	if(Handle())
-		{
-		ret =  SendReceive(EDebugCleanupAdaptations);
-		}
+	// Since actual plugins are being used, they cannot be unloaded.
+	// Hence return without doing anything. There will be HeapMarkEnd to check that
+	// memory is not leaked.
 	return ret;
 	}
 
--- a/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/ti_adaptationplugin_stepbase.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/ti_adaptationplugin_stepbase.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -21,6 +21,9 @@
 #include "ti_adaptationplugin_stepbase.h"
 
 #include <e32debug.h>
+#include <e32property.h>
+
+_LIT (KExeToDefineTestPS, "\\sys\\bin\\definetestps.exe");
 
 static TInt StopScheduler(TAny* aTestAdaptStep)
 	{
@@ -51,6 +54,41 @@
 
 TVerdict CTestAdaptStep::doTestStepPreambleL()
 	{
+	RProcess processHandle;
+	CleanupClosePushL(processHandle);
+	
+	//Start the test exe which defines property keys for loading reference plugins
+	    
+	TInt err = processHandle.Create(KExeToDefineTestPS, KNullDesC);
+	INFO_PRINTF2(_L("Process creation returned : %d"), err);
+	User::LeaveIfError(err);
+	processHandle.Resume();
+	
+    // wait for the newly created process to rendezvous
+    TRequestStatus status;
+    processHandle.Rendezvous(status);
+    User::WaitForRequest(status);
+    TInt retVal = status.Int();
+    INFO_PRINTF2(_L("iStatus.Int() returned : %d"), retVal);
+    TEST(KErrNone == retVal);
+    CleanupStack::PopAndDestroy();
+    
+	// Set all the property keys
+	err = RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 1);
+	TEST(KErrNone == err);
+	
+	err = RProperty::Set(KPropertyCategory, KStateAdaptationPluginPropertyKey, 1);
+	TEST(KErrNone == err);
+	
+	err = RProperty::Set(KPropertyCategory, KRtcAdaptationPluginPropertyKey, 1);
+	TEST(KErrNone == err);
+	
+	err = RProperty::Set(KPropertyCategory, KSimPluginPropertyKey, 1);
+	TEST(KErrNone == err);
+	
+	err = RProperty::Set(KPropertyCategory, KMiscPluginPropertyKey, 1);
+	TEST(KErrNone == err);
+	
 	INFO_PRINTF1(_L("Starting the scheduler in CTestEmergencyAdaptStep::doTestStepPreambleL ..."));
 	iActiveScheduler = new(ELeave) CActiveScheduler;
 	CActiveScheduler::Install (iActiveScheduler);
@@ -65,5 +103,22 @@
 /** */
 TVerdict CTestAdaptStep::doTestStepPostambleL()
 	{
+	//Unset all the PandS keys
+	TInt err = RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 0); 
+	TEST(KErrNone == err);
+	
+	err = RProperty::Set(KPropertyCategory, KStateAdaptationPluginPropertyKey, 0);
+	TEST(KErrNone == err);
+	
+	err = RProperty::Set(KPropertyCategory, KRtcAdaptationPluginPropertyKey, 0);
+	TEST(KErrNone == err);
+	
+	err = RProperty::Set(KPropertyCategory, KSimPluginPropertyKey, 0);
+	TEST(KErrNone == err);
+
+	err = RProperty::Set(KPropertyCategory, KMiscPluginPropertyKey, 0);
+	TEST(KErrNone == err);
+	
+	
 	return CTestStep::doTestStepPostambleL();
 	}
--- a/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/tmisc_adaptationplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/tmisc_adaptationplugin_step.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -199,10 +199,9 @@
 TInt RTestSsmMiscAdaptation::CleanupAdaptations()
 	{
 	TInt ret = KErrNone;
-	if(Handle())
-		{
-		ret =  SendReceive(EDebugCleanupAdaptations);
-		}
+    // Since actual plugins are being used, they cannot be unloaded.
+    // Hence return without doing anything. There will be HeapMarkEnd to check that
+    // memory is not leaked.
 	return ret;
 	}
 
--- a/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/trtc_adaptationplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/trtc_adaptationplugin_step.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -165,10 +165,9 @@
 TInt RTestSsmRtcAdaptation::CleanupAdaptations()
 	{
 	TInt ret = KErrNone;
-	if(Handle())
-		{
-		ret =  SendReceive(EDebugCleanupAdaptations);
-		}
+    // Since actual plugins are being used, they cannot be unloaded.
+    // Hence return without doing anything. There will be HeapMarkEnd to check that
+    // memory is not leaked.
 	return ret;
 	}
 
--- a/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/tsim_adaptationplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/tsim_adaptationplugin_step.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,10 +162,9 @@
 TInt RTestSsmSimAdaptation::CleanupAdaptations()
 	{
 	TInt ret = KErrNone;
-	if(Handle())
-		{
-		ret =  SendReceive(EDebugCleanupAdaptations);
-		}
+    // Since actual plugins are being used, they cannot be unloaded.
+    // Hence return without doing anything. There will be HeapMarkEnd to check that
+    // memory is not leaked.
 	return ret;
 	}
 
--- a/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/tstate_adaptationplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintadptplugin/src/tstate_adaptationplugin_step.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -176,10 +176,9 @@
 TInt RTestSsmStateAdaptation::CleanupAdaptations()
 	{
 	TInt ret = KErrNone;
-	if(Handle())
-		{
-		ret =  SendReceive(EDebugCleanupAdaptations);
-		}
+    // Since actual plugins are being used, they cannot be unloaded.
+    // Hence return without doing anything. There will be HeapMarkEnd to check that
+    // memory is not leaked.
 	return ret;
 	}
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tintconditionevaluator/group/sspluginstest_tintconditionevaluator.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,28 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Ssplugins_tintconditionevaluator EN"}
+
+; Vendor name
+: "Ssplugins_tintconditionevaluator"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tintconditionevaluator\scripts\sspluginstest_conditionevaluator_evaluate.script"-"c:\devicesrv\sspluginstest\sspluginstest_conditionevaluator_evaluate.script"
+
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -24,8 +24,6 @@
 
 PRJ_TESTMMPFILES
 tgsastatetranfromnormal.mmp
-tgsastatetranfromshutdown.mmp
-tgsastatetrantoshutdown.mmp
 tgsastatetranfromstartup.mmp
 tgsa_i_server.mmp
 
@@ -54,13 +52,8 @@
 ../scripts/sspluginstest_tgsa_i_checkepocwind_1.bat /epoc32/release/winscw/urel/z/sspluginstest/sspluginstest_tgsa_i_checkepocwind.bat
 
 #endif //SYMBIAN_SSM_FLEXIBLE_MERGE
-
-
-../scripts/sspluginstest_statetrantoshutdown.script		z:/sspluginstest/sspluginstest_statetrantoshutdown.script
-../scripts/sspluginstest_statetranfromshutdown.script	z:/sspluginstest/sspluginstest_statetranfromshutdown.script
 ../scripts/sspluginstest_statetranfromnormal.script		z:/sspluginstest/sspluginstest_statetranfromnormal.script
 ../scripts/sspluginstest_statetranfromstartup.script		z:/sspluginstest/sspluginstest_statetranfromstartup.script
-../scripts/sspluginstest_statetranfromstartuptoshutdown.script		z:/sspluginstest/sspluginstest_statetranfromstartuptoshutdown.script
 ../scripts/sspluginstest_duplicatesubstate.script		z:/sspluginstest/sspluginstest_duplicatesubstate.script
 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
 ../scripts/sspluginstest_fleximergediffsubstate.script		z:/sspluginstest/sspluginstest_fleximergediffsubstate.script
@@ -71,8 +64,9 @@
 
 //iby files
 fleximergediffsubstate.iby			/epoc32/rom/include/fleximergediffsubstate.iby
-fleximergemanyfiles.iby			/epoc32/rom/include/fleximergemanyfiles.iby
+fleximergemanyfiles.iby				/epoc32/rom/include/fleximergemanyfiles.iby
 fleximergesamesubstate.iby			/epoc32/rom/include/fleximergesamesubstate.iby
 fleximergesortdifffile.iby			/epoc32/rom/include/fleximergesortdifffile.iby
 fleximergesortsamefile.iby			/epoc32/rom/include/fleximergesortsamefile.iby
+teststatetransition.iby				/epoc32/rom/include/teststatetransition.iby
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/teststatetransition.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,31 @@
+// 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:
+// Iby to export exes, rscs and scripts related to state transition from startup and normal states. 
+
+#ifndef __TESTSTATETRANSITION_IBY__
+#define __TESTSTATETRANSITION_IBY__
+
+//server
+data=ABI_DIR\DEBUG_DIR\tgsa_i_server.exe					sys\bin\tgsa_i_server.exe
+data=ABI_DIR\DEBUG_DIR\tgsastatetranfromnormal.exe			sys\bin\tgsastatetranfromnormal.exe
+data=ABI_DIR\DEBUG_DIR\tgsastatetranfromstartup.exe			sys\bin\tgsastatetranfromstartup.exe
+
+// script files
+data=DATAZ_\sspluginstest\sspluginstest_statetranfromnormal.script	\sspluginstest\sspluginstest_statetranfromnormal.script
+data=DATAZ_\sspluginstest\sspluginstest_statetranfromstartup.script	\sspluginstest\sspluginstest_statetranfromstartup.script
+
+//rsc files
+data=MULTI_LINGUIFY(RSC EPOCROOT##epoc32\data\z\private\2000d75b\test\tgsa_statetransition		private\2000d75b\startup\0\tgsa_statetransition)
+
+#endif // __TESTSTATETRANSITION_IBY__
\ No newline at end of file
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsa_i_server.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsa_i_server.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -31,6 +31,7 @@
 USERINCLUDE		../inc
 USERINCLUDE		../../../gsapolicy/inc
 USERINCLUDE		../../../localinc
+USERINCLUDE		../../../../inc
 
 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
 USERINCLUDE 	../../testapps/inc
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsastatetranfromnormal.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsastatetranfromnormal.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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,12 +22,10 @@
 UID           	0xA0009DF5
 VENDORID 		0x70000001
 
-#if defined(WINS)
 SOURCEPATH			../resource
-START RESOURCE		tgsa_statetranfromnormal.rss
+START RESOURCE		tgsa_statetransition.rss
 TARGETPATH			/private/2000d75b/test
 END
-#endif
 
 SOURCEPATH    	../src
 SOURCE			tgsastatetran_base.cpp
@@ -35,6 +33,7 @@
 
 USERINCLUDE   	.
 USERINCLUDE   	../inc
+USERINCLUDE		../../../../inc
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsastatetranfromshutdown.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-// Copyright (c) 2008-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:
-//
-
-TARGET			tgsastatetranfromshutdown.exe
-TARGETTYPE		exe
-TARGETPATH		/sys/bin
-
-CAPABILITY  	PowerMgmt
-
-UID           	0xA0009DF3
-VENDORID 		0x70000001
-
-#if defined(WINS)
-SOURCEPATH			../resource
-START RESOURCE		tgsa_statetranfromshutdown.rss
-TARGETPATH			/private/2000d75b/test
-END
-#endif
-
-SOURCEPATH    	../src
-SOURCE			tgsastatetran_base.cpp
-SOURCE        	tgsastatetranfromshutdown.cpp
-
-USERINCLUDE   	.
-USERINCLUDE   	../inc
-
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-LIBRARY     	euser.lib ssmcmn.lib efsrv.lib  estor.lib 
-
-
-
-
-
-
-
-
-
-SMPSAFE
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsastatetranfromstartup.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsastatetranfromstartup.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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,25 +22,18 @@
 UID           	0xA000A180
 VENDORID 		0x70000001
 
-#if defined(WINS)
-SOURCEPATH			../resource
-START RESOURCE		tgsa_statetranfromstartup.rss
-TARGETPATH			/private/2000d75b/test
-END
-
-SOURCEPATH			../resource
-START RESOURCE		tgsa_statetranfromstartuptoshutdown.rss
-TARGETPATH			/private/2000d75b/test
-END
-
-#endif
-
 SOURCEPATH    	../src
 SOURCE			tgsastatetran_base.cpp
 SOURCE        	tgsastatetranfromstartup.cpp
 
+SOURCEPATH			../resource
+START RESOURCE		tgsa_statetransition.rss
+TARGETPATH			/private/2000d75b/test
+END
+
 USERINCLUDE   	.
 USERINCLUDE   	../inc
+USERINCLUDE		../../../../inc
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/group/tgsastatetrantoshutdown.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-// Copyright (c) 2008-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:
-//
-
-TARGET			tgsastatetrantoshutdown.exe
-TARGETTYPE		exe
-TARGETPATH		/sys/bin
-
-CAPABILITY  	PowerMgmt
-
-UID           	0xA0009DF4
-VENDORID 		0x70000001
-
-#if defined(WINS)
-SOURCEPATH			../resource
-START RESOURCE		tgsa_statetrantoshutdown.rss
-TARGETPATH			/private/2000d75b/test
-END
-#endif
-
-SOURCEPATH    	../src
-SOURCE			tgsastatetran_base.cpp
-SOURCE        	tgsastatetrantoshutdown.cpp
-
-USERINCLUDE   	.
-USERINCLUDE   	../inc
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-LIBRARY     	euser.lib ssmcmn.lib efsrv.lib  estor.lib 
-
-
-
-SMPSAFE
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/inc/tgsa_step_statetrantodiffstates.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/inc/tgsa_step_statetrantodiffstates.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -26,11 +26,8 @@
 #include <test/testexecutestepbase.h>
 #include <s32file.h>
 
-_LIT(KTGsaStateTranToShutdownStep,"GsaStateTranToShutdownStep");
-_LIT(KTGsaStateTranFromShutdownStep,"GsaStateTranFromShutdownStep");
 _LIT(KTGsaStateTranFromNormalStep,"GsaStateTranFromNormalStep");
 _LIT(KTGsaStateTranFromStartupStep,"GsaStateTranFromStartupStep");
-_LIT(KTGsaStateTranFromStartuptoShutdownStep,"GsaStateTranFromStartuptoShutdownStep");
 
 class CGsaStateTranToDiffStatesTest : public CTestStep
 	{
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_1.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_1.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_10.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_10.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_11.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_11.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_12.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_12.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_13.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_13.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_14.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_14.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_15.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_15.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_16.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_16.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_17.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_17.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_18.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_18.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_19.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_19.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_2.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_2.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_20.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_20.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_21.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_21.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_22.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_22.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_23.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_23.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_24.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_24.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_25.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_25.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_26.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_26.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_27.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_27.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_28.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_28.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_29.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_29.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_3.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_3.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_30.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_30.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_31.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_31.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_32.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_32.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_33.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_33.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_34.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_34.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_35.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_35.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_36.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_36.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_37.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_37.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_38.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_38.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_39.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_39.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_4.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_4.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_40.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_40.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_41.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_41.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_42.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_42.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_43.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_43.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_44.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_44.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_45.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_45.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_46.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_46.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_47.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_47.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_48.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_48.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_49.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_49.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_5.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_5.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_50.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_50.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_6.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_6.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_7.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_7.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_8.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_8.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_9.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/fiftyrss/tgsa_flexiblemerge_9.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_diffss1.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_diffss1.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,29 +38,23 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = 0x50;
-			resource_id = r_non_critical_commands;
+			command_list_id = ESsmStateSecurityCheck;
+			resource_id = r_security_check_commands;
 			}
 		};
 	}
 
-RESOURCE SSM_COMMAND_LIST r_non_critical_commands
+RESOURCE SSM_COMMAND_LIST r_security_check_commands
    	{
 	commands =
 		{
-		r_command_publish_system_state
-		,	r_command_test_proc
+		r_command_test_proc
 		};
 	}
 
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_system_state
-	{
-	severity = ECmdCriticalSeverity;
-	priority = 150;
-	}
-	
 RESOURCE SSM_START_APP_INFO r_command_test_proc
 	{
+    priority = 150;
 	severity = ECmdCriticalSeverity;
 	name = "gsatestprocgood.exe";
 	execution_behaviour = ESsmWaitForSignal;
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_diffss2.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_diffss2.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = 0x51;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
@@ -47,19 +48,13 @@
    	{
 	commands =
 		{
-		r_command_publish_system_state
-		,	r_command_test_proc
+		r_command_test_proc
 		};
 	}
 
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_system_state
-	{
-	severity = ECmdCriticalSeverity;
-	priority = 150;
-	}
-	
 RESOURCE SSM_START_APP_INFO r_command_test_proc
 	{
+    priority = 150;
 	severity = ECmdCriticalSeverity;
 	name = "gsatestprocgood.exe";
 	execution_behaviour = ESsmWaitForSignal;
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_samess.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_samess.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = ESsmStartupSubStateNonCritical;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_sortdifffile1.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_sortdifffile1.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -36,7 +37,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = 0x49;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
@@ -46,19 +47,13 @@
    	{
 	commands =
 		{
-		r_command_test_app
-		,r_command_publish_system_state		
+		r_command_test_app	
 		,r_command_test_proc1	
 		,r_command_test_proc2	
 		,r_command_multiple_wait	
 		};
 	}
 
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_system_state
-	{
-	severity = ECmdCriticalSeverity;
-	priority = 10;
-	}	
 	
 RESOURCE SSM_START_APP_INFO r_command_test_app
 	{
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_sortdifffile2.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_sortdifffile2.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -36,7 +37,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = 0x49;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_sortsamefile.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_flexiblemerge_sortsamefile.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <ssm/ssmcmd.rh>
 #include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
 
 UID2 KUidSsmCommandListResourceFile
 
@@ -37,7 +38,7 @@
 		{
 		SSM_COMMANDLISTID_TO_RESOURCEID
 			{
-			command_list_id = 0x49;
+			command_list_id = ESsmStateNonCritical;
 			resource_id = r_non_critical_commands;
 			}
 		};
@@ -48,16 +49,10 @@
 	commands =
 		{
 		r_command_test_app
-		,	r_command_publish_system_state	
 		,	r_command_test_proc		
 		};
 	}
 
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_system_state
-	{
-	severity = ECmdCriticalSeverity;
-	priority = 150;
-	}	
 	
 RESOURCE SSM_START_APP_INFO r_command_test_app
 	{
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetranfromnormal.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-// Copyright (c) 2007-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:
-//
-
-#include <ssm/ssmcmd.rh>
-#include <ssm/ssmsubstates.hrh>
-
-UID2 KUidSsmCommandListResourceFile
-
-// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
-// The SSM relies on this having a resource ID of 1.
-RESOURCE SSM_COMMAND_LIST_ROOT
-	{
-	command_list_mapping = r_command_list_mapping;
-	}
-
-RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
-	{
-	mappings =
-		{
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = 0x48;
-			resource_id = r_testapp_command;
-			}
-		};
-	}
-
-
-RESOURCE SSM_COMMAND_LIST r_testapp_command
-   	{
-	commands =
-		{
-		r_command_publish_state
-		, r_command_statetranfromnormal
-		};
-	}
-
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_state
-	{
-	severity = ECmdCriticalSeverity;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_statetranfromnormal
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tgsastatetranfromnormal.exe";
-	execution_behaviour = ESsmFireAndForget;
-	}
-
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetranfromshutdown.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-// Copyright (c) 2007-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:
-//
-
-#include <ssm/ssmcmd.rh>
-#include <ssm/ssmsubstates.hrh>
-
-UID2 KUidSsmCommandListResourceFile
-
-// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
-// The SSM relies on this having a resource ID of 1.
-RESOURCE SSM_COMMAND_LIST_ROOT
-	{
-	command_list_mapping = r_command_list_mapping;
-	}
-
-RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
-	{
-	mappings =
-		{
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = 0x48;
-			resource_id = r_testapp_command;
-			}
-		};
-	}
-
-
-RESOURCE SSM_COMMAND_LIST r_testapp_command
-   	{
-	commands =
-		{
-		r_command_publish_state
-		, r_command_statetranfromshutdown
-		};
-	}
-
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_state
-	{
-	severity = ECmdCriticalSeverity;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_statetranfromshutdown
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tgsastatetranfromshutdown.exe";
-	execution_behaviour = ESsmFireAndForget;
-	}
-
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetranfromstartup.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-// Copyright (c) 2007-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:
-//
-
-#include <ssm/ssmcmd.rh>
-#include <ssm/ssmsubstates.hrh>
-
-UID2 KUidSsmCommandListResourceFile
-
-// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
-// The SSM relies on this having a resource ID of 1.
-RESOURCE SSM_COMMAND_LIST_ROOT
-	{
-	command_list_mapping = r_command_list_mapping;
-	}
-
-RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
-	{
-	mappings =
-		{
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = 0x48;
-			resource_id = r_testapp_command;
-			}
-		};
-	}
-
-
-RESOURCE SSM_COMMAND_LIST r_testapp_command
-   	{
-	commands =
-		{
-		r_command_publish_state
-		, r_command_statetranfromstartup
-		};
-	}
-
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_state
-	{
-	severity = ECmdCriticalSeverity;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_statetranfromstartup
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tgsastatetranfromstartup.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetranfromstartuptoshutdown.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-// Copyright (c) 2007-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:
-// tgsa_statetranfromstartup.rss
-// 
-//
-
-#include <ssm/ssmcmd.rh>
-#include <ssm/ssmsubstates.hrh>
-
-UID2 KUidSsmCommandListResourceFile
-
-// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
-// The SSM relies on this having a resource ID of 1.
-RESOURCE SSM_COMMAND_LIST_ROOT
-	{
-	command_list_mapping = r_command_list_mapping;
-	}
-
-RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
-	{
-	mappings =
-		{
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = 0x48;
-			resource_id = r_testapp_command;
-			}
-		};
-	}
-
-
-RESOURCE SSM_COMMAND_LIST r_testapp_command
-   	{
-	commands =
-		{
-		r_command_publish_state
-		, r_command_statetranfromstartup_shutdown
-		};
-	}
-
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_state
-	{
-	severity = ECmdCriticalSeverity;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_statetranfromstartup_shutdown
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tgsastatetranfromstartup.exe";
-	args = "shutdown";
-	execution_behaviour = ESsmWaitForSignal;
-	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetransition.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,64 @@
+// 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:
+//
+
+#include <ssm/ssmcmd.rh>
+#include <ssm/ssmsubstates.hrh>
+#include "ssmsubstateext.hrh"
+
+UID2 KUidSsmCommandListResourceFile
+
+// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
+// The SSM relies on this having a resource ID of 1.
+RESOURCE SSM_COMMAND_LIST_ROOT
+	{
+	command_list_mapping = r_command_list_mapping;
+	}
+
+RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
+	{
+	mappings =
+		{
+		SSM_COMMANDLISTID_TO_RESOURCEID
+			{
+			command_list_id = ESsmStateNonCritical;
+			resource_id = r_testapp_command;
+			}
+		};
+	}
+
+
+RESOURCE SSM_COMMAND_LIST r_testapp_command
+   	{
+	commands =
+		{
+		r_command_statetranfromnormal,
+		r_command_statetranfromstartup
+		};
+	}
+
+
+RESOURCE SSM_START_PROCESS_INFO r_command_statetranfromnormal
+	{
+	severity = ECmdCriticalSeverity;
+	name = "tgsastatetranfromnormal.exe";
+	execution_behaviour = ESsmFireAndForget;
+	}
+
+RESOURCE SSM_START_PROCESS_INFO r_command_statetranfromstartup
+    {
+    severity = ECmdCriticalSeverity;
+    name = "tgsastatetranfromstartup.exe";
+    execution_behaviour = ESsmWaitForSignal;
+    }
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/resource/tgsa_statetrantoshutdown.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-// Copyright (c) 2007-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:
-//
-
-#include <ssm/ssmcmd.rh>
-#include <ssm/ssmsubstates.hrh>
-
-UID2 KUidSsmCommandListResourceFile
-
-// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
-// The SSM relies on this having a resource ID of 1.
-RESOURCE SSM_COMMAND_LIST_ROOT
-	{
-	command_list_mapping = r_command_list_mapping;
-	}
-
-RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
-	{
-	mappings =
-		{
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = 0x48;
-			resource_id = r_testapp_command;
-			}
-		};
-	}
-
-
-RESOURCE SSM_COMMAND_LIST r_testapp_command
-   	{
-	commands =
-		{
-		r_command_publish_state
-		, r_command_statetrantoshutdown
-		};
-	}
-
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_state
-	{
-	severity = ECmdCriticalSeverity;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_statetrantoshutdown
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tgsastatetrantoshutdown.exe";
-	execution_behaviour = ESsmFireAndForget;
-	}
-
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/scripts/sspluginstest_statetranfromshutdown.script	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-// Copyright (c) 2008-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:
-//
-
-PRINT Run GsaStateTranFromShutdownStep tests
-
-LOAD_SUITE tgsa_i_server
-
-START_TESTCASE 				DEVSRVS-SSPLUGINS-GSA-0033
-//! @SYMTestCaseID  			DEVSRVS-SSPLUGINS-GSA-0033
-//! @SYMDEF				DEF119568
-//! @SYMTestCaseDesc			Checks for state transitions to fail and shutdown states from normal state 
-//! 					under different scenarios.
-//! @SYMTestType			CIT	
-//! @SYMTestPriority			Critical
-//! @SYMTestActions			Test checks the results for request state transition under different scenarios:		
-//! 					1. Normal state to Shutdown state and then to Fail state.
-//! 					Scenario 1 - Request for state change from Normal to shutdown state to critical substate
-//! 					Cancel the request immediately
-//!					Scenario 2 - Request for state change from Normal to shutdown state to any substate
-//! 					Cancel the request immediately, so that we can proceed with the next test scenario.
-//! 					Scenario 3 - Request for three state changes(1. shutdown state 2. invalid state 3. fail state) one after the other 
-//! 					 i.e., second request is issued once first one is completed and the third one is issued after the second request is completed.
-//! 					 Cancel the third request.
-//! 					Scenario 4 - The system is now in shutdown state, request for state transition to normal state.
-//! 					Scenario 5 - The system is now in shutdown state, request for state transition to fail state.						
-//! @SYMTestExpectedResults 	
-//! 					1. Normal state to Shutdown state and then to Fail state.
-//! 					Scenario 1 - Request will be completed with KErrCancel
-//! 					Scenario 2 - Request will be completed with KErrCancel
-//! 					Scenario 3 - First request will completed with KErrNone 
-//! 					Second request will completed with KErrNotSupported
-//! 					Third request will completed with KErrCancel
-//! 					Scenario 4 - Request will be completed with KErrNotSupported
-//! 					Scenario 5 - Request will be completed with KErrNone
-RUN_TEST_STEP 100 tgsa_i_server GsaStateTranFromShutdownStep
-END_TESTCASE 				DEVSRVS-SSPLUGINS-GSA-0033
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/scripts/sspluginstest_statetranfromstartuptoshutdown.script	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// Copyright (c) 2008-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:
-//
-
-PRINT Run GsaStateTranFromStartupStep tests
-
-LOAD_SUITE tgsa_i_server
-
-START_TESTCASE 				DEVSRVS-SSPLUGINS-GSA-0036
-//! @SYMTestCaseID  			DEVSRVS-SSPLUGINS-GSA-0036
-//! @SYMDEF				DEF130922
-//! @SYMTestCaseDesc			Checks for state transitions to shutdown states from Startup state 
-//! 					under different scenarios.
-//! @SYMTestType			CIT	
-//! @SYMTestPriority			Critical
-//! @SYMTestActions			Test checks the result for request state transition from Startup to Shutdown Critical State
-//! 					1. Startup state to Shutdown state.
-//! 					Scenario 1 - Request for state change from Startup to critical state
-//! @SYMTestExpectedResults 		1. Startup state to Shutdown state.
-//! 					Scenario 1 - Request will completed with KErrNone
-RUN_TEST_STEP 100 tgsa_i_server GsaStateTranFromStartuptoShutdownStep
-END_TESTCASE 				DEVSRVS-SSPLUGINS-GSA-0036
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/scripts/sspluginstest_statetrantoshutdown.script	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-// Copyright (c) 2008-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:
-//
-
-PRINT Run GsaStateTranToShutdownStep tests
-
-LOAD_SUITE tgsa_i_server
-
-START_TESTCASE 				DEVSRVS-SSPLUGINS-GSA-0035
-//! @SYMTestCaseID			DEVSRVS-SSPLUGINS-GSA-0035
-//! @SYMDEF				DEF119568
-//! @SYMTestCaseDesc			Checks for state transitions to fail and shutdown states from normal state 
-//! 					under different scenarios.
-//! @SYMTestType			CIT	
-//! @SYMTestPriority			Critical
-//! @SYMTestActions			Test checks the results for request state transition under different scenarios:
-//! 					1. Normal state to Shutdown state.
-//! 					Scenario 1 - Request for state transition to shutdown state - invalid substate
-//! 					Scenario 2 - Request for state transition to shutdown state - critical substate(Restart)
-//! 					Scenario 3 - Request for state transition to shutdown state - critical substate(Standby)
-//! @SYMTestExpectedResults		1. Normal state to Shutdown state.
-//! 					Scenario 1 - Request to transit to the shutdown state will be completed with KErrNotSupported
-//! 					Scenario 2 - First request will be completed with KErrNone
-//! 					Second request will be completed with KErrNotSupported
-RUN_TEST_STEP 100 tgsa_i_server GsaStateTranToShutdownStep
-END_TESTCASE 				DEVSRVS-SSPLUGINS-GSA-0035
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsa_i_server.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsa_i_server.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -90,15 +90,7 @@
 	//Following tests can be run only on techview emulator as it requires restarting of the emulator
 //#ifdef __WINS__
 	CTestStep* testStep = NULL;
-	if (aStepName == KTGsaStateTranToShutdownStep)
-		{
-		testStep = new CGsaStateTranToDiffStatesTest(KTestProcTranToShutdown);
-		}
-	else if (aStepName == KTGsaStateTranFromShutdownStep)
-		{
-		testStep = new CGsaStateTranToDiffStatesTest(KTestProcTranFromShutdown);
-		}
-	else if (aStepName == KTGsaStateTranFromNormalStep)
+	if (aStepName == KTGsaStateTranFromNormalStep)
 		{
 		testStep = new CGsaStateTranToDiffStatesTest(KTestProcTranFromNormal);
 		}
@@ -106,10 +98,6 @@
 		{
 		testStep = new CGsaStateTranToDiffStatesTest(KTestProcTranFromStartup);
 		}
-	else if (aStepName == KTGsaStateTranFromStartuptoShutdownStep)
-		{
-		testStep = new CGsaStateTranToDiffStatesTest(KTGsaStateTranFromStartuptoShutdownStep);
-		}
 	else if (aStepName == KTGsaDuplicateSubstateStep)
 		{
 		testStep = new CGsaDuplicateSubstateTest();
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsa_step_statetrantodiffstates.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsa_step_statetrantodiffstates.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -46,202 +46,101 @@
 		
 	if (iProcessName == KTestProcTranFromNormal)
 		{
-		RFileReadStream fileReadStream;
-		err = fileReadStream.Open(fs, KGsaTestStateTranFromNormalResult, EFileRead);
+		RFileReadStream fileReadStream1;
+		err = fileReadStream1.Open(fs, KGsaTestStateTranFromNormalResult, EFileRead);
+		INFO_PRINTF2(_L("Error in opening file: %d"), err);
 		TEST(err == KErrNone);
 		User::LeaveIfError(err);
-		CleanupClosePushL(fileReadStream);
+		CleanupClosePushL(fileReadStream1);
 
 		//System state before starting the test.
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
+		CurrentSystemStateForStateTranTestL(fileReadStream1, ESsmNormal);
 
 		//Scenario 1 - Request for state change from Normal to invalid state results in KErrNotSupported
 		INFO_PRINTF1(_L("Request for state change from Normal to invalid state"));
-		TInt stateTranResult = fileReadStream.ReadInt32L();
+		TInt stateTranResult = fileReadStream1.ReadInt32L();
 		TEST(stateTranResult == KErrNotSupported);
 		INFO_PRINTF2(_L("Actual : %d Expected : -5"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
+		CurrentSystemStateForStateTranTestL(fileReadStream1, ESsmNormal);
 		
 		//Scenario 2 - Request for state change from Normal to fail state with invalid substate results in KErrNotSupported
 		INFO_PRINTF1(_L("Request for state change from Normal to fail state with invalid substate"));
-		stateTranResult = fileReadStream.ReadInt32L();
+		stateTranResult = fileReadStream1.ReadInt32L();
 		TEST(stateTranResult == KErrNotSupported);
 		INFO_PRINTF2(_L("Actual : %d Expected : -5"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
+		CurrentSystemStateForStateTranTestL(fileReadStream1, ESsmNormal);
 
 		//Scenario 3 - Request for two state changes(1. fail state 2. shutdown state) one after the other without waiting 
 		// for the first one to complete. Cancels both transition request. 		
 		INFO_PRINTF1(_L("Request for two state changes(1. fail state 2. shutdown state)"));
 		INFO_PRINTF1(_L("one after the other without waiting for the first one to complete."));
 		INFO_PRINTF1(_L("Cancel the fail state transition request."));
-		stateTranResult = fileReadStream.ReadInt32L();
+		stateTranResult = fileReadStream1.ReadInt32L();
 		TEST(stateTranResult == KErrCancel);
 		INFO_PRINTF2(_L("First request to the fail state will be completed with %d Expected -3"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
+		CurrentSystemStateForStateTranTestL(fileReadStream1, ESsmNormal);
 
-		stateTranResult = fileReadStream.ReadInt32L();
+		stateTranResult = fileReadStream1.ReadInt32L();
 		TEST(stateTranResult == KErrCancel);
 		INFO_PRINTF2(_L("Second request to transit to the shutdown state will be completed with %d Expected -3"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
-
-		//Scenario 4 - Request for two state changes one after the other without waiting for the first one to complete
-		// Once first and second request are completed the system will be in fail state, now issue another state transition
-		// request to fail state again.
-		// The first request to the fail state will be completed with KErrCancel 
-		// the second request to transit to the fail state will be completed with KErrNone.
-		// the third request to transit to the fail state will be completed with KErrNotSupported.
-		INFO_PRINTF1(_L("Request for two state changes one after the other without waiting"));
-		INFO_PRINTF1(_L("for the first one to complete. Once first and second request are completed the system will be in"));
-		INFO_PRINTF1(_L("fail state, now issue another state transition request to fail state again."));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrCancel);
-		INFO_PRINTF2(_L("First request to the fail state will be completed with %d Expected -3"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
+		CurrentSystemStateForStateTranTestL(fileReadStream1, ESsmNormal);
 
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone);
-		INFO_PRINTF2(_L("Second request to the fail state will be completed with %d Expected 0"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
-
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNotSupported);
-		INFO_PRINTF2(_L("Third request to the fail state will be completed with %d Expected -5"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
-
-		//Finally the system should be in fail state i.e., just before the test application is closed.
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmFail);
-		INFO_PRINTF1(_L("Test Process Exit Reason"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone && stateTranResult != KTestAppFailure);
-		INFO_PRINTF2(_L("Test process exits with %d Expected 0"), stateTranResult);
+		INFO_PRINTF2(_L("Test process exits with %d Expected -3"), stateTranResult);
 
 		CleanupStack::PopAndDestroy();
 		// Delete the result file
 		//err = fs.Delete(KGsaTestStateTranFromNormalResult);
-		}
-	else if (iProcessName == KTestProcTranToShutdown)
-		{
-		RFileReadStream fileReadStream;
-		err = fileReadStream.Open(fs, KGsaTestStateTranToShutdownResult, EFileRead);
+
+		RFileReadStream fileReadStream2;
+		err = fileReadStream2.Open(fs, KGsaTestStateTranToShutdownResult, EFileRead);
 		TEST(err == KErrNone);
 		User::LeaveIfError(err);
-		CleanupClosePushL(fileReadStream);
+		CleanupClosePushL(fileReadStream2);
 
 		//System state before starting the test.
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
+		CurrentSystemStateForStateTranTestL(fileReadStream2, ESsmNormal);
 
 		//Scenario 1 - Request for state transition to shutdown state - invalid substate
 		// request to transit to the shutdown state will be completed with KErrNotSupported
 		INFO_PRINTF1(_L("Request for state transition to shutdown state - invalid substate"));
-		TInt stateTranResult = fileReadStream.ReadInt32L();
+		stateTranResult = fileReadStream2.ReadInt32L();
 		TEST(stateTranResult == KErrNotSupported);
 		INFO_PRINTF2(_L("Actual : %d Expected : -5"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
+		CurrentSystemStateForStateTranTestL(fileReadStream2, ESsmNormal);
 		
-		//Scenario 2 - Request for state transition to shutdown state - critical substate(Restart)
-		// Request for state transition to shutdown state - critical substate(Standby)
-		// first request to transit to the shutdown state critical substate(Restart)will be completed with KErrCancel
-		// second request to transit to the shutdown state critical substate(Standby)will be completed with KErrNone
-		INFO_PRINTF1(_L("Request for state transition to shutdown state - critical substate(Standby)"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone);
-		INFO_PRINTF2(_L("Actual : %d Expected : 0"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
-
-		INFO_PRINTF1(_L("Request for state transition to shutdown state - critical substate(Restart)"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrCancel);
-		INFO_PRINTF2(_L("Actual : %d Expected : -3"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
-
-		//Finally the system should be in fail state i.e., just before the test application is closed.
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmShutdown);
-		
-		INFO_PRINTF1(_L("Test Process Exit Reason"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone && stateTranResult != KTestAppFailure);
-		INFO_PRINTF2(_L("Test process exits with %d Expected 0"), stateTranResult);
+		INFO_PRINTF2(_L("Test process exits with %d Expected -5"), stateTranResult);
 
 		CleanupStack::PopAndDestroy();
 		// Delete the result file
 		//err = fs.Delete(KGsaTestStateTranToShutdownResult);
-		}
-	else if (iProcessName == KTestProcTranFromShutdown)
-		{
-		RFileReadStream fileReadStream;
-		err = fileReadStream.Open(fs, KGsaTestStateTranFromShutdownResult, EFileRead);
+
+		RFileReadStream fileReadStream3;
+		err = fileReadStream3.Open(fs, KGsaTestStateTranFromShutdownResult, EFileRead);
 		TEST(err == KErrNone);
 		User::LeaveIfError(err);
-		CleanupClosePushL(fileReadStream);
+		CleanupClosePushL(fileReadStream3);
 
 		//System state before starting the test.
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
+		CurrentSystemStateForStateTranTestL(fileReadStream3, ESsmNormal);
 
 		//Scenario 1 - Request for state change from Normal to shutdown state to critical substate
 		// Cancel the request immediately
 		INFO_PRINTF1(_L("Request for state change from Normal to shutdown critical substate and Cancel the request"));
-		TInt stateTranResult = fileReadStream.ReadInt32L();
+		stateTranResult = fileReadStream3.ReadInt32L();
 		TEST(stateTranResult == KErrCancel);
 		INFO_PRINTF2(_L("Actual : %d Expected : -3"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
+		CurrentSystemStateForStateTranTestL(fileReadStream3, ESsmNormal);
 
 		//Scenario 2 - Request for state change from Normal to shutdown state to any substate
 		// Cancel the request immediately, so that we can proceed with the next test scenario.
 
 		INFO_PRINTF1(_L("Request for state change from Normal to shutdown any substate and Cancel the request"));
-		stateTranResult = fileReadStream.ReadInt32L();
+		stateTranResult = fileReadStream3.ReadInt32L();
 		TEST(stateTranResult == KErrCancel);
 		INFO_PRINTF2(_L("Actual : %d Expected : -3"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
-
-		//Scenario 3 - Request for three state changes(1. shutdown state 2. invalid state 3. fail state) one after the other 
-		// i.e., second request is issued once first one is completed and the third one is issued after the second request is completed.
-		// Cancel the third request.
-		// first request to the shutdown state will be completed with KErrNone 
-		// second request to transit to the fail state will be completed with KErrNotSupported
-		// third request to transit to the fail state will be completed with KErrCancel
-		INFO_PRINTF1(_L("Request for 3 state changes(1. shutdown state 2. invalid state 3. fail state)"));
-		INFO_PRINTF1(_L("one after the other. i.e., second request is issued once first one is completed"));
-		INFO_PRINTF1(_L("and the third one is issued after the second request is completed."));
-		INFO_PRINTF1(_L("Cancel the third request."));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone);
-		INFO_PRINTF2(_L("First request to the shutdown state will be completed with %d Expected 0"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
-
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNotSupported);
-		INFO_PRINTF2(_L("Second request to transit to the fail state will be completed with %d Expected -5"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmNormal);
+		CurrentSystemStateForStateTranTestL(fileReadStream3, ESsmNormal);
 
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrCancel);
-		INFO_PRINTF2(_L("Third request to transit to the fail state will be completed with %d Expected -3"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmShutdown);
-
-		//Scenario 4 - The system is now in shutdown state, request for state transition to normal state.
-		// request to transit to the normal state will be completed with KErrNotSupported
-		INFO_PRINTF1(_L("The system is now in shutdown state, request for state transition to normal state"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNotSupported);
-		INFO_PRINTF2(_L("Request to transit to the normal state will be completed with %d Expected -5"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmShutdown);
-
-		//Scenario 5 - The system is now in shutdown state, request for state transition to fail state.
-		// request to transit to the fail state will be completed with KErrNone
-		INFO_PRINTF1(_L("The system is now in shutdown state, request for state transition to fail state"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone);
-		INFO_PRINTF2(_L("Request to transit to the normal state will be completed with %d Expected 0"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmShutdown);
-
-		//Finally the system should be in fail state i.e., just before the test application is closed.
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmFail);
-		
-		INFO_PRINTF1(_L("Test Process Exit Reason"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone && stateTranResult != KTestAppFailure);
-		INFO_PRINTF2(_L("Test process exits with %d Expected 0"), stateTranResult);
+		INFO_PRINTF2(_L("Test process exits with %d Expected -3"), stateTranResult);
 
 		CleanupStack::PopAndDestroy();
 		// Delete the result file
@@ -265,68 +164,12 @@
 		INFO_PRINTF2(_L("Actual : %d Expected : -5"), stateTranResult);
 		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmStartup);
 		
-		//Scenario 2 - Request for state change from Startup to fail state with invalid substate
-		INFO_PRINTF1(_L("Request for state change from Startup to fail state with invalid substate"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNotSupported);
-		INFO_PRINTF2(_L("Actual : %d Expected : -5"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmStartup);
-
-		//Scenario 3 - Request for state change from Startup to shutdown invalid substate
-		INFO_PRINTF1(_L("Request for state change from Startup to shutdown invalid substate"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNotSupported);
-		INFO_PRINTF2(_L("Request for state change from Startup to shutdown invalid state completed with %d Expected -5"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmStartup);
-
-		//Scenario 4 - Request for two state changes to fail state one after the other
-		//The first request to the fail state will be completed with KErrCancel and the second request to transit to the fail state will be completed with KErrNone.
-		INFO_PRINTF1(_L("Request for two state changes to fail state one after the other"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrCancel);
-		INFO_PRINTF2(_L("First request to the fail state will be completed with %d Expected -3"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmStartup);
-
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone);
-		INFO_PRINTF2(_L("Second request to the fail state will be completed with %d Expected 0"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmStartup);
-
-		//Finally the system should be in fail state i.e., just before the test application is closed.
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmFail);
-		INFO_PRINTF1(_L("Test Process Exit Reason"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone && stateTranResult != KTestAppFailure);
-		INFO_PRINTF2(_L("Test process exits with %d Expected 0"), stateTranResult);
+		INFO_PRINTF2(_L("Test process exits with %d Expected -5"), stateTranResult);
 		
 		CleanupStack::PopAndDestroy();
 		// Delete the result file
 		//err = fs.Delete(KGsaTestStateTranFromStartupResult);
 		}
-	else if (iProcessName == KTGsaStateTranFromStartuptoShutdownStep)
-		{
-		RFileReadStream fileReadStream;
-		User::LeaveIfError(fileReadStream.Open(fs, KGsaTestStateTranFromStartupResult, EFileRead));
-		CleanupClosePushL(fileReadStream);
-		
-		//Scenario 1 - Request for state change from Startup to shutdown critical substate
-		INFO_PRINTF1(_L("Request for state change from Startup to shutdown critical substate"));
-		TInt stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone);
-		INFO_PRINTF2(_L("Request for state change from Startup to shutdown critical substate completed with %d Expected 0"), stateTranResult);
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmStartup);
-		
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmStartup);
-		
-		//Finally the system should be in Shutdown state i.e., just before the test application is closed.
-		CurrentSystemStateForStateTranTestL(fileReadStream, ESsmShutdown);
-		INFO_PRINTF1(_L("Test Process Exit Reason"));
-		stateTranResult = fileReadStream.ReadInt32L();
-		TEST(stateTranResult == KErrNone && stateTranResult != KTestAppFailure);
-		INFO_PRINTF2(_L("Test process exits with %d Expected 0"), stateTranResult);
-		
-		CleanupStack::PopAndDestroy();
-		}
 	else
 		{
 		TEST(err == KErrArgument);
@@ -359,16 +202,10 @@
 
 CGsaStateTranToDiffStatesTest::CGsaStateTranToDiffStatesTest(const TDesC& aProcessName) : iProcessName(aProcessName)
 	{
-	if (iProcessName == KTestProcTranToShutdown)
-		SetTestStepName(KTGsaStateTranToShutdownStep);
-	else if (iProcessName == KTestProcTranFromShutdown)
-		SetTestStepName(KTGsaStateTranFromShutdownStep);
-	else if (iProcessName == KTestProcTranFromNormal)
+	if (iProcessName == KTestProcTranFromNormal)
 		SetTestStepName(KTGsaStateTranFromNormalStep);
 	else if (iProcessName == KTestProcTranFromStartup)
 		SetTestStepName(KTGsaStateTranFromStartupStep);
-	else if (iProcessName == KTGsaStateTranFromStartuptoShutdownStep)
-		SetTestStepName(KTGsaStateTranFromStartuptoShutdownStep);
 	else
 		
 		{
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsastatetranfromnormal.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsastatetranfromnormal.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -46,12 +46,7 @@
 	void DoTestStateTranFromNormalL();
 	};
 
-static TInt StopScheduler(TAny* aStateTranFromNormal)
- 	{
- 	CStateTranFromNormal* stateTran = reinterpret_cast<CStateTranFromNormal*>(aStateTranFromNormal);
- 	TRAPD(err,stateTran->CallStopSchedulerL());
- 	return err;
- 	}
+
 
 static TInt StartTest(TAny* aStateTranFromNormal)
  	{
@@ -87,16 +82,9 @@
 // Tests the Fail state transitions under different scenarios
 void CStateTranFromNormal::DoTestStateTranFromNormalL()
 	{
-	// This async callback is used to stop the scheduler once the system goes into fail state.
-	iAsyncCallbackForStopScheduler =  new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
-	TCallBack stopSchedulerCallback(StopScheduler, this);
-	iAsyncCallbackForStopScheduler->Set(stopSchedulerCallback);
-
-	// call the callback function which keeps looping until the system state gets into fail state.
-	iAsyncCallbackForStopScheduler->CallBack();
-
 	RSsmStateManager stateMan;
 	TInt err = stateMan.Connect();
+	CleanupClosePushL(stateMan);
 	if (err == KErrNone)
 		RDebug::Print(_L("\nStateTran Test: RSsmStateManager sess Connect %d\n"), err);
 	else
@@ -201,62 +189,92 @@
 		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from Normal to shutdown state Failed"));
 		User::Leave(KTestAppFailure);		
 		}
-
-	//Scenario 4 - Request for two state changes one after the other without waiting for the first one to complete
-	// Once first and second request are completed the system will be in fail state, now issue another state transition
-	// request to fail state again.
-	// The first request to the fail state will be completed with KErrCancel 
-	// the second request to transit to the fail state will be completed with KErrNone.
-	// the third request to transit to the fail state will be completed with KErrNotSupported.
 	
-	RDebug::Print(_L("\nStateTran Test: Scenario 4 \n"));
-	stateMan.RequestStateTransition(stateTrans3, status1);
-	RDebug::Print(_L("\nStateTran Test: Start First RequestStateTransition from Normal to fail state %d\n "), status1.Int());
+	iFileWriteStream.Close();
 	
-	stateMan.RequestStateTransition(stateTrans3, status2);
-	RDebug::Print(_L("\nStateTran Test: Start Second RequestStateTransition from Normal to fail state %d\n "), status2.Int());
+	// Creates and open the result file for streaming
+	    err = iFileWriteStream.Replace(iFs, KGsaTestStateTranFromShutdownResult, EFileWrite);
+	    RDebug::Print(_L("\nStateTran Test: iFileWriteStream open with %d\n"), err);
+
+
+	    // Gets the Current system state before starting the test
+	    CurrentSystemStateL();
+
+	    //Scenario 1 - Request for state change from Normal to shutdown state to critical substate
+	    // Cancel the request immediately
+	    RDebug::Print(_L("\nScenario 1 \n"));
+	    TRequestStatus status_shutdowncritsubstate;
+	    /*TSsmState shutdownState_Critical(ESsmShutdown, ESsmShutdownSubStateCritical);
+	    TSsmStateTransition stateTrans_Shutdowncritical(shutdownState_Critical, 1);*/
+
+	    stateMan.RequestStateTransition(stateTrans_Shutdowncritical, status_shutdowncritsubstate);
+	    RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state critical substate %d\n "), status_shutdowncritsubstate.Int());
 
-	User::WaitForRequest(status1);
-	iFileWriteStream.WriteInt32L(status1.Int());
-	if (status1.Int() == KErrCancel)
-		{
-		RDebug::Print(_L("\nStateTran Test: First RequestStateTransition from Normal to fail state completes with %d Expected -3\n "), status1.Int());
-		CurrentSystemStateL();
-		}
-	else
-		{
-		RDebug::Print(_L("\nStateTran Test: First RequestStateTransition from Normal to fail state Failed"));
-		User::Leave(KTestAppFailure);		
-		}
+	    stateMan.RequestStateTransitionCancel();
+	    
+	    iFileWriteStream.WriteInt32L(status_shutdowncritsubstate.Int());
+	    if (status_shutdowncritsubstate.Int() == KErrCancel)
+	        {
+	        CurrentSystemStateL();
+	        RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state critical substate completed %d Expected -3\n "), status_shutdowncritsubstate.Int());
+	        }
+	    else
+	        User::Leave(KTestAppFailure);
+
+	    //Scenario 2 - Request for state change from Normal to shutdown state to any substate
+	    // Cancel the request immediately, so that we can proceed with the next test scenario.
+	    RDebug::Print(_L("\nScenario 2 \n"));
+	    TRequestStatus status_shutdownanysubstate;
+	    TSsmState shutdownState_Any(ESsmShutdown, KSsmAnySubState);
+	    TSsmStateTransition stateTrans_shutdownAnySubState(shutdownState_Any, 1);
+
+	    stateMan.RequestStateTransition(stateTrans_shutdownAnySubState, status_shutdownanysubstate);
+	    RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state any substate %d\n "), status_shutdownanysubstate.Int());
 
-	User::WaitForRequest(status2);
-	iFileWriteStream.WriteInt32L(status2.Int());
-	if (status2.Int() == KErrNone)
-		{
-		RDebug::Print(_L("\nStateTran Test: Second RequestStateTransition from Normal to fail state %d Expected 0\n "), status2.Int());
-		CurrentSystemStateL();
-		}
-	else
-		{
-		RDebug::Print(_L("\nStateTran Test: Second RequestStateTransition from Normal to fail state Failed"));
-		User::Leave(KTestAppFailure);		
-		}
-	
-	stateMan.RequestStateTransition(stateTrans3, status2); //System is in fail state
-	RDebug::Print(_L("\nStateTran Test: Start RequestStateTransition from fail to fail state %d\n "), status2.Int());
-	
-	User::WaitForRequest(status2);
-	iFileWriteStream.WriteInt32L(status2.Int());
-	if (status2.Int() == KErrNotSupported)
-		{
-		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from fail to fail state completed with %d Expected -5\n "), status2.Int());
-		CurrentSystemStateL();
-		}
-	else
-		{
-		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from fail to fail state Failed"));
-		User::Leave(KTestAppFailure);
-		}
+	    stateMan.RequestStateTransitionCancel();
+	    
+	    iFileWriteStream.WriteInt32L(status_shutdownanysubstate.Int());
+	    if (status_shutdownanysubstate.Int() == KErrCancel)
+	        {
+	        CurrentSystemStateL();
+	        RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state any substate completed %d Expected -3\n "), status_shutdownanysubstate.Int());
+	        }
+	    else
+	        User::Leave(KTestAppFailure);
+	    
+	    iFileWriteStream.Close();
+	    
+	    // Creates and open the result file for streaming
+	        err = iFileWriteStream.Replace(iFs, KGsaTestStateTranToShutdownResult, EFileWrite);
+	        RDebug::Print(_L("\nStateTran Test: iFileWriteStream open with %d\n"), err);
+
+
+	        // Gets the Current system state before starting the test
+	        CurrentSystemStateL();
+
+	        //Scenario 1 - Request for state transition to shutdown state - invalid substate
+	        // request to transit to the shutdown state will be completed with KErrNotSupported
+	        RDebug::Print(_L("\nScenario 1 \n"));
+
+	        TRequestStatus status_invalidsubstate;
+	        TSsmState shutdownState_Invalid(ESsmShutdown, 150);
+	        TSsmStateTransition stateTrans_Invalid(shutdownState_Invalid, 1);
+
+	        stateMan.RequestStateTransition(stateTrans_Invalid, status_invalidsubstate);
+	        RDebug::Print(_L("\n Start RequestStateTransition from Normal to shutdown state with invalid substate %d\n "), status_invalidsubstate.Int());
+	        
+	        User::WaitForRequest(status_invalidsubstate);
+	        iFileWriteStream.WriteInt32L(status_invalidsubstate.Int());
+	        if (status_invalidsubstate.Int() == KErrNotSupported)
+	            {
+	            CurrentSystemStateL();
+	            RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state with invalid substate completes with %d Expected -5\n "), status_invalidsubstate.Int());
+	            }
+	        else
+	            User::Leave(KTestAppFailure);
+	        
+	        iFileWriteStream.Close();
+	    CleanupStack::PopAndDestroy(&stateMan);
 	}
 
 void CStateTranFromNormal::StartTestL()
@@ -265,10 +283,6 @@
 	CleanupStack::PushL(sched);
 	CActiveScheduler::Install(sched);
 
-	// Notifier used to get the notification when system gets to fail state
-	CSsmStateAwareSession* notif_for_failstate = CSsmStateAwareSession::NewLC(KSM2UiServicesDomain3);
-	notif_for_failstate->AddSubscriberL(*this);
-
 	// This async callback is used to start the state transition test once system enters to normal state.
 	iAsyncCallbackForStartTest =  new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
 	TCallBack startTestCallback(StartTest, this);
@@ -280,7 +294,7 @@
 	RProcess::Rendezvous(KErrNone);
 	sched->Start();
 
-	CleanupStack::PopAndDestroy(2);
+	CleanupStack::PopAndDestroy(1);
 	}
 
 TInt E32Main()
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsastatetranfromshutdown.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,337 +0,0 @@
-// Copyright (c) 2008-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:
-//
-
-/**
- @file
- @test
- @internalComponent - Internal Symbian test code
-*/
-
-#include "gsatestapps.h"
-
-#include <ssm/ssmstates.hrh>
-#include <ssm/ssmsubstates.hrh>
-#include <ssm/ssmstate.h>
-#include <ssm/ssmstatetransition.h>
-#include <ssm/ssmstatemanager.h>
-#include <ssm/ssmstateawaresession.h>
-#include <ssm/ssmdomaindefs.h>
-
-#include "tgsastatetran_base.h"
-
-class CStateTranFromShutdown : public CTGsaStateTransition
-	{
-public:
-	static CStateTranFromShutdown* NewL();
-	~CStateTranFromShutdown();
-	void StartTestL();
-	void CallStopSchedulerL();
-
-private:
-	void ConstructL();
-	CStateTranFromShutdown();
-
-public:
-	void DoTestStateTranFromShutdownL();
-	};
-
-static TInt StopScheduler(TAny* aStateTranFromShutdown)
- 	{
- 	CStateTranFromShutdown* stateTran = reinterpret_cast<CStateTranFromShutdown*>(aStateTranFromShutdown);
- 	TRAPD(err,stateTran->CallStopSchedulerL());
- 	return err;
- 	}
-
-static TInt StartTest(TAny* aStateTranFromShutdown)
- 	{
- 	TInt testCompletionReason = KErrNone;
- 	CStateTranFromShutdown* stateTran = reinterpret_cast<CStateTranFromShutdown*>(aStateTranFromShutdown);
- 	TBool stateTest = stateTran->DoStartStateTranTest();
- 	if (stateTest)
- 		{
- 		RDebug::Print(_L("\nStateTran Test: Start the tgsastatetranfromshutdown test\n"));
-		TRAP(testCompletionReason, stateTran->DoTestStateTranFromShutdownL());
- 		}
-
- 	return testCompletionReason;
- 	}
-
-CStateTranFromShutdown* CStateTranFromShutdown::NewL()
-	{
-	CStateTranFromShutdown* self = new(ELeave) CStateTranFromShutdown();
-	self->ConstructL();
-	return self;
-	}
-
-void CStateTranFromShutdown::ConstructL()
-	{
-	CTGsaStateTransition::ConstructL(KGsaTestStateTranResultFilePath);
-	}
-
-CStateTranFromShutdown::~CStateTranFromShutdown()
-	{
-	}
-
-CStateTranFromShutdown::CStateTranFromShutdown()
-	{
-	}
-
-// Tests the Shutdown state transitions under different scenarios
-void CStateTranFromShutdown::DoTestStateTranFromShutdownL()
-	{
-	// This async callback is used to stop the scheduler once the system goes into fail state.
-	iAsyncCallbackForStopScheduler =  new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
-	TCallBack stopSchedulerCallback(StopScheduler, this);
-	iAsyncCallbackForStopScheduler->Set(stopSchedulerCallback);
-
-	// call the callback function which keeps looping until the system state gets into fail state.
-	iAsyncCallbackForStopScheduler->CallBack();
-
-	RSsmStateManager stateMan;
-	TInt err = stateMan.Connect();
-	if (err == KErrNone)
-		RDebug::Print(_L("\nStateTran Test: RSsmStateManager sess Connect %d\n"), err);
-	else
-		{
-		RDebug::Print(_L("\nStateTran Test: Unable to connect to RSsmStateManager sess\n"));	
-		User::Leave(KTestAppFailure);
-		}
-
-	// Creates and open the result file for streaming
-	err = iFileWriteStream.Replace(iFs, KGsaTestStateTranFromShutdownResult, EFileWrite);
-	RDebug::Print(_L("\nStateTran Test: iFileWriteStream open with %d\n"), err);
-
-
-	// Gets the Current system state before starting the test
-	CurrentSystemStateL();
-
-	//Scenario 1 - Request for state change from Normal to shutdown state to critical substate
-	// Cancel the request immediately
-	RDebug::Print(_L("\nScenario 1 \n"));
-	TRequestStatus status_shutdowncritsubstate;
-	TSsmState shutdownState_Critical(ESsmShutdown, ESsmShutdownSubStateCritical);
-	TSsmStateTransition stateTrans_Shutdowncritical(shutdownState_Critical, 1);
-
-	stateMan.RequestStateTransition(stateTrans_Shutdowncritical, status_shutdowncritsubstate);
-	RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state critical substate %d\n "), status_shutdowncritsubstate.Int());
-
-	stateMan.RequestStateTransitionCancel();
-	
-	iFileWriteStream.WriteInt32L(status_shutdowncritsubstate.Int());
-	if (status_shutdowncritsubstate.Int() == KErrCancel)
-		{
-		CurrentSystemStateL();
-		RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state critical substate completed %d Expected -3\n "), status_shutdowncritsubstate.Int());
-		}
-	else
-		User::Leave(KTestAppFailure);
-
-	//Scenario 2 - Request for state change from Normal to shutdown state to any substate
-	// Cancel the request immediately, so that we can proceed with the next test scenario.
-	RDebug::Print(_L("\nScenario 2 \n"));
-	TRequestStatus status_shutdownanysubstate;
-	TSsmState shutdownState_Any(ESsmShutdown, KSsmAnySubState);
-	TSsmStateTransition stateTrans_shutdownAnySubState(shutdownState_Any, 1);
-
-	stateMan.RequestStateTransition(stateTrans_shutdownAnySubState, status_shutdownanysubstate);
-	RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state any substate %d\n "), status_shutdownanysubstate.Int());
-
-	stateMan.RequestStateTransitionCancel();
-	
-	iFileWriteStream.WriteInt32L(status_shutdownanysubstate.Int());
-	if (status_shutdownanysubstate.Int() == KErrCancel)
-		{
-		CurrentSystemStateL();
-		RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state any substate completed %d Expected -3\n "), status_shutdownanysubstate.Int());
-		}
-	else
-		User::Leave(KTestAppFailure);
-
-	//Scenario 3 - Request for three state changes(1. shutdown state 2. invalid state 3. fail state) one after the other 
-	// i.e., second request is issued once first one is completed and the third one is issued after the second request is completed.
-	// Cancel the third request.
-	// first request to the shutdown state will be completed with KErrNone 
-	// second request to transit to the fail state will be completed with KErrNotSupported
-	// third request to transit to the fail state will be completed with KErrCancel
-	RDebug::Print(_L("\nScenario 3 \n"));
-
-	TRequestStatus status;
-	stateMan.RequestStateTransition(stateTrans_Shutdowncritical, status);
-	RDebug::Print(_L("\n Start First RequestStateTransition from Normal to shutdown state %d\n "), status.Int());
-	
-	User::WaitForRequest(status);
-	iFileWriteStream.WriteInt32L(status.Int());
-	if (status.Int() == KErrNone)
-		{
-		CurrentSystemStateL();
-		RDebug::Print(_L("\n First RequestStateTransition from Normal to shutdown state completes with %d Expected 0\n "), status.Int());
-		}
-	else
-		User::Leave(KTestAppFailure);
-
-	TRequestStatus status1;
-	TSsmState state(10, KSsmAnySubState);
-	TSsmStateTransition stateTrans_InvalidState(state, 1);
-
-	stateMan.RequestStateTransition(stateTrans_InvalidState, status1);
-	RDebug::Print(_L("\n Start Second RequestStateTransition from shutdown to invalid state %d\n "), status1.Int());
-
-	User::WaitForRequest(status1);
-
-	iFileWriteStream.WriteInt32L(status1.Int());
-	if (status1.Int() == KErrNotSupported)
-		{
-		CurrentSystemStateL();
-		RDebug::Print(_L("\n Second RequestStateTransition from shutdown to invalid state completes %d Expected -5\n "), status1.Int());
-		}
-	else
-		User::Leave(KTestAppFailure);
-
-	TRequestStatus status2;
-	state.Set(ESsmFail, KSsmAnySubState);
-	TSsmStateTransition stateTrans3(state, 1);
-
-	stateMan.RequestStateTransition(stateTrans3, status2);
-	RDebug::Print(_L("\n Start Third RequestStateTransition from Shutdown to fail state %d\n "), status2.Int());
-
-	stateMan.RequestStateTransitionCancel();
-	User::WaitForRequest(status2);
-
-	iFileWriteStream.WriteInt32L(status2.Int());
-	if (status2.Int() == KErrCancel)
-		{
-		CurrentSystemStateL();
-		RDebug::Print(_L("\n Third RequestStateTransitionCancel from Shutdown to fail state completes %d Expected -3\n "), status2.Int());
-		}
-	else
-		User::Leave(KTestAppFailure);
-	
-	//Scenario 4 - The system is now in shutdown state, request for state transition to normal state.
-	// request to transit to the normal state will be completed with KErrNotSupported
-	RDebug::Print(_L("\nScenario 4 \n"));
-	
-	TSsmState state_Normal(ESsmNormal, KSsmAnySubState);
-	TSsmStateTransition stateTrans_NormalState(state_Normal, 1);
-
-	stateMan.RequestStateTransition(stateTrans_NormalState, status1);
-	RDebug::Print(_L("\n RequestStateTransition from Shutdown to normal state %d\n "), status1.Int());
-	
-	User::WaitForRequest(status1);
-
-	iFileWriteStream.WriteInt32L(status1.Int());
-	if (status1.Int() == KErrNotSupported)
-		{
-		CurrentSystemStateL();
-		RDebug::Print(_L("\n RequestStateTransition from Shutdown to normal state completes %d Expected -5\n "), status1.Int());
-		}
-	else
-		User::Leave(KTestAppFailure);
-
-	//Scenario 5 - The system is now in shutdown state, request for state transition to fail state.
-	// request to transit to the fail state will be completed with KErrNone
-	RDebug::Print(_L("\nScenario 5 \n"));
-	
-	stateMan.RequestStateTransition(stateTrans3, status1);
-	RDebug::Print(_L("\n RequestStateTransition from Shutdown to fail state %d\n "), status1.Int());
-	
-	User::WaitForRequest(status1);
-
-	iFileWriteStream.WriteInt32L(status1.Int());
-	if (status1.Int() == KErrNone)
-		{
-		CurrentSystemStateL();
-		RDebug::Print(_L("\n RequestStateTransition from Shutdown to fail state completes %d Expected 0\n "), status1.Int());
-		}
-	else
-		User::Leave(KTestAppFailure);
-	}
-
-void CStateTranFromShutdown::StartTestL()
-	{
-	CActiveScheduler* sched=new(ELeave) CActiveScheduler;
-	CleanupStack::PushL(sched);
-	CActiveScheduler::Install(sched);
-
-	// Notifier used to get the notification when system gets to fail state
-	CSsmStateAwareSession* notif_for_failstate = CSsmStateAwareSession::NewLC(KSM2UiServicesDomain3);
-	notif_for_failstate->AddSubscriberL(*this);
-
-	// This async callback is used to start the state transition test once system enters to normal state.
-	iAsyncCallbackForStartTest =  new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
-	TCallBack startTestCallback(StartTest, this);
-	iAsyncCallbackForStartTest->Set(startTestCallback);
-
-	// call the callback function which keeps looping until the system state gets into normal state.
-	iAsyncCallbackForStartTest->CallBack();
-	
-	RProcess::Rendezvous(KErrNone);
-	sched->Start();
-
-	CleanupStack::PopAndDestroy(2);
-	}
-
-void CStateTranFromShutdown::CallStopSchedulerL()
-	{
-	TSsmState currenState;
-	currenState = iSsmStateAwareSess.State();
-
-	TUint16 currentMainState = currenState.MainState();
-	// Active scheduler is stopped once the system goes into fail state, else it issues a request for callback again
-	if (currentMainState == ESsmFail)
-		{
- 		RDebug::Print(_L("\nStateTran Test: Stop Active Scheduler\n"));
-		iFileWriteStream.WriteUint16L(currentMainState);
-		CActiveScheduler::Stop();
-		}
-	else
-		{
-		iAsyncCallbackForStopScheduler->CallBack();
-		}
-	}
-
-TInt E32Main()
-	{
-	__UHEAP_MARK;
-
-	CTrapCleanup* cleanup=CTrapCleanup::New();
-	TInt r=KErrNoMemory;
-	TInt testCompletionReason = KErrNone;
-	if (cleanup)
-		{
-		__UHEAP_MARK;
-		CStateTranFromShutdown* stateTran = NULL;
-		TRAP(r, stateTran = CStateTranFromShutdown::NewL());
-		if (r == KErrNone)
-			{
-			TRAP(testCompletionReason, stateTran->StartTestL());
-			// testCompletionReason is the reason with which the test case completes.
-			TRAP(r, stateTran->CommitTestResultsL(testCompletionReason));
-			delete stateTran;
-			}
-		delete cleanup;
-		__UHEAP_MARKEND;
-
-		if (r != KErrNone)
-			{
-			User::Panic(_L("tgsastatetranfromnormalPanic"), r);
-			}
-		}
-
-	__UHEAP_MARKEND;
-	return r;
-	}
-
-
-
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsastatetranfromstartup.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsastatetranfromstartup.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -43,15 +43,8 @@
 
 public:
 	void DoTestStateTranFromStartupL();
-	void DoTestStateTranFromStartuptoShutdownL();
 	};
 
-static TInt StopScheduler(TAny* aStateTranFromStartup)
- 	{
- 	CStateTranFromStartup* stateTran = reinterpret_cast<CStateTranFromStartup*>(aStateTranFromStartup);
- 	TRAPD(err,stateTran->CallStopSchedulerL());
- 	return err;
- 	}
 
 CStateTranFromStartup* CStateTranFromStartup::NewL()
 	{
@@ -73,17 +66,9 @@
 	{
 	}
 
-// Tests the Fail state transitions from startup under different scenarios
+// Tests Invalid state transition from startup
 void CStateTranFromStartup::DoTestStateTranFromStartupL()
 	{
-	CActiveScheduler* sched=new(ELeave) CActiveScheduler;
-	CleanupStack::PushL(sched);
-	CActiveScheduler::Install(sched);
-	
-	// Notifier used to get the notification when system gets to fail state
-	CSsmStateAwareSession* notif_for_failstate = CSsmStateAwareSession::NewLC(KSM2UiServicesDomain3);
-	notif_for_failstate->AddSubscriberL(*this);
-
 	RSsmStateManager stateMan;
 	TInt err = stateMan.Connect();
 	CleanupClosePushL(stateMan);
@@ -114,170 +99,17 @@
 	if (status.Int() == KErrNotSupported)
 		{
 		CurrentSystemStateL();
-		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from Normal to Invalid state completes with %d Expected -5\n "), status.Int());
-		}
-	else
-		{
-		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from Normal to Invalid state Failed"));
-		User::Leave(KTestAppFailure);
-		}
-
-	//Scenario 2 - Request for state change from Startup to fail state with invalid substate
-	RDebug::Print(_L("\nStateTran Test: Scenario 2 \n"));
-	const TInt KInvalidFailSubState = 20;
-	state.Set(ESsmFail, KInvalidFailSubState);
-	TSsmStateTransition stateTrans_InvalidSubState(state, 1);
-
-	stateMan.RequestStateTransition(stateTrans_InvalidSubState, status);
-	RDebug::Print(_L("\nStateTran Test: Start RequestStateTransition from Startup to fail state with invalid substate %d\n "), status.Int());
-	
-	User::WaitForRequest(status);
-	iFileWriteStream.WriteInt32L(status.Int());
-	if (status.Int() == KErrNotSupported)
-		{
-		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from Startup to fail state with invalid substate completes with %d Expected -5\n "), status.Int());
-		CurrentSystemStateL();
-		}
-	else
-		{
-		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from Startup to fail state with invalid substate Failed"));
-		User::Leave(KTestAppFailure);		
-		}
-
-	//Scenario 3 - Request for state change from Startup to shutdown invalid substate
-	RDebug::Print(_L("\nStateTran Test: Scenario 3 \n"));
-	TRequestStatus status1;
-	const TInt KInvalidShutdownSubState = 15;
-	TSsmState shutdownState_Invalid(ESsmShutdown, KInvalidShutdownSubState);
-	TSsmStateTransition stateTrans_ShutdownInvalid(shutdownState_Invalid, 1);
-
-	stateMan.RequestStateTransition(stateTrans_ShutdownInvalid, status);
-	RDebug::Print(_L("\nStateTran Test: Start RequestStateTransition from Startup to Shutdown state with Invalid Substate %d\n "), status.Int());
-	
-	User::WaitForRequest(status);
-	iFileWriteStream.WriteInt32L(status.Int());
-	if (status.Int() == KErrNotSupported)
-		{
-		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from Startup to Shutdown state with invalid substate completes with %d Expected -5\n "), status.Int());
-		CurrentSystemStateL();
-		}
-	else
-		{
-		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from Startup to fail state with invalid substate Failed"));
-		User::Leave(KTestAppFailure);		
-		}
-
-	//Scenario 4 - Request for two state changes to fail state one after the other
-	//The first request to the fail state will be completed with KErrCancel and the second request to transit to the fail state will be completed with KErrNone.
-	RDebug::Print(_L("\nStateTran Test: Scenario 4 \n"));
-	state.Set(ESsmFail, KSsmAnySubState);
-	TSsmStateTransition stateTrans_fail(state, 1);
-
-	stateMan.RequestStateTransition(stateTrans_fail, status);
-	RDebug::Print(_L("\nStateTran Test: Start First RequestStateTransition from Startup to fail state %d\n "), status.Int());
-	
-	stateMan.RequestStateTransition(stateTrans_fail, status1);
-	RDebug::Print(_L("\nStateTran Test: Start Second RequestStateTransition from Startup to fail state %d\n "), status1.Int());
-	
-	User::WaitForRequest(status);
-	iFileWriteStream.WriteInt32L(status.Int());
-	if (status.Int() == KErrCancel)
-		{
-		RDebug::Print(_L("\nStateTran Test: First RequestStateTransition from Startup to fail state completes with %d Expected -3\n "), status.Int());
-		CurrentSystemStateL();
+		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from Startup to Invalid state completes with %d Expected -5\n "), status.Int());
 		}
 	else
 		{
-		RDebug::Print(_L("\nStateTran Test: First RequestStateTransition from Startup to fail state Failed"));
-		User::Leave(KTestAppFailure);		
-		}
-
-	User::WaitForRequest(status1);
-	iFileWriteStream.WriteInt32L(status1.Int());
-	if (status1.Int() == KErrNone)
-		{
-		RDebug::Print(_L("\nStateTran Test: Second RequestStateTransition from Startup to fail state completes %d Expected 0\n "), status1.Int());
-		CurrentSystemStateL();
-		}
-	else
-		{
-		RDebug::Print(_L("\nStateTran Test: Second RequestStateTransition from Startup to fail state Failed"));
-		User::Leave(KTestAppFailure);		
-		}
-
-	// This async callback is used to stop the scheduler once the system goes into fail state.
-	iAsyncCallbackForStopScheduler =  new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
-	TCallBack stopSchedulerCallback(StopScheduler, this);
-	iAsyncCallbackForStopScheduler->Set(stopSchedulerCallback);
-
-	iAsyncCallbackForStopScheduler->CallBack();
-	sched->Start();
-
-	CleanupStack::PopAndDestroy(3);
-	}
-
-// Tests the Shutdown state transitions from startup scenario
-void CStateTranFromStartup::DoTestStateTranFromStartuptoShutdownL()
-	{
-	RDebug::Printf("I am in CStateTranFromStartup::DoTestStateTranFromStartupShutdownL");
-	CActiveScheduler* sched=new(ELeave) CActiveScheduler;
-	CleanupStack::PushL(sched);
-	CActiveScheduler::Install(sched);
-	
-	// Notifier used to get the notification when system gets to Shutdown state
-	CSsmStateAwareSession* notif_for_shutdownstate = CSsmStateAwareSession::NewLC(KSM2UiServicesDomain3);
-	notif_for_shutdownstate->AddSubscriberL(*this);
-
-	RSsmStateManager stateMan;
-	TRequestStatus status;
-	TInt err = stateMan.Connect();
-	CleanupClosePushL(stateMan);
-	if (err == KErrNone)
-		RDebug::Print(_L("\nStateTran Shutdown Test: RSsmStateManager sess Connect %d\n"), err);
-	else
-		{
-		RDebug::Print(_L("\nStateTran Shutdown Test: Unable to connect to RSsmStateManager sess\n"));	
+		RDebug::Print(_L("\nStateTran Test: RequestStateTransition from Startup to Invalid state Failed"));
 		User::Leave(KTestAppFailure);
 		}
 
-		// Creates and open the result file for streaming
-	err = iFileWriteStream.Replace(iFs, KGsaTestStateTranFromStartupResult, EFileWrite);
-	RDebug::Print(_L("\nStateTran Shutdown Test: iFileWriteStream open with %d\n"), err);
-
-	CurrentSystemStateL();
-
-	RDebug::Print(_L("\nStateTran Shutdown Test Scenario \n"));
-	TSsmState shutdownState_Critical(ESsmShutdown, ESsmShutdownSubStateCritical);
-	TSsmStateTransition stateTrans_ShutdownCritical(shutdownState_Critical, 1);
+	CleanupStack::PopAndDestroy(&stateMan);
+	}
 
-	stateMan.RequestStateTransition(stateTrans_ShutdownCritical, status);
-	RDebug::Print(_L("\nStateTran Shutdown Test: Start RequestStateTransition from Startup to shutdown state %d\n "), status.Int());
-		
-	User::WaitForRequest(status);
-	iFileWriteStream.WriteInt32L(status.Int());
-	RDebug::Printf("The value of status is %d",status.Int());
-	if (status.Int() == KErrNone)
-		{
-		RDebug::Print(_L("\nStateTran Shutdown Test: RequestStateTransition from Startup to Shutdown state completes with %d Expected 0\n "), status.Int());
-		CurrentSystemStateL();
-		}
-	else
-		{
-		RDebug::Print(_L("\nStateTran Shutdown Test: RequestStateTransition from Startup to Shutdown state Failed"));
-		User::Leave(KTestAppFailure);		
-		}
-
-	// This async callback is used to stop the scheduler once the system goes into Shutdown state.
-	iAsyncCallbackForStopScheduler =  new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
-	TCallBack stopSchedulerCallback(StopScheduler, this);
-	iAsyncCallbackForStopScheduler->Set(stopSchedulerCallback);
-
-	iAsyncCallbackForStopScheduler->CallBack();
-	sched->Start();
-
-	CleanupStack::PopAndDestroy(3);
-
-	}
 
 TInt E32Main()
 	{
@@ -294,14 +126,7 @@
 		TRAP(r, stateTran = CStateTranFromStartup::NewL());
 		if (r == KErrNone)
 			{
-			if(argc>0)
-				{
-				TRAP(testCompletionReason, stateTran->DoTestStateTranFromStartuptoShutdownL());
-				}
-			else
-				{
-				TRAP(testCompletionReason, stateTran->DoTestStateTranFromStartupL());
-				}
+			TRAP(testCompletionReason, stateTran->DoTestStateTranFromStartupL());
 			// testCompletionReason is the reason with which the test case completes.
 			TRAP(r, stateTran->CommitTestResultsL(testCompletionReason));
 			
--- a/sysstatemgmt/systemstateplugins/test/tintgsapolicy/src/tgsastatetrantoshutdown.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +0,0 @@
-// Copyright (c) 2008-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:
-//
-
-/**
- @file
- @test
- @internalComponent - Internal Symbian test code
-*/
-
-#include "gsatestapps.h"
-
-#include <ssm/ssmstates.hrh>
-#include <ssm/ssmsubstates.hrh>
-#include <ssm/ssmstate.h>
-#include <ssm/ssmstatetransition.h>
-#include <ssm/ssmstatemanager.h>
-#include <ssm/ssmstateawaresession.h>
-#include <ssm/ssmdomaindefs.h>
-
-#include "tgsastatetran_base.h"
-
-class CStateTranToShutdown : public CTGsaStateTransition
-	{
-public:
-	static CStateTranToShutdown* NewL();
-	~CStateTranToShutdown();
-	void StartTestL();
-
-private:
-	void ConstructL();
-	CStateTranToShutdown();
-
-public:
-	void DoTestStateTranToShutdownL();
-	};
-
-static TInt StopScheduler(TAny* aStateTranToShutdown)
- 	{
- 	CStateTranToShutdown* stateTran = reinterpret_cast<CStateTranToShutdown*>(aStateTranToShutdown);
- 	TRAPD(err,stateTran->CallStopSchedulerL());
- 	return err;
- 	}
-
-static TInt StartTest(TAny* aStateTranToShutdown)
- 	{
- 	TInt testCompletionReason = KErrNone;
- 	CStateTranToShutdown* stateTran = reinterpret_cast<CStateTranToShutdown*>(aStateTranToShutdown);
- 	TBool stateTest = stateTran->DoStartStateTranTest();
- 	if (stateTest)
-		TRAP(testCompletionReason, stateTran->DoTestStateTranToShutdownL());
-
- 	return testCompletionReason;
- 	}
-
-CStateTranToShutdown* CStateTranToShutdown::NewL()
-	{
-	CStateTranToShutdown* self = new(ELeave) CStateTranToShutdown();
-	self->ConstructL();
-	return self;
-	}
-
-void CStateTranToShutdown::ConstructL()
-	{
-	CTGsaStateTransition::ConstructL(KGsaTestStateTranResultFilePath);
-	}
-
-CStateTranToShutdown::~CStateTranToShutdown()
-	{
-	}
-
-CStateTranToShutdown::CStateTranToShutdown()
-	{
-	}
-
-// Tests the Shutdown state transitions under different scenarios
-void CStateTranToShutdown::DoTestStateTranToShutdownL()
-	{
-	// This async callback is used to stop the scheduler once the system goes into fail state.
-	iAsyncCallbackForStopScheduler =  new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
-	TCallBack stopSchedulerCallback(StopScheduler, this);
-	iAsyncCallbackForStopScheduler->Set(stopSchedulerCallback);
-
-	// call the callback function which keeps looping until the system state gets into fail state.
-	iAsyncCallbackForStopScheduler->CallBack();
-
-	RSsmStateManager stateMan;
-	TInt err = stateMan.Connect();
-	if (err == KErrNone)
-		RDebug::Print(_L("\nStateTran Test: RSsmStateManager sess Connect %d\n"), err);
-	else
-		{
-		RDebug::Print(_L("\nStateTran Test: Unable to connect to RSsmStateManager sess\n"));	
-		User::Leave(KTestAppFailure);
-		}
-
-	// Creates and open the result file for streaming
-	err = iFileWriteStream.Replace(iFs, KGsaTestStateTranToShutdownResult, EFileWrite);
-	RDebug::Print(_L("\nStateTran Test: iFileWriteStream open with %d\n"), err);
-
-
-	// Gets the Current system state before starting the test
-	CurrentSystemStateL();
-
-	//Scenario 1 - Request for state transition to shutdown state - invalid substate
-	// request to transit to the shutdown state will be completed with KErrNotSupported
-	RDebug::Print(_L("\nScenario 1 \n"));
-
-	TRequestStatus status_invalidsubstate;
-	TSsmState shutdownState_Invalid(ESsmShutdown, 150);
-	TSsmStateTransition stateTrans_Invalid(shutdownState_Invalid, 1);
-
-	stateMan.RequestStateTransition(stateTrans_Invalid, status_invalidsubstate);
-	RDebug::Print(_L("\n Start RequestStateTransition from Normal to shutdown state with invalid substate %d\n "), status_invalidsubstate.Int());
-	
-	User::WaitForRequest(status_invalidsubstate);
-	iFileWriteStream.WriteInt32L(status_invalidsubstate.Int());
-	if (status_invalidsubstate.Int() == KErrNotSupported)
-		{
-		CurrentSystemStateL();
-		RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state with invalid substate completes with %d Expected -5\n "), status_invalidsubstate.Int());
-		}
-	else
-		User::Leave(KTestAppFailure);
-
-	//Scenario 2 - Request for state transition to shutdown state - critical substate(Restart)
-	// Request for state transition to shutdown state - critical substate(Standby)
-	// first request to transit to the shutdown state critical substate(Restart)will be completed with KErrCancel
-	// second request to transit to the shutdown state critical substate(Standby)will be completed with KErrNone
-	RDebug::Print(_L("\nScenario 2 \n"));
-	TRequestStatus status_shutdowncritsubstate;
-	TSsmState shutdownState_Critical(ESsmShutdown, ESsmShutdownSubStateCritical);
-	TSsmStateTransition stateTrans_Shutdowncritical_Restart(shutdownState_Critical, 3);
-
-	stateMan.RequestStateTransition(stateTrans_Shutdowncritical_Restart, status_shutdowncritsubstate);
-	RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state critical substate Restart%d\n "), status_shutdowncritsubstate.Int());
-
-	TRequestStatus status_shutdowncritsubstate1;
-	TSsmStateTransition stateTrans_Shutdowncritical_Standby(shutdownState_Critical, 1);
-
-	stateMan.RequestStateTransition(stateTrans_Shutdowncritical_Standby, status_shutdowncritsubstate1);
-	RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state critical substate Standby %d\n "), status_shutdowncritsubstate.Int());
-
-	User::WaitForRequest(status_shutdowncritsubstate1);
-	iFileWriteStream.WriteInt32L(status_shutdowncritsubstate1.Int());
-	if (status_shutdowncritsubstate1.Int() == KErrNone)
-		{
-		RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state critical substate completed Standby %d Expected 0\n "), status_shutdowncritsubstate1.Int());
-		CurrentSystemStateL();
-		}
-	else
-		User::Leave(KTestAppFailure);
-
-	User::WaitForRequest(status_shutdowncritsubstate);
-	iFileWriteStream.WriteInt32L(status_shutdowncritsubstate.Int());
-	if (status_shutdowncritsubstate.Int() == KErrCancel)
-		{
-		CurrentSystemStateL();
-		RDebug::Print(_L("\n RequestStateTransition from Normal to shutdown state critical substate completed Restart %d Expected -3\n "), status_shutdowncritsubstate.Int());
-		}
-	else
-		User::Leave(KTestAppFailure);
-
-	}
-
-void CStateTranToShutdown::StartTestL()
-	{
-	CActiveScheduler* sched=new(ELeave) CActiveScheduler;
-	CleanupStack::PushL(sched);
-	CActiveScheduler::Install(sched);
-
-	// Notifier used to get the notification when system gets to fail state
-	CSsmStateAwareSession* notif_for_failstate = CSsmStateAwareSession::NewLC(KSM2UiServicesDomain3);
-	notif_for_failstate->AddSubscriberL(*this);
-
-	// This async callback is used to start the state transition test once system enters to normal state.
-	iAsyncCallbackForStartTest =  new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
-	TCallBack startTestCallback(StartTest, this);
-	iAsyncCallbackForStartTest->Set(startTestCallback);
-
-	// call the callback function which keeps looping until the system state gets into normal state.
-	iAsyncCallbackForStartTest->CallBack();
-	
-	RProcess::Rendezvous(KErrNone);
-	sched->Start();
-
-	CleanupStack::PopAndDestroy(2);
-	}
-
-TInt E32Main()
-	{
-	__UHEAP_MARK;
-
-	CTrapCleanup* cleanup=CTrapCleanup::New();
-	TInt r=KErrNoMemory;
-	TInt testCompletionReason = KErrNone;
-	if (cleanup)
-		{
-		__UHEAP_MARK;
-		CStateTranToShutdown* stateTran = NULL;
-		TRAP(r, stateTran = CStateTranToShutdown::NewL());
-		if (r == KErrNone)
-			{
-			TRAP(testCompletionReason, stateTran->StartTestL());
-			// testCompletionReason is the reason with which the test case completes.
-			TRAP(r, stateTran->CommitTestResultsL(testCompletionReason));
-			delete stateTran;
-			}
-		delete cleanup;
-		__UHEAP_MARKEND;
-
-		if (r != KErrNone)
-			{
-			User::Panic(_L("tgsastatetrantoshutdownpanic"), r);
-			}
-		}
-
-	__UHEAP_MARKEND;
-	return r;
-	}
-
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tunitadptplugin/group/sspluginstest_tadaptation.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,31 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Ssplugins_TUnitAdptPlugin EN"}
+
+; Vendor name
+: "Ssplugins_TUnitAdptPlugin"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitadptplugin\scripts\sspluginstest_adaptation_emergency.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_emergency.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitadptplugin\scripts\sspluginstest_adaptation_misc.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_misc.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitadptplugin\scripts\sspluginstest_adaptation_rtc.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_rtc.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitadptplugin\scripts\sspluginstest_adaptation_sim.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_sim.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitadptplugin\scripts\sspluginstest_adaptation_state.script"-"c:\devicesrv\sspluginstest\sspluginstest_adaptation_state.script"
--- a/sysstatemgmt/systemstateplugins/test/tunitadptplugin/group/tadaptation_plugin.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitadptplugin/group/tadaptation_plugin.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,11 +22,10 @@
 
 TARGET			tadaptation_plugin.exe
 TARGETTYPE		exe
-TARGETPATH	/sys/bin
-UID				0x1000007A 0x1028359E
+TARGETPATH		/sys/bin
+UID				0x1000007A 0x2000D75B
 VENDORID		0x70000001
 
-//CAPABILITY 		All -Tcb
 CAPABILITY 		PowerMgmt ReadDeviceData WriteDeviceData ProtServ SwEvent ReadUserData WriteUserData
 
 
--- a/sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/temergencycallrf_adaptationplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/temergencycallrf_adaptationplugin_step.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,8 +22,12 @@
 
 
 #include <s32mem.h>
+#include <e32property.h>
 #include "temergencycallrf_adaptationplugin_step.h"
 
+const TUint32 KEmergencyCallRfAdaptationPluginPropertyKey = 0x2000E657;
+const TUid KPropertyCategory={0x2000D75B};
+
 //
 // Run the tests
 //
@@ -73,10 +77,13 @@
 //from CAdaptationTestBase
 TVerdict CTestEmergencyCallRfAdaptationPlugin::doTestStepL()
 	{
-	TInt err = KErrNone;
-
 	__UHEAP_MARK;
 	
+	TInt err = RProperty::Define(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, RProperty::EInt);
+	TEST((KErrNone == err) || (KErrAlreadyExists == err));
+	err = RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 1);
+	TEST(KErrNone == err);
+	
 	TRAP(err, TestActivateRfForEmergencyCall());
 	TEST(iStatus.Int() == KErrDisconnected);
 	TEST(err == KErrNone);
@@ -97,6 +104,8 @@
 	TestCancel();
 	//TestRelease();			// have to test this part too ...
 
+	err = RProperty::Delete(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey);
+	TEST(KErrNone == err);
 	__UHEAP_MARKEND;
 
 	return TestStepResult();
--- a/sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tmisc_adaptationplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tmisc_adaptationplugin_step.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,7 +20,7 @@
 */
 
 
-
+#include <e32property.h>
 #include <s32mem.h>
 #include "tmisc_adaptationplugin_step.h"
 
@@ -28,6 +28,9 @@
 // Run the tests
 //
 
+const TUid KPropertyCategory={0x2000D75B};              // tcustomcmd_server SID = KSsmServerName SID (changed in tcustomcmd_server.mmp file)
+const TUint32 KMiscPluginPropertyKey = 0x2000E658;
+
 CTestMiscAdaptationPlugin::CTestMiscAdaptationPlugin()
 	:CAdaptationTestBase(KTCTestMiscAdaptationPlugin)
 	{
@@ -174,6 +177,12 @@
 	{
 	__UHEAP_MARK;
 	
+	TInt err = RProperty::Define(KPropertyCategory, KMiscPluginPropertyKey, RProperty::EInt);
+	INFO_PRINTF2(_L("Defining KMiscPluginPropertyKey returns %d"), err);
+	TEST((KErrNone == err) || (KErrAlreadyExists == err));
+	err = RProperty::Set(KPropertyCategory, KMiscPluginPropertyKey, 1);
+	TEST(KErrNone == err);
+		
 	TestSecurityStateChange();
 
 	TestGetGlobalStartupMode();
@@ -200,7 +209,10 @@
 
 	TestCancel();
 	//TestRelease();			// have to test this part too ...
-
+	
+	err = RProperty::Delete(KPropertyCategory, KMiscPluginPropertyKey);
+	TEST(KErrNone == err);
+	
 	__UHEAP_MARKEND;
 
 	return TestStepResult();
--- a/sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/trtc_adaptationplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/trtc_adaptationplugin_step.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,14 +20,16 @@
 */
 
 
-
+#include <e32property.h>
 #include <s32mem.h>
 #include "trtc_adaptationplugin_step.h"
 
 //
 // Run the tests
 //
-
+_LIT (KExeToDefineTestPS, "\\sys\\bin\\definetestps.exe");
+const TUint32 KRtcAdaptationPluginPropertyKey = 0x2000D76C;
+const TUid KPropertyCategory={0x2000D75B};
 
 CTestRtcAdaptationPlugin::CTestRtcAdaptationPlugin()
 	:CAdaptationTestBase(KTCTestRtcAdaptationPlugin)
@@ -53,7 +55,7 @@
 	if(iSsmRtcAdaptation.Handle())
 		{
 		TEST(KErrNotSupported == status.Int());	
-		INFO_PRINTF3(_L("CTestRtcAdaptationPlugin::TestValidateRtc completed with %d error : expected %d>"),status.Int(),KErrNone);	
+		INFO_PRINTF3(_L("CTestRtcAdaptationPlugin::TestValidateRtc completed with %d error : expected %d>"),status.Int(),KErrNotSupported);	
 		}
 	else
 		{
@@ -74,7 +76,7 @@
 	if(iSsmRtcAdaptation.Handle())
 		{
 		TEST(KErrNotSupported == status.Int());	
-		INFO_PRINTF3(_L("CTestRtcAdaptationPlugin::TestSetWakeupAlarm completed with %d error : expected %d>"),status.Int(),KErrNone);	
+		INFO_PRINTF3(_L("CTestRtcAdaptationPlugin::TestSetWakeupAlarm completed with %d error : expected %d>"),status.Int(),KErrNotSupported);	
 		}
 	else
 		{
@@ -94,7 +96,7 @@
 	if(iSsmRtcAdaptation.Handle())
 		{
 		TEST(KErrNotSupported == status.Int());	
-		INFO_PRINTF3(_L("CTestRtcAdaptationPlugin::TestUnsetWakeupAlarm completed with %d error : expected %d>"),status.Int(),KErrNone);	
+		INFO_PRINTF3(_L("CTestRtcAdaptationPlugin::TestUnsetWakeupAlarm completed with %d error : expected %d>"),status.Int(),KErrNotSupported);	
 		}
 	else
 		{
@@ -114,9 +116,29 @@
 //from CAdaptationTestBase
 TVerdict CTestRtcAdaptationPlugin::doTestStepL()
 	{
-	TInt err = KErrNone;
-
 	__UHEAP_MARK;
+	
+	RProcess processHandle;
+    CleanupClosePushL(processHandle); 
+	        
+    //Start the test exe which defines startup related property keys 
+	            
+    TInt err = processHandle.Create(KExeToDefineTestPS, KNullDesC); 
+    INFO_PRINTF2(_L("Process creation returned : %d"), err);
+    User::LeaveIfError(err);
+	processHandle.Resume(); 
+	        
+	// wait for the newly created process to rendezvous 
+	TRequestStatus status; 
+	processHandle.Rendezvous(status); 
+	User::WaitForRequest(status); 
+	TInt retVal = status.Int(); 
+	INFO_PRINTF2(_L("iStatus.Int() returned : %d"), retVal); 
+	TEST(KErrNone == retVal); 
+	CleanupStack::PopAndDestroy();
+	
+    err = RProperty::Set(KPropertyCategory, KRtcAdaptationPluginPropertyKey, 1);
+    TEST(KErrNone == err);
 	TRAP(err, TestValidateRtc());
 	TEST(err == KErrNone);
 
@@ -142,7 +164,8 @@
 	TestCancel();
 	//TestRelease();			// have to test this part too ...
 
-
+    err = RProperty::Set(KPropertyCategory, KRtcAdaptationPluginPropertyKey, 0);
+    TEST(KErrNone == err);
 	__UHEAP_MARKEND;
 
 	return TestStepResult();
--- a/sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tsim_adaptationplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tsim_adaptationplugin_step.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,12 +22,14 @@
 
 
 #include <s32mem.h>
+#include <e32property.h>
 #include "tsim_adaptationplugin_step.h"
 
 //
 // Run the tests
 //
-
+const TUint32 KSimPluginPropertyKey = 0x2000D76B;
+const TUid KPropertyCategory={0x2000D75B};              // tcustomcmd_server SID = KSsmServerName SID (changed in tcustomcmd_server.mmp file)
 
 CTestSimAdaptationPlugin::CTestSimAdaptationPlugin()
 	:CAdaptationTestBase(KTCTestSimAdaptationPlugin)
@@ -102,10 +104,13 @@
 //from CAdaptationTestBase
 TVerdict CTestSimAdaptationPlugin::doTestStepL()
 	{
-	TInt err = KErrNone;
-
 	__UHEAP_MARK;
 	
+    TInt err = RProperty::Define(KPropertyCategory, KSimPluginPropertyKey, RProperty::EInt);
+    TEST((KErrNone == err) || (KErrAlreadyExists == err));
+    err = RProperty::Set(KPropertyCategory, KSimPluginPropertyKey, 1);
+    TEST(KErrNone == err);
+	
 	TRAP(err, TestGetSimOwned());
 	TEST(err == KErrNone);
 
@@ -128,6 +133,8 @@
 	TestGetCancel();
 	//TestRelease();			// have to test this part too ...
 
+    err = RProperty::Delete(KPropertyCategory, KSimPluginPropertyKey);
+    TEST(KErrNone == err);
 	__UHEAP_MARKEND;
 
 	return TestStepResult();
--- a/sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tstate_adaptationplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tstate_adaptationplugin_step.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,9 +22,13 @@
 
 
 #include <s32mem.h>
+#include <e32property.h>
 #include <ssm/ssmadaptation.h>
 #include "tstate_adaptationplugin_step.h"
 
+const TUint32 KStateAdaptationPluginPropertyKey = 0x2000D76A;
+const TUid KPropertyCategory={0x2000D75B};
+
 typedef MStateAdaptation* (*TFuncNewL)();
 
 CTestStateAdaptationPlugin::CTestStateAdaptationPlugin()
@@ -181,7 +185,10 @@
 //from CAdaptationTestBase
 TVerdict CTestStateAdaptationPlugin::doTestStepL()
 	{
-	TInt err = KErrNone;
+	TInt err = RProperty::Define(KPropertyCategory, KStateAdaptationPluginPropertyKey, RProperty::EInt);
+	TEST((KErrNone == err) || (KErrAlreadyExists == err));
+	err = RProperty::Set(KPropertyCategory, KStateAdaptationPluginPropertyKey, 1);
+	TEST(KErrNone == err);
 	
 	__UHEAP_MARK;
 	TRAP(err, TestRequestCoopSysStateChangeL());
@@ -256,6 +263,8 @@
 
 	TestNotifyCancel();
 	TEST(err == KErrNone);
-
+	
+	err = RProperty::Delete(KPropertyCategory, KStateAdaptationPluginPropertyKey);
+	TEST(KErrNone == err);
 	return TestStepResult();
 	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tunitconditionevaluator/group/sspluginstest_tunitconditionevaluator.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,28 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Ssplugins_TUnitConditionEvaluator EN"}
+
+; Vendor name
+: "Ssplugins_TUnitConditionEvaluator"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitconditionevaluator\scripts\sspluginstest_cndeval_conditionevaluator.script"-"c:\devicesrv\sspluginstest\sspluginstest_cndeval_conditionevaluator.script"
+
--- a/sysstatemgmt/systemstateplugins/test/tunitconditionevaluator/resource/tunitconditionevaluator.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitconditionevaluator/resource/tunitconditionevaluator.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -176,4 +176,5 @@
 	{
 	key = 0x2;
 	bitmask = 0x0010;
-	}
\ No newline at end of file
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tunitgsapolicy/group/sspluginstest_tgsa.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,31 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Ssplugins_TGsa EN"}
+
+; Vendor name
+: "Ssplugins_TGsa"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitgsapolicy\scripts\sspluginstest_gsa_startup.script"-"c:\devicesrv\sspluginstest\sspluginstest_gsa_startup.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitgsapolicy\scripts\sspluginstest_gsa_normal.script"-"c:\devicesrv\sspluginstest\sspluginstest_gsa_normal.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitgsapolicy\scripts\sspluginstest_gsa_shutdown.script"-"c:\devicesrv\sspluginstest\sspluginstest_gsa_shutdown.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitgsapolicy\scripts\sspluginstest_gsa_fail.script"-"c:\devicesrv\sspluginstest\sspluginstest_gsa_fail.script"
+
--- a/sysstatemgmt/systemstateplugins/test/tunitgsapolicy/group/tgsa_server.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitgsapolicy/group/tgsa_server.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -34,6 +34,7 @@
 USERINCLUDE		../inc
 USERINCLUDE		../../../gsapolicy/inc
 USERINCLUDE		../../../localinc
+USERINCLUDE		../../../../ssmpolicyplugins/inc
 
 SOURCEPATH		../src
 SOURCE			tgsa_server.cpp
--- a/sysstatemgmt/systemstateplugins/test/tunitgsapolicy/src/tgsa_step_fail.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitgsapolicy/src/tgsa_step_fail.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,12 +27,19 @@
 #include <ssm/ssmcommandlist.h>
 #include <ssm/ssmcmd.hrh>
 #include <ssm/ssmcommand.h>
+#include "ssmsubstateext.hrh"
 
 #include "tgsa_step_fail.h"
 
-TSsmCommandType ArrFail[] = { ESsmCmdPublishSystemState, ESsmCmdPersistHalAttributes, 
-							ESsmCmdFinaliseDrives, ESsmCmdPowerOff };
-
+TSsmCommandType ArrFail[] = {   ESsmCmdCustomCommand,       //r_cmd_sastate
+                                ESsmCmdPublishSystemState,  //r_cmd_publishstate
+                                ESsmCmdSetPAndSKey,         //r_cmd_psstate
+                                ESsmCmdCustomCommand,       //r_cmd_cancelmonitoring
+                                ESsmCmdSetPAndSKey,         //r_cmd_killsplash
+                                ESsmCmdCustomCommand,       //r_cmd_contactservice
+                                ESsmCmdStartApp,            //r_cmd_sysap
+                                ESsmCmdMultipleWait         //r_cmd_multiwaitforever
+                                };
 CGsaFailTest::~CGsaFailTest()
 	{
 	}
@@ -112,8 +119,10 @@
  void CGsaFailTest::doTestPrepareCommandListL()
 	{
 	INFO_PRINTF1(_L("> CGsaFailTest::doTestPrepareCommandListL"));
-	TestPrepareCommandListL(ESsmFail ,KSsmAnySubState, KErrNone);
-	TestPrepareCommandListL(ESsmFail ,KSsmAnySubState, KErrNone);
+	//The default substate in the actual (fail policy) is mapped to 
+	//ESsmStateFail = 0x30
+	//Hence testing for the same.
+	TestPrepareCommandListL(ESsmFail ,ESsmStateFail , KErrNone);
 	TestPrepareCommandListL(ESsmFail ,100, KErrNotFound);
 	}
 
@@ -125,7 +134,7 @@
 	{
 	INFO_PRINTF1(_L("> CGsaFailTest::doTestCommandListL"));
 
-	TestCommandListL(ESsmFail, KSsmAnySubState, (sizeof(ArrFail)/sizeof(ArrFail[0])));
+	TestCommandListL(ESsmFail, ESsmStateFail, (sizeof(ArrFail)/sizeof(ArrFail[0])));
 	}
 
 /**
@@ -137,11 +146,11 @@
 	{
 	CGsaStatePolicyFail* policy = CreateAndInitializeFailPolicyLC();
 
-	TSsmState state(ESsmFail, KSsmAnySubState);
+	TSsmState state(ESsmFail, ESsmStateFail);
 	TSsmState result(0, 0);
 	TestGetNextState(policy, state, KErrNone, result);
 
-	TSsmState firstState(ESsmFail, KSsmAnySubState);
+	TSsmState firstState(ESsmFail, ESsmStateFail);
 	TestGetNextState(policy, firstState, KErrNone, result);
 
 	TSsmState unknownState(ESsmFail, 100);
@@ -266,7 +275,7 @@
 void CGsaFailTest::TestGetNextState(CGsaStatePolicyFail* aPolicy, TSsmState aCurrentTransition, TInt aError, TSsmState aResult)
 	{
 	TRequestStatus trs;
-	TSsmState state(ESsmFail, KSsmAnySubState);
+	TSsmState state(ESsmFail, ESsmStateFail);
 	aPolicy->PrepareCommandList(state, KErrNone, trs);
 	StartScheduler();
 	User::WaitForRequest(trs);
--- a/sysstatemgmt/systemstateplugins/test/tunitgsapolicy/src/tgsa_step_shutdown.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitgsapolicy/src/tgsa_step_shutdown.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,12 +27,24 @@
 #include <ssm/ssmcommandlist.h>
 #include <ssm/ssmcmd.hrh>
 #include <ssm/ssmcommand.h>
+#include <ssmsubstateext.hrh> 
 
 #include "tgsa_step_shutdown.h"
 
-TSsmCommandType ArrCriticalShutdown[] = { ESsmCmdPublishSystemState};
-TSsmCommandType ArrNonCriticalShutdown[] = { ESsmCmdPublishSystemState, ESsmCmdPersistHalAttributes, ESsmCmdFinaliseDrives};
-TSsmCommandType ArrPowerOffShutdown[] = { ESsmCmdPublishSystemState, ESsmCmdPowerOff };
+TSsmCommandType ArrCriticalShutdown[] = {   ESsmCmdCustomCommand,       //r_cmd_sastate
+                                            ESsmCmdPublishSystemState,  //r_cmd_publishstate
+                                            ESsmCmdSetPAndSKey,         //r_cmd_psstate
+                                            ESsmCmdCustomCommand,       //r_cmd_cancelmonitoring
+                                            ESsmCmdCustomCommand        //r_cmd_shutdownapps
+                                            };
+TSsmCommandType ArrNonCriticalShutdown[] = {ESsmCmdPublishSystemState,  //r_cmd_publishstate 
+                                            ESsmCmdSetPAndSKey,         //r_cmd_killsplash
+                                            ESsmCmdCustomCommand,       //r_cmd_sashutdown
+                                            ESsmCmdFinaliseDrives       //r_cmd_finalisedrives
+                                            };
+TSsmCommandType ArrPowerOffShutdown[] = {   ESsmCmdPublishSystemState,  //r_cmd_publishstate
+                                            ESsmCmdPowerOff             //r_cmd_poweroff 
+                                            };
 
 const TUint16 KUnknownState = 100;
 
@@ -132,11 +144,11 @@
 	{
 	INFO_PRINTF1(_L("> CGsaShutdownTest::doTestCommandListL"));
 
-	TestCommandListL(ESsmShutdown, ESsmShutdownSubStateCritical, 1);
+	TestCommandListL(ESsmShutdown, ESsmShutdownSubStateCritical, (sizeof(ArrCriticalShutdown)/sizeof(ArrCriticalShutdown[0])));
 	// KSsmAnySubState
-	TestCommandListL(ESsmShutdown, KSsmAnySubState, 1);
-	TestCommandListL(ESsmShutdown, ESsmShutdownSubStateNonCritical, 3);
-	TestCommandListL(ESsmShutdown, ESsmShutdownSubStatePowerOff, 2);
+	TestCommandListL(ESsmShutdown, KSsmAnySubState, (sizeof(ArrCriticalShutdown)/sizeof(ArrCriticalShutdown[0])));
+	TestCommandListL(ESsmShutdown, ESsmShutdownSubStateNonCritical, (sizeof(ArrNonCriticalShutdown)/sizeof(ArrNonCriticalShutdown[0])));
+	TestCommandListL(ESsmShutdown, ESsmShutdownSubStatePowerOff, (sizeof(ArrPowerOffShutdown)/sizeof(ArrPowerOffShutdown[0])));
 	}
 
 /**
--- a/sysstatemgmt/systemstateplugins/test/tunitgsapolicy/src/tgsa_step_startup.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitgsapolicy/src/tgsa_step_startup.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,10 +27,20 @@
 #include <ssm/ssmcommandlist.h>
 #include <ssm/ssmsubstates.hrh>
 #include <ssm/ssmcommand.h>
+#include <ssmsubstateext.hrh>
 
 
 #ifdef SYMBIAN_SSM_GRACEFUL_SHUTDOWN
-TSsmCommandType ArrCriticalStartUp[] = { ESsmCmdCustomCommand,ESsmCmdPublishSystemState,ESsmCmdStartProcess, ESsmCmdStartProcess, ESsmCmdStartProcess, ESsmCmdStartProcess,ESsmCmdStartProcess, ESsmCmdSetPAndSKey, ESsmCmdStartProcess, ESsmCmdStartProcess, ESsmCmdStartProcess, ESsmCmdLoadSup };
+TSsmCommandType ArrCriticalStartUp[] = {ESsmCmdPublishSystemState,  //r_cmd_publishstate
+                                        ESsmCmdStartProcess,        //r_cmd_sysagt
+                                        ESsmCmdCustomCommand,       //r_cmd_initpskeys
+                                        ESsmCmdCustomCommand,       //r_cmd_checkuserdrive
+                                        ESsmCmdCustomCommand,       //r_cmd_deltempfiles
+                                        ESsmCmdStartProcess,        //r_cmd_reservedisk
+                                        ESsmCmdStartProcess,        //r_cmd_sysmon
+                                        ESsmCmdStartProcess,        //r_cmd_ssmutilsrv
+                                        ESsmCmdMultipleWait         //r_cmd_multiwaitforever
+                                        };
 #else
 TSsmCommandType ArrCriticalStartUp[] = { ESsmCmdCustomCommand,ESsmCmdPublishSystemState,ESsmCmdStartProcess, ESsmCmdStartProcess, ESsmCmdStartProcess, ESsmCmdStartProcess,ESsmCmdStartProcess, ESsmCmdSetPAndSKey, ESsmCmdStartProcess, ESsmCmdStartProcess, ESsmCmdStartProcess };
 #endif
@@ -39,8 +49,45 @@
 #ifdef TEST_SSM_GRACEFUL_OFFLINE
 TSsmCommandType ArrNonCriticalStartUp[] = { ESsmCmdSetPAndSKey, ESsmCmdSetPAndSKey,ESsmCmdSetPAndSKey,ESsmCmdPublishSystemState ,ESsmCmdStartProcess,ESsmCmdStartProcess,ESsmCmdStartProcess,ESsmCmdStartProcess,ESsmCmdStartProcess,ESsmCmdStartProcess,ESsmCmdAMAStarter};
 #else
-TSsmCommandType ArrNonCriticalStartUp[] = { ESsmCmdPublishSystemState ,ESsmCmdStartProcess,ESsmCmdStartProcess,ESsmCmdStartProcess,ESsmCmdStartProcess,ESsmCmdStartProcess,ESsmCmdStartProcess,ESsmCmdAMAStarter};
+TSsmCommandType ArrNonCriticalStartUp[] = { ESsmCmdCustomCommand,       //r_cmd_sastate
+                                            ESsmCmdPublishSystemState,  //r_cmd_publishstate
+                                            ESsmCmdSetPAndSKey,         //r_cmd_psstate
+                                            ESsmCmdCustomCommand,       //r_cmd_startupmode
+                                            ESsmCmdLoadSup,             //r_cmd_loadpowersup
+                                            ESsmCmdCustomCommand,       //r_cmd_rfsfirstboot
+                                            ESsmCmdCustomCommand,       //r_cmd_rfsdeep
+                                            ESsmCmdCustomCommand,       //r_cmd_rfsnormal
+                                            ESsmCmdCustomCommand,       //r_cmd_initclkeys
+                                            ESsmCmdCustomCommand,       //r_cmd_initramdrive
+                                            ESsmCmdStartProcess,        //r_cmd_wserv
+                                            ESsmCmdStartProcess,        //r_cmd_splash
+                                            ESsmCmdStartProcess,        //r_cmd_tzsrv
+                                            ESsmCmdStartProcess,        //r_cmd_mediator
+                                            ESsmCmdStartProcess,        //r_cmd_hwrmsrv
+                                            ESsmCmdCustomCommand,       //r_cmd_rtc
+                                            ESsmCmdMultipleWait,        //r_cmd_multiwaitforever1
+                                            ESsmCmdStartProcess,        //r_cmd_dbrecovery
+                                            ESsmCmdStartProcess,        //r_cmd_accsrv
+                                            ESsmCmdCustomCommand,       //r_cmd_selectlanguage
+                                            ESsmCmdMultipleWait,        //r_cmd_multiwaitforever2
+                                            ESsmCmdLoadSup,             //r_cmd_loadlocalesup
+                                            ESsmCmdLoadSup,             //r_cmd_loadcollation
+                                            ESsmCmdLoadSup,             //r_cmd_loadregion
+                                            ESsmCmdLoadSup,             //r_cmd_loaduilanguage
+                                            ESsmCmdCustomCommand,       //r_cmd_aknstart
+                                            ESsmCmdWaitForApparcInit,   //r_cmd_apparc_init
+                                            ESsmCmdCustomCommand        //r_cmd_rfspostui
+                                            };
 #endif
+TSsmCommandType ArrCriticalAppsStartUp[] = {ESsmCmdCustomCommand,       //r_cmd_sastate
+                                            ESsmCmdPublishSystemState,  //r_cmd_publishstate
+                                            ESsmCmdSetPAndSKey,         //r_cmd_psstate
+                                            ESsmCmdCustomCommand,       //r_cmd_selftest
+                                            ESsmCmdStartProcess,        //r_cmd_cfserver
+                                            ESsmCmdStartApp,            //r_cmd_sysap
+                                            ESsmCmdStartProcess,        //r_cmd_profmon
+                                            ESsmCmdMultipleWait         //r_cmd_multiwaitforever
+                                            };
 
 CGsaStartupTest::~CGsaStartupTest()
 	{
@@ -123,9 +170,8 @@
 	INFO_PRINTF1(_L("> CGsaStartupTest::doTestPrepareCommandListL"));
 	TestPrepareCommandListL(ESsmStartup ,ESsmStartupSubStateCriticalStatic, KErrNone);
 	TestPrepareCommandListL(ESsmStartup ,KSsmAnySubState, KErrNone);
-	TestPrepareCommandListL(ESsmStartup ,ESsmStartupSubStateCriticalDynamic, KErrNone);
-	TestPrepareCommandListL(ESsmStartup ,ESsmStartupSubStateNetworkingCritical, KErrNone);
 	TestPrepareCommandListL(ESsmStartup ,ESsmStartupSubStateNonCritical, KErrNone);
+	TestPrepareCommandListL(ESsmStartup ,ESsmStateStartingCriticalApps, KErrNone); //ESsmStateStartingCriticalApps = 0x31
 	TestPrepareCommandListL(ESsmStartup ,100, KErrNotFound);
 	}
 
@@ -139,10 +185,8 @@
 	INFO_PRINTF1(_L("> CGsaStartupTest::doTestCommandListL"));
 
 	TestCommandListL(ESsmStartup, ESsmStartupSubStateCriticalStatic, sizeof(ArrCriticalStartUp) / sizeof(ArrCriticalStartUp[0]));
-	TestCommandListL(ESsmStartup, KSsmAnySubState, sizeof(ArrCriticalStartUp) / sizeof(ArrCriticalStartUp[0]));
-	TestCommandListL(ESsmStartup, ESsmStartupSubStateCriticalDynamic, sizeof(ArrDynamicStartUp) / sizeof(ArrDynamicStartUp[0]));
-	TestCommandListL(ESsmStartup, ESsmStartupSubStateNetworkingCritical, sizeof(ArrNetworkingStartUp) / sizeof(ArrNetworkingStartUp[0]));
 	TestCommandListL(ESsmStartup, ESsmStartupSubStateNonCritical, sizeof(ArrNonCriticalStartUp) / sizeof(ArrNonCriticalStartUp[0]));
+	TestCommandListL(ESsmStartup, ESsmStateStartingCriticalApps, sizeof(ArrCriticalAppsStartUp) / sizeof(ArrCriticalAppsStartUp[0]));	
 	}
 
 /**
@@ -156,46 +200,22 @@
 	CGsaStatePolicyStartup* policy = CreateAndInitializeStartUpPolicyLC();
 
 	TSsmState state(ESsmStartup, KSsmAnySubState);
-	TSsmState result(ESsmStartup, ESsmStartupSubStateCriticalDynamic);
-	// KSsmAnySubState (KSsmAnySubState) will return ESsmStartUpSubStateCriticalDynamic only for the first time, 
+	TSsmState result(ESsmStartup, ESsmStartupSubStateNonCritical);
+	// KSsmAnySubState (KSsmAnySubState) will return ESsmStartupSubStateNonCritical only for the first time, 
 	// next call will always return the next sub state for transition.
 	TestGetNextState(policy, state, KErrNone, result);
 
 	TSsmState firstState(ESsmStartup, ESsmStartupSubStateCriticalStatic);
-	TSsmState firstResult(ESsmStartup, ESsmStartupSubStateCriticalDynamic);
+	TSsmState firstResult(ESsmStartup, ESsmStartupSubStateNonCritical);
 	TestGetNextState(policy, firstState, KErrNone, firstResult);
 
-	TSsmState secondState(ESsmStartup, ESsmStartupSubStateCriticalDynamic);
-	TSsmState secondResult(ESsmStartup, ESsmStartupSubStateNetworkingCritical);
+	TSsmState secondState(ESsmStartup, ESsmStartupSubStateNonCritical);
+	TSsmState secondResult(ESsmStartup, ESsmStateStartingCriticalApps);
 	TestGetNextState(policy, secondState, KErrNone, secondResult);
 
-	TSsmState thirdState(ESsmStartup, ESsmStartupSubStateNetworkingCritical);
-	TSsmState thirdResult(ESsmStartup, ESsmStartupSubStateNonCritical);
+	TSsmState thirdState(ESsmStartup, ESsmStateStartingCriticalApps);
+	TSsmState thirdResult(ESsmStartup, ESsmStateSelfTestOK);
 	TestGetNextState(policy, thirdState, KErrNone, thirdResult);
-#ifdef __WINS__
-	TSsmState fourthState(ESsmStartup, ESsmStartupSubStateNonCritical);
-	TSsmState fourthResult(ESsmNormal, KSsmAnySubState);
-	TestGetNextState(policy, fourthState, KErrNone, fourthResult);
-#else
-	TSsmState fourthState(ESsmStartup, ESsmStartupSubStateNonCritical);
-	TSsmState fourthResult(ESsmStartup, 0x48);//Added 0x48 sub-state for new test for ARMV5 
-	TestGetNextState(policy, fourthState, KErrNone, fourthResult);
-	//This new state test Added for the one more sub-state available in ARMV5 compare to WINSCW
-	TSsmState fourthToNextState(ESsmStartup, 0x48);
-	TSsmState fourthToNextStateResult(ESsmNormal, KSsmAnySubState);
-	TestGetNextState(policy, fourthToNextState, KErrNone, fourthToNextStateResult);
-#endif
-
-	TSsmState fifthState(ESsmStartup, KSsmAnySubState);
-	TSsmState fifthResult(ESsmStartup, ESsmStartupSubStateCriticalDynamic);
-	// KSsmAnySubState (0xffff) will return ESsmStartUpSubStateCriticalDynamic only for the first time, 
-	// next call will always return the next sub state for transition.
-	TestGetNextState(policy, fifthState, KErrNone, fifthResult);
-	
-	//Commented this test because CGsaStatePolicyStartup::GETNExtstate panicks if substate is unknown
-	//TSsmState unknownState(ESsmStartup, 100);
-	//TSsmState knownResult(ESsmStartup, 0);
-	//TestGetNextState(policy, unknownState, KErrNone, knownResult);
 
 	CleanupStack::PopAndDestroy(policy);
 	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstateplugins/test/tunitutilityplugin/group/sspluginstest_tutility.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,29 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Ssplugins_TUtility EN"}
+
+; Vendor name
+: "Ssplugins_TUtility"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitutilityplugin\scripts\sspluginstest_utility.script"-"c:\devicesrv\sspluginstest\sspluginstest_utility.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstateplugins\test\tunitutilityplugin\scripts\sspluginstest_unit_utility.script"-"c:\devicesrv\sspluginstest\sspluginstest_unit_utility.script"
+
--- a/sysstatemgmt/systemstateplugins/test/tunitutilityplugin/src/tutilityplugin_step.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstateplugins/test/tunitutilityplugin/src/tutilityplugin_step.cpp	Tue Aug 31 16:29:05 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/custcmd/group/ssmuiproviderdlldefault.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/group/ssmuiproviderdlldefault.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -35,15 +35,33 @@
 NOEXPORTLIBRARY
 
 SOURCEPATH		../src
+// This is a temporary fix for fixing the build issues arising out of XSymbian code
+// getting compiled before xS60 code is in the mainline. This will be removed after
+// the merged package issues are resolved
+#ifdef FF_SIMLESS_OFFLINE_SUPPORT
 SOURCE			ssmuiproviderdlldefault.cpp
+#else //FF_SIMLESS_OFFLINE_SUPPORT
+SOURCE			ssmuiproviderdllref.cpp
+#endif //FF_SIMLESS_OFFLINE_SUPPORT
 
 USERINCLUDE 	../inc
 USERINCLUDE		../../localinc
 USERINCLUDE		../../clayer/inc
 
+#ifdef FF_SIMLESS_OFFLINE_SUPPORT
+USERINCLUDE		../../../ssmmapperutility/inc
+USERINCLUDE		../../../ssmmapperutility/pubsub
+USERINCLUDE		../../../ssmpolicyplugins/inc
+#endif //FF_SIMLESS_OFFLINE_SUPPORT
+
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 LIBRARY			euser.lib
 LIBRARY			efsrv.lib
+#ifdef FF_SIMLESS_OFFLINE_SUPPORT
+LIBRARY         platformenv.lib
+LIBRARY         ssmcmn.lib
+LIBRARY         ssmmapperutility.lib
+#endif //FF_SIMLESS_OFFLINE_SUPPORT
 
 SMPSAFE
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmuiproviderdll.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmuiproviderdll.h	Tue Aug 31 16:29:05 2010 +0300
@@ -63,6 +63,9 @@
 private:
 	CSsmUiSpecific();
 	void ConstructL();
+	
+    //Helper function to check for P&S Key
+    static TBool IsTestPsKeyDefined();
 private:
 	TStrtSecurityStatus iStrtSecurityStatus;
 	TInt iReferenceCount;
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmuiproviderdlldefault.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmuiproviderdlldefault.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -22,8 +22,20 @@
 #include "ssmpanic.h"
 #include <e32property.h>
 #include "ssmdebug.h"
+#include <f32file.h>
+#include <ctsydomainpskeys.h>
+#include <mmtsy_names.h>
+#include <pathinfo.h>
+#include <securitynotification.h>
+#include <ssm/ssmstate.h>
+#include <startupdomainpskeys.h>
+#include "ssmmapperutilitystatic.h"
+#include "ssmmapperutilityinternalpskeys.h"
+#include "ssmsubstateext.hrh"
+#include "ssmswp.hrh"
+#include "trace.h"
 
-const TUid KPSStartupUid = {0x2000E65E};
+const TUid KPSStartupDefaultUid = {0x2000E65E};
 const TUid KSecurityPinNotifierUid = {0x2000E667};
 const TUid KScreenOutputChannel = {0x10009D48};
 const TUid KEmergencyCallPropertyCategory = {0x2001032C};
@@ -40,8 +52,17 @@
 //Number of clusterSize to be reserve for phone memory space 
 const TInt KNumberOfCluster = 2;
 
-_LIT(KTsyModuleName, "mm.tsy");
-_LIT(KTsyPhoneName, "GsmPhone1");
+//For test code
+/** Channel used to communicate with Security Notifier. */
+static const TUid KSecurityNotifierChannel = { 0x1000598F };
+
+// Type definitions for a buffer containing a drive id (drive letter + :).
+const TInt KDriveIdLength = 2;
+typedef TBuf<KDriveIdLength> TDriveId;
+
+const TUint32 KMiscPluginPropertyKey = 0x2000E658;
+const TUid KPropertyCategory={0x2000D75B};              // tcustomcmd_server SID = KSsmServerName SID (changed in tcustomcmd_server.mmp file)
+
 
 CSsmUiSpecific::CSsmUiSpecific()
 : iReferenceCount(1), iReservedPhoneMemory(0)
@@ -55,36 +76,85 @@
 
 EXPORT_C TUid CSsmUiSpecific::StartupPSUid()
 	{
-	return KPSStartupUid;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("StartupPSUid :: Calling S60 plugins functions ");
+        return KPSUidStartup;        
+        }
+    else
+        {
+        DEBUGPRINT1A("StartupPSUid :: Calling Symbian(dummy) plugins functions ");
+        return KPSStartupDefaultUid;
+        }	
 	}
 
 EXPORT_C TUid CSsmUiSpecific::SecurityPinNotifierUid()
 	{
-	return KSecurityPinNotifierUid;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("SecurityPinNotifierUid :: Calling S60 plugins functions ");
+        return KSecurityNotifierUid;  
+        }
+    else
+        {
+        DEBUGPRINT1A("SecurityPinNotifierUid :: Calling Symbian(dummy) plugins functions ");
+        return KSecurityPinNotifierUid;
+        }   
+
 	}
 
 EXPORT_C TUint CSsmUiSpecific::EmergencyCallPropertyKey()
 	{
-	return KEmergencyCallPropertyKey;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("EmergencyCallPropertyKey :: Calling S60 plugins functions ");
+        return KCTsyCallState;       
+        }
+    else
+        {
+        DEBUGPRINT1A("EmergencyCallPropertyKey :: Calling Symbian(dummy) plugins functions ");
+        return KEmergencyCallPropertyKey;
+        }   
+
 	}
 
 EXPORT_C TUid CSsmUiSpecific::EmergencyCallPropertyCategory()
 	{
-	return KEmergencyCallPropertyCategory;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("EmergencyCallPropertyCategory :: Calling S60 plugins functions ");
+        return KPSUidCtsyCallInformation;       
+        }
+    else
+        {
+        DEBUGPRINT1A("EmergencyCallPropertyCategory :: Calling Symbian(dummy) plugins functions ");
+        return KEmergencyCallPropertyCategory;
+        }   
+
 	}
 
 EXPORT_C TBool CSsmUiSpecific::IsSimSupported()
 	{
-	return ETrue;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("IsSimSupported :: Calling S60 plugins functions ");
+        return SsmMapperUtility::FeatureStatus( TUid::Uid( KFeatureIdSimCard ) );       
+        }
+    else
+        {
+        DEBUGPRINT1A("IsSimSupported :: Calling Symbian(dummy) plugins functions ");
+        return ETrue;
+        }   
+
 	}
 
 EXPORT_C void CSsmUiSpecific::SetSecurityStatus(const TStrtSecurityStatus& aSecurityStatus)
-	{
+	{   
 	iStrtSecurityStatus = aSecurityStatus;
 	}
 
 EXPORT_C TStrtSecurityStatus CSsmUiSpecific::SecurityStatus() const
-	{
+	{   
 	return iStrtSecurityStatus;
 	}
 
@@ -127,83 +197,269 @@
 
 EXPORT_C TUid CSsmUiSpecific::ScreenOutputChannelUid()
 	{
-	return KScreenOutputChannel;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("ScreenOutputChannelUid :: Calling S60 plugins functions ");
+        return KSecurityNotifierChannel;       
+        }
+    else
+        {
+        DEBUGPRINT1A("ScreenOutputChannelUid :: Calling Symbian(dummy) plugins functions ");
+        return KScreenOutputChannel;
+        }   
+
 	}
 
 EXPORT_C TUint CSsmUiSpecific::SimStatusPropertyKey()
 	{
-	return KSimStatusPropertyKey;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("SimStatusPropertyKey :: Calling S60 plugins functions ");
+        return KPSSimStatus;        
+        }
+    else
+        {
+        DEBUGPRINT1A("SimStatusPropertyKey :: Calling Symbian(dummy) plugins functions ");
+        return KSimStatusPropertyKey;
+        }   
 	}
 
 EXPORT_C TBool CSsmUiSpecific::IsSimStateChangeAllowed()
 	{
-	return ETrue;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("IsSimStateChangeAllowed :: Calling S60 plugins functions ");
+        TSsmState state;
+        TInt err = SsmMapperUtility::GetCurrentState( state );
+        ERROR( err, "Failed to get current state" );
+        return ( err == KErrNone &&
+                 ( state.MainState() == ESsmStartup && state.SubState() == ESsmStateSecurityCheck ) ||
+                 ( state.MainState() == ESsmStartup && state.SubState() == ESsmStateNonCritical ) ||
+                   state.MainState() == ESsmNormal );        
+        }
+    else
+        {
+        DEBUGPRINT1A("IsSimStateChangeAllowed :: Calling Symbian(dummy) plugins functions ");
+        return ETrue;
+        }   
+
 	}
 
 EXPORT_C TBool CSsmUiSpecific::IsAmaStarterSupported()
 	{
-	return ETrue;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("IsAmaStarterSupported :: Calling S60 plugins functions ");
+        return SsmMapperUtility::FeatureStatus( TUid::Uid( KFeatureIdExtendedStartup ) );       
+        }
+    else
+        {
+        DEBUGPRINT1A("IsAmaStarterSupported :: Calling Symbian(dummy) plugins functions ");
+        return ETrue;
+        }   
+
 	}
 
 EXPORT_C HBufC* CSsmUiSpecific::GetTsyModuleNameL()
 	{
-	HBufC* tstModuleName = KTsyModuleName().AllocL();
-	return tstModuleName;
+    DEBUGPRINT1A("GetTsyModuleNameL :: Calling S60 plugins functions ");
+    /*****************************************************
+    *   Series 60 Customer / TSY
+    *   Needs customer TSY implementation
+    *****************************************************/
+
+    HBufC* name = KMmTsyModuleName().AllocL();
+    INFO_1( "TSY name: %S", name );
+    return name;      
 	}
 
 EXPORT_C TUid CSsmUiSpecific::StarterPSUid()
 	{
-	return KSecurityStatusPropertyCategory;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("StarterPSUid :: Calling S60 plugins functions ");
+        return KPSStarterUid;        
+        }
+    else
+        {
+        DEBUGPRINT1A("StartupPSUid :: Calling Symbian(dummy) plugins functions ");
+        return KSecurityStatusPropertyCategory;
+        }   
 	}
 
 EXPORT_C HBufC* CSsmUiSpecific::PhoneTsyNameL()
 	{
-	HBufC* tsyPhoneName = KTsyPhoneName().AllocL();
-	return tsyPhoneName;
+    DEBUGPRINT1A("PhoneTsyNameL :: Calling S60 plugins functions ");
+    /*****************************************************
+    *   Series 60 Customer / TSY
+    *   Needs customer TSY implementation
+    *****************************************************/
+
+    HBufC* name = KMmTsyPhoneName().AllocL();
+    INFO_1( "Phone name: %S", name );
+    return name;     
 	}
 
 EXPORT_C TBool CSsmUiSpecific::IsSimPresent()
 	{
-	return ETrue;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("IsSimPresent :: Calling S60 plugins functions ");
+        TInt value( 0 );
+        TInt err = RProperty::Get( SsmMapperUtility::PsUid( KPSUidStartup ), KPSSimStatus, value );
+        ERROR( err, "Failed to get value of KPSUidStartup::KPSSimStatus" );
+        return ( err == KErrNone &&
+                 ( value == ESimUsable ||
+                   value == ESimReadable ||
+                   value == ESimNotReady ) );       
+        }
+    else
+        {
+        DEBUGPRINT1A("IsSimPresent :: Calling Symbian(dummy) plugins functions ");
+        return ETrue;
+        }   
 	}
 
 EXPORT_C TBool CSsmUiSpecific::IsSimlessOfflineSupported()
 	{
-	return ETrue;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("IsSimlessOfflineSupported :: Calling S60 plugins functions ");
+        return SsmMapperUtility::FeatureStatus(
+            TUid::Uid( KFeatureIdFfSimlessOfflineSupport ) );      
+        }
+    else
+        {
+        DEBUGPRINT1A("IsSimlessOfflineSupported :: Calling Symbian(dummy) plugins functions ");
+        return ETrue;
+        }   
 	}
 
 EXPORT_C TBool CSsmUiSpecific::IsNormalBoot()
 	{
-	return ETrue;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("IsNormalBoot :: Calling S60 plugins functions ");
+        TInt value( 0 );
+        TInt errorCode = RProperty::Get( SsmMapperUtility::PsUid( KPSUidStartup ), KPSStartupReason, value );
+        ERROR( errorCode, "Failed to get value of KPSUidStartup::KPSStartupReason" );
+
+        TBool ret = ( errorCode == KErrNone && value == ENormalStartup );
+        INFO_1( "Is normal boot = %d", ret );
+        return ret;     
+        }
+    else
+        {
+        DEBUGPRINT1A("IsNormalBoot :: Calling Symbian(dummy) plugins functions ");
+        return ETrue;
+        }   
 	}
 
 EXPORT_C TBool CSsmUiSpecific::IsSimChangedReset()
 	{
-	return ETrue;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("IsSimChangedReset :: Calling S60 plugins functions ");
+        TUid startupPsUid( SsmMapperUtility::PsUid( KPSUidStartup ) );
+        TInt value( 0 );
+        TInt errorCode = RProperty::Get( startupPsUid, KPSStartupReason, value );
+        ERROR( errorCode, "Failed to get value of KPSUidStartup::KPSStartupReason" );
+
+        TBool ret( EFalse );
+        if ( errorCode == KErrNone && value == ESIMStatusChangeReset )
+            {
+            errorCode = RProperty::Get( startupPsUid, KPSSimChanged, value );
+            ret = ( errorCode == KErrNone && value == ESimChanged );
+            }
+
+        INFO_1( "Is SIM changed reset = %d", ret );
+        return ret;       
+        }
+    else
+        {
+        DEBUGPRINT1A("IsSimChangedReset :: Calling Symbian(dummy) plugins functions ");
+        return ETrue;
+        }   
 	}
 
 EXPORT_C TUint CSsmUiSpecific::RFStatusPropertyKey()
 	{
-	return KRFStatusPropertyKey;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("RFStatusPropertyKey :: Calling S60 plugins functions ");
+        return SWP_UID_SSM_RF_STATUS;        
+        }
+    else
+        {
+        DEBUGPRINT1A("RFStatusPropertyKey :: Calling Symbian(dummy) plugins functions ");
+        return KRFStatusPropertyKey;
+        }   
 	}
 
 EXPORT_C TUid CSsmUiSpecific::RFStatusPropertyCategory()
 	{
-	return KRFStatusPropertyCategory;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("RFStatusPropertyCategory :: Calling S60 plugins functions ");
+        return TUid::Uid( SWP_UID_SSM_RF_STATUS );       
+        }
+    else
+        {
+        DEBUGPRINT1A("RFStatusPropertyCategory :: Calling Symbian(dummy) plugins functions ");
+        return KRFStatusPropertyCategory;
+        }   
 	}
+
 EXPORT_C TUint CSsmUiSpecific::ValidateRTCPropertyKey()
     {
-    return KValidateRTCPropertyKey;
+    if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("ValidateRTCPropertyKey :: Calling S60 plugins functions ");
+        return KRTCPropertyKey;       
+        }
+    else
+        {
+        DEBUGPRINT1A("ValidateRTCPropertyKey :: Calling Symbian(dummy) plugins functions ");
+        return KValidateRTCPropertyKey;
+        }   
+
     }
 
 EXPORT_C TUid CSsmUiSpecific::ValidateRTCPropertyCategory()
     {
-    return KValidateRTCPropertyCategory;
+    if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("ValidateRTCPropertyCategory :: Calling S60 plugins functions ");
+        return KPSStarterUid;        
+        }
+    else
+        {
+        DEBUGPRINT1A("ValidateRTCPropertyCategory :: Calling Symbian(dummy) plugins functions ");
+        return KValidateRTCPropertyCategory;
+        }   
     }
 
 EXPORT_C TInt CSsmUiSpecific::PhoneMemoryRootDriveId()
 	{
-	return EDriveC;
+	if (!IsTestPsKeyDefined())
+        {
+        DEBUGPRINT1A("PhoneMemoryRootDriveId :: Calling S60 plugins functions ");
+        TInt driveId = EDriveC;
+        TDriveId driveIdBuf = PathInfo::PhoneMemoryRootPath().Left( KDriveIdLength );
+        if ( driveIdBuf.Length() > 0 )
+            {
+            TInt err = RFs::CharToDrive( driveIdBuf[0], driveId ) ;
+            INFO_1( "PhoneMemoryRootDriveId - CharToDrive returns: %d", err );            
+            }
+
+        INFO_1( "Phone memory root path ID: %d", driveId );
+        return driveId;      
+        }
+    else
+        {
+        DEBUGPRINT1A("PhoneMemoryRootDriveId :: Calling Symbian(dummy) plugins functions ");
+        return EDriveC;
+        }   
 	}
 
 /**
@@ -215,6 +471,21 @@
 	}
 
 /**
+    Helper function to check for P&S Key
+*/
+TBool CSsmUiSpecific::IsTestPsKeyDefined()
+    {
+    TBool testPsKeyDefined = EFalse;
+    TInt result = RProperty::Get(KPropertyCategory, KMiscPluginPropertyKey, testPsKeyDefined);
+    DEBUGPRINT3(_L("KMiscPluginPropertyKey %d Error %d"), testPsKeyDefined, result);
+    if ((KErrNone != result) && (KErrNotFound != result))
+        {
+        User::Leave(result);
+        }
+    return testPsKeyDefined;
+    }
+
+/**
 Reserve two ClusterSize in Phone Memory Space on H/W
 and 512 bytes for __WINS__
 @return KErrNone if successful or systemwide error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmuiproviderdllref.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,278 @@
+// Copyright (c) 2007-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:
+//
+
+/**
+ @internalComponent
+ @released
+*/
+
+#include "ssmuiproviderdll.h"
+#include "ssmpanic.h"
+#include <e32property.h>
+#include "ssmdebug.h"
+
+const TUid KPSStartupUid = {0x2000E65E};
+const TUid KSecurityPinNotifierUid = {0x2000E667};
+const TUid KScreenOutputChannel = {0x10009D48};
+const TUid KEmergencyCallPropertyCategory = {0x2001032C};
+
+const TUint KEmergencyCallPropertyKey = 0x0101;
+const TUint KSimStatusPropertyKey = 0x0102;
+
+const TUid KSecurityStatusPropertyCategory =  {0x2000E664};
+
+const TUid KRFStatusPropertyCategory = {0x2000D75B};
+const TUint KRFStatusPropertyKey = 0x2001D2A9;
+const TUid KValidateRTCPropertyCategory = {0x2000D75B};
+const TUint KValidateRTCPropertyKey = 0x2001D2AB;
+//Number of clusterSize to be reserve for phone memory space 
+const TInt KNumberOfCluster = 2;
+
+_LIT(KTsyModuleName, "mm.tsy");
+_LIT(KTsyPhoneName, "GsmPhone1");
+
+CSsmUiSpecific::CSsmUiSpecific()
+: iReferenceCount(1), iReservedPhoneMemory(0)
+	{
+	}
+
+EXPORT_C CSsmUiSpecific::~CSsmUiSpecific()
+	{
+	iReservedPhoneMemoryFs.Close();
+	}
+
+EXPORT_C TUid CSsmUiSpecific::StartupPSUid()
+	{
+	return KPSStartupUid;
+	}
+
+EXPORT_C TUid CSsmUiSpecific::SecurityPinNotifierUid()
+	{
+	return KSecurityPinNotifierUid;
+	}
+
+EXPORT_C TUint CSsmUiSpecific::EmergencyCallPropertyKey()
+	{
+	return KEmergencyCallPropertyKey;
+	}
+
+EXPORT_C TUid CSsmUiSpecific::EmergencyCallPropertyCategory()
+	{
+	return KEmergencyCallPropertyCategory;
+	}
+
+EXPORT_C TBool CSsmUiSpecific::IsSimSupported()
+	{
+	return ETrue;
+	}
+
+EXPORT_C void CSsmUiSpecific::SetSecurityStatus(const TStrtSecurityStatus& aSecurityStatus)
+	{
+	iStrtSecurityStatus = aSecurityStatus;
+	}
+
+EXPORT_C TStrtSecurityStatus CSsmUiSpecific::SecurityStatus() const
+	{
+	return iStrtSecurityStatus;
+	}
+
+EXPORT_C CSsmUiSpecific* CSsmUiSpecific::InstanceL()
+	{
+	CSsmUiSpecific* self;
+
+	//Check Tls data
+	if (NULL == Dll::Tls())
+		{
+		//Instantiate CSsmUiSpecific if TLS is null
+		self = new (ELeave) CSsmUiSpecific();
+		CleanupStack::PushL(self);
+		self->ConstructL();
+		//Copy CSsmUiSpecific pointer in TLS
+		User::LeaveIfError(Dll::SetTls(self));
+		CleanupStack::Pop(self);
+		}
+	else
+		{
+		//CSsmUiSpecific has already been instantiated
+		self = static_cast<CSsmUiSpecific*>(Dll::Tls());
+		++self->iReferenceCount;
+		}
+	return self;
+	}
+
+EXPORT_C void CSsmUiSpecific::Release()
+	{
+	   TAny* tlsPtr = Dll::Tls();
+	__ASSERT_DEBUG(NULL != tlsPtr, User::Panic(KPanicSsmUiSpecific, KErrNotFound));
+ 
+    CSsmUiSpecific* self = static_cast<CSsmUiSpecific*>(tlsPtr);
+    if (0 == --self->iReferenceCount)
+        {
+        Dll::FreeTls();
+        delete self;
+        }
+	}
+
+EXPORT_C TUid CSsmUiSpecific::ScreenOutputChannelUid()
+	{
+	return KScreenOutputChannel;
+	}
+
+EXPORT_C TUint CSsmUiSpecific::SimStatusPropertyKey()
+	{
+	return KSimStatusPropertyKey;
+	}
+
+EXPORT_C TBool CSsmUiSpecific::IsSimStateChangeAllowed()
+	{
+	return ETrue;
+	}
+
+EXPORT_C TBool CSsmUiSpecific::IsAmaStarterSupported()
+	{
+	return ETrue;
+	}
+
+EXPORT_C HBufC* CSsmUiSpecific::GetTsyModuleNameL()
+	{
+	HBufC* tstModuleName = KTsyModuleName().AllocL();
+	return tstModuleName;
+	}
+
+EXPORT_C TUid CSsmUiSpecific::StarterPSUid()
+	{
+	return KSecurityStatusPropertyCategory;
+	}
+
+EXPORT_C HBufC* CSsmUiSpecific::PhoneTsyNameL()
+	{
+	HBufC* tsyPhoneName = KTsyPhoneName().AllocL();
+	return tsyPhoneName;
+	}
+
+EXPORT_C TBool CSsmUiSpecific::IsSimPresent()
+	{
+	return ETrue;
+	}
+
+EXPORT_C TBool CSsmUiSpecific::IsSimlessOfflineSupported()
+	{
+	return ETrue;
+	}
+
+EXPORT_C TBool CSsmUiSpecific::IsNormalBoot()
+	{
+	return ETrue;
+	}
+
+EXPORT_C TBool CSsmUiSpecific::IsSimChangedReset()
+	{
+	return ETrue;
+	}
+
+EXPORT_C TUint CSsmUiSpecific::RFStatusPropertyKey()
+	{
+	return KRFStatusPropertyKey;
+	}
+
+EXPORT_C TUid CSsmUiSpecific::RFStatusPropertyCategory()
+	{
+	return KRFStatusPropertyCategory;
+	}
+EXPORT_C TUint CSsmUiSpecific::ValidateRTCPropertyKey()
+    {
+    return KValidateRTCPropertyKey;
+    }
+
+EXPORT_C TUid CSsmUiSpecific::ValidateRTCPropertyCategory()
+    {
+    return KValidateRTCPropertyCategory;
+    }
+
+EXPORT_C TInt CSsmUiSpecific::PhoneMemoryRootDriveId()
+	{
+	return EDriveC;
+	}
+
+/**
+Leaving construction inside ConstructL
+*/
+void CSsmUiSpecific::ConstructL()
+	{
+	User::LeaveIfError( iReservedPhoneMemoryFs.Connect() );
+	}
+
+/**
+Reserve two ClusterSize in Phone Memory Space on H/W
+and 512 bytes for __WINS__
+@return KErrNone if successful or systemwide error
+*/
+EXPORT_C TInt CSsmUiSpecific::ReservePhoneMemorySpace()
+    {
+	TVolumeIOParamInfo volumeParamInfo; 
+	const TInt phoneMemoryDriveID = PhoneMemoryRootDriveId();
+	TInt errorCode = iReservedPhoneMemoryFs.VolumeIOParam(phoneMemoryDriveID, volumeParamInfo); 
+	if( KErrNone == errorCode )
+		{
+#ifdef __WINS__
+		//512 bytes for __WINS__
+		const TInt reservedMemory = 512;
+#else
+		//Reserving two clusterSize Phone memory 
+		const TInt reservedMemory = KNumberOfCluster * (volumeParamInfo.iClusterSize);
+#endif //__WINS__
+		errorCode = iReservedPhoneMemoryFs.ReserveDriveSpace(phoneMemoryDriveID, reservedMemory);
+
+		if ( KErrNone == errorCode )
+			{
+			iReservedPhoneMemory = reservedMemory;
+			}
+		}
+    return errorCode;
+    }
+
+/**
+Free reserved bytes from Phone Memory Space. If aSpaceToFree is 0 bytes 
+then free complete reserved memory
+@param aSpaceToFree request to free memory
+@return KErrNone if successful or systemwide error
+*/
+EXPORT_C TInt CSsmUiSpecific::FreeReservedPhoneMemorySpace(const TInt aSpaceToFree)
+    {
+    TInt errorCode(KErrGeneral);
+	DEBUGPRINT3A("Reserved memory is = %d bytes, Request to free memory is = %d bytes", iReservedPhoneMemory, aSpaceToFree);
+    if(0 < iReservedPhoneMemory)
+        {
+		if(0 == aSpaceToFree)
+		    {
+		   	//Free complete reserved phone memory
+			errorCode = iReservedPhoneMemoryFs.ReserveDriveSpace( PhoneMemoryRootDriveId(), 0 );
+			DEBUGPRINT2A("Freeing memory completed with = %d", errorCode);
+			iReservedPhoneMemory = 0; 
+		    }
+		else
+		    {
+		    TInt newReserveSize = iReservedPhoneMemory - aSpaceToFree;
+		    newReserveSize = newReserveSize >= 0 ? newReserveSize : 0;
+		    errorCode = iReservedPhoneMemoryFs.ReserveDriveSpace( PhoneMemoryRootDriveId(), newReserveSize );
+			DEBUGPRINT2A("Freeing partial phone memory completed with = %d", errorCode);
+		    if(KErrNone == errorCode)
+			    {
+			    iReservedPhoneMemory = newReserveSize;
+			    }
+		    }
+    	}
+    return errorCode;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tclayer/group/ssrefpluginstest_tclayer.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,33 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Ssrefplugins_TClayer EN"}
+
+; Vendor name
+: "Ssrefplugins_TClayer"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tclayer\scripts\ssrefpluginstest_clayer_startersession.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_clayer_startersession.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tclayer\scripts\ssrefpluginstest_clayer_startupadaptationadapter.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_clayer_startupadaptationadapter.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tclayer\scripts\ssrefpluginstest_clayer_ssmpropertyobserver.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_clayer_ssmpropertyobserver.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tclayer\scripts\ssrefpluginstest_clayer_ssmsimstatusobserver.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_clayer_ssmsimstatusobserver.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tclayer\scripts\ssrefpluginstest_clayer_ssmsecurityeventobserver.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_clayer_ssmsecurityeventobserver.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tclayer\scripts\ssrefpluginstest_clayer_startersessionwithssm.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_clayer_startersessionwithssm.script"
+
--- a/sysstatemgmt/systemstatereferenceplugins/test/tclayer/group/tclayer_server.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tclayer/group/tclayer_server.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -25,8 +25,9 @@
 TARGETPATH		/sys/bin
 UID				0x1000007A 0xA00056EB
 VENDORID		0x70000001
-// Use KPSUidStartup as the secure id of this test server to allow P+S keys to be defined
-SECUREID 		0x101F8766
+SECUREID 		0x2000D75B
+
+CAPABILITY 		WriteDeviceData   
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
@@ -47,6 +48,7 @@
 LIBRARY			etel.lib
 LIBRARY			etelmm.lib
 LIBRARY			centralrepository.lib
+LIBRARY			ws32.lib
 
 // testcode
 SOURCEPATH		../src
--- a/sysstatemgmt/systemstatereferenceplugins/test/tclayer/scripts/ssrefpluginstest_clayer_ssmsimstatusobserver.script	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tclayer/scripts/ssrefpluginstest_clayer_ssmsimstatusobserver.script	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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,9 +15,7 @@
 
 PRINT Run SSM SIM Status Observer tests
 
-PRINT Swapping SID over to CSsmUiSpecific::StartupPSUid()
-RUN_PROGRAM -1 setcap tclayer_server.exe 0 -SID 2000e65e tclayer_serverSID.exe
-LOAD_SUITE tclayer_serverSID
+LOAD_SUITE tclayer_server
 
 START_TESTCASE 			DEVSRVS-SSREFPLUGINS-CLAYER-0023
 //! @SYMTestCaseID 		DEVSRVS-SSREFPLUGINS-CLAYER-0023
@@ -38,6 +36,6 @@
 //! 					are no panics.
 //! 				All methods handle the object data appropriately, with no errors reported and there
 //! 					are no panics.
-RUN_TEST_STEP 100 tclayer_serverSID CCLayerTestSsmSimStatusObserver
+RUN_TEST_STEP 100 tclayer_server CCLayerTestSsmSimStatusObserver
 END_TESTCASE 			DEVSRVS-SSREFPLUGINS-CLAYER-0023
 
--- a/sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_ssmsecurityeventobserver.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_ssmsecurityeventobserver.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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,8 @@
  @internalComponent - Internal Symbian test code  
 */
 
+#include <e32property.h>
+#include <w32std.h>
 #include "ssmdebug.h"
 #include "strtsecphaseobserver.h"
 #include "ssmsecurityeventobserver.h"
@@ -33,6 +35,8 @@
 
 //Exe name which defines security state PS keys
 _LIT (KExeToDefineSecurityStatePS, "\\sys\\bin\\definesecuritystateps.exe");
+const TUint32 KMiscPluginPropertyKey = 0x2000E658;
+const TUid KPropertyCategory={0x2000D75B};
 
 CLayerTestSsmEventObserver::CLayerTestSsmEventObserver()
 	{
@@ -60,15 +64,31 @@
 
 	//Start the test exe which defines security state related property keys
 	RProcess processHandle;
+	CleanupClosePushL(processHandle);
 	processHandle.Create(KExeToDefineSecurityStatePS, KNullDesC);
 	processHandle.Resume();
-	processHandle.Close();
+	TRequestStatus status;
+    processHandle.Rendezvous(status);
+    User::WaitForRequest(status);
+	        
+    TInt retVal = status.Int();
+    INFO_PRINTF2(_L("retVal = %d"),retVal);
+    TEST(KErrNone == retVal);
+    // leave if the process has not started properly
+    User::LeaveIfError(retVal);
+    CleanupStack::PopAndDestroy();
+	//processHandle.Close();
+    
+    TInt error = RProperty::Define(KPropertyCategory, KMiscPluginPropertyKey, RProperty::EInt);
+    TInt error1 = RProperty::Set(KPropertyCategory, KMiscPluginPropertyKey, 1);
+    INFO_PRINTF3(_L("Defining and setting property returned %d & %d"), error, error1);
 
 	return CTestStep::doTestStepPreambleL();
 	}
 
 TVerdict CLayerTestSsmEventObserver::doTestStepPostambleL()
 	{
+    TInt error = RProperty::Delete(KPropertyCategory, KMiscPluginPropertyKey);
 	return CTestStep::doTestStepPostambleL();
 	}
 
@@ -82,6 +102,9 @@
 
 void CLayerTestSsmEventObserver::SimulatePasswordEntry()
 	{
+    /*RWsSession wsSession;
+    wsSession.Connect();*/
+    
 	TRawEvent eventDown;
 	TRawEvent eventUp;
 
@@ -90,12 +113,21 @@
 	UserSvr::AddEvent(eventDown);
 	eventUp.Set(TRawEvent::EKeyUp, EStdKeyComma);
 	UserSvr::AddEvent(eventUp);
+	User::After(1000000);
 
-	eventDown.Set(TRawEvent::EKeyDown, EStdKeyEnter);
+/*    eventDown.Set(TRawEvent::EKeyDown, EStdKeyEnter);
+    UserSvr::AddEvent(eventDown);
+    eventUp.Set(TRawEvent::EKeyUp, EStdKeyEnter);
+    UserSvr::AddEvent(eventUp);*/
+    
+	eventDown.Set(TRawEvent::EButton1Down, 60, 600);
 	UserSvr::AddEvent(eventDown);
-	eventUp.Set(TRawEvent::EKeyUp, EStdKeyEnter);
+	eventUp.Set(TRawEvent::EButton1Up, 60, 600);
 	UserSvr::AddEvent(eventUp);
 	User::After(1000000);
+	
+   /* wsSession.Flush();
+    wsSession.Close();*/
 	}
 
 void CLayerTestSsmEventObserver::CallBackRunL()
--- a/sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_ssmsimstatusobserver.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_ssmsimstatusobserver.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -185,8 +185,9 @@
 	__UHEAP_MARK;
 	
 	// Delete any existing defines, ignore return value
-	(void) RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimChanged);
-	(void) RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimOwned);
+	TInt err1 = RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimChanged);
+	TInt err2 = RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimOwned);
+	INFO_PRINTF3(_L("Value of err1 & err2 = %d & %d"), err1, err2);
 	TInt err = KErrNone;
 	
 	INFO_PRINTF1(_L("Constructing SSM SIM publish cmd"));	
@@ -230,6 +231,7 @@
 	
 	INFO_PRINTF1(_L("Initializing SSM SIM status observer without defining SIM changed property"));
 	err = RProperty::Define(CSsmUiSpecific::StartupPSUid(), KPSSimOwned, RProperty::EInt);
+	INFO_PRINTF2(_L("Define returns err = %d") ,err);
 	TEST(err == KErrNone);
 	simCustomCmd->Execute(emptyBuf, iRequestStatus);
 	
--- a/sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_startersession.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_startersession.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -335,28 +335,35 @@
 	INFO_PRINTF1(_L("Deleting splash screen property"));
 	ret = RProperty::Delete(KPSUidStartup, KPSSplashShutdown);
 	TEST(ret == KErrNone || ret == KErrNotFound);
+	INFO_PRINTF2(_L("ret val is : %d"), ret);
 		
 	
 	INFO_PRINTF1(_L("Ending splashscreen without defining property"));
 	ret = starterSession.EndSplashScreen();
 	TEST(ret == KErrNotFound);
+	INFO_PRINTF2(_L("ret val is : %d"), ret);
 	
 	INFO_PRINTF1(_L("Defining splash screen property"));
 	// In a test enviroment we don't need to worry about protecting the property
 	// so allow anything to change it
 	_LIT_SECURITY_POLICY_PASS(KAllPass); //lint !e648 Suppress overflow in computing constant for operation
 	ret = RProperty::Define(KPSUidStartup, KPSSplashShutdown, RProperty::EInt, KAllPass, KAllPass);
+	INFO_PRINTF3(_L("KPSUidStartup = %x, KPSSplashShutdown = %x"), KPSUidStartup, KPSSplashShutdown);
 	TEST(ret == KErrNone);
+	INFO_PRINTF2(_L("ret val is : %d"), ret);
 	
 	INFO_PRINTF1(_L("Ending splashscreen with property defined"));
 	ret = starterSession.EndSplashScreen();
 	TEST(ret == KErrNone);
+	INFO_PRINTF2(_L("ret val is : %d"), ret);
 	
 	INFO_PRINTF1(_L("Reading splash screen property"));
 	TInt value;
 	ret = RProperty::Get(KPSUidStartup, KPSSplashShutdown, value);
 	TEST(ret == KErrNone);
+	INFO_PRINTF2(_L("ret val is : %d"), ret);
 	TEST(value == ESplashShutdown);
+	INFO_PRINTF3(_L("Property value is : %d .Expected : %d"), ret, ESplashShutdown);
 	
 	INFO_PRINTF1(_L("Close on connected RStartSession"));
 	starterSession.Close();
--- a/sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_startersessionwithssm.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_startersessionwithssm.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// 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"
@@ -34,6 +34,7 @@
 
 const TUint KRFStatusPropertyKey = 0x2001D2A9;
 const TUid KRFStatusPropertyCategory = {0x2000D75B};
+const TUint32 KMiscPluginPropertyKey = 0x2000E658;
 
 _LIT(KPolicyFilename,                   "rfstatusswppolicy.dll");
 
@@ -89,6 +90,18 @@
     {
     __UHEAP_MARK;
     
+    TInt error = RProperty::Define(KRFStatusPropertyCategory, KMiscPluginPropertyKey, RProperty::EInt);
+    if((KErrNone != error) && (KErrAlreadyExists != error))
+        {
+        ERR_PRINTF2(_L("Defining KMiscPluginPropertyKey failed with error %d"), error);
+        User::Leave(error);
+        }
+    error = RProperty::Set(KRFStatusPropertyCategory, KMiscPluginPropertyKey, 1);
+    if(KErrNone != error)
+        {
+        ERR_PRINTF2(_L("Setting KMiscPluginPropertyKey with value 1 failed with error %d"), error);
+        User::Leave(error);
+        }
     TBool ret = ETrue;
     // Print out the parameters for debugging
     INFO_PRINTF2( _L("<font size=3 color=990000><b>aCommand = %S</b></font>"), &aCommand );
@@ -99,7 +112,12 @@
         SetError(err);
         ret = EFalse;
         }
-    
+    error = RProperty::Delete(KRFStatusPropertyCategory, KMiscPluginPropertyKey);
+    if(KErrNone != error)
+        {
+        ERR_PRINTF2(_L("Deleting KMiscPluginPropertyKey failed with error %d"), error);
+        User::Leave(error);
+        }
     __UHEAP_MARKEND;
     return ret;
     }
--- a/sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_startupadaptationadapter.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_startupadaptationadapter.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -1740,11 +1740,11 @@
 	}
 
 // declare exported functions for test AFSS-CLAYER-0019
-MEmergencyCallRfAdaptation* CreateEmergencyCallRfAdaptationL(void);
-MMiscAdaptation* CreateMiscAdaptationL(void);
-MRtcAdaptation* CreateRtcAdaptationL(void);
-MSimAdaptation* CreateSimAdaptationL(void);
-MStateAdaptation* CreateStateAdaptationL(void);
+IMPORT_C MEmergencyCallRfAdaptation* CreateEmergencyCallRfAdaptationL(void);
+IMPORT_C MMiscAdaptation* CreateMiscAdaptationL(void);
+IMPORT_C MRtcAdaptation* CreateRtcAdaptationL(void);
+IMPORT_C MSimAdaptation* CreateSimAdaptationL(void);
+IMPORT_C MStateAdaptation* CreateStateAdaptationL(void);
 
 /**
 Old Test CaseID 		AFSS-CLAYER-0019
--- a/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/group/definesecuritystateps.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/group/definesecuritystateps.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -17,7 +17,7 @@
 
 TARGET			definesecuritystateps.exe
 TARGETTYPE		exe
-CAPABILITY  	none
+CAPABILITY  	WriteDeviceData
 
 UID           	0x100039CE 0x2000E664
 VENDORID 		0x70000001
@@ -32,7 +32,7 @@
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
-SYSTEMINCLUDE	/epoc32/include/techview
+MW_LAYER_SYSTEMINCLUDE
 
 // Registration file
 SOURCEPATH    	../src
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/group/ssrefpluginstest_tintcustcmd.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,32 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Ssrefplugins_TIntCustCmd EN"}
+
+; Vendor name
+: "Ssrefplugins_TIntCustCmd"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tintcustcmd\scripts\ssrefpluginstest_custcmd_simsecuritypincheck.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_simsecuritypincheck.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tintcustcmd\scripts\ssrefpluginstest_custcmd_activateemergencycallcheck.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_activateemergencycallcheck.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tintcustcmd\scripts\ssrefpluginstest_custcmd_deactivateemergencycallcheck.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_deactivateemergencycallcheck.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tintcustcmd\scripts\ssrefpluginstest_custcmd_devicesecuritypincheck.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_devicesecuritypincheck.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tintcustcmd\scripts\ssrefpluginstest_custcmd_int_execute.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_int_execute.script"
+
--- a/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/group/tcustomcmd_server.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/group/tcustomcmd_server.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -47,6 +47,15 @@
 SOURCE			tcustcmd_step_devicesecuritypincheck.cpp
 SOURCE			tcustcmd_step_int_execute.cpp
 
+USERINCLUDE 	../../../custcmd/inc
+SOURCEPATH		../../../custcmd/src
+SOURCE			ssmsecuritychecknotifier.cpp
+
+#ifndef TEST_CUSTCMD
+#define TEST_CUSTCMD
+MACRO TEST_CUSTCMD_MACRO
+#endif
+
 LIBRARY			euser.lib
 LIBRARY			efsrv.lib
 LIBRARY			testexecuteutils.lib
--- a/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/inc/tcustcmd_const.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/inc/tcustcmd_const.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -79,5 +79,6 @@
 	};	
 
 _LIT(KTestSwpPolicyCustomCmd, "ssm.swp.policy.test.customcmd.dll");
+const TUint32 KEmergencyCallRfAdaptationPluginPropertyKey = 0x2000E657;
 
 #endif // __TCUSTCMD_CONST_H__
--- a/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/definesecuritystateps.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/definesecuritystateps.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -141,7 +141,7 @@
 		{
 		User::Leave(result);
 		}
-
+	RProcess::Rendezvous(KErrNone);
 	// Complete the UI framework's construction of the App UI.
 	BaseConstructL(CEikAppUi::ENoAppResourceFile);
 	}
--- a/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_activateemergencycall.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_activateemergencycall.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -14,6 +14,7 @@
 //
 
 #include "tcustcmd_step_activateemergencycall.h"
+#include "tcustcmd_const.h"
 
 CCustomCmdTestActivateEmergencyCall::~CCustomCmdTestActivateEmergencyCall()
 	{
@@ -44,10 +45,23 @@
 	INFO_PRINTF1(_L("doTestStepL"));
 	TInt err = 0;
 	__UHEAP_MARK;
+	
+    err = RProperty::Define(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, RProperty::EInt);
+    TEST(KErrNone == err || KErrAlreadyExists == err);
+    INFO_PRINTF2(_L("RProperty::Define(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, RProperty::EInt); returns %d"), err);
+    err = RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 1);
+    TEST(KErrNone == err); 
+    INFO_PRINTF2(_L("RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 1); returns %d"), err);
+    
 	TRAP(err,TestHandleActivateEmergencyCallL());	
 	TEST(KErrNone == err);
 	TRAP(err,TestHandleActivateEmergencyCallCancelL());
 	TEST(KErrNone == err);
+	
+	err = RProperty::Delete(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey);
+	TEST(KErrNone == err);
+	INFO_PRINTF2(_L("RProperty::Delete(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey); returns %d"), err);
+	
 	__UHEAP_MARKEND;
 	return TestStepResult();
 	}
--- a/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_deactivateemergencycall.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_deactivateemergencycall.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -14,6 +14,7 @@
 //
 
 #include "tcustcmd_step_deactivateemergencycall.h"
+#include "tcustcmd_const.h"
 
 
 CCustomCmdTestDeActivateEmergencyCall::~CCustomCmdTestDeActivateEmergencyCall()
@@ -45,10 +46,20 @@
 	INFO_PRINTF1(_L("doTestStepL"));
 	TInt err = 0;
 	__UHEAP_MARK;
+	
+	TInt res = RProperty::Define(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, RProperty::EInt);
+    INFO_PRINTF2(_L("RProperty::Define(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, RProperty::EInt); returns %d"), res);
+    res = RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 1);
+    INFO_PRINTF2(_L("RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 1); returns %d"), res);
+
 	TRAP(err,TestHandleDeActivateEmergencyCallL());
 	TEST(KErrNone == err);
 	TRAP(err,TestHandleDeActivateEmergencyCallCancelL());
 	TEST(KErrNone == err);
+	
+	res = RProperty::Delete(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey);
+    INFO_PRINTF2(_L("RProperty::Delete(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey); returns %d"), res);
+
 	return TestStepResult();
 	}
 
--- a/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_devicesecuritypincheck.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_devicesecuritypincheck.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -88,11 +88,17 @@
 	RProcess processHandle;
 	
 	TInt temp = processHandle.Create(KExeToDefineStartUpPS, KNullDesC);
+	TRequestStatus status1;
+	processHandle.Rendezvous(status1);
 	processHandle.Resume();
+	User::WaitForRequest(status1);
 	processHandle.Close();
 		
 	processHandle.Create(KExeToDefineStartUpStatePS, KNullDesC);
-	processHandle.Resume();
+    TRequestStatus status2;
+    processHandle.Rendezvous(status2);
+    processHandle.Resume();
+    User::WaitForRequest(status2);
 	processHandle.Close();
 
 	//For stopping the key simulation
--- a/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_simsecuritypincheck.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/src/tcustcmd_step_simsecuritypincheck.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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 <s32file.h>
 
 const TInt KNumOfTestCases = 8;
+const TUint32 KMiscPluginPropertyKey = 0x2000E658;
 
 static TInt CustomCmdTestSecurityCheckCallBackL(TAny* aCustomCmdTestSecurityPinCheck)
 	{
@@ -35,6 +36,8 @@
 */
 void CCustomCmdTestSecurityPinCheck::CallBackForEnterPin()
 	{
+	const TInt okButtonPos1 = 60; //the position of ok button
+	const TInt okButtonPos2 = 600; //the position of ok button
 	iAsyncStopScheduler->CallBack();
 	
 	RWsSession wsSession;
@@ -52,9 +55,9 @@
 		User::After(100000);
 		}
 	
-	eventDown.Set(TRawEvent::EKeyDown, EStdKeyEnter);
+	eventDown.Set(TRawEvent::EButton1Down, okButtonPos1,okButtonPos2);
 	UserSvr::AddEvent(eventDown);
-	eventUp.Set(TRawEvent::EKeyUp, EStdKeyEnter);
+	eventUp.Set(TRawEvent::EButton1Up, okButtonPos1,okButtonPos2);
 	UserSvr::AddEvent(eventUp);
 	User::After(100000);
 		
@@ -91,6 +94,11 @@
 
 	iAsyncStopScheduler = new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
 	
+	TInt err = RProperty::Define(KPropertyCategory, KMiscPluginPropertyKey, RProperty::EInt);
+	TEST ((KErrNone == err) || (KErrAlreadyExists == err));
+	err = RProperty::Set(KPropertyCategory, KMiscPluginPropertyKey, 1);
+	TEST (KErrNone == err);
+	
 	//Start the test exe which defines startup related property keys
 	RProcess processHandle;
 	CleanupClosePushL(processHandle);
@@ -108,23 +116,36 @@
 	User::LeaveIfError(retVal);
 	CleanupStack::PopAndDestroy();
 	
+	//Start the test exe which defines startup state related property keys
 	RProcess processHandle1;
-	TInt err1 = processHandle1.Create(KExeToDefineStartUpStatePS, KNullDesC);
-	INFO_PRINTF2(_L("KExeToDefineStartUpStatePS ret is %d"), err1);
+	CleanupClosePushL(processHandle1);
+	err = processHandle1.Create(KExeToDefineStartUpStatePS, KNullDesC);
+	INFO_PRINTF2(_L("KExeToDefineStartUpStatePS ret is %d"), err);
+	User::LeaveIfError(err);
 	processHandle1.Resume();
-	processHandle1.Close();
+	
+	// wait for the newly created process to rendezvous
+	processHandle1.Rendezvous(status);
+	User::WaitForRequest(status);
+	retVal = status.Int();
+	//leave if the process has not started properly
+	INFO_PRINTF2(_L("KExeToDefineStartUpStatePS rendezvous returns %d"), retVal);
+    User::LeaveIfError(retVal);
+    CleanupStack::PopAndDestroy();
 
 	//there are 8 different scenarios to test the custom command. Check the test spec for the scenarios.
  	//CMiscAdaptationRef::SecurityStateChange() has been changed to simulate the scenarios.
 	//CMiscAdaptationRef::SecurityStateChange() uses KTestCmdSecurityCheckTestFile to get the scenario number
 	//connect to file server
+
     User::LeaveIfError(iFs.Connect());
-	TInt err = iFs.MkDirAll(KDirNameOfTestCasesNumFile);
+	err = iFs.MkDirAll(KDirNameOfTestCasesNumFile);
 	if (KErrAlreadyExists != err && KErrNone != err)
 		{
 		User::Leave(err);
 		}
 	err = iFile.Replace(iFs, KTestCmdSecurityCheckTestFile, EFileWrite | EFileStream);
+	TEST(KErrNone == err);
 	iFile.Close();
 	
 	//For stopping the key simulation when execution behaviour is deferredwaitforsignal and fireandforget
@@ -135,7 +156,8 @@
 	TEST(KErrNone == connect);
 	
 	//RProperty property;
-	iProperty.Define(KCustomcmdServerSID, iSwp.Key(), RProperty::EInt);
+	err = iProperty.Define(KCustomcmdServerSID, iSwp.Key(), RProperty::EInt);
+	TEST ((KErrNone == err) || (KErrAlreadyExists == err));
 	
 	// Register mapping between keys and swp policy DLL (done once per ssmserver)
 	INFO_PRINTF1(_L("Registering swp..."));
@@ -455,6 +477,8 @@
 TVerdict CCustomCmdTestSecurityPinCheck::doTestStepPostambleL()
 	{
 	TEST(KErrNone == iProperty.Delete(KCustomcmdServerSID, iSwp.Key()));
+	TInt err = RProperty::Delete(KPropertyCategory, KMiscPluginPropertyKey);
+	TEST (KErrNone == err);
 	iProperty.Close();
 	iClient.Close();
 	//delete the file		
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/defineemergencycallps.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/defineemergencycallps.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -17,7 +17,7 @@
 
 TARGET			defineemergencycallps.exe
 TARGETTYPE		exe
-CAPABILITY  	none
+CAPABILITY  	WriteDeviceData
 
 UID           	0x100039CE 0x2001032C
 VENDORID 		0x70000001
@@ -32,7 +32,7 @@
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
-SYSTEMINCLUDE	/epoc32/include/techview
+MW_LAYER_SYSTEMINCLUDE
 
 // Registration file
 SOURCEPATH    	../src
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/definestartupps.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/definestartupps.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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,7 +15,7 @@
 
 TARGET			definestartupps.exe
 TARGETTYPE		exe
-CAPABILITY  	none
+CAPABILITY  	WriteDeviceData
 
 UID           	0x100039CE 0x2000E65E
 VENDORID 		0x70000001
@@ -29,8 +29,9 @@
 USERINCLUDE		../../../clayer/inc
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-MW_LAYER_SYSTEMINCLUDE_SYMBIAN 
-SYSTEMINCLUDE	/epoc32/include/techview
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+MW_LAYER_SYSTEMINCLUDE  
+
 
 // Registration file
 SOURCEPATH    	../src
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/ssrefpluginstest_tuintcustcmd.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,39 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Ssrefplugins_TUnitCustCmd EN"}
+
+; Vendor name
+: "Ssrefplugins_TUnitCustCmd"
+
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_coopsysperformrestartactions.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_coopsysperformrestartactions.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_coopsysperformrfsactions.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_coopsysperformrfsactions.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_coopsysperformshutdownactions.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_coopsysperformshutdownactions.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_coopsysselftest.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_coopsysselftest.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_activaterfforemergencycall.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_activaterfforemergencycall.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_deactivaterfforemergencycall.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_deactivaterfforemergencycall.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_coopsysstatechange.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_coopsysstatechange.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_publishstartupmode.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_publishstartupmode.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_execute.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_execute.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_publishsimownedandchanged.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_publishsimownedandchanged.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_simsecuritycheck.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_simsecuritycheck.script"
+"\sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\test\tunitcustcmd\scripts\ssrefpluginstest_custcmd_devicesecuritycheck.script"-"c:\devicesrv\ssrefpluginstest\ssrefpluginstest_custcmd_devicesecuritycheck.script"
+
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/testpinnotifier.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/testpinnotifier.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,8 +19,13 @@
  @internalComponent - Internal Symbian test code 
 */
 
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
+#include <avkon.rh>
+#include <avkon.rsg>
+
+#include <eikon.rh>
+#include <eikon.rsg>
+
+#define qtn_sen_pindlg_auth_title             "Security check"
 
 NAME SPIN
 
@@ -30,21 +35,31 @@
 
 RESOURCE TBUF16 { buf=""; }
 
+
+
 RESOURCE DIALOG r_security_pin
 	{
-	title="Security check";
-	buttons=R_EIK_BUTTONS_CANCEL_OK;
+    flags = EGeneralQueryFlags;
+    title="Security check";
+	buttons=R_AVKON_SOFTKEYS_OK_CANCEL;
 
 	items =
 		{
-		DLG_LINE
-			{
-			type = EEikCtSecretEd; //Control factory id.
-			id = 0;
-			control = SECRETED
-				{
-				num_letters=8;
-				};
-			}
+		DLG_LINE 
+		    {
+		    type = EAknCtQuery;
+		    id = EGeneralQuery;
+		    control = AVERELL_DATA_QUERY 
+		        {
+		        layout = EPinLayout;
+		        label = qtn_sen_pindlg_auth_title;
+		        control = SECRETED 
+		            {
+		            num_letters = 8   ;//KSenMaxPasswordLength
+		            };
+		        };
+		    }
 		};
 	}
+
+RESOURCE TBUF r_pinnotdlg_auth_title                { buf = qtn_sen_pindlg_auth_title; }
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/testpinnotifierplugin.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/testpinnotifierplugin.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -35,7 +35,7 @@
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE 	/epoc32/include/techview
+MW_LAYER_SYSTEMINCLUDE
 #ifndef SYMBIAN_OLD_EXPORT_LOCATION
 SYSTEMINCLUDE   /epoc32/include/platform/app
 #endif
@@ -49,7 +49,7 @@
 TARGET testpinnotifierplugin.rsc
 END
 
-SOURCEPATH	    ./../src
+SOURCEPATH	    ../src
 SOURCE  testpinnotifierplugin.cpp
 
 LIBRARY euser.lib
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/tunitcustcmd_server.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/tunitcustcmd_server.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -101,6 +101,7 @@
 LIBRARY			centralrepository.lib
 LIBRARY			ssmuiproviderdll.lib
 LIBRARY			ssmadaptationcli.lib
+LIBRARY			ws32.lib
 
 LIBRARY		etelmm.lib //Device security check
 LIBRARY		etel.lib //Device security check
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/inc/testpinnotifierplugin.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/inc/testpinnotifierplugin.h	Tue Aug 31 16:29:05 2010 +0300
@@ -26,7 +26,7 @@
 #include <e32std.h>
 #include <e32base.h>
 #include <eiknotapi.h>
-#include <techview/eikdialg.h>
+#include <eikdialg.h>
 #include <e32cmn.h>
 
 
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/scripts/ssrefpluginstest_custcmd_activaterfforemergencycall.script	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/scripts/ssrefpluginstest_custcmd_activaterfforemergencycall.script	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -13,7 +13,7 @@
 // Description:
 //
 
-PRINT Run CCustomCmdTestDeactivateRfForEmergencyCall tests
+PRINT Run CCustomCmdTestActivateRfForEmergencyCall tests
 
 LOAD_SUITE tunitcustcmd_server
 
@@ -30,5 +30,5 @@
 //! 					2.	Initialize - Initialising the custom cmd
 //! 					3.	Execute - Executing the custom cmd
 //! @SYMTestExpectedResults 	Command should execute normally and should complete with KErrNone.
-RUN_TEST_STEP 100 tunitcustcmd_server CCustomCmdTestDeactivateRfForEmergencyCall
+RUN_TEST_STEP 100 tunitcustcmd_server CCustomCmdTestActivateRfForEmergencyCall
 END_TESTCASE 			DEVSRVS-SSREFPLUGINS-CUSTCMD-0001
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/scripts/ssrefpluginstest_custcmd_deactivaterfforemergencycall.script	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/scripts/ssrefpluginstest_custcmd_deactivaterfforemergencycall.script	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -13,7 +13,7 @@
 // Description:
 //
 
-PRINT Run CCustomCmdTestActivateRfForEmergencyCall tests
+PRINT Run CCustomCmdTestDeactivateRfForEmergencyCall tests
 
 LOAD_SUITE tunitcustcmd_server
 
@@ -30,6 +30,6 @@
 //! 					2.	Initialize - Initialising the custom cmd
 //! 					3.	Execute - Executing the custom cmd
 //! @SYMTestExpectedResults Command should execute normally and should complete with KErrNone.
-RUN_TEST_STEP 100 tunitcustcmd_server CCustomCmdTestActivateRfForEmergencyCall
+RUN_TEST_STEP 100 tunitcustcmd_server CCustomCmdTestDeactivateRfForEmergencyCall
 END_TESTCASE 			DEVSRVS-SSREFPLUGINS-CUSTCMD-0008
 
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_activaterfforemergencycall.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_activaterfforemergencycall.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,6 +22,9 @@
 #include "tcmd_step_activaterfforemergencycall.h"
 #include "ssmcustomcmdfactory.h"
 #include "cmdactivaterfforemergencycall.h"
+#include <e32property.h>
+const TUint32 KEmergencyCallRfAdaptationPluginPropertyKey = 0x2000E657;
+const TUid KPropertyCategory={0x2000D75B};
 
 CCustomCmdTestActivateRfForEmergencyCall::~CCustomCmdTestActivateRfForEmergencyCall()
 	{
@@ -41,6 +44,11 @@
 	{
 	_LIT(KTESTLOG, "TestCustomCmdActivateRfForEmergencyCallL");
 	INFO_PRINTF1(KTESTLOG);
+	// Setting the P and S key will route the request to the reference plugins instead of the actual plugins
+	TInt err = RProperty::Define(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, RProperty::EInt);
+	TEST(KErrNone == err || KErrAlreadyExists == err);
+    err = RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 1);
+    TEST(KErrNone == err);
 
 	//Create Deactivate Rf For Emergency Call custom command
 	MSsmCustomCommand* customCmdActivateRfForEmergencyCall = SsmCustomCmdFactory::CmdActivateRfForEmergencyCallNewL();
@@ -56,12 +64,11 @@
 	//Command parameter is not used inside the Execute. So passing any dummy data should be fine
 	//Execute the command
 	customCmdActivateRfForEmergencyCall->Execute(dummy, status);
-	TEST(KRequestPending == status.Int());
 
 	//Wait for the request to be completed
 	User::WaitForRequest(status);
 	TEST(KErrNone == status.Int());
-
+	
 	//Execute the command once again
 	customCmdActivateRfForEmergencyCall->Execute(dummy, status);
 
@@ -73,12 +80,14 @@
 	//checking the status to KErrNone instead of KErrCancel.
 	User::WaitForRequest(status);
 	TEST(KErrNone == status.Int());
-
+	
 	//Close the command
 	customCmdActivateRfForEmergencyCall->Close();
 
 	//Releasing the comand will delete itself.
 	customCmdActivateRfForEmergencyCall->Release();
+	err = RProperty::Delete(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey);
+	TEST(KErrNone == err);
 	}
 
 TVerdict CCustomCmdTestActivateRfForEmergencyCall::doTestStepL()
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysperformrestartactions.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysperformrestartactions.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,6 +22,10 @@
 #include "tcmd_step_coopsysperformrestartactions.h"
 #include "ssmcustomcmdfactory.h"
 #include "cmdcoopsysperformrestartactions.h"
+#include <e32property.h>
+
+const TUint32 KStateAdaptationPluginPropertyKey = 0x2000D76A;
+const TUid KPropertyCategory={0x2000D75B};
 
 CCustomCmdTestCoopSysPerformRestartActions::~CCustomCmdTestCoopSysPerformRestartActions()
 	{
@@ -39,6 +43,12 @@
 
 void CCustomCmdTestCoopSysPerformRestartActions::TestCustomCmdCoopSysPerformRestartActionsL()
 	{
+	// Setting the P and S key will route the request to the reference plugins instead of the actual plugins
+    TInt err = RProperty::Define(KPropertyCategory, KStateAdaptationPluginPropertyKey, RProperty::EInt);
+    TEST(KErrNone == err || KErrAlreadyExists == err);
+    err = RProperty::Set(KPropertyCategory, KStateAdaptationPluginPropertyKey, 1);
+    TEST(KErrNone == err);
+    
 	_LIT(KTESTLOG, "TestCustomCmdCoopSysPerformRestartActionsL");
 	INFO_PRINTF1(KTESTLOG);
 
@@ -80,6 +90,9 @@
 	
 	//Releasing the comand will delete itself.
 	customCmdCoopSysPerformRestartActions->Release();
+	
+	err = RProperty::Delete(KPropertyCategory, KStateAdaptationPluginPropertyKey);
+    TEST(KErrNone == err);
 	}
 
 TVerdict CCustomCmdTestCoopSysPerformRestartActions::doTestStepL()
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysperformrfsactions.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysperformrfsactions.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,6 +22,10 @@
 #include "tcmd_step_coopsysperformrfsactions.h"
 #include "ssmcustomcmdfactory.h"
 #include "cmdcoopsysperformrfsactions.h"
+#include <e32property.h>
+
+const TUint32 KStateAdaptationPluginPropertyKey = 0x2000D76A;
+const TUid KPropertyCategory={0x2000D75B};
 
 CCustomCmdTestCoopSysPerformRfsActions::~CCustomCmdTestCoopSysPerformRfsActions()
 	{
@@ -39,6 +43,11 @@
 
 void CCustomCmdTestCoopSysPerformRfsActions::TestCustomCmdCoopSysPerformRfsActionsL()
 	{
+	// Setting the P and S key will route the request to the reference plugins instead of the actual plugins
+    TInt err = RProperty::Define(KPropertyCategory, KStateAdaptationPluginPropertyKey, RProperty::EInt);
+    TEST(KErrNone == err || KErrAlreadyExists == err);
+    err = RProperty::Set(KPropertyCategory, KStateAdaptationPluginPropertyKey, 1);
+    TEST(KErrNone == err);
 	_LIT(KTESTLOG, "TestCustomCmdCoopSysPerformRfsActionsL");
 	INFO_PRINTF1(KTESTLOG);
 
@@ -87,6 +96,8 @@
 	
 	//Releasing the comand will delete itself.
 	customCmdCoopSysPerformRfsActions->Release();
+	err = RProperty::Delete(KPropertyCategory, KStateAdaptationPluginPropertyKey);
+	TEST(KErrNone == err);
 	}
 
 TVerdict CCustomCmdTestCoopSysPerformRfsActions::doTestStepL()
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysperformshutdownactions.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysperformshutdownactions.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,6 +22,10 @@
 #include "tcmd_step_coopsysperformshutdownactions.h"
 #include "ssmcustomcmdfactory.h"
 #include "cmdcoopsysperformshutdownactions.h"
+#include <e32property.h>
+
+const TUint32 KStateAdaptationPluginPropertyKey = 0x2000D76A;
+const TUid KPropertyCategory={0x2000D75B};
 
 CCustomCmdTestCoopSysPerformShutdownActions::~CCustomCmdTestCoopSysPerformShutdownActions()
 	{
@@ -39,6 +43,11 @@
 
 void CCustomCmdTestCoopSysPerformShutdownActions::TestCustomCmdCoopSysPerformShutdownActionsL()
 	{
+	// Setting the P and S key will route the request to the reference plugins instead of the actual plugins
+    TInt err = RProperty::Define(KPropertyCategory, KStateAdaptationPluginPropertyKey, RProperty::EInt);
+    TEST(KErrNone == err || KErrAlreadyExists == err);
+    err = RProperty::Set(KPropertyCategory, KStateAdaptationPluginPropertyKey, 1);
+    TEST(KErrNone == err);
 	_LIT(KTESTLOG, "TestCustomCmdCoopSysPerformShutdownActionsL");
 	INFO_PRINTF1(KTESTLOG);
 
@@ -81,6 +90,8 @@
 	
 	//Releasing the comand will delete itself.
 	customCmdCoopSysPerformShutdownActions->Release();
+	err = RProperty::Delete(KPropertyCategory, KStateAdaptationPluginPropertyKey);
+    TEST(KErrNone == err);
 	}
 
 TVerdict CCustomCmdTestCoopSysPerformShutdownActions::doTestStepL()
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysselftest.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysselftest.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,6 +22,10 @@
 #include "tcmd_step_coopsysselftest.h"
 #include "ssmcustomcmdfactory.h"
 #include "cmdcoopsysselftest.h"
+#include <e32property.h>
+
+const TUint32 KStateAdaptationPluginPropertyKey = 0x2000D76A;
+const TUid KPropertyCategory={0x2000D75B};
 
 CCustomCmdTestCoopSysSelfTest::~CCustomCmdTestCoopSysSelfTest()
 	{
@@ -39,6 +43,11 @@
 
 void CCustomCmdTestCoopSysSelfTest::TestCustomCmdCoopSysSelfTestL()
 	{
+	// Setting the P and S key will route the request to the reference plugins instead of the actual plugins
+    TInt err = RProperty::Define(KPropertyCategory, KStateAdaptationPluginPropertyKey, RProperty::EInt);
+    TEST(KErrNone == err || KErrAlreadyExists == err);
+    err = RProperty::Set(KPropertyCategory, KStateAdaptationPluginPropertyKey, 1);
+    TEST(KErrNone == err);
 	_LIT(KTESTLOG, "TestCustomCmdCoopSysSelfTestL");
 	INFO_PRINTF1(KTESTLOG);
 
@@ -80,6 +89,8 @@
 	
 	//Releasing the comand will delete itself.
 	customCmdCoopSysSelfTest->Release();
+	err = RProperty::Delete(KPropertyCategory, KStateAdaptationPluginPropertyKey);
+	TEST(KErrNone == err);
 	}
 
 TVerdict CCustomCmdTestCoopSysSelfTest::doTestStepL()
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysstatechange.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_coopsysstatechange.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,7 +22,10 @@
 #include "tcmd_step_coopsysstatechange.h"
 #include "ssmcustomcmdfactory.h"
 #include <ssm/ssmstate.h>
+#include <e32property.h>
 #include "cmdcoopsysstatechange.h"
+const TUint32 KStateAdaptationPluginPropertyKey = 0x2000D76A;
+const TUid KPropertyCategory={0x2000D75B};
 
 CCustomCmdTestCoopSysStateChange::~CCustomCmdTestCoopSysStateChange()
 	{
@@ -40,6 +43,12 @@
 
 void CCustomCmdTestCoopSysStateChange::TestCustomCmdCoopSysStateChangeL()
 	{
+	// Setting the P and S key will route the request to the reference plugins instead of the actual plugins
+	TInt err = RProperty::Define(KPropertyCategory, KStateAdaptationPluginPropertyKey, RProperty::EInt);
+	TEST(KErrNone == err || KErrAlreadyExists == err);
+	err = RProperty::Set(KPropertyCategory, KStateAdaptationPluginPropertyKey, 1);
+	TEST(KErrNone == err);
+	
 	_LIT(KTESTLOG, "TestCustomCmdCoopSysStateChangeL");
 	INFO_PRINTF1(KTESTLOG);
 
@@ -79,6 +88,8 @@
 	
 	//Releasing the comand will delete itself.
 	customCmdCoopSysStateChange->Release();
+	err = RProperty::Delete(KPropertyCategory, KStateAdaptationPluginPropertyKey);
+	TEST(KErrNone == err);
 	}
 
 TVerdict CCustomCmdTestCoopSysStateChange::doTestStepL()
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_deactivaterfforemergencycall.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_deactivaterfforemergencycall.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,6 +22,9 @@
 #include "tcmd_step_deactivaterfforemergencycall.h"
 #include "ssmcustomcmdfactory.h"
 #include "cmddeactivaterfforemergencycall.h"
+#include <e32property.h>
+const TUint32 KEmergencyCallRfAdaptationPluginPropertyKey = 0x2000E657;
+const TUid KPropertyCategory={0x2000D75B};
 
 CCustomCmdTestDeactivateRfForEmergencyCall::~CCustomCmdTestDeactivateRfForEmergencyCall()
 	{
@@ -41,6 +44,11 @@
 	{
 	_LIT(KTESTLOG, "TestCustomCmdDeactivateRfForEmergencyCallL");
 	INFO_PRINTF1(KTESTLOG);
+	// Setting the P and S key will route the request to the reference plugins instead of the actual plugins
+	TInt err = RProperty::Define(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, RProperty::EInt);
+	TEST(KErrNone == err || KErrAlreadyExists == err);
+    err = RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 1);
+    TEST(KErrNone == err);
 
 	//Create Deactivate Rf For Emergency Call custom command
 	MSsmCustomCommand* customCmdDeactivateRfForEmergencyCall = CCustomCmdDeactivateRfForEmergencyCall::NewL();
@@ -56,12 +64,12 @@
 	//Command parameter is not used inside the Execute. So passing any dummy data should be fine
 	//Execute the command
 	customCmdDeactivateRfForEmergencyCall->Execute(dummy, status);
-	TEST(KRequestPending == status.Int());
 
+	
 	//Wait for the request to be completed
 	User::WaitForRequest(status);
 	TEST(KErrNone == status.Int());
-
+	
 	//Execute the command once again
 	customCmdDeactivateRfForEmergencyCall->Execute(dummy, status);
 
@@ -72,12 +80,14 @@
 	//is called it might have completed executing Execute() function. Thats is the reason for 
 	//checking the status to KErrNone instead of KErrCancel.
 	TEST(KErrNone == status.Int());
-
+	
 	//Close the command
 	customCmdDeactivateRfForEmergencyCall->Close();
 
 	//Releasing the comand will delete itself.
 	customCmdDeactivateRfForEmergencyCall->Release();
+	err = RProperty::Delete(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey);
+	TEST(KErrNone == err);
 	}
 
 TVerdict CCustomCmdTestDeactivateRfForEmergencyCall::doTestStepL()
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_devicesecuritycheck.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_devicesecuritycheck.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -23,6 +23,11 @@
 #include "ssmsecuritychecknotifier.h"
 #include "ssmuiproviderdll.h"
 #include "ssmcustomcmdfactory.h"
+#include <w32std.h>
+#include <s32file.h>
+
+const TUid KPropertyCategory={0x2000D75B}; 
+const TUint32 KMiscPluginPropertyKey = 0x2000E658;
 
 CCustomCmdTestDeviceSecurityCheck::~CCustomCmdTestDeviceSecurityCheck()
 	{
@@ -44,6 +49,10 @@
 	iActiveScheduler = new(ELeave) CActiveScheduler;
 	CActiveScheduler::Install (iActiveScheduler);
 	iActiveSchedulerWait = new(ELeave) CActiveSchedulerWait;
+	TInt err = RProperty::Define(KPropertyCategory, KMiscPluginPropertyKey, RProperty::EInt);
+	TEST(KErrNone == err || KErrAlreadyExists == err);
+	err = RProperty::Set(KPropertyCategory, KMiscPluginPropertyKey, 1);
+	TEST(KErrNone == err);
 
 	//Needed for calling calback for stopping active scheduler
 	iAsyncStopScheduler = new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
@@ -52,12 +61,20 @@
 
 TVerdict CCustomCmdTestDeviceSecurityCheck::doTestStepPostambleL()
 	{
+	TInt err = RProperty::Delete(KPropertyCategory, KMiscPluginPropertyKey);
+	TEST(KErrNone == err);
 	return CTestStep::doTestStepPostambleL();
 	}
 
 void CCustomCmdTestDeviceSecurityCheck::SimulatePasswordEntry()
 	{
-	//Simulate the key press ,(comma) in to pin notifier dialogue
+    RWsSession wsSession;
+    TInt err = wsSession.Connect();
+    TEST(KErrNone == err);
+    
+    const TInt okButtonPos1 = 60; //the position of ok button
+    const TInt okButtonPos2 = 600; //the position of ok button
+    //Simulate the key press ,(comma) in to pin notifier dialogue
 	TRawEvent eventDown;
 	TRawEvent eventUp;
 
@@ -80,11 +97,14 @@
 		iWrongPwd = EFalse;
 		}
 
-	eventDown.Set(TRawEvent::EKeyDown, EStdKeyEnter);
-	UserSvr::AddEvent(eventDown);
-	eventUp.Set(TRawEvent::EKeyUp, EStdKeyEnter);
-	UserSvr::AddEvent(eventUp);
-	User::After(100000);
+    eventDown.Set(TRawEvent::EButton1Down, okButtonPos1,okButtonPos2);
+    UserSvr::AddEvent(eventDown);
+    eventUp.Set(TRawEvent::EButton1Up, okButtonPos1,okButtonPos2);
+    UserSvr::AddEvent(eventUp);
+    User::After(100000);
+    
+    wsSession.Flush();
+    wsSession.Close();
 	}
 
 static TInt CallBackL(TAny* aCCustomCmdTestSimSecurityCheck)
@@ -145,13 +165,9 @@
 
 	TestLockPhoneDeviceRespReceivedHelperL();
 
-#ifdef __WINS__
 	INFO_PRINTF3(_L("Result at line %d is %d "),__LINE__ + 1, iRequest.Int());
 	TEST(KErrNone == iRequest.Int());
-#else
-	INFO_PRINTF3(_L("Result at line %d is %d "),__LINE__ + 1, iRequest.Int());
-	TEST(KErrNotSupported == iRequest.Int());
-#endif
+
 	}
 
 void CCustomCmdTestDeviceSecurityCheck::TestLockPhoneDeviceRespReceived2L()
@@ -160,14 +176,16 @@
 	iCustomCmdDevSecurityCheck->iLockInfo.iStatus = RMobilePhone::EStatusLockUnknown;
 
 	TestLockPhoneDeviceRespReceivedHelperL();
-	INFO_PRINTF3(_L("Result at line %d is %d "),__LINE__ + 1, iRequest.Int());
-	TEST(KErrNotSupported == iRequest.Int());
+
 
-/*#ifdef __WINS__
-	TEST(KErrNone == iRequest.Int());
+#ifdef __WINS__
+	INFO_PRINTF3(_L("Result at line %d is %d "),__LINE__ + 1, iRequest.Int());
+	TEST(KErrNotFound == iRequest.Int());
 #else
-	TEST(KErrNotSupported == iRequest.Int());
-#endif*/
+    INFO_PRINTF3(_L("Result at line %d is %d "),__LINE__ + 1, iRequest.Int());
+	TEST(KErrNone == iRequest.Int());
+#endif
+    INFO_PRINTF1(_L("TestLockPhoneDeviceRespReceived2L"));
 	}
 
 void CCustomCmdTestDeviceSecurityCheck::TestLockPhoneDeviceRespReceived3L()
@@ -224,8 +242,13 @@
 	iAsyncStopScheduler->CallBack();
 	iActiveSchedulerWait->Start();
 
-	INFO_PRINTF3(_L("Result at line %d is %d "),__LINE__ + 1, iRequest.Int());
-	TEST(KErrNotSupported == iRequest.Int());
+#ifdef __WINS__
+    INFO_PRINTF3(_L("Result at line %d is %d "),__LINE__ + 1, iRequest.Int());
+	TEST(KErrNotFound == iRequest.Int());
+#else
+    INFO_PRINTF3(_L("Result at line %d is %d "),__LINE__ + 1, iRequest.Int());	
+    TEST(KErrNone == iRequest.Int());
+#endif
 	}
 
 void CCustomCmdTestDeviceSecurityCheck::TestLockPhoneToIccRespReceivedHelperL()
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_execute.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_execute.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// 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"
@@ -21,6 +21,9 @@
 */
 
 #include "tcmd_step_execute.h"
+#include <e32property.h>
+const TUint32 KRtcAdaptationPluginPropertyKey = 0x2000D76C;
+const TUid KPropertyCategory={0x2000D75B};
 
 /**
  This function is wrapped in  Callback and used to stop the CActiveScheduler
@@ -84,19 +87,29 @@
 void CTestCustomCmdExecute::TestCustomCmdValidateRTC()
     {
     INFO_PRINTF1(_L("TestCustomCmdValidateRTC started"));
+    // Setting the P and S key will route the request to the reference plugins instead of the actual plugins
+    TInt err = RProperty::Define(KPropertyCategory, KRtcAdaptationPluginPropertyKey, RProperty::EInt);
+    TEST(KErrNone == err || KErrAlreadyExists == err);
+    err = RProperty::Set(KPropertyCategory, KRtcAdaptationPluginPropertyKey, 1);
+    TEST(KErrNone == err);
+    
     //Create ValidateRTC custom command
     MSsmCustomCommand* customCmdValidateRTC = SsmCustomCmdFactory::CmdValidateRTCNewL();
     customCmdValidateRTC->Initialize(iCmdEnv);
     ExecuteCommand(customCmdValidateRTC);
+    // In the reference plugins, the API completes with KErrNotSupported. Hence we check for the same
     TEST(KErrNotSupported == iStatus.Int());
     ExecuteCommand(customCmdValidateRTC);
     customCmdValidateRTC->ExecuteCancel();
+    // In the reference plugins, the API completes with KErrNotSupported. Hence we check for the same
     TEST(KErrNotSupported == iStatus.Int());
     //Close the command
     customCmdValidateRTC->Close();
     //Releasing the comand will delete itself.
     customCmdValidateRTC->Release();
-    INFO_PRINTF3(_L("TestCustomCmdValidateRTC completed with %d Expected %d"),iStatus.Int(),KErrNotSupported);
+    INFO_PRINTF3(_L("TestCustomCmdValidateRTC completed with %d Expected %d"),iStatus.Int(),KErrNone);
+    err = RProperty::Delete(KPropertyCategory, KRtcAdaptationPluginPropertyKey);
+    TEST(KErrNone == err);
     }
 
 /**
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_publishstartupmode.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_publishstartupmode.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -38,6 +38,8 @@
 //Exe name which defines startup PS keys
 _LIT (KExeToDefineStartUpPS, "\\sys\\bin\\definestartupps.exe");
 _LIT(KStartUpPSKeys, "startupkeys");
+const TUint32 KMiscPluginPropertyKey = 0x2000E658;
+const TUid KPropertyCategory={0x2000D75B};
 
 CCustomCmdTestPublishStartupMode::~CCustomCmdTestPublishStartupMode()
 	{
@@ -93,11 +95,17 @@
     
         //Needed for calling callback for stopping active scheduler
         iAsyncStopScheduler = new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
-    
+        
+        // Setting the P and S key will route the request to the reference plugins instead of the actual plugins
+        TInt err = RProperty::Define(KPropertyCategory, KMiscPluginPropertyKey, RProperty::EInt);
+        TEST(KErrNone == err || KErrAlreadyExists == err);
+        err = RProperty::Set(KPropertyCategory, KMiscPluginPropertyKey, 1);
+        TEST (KErrNone == err);
+
         INFO_PRINTF1(_L("Define global startup mode property"));
     
         //Start the test exe which defines startup related property keys
-        TInt err = process.Create(KExeToDefineStartUpPS, KStartUpPSKeys());
+        err = process.Create(KExeToDefineStartUpPS, KStartUpPSKeys());
         INFO_PRINTF2(_L("Define global startup mode property process created with %d"), err);
         TEST(KErrNone == err);
         User::LeaveIfError(err);
@@ -116,6 +124,11 @@
 
 TVerdict CCustomCmdTestPublishStartupMode::doTestStepPostambleL()
 	{
+	if (iTestStepName == KTestPublishStartupModeWithCap)
+	    {
+	    TInt err = RProperty::Delete(KPropertyCategory, KMiscPluginPropertyKey);
+	    TEST (KErrNone == err);
+	    }
 	return CTestStep::doTestStepPostambleL();
 	}
 
@@ -201,8 +214,8 @@
 	TEST(iRequestStatus == KErrNone);
 	
     err = RProperty::Get(CSsmUiSpecific::StartupPSUid(), KPSGlobalStartupMode, startUpMode);
-    INFO_PRINTF3(_L("Startup mode is %d ; Expected %d"), startUpMode, 0);
-    TEST(startUpMode == 0);
+    INFO_PRINTF3(_L("Startup mode is %d ; Expected %d"), startUpMode, EStartupModeNormal);
+    TEST(startUpMode == EStartupModeNormal);
 	
     // Hidden Reset functionality is not supported in techview\hrp, so the request will be completed with KErrNotSupported
     // And the hidden reset reason would same as we set in the test code, ie., ENormalStartup.
@@ -230,6 +243,7 @@
 void CCustomCmdTestPublishStartupMode::doTestFactoryCreateAndExecuteCancelL()
 	{
 	INFO_PRINTF1(_L("Entering test for factory create, execute cancel and destroy"));
+		
 	__UHEAP_MARK;
 	
 	INFO_PRINTF1(_L("Testing factory create for publish startup mode"));
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_simsecuritycheck.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_simsecuritycheck.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -40,6 +40,9 @@
 // Use to write the PIN Check Security test case nos.
 _LIT(KTestCmdSecurityCheckTestFile, "c:\\cmdsecuritychecktest\\pinchecksecuritycaseno.txt");
 
+const TUid KPropertyCategory={0x2000D75B};
+const TUint32 KMiscPluginPropertyKey = 0x2000E658;
+
 static TInt CallBack2L(TAny* aCCustomCmdTestSecurityCheck);
 
 CCustomCmdTestSimSecurityCheck::~CCustomCmdTestSimSecurityCheck()
@@ -65,6 +68,14 @@
 	
 	//Needed fro calling calback for stopping active scheduler
 	iAsyncStopScheduler = new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
+	
+    TInt err = RProperty::Define(KPropertyCategory, KMiscPluginPropertyKey, RProperty::EInt);
+	INFO_PRINTF2(_L("Define Test Property returns : %d "), err);
+	TEST(KErrNone == err || KErrAlreadyExists == err);
+    err = RProperty::Set(KPropertyCategory, KMiscPluginPropertyKey, 1);
+	INFO_PRINTF2(_L("Set Test Property returns : %d "), err);
+	TEST(KErrNone == err);
+
 
 	RProcess processHandle;
 	CleanupClosePushL(processHandle);
@@ -98,7 +109,7 @@
 	
 	//connect to file server
 	User::LeaveIfError(iFs.Connect());
-	TInt err = iFs.MkDirAll(KDirNameOfTestCasesNumFile);
+	err = iFs.MkDirAll(KDirNameOfTestCasesNumFile);
 	if (KErrAlreadyExists != err && KErrNone != err)
 		{
 		INFO_PRINTF1(_L("Leaving as it could not create directory"));
@@ -125,6 +136,8 @@
 	{
 	iFs.Delete(KTestCmdSecurityCheckTestFile);
 	iFs.Close();
+	TInt err = RProperty::Delete(KPropertyCategory, KMiscPluginPropertyKey);
+	TEST(KErrNone == err);
 	return CTestStep::doTestStepPostambleL();
 	}
 
@@ -170,9 +183,11 @@
 	
 	TUid uid1 = CSsmUiSpecific::StartupPSUid();
 	TEST(KPSStartupUid == uid1);
+	INFO_PRINTF3(_L("Test GeneralL : KPSStartupUid = %d ; Got from CSsmUiSpecific::StartupPSUid = %d "), KPSStartupUid, uid1);
 
 	TUid uid2 = CSsmUiSpecific::SecurityPinNotifierUid();
 	TEST(KSecurityPinNotifierUid == uid2);
+	INFO_PRINTF3(_L("Test GeneralL : KSecurityPinNotifierUid = %d ; Got from CSsmUiSpecific::SecurityPinNotifierUid = %d "), KPSStartupUid, uid2);
 	
 	TEST( CSsmUiSpecific::IsSimlessOfflineSupported() );
 	
@@ -953,6 +968,8 @@
 
 void CCustomCmdTestSimSecurityCheck::SimulatePasswordEntry()
 	{
+    const TInt okButtonPos1 = 60; //the position of ok button
+    const TInt okButtonPos2 = 600; //the position of ok button
 	TRawEvent eventDown;
 	TRawEvent eventUp;
 
@@ -963,11 +980,11 @@
 	UserSvr::AddEvent(eventUp);
 	User::After(100000);
 
-	eventDown.Set(TRawEvent::EKeyDown, EStdKeyEnter);
-	UserSvr::AddEvent(eventDown);
-	eventUp.Set(TRawEvent::EKeyUp, EStdKeyEnter);
-	UserSvr::AddEvent(eventUp);
-	User::After(100000);
+    eventDown.Set(TRawEvent::EButton1Down, okButtonPos1,okButtonPos2);
+    UserSvr::AddEvent(eventDown);
+    eventUp.Set(TRawEvent::EButton1Up, okButtonPos1, okButtonPos2);
+    UserSvr::AddEvent(eventUp);
+    User::After(100000);
 	}
 
 void CCustomCmdTestSimSecurityCheck::CallBack3RunL()
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/testpinnotifierplugin.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/testpinnotifierplugin.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -21,13 +21,13 @@
 
 #include "testpinnotifierplugin.h"
 #include <ssm/ssmuiproviderdll.h>
-#include <techview/eikdialg.h>
+#include <eikdialg.h>
 #include <testpinnotifier.rsg>
 #include <bautils.h>
 #include <eikenv.h>
 #include <uikon.hrh>
 #include <ecom/implementationproxy.h>
-#include <techview/eikseced.h>
+#include <eikseced.h>
 #include <e32property.h>
 
 const TUint KCustomcmdServerPropertyKey = 0x0012AC;
@@ -36,8 +36,6 @@
 _LIT(KPinNotifierResFileNameAndPath,"\\resource\\apps\\testpinnotifier.rsc");
 _LIT(KPinNotifierTitle,"Security Check");
 
-//Hardcoding security pin code.
-_LIT(KPinCode,","); 
 
 CArrayPtr<MEikSrvNotifierBase2>* NotifierArrayL()
 	{
@@ -69,8 +67,12 @@
 
 CSecurityPinNotifier::TNotifierInfo CSecurityPinNotifier::RegisterL()
 	{
-	iInfo.iUid = CSsmUiSpecific::SecurityPinNotifierUid();
-	iInfo.iChannel = CSsmUiSpecific::ScreenOutputChannelUid();
+	const TUid KSecurityPinNotifierUid = {0x2000E667};
+	iInfo.iUid = KSecurityPinNotifierUid;
+
+	const TUid KScreenOutputChannel = {0x10009D48};	
+	iInfo.iChannel = KScreenOutputChannel;
+
 	iInfo.iPriority = ENotifierPriorityVHigh;
 	return iInfo;
 	}
@@ -160,19 +162,7 @@
 	securityResultBuffer = KErrGeneral; 
 	if (iMessage != RMessagePtr2())
 		{
-   		TBuf<5> newPINValueVerify;
-
-   		//Get pinter for the secret editor control
-   		CEikSecretEditor* pinEditor = static_cast<CEikSecretEditor*>(Control(0));
-   		pinEditor->GetText(newPINValueVerify);
-
-		//Verify the entered pin number
-		if(0 == newPINValueVerify.Compare(KPinCode))
-			{
-			securityResultBuffer = KErrNone;
-			}
-
-		pinEditor->Reset();	
+   		securityResultBuffer = KErrNone;
 		iMessage.Write(iReplySlot,securityResultBuffer);
 		iMessage.Complete(KErrNone);	
 		// Set this swp to indicate to stop the active schaduler
--- a/sysstatemgmt/tsrc/public/basic/MT_SysLangUtil/MT_SysLangUtil.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-/*
-* Copyright (c) 2002 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:  ?Description
-*
-*/
-
-
-//  CLASS HEADER
-#include "MT_SysLangUtil.h"
-
-//  EXTERNAL INCLUDES
-#include <EUnitMacros.h>
-#include <EUnitDecorators.h>
-#include <syslangutil.h>
-
-// CONSTRUCTION
-MT_SysLangUtil* MT_SysLangUtil::NewL()
-    {
-    MT_SysLangUtil* self = MT_SysLangUtil::NewLC();
-    CleanupStack::Pop();
-    return self;
-    }
-
-MT_SysLangUtil* MT_SysLangUtil::NewLC()
-    {
-    MT_SysLangUtil* self = new( ELeave ) MT_SysLangUtil();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// Destructor (virtual by CBase)
-MT_SysLangUtil::~MT_SysLangUtil()
-    {
-    Teardown();
-    }
-
-// Default constructor
-MT_SysLangUtil::MT_SysLangUtil()
-    {
-    }
-
-// Second phase construct
-void MT_SysLangUtil::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    }
-
-//  METHODS
-void MT_SysLangUtil::SetupL()
-    {
-    User::LeaveIfError( iFs.Connect() );    
-    }
-
-void MT_SysLangUtil::Teardown()
-    {
-    iFs.Close();
-    }
-    
-void MT_SysLangUtil::T_SysLangUtil_IsValidLanguageL()
-    {
-    // Get default language 
-    TInt language = 0;
-    TInt result = SysLangUtil::GetDefaultLanguage( language );
-    EUNIT_ASSERT_EQUALS( result, KErrNone );
-    
-    // Default language should be valid language
-    TBool valid = SysLangUtil::IsValidLanguage( language );
-    EUNIT_ASSERT( valid );
-    
-    // Default language should be valid language
-    valid = SysLangUtil::IsValidLanguage( language, &iFs );
-    EUNIT_ASSERT( valid );        
-    }
-    
-void MT_SysLangUtil::T_SysLangUtil_GetDefaultLanguageL()
-    {
-    // Get default language 
-    TInt language = 0;
-    TInt result = SysLangUtil::GetDefaultLanguage( language );
-    EUNIT_ASSERT_EQUALS( result, KErrNone );
-    
-    result = SysLangUtil::GetDefaultLanguage( language, &iFs );
-    EUNIT_ASSERT_EQUALS( result, KErrNone );    
-    }
-    
-void MT_SysLangUtil::T_SysLangUtil_GetInstalledLanguagesL()
-    {
-    // Create array for languages
-    CArrayFixFlat<TInt>* array = new( ELeave ) CArrayFixFlat<TInt>( 3 );
-    CleanupStack::PushL( array );
-
-    // Get installed languages
-    TInt res = SysLangUtil::GetInstalledLanguages( array );
-    EUNIT_ASSERT_EQUALS( res, KErrNone );
-    
-    array->Reset();
-    res = SysLangUtil::GetInstalledLanguages( array, &iFs );
-    EUNIT_ASSERT_EQUALS( res, KErrNone );    
-    
-    TInt count = array->Count();
-    EUNIT_ASSERT(  count > 0 );
-        
-    // Assert that each received language is a valid language
-    for( TInt i = 0; i < count; ++i )
-    	{
-    	EUNIT_ASSERT( SysLangUtil::IsValidLanguage( array->At( i ) ) );
-    	}
-    
-    CleanupStack::PopAndDestroy( array );
-    }
-
-void MT_SysLangUtil::T_SysLangUtil_RestoreSIMLanguageL()
-    {
-    // Get default language 
-    TInt language = 0;
-    TInt result = SysLangUtil::GetDefaultLanguage( language );
-    EUNIT_ASSERT_EQUALS( result, KErrNone );
-    
-    // Default language should be valid language
-    TInt res = SysLangUtil::RestoreSIMLanguage( language );    
-    EUNIT_ASSERT_EQUALS( res, KErrNone );
-
-    // Default language should be valid language
-    res = SysLangUtil::RestoreSIMLanguage( language, &iFs );    
-    EUNIT_ASSERT_EQUALS( res, KErrNone );    
-    }
-    
-//  TEST TABLE
-EUNIT_BEGIN_TEST_TABLE(
-    MT_SysLangUtil,
-    "SysLangUtil API Test",
-    "MODULE" )
-
-EUNIT_TEST(
-    "#1 Test IsValidLanguage()",
-    "SysLangUtil",
-    "IsValidLanguage",
-    "FUNCTIONALITY",
-    SetupL, T_SysLangUtil_IsValidLanguageL, Teardown)
-    
-EUNIT_TEST(
-    "#2 Test GetDefaultLanguage()",
-    "SysLangUtil",
-    "GetDefaultLanguage",
-    "FUNCTIONALITY",
-    SetupL, T_SysLangUtil_GetDefaultLanguageL, Teardown)
-    
-EUNIT_TEST(
-    "#3 Test GetInstalledLanguages()",
-    "SysLangUtil",
-    "GetInstalledLanguages",
-    "FUNCTIONALITY",
-    SetupL, T_SysLangUtil_GetInstalledLanguagesL, Teardown)
-    
-EUNIT_TEST(
-    "#4 Test RestoreSIMLanguage()",
-    "SysLangUtil",
-    "RestoreSIMLanguage",
-    "FUNCTIONALITY",
-    SetupL, T_SysLangUtil_RestoreSIMLanguageL, Teardown)    
-EUNIT_END_TEST_TABLE
--- a/sysstatemgmt/tsrc/public/basic/MT_SysLangUtil/MT_SysLangUtil.h	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2002 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:  ?Description
-*
-*/
-
-
-#ifndef __MT_SYSLANGUTIL_H__
-#define __MT_SYSLANGUTIL_H__
-
-//  EXTERNAL INCLUDES
-#include <CEUnitTestSuiteClass.h>
-#include <EUnitDecorators.h>
-#include <f32file.h>
-
-//  CLASS DEFINITION
-/**
- * SysLangUtil API test
- */
-NONSHARABLE_CLASS( MT_SysLangUtil )
-	: public CEUnitTestSuiteClass
-    {
-    public:     // Constructors and destructors
-        /**
-         * Two phase construction
-         */
-        static MT_SysLangUtil* NewL();
-        static MT_SysLangUtil* NewLC();
-        /**
-         * Destructor
-         */
-        ~MT_SysLangUtil();
-
-    private:    // Constructors and destructors
-        MT_SysLangUtil();
-        void ConstructL();
-
-    private:    // New methods
-         void SetupL();        
-         void Teardown();        
-         void T_SysLangUtil_IsValidLanguageL();        
-         void T_SysLangUtil_GetDefaultLanguageL();        
-         void T_SysLangUtil_GetInstalledLanguagesL();        
-         void T_SysLangUtil_RestoreSIMLanguageL();
-        
-    private:    // Data		
-        EUNIT_DECLARE_TEST_TABLE;
-        
-        // Own: file server session
-        RFs iFs;
-    };
-
-#endif      //  __MT_SYSLANGUTIL_H__
--- a/sysstatemgmt/tsrc/public/basic/MT_SysLangUtil/MT_SysLangUtil_DllMain.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2002 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:  ?Description
-*
-*/
-
-
-//  CLASS HEADER
-#include "MT_SysLangUtil.h"
-
-//  EXTERNAL INCLUDES
-#include <CEUnitTestSuite.h>
-
-EXPORT_C MEUnitTest* CreateTestSuiteL()
-    {
-    return MT_SysLangUtil::NewL();
-    }
--- a/sysstatemgmt/tsrc/public/basic/bwins/mt_rstartersessionU.DEF	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/tsrc/public/basic/bwins/mt_rstartersessionU.DEF	Tue Aug 31 16:29:05 2010 +0300
@@ -1,2 +1,3 @@
 EXPORTS
-	?CreateTestSuiteL@@YAPAVMEUnitTest@@XZ @ 1 NONAME ; class MEUnitTest * __cdecl CreateTestSuiteL(void)
+	?LibEntryL@@YAPAVMT_RStarterSession@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class MT_RStarterSession * LibEntryL(class CTestModuleIf &)
+
--- a/sysstatemgmt/tsrc/public/basic/eabi/mt_rstartersessionU.DEF	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/tsrc/public/basic/eabi/mt_rstartersessionU.DEF	Tue Aug 31 16:29:05 2010 +0300
@@ -1,3 +1,3 @@
 EXPORTS
-	_Z16CreateTestSuiteLv @ 1 NONAME
+	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
 
--- a/sysstatemgmt/tsrc/public/basic/group/MT_SysLangUtil.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/tsrc/public/basic/group/MT_SysLangUtil.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -32,7 +32,6 @@
 USERINCLUDE             ../MT_SysLangUtil
 
 OS_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE           /epoc32/include/Digia/EUnit
 
 LIBRARY                 EUnit.lib
 LIBRARY                 EUnitUtil.lib
--- a/sysstatemgmt/tsrc/public/basic/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/tsrc/public/basic/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004 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"
@@ -11,19 +11,20 @@
 *
 * Contributors:
 *
-* Description:
+* Description: Unit test code for RStarterSession class
 *
 */
-
-
 PRJ_PLATFORMS
     ARMV5 GCCE WINSCW
 
 PRJ_EXPORTS
 
+PRJ_TESTEXPORTS
+../init/mt_rstartersession.ini  /epoc32/winscw/c/testframework/mt_rstartersession.ini
+../rom/mt_rstartersession.iby     CORE_OS_LAYER_IBY_EXPORT_PATH( mt_rstartersession.iby )
+
 PRJ_MMPFILES
 
-
 PRJ_TESTMMPFILES
 mt_rstartersession.mmp
 
--- a/sysstatemgmt/tsrc/public/basic/group/mt_rstartersession.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/tsrc/public/basic/group/mt_rstartersession.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -11,33 +11,30 @@
 *
 * Contributors:
 *
-* Description:
+* Description: Unit test code for RStarterSession class
 *
 */
 
-
 #include <platform_paths.hrh>
 
 TARGET          MT_RStarterSession.dll
 TARGETTYPE      dll
-UID             0x1000af5a 0x01700000
 
+UID             0x1000008D 0x101FB3E7
+VENDORID        VID_DEFAULT
 CAPABILITY      ALL -TCB
-VENDORID        VID_DEFAULT
 
 SOURCEPATH      ../mt_rstartersession
 SOURCE          MT_RStarterSession.cpp
-SOURCE          MT_RStarterSession_DllMain.cpp
 
 USERINCLUDE     ../mt_rstartersession
 
-SYSTEMINCLUDE    /epoc32/include/platform/digia/eunit
+OS_LAYER_SYSTEMINCLUDE
 
 OS_LAYER_SYSTEMINCLUDE
 
-LIBRARY         EUnit.lib
-LIBRARY         EUnitUtil.lib
 LIBRARY         euser.lib
+LIBRARY     	stiftestinterface.lib
 LIBRARY         StarterClient.lib
 
 SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/tsrc/public/basic/group/mt_rstartersession.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,29 @@
+;
+; 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: Unit test code for RStarterSession class
+;
+;Languages
+&EN
+
+#{"mt_rstartersession"},(0x101FB3A7),1,0,0,TYPE=SA
+
+;Localised Vendor name
+%{"mt_rstartersession EN"}
+
+; Vendor name
+: "mt_rstartersession"
+
+"\epoc32\release\armv5\urel\MT_RStarterSession.dll" - "c:\sys\bin\MT_RStarterSession.dll"
+"..\init\MT_RStarterSession.ini"-"c:\testframework\MT_RStarterSession.ini"
+
--- a/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:
+* Description:	Unit test code for RStarterSession class
 *
 */
 
@@ -20,30 +20,30 @@
 #include "MT_RStarterSession.h"
 
 //  EXTERNAL INCLUDES
-#include <EUnitMacros.h>
-#include <EUnitDecorators.h>
+#include <stifparser.h>
+#include <stiftestinterface.h>
 
 
 //  INTERNAL INCLUDES
 #include <starterclient.h>
 #include <starter.hrh>
 
-// CONSTRUCTION
-MT_RStarterSession* MT_RStarterSession::NewL()
+// ---------------------------------------------------------
+// MT_RStarterSession::LibEntryL
+// Returns: Poiter to MT_RStarterSession class
+// ---------------------------------------------------------
+EXPORT_C MT_RStarterSession* LibEntryL( CTestModuleIf& aTestModuleIf )
     {
-    MT_RStarterSession* self = MT_RStarterSession::NewLC();
-    CleanupStack::Pop();
-
-    return self;
+	RDebug::Printf("MT_RStarterSession* LibEntryL");
+    MT_RStarterSession* libEntry( MT_RStarterSession::NewL( aTestModuleIf ) );
+    return libEntry;
     }
 
-MT_RStarterSession* MT_RStarterSession::NewLC()
+// CONSTRUCTION
+MT_RStarterSession* MT_RStarterSession::NewL(CTestModuleIf& aTestModuleIf)
     {
-    MT_RStarterSession* self = new( ELeave ) MT_RStarterSession();
-    CleanupStack::PushL( self );
-
-    self->ConstructL();
-
+	  RDebug::Printf("MT_RStarterSession* NewL");
+    MT_RStarterSession* self = new ( ELeave ) MT_RStarterSession( aTestModuleIf );
     return self;
     }
 
@@ -54,28 +54,163 @@
     }
 
 // Default constructor
-MT_RStarterSession::MT_RStarterSession()
+MT_RStarterSession::MT_RStarterSession(CTestModuleIf& /*aTestModuleIf*/)
     {
     }
 
-// Second phase construct
-void MT_RStarterSession::ConstructL()
+// -----------------------------------------------------------------------------
+// MT_SysLangUtil::Case
+// Returns a test case by number.
+//
+// This function contains an array of all available test cases
+// i.e pair of case name and test function. If case specified by parameter
+// aCaseNumber is found from array, then that item is returned.
+//
+// The reason for this rather complicated function is to specify all the
+// test cases only in one place. It is not necessary to understand how
+// function pointers to class member functions works when adding new test
+// cases. See function body for instructions how to add new test case.
+// -----------------------------------------------------------------------------
+//
+const TCaseInfo MT_RStarterSession::Case( const TInt aCaseNumber ) const
     {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
+
+    /**
+    * To add new test cases, implement new test case function and add new
+    * line to KCases array specify the name of the case and the function
+    * doing the test case
+    * In practice, do following
+    * 1) Make copy of existing test case function and change its name
+    *    and functionality. Note that the function must be added to
+    *    CenRepNotifyHandlerTest.cpp file and to CenRepNotifyHandlerTest.h
+    *    header file.
+    * 2) Add entry to following KCases array either by using FUNCENTRY or
+    *    ENTRY macro.
+    * ENTRY macro takes two parameters: test case name and test case
+    * function name.
+    * FUNCENTRY macro takes only test case function name as a parameter and uses
+    * that as a test case name and test case function name.
+    */
+	RDebug::Printf("MT_RStarterSession* case");
+    static TCaseInfoInternal const KCases[] =
+        {
+        // To add new test cases, add new items to this array       
+        ENTRY( "1 [RStarterSession] Test ConectL", &MT_RStarterSession::T_RStarterSession_Connect ),
+        ENTRY( "2 [RStarterSession] Test SetState to Normal", &MT_RStarterSession::T_RStarterSession_SetStateToNormal),
+        ENTRY( "3 [RStarterSession] Test SetStateti Alarm", &MT_RStarterSession::T_RStarterSession_SetStateToAlarm),
+        ENTRY( "4 [RStarterSession] Test SetState to Charging", &MT_RStarterSession::T_RStarterSession_SetStateToCharging),
+        ENTRY( "5 [RStarterSession] Test SetState to OffLine", &MT_RStarterSession::T_RStarterSession_SetStateToOffLine),
+        ENTRY( "6 [RStarterSession] Test SetState to BTSap", &MT_RStarterSession::T_RStarterSession_SetStateToBTSap),
+        ENTRY( "7 [RStarterSession] Test ResetNetwork", &MT_RStarterSession::T_RStarterSession_ResetNetwork),       
+        ENTRY( "8 [RStarterSession] Test IsRTCTimeValid", &MT_RStarterSession::T_RStarterSession_IsRTCTimeValid),
+        ENTRY( "9 [RStarterSession] Test ActivateRfForEmergencyCall", &MT_RStarterSession::T_RStarterSession_ActivateRfForEmergencyCall ),
+        ENTRY( "10 [RStarterSession] Test DeactivateRfAfterEmergencyCall", &MT_RStarterSession::T_RStarterSession_DeactivateRfAfterEmergencyCall),
+        ENTRY( "11 [RStarterSession] Test EndSplashScreen", &MT_RStarterSession::T_RStarterSession_EndSplashScreen),
+        ENTRY( "12 [RStarterSession] Test Reset", &MT_RStarterSession::T_RStarterSession_Reset),
+        ENTRY( "13 [RStarterSession] Test Shutdown", &MT_RStarterSession:: T_RStarterSession_Shutdown)        
+        };
+
+    // Verify that case number is valid
+    if( (TUint) aCaseNumber >= sizeof( KCases ) / sizeof( TCaseInfoInternal ) )
+        {
+        // Invalid case, construct empty object
+        TCaseInfo null( (const TText*) L"" );
+        null.iMethod = NULL;
+        return null;
+        }
+
+    // Construct TCaseInfo object and return it
+    TCaseInfo tmp ( KCases[aCaseNumber].iCaseName );
+    tmp.iMethod = KCases[aCaseNumber].iMethod;
+    tmp.iIsOOMTest = KCases[ aCaseNumber ].iIsOOMTest;
+    tmp.iFirstMemoryAllocation = KCases[ aCaseNumber ].iFirstMemoryAllocation;
+    tmp.iLastMemoryAllocation = KCases[ aCaseNumber ].iLastMemoryAllocation;
+
+    return tmp;
+    }
+
+// -----------------------------------------------------------------------------
+// MT_SysLangUtil::GetTestCasesL
+// GetTestCases is used to inquire test cases from the Test Module. Test
+// cases are stored to array of test cases. The Test Framework will be
+// the owner of the data in the RPointerArray after GetTestCases return
+// and it does the memory deallocation.
+// -----------------------------------------------------------------------------
+//
+TInt MT_RStarterSession::GetTestCasesL( const TFileName& /*aConfig*/,
+    RPointerArray<TTestCaseInfo>& aTestCases )
+    {
+	RDebug::Printf("MT_RStarterSession* gettestcase");
+    // Loop through all test cases and create new
+    // TTestCaseInfo items and append items to aTestCase array
+    for( TInt i = 0; Case(i).iMethod != NULL; i++ )
+        {
+
+        // Allocate new TTestCaseInfo from heap for a testcase definition.
+        TTestCaseInfo* newCase = new( ELeave ) TTestCaseInfo;
+
+        // PushL TTestCaseInfo to CleanupStack.
+        CleanupStack::PushL( newCase );
+
+        // Set number for the testcase.
+        // When the testcase is run, this comes as a parameter to RunTestCaseL.
+        newCase->iCaseNumber = i;
+
+        // Set title for the test case. This is shown in UI to user.
+        newCase->iTitle.Copy( Case(i).iCaseName );
+
+        // Append TTestCaseInfo to the testcase array. After appended
+        // successfully the TTestCaseInfo object is owned (and freed)
+        // by the TestServer.
+        User::LeaveIfError(aTestCases.Append ( newCase ) );
+
+        // Pop TTestCaseInfo from the CleanupStack.
+        CleanupStack::Pop( newCase );
+        }
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// MT_SysLangUtil::RunTestCaseL
+// RunTestCaseL is used to run an individual test case specified
+// by aTestCase. Test cases that can be run may be requested from
+// Test Module by GetTestCases method before calling RunTestCase.
+// -----------------------------------------------------------------------------
+//
+TInt MT_RStarterSession::RunTestCaseL( const TInt aCaseNumber,
+    const TFileName& /*aConfig*/,
+    TTestResult& aResult )
+    {
+
+    // Return value
+    TInt execStatus = KErrNone;
+
+    // Get the pointer to test case function
+    TCaseInfo tmp = Case ( aCaseNumber );
+
+    // Check that case number was valid
+    if ( tmp.iMethod != NULL )
+        {
+        // Valid case was found, call it via function pointer
+        iMethod = tmp.iMethod;
+        execStatus  = ( this->*iMethod )( aResult );
+        }
+    else
+        {
+        // Valid case was not found, return error.
+        execStatus = KErrNotFound;
+        }
+
+    // Return case execution status (not the result of the case execution)
+    return execStatus;
     }
 
 //  METHODS
-
-
-void MT_RStarterSession::SetupEmptyL(  )
-    {
-    }
     
 void MT_RStarterSession::SetupL(  )
     {
-    iRStarterSession.Connect();
+    TInt err = iRStarterSession.Connect();
+    RDebug::Print(_L("MT_RStarterSession* SetupL Connected to RStarterSession with % error"),err);
     }
     
 void MT_RStarterSession::Teardown(  )
@@ -83,155 +218,195 @@
     iRStarterSession.Close();
     }
     
-void MT_RStarterSession::TeardownEmpty(  )
-    {
-    }
-    
-void MT_RStarterSession::T_RStarterSession_ConnectL(  )
+TInt MT_RStarterSession::T_RStarterSession_Connect( TTestResult& aResult )
     {
     RStarterSession session;
     TInt err = session.Connect();
     
-    EUNIT_PRINT( _L("Connect() err = %d"), err );
-    EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value");
-    
+    if ( err != KErrNone )
+        {
+        _LIT( KDescription, "Incorrect return value in T_RStarterSession_Connect" );
+        aResult.SetResult( err, KDescription );
+        return err;
+        }
     session.Close();
-    }
-    
-void MT_RStarterSession::T_RStarterSession_SetStateL(  )
-    {
-    // Perhaps test also other values...
-    TInt err = iRStarterSession.SetState( RStarterSession::ENormal );
-    EUNIT_PRINT( _L("SetState() err = %d"), err );
-    EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value");
-    }
-    
-void MT_RStarterSession::T_RStarterSession_ResetL(  )
-    {
-    // Perhaps test also other values...
-    iRStarterSession.Reset( (RStarterSession::TResetReason)-1 );
-    }
-    
-void MT_RStarterSession::T_RStarterSession_ShutdownL(  )
-    {
-    EUNIT_PRINT( _L("Calling Shutdown()") );
-    iRStarterSession.Shutdown( );
-    }
-    
-void MT_RStarterSession::T_RStarterSession_ResetNetworkL(  )
-    {
-    TInt err = iRStarterSession.ResetNetwork( );
-    EUNIT_PRINT( _L("ResetNetwork() err = %d"), err );
-    
-    EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value");
+    return err;
     }
     
-void MT_RStarterSession::T_RStarterSession_IsRTCTimeValidL(  )
-    {
-    TBool valid = iRStarterSession.IsRTCTimeValid();
-    EUNIT_PRINT( _L("IsRTCTimeValid() returned = %d"), valid );
-    }
-    
-void MT_RStarterSession::T_RStarterSession_ActivateRfForEmergencyCallL(  )
+TInt MT_RStarterSession::T_RStarterSession_SetStateToNormal( TTestResult& aResult )
     {
-    TInt err = iRStarterSession.ActivateRfForEmergencyCall( );
-    EUNIT_PRINT( _L("ActivateRfForEmergencyCall() err = %d"), err );
-    // Do not check the return value since in some cases it is normal that
-    // KErrGeneral(-2) is returned
-    //EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value" );
+    SetupL();
+    // State transition from Normal to normal
+    TInt err = iRStarterSession.SetState( RStarterSession::ENormal );
+    
+    if ( (err != KErrArgument) && (err != KErrGeneral) && (err != KErrNone)) 
+        {
+        _LIT( KDescription, "Incorrect return value in T_RStarterSession_SetStateToNormal " );
+        aResult.SetResult( err, KDescription );
+        return err;
+        }
+    Teardown();
+    return KErrNone;
     }
+
+TInt MT_RStarterSession::T_RStarterSession_SetStateToAlarm( TTestResult& aResult )
+    {
+    SetupL();
+    // State transition from normal to Alarm 
+    TInt err = iRStarterSession.SetState( RStarterSession::EAlarm );
     
-void MT_RStarterSession::T_RStarterSession_DeactivateRfAfterEmergencyCallL(  )
+    if ( err != KErrNotSupported ) 
+        {
+        _LIT( KDescription, "Incorrect return value T_RStarterSession_SetStateToAlarm" );
+        aResult.SetResult( err, KDescription );
+        return err;
+        }
+    Teardown();
+    return KErrNone;
+    }
+
+TInt MT_RStarterSession::T_RStarterSession_SetStateToCharging( TTestResult& aResult )
     {
-    TInt err = iRStarterSession.DeactivateRfAfterEmergencyCall( );
-    EUNIT_PRINT( _L("DeactivateRfAfterEmergencyCall() err = %d"), err );
-    EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value" );
+    SetupL();
+    // State transition from normal to ECharging
+    TInt err = iRStarterSession.SetState( RStarterSession::ECharging );
+    
+    if ( err != KErrNotSupported ) 
+        {
+        _LIT( KDescription, "Incorrect return value in T_RStarterSession_SetStateEToCharging " );	
+        aResult.SetResult( err, KDescription );
+        return err;
+        }
+    Teardown();
+    return KErrNone;
+    }
 
-    // Activate RF again
-    err = iRStarterSession.ActivateRfForEmergencyCall( );
-    EUNIT_PRINT( _L("ActivateRfForEmergencyCall() err = %d"), err );
-    // Do not check the return value since in some cases it is normal that
-    // KErrGeneral(-2) is returned
-    //EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value" );
+TInt MT_RStarterSession::T_RStarterSession_SetStateToOffLine( TTestResult& aResult )
+    {
+    SetupL();
+    // State transition from normal to EOffline
+    TInt err = iRStarterSession.SetState( RStarterSession::EOffline );
+    
+    if ( err != KErrNone ) 
+        {
+        _LIT( KDescription, "Incorrect return value in T_RStarterSession_SetStateTOOffLine " );
+        aResult.SetResult( err, KDescription );
+        return err;
+        }
+    Teardown();
+    return err;
     }
-    
-void MT_RStarterSession::T_RStarterSession_EndSplashScreenL(  )
+
+TInt MT_RStarterSession::T_RStarterSession_SetStateToBTSap( TTestResult& aResult )
     {
-    TInt err = iRStarterSession.EndSplashScreen( );
-    EUNIT_PRINT( _L("EndSplashScreen() err = %d"), err );
-    EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value" );
+    SetupL();
+    // State transition from ENormal to EBTSap
+    TInt err = iRStarterSession.SetState( RStarterSession::EBTSap );
+    
+    if ( err != KErrNone ) 
+        {
+        _LIT( KDescription, "Incorrect return value in T_RStarterSession_SetStateToBTSap " );	
+        aResult.SetResult( err, KDescription );
+        return err;
+        }
+    Teardown();    
+    return err;
     }
     
-//  TEST TABLE
-EUNIT_BEGIN_TEST_TABLE(
-    MT_RStarterSession,
-    "Add test suite description here.",
-    "UNIT" )
-
-EUNIT_TEST(
-    "Connect - test0",
-    "RStarterSession",
-    "Connect - test0",
-    "FUNCTIONALITY",
-    SetupEmptyL, T_RStarterSession_ConnectL, TeardownEmpty)
+TInt MT_RStarterSession::T_RStarterSession_Reset( TTestResult& aResult )
+    {
+    SetupL();
+    // Other values will be tested in BAT testing (Manual testing)...
+    iRStarterSession.Reset( (RStarterSession::TResetReason)-1 );
+    // Make request and ignore return value
+    _LIT( KDescription, "T_RStarterSession_Reset - Calling Reset()" );
+    aResult.SetResult( KErrNone, KDescription );
+    Teardown();
+    return KErrNone;
+    }
     
-EUNIT_TEST(
-    "SetState - test1",
-    "RStarterSession",
-    "SetState - test1",
-    "FUNCTIONALITY",
-    SetupL, T_RStarterSession_SetStateL, Teardown)
+TInt MT_RStarterSession::T_RStarterSession_Shutdown(TTestResult& aResult  )
+    {
+    SetupL();
+    iRStarterSession.Shutdown( );
+    _LIT( KDescription, "T_RStarterSession_Shutdown - Calling Shutdown()" );
+    aResult.SetResult( KErrNone, KDescription );
+    Teardown();
+    return KErrNone;
+    }
     
-EUNIT_TEST(
-    "Reset - test2",
-    "RStarterSession",
-    "Reset - test2",
-    "FUNCTIONALITY",
-    SetupL, T_RStarterSession_ResetL, Teardown)
-    
-EUNIT_TEST(
-    "ResetNetwork - test4",
-    "RStarterSession",
-    "ResetNetwork - test4",
-    "FUNCTIONALITY",
-    SetupL, T_RStarterSession_ResetNetworkL, Teardown)
+TInt MT_RStarterSession::T_RStarterSession_ResetNetwork(TTestResult& aResult  )
+    {
+    SetupL();
+    TInt err = iRStarterSession.ResetNetwork( );   
+    if ( err != KErrNone )
+        {
+        _LIT( KDescription, "T_RStarterSession_ResetNetwork - Incorrect return value in " );
+        aResult.SetResult( err, KDescription );
+        return err;
+        }
+    Teardown();
+    return err;
+    }
     
-EUNIT_TEST(
-    "IsRTCTimeValid - test5",
-    "RStarterSession",
-    "IsRTCTimeValid - test5",
-    "FUNCTIONALITY",
-    SetupL, T_RStarterSession_IsRTCTimeValidL, Teardown)
+TInt MT_RStarterSession::T_RStarterSession_IsRTCTimeValid(TTestResult& aResult  )
+    {
+    SetupL();
+    TBool valid = iRStarterSession.IsRTCTimeValid();
+    if ( !valid )
+        {
+        _LIT( KDescription, "Incorrect return value in T_RStarterSession_IsRTCTimeValid  " );
+        aResult.SetResult( valid, KDescription );
+        return valid;
+        }
+    Teardown();
+    return KErrNone;
+    }
     
-EUNIT_TEST(
-    "ActivateRfForEmergencyCall - test6",
-    "RStarterSession",
-    "ActivateRfForEmergencyCall - test6",
-    "FUNCTIONALITY",
-    SetupL, T_RStarterSession_ActivateRfForEmergencyCallL, Teardown)
+TInt MT_RStarterSession::T_RStarterSession_ActivateRfForEmergencyCall(TTestResult& aResult  )
+    {
+    SetupL();
+    TInt err = iRStarterSession.ActivateRfForEmergencyCall( );
+
+    if (( err != KErrNone) && (err != KErrGeneral))
+        {
+        _LIT( KDescription, "Incorrect return value in T_RStarterSession_ActivateRfForEmergencyCall" );
+        aResult.SetResult( err, KDescription );
+        return err;
+        }
+    Teardown();
+    return err;
+    }
     
-EUNIT_TEST(
-    "DeactivateRfAfterEmergencyCall - test7",
-    "RStarterSession",
-    "DeactivateRfAfterEmergencyCall - test7",
-    "FUNCTIONALITY",
-    SetupL, T_RStarterSession_DeactivateRfAfterEmergencyCallL, Teardown)
+TInt MT_RStarterSession::T_RStarterSession_DeactivateRfAfterEmergencyCall( TTestResult& aResult )
+    {
+    SetupL();
+    TInt err = iRStarterSession.DeactivateRfAfterEmergencyCall( );
     
-EUNIT_TEST(
-    "EndSplashScreen - test8",
-    "RStarterSession",
-    "EndSplashScreen - test8",
-    "FUNCTIONALITY",
-    SetupL, T_RStarterSession_EndSplashScreenL, Teardown)
+    if (( err != KErrNone) && (err != KErrGeneral))
+        {
+        _LIT( KDescription, "Incorrect return value in T_RStarterSession_DeactivateRfAfterEmergencyCall" );
+        aResult.SetResult( err, KDescription );
+        return err;
+        }
+    // Activate RF again
+    err = iRStarterSession.ActivateRfForEmergencyCall( );
+    Teardown();
+    return err;
+    }
     
-/*    
-EUNIT_TEST(
-    "Shutdown - test3",
-    "RStarterSession",
-    "Shutdown - test3",
-    "FUNCTIONALITY",
-    SetupL, T_RStarterSession_ShutdownL, Teardown)*/
-    
-EUNIT_END_TEST_TABLE
+TInt MT_RStarterSession::T_RStarterSession_EndSplashScreen( TTestResult& aResult )
+    {
+    SetupL();
+    TInt err = iRStarterSession.EndSplashScreen( );
+    if ( err != KErrNone )
+        {
+        _LIT( KDescription, "Incorrect return value in T_RStarterSession_EndSplashScreen" );
+        aResult.SetResult( err, KDescription );
+        return err;
+        }
+    Teardown();
+    return err;
+    }
 
-//  END OF FILE
+//END OF FILE
--- a/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession.h	Tue Aug 31 16:29:05 2010 +0300
@@ -11,39 +11,50 @@
 *
 * Contributors:
 *
-* Description:
+* Description: Unit test code for RStarterSession class
 *
 */
-
-
 #ifndef __MT_RSTARTERSESSION_H__
 #define __MT_RSTARTERSESSION_H__
 
+#if defined (_MSC_VER) && (_MSC_VER >= 1000)
+#pragma once
+#endif
+// Function pointer related internal definitions
+#ifndef __GCC32__
+#define GETPTR
+#else
+#define GETPTR &
+#endif  
+#define ENTRY(str,func) {_S(str), GETPTR func,0,0,0}
+#define FUNCENTRY(func) {_S(#func), GETPTR func,0,0,0}
+
 //  EXTERNAL INCLUDES
-#include <CEUnitTestSuiteClass.h>
-#include <EUnitDecorators.h>
-
+#include <stiftestmodule.h>
 
 //  INTERNAL INCLUDES
 #include <starterclient.h>
 
-//  FORWARD DECLARATIONS
-
-
+// FORWARD DECLARATIONS
+class TCaseInfo;
+class MT_RStarterSession;
+// DESCRIPTION
+// This a Test Module interface template
+// that does not really do anything.
+typedef TInt ( MT_RStarterSession::*TestFunction )( TTestResult& );
 //  CLASS DEFINITION
 /**
  *
  */
 NONSHARABLE_CLASS( MT_RStarterSession )
-	: public CEUnitTestSuiteClass
+	: public CTestModuleBase
     {
     public:     // Constructors and destructors
 
         /**
          * Two phase construction
          */
-        static MT_RStarterSession* NewL();
-        static MT_RStarterSession* NewLC();
+        static MT_RStarterSession* NewL(CTestModuleIf& aTestModuleIf);
         /**
          * Destructor
          */
@@ -51,31 +62,85 @@
 
     private:    // Constructors and destructors
 
-        MT_RStarterSession();
-        void ConstructL();
+        MT_RStarterSession( CTestModuleIf& aTestModuleIf );
+        
+        /**
+        * Function returning test case name and pointer to test case function
+        */
+        const TCaseInfo Case( const TInt aCaseNumber ) const;
+
+   	public: // Functions from base classes
 
+        // @see CTestModuleBase
+        virtual TInt GetTestCasesL( const TFileName& aTestCaseFile,
+        RPointerArray<TTestCaseInfo>& aTestCases );
+
+        // @see CTestModuleBase
+        virtual TInt RunTestCaseL( const TInt aCaseNumber,
+        const TFileName& aTestCaseFile,
+		TTestResult& aResult );
+            
     private:    // New methods
 
         void SetupL();
-        void SetupEmptyL();
         void Teardown();
-        void TeardownEmpty();
 
-        void T_RStarterSession_ConnectL();
-        void T_RStarterSession_SetStateL();
-        void T_RStarterSession_ResetL();
-        void T_RStarterSession_ShutdownL();
-        void T_RStarterSession_ResetNetworkL();
-        void T_RStarterSession_IsRTCTimeValidL();
-        void T_RStarterSession_ActivateRfForEmergencyCallL();
-        void T_RStarterSession_DeactivateRfAfterEmergencyCallL();
-        void T_RStarterSession_EndSplashScreenL();
+        TInt T_RStarterSession_Connect(TTestResult& aResult);
+        TInt T_RStarterSession_SetState(TTestResult& aResult);
+        TInt T_RStarterSession_SetStateToNormal(TTestResult& aResult);
+        TInt T_RStarterSession_SetStateToAlarm(TTestResult& aResult);
+        TInt T_RStarterSession_SetStateToCharging(TTestResult& aResult);
+        TInt T_RStarterSession_SetStateToOffLine(TTestResult& aResult);
+        TInt T_RStarterSession_SetStateToBTSap(TTestResult& aResult);
+        TInt T_RStarterSession_Reset(TTestResult& aResult);
+        TInt T_RStarterSession_Shutdown(TTestResult& aResult);
+        TInt T_RStarterSession_ResetNetwork(TTestResult& aResult);
+        TInt T_RStarterSession_IsRTCTimeValid(TTestResult& aResult);
+        TInt T_RStarterSession_ActivateRfForEmergencyCall(TTestResult& aResult);
+        TInt T_RStarterSession_DeactivateRfAfterEmergencyCall(TTestResult& aResult);
+        TInt T_RStarterSession_EndSplashScreen(TTestResult& aResult);
 
     private:    // Data
-		
+		TestFunction    iMethod;
         RStarterSession iRStarterSession;
-        EUNIT_DECLARE_TEST_TABLE; 
+
+    };
+
+// Function pointer related internal definitions
+
+// Hack around known GCC bug.
+#ifndef __GCC32__
+    #define GETPTR
+#else
+    #define GETPTR &
+#endif
+
 
+// An internal structure containing a test case name and
+// the pointer to function doing the test
+class TCaseInfoInternal
+    {
+    public:
+        const TText* iCaseName;
+        TestFunction iMethod;
+        TBool           iIsOOMTest;
+        TInt            iFirstMemoryAllocation;
+        TInt            iLastMemoryAllocation;
+    };
+
+// An internal structure containing a test case name and
+// the pointer to function doing the test
+class TCaseInfo
+    {
+    public:
+        TPtrC iCaseName;
+        TestFunction iMethod;
+        TBool           iIsOOMTest;
+        TInt            iFirstMemoryAllocation;
+        TInt            iLastMemoryAllocation;
+    TCaseInfo( const TText* a ) : iCaseName( ( TText* ) a )
+        {
+        };
     };
 
 #endif      //  __MT_RSTARTERSESSION_H__
--- a/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession_DllMain.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession_DllMain.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-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,7 +20,7 @@
 #include "MT_RStarterSession.h"
 
 //  EXTERNAL INCLUDES
-#include <CEUnitTestSuite.h>
+#include <digia/eunit/CEUnitTestSuite.h>
 
 EXPORT_C MEUnitTest* CreateTestSuiteL()
     {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/tsrc/public/basic/rom/mt_rstartersession.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* 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: Unit test code for RStarterSession class
+* Image description file for rstartersession test
+*
+*/
+
+#ifndef MT_RSTARTERSESSION_IBY
+#define MT_RSTARTERSESSION_IBY
+
+file=ABI_DIR\BUILD_DIR\MT_RStarterSession.dll SHARED_LIB_DIR\MT_RStarterSession.dll
+
+#endif // 	MT_RSTARTERSESSION_IBY
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/layers.sysdef.xml	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!DOCTYPE SystemDefinition [
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+  name CDATA #REQUIRED
+  schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED
+  span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset 
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED  
+  span CDATA #IMPLIED
+  level CDATA #IMPLIED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+  name CDATA #REQUIRED
+  level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+  unitID ID #REQUIRED
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  bldFile CDATA #REQUIRED
+  priority CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+  name CDATA #REQUIRED
+  version CDATA #REQUIRED
+  late (Y|N) #IMPLIED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+  name ID #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+  name ID #REQUIRED
+  abldTarget CDATA #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+  name ID #REQUIRED
+  abldOption CDATA #REQUIRED
+  description CDATA #REQUIRED
+  enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+  command CDATA #REQUIRED
+  targetList IDREFS #IMPLIED
+  unitParallel (Y | N | y | n) #REQUIRED
+  targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+  name CDATA #REQUIRED
+  cwd CDATA #REQUIRED
+  command CDATA #REQUIRED>
+  <!ENTITY layer_real_source_path "sf/os/devicesrv/systemhealthmanagement" >
+]>
+
+<SystemDefinition name="Dvscode" schema="1.4.0">
+  <systemModel>
+    <layer name="os_layer">
+		<module name="DeviceSrv_DFS">
+			<unit name="systemhealthmgr" unitID="sos.systemhealthmgr" bldFile="&layer_real_source_path;/systemhealthmgr/group" mrp="&layer_real_source_path;/systemhealthmgr/group/app-framework_shma.mrp"/>
+		</module>
+    </layer>
+	
+	<layer name="api_test_layer">
+		<module name="DeviceSrv_DFS">
+			<unit name="systemhealthmgr" unitID="sos.systemhealthmgr_test" bldFile="&layer_real_source_path;/systemhealthmgr/group" mrp="&layer_real_source_path;/systemhealthmgr/group/app-framework_shma.mrp"/>
+		</module>
+	</layer>
+
+  </systemModel>
+</SystemDefinition>
\ No newline at end of file
--- a/systemhealthmanagement/systemhealthmgr/sysmonsrc/monitor.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/sysmonsrc/monitor.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-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,10 @@
 #include "shmapanic.h"
 #include <u32hal.h>
 
+#ifdef _DEBUG
+#include <e32property.h>
+#endif // _DEBUG
+
 const TInt CMonitor::iOffset = _FOFF(CMonitor, iSglQueLink);
 const TInt KDelayRequiredForRestartSys = 5000000;	 // required by RestartSys API, see comments in RestartSys::RestartSystem()
 
@@ -145,7 +149,7 @@
 #ifdef _DEBUG
 	TPtrC fileName = iStartupProperties->FileName();
 #endif
-	DEBUGPRINT3(_L("SysMonMonitor: Going to restart %S, old process id=%u"), &fileName, iProcessId.Id());
+	DEBUGPRINT3(_L("SysMonMonitor: Going to restart %S, old process id=%u"), &fileName, iProcessId.Id());  
 	
 	CStartSafe* startSafe = CStartSafe::NewL();	
 	CleanupStack::PushL(startSafe);
@@ -178,6 +182,20 @@
 	CleanupStack::PopAndDestroy(startSafe);	
 	DEBUGPRINT3(_L("SysMonMonitor: %S restarted, new iProcessId=%u. Logon to monitor again"), &fileName, iProcess.Id().Id());
 	
+#ifdef _DEBUG
+    TInt restartExeCount = 0;
+    // The argument passed to the process is converted into an integer and is used as the key to set the RProperty.
+    // This way each process' restart count is stored in a unique key.
+    TPtrC processArgs = iStartupProperties->Args();
+    TLex processArgsToInt(processArgs);
+    err = processArgsToInt.Val(restartExeCount);
+    if( KErrNone == err )
+        {
+        err = RProperty::Set(RProcess().SecureId(), restartExeCount, ++iRestartCount);
+        DEBUGPRINT4(_L("SysMonMonitor: Setting Test Property with key %d to %d completed with error %d"), restartExeCount, iRestartCount, err);
+        }
+#endif // _DEBUG
+    
 	iProcessId = iProcess.Id();
 	iReLaunchAttempts++;	// Increment after each re-launch attempt.
 	if (!iReLaunchIntervalTimer->IsActive())
--- a/systemhealthmanagement/systemhealthmgr/sysmonsrc/monitor.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/sysmonsrc/monitor.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-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"
@@ -105,6 +105,9 @@
 	RLibrary iRestartSysLib;
 	TBool iRestartSysLoaded;
 #endif	//SYMBIAN_SSM_GRACEFUL_SHUTDOWN
+#ifdef _DEBUG
+	TInt iRestartCount;
+#endif  	
 	};
 
 #endif
--- a/systemhealthmanagement/systemhealthmgr/test/testappgood/shmatestappgood_reg.rss	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/testappgood/shmatestappgood_reg.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -29,4 +29,4 @@
 	// filename of application binary (minus extension)
 	app_file="shmatestappgood";
 	}
-	
\ No newline at end of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/trestartsys/group/shmatest_trestartsys.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,29 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Shmatest_TRestartSys EN"}
+
+; Vendor name
+: "Shmatest_TRestartSys"
+
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\trestartsys\scripts\shmatest_restartsyswithmode.script"-"c:\devicesrv\shmatest\shmatest_restartsyswithmode.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\trestartsys\scripts\shmatest_restartsysabort.script"-"c:\devicesrv\shmatest\shmatest_restartsysabort.script"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/tstartsafe/group/shmatest_tstartsafe.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,43 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Shmatest_TStartSafe EN"}
+
+; Vendor name
+: "Shmatest_TStartSafe"
+
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_appasynchstart.script"-"c:\devicesrv\shmatest\shmatest_startsafe_appasynchstart.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_appretry.script"-"c:\devicesrv\shmatest\shmatest_startsafe_appretry.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_appstart.script"-"c:\devicesrv\shmatest\shmatest_startsafe_appstart.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_appstartapparcinit.script"-"c:\devicesrv\shmatest\shmatest_startsafe_appstartapparcinit.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_apptimeout.script"-"c:\devicesrv\shmatest\shmatest_startsafe_apptimeout.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_apptimesucc.script"-"c:\devicesrv\shmatest\shmatest_startsafe_apptimesucc.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_procasynchstart.script"-"c:\devicesrv\shmatest\shmatest_startsafe_procasynchstart.script"
+;"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_procfailsysrestart.script"-"c:\devicesrv\shmatest\shmatest_startsafe_procfailsysrestart.script"
+;"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_procmonsysrestart.script"-"c:\devicesrv\shmatest\shmatest_startsafe_procmonsysrestart.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_procretry.script"-"c:\devicesrv\shmatest\shmatest_startsafe_procretry.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_procstart.script"-"c:\devicesrv\shmatest\shmatest_startsafe_procstart.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_procstartmon.script"-"c:\devicesrv\shmatest\shmatest_startsafe_procstartmon.script"
+;"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_proctimeout.script"-"c:\devicesrv\shmatest\shmatest_startsafe_proctimeout.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_proctimesucc.script"-"c:\devicesrv\shmatest\shmatest_startsafe_proctimesucc.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_errors.script"-"c:\devicesrv\shmatest\shmatest_startsafe_errors.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_appstartrverror.script"-"c:\devicesrv\shmatest\shmatest_startsafe_appstartrverror.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartsafe\scripts\shmatest_startsafe_procstartrverror.script"-"c:\devicesrv\shmatest\shmatest_startsafe_procstartrverror.script"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/tstartupproperties/group/shmatest_tstartupproperties.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,29 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Shmatest_TStartupProperties EN"}
+
+; Vendor name
+: "Shmatest_TStartupProperties"
+
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartupproperties\scripts\shmatest_startupproperties_defval.script"-"c:\devicesrv\shmatest\shmatest_startupproperties_defval.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tstartupproperties\scripts\shmatest_startupproperties_internalexternal.script"-"c:\devicesrv\shmatest\shmatest_startupproperties_internalexternal.script"
+
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/data/tsysmon.ini	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/data/tsysmon.ini	Tue Aug 31 16:29:05 2010 +0300
@@ -58,7 +58,7 @@
 Filename=sysmontest_register_protserv+powermgmt.exe
 Policy=ERestartOSWithMode
 Mode=0
-ExpectedResult=0
+ExpectedResult=-5
 TestDereg=true
 DeregExpectedResult=0
 
@@ -82,7 +82,7 @@
 Filename=sysmontest_selfregister_protserv+powermgmt.exe
 Policy=ERestartOSWithMode
 Mode=0
-ExpectedResult=0
+ExpectedResult=-5
 TestDereg=true
 DeregExpectedResult=0
 
@@ -114,14 +114,16 @@
 [APPFWK-SYSMON-0033]
 Filename=tsysmon_app_donothing.exe
 ExpectedRunCount=1
-ExpectedRegisterCount=1
+ExpectedRegisterCount=0
 ExpectedRestartCount=0
+ProcessArguments=33
 
 [APPFWK-SYSMON-0034]
 Filename=tsysmon_app_dontrendezvous.exe
 ExpectedRunCount=2
-ExpectedRegisterCount=1
+ExpectedRegisterCount=0
 ExpectedRestartCount=0
+ProcessArguments=34
 
 [APPFWK-SYSMON-0035]
 Filename=tsysmon_app_dontrendezvous.exe
@@ -140,10 +142,11 @@
 ExpectedRegisterCount=1
 ExpectedRestartCount=0
 
-[APPFWK-SYSMON-0038]
+[38]
 ExpectedResult=1
-ExpectedRegisterCount=1
+ExpectedRegisterCount=2
 ExpectedRestartCount=0
+ProcessArguments=38
 
 [APPFWK-SYSMON-0039]
 ExpectedResult=-6
@@ -166,16 +169,18 @@
 ExpectedRegisterCount=1
 ExpectedRestartCount=1
 
-[APPFWK-SYSMON-0043]
+[43]
 ExpectedResult=0
-ExpectedRegisterCount=1
+ExpectedRegisterCount=0
 ExpectedRestartCount=0
+ProcessArguments=43
 
 [APPFWK-SYSMON-0044]
 Filename=tsysmon_app_startupregeioffailstart1.exe
 ExpectedRunCount=1
 ExpectedRegisterCount=0
 ExpectedRestartCount=0
+ProcessArguments=44
 
 [APPFWK-SYSMON-0045]
 Filename=tsysmon_app_startupregerosfaillater.exe
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/eabi/sysmontesthelperu.def	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/eabi/sysmontesthelperu.def	Tue Aug 31 16:29:05 2010 +0300
@@ -5,7 +5,7 @@
 	_ZN17CSysMonTestHelper14GetTimeoutArgLERi @ 4 NONAME
 	_ZN17CSysMonTestHelper14TestErrorcodeLERi @ 5 NONAME
 	_ZN17CSysMonTestHelper16GetRestartCountLEv @ 6 NONAME
-	_ZN17CSysMonTestHelper17GetRegisterCountLEv @ 7 NONAME
+	_ZN17CSysMonTestHelper16GetRegisterCountEi @ 7 NONAME
 	_ZN17CSysMonTestHelper17WriteDeregResultLERKi @ 8 NONAME
 	_ZN17CSysMonTestHelper18GetDeregResultIntLERK7TDesC16Ri @ 9 NONAME
 	_ZN17CSysMonTestHelper18IncrementRunCountLERK7TDesC16 @ 10 NONAME
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/bld.inf	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/bld.inf	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -62,6 +62,8 @@
 PRJ_TESTEXPORTS
 ../group/shmatest_sysmon.iby								/epoc32/rom/include/shmatest_sysmon.iby
 ../group/sysmontest.iby										/epoc32/rom/include/sysmontest.iby
+../group/sysmon_iof_tests.iby								/epoc32/rom/include/sysmon_iof_tests.iby
+../group/sysmon_osrestart_tests.iby							/epoc32/rom/include/sysmon_osrestart_tests.iby
 
 // Shma batch files for hardware test execution
 ../scripts/hardware/shmatest_sysmon_run.bat                     	/epoc32/data/z/shmatest/shmatest_sysmon_run.bat
@@ -138,3 +140,5 @@
 ../scripts/shmatest_sysmon_regselfecnorcapsok.script 		z:/shmatest/shmatest_sysmon_regselfecnorcapsok.script
 ../scripts/shmatest_sysmon_regselfecnorcapsnops.script 		z:/shmatest/shmatest_sysmon_regselfecnorcapsnops.script
 ../scripts/shmatest_sysmon_failecnorcount1fail.script 		z:/shmatest/shmatest_sysmon_failecnorcount1fail.script
+../scripts/shmatest_sysmon_restartos.script 		z:/shmatest/shmatest_sysmon_restartos.script
+../scripts/shmatest_sysmon_criticalnoretries.script 		z:/shmatest/shmatest_sysmon_criticalnoretries.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/shmatest_tsysmon.pkg	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,63 @@
+;
+; 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: 
+;
+
+;Languages
+&EN
+
+
+;Localised Vendor name
+%{"Shmatest_TSysMon EN"}
+
+; Vendor name
+: "Shmatest_TSysMon"
+
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_procmoninit.script"-"c:\devicesrv\shmatest\shmatest_sysmon_procmoninit.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_multiprocmon.script"-"c:\devicesrv\shmatest\shmatest_sysmon_multiprocmon.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_procrestart.script"-"c:\devicesrv\shmatest\shmatest_sysmon_procrestart.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_restartthrottle.script"-"c:\devicesrv\shmatest\shmatest_sysmon_restartthrottle.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_procmonignore.script"-"c:\devicesrv\shmatest\shmatest_sysmon_procmonignore.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_selfmonignore.script"-"c:\devicesrv\shmatest\shmatest_sysmon_selfmonignore.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_noprocmon.script"-"c:\devicesrv\shmatest\shmatest_sysmon_noprocmon.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_selfmoncancel.script"-"c:\devicesrv\shmatest\shmatest_sysmon_selfmoncancel.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_selfmoncancel2.script"-"c:\devicesrv\shmatest\shmatest_sysmon_selfmoncancel2.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_nomoncancel.script"-"c:\devicesrv\shmatest\shmatest_sysmon_nomoncancel.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_loadsysmon.script"-"c:\devicesrv\shmatest\shmatest_sysmon_loadsysmon.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_oom.script"-"c:\devicesrv\shmatest\shmatest_sysmon_oom.script"
+
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_conndiscon.script"-"c:\devicesrv\shmatest\shmatest_sysmon_conndiscon.script"
+
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_reg1proctwice.script"-"c:\devicesrv\shmatest\shmatest_sysmon_reg1proctwice.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_reg2procs.script"-"c:\devicesrv\shmatest\shmatest_sysmon_reg2procs.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regeiofcapsnops.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regeiofcapsnops.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regeiofcapsok.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regeiofcapsok.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regeroscapsnops.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regeroscapsnops.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regeroscapsok.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regeroscapsok.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regeroswmcapsnopm.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regeroswmcapsnopm.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regeroswmcapsnops.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regeroswmcapsnops.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regeroswmcapsok.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regeroswmcapsok.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regselfeiofcapsok.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regselfeiofcapsok.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regselferoscapsnops.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regselferoscapsnops.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regselferoscapsok.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regselferoscapsok.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regselferoswmcapsnopm.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regselferoswmcapsnopm.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regselferoswmcapsnops.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regselferoswmcapsnops.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regselferoswmcapsok.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regselferoswmcapsok.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regcritical.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regcritical.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regecnorcapsok.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regecnorcapsok.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regecnorcapsnops.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regecnorcapsnops.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regselfecnorcapsok.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regselfecnorcapsok.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_regselfecnorcapsnops.script"-"c:\devicesrv\shmatest\shmatest_sysmon_regselfecnorcapsnops.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_cancelallmonitors.script"-"c:\devicesrv\shmatest\shmatest_sysmon_cancelallmonitors.script"
+"\sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\test\tsysmon\scripts\shmatest_sysmon_cancelallmonwithssmsid.script"-"c:\devicesrv\shmatest\shmatest_sysmon_cancelallmonwithssmsid.script"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/sysmon_iof_tests.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,40 @@
+// 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: This iby exports binaries and scripts for tests that require some executables to be started during boot-up with EIgnoreOnFailure policy
+//
+
+#ifndef __SYSMON_IOF_TESTS_IBY__
+#define __SYSMON_IOF_TESTS_IBY__
+data=DATAZ_\private\2000D75B\startup\test\appfwk-sysmon-eiof_hardware0.rsc           \private\2000D75B\startup\0\appfwk-sysmon-eiof_hardware0.rsc
+
+data=ABI_DIR\BUILD_DIR\tsysmon_server.exe										\sys\bin\tsysmon_server.exe
+file=ABI_DIR\BUILD_DIR\sysmontesthelper.dll 									\sys\bin\sysmontesthelper.dll
+
+data=ABI_DIR\BUILD_DIR\tsysmon_app_faileiofcount0.exe 							\sys\bin\tsysmon_app_faileiofcount0.exe
+data=ABI_DIR\BUILD_DIR\tsysmon_app_faileiofcount1fail.exe 						\sys\bin\tsysmon_app_faileiofcount1fail.exe
+data=ABI_DIR\BUILD_DIR\tsysmon_app_failcount2failwait.exe 						\sys\bin\tsysmon_app_failcount2failwait.exe
+data=ABI_DIR\BUILD_DIR\tsysmon_app_failcount2failwait_slave.exe 				\sys\bin\tsysmon_app_failcount2failwait_slave.exe
+data=ABI_DIR\BUILD_DIR\tsysmon_app_startupregeiof.exe 							\sys\bin\tsysmon_app_startupregeiof.exe
+data=ABI_DIR\BUILD_DIR\tsysmon_app_startupregeioffailstart1.exe 				\sys\bin\tsysmon_app_startupregeioffailstart1.exe
+data=ABI_DIR\BUILD_DIR\tsysmon_app_donothing.exe 								\sys\bin\tsysmon_app_donothing.exe
+data=ABI_DIR\BUILD_DIR\tsysmon_app_dontrendezvous.exe 								\sys\bin\tsysmon_app_dontrendezvous.exe
+
+data=DATAZ_\shmatest\configs\tsysmon.ini									\shmatest\configs\tsysmon.ini
+
+data=DATAZ_\shmatest\shmatest_sysmon_failcount2failwait.script 			\shmatest\shmatest_sysmon_failcount2failwait.script
+data=DATAZ_\shmatest\shmatest_sysmon_faileiofcount0.script 				\shmatest\shmatest_sysmon_faileiofcount0.script
+data=DATAZ_\shmatest\shmatest_sysmon_faileiofcount1fail.script 			\shmatest\shmatest_sysmon_faileiofcount1fail.script
+data=DATAZ_\shmatest\shmatest_sysmon_startupregeiof.script 				\shmatest\shmatest_sysmon_startupregeiof.script
+data=DATAZ_\shmatest\shmatest_sysmon_startupregeioffailstart1.script 	\shmatest\shmatest_sysmon_startupregeioffailstart1.script
+
+#endif //__SYSMON_IOF_TESTS_IBY__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/sysmon_osrestart_tests.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,26 @@
+// 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: This iby exports binaries and scripts for tests that require the OS to shutdown/restart. As such they are part of a separate ROM.
+//
+
+#ifndef __SYSMON_OSRESTART_TESTS_IBY__
+#define __SYSMON_OSRESTART_TESTS_IBY__
+
+data=ABI_DIR\BUILD_DIR\tsysmon_server.exe										\sys\bin\tsysmon_server.exe
+file=ABI_DIR\BUILD_DIR\sysmontesthelper.dll 									\sys\bin\sysmontesthelper.dll
+data=ABI_DIR\BUILD_DIR\tsysmon_app_dontrendezvous.exe 								\sys\bin\tsysmon_app_dontrendezvous.exe
+
+data=DATAZ_\shmatest\shmatest_sysmon_restartos.script 					\shmatest\shmatest_sysmon_restartos.script
+data=DATAZ_\shmatest\shmatest_sysmon_criticalnoretries.script 					\shmatest\shmatest_sysmon_criticalnoretries.script
+
+#endif // __SYSMON_OSRESTART_TESTS_IBY__
\ No newline at end of file
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/sysmontest.iby	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/sysmontest.iby	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,20 +19,14 @@
 data=ABI_DIR\BUILD_DIR\tsysmon_server.exe										\sys\bin\tsysmon_server.exe
 file=ABI_DIR\BUILD_DIR\sysmontesthelper.dll 									\sys\bin\sysmontesthelper.dll
 
-data=ABI_DIR\BUILD_DIR\tsysmon_app_faileiofcount0.exe 							\sys\bin\tsysmon_app_faileiofcount0.exe
-data=ABI_DIR\BUILD_DIR\tsysmon_app_faileiofcount1fail.exe 						\sys\bin\tsysmon_app_faileiofcount1fail.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_faileroscount1fail.exe 						\sys\bin\tsysmon_app_faileroscount1fail.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_faileroswmcount1fail.exe 					\sys\bin\tsysmon_app_faileroswmcount1fail.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_failcount2failquick.exe 						\sys\bin\tsysmon_app_failcount2failquick.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_failcount2failquick_slave.exe 				\sys\bin\tsysmon_app_failcount2failquick_slave.exe
-data=ABI_DIR\BUILD_DIR\tsysmon_app_failcount2failwait.exe 						\sys\bin\tsysmon_app_failcount2failwait.exe
-data=ABI_DIR\BUILD_DIR\tsysmon_app_failcount2failwait_slave.exe 				\sys\bin\tsysmon_app_failcount2failwait_slave.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_restartreg.exe 								\sys\bin\tsysmon_app_restartreg.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_restartfail.exe 								\sys\bin\tsysmon_app_restartfail.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_restartfailwithmode1.exe 					\sys\bin\tsysmon_app_restartfailwithmode1.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_restartfailwithmode2.exe 					\sys\bin\tsysmon_app_restartfailwithmode2.exe
-data=ABI_DIR\BUILD_DIR\tsysmon_app_startupregeiof.exe 							\sys\bin\tsysmon_app_startupregeiof.exe
-data=ABI_DIR\BUILD_DIR\tsysmon_app_startupregeioffailstart1.exe 				\sys\bin\tsysmon_app_startupregeioffailstart1.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_startupregerosfaillater.exe 					\sys\bin\tsysmon_app_startupregerosfaillater.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_startupregerosfailstart.exe 					\sys\bin\tsysmon_app_startupregerosfailstart.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_startupregeroswmfaillater.exe 				\sys\bin\tsysmon_app_startupregeroswmfaillater.exe
@@ -40,6 +34,7 @@
 data=ABI_DIR\BUILD_DIR\tsysmon_app_startupregeioffailstart2.exe 				\sys\bin\tsysmon_app_startupregeioffailstart2.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_deregister.exe 								\sys\bin\tsysmon_app_deregister.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_donothing.exe 								\sys\bin\tsysmon_app_donothing.exe
+data=ABI_DIR\BUILD_DIR\tsysmon_app_dontrendezvous.exe 								\sys\bin\tsysmon_app_dontrendezvous.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_register.exe 								\sys\bin\tsysmon_app_register.exe attrib=r
 data=ABI_DIR\BUILD_DIR\tsysmon_app_registercritical.exe							\sys\bin\tsysmon_app_registercritical.exe
 data=ABI_DIR\BUILD_DIR\tsysmon_app_registertwice1proc.exe 						\sys\bin\tsysmon_app_registertwice1proc.exe
@@ -52,10 +47,6 @@
 data=DATAZ_\shmatest\configs\tsysmon.ini									\shmatest\configs\tsysmon.ini
 
 data=DATAZ_\shmatest\shmatest_sysmon_conndiscon.script 					\shmatest\shmatest_sysmon_conndiscon.script
-data=DATAZ_\shmatest\shmatest_sysmon_failcount2failquick.script 			\shmatest\shmatest_sysmon_failcount2failquick.script
-data=DATAZ_\shmatest\shmatest_sysmon_failcount2failwait.script 			\shmatest\shmatest_sysmon_failcount2failwait.script
-data=DATAZ_\shmatest\shmatest_sysmon_faileiofcount0.script 				\shmatest\shmatest_sysmon_faileiofcount0.script
-data=DATAZ_\shmatest\shmatest_sysmon_faileiofcount1fail.script 			\shmatest\shmatest_sysmon_faileiofcount1fail.script
 data=DATAZ_\shmatest\shmatest_sysmon_faileroscount1fail.script 			\shmatest\shmatest_sysmon_faileroscount1fail.script
 data=DATAZ_\shmatest\shmatest_sysmon_faileroswmcount1fail.script 		\shmatest\shmatest_sysmon_faileroswmcount1fail.script
 data=DATAZ_\shmatest\shmatest_sysmon_failecnorcount1fail.script 			\shmatest\shmatest_sysmon_failecnorcount1fail.script
@@ -63,8 +54,6 @@
 data=DATAZ_\shmatest\shmatest_sysmon_restartfailwithmode1.script 		\shmatest\shmatest_sysmon_restartfailwithmode1.script
 data=DATAZ_\shmatest\shmatest_sysmon_restartfailwithmode2.script 		\shmatest\shmatest_sysmon_restartfailwithmode2.script
 data=DATAZ_\shmatest\shmatest_sysmon_restartreg.script 					\shmatest\shmatest_sysmon_restartreg.script
-data=DATAZ_\shmatest\shmatest_sysmon_startupregeiof.script 				\shmatest\shmatest_sysmon_startupregeiof.script
-data=DATAZ_\shmatest\shmatest_sysmon_startupregeioffailstart1.script 	\shmatest\shmatest_sysmon_startupregeioffailstart1.script
 data=DATAZ_\shmatest\shmatest_sysmon_startupregeioffailstart2.script 	\shmatest\shmatest_sysmon_startupregeioffailstart2.script
 data=DATAZ_\shmatest\shmatest_sysmon_startupregerosfaillater.script 		\shmatest\shmatest_sysmon_startupregerosfaillater.script
 data=DATAZ_\shmatest\shmatest_sysmon_startupregerosfailstart.script 		\shmatest\shmatest_sysmon_startupregerosfailstart.script
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/sysmontesthelper.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/sysmontesthelper.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,6 +16,10 @@
 TARGET		sysmontesthelper.dll
 TARGETTYPE	dll
 UID			0x1000008d 0x1028359d
+
+// The Secure ID used here is to be able to get 
+// the value of the restart count variable set by CMonitor in a P&S key  
+SECUREID  	0x200086A8
 TARGETPATH	/sys/bin
 
 CAPABILITY	ALL -TCB
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_failcount2failwait.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_failcount2failwait.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,8 +16,10 @@
 TARGET          tsysmon_app_failcount2failwait.exe
 TARGETTYPE      exe
 UID             0 0x10283582
+SECUREID		0x200086A8
 
 USERINCLUDE     ../src
+USERINCLUDE     ../../../../../sysstatemgmt/inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 SOURCEPATH      ../src
@@ -36,10 +38,5 @@
 	START RESOURCE	appfwk-sysmon-0038_emulator0.rss
 		TARGETPATH	/private/2000d75b/startup/test
 	END
-#else
-	SOURCEPATH      ../resource/hardware
-	START RESOURCE	appfwk-sysmon-0038_hardware0.rss
-		TARGETPATH	/private/2000d75b/startup/test
-	END
 #endif
 SMPSAFE
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_faileiofcount0.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_faileiofcount0.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,8 +16,10 @@
 TARGET          tsysmon_app_faileiofcount0.exe
 TARGETTYPE      exe
 UID             0 0x10283594
+SECUREID 		0x200086A8
 
 USERINCLUDE     ../src
+USERINCLUDE     ../../../../../sysstatemgmt/inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 SOURCEPATH      ../src
@@ -38,7 +40,7 @@
 	END
 #else
 	SOURCEPATH      ../resource/hardware
-	START RESOURCE	appfwk-sysmon-0033_hardware0.rss
+	START RESOURCE	appfwk-sysmon-eiof_hardware0.rss
 		TARGETPATH	/private/2000d75b/startup/test
 	END
 #endif
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_faileiofcount1fail.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_faileiofcount1fail.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,8 +16,10 @@
 TARGET          tsysmon_app_faileiofcount1fail.exe
 TARGETTYPE      exe
 UID             0 0x10283579
+SECUREID 		0x200086A8
 
 USERINCLUDE     ../src
+USERINCLUDE     ../../../../../sysstatemgmt/inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 SOURCEPATH      ../src
@@ -36,10 +38,5 @@
 	START RESOURCE	appfwk-sysmon-0034_emulator0.rss
 		TARGETPATH	/private/2000d75b/startup/test
 	END
-#else
-	SOURCEPATH      ../resource/hardware
-	START RESOURCE	appfwk-sysmon-0034_hardware0.rss
-		TARGETPATH	/private/2000d75b/startup/test
-	END
 #endif
 SMPSAFE
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_startupregeiof.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_startupregeiof.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,8 +16,10 @@
 TARGET          tsysmon_app_startupregeiof.exe
 TARGETTYPE      exe
 UID             0 0x10283588
+SECUREID		0x200086A8
 
 USERINCLUDE     ../src
+USERINCLUDE     ../../../../../sysstatemgmt/inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 SOURCEPATH      ../src
@@ -36,10 +38,5 @@
 	START RESOURCE	appfwk-sysmon-0043_emulator0.rss
 		TARGETPATH	/private/2000d75b/startup/test
 	END
-#else
-	SOURCEPATH      ../resource/hardware
-	START RESOURCE	appfwk-sysmon-0043_hardware0.rss
-		TARGETPATH	/private/2000d75b/startup/test
-	END
 #endif
 SMPSAFE
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_startupregeioffailstart1.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_app_startupregeioffailstart1.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -16,8 +16,10 @@
 TARGET          tsysmon_app_startupregeioffailstart1.exe
 TARGETTYPE      exe
 UID             0 0x10283589
+SECUREID		0x200086A8
 
 USERINCLUDE     ../src
+USERINCLUDE     ../../../../../sysstatemgmt/inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 SOURCEPATH      ../src
@@ -34,10 +36,5 @@
 	START RESOURCE	appfwk-sysmon-0044_emulator0.rss
 		TARGETPATH	/private/2000d75b/startup/test
 	END
-#else
-	SOURCEPATH      ../resource/hardware
-	START RESOURCE	appfwk-sysmon-0044_hardware0.rss
-		TARGETPATH	/private/2000d75b/startup/test
-	END
 #endif
 SMPSAFE
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_server.mmp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/group/tsysmon_server.mmp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -50,6 +50,7 @@
 SOURCE tsysmon_steploadsysmon.cpp
 SOURCE tsysmon_stepoomsysmon.cpp
 SOURCE tsysmon_stepcancelallmonitors.cpp
+SOURCE tsysmon_steposrestarttest.cpp
 
 LIBRARY	euser.lib
 LIBRARY	testexecuteutils.lib
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-0033_hardware0.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,316 +0,0 @@
-// Copyright (c) 2005-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:
-// Modified default resource file to test system monitor
-// WARNING: Any changes made to this resource file must be
-// checked against the system starter test cases. 
-// Specifically:
-// - AppStartCs      
-// 
-//
-
-#include <ssm/ssmcmd.rh>
-#include <ssm/ssmsubstates.hrh>
-#include <ssm/cmdpersistreboots.rh>
-#include <ssm/cmdpersistreboots.hrh>
-
-UID2 KUidSsmCommandListResourceFile
-
-// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
-// The SSM relies on this having a resource ID of 1.
-RESOURCE SSM_COMMAND_LIST_ROOT
-	{
-	command_list_mapping = r_command_list_mapping;
-	}
-
-RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
-	{
-	mappings =
-		{
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateCriticalStatic;
-			resource_id = r_critical_static_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateCriticalDynamic;
-			resource_id = r_critical_dynamic_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateNetworkingCritical;
-			resource_id = r_networking_critical_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateNonCritical;
-			resource_id = r_non_critical_commands;
-			}
-		};
-	}
-
-
-RESOURCE SSM_COMMAND_LIST r_critical_static_commands
-   	{
-	commands =
-		{
-		r_increment_boot_count
-		, r_command_publish_system_state
-		, r_command_ssmutilsrv
-		, r_command_sysmon
-		, r_command_sysagt2svr
-		, r_command_fbserv
-		, r_command_wserv
-		, r_command_set_splash_property
-		, r_command_start_splash
-		, r_command_eiksrvs
-		, r_command_tzserver
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_critical_dynamic_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_initialise_locale
-		, r_command_apparc
-		, r_command_shell
-		, r_command_multiple_wait
-		, r_command_remove_splash_property
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_networking_critical_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_c32start
-		, r_command_msexe
-		, r_command_watcher
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_non_critical_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_system_ams
-		, r_command_swidaemon
-		, r_command_cntsrv
-		, r_command_agsvexe
-		, r_command_fotaagent
-		, r_command_schexe
-		, r_command_ama_starter
-		, r_command_app_faileiofcount0
-		};
-	}
-
-
-RESOURCE SSM_START_PROCESS_INFO r_command_ssmutilsrv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "ssmutilsrv.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_sysmon
-	{
-	severity = ECmdCriticalSeverity;
-	name = "sysmon.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_sysagt2svr
-	{
-	severity = ECmdCriticalSeverity;
-	name = "SysAgt2Svr.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_fbserv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "fbserv.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 1;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_wserv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "ewsrv.exe";
-	args = "-NoShell";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_command_set_splash_property
-	{
-	severity = ECmdCriticalSeverity;
-	category = 0x2000D75B;
-	key = 0x01;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_start_splash
-	{
-	severity = ECmdCriticalSeverity;
-	name = "splash.exe";
-	execution_behaviour = ESsmFireAndForget;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_eiksrvs
-	{
-	severity = ECmdCriticalSeverity;
-	name = "eiksrvs.exe";
-	args = "-OnlyStartDependentServers";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_tzserver
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tzserver.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_initialise_locale
-	{
-	name = "initialiselocale.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_apparc
-	{
-	severity = ECmdCriticalSeverity;
-	name = "apsexe.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_APP_INFO r_command_shell
-	{
-	severity = ECmdCriticalSeverity;
-	name = "shell.exe";
-	execution_behaviour = ESsmDeferredWaitForSignal;
-	viewless = 1;
-	}
-
-RESOURCE SSM_MULTIPLE_WAIT r_command_multiple_wait
-	{
-	timeout = 20000;
-	}
-
-RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_command_remove_splash_property
-	{
-	severity = ECmdCriticalSeverity;
-	category = 0x2000D75B;
-	key = 0x01;
-	value = 1;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_c32start
-	{
-	severity = ECmdCriticalSeverity;
-	name = "c32start.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_msexe
-	{
-	severity = ECmdCriticalSeverity;
-	name = "msexe.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_watcher
-	{
-	severity = ECmdCriticalSeverity;
-	name = "watcher.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_system_ams
-	{
-	name = "SystemAMS.exe";
-	args = "-boot";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_swidaemon
-	{
-	severity = ECmdCriticalSeverity;
-	name = "swidaemon.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_cntsrv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "cntsrv.exe";
-	args = "-nontransient";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_agsvexe
-	{
-	severity = ECmdCriticalSeverity;
-	name = "agsvexe.exe";
-	args = "-nontransient";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_fotaagent
-	{
-	name = "fotaagent.exe";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_schexe
-	{
-	name = "schexe.exe";
-	args = "sysstartschexe";
-	}
-
-RESOURCE SSM_START_AMA_STARTER r_command_ama_starter
-	{
-	severity = ECmdIgnoreFailure;
-	dsc_id = 0x2000836D;		// removing this id will cause a rcomp failure unless dsc_id is #defined in ssmcmd.rh file.
-	}
-
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_system_state
-	{
-	severity = ECmdCriticalSeverity;
-	}
-
-RESOURCE SSM_START_CUSTOM_COMMAND r_increment_boot_count
-	{
-	severity = ECmdCriticalSeverity;
-	execution_behaviour = ESsmWaitForSignal;
-	dllname = "cmncustomcmds.dll";
-	ordinal = 1; // Persist reboots custom command is at ordinal 1
-	dll_data = r_increment;
-	}
-
-RESOURCE SSM_COMMAND_PERSIST_REBOOTS r_increment
-	{
-	val = EIncrementBootCount;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_app_faileiofcount0
-	{
-	name = "tsysmon_app_faileiofcount0.exe";
-	args = "APPFWK-SYSMON-0033";
-	}
-
-
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-0034_hardware0.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,315 +0,0 @@
-// Copyright (c) 2005-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:
-// Modified default resource file to test system monitor
-// WARNING: Any changes made to this resource file must be
-// checked against the system starter test cases. 
-// Specifically:
-// - AppStartCs      
-// 
-//
-
-#include <ssm/ssmcmd.rh>
-#include <ssm/ssmsubstates.hrh>
-#include <ssm/cmdpersistreboots.rh>
-#include <ssm/cmdpersistreboots.hrh>
-
-UID2 KUidSsmCommandListResourceFile
-
-// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
-// The SSM relies on this having a resource ID of 1.
-RESOURCE SSM_COMMAND_LIST_ROOT
-	{
-	command_list_mapping = r_command_list_mapping;
-	}
-
-RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
-	{
-	mappings =
-		{
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateCriticalStatic;
-			resource_id = r_critical_static_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateCriticalDynamic;
-			resource_id = r_critical_dynamic_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateNetworkingCritical;
-			resource_id = r_networking_critical_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateNonCritical;
-			resource_id = r_non_critical_commands;
-			}
-		};
-	}
-
-
-RESOURCE SSM_COMMAND_LIST r_critical_static_commands
-   	{
-	commands =
-		{
-		r_increment_boot_count
-		, r_command_publish_system_state
-		, r_command_ssmutilsrv
-		, r_command_sysmon
-		, r_command_sysagt2svr
-		, r_command_fbserv
-		, r_command_wserv
-		, r_command_set_splash_property
-		, r_command_start_splash
-		, r_command_eiksrvs
-		, r_command_tzserver
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_critical_dynamic_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_initialise_locale
-		, r_command_apparc
-		, r_command_shell
-		, r_command_multiple_wait
-		, r_command_remove_splash_property
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_networking_critical_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_c32start
-		, r_command_msexe
-		, r_command_watcher
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_non_critical_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_system_ams
-		, r_command_swidaemon
-		, r_command_cntsrv
-		, r_command_agsvexe
-		, r_command_fotaagent
-		, r_command_schexe
-		, r_command_ama_starter
-		, r_command_app_faileiofcount1fail
-		};
-	}
-
-
-RESOURCE SSM_START_PROCESS_INFO r_command_ssmutilsrv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "ssmutilsrv.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_sysmon
-	{
-	severity = ECmdCriticalSeverity;
-	name = "sysmon.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_sysagt2svr
-	{
-	severity = ECmdCriticalSeverity;
-	name = "SysAgt2Svr.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_fbserv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "fbserv.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 1;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_wserv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "ewsrv.exe";
-	args = "-NoShell";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_command_set_splash_property
-	{
-	severity = ECmdCriticalSeverity;
-	category = 0x2000D75B;
-	key = 0x01;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_start_splash
-	{
-	severity = ECmdCriticalSeverity;
-	name = "splash.exe";
-	execution_behaviour = ESsmFireAndForget;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_eiksrvs
-	{
-	severity = ECmdCriticalSeverity;
-	name = "eiksrvs.exe";
-	args = "-OnlyStartDependentServers";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_tzserver
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tzserver.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_initialise_locale
-	{
-	name = "initialiselocale.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_apparc
-	{
-	severity = ECmdCriticalSeverity;
-	name = "apsexe.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_APP_INFO r_command_shell
-	{
-	severity = ECmdCriticalSeverity;
-	name = "shell.exe";
-	execution_behaviour = ESsmDeferredWaitForSignal;
-	viewless = 1;
-	}
-
-RESOURCE SSM_MULTIPLE_WAIT r_command_multiple_wait
-	{
-	timeout = 20000;
-	}
-
-RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_command_remove_splash_property
-	{
-	severity = ECmdCriticalSeverity;
-	category = 0x2000D75B;
-	key = 0x01;
-	value = 1;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_c32start
-	{
-	severity = ECmdCriticalSeverity;
-	name = "c32start.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_msexe
-	{
-	severity = ECmdCriticalSeverity;
-	name = "msexe.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_watcher
-	{
-	severity = ECmdCriticalSeverity;
-	name = "watcher.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_system_ams
-	{
-	name = "SystemAMS.exe";
-	args = "-boot";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_swidaemon
-	{
-	severity = ECmdCriticalSeverity;
-	name = "swidaemon.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_cntsrv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "cntsrv.exe";
-	args = "-nontransient";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_agsvexe
-	{
-	severity = ECmdCriticalSeverity;
-	name = "agsvexe.exe";
-	args = "-nontransient";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_fotaagent
-	{
-	name = "fotaagent.exe";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_schexe
-	{
-	name = "schexe.exe";
-	args = "sysstartschexe";
-	}
-
-RESOURCE SSM_START_AMA_STARTER r_command_ama_starter
-	{
-	severity = ECmdIgnoreFailure;
-	dsc_id = 0x2000836D;		// removing this id will cause a rcomp failure unless dsc_id is #defined in ssmcmd.rh file.
-	}
-
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_system_state
-	{
-	severity = ECmdCriticalSeverity;
-	}
-
-RESOURCE SSM_START_CUSTOM_COMMAND r_increment_boot_count
-	{
-	severity = ECmdCriticalSeverity;
-	execution_behaviour = ESsmWaitForSignal;
-	dllname = "cmncustomcmds.dll";
-	ordinal = 1; // Persist reboots custom command is at ordinal 1
-	dll_data = r_increment;
-	}
-
-RESOURCE SSM_COMMAND_PERSIST_REBOOTS r_increment
-	{
-	val = EIncrementBootCount;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_app_faileiofcount1fail
-	{
-	name = "tsysmon_app_faileiofcount1fail.exe";
-	args = "APPFWK-SYSMON-0034";
-	}
-
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-0038_hardware0.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,316 +0,0 @@
-// Copyright (c) 2005-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:
-// Modified default resource file to test system monitor
-// WARNING: Any changes made to this resource file must be
-// checked against the system starter test cases. 
-// Specifically:
-// - AppStartCs      
-// 
-//
-
-#include <ssm/ssmcmd.rh>
-#include <ssm/ssmsubstates.hrh>
-#include <ssm/cmdpersistreboots.rh>
-#include <ssm/cmdpersistreboots.hrh>
-
-UID2 KUidSsmCommandListResourceFile
-
-// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
-// The SSM relies on this having a resource ID of 1.
-RESOURCE SSM_COMMAND_LIST_ROOT
-	{
-	command_list_mapping = r_command_list_mapping;
-	}
-
-RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
-	{
-	mappings =
-		{
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateCriticalStatic;
-			resource_id = r_critical_static_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateCriticalDynamic;
-			resource_id = r_critical_dynamic_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateNetworkingCritical;
-			resource_id = r_networking_critical_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateNonCritical;
-			resource_id = r_non_critical_commands;
-			}
-		};
-	}
-
-
-RESOURCE SSM_COMMAND_LIST r_critical_static_commands
-   	{
-	commands =
-		{
-		r_increment_boot_count
-		, r_command_publish_system_state
-		, r_command_ssmutilsrv
-		, r_command_sysmon
-		, r_command_sysagt2svr
-		, r_command_fbserv
-		, r_command_wserv
-		, r_command_set_splash_property
-		, r_command_start_splash
-		, r_command_eiksrvs
-		, r_command_tzserver
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_critical_dynamic_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_initialise_locale
-		, r_command_apparc
-		, r_command_shell
-		, r_command_multiple_wait
-		, r_command_remove_splash_property
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_networking_critical_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_c32start
-		, r_command_msexe
-		, r_command_watcher
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_non_critical_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_system_ams
-		, r_command_swidaemon
-		, r_command_cntsrv
-		, r_command_agsvexe
-		, r_command_fotaagent
-		, r_command_schexe
-		, r_command_ama_starter
-		, r_command_app_failcount2failwait
-		};
-	}
-
-
-RESOURCE SSM_START_PROCESS_INFO r_command_ssmutilsrv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "ssmutilsrv.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_sysmon
-	{
-	severity = ECmdCriticalSeverity;
-	name = "sysmon.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_sysagt2svr
-	{
-	severity = ECmdCriticalSeverity;
-	name = "SysAgt2Svr.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_fbserv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "fbserv.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 1;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_wserv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "ewsrv.exe";
-	args = "-NoShell";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_command_set_splash_property
-	{
-	severity = ECmdCriticalSeverity;
-	category = 0x2000D75B;
-	key = 0x01;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_start_splash
-	{
-	severity = ECmdCriticalSeverity;
-	name = "splash.exe";
-	execution_behaviour = ESsmFireAndForget;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_eiksrvs
-	{
-	severity = ECmdCriticalSeverity;
-	name = "eiksrvs.exe";
-	args = "-OnlyStartDependentServers";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_tzserver
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tzserver.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_initialise_locale
-	{
-	name = "initialiselocale.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_apparc
-	{
-	severity = ECmdCriticalSeverity;
-	name = "apsexe.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_APP_INFO r_command_shell
-	{
-	severity = ECmdCriticalSeverity;
-	name = "shell.exe";
-	execution_behaviour = ESsmDeferredWaitForSignal;
-	viewless = 1;
-	}
-
-RESOURCE SSM_MULTIPLE_WAIT r_command_multiple_wait
-	{
-	timeout = 20000;
-	}
-
-RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_command_remove_splash_property
-	{
-	severity = ECmdCriticalSeverity;
-	category = 0x2000D75B;
-	key = 0x01;
-	value = 1;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_c32start
-	{
-	severity = ECmdCriticalSeverity;
-	name = "c32start.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_msexe
-	{
-	severity = ECmdCriticalSeverity;
-	name = "msexe.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_watcher
-	{
-	severity = ECmdCriticalSeverity;
-	name = "watcher.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_system_ams
-	{
-	name = "SystemAMS.exe";
-	args = "-boot";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_swidaemon
-	{
-	severity = ECmdCriticalSeverity;
-	name = "swidaemon.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_cntsrv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "cntsrv.exe";
-	args = "-nontransient";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_agsvexe
-	{
-	severity = ECmdCriticalSeverity;
-	name = "agsvexe.exe";
-	args = "-nontransient";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_fotaagent
-	{
-	name = "fotaagent.exe";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_schexe
-	{
-	name = "schexe.exe";
-	args = "sysstartschexe";
-	}
-
-RESOURCE SSM_START_AMA_STARTER r_command_ama_starter
-	{
-	severity = ECmdIgnoreFailure;
-	dsc_id = 0x2000836D;		// removing this id will cause a rcomp failure unless dsc_id is #defined in ssmcmd.rh file.
-	}
-
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_system_state
-	{
-	severity = ECmdCriticalSeverity;
-	}
-
-RESOURCE SSM_START_CUSTOM_COMMAND r_increment_boot_count
-	{
-	severity = ECmdCriticalSeverity;
-	execution_behaviour = ESsmWaitForSignal;
-	dllname = "cmncustomcmds.dll";
-	ordinal = 1; // Persist reboots custom command is at ordinal 1
-	dll_data = r_increment;
-	}
-
-RESOURCE SSM_COMMAND_PERSIST_REBOOTS r_increment
-	{
-	val = EIncrementBootCount;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_app_failcount2failwait
-	{
-	name = "tsysmon_app_failcount2failwait.exe";
-	args = "APPFWK-SYSMON-0038";
-	}
-
-
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-0043_hardware0.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,326 +0,0 @@
-// Copyright (c) 2005-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:
-// Modified default resource file to test system monitor
-// WARNING: Any changes made to this resource file must be
-// checked against the system starter test cases. 
-// Specifically:
-// - AppStartCs      
-// 
-//
-
-#include <ssm/ssmcmd.rh>
-#include <ssm/ssmsubstates.hrh>
-#include <ssm/cmdpersistreboots.rh>
-#include <ssm/cmdpersistreboots.hrh>
-
-UID2 KUidSsmCommandListResourceFile
-
-// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
-// The SSM relies on this having a resource ID of 1.
-RESOURCE SSM_COMMAND_LIST_ROOT
-	{
-	command_list_mapping = r_command_list_mapping;
-	}
-
-RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
-	{
-	mappings =
-		{
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateCriticalStatic;
-			resource_id = r_critical_static_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateCriticalDynamic;
-			resource_id = r_critical_dynamic_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateNetworkingCritical;
-			resource_id = r_networking_critical_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateNonCritical;
-			resource_id = r_non_critical_commands;
-			}
-		};
-	}
-
-
-RESOURCE SSM_COMMAND_LIST r_critical_static_commands
-   	{
-	commands =
-		{
-		r_increment_boot_count
-		, r_command_publish_system_state
-		, r_command_ssmutilsrv
-		, r_command_sysmon
-		, r_command_sysagt2svr
-		, r_command_fbserv
-		, r_command_wserv
-		, r_command_set_splash_property
-		, r_command_start_splash
-		, r_command_eiksrvs
-		, r_command_tzserver
-		, r_command_app_startupregeiof
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_critical_dynamic_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_initialise_locale
-		, r_command_apparc
-		, r_command_shell
-		, r_command_multiple_wait
-		, r_command_remove_splash_property
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_networking_critical_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_c32start
-		, r_command_msexe
-		, r_command_watcher
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_non_critical_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_system_ams
-		, r_command_swidaemon
-		, r_command_cntsrv
-		, r_command_agsvexe
-		, r_command_fotaagent
-		, r_command_schexe
-		, r_command_ama_starter
-		};
-	}
-
-
-RESOURCE SSM_START_PROCESS_INFO r_command_ssmutilsrv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "ssmutilsrv.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_sysmon
-	{
-	severity = ECmdCriticalSeverity;
-	name = "sysmon.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_sysagt2svr
-	{
-	severity = ECmdCriticalSeverity;
-	name = "SysAgt2Svr.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_fbserv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "fbserv.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 1;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_wserv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "ewsrv.exe";
-	args = "-NoShell";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_command_set_splash_property
-	{
-	severity = ECmdCriticalSeverity;
-	category = 0x2000D75B;
-	key = 0x01;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_start_splash
-	{
-	severity = ECmdCriticalSeverity;
-	name = "splash.exe";
-	execution_behaviour = ESsmFireAndForget;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_eiksrvs
-	{
-	severity = ECmdCriticalSeverity;
-	name = "eiksrvs.exe";
-	args = "-OnlyStartDependentServers";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_tzserver
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tzserver.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_app_startupregeiof
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tsysmon_app_startupregeiof.exe";
-	args = "APPFWK-SYSMON-0043";
-	execution_behaviour = ESsmWaitForSignal;
-	monitor_info = r_command_monitor;
-	}
-
-RESOURCE SSM_MONITOR_INFO r_command_monitor
-	{
-	restart_policy = ESsmIgnoreOnFailure;
-	restart_mode = 0;
-	timeout = 0;
-	retries = 0;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_initialise_locale
-	{
-	name = "initialiselocale.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_apparc
-	{
-	severity = ECmdCriticalSeverity;
-	name = "apsexe.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_APP_INFO r_command_shell
-	{
-	severity = ECmdCriticalSeverity;
-	name = "shell.exe";
-	execution_behaviour = ESsmDeferredWaitForSignal;
-	viewless = 1;
-	}
-
-RESOURCE SSM_MULTIPLE_WAIT r_command_multiple_wait
-	{
-	timeout = 20000;
-	}
-
-RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_command_remove_splash_property
-	{
-	severity = ECmdCriticalSeverity;
-	category = 0x2000D75B;
-	key = 0x01;
-	value = 1;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_c32start
-	{
-	severity = ECmdCriticalSeverity;
-	name = "c32start.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_msexe
-	{
-	severity = ECmdCriticalSeverity;
-	name = "msexe.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_watcher
-	{
-	severity = ECmdCriticalSeverity;
-	name = "watcher.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_system_ams
-	{
-	name = "SystemAMS.exe";
-	args = "-boot";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_swidaemon
-	{
-	severity = ECmdCriticalSeverity;
-	name = "swidaemon.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_cntsrv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "cntsrv.exe";
-	args = "-nontransient";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_agsvexe
-	{
-	severity = ECmdCriticalSeverity;
-	name = "agsvexe.exe";
-	args = "-nontransient";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_fotaagent
-	{
-	name = "fotaagent.exe";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_schexe
-	{
-	name = "schexe.exe";
-	args = "sysstartschexe";
-	}
-
-RESOURCE SSM_START_AMA_STARTER r_command_ama_starter
-	{
-	severity = ECmdIgnoreFailure;
-	dsc_id = 0x2000836D;		// removing this id will cause a rcomp failure unless dsc_id is #defined in ssmcmd.rh file.
-	}
-
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_system_state
-	{
-	severity = ECmdCriticalSeverity;
-	}
-
-RESOURCE SSM_START_CUSTOM_COMMAND r_increment_boot_count
-	{
-	severity = ECmdCriticalSeverity;
-	execution_behaviour = ESsmWaitForSignal;
-	dllname = "cmncustomcmds.dll";
-	ordinal = 1; // Persist reboots custom command is at ordinal 1
-	dll_data = r_increment;
-	}
-
-RESOURCE SSM_COMMAND_PERSIST_REBOOTS r_increment
-	{
-	val = EIncrementBootCount;
-	}
-
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-0044_hardware0.rss	Thu Aug 19 11:09:10 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,326 +0,0 @@
-// Copyright (c) 2005-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:
-// Modified default resource file to test system monitor
-// WARNING: Any changes made to this resource file must be
-// checked against the system starter test cases. 
-// Specifically:
-// - AppStartCs      
-// 
-//
-
-#include <ssm/ssmcmd.rh>
-#include <ssm/ssmsubstates.hrh>
-#include <ssm/cmdpersistreboots.rh>
-#include <ssm/cmdpersistreboots.hrh>
-
-UID2 KUidSsmCommandListResourceFile
-
-// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
-// The SSM relies on this having a resource ID of 1.
-RESOURCE SSM_COMMAND_LIST_ROOT
-	{
-	command_list_mapping = r_command_list_mapping;
-	}
-
-RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
-	{
-	mappings =
-		{
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateCriticalStatic;
-			resource_id = r_critical_static_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateCriticalDynamic;
-			resource_id = r_critical_dynamic_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateNetworkingCritical;
-			resource_id = r_networking_critical_commands;
-			},
-		SSM_COMMANDLISTID_TO_RESOURCEID
-			{
-			command_list_id = ESsmStartupSubStateNonCritical;
-			resource_id = r_non_critical_commands;
-			}
-		};
-	}
-
-
-RESOURCE SSM_COMMAND_LIST r_critical_static_commands
-   	{
-	commands =
-		{
-		r_increment_boot_count
-		, r_command_publish_system_state
-		, r_command_ssmutilsrv
-		, r_command_sysmon
-		, r_command_sysagt2svr
-		, r_command_fbserv
-		, r_command_wserv
-		, r_command_set_splash_property
-		, r_command_start_splash
-		, r_command_eiksrvs
-		, r_command_tzserver
-		, r_command_app_startupregeioffailstart1
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_critical_dynamic_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_initialise_locale
-		, r_command_apparc
-		, r_command_shell
-		, r_command_multiple_wait
-		, r_command_remove_splash_property
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_networking_critical_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_c32start
-		, r_command_msexe
-		, r_command_watcher
-		};
-	}
-
-RESOURCE SSM_COMMAND_LIST r_non_critical_commands
-   	{
-	commands =
-		{
-		r_command_publish_system_state
-		, r_command_system_ams
-		, r_command_swidaemon
-		, r_command_cntsrv
-		, r_command_agsvexe
-		, r_command_fotaagent
-		, r_command_schexe
-		, r_command_ama_starter
-		};
-	}
-
-
-RESOURCE SSM_START_PROCESS_INFO r_command_ssmutilsrv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "ssmutilsrv.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_sysmon
-	{
-	severity = ECmdCriticalSeverity;
-	name = "sysmon.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_sysagt2svr
-	{
-	severity = ECmdCriticalSeverity;
-	name = "SysAgt2Svr.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 2;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_fbserv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "fbserv.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	retries = 1;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_wserv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "ewsrv.exe";
-	args = "-NoShell";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_command_set_splash_property
-	{
-	severity = ECmdCriticalSeverity;
-	category = 0x2000D75B;
-	key = 0x01;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_start_splash
-	{
-	severity = ECmdCriticalSeverity;
-	name = "splash.exe";
-	execution_behaviour = ESsmFireAndForget;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_eiksrvs
-	{
-	severity = ECmdCriticalSeverity;
-	name = "eiksrvs.exe";
-	args = "-OnlyStartDependentServers";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_tzserver
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tzserver.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_app_startupregeioffailstart1
-	{
-	severity = ECmdCriticalSeverity;
-	name = "tsysmon_app_startupregeioffailstart1.exe";
-	args = "APPFWK-SYSMON-0044";
-	execution_behaviour = ESsmWaitForSignal;
-	monitor_info = r_command_monitor;
-	}
-
-RESOURCE SSM_MONITOR_INFO r_command_monitor
-	{
-	restart_policy = ESsmIgnoreOnFailure;
-	restart_mode = 0;
-	timeout = 0;
-	retries = 0;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_initialise_locale
-	{
-	name = "initialiselocale.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_apparc
-	{
-	severity = ECmdCriticalSeverity;
-	name = "apsexe.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_APP_INFO r_command_shell
-	{
-	severity = ECmdCriticalSeverity;
-	name = "shell.exe";
-	execution_behaviour = ESsmDeferredWaitForSignal;
-	viewless = 1;
-	}
-
-RESOURCE SSM_MULTIPLE_WAIT r_command_multiple_wait
-	{
-	timeout = 20000;
-	}
-
-RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_command_remove_splash_property
-	{
-	severity = ECmdCriticalSeverity;
-	category = 0x2000D75B;
-	key = 0x01;
-	value = 1;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_c32start
-	{
-	severity = ECmdCriticalSeverity;
-	name = "c32start.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_msexe
-	{
-	severity = ECmdCriticalSeverity;
-	name = "msexe.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_watcher
-	{
-	severity = ECmdCriticalSeverity;
-	name = "watcher.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_system_ams
-	{
-	name = "SystemAMS.exe";
-	args = "-boot";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_swidaemon
-	{
-	severity = ECmdCriticalSeverity;
-	name = "swidaemon.exe";
-	execution_behaviour = ESsmWaitForSignal;
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_cntsrv
-	{
-	severity = ECmdCriticalSeverity;
-	name = "cntsrv.exe";
-	args = "-nontransient";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_agsvexe
-	{
-	severity = ECmdCriticalSeverity;
-	name = "agsvexe.exe";
-	args = "-nontransient";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_fotaagent
-	{
-	name = "fotaagent.exe";
-	}
-
-RESOURCE SSM_START_PROCESS_INFO r_command_schexe
-	{
-	name = "schexe.exe";
-	args = "sysstartschexe";
-	}
-
-RESOURCE SSM_START_AMA_STARTER r_command_ama_starter
-	{
-	severity = ECmdIgnoreFailure;
-	dsc_id = 0x2000836D;		// removing this id will cause a rcomp failure unless dsc_id is #defined in ssmcmd.rh file.
-	}
-
-RESOURCE SSM_PUBLISH_SYSTEM_STATE r_command_publish_system_state
-	{
-	severity = ECmdCriticalSeverity;
-	}
-
-RESOURCE SSM_START_CUSTOM_COMMAND r_increment_boot_count
-	{
-	severity = ECmdCriticalSeverity;
-	execution_behaviour = ESsmWaitForSignal;
-	dllname = "cmncustomcmds.dll";
-	ordinal = 1; // Persist reboots custom command is at ordinal 1
-	dll_data = r_increment;
-	}
-
-RESOURCE SSM_COMMAND_PERSIST_REBOOTS r_increment
-	{
-	val = EIncrementBootCount;
-	}
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/resource/hardware/appfwk-sysmon-eiof_hardware0.rss	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,113 @@
+// 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:
+// Resource file to add exes that are started during boot-up 
+// with IgnoreOnFailure policy
+// 
+//
+
+#include <ssm/ssmcmd.rh>
+#include <ssm/ssmsubstates.hrh>
+#include <ssm/cmdpersistreboots.rh>
+#include <ssm/cmdpersistreboots.hrh>
+#include "ssmsubstateext.hrh"
+
+UID2 KUidSsmCommandListResourceFile
+
+// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
+// The SSM relies on this having a resource ID of 1.
+RESOURCE SSM_COMMAND_LIST_ROOT
+	{
+	command_list_mapping = r_command_list_mapping;
+	}
+
+RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
+	{
+	mappings =
+		{
+        SSM_COMMANDLISTID_TO_RESOURCEID
+            {
+            command_list_id = ESsmStateStartingCriticalApps;
+            resource_id = r_cmds_critical;
+            },
+        SSM_COMMANDLISTID_TO_RESOURCEID
+            {
+            command_list_id = ESsmStateNonCritical;
+            resource_id = r_cmds_noncritical;
+            }
+		};
+	}
+
+RESOURCE SSM_COMMAND_LIST r_cmds_critical
+    {
+    commands =
+        {
+        r_command_app_startupregeiof,
+        r_command_app_startupregeioffailstart1
+        };
+    }
+
+RESOURCE SSM_COMMAND_LIST r_cmds_noncritical
+    {
+    commands =
+        {
+        r_command_app_faileiofcount0,
+        r_command_app_faileiofcount1fail,
+        r_command_app_failcount2failwait
+        };
+    }
+
+RESOURCE SSM_START_PROCESS_INFO r_command_app_startupregeiof
+    {
+    severity = ECmdCriticalSeverity;
+    name = "tsysmon_app_startupregeiof.exe";
+    args = "43";
+    execution_behaviour = ESsmWaitForSignal;
+    monitor_info = r_command_monitor;
+    }
+
+RESOURCE SSM_START_PROCESS_INFO r_command_app_startupregeioffailstart1
+    {
+    severity = ECmdIgnoreFailure;
+    name = "tsysmon_app_startupregeioffailstart1.exe";
+    args = "44";
+    execution_behaviour = ESsmWaitForSignal;
+    monitor_info = r_command_monitor;
+    }
+
+RESOURCE SSM_MONITOR_INFO r_command_monitor
+    {
+    restart_policy = ESsmIgnoreOnFailure;
+    restart_mode = 0;
+    timeout = 0;
+    retries = 0;
+    }
+
+RESOURCE SSM_START_PROCESS_INFO r_command_app_faileiofcount0
+    {
+    name = "tsysmon_app_faileiofcount0.exe";
+    args = "APPFWK-SYSMON-0033";
+    }
+
+RESOURCE SSM_START_PROCESS_INFO r_command_app_faileiofcount1fail
+    {
+    name = "tsysmon_app_faileiofcount1fail.exe";
+    args = "APPFWK-SYSMON-0034";
+    }
+
+RESOURCE SSM_START_PROCESS_INFO r_command_app_failcount2failwait
+    {
+    name = "tsysmon_app_failcount2failwait.exe";
+    args = "APPFWK-SYSMON-0038";
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_criticalnoretries.script	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,39 @@
+// 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:
+//
+
+PRINT Run CriticalNoRetries test 
+
+LOAD_SUITE tsysmon_server
+
+START_TESTCASE 			DEVSRVS-SHMA-SYSMON-0054
+//! @SYMTestCaseID 		DEVSRVS-SHMA-SYSMON-0054
+//! @SYMPREQ 			
+//! @SYMREQ			
+//! @SYMTestType		UT
+//! @SYMTestPriority		Critical
+//! @SYMTestStatus 		Implemented
+//! @SYMTestCaseDesc		A process with ECriticalNoRetries recovery policy restarts the OS without retrying to restart the process
+//! @SYMTestActions		1. Start a process 
+//! 				2. Call RSysMonSession::Monitor() using startupproperties for this process with EWaitForStart, retry count = 1, 
+//! 					   and ECriticalNoRetries
+//! 				3. Kill the process
+//! 				4. The test shouldn't try to start the process again. It should restart the OS without any retries - this 
+//! 					   is the actual test
+//! @SYMTestExpectedResults pass
+RUN_TEST_STEP 100 tsysmon_server CriticalNoRetriesStep
+END_TESTCASE 			DEVSRVS-SHMA-SYSMON-0054
+
+RUN_UTILS MakeReadWrite c:\testdata\runcounts\tsysmon_app_dontrendezvous.exe.txt
+RUN_UTILS DeleteFile c:\testdata\runcounts\tsysmon_app_dontrendezvous.exe.txt
\ No newline at end of file
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_failcount2failwait.script	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_failcount2failwait.script	Tue Aug 31 16:29:05 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,7 +27,7 @@
 //! @SYMREQ			REQ6600 REQ6603 REQ6830 REQ9457
 //! @SYMTestType		CIT
 //! @SYMTestPriority		Critical
-//! @SYMTestCaseDependencies	appfwk-sysmon-0038_<emulator|hardware>0.rsc must be used in place of SSCForStartupMode0.rsc
+//! @SYMTestCaseDependencies	appfwk-sysmon-0038_<emulator|hardware>0.rsc is merged with noncriticalcmdlist.rsc
 //! @SYMTestCaseDesc		Register a process for monitoring with retry limit = 2, fail the process twice with a pause
 //! @SYMTestActions		A process is registered. Failure policy is not important.
 //! Fail the process.
@@ -37,5 +37,5 @@
 //! @SYMTestExpectedResults 	The process is restarted again immediately, and reregistered.
 //
 START_TESTCASE DEVSRVS-SHMA-SYSMON-0038
-RUN_TEST_STEP 100 tsysmon_server ResultCheck z:\shmatest\configs\tsysmon.ini APPFWK-SYSMON-0038
+RUN_TEST_STEP 100 tsysmon_server ResultCheck z:\shmatest\configs\tsysmon.ini 38
 END_TESTCASE DEVSRVS-SHMA-SYSMON-0038
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_faileiofcount0.script	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_faileiofcount0.script	Tue Aug 31 16:29:05 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,7 +27,7 @@
 //! @SYMREQ			REQ6595 REQ6603 REQ9457
 //! @SYMTestType		CIT
 //! @SYMTestPriority		Critical
-//! @SYMTestCaseDependencies	appfwk-sysmon-0033_<emulator|hardware>0.rsc must be used in place of SSCForStartupMode0.rsc
+//! @SYMTestCaseDependencies	appfwk-sysmon-0033_<emulator|hardware>0.rsc is merged with noncriticalcmdlist.rsc
 //! @SYMTestCaseDesc		Register a process for monitoring, with retry count = 0, 'EIgnoreOnFailure' policy, fail the process
 //! @SYMTestActions		A process is registered with the 'EIgnoreOnFailure' policy. 
 //! Fail the process.
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_faileiofcount1fail.script	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_faileiofcount1fail.script	Tue Aug 31 16:29:05 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,7 +27,7 @@
 //! @SYMREQ			REQ6595 REQ6760 REQ9457
 //! @SYMTestType		CIT
 //! @SYMTestPriority		Critical
-//! @SYMTestCaseDependencies	appfwk-sysmon-0034_<emulator|hardware>0.rsc must be used in place of SSCForStartupMode0.rsc
+//! @SYMTestCaseDependencies	appfwk-sysmon-0034_<emulator|hardware>0.rsc is merged with noncriticalcmdlist.rsc
 //! @SYMTestCaseDesc		Register a process for monitoring with retry limit = 1 and 'EIgnoreOnFailure' policy, fail the process
 //! @SYMTestActions		A process is registered with the 'EIgnoreOnFailure' policy.
 //! Fail the process.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_restartos.script	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,39 @@
+// 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:
+//
+
+PRINT Run RestartOS test 
+
+LOAD_SUITE tsysmon_server
+
+START_TESTCASE 			DEVSRVS-SHMA-SYSMON-0035
+//! @SYMTestCaseID 		DEVSRVS-SHMA-SYSMON-0035
+//! @SYMPREQ 			
+//! @SYMREQ			
+//! @SYMTestType		UT
+//! @SYMTestPriority		Critical
+//! @SYMTestStatus 		Implemented
+//! @SYMTestCaseDesc		A process with ERestartOS recovery policy restarts the OS after retrying the specified number of times
+//! @SYMTestActions		1. Start a process 
+//! 				2. Call RSysMonSession::Monitor() using startupproperties for this process with EWaitForStart, retry count = 1, 
+//! 					   and ERestartOS
+//! 				3. Kill the process
+//! 				4. Then the process restarts again and fails
+//! 				5. This will cause the OS to restart.
+//! @SYMTestExpectedResults pass
+RUN_TEST_STEP 100 tsysmon_server RestartOSStep
+END_TESTCASE 			DEVSRVS-SHMA-SYSMON-0035
+
+RUN_UTILS MakeReadWrite c:\testdata\runcounts\tsysmon_app_dontrendezvous.exe.txt
+RUN_UTILS DeleteFile c:\testdata\runcounts\tsysmon_app_dontrendezvous.exe.txt
\ No newline at end of file
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_startupregeiof.script	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_startupregeiof.script	Tue Aug 31 16:29:05 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,12 +27,12 @@
 //! @SYMREQ			REQ6604 REQ9457
 //! @SYMTestType		CIT
 //! @SYMTestPriority		Critical
-//! @SYMTestCaseDependencies	appfwk-sysmon-0043_<emulator|hardware>0.rsc must be used in place of SSCForStartupMode0.rsc
+//! @SYMTestCaseDependencies	appfwk-sysmon-0043_<emulator|hardware>0.rsc is merged with criticalappscmdlist.rsc
 //! @SYMTestCaseDesc		Use the new startup configuration format to register for process monitoring, with 'EIgnoreOnFailure' policy.
-//! @SYMTestActions		Create a startup configuration that includes a process with the 'EIgnoreOnFailure' policy in the Critical Static startup state.
+//! @SYMTestActions		Create a startup configuration that includes a process with the 'EIgnoreOnFailure' policy in the ESsmStateStartingCriticalApps state.
 //! Boot the device.
 //! @SYMTestExpectedResults 	The process should be registered with the parameters defined in the startup configuration.
 //
 START_TESTCASE DEVSRVS-SHMA-SYSMON-0043
-RUN_TEST_STEP 100 tsysmon_server ResultCheck z:\shmatest\configs\tsysmon.ini APPFWK-SYSMON-0043
+RUN_TEST_STEP 100 tsysmon_server ResultCheck z:\shmatest\configs\tsysmon.ini 43
 END_TESTCASE DEVSRVS-SHMA-SYSMON-0043
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_startupregeioffailstart1.script	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/scripts/shmatest_sysmon_startupregeioffailstart1.script	Tue Aug 31 16:29:05 2010 +0300
@@ -1,5 +1,4 @@
-//
-// 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,7 +26,7 @@
 //! @SYMREQ			REQ6604 REQ9457
 //! @SYMTestType		CIT
 //! @SYMTestPriority		Critical
-//! @SYMTestCaseDependencies	appfwk-sysmon-0044_<emulator|hardware>0.rsc must be used in place of SSCForStartupMode0.rsc
+//! @SYMTestCaseDependencies	appfwk-sysmon-0044_<emulator|hardware>0.rsc is merged with criticalappscmdlist.rsc
 //! @SYMTestCaseDesc		Use the new startup configuration format to register for process monitoring, with 'EIgnoreOnFailure' policy, have the process fail during startup.
 //! @SYMTestActions		Create a SSC file which will contain an item for a test application with EStartupProcess2, EWaitForStart, retry count = 0, EIgnoreOnFailure, and monitor = 1. The test application will be in the Critical Static section.
 //! The test application records a count in a file to check whether it is being loaded first time or second time.
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/sysmontesthelper.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/sysmontesthelper.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,6 +22,7 @@
 #include "sysmontesthelper.h"
 #include <f32file.h>
 #include <s32file.h>
+#include <e32property.h>
 
 _LIT(KEIgnoreOnFailure, "EIgnoreOnFailure");
 _LIT(KERestartOS, "ERestartOS");
@@ -135,6 +136,7 @@
 	fileName.Append(KResultsRoot);
 	fileName.Append(aTestId);
 	
+	RDebug::Print(_L("Checking in file: %S"), &fileName);
 	RFs fs;
 	User::LeaveIfError(fs.Connect());
 	CleanupClosePushL(fs);
@@ -180,6 +182,7 @@
 	fileName.Append(KRunCountsRoot);
 	fileName.Append(parse.NameAndExt());
 	fileName.Append(KTxtExtension);
+	RDebug::Print(_L("Checking in file: %S"), &fileName);
 
 	RFileReadStream file;
 	TInt err = 0;
@@ -264,32 +267,11 @@
 	return result;
 	}
 
-EXPORT_C TInt CSysMonTestHelper::GetRegisterCountL()
+EXPORT_C TInt CSysMonTestHelper::GetRegisterCount(TInt aKey)
 	{
-	RFs fs;
-	User::LeaveIfError(fs.Connect());
-	CleanupClosePushL(fs);
-	
-	RFile file;
-	TInt err = 0;
-	err = file.Open(fs, KRegisterCountFile, EFileRead);
 	TInt result = 0;
-	if (err == KErrNotFound || err == KErrPathNotFound)
-		{
-		CleanupStack::PopAndDestroy(&fs);
-		}
-	else
-		{
-		CleanupClosePushL(file);
-		User::LeaveIfError(err);
-		TBuf8<11> content;
-		file.Read(content);
-		content.Delete(0,9);
-		TLex8 myLex(content);
-		User::LeaveIfError(myLex.Val(result));
-		file.Close();
-		CleanupStack::PopAndDestroy(2, &fs);
-		}
+	TInt error = RProperty::Get(KTestSysMon, aKey, result);
+	RDebug::Printf("RProperty::Get() with key %d returned with %d", aKey, error);
 	return result;
 	}
 	
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/sysmontesthelper.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/sysmontesthelper.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -47,6 +47,7 @@
 _LIT(KRestartCountFile, "C:\\Restart_ResultFile.txt");
 
 const TInt KMaxTestIdLength = 20; // TestId is of the format APPFWK-SYSMON-00xx
+const TUid KTestSysMon={0x200086A8};    // Category value to be used to define restart P&S key 
 
 class CSysMonTestHelper : public CBase
 	{
@@ -57,7 +58,7 @@
 	IMPORT_C static TInt ReadRunCountL(const TDesC& aProcessFilename);
 	IMPORT_C static void IncrementRunCountL(const TDesC& aProcessFilename);
 	IMPORT_C static TInt GetRestartCountL();
-	IMPORT_C static TInt GetRegisterCountL();
+	IMPORT_C static TInt GetRegisterCount(TInt aKey);
 	
 	IMPORT_C static CSysMonTestHelper* NewLC();
 	IMPORT_C static CSysMonTestHelper* NewL();
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_donothing.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_donothing.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -26,12 +26,11 @@
 
 void MainL()
     {
-    RProcess::Rendezvous(KErrNone);
-
     CCommandLineArguments* args = CCommandLineArguments::NewLC();
     CSysMonTestHelper::IncrementRunCountL(args->Arg(0));
     CleanupStack::PopAndDestroy(args);
 	
+    RProcess::Rendezvous(KErrNone);
 	while (ETrue)
 		{
 		User::After(5000000); // 5 seconds
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_failcount2failwait.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_failcount2failwait.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,12 +20,16 @@
 */
 
 #include "sysmontesthelper.h"
+#include <e32property.h>
 
+const TUint32 KRestartExeCount = 38;
 
 TInt MainL()
 	{
 	RDebug::Print(_L("appfwk-sysmon-0038: MainL"));
-
+	
+	TInt err = RProperty::Define(KTestSysMon, KRestartExeCount, RProperty::EInt);
+    RDebug::Printf("Defining P&S key with key %d returns with err %d", err, KRestartExeCount);
 	TInt runCount = 0;
     CCommandLineArguments* args = CCommandLineArguments::NewLC();
     runCount = CSysMonTestHelper::ReadRunCountL(args->Arg(0));
@@ -43,7 +47,7 @@
 			CleanupClosePushL(sysmon);
 			TTime time1();
 
-			CStartupProperties* props = CStartupProperties::NewLC(_L("tsysmon_app_failcount2failwait_slave.exe"), _L("APPFWK-SYSMON-0038"));
+			CStartupProperties* props = CStartupProperties::NewLC(_L("tsysmon_app_failcount2failwait_slave.exe"), _L("38"));
 			props->SetMonitored(ETrue);
 			props->SetStartupType(EStartProcess);
 			props->SetStartMethod(EWaitForStart);
@@ -54,7 +58,10 @@
 			RProcess slave1;
 			slave1.Create(_L("tsysmon_app_failcount2failwait_slave.exe"), _L("APPFWK-SYSMON-0038"));
 			CleanupClosePushL(slave1);
-			slave1.Resume();
+            TRequestStatus status;
+            slave1.Rendezvous(status);
+            slave1.Resume();
+            User::WaitForRequest(status);
 
 			// Register with SysMon
 			sysmon.MonitorL(*props, slave1);
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_failcount2failwait_slave.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_failcount2failwait_slave.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,7 +41,6 @@
         {
 		case 1:
 			{
-			RProcess::Rendezvous(KErrNone);
 			User::After(KWaitTime);
 			time1.HomeTime();
 			datetime1 = time1.DateTime();
@@ -52,12 +51,12 @@
 	
 			helper = CSysMonTestHelper::NewLC();
 			helper->WriteResultL(millisecs);
+			RProcess::Rendezvous(KErrNone);
 			CleanupStack::PopAndDestroy(helper);
 			break;
 			}
 		case 2:
 			{
-			RProcess::Rendezvous(KErrNone);
 			time1.HomeTime();
 			datetime1 = time1.DateTime();
 			millisecs = (datetime1.MicroSecond() / 1000) + 
@@ -66,7 +65,7 @@
 						(datetime1.Hour() * 60 * 60 * 1000);
 											
 			TInt secondRunTime;
-			CSysMonTestHelper::GetResultIntL(_L("APPFWK-SYSMON-0038"), secondRunTime);
+			CSysMonTestHelper::GetResultIntL(_L("38"), secondRunTime);
 			CSysMonTestHelper* helper = CSysMonTestHelper::NewLC();
 			
 			if ( (secondRunTime - millisecs)  < 2000 )
@@ -77,6 +76,7 @@
 				{
 				helper->WriteResultL(0);
 				}
+			RProcess::Rendezvous(KErrNone);
 			CleanupStack::PopAndDestroy(helper);
 			keepRunning = ETrue;
 			break;
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_faileiofcount0.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_faileiofcount0.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,8 +19,11 @@
  @internalComponent - Internal Symbian test code   
 */
 
+#include <e32property.h>
 #include "sysmontesthelper.h"
 
+const TUint32 KRestartExeCount = 33;
+
 
 TInt MainL()
 	{
@@ -28,11 +31,14 @@
 
 	TInt runCount = 0;
     CCommandLineArguments* args = CCommandLineArguments::NewLC();
+    TInt err = RProperty::Define(KTestSysMon, KRestartExeCount, RProperty::EInt);
+    RDebug::Printf("Defining P&S key with key %d returns with err %d", err, KRestartExeCount);
+    
     runCount = CSysMonTestHelper::ReadRunCountL(args->Arg(0));
 	CSysMonTestHelper::IncrementRunCountL(args->Arg(0));
     CleanupStack::PopAndDestroy(args);
 
-    
+    RDebug::Printf("runCount = %d", runCount);
     switch (runCount)
         {
 		case 0:
@@ -42,7 +48,7 @@
 			sysmon.OpenL();
 			CleanupClosePushL(sysmon);
 			
-			CStartupProperties* props = CStartupProperties::NewLC(_L("tsysmon_app_donothing.exe"), KNullDesC);
+			CStartupProperties* props = CStartupProperties::NewLC(_L("tsysmon_app_donothing.exe"), _L("33"));
 			props->SetMonitored(ETrue);
 			props->SetStartupType(EStartProcess);
 			props->SetStartMethod(EWaitForStart);
@@ -53,12 +59,15 @@
 			RProcess slave1;
 			slave1.Create(_L("tsysmon_app_donothing.exe"), _L("5000"));
 			CleanupClosePushL(slave1);
+			TRequestStatus status;
+			slave1.Rendezvous(status);
 			slave1.Resume();
+			User::WaitForRequest(status);
 
 			// Register with SysMon
 			sysmon.MonitorL(*props, slave1);
 			slave1.Terminate(KErrNone);
-
+			
 			CleanupStack::PopAndDestroy(3, &sysmon);
 			break;
 			}
@@ -68,6 +77,7 @@
             break;
 			}
         }
+    
 	RDebug::Print(_L("appfwk-sysmon-0033: End MainL"));
 	return KErrNone;
 	}
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_faileiofcount1fail.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_faileiofcount1fail.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,8 +19,9 @@
  @internalComponent - Internal Symbian test code   
 */
 
+#include <e32property.h>
 #include "sysmontesthelper.h"
-
+const TUint32 KRestartExeCount = 34;
 
 TInt MainL()
 	{
@@ -28,6 +29,8 @@
 
 	TInt runCount = 0;
     CCommandLineArguments* args = CCommandLineArguments::NewLC();
+    TInt err = RProperty::Define(KTestSysMon, KRestartExeCount, RProperty::EInt);
+    RDebug::Printf("Defining P&S key with key %d returns with err %d", err, KRestartExeCount);
     runCount = CSysMonTestHelper::ReadRunCountL(args->Arg(0));
 	CSysMonTestHelper::IncrementRunCountL(args->Arg(0));
     CleanupStack::PopAndDestroy(args);
@@ -42,7 +45,7 @@
 			sysmon.OpenL();
 			CleanupClosePushL(sysmon);
 
-			CStartupProperties* props = CStartupProperties::NewLC(_L("tsysmon_app_dontrendezvous.exe"), KNullDesC);
+			CStartupProperties* props = CStartupProperties::NewLC(_L("tsysmon_app_dontrendezvous.exe"), _L("34"));
 			props->SetMonitored(ETrue);
 			props->SetStartupType(EStartProcess);
 			props->SetStartMethod(EWaitForStart);
@@ -53,7 +56,10 @@
 			RProcess slave1;
 			slave1.Create(_L("tsysmon_app_dontrendezvous.exe"), _L("5000"));
 			CleanupClosePushL(slave1);
+			TRequestStatus status;
+			slave1.Rendezvous(status);
 			slave1.Resume();
+			User::WaitForRequest(status);
 
 			// Register with SysMon
 			sysmon.MonitorL(*props, slave1);
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_startupregeiof.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_startupregeiof.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,9 +20,14 @@
 */
 
 #include "sysmontesthelper.h"
+#include <e32property.h>
+
+const TUint32 KRestartExeCount = 43;
 
 void MainL()
 	{
+    TInt err = RProperty::Define(KTestSysMon, KRestartExeCount, RProperty::EInt);
+    RDebug::Printf("Defining P&S key with key %d returns with err %d", err, KRestartExeCount);
 	RProcess::Rendezvous(KErrNone);
 	User::After(500000); // 0.5 seconds
 	CSysMonTestHelper* helper = CSysMonTestHelper::NewLC();	
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_startupregeioffailstart1.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_startupregeioffailstart1.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,9 +20,14 @@
 */
 
 #include "sysmontesthelper.h"
+#include <e32property.h>
+
+const TUint32 KRestartExeCount = 44;
 
 LOCAL_C TInt MainL()
     {
+    TInt err = RProperty::Define(KTestSysMon, KRestartExeCount, RProperty::EInt);
+    RDebug::Printf("Defining P&S key with key %d returns with err %d", err, KRestartExeCount);
     TInt runCount = 0;
     CCommandLineArguments* args = CCommandLineArguments::NewLC();
     runCount = CSysMonTestHelper::ReadRunCountL(args->Arg(0));
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_server.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_server.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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,6 +41,7 @@
 #include "tsysmon_steploadsysmon.h"
 #include "tsysmon_stepoomsysmon.h"
 #include "tsysmon_stepcancelallmonitors.h"
+#include "tsysmon_steposrestarttest.h"
 
 CSysMonTestServer* CSysMonTestServer::NewLC()
 	{
@@ -169,6 +170,14 @@
         {
         testStep = new CStepCancelAllMonitors();
         }
+    else if(aStepName == KCTestCaseCriticalNoRetriesStep)
+        {
+        testStep = new CStepOSRestart(KCTestCaseCriticalNoRetries);
+        }
+    else if(aStepName == KCTestCaseRestartOSStep)
+        {
+        testStep = new CStepOSRestart(KCTestCaseRestartOS);
+        }
 	else 
 		{
 		RDebug::Printf("Unknown sysmon teststep %S", &aStepName);	
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_server_defs.h	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_server_defs.h	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -32,6 +32,7 @@
 _LIT(KTSysMonServerDeregExpectedResult,"DeregExpectedResult");
 _LIT(KTSysMonServerExpectedRegisterCount,"ExpectedRegisterCount");
 _LIT(KTSysMonServerExpectedRestartCount,"ExpectedRestartCount");
+_LIT(KTSysMonServerProcessArguments,"ProcessArguments");
 
 _LIT(KSpace, " ");
 
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_step_result_check.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_step_result_check.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -36,9 +36,11 @@
 	TInt expectedResult = 0;
 	TInt expectedRegisterCount = 0;
 	TInt expectedRestartCount = 0;
+	TInt processArguments = 0;
 	if (!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedResult, expectedResult) ||
 		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRegisterCount, expectedRegisterCount) ||
-		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRestartCount, expectedRestartCount))
+		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRestartCount, expectedRestartCount) ||
+		!GetIntFromConfig(ConfigSection(), KTSysMonServerProcessArguments, processArguments))
 		{
 		ERR_PRINTF1(_L("Error reading ini file data"));
 		User::Leave(KErrNotFound);
@@ -48,7 +50,7 @@
 	TInt actualRegisterCount = 0;
 	TInt actualRestartCount = 0;
 	CSysMonTestHelper::GetResultIntL(ConfigSection(), actualResult);
-	actualRegisterCount = CSysMonTestHelper::GetRegisterCountL();
+	actualRegisterCount = CSysMonTestHelper::GetRegisterCount(processArguments);
 	actualRestartCount = CSysMonTestHelper::GetRestartCountL();
 
 	INFO_PRINTF2(_L("Actual result: %d"), actualResult);
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_step_run_count_check.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_step_run_count_check.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -37,10 +37,12 @@
 	TInt expectedRunCount = 0;
 	TInt expectedRegisterCount = 0;
 	TInt expectedRestartCount = 0;
+	TInt processArguments = 0;
 	if (!GetStringFromConfig(ConfigSection(), KTSysMonServerFilename, filename) ||
 		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRunCount, expectedRunCount) ||
 		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRegisterCount, expectedRegisterCount) ||
-		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRestartCount, expectedRestartCount))
+		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRestartCount, expectedRestartCount) ||
+		!GetIntFromConfig(ConfigSection(), KTSysMonServerProcessArguments, processArguments))
 		{
 		ERR_PRINTF1(_L("Error reading ini file data"));
 		User::Leave(KErrNotFound);
@@ -51,7 +53,7 @@
 	TInt actualRegisterCount = 0;
 	TInt actualRestartCount = 0;
 	actualRunCount = CSysMonTestHelper::ReadRunCountL(filename);
-	actualRegisterCount = CSysMonTestHelper::GetRegisterCountL();
+	actualRegisterCount = CSysMonTestHelper::GetRegisterCount(processArguments);
 	actualRestartCount = CSysMonTestHelper::GetRestartCountL();
 
 	INFO_PRINTF2(_L("Actual run count: %d"), actualRunCount);
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_stepcancelallmonitors.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_stepcancelallmonitors.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -176,6 +176,7 @@
         iAppStartSignalSem.Wait();
 
         INFO_PRINTF2(_L("Process killed with %d"), err);
+        User::After(2000000);
         TEST(EFalse == Exists(KTestAppGood));
         }
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_steposrestarttest.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,232 @@
+// 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:
+//
+
+/**
+ @file
+ @test
+ @internalComponent - Internal Symbian test code
+*/
+
+#include "testprocgoodsession.h"
+#include "tsysmon_steposrestarttest.h"
+#include <ssm/ssmstate.h>
+#include <ssm/ssmdomaindefs.h>
+#include <ssm/ssmstateawaresession.h>
+#include <sysmonclisess.h>
+#include <startupproperties.h>
+#include <e32cmn.h>
+#include <f32file.h>
+
+_LIT(KSysMonDontRendezvousRunCountFile, "C:\\testdata\\runcounts\\tsysmon_app_dontrendezvous.exe");
+
+CStepOSRestart::CStepOSRestart(const TDesC& aTestName): iTestName(aTestName)
+	{
+    if (aTestName == KCTestCaseCriticalNoRetries)
+        SetTestStepName(KCTestCaseCriticalNoRetriesStep);
+    else if (aTestName == KCTestCaseRestartOS)
+        SetTestStepName(KCTestCaseRestartOSStep);
+    else
+        {
+        // If the test script is none of the above then we would fail the test
+        TEST(KErrArgument);
+        }
+	}
+
+CStepOSRestart::~CStepOSRestart()
+    {
+    iSsmStateAwareSess.Close();
+    if (iAsyncCallbackForStartTest)
+        delete iAsyncCallbackForStartTest;
+    if(iAsyncCallbackForStopScheduler)
+        delete iAsyncCallbackForStopScheduler;
+    }
+
+void CStepOSRestart::StateChanged(TSsmState aSsmState)
+    {
+  
+    }
+void CStepOSRestart::CallStopSchedulerL()
+	{
+	TSsmState currenState;
+	currenState = iSsmStateAwareSess.State();
+
+	TUint16 currentMainState = currenState.MainState();
+	// Active scheduler is stopped once the system goes into shutdown state, else it issues a request for callback again
+	// Once the system gets into normal state start the state transition test
+	if (currentMainState == ESsmFail || currentMainState == ESsmShutdown)
+		{
+ 		RDebug::Print(_L("\nStateTran Test: Stop Active Scheduler\n"));
+ 		TInt runCount = CSysMonTestHelper::ReadRunCountL(KSysMonDontRendezvousRunCountFile);
+ 		if((iTestName == KCTestCaseCriticalNoRetries) && (1 != runCount))
+ 		    SetTestStepResult(EFail);
+ 		else if((iTestName == KCTestCaseRestartOS) && (2 != runCount))
+ 		    SetTestStepResult(EFail);
+		CActiveScheduler::Stop();
+		}
+	else
+		{
+		iAsyncCallbackForStopScheduler->CallBack();
+		}
+	}
+
+static TInt StopScheduler(TAny* aStateTranFromNormal)
+ 	{
+ 	CStepOSRestart* stateTran = reinterpret_cast<CStepOSRestart*>(aStateTranFromNormal);
+ 	TRAPD(err,stateTran->CallStopSchedulerL());
+ 	return err;
+ 	}
+
+
+TVerdict CStepOSRestart::doTestStepL()
+	{
+    TInt err =0;
+    if (iTestName == KCTestCaseCriticalNoRetries)
+        {
+        TRAP(err, TestCriticalNoRetriesL());
+        }
+    else if (iTestName == KCTestCaseRestartOS)
+        {
+        TRAP(err, TestRestartOSL());
+        }
+    TEST(KErrNone == err);
+    return TestStepResult();    
+	}
+
+void CStepOSRestart::TestCriticalNoRetriesL()
+    {
+	CActiveScheduler* sched=new(ELeave) CActiveScheduler;
+	CleanupStack::PushL(sched);
+	CActiveScheduler::Install(sched);
+
+	RSysMonSession sysmon;
+	sysmon.OpenL();
+	CleanupClosePushL(sysmon);
+
+	CStartupProperties* props = CStartupProperties::NewLC(_L("tsysmon_app_dontrendezvous.exe"), KNullDesC);
+	props->SetMonitored(ETrue);
+	props->SetStartupType(EStartProcess);
+	props->SetStartMethod(EWaitForStart);
+	props->SetNoOfRetries(1);
+	props->SetTimeout(0);
+	props->SetRecoveryParams(ECriticalNoRetries, 0);
+
+	RProcess slave1;
+	slave1.Create(_L("tsysmon_app_dontrendezvous.exe"), _L("5000"));
+	CleanupClosePushL(slave1);
+
+	TSsmState currenState;
+	// Connects to RSsmStateAwareSession in order to enquire about the current system state
+	TInt err = iSsmStateAwareSess.Connect(KSM2UiServicesDomain3);
+	TEST(err == KErrNone);
+	if (err == KErrNone)
+		RDebug::Print(_L("\nStateTran Test: RSsmStateAwareSession sess Connect %d\n"), err);
+	else
+		{
+		RDebug::Print(_L("\nStateTran Test: RSsmStateAwareSession sess Connect Failed\n"));	
+		User::Leave(err);
+		}
+
+	currenState = iSsmStateAwareSess.State();
+
+	RDebug::Print(_L("\nStateTran Test: Current System State is %d\n"), currenState.MainState());
+	TEST(currenState.MainState() == ESsmNormal);
+
+	iAsyncCallbackForStopScheduler =  new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
+	TCallBack stopSchedulerCallback(StopScheduler, this);
+	iAsyncCallbackForStopScheduler->Set(stopSchedulerCallback);
+
+	// call the callback function which keeps looping until the system state gets into fail state.
+	iAsyncCallbackForStopScheduler->CallBack();
+
+	// Notifier used to get the notification when system gets to fail state
+	CSsmStateAwareSession* notif_for_failstate = CSsmStateAwareSession::NewLC(KSM2UiServicesDomain3);
+	notif_for_failstate->AddSubscriberL(*this);
+
+    TRequestStatus status;
+    slave1.Rendezvous(status);
+    slave1.Resume();
+    User::WaitForRequest(status);
+	// Register with SysMon
+	sysmon.MonitorL(*props, slave1);
+	slave1.Terminate(KErrNone);
+
+	sched->Start();
+
+	CleanupStack::PopAndDestroy(5);
+	}
+
+void CStepOSRestart::TestRestartOSL()
+    {
+    CActiveScheduler* sched=new(ELeave) CActiveScheduler;
+    CleanupStack::PushL(sched);
+    CActiveScheduler::Install(sched);
+
+    RSysMonSession sysmon;
+    sysmon.OpenL();
+    CleanupClosePushL(sysmon);
+
+    CStartupProperties* props = CStartupProperties::NewLC(_L("tsysmon_app_dontrendezvous.exe"), KNullDesC);
+    props->SetMonitored(ETrue);
+    props->SetStartupType(EStartProcess);
+    props->SetStartMethod(EWaitForStart);
+    props->SetNoOfRetries(1);
+    props->SetTimeout(0);
+    props->SetRecoveryParams(ERestartOS, 0);
+
+    RProcess slave1;
+    slave1.Create(_L("tsysmon_app_dontrendezvous.exe"), _L("5000"));
+    CleanupClosePushL(slave1);
+
+    TSsmState currenState;
+    // Connects to RSsmStateAwareSession in order to enquire about the current system state
+    TInt err = iSsmStateAwareSess.Connect(KSM2UiServicesDomain3);
+    TEST(err == KErrNone);
+    if (err == KErrNone)
+        RDebug::Print(_L("\nStateTran Test: RSsmStateAwareSession sess Connect %d\n"), err);
+    else
+        {
+        RDebug::Print(_L("\nStateTran Test: RSsmStateAwareSession sess Connect Failed\n")); 
+        User::Leave(err);
+        }
+
+    currenState = iSsmStateAwareSess.State();
+
+    RDebug::Print(_L("\nStateTran Test: Current System State is %d\n"), currenState.MainState());
+    TEST(currenState.MainState() == ESsmNormal);
+
+    iAsyncCallbackForStopScheduler =  new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
+    TCallBack stopSchedulerCallback(StopScheduler, this);
+    iAsyncCallbackForStopScheduler->Set(stopSchedulerCallback);
+
+    // call the callback function which keeps looping until the system state gets into fail state.
+    iAsyncCallbackForStopScheduler->CallBack();
+
+    // Notifier used to get the notification when system gets to fail state
+    CSsmStateAwareSession* notif_for_failstate = CSsmStateAwareSession::NewLC(KSM2UiServicesDomain3);
+    notif_for_failstate->AddSubscriberL(*this);
+
+    TRequestStatus status;
+    slave1.Rendezvous(status);
+    slave1.Resume();
+    User::WaitForRequest(status);
+    // Register with SysMon
+    sysmon.MonitorL(*props, slave1);
+    slave1.Terminate(KErrNone);
+
+    sched->Start();
+
+    CleanupStack::PopAndDestroy(5);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_steposrestarttest.h	Tue Aug 31 16:29:05 2010 +0300
@@ -0,0 +1,60 @@
+// 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:
+//
+
+/**
+ @file
+ @test
+ @internalComponent - Internal Symbian test code
+*/
+ 
+#ifndef __TSYSMON_STEPCRITICALNORETRIES_H__
+#define __TSYSMON_STEPCRITICALNORETRIES_H__
+
+#include "tsysmon_stepbase.h"
+#include "sysmontesthelper.h"
+#include <ssm/ssmstateawaresession.h>
+#include <s32file.h>
+
+//APPFWK-SYSMON-0004
+
+_LIT(KCTestCaseCriticalNoRetries, "CriticalNoRetries");
+_LIT(KCTestCaseRestartOS, "RestartOS");
+_LIT(KCTestCaseCriticalNoRetriesStep, "CriticalNoRetriesStep");
+_LIT(KCTestCaseRestartOSStep, "RestartOSStep");
+
+class CStepOSRestart : public CTestStepBase, public MStateChangeNotificationSubscriber
+	{
+public:
+	CStepOSRestart(const TDesC& aTestName);
+	void CallStopSchedulerL();
+	void StateChanged(TSsmState aSsmState);
+	~CStepOSRestart();
+	
+	//from CTestStep
+	TVerdict doTestStepL();
+protected:
+	RSsmStateAwareSession iSsmStateAwareSess;
+	CAsyncCallBack* iAsyncCallbackForStartTest;
+    CAsyncCallBack* iAsyncCallbackForStopScheduler;
+    
+private:
+    void TestCriticalNoRetriesL();
+    void TestRestartOSL();
+    
+private:
+    const TDesC& iTestName;
+	};
+
+#endif
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_steprestartthrottle.cpp	Thu Aug 19 11:09:10 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_steprestartthrottle.cpp	Tue Aug 31 16:29:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -71,6 +71,16 @@
 
 void CStepRestartThrottle::DoTestMonitor()
 	{
+    TInt millisecs1 =0;
+    TDateTime datetime;
+    TTime time;
+    time.HomeTime();
+    datetime = time.DateTime();
+    millisecs1 = (datetime.MicroSecond() / 1000) + 
+                (datetime.Second() * 1000) + 
+                (datetime.Minute() * 60 * 1000) +
+                (datetime.Hour() * 60 * 60 * 1000);
+                
 	//Sleep 14 seconds and then assert that the server is not yet restarted
 	INFO_PRINTF1(_L("Going to sleep for 14 seconds."));		
 	User::After(KThrottleTime - 1000000);
@@ -91,11 +101,22 @@
 	INFO_PRINTF1(_L("Waiting till the process is restarted using semaphore."));		
 	//Wait for the process to be restarted 
 	iProcStartSignalSem.Wait();
+	
+    time.HomeTime();
+    datetime = time.DateTime();
+    TInt millisecs2 = 0;
+    millisecs2 = (datetime.MicroSecond() / 1000) + 
+                (datetime.Second() * 1000) + 
+                (datetime.Minute() * 60 * 1000) +
+                (datetime.Hour() * 60 * 60 * 1000);
 		
 	//Assert that the server is running
 	INFO_PRINTF1(_L("Woke up, now the server should be restarted (sysmon KWaitTime is 15s)."));		
 	err = server.Connect();
 	TESTE(KErrNone == err, err);
+	INFO_PRINTF2(_L("Server restarted after %d ms"), (millisecs2 - millisecs1));
+	//Testing whether the server restarted after the throttle time, which is 15s
+	TEST((millisecs2 - millisecs1) >= 15000);
 	if(KErrNone == err)
 		{
 		INFO_PRINTF1(_L("Yes, asserted that server is running, going to cancel monitoring shutdown server"));