Revision: 201007
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Mar 2010 09:33:35 +0200
changeset 24 84a16765cd86
parent 6 aba6b8104af3
child 25 98b66e4fb0be
Revision: 201007 Kit: 201011
appinstaller/AppMngr2/GSSettingsPlugin/src/appmngr2gssettingsplugin.cpp
appinstaller/AppMngr2/Widget/inc/appmngr2widgetruntime.h
appinstaller/AppMngr2/Widget/src/appmngr2widgetappinfo.cpp
appinstaller/AppMngr2/src/appmngr2filerecognizer.cpp
appinstaller/AppinstUi/CenRep/keys_s60swinstalleruis.xls
appinstaller/AppinstUi/Server/Data/SWInstSvrUI_reg.rss
appinstaller/AppinstUi/Server/Src/SWInstInstallRequest.cpp
iaupdate/IAD/ui/group/iaupdate.rss
iaupdate/IAD/ui/inc/iaupdate.hrh
iaupdate/IAD/ui/inc/iaupdateprivatecrkeys.h
iaupdate/IAD/ui/inc/iaupdateroaminghandler.h
iaupdate/IAD/ui/inc/iaupdatesettingdialog.h
iaupdate/IAD/ui/inc/iaupdateuicontroller.h
iaupdate/IAD/ui/src/iaupdateroaminghandler.cpp
iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp
iaupdate/IAD/ui/src/iaupdateuicontroller.cpp
installationservices/refsoftwareappmgr/group/appmanager.mmp
installationservices/refsoftwareappmgr/group/bld.inf
installationservices/refsoftwareappmgr/group/security_referenceapplicationmanager.history.xml
installationservices/refsoftwareappmgr/group/security_referenceapplicationmanager.mrp
installationservices/refsoftwareappmgr/source/appmanager.cpp
installationservices/refsoftwareappmgr/source/command.cpp
installationservices/refsoftwareappmgr/source/command.h
installationservices/refswinstallationplugin/group/bld.inf
installationservices/refswinstallationplugin/group/security_sifrefplugin.mrp
installationservices/refswinstallationplugin/group/sifrefinstallerserver.mmp
installationservices/refswinstallationplugin/group/sifrefpkgrec.mmp
installationservices/refswinstallationplugin/group/sifrefplugin.mmp
installationservices/refswinstallationplugin/inc/sifrefbinpkgextractor.h
installationservices/refswinstallationplugin/inc/sifrefinstaller.iby
installationservices/refswinstallationplugin/inc/sifrefinstallerclient.h
installationservices/refswinstallationplugin/inc/sifrefinstallerclientserver.h
installationservices/refswinstallationplugin/inc/sifrefinstallertask.h
installationservices/refswinstallationplugin/inc/sifrefpkgparser.h
installationservices/refswinstallationplugin/inc/sifrefpkgrec.h
installationservices/refswinstallationplugin/inc/sifrefplugin.h
installationservices/refswinstallationplugin/inc/sifrefuihandler.h
installationservices/refswinstallationplugin/inc/tsifrefinstaller.iby
installationservices/refswinstallationplugin/sample/base.sifrefpkg
installationservices/refswinstallationplugin/sample/invalid.sifrefpkg
installationservices/refswinstallationplugin/sample/makebinpkg.pl
installationservices/refswinstallationplugin/sample/upgrade.sifrefpkg
installationservices/refswinstallationplugin/source/1028634f.rss
installationservices/refswinstallationplugin/source/10286351.rss
installationservices/refswinstallationplugin/source/sifrefbinpkgextractor.cpp
installationservices/refswinstallationplugin/source/sifrefinstallerclient.cpp
installationservices/refswinstallationplugin/source/sifrefinstallerserver.cpp
installationservices/refswinstallationplugin/source/sifrefinstallertask.cpp
installationservices/refswinstallationplugin/source/sifrefpkgparser.cpp
installationservices/refswinstallationplugin/source/sifrefpkgrec.cpp
installationservices/refswinstallationplugin/source/sifrefplugin.cpp
installationservices/refswinstallationplugin/source/sifrefuihandler.cpp
installationservices/refswinstallationplugin/test/scripts/data/base2.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/base3.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/fileinusetest.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid10.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid11.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid12.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid2.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid3.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid4.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid5.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid6.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid7.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid8.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/data/invalid9.sifrefpkg
installationservices/refswinstallationplugin/test/scripts/tsifrefinstaller.ini
installationservices/refswinstallationplugin/test/scripts/tsifrefinstaller.script
installationservices/swcomponentregistry/bwins/scrclientu.def
installationservices/swcomponentregistry/bwins/scrdatabaseu.def
installationservices/swcomponentregistry/bwins/scrhelperclientu.def
installationservices/swcomponentregistry/eabi/scrclientu.def
installationservices/swcomponentregistry/eabi/scrdatabaseu.def
installationservices/swcomponentregistry/eabi/scrhelperclientu.def
installationservices/swcomponentregistry/group/bld.inf
installationservices/swcomponentregistry/group/scrclient.mmp
installationservices/swcomponentregistry/group/scrdatabase.mmp
installationservices/swcomponentregistry/group/scrserver.mmp
installationservices/swcomponentregistry/group/security_softwarecomponentregistry.history.xml
installationservices/swcomponentregistry/group/security_softwarecomponentregistry.mrp
installationservices/swcomponentregistry/inc/scr.h
installationservices/swcomponentregistry/inc/scr.iby
installationservices/swcomponentregistry/inc/scrcommon.h
installationservices/swcomponentregistry/inc/scrcommon.inl
installationservices/swcomponentregistry/inc/screntries.h
installationservices/swcomponentregistry/inc/screntries_internal.h
installationservices/swcomponentregistry/inc/tscr.iby
installationservices/swcomponentregistry/inc_private/scrclient.inl
installationservices/swcomponentregistry/inc_private/scrdatabase.h
installationservices/swcomponentregistry/inc_private/scrdbschema.sql
installationservices/swcomponentregistry/inc_private/scrrequestimpl.h
installationservices/swcomponentregistry/inc_private/scrserver.h
installationservices/swcomponentregistry/inc_private/scrsubsession.h
installationservices/swcomponentregistry/scrhelper/group/scrhelperclient.mmp
installationservices/swcomponentregistry/scrhelper/group/scrhelperserver.mmp
installationservices/swcomponentregistry/scrhelper/inc/scrhelperclient.h
installationservices/swcomponentregistry/scrhelper/inc/scrhelpercommon.h
installationservices/swcomponentregistry/scrhelper/inc/scrhelpercommon.inl
installationservices/swcomponentregistry/scrhelper/inc/scrhelperserver.h
installationservices/swcomponentregistry/scrhelper/source/scrhelperclient.cpp
installationservices/swcomponentregistry/scrhelper/source/scrhelperserver.cpp
installationservices/swcomponentregistry/scrhelper/source/scrhelperstartup.cpp
installationservices/swcomponentregistry/source/client/scrclient.cpp
installationservices/swcomponentregistry/source/client/scrclientsubsessions.cpp
installationservices/swcomponentregistry/source/client/screntries.cpp
installationservices/swcomponentregistry/source/database/scrdatabase.cpp
installationservices/swcomponentregistry/source/server/scrrequestimpl.cpp
installationservices/swcomponentregistry/source/server/scrserver.cpp
installationservices/swcomponentregistry/source/server/scrsession.cpp
installationservices/swcomponentregistry/source/server/scrsubsession.cpp
installationservices/swcomponentregistry/source/server/startup.cpp
installationservices/swcomponentregistry/test/group/tscr.mmp
installationservices/swcomponentregistry/test/group/tscraccessor.mmp
installationservices/swcomponentregistry/test/group/tscrdatalayer.mmp
installationservices/swcomponentregistry/test/testdb/scr.db
installationservices/swcomponentregistry/test/tscr/inc/appmanagersteps.h
installationservices/swcomponentregistry/test/tscr/inc/componentmanagementsteps.h
installationservices/swcomponentregistry/test/tscr/inc/componentquerysteps.h
installationservices/swcomponentregistry/test/tscr/inc/deletescrdbstep.h
installationservices/swcomponentregistry/test/tscr/inc/installloghistorysteps.h
installationservices/swcomponentregistry/test/tscr/inc/pluginmanagementsteps.h
installationservices/swcomponentregistry/test/tscr/inc/sifsteps.h
installationservices/swcomponentregistry/test/tscr/inc/subsessionsteps.h
installationservices/swcomponentregistry/test/tscr/inc/transactionmanagementsteps.h
installationservices/swcomponentregistry/test/tscr/inc/tscrdefs.h
installationservices/swcomponentregistry/test/tscr/inc/tscrserver.h
installationservices/swcomponentregistry/test/tscr/inc/tscrstep.h
installationservices/swcomponentregistry/test/tscr/scripts/data/scr-differentbuildnumber.db
installationservices/swcomponentregistry/test/tscr/scripts/data/scr-newermajordbversion.db
installationservices/swcomponentregistry/test/tscr/scripts/data/scr-newerminordbversion.db
installationservices/swcomponentregistry/test/tscr/scripts/data/scr-noentriesinversiontable.db
installationservices/swcomponentregistry/test/tscr/scripts/data/scr-noversiontable.db
installationservices/swcomponentregistry/test/tscr/scripts/data/scr-oldermajordbversion.db
installationservices/swcomponentregistry/test/tscr/scripts/data/scr-olderminordbversion.db
installationservices/swcomponentregistry/test/tscr/scripts/data/scr_large.db
installationservices/swcomponentregistry/test/tscr/scripts/data/scr_medium.db
installationservices/swcomponentregistry/test/tscr/scripts/data/scr_small.db
installationservices/swcomponentregistry/test/tscr/scripts/performance_log_parser.pl
installationservices/swcomponentregistry/test/tscr/scripts/tscr.ini
installationservices/swcomponentregistry/test/tscr/scripts/tscr.script
installationservices/swcomponentregistry/test/tscr/scripts/tscr_api.script
installationservices/swcomponentregistry/test/tscr/scripts/tscr_oom.script
installationservices/swcomponentregistry/test/tscr/scripts/tscr_performance.ini
installationservices/swcomponentregistry/test/tscr/scripts/tscr_performance.script
installationservices/swcomponentregistry/test/tscr/scripts/tscr_performance_cases.script
installationservices/swcomponentregistry/test/tscr/scripts/tscr_versioning.script
installationservices/swcomponentregistry/test/tscr/source/appmanagersteps.cpp
installationservices/swcomponentregistry/test/tscr/source/componentmanagementsteps.cpp
installationservices/swcomponentregistry/test/tscr/source/componentquerysteps.cpp
installationservices/swcomponentregistry/test/tscr/source/deletescrdbstep.cpp
installationservices/swcomponentregistry/test/tscr/source/installloghistorysteps.cpp
installationservices/swcomponentregistry/test/tscr/source/pluginmanagementsteps.cpp
installationservices/swcomponentregistry/test/tscr/source/sifsteps.cpp
installationservices/swcomponentregistry/test/tscr/source/subsessionsteps.cpp
installationservices/swcomponentregistry/test/tscr/source/transactionmanagementsteps.cpp
installationservices/swcomponentregistry/test/tscr/source/tscrserver.cpp
installationservices/swcomponentregistry/test/tscr/source/tscrstep.cpp
installationservices/swcomponentregistry/test/tscraccessor/inc/tscraccessor_client.h
installationservices/swcomponentregistry/test/tscraccessor/inc/tscraccessor_common.h
installationservices/swcomponentregistry/test/tscraccessor/inc/tscraccessor_server_session.h
installationservices/swcomponentregistry/test/tscraccessor/source/tscraccessor_client.cpp
installationservices/swcomponentregistry/test/tscraccessor/source/tscraccessor_server_session.cpp
installationservices/swcomponentregistry/test/tscraccessor/source/tscraccessor_startup.cpp
installationservices/swcomponentregistry/test/tscrdatalayer/inc/datalayersteps.h
installationservices/swcomponentregistry/test/tscrdatalayer/inc/tscrdatalayerserver.h
installationservices/swcomponentregistry/test/tscrdatalayer/scripts/data/nondb.db
installationservices/swcomponentregistry/test/tscrdatalayer/scripts/tscr_datalayer.script
installationservices/swcomponentregistry/test/tscrdatalayer/scripts/tscr_datalayer_oom.ini
installationservices/swcomponentregistry/test/tscrdatalayer/scripts/tscr_datalayer_oom.script
installationservices/swcomponentregistry/test/tscrdatalayer/source/datalayersteps.cpp
installationservices/swcomponentregistry/test/tscrdatalayer/source/tscrdatalayer.cpp
installationservices/swi/source/backuprestore/backupsession.cpp
installationservices/swi/test/tbackuprestore/scripts/batchfiles/tbackuprestore_post.bat
installationservices/swi/test/tbackuprestore/scripts/ini
installationservices/swi/test/tbackuprestore/scripts/ini_armv5
installationservices/swi/test/tbackuprestore/scripts/tbackuprestore.script
installationservices/swi/test/tbackuprestore/scripts/tbackuprestore_armv5.script
installationservices/swi/test/tbackuprestore/scripts/tbackuprestore_second_part.script
installationservices/swi/test/tbackuprestore/scripts/tbackuprestore_second_part_post.bat
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_01.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_02.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_03.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_04.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_05.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/pu_int_nr_option_01.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_01.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_04.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_06.pkg
installationservices/swi/test/testexes/prepareexes.pl
installationservices/swiconfig/usif/scr/scr.db
installationservices/swinstallationfw/bwins/siftransportu.def
installationservices/swinstallationfw/bwins/sifu.def
installationservices/swinstallationfw/bwins/sifutilsu.def
installationservices/swinstallationfw/common/inc/usifcommon.h
installationservices/swinstallationfw/common/inc/usiferror.h
installationservices/swinstallationfw/common/inc/usiflog.h
installationservices/swinstallationfw/eabi/siftransportu.def
installationservices/swinstallationfw/eabi/sifu.def
installationservices/swinstallationfw/eabi/sifutilsu.def
installationservices/swinstallationfw/engineering/Doxyfile.cfg
installationservices/swinstallationfw/engineering/builddox.bat
installationservices/swinstallationfw/engineering/readme.txt
installationservices/swinstallationfw/examples/refnativeplugin/group/refnativeplugin.mmp
installationservices/swinstallationfw/examples/refnativeplugin/source/10285BC3.rss
installationservices/swinstallationfw/examples/refnativeplugin/source/refnativeplugin.cpp
installationservices/swinstallationfw/examples/refnativeplugin/source/refnativeplugin.h
installationservices/swinstallationfw/group/bld.inf
installationservices/swinstallationfw/group/security_softwareinstallframework.history.xml
installationservices/swinstallationfw/group/security_softwareinstallframework.mrp
installationservices/swinstallationfw/group/sif.mmp
installationservices/swinstallationfw/group/siflauncher.mmp
installationservices/swinstallationfw/group/sifserver.mmp
installationservices/swinstallationfw/group/siftransport.mmp
installationservices/swinstallationfw/group/sifutils.mmp
installationservices/swinstallationfw/inc/sif.h
installationservices/swinstallationfw/inc/sif.iby
installationservices/swinstallationfw/inc/sifcommon.h
installationservices/swinstallationfw/inc/sifplugin.h
installationservices/swinstallationfw/inc/sifservercommon.h
installationservices/swinstallationfw/inc/sifservertask.h
installationservices/swinstallationfw/inc/siftransportclient.h
installationservices/swinstallationfw/inc/siftransportcommon.h
installationservices/swinstallationfw/inc/siftransportserver.h
installationservices/swinstallationfw/inc/siftransportserverstartup.h
installationservices/swinstallationfw/inc/siftransporttask.h
installationservices/swinstallationfw/inc/sifutils.h
installationservices/swinstallationfw/inc/tsif.iby
installationservices/swinstallationfw/source/sif.cpp
installationservices/swinstallationfw/source/sifcommon.cpp
installationservices/swinstallationfw/source/siflauncher.cpp
installationservices/swinstallationfw/source/sifserverstartup.cpp
installationservices/swinstallationfw/source/sifservertask.cpp
installationservices/swinstallationfw/source/siftransportclient.cpp
installationservices/swinstallationfw/source/siftransportrequest.cpp
installationservices/swinstallationfw/source/siftransportserver.cpp
installationservices/swinstallationfw/source/siftransportsession.cpp
installationservices/swinstallationfw/source/siftransporttask.cpp
installationservices/swinstallationfw/source/sifutils.cpp
installationservices/swinstallationfw/test/group/cleansiflauncher.bat
installationservices/swinstallationfw/test/group/cleansiflauncher.makefile
installationservices/swinstallationfw/test/group/tsiflauncher.mmp
installationservices/swinstallationfw/test/plugins/nonnativeplugin/group/testnonnativeplugin.mmp
installationservices/swinstallationfw/test/plugins/nonnativeplugin/group/testnonnativeplugin2.mmp
installationservices/swinstallationfw/test/plugins/nonnativeplugin/source/10285BD1.rss
installationservices/swinstallationfw/test/plugins/nonnativeplugin/source/102866EE.rss
installationservices/swinstallationfw/test/plugins/nonnativeplugin/source/testnonnativeplugin.cpp
installationservices/swinstallationfw/test/plugins/nonnativeplugin/source/testnonnativeplugin.h
installationservices/swinstallationfw/test/scripts/data/noninstallable.gif
installationservices/swinstallationfw/test/scripts/data/test.nonnativepackage.txt
installationservices/swinstallationfw/test/scripts/data/test.overflow.txt
installationservices/swinstallationfw/test/scripts/tsif.ini
installationservices/swinstallationfw/test/scripts/tsif.script
installationservices/swinstallationfw/test/scripts/tsifoom.script
installationservices/swinstallationfw/test/securitytests/bwins/usifsecuritytests-tcbu.def
installationservices/swinstallationfw/test/securitytests/bwins/usifsecuritytestsu.def
installationservices/swinstallationfw/test/securitytests/eabi/usifsecuritytests-tcbu.def
installationservices/swinstallationfw/test/securitytests/eabi/usifsecuritytestsu.def
installationservices/swinstallationfw/test/securitytests/group/usifsecuritytests-tcb.mmp
installationservices/swinstallationfw/test/securitytests/group/usifsecuritytests.mmp
installationservices/swinstallationfw/test/securitytests/inc/scrallfiles.h
installationservices/swinstallationfw/test/securitytests/inc/scrcomponentspecific.h
installationservices/swinstallationfw/test/securitytests/inc/scrfilepathprotection.h
installationservices/swinstallationfw/test/securitytests/inc/scrnonrestricted.h
installationservices/swinstallationfw/test/securitytests/inc/scrpluginmanagement.h
installationservices/swinstallationfw/test/securitytests/inc/scrreaduserdata.h
installationservices/swinstallationfw/test/securitytests/inc/scrwritedevicedata.h
installationservices/swinstallationfw/test/securitytests/inc/sifsecuritycontext.h
installationservices/swinstallationfw/test/securitytests/inc/stsfilepathprotection.h
installationservices/swinstallationfw/test/securitytests/inc/stsrollbackalltest.h
installationservices/swinstallationfw/test/securitytests/scripts/usifsecuritytests.ini
installationservices/swinstallationfw/test/securitytests/scripts/usifsecuritytests.script
installationservices/swinstallationfw/test/securitytests/source/scrallfiles.cpp
installationservices/swinstallationfw/test/securitytests/source/scrcomponentspecific.cpp
installationservices/swinstallationfw/test/securitytests/source/scrfilepathprotection.cpp
installationservices/swinstallationfw/test/securitytests/source/scrnonrestricted.cpp
installationservices/swinstallationfw/test/securitytests/source/scrpluginmanagement.cpp
installationservices/swinstallationfw/test/securitytests/source/scrreaduserdata.cpp
installationservices/swinstallationfw/test/securitytests/source/scrwritedevicedata.cpp
installationservices/swinstallationfw/test/securitytests/source/sifsecuritycontext.cpp
installationservices/swinstallationfw/test/securitytests/source/stsfilepathprotection.cpp
installationservices/swinstallationfw/test/securitytests/source/stsrollbackalltest.cpp
installationservices/swinstallationfw/test/securitytests/source/usifsecuritytests-tcb.cpp
installationservices/swinstallationfw/test/securitytests/source/usifsecuritytests.cpp
installationservices/swinstallationfw/test/siflauncherconfig/siflauncher_loc.rls
installationservices/swinstallationfw/test/siflauncherconfig/siflauncher_loc.rss
installationservices/swinstallationfw/test/siflauncherconfig/siflauncher_reg.rss
installationservices/swinstallationfw/test/tusif/group/createleesisfiles.pl
installationservices/swinstallationfw/test/tusif/group/createrefbinfiles.pl
installationservices/swinstallationfw/test/tusif/group/createsisfiles.bat
installationservices/swinstallationfw/test/tusif/group/sifintegrationtestbasepackage.mmp
installationservices/swinstallationfw/test/tusif/group/sifintegrationtestupgradepackage.mmp
installationservices/swinstallationfw/test/tusif/group/sifintegsufficientusercaps.mmp
installationservices/swinstallationfw/test/tusif/group/sifintegusercapsbasepackage.mmp
installationservices/swinstallationfw/test/tusif/group/siftest.makefile
installationservices/swinstallationfw/test/tusif/group/siftestintegrationlockfile.mmp
installationservices/swinstallationfw/test/tusif/group/tsif.mmp
installationservices/swinstallationfw/test/tusif/group/tsifpkgrec.mmp
installationservices/swinstallationfw/test/tusif/scripts/data/dummy.txt
installationservices/swinstallationfw/test/tusif/scripts/data/dummyAugmentation.txt
installationservices/swinstallationfw/test/tusif/scripts/data/dummyUpgrade.txt
installationservices/swinstallationfw/test/tusif/scripts/data/embeddedbasewithusercapsexe.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/embeddedinnerbase1.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/embeddedinnerbase11.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/embeddedinnerbase2.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/embeddingbasewithexe.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/embeddingbasewithtextandinnerwithexe.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/embeddingouterbase.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/emptynameandvendor.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifcomponentinfointegpu.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifcomponentinfointegration.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifcomponentinfointegsp.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestbase.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestextensionindifferentcase.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestinvalidupgrade.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestmultiplefiles.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestnocaps.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestupgrade.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestwithonlydll.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifintegsufficientusercaps.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifintegusercapsbase.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifselfsignedwithprotecteduid.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifswtypebase.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/sifswtypeupgrade.pkg
installationservices/swinstallationfw/test/tusif/scripts/data/swtype.dtd
installationservices/swinstallationfw/test/tusif/scripts/data/swtypereginfo.xml
installationservices/swinstallationfw/test/tusif/scripts/data/test.siftestpkg
installationservices/swinstallationfw/test/tusif/scripts/tsifintegration.ini
installationservices/swinstallationfw/test/tusif/scripts/tsifintegration.script
installationservices/swinstallationfw/test/tusif/scripts/tsifswtypeintegration.ini
installationservices/swinstallationfw/test/tusif/scripts/tsifswtypeintegration.script
installationservices/swinstallationfw/test/tusif/source/102866F0.rss
installationservices/swinstallationfw/test/tusif/source/sifintegrationtestbasepackage.cpp
installationservices/swinstallationfw/test/tusif/source/sifintegrationtestpackage.h
installationservices/swinstallationfw/test/tusif/source/sifintegrationtestupgradepackage.cpp
installationservices/swinstallationfw/test/tusif/source/sifintegsufficientusercaps.cpp
installationservices/swinstallationfw/test/tusif/source/sifintegusercapsbasepackage.cpp
installationservices/swinstallationfw/test/tusif/source/testexes/siftestintegrationlockfile.cpp
installationservices/swinstallationfw/test/tusif/source/tsifcommonunitteststep.cpp
installationservices/swinstallationfw/test/tusif/source/tsifcommonunitteststep.h
installationservices/swinstallationfw/test/tusif/source/tsifcommonverificationstep.cpp
installationservices/swinstallationfw/test/tusif/source/tsifcommonverificationstep.h
installationservices/swinstallationfw/test/tusif/source/tsifgenericbrowserinstallstep.cpp
installationservices/swinstallationfw/test/tusif/source/tsifgenericbrowserinstallstep.h
installationservices/swinstallationfw/test/tusif/source/tsifoperationstep.cpp
installationservices/swinstallationfw/test/tusif/source/tsifoperationstep.h
installationservices/swinstallationfw/test/tusif/source/tsifpkgrec.cpp
installationservices/swinstallationfw/test/tusif/source/tsifpkgrec.h
installationservices/swinstallationfw/test/tusif/source/tsifsuitedefs.h
installationservices/swinstallationfw/test/tusif/source/tsifsuiteserver.cpp
installationservices/swinstallationfw/test/tusif/source/tsifsuiteserver.h
installationservices/swinstallationfw/test/tusif/source/tsifsuitestepbase.cpp
installationservices/swinstallationfw/test/tusif/source/tsifsuitestepbase.h
installationservices/swtransactionservices/bwins/stsclientu.def
installationservices/swtransactionservices/eabi/stsclientu.def
installationservices/swtransactionservices/group/bld.inf
installationservices/swtransactionservices/group/security_softwaretransactionservices.history.xml
installationservices/swtransactionservices/group/security_softwaretransactionservices.mrp
installationservices/swtransactionservices/group/stsclient.mmp
installationservices/swtransactionservices/group/stsserver.mmp
installationservices/swtransactionservices/inc/sts.h
installationservices/swtransactionservices/inc/sts.iby
installationservices/swtransactionservices/inc/stsdefs.h
installationservices/swtransactionservices/inc/stsrecovery.h
installationservices/swtransactionservices/inc/tsts.iby
installationservices/swtransactionservices/inc_private/integrityservices.h
installationservices/swtransactionservices/inc_private/integrityservicesevent.h
installationservices/swtransactionservices/inc_private/integritytree.h
installationservices/swtransactionservices/inc_private/journal.h
installationservices/swtransactionservices/inc_private/journalfile.h
installationservices/swtransactionservices/inc_private/operationfunctions.h
installationservices/swtransactionservices/inc_private/stscommon.h
installationservices/swtransactionservices/inc_private/stsserver.h
installationservices/swtransactionservices/inc_private/stsserversession.h
installationservices/swtransactionservices/inc_private/transactionwrapper.h
installationservices/swtransactionservices/source/client/sts.cpp
installationservices/swtransactionservices/source/client/stsrecovery.cpp
installationservices/swtransactionservices/source/server/integrityservices.cpp
installationservices/swtransactionservices/source/server/integritytree.cpp
installationservices/swtransactionservices/source/server/journal.cpp
installationservices/swtransactionservices/source/server/journalfile.cpp
installationservices/swtransactionservices/source/server/operationfunctions.cpp
installationservices/swtransactionservices/source/server/startup.cpp
installationservices/swtransactionservices/source/server/stsserver.cpp
installationservices/swtransactionservices/source/server/stsserversession.cpp
installationservices/swtransactionservices/source/server/transactionwrapper.cpp
installationservices/swtransactionservices/test/group/tsts.mmp
installationservices/swtransactionservices/test/group/tstsrollbackall.mmp
installationservices/swtransactionservices/test/inc/tststestsuiteserver.h
installationservices/swtransactionservices/test/inc/tststestsuiteserverrollbackall.h
installationservices/swtransactionservices/test/inc/tststestsuitestep.h
installationservices/swtransactionservices/test/inc/tststestsuitestepcommon.h
installationservices/swtransactionservices/test/inc/tststestsuitesteprollbackall.h
installationservices/swtransactionservices/test/scripts/batchfiles/tsts_bootuptimerecovery.bat
installationservices/swtransactionservices/test/scripts/data/rollbackall/sec-sts-rollbackall-0002/b6da9d45.drv
installationservices/swtransactionservices/test/scripts/data/rollbackall/sec-sts-rollbackall-0002/b6da9d45.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8.drv
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8/0.bak
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8/1.bak
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/e_drive/61f7bbf8.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/e_drive/61f7bbf8/0.bak
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/e_drive/61f7bbf8/1.bak
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3.drv
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3/0.bak
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3/1.bak
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/e_drive/b06c42f3.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/e_drive/b06c42f3/0.bak
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/e_drive/b06c42f3/1.bak
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase3/c_drive/bd596810.drv
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase3/c_drive/bd596810.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase3/e_drive/bd596810.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase4/c_drive/cb94c9f0.drv
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase4/c_drive/cb94c9f0.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase4/e_drive/cb94c9f0.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase5/c_drive/b630b6f0.drv
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase5/c_drive/b630b6f0.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase5/e_drive/b630b6f0.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase6/c_drive/be3d42f0.drv
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase6/c_drive/be3d42f0.log
installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase6/e_drive/be3d42f0.log
installationservices/swtransactionservices/test/scripts/data/tstsdummy.txt
installationservices/swtransactionservices/test/scripts/tsts.ini
installationservices/swtransactionservices/test/scripts/tsts.script
installationservices/swtransactionservices/test/scripts/tsts_bootuptimerecovery.script
installationservices/swtransactionservices/test/scripts/tsts_rollbackall.script
installationservices/swtransactionservices/test/source/tststestsuiteserver.cpp
installationservices/swtransactionservices/test/source/tststestsuiteserverrollbackall.cpp
installationservices/swtransactionservices/test/source/tststestsuitestep.cpp
installationservices/swtransactionservices/test/source/tststestsuitesteprollbackall.cpp
installationservices/swtransactionservices/test/tintegrityservices/bwins/tstsintegrityservicesclientu.def
installationservices/swtransactionservices/test/tintegrityservices/eabi/tstsintegrityservicesclientu.def
installationservices/swtransactionservices/test/tintegrityservices/group/tstsintegrityservicesclient.mmp
installationservices/swtransactionservices/test/tintegrityservices/group/tstsintegrityservicesserver.mmp
installationservices/swtransactionservices/test/tintegrityservices/inc/tintegrityservicesclientserver.h
installationservices/swtransactionservices/test/tintegrityservices/inc/tintegrityservicescommon.h
installationservices/swtransactionservices/test/tintegrityservices/inc/tintegrityservicesserver.h
installationservices/swtransactionservices/test/tintegrityservices/inc/tintegrityservicesstep.h
installationservices/swtransactionservices/test/tintegrityservices/scripts/data/unittests/testjournal.log
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailAddingNewFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailAddingTempFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailBackupFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailDeletingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailInstallComplete.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailNone.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailTempFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailAddingNewFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailAddingTempFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailBackupFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailDeletingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailInstallComplete.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailNone.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailTempFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/oom.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v1/EFailDeletingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v1/EFailNewFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v1/EFailNone.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v1/EFailOldFilesRestored.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v1/EFailTempFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v2/EFailDeletingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v2/EFailNewFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v2/EFailNone.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v2/EFailOldFilesRestored.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v2/EFailTempFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailDeletingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailNewFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailNone.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailOldFilesRestored.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailRestoringFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailTempFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailDeletingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailNewFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailNone.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailOldFilesRestored.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailRestoringFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailTempFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailDeletingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailNewFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailNone.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailOldFilesRestored.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailRestoringFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailTempFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/tintegrityservices.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/tintegrityservices.script
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailBackupFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailDeletingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailInstallComplete.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailNone.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailRemovingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailTempFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailBackupFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailDeletingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailInstallComplete.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailNone.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailRemovingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailTempFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailAddingNewFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailAddingTempFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailBackupFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailDeletingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailInstallComplete.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailNone.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailRemovingFile.ini
installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailTempFilesRemoved.ini
installationservices/swtransactionservices/test/tintegrityservices/source/e32main.cpp
installationservices/swtransactionservices/test/tintegrityservices/source/tintegrityservicesclientserver.cpp
installationservices/swtransactionservices/test/tintegrityservices/source/tintegrityservicesserver.cpp
installationservices/swtransactionservices/test/tintegrityservices/source/tintegrityservicesstep.cpp
ncdengine/engine/accesspointmanager/inc/catalogsaccesspointmanagerimpl.h
ncdengine/engine/accesspointmanager/inc/catalogsaccesspointmap.h
ncdengine/engine/accesspointmanager/inc/catalogsaccesspointsettings.h
ncdengine/engine/accesspointmanager/src/catalogsaccesspointmanagerimpl.cpp
ncdengine/engine/accesspointmanager/src/catalogsaccesspointsettings.cpp
ncdengine/engine/group/catalogsdebug.mmp
ncdengine/engine/group/catalogsengine.mmp
ncdengine/engine/group/catalogsproxy.mmp
ncdengine/engine/group/catalogsundertaker.mmp
ncdengine/engine/group/ncddevicemgmt.mmp
ncdengine/engine/group/ncdutils.mmp
ncdengine/engine/transport/inc/catalogshttpdownload.h
ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h
ncdengine/engine/transport/inc/catalogshttptypes.h
ncdengine/engine/transport/src/catalogshttpstack.cpp
ncdengine/provider/deviceinteraction/inc/ncdinstallationserviceimpl.h
ncdengine/provider/deviceinteraction/src/ncddeviceserviceimpl.cpp
ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp
ncdengine/provider/server/src/ncdloadnodeoperationimpl.cpp
ncdengine/provider/server/src/ncdloadrootnodeoperationimpl.cpp
ncdengine/provider/server/src/ncdsearchoperationimpl.cpp
secureswitools/swisistools/group/bld.inf
secureswitools/swisistools/source/interpretsis/commandparser.cpp
secureswitools/swisistools/source/interpretsislib/installer.cpp
secureswitools/swisistools/source/interpretsislib/installer.h
secureswitools/swisistools/source/interpretsislib/parameterlist.h
secureswitools/swisistools/source/interpretsislib/sisfile.cpp
secureswitools/swisistools/source/interpretsislib/sisfile.h
secureswitools/swisistools/source/interpretsislib/sisregistry.cpp
secureswitools/swisistools/source/interpretsislib/sisregistryobject.cpp
secureswitools/swisistools/source/interpretsislib/sisregistryobject.h
secureswitools/swisistools/test/tinterpretsisinteg/data/int_nr_option_01_stub.sis
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-01.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-01_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-02.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-02_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-03.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-03_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-04.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-04_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-05.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-05_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-06.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-06_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-07.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-07_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-08.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-08_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-09.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-09_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-10.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-10_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-11.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-11_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-12.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-12_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-13.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-13_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-14.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-14_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-15.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-15_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-16.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-16_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-17.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-17_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-18.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-18_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-19.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-19_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-20.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-20_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-21.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-21_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-22.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-22_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-23.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-23_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-24.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-24_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-25.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-25_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-26.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-26_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-27.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-27_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-28.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-28_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-29.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-29_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-30.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-30_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-31.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-31_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-32.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-32_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-33.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-33_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-34.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-34_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-35.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-35_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-36.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-36_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-37.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-37_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-38.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-38_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-39.bat
secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-39_db.bat
secureswitools/swisistools/test/tinterpretsisinteg/parameters_file/int_nr_option_02.txt
secureswitools/swisistools/test/tinterpretsisinteg/parameters_file/int_nr_option_02_db.txt
secureswitools/swisistools/test/tinterpretsisinteg/parameters_file/int_nr_option_04.txt
secureswitools/swisistools/test/tinterpretsisinteg/parameters_file/int_nr_option_38.txt
secureswitools/swisistools/test/tinterpretsisinteg/scripts/ini.ini
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-01.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-02.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-03.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-05.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-06.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-07.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-08.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-09.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-10.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-11.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-12.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-13.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-14.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-15.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-16.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-17.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-18.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-19.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-20.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-21.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-22.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-23.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-24.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-25.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-26.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-27.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-28.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-29.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-30.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-31.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-32.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-33.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-34.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-35.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-36.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-37.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-38.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-39.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/tintsisi003.script
secureswitools/swisistools/test/tinterpretsisinteg/testdataf006/privatefolderdef.pkg
secureswitools/swisistools/test/tinterpretsisinteg/testdatainc124436/inc124436.pkg
secureswitools/swisistools/test/tinterpretsisinteg/testlist.xml
secureswitools/swisistools/test/tinterpretsisinteg/testlistdb.xml
--- a/appinstaller/AppMngr2/GSSettingsPlugin/src/appmngr2gssettingsplugin.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/appinstaller/AppMngr2/GSSettingsPlugin/src/appmngr2gssettingsplugin.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-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"
@@ -364,11 +364,17 @@
 
         if( aSettingIndex == EAppMngr2SettingSwInstall )
             {
-            // Install software - toggle 'Signed only' and 'All'
-            TBool allowUntrusted = EFalse;
-            repDB->Get( KSWInstallerAllowUntrusted, allowUntrusted );
-            allowUntrusted = !allowUntrusted;
-            SetPermissionL( aSettingIndex, allowUntrusted, urlText );
+            // Install software
+            itemArray = iCoeEnv->ReadDesC16ArrayResourceL(
+                    R_APPMNGR2_ALLOW_UNTRUSTED_VALUE_ARRAY );
+            repDB->Get( KSWInstallerAllowUntrusted, newIndex );
+            if( newIndex )
+                {
+                newIndex = 1;
+                }
+            dlg = new ( ELeave ) CAknRadioButtonSettingPage(
+                    R_APPMNGR2_SET_PAGE_ALLOW_UNTRUSTED,
+                    newIndex, itemArray );
             }
         else
             {
@@ -383,7 +389,7 @@
         CleanupStack::PopAndDestroy( repDB );
         CleanupStack::PushL( itemArray );
 
-        if( dlg && dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
+        if( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
             {
             SetPermissionL( aSettingIndex, newIndex, urlText );
             }
--- a/appinstaller/AppMngr2/Widget/inc/appmngr2widgetruntime.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/appinstaller/AppMngr2/Widget/inc/appmngr2widgetruntime.h	Fri Mar 19 09:33:35 2010 +0200
@@ -20,7 +20,7 @@
 #define C_APPMNGR2WIDGETRUNTIME_H
 
 #include <appmngr2runtime.h>            // CAppMngr2Runtime
-#include <widgetregistryclient.h>       // RWidgetRegistryClientSession 
+#include <WidgetRegistryClient.h>       // RWidgetRegistryClientSession 
 
 class CAppMngr2PackageInfo;
 class CAknIconArray;
--- a/appinstaller/AppMngr2/Widget/src/appmngr2widgetappinfo.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/appinstaller/AppMngr2/Widget/src/appmngr2widgetappinfo.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -20,7 +20,7 @@
 #include "appmngr2widgetruntime.h"      // KAppMngr2WidgetUid
 #include "appmngr2widgetinfoiterator.h" // CAppMngr2WidgetInfoIterator
 #include "appmngr2widget.hrh"           // Widget command IDs
-#include <widgetregistrydata.h>         // CWidgetInfo
+#include <WidgetRegistryData.h>         // CWidgetInfo
 #include <appmngr2driveutils.h>         // TAppMngr2DriveUtils
 
 
--- a/appinstaller/AppMngr2/src/appmngr2filerecognizer.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/appinstaller/AppMngr2/src/appmngr2filerecognizer.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -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"
@@ -200,10 +200,10 @@
         
         HBufC* mimeType = HBufC::NewLC( KMaxDataTypeLength );
         TPtr mimePtr( mimeType->Des() );
-        content->GetStringAttribute( ContentAccess::EMimeType, mimePtr );
-        
+        User::LeaveIfError( content->GetStringAttribute( ContentAccess::EMimeType, mimePtr ) );
+
         CAppMngr2RecognizedFile* recFile = CAppMngr2RecognizedFile::NewL( fullName, mimeType );
-        CleanupStack::Pop( mimeType );
+        CleanupStack::Pop( mimeType );		// CAppMngr2RecognizedFile takes ownership
         CleanupStack::PopAndDestroy( content );
         CleanupStack::Pop( fullName );
         
Binary file appinstaller/AppinstUi/CenRep/keys_s60swinstalleruis.xls has changed
--- a/appinstaller/AppinstUi/Server/Data/SWInstSvrUI_reg.rss	Tue Feb 02 00:20:15 2010 +0200
+++ b/appinstaller/AppinstUi/Server/Data/SWInstSvrUI_reg.rss	Fri Mar 19 09:33:35 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2006 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"
@@ -22,7 +22,7 @@
 #include "SWInstPrivateUid.h"
 
 UID2 KUidAppRegistrationResourceFile
-UID3 KSWInstSvrUid // Define your application UID here
+UID3 KSWInstSvrUid
 
 RESOURCE APP_REGISTRATION_INFO
     {
@@ -45,6 +45,7 @@
         DATATYPE { priority=EDataTypePrioritySystem; type="application/x-pip"; }
 #ifdef __WEB_WIDGETS
         , DATATYPE { priority=EDataTypePrioritySystem; type="application/x-nokia-widget"; }
+        , DATATYPE { priority=EDataTypePrioritySystem; type="application/widget"; }
 #endif
         };  
     }
--- a/appinstaller/AppinstUi/Server/Src/SWInstInstallRequest.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/appinstaller/AppinstUi/Server/Src/SWInstInstallRequest.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -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"
@@ -389,7 +389,7 @@
     {
     HBufC* tmpMIME = HBufC::NewLC( KMaxDataTypeLength );
     TPtr mimePtr( tmpMIME->Des() );            
-    aContent.GetStringAttribute( ContentAccess::EMimeType, mimePtr );
+    User::LeaveIfError( aContent.GetStringAttribute( ContentAccess::EMimeType, mimePtr ) );
     aMIME.Copy( *tmpMIME );
     CleanupStack::PopAndDestroy( tmpMIME );
     }
--- a/iaupdate/IAD/ui/group/iaupdate.rss	Tue Feb 02 00:20:15 2010 +0200
+++ b/iaupdate/IAD/ui/group/iaupdate.rss	Fri Mar 19 09:33:35 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* 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"
@@ -836,15 +836,6 @@
     }
 
 //
-// Update while roaming confirmation dialog
-//
-
-RESOURCE TBUF r_iaupdate_connect_to_server
-    {
-    buf = qtn_swupdate_connect_to_server;
-    }
-
-//
 // Automatic updates check dialog resources
 //
 
@@ -1106,13 +1097,6 @@
                      name = qtn_swupdate_automatic_update_checks;
                      setting_page_resource = r_iaupdate_auto_update_check_setting_page;
                      associated_resource = r_iaupdate_auto_update_check_texts;
-                     },
-                 AVKON_SETTING_ITEM
-                     {
-                     identifier = EIAUpdateSettingRoamingWarning;
-                     name = qtn_swupdate_roaming_warning;
-                     setting_page_resource = r_iaupdate_roaming_warning_setting_page;
-                     associated_resource = r_iaupdate_roaming_warning_texts;
                      }
                  };
 	          };
--- a/iaupdate/IAD/ui/inc/iaupdate.hrh	Tue Feb 02 00:20:15 2010 +0200
+++ b/iaupdate/IAD/ui/inc/iaupdate.hrh	Fri Mar 19 09:33:35 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 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"
@@ -52,8 +52,7 @@
 enum TIAUpdateSettingDialogItems 
     {
     EIAUpdateSettingAccessPoint = 0,
-    EIAUpdateSettingAutoUpdateCheck = 1,
-    EIAUpdateSettingRoamingWarning = 2
+    EIAUpdateSettingAutoUpdateCheck = 1
     };
 
 enum TIAUpdateSettingItemBoolean 
--- a/iaupdate/IAD/ui/inc/iaupdateprivatecrkeys.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/iaupdate/IAD/ui/inc/iaupdateprivatecrkeys.h	Fri Mar 19 09:33:35 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 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"
@@ -52,16 +52,6 @@
 **/
 const TUint32 KIAUpdateAutoUpdateCheck = 0x1;
 
-/**
-* Roaming warning, integer value.
-*
-* Possible values:
-*
-* 0 = No roaming warning
-* 1 = Roaming warning
-**/
-const TUint32 KIAUpdateRoamingWarning = 0x2;
-
 
 /**
 * Checking frequency. 
--- a/iaupdate/IAD/ui/inc/iaupdateroaminghandler.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/iaupdate/IAD/ui/inc/iaupdateroaminghandler.h	Fri Mar 19 09:33:35 2010 +0200
@@ -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"
@@ -86,12 +86,6 @@
     */
     TBool IsRoaming();
     
-    /**
-    * Shows roaming warning dialog if needed 
-    * @return True value if network access rejected because of roaming warning
-    */
-    TBool RoamingRejectionL();
-        
 
 private:
 
@@ -116,8 +110,7 @@
 	TBool iPreparing;
 	
 	TBool iPrepared;
-	
-	TBool iRoamingConnectionAccepted;
+
     };
 
 
--- a/iaupdate/IAD/ui/inc/iaupdatesettingdialog.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/iaupdate/IAD/ui/inc/iaupdatesettingdialog.h	Fri Mar 19 09:33:35 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 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,8 +50,7 @@
     enum TAttributeKeys
         {
         EAccessPoint = 0,
-        EAutoUpdateCheck,
-        ERoamingWarning
+        EAutoUpdateCheck
         };
     
 	public:
@@ -245,7 +244,6 @@
 	private:
 	    TInt iAccessPoint;
         TInt iAutoUpdateCheck;
-        TInt iRoamingWarning;
         };
 
 
--- a/iaupdate/IAD/ui/inc/iaupdateuicontroller.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/iaupdate/IAD/ui/inc/iaupdateuicontroller.h	Fri Mar 19 09:33:35 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* 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"
@@ -533,6 +533,8 @@
     void CreateSelectedNodesArrayL();
     
     TBool IAUpdateEnabledL() const;
+    
+    TBool AutomaticConnectionWhenRoamingL() const;
 
 private: // data
 
@@ -593,8 +595,6 @@
     
     CIAUpdateParameters* iParams;
     
-    TBool iUserRoamingRejection;
-    
     TBool iCancelling;
     
     TBool iFileInUseError;
--- a/iaupdate/IAD/ui/src/iaupdateroaminghandler.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/iaupdate/IAD/ui/src/iaupdateroaminghandler.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -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"
@@ -140,39 +140,7 @@
 	return iRoaming;
     }
     
-// ---------------------------------------------------------------------------
-// CIAUpdateRoamingHandler::RoamingRejectionL()
-// 
-// ---------------------------------------------------------------------------
-//    
-TBool CIAUpdateRoamingHandler::RoamingRejectionL()
-    {
-  	TBool rejected = EFalse;
-  	if ( ( iRoaming )  && ( !iRoamingConnectionAccepted ) )
-  	    {
-  		CRepository* cenrep = CRepository::NewLC( KCRUidIAUpdateSettings );
-    
-        TInt num = KErrNotFound;
-        User::LeaveIfError( cenrep->Get( KIAUpdateRoamingWarning, num ) );
-        
-        CleanupStack::PopAndDestroy( cenrep );
-        if ( num == EIAUpdateSettingValueOn ) 
-            {
-        	TInt ret = IAUpdateDialogUtil::ShowConfirmationQueryL( 
-   	                                          R_IAUPDATE_CONNECT_TO_SERVER, 
-	                                          R_AVKON_SOFTKEYS_YES_NO );
-	        if ( ret == EAknSoftkeyYes )
-	            {
-	        	iRoamingConnectionAccepted = ETrue;
-	            }
-	        else
-	            {
-	            rejected = ETrue;
-	            }
-	        }   
-  	    }
-	return rejected;
-    }
+
 
     
 // End of File  
--- a/iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 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"
@@ -425,11 +425,7 @@
     num = iList->Attribute( EAutoUpdateCheck );
     err = cenrep->Set( KIAUpdateAutoUpdateCheck, num );
     User::LeaveIfError( err );
-    
-    num = iList->Attribute( ERoamingWarning );
-    err = cenrep->Set( KIAUpdateRoamingWarning, num );
-    User::LeaveIfError( err );
-    
+           
     TUint32 ignore = KErrNone;
     User::LeaveIfError( cenrep->CommitTransaction( ignore ) );
     CleanupStack::PopAndDestroy(); // CleanupCancelTransactionPushL()
@@ -480,14 +476,6 @@
             break;
             }
 
-        case EIAUpdateSettingRoamingWarning:
-            {
-            User::LeaveIfError( cenrep->Get( KIAUpdateRoamingWarning, iRoamingWarning ) );
-            item = new (ELeave) CAknBinaryPopupSettingItem
-                               ( aSettingId, iRoamingWarning );
-            break;
-            }
-
         default:
             {
             item = new (ELeave) CAknSettingItem( aSettingId );
@@ -548,11 +536,6 @@
             ret = iAutoUpdateCheck;
             break;
             }
-        case CIAUpdateSettingDialog::ERoamingWarning:
-            {
-            ret = iRoamingWarning;
-            break;
-            }
         default:
             {
             IAUpdateDialogUtil::Panic( KErrNotSupported );
@@ -577,12 +560,6 @@
         {
         iAutoUpdateCheck = EIAUpdateSettingValueEnable;
         }
-
-    if ( iRoamingWarning != EIAUpdateSettingValueOff &&
-         iRoamingWarning != EIAUpdateSettingValueOn )
-        {
-        iRoamingWarning = EIAUpdateSettingValueOn;
-        }
     }
 
 
--- a/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* 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,6 +26,7 @@
 #include <SWInstDefs.h>
 #include <avkon.rsg>
 #include <featurecontrol.h>
+#include <cmmanager.h>
 #include <iaupdate.rsg>
 #include <iaupdateparameters.h>
 
@@ -360,19 +361,23 @@
        	    return;	
        	    }
         }
-            
-    if ( iRequestType == IAUpdateUiDefines::EShowUpdates && iRefreshed )
+    if ( iRequestType == IAUpdateUiDefines::ECheckUpdates && 
+         AllowNetworkRefreshL() && 
+         iRoamingHandler->IsRoaming() && 
+         !AutomaticConnectionWhenRoamingL() )
+        {
+        // In Silent check updates case, global setting when roaming to be automatic 
+        // Promt dialog is not allowed in the silent check
+        // error is returned that a client (backround checker) will try again later 
+        iObserver.RefreshCompleteL( EFalse, KErrAbort );
+        }  
+    else if ( iRequestType == IAUpdateUiDefines::EShowUpdates && iRefreshed )
         {
     	iFilter->FilterAndSortNodesL( iNodes, iFwNodes );
         iObserver.RefreshCompleteL( ETrue, KErrNone );
         }
     else
         {
-        if ( IsStartedByLauncher() && AllowNetworkRefreshL() )
-            {
-        	iUserRoamingRejection = iRoamingHandler->RoamingRejectionL();
-            }
-
         TInt ret( iController->Startup() );
         if ( ret == KErrAlreadyExists )   
             {
@@ -411,43 +416,39 @@
     // started.
     iController->ResetSelfUpdate();
 
-    iUserRoamingRejection = iRoamingHandler->RoamingRejectionL();
-    if ( !iUserRoamingRejection )
+    CreateSelectedNodesArrayL();
+                
+    if ( !IAUpdateUtils::SpaceAvailableInInternalDrivesL( iSelectedNodesArray ) )
         {
-        CreateSelectedNodesArrayL();
-                
-        if ( !IAUpdateUtils::SpaceAvailableInInternalDrivesL( iSelectedNodesArray ) )
+  	    HBufC* noteText = NULL;
+        noteText = StringLoader::LoadLC( R_IAUPDATE_INSUFFICIENT_MEMORY );
+        IAUpdateDialogUtil::ShowInformationQueryL( *noteText ); 
+        CleanupStack::PopAndDestroy( noteText );
+        }
+    else
+        {
+        if ( !IsStartedByLauncher() )
             {
-    	    HBufC* noteText = NULL;
-            noteText = StringLoader::LoadLC( R_IAUPDATE_INSUFFICIENT_MEMORY );
-            IAUpdateDialogUtil::ShowInformationQueryL( *noteText ); 
-            CleanupStack::PopAndDestroy( noteText );
-            }
-        else
-            {
-            if ( !IsStartedByLauncher() )
+            if ( !iStarter )
                 {
-                if ( !iStarter )
-                    {
-                    // Notice, that the ownership of the filter parameters will
-                    // remain in the filter.
-                    CIAUpdateParameters* params = iFilter->FilterParams();
-        	        iStarter = CIAUpdateStarter::NewL( params->CommandLineExecutable(), 
+                // Notice, that the ownership of the filter parameters will
+                // remain in the filter.
+                CIAUpdateParameters* params = iFilter->FilterParams();
+      	        iStarter = CIAUpdateStarter::NewL( params->CommandLineExecutable(), 
         	                                           params->CommandLineArguments() );
-                    }
                 }
-            // Inform the controller that we are now starting updates. This way the
-            // controller can handle situations as a whole and not as one item at the
-            // time.
-            iController->StartingUpdatesL();
+            }
+        // Inform the controller that we are now starting updates. This way the
+        // controller can handle situations as a whole and not as one item at the
+        // time.
+        iController->StartingUpdatesL();
             
-            iFileInUseError = EFalse;
-            // Set the node index to -1 because ContinueUpdateL increases it by one
-            // in the beginning of the function. So, we can use the ContinueUpdateL
-            // also in here.
-            iNodeIndex = -1;
-            ContinueUpdateL( EFalse );
-            }
+        iFileInUseError = EFalse;
+        // Set the node index to -1 because ContinueUpdateL increases it by one
+        // in the beginning of the function. So, we can use the ContinueUpdateL
+        // also in here.
+        iNodeIndex = -1;
+        ContinueUpdateL( EFalse );
         }
 
 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::StartUpdateL() end");
@@ -2267,7 +2268,6 @@
     if ( IsStartedByLauncher() )
         {
     	if ( !iRefreshFromNetworkDenied && 
-    	     !iUserRoamingRejection && 
     	     !RestartedFromSelfUpdate() )
     	    {
     		if ( LocalNodesExpiredL() )
@@ -2718,4 +2718,24 @@
     return enabled;        
     }
 
+// ---------------------------------------------------------------------------
+// CIAUpdateUiController::AutomaticConnectionWhenRoamingL()
+// ---------------------------------------------------------------------------
+//
+TBool CIAUpdateUiController::AutomaticConnectionWhenRoamingL() const
+    {
+    TBool automaticConnection = EFalse;
+    RCmManager cmManager;
+    cmManager.OpenLC();
+    TCmGenConnSettings genConnSettings;
+    cmManager.ReadGenConnSettingsL( genConnSettings );
+    CleanupStack::PopAndDestroy( &cmManager );
+    if ( genConnSettings.iCellularDataUsageVisitor == ECmCellularDataUsageAutomatic )
+        {
+        automaticConnection = ETrue;
+        }
+    return automaticConnection;
+    }
+
+
 // End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refsoftwareappmgr/group/appmanager.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* using relative paths for sourcepath and user includes
+*
+*/
+
+
+TARGET			refappmanager.exe
+TARGETTYPE		exe
+
+UID				0xE8000047
+VENDORID		0x70000001   
+
+// ReadUserData is required to access the list of components installed by the user
+CAPABILITY ReadUserData
+
+SOURCEPATH		../source
+SOURCE			appmanager.cpp command.cpp
+
+USERINCLUDE		../source
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib efsrv.lib bafl.lib scrclient.lib sif.lib
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refsoftwareappmgr/group/bld.inf	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* @ SIF Reference Application Manager
+*
+*/
+
+
+/**
+ @file
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_TESTEXPORTS
+
+PRJ_MMPFILES
+
+#ifndef TOOLS
+#ifndef TOOLS2
+
+../group/appmanager.mmp
+
+#endif // TOOLS2
+#endif // TOOLS
+
+PRJ_TESTMMPFILES
+
+#ifndef TOOLS
+#ifndef TOOLS2
+
+#endif // TOOLS2
+#endif // TOOLS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refsoftwareappmgr/group/security_referenceapplicationmanager.history.xml	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<relnotes name="Reference Application Manager">
+  <purpose>
+    Provides a reference implementation of Application Manager for browsing and removing installed components through the Universal Software Install Framework APIs.
+  </purpose>
+
+  <defect number="DEF131875" title="SMPSAFE MMP file updates for SWI and USIF" revision="003">
+    updated MMP files for SWI and USIF components to declare them SMPSAFE 
+  </defect>
+
+  <defect number="DEF130796" title="PREQ1269: Can set the component size negative" revision="002"> 
+	 The API wasn't changed to Uint, as this would require the DB also to support unsigned values in the relevant column, and I couldn't see an option for doing it without disrupting the schema. 
+  </defect> 
+
+  <deliverystep number="1116" name="PREQ1269: Security and Data Privacy: Universal Software Install Framework (Phase 1)" osproject="Diran" revision="001">
+	  <milestone project="GT0433" number="3.1"/>
+	  <preq number="1269" title="Universal Software Install Framework">
+		   Delivers a console based Application Manager that provides for browsing and removing installed components. These commands demonstrate basic SIF and SCR software management operations.
+	  </preq>
+  </deliverystep>
+
+</relnotes>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refsoftwareappmgr/group/security_referenceapplicationmanager.mrp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+component	security_referenceapplicationmanager
+source	\sf\mw\appinstall\installationservices\refsoftwareappmgr
+binary	\sf\mw\appinstall\installationservices\refsoftwareappmgr\group	all
+exports	\sf\mw\appinstall\installationservices\refsoftwareappmgr\group
+notes_source	\component_defs\release.src
+
+ipr T
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refsoftwareappmgr/source/appmanager.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,199 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include <usif/scr/scr.h>
+#include <e32cons.h>
+#include "command.h"
+
+using namespace Usif;
+
+_LIT(KTxtAppTitle, "Reference Application Manager\n");
+_LIT(KTxtAppVersion, "Version 1.00(0)\n");
+_LIT(KTxtCopyright, "Copyright (c) Symbian Software Ltd 2008. All rights reserved.\n");
+
+_LIT(KTxtEPOC32EX,"EXAMPLES");
+_LIT(KTxtFormatFailed,"\nFailed with leave code = %d\n");
+_LIT(KTxtPressToExit, "Press any key to exit...");
+_LIT(KTxtPressToContinue, "\nPress any key to continue...\n\n");
+
+_LIT(KTxtHelp01, "\nThe syntax of the command is incorrect. Use the following options:\n\n");
+_LIT(KTxtHelp02, "--list [--name name] [--vendor vendor] [--type type] [--removable|nonremovable]\n");
+_LIT(KTxtHelp03, "[--activated|deactivated] [--drives drivelist] [--property name value [language]]\n");
+_LIT(KTxtHelp04, "[--intproperty name value] [--file path] [--locale language]\n\n");
+
+_LIT(KTxtHelp05, "OPTIONS\n\n");
+_LIT(KTxtHelp06, "    --name NAME\n");
+_LIT(KTxtHelp07, "        lists components with name NAME\n\n");
+_LIT(KTxtHelp08, "    --vendor VENDOR\n");
+_LIT(KTxtHelp09, "        lists components with vendor VENDOR\n\n");
+_LIT(KTxtHelp10, "    --type TYPE\n");
+_LIT(KTxtHelp11, "        lists components with software type TYPE\n\n");
+_LIT(KTxtHelp12, "    --removable\n");
+_LIT(KTxtHelp13, "        lists removable components only\n\n");
+_LIT(KTxtHelp16, "    --activated\n");
+_LIT(KTxtHelp17, "        lists components with SCOMO state Activated\n\n");
+_LIT(KTxtHelp18, "    --deactivated\n");
+_LIT(KTxtHelp19, "        lists components with SCOMO state Deactivated\n\n");
+_LIT(KTxtHelp20, "    --drives DRIVES\n");
+_LIT(KTxtHelp21, "        lists components whose files were installed to DRIVES\n\n");
+_LIT(KTxtHelp22, "    --property N V L\n");
+_LIT(KTxtHelp23, "        lists components with string property name N and value V and optional language code L, for example English=1, French=2, German=3\n\n");
+_LIT(KTxtHelp26, "    --locale LANGUAGE\n");
+_LIT(KTxtHelp27, "        defines language LANGUAGE to be used to find the component info, for example English=1, French=2, German=3\n\n");
+
+_LIT(KTxtHelp30, "--delete ComponentID\n");
+_LIT(KTxtHelp31, "    deletes component with ComponentID. The ID of a component to be removed can be obtained using the 'list' command.\n\n");
+
+_LIT(KTxtHelp40, "EXAMPLES\n\n");
+_LIT(KTxtHelp41, "    refappmanager --list\n\n");
+_LIT(KTxtHelp42, "    refappmanager --list --type native\n\n");
+_LIT(KTxtHelp43, "    refappmanager --list --vendor Symbian\n\n");
+_LIT(KTxtHelp44, "    refappmanager --list --type java --drives cef --activated --locale 2\n\n");
+_LIT(KTxtHelp45, "    refappmanager --delete 6\n\n");
+
+// ==================================================================================
+
+// Start-up functions and helpers
+LOCAL_C void InitL();
+LOCAL_C void ExecCommandL(CConsoleBase& aConsole);
+LOCAL_C void DisplayHelp(CConsoleBase& aConsole);
+
+// Main function called by E32
+GLDEF_C TInt E32Main() 
+	{
+	// Get clean-up stack
+	CTrapCleanup* cleanup=CTrapCleanup::New();
+
+	__UHEAP_MARK;
+
+	// Call InitL() and catch all leaves
+	TRAPD(error,InitL());
+	__ASSERT_ALWAYS(!error,User::Panic(KTxtEPOC32EX,error));
+
+	__UHEAP_MARKEND;
+
+	// Destroy clean-up stack
+	delete cleanup;
+
+	return 0;
+    }
+
+// ==================================================================================
+
+LOCAL_C void InitL()
+	{
+	// Create console
+	CConsoleBase* console = Console::NewL(KTxtAppTitle,TSize(KConsFullScreen,KConsFullScreen));
+	CleanupStack::PushL(console);
+
+	// Call ExecCommandL() and catch all leaves
+	TRAPD(err, ExecCommandL(*console));
+	if (err == KErrArgument)
+		{
+		DisplayHelp(*console);
+		}
+	else if (err != KErrNone)
+		{
+		console->Printf(KTxtFormatFailed, err);
+		}
+
+	// Wait for any key
+	console->Printf(KTxtPressToExit);
+	console->Getch();
+
+	CleanupStack::PopAndDestroy(console);
+	}
+
+// ==================================================================================
+
+LOCAL_C void ExecCommandL(CConsoleBase& aConsole)
+	{
+	// Display info
+	aConsole.Printf(KTxtAppTitle);
+	aConsole.Printf(KTxtAppVersion);
+	aConsole.Printf(KTxtCopyright);
+
+	// Create parser
+	CCommandLineParser* parser = CCommandLineParser::NewLC();
+
+	// Instantiate and register the 'list' and 'delete' commands. If we had
+	// more commands it could be more efficient to implement a command factory
+	// in order to instantiate only a single command on demand. This example
+	// application provides only two commands and therefore the above mentioned
+	// optimisation isn't needed here.
+	parser->RegisterCommandL(*CListCommand::NewLC());
+	parser->RegisterCommandL(*CDeleteCommand::NewLC());
+
+	// Parse input and find the matching command
+	CConsoleCommand& cmd = parser->ParseL();
+
+	// Execute the command
+	cmd.ExecuteL(aConsole);
+
+	// Cleanup the parser and commands
+	CleanupStack::PopAndDestroy(3, parser);
+	}
+
+// ==================================================================================
+
+LOCAL_C void DisplayHelp(CConsoleBase& aConsole)
+	{
+	aConsole.Printf(KTxtHelp01);
+	aConsole.Printf(KTxtHelp02);
+	aConsole.Printf(KTxtHelp03);
+	aConsole.Printf(KTxtHelp04);
+	aConsole.Printf(KTxtHelp05);
+	aConsole.Printf(KTxtHelp06);
+	aConsole.Printf(KTxtHelp07);
+	aConsole.Printf(KTxtHelp08);
+	aConsole.Printf(KTxtHelp09);
+
+	aConsole.Printf(KTxtPressToContinue);
+	aConsole.Getch();
+
+	aConsole.Printf(KTxtHelp10);
+	aConsole.Printf(KTxtHelp11);
+	aConsole.Printf(KTxtHelp12);
+	aConsole.Printf(KTxtHelp13);
+	aConsole.Printf(KTxtHelp16);
+	aConsole.Printf(KTxtHelp17);
+	aConsole.Printf(KTxtHelp18);
+	aConsole.Printf(KTxtHelp19);
+	aConsole.Printf(KTxtHelp20);
+	aConsole.Printf(KTxtHelp21);
+
+	aConsole.Printf(KTxtPressToContinue);
+	aConsole.Getch();
+
+	aConsole.Printf(KTxtHelp22);
+	aConsole.Printf(KTxtHelp23);
+	aConsole.Printf(KTxtHelp26);
+	aConsole.Printf(KTxtHelp27);
+	aConsole.Printf(KTxtHelp30);
+	aConsole.Printf(KTxtHelp31);
+
+	aConsole.Printf(KTxtPressToContinue);
+	aConsole.Getch();
+
+	aConsole.Printf(KTxtHelp40);
+	aConsole.Printf(KTxtHelp41);
+	aConsole.Printf(KTxtHelp42);
+	aConsole.Printf(KTxtHelp43);
+	aConsole.Printf(KTxtHelp44);
+	aConsole.Printf(KTxtHelp45);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refsoftwareappmgr/source/command.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,439 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include <usif/scr/scr.h>
+#include <usif/sif/sif.h>
+#include <e32cons.h>
+#include "command.h"
+
+using namespace Usif;
+
+_LIT(KTxtOptionPrefix, "--");
+_LIT(KTxtDeleteCommand, "delete");
+_LIT(KTxtListCommand, "list");
+_LIT(KTxtListOptName, "name");
+_LIT(KTxtListOptVendor, "vendor");
+_LIT(KTxtListOptType, "type");
+_LIT(KTxtListOptActivated, "activated");
+_LIT(KTxtListOptDeactivated, "deactivated");
+_LIT(KTxtListOptRemovable, "removable");
+_LIT(KTxtListOptProperty, "property");
+_LIT(KTxtListOptIntProperty, "intproperty");
+_LIT(KTxtListOptDrives, "drives");
+_LIT(KTxtListOptLocale, "locale");
+_LIT(KTxtActivated, "Activated");
+_LIT(KTxtDeactivated, "Deactivated");
+_LIT(KTxtPressToContinue, "\nPress any key to continue...");
+_LIT(KTxtSifConnectionFailure, "\nFailed to connect to the SIF server\n");
+_LIT(KTxtDeleting, "Deleting...\n");
+
+// ==================================================================================
+
+CConsoleCommand::CConsoleCommand()
+	{
+	}
+
+CConsoleCommand::~CConsoleCommand()
+	{
+	}
+
+// ==================================================================================
+
+CListCommand* CListCommand::NewLC()
+	{
+
+	CListCommand* self = new (ELeave) CListCommand;
+	CleanupStack::PushL(self);
+	self->iFilter = CComponentFilter::NewL();
+	return self;
+	}
+
+CListCommand::CListCommand(): iLocale(KUnspecifiedLocale)
+	{
+	}
+
+CListCommand::~CListCommand()
+	{
+	delete iFilter;
+	}
+
+const TDesC& CListCommand::Name()
+	{
+	return KTxtListCommand;
+	}
+
+namespace
+	{
+	// Leave if the number of values differs from aCount
+	void AssertNumValuesL(const RArray<TPtrC>& aValues, TInt aCount)
+		{
+		if (aValues.Count() != aCount)
+			{
+			User::Leave(KErrArgument);
+			}
+		}
+	}
+
+void CListCommand::OptionHandlerL(const TPtrC& aName, const RArray<TPtrC>& aValues)
+	{
+	// Configure the component query filter:
+	
+	// Component name
+	if (aName == KTxtListOptName)
+		{
+		AssertNumValuesL(aValues, 1);
+		iFilter->SetNameL(aValues[0]);
+		}
+
+	// Vendor
+	else if (aName == KTxtListOptVendor)
+		{
+		AssertNumValuesL(aValues, 1);
+		iFilter->SetVendorL(aValues[0]);
+		}
+
+	// Software type
+	else if (aName == KTxtListOptType)
+		{
+		AssertNumValuesL(aValues, 1);
+		iFilter->SetSoftwareTypeL(aValues[0]);
+		}
+
+	// SCOMO state - Activated
+	else if (aName == KTxtListOptActivated)
+		{
+		AssertNumValuesL(aValues, 0);
+
+		// The activated and deactivated options are mutually exclusive
+		if (iScomoStateSet)
+			{
+			User::Leave(KErrArgument);
+			}
+		iScomoStateSet = ETrue;
+
+		iFilter->SetScomoStateL(EActivated);
+		}
+
+	// SCOMO state - Deactivated
+	else if (aName == KTxtListOptDeactivated)
+		{
+		AssertNumValuesL(aValues, 0);
+
+		// The activated and deactivated options are mutually exclusive
+		if (iScomoStateSet)
+			{
+			User::Leave(KErrArgument);
+			}
+		iScomoStateSet = ETrue;
+
+		iFilter->SetScomoStateL(EDeactivated);
+		}
+
+	// Removable
+	else if (aName == KTxtListOptRemovable)
+		{
+		AssertNumValuesL(aValues, 0);
+		iFilter->SetRemovable(ETrue);
+		}
+
+	// String property
+	else if (aName == KTxtListOptProperty)
+		{
+		const TInt numValues = aValues.Count();
+		if (numValues < 2 || numValues > 3)
+			{
+			User::Leave(KErrArgument);
+			}
+
+		// Convert language from string to int if specified
+		TInt language = KUnspecifiedLocale;
+		if (numValues == 3)
+			{
+			TLex lex(aValues[2]);
+			if (lex.Val(language) != KErrNone || language < ELangEnglish || language >= ELangMaximum)
+				{
+				User::Leave(KErrArgument);
+				}
+			}
+
+		// Add the property to the filter
+		iFilter->AddPropertyL(aValues[0], aValues[1], static_cast<TLanguage>(language));
+		}
+
+	// Integer property
+	else if (aName == KTxtListOptIntProperty)
+		{
+		AssertNumValuesL(aValues, 2);
+		TLex lex(aValues[1]);
+		TInt64 val;
+		if (lex.Val(val) != KErrNone)
+			{
+			User::Leave(KErrArgument);
+			}
+		iFilter->AddPropertyL(aValues[0], val);
+		}
+
+	// Drives
+	else if (aName == KTxtListOptDrives)
+		{
+ 	 	AssertNumValuesL(aValues, 1);
+ 	 	TPtrC drives = aValues[0];
+ 	 	TDriveList driveList;
+ 	 	driveList.FillZ(KMaxDrives);
+ 	 	for (TInt i=0; i<drives.Length(); ++i)
+ 	 	   	{
+ 	 	  	TChar driveLetter = static_cast<TChar>(drives[i]);
+ 	 	   	TInt driveNumber = 0;
+ 	 	   	User::LeaveIfError(RFs::CharToDrive(driveLetter, driveNumber));
+ 	 	   	driveList[driveNumber] = ETrue;
+ 	 	   	}
+ 	 	iFilter->SetInstalledDrivesL(driveList);
+		}
+
+	// Locale
+	else if (aName == KTxtListOptLocale)
+		{
+		AssertNumValuesL(aValues, 1);
+		TLex lex(aValues[0]);
+		TInt val;
+		if (lex.Val(val) != KErrNone || val < ELangEnglish || val >= ELangNone)
+			{
+			User::Leave(KErrArgument);
+			}
+		iLocale = static_cast<TLanguage>(val);
+		}
+	
+	// Unknown
+	else
+		{
+		User::Leave(KErrArgument);
+		}
+	}
+
+void CListCommand::ExecuteL(CConsoleBase& aConsole)
+	{
+	// Connect to the SCR server
+	RSoftwareComponentRegistry scr;
+	TInt err = scr.Connect();
+	if (err != KErrNone)
+		{
+		aConsole.Printf(_L("\nFailed to connect to the SCR server"));
+		User::Leave(err);
+		}
+	CleanupClosePushL(scr);
+
+	// Create an SCR view
+	RSoftwareComponentRegistryView scrView;
+	scrView.OpenViewL(scr, iFilter);
+	CleanupClosePushL(scrView);
+
+	// Iterate over the matching components
+	CComponentEntry* entry = CComponentEntry::NewLC();
+	TBool first(ETrue);
+	while (scrView.NextComponentL(*entry, iLocale))
+		{
+		if (first)
+			{
+			first = EFalse;
+			}
+		else
+			{
+			aConsole.Printf(KTxtPressToContinue);
+			aConsole.Getch();
+			aConsole.ClearScreen();
+			}
+
+		aConsole.Printf(_L("\n============= Component Info =============\n"));
+		aConsole.Printf(_L("\nComponent ID     : %d"), entry->ComponentId());
+		aConsole.Printf(_L("\nComponent name   : %S"), &entry->Name());
+		aConsole.Printf(_L("\nVendor name      : %S"), &entry->Vendor());
+		aConsole.Printf(_L("\nSoftware type    : %S"), &entry->SoftwareType());
+		aConsole.Printf(_L("\nSCOMO state      : %S"), entry->ScomoState() == EActivated ? &KTxtActivated : &KTxtDeactivated );
+		aConsole.Printf(_L("\nComponent size   : %d"), entry->ComponentSize());
+		aConsole.Printf(_L("\nInstalled drives : %S"), &entry->InstalledDrives());
+		aConsole.Printf(_L("\nVersion          : %S"), &entry->Version());
+		aConsole.Printf(_L("\n\n=========================================\n"));
+		}
+
+	// Disconnect from the SCR server and cleanup the entry
+	CleanupStack::PopAndDestroy(3, &scr);
+	}
+
+// ==================================================================================
+
+CDeleteCommand* CDeleteCommand::NewLC()
+	{
+	CDeleteCommand* self = new (ELeave) CDeleteCommand;
+	CleanupStack::PushL(self);
+	return self;
+	}
+
+CDeleteCommand::CDeleteCommand(): iComponentId(EInvalidComponentId)
+	{
+	}
+
+CDeleteCommand::~CDeleteCommand()
+	{
+	}
+
+const TDesC& CDeleteCommand::Name()
+	{
+	return KTxtDeleteCommand;
+	}
+
+void CDeleteCommand::OptionHandlerL(const TPtrC& aName, const RArray<TPtrC>& aValues)
+	{
+	// The delete command takes only the id of a component
+	if (aName.Length() || aValues.Count() != 1)
+		{
+		User::Leave(KErrArgument);
+		}
+
+	// Convert the id of the component from string to int
+	TLex lex(aValues[0]);
+	if (lex.Val(iComponentId) != KErrNone)
+		{
+		User::Leave(KErrArgument);
+		}
+	}
+
+void CDeleteCommand::ExecuteL(CConsoleBase& aConsole)
+	{
+	// Connect to the SIF server
+	RSoftwareInstall sif;
+	TInt err = sif.Connect();
+	if (err != KErrNone)
+		{
+		aConsole.Printf(KTxtSifConnectionFailure);
+		User::Leave(err);
+		}
+	CleanupClosePushL(sif);
+
+	// Delete the component
+	TRequestStatus status;
+	sif.Uninstall(iComponentId, status);
+	aConsole.Printf(KTxtDeleting);
+	User::WaitForRequest(status);
+	if (status.Int() != KErrNone)
+		{
+		User::Leave(status.Int());
+		}
+
+	// Disconnect from the SIF server
+	CleanupStack::PopAndDestroy(&sif);
+	}
+
+// ==================================================================================
+
+CCommandLineParser* CCommandLineParser::NewLC()
+	{
+	CCommandLineParser* self = new (ELeave) CCommandLineParser;
+	CleanupStack::PushL(self);
+	self->iCmdLineArgs = CCommandLineArguments::NewL();
+	return self;
+	}
+
+CCommandLineParser::CCommandLineParser()
+	{
+	}
+
+CCommandLineParser::~CCommandLineParser()
+	{
+	delete iCmdLineArgs;
+	iCommands.Close();
+	}
+	
+void CCommandLineParser::RegisterCommandL(CConsoleCommand& aCommand)
+	{
+	iCommands.Append(&aCommand);
+	}
+
+CConsoleCommand& CCommandLineParser::ParseL()
+	{
+	const TInt numArgs = iCmdLineArgs->Count();
+
+	// There must be at least two arguments: the name of the program and the name of a command
+	if (numArgs <= 1)
+		{
+		User::Leave(KErrArgument);
+		}
+
+	// Extract the name of the command
+	TPtrC arg0 = iCmdLineArgs->Arg(1);
+	if (arg0.Left(KTxtOptionPrefix.iTypeLength) != KTxtOptionPrefix)
+		{
+		User::Leave(KErrArgument);
+		}
+	TPtrC cmdName = arg0.Mid(KTxtOptionPrefix.iTypeLength);
+	
+	// Look for the command in iCommands
+	CConsoleCommand* cmd = NULL;
+	for (TInt i=0; i<iCommands.Count(); ++i)
+		{
+		if (cmdName == iCommands[i]->Name())
+			{
+			cmd = iCommands[i];
+			}
+		}
+	if (cmd == NULL)
+		{
+		User::Leave(KErrArgument);
+		}
+
+	// Iterate over the command's options and build pairs of optName and optValues
+	TPtrC optName;
+	RArray<TPtrC> optValues;
+	CleanupClosePushL(optValues);
+	for (TInt i=2; i<numArgs; ++i)
+		{
+		TPtrC arg = iCmdLineArgs->Arg(i);
+		// Option name
+		if (arg.Left(KTxtOptionPrefix.iTypeLength) == KTxtOptionPrefix)
+			{
+			// Process the previous option
+			if (optName.Length())
+				{
+				cmd->OptionHandlerL(optName, optValues);
+				}
+
+			// Set new option
+			optName.Set(arg.Mid(KTxtOptionPrefix.iTypeLength));
+			if (optName.Length() == 0)
+				{
+				User::Leave(KErrArgument);
+				}
+			optValues.Reset();
+			}
+		else
+			{
+			// Store the option's value
+			optValues.AppendL(arg);
+			}
+		}
+
+	// Process the last option
+	if (optName.Length() || optValues.Count())
+		{
+		cmd->OptionHandlerL(optName, optValues);
+		}
+
+	CleanupStack::PopAndDestroy(&optValues);
+
+	// Return the current command
+	return *cmd;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refsoftwareappmgr/source/command.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,157 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines a parser and console commands for the reference Application Manager
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ exampleCode
+*/
+
+#ifndef COMMAND_H
+#define COMAMND_H
+
+#include <e32base.h>
+#include <f32file.h>
+#include <bacline.h>
+
+namespace Usif
+	{
+	class CComponentFilter;
+
+	/**
+	The CConsoleCommand class defines a pure virtual interface for console commands.
+	Each software management operation provided by the Reference Application Manager
+	must implement this interface.
+	*/
+	class CConsoleCommand: public CBase
+		{
+	public:
+		/**
+		Returns the name of the command. The CCommandLineParser class uses this method
+		to find an appropriate command object whilst parsing the console input.
+		*/
+		virtual const TDesC& Name() = 0;
+
+		/**
+		CCommandLineParser uses this method to hand over the recognition of command's options
+		to an appropriate command object.
+		
+		@param aName The name of an option.
+		@param aValues The values of option's parameters.
+		*/
+		virtual void OptionHandlerL(const TPtrC& aName, const RArray<TPtrC>& aValues) = 0;
+
+		/**
+		CCommandLineParser uses this method to execute a command.
+		
+		@param aConsole The console the command writes its output to.
+		*/
+		virtual void ExecuteL(CConsoleBase& aConsole) = 0;
+
+		virtual ~CConsoleCommand();
+
+	protected:
+		CConsoleCommand();
+		CConsoleCommand(const CConsoleCommand&);
+		CConsoleCommand& operator=(const CConsoleCommand&);
+		};
+
+	/**
+	A 'list' command. It displays to the user a list of installed software components.
+	Please @see appmanager.cpp for the list of supported filtering options.
+	*/
+	class CListCommand: public CConsoleCommand
+		{
+	public:
+		static CListCommand* NewLC();
+
+		// Implement CConsoleCommand
+		virtual const TDesC& Name();
+		virtual void OptionHandlerL(const TPtrC& aName, const RArray<TPtrC>& aValues);
+		virtual void ExecuteL(CConsoleBase& aConsole);
+		virtual ~CListCommand();
+
+	private:
+		CListCommand();
+		CComponentFilter* iFilter;
+		TLanguage iLocale;
+		TBool iScomoStateSet;
+		};
+
+	/**
+	A 'delete' command. It deletes a component specified by id from the system. The id of a component
+	to be deleted can be retrieved with the aid of the 'list' command.
+	*/
+	class CDeleteCommand: public CConsoleCommand
+		{
+	public:
+		static CDeleteCommand* NewLC();
+
+		// Implement CConsoleCommand
+		virtual const TDesC& Name();
+		virtual void OptionHandlerL(const TPtrC& aName, const RArray<TPtrC>& aValues);
+		virtual void ExecuteL(CConsoleBase& aConsole);
+		virtual ~CDeleteCommand();
+
+	private:
+		CDeleteCommand();
+		
+		enum { EInvalidComponentId = -1 };
+		TInt iComponentId;
+		};
+
+	/**
+	A user input parser. The Reference Application Manager uses this class to recognize
+	and execute console commands entred by the user. A command must be registered with
+	the RegisterCommandL() method so the parser may use it.
+	The parser uses the CCommandLineArguments class to read user input from the console.
+	*/
+	class CCommandLineParser: public CBase
+		{
+	public:
+		/**
+		Creates a new instance of the Parser.
+		*/
+		static CCommandLineParser* NewLC();
+
+		/**
+		Registers a command to the parser.
+		
+		@param aCommand A command to be registered.
+		*/
+		void RegisterCommandL(CConsoleCommand& aCommand);
+
+		/**
+		Parses user input from the console and returns a command that has been found.
+		*/
+		CConsoleCommand& ParseL();
+
+		virtual ~CCommandLineParser();
+
+	private:
+		CCommandLineParser();
+		CCommandLineParser(const CCommandLineParser&);
+		CCommandLineParser& operator=(const CCommandLineParser&);
+
+		CCommandLineArguments* iCmdLineArgs;
+		RPointerArray<CConsoleCommand> iCommands;
+		};
+	}
+
+#endif //  COMAMND_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/group/bld.inf	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,60 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* @ SIF Reference Installer
+*
+*/
+
+
+/**
+ @file
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+// ROMKIT includes
+../inc/sifrefinstaller.iby				/epoc32/rom/include/sifrefinstaller.iby
+
+PRJ_TESTEXPORTS
+
+// TEF test scripts
+../test/scripts/tsifrefinstaller.ini				z:/tusif/tsifrefinstaller/tsifrefinstaller.ini
+../test/scripts/tsifrefinstaller.script				z:/tusif/tsifrefinstaller/tsifrefinstaller.script
+
+// ROMKIT includes
+../inc/tsifrefinstaller.iby				/epoc32/rom/include/tsifrefinstaller.iby
+
+PRJ_MMPFILES
+
+#ifndef TOOLS
+#ifndef TOOLS2
+
+../group/sifrefpkgrec.mmp
+../group/sifrefplugin.mmp
+../group/sifrefinstallerserver.mmp
+
+#endif // TOOLS2
+#endif // TOOLS
+
+PRJ_TESTMMPFILES
+
+#ifndef TOOLS
+#ifndef TOOLS2
+
+#endif // TOOLS2
+#endif // TOOLS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/group/security_sifrefplugin.mrp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,8 @@
+component	security_sifrefplugin
+source	\sf\mw\appinstall\installationservices\refswinstallationplugin\
+binary	\sf\mw\appinstall\installationservices\refswinstallationplugin\group	all
+exports	\sf\mw\appinstall\installationservices\refswinstallationplugin\group
+notes_source	\component_defs\release.src
+
+ipr T
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/group/sifrefinstallerserver.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,41 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET				sifrefinstallerserver.exe
+TARGETTYPE			exe
+
+CAPABILITY			ProtServ ReadUserData
+
+VENDORID			0x70000001
+
+UID					0x0 0x1028634E
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+USERINCLUDE			../inc
+USERINCLUDE			../../swinstallationfw/common/inc
+SOURCEPATH			../source
+SOURCE				sifrefinstallerserver.cpp
+SOURCE				sifrefinstallertask.cpp
+SOURCE				sifrefpkgparser.cpp
+SOURCE				sifrefbinpkgextractor.cpp
+SOURCE				sifrefuihandler.cpp
+
+LIBRARY				estor.lib efsrv.lib euser.lib ecom.lib apgrfx.lib apmime.lib
+LIBRARY				scrclient.lib stsclient.lib sif.lib siftransport.lib
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/group/sifrefpkgrec.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Mime type recogniser for SIF reference package
+*
+*/
+
+
+/**
+ @file
+*/
+
+TARGET			sifrefpkgrec.dll
+CAPABILITY		TrustedUI ProtServ
+
+TARGETTYPE		PLUGIN
+UID				0x10009D8D 0x10286351
+VENDORID 		0x70000001
+
+SOURCEPATH		../source
+
+SOURCE			sifrefpkgrec.cpp
+START RESOURCE	10286351.rss
+TARGET			sifrefpkgrec.rsc
+END
+
+USERINCLUDE		../inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib apmime.lib efsrv.lib
+
+START WINS
+BASEADDRESS		0x44700000
+END
+
+START MARM
+END
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/group/sifrefplugin.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Project specification file for a SIF non-native reference plugin
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+TARGET				sifrefplugin.dll
+TARGETTYPE			PLUGIN
+
+UID 0x10009D8D 0x1028634F
+
+
+CAPABILITY			ProtServ TrustedUI ReadUserData
+
+SOURCEPATH			../source
+SOURCE				sifrefplugin.cpp
+SOURCE				sifrefinstallerclient.cpp
+
+USERINCLUDE			../inc
+USERINCLUDE			../../swinstallationfw/common/inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+START RESOURCE 1028634f.rss
+	TARGET sifrefplugin.rsc
+END
+
+LIBRARY euser.lib efsrv.lib
+LIBRARY sif.lib siftransport.lib
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/inc/sifrefbinpkgextractor.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,129 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines a class responsible for extracting files from a compound package.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ exampleCode
+*/
+
+#ifndef SIFREFBINPKGEXTRACTOR_H
+#define SIFREFBINPKGEXTRACTOR_H
+
+#include <e32base.h>
+#include <f32file.h>
+#include <bacline.h>
+#include <usif/sts/sts.h>
+#include <usif/sts/sts.h>
+#include <usif/sif/sifcommon.h>
+
+namespace Usif
+	{
+	namespace SifRefBinPkgExtractor
+		{
+	
+		/**
+		CAuxNode is an auxiliary node class used for the processing of reference embedded packages
+		without implementing a walk-tree algorithm. The BuildPkgTreeL() function takes a list of CAuxNode
+		objects as an argument and fills it with extracted packages.
+		*/
+		class CAuxNode : public CBase
+			{
+		public:
+			/**
+			Creates an instance of the CAuxNode object.
+			*/
+			static CAuxNode* NewLC(const TDesC& aFileName, TBool aForeign, CAuxNode& aParent);
+			static CAuxNode* NewLC(const RFile& aFile, TBool aForeign, CAuxNode& aParent);
+			/**
+			Destructor.
+			*/
+			virtual ~CAuxNode();
+
+			/**
+			Returns the name of the extracted package associated with this auxiliary node.
+			*/
+			const TDesC& FileNameL() const { return *iFileName; }
+
+			/**
+			Checks if the extracted package associated with this node it a root component.
+			*/
+			TBool Root() const { return iParent == NULL; }
+
+			/**
+			Checks if the extracted package associated with this node is of the reference type.
+			*/
+			TBool Foreign() const { return iForeign; }
+
+			/**
+			Associates aCompInfo with this auxiliary node.
+			*/
+			void SetCompInfoL(CComponentInfo* aCompInfo);
+
+			/**
+			Associates aNode with this auxiliary node.
+			*/
+			void SetNodeL(CComponentInfo::CNode* aNode);
+
+			/**
+			Sets the CNode object associated with this auxiliary node as a root node of aCompInfo.
+			*/
+			void SetAsRootNodeL(CComponentInfo& aCompInfo);
+
+			/**
+			Registers a child CNode object associated with this auxiliary node to its parrent.
+			This method is provided for build a tree of CComponentInfo nodes from a flat tree
+			of auxiliary nodes. After this call the auxiliary node is no longer associated with its
+			CNode object.
+			*/
+			void RegisterChildToParentL();
+			
+		private:
+			CAuxNode();
+			CAuxNode& operator=(const CAuxNode& other);
+			CAuxNode(const CAuxNode& other);
+
+			TBool iForeign;
+			HBufC* iFileName;
+			CAuxNode* iParent;
+			CComponentInfo::CNode* iNode;
+			CComponentInfo* iCompInfo;
+			};
+		
+		/**
+		Builds a tree of the files embedded in the reference binary package specified by aInFileName.
+		The paths to the extracted embedded packages are returned in aFlatTree. This flat list can be
+		simply processed asynchronously without implementing a walk-tree algorithm in the Active Object
+		context. However, it contains the information needed to build a real tree of the
+		CComponentInfo::CNode objects.
+		*/
+		void BuildPkgTreeL(RStsSession& aSts, const TDesC& aInFileName, const TDesC& aTempDir, RPointerArray<CAuxNode>& aFlatTree, CAuxNode* aParent = NULL);
+
+		/**
+		Builds a tree of the files embedded in the reference binary package specified by aInFile.
+		The paths to the extracted embedded packages are returned in aFlatTree. This flat list can be
+		simply processed asynchronously without implementing a walk-tree algorithm in the Active Object
+		context. However, it contains the information needed to build a real tree of the
+		CComponentInfo::CNode objects.
+		*/
+		void BuildPkgTreeL(RStsSession& aSts, RFile& aInFile, const TDesC& aTempDir, RPointerArray<CAuxNode>& aFlatTree, CAuxNode* aParent = NULL);
+		}
+	}
+
+#endif //  SIFREFBINPKGEXTRACTOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/inc/sifrefinstaller.iby	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,32 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef SIFREFINSTALLER_IBY
+#define SIFREFINSTALLER_IBY
+
+define ZDRIVE \epoc32\data\Z
+
+REM SIF Reference Installer
+
+ECOM_PLUGIN(sifrefpkgrec.dll,10286351.rsc)
+ECOM_PLUGIN(sifrefplugin.dll,1028634f.rsc)
+
+file=ABI_DIR\BUILD_DIR\sifrefinstallerserver.exe	\sys\bin\sifrefinstallerserver.exe
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/inc/sifrefinstallerclient.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,165 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* siftransportclient.h
+* This file defines the client side of the Reference Installer.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ exampleCode
+*/
+
+#ifndef SIFREFINSTALLERCLIENT_H
+#define SIFREFINSTALLERCLIENT_H
+
+#include <usif/sif/siftransportclient.h>
+
+namespace Usif
+	{
+	/**
+	The client side of the Reference Installer. This class uses the SIF Transport to send
+	software management requests to the Reference Installer Server that resides in a separate
+	process. The Reference SIF Plug-in is a client of the Reference Installer Server so it
+	uses this class to connect to the Server process and send SIF requests .
+	 */
+	class RSifRefInstallerClient
+		{
+	public:
+		RSifRefInstallerClient();
+
+		/**
+		Connects a client to the Reference Installer Server.
+		 
+		@return	Symbian OS error code where KErrNone indicates
+				success and any other value indicates failure.
+		*/
+		TInt Connect();
+
+		/**
+		Disconnects a client from the Reference Installer Server.
+		*/
+		void Close();
+
+		/**
+		Returns the details of a component to be installed by file name
+		
+		@param aFileName, The file name of a component to be queried
+		@param aComponentInfo On return, contains the details of a component
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		void GetComponentInfo(const TDesC& aFileName, CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+
+		/**
+		Returns the details of a component to be installed by file handle
+		
+		@param aFileHandle, The file handle of a component to be queried
+		@param aComponentInfo On return, contains the details of a component
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		void GetComponentInfo(RFile& aFileHandle, CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+
+		/**
+		Installs a component by file name
+		
+		@param aFileName The file name of a component to be installed
+		@param aArguments The array of opaque params for the Reference Installer Server.
+		An empty array may be passed. The following param is defined for the "SCOMO
+		Install Inactive" operation:
+		Name: InstallInactive, Type: Int, Value: ETrue
+		@param aResults The array of opaque params returned from the Reference Installer
+		Server.
+		The following return param is defined for the id of an installed component:
+		Name: ComponentId, Type: Int
+		For packages containing embedded components, the returned param contains
+		the id of the last/most embedded component.
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		void Install(const TDesC& aFileName, const COpaqueNamedParams& aArguments,
+								COpaqueNamedParams& aResults, TRequestStatus& aStatus);
+
+		/**
+		Installs a component by file handle
+		
+		@param aFileHandle The file handle of a component to be installed
+		@param aArguments The array of opaque params for the Reference Installer Server.
+		An empty array may be passed.  The following param is defined for the "SCOMO
+		Install Inactive" operation:
+		Name: InstallInactive, Type: Int, Value: ETrue
+		@param aResults The array of opaque params returned from the Reference Installer
+		Server.
+		The following return param is defined for the id of an installed component:
+		Name: ComponentId, Type: Int
+		For packages containing embedded components, the returned param contains
+		the id of the last/most embedded component.
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		void Install(RFile& aFileHandle, const COpaqueNamedParams& aArguments,
+								COpaqueNamedParams& aResults, TRequestStatus& aStatus);
+
+		/**
+		Uninstalls a component
+		
+		@param aComponentId The id of a component to be uninstalled
+		@param aArguments The array of opaque params for the Reference Installer
+		Server. An empty array may be passed.
+		@param aResults The array of opaque results returned from a SIF plug-in.
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		void Uninstall(TComponentId aComponentId, const COpaqueNamedParams& aArguments,
+								COpaqueNamedParams& aResults, TRequestStatus& aStatus);
+
+		/**
+		Activates a component
+		
+		@param aComponentId The id of a component to be activated
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		void Activate(TComponentId aComponentId, TRequestStatus& aStatus);
+
+		/**
+		Deactivates a component
+		
+		@param aComponentId The id of a component to be deactivated
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		void Deactivate(TComponentId aComponentId, TRequestStatus& aStatus);
+
+		/**
+		Cancels an ongoing asynchronous request
+		
+		This is a synchronous call. When it returns the original asynchronous call is completed.
+		*/
+		void CancelOperation();
+
+	private:
+		RSifRefInstallerClient(const RSifRefInstallerClient&);
+		RSifRefInstallerClient& operator=(const RSifRefInstallerClient&);
+
+		RSifTransportClient iTransporter;
+		};
+
+	} // namespace Usif
+
+#endif // SIFREFINSTALLERCLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/inc/sifrefinstallerclientserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,58 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines constants for the Refrence Installer client/server layer.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ exampleCode
+*/
+
+#ifndef SIFREFINSTALLERCLIENTSERVER_H
+#define SIFREFINSTALLERCLIENTSERVER_H
+
+#include <e32uid.h>
+
+namespace Usif
+	{
+	/**
+	The name of the Reference Installer Server.
+	*/
+	_LIT(KSifRefInstallerServerName,"!SifRefInstallerServer");
+
+	/**
+	The version of the Reference Installer Server.
+	*/
+	const TInt KSifRefServerVerMajor = 1;	///< SIF Reference Installer Server version major component.
+	const TInt KSifRefServerVerMinor = 0;	///< SIF Reference Installer Server version minor component.
+	const TInt KSifRefServerVerBuild = 0;	///< SIF Reference Installer Server version build number.
+
+	/**
+	Returns the version of the Reference Installer Server as a TVersion object.
+
+	This function is defined because there is no literal constructor for TVersion.
+	*/
+	TVersion Version()
+		{
+		TVersion v(KSifRefServerVerMajor, KSifRefServerVerMinor, KSifRefServerVerBuild);
+		return v;
+		}
+
+	} // End of namespace Usif
+
+#endif	// #ifndef SIFREFINSTALLERCLIENTSERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/inc/sifrefinstallertask.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,281 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines tasks for the Reference Installer. These tasks implement the CSifTransportTask
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ exampleCode
+ interface. Please @see siftransporttask.h for details of this interface.
+*/
+
+#ifndef SIFREFINSTALLERTASK_H
+#define SIFREFINSTALLERTASK_H
+
+#include <usif/scr/scr.h>
+#include <usif/sts/sts.h>
+#include <usif/sif/sif.h>
+#include <usif/sif/siftransporttask.h>
+#include "sifrefbinpkgextractor.h"
+#include "sifrefpkgparser.h"
+
+namespace Usif
+	{
+
+	/**
+	The MInstallerUIHandler class defines an interface for UI callbacks. The Reference
+	Installer tasks uses a concrete implementation of this interface to interact with the user.
+	
+	This interface defines four arbitrary chosen callbacks. A real installer may define
+	its own interface when these callbacks aren't sufficient.
+	*/
+	class MInstallerUIHandler
+		{
+	public:
+		/**
+		Gets called when an installer needs a confirmation dialog to be displayed to the user.
+		*/
+		virtual TBool ConfirmationUIHandler(const TDesC& aQuestion) = 0;
+
+		/**
+		Gets called when an installer needs an error description to be displayed to the user.
+		*/
+		virtual void ErrorDescriptionUIHandler(const TDesC& aDescription) = 0;
+		};
+
+	/**
+	A factory function. The Reference Installer Server uses this function to instantiate a UI handler object.
+	*/
+	typedef MInstallerUIHandler* (*TInstallerUIHandlerFactory)();
+
+// ===========================================================================================================
+
+	/**
+	An auxiliary data structure used by the Reference Installer tasks for SCR search results.
+	*/
+	struct TComponentSearchData
+		{
+		const TDesC* iName;
+		const TDesC* iVendor;
+		TVersionName iVersion;
+		TScomoState iScomoState;
+		TInstallStatus iInstallStatus;
+		TComponentId iComponentId;
+		};
+
+// ===========================================================================================================
+
+	/**
+	A Reference Installer task that implements the 'GetComponentInfo' SIF request.
+	*/
+	class CSifRefGetComponentInfoTask : public CSifTransportTask
+		{
+	public:
+		static CSifRefGetComponentInfoTask* NewL(TTransportTaskParams& aParams);
+		virtual ~CSifRefGetComponentInfoTask();
+
+	protected:
+		virtual TBool ExecuteImplL();
+
+	private:
+		CSifRefGetComponentInfoTask(TTransportTaskParams& aParams);
+
+		// GetComponentInfo steps
+		void ExtractEmbeddedPkgsL();
+		TInt ParsePkgFileL();
+		void CheckAndSetComponentInfoL();
+		TInt CreateComponentInfoNodeL();
+		void SetComponentInfoL();
+
+		// Installer's tools
+		RSoftwareComponentRegistry iScr;
+		RStsSession iSts; // used for temporary files
+		CSifRefPkgParser* iParser;
+
+		// Interstate data
+		TComponentSearchData iCompSearchData;
+
+		// Embedded components extracted from a compound package
+		RCPointerArray<SifRefBinPkgExtractor::CAuxNode> iEmbeddedComponents;
+		TInt iCurrentComponent;
+
+		// Stuff needed for processing packages of different types
+		RSoftwareInstall iSif;
+		TBool iSifRequestInProgress;
+		CComponentInfo* iComponentInfo;
+		RFs iFs;
+		RFile iFile;
+
+		// The GetComponentInfo task consists of the following steps
+		enum TGetComponentInfoSteps
+			{
+			EExtractEmbeddedPkgs = 1,
+			EParsePkgFile,
+			EFindComponent,
+			ECreateComponentInfoNode,
+			ESetComponentInfo
+			};
+		TInt iStep;
+		};
+
+// ===========================================================================================================
+
+	/**
+	A Reference Installer task that implements the 'Install' SIF request.
+	*/
+	class CSifRefInstallTask : public CSifTransportTask
+		{
+	public:
+		static CSifRefInstallTask* NewL(TTransportTaskParams& aParams, TInstallerUIHandlerFactory aUiHandlerFactory);
+		virtual ~CSifRefInstallTask();
+
+	protected:
+		virtual TBool ExecuteImplL();
+
+	private:
+		CSifRefInstallTask(TTransportTaskParams& aParams);
+		void ConstructL(TInstallerUIHandlerFactory aUiHandlerFactory);
+
+		// Installation steps
+		void ExtractEmbeddedPkgsL();
+		TInt ParsePkgFileImplL();
+		TInt ParsePkgFileL();
+		void LaunchForeignInstallL();
+		void FinishForeignInstallL();
+		TInt FindAndCheckComponentL();
+		void GetInstalledFileListL();
+		TBool UnregisterAndDeleteFileL();
+		void RegisterComponentL();
+		TBool CopyFileL();
+		TInt SetScomoStateL();
+		void CommitL();
+
+		// Installer's tools
+		RSoftwareComponentRegistry iScr;
+		RStsSession iSts;
+		CSifRefPkgParser* iParser;
+		TBool iScrTransaction;
+
+		// UI interaction
+		MInstallerUIHandler* iUiHandler;
+
+		// Interstate data
+		TComponentSearchData iCompSearchData;
+		RSoftwareComponentRegistryFilesList iFileList;
+
+		// Embedded components extracted from a compound package
+		RCPointerArray<SifRefBinPkgExtractor::CAuxNode> iEmbeddedComponents;
+		TInt iCurrentComponent;
+
+		// Stuff needed for processing packages of different types
+		RSoftwareInstall iSif;
+		COpaqueNamedParams* iOpaqueArguments;
+		COpaqueNamedParams* iOpaqueResults;
+		TBool iSifRequestInProgress;
+		RFs iFs;
+		RFile iFile;
+
+		// The Install task consists of the following steps
+		enum TInstallSteps
+			{
+			EExtractEmbeddedPkgs = 1,
+			EParsePkgFile,
+			ELaunchForeignInstall,
+			EFinishForeignInstall,
+			EFindAndCheckComponent,
+			EGetInstalledFileList,
+			EUnregisterAndDeleteFile,
+			ERegisterComponent,
+			ECopyFile,
+			ESetScomoState,
+			ECommit
+			};
+		TInt iStep;
+
+		// File index for the state machine in the ECopyFile step
+		TInt iCopyFileIndex;
+		// Component size will be calculated and set in the SCR
+		TInt64 iComponentSize; 
+		};
+
+// ===========================================================================================================
+
+	/**
+	A Reference Installer task that implements the 'Uninstall' SIF request.
+	*/
+	class CSifRefUninstallTask : public CSifTransportTask
+		{
+	public:
+		static CSifRefUninstallTask* NewL(TTransportTaskParams& aParams, TInstallerUIHandlerFactory aUiHandlerFactory);
+		virtual ~CSifRefUninstallTask();
+
+	protected:
+		virtual TBool ExecuteImplL();
+
+	private:
+		CSifRefUninstallTask(TTransportTaskParams& aParams);
+		void ConstructL(TInstallerUIHandlerFactory aUiHandlerFactory);
+
+		void GetFileListL();
+		TBool UnregisterAndDeleteFileL();
+		void CommitL();
+
+		// UI interaction
+		MInstallerUIHandler* iUiHandler;
+
+		// Installer's tools
+		RSoftwareComponentRegistry iScr;
+		RStsSession iSts;
+		
+		// Interstate data
+		RSoftwareComponentRegistryFilesList iFileList;
+
+		// The Uninstall task consists of the following steps
+		enum TUninstallSteps
+			{
+			EGetFileList = 1,
+			EUnregisterAndDeleteFile,
+			ECommit
+			};
+		TInt iStep;
+		};
+
+// ===========================================================================================================
+
+	/**
+	A Reference Installer task that implements the 'Activate' and 'Deactivate' SIF requests.
+	*/
+	class CSifRefActivateDeactivateTask : public CSifTransportTask
+		{
+	public:
+		CSifRefActivateDeactivateTask(TTransportTaskParams& aParams, TScomoState aScomoState);
+		virtual ~CSifRefActivateDeactivateTask();
+
+	protected:
+		virtual TBool ExecuteImplL();
+
+	private:
+		// Installer's tools
+		RSoftwareComponentRegistry iScr;
+
+		TScomoState iScomoState;
+		};
+
+	} // namespace Usif
+
+#endif // SIFREFINSTALLERTASK_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/inc/sifrefpkgparser.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,117 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines a file package parser for the Reference Installer.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ exampleCode
+*/
+
+#ifndef __SIFREFPKGPARSER_H__
+#define __SIFREFPKGPARSER_H__
+
+#include <scs/scsclient.h>
+#include <f32file.h>
+#include <usif/sif/sifcommon.h>
+
+namespace Usif
+	{
+	// Helpful typedefs
+	typedef RArray<TLanguage> RLanguageArray;
+	typedef RCPointerArray<HBufC> RCHBufCArray;
+
+	/**
+	A package file parser. This refrence implementation reads an entire file into a buffer
+	and then parses it line by line. The parser operates synchronously and therefore
+	the processing of a package cannot be cancelled.
+	*/
+	class CSifRefPkgParser: public CBase
+		{
+	public:
+		/**
+		Creates an instance of the parser and parses a package file by file name.
+		
+		@param aFileName The name of a package file to be parsed.
+		@return Pointer to an instance of the parser.
+		*/
+		static CSifRefPkgParser* NewL(const TDesC& aFileName);
+
+		/**
+		Destroys an instance of the parser.
+		*/
+		virtual ~CSifRefPkgParser();
+
+		/**
+		Gets a reference to an array of languages supported by the package.
+		*/
+		const RLanguageArray& Languages() const;
+
+		/**
+		Gets a reference to an array of localized names of a component in the package.
+		The sequence of the names in the array corresponds to the sequence of
+		the languages returned by Languages().
+		*/
+		const RCHBufCArray& ComponentNames() const;
+
+		/**
+		Gets a reference to an array of localized names of the vendor of a component in
+		the package. The sequence of the names in the array corresponds to the sequence of
+		the languages returned by Languages().
+		*/
+		const RCHBufCArray& VendorNames() const;
+
+		/**
+		Gets a reference to an array of files of a component in the package.
+		*/
+		const RCHBufCArray& Files() const;
+
+		/**
+		Gets the version of a component in the package.
+		*/
+		const TVersion& Version() const;
+
+		/**
+		A helper method. Gets the index of aLanguage in the array of languages supported by
+		a component in the package.
+		
+		@param aLanguage Language to be found.
+		@return The index of aLanguage in the array of supported languages.
+		*/
+		TInt GetLanguageIndex(TLanguage aLanguage) const;
+
+	private:
+		CSifRefPkgParser();
+		CSifRefPkgParser(const CSifRefPkgParser&);
+		CSifRefPkgParser& operator=(const CSifRefPkgParser&);
+
+		void ParseL(const TDesC& aFileName);
+		void ParseL(RFile& aFileHandle);
+		void LineHandlerL(const TPtrC8& aName, const TPtrC8& aValue);
+		void CheckInvariantL() const;
+
+		RLanguageArray iLanguages;
+		RCHBufCArray iComponentNames;
+		RCHBufCArray iVendorNames;
+		RCHBufCArray iFiles;
+		TVersion iVersion;
+		};
+
+	} // namespace Usif
+
+#endif // __SIFREFPKGPARSER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/inc/sifrefpkgrec.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines a package recognizer for the Reference Installer.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ exampleCode
+*/
+
+#ifndef SIFREFPKGREC_H
+#define SIFREFPKGREC_H
+
+/**
+A reference package recognizer. This class implements the CApaDataRecognizerType interface.
+Please see the description of @see CApaDataRecognizerType for details. 
+
+The SIF Server uses this class through the AppArc APIs to recognize reference packages.
+*/
+class CSifRefPkgRecognizer : public CApaDataRecognizerType
+	{
+public:
+	/**
+	Gets the size of buffer preferred for the purpose of recognizing the data type.
+	*/
+	TUint PreferredBufSize();
+
+	/**
+	Gets one of the data (MIME) types that the recognizer can recognize.
+	
+	@param aIndex An index that identifies the data type.
+	@return The data (MIME) type.
+	*/
+	TDataType SupportedDataTypeL(TInt aIndex) const;
+
+	/**
+	Creates an instance of the recognizer.
+	*/
+	static CApaDataRecognizerType* CreateRecognizerL();
+
+private:
+	CSifRefPkgRecognizer();
+
+	/**
+	Implements the recognition algorithm for the Reference Installer.
+	*/
+	void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer);
+	};
+
+#endif // SIFREFPKGREC_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/inc/sifrefplugin.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,140 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines a SIF plug-in for the Reference Installer.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ exampleCode
+*/
+
+#ifndef SIFREFPLUGIN_H
+#define SIFREFPLUGIN_H
+
+#include <usif/sif/sifplugin.h>
+#include <e32base.h>
+#include <e32std.h>
+#include "sifrefinstallerclient.h"
+
+namespace Usif
+	{
+	/**
+	An active object used by the CSifRefPlugin class to submit asynchronous requests.
+	
+	ECOM objects and CActive do not interact well - especially since SIFPlugin inherits
+	from CBase and double C-inheritance is impossible. So, a separate class is used to drive
+	asynchronous software management requests.
+	*/
+	NONSHARABLE_CLASS(CSifRefPluginActiveImpl) : public CActive
+	{
+	public:
+		static CSifRefPluginActiveImpl* NewL();
+		~CSifRefPluginActiveImpl();
+
+		/* CActive interface */
+		void RunL();
+		void DoCancel();
+
+		/* CSifPlugin interface */
+		void GetComponentInfo(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+							CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+
+		void GetComponentInfo(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+							CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+
+		void Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+					const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+					TRequestStatus& aStatus);
+
+		void Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+					const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+					TRequestStatus& aStatus);
+
+		void Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+						const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, 
+						TRequestStatus& aStatus);
+
+		void Activate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+						TRequestStatus& aStatus);
+
+		void Deactivate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+						TRequestStatus& aStatus);
+
+	private:
+		CSifRefPluginActiveImpl() : CActive(EPriorityStandard) {}
+		CSifRefPluginActiveImpl(const CSifRefPluginActiveImpl&);
+		CSifRefPluginActiveImpl& operator =(const CSifRefPluginActiveImpl&);
+		void ConstructL();
+		TBool CommonRequestPreamble(const TSecurityContext& aSecurityContext, const COpaqueNamedParams& aInputParams, 
+									COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus);
+	private:
+		RSifRefInstallerClient iTransporter;
+		TRequestStatus* iClientStatus;
+		const COpaqueNamedParams* iInputParams;
+		COpaqueNamedParams* iOutputParams;
+		};
+
+	/*
+	An implementation of the CSifPlugin interface for the Reference Installer.
+	
+	The SIF Server loads and uses this plug-in when the MIME type of a package is 'binary/sif-refpkg'.
+	*/
+	NONSHARABLE_CLASS(CSifRefPlugin) : public CSifPlugin
+		{
+	public:
+		static CSifRefPlugin* NewL();
+		~CSifRefPlugin();
+
+		/* CSifPlugin interface */
+		void GetComponentInfo(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+							CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+
+		void GetComponentInfo(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+							CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+		
+		void Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+							const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+							TRequestStatus& aStatus);
+
+		void Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+							const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+							TRequestStatus& aStatus);
+
+		virtual void Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+								TRequestStatus& aStatus);
+
+		virtual void Activate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								TRequestStatus& aStatus);
+
+		virtual void Deactivate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								TRequestStatus& aStatus);
+
+		void CancelOperation();
+
+	private:
+		CSifRefPlugin() {}
+		void ConstructL();
+		CSifRefPlugin(const CSifRefPlugin &);
+		CSifRefPlugin& operator =(const CSifRefPlugin &);
+
+		CSifRefPluginActiveImpl *iImpl;
+		};
+	} // end namespace Usif
+
+#endif // SIFREFPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/inc/sifrefuihandler.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines an example implementation of the MInstallerUIHandler interface.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ exampleCode
+*/
+
+#ifndef SIFREFUIHANDLER_H
+#define SIFREFUIHANDLER_H
+
+#include "sifrefinstallertask.h"
+#include "sifrefpkgparser.h"
+
+namespace Usif
+	{
+	/**
+	A dummy implementation of the @see MInstallerUIHandler interface for the Reference
+	Installer. It doesn't interact with a real UI subsystem but returns hardcoded values only.
+	
+	Please see @see sifrefinstallertask.h for details of @see MInstallerUIHandler.
+	*/
+	class MSifRefUIHandler : public MInstallerUIHandler
+		{
+	public:
+		// MInstallerUIHandler interface
+		virtual TBool ConfirmationUIHandler(const TDesC& aQuestion);
+		virtual void ErrorDescriptionUIHandler(const TDesC& aDescription);
+		};
+	} // namespace Usif
+
+#endif // SIFREFUIHANDLER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/inc/tsifrefinstaller.iby	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef TSIFREFINSTALLER_IBY
+#define TSIFREFINSTALLER_IBY
+
+REM Tests for SIF Reference Installer
+
+define ZDRIVE \epoc32\data\Z
+
+data=ZDRIVE\tusif\tsifrefinstaller\tsifrefinstaller.ini						\tusif\tsifrefinstaller\tsifrefinstaller.ini
+data=ZDRIVE\tusif\tsifrefinstaller\tsifrefinstaller.script					\tusif\tsifrefinstaller\tsifrefinstaller.script
+
+data=ZDRIVE\tusif\tsifrefinstaller\data\base.sifrefbinpkg					\tusif\tsifrefinstaller\data\base.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\base3.sifrefbinpkg					\tusif\tsifrefinstaller\data\base3.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\upgrade.sifrefbinpkg				\tusif\tsifrefinstaller\data\upgrade.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid3.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid3.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid4.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid4.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid5.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid5.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid6.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid6.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid7.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid7.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid8.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid8.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid9.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid9.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid10.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid10.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid11.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid11.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\invalid12.sifrefbinpkg				\tusif\tsifrefinstaller\data\invalid12.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\homogeneouscompound.sifrefbinpkg	\tusif\tsifrefinstaller\data\homogeneouscompound.sifrefbinpkg
+data=ZDRIVE\tusif\tsifrefinstaller\data\fileinusetest.sifrefbinpkg	\tusif\tsifrefinstaller\data\fileinusetest.sifrefbinpkg
+
+REM executables used by integration tests
+file=ABI_DIR\BUILD_DIR\siftestintegrationlockfile.exe					\sys\bin\siftestintegrationlockfile.exe
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/sample/base.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF"
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/sample/invalid.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/sample/makebinpkg.pl	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,101 @@
+#
+# 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 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".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# This script belongs to the SIF Reference Installer. It builds a binary reference package that
+# contains a pkg file describing the (base) component to be installed and (optionally) embedded
+# components.
+# The structure of an output file is as follows:
+# 36 bytes				header
+# 4 bytes 					the size of a pkg file describing the component (pkgSize)
+# pkgSize bytes				the content of a pkg file describing the component
+# 4 bytes					the number of embedded components in a package (numEmbComps)
+# 4 bytes						the length of the name of an embedded component (embCompFileNameLen)   \
+# embCompFileNameLen bytes	the name of an embedded component								       } this block repeats numEmbComps times
+# 4 bytes					the size of an embedded component (embCompFileSize)				     /
+# embCompFileSize bytes		the content of an embedded component								  /
+# 45 bytes - footer
+# 
+#
+
+use Getopt::Long;
+use File::Basename;
+
+my $KCopyChunkSize = 65536;
+
+my $header = '_SifReferenceInstallerPackageHeader_';
+my $footer = '_SifReferenceInstallerPackageFooter_';
+
+# Read and check arguments
+my $help = "\nExample usage:\nmakebinpkg.pl --pkg base.sifrefpkg --emb simple.sis --binpkg compound.sifrefbinpkg\n";
+my $inPkg = '';
+my @embComps = ();
+my $outPkg = '';
+GetOptions("pkg=s" => \$inPkg, "emb=s" => \@embComps, "binpkg=s" => \$outPkg) or die "GetOptions failed.\n$help";
+$outPkg or die "Output file not defined\n$help";
+my $numEmbComps = @embComps;
+$numEmbComps <= 16 or die "Too many embedded components.\n$help";
+
+# Create the output file
+unlink($outPkg);
+open OUTFILE, ">$outPkg" or die "\nCan't open $outPkg for writing: $!\n";
+binmode OUTFILE;
+
+# Write the header
+print OUTFILE $header;
+
+# Write the size of the input pkg file
+my $inPkgFileSize = -s $inPkg;
+print "Input pkg file: $inPkg, size: $inPkgFileSize\n";
+print OUTFILE pack("i", $inPkgFileSize);
+
+# Write the content of the input pkg file
+open INPKGFILE, $inPkg or die "\nCan't open $inPkg file for reading: $!\n";
+binmode INPKGFILE;
+my $buffer;
+while (read (INPKGFILE, $buffer, $KCopyChunkSize) and print OUTFILE $buffer) # read in (up to) 64k chunks, write, exit if read or write fails
+	{}; die "Problem copying: $!\n" if $!;
+close INPKGFILE;
+
+# Write the number of input files
+print OUTFILE pack("i", $numEmbComps);
+
+# Iterate over the embedded components adding them into the output file
+foreach (@embComps)
+	{
+	my $baseName = basename($_);
+	
+	# Write the length of the file name
+	print "Processing file: $_";
+	print OUTFILE pack("i", length($baseName));
+	
+	# Write the file name
+	print OUTFILE $baseName;
+	
+	# Write the size of the file
+	my $embCompFileSize = -s $_;
+	print ", size: $embCompFileSize\n";
+	print OUTFILE pack("i", $embCompFileSize);
+	
+	# Write the content of the file
+	open EMBFILE, $_ or die "\nCan't open $srcfile for reading: $!\n";
+	binmode EMBFILE;
+	my $buffer;
+	while ( read (EMBFILE, $buffer, $KCopyChunkSize) and print OUTFILE $buffer) # read in (up to) 64k chunks, write, exit if read or write fails
+		{}; die "Problem copying: $!\n" if $!;
+	close EMBFILE;
+	}
+
+# Write the footer and close the output file
+print OUTFILE $footer;
+close OUTFILE;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/sample/upgrade.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,6 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF"
+ComponentVersion: 1.23(4)
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent\file3.ref
+File: c:\RefComponent\file4.ref
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/source/1028634f.rss	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* ECOM DLL UID:			0x1028634F
+* ECOM interface UID:		0x10285BC2 (KUidSifPlugin)
+* ECOM Implementation:		0x10286350
+*
+*/
+
+
+#include <ecom/registryinfo.rh>
+
+RESOURCE REGISTRY_INFO so_registry
+	{
+	dll_uid = 0x1028634F;
+	interfaces =
+		{
+		INTERFACE_INFO
+			{
+			interface_uid = 0x10285BC2;
+			
+			implementations =
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = 0x10286350;
+					version_no = 1;
+					default_data = "";
+					opaque_data = "";
+					}
+				};
+			}
+		};
+	}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/source/10286351.rss	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* 102031FB.rss
+* UIDs quick-ref
+* ECOM DLL UID:			0x10286351
+* ECOM interface UID:		0x101F7D87
+* ECOM Implementation:		0x10286352
+*
+*/
+
+
+#include <ecom/registryinfo.rh>
+RESOURCE REGISTRY_INFO r_registry
+{
+	dll_uid = 0x10286351;
+	interfaces =
+	{
+		INTERFACE_INFO
+		{
+		interface_uid = 0x101F7D87;	// Const for all data recognisers
+		implementations = 
+			{
+			IMPLEMENTATION_INFO
+				{
+				implementation_uid = 0x10286352;
+				version_no = 1;
+				display_name = "sifrefpkgrec";
+				default_data = ""; // This means it accepts ALL types
+				opaque_data = "";
+				}
+			};
+		}
+	};
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/source/sifrefbinpkgextractor.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,426 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* filemerger.cpp
+*
+*/
+
+
+#include <e32cons.h>
+#include <scs/cleanuputils.h>
+#include <apmstd.h> 
+#include <apgcli.h>
+#include "usiflog.h"
+#include "sifrefbinpkgextractor.h"
+
+_LIT8(KCompoundPackageHeader, "_SifReferenceInstallerPackageHeader_");
+_LIT8(KCompoundPackageFooter, "_SifReferenceInstallerPackageFooter_");
+_LIT(KPkgFileExt, ".sifrefpkg");
+_LIT(KRefBinPkgMimeType, "binary/sif-refpkg");
+_LIT(KEmbCompMidDir, "children\\");
+_LIT(KDirSeparator, "\\");
+
+const TInt KBufferLength = 0x3FFC; // 16kB
+const TInt KMaxNumFiles = 16;
+const TInt KMaxEmbCompSize = 0xFFFFFF; // 16MB
+
+using namespace Usif;
+
+namespace
+	{
+	TInt ReadInt32L(RFile& file)
+		{
+		TBuf8<4> buf;
+		User::LeaveIfError(file.Read(buf, sizeof(TInt)));
+		return buf[0] | buf[1]<<8 | buf[2]<<16 | buf[3]<<24;
+		}
+
+	HBufC* BuildPkgFileNameLC(const TDesC& aTempDir, const TDesC& aBinPkgPath)
+		{
+		TParsePtrC parser(aBinPkgPath);
+		TPtrC binPkgfileName = parser.Name();
+		HBufC* pkgfileName = HBufC::NewLC(aTempDir.Length() + binPkgfileName.Length() + KPkgFileExt.iTypeLength);
+		TPtr pkgfileNamePtr =  pkgfileName->Des();
+		pkgfileNamePtr += aTempDir;
+		pkgfileNamePtr += binPkgfileName;
+		pkgfileNamePtr += KPkgFileExt;
+		
+		return pkgfileName;
+		}
+
+	HBufC* BuildPkgFileNameLC(const TDesC& aTempDir, const RFile& aFile)
+		{
+		HBufC* name = HBufC::NewLC(KMaxFileName);
+		TPtr namePtr(name->Des());
+		User::LeaveIfError(aFile.Name(namePtr));
+		
+		HBufC* pkgName = BuildPkgFileNameLC(aTempDir, *name);
+		
+		CleanupStack::Pop(pkgName);
+		CleanupStack::PopAndDestroy(name);
+		CleanupStack::PushL(pkgName);
+		
+		return pkgName;
+		}
+
+	void ExtractBinPkgFileL(RStsSession& aSts, RFile& aInFile, const TDesC& aOutPath, RPointerArray<HBufC>& aOutFiles)
+		{
+		// Check file size
+		TInt size(0);
+		User::LeaveIfError(aInFile.Size(size));
+		if (size < KCompoundPackageHeader.iTypeLength+KCompoundPackageFooter.iTypeLength+sizeof(TInt))
+			{
+			User::Leave(KErrCorrupt);
+			}
+		
+		// Create a buffer
+		HBufC8* buffer = HBufC8::NewLC(KBufferLength);
+		TPtr8 bufPtr = buffer->Des();
+		
+		// Read header
+		User::LeaveIfError(aInFile.Read(bufPtr, KCompoundPackageHeader.iTypeLength));
+		if (bufPtr != KCompoundPackageHeader)
+			{
+			User::Leave(KErrCorrupt);
+			}
+		bufPtr.Zero();
+		
+		// Read the size of a pkg content
+		const TInt pkgSize = ReadInt32L(aInFile);
+		if (pkgSize > KBufferLength)
+			{
+			User::Leave(KErrCorrupt);
+			}
+
+		// Build the name of the pkg file
+		HBufC* inFileNameWithExt = HBufC::NewLC(KMaxFileName);
+		TPtr inFileNameWithExtPtr = inFileNameWithExt->Des();
+		User::LeaveIfError(aInFile.Name(inFileNameWithExtPtr));
+		HBufC* pkgFileName = BuildPkgFileNameLC(aOutPath, *inFileNameWithExt);
+
+		// Create the pkg file
+		RFile pkgFile;
+		aSts.CreateTemporaryL(*pkgFileName, pkgFile, EFileWrite);
+		CleanupClosePushL(pkgFile);
+		
+		// Copy the content of the pkg file
+		User::LeaveIfError(aInFile.Read(bufPtr, pkgSize));
+		User::LeaveIfError(pkgFile.Write(bufPtr));
+		CleanupStack::PopAndDestroy(&pkgFile);
+		bufPtr.Zero();
+		
+		// Read the number of embedded components
+		const TInt numEmbComps = ReadInt32L(aInFile);
+		if (numEmbComps > KMaxNumFiles)
+			{
+			User::Leave(KErrCorrupt);
+			}
+		
+		// Create a directory for embedded components
+		HBufC* embCompPath = NULL;
+		if (numEmbComps > 0)
+			{
+			embCompPath = HBufC::NewLC(aOutPath.Length() + KEmbCompMidDir.iTypeLength);
+			embCompPath->Des().Copy(aOutPath);
+			embCompPath->Des().Append(KEmbCompMidDir);
+			}
+		
+		// Iterate over the components and extract them
+		for (TInt i=0; i<numEmbComps; ++i)
+			{
+			// Read the length of the name of an embedded component
+			const TInt strLen = ReadInt32L(aInFile);
+			if (strLen > KMaxPath)
+				{
+				User::Leave(KErrCorrupt);
+				}
+			
+			// Read the name of an embedded component and build its target path
+			User::LeaveIfError(aInFile.Read(bufPtr, strLen));
+			HBufC* embFileName = ConvertBufferTo16bitL(bufPtr);
+			CleanupStack::PushL(embFileName);
+			bufPtr.Zero();
+			HBufC* embFileTargetPath = HBufC::NewLC(embCompPath->Length() + 2*embFileName->Length() + KDirSeparator.iTypeLength);
+			TPtr embFileTargetPathPtr(embFileTargetPath->Des());
+			embFileTargetPathPtr.Copy(*embCompPath);
+			embFileTargetPathPtr += *embFileName;
+			embFileTargetPathPtr += KDirSeparator;
+			embFileTargetPathPtr += *embFileName;
+			
+			// Read the size of an embedded component
+			const TInt fileSize = ReadInt32L(aInFile);
+			if (fileSize > KMaxEmbCompSize)
+				{
+				User::Leave(KErrCorrupt);
+				}
+			
+			// Create an output file
+			RFile outFile;
+			aSts.CreateTemporaryL(*embFileTargetPath, outFile, EFileWrite);
+			CleanupClosePushL(outFile);
+			
+			// Copy the content of the output file
+			const TInt numChunks = fileSize / KBufferLength;
+			for (TInt c=0; c<numChunks; ++c)
+				{
+				User::LeaveIfError(aInFile.Read(bufPtr, KBufferLength));
+				User::LeaveIfError(outFile.Write(bufPtr));
+				bufPtr.Zero();
+				}
+			const TInt remainder = fileSize % KBufferLength;
+			User::LeaveIfError(aInFile.Read(bufPtr, remainder));
+			User::LeaveIfError(outFile.Write(bufPtr));
+			bufPtr.Zero();
+			
+			CleanupStack::PopAndDestroy(&outFile);
+			aOutFiles.AppendL(embFileTargetPath);
+			CleanupStack::Pop(embFileTargetPath);
+			CleanupStack::PopAndDestroy(embFileName);
+			}
+		
+		if (embCompPath != NULL)
+			{
+			CleanupStack::PopAndDestroy(embCompPath);
+			}
+		
+		// Read footer
+		User::LeaveIfError(aInFile.Read(bufPtr, KCompoundPackageFooter.iTypeLength));
+		if (bufPtr != KCompoundPackageFooter)
+			{
+			User::Leave(KErrCorrupt);
+			}
+		bufPtr.Zero();
+		
+		CleanupStack::PopAndDestroy(3, buffer); // inFileNameWithExt, pkgFileName
+		}
+		
+	void ExtractBinPkgFileL(RStsSession& aSts, const TDesC& aInFileName, const TDesC& aOutPath, RPointerArray<HBufC>& aOutFiles)
+		{
+		RFs fs;
+		RFile file;
+		User::LeaveIfError(fs.Connect());
+		CleanupClosePushL(fs);
+		TInt err = file.Open(fs, aInFileName, EFileShareReadersOnly);
+		if (err != KErrNone)
+			{
+			DEBUG_PRINTF3(_L8("Failed to open file: %S with error: %d"), &aInFileName, err);
+			User::Leave(err);
+			}
+		CleanupClosePushL(file);
+		
+		ExtractBinPkgFileL(aSts, file, aOutPath, aOutFiles);
+		
+		CleanupStack::PopAndDestroy(2, &fs);
+		}
+
+	TBool IsForeignL(RFile& aFileHandle)
+		{
+		// Get the MIME type of the component to be installed from AppArc
+		TDataType dataType;
+		RApaLsSession apa;
+		User::LeaveIfError(apa.Connect());
+		CleanupClosePushL(apa);
+		TUid appUid = TUid::Null();
+		User::LeaveIfError(apa.AppForDocument(aFileHandle, appUid, dataType));
+		// A possible problem with recognizers is returning a successful result, but forgetting to set the MIME type
+		if (dataType.Des8().Ptr() == NULL) 
+			{
+			User::Leave(KErrCompletion);
+			}
+		CleanupStack::PopAndDestroy(&apa);
+		
+		return dataType.Des() != KRefBinPkgMimeType;
+		}
+
+	TBool IsForeignL(const TDesC& aFileName)
+		{
+		RFs fs;
+		RFile file;
+		User::LeaveIfError(fs.Connect());
+		CleanupClosePushL(fs);
+		User::LeaveIfError(fs.ShareProtected());
+		TInt err = file.Open(fs, aFileName, EFileShareReadersOnly);
+		if (err != KErrNone)
+			{
+			DEBUG_PRINTF3(_L8("Failed to open file: %S with error: %d"), &aFileName, err);
+			User::Leave(err);
+			}
+		CleanupClosePushL(file);
+		
+		const TBool result = IsForeignL(file);
+
+		CleanupStack::PopAndDestroy(2, &fs); // file
+
+		return result;
+		}
+	}
+
+namespace Usif
+	{
+	namespace SifRefBinPkgExtractor
+		{
+		CAuxNode* CAuxNode::NewLC(const TDesC& aFileName, TBool aForeign, CAuxNode& aParent)
+			{
+			CAuxNode* self = new (ELeave) CAuxNode;
+			CleanupStack::PushL(self);
+			
+			self->iFileName = aFileName.AllocL();
+			self->iForeign = aForeign;
+			self->iParent = &aParent;
+			
+			return self;
+			}
+		CAuxNode* CAuxNode::NewLC(const RFile& aFile, TBool aForeign, CAuxNode& aParent)
+		    {
+	        CAuxNode* self = new (ELeave) CAuxNode;
+	        CleanupStack::PushL(self);
+	                    
+	        HBufC* name = HBufC::NewLC(KMaxFileName);
+	        TPtr namePtr(name->Des());
+	        User::LeaveIfError(aFile.Name(namePtr));
+	                    
+	        self->iFileName = name->AllocL();
+	        self->iForeign = aForeign;
+	        self->iParent = &aParent;
+	        
+	        CleanupStack::PopAndDestroy(name); 
+	        return self;
+	        }
+
+		CAuxNode::CAuxNode()
+			{
+			}
+		
+		CAuxNode::~CAuxNode()
+			{
+			delete iFileName;
+			delete iNode;
+			delete iCompInfo;
+			}
+
+		void CAuxNode::SetNodeL(CComponentInfo::CNode* aNode)
+			{
+			if (iNode != NULL)
+				{
+				User::Leave(KErrAlreadyExists);
+				}
+			iNode = aNode;
+			}
+
+		void CAuxNode::SetCompInfoL(CComponentInfo* aCompInfo)
+			{
+			if (iCompInfo != NULL)
+				{
+				User::Leave(KErrAlreadyExists);
+				}
+			iCompInfo = aCompInfo;
+			}
+		
+		void CAuxNode::RegisterChildToParentL()
+			{
+			ASSERT (iCompInfo != NULL || iNode != NULL);
+			
+			if (iCompInfo != NULL)
+				{
+				iCompInfo->SetRootNodeAsChildL(*iParent->iNode);
+				delete iCompInfo;
+				iCompInfo = NULL;
+				}
+			else
+				{
+				iParent->iNode->AddChildL(iNode);
+				iNode = NULL;
+				}
+			}
+		
+		void CAuxNode::SetAsRootNodeL(CComponentInfo& aCompInfo)
+			{
+			if (iNode == NULL)
+				{
+				User::Leave(KErrNotFound);
+				}
+			aCompInfo.SetRootNodeL(iNode);
+			iNode = NULL;
+			}
+
+//-------------------------------------------------------------------------------------------------------
+
+		void BuildPkgTreeImplL(RStsSession& aSts, const TDesC* aInFileName, RFile* aInFile, const TDesC& aTempDir, RPointerArray<CAuxNode>& aFlatTree, CAuxNode* aParent)
+			{
+			__ASSERT_ALWAYS(aInFileName != NULL || aInFile != NULL, User::Leave(KErrArgument));
+			
+			RCPointerArray<HBufC> embFiles;
+			CleanupClosePushL(embFiles);
+			CAuxNode* node = NULL;
+			HBufC* pkgFileName = NULL;
+			const TBool foreign = aInFile ? IsForeignL(*aInFile) : IsForeignL(*aInFileName);
+			if (!foreign)
+				{
+				if (aInFile != NULL)
+					{
+					ExtractBinPkgFileL(aSts, *aInFile, aTempDir, embFiles);
+					}
+				else
+					{
+					ExtractBinPkgFileL(aSts, *aInFileName, aTempDir, embFiles);
+					}
+				
+				pkgFileName = aInFile ? BuildPkgFileNameLC(aTempDir, *aInFile) : BuildPkgFileNameLC(aTempDir, *aInFileName);
+				node = CAuxNode::NewLC(*pkgFileName, EFalse, *aParent);
+				aFlatTree.AppendL(node);
+				CleanupStack::Pop(node);
+				for (TInt i=0; i<embFiles.Count(); ++i)
+					{
+					const TDesC& fileName = *embFiles[i];
+					TParsePtrC parser(fileName);
+					BuildPkgTreeImplL(aSts, &fileName, NULL, parser.DriveAndPath(), aFlatTree, node);
+					}
+				}
+			else
+				{
+				if (aParent == NULL)
+					{
+					User::Leave(KErrCorrupt);
+					}
+				if (aInFileName != NULL)
+				    {
+				    node = CAuxNode::NewLC(*aInFileName, ETrue, *aParent);
+				    }
+				else
+				    {
+				    node = CAuxNode::NewLC(*aInFile, ETrue, *aParent);
+				    }			
+				aFlatTree.AppendL(node);
+				CleanupStack::Pop(node);
+				}
+			
+				if (pkgFileName != NULL)
+					{
+					CleanupStack::PopAndDestroy(pkgFileName);
+					}
+			
+			CleanupStack::PopAndDestroy(&embFiles);
+			}
+		
+		void BuildPkgTreeL(RStsSession& aSts, RFile& aInFile, const TDesC& aTempDir, RPointerArray<CAuxNode>& aFlatTree, CAuxNode* aParent)
+			{
+			BuildPkgTreeImplL(aSts, NULL, &aInFile, aTempDir, aFlatTree, aParent);
+			}
+		
+		void BuildPkgTreeL(RStsSession& aSts, const TDesC& aInFileName, const TDesC& aTempDir, RPointerArray<CAuxNode>& aFlatTree, CAuxNode* aParent)
+			{
+			BuildPkgTreeImplL(aSts, &aInFileName, NULL, aTempDir, aFlatTree, aParent);
+			}
+		} // namespace SifRefBinPkgExtractor
+	} //namespace Usif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/source/sifrefinstallerclient.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements the client side of the Reference Installer.
+*
+*/
+
+
+#include <f32file.h>
+#include <scs/scscommon.h>
+#include <scs/scsclient.h>
+#include "sifrefinstallerclientserver.h"
+#include "sifrefinstallerclient.h"
+
+using namespace Usif;
+
+namespace
+	{
+	/** SIF server SID. */
+	const TUid KSifRefInstallerServerUid = {0x1028634E};
+
+	/** Executable image which runs the server process. */
+	_LIT(KRefInstallerServerImageName, "sifrefinstallerserver.exe");
+	}
+
+RSifRefInstallerClient::RSifRefInstallerClient()
+	{
+	}
+
+TInt RSifRefInstallerClient::Connect()
+	{
+	return iTransporter.Connect(KSifRefInstallerServerName, Version(), KRefInstallerServerImageName, KSifRefInstallerServerUid);
+	}
+
+void RSifRefInstallerClient::Close()
+	{
+	iTransporter.Close();
+	}
+
+void RSifRefInstallerClient::GetComponentInfo(const TDesC& aFileName, CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	iTransporter.GetComponentInfo(aFileName, aComponentInfo, aStatus);
+	}
+
+void RSifRefInstallerClient::GetComponentInfo(RFile& aFileHandle, CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	iTransporter.GetComponentInfo(aFileHandle, aComponentInfo, aStatus);
+	}
+
+void RSifRefInstallerClient::Install(const TDesC& aFileName, const COpaqueNamedParams& aArguments,
+										COpaqueNamedParams& aResults, TRequestStatus& aStatus)
+	{
+	// Fifth argument of the SifTransportClient::Install() and SifTransportClient::Uninstall() methods,
+	// if set to ETrue, instructs an instance of CSifTransportServer to work in the ExclusiveOperation
+	// mode. In this mode only one request may be processed at a time. In our case an instance of
+	// CSifTransportServer means the Refrence Installer Server. Hence, we have to set this param to
+	// ETrue because the Reference Installer doesn't support concurrent operations.
+	iTransporter.Install(aFileName, aArguments, aResults, aStatus, ETrue);
+	}
+
+void RSifRefInstallerClient::Install(RFile& aFileHandle, const COpaqueNamedParams& aArguments,
+										COpaqueNamedParams& aResults, TRequestStatus& aStatus)
+	{
+	// Please see above for a comment about ETrue passed as a fifth param.
+	iTransporter.Install(aFileHandle, aArguments, aResults, aStatus, ETrue);
+	}
+
+void RSifRefInstallerClient::Uninstall(TComponentId aComponentId, const COpaqueNamedParams& aArguments,
+											COpaqueNamedParams& aResults, TRequestStatus& aStatus)
+	{
+	// Please see above for a comment about ETrue passed as a fifth param.
+	iTransporter.Uninstall(aComponentId, aArguments, aResults, aStatus, ETrue);
+	}
+
+void RSifRefInstallerClient::Activate(TComponentId aComponentId, TRequestStatus& aStatus)
+	{
+	iTransporter.Activate(aComponentId, aStatus);
+	}
+
+void RSifRefInstallerClient::Deactivate(TComponentId aComponentId, TRequestStatus& aStatus)
+	{
+	iTransporter.Deactivate(aComponentId, aStatus);
+	}
+
+void RSifRefInstallerClient::CancelOperation()
+	{
+	iTransporter.CancelOperation();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/source/sifrefinstallerserver.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,89 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements a server for the Reference Installer.
+*
+*/
+
+
+#include <usif/sif/siftransportserverstartup.h>
+#include "sifrefinstallerclientserver.h"
+#include "sifrefinstallertask.h"
+#include "sifrefuihandler.h"
+
+using namespace Usif;
+
+namespace
+	{
+
+	/**
+	A factory function that instantiates a UI handler. Reference Installer tasks
+	call this function when they need UI interaction.
+	
+	@return Pointer to a MInstallerUIHandler object.
+	@leave System wide error code
+	*/
+	MInstallerUIHandler* NewSifRefUiHandlerL()
+		{
+		return new (ELeave) MSifRefUIHandler;
+		}
+
+	/**
+	A factory function that instantiates Reference Installer tasks. The CSifTransportRequest
+	class calls this function in order to process incoming software management requests.
+	*/
+	CSifTransportTask* RefInstallerTaskFactoryL(TransportTaskFactory::TTaskType aTaskType, TTransportTaskParams& aParams)
+		{
+		// Security check - the client must have the SIF Server SID
+		if (aParams.iSecurityContext->SecureId() != KSifServerUid)
+			{
+			User::Leave(KErrPermissionDenied);
+			}
+
+		// Instantiate an appropriate task
+		switch (aTaskType)
+			{
+			case TransportTaskFactory::EGetComponentInfo:
+				return CSifRefGetComponentInfoTask::NewL(aParams);
+
+			case TransportTaskFactory::EInstall:
+				return CSifRefInstallTask::NewL(aParams, NewSifRefUiHandlerL);
+
+			case TransportTaskFactory::EUninstall:
+				return CSifRefUninstallTask::NewL(aParams, NewSifRefUiHandlerL);
+
+			case TransportTaskFactory::EActivate:
+				return new (ELeave) CSifRefActivateDeactivateTask(aParams, EActivated);
+
+			case TransportTaskFactory::EDeactivate:
+				return new (ELeave) CSifRefActivateDeactivateTask(aParams, EDeactivated);
+
+			default:
+				User::Leave(KErrArgument);
+			}
+		return NULL;
+		}
+
+	}
+
+/**
+Executable entrypoint of the Reference Installer Server.
+
+@return	Symbian OS error code where KErrNone indicates
+		success and any other value indicates failure.
+ */
+TInt E32Main()
+{
+return StartTransportServer(KSifRefInstallerServerName, Version(), RefInstallerTaskFactoryL);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/source/sifrefinstallertask.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1015 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This  file implements Reference Install tasks for getting ComponentInfo, installation, uninstallation and activation/deactivation.
+*
+*/
+
+
+#include "sifrefinstallertask.h"
+#include "sifrefbinpkgextractor.h"
+#include "usiflog.h"
+#include <usif/usiferror.h>
+
+using namespace Usif;
+
+_LIT(KRefInstPrivateDir, "c:\\private\\1028634e\\");
+
+/**
+A set of helper functions for Reference Installer tasks.
+*/
+namespace InstallHelper
+	{
+	_LIT(KSifReferenceSoftwareType, "reference");
+	_LIT(KUiConfirmationQuestion, "Are you sure you want to %S component: %S, vendor: %S");
+	_LIT(KParamNameErrDesc, "Error Description");
+	_LIT(KErrFileAlreadyExists, "File already exists: ");
+	_LIT(KUiConfirmationTypeInstall, "install");
+	_LIT(KUiConfirmationTypeUpgrade, "upgrade");
+	_LIT(KUiConfirmationTypeUninstall, "uninstall");
+	_LIT(KUiParserErrorDesc, "Installer encountered a problem when parsing a package file.");
+	const TInt KMaxConfirmationTypeLengh = KUiConfirmationTypeUninstall.iTypeLength;
+
+	// This Reference Installer uses Component Name and Vendor Name in order to
+	// identify a component in the SCR database. This identification scheme doesn't provide
+	// unique ids and its results depend on the current language. Hence, a real installer
+	// must use the Unique Id mechanism provided by the SCR.
+	void FindComponentL(RSoftwareComponentRegistry& aScr, TComponentSearchData& aCompSearchData, const CSifRefPkgParser& aParser)
+		{
+		DEBUG_PRINTF(_L8("InstallHelper::FindComponentL()"));
+		
+		// Get the index of the current language
+		const TLanguage curLang = User::Language();
+		TInt langIndex = aParser.GetLanguageIndex(curLang);
+		if (langIndex == KErrNotFound)
+			{
+			ASSERT(aParser.Languages().Count() > 0); // The parser should have already rejected packages without languages
+			langIndex = 0;
+			}
+
+		// Data for CComponentInfo
+		aCompSearchData.iName = aParser.ComponentNames()[langIndex];
+		aCompSearchData.iVersion = aParser.Version().Name();
+		aCompSearchData.iVendor = aParser.VendorNames()[langIndex];
+		aCompSearchData.iScomoState = EDeactivated;
+		aCompSearchData.iInstallStatus = ENewComponent;
+		aCompSearchData.iComponentId = 0;
+
+		RSoftwareComponentRegistryView scrView;
+		CComponentFilter* filter = CComponentFilter::NewLC();
+		filter->SetNameL(*aCompSearchData.iName);
+		filter->SetVendorL(*aCompSearchData.iVendor);
+		filter->SetSoftwareTypeL(KSifReferenceSoftwareType);
+
+		scrView.OpenViewL(aScr, filter);
+		CleanupClosePushL(scrView);
+
+		// Iterate over matching components in order to determine the status of the package being processed.
+		CComponentEntry* component = NULL;
+		while ((component = scrView.NextComponentL()) != NULL)
+			{
+			const TDesC& installedVersion = component->Version();
+			const TInt cmp = RSoftwareComponentRegistry::CompareVersionsL(installedVersion, aCompSearchData.iVersion);
+			if (cmp > 0)
+				{
+				aCompSearchData.iInstallStatus = ENewerVersionAlreadyInstalled;
+				aCompSearchData.iScomoState = component->ScomoState();
+				aCompSearchData.iComponentId = component->ComponentId();
+				delete component;
+				break;
+				}
+			else if (cmp == 0 && aCompSearchData.iInstallStatus < EAlreadyInstalled)
+				{
+				aCompSearchData.iInstallStatus = EAlreadyInstalled;
+				aCompSearchData.iScomoState = component->ScomoState();
+				aCompSearchData.iComponentId = component->ComponentId();
+				}
+			else if (cmp < 0 && aCompSearchData.iInstallStatus < EUpgrade)
+				{
+				aCompSearchData.iInstallStatus = EUpgrade;
+				aCompSearchData.iScomoState = component->ScomoState();
+				aCompSearchData.iComponentId = component->ComponentId();
+				}
+			delete component;
+			}
+		CleanupStack::PopAndDestroy(2, filter);
+		}
+
+	TBool UnregisterAndDeleteFileL(RSoftwareComponentRegistry& aScr, RSoftwareComponentRegistryFilesList& aFileList, RStsSession& aSts, TComponentId aComponentId)
+		{
+		DEBUG_PRINTF(_L8("InstallHelper::UnregisterAndDeleteFileL()"));
+		
+		// Get next file
+		HBufC* file = aFileList.NextFileL();
+		if (file != NULL)
+			{
+			// and remove it from the file system
+			CleanupStack::PushL(file);
+			aSts.RemoveL(*file);
+			CleanupStack::PopAndDestroy(file);
+			}
+		else
+			{
+			// Remove the component from the SCR if there are no files left
+			aFileList.Close();
+			aScr.DeleteComponentL(aComponentId);
+			
+			// Copying complete
+			return ETrue;
+			}
+
+		// Copying in progress
+		return EFalse;
+		}
+
+	MInstallerUIHandler* CreateUiHandlerL(const COpaqueNamedParams* aCustomArguments, TInstallerUIHandlerFactory aUiHandlerFactory)
+		{
+		DEBUG_PRINTF(_L8("InstallHelper::CreateUiHandlerL()"));
+		
+		// Instantiate a UI handler for non-silent requests
+		if (aCustomArguments != NULL)
+			{
+			TInt silent = EFalse;
+			aCustomArguments->GetIntByNameL(_L("Silent"), silent);
+			if (silent)
+				{
+				return NULL;
+				}
+			}
+
+		return aUiHandlerFactory();
+		}
+
+	enum TConfirmationType
+		{
+		EConfirmationInstall,
+		EConfirmationUpgrade,
+		EConfirmationUninstall
+		};
+
+	void userConfirmationL(TConfirmationType aType, MInstallerUIHandler& uiHandler, const TDesC& aComponent, const TDesC& aVendor)
+		{
+		DEBUG_PRINTF(_L8("InstallHelper::userConfirmationL()"));
+		
+		const TInt maxLen = KUiConfirmationQuestion.iTypeLength + KMaxConfirmationTypeLengh + aComponent.Length() + aVendor.Length();
+		HBufC* info = HBufC::NewLC(maxLen);
+		TPtr bufInfo(info->Des());
+		
+		switch (aType)
+			{
+			case EConfirmationInstall:
+				bufInfo.Format(KUiConfirmationQuestion, &KUiConfirmationTypeInstall, &aComponent, &aVendor);
+				break;
+
+			case EConfirmationUpgrade:
+				bufInfo.Format(KUiConfirmationQuestion, &KUiConfirmationTypeUpgrade, &aComponent, &aVendor);
+				break;
+
+			case EConfirmationUninstall:
+				bufInfo.Format(KUiConfirmationQuestion, &KUiConfirmationTypeUninstall, &aComponent, &aVendor);
+				break;
+
+			default:
+				User::Leave(KErrArgument);
+			}
+
+		if (!uiHandler.ConfirmationUIHandler(*info))
+			{
+			User::Leave(KErrCancel);
+			}
+
+		CleanupStack::PopAndDestroy(info);
+		}
+	}
+
+// =============================================================================================================
+
+CSifRefGetComponentInfoTask* CSifRefGetComponentInfoTask::NewL(TTransportTaskParams& aParams)
+	{
+	DEBUG_PRINTF(_L8("CSifRefGetComponentInfoTask::NewL()"));
+	
+	// Validate the arguments first.
+	if ((aParams.iFileName == NULL && aParams.iFileHandle == NULL) || aParams.iComponentInfo == NULL)
+		{
+		User::Leave(KErrArgument);
+		}
+		
+	CSifRefGetComponentInfoTask* self = new (ELeave) CSifRefGetComponentInfoTask(aParams);
+	return self;
+	}
+
+CSifRefGetComponentInfoTask::CSifRefGetComponentInfoTask(TTransportTaskParams& aParams)
+: CSifTransportTask(aParams, EFalse), iStep(EExtractEmbeddedPkgs)
+	{
+	}
+
+CSifRefGetComponentInfoTask::~CSifRefGetComponentInfoTask()
+	{
+	DEBUG_PRINTF(_L8("CSifRefGetComponentInfoTask::~CSifRefGetComponentInfoTask()"));
+	
+	iFile.Close();
+	iFs.Close();
+	iScr.Close();
+	iSts.Close();
+	iEmbeddedComponents.Close();
+	if (iSifRequestInProgress)
+		{
+		iSif.CancelOperation();
+		}
+	iSif.Close();
+	delete iParser;
+	delete iComponentInfo;
+	}
+
+TBool CSifRefGetComponentInfoTask::ExecuteImplL()
+	{
+	DEBUG_PRINTF2(_L8("Exiting from CSifRefGetComponentInfoTask::ExecuteImplL(), iStep = %d"), iStep);
+	
+	TBool done = EFalse;
+	
+	switch (iStep)
+		{
+		case EExtractEmbeddedPkgs:
+			ExtractEmbeddedPkgsL();
+			++iStep;
+			break;
+
+		case EParsePkgFile:
+			iStep = ParsePkgFileL();
+			break;
+
+		case EFindComponent:
+			InstallHelper::FindComponentL(iScr, iCompSearchData, *iParser);
+			++iStep;
+			break;
+
+		case ECreateComponentInfoNode:
+			iStep = CreateComponentInfoNodeL();
+			break;
+
+		case ESetComponentInfo:
+			SetComponentInfoL();
+			done = ETrue;
+			break;
+
+		default:
+			User::Leave(KErrGeneral);
+		}
+
+	if (!iSifRequestInProgress)
+		{
+		TRequestStatus* status(RequestStatus());
+		User::RequestComplete(status, KErrNone);
+		}
+	
+	DEBUG_PRINTF3(_L8("Exiting from CSifRefGetComponentInfoTask::ExecuteImplL(), done = %d, iStep = %d"), done, iStep);
+	
+	return done;
+	}
+
+void CSifRefGetComponentInfoTask::ExtractEmbeddedPkgsL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefGetComponentInfoTask::ExtractEmbeddedPkgsL()"));
+	
+	// Start an STS transaction. The extraction of a package requires creation of temporary
+	// files that must be deleted when the GetComponentInfo requiest is complete. This is why
+	// we need this STS transaction here.
+	iSts.CreateTransactionL();
+
+	if (FileName())
+		{
+		SifRefBinPkgExtractor::BuildPkgTreeL(iSts, *FileName(), KRefInstPrivateDir, iEmbeddedComponents);
+		}
+	else if (FileHandle())
+		{
+		SifRefBinPkgExtractor::BuildPkgTreeL(iSts, *FileHandle(), KRefInstPrivateDir, iEmbeddedComponents);
+		}
+	else
+		{
+		ASSERT(0);
+		}
+	
+	// Connect to the SCR. The installer needs this session to check if a component being queried
+	// is already installed and, if yes, obtain its detials.
+	User::LeaveIfError(iScr.Connect());
+	}
+
+TInt CSifRefGetComponentInfoTask::ParsePkgFileL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefGetComponentInfoTask::ParsePkgFileL()"));
+	
+	delete iParser;
+	iParser = NULL;
+
+	// Check if the next component is of the type our installer supports. If yes, add it to the list of
+	// the components to be processed. If not, use the SIF API to obtain its details.
+	const SifRefBinPkgExtractor::CAuxNode& node = *iEmbeddedComponents[iCurrentComponent];
+	if (node.Foreign())
+		{
+		// Connect to the SIF server
+		iComponentInfo = CComponentInfo::NewL();
+		User::LeaveIfError(iSif.Connect());
+
+		// Our installer keeps temporary files under its private folder and therefore we have to
+		// pass a file handle to the SIF API.
+		User::LeaveIfError(iFs.Connect());
+		iFs.ShareProtected();
+		User::LeaveIfError(iFile.Open(iFs, node.FileNameL(), EFileShareReadersOnly));
+
+		// Submit a SIF request 
+		iSif.GetComponentInfo(iFile, *iComponentInfo, *RequestStatus());
+		
+		iSifRequestInProgress = ETrue;
+
+		return ECreateComponentInfoNode;
+		}
+	else
+		{
+		iParser = CSifRefPkgParser::NewL(node.FileNameL());
+		return EFindComponent;
+		}
+	}
+
+TInt CSifRefGetComponentInfoTask::CreateComponentInfoNodeL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefGetComponentInfoTask::CreateComponentInfoNodeL()"));
+	
+	SifRefBinPkgExtractor::CAuxNode& auxNode = *iEmbeddedComponents[iCurrentComponent];
+
+	if (iSifRequestInProgress)
+		{
+		iSif.Close();
+		iFile.Close();
+		iFs.Close();
+		
+		iSifRequestInProgress = EFalse;
+		
+		// Add the root node of iComponentInfo to the tree
+		User::LeaveIfError(RequestStatus()->Int());
+		auxNode.SetCompInfoL(iComponentInfo);
+		iComponentInfo = NULL;
+		}
+	else
+		{
+		// This reference installer uses the KExampleFileSize const value to calculate the maximum size of the installed
+		// component on a phone. This is because the reference package file carries only the list of the files to be installed
+		// without the files themselves. A real installer should use the size of the files to be installed.
+		const TInt KExampleFileSize = 1024;
+		const TInt maxInstalledSize = iParser->Files().Count() * KExampleFileSize;
+		const TBool hasExe = EFalse;
+		// The example capabilities below are hardcoded due to the same reason. The reference package file doesn't contain
+		// user grantable capabilities but a real package file should provide them.
+		TCapabilitySet userGrantableCaps(ECapabilityReadUserData, ECapabilityWriteUserData);
+	
+		// Create a ComponentInfo node and set it as a root node.
+		CComponentInfo::CNode* compInfoNode = CComponentInfo::CNode::NewLC(InstallHelper::KSifReferenceSoftwareType,
+							*iCompSearchData.iName, iCompSearchData.iVersion, *iCompSearchData.iVendor,
+							iCompSearchData.iScomoState, iCompSearchData.iInstallStatus, iCompSearchData.iComponentId,
+							*iCompSearchData.iName, ENotAuthenticated, userGrantableCaps, maxInstalledSize, hasExe);
+		
+		auxNode.SetNodeL(compInfoNode);
+		CleanupStack::Pop(compInfoNode);
+		}
+	
+	return (++iCurrentComponent < iEmbeddedComponents.Count()) ? EParsePkgFile : ESetComponentInfo;
+	}
+
+void CSifRefGetComponentInfoTask::SetComponentInfoL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefGetComponentInfoTask::SetComponentInfoL()"));
+	
+	// At least one node must exist, otherwise we can't reach this point.
+	ASSERT (iEmbeddedComponents.Count() > 0);
+	
+	// Build a real tree of the nodes from iEmbeddedComponents which is a flat list
+	for (TInt i=iEmbeddedComponents.Count()-1; i>=1; --i)
+		{
+		iEmbeddedComponents[i]->RegisterChildToParentL();
+		}
+	
+	// Set the tree built above as the root node of ComponentInfo().
+	iEmbeddedComponents[0]->SetAsRootNodeL(*ComponentInfo());
+	}
+
+// =============================================================================================================
+
+CSifRefInstallTask* CSifRefInstallTask::NewL(TTransportTaskParams& aParams, TInstallerUIHandlerFactory aUiHandlerFactory)
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::NewL()"));
+	
+	CSifRefInstallTask* self = new (ELeave) CSifRefInstallTask(aParams);
+	CleanupStack::PushL(self);
+	self->ConstructL(aUiHandlerFactory);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CSifRefInstallTask::CSifRefInstallTask(TTransportTaskParams& aParams)
+: CSifTransportTask(aParams, EFalse), iStep(EExtractEmbeddedPkgs)
+	{
+	}
+
+CSifRefInstallTask::~CSifRefInstallTask()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::~CSifRefInstallTask()"));
+	
+	iFileList.Close();
+	iFile.Close();
+	iFs.Close();
+	iScr.Close();
+	iSts.Close();
+	iEmbeddedComponents.Close();
+	if (iSifRequestInProgress)
+		{
+		iSif.CancelOperation();
+		}
+	iSif.Close();
+	delete iParser;
+	delete iUiHandler;
+	delete iOpaqueArguments;
+	delete iOpaqueResults;
+	}
+
+void CSifRefInstallTask::ConstructL(TInstallerUIHandlerFactory aUiHandlerFactory)
+	{
+	if ((FileName() == NULL && FileHandle() == NULL) ||
+		CustomArguments() == NULL ||
+		CustomResults() == NULL)
+		{
+		User::Leave(KErrArgument);
+		}
+
+	iUiHandler = InstallHelper::CreateUiHandlerL(CustomArguments(), aUiHandlerFactory);
+	}
+
+TBool CSifRefInstallTask::ExecuteImplL()
+	{
+	DEBUG_PRINTF2(_L8("Exiting from CSifRefInstallTask::ExecuteImplL(), iStep = %d"), iStep);
+	
+	TBool done = EFalse;
+	
+	switch (iStep)
+		{
+		case EExtractEmbeddedPkgs:
+			ExtractEmbeddedPkgsL();
+			++iStep;
+			break;
+
+		case EParsePkgFile:
+			iStep = ParsePkgFileL();
+			break;
+
+		case ELaunchForeignInstall:
+			LaunchForeignInstallL();
+			++iStep;
+			break;
+
+		case EFinishForeignInstall:
+			FinishForeignInstallL();
+			iStep = EParsePkgFile;
+			break;
+
+		case EFindAndCheckComponent:
+			// Next step differs for ENewComponent and EUpgrade
+			iStep = FindAndCheckComponentL();
+			break;
+
+		case EGetInstalledFileList:
+			GetInstalledFileListL();
+			++iStep;
+			break;
+
+		case EUnregisterAndDeleteFile:
+			if (UnregisterAndDeleteFileL())
+				{
+				++iStep;
+				}
+			break;
+
+		case ERegisterComponent:
+			RegisterComponentL();
+			++iStep;
+			break;
+
+		case ECopyFile:
+			if (CopyFileL())
+				{
+				++iStep;
+				}
+			break;
+
+		case ESetScomoState:
+			iStep = SetScomoStateL();
+			break;
+
+		case ECommit:
+			CommitL();
+			done = ETrue;
+			break;
+
+		default:
+			User::Leave(KErrGeneral);
+		}
+
+	if (!iSifRequestInProgress)
+		{
+		TRequestStatus* status(RequestStatus());
+		User::RequestComplete(status, KErrNone);
+		}
+	
+	DEBUG_PRINTF3(_L8("Exiting from CSifRefInstallTask::ExecuteImplL(), done = %d, iStep = %d"), done, iStep);
+	
+	return done;
+	}
+
+namespace
+	{
+	TInt AuxNodeSorter(const SifRefBinPkgExtractor::CAuxNode& aLeft, const SifRefBinPkgExtractor::CAuxNode& aRight)
+		{
+		const TBool l = aLeft.Foreign();
+		const TBool r = aRight.Foreign();
+		if (l == r)
+			{
+			return 0;
+			}
+		else if (!l && r)
+			{
+			return 1;
+			}
+		else
+			{
+			return -1;
+			}
+		}
+	}
+
+void CSifRefInstallTask::ExtractEmbeddedPkgsL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::ExtractEmbeddedPkgsL()"));
+	
+	// Start an STS transaction
+	iSts.CreateTransactionL();
+
+	if (FileName())
+		{
+		SifRefBinPkgExtractor::BuildPkgTreeL(iSts, *FileName(), KRefInstPrivateDir, iEmbeddedComponents);
+		}
+	else if (FileHandle())
+		{
+		SifRefBinPkgExtractor::BuildPkgTreeL(iSts, *FileHandle(), KRefInstPrivateDir, iEmbeddedComponents);
+		}
+	else
+		{
+		ASSERT(0);
+		}
+	
+	// Sort the list of the embedded components in order to install foreign packages first
+	 const TLinearOrder<SifRefBinPkgExtractor::CAuxNode> sortOrder(AuxNodeSorter);
+	iEmbeddedComponents.Sort(sortOrder);
+	}
+
+TInt CSifRefInstallTask::ParsePkgFileL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::ParsePkgFileL()"));
+	
+	TInt nextStep = -1;
+	TRAPD(err, nextStep = ParsePkgFileImplL());
+	if (err != KErrNone)
+		{
+		if (iUiHandler)
+			{
+			iUiHandler->ErrorDescriptionUIHandler(InstallHelper::KUiParserErrorDesc);
+			}
+		User::Leave(err);
+		}
+	
+	return nextStep;
+	}
+
+TInt CSifRefInstallTask::ParsePkgFileImplL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::ParsePkgFileImplL()"));
+	
+	delete iParser;
+	iParser = NULL;
+
+	// Check if the next component is of the type our installer supports. If yes, add it to the list of
+	// the components to be processed. If not, use the SIF API to install it.
+	const SifRefBinPkgExtractor::CAuxNode& node = *iEmbeddedComponents[iCurrentComponent];
+	if (node.Foreign())
+		{
+		return ELaunchForeignInstall;
+		}
+	else
+		{
+		iParser = CSifRefPkgParser::NewL(node.FileNameL());
+		return EFindAndCheckComponent;
+		}
+	}
+
+void CSifRefInstallTask::LaunchForeignInstallL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::LaunchForeignInstallL()"));
+	
+	const SifRefBinPkgExtractor::CAuxNode& node = *iEmbeddedComponents[iCurrentComponent];
+	
+	// Connect to the SIF server
+	User::LeaveIfError(iSif.Connect());
+
+	// Our installer keeps temporary files under its private folder and therefore we have to
+	// pass a file handle to the SIF API.
+	User::LeaveIfError(iFs.Connect());
+	iFs.ShareProtected();
+	User::LeaveIfError(iFile.Open(iFs, node.FileNameL(), EFileShareReadersOnly));
+
+	// Submit a SIF request 
+	iOpaqueArguments = COpaqueNamedParams::NewL();
+	iOpaqueResults = COpaqueNamedParams::NewL();
+	iSif.Install(iFile, *iOpaqueArguments, *iOpaqueResults, *RequestStatus(), EFalse);
+
+	iSifRequestInProgress = ETrue;
+	}
+
+void CSifRefInstallTask::FinishForeignInstallL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::FinishForeignInstallL()"));
+	
+	iSif.Close();
+	iFile.Close();
+	iFs.Close();
+	delete iOpaqueArguments;
+	iOpaqueArguments = NULL;
+	delete iOpaqueResults;
+	iOpaqueResults = NULL;
+	
+	// Check the result of the concurrent installation
+	iSifRequestInProgress = EFalse;
+	User::LeaveIfError(RequestStatus()->Int());
+	
+	// There must be at least one component left because we install foreign components first
+	++iCurrentComponent;
+	}
+
+TInt CSifRefInstallTask::FindAndCheckComponentL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::FindAndCheckComponentL()"));
+	
+	// Connect to the SCR and create a new transaction to continue the installation of our own type
+	if (!iScrTransaction)
+		{
+		User::LeaveIfError(iScr.Connect());
+		iScr.CreateTransactionL();
+		iScrTransaction = ETrue;
+		}
+	
+	// Exit code
+	TInt nextStep = ERegisterComponent;
+	
+	// Check if already installed
+	InstallHelper::FindComponentL(iScr, iCompSearchData, *iParser);
+	switch (iCompSearchData.iInstallStatus)
+		{
+		case ENewComponent:
+			// nextStep already set to ERegisterComponent
+			break;
+
+		case EUpgrade:
+			// Uninstall the previous version
+			nextStep = EGetInstalledFileList;
+			break;
+
+		case EAlreadyInstalled:
+			User::Leave(KErrSifSameVersionAlreadyInstalled);
+			break;
+
+		case ENewerVersionAlreadyInstalled:
+			User::Leave(KErrSifNewerVersionAlreadyInstalled);
+			break;
+
+		default:
+			ASSERT(0);
+		}
+
+	// Ask the user for the confirmation
+	if (iUiHandler != NULL)
+		{
+		userConfirmationL(iCompSearchData.iInstallStatus == ENewComponent ? InstallHelper::EConfirmationInstall : InstallHelper::EConfirmationUpgrade, *iUiHandler, *iCompSearchData.iName, *iCompSearchData.iVendor);
+		}
+
+	return nextStep;
+	}
+
+void CSifRefInstallTask::GetInstalledFileListL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::GetInstalledFileListL()"));
+	
+	// Get a list of files to be deleted
+	iFileList.OpenListL(iScr, iCompSearchData.iComponentId);
+	}
+
+TBool CSifRefInstallTask::UnregisterAndDeleteFileL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::UnregisterAndDeleteFileL()"));
+	
+	return InstallHelper::UnregisterAndDeleteFileL(iScr, iFileList, iSts, iCompSearchData.iComponentId);
+	}
+
+void CSifRefInstallTask::RegisterComponentL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::RegisterComponentL()"));
+	
+	// Register a new component in the SCR
+	RCPointerArray<CLocalizableComponentInfo> componentInfoArray;
+	CleanupClosePushL(componentInfoArray);
+
+	// ...for each language
+	const RLanguageArray& languages = iParser->Languages();
+	const TInt langCount = languages.Count();
+	for (TInt i=0; i<langCount; ++i)
+		{
+		const TDesC& locName = *iParser->ComponentNames()[i];
+		const TDesC& locVendor = *iParser->VendorNames()[i];
+		CLocalizableComponentInfo* componentInfo = CLocalizableComponentInfo::NewLC(locName, locVendor, languages[i]);
+		componentInfoArray.AppendL(componentInfo);
+		CleanupStack::Pop(componentInfo);
+		}
+	iCompSearchData.iComponentId = iScr.AddComponentL(componentInfoArray, InstallHelper::KSifReferenceSoftwareType);
+
+	// Set the version of a new component
+	iScr.SetComponentVersionL(iCompSearchData.iComponentId, iCompSearchData.iVersion);
+
+	CleanupStack::PopAndDestroy(&componentInfoArray);
+
+	iCopyFileIndex = 0;
+	iComponentSize = 0;
+	
+	// Send the id if the installed component to the client. If this is a compound package we send the id of the root component only.
+	if (iEmbeddedComponents[iCurrentComponent]->Root())
+		{
+		CustomResults()->AddIntL(KSifOutParam_ComponentId, iCompSearchData.iComponentId);
+		}
+	}
+
+namespace
+	{
+	TBool CheckPathExistenceL(const TDesC& filePath)
+		{
+		TBool exists = EFalse;
+
+		RFs fs;
+		User::LeaveIfError(fs.Connect());
+		CleanupClosePushL(fs);
+		TEntry entry;
+		TInt error = fs.Entry(filePath, entry);
+		if (error == KErrNone)
+			{
+			exists = ETrue;
+			}
+		else if (error != KErrPathNotFound && error != KErrNotFound)
+			{
+			User::Leave(error);
+			}
+		
+		CleanupStack::PopAndDestroy(&fs);
+		
+		return exists;
+		}
+	}
+
+TBool CSifRefInstallTask::CopyFileL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::CopyFileL()"));
+	
+	// List of files to be copied from a package file 
+	const RCHBufCArray& files = iParser->Files();
+
+	// Register and copy a file if any left
+	if (iCopyFileIndex < files.Count())
+		{
+		// The name of the current file
+		const TDesC& filePath = *files[iCopyFileIndex];
+
+		// Check if filePath already exists
+		if (CheckPathExistenceL(filePath))
+			{
+			// Add a custom result describing the error
+			HBufC* desc = HBufC::NewLC(InstallHelper::KErrFileAlreadyExists.iTypeLength + filePath.Length());
+			TPtr bufDesc = desc->Des();
+			bufDesc.Copy(InstallHelper::KErrFileAlreadyExists);
+			bufDesc.Copy(filePath);
+			CustomResults()->AddStringL(InstallHelper::KParamNameErrDesc, *desc);
+			CleanupStack::PopAndDestroy(desc);
+			}
+
+		// Register the file in the SCR
+		iScr.RegisterComponentFileL(iCompSearchData.iComponentId, filePath);
+
+		// Copy the current file
+		RFile file;
+		iSts.CreateNewL(filePath, file, TFileMode(EFileShareExclusive |EFileWrite));
+		_LIT8(KReferenceFootprint, "This file belongs to the SIF reference component.\n");
+		const TInt numLines = 100; // The operation must take a while to simulate real copying
+		for (TInt i=0; i<numLines; ++i)
+			{
+			User::LeaveIfError(file.Write(KReferenceFootprint));
+			}
+		iComponentSize += KReferenceFootprint.iTypeLength*numLines;
+		file.Close();
+
+		++iCopyFileIndex;
+		}
+	else
+		{
+		// Set the size of the component in the SCR
+		iScr.SetComponentSizeL(iCompSearchData.iComponentId, iComponentSize);
+
+		// Step complete, all the files have been copied
+		return ETrue;
+		}
+
+	// Step not complete, there are still files left
+	
+	DEBUG_PRINTF(_L8("Exiting from CSifRefInstallTask::CopyFileL()"));
+	
+	return EFalse;
+	}
+
+TInt CSifRefInstallTask::SetScomoStateL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::SetScomoStateL()"));
+	
+	// Activate the newly added component
+	TInt inactive = EFalse;
+	if (!CustomArguments()->GetIntByNameL(_L("InstallInactive"), inactive) || !inactive)
+		{
+		iScr.SetScomoStateL(iCompSearchData.iComponentId, EActivated);
+		}
+	
+	// Check if there are any components to be installed left
+	return (++iCurrentComponent < iEmbeddedComponents.Count()) ? EParsePkgFile : ECommit;
+	}
+
+void CSifRefInstallTask::CommitL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefInstallTask::CommitL()"));
+	
+	// Commit the STS & SCR transactions
+	iSts.CommitL();
+	iScr.CommitTransactionL();
+	}
+
+// =============================================================================================================
+
+CSifRefUninstallTask* CSifRefUninstallTask::NewL(TTransportTaskParams& aParams, TInstallerUIHandlerFactory aUiHandlerFactory)
+	{
+	DEBUG_PRINTF(_L8("CSifRefUninstallTask::NewL()"));
+	
+	CSifRefUninstallTask* self = new (ELeave) CSifRefUninstallTask(aParams);
+	CleanupStack::PushL(self);
+	self->ConstructL(aUiHandlerFactory);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CSifRefUninstallTask::CSifRefUninstallTask(TTransportTaskParams& aParams)
+: CSifTransportTask(aParams), iStep(EGetFileList)
+	{
+	}
+
+void CSifRefUninstallTask::ConstructL(TInstallerUIHandlerFactory aUiHandlerFactory)
+	{
+	if (ComponentId() == NULL || CustomArguments() == NULL || CustomResults() == NULL)
+		{
+		User::Leave(KErrArgument);
+		}
+
+	iUiHandler = InstallHelper::CreateUiHandlerL(CustomArguments(), aUiHandlerFactory);
+	}
+
+CSifRefUninstallTask::~CSifRefUninstallTask()
+	{
+	DEBUG_PRINTF(_L8("CSifRefUninstallTask::~CSifRefUninstallTask()"));
+	
+	// Make sure to close sub-session before the session
+	iFileList.Close();	
+	iScr.Close();
+	iSts.Close();
+	delete iUiHandler;
+	}
+
+TBool CSifRefUninstallTask::ExecuteImplL()
+	{
+	DEBUG_PRINTF2(_L8("CSifRefInstallTask::ExecuteImplL(), iStep = %d"), iStep);
+	
+	switch (iStep)
+		{
+		case EGetFileList:
+			GetFileListL();
+			break;
+
+		case EUnregisterAndDeleteFile:
+			if (!UnregisterAndDeleteFileL())
+				{
+				return EFalse;
+				}
+			break;
+
+		case ECommit:
+			CommitL();
+			return ETrue;
+
+		default:
+			User::Leave(KErrGeneral);
+		}
+
+	++iStep;
+
+	DEBUG_PRINTF2(_L8("Exiting from CSifRefInstallTask::ExecuteImplL(), iStep = %d"), iStep);
+	
+	return EFalse;
+	}
+
+void CSifRefUninstallTask::GetFileListL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefUninstallTask::GetFileListL()"));
+	
+	// Connect to the SCR and start a transaction
+	User::LeaveIfError(iScr.Connect());
+	iScr.CreateTransactionL();
+
+	// Ask the user for confirmation
+	if (iUiHandler != NULL)
+		{
+		CComponentEntry* entry = CComponentEntry::NewLC();
+		if (!iScr.GetComponentL(ComponentId(), *entry))
+			{
+			User::Leave(KErrNotFound);
+			}
+		userConfirmationL(InstallHelper::EConfirmationUninstall, *iUiHandler, entry->Name(), entry->Vendor());
+		CleanupStack::PopAndDestroy(entry);
+		}
+
+	// Get a list of files to be deleted
+	iFileList.OpenListL(iScr, ComponentId());
+
+	// Start an STS transaction
+	iSts.CreateTransactionL();
+	}
+
+TBool CSifRefUninstallTask::UnregisterAndDeleteFileL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefUninstallTask::UnregisterAndDeleteFileL()"));
+	
+	return InstallHelper::UnregisterAndDeleteFileL(iScr, iFileList, iSts, ComponentId());
+	}
+
+void CSifRefUninstallTask::CommitL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefUninstallTask::CommitL()"));
+	
+	// Commit the STS & SCR transactions
+	iSts.CommitL();
+	iScr.CommitTransactionL();
+	}
+
+// =============================================================================================================
+
+CSifRefActivateDeactivateTask::CSifRefActivateDeactivateTask(TTransportTaskParams& aParams, TScomoState aScomoState)
+: CSifTransportTask(aParams), iScomoState(aScomoState)
+	{
+	DEBUG_PRINTF(_L8("CSifRefActivateDeactivateTask::CSifRefActivateDeactivateTask()"));
+	}
+
+CSifRefActivateDeactivateTask::~CSifRefActivateDeactivateTask()
+	{
+	DEBUG_PRINTF(_L8("CSifRefActivateDeactivateTask::~CSifRefActivateDeactivateTask()"));
+	
+	iScr.Close();
+	}
+
+TBool CSifRefActivateDeactivateTask::ExecuteImplL()
+	{
+	DEBUG_PRINTF(_L8("CSifRefActivateDeactivateTask::ExecuteImplL()"));
+	
+	if (ComponentId() == NULL)
+		{
+		User::Leave(KErrArgument);
+		}
+
+	// Connect to SCR and activate/deactivate component
+	User::LeaveIfError(iScr.Connect());
+	iScr.SetScomoStateL(ComponentId(), iScomoState);
+
+	return ETrue;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/source/sifrefpkgparser.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,349 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements a package file parser for the Reference Installer.
+*
+*/
+
+
+#include "sifrefpkgparser.h"
+#include <f32file.h>
+#include "usiflog.h"
+#include <usif/usiferror.h>
+
+using namespace Usif;
+
+/**
+A set of helper functions for the parser.
+*/
+namespace
+	{
+	_LIT8(KTxtCRLF, "\r\n");
+	_LIT8(KTxtLanguages, "Languages");
+	_LIT8(KTxtComponentName, "ComponentName");
+	_LIT8(KTxtComponentVendor, "ComponentVendor");
+	_LIT8(KTxtComponentVersion, "ComponentVersion");
+	_LIT8(KTxtFile, "File");
+
+	/** Maximum length of a value string in a package file */
+	const TInt KMaxValueLength = 0xFF;
+
+	void SplitLineL(const TPtrC8& aLine, TPtrC8& aName, TPtrC8& aValue)
+		{
+		const TInt colon = aLine.Locate(':');
+		if (colon == KErrNotFound)
+			{
+			DEBUG_PRINTF2(_L8("Missing colon in line: %S"), &aLine);
+			User::Leave(KErrCorrupt);
+			}
+
+		aName.Set(aLine.Left(colon));
+		aValue.Set(aLine.Mid(colon+1));
+		}
+
+	void SplitValuesL(const TPtrC8& aValues, RCHBufCArray& aValueArray)
+		{
+		TPtrC8 values(aValues);
+		while (values.Size() > 0)
+			{
+			TInt quot = values.Locate('"');
+			if (quot == KErrNotFound)
+				{
+				return;
+				}
+			values.Set(values.Mid(quot+1));
+			quot = values.Locate('"');
+			if (quot == KErrNotFound)
+				{
+				DEBUG_PRINTF2(_L8("Missing closing quotation mark in line: %S"), &aValues);
+				User::Leave(KErrCorrupt);
+				}
+			TPtrC8 token(values.Left(quot));
+
+			HBufC* value = HBufC::NewLC(KMaxValueLength);
+			TPtr valPtr(value->Des());
+			valPtr.Copy(token);
+			aValueArray.AppendL(value);
+			CleanupStack::Pop(value);
+
+			values.Set(values.Mid(quot+1));
+			}
+		}
+
+	void ParseComponentVersionL(const TPtrC8& aStringVersion, TVersion& aVersion)
+		{
+		// Check if already defined
+		if (aVersion.iMajor || aVersion.iMinor || aVersion.iBuild)
+			{
+			DEBUG_PRINTF(_L8("Multiple definition of Component Version"));
+			User::Leave(KErrCorrupt);
+			}
+
+		// Convert the major version number of Component Version
+		TLex8 lex(aStringVersion);
+		lex.SkipSpace();
+		TInt err = lex.Val(aVersion.iMajor);
+		if (err != KErrNone)
+			{
+			DEBUG_PRINTF(_L8("Failed parsing the major version number of Component Version"));
+			User::LeaveIfError(err);
+			}
+		lex.Inc();
+
+		// Convert the minor version number of Component Version
+		err = lex.Val(aVersion.iMinor);
+		if (err != KErrNone)
+			{
+			DEBUG_PRINTF(_L8("Failed parsing the minor version number of Component Version"));
+			User::LeaveIfError(err);
+			}
+		lex.Inc();
+
+		// Convert the build version number of Component Version
+		err = lex.Val(aVersion.iBuild);
+		if (err != KErrNone)
+			{
+			DEBUG_PRINTF(_L8("Failed parsing the build version number of Component Version"));
+			User::LeaveIfError(err);
+			}
+		}
+
+	TLanguage LanguageMapL(TDesC& aLanguage)
+		{
+		if (aLanguage == _L("EN"))
+			{
+			return ELangEnglish;
+			}
+		else if (aLanguage == _L("HU"))
+			{
+			return ELangHungarian;
+			}
+		else if (aLanguage == _L("PL"))
+			{
+			return ELangPolish;
+			}
+
+		DEBUG_PRINTF2(_L8("Language %S is not supported by this Reference Installer"), &aLanguage);
+		User::Leave(KErrSifUnsupportedLanguage);
+		return ELangNone;// Suppress warning
+		}
+	}
+
+CSifRefPkgParser* CSifRefPkgParser::NewL(const TDesC& aFileName)
+	{
+	CSifRefPkgParser* self = new (ELeave) CSifRefPkgParser;
+	CleanupStack::PushL(self);
+	self->ParseL(aFileName);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CSifRefPkgParser::CSifRefPkgParser(): iVersion(0, 0, 0)
+	{
+	}
+
+CSifRefPkgParser::~CSifRefPkgParser()
+	{
+	iLanguages.Close();
+	iComponentNames.Close();
+	iVendorNames.Close();
+	iFiles.Close();
+	}
+
+const RLanguageArray& CSifRefPkgParser::Languages() const
+	{
+	return iLanguages;
+	}
+
+const RCHBufCArray& CSifRefPkgParser::ComponentNames() const
+	{
+	return iComponentNames;
+	}
+
+const RCHBufCArray& CSifRefPkgParser::VendorNames() const
+	{
+	return iVendorNames;
+	}
+
+const TVersion& CSifRefPkgParser::Version() const
+	{
+	return iVersion;
+	}
+
+const RCHBufCArray& CSifRefPkgParser::Files() const
+	{
+	return iFiles;
+	}
+
+void CSifRefPkgParser::ParseL(const TDesC& aFileName)
+	{
+	RFs fs;
+	RFile file;
+	User::LeaveIfError(fs.Connect());
+	CleanupClosePushL(fs);
+	TInt err = file.Open(fs, aFileName, EFileShareReadersOnly);
+	if (err != KErrNone)
+		{
+		DEBUG_PRINTF3(_L8("Failed to open file: %S with error: %d"), &aFileName, err);
+		User::Leave(err);
+		}
+	CleanupClosePushL(file);
+
+	ParseL(file);
+
+	CleanupStack::PopAndDestroy(2, &fs);
+	}
+
+void CSifRefPkgParser::ParseL(RFile& aFileHandle)
+	{
+	// Read the file into the buffer 
+	TInt fileSize = 0;
+	User::LeaveIfError(aFileHandle.Size(fileSize));
+	HBufC8* buffer = HBufC8::NewLC(fileSize);
+	TPtr8 bufPtr = buffer->Des();
+	TInt err = aFileHandle.Read(bufPtr);
+	if (err != KErrNone)
+		{
+		DEBUG_PRINTF2(_L8("Failed to read reference package file with err %d"), err);
+		User::LeaveIfError(err);
+		}
+
+	// Iterate over the lines
+	TPtrC8 lines(*buffer);
+	const TInt crlfLen = TPtrC8(KTxtCRLF).Size();
+	while (lines.Size() > 0)
+		{
+		// Find next line
+		TPtrC8 line;
+		const TInt crlfPos = lines.Find(KTxtCRLF);
+		if (crlfPos != KErrNotFound)
+			{
+			line.Set(lines.Left(crlfPos));
+			lines.Set(lines.Mid(crlfPos+crlfLen));
+			}
+		else
+			{
+			if (lines.Size() > 0)
+				{
+				line.Set(lines);
+				lines.Set(TPtrC8());
+				}
+			}
+		
+		// Split the line into a pair of the name of a tag and its value
+		TPtrC8 name, value;
+		SplitLineL(line, name, value);
+		
+		// Hand over the pair to recognition
+		LineHandlerL(name, value);
+		}
+	CleanupStack::PopAndDestroy(buffer);
+	
+	// Check whether the file we have just parsed wasn't corrupted
+	CheckInvariantL();
+	}
+
+void CSifRefPkgParser::LineHandlerL(const TPtrC8& aName, const TPtrC8& aValue)
+	{
+	if (aName == KTxtLanguages)
+		{
+		if (iLanguages.Count() > 0)
+			{
+			DEBUG_PRINTF(_L8("Multiple definition of languages"));
+			User::Leave(KErrCorrupt);
+			}
+		RCHBufCArray languages;
+		CleanupClosePushL(languages);
+		SplitValuesL(aValue, languages);
+		const TInt count = languages.Count();
+		for (TInt i=0; i<count; ++i)
+			{
+			iLanguages.AppendL(LanguageMapL(*languages[i]));
+			}
+		CleanupStack::PopAndDestroy(&languages);
+		}
+	else if (aName == KTxtComponentName)
+		{
+		if (iComponentNames.Count() > 0)
+			{
+			DEBUG_PRINTF(_L8("Multiple definition of Component Name"));
+			User::Leave(KErrCorrupt);
+			}
+		SplitValuesL(aValue, iComponentNames);
+		}
+	else if (aName == KTxtComponentVendor)
+		{
+		if (iVendorNames.Count() > 0)
+			{
+			DEBUG_PRINTF(_L8("Multiple definition of Component Vendor"));
+			User::Leave(KErrCorrupt);
+			}
+		SplitValuesL(aValue, iVendorNames);
+		}
+	else if (aName == KTxtComponentVersion)
+		{
+		ParseComponentVersionL(aValue, iVersion);
+		}
+	else if (aName == KTxtFile)
+		{
+		HBufC* file = HBufC::NewLC(aValue.Size());
+		TPtr fileBuf = file->Des();
+		fileBuf.Copy(aValue);
+		fileBuf.Trim();
+		iFiles.AppendL(file);
+		CleanupStack::Pop(file);
+		}
+	else
+		{
+		DEBUG_PRINTF2(_L8("Failed due to unrecognized token: %S"), &aName);
+		User::Leave(KErrCorrupt);
+		}
+	}
+
+TInt CSifRefPkgParser::GetLanguageIndex(TLanguage aLanguage) const
+	{
+	const TInt count = iLanguages.Count();
+	for (TInt i=0; i<count; ++i)
+		{
+		if (iLanguages[i] == aLanguage)
+			{
+			return i;
+			}
+		}
+	return KErrNotFound;
+	}
+
+void CSifRefPkgParser::CheckInvariantL() const
+	{
+	if (iVersion.iMajor == 0 && iVersion.iMinor == 0 && iVersion.iBuild == 0)
+		{
+		DEBUG_PRINTF(_L8("Version not specified!"));
+		User::Leave(KErrCorrupt);
+		}
+	if (iLanguages.Count() == 0)
+		{
+		DEBUG_PRINTF(_L8("Language not specified!"));
+		User::Leave(KErrCorrupt);
+		}
+	if (iLanguages.Count() != iComponentNames.Count())
+		{
+		DEBUG_PRINTF(_L8("The number of languages and component names don't match!"));
+		User::Leave(KErrCorrupt);
+		}
+	if (iLanguages.Count() != iVendorNames.Count())
+		{
+		DEBUG_PRINTF(_L8("The number of languages and vendor names don't match!"));
+		User::Leave(KErrCorrupt);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/source/sifrefpkgrec.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,83 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements a package file recognizer for the Reference Installer.
+*
+*/
+
+
+#include <apmrec.h>
+#include <apmstd.h>
+#include <ecom/ecom.h>
+#include <ecom/implementationproxy.h>
+#include "sifrefpkgrec.h"
+
+const TUid KUidSifRefRecognizer = {0x10286351};
+const TInt KSifRefNumMimeTypes = 1;
+const TInt KMaxBufferLength = 0xf;
+
+/**
+A file extension and MIME type for reference package files.
+*/
+_LIT(KSifRefBinPkgFileExt, ".sifrefbinpkg");
+_LIT8(KDataTestMimeType, "binary/sif-refpkg");
+
+CSifRefPkgRecognizer::CSifRefPkgRecognizer()
+	: CApaDataRecognizerType(KUidSifRefRecognizer, CApaDataRecognizerType::EHigh)
+	{
+	iCountDataTypes = KSifRefNumMimeTypes;
+	}
+
+TUint CSifRefPkgRecognizer::PreferredBufSize()
+	{
+	return KMaxBufferLength;
+	}
+
+TDataType CSifRefPkgRecognizer::SupportedDataTypeL(TInt /*aIndex*/) const
+	{
+	return TDataType(KDataTestMimeType);
+	}
+
+void CSifRefPkgRecognizer::DoRecognizeL(const TDesC& aName, const TDesC8& /*aBuffer*/)
+	{
+	// This recognition is based only on the file extension
+	const TInt dotPos = aName.LocateReverse('.');
+	if (dotPos == KErrNotFound)
+		{
+		iConfidence = ENotRecognized;
+		return;
+		}
+	TInt extLen = aName.Length() - dotPos;
+	if (aName.Right(extLen).CompareF(KSifRefBinPkgFileExt) == 0)
+		{
+		iDataType = TDataType(KDataTestMimeType);
+		iConfidence = ECertain;
+		}
+	}
+
+CApaDataRecognizerType* CSifRefPkgRecognizer::CreateRecognizerL()
+	{
+	return new (ELeave) CSifRefPkgRecognizer();
+	}
+
+const TImplementationProxy ImplementationTable[] = 
+	{
+		IMPLEMENTATION_PROXY_ENTRY(0x10286352, CSifRefPkgRecognizer::CreateRecognizerL)
+	};
+
+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/installationservices/refswinstallationplugin/source/sifrefplugin.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,270 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements a SIF plug-in for the Reference Installer.
+*
+*/
+
+
+#include "usiflog.h"
+#include "sifrefplugin.h"
+#include <usif/sif/sif.h>
+#include <usif/sif/sifcommon.h>
+#include <usif/usiferror.h>
+#include <usif/sif/sifplugin.h>
+#include <e32property.h>
+#include <f32file.h>
+
+using namespace Usif;
+
+static const TInt KSifRefPluginImpId = 0x10286350;
+
+static const TImplementationProxy ImplementationTable[] = 
+	{
+	IMPLEMENTATION_PROXY_ENTRY(KSifRefPluginImpId, CSifRefPlugin::NewL)
+	};
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+	{
+	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+	return ImplementationTable;
+	}
+
+CSifRefPlugin* CSifRefPlugin::NewL()
+	{
+	DEBUG_PRINTF(_L8("Constructing CSifRefPlugin"));
+	CSifRefPlugin* self = new (ELeave) CSifRefPlugin();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CSifRefPlugin::ConstructL()
+	{
+	iImpl = CSifRefPluginActiveImpl::NewL();
+	}
+
+CSifRefPlugin::~CSifRefPlugin()
+	{
+	delete iImpl;
+	}
+
+void CSifRefPlugin::CancelOperation()
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - Cancel"));
+	iImpl->Cancel();
+	}
+
+void CSifRefPlugin::GetComponentInfo(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+										 CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - GetComponentInfo by filename"));
+	iImpl->GetComponentInfo(aFileName, aSecurityContext, aComponentInfo, aStatus);
+	}
+
+void CSifRefPlugin::GetComponentInfo(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+						 				CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - GetComponentInfo by file handle"));
+	iImpl->GetComponentInfo(aFileHandle, aSecurityContext, aComponentInfo, aStatus);
+	}
+
+void CSifRefPlugin::Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+								TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - Install by file name"));
+	iImpl->Install(aFileName, aSecurityContext, aInputParams, aOutputParams, aStatus);
+	}
+
+void CSifRefPlugin::Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+								TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - Install by file handle"));
+	iImpl->Install(aFileHandle, aSecurityContext, aInputParams, aOutputParams, aStatus);
+	}
+
+void CSifRefPlugin::Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - Uninstall"));
+	iImpl->Uninstall(aComponentId, aSecurityContext, aInputParams, aOutputParams, aStatus);
+	}
+
+void CSifRefPlugin::Activate(TComponentId aComponentId, const TSecurityContext& aSecurityContext, TRequestStatus& aStatus)
+
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - Activate"));
+	iImpl->Activate(aComponentId, aSecurityContext, aStatus);
+	}
+
+void CSifRefPlugin::Deactivate(TComponentId aComponentId, const TSecurityContext& aSecurityContext, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - Deactivate"));
+	iImpl->Deactivate(aComponentId, aSecurityContext, aStatus);
+	}
+
+//------------------CSifRefPluginActiveImpl---------------------
+
+CSifRefPluginActiveImpl* CSifRefPluginActiveImpl::NewL()
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - Constructing CSifRefPluginActiveImpl"));
+	CSifRefPluginActiveImpl* self = new (ELeave) CSifRefPluginActiveImpl();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(1, self);
+	return self;
+	}
+
+void CSifRefPluginActiveImpl::ConstructL()
+	{
+	CActiveScheduler::Add(this);
+	User::LeaveIfError(iTransporter.Connect());
+	}
+
+CSifRefPluginActiveImpl::~CSifRefPluginActiveImpl()
+	{
+	iTransporter.Close();
+	}
+
+void CSifRefPluginActiveImpl::RunL()
+	{
+	TInt res = iStatus.Int();
+	DEBUG_PRINTF2(_L8("Reference Installer plug-in - Operation finished with result %d"), res);
+
+	User::RequestComplete(iClientStatus, res);
+	iClientStatus = NULL;
+	}
+
+void CSifRefPluginActiveImpl::DoCancel()
+	{
+	ASSERT(iClientStatus);
+	
+	iTransporter.CancelOperation();
+	User::RequestComplete(iClientStatus, iStatus.Int());
+	iClientStatus = NULL;
+	}
+
+TBool CSifRefPluginActiveImpl::CommonRequestPreamble(const TSecurityContext& aSecurityContext, const COpaqueNamedParams& aInputParams, 
+				COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus)
+	{
+	aStatus = KRequestPending;
+	iClientStatus = &aStatus;
+
+	iInputParams = &aInputParams;
+	iOutputParams = &aOutputParams;
+
+	// Check required capabilities here
+	TInt silent = EFalse;
+	TRAP_IGNORE(aInputParams.GetIntByNameL(_L("Silent"), silent));
+	if (silent)
+		{
+		if (!aSecurityContext.HasCapability(ECapabilityTrustedUI))
+			{
+			User::RequestComplete(iClientStatus, KErrPermissionDenied);
+			return EFalse;
+			}
+		}
+
+	return ETrue;
+	}
+
+void CSifRefPluginActiveImpl::GetComponentInfo(const TDesC& aFileName, const TSecurityContext& /*aSecurityContext*/,
+												CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	aStatus = KRequestPending;
+	iClientStatus = &aStatus;
+
+	iTransporter.GetComponentInfo(aFileName, aComponentInfo, iStatus);
+	
+	SetActive();
+	}
+
+void CSifRefPluginActiveImpl::GetComponentInfo(RFile& aFileHandle, const TSecurityContext& /*aSecurityContext*/,
+												CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	aStatus = KRequestPending;
+	iClientStatus = &aStatus;
+
+	iTransporter.GetComponentInfo(aFileHandle, aComponentInfo, iStatus);
+	
+	SetActive();
+	}
+
+void CSifRefPluginActiveImpl::Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+										const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+										TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF2(_L("Reference Installer plug-in - install for %S"), &aFileName);
+
+	if (CommonRequestPreamble(aSecurityContext, aInputParams, aOutputParams, aStatus))
+		{
+		iTransporter.Install(aFileName, aInputParams, aOutputParams, iStatus);
+
+		SetActive();
+		}
+	}
+
+void CSifRefPluginActiveImpl::Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+										const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+										TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - install by file handle"));
+
+	if (CommonRequestPreamble(aSecurityContext, aInputParams, aOutputParams, aStatus))
+		{
+		iTransporter.Install(aFileHandle, aInputParams, aOutputParams, iStatus);
+
+		SetActive();
+		}
+	}
+
+void CSifRefPluginActiveImpl::Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+		  const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - uninstall"));
+
+	if (CommonRequestPreamble(aSecurityContext, aInputParams, aOutputParams, aStatus))
+		{
+		iTransporter.Uninstall(aComponentId, aInputParams, aOutputParams, iStatus);
+
+		SetActive();
+		}
+	}
+
+void CSifRefPluginActiveImpl::Activate(TComponentId aComponentId, const TSecurityContext& /*aSecurityContext*/, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - activate"));
+	
+	aStatus = KRequestPending;
+	iClientStatus = &aStatus;
+
+	iTransporter.Activate(aComponentId, iStatus);
+
+	SetActive();
+	}
+
+void CSifRefPluginActiveImpl::Deactivate(TComponentId aComponentId, const TSecurityContext& /*aSecurityContext*/, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference Installer plug-in - deactivate"));
+
+	aStatus = KRequestPending;
+	iClientStatus = &aStatus;
+
+	iTransporter.Deactivate(aComponentId, iStatus);
+
+	SetActive();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/source/sifrefuihandler.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,32 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements UI callbacks for the SIF Reference Installer
+*
+*/
+
+
+#include "sifrefuihandler.h"
+
+using namespace Usif;
+
+TBool MSifRefUIHandler::ConfirmationUIHandler(const TDesC& aQuestion)
+	{
+	TPtrC QuestionToBeDisplayed(aQuestion);
+	return ETrue;
+	}
+
+void MSifRefUIHandler::ErrorDescriptionUIHandler(const TDesC& /*aDescription*/)
+	{
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/base2.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component 2" "Przykladowy komponent SIF"
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent2\file1.ref
+File: c:\RefComponent2\file2.ref
+File: c:\RefComponent2\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/base3.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,4 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component 3" "Przykladowy komponent SIF 3"
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/fileinusetest.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,5 @@
+Languages: "HU"
+ComponentName: "File in use - reference component"
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian"
+File: c:\refpckg.inuse
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid10.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: EN PL
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid11.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+Files: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid12.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+File c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid2.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,6 @@
+Languages: "EN" "PL"
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid3.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: "EN" "GE"
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF"
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid4.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,6 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF"
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid5.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,6 @@
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF"
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid6.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component"
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid7.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF"
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian"
+File: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid8.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF
+ComponentVersion: 1.00
+ComponentVendor: "Symbian" "Symbian"
+File: c:\RefComponent\file1.ref
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/data/invalid9.sifrefpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+Languages: "EN" "PL"
+ComponentName: "SIF Reference Component" "Przykladowy komponent SIF
+ComponentVersion: 1.00(0)
+ComponentVendor: "Symbian" "Symbian"
+File: 
+File: c:\RefComponent\file2.ref
+File: c:\RefComponent\file3.ref
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/tsifrefinstaller.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,411 @@
+
+[GetComponentInfoByFileNameForUninstalledComponent]
+packageFile=z:\tusif\tsifrefinstaller\data\base.sifrefbinpkg
+operationByFileHandle=False
+root.softwareTypeName=reference
+root.componentName=SIF Reference Component
+root.componentVersion=1.00(0)
+root.componentVendor=Symbian
+root.scomoState=0
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=SIF Reference Component
+root.authenticity=0
+root.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=3072
+root.hasExecutable=False
+
+[GetComponentInfoByFileHandleForInstalledComponent]
+packageFile=z:\tusif\tsifrefinstaller\data\base.sifrefbinpkg
+operationByFileHandle=True
+root.softwareTypeName=reference
+root.componentName=SIF Reference Component
+root.componentVersion=1.00(0)
+root.componentVendor=Symbian
+root.scomoState=1
+root.installStatus=2
+root.componentId=1
+root.globalComponentId=SIF Reference Component
+root.authenticity=0
+root.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=3072
+root.hasExecutable=False
+
+[GetComponentInfoByFileHandleForUninstalledUpgrade]
+packageFile=z:\tusif\tsifrefinstaller\data\upgrade.sifrefbinpkg
+operationByFileHandle=True
+root.softwareTypeName=reference
+root.componentName=SIF Reference Component
+root.componentVersion=1.23(4)
+root.componentVendor=Symbian
+root.scomoState=1
+root.installStatus=1
+root.componentId=1
+root.globalComponentId=SIF Reference Component
+root.authenticity=0
+root.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=2048
+root.hasExecutable=False
+
+[GetComponentInfoByFileHandleForInstalledUpgrade]
+packageFile=z:\tusif\tsifrefinstaller\data\upgrade.sifrefbinpkg
+operationByFileHandle=True
+root.softwareTypeName=reference
+root.componentName=SIF Reference Component
+root.componentVersion=1.23(4)
+root.componentVendor=Symbian
+root.scomoState=1
+root.installStatus=2
+root.componentId=4
+root.globalComponentId=SIF Reference Component
+root.authenticity=0
+root.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=2048
+root.hasExecutable=False
+
+[GetComponentInfoByFileHandleForActivatedComponent]
+packageFile=z:\tusif\tsifrefinstaller\data\base.sifrefbinpkg
+operationByFileHandle=True
+root.softwareTypeName=reference
+root.componentName=SIF Reference Component
+root.componentVersion=1.00(0)
+root.componentVendor=Symbian
+root.scomoState=1
+root.installStatus=2
+root.componentId=3
+root.globalComponentId=SIF Reference Component
+root.authenticity=0
+root.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=3072
+root.hasExecutable=False
+
+[GetComponentInfoByFileHandleForInstalledInactiveComponent]
+packageFile=z:\tusif\tsifrefinstaller\data\base.sifrefbinpkg
+operationByFileHandle=True
+root.softwareTypeName=reference
+root.componentName=SIF Reference Component
+root.componentVersion=1.00(0)
+root.componentVendor=Symbian
+root.scomoState=0
+root.installStatus=2
+root.componentId=3
+root.globalComponentId=SIF Reference Component
+root.authenticity=0
+root.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=3072
+root.hasExecutable=False
+
+[InstallByFileName]
+packageFile=z:\tusif\tsifrefinstaller\data\base.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallFilelessByFileName]
+packageFile=z:\tusif\tsifrefinstaller\data\base3.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallByFileHandle]
+packageFile=z:\tusif\tsifrefinstaller\data\base.sifrefbinpkg
+operationByFileHandle=True
+useEnhancedApi=False
+
+[InstallInactiveByFileName]
+packageFile=z:\tusif\tsifrefinstaller\data\base.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=True
+pluginOpaqueArgumentName0=InstallInactive
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=ComponentId
+pluginRefOpaqueResultType0=String
+pluginRefOpaqueResultValue0=__ANY_VALUE_PERMITTED__
+
+[InstallUpgradeByFileName]
+packageFile=z:\tusif\tsifrefinstaller\data\upgrade.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallHomogeneousCompoundByFileName]
+packageFile=z:\tusif\tsifrefinstaller\data\homogeneouscompound.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallHomogeneousCompoundByFileHandle]
+packageFile=z:\tusif\tsifrefinstaller\data\homogeneouscompound.sifrefbinpkg
+operationByFileHandle=True
+useEnhancedApi=False
+
+[UninstallByNameAndVendor]
+componentName=SIF Reference Component
+componentVendor=Symbian
+useEnhancedApi=False
+
+[UninstallFilelessByNameAndVendor]
+componentName=SIF Reference Component 3
+componentVendor=Symbian
+useEnhancedApi=False
+
+[AsynchronousCancelInstallByFileName]
+packageFile=z:\tusif\tsifrefinstaller\data\homogeneouscompound.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+cancelAfter=100
+
+[InstallInvalidPackage]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid2Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid3Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid4Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid5Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid6Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid7Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid8Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid9Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid10Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid11Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallInvalid12Package]
+packageFile=z:\tusif\tsifrefinstaller\data\invalid2.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[ActivateByNameAndVendor]
+componentName=SIF Reference Component
+componentVendor=Symbian
+
+[DeactivateByNameAndVendor]
+componentName=SIF Reference Component
+componentVendor=Symbian
+
+[VerifyBasePackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file1.ref
+packageFile1=c:\RefComponent\file2.ref
+packageFile2=c:\RefComponent\file3.ref
+scomoState=1
+
+[VerifyFilelessPackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component 3
+componentVendor=Symbian
+scomoState=1
+
+[VerifyInactiveBasePackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file1.ref
+packageFile1=c:\RefComponent\file2.ref
+packageFile2=c:\RefComponent\file3.ref
+scomoState=0
+
+[VerifyUpgradePackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file3.ref
+packageFile1=c:\RefComponent\file4.ref
+scomoState=1
+
+[VerifyPackageNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file1.ref
+packageFile1=c:\RefComponent\file2.ref
+packageFile2=c:\RefComponent\file3.ref
+packageFile3=c:\RefComponent\file4.ref
+
+[VerifyFilelessPackageNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=SIF Reference Component 3
+componentVendor=Symbian
+
+[VerifyPackageNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file1.ref
+packageFile1=c:\RefComponent\file2.ref
+packageFile2=c:\RefComponent\file3.ref
+packageFile3=c:\RefComponent\file4.ref
+
+[VerifyRootPackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component 2
+componentVendor=Symbian
+packageFile0=c:\RefComponent2\file1.ref
+packageFile1=c:\RefComponent2\file2.ref
+packageFile2=c:\RefComponent2\file3.ref
+scomoState=1
+
+[VerifyRootChild0PackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file1.ref
+packageFile1=c:\RefComponent\file2.ref
+packageFile2=c:\RefComponent\file3.ref
+scomoState=1
+
+[VerifyRootChild1PackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component 3
+componentVendor=Symbian
+scomoState=1
+
+[VerifyRootPackageNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=SIF Reference Component 2
+componentVendor=Symbian
+packageFile0=c:\RefComponent2\file1.ref
+packageFile1=c:\RefComponent2\file2.ref
+packageFile2=c:\RefComponent2\file3.ref
+
+[VerifyRootChild0PackageNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file1.ref
+packageFile1=c:\RefComponent\file2.ref
+packageFile2=c:\RefComponent\file3.ref
+
+[VerifyRootChild1PackageNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=SIF Reference Component 3
+componentVendor=Symbian
+
+[UninstallRootByNameAndVendor]
+componentName=SIF Reference Component 2
+componentVendor=Symbian
+useEnhancedApi=False
+
+[UninstallRootChild0ByNameAndVendor]
+componentName=SIF Reference Component
+componentVendor=Symbian
+useEnhancedApi=False
+
+[UninstallRootChild1ByNameAndVendor]
+componentName=SIF Reference Component 3
+componentVendor=Symbian
+useEnhancedApi=False
+
+[GetComponentInfoByFileNameForHomogeneousCompoundPartiallyInstalledComponent]
+packageFile=z:\tusif\tsifrefinstaller\data\homogeneouscompound.sifrefbinpkg
+operationByFileHandle=False
+root.softwareTypeName=reference
+root.componentName=SIF Reference Component 2
+root.componentVersion=1.00(0)
+root.componentVendor=Symbian
+root.scomoState=0
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=SIF Reference Component 2
+root.authenticity=0
+root.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=3072
+root.hasExecutable=False
+root.numChildren=2
+root.child0.softwareTypeName=reference
+root.child0.componentName=SIF Reference Component 3
+root.child0.componentVersion=1.00(0)
+root.child0.componentVendor=Symbian
+root.child0.scomoState=1
+root.child0.installStatus=2
+root.child0.componentId=5
+root.child0.globalComponentId=SIF Reference Component 3
+root.child0.authenticity=0
+root.child0.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.child0.maxInstalledSize=0
+root.child0.hasExecutable=False
+root.child1.softwareTypeName=reference
+root.child1.componentName=SIF Reference Component
+root.child1.componentVersion=1.00(0)
+root.child1.componentVendor=Symbian
+root.child1.scomoState=0
+root.child1.installStatus=0
+root.child1.componentId=0
+root.child1.globalComponentId=SIF Reference Component
+root.child1.authenticity=0
+root.child1.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.child1.maxInstalledSize=3072
+root.child1.hasExecutable=False
+
+[InstallFileInUsePckg]
+packageFile=z:\tusif\tsifrefinstaller\data\fileinusetest.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[UninstallFileInUsePckg]
+componentName=File in use - reference component
+componentVendor=Symbian
+useEnhancedApi=False
+
+[InstallSilentByFilename]
+packageFile=z:\tusif\tsifrefinstaller\data\base.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=True
+pluginOpaqueArgumentName0=Silent
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=ComponentId
+pluginRefOpaqueResultType0=String
+pluginRefOpaqueResultValue0=__ANY_VALUE_PERMITTED__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/refswinstallationplugin/test/scripts/tsifrefinstaller.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,168 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+PRINT Run SIF reference plugin tests
+
+// Delete the SCR Database file
+LOAD_SUITE tscr
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+
+LOAD_SUITE tUsifSuite
+
+// Test GetComponentInfo and Install (use Uninstall)
+// !@file
+//! @SYMTestCaseID		API-SEC-USIF-tsifrefinstaller-0001
+//! @SYMTestStatus		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifrefinstaller-0001
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini GetComponentInfoByFileNameForUninstalledComponent
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini InstallByFileHandle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyBasePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini GetComponentInfoByFileHandleForInstalledComponent
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini GetComponentInfoByFileHandleForUninstalledUpgrade
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini InstallFilelessByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyFilelessPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini UninstallFilelessByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyFilelessPackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifrefinstaller-0001
+
+
+//! @SYMTestCaseID		API-SEC-USIF-tsifrefinstaller-0002
+//! @SYMTestStatus		3. Released
+// Test InstallInactive, Activate, InstallUpgrade, Uninstall (use GetComponentInfo)
+
+START_TESTCASE API-SEC-USIF-tsifrefinstaller-0002
+
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini InstallInactiveByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyInactiveBasePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini GetComponentInfoByFileHandleForInstalledInactiveComponent
+// Activate-deactivate the package
+RUN_TEST_STEP 100 tUsifSuite SifActivateStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini ActivateByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini GetComponentInfoByFileHandleForActivatedComponent
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyBasePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifDeactivateStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini DeactivateByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyInactiveBasePackageExistence
+// And activate again
+RUN_TEST_STEP 100 tUsifSuite SifActivateStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini ActivateByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini InstallUpgradeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini GetComponentInfoByFileHandleForInstalledUpgrade
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyUpgradePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini GetComponentInfoByFileNameForUninstalledComponent
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyPackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifrefinstaller-0002
+
+
+//! @SYMTestCaseID		API-SEC-USIF-tsifrefinstaller-0003
+//! @SYMTestStatus		3. Released
+// Test CancelOperation
+
+START_TESTCASE API-SEC-USIF-tsifrefinstaller-0003
+
+RUN_TEST_STEP !Result=-3 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini AsynchronousCancelInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild0PackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild1PackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifrefinstaller-0003
+
+
+//! @SYMTestCaseID		API-SEC-USIF-tsifrefinstaller-0004
+//! @SYMTestStatus		3. Released
+// Test InstallInvalidPackage
+
+START_TESTCASE API-SEC-USIF-tsifrefinstaller-0004
+
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalidPackage
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid2Package
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid3Package
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid4Package
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid5Package
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid6Package
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid7Package
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid8Package
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid9Package
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid10Package
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid11Package
+RUN_TEST_STEP !Result=-20 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini  InstallInvalid12Package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyPackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifrefinstaller-0004
+
+
+//! @SYMTestCaseID		API-SEC-USIF-tsifrefinstaller-B-0004
+//! @SYMTestStatus		3. Released
+
+// Test GetComponentInfo for homogeneous compound package with installed child
+START_TESTCASE API-SEC-USIF-tsifrefinstaller-B-0004
+
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild0PackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild1PackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini InstallFilelessByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyFilelessPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini GetComponentInfoByFileNameForHomogeneousCompoundPartiallyInstalledComponent
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini UninstallFilelessByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyFilelessPackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifrefinstaller-B-0004
+
+
+//! @SYMTestCaseID		API-SEC-USIF-tsifrefinstaller-0005
+//! @SYMTestStatus		3. Released
+
+// Test Install for homogeneous compound packages
+START_TESTCASE API-SEC-USIF-tsifrefinstaller-0005
+
+// by file name
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild0PackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild1PackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini InstallHomogeneousCompoundByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild0PackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild1PackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini UninstallRootByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini UninstallRootChild0ByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini UninstallRootChild1ByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild0PackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild1PackageNonExistence
+// by file handle
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini InstallHomogeneousCompoundByFileHandle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild0PackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild1PackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini UninstallRootByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini UninstallRootChild0ByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini UninstallRootChild1ByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild0PackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini VerifyRootChild1PackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifrefinstaller-0005
+
+// Wait 3 seconds in order to let the SIF server shutdown itself
+DELAY 3000
+
+PRINT Complate_te_Sif_Tests
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/bwins/scrclientu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,177 @@
+EXPORTS
+	?SetComponentNameL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@W4TLanguage@@@Z @ 1 NONAME ; void Usif::RSoftwareComponentRegistry::SetComponentNameL(int, class TDesC16 const &, enum TLanguage)
+	?CompareVersionsL@RSoftwareComponentRegistry@Usif@@SAHABVTDesC16@@0@Z @ 2 NONAME ; int Usif::RSoftwareComponentRegistry::CompareVersionsL(class TDesC16 const &, class TDesC16 const &)
+	?CommitTransactionL@RSoftwareComponentRegistry@Usif@@QAEXXZ @ 3 NONAME ; void Usif::RSoftwareComponentRegistry::CommitTransactionL(void)
+	?GetDependantComponentsL@RSoftwareComponentRegistry@Usif@@QBEXABVCGlobalComponentId@2@AAV?$RPointerArray@VCVersionedComponentId@Usif@@@@@Z @ 4 NONAME ; void Usif::RSoftwareComponentRegistry::GetDependantComponentsL(class Usif::CGlobalComponentId const &, class RPointerArray<class Usif::CVersionedComponentId> &) const
+	?SetIsComponentPresentL@RSoftwareComponentRegistry@Usif@@QAEXHH@Z @ 5 NONAME ; void Usif::RSoftwareComponentRegistry::SetIsComponentPresentL(int, int)
+	?OpenListL@RSoftwareComponentRegistryFilesList@Usif@@QAEXABVRSoftwareComponentRegistry@2@H@Z @ 6 NONAME ; void Usif::RSoftwareComponentRegistryFilesList::OpenListL(class Usif::RSoftwareComponentRegistry const &, int)
+	?SetFileL@CComponentFilter@Usif@@QAEXABVTDesC16@@@Z @ 7 NONAME ; void Usif::CComponentFilter::SetFileL(class TDesC16 const &)
+	?NewL@CGlobalComponentId@Usif@@SAPAV12@AAVRReadStream@@@Z @ 8 NONAME ; class Usif::CGlobalComponentId * Usif::CGlobalComponentId::NewL(class RReadStream &)
+	?NewL@CComponentEntry@Usif@@SAPAV12@AAVRReadStream@@@Z @ 9 NONAME ; class Usif::CComponentEntry * Usif::CComponentEntry::NewL(class RReadStream &)
+	?ExternalizeL@CLocalizableComponentInfo@Usif@@QBEXAAVRWriteStream@@@Z @ 10 NONAME ; void Usif::CLocalizableComponentInfo::ExternalizeL(class RWriteStream &) const
+	?AddPropertyL@CComponentFilter@Usif@@QAEXABVTDesC16@@ABVTDesC8@@@Z @ 11 NONAME ; void Usif::CComponentFilter::AddPropertyL(class TDesC16 const &, class TDesC8 const &)
+	?ComponentId@CComponentEntry@Usif@@QBEABHXZ @ 12 NONAME ; int const & Usif::CComponentEntry::ComponentId(void) const
+	?BinaryValue@CBinaryPropertyEntry@Usif@@QAEABVTDesC8@@XZ @ 13 NONAME ; class TDesC8 const & Usif::CBinaryPropertyEntry::BinaryValue(void)
+	?VersionTo@CVersionedComponentId@Usif@@QBEPBVTDesC16@@XZ @ 14 NONAME ; class TDesC16 const * Usif::CVersionedComponentId::VersionTo(void) const
+	?InternalizeL@CLocalizedSoftwareTypeName@Usif@@AAEXAAVRReadStream@@@Z @ 15 NONAME ; void Usif::CLocalizedSoftwareTypeName::InternalizeL(class RReadStream &)
+	?SetKnownRevoked@CComponentFilter@Usif@@QAEXH@Z @ 16 NONAME ; void Usif::CComponentFilter::SetKnownRevoked(int)
+	?SetRemovable@CComponentFilter@Usif@@QAEXH@Z @ 17 NONAME ; void Usif::CComponentFilter::SetRemovable(int)
+	?SetIsComponentOriginVerifiedL@RSoftwareComponentRegistry@Usif@@QAEXHH@Z @ 18 NONAME ; void Usif::RSoftwareComponentRegistry::SetIsComponentOriginVerifiedL(int, int)
+	?Locale@CLocalizableCommonData@Usif@@QBE?AW4TLanguage@@XZ @ 19 NONAME ; enum TLanguage Usif::CLocalizableCommonData::Locale(void) const
+	?VendorL@CLocalizableComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 20 NONAME ; class TDesC16 const & Usif::CLocalizableComponentInfo::VendorL(void) const
+	??0RSoftwareComponentRegistryView@Usif@@QAE@XZ @ 21 NONAME ; Usif::RSoftwareComponentRegistryView::RSoftwareComponentRegistryView(void)
+	?IsOriginVerified@CComponentEntry@Usif@@QBEHXZ @ 22 NONAME ; int Usif::CComponentEntry::IsOriginVerified(void) const
+	?SoftwareTypeName@CScrLogEntry@Usif@@QBEABVTDesC16@@XZ @ 23 NONAME ; class TDesC16 const & Usif::CScrLogEntry::SoftwareTypeName(void) const
+	?NewLC@CLocalizedSoftwareTypeName@Usif@@SAPAV12@ABVTDesC16@@W4TLanguage@@@Z @ 24 NONAME ; class Usif::CLocalizedSoftwareTypeName * Usif::CLocalizedSoftwareTypeName::NewLC(class TDesC16 const &, enum TLanguage)
+	?GetPluginUidL@RSoftwareComponentRegistry@Usif@@QBE?AVTUid@@ABVTDesC16@@@Z @ 25 NONAME ; class TUid Usif::RSoftwareComponentRegistry::GetPluginUidL(class TDesC16 const &) const
+	??1CPropertyEntry@Usif@@UAE@XZ @ 26 NONAME ; Usif::CPropertyEntry::~CPropertyEntry(void)
+	?NewLC@CIntPropertyEntry@Usif@@SAPAV12@ABVTDesC16@@_J@Z @ 27 NONAME ; class Usif::CIntPropertyEntry * Usif::CIntPropertyEntry::NewLC(class TDesC16 const &, long long)
+	?SetComponentPropertyL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@_J@Z @ 28 NONAME ; void Usif::RSoftwareComponentRegistry::SetComponentPropertyL(int, class TDesC16 const &, long long)
+	?SetComponentPropertyL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@0W4TLanguage@@@Z @ 29 NONAME ; void Usif::RSoftwareComponentRegistry::SetComponentPropertyL(int, class TDesC16 const &, class TDesC16 const &, enum TLanguage)
+	?OperationTime@CScrLogEntry@Usif@@QBE?BVTTime@@XZ @ 30 NONAME ; class TTime const Usif::CScrLogEntry::OperationTime(void) const
+	?IsComponentOrphanedL@RSoftwareComponentRegistry@Usif@@QAEHH@Z @ 31 NONAME ; int Usif::RSoftwareComponentRegistry::IsComponentOrphanedL(int)
+	?UnregisterComponentFileL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@@Z @ 32 NONAME ; void Usif::RSoftwareComponentRegistry::UnregisterComponentFileL(int, class TDesC16 const &)
+	?NewLC@CBinaryPropertyEntry@Usif@@SAPAV12@ABVTDesC16@@ABVTDesC8@@@Z @ 33 NONAME ; class Usif::CBinaryPropertyEntry * Usif::CBinaryPropertyEntry::NewLC(class TDesC16 const &, class TDesC8 const &)
+	?SetScomoStateL@CComponentFilter@Usif@@QAEXW4TScomoState@2@@Z @ 34 NONAME ; void Usif::CComponentFilter::SetScomoStateL(enum Usif::TScomoState)
+	?NewL@CVersionedComponentId@Usif@@SAPAV12@AAVRReadStream@@@Z @ 35 NONAME ; class Usif::CVersionedComponentId * Usif::CVersionedComponentId::NewL(class RReadStream &)
+	??1CGlobalComponentId@Usif@@UAE@XZ @ 36 NONAME ; Usif::CGlobalComponentId::~CGlobalComponentId(void)
+	?SetVendorNameL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@W4TLanguage@@@Z @ 37 NONAME ; void Usif::RSoftwareComponentRegistry::SetVendorNameL(int, class TDesC16 const &, enum TLanguage)
+	?RollbackTransactionL@RSoftwareComponentRegistry@Usif@@QAEXXZ @ 38 NONAME ; void Usif::RSoftwareComponentRegistry::RollbackTransactionL(void)
+	?ComponentId@CScrLogEntry@Usif@@QBEHXZ @ 39 NONAME ; int Usif::CScrLogEntry::ComponentId(void) const
+	?GlobalIdName@CGlobalComponentId@Usif@@QBEABVTDesC16@@XZ @ 40 NONAME ; class TDesC16 const & Usif::CGlobalComponentId::GlobalIdName(void) const
+	?Close@RSoftwareComponentRegistry@Usif@@QAEXXZ @ 41 NONAME ; void Usif::RSoftwareComponentRegistry::Close(void)
+	?DeleteSoftwareTypeL@RSoftwareComponentRegistry@Usif@@QAEXABVTDesC16@@AAV?$RPointerArray@VHBufC16@@@@@Z @ 42 NONAME ; void Usif::RSoftwareComponentRegistry::DeleteSoftwareTypeL(class TDesC16 const &, class RPointerArray<class HBufC16> &)
+	?NewLC@CGlobalComponentId@Usif@@SAPAV12@XZ @ 43 NONAME ; class Usif::CGlobalComponentId * Usif::CGlobalComponentId::NewLC(void)
+	?InternalizeL@CGlobalComponentId@Usif@@QAEXAAVRReadStream@@@Z @ 44 NONAME ; void Usif::CGlobalComponentId::InternalizeL(class RReadStream &)
+	?NextComponentL@RSoftwareComponentRegistryView@Usif@@QBEPAVCComponentEntry@2@W4TLanguage@@@Z @ 45 NONAME ; class Usif::CComponentEntry * Usif::RSoftwareComponentRegistryView::NextComponentL(enum TLanguage) const
+	?LocaleL@CLocalizablePropertyEntry@Usif@@QBE?AW4TLanguage@@XZ @ 46 NONAME ; enum TLanguage Usif::CLocalizablePropertyEntry::LocaleL(void) const
+	?IsDrmProtected@CComponentEntry@Usif@@QBEHXZ @ 47 NONAME ; int Usif::CComponentEntry::IsDrmProtected(void) const
+	?PropertyType@CLocalizablePropertyEntry@Usif@@UBE?AW4TPropertyType@CPropertyEntry@2@XZ @ 48 NONAME ; enum Usif::CPropertyEntry::TPropertyType Usif::CLocalizablePropertyEntry::PropertyType(void) const
+	?InstallTimeL@CComponentEntry@Usif@@QBE?AVTTime@@XZ @ 49 NONAME ; class TTime Usif::CComponentEntry::InstallTimeL(void) const
+	??1CVersionedComponentId@Usif@@UAE@XZ @ 50 NONAME ; Usif::CVersionedComponentId::~CVersionedComponentId(void)
+	?GetComponentsL@RSoftwareComponentRegistry@Usif@@QBEXABVTDesC16@@AAV?$RArray@H@@@Z @ 51 NONAME ; void Usif::RSoftwareComponentRegistry::GetComponentsL(class TDesC16 const &, class RArray<int> &) const
+	?OperationType@CScrLogEntry@Usif@@QBE?AW4TScrComponentOperationType@2@XZ @ 52 NONAME ; enum Usif::TScrComponentOperationType Usif::CScrLogEntry::OperationType(void) const
+	?IntValue@CIntPropertyEntry@Usif@@QAEHXZ @ 53 NONAME ; int Usif::CIntPropertyEntry::IntValue(void)
+	?ScomoState@CComponentEntry@Usif@@QBEABW4TScomoState@2@XZ @ 54 NONAME ; enum Usif::TScomoState const & Usif::CComponentEntry::ScomoState(void) const
+	?ExternalizeL@CGlobalComponentId@Usif@@QBEXAAVRWriteStream@@@Z @ 55 NONAME ; void Usif::CGlobalComponentId::ExternalizeL(class RWriteStream &) const
+	?SetIsComponentHiddenL@RSoftwareComponentRegistry@Usif@@QAEXHH@Z @ 56 NONAME ; void Usif::RSoftwareComponentRegistry::SetIsComponentHiddenL(int, int)
+	?SetFilePropertyL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@0ABVTDesC8@@@Z @ 57 NONAME ; void Usif::RSoftwareComponentRegistry::SetFilePropertyL(int, class TDesC16 const &, class TDesC16 const &, class TDesC8 const &)
+	?SetHidden@CComponentFilter@Usif@@QAEXH@Z @ 58 NONAME ; void Usif::CComponentFilter::SetHidden(int)
+	?DeleteComponentPropertyL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@@Z @ 59 NONAME ; void Usif::RSoftwareComponentRegistry::DeleteComponentPropertyL(int, class TDesC16 const &)
+	?NewL@CScrLogEntry@Usif@@SAPAV12@ABVTDesC16@@000W4TScrComponentOperationType@2@@Z @ 60 NONAME ; class Usif::CScrLogEntry * Usif::CScrLogEntry::NewL(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, enum Usif::TScrComponentOperationType)
+	?NewL@CComponentFilter@Usif@@SAPAV12@AAVRReadStream@@@Z @ 61 NONAME ; class Usif::CComponentFilter * Usif::CComponentFilter::NewL(class RReadStream &)
+	?NewL@CPropertyEntry@Usif@@SAPAV12@AAVRReadStream@@@Z @ 62 NONAME ; class Usif::CPropertyEntry * Usif::CPropertyEntry::NewL(class RReadStream &)
+	?InternalizeL@CVersionedComponentId@Usif@@QAEXAAVRReadStream@@@Z @ 63 NONAME ; void Usif::CVersionedComponentId::InternalizeL(class RReadStream &)
+	?InternalizeL@CLocalizableComponentInfo@Usif@@AAEXAAVRReadStream@@@Z @ 64 NONAME ; void Usif::CLocalizableComponentInfo::InternalizeL(class RReadStream &)
+	?ComponentSize@CComponentEntry@Usif@@QBE_JXZ @ 65 NONAME ; long long Usif::CComponentEntry::ComponentSize(void) const
+	?ExternalizeL@CPropertyEntry@Usif@@QBEXAAVRWriteStream@@@Z @ 66 NONAME ; void Usif::CPropertyEntry::ExternalizeL(class RWriteStream &) const
+	?GlobalId@CVersionedComponentId@Usif@@QBEABVCGlobalComponentId@2@XZ @ 67 NONAME ; class Usif::CGlobalComponentId const & Usif::CVersionedComponentId::GlobalId(void) const
+	?CreateTransactionL@RSoftwareComponentRegistry@Usif@@QAEXXZ @ 68 NONAME ; void Usif::RSoftwareComponentRegistry::CreateTransactionL(void)
+	?NewLC@CScrLogEntry@Usif@@SAPAV12@ABVTDesC16@@000W4TScrComponentOperationType@2@@Z @ 69 NONAME ; class Usif::CScrLogEntry * Usif::CScrLogEntry::NewLC(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, enum Usif::TScrComponentOperationType)
+	?SetSoftwareTypeL@CComponentFilter@Usif@@QAEXABVTDesC16@@@Z @ 70 NONAME ; void Usif::CComponentFilter::SetSoftwareTypeL(class TDesC16 const &)
+	?AddSoftwareTypeL@RSoftwareComponentRegistry@Usif@@QAEXABVTDesC16@@VTUid@@VTSecureId@@2ABV?$RPointerArray@VHBufC16@@@@PBV?$RPointerArray@VCLocalizedSoftwareTypeName@Usif@@@@@Z @ 71 NONAME ; void Usif::RSoftwareComponentRegistry::AddSoftwareTypeL(class TDesC16 const &, class TUid, class TSecureId, class TSecureId, class RPointerArray<class HBufC16> const &, class RPointerArray<class Usif::CLocalizedSoftwareTypeName> const *)
+	?NewL@CBinaryPropertyEntry@Usif@@SAPAV12@ABVTDesC16@@ABVTDesC8@@@Z @ 72 NONAME ; class Usif::CBinaryPropertyEntry * Usif::CBinaryPropertyEntry::NewL(class TDesC16 const &, class TDesC8 const &)
+	?IsKnownRevoked@CComponentEntry@Usif@@QBEHXZ @ 73 NONAME ; int Usif::CComponentEntry::IsKnownRevoked(void) const
+	?RetrieveLogEntriesL@RSoftwareComponentRegistry@Usif@@QBEXAAV?$RPointerArray@VCScrLogEntry@Usif@@@@PBVTDesC16@@@Z @ 74 NONAME ; void Usif::RSoftwareComponentRegistry::RetrieveLogEntriesL(class RPointerArray<class Usif::CScrLogEntry> &, class TDesC16 const *) const
+	?SetFilePropertyL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@0H@Z @ 75 NONAME ; void Usif::RSoftwareComponentRegistry::SetFilePropertyL(int, class TDesC16 const &, class TDesC16 const &, int)
+	?SetVendorL@CComponentFilter@Usif@@QAEXABVTDesC16@@@Z @ 76 NONAME ; void Usif::CComponentFilter::SetVendorL(class TDesC16 const &)
+	?GetSupplierComponentsL@RSoftwareComponentRegistry@Usif@@QBEXABVCGlobalComponentId@2@AAV?$RPointerArray@VCVersionedComponentId@Usif@@@@@Z @ 77 NONAME ; void Usif::RSoftwareComponentRegistry::GetSupplierComponentsL(class Usif::CGlobalComponentId const &, class RPointerArray<class Usif::CVersionedComponentId> &) const
+	?PropertyType@CBinaryPropertyEntry@Usif@@UBE?AW4TPropertyType@CPropertyEntry@2@XZ @ 78 NONAME ; enum Usif::CPropertyEntry::TPropertyType Usif::CBinaryPropertyEntry::PropertyType(void) const
+	?NameL@CLocalizableComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 79 NONAME ; class TDesC16 const & Usif::CLocalizableComponentInfo::NameL(void) const
+	?SetIsComponentDrmProtectedL@RSoftwareComponentRegistry@Usif@@QAEXHH@Z @ 80 NONAME ; void Usif::RSoftwareComponentRegistry::SetIsComponentDrmProtectedL(int, int)
+	?ComponentVersion@CScrLogEntry@Usif@@QBEABVTDesC16@@XZ @ 81 NONAME ; class TDesC16 const & Usif::CScrLogEntry::ComponentVersion(void) const
+	?NextComponentSetL@RSoftwareComponentRegistryView@Usif@@QBEXHAAV?$RPointerArray@VCComponentEntry@Usif@@@@W4TLanguage@@@Z @ 82 NONAME ; void Usif::RSoftwareComponentRegistryView::NextComponentSetL(int, class RPointerArray<class Usif::CComponentEntry> &, enum TLanguage) const
+	?ExternalizeL@CComponentFilter@Usif@@QBEXAAVRWriteStream@@@Z @ 83 NONAME ; void Usif::CComponentFilter::ExternalizeL(class RWriteStream &) const
+	?PropertyName@CPropertyEntry@Usif@@QBEABVTDesC16@@XZ @ 84 NONAME ; class TDesC16 const & Usif::CPropertyEntry::PropertyName(void) const
+	?InstalledDrives@CComponentEntry@Usif@@QBEABV?$TBuf8@$0BK@@@XZ @ 85 NONAME ; class TBuf8<26> const & Usif::CComponentEntry::InstalledDrives(void) const
+	?NewL@CVersionedComponentId@Usif@@SAPAV12@ABVCGlobalComponentId@2@PBVTDesC16@@1@Z @ 86 NONAME ; class Usif::CVersionedComponentId * Usif::CVersionedComponentId::NewL(class Usif::CGlobalComponentId const &, class TDesC16 const *, class TDesC16 const *)
+	?SetIsComponentKnownRevokedL@RSoftwareComponentRegistry@Usif@@QAEXHH@Z @ 87 NONAME ; void Usif::RSoftwareComponentRegistry::SetIsComponentKnownRevokedL(int, int)
+	??1CComponentEntry@Usif@@UAE@XZ @ 88 NONAME ; Usif::CComponentEntry::~CComponentEntry(void)
+	?AddPropertyL@CComponentFilter@Usif@@QAEXABVTDesC16@@_J@Z @ 89 NONAME ; void Usif::CComponentFilter::AddPropertyL(class TDesC16 const &, long long)
+	?NewLC@CComponentEntry@Usif@@SAPAV12@ABHABVTDesC16@@111H_JABW4TScomoState@2@ABV?$TBuf8@$0BK@@@11HHHH@Z @ 90 NONAME ; class Usif::CComponentEntry * Usif::CComponentEntry::NewLC(int const &, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, int, long long, enum Usif::TScomoState const &, class TBuf8<26> const &, class TDesC16 const &, class TDesC16 const &, int, int, int, int)
+	?NextFileSetL@RSoftwareComponentRegistryFilesList@Usif@@QBEXHAAV?$RPointerArray@VHBufC16@@@@@Z @ 91 NONAME ; void Usif::RSoftwareComponentRegistryFilesList::NextFileSetL(int, class RPointerArray<class HBufC16> &) const
+	?ConstructL@CLocalizedSoftwareTypeName@Usif@@AAEXABVTDesC16@@@Z @ 92 NONAME ; void Usif::CLocalizedSoftwareTypeName::ConstructL(class TDesC16 const &)
+	?IsComponentOnReadOnlyDriveL@RSoftwareComponentRegistry@Usif@@QBEHH@Z @ 93 NONAME ; int Usif::RSoftwareComponentRegistry::IsComponentOnReadOnlyDriveL(int) const
+	?GetComponentPropertiesL@RSoftwareComponentRegistry@Usif@@QBEXHAAV?$RPointerArray@VCPropertyEntry@Usif@@@@W4TLanguage@@@Z @ 94 NONAME ; void Usif::RSoftwareComponentRegistry::GetComponentPropertiesL(int, class RPointerArray<class Usif::CPropertyEntry> &, enum TLanguage) const
+	?ExternalizeL@CLocalizedSoftwareTypeName@Usif@@QBEXAAVRWriteStream@@@Z @ 95 NONAME ; void Usif::CLocalizedSoftwareTypeName::ExternalizeL(class RWriteStream &) const
+	?SetOriginVerified@CComponentFilter@Usif@@QAEXH@Z @ 96 NONAME ; void Usif::CComponentFilter::SetOriginVerified(int)
+	?NewL@CLocalizableComponentInfo@Usif@@SAPAV12@AAVRReadStream@@@Z @ 97 NONAME ; class Usif::CLocalizableComponentInfo * Usif::CLocalizableComponentInfo::NewL(class RReadStream &)
+	?SetComponentSizeL@RSoftwareComponentRegistry@Usif@@QAEXH_J@Z @ 98 NONAME ; void Usif::RSoftwareComponentRegistry::SetComponentSizeL(int, long long)
+	?NewLC@CComponentFilter@Usif@@SAPAV12@XZ @ 99 NONAME ; class Usif::CComponentFilter * Usif::CComponentFilter::NewLC(void)
+	?GetComponentIdL@RSoftwareComponentRegistry@Usif@@QBEHABVTDesC16@@0@Z @ 100 NONAME ; int Usif::RSoftwareComponentRegistry::GetComponentIdL(class TDesC16 const &, class TDesC16 const &) const
+	?NewL@CLocalizablePropertyEntry@Usif@@SAPAV12@ABVTDesC16@@0W4TLanguage@@@Z @ 101 NONAME ; class Usif::CLocalizablePropertyEntry * Usif::CLocalizablePropertyEntry::NewL(class TDesC16 const &, class TDesC16 const &, enum TLanguage)
+	?StrValue@CLocalizablePropertyEntry@Usif@@QBEABVTDesC16@@XZ @ 102 NONAME ; class TDesC16 const & Usif::CLocalizablePropertyEntry::StrValue(void) const
+	?NewL@CLocalizedSoftwareTypeName@Usif@@SAPAV12@AAVRReadStream@@@Z @ 103 NONAME ; class Usif::CLocalizedSoftwareTypeName * Usif::CLocalizedSoftwareTypeName::NewL(class RReadStream &)
+	?NewLC@CVersionedComponentId@Usif@@SAPAV12@ABVCGlobalComponentId@2@PBVTDesC16@@1@Z @ 104 NONAME ; class Usif::CVersionedComponentId * Usif::CVersionedComponentId::NewLC(class Usif::CGlobalComponentId const &, class TDesC16 const *, class TDesC16 const *)
+	?Connect@RSoftwareComponentRegistry@Usif@@QAEHXZ @ 105 NONAME ; int Usif::RSoftwareComponentRegistry::Connect(void)
+	?GetComponentIdsL@RSoftwareComponentRegistry@Usif@@QBEXAAV?$RArray@H@@PAVCComponentFilter@2@@Z @ 106 NONAME ; void Usif::RSoftwareComponentRegistry::GetComponentIdsL(class RArray<int> &, class Usif::CComponentFilter *) const
+	?NewL@CGlobalComponentId@Usif@@SAPAV12@ABVTDesC16@@0@Z @ 107 NONAME ; class Usif::CGlobalComponentId * Usif::CGlobalComponentId::NewL(class TDesC16 const &, class TDesC16 const &)
+	?NewL@CLocalizableComponentInfo@Usif@@SAPAV12@ABVTDesC16@@0W4TLanguage@@@Z @ 108 NONAME ; class Usif::CLocalizableComponentInfo * Usif::CLocalizableComponentInfo::NewL(class TDesC16 const &, class TDesC16 const &, enum TLanguage)
+	?Close@RSoftwareComponentRegistryView@Usif@@QAEXXZ @ 109 NONAME ; void Usif::RSoftwareComponentRegistryView::Close(void)
+	??1CBinaryPropertyEntry@Usif@@UAE@XZ @ 110 NONAME ; Usif::CBinaryPropertyEntry::~CBinaryPropertyEntry(void)
+	?AddComponentL@RSoftwareComponentRegistry@Usif@@QAEHABV?$RPointerArray@VCLocalizableComponentInfo@Usif@@@@ABVTDesC16@@PBV4@W4TScrComponentOperationType@2@@Z @ 111 NONAME ; int Usif::RSoftwareComponentRegistry::AddComponentL(class RPointerArray<class Usif::CLocalizableComponentInfo> const &, class TDesC16 const &, class TDesC16 const *, enum Usif::TScrComponentOperationType)
+	?GetComponentL@RSoftwareComponentRegistry@Usif@@QBEPAVCComponentEntry@2@ABVTDesC16@@0W4TLanguage@@@Z @ 112 NONAME ; class Usif::CComponentEntry * Usif::RSoftwareComponentRegistry::GetComponentL(class TDesC16 const &, class TDesC16 const &, enum TLanguage) const
+	??0RSoftwareComponentRegistryFilesList@Usif@@QAE@XZ @ 113 NONAME ; Usif::RSoftwareComponentRegistryFilesList::RSoftwareComponentRegistryFilesList(void)
+	?GlobalId@CScrLogEntry@Usif@@QBEABVTDesC16@@XZ @ 114 NONAME ; class TDesC16 const & Usif::CScrLogEntry::GlobalId(void) const
+	?SetDrmProtected@CComponentFilter@Usif@@QAEXH@Z @ 115 NONAME ; void Usif::CComponentFilter::SetDrmProtected(int)
+	?GetPluginUidL@RSoftwareComponentRegistry@Usif@@QBE?AVTUid@@H@Z @ 116 NONAME ; class TUid Usif::RSoftwareComponentRegistry::GetPluginUidL(int) const
+	?SetScomoStateL@RSoftwareComponentRegistry@Usif@@QBEXHW4TScomoState@2@@Z @ 117 NONAME ; void Usif::RSoftwareComponentRegistry::SetScomoStateL(int, enum Usif::TScomoState) const
+	?IsComponentPresentL@RSoftwareComponentRegistry@Usif@@QBEHH@Z @ 118 NONAME ; int Usif::RSoftwareComponentRegistry::IsComponentPresentL(int) const
+	?Name@CComponentEntry@Usif@@QBEABVTDesC16@@XZ @ 119 NONAME ; class TDesC16 const & Usif::CComponentEntry::Name(void) const
+	?DeleteFilePropertyL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@0@Z @ 120 NONAME ; void Usif::RSoftwareComponentRegistry::DeleteFilePropertyL(int, class TDesC16 const &, class TDesC16 const &)
+	?InternalizeL@CScrLogEntry@Usif@@QAEXAAVRReadStream@@@Z @ 121 NONAME ; void Usif::CScrLogEntry::InternalizeL(class RReadStream &)
+	??1CIntPropertyEntry@Usif@@UAE@XZ @ 122 NONAME ; Usif::CIntPropertyEntry::~CIntPropertyEntry(void)
+	?AddPropertyL@CComponentFilter@Usif@@QAEXABVTDesC16@@0W4TLanguage@@@Z @ 123 NONAME ; void Usif::CComponentFilter::AddPropertyL(class TDesC16 const &, class TDesC16 const &, enum TLanguage)
+	?ExternalizeL@CComponentEntry@Usif@@QBEXAAVRWriteStream@@@Z @ 124 NONAME ; void Usif::CComponentEntry::ExternalizeL(class RWriteStream &) const
+	?DeleteComponentL@RSoftwareComponentRegistry@Usif@@QAEXH@Z @ 125 NONAME ; void Usif::RSoftwareComponentRegistry::DeleteComponentL(int)
+	?SoftwareTypeName@CGlobalComponentId@Usif@@QBEABVTDesC16@@XZ @ 126 NONAME ; class TDesC16 const & Usif::CGlobalComponentId::SoftwareTypeName(void) const
+	?NewL@CLocalizedSoftwareTypeName@Usif@@SAPAV12@ABVTDesC16@@W4TLanguage@@@Z @ 127 NONAME ; class Usif::CLocalizedSoftwareTypeName * Usif::CLocalizedSoftwareTypeName::NewL(class TDesC16 const &, enum TLanguage)
+	?NewL@CIntPropertyEntry@Usif@@SAPAV12@ABVTDesC16@@_J@Z @ 128 NONAME ; class Usif::CIntPropertyEntry * Usif::CIntPropertyEntry::NewL(class TDesC16 const &, long long)
+	?NameL@CLocalizedSoftwareTypeName@Usif@@QBEABVTDesC16@@XZ @ 129 NONAME ; class TDesC16 const & Usif::CLocalizedSoftwareTypeName::NameL(void) const
+	?NewL@CComponentEntry@Usif@@SAPAV12@XZ @ 130 NONAME ; class Usif::CComponentEntry * Usif::CComponentEntry::NewL(void)
+	?SetInstalledDrivesL@CComponentFilter@Usif@@QAEXABV?$TBuf8@$0BK@@@@Z @ 131 NONAME ; void Usif::CComponentFilter::SetInstalledDrivesL(class TBuf8<26> const &)
+	?ExternalizeL@CVersionedComponentId@Usif@@QBEXAAVRWriteStream@@@Z @ 132 NONAME ; void Usif::CVersionedComponentId::ExternalizeL(class RWriteStream &) const
+	?SetComponentPropertyL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@ABVTDesC8@@@Z @ 133 NONAME ; void Usif::RSoftwareComponentRegistry::SetComponentPropertyL(int, class TDesC16 const &, class TDesC8 const &)
+	?GetComponentPropertyL@RSoftwareComponentRegistry@Usif@@QBEPAVCPropertyEntry@2@HABVTDesC16@@W4TLanguage@@@Z @ 134 NONAME ; class Usif::CPropertyEntry * Usif::RSoftwareComponentRegistry::GetComponentPropertyL(int, class TDesC16 const &, enum TLanguage) const
+	?IsHidden@CComponentEntry@Usif@@QBEHXZ @ 135 NONAME ; int Usif::CComponentEntry::IsHidden(void) const
+	?NextFileL@RSoftwareComponentRegistryFilesList@Usif@@QBEPAVHBufC16@@XZ @ 136 NONAME ; class HBufC16 * Usif::RSoftwareComponentRegistryFilesList::NextFileL(void) const
+	?AddComponentL@RSoftwareComponentRegistry@Usif@@QAEHABVTDesC16@@00PBV3@W4TScrComponentOperationType@2@@Z @ 137 NONAME ; int Usif::RSoftwareComponentRegistry::AddComponentL(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, class TDesC16 const *, enum Usif::TScrComponentOperationType)
+	?ComponentName@CScrLogEntry@Usif@@QBEABVTDesC16@@XZ @ 138 NONAME ; class TDesC16 const & Usif::CScrLogEntry::ComponentName(void) const
+	?InternalizeL@CComponentEntry@Usif@@QAEXAAVRReadStream@@@Z @ 139 NONAME ; void Usif::CComponentEntry::InternalizeL(class RReadStream &)
+	?ExternalizeL@CScrLogEntry@Usif@@QBEXAAVRWriteStream@@@Z @ 140 NONAME ; void Usif::CScrLogEntry::ExternalizeL(class RWriteStream &) const
+	?OpenViewL@RSoftwareComponentRegistryView@Usif@@QAEXABVRSoftwareComponentRegistry@2@PAVCComponentFilter@2@@Z @ 141 NONAME ; void Usif::RSoftwareComponentRegistryView::OpenViewL(class Usif::RSoftwareComponentRegistry const &, class Usif::CComponentFilter *)
+	?Version@CComponentEntry@Usif@@QBEABVTDesC16@@XZ @ 142 NONAME ; class TDesC16 const & Usif::CComponentEntry::Version(void) const
+	?NewLC@CScrLogEntry@Usif@@SAPAV12@AAVRReadStream@@@Z @ 143 NONAME ; class Usif::CScrLogEntry * Usif::CScrLogEntry::NewLC(class RReadStream &)
+	?SetIsComponentRemovableL@RSoftwareComponentRegistry@Usif@@QAEXHH@Z @ 144 NONAME ; void Usif::RSoftwareComponentRegistry::SetIsComponentRemovableL(int, int)
+	?ConstructL@CLocalizableComponentInfo@Usif@@AAEXABVTDesC16@@0@Z @ 145 NONAME ; void Usif::CLocalizableComponentInfo::ConstructL(class TDesC16 const &, class TDesC16 const &)
+	?GetComponentFilesCountL@RSoftwareComponentRegistry@Usif@@QBEIH@Z @ 146 NONAME ; unsigned int Usif::RSoftwareComponentRegistry::GetComponentFilesCountL(int) const
+	?IsRemovable@CComponentEntry@Usif@@QBEHXZ @ 147 NONAME ; int Usif::CComponentEntry::IsRemovable(void) const
+	?NewL@CComponentFilter@Usif@@SAPAV12@XZ @ 148 NONAME ; class Usif::CComponentFilter * Usif::CComponentFilter::NewL(void)
+	?GlobalId@CComponentEntry@Usif@@QBEABVTDesC16@@XZ @ 149 NONAME ; class TDesC16 const & Usif::CComponentEntry::GlobalId(void) const
+	?IsMediaPresentL@RSoftwareComponentRegistry@Usif@@QBEHH@Z @ 150 NONAME ; int Usif::RSoftwareComponentRegistry::IsMediaPresentL(int) const
+	?Vendor@CComponentEntry@Usif@@QBEABVTDesC16@@XZ @ 151 NONAME ; class TDesC16 const & Usif::CComponentEntry::Vendor(void) const
+	?RegisterComponentFileL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@H@Z @ 152 NONAME ; void Usif::RSoftwareComponentRegistry::RegisterComponentFileL(int, class TDesC16 const &, TBool)
+	?NewLC@CVersionedComponentId@Usif@@SAPAV12@XZ @ 153 NONAME ; class Usif::CVersionedComponentId * Usif::CVersionedComponentId::NewLC(void)
+	?GetFilePropertyL@RSoftwareComponentRegistry@Usif@@QBEPAVCPropertyEntry@2@HABVTDesC16@@0@Z @ 154 NONAME ; class Usif::CPropertyEntry * Usif::RSoftwareComponentRegistry::GetFilePropertyL(int, class TDesC16 const &, class TDesC16 const &) const
+	?VersionFrom@CVersionedComponentId@Usif@@QBEPBVTDesC16@@XZ @ 155 NONAME ; class TDesC16 const * Usif::CVersionedComponentId::VersionFrom(void) const
+	?GetComponentL@RSoftwareComponentRegistry@Usif@@QBEHHAAVCComponentEntry@2@W4TLanguage@@@Z @ 156 NONAME ; int Usif::RSoftwareComponentRegistry::GetComponentL(int, class Usif::CComponentEntry &, enum TLanguage) const
+	??1CLocalizablePropertyEntry@Usif@@UAE@XZ @ 157 NONAME ; Usif::CLocalizablePropertyEntry::~CLocalizablePropertyEntry(void)
+	?DeleteComponentDependencyL@RSoftwareComponentRegistry@Usif@@QAEXABVCGlobalComponentId@2@0@Z @ 158 NONAME ; void Usif::RSoftwareComponentRegistry::DeleteComponentDependencyL(class Usif::CGlobalComponentId const &, class Usif::CGlobalComponentId const &)
+	?NewLC@CLocalizablePropertyEntry@Usif@@SAPAV12@ABVTDesC16@@0W4TLanguage@@@Z @ 159 NONAME ; class Usif::CLocalizablePropertyEntry * Usif::CLocalizablePropertyEntry::NewLC(class TDesC16 const &, class TDesC16 const &, enum TLanguage)
+	?Int64Value@CIntPropertyEntry@Usif@@QAE_JXZ @ 160 NONAME ; long long Usif::CIntPropertyEntry::Int64Value(void)
+	?NewLC@CComponentEntry@Usif@@SAPAV12@XZ @ 161 NONAME ; class Usif::CComponentEntry * Usif::CComponentEntry::NewLC(void)
+	?NewLC@CLocalizableComponentInfo@Usif@@SAPAV12@ABVTDesC16@@0W4TLanguage@@@Z @ 162 NONAME ; class Usif::CLocalizableComponentInfo * Usif::CLocalizableComponentInfo::NewLC(class TDesC16 const &, class TDesC16 const &, enum TLanguage)
+	?GetFilePropertiesL@RSoftwareComponentRegistry@Usif@@QBEXHABVTDesC16@@AAV?$RPointerArray@VCPropertyEntry@Usif@@@@@Z @ 163 NONAME ; void Usif::RSoftwareComponentRegistry::GetFilePropertiesL(int, class TDesC16 const &, class RPointerArray<class Usif::CPropertyEntry> &) const
+	??0RSoftwareComponentRegistry@Usif@@QAE@XZ @ 164 NONAME ; Usif::RSoftwareComponentRegistry::RSoftwareComponentRegistry(void)
+	?NewL@CComponentEntry@Usif@@SAPAV12@ABHABVTDesC16@@111H_JABW4TScomoState@2@ABV?$TBuf8@$0BK@@@11HHHH@Z @ 165 NONAME ; class Usif::CComponentEntry * Usif::CComponentEntry::NewL(int const &, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, int, long long, enum Usif::TScomoState const &, class TBuf8<26> const &, class TDesC16 const &, class TDesC16 const &, int, int, int, int)
+	?SetNameL@CComponentFilter@Usif@@QAEXABVTDesC16@@@Z @ 166 NONAME ; void Usif::CComponentFilter::SetNameL(class TDesC16 const &)
+	?SetComponentVersionL@RSoftwareComponentRegistry@Usif@@QAEXHABVTDesC16@@@Z @ 167 NONAME ; void Usif::RSoftwareComponentRegistry::SetComponentVersionL(int, class TDesC16 const &)
+	?AddComponentDependencyL@RSoftwareComponentRegistry@Usif@@QAEXABVCVersionedComponentId@2@ABVCGlobalComponentId@2@@Z @ 168 NONAME ; void Usif::RSoftwareComponentRegistry::AddComponentDependencyL(class Usif::CVersionedComponentId const &, class Usif::CGlobalComponentId const &)
+	?NewLC@CGlobalComponentId@Usif@@SAPAV12@ABVTDesC16@@0@Z @ 169 NONAME ; class Usif::CGlobalComponentId * Usif::CGlobalComponentId::NewLC(class TDesC16 const &, class TDesC16 const &)
+	?SoftwareType@CComponentEntry@Usif@@QBEABVTDesC16@@XZ @ 170 NONAME ; class TDesC16 const & Usif::CComponentEntry::SoftwareType(void) const
+	?PropertyType@CIntPropertyEntry@Usif@@UBE?AW4TPropertyType@CPropertyEntry@2@XZ @ 171 NONAME ; enum Usif::CPropertyEntry::TPropertyType Usif::CIntPropertyEntry::PropertyType(void) const
+	?Close@RSoftwareComponentRegistryFilesList@Usif@@QAEXXZ @ 172 NONAME ; void Usif::RSoftwareComponentRegistryFilesList::Close(void)
+	?NextComponentL@RSoftwareComponentRegistryView@Usif@@QBEHAAVCComponentEntry@2@W4TLanguage@@@Z @ 173 NONAME ; int Usif::RSoftwareComponentRegistryView::NextComponentL(class Usif::CComponentEntry &, enum TLanguage) const
+	?GetComponentSupportedLocalesListL@RSoftwareComponentRegistry@Usif@@QBEXHAAV?$RArray@W4TLanguage@@@@@Z @ 174 NONAME ; void Usif::RSoftwareComponentRegistry::GetComponentSupportedLocalesListL(int, class RArray<enum TLanguage> &) const
+	?GetComponentLocalizedInfoL@RSoftwareComponentRegistry@Usif@@QBEXHAAV?$RPointerArray@VCLocalizableComponentInfo@Usif@@@@@Z @ 175 NONAME ; void Usif::RSoftwareComponentRegistry::GetComponentLocalizedInfoL(int, class RPointerArray<class Usif::CLocalizableComponentInfo> &) const
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/bwins/scrdatabaseu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,21 @@
+EXPORTS
+	??1CDatabase@Usif@@UAE@XZ @ 1 NONAME ; Usif::CDatabase::~CDatabase(void)
+	?BindInt64L@CStatement@Usif@@QAEXH_J@Z @ 2 NONAME ; void Usif::CStatement::BindInt64L(int, long long)
+	?ExecuteStatementL@CStatement@Usif@@QAEXXZ @ 3 NONAME ; void Usif::CStatement::ExecuteStatementL(void)
+	?PrepareStatementLC@CDatabase@Usif@@QAEPAVCStatement@2@ABVTDesC16@@@Z @ 4 NONAME ; class Usif::CStatement * Usif::CDatabase::PrepareStatementLC(class TDesC16 const &)
+	?NewL@CStatement@Usif@@CAPAV12@ABVCDatabase@2@PAVCStatementImplementation@2@@Z @ 5 NONAME ; class Usif::CStatement * Usif::CStatement::NewL(class Usif::CDatabase const &, class Usif::CStatementImplementation *)
+	?LastInsertedIdL@CDatabase@Usif@@QAEHXZ @ 6 NONAME ; int Usif::CDatabase::LastInsertedIdL(void)
+	?IntColumnL@CStatement@Usif@@QBEHH@Z @ 7 NONAME ; int Usif::CStatement::IntColumnL(int) const
+	?ResetL@CStatement@Usif@@QAEXXZ @ 8 NONAME ; void Usif::CStatement::ResetL(void)
+	?BinaryColumnL@CStatement@Usif@@QBE?AVTPtrC8@@H@Z @ 9 NONAME ; class TPtrC8 Usif::CStatement::BinaryColumnL(int) const
+	?BindStrL@CStatement@Usif@@QAEXHABVTDesC16@@@Z @ 10 NONAME ; void Usif::CStatement::BindStrL(int, class TDesC16 const &)
+	?ProcessNextRowL@CStatement@Usif@@QAEHXZ @ 11 NONAME ; int Usif::CStatement::ProcessNextRowL(void)
+	??1CStatement@Usif@@UAE@XZ @ 12 NONAME ; Usif::CStatement::~CStatement(void)
+	?BindBinaryL@CStatement@Usif@@QAEXHABVTDesC8@@@Z @ 13 NONAME ; void Usif::CStatement::BindBinaryL(int, class TDesC8 const &)
+	?IsFieldNullL@CStatement@Usif@@QBEHH@Z @ 14 NONAME ; int Usif::CStatement::IsFieldNullL(int) const
+	?StrColumnL@CStatement@Usif@@QBE?AVTPtrC16@@H@Z @ 15 NONAME ; class TPtrC16 Usif::CStatement::StrColumnL(int) const
+	?BindIntL@CStatement@Usif@@QAEXHH@Z @ 16 NONAME ; void Usif::CStatement::BindIntL(int, int)
+	?Int64ColumnL@CStatement@Usif@@QBE_JH@Z @ 17 NONAME ; long long Usif::CStatement::Int64ColumnL(int) const
+	?NewL@CDatabase@Usif@@SAPAV12@AAVRFile@@0@Z @ 18 NONAME ; class Usif::CDatabase * Usif::CDatabase::NewL(class RFile &, class RFile &)
+	?NewLC@CDatabase@Usif@@SAPAV12@AAVRFile@@0@Z @ 19 NONAME ; class Usif::CDatabase * Usif::CDatabase::NewLC(class RFile &, class RFile &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/bwins/scrhelperclientu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,6 @@
+EXPORTS
+	?RetrieveFileHandlesL@RScrHelper@Usif@@QAEXAAVRFile@@0@Z @ 1 NONAME ; void Usif::RScrHelper::RetrieveFileHandlesL(class RFile &, class RFile &)
+	?Connect@RScrHelper@Usif@@QAEHXZ @ 2 NONAME ; int Usif::RScrHelper::Connect(void)
+	??0RScrHelper@Usif@@QAE@XZ @ 3 NONAME ; Usif::RScrHelper::RScrHelper(void)
+	?Close@RScrHelper@Usif@@QAEXXZ @ 4 NONAME ; void Usif::RScrHelper::Close(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/eabi/scrclientu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,204 @@
+EXPORTS
+	_ZN4Usif12CScrLogEntry12InternalizeLER11RReadStream @ 1 NONAME
+	_ZN4Usif12CScrLogEntry4NewLERK7TDesC16S3_S3_S3_NS_26TScrComponentOperationTypeE @ 2 NONAME
+	_ZN4Usif12CScrLogEntry5NewLCER11RReadStream @ 3 NONAME
+	_ZN4Usif12CScrLogEntry5NewLCERK7TDesC16S3_S3_S3_NS_26TScrComponentOperationTypeE @ 4 NONAME
+	_ZN4Usif14CPropertyEntry4NewLER11RReadStream @ 5 NONAME
+	_ZN4Usif14CPropertyEntryD0Ev @ 6 NONAME
+	_ZN4Usif14CPropertyEntryD1Ev @ 7 NONAME
+	_ZN4Usif14CPropertyEntryD2Ev @ 8 NONAME
+	_ZN4Usif15CComponentEntry12InternalizeLER11RReadStream @ 9 NONAME
+	_ZN4Usif15CComponentEntry4NewLER11RReadStream @ 10 NONAME
+	_ZN4Usif15CComponentEntry4NewLERKiRK7TDesC16S5_S5_S5_ixRKNS_11TScomoStateERK5TBuf8ILi26EES5_S5_iiii @ 11 NONAME
+	_ZN4Usif15CComponentEntry4NewLEv @ 12 NONAME
+	_ZN4Usif15CComponentEntry5NewLCERKiRK7TDesC16S5_S5_S5_ixRKNS_11TScomoStateERK5TBuf8ILi26EES5_S5_iiii @ 13 NONAME
+	_ZN4Usif15CComponentEntry5NewLCEv @ 14 NONAME
+	_ZN4Usif15CComponentEntryD0Ev @ 15 NONAME
+	_ZN4Usif15CComponentEntryD1Ev @ 16 NONAME
+	_ZN4Usif15CComponentEntryD2Ev @ 17 NONAME
+	_ZN4Usif16CComponentFilter10SetVendorLERK7TDesC16 @ 18 NONAME
+	_ZN4Usif16CComponentFilter12AddPropertyLERK7TDesC16RK6TDesC8 @ 19 NONAME
+	_ZN4Usif16CComponentFilter12AddPropertyLERK7TDesC16S3_9TLanguage @ 20 NONAME
+	_ZN4Usif16CComponentFilter12AddPropertyLERK7TDesC16x @ 21 NONAME
+	_ZN4Usif16CComponentFilter12SetRemovableEi @ 22 NONAME
+	_ZN4Usif16CComponentFilter14SetScomoStateLENS_11TScomoStateE @ 23 NONAME
+	_ZN4Usif16CComponentFilter15SetDrmProtectedEi @ 24 NONAME
+	_ZN4Usif16CComponentFilter15SetKnownRevokedEi @ 25 NONAME
+	_ZN4Usif16CComponentFilter16SetSoftwareTypeLERK7TDesC16 @ 26 NONAME
+	_ZN4Usif16CComponentFilter17SetOriginVerifiedEi @ 27 NONAME
+	_ZN4Usif16CComponentFilter19SetInstalledDrivesLERK5TBuf8ILi26EE @ 28 NONAME
+	_ZN4Usif16CComponentFilter4NewLER11RReadStream @ 29 NONAME
+	_ZN4Usif16CComponentFilter4NewLEv @ 30 NONAME
+	_ZN4Usif16CComponentFilter5NewLCEv @ 31 NONAME
+	_ZN4Usif16CComponentFilter8SetFileLERK7TDesC16 @ 32 NONAME
+	_ZN4Usif16CComponentFilter8SetNameLERK7TDesC16 @ 33 NONAME
+	_ZN4Usif16CComponentFilter9SetHiddenEi @ 34 NONAME
+	_ZN4Usif17CIntPropertyEntry10Int64ValueEv @ 35 NONAME
+	_ZN4Usif17CIntPropertyEntry4NewLERK7TDesC16x @ 36 NONAME
+	_ZN4Usif17CIntPropertyEntry5NewLCERK7TDesC16x @ 37 NONAME
+	_ZN4Usif17CIntPropertyEntry8IntValueEv @ 38 NONAME
+	_ZN4Usif17CIntPropertyEntryD0Ev @ 39 NONAME
+	_ZN4Usif17CIntPropertyEntryD1Ev @ 40 NONAME
+	_ZN4Usif17CIntPropertyEntryD2Ev @ 41 NONAME
+	_ZN4Usif18CGlobalComponentId12InternalizeLER11RReadStream @ 42 NONAME
+	_ZN4Usif18CGlobalComponentId4NewLER11RReadStream @ 43 NONAME
+	_ZN4Usif18CGlobalComponentId4NewLERK7TDesC16S3_ @ 44 NONAME
+	_ZN4Usif18CGlobalComponentId5NewLCERK7TDesC16S3_ @ 45 NONAME
+	_ZN4Usif18CGlobalComponentId5NewLCEv @ 46 NONAME
+	_ZN4Usif18CGlobalComponentIdD0Ev @ 47 NONAME
+	_ZN4Usif18CGlobalComponentIdD1Ev @ 48 NONAME
+	_ZN4Usif18CGlobalComponentIdD2Ev @ 49 NONAME
+	_ZN4Usif20CBinaryPropertyEntry11BinaryValueEv @ 50 NONAME
+	_ZN4Usif20CBinaryPropertyEntry4NewLERK7TDesC16RK6TDesC8 @ 51 NONAME
+	_ZN4Usif20CBinaryPropertyEntry5NewLCERK7TDesC16RK6TDesC8 @ 52 NONAME
+	_ZN4Usif20CBinaryPropertyEntryD0Ev @ 53 NONAME
+	_ZN4Usif20CBinaryPropertyEntryD1Ev @ 54 NONAME
+	_ZN4Usif20CBinaryPropertyEntryD2Ev @ 55 NONAME
+	_ZN4Usif21CVersionedComponentId12InternalizeLER11RReadStream @ 56 NONAME
+	_ZN4Usif21CVersionedComponentId4NewLER11RReadStream @ 57 NONAME
+	_ZN4Usif21CVersionedComponentId4NewLERKNS_18CGlobalComponentIdEPK7TDesC16S6_ @ 58 NONAME
+	_ZN4Usif21CVersionedComponentId5NewLCERKNS_18CGlobalComponentIdEPK7TDesC16S6_ @ 59 NONAME
+	_ZN4Usif21CVersionedComponentId5NewLCEv @ 60 NONAME
+	_ZN4Usif21CVersionedComponentIdD0Ev @ 61 NONAME
+	_ZN4Usif21CVersionedComponentIdD1Ev @ 62 NONAME
+	_ZN4Usif21CVersionedComponentIdD2Ev @ 63 NONAME
+	_ZN4Usif25CLocalizableComponentInfo10ConstructLERK7TDesC16S3_ @ 64 NONAME
+	_ZN4Usif25CLocalizableComponentInfo12InternalizeLER11RReadStream @ 65 NONAME
+	_ZN4Usif25CLocalizableComponentInfo4NewLER11RReadStream @ 66 NONAME
+	_ZN4Usif25CLocalizableComponentInfo4NewLERK7TDesC16S3_9TLanguage @ 67 NONAME
+	_ZN4Usif25CLocalizableComponentInfo5NewLCERK7TDesC16S3_9TLanguage @ 68 NONAME
+	_ZN4Usif25CLocalizablePropertyEntry4NewLERK7TDesC16S3_9TLanguage @ 69 NONAME
+	_ZN4Usif25CLocalizablePropertyEntry5NewLCERK7TDesC16S3_9TLanguage @ 70 NONAME
+	_ZN4Usif25CLocalizablePropertyEntryD0Ev @ 71 NONAME
+	_ZN4Usif25CLocalizablePropertyEntryD1Ev @ 72 NONAME
+	_ZN4Usif25CLocalizablePropertyEntryD2Ev @ 73 NONAME
+	_ZN4Usif26CLocalizedSoftwareTypeName10ConstructLERK7TDesC16 @ 74 NONAME
+	_ZN4Usif26CLocalizedSoftwareTypeName12InternalizeLER11RReadStream @ 75 NONAME
+	_ZN4Usif26CLocalizedSoftwareTypeName4NewLER11RReadStream @ 76 NONAME
+	_ZN4Usif26CLocalizedSoftwareTypeName4NewLERK7TDesC169TLanguage @ 77 NONAME
+	_ZN4Usif26CLocalizedSoftwareTypeName5NewLCERK7TDesC169TLanguage @ 78 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry13AddComponentLERK13RPointerArrayINS_25CLocalizableComponentInfoEERK7TDesC16PS7_NS_26TScrComponentOperationTypeE @ 79 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry13AddComponentLERK7TDesC16S3_S3_PS2_NS_26TScrComponentOperationTypeE @ 80 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry14SetVendorNameLEiRK7TDesC169TLanguage @ 81 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry16AddSoftwareTypeLERK7TDesC164TUid9TSecureIdS5_RK13RPointerArrayI7HBufC16EPKS6_INS_26CLocalizedSoftwareTypeNameEE @ 82 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry16CompareVersionsLERK7TDesC16S3_ @ 83 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry16DeleteComponentLEi @ 84 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry16SetFilePropertyLEiRK7TDesC16S3_RK6TDesC8 @ 85 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry16SetFilePropertyLEiRK7TDesC16S3_i @ 86 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry17SetComponentNameLEiRK7TDesC169TLanguage @ 87 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry17SetComponentSizeLEix @ 88 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry18CommitTransactionLEv @ 89 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry18CreateTransactionLEv @ 90 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry19DeleteFilePropertyLEiRK7TDesC16S3_ @ 91 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry19DeleteSoftwareTypeLERK7TDesC16R13RPointerArrayI7HBufC16E @ 92 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry20IsComponentOrphanedLEi @ 93 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry20RollbackTransactionLEv @ 94 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry20SetComponentVersionLEiRK7TDesC16 @ 95 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry21SetComponentPropertyLEiRK7TDesC16RK6TDesC8 @ 96 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry21SetComponentPropertyLEiRK7TDesC16S3_9TLanguage @ 97 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry21SetComponentPropertyLEiRK7TDesC16x @ 98 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry21SetIsComponentHiddenLEii @ 99 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry22RegisterComponentFileLEiRK7TDesC16i @ 100 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry22SetIsComponentPresentLEii @ 101 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry23AddComponentDependencyLERKNS_21CVersionedComponentIdERKNS_18CGlobalComponentIdE @ 102 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry24DeleteComponentPropertyLEiRK7TDesC16 @ 103 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry24SetIsComponentRemovableLEii @ 104 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry24UnregisterComponentFileLEiRK7TDesC16 @ 105 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry26DeleteComponentDependencyLERKNS_18CGlobalComponentIdES3_ @ 106 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry27SetIsComponentDrmProtectedLEii @ 107 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry27SetIsComponentKnownRevokedLEii @ 108 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry29SetIsComponentOriginVerifiedLEii @ 109 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry5CloseEv @ 110 NONAME
+	_ZN4Usif26RSoftwareComponentRegistry7ConnectEv @ 111 NONAME
+	_ZN4Usif26RSoftwareComponentRegistryC1Ev @ 112 NONAME
+	_ZN4Usif26RSoftwareComponentRegistryC2Ev @ 113 NONAME
+	_ZN4Usif30RSoftwareComponentRegistryView5CloseEv @ 114 NONAME
+	_ZN4Usif30RSoftwareComponentRegistryView9OpenViewLERKNS_26RSoftwareComponentRegistryEPNS_16CComponentFilterE @ 115 NONAME
+	_ZN4Usif30RSoftwareComponentRegistryViewC1Ev @ 116 NONAME
+	_ZN4Usif30RSoftwareComponentRegistryViewC2Ev @ 117 NONAME
+	_ZN4Usif35RSoftwareComponentRegistryFilesList5CloseEv @ 118 NONAME
+	_ZN4Usif35RSoftwareComponentRegistryFilesList9OpenListLERKNS_26RSoftwareComponentRegistryEi @ 119 NONAME
+	_ZN4Usif35RSoftwareComponentRegistryFilesListC1Ev @ 120 NONAME
+	_ZN4Usif35RSoftwareComponentRegistryFilesListC2Ev @ 121 NONAME
+	_ZNK4Usif12CScrLogEntry11ComponentIdEv @ 122 NONAME
+	_ZNK4Usif12CScrLogEntry12ExternalizeLER12RWriteStream @ 123 NONAME
+	_ZNK4Usif12CScrLogEntry13ComponentNameEv @ 124 NONAME
+	_ZNK4Usif12CScrLogEntry13OperationTimeEv @ 125 NONAME
+	_ZNK4Usif12CScrLogEntry13OperationTypeEv @ 126 NONAME
+	_ZNK4Usif12CScrLogEntry16ComponentVersionEv @ 127 NONAME
+	_ZNK4Usif12CScrLogEntry16SoftwareTypeNameEv @ 128 NONAME
+	_ZNK4Usif12CScrLogEntry8GlobalIdEv @ 129 NONAME
+	_ZNK4Usif14CPropertyEntry12ExternalizeLER12RWriteStream @ 130 NONAME
+	_ZNK4Usif14CPropertyEntry12PropertyNameEv @ 131 NONAME
+	_ZNK4Usif15CComponentEntry10ScomoStateEv @ 132 NONAME
+	_ZNK4Usif15CComponentEntry11ComponentIdEv @ 133 NONAME
+	_ZNK4Usif15CComponentEntry11IsRemovableEv @ 134 NONAME
+	_ZNK4Usif15CComponentEntry12ExternalizeLER12RWriteStream @ 135 NONAME
+	_ZNK4Usif15CComponentEntry12InstallTimeLEv @ 136 NONAME
+	_ZNK4Usif15CComponentEntry12SoftwareTypeEv @ 137 NONAME
+	_ZNK4Usif15CComponentEntry13ComponentSizeEv @ 138 NONAME
+	_ZNK4Usif15CComponentEntry14IsDrmProtectedEv @ 139 NONAME
+	_ZNK4Usif15CComponentEntry14IsKnownRevokedEv @ 140 NONAME
+	_ZNK4Usif15CComponentEntry15InstalledDrivesEv @ 141 NONAME
+	_ZNK4Usif15CComponentEntry16IsOriginVerifiedEv @ 142 NONAME
+	_ZNK4Usif15CComponentEntry4NameEv @ 143 NONAME
+	_ZNK4Usif15CComponentEntry6VendorEv @ 144 NONAME
+	_ZNK4Usif15CComponentEntry7VersionEv @ 145 NONAME
+	_ZNK4Usif15CComponentEntry8GlobalIdEv @ 146 NONAME
+	_ZNK4Usif15CComponentEntry8IsHiddenEv @ 147 NONAME
+	_ZNK4Usif16CComponentFilter12ExternalizeLER12RWriteStream @ 148 NONAME
+	_ZNK4Usif17CIntPropertyEntry12PropertyTypeEv @ 149 NONAME
+	_ZNK4Usif18CGlobalComponentId12ExternalizeLER12RWriteStream @ 150 NONAME
+	_ZNK4Usif18CGlobalComponentId12GlobalIdNameEv @ 151 NONAME
+	_ZNK4Usif18CGlobalComponentId16SoftwareTypeNameEv @ 152 NONAME
+	_ZNK4Usif20CBinaryPropertyEntry12PropertyTypeEv @ 153 NONAME
+	_ZNK4Usif21CVersionedComponentId11VersionFromEv @ 154 NONAME
+	_ZNK4Usif21CVersionedComponentId12ExternalizeLER12RWriteStream @ 155 NONAME
+	_ZNK4Usif21CVersionedComponentId8GlobalIdEv @ 156 NONAME
+	_ZNK4Usif21CVersionedComponentId9VersionToEv @ 157 NONAME
+	_ZNK4Usif22CLocalizableCommonData6LocaleEv @ 158 NONAME
+	_ZNK4Usif25CLocalizableComponentInfo12ExternalizeLER12RWriteStream @ 159 NONAME
+	_ZNK4Usif25CLocalizableComponentInfo5NameLEv @ 160 NONAME
+	_ZNK4Usif25CLocalizableComponentInfo7VendorLEv @ 161 NONAME
+	_ZNK4Usif25CLocalizablePropertyEntry12PropertyTypeEv @ 162 NONAME
+	_ZNK4Usif25CLocalizablePropertyEntry7LocaleLEv @ 163 NONAME
+	_ZNK4Usif25CLocalizablePropertyEntry8StrValueEv @ 164 NONAME
+	_ZNK4Usif26CLocalizedSoftwareTypeName12ExternalizeLER12RWriteStream @ 165 NONAME
+	_ZNK4Usif26CLocalizedSoftwareTypeName5NameLEv @ 166 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry13GetComponentLERK7TDesC16S3_9TLanguage @ 167 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry13GetComponentLEiRNS_15CComponentEntryE9TLanguage @ 168 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry13GetPluginUidLERK7TDesC16 @ 169 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry13GetPluginUidLEi @ 170 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry14GetComponentsLERK7TDesC16R6RArrayIiE @ 171 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry14SetScomoStateLEiNS_11TScomoStateE @ 172 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry15GetComponentIdLERK7TDesC16S3_ @ 173 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry15IsMediaPresentLEi @ 174 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry16GetComponentIdsLER6RArrayIiEPNS_16CComponentFilterE @ 175 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry16GetFilePropertyLEiRK7TDesC16S3_ @ 176 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry18GetFilePropertiesLEiRK7TDesC16R13RPointerArrayINS_14CPropertyEntryEE @ 177 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry19IsComponentPresentLEi @ 178 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry19RetrieveLogEntriesLER13RPointerArrayINS_12CScrLogEntryEEPK7TDesC16 @ 179 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry21GetComponentPropertyLEiRK7TDesC169TLanguage @ 180 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry22GetSupplierComponentsLERKNS_18CGlobalComponentIdER13RPointerArrayINS_21CVersionedComponentIdEE @ 181 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry23GetComponentFilesCountLEi @ 182 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry23GetComponentPropertiesLEiR13RPointerArrayINS_14CPropertyEntryEE9TLanguage @ 183 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry23GetDependantComponentsLERKNS_18CGlobalComponentIdER13RPointerArrayINS_21CVersionedComponentIdEE @ 184 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry27IsComponentOnReadOnlyDriveLEi @ 185 NONAME
+	_ZNK4Usif30RSoftwareComponentRegistryView14NextComponentLE9TLanguage @ 186 NONAME
+	_ZNK4Usif30RSoftwareComponentRegistryView14NextComponentLERNS_15CComponentEntryE9TLanguage @ 187 NONAME
+	_ZNK4Usif30RSoftwareComponentRegistryView17NextComponentSetLEiR13RPointerArrayINS_15CComponentEntryEE9TLanguage @ 188 NONAME
+	_ZNK4Usif35RSoftwareComponentRegistryFilesList12NextFileSetLEiR13RPointerArrayI7HBufC16E @ 189 NONAME
+	_ZNK4Usif35RSoftwareComponentRegistryFilesList9NextFileLEv @ 190 NONAME
+	_ZTIN4Usif14CPropertyEntryE @ 191 NONAME
+	_ZTIN4Usif15CComponentEntryE @ 192 NONAME
+	_ZTIN4Usif17CIntPropertyEntryE @ 193 NONAME
+	_ZTIN4Usif20CBinaryPropertyEntryE @ 194 NONAME
+	_ZTIN4Usif22CLocalizableCommonDataE @ 195 NONAME
+	_ZTVN4Usif14CPropertyEntryE @ 196 NONAME
+	_ZTVN4Usif15CComponentEntryE @ 197 NONAME
+	_ZTVN4Usif17CIntPropertyEntryE @ 198 NONAME
+	_ZTVN4Usif20CBinaryPropertyEntryE @ 199 NONAME
+	_ZTVN4Usif22CLocalizableCommonDataE @ 200 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry33GetComponentSupportedLocalesListLEiR6RArrayI9TLanguageE @ 201 NONAME
+	_ZNK4Usif26RSoftwareComponentRegistry26GetComponentLocalizedInfoLEiR13RPointerArrayINS_25CLocalizableComponentInfoEE @ 202 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/eabi/scrdatabaseu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+EXPORTS
+	_ZN4Usif10CStatement10BindInt64LEix @ 1 NONAME
+	_ZN4Usif10CStatement11BindBinaryLEiRK6TDesC8 @ 2 NONAME
+	_ZN4Usif10CStatement15ProcessNextRowLEv @ 3 NONAME
+	_ZN4Usif10CStatement17ExecuteStatementLEv @ 4 NONAME
+	_ZN4Usif10CStatement4NewLERKNS_9CDatabaseEPNS_24CStatementImplementationE @ 5 NONAME
+	_ZN4Usif10CStatement6ResetLEv @ 6 NONAME
+	_ZN4Usif10CStatement8BindIntLEii @ 7 NONAME
+	_ZN4Usif10CStatement8BindStrLEiRK7TDesC16 @ 8 NONAME
+	_ZN4Usif10CStatementD0Ev @ 9 NONAME
+	_ZN4Usif10CStatementD1Ev @ 10 NONAME
+	_ZN4Usif10CStatementD2Ev @ 11 NONAME
+	_ZN4Usif9CDatabase15LastInsertedIdLEv @ 12 NONAME
+	_ZN4Usif9CDatabase18PrepareStatementLCERK7TDesC16 @ 13 NONAME
+	_ZN4Usif9CDatabaseD0Ev @ 14 NONAME
+	_ZN4Usif9CDatabaseD1Ev @ 15 NONAME
+	_ZN4Usif9CDatabaseD2Ev @ 16 NONAME
+	_ZNK4Usif10CStatement10IntColumnLEi @ 17 NONAME
+	_ZNK4Usif10CStatement10StrColumnLEi @ 18 NONAME
+	_ZNK4Usif10CStatement12Int64ColumnLEi @ 19 NONAME
+	_ZNK4Usif10CStatement12IsFieldNullLEi @ 20 NONAME
+	_ZNK4Usif10CStatement13BinaryColumnLEi @ 21 NONAME
+	_ZTIN4Usif23CDatabaseImplementationE @ 22 NONAME
+	_ZTIN4Usif24CStatementImplementationE @ 23 NONAME
+	_ZTVN4Usif23CDatabaseImplementationE @ 24 NONAME
+	_ZTVN4Usif24CStatementImplementationE @ 25 NONAME
+	_ZN4Usif9CDatabase4NewLER5RFileS2_ @ 26 NONAME
+	_ZN4Usif9CDatabase5NewLCER5RFileS2_ @ 27 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/eabi/scrhelperclientu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,7 @@
+EXPORTS
+	_ZN4Usif10RScrHelper20RetrieveFileHandlesLER5RFileS2_ @ 1 NONAME
+	_ZN4Usif10RScrHelper5CloseEv @ 2 NONAME
+	_ZN4Usif10RScrHelper7ConnectEv @ 3 NONAME
+	_ZN4Usif10RScrHelperC1Ev @ 4 NONAME
+	_ZN4Usif10RScrHelperC2Ev @ 5 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/group/bld.inf	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,111 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* @ Software Component Registry
+*
+*/
+
+
+/**
+ @file
+*/
+
+#include "../sqlite_secure/GROUP/BLD.INF"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+// SCR exported headers
+
+../inc/screntries.h			SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/scr/screntries.h)
+../inc/scr.h 				SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/scr/scr.h)
+../inc/scrcommon.h 			SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(usif/scr/scrcommon.h)
+../inc/scrcommon.inl 		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(usif/scr/scrcommon.inl)
+
+// USIF common includes
+../../swinstallationfw/common/inc/usiferror.h		SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/usiferror.h)
+../../swinstallationfw/common/inc/usifcommon.h		SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/usifcommon.h)
+
+// ROMKIT includes
+../inc/scr.iby				/epoc32/rom/include/scr.iby
+
+
+PRJ_MMPFILES
+
+#ifndef TOOLS
+#ifndef TOOLS2
+
+scrserver.mmp		// SCR Server
+scrclient.mmp		// SCR Client
+scrdatabase.mmp		// SCR Data Layer
+
+../scrhelper/group/scrhelperserver.mmp // SCR Helper Server
+../scrhelper/group/scrhelperclient.mmp // SCR Helper Client
+
+#endif // TOOLS2
+#endif // TOOLS
+
+PRJ_TESTMMPFILES
+
+#ifndef TOOLS
+#ifndef TOOLS2
+
+../test/group/tscr.mmp		// SCR Test Harness
+../test/group/tscrdatalayer.mmp		// SCR Data Layer Test Harness
+../test/group/tscraccessor.mmp		// SCR Accessor
+
+#endif // TOOLS2
+#endif // TOOLS
+
+PRJ_TESTEXPORTS
+
+../test/tscr/scripts/tscr.ini				z:/tusif/tscr/tscr.ini
+../test/tscr/scripts/tscr.script			z:/tusif/tscr/tscr.script
+../test/tscr/scripts/tscr_api.script		z:/tusif/tscr/tscr_api.script
+
+../test/tscr/scripts/tscr_performance.ini			z:/tusif/tscr/tscr_performance.ini
+../test/tscr/scripts/tscr_performance.script		z:/tusif/tscr/tscr_performance.script
+../test/tscr/scripts/tscr_performance_cases.script	z:/tusif/tscr/tscr_performance_cases.script
+
+../test/tscr/scripts/tscr_versioning.script		z:/tusif/tscr/tscr_versioning.script
+../test/tscr/scripts/tscr_oom.script		z:/tusif/tscr/tscr_oom.script
+
+../test/tscrdatalayer/scripts/tscr_datalayer.script		z:/tusif/tscrdatalayer/tscr_datalayer.script
+../test/tscrdatalayer/scripts/tscr_datalayer_oom.script	z:/tusif/tscrdatalayer/tscr_datalayer_oom.script
+../test/tscrdatalayer/scripts/tscr_datalayer_oom.ini	z:/tusif/tscrdatalayer/tscr_datalayer_oom.ini
+../test/tscrdatalayer/scripts/data/nondb.db				z:/tusif/tscrdatalayer/data/nondb.db
+
+../test/tscr/scripts/data/scr_small.db		z:/tusif/tscr/data/scr_small.db
+../test/tscr/scripts/data/scr_medium.db		z:/tusif/tscr/data/scr_medium.db
+../test/tscr/scripts/data/scr_large.db		z:/tusif/tscr/data/scr_large.db
+
+../test/tscr/scripts/data/scr-noversiontable.db			z:/tusif/tscr/data/scr-noversiontable.db
+../test/tscr/scripts/data/scr-olderminordbversion.db			z:/tusif/tscr/data/scr-olderminordbversion.db
+../test/tscr/scripts/data/scr-differentbuildnumber.db			z:/tusif/tscr/data/scr-differentbuildnumber.db
+../test/tscr/scripts/data/scr-newermajordbversion.db			z:/tusif/tscr/data/scr-newermajordbversion.db
+../test/tscr/scripts/data/scr-noentriesinversiontable.db			z:/tusif/tscr/data/scr-noentriesinversiontable.db
+../test/tscr/scripts/data/scr-newerminordbversion.db 	z:/tusif/tscr/data/scr-newerminordbversion.db
+../test/tscr/scripts/data/scr-oldermajordbversion.db 	z:/tusif/tscr/data/scr-oldermajordbversion.db
+
+../test/testdb/scr.db			z:/sys/install/scr/provisioned/scr.db
+
+// The second copy is required for ARMV5 builds, where z:/ does not automatically transfer into the simulated Z drive. The custom steps in ONB take care of copying testscr.db into scr.db before ROM build and test
+../test/testdb/scr.db /epoc32/release/winscw/udeb/z/sys/install/scr/provisioned/testscr.db
+../test/testdb/scr.db /epoc32/release/winscw/urel/z/sys/install/scr/provisioned/testscr.db
+
+// ROMKIT includes
+../inc/tscr.iby								/epoc32/rom/include/tscr.iby
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/group/scrclient.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Software Component Registry Client
+*
+*/
+
+
+TARGET				scrclient.dll
+TARGETTYPE			dll
+
+UID					0x0 0x10285BC1
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+USERINCLUDE			../inc
+USERINCLUDE			../inc_private
+USERINCLUDE	  		../../swinstallationfw/common/inc
+
+SOURCEPATH			../source/client
+
+SOURCE				scrclient.cpp
+SOURCE				screntries.cpp
+SOURCE				scrclientsubsessions.cpp
+
+DEFFILE				../~/scrclient.def
+
+CAPABILITY			all
+
+VENDORID			0x70000001
+
+LIBRARY				euser.lib 
+LIBRARY 			estor.lib 
+LIBRARY				scsclient.lib ipcstream.lib efsrv.lib
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/group/scrdatabase.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Software Component Registry Data Layer
+*
+*/
+
+
+TARGET			scrdatabase.dll
+TARGETTYPE		dll
+UID				0x0 0x10285BBF
+
+CAPABILITY		ProtServ
+VENDORID 		0x70000001
+
+SOURCEPATH		../source/database
+SOURCE 			scrdatabase.cpp
+
+USERINCLUDE		../inc
+USERINCLUDE		../inc_private
+USERINCLUDE		../../swinstallationfw/common/inc
+USERINCLUDE		../sqlite_secure/SQLite
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_LIBC_SYSTEMINCLUDE
+
+DEFFILE			../~/scrdatabase.def
+
+LIBRARY 		euser.lib 
+LIBRARY			estlib.lib 
+LIBRARY			estor.lib
+LIBRARY			efsrv.lib
+LIBRARY			centralrepository.lib 
+LIBRARY 		sqlite3_secure.lib
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/group/scrserver.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Software Component Registry Server
+*
+*/
+
+
+TARGET        scrserver.exe
+TARGETTYPE    exe
+UID           0x0 0x10285BC0
+
+CAPABILITY    ProtServ
+VENDORID 	  0x70000001
+
+SOURCEPATH    ../source/server
+SOURCE 		  startup.cpp
+SOURCE 		  scrserver.cpp
+SOURCE		  scrsession.cpp
+SOURCE        scrsubsession.cpp
+SOURCE		  scrrequestimpl.cpp
+
+USERINCLUDE   ../inc
+USERINCLUDE   ../inc_private
+USERINCLUDE	  ../../swinstallationfw/common/inc
+USERINCLUDE	  ../scrhelper/inc  
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_LIBC_SYSTEMINCLUDE
+
+LIBRARY		  bafl.lib
+LIBRARY 	  euser.lib 
+LIBRARY       estlib.lib 
+LIBRARY       efsrv.lib
+LIBRARY       estor.lib
+LIBRARY       ipcstream.lib 
+LIBRARY		  sqlite3.lib 
+LIBRARY		  scrdatabase.lib 
+LIBRARY		  scsserver.lib  
+LIBRARY		  scrclient.lib securityutils.lib
+LIBRARY		  scrhelperclient.lib stsclient.lib
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/group/security_softwarecomponentregistry.history.xml	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<relnotes name="Software Component Registry">
+  <purpose>
+    Provide APIs and data repository for software management on the device.
+  </purpose>
+
+  <defect number="DEF137187" title="Move SCR OOM tests to a new script" revision="018">
+	Created a new script.
+  </defect>
+
+ <defect number="DEF128695" title="PREQ1269: SetServerHeapFail causing panic in SCRSERVER.EXE" revision="017">
+	panic in SCRSERVER.EXE  is fixed. 
+  </defect>
+  <defect number="DEF131414" title="Performance in RSisRegistryEntry::InstalledDrivesL is low " revision="016">
+	Modified SCR interface to allow avoiding drive management when registering a file. 
+  </defect>
+  <defect number="DEF131875" title="SMPSAFE MMP file updates for SWI and USIF" revision="015">
+    updated MMP files for SWI and USIF components to declare them SMPSAFE 
+  </defect>
+  
+  <defect number="DEF131262" title="Building ROMs results in a file not being found in siflauncherconfig.iby" revision="014"> 
+	 As described in proposed solution in the defect - added EPOCROOT## to the path 	
+  </defect> 
+
+  <defect number="DEF128680" title="PREQ1269: Thread scrserver.exe::Main Panic USER 21" revision="013"> 
+	 Added a check when processing filters in SCR.
+  </defect> 
+
+  <defect number="DEF130740" title="PREQ1269: RSoftwareComponentRegistryView leaving with -4" revision="012"> 
+	 Added validation of input parameters in the SCR 	
+  </defect> 
+
+  <defect number="DEF130796" title="PREQ1269: Can set the component size negative" revision="011"> 
+	 The API wasn't changed to Uint, as this would require the DB also to support unsigned values in the relevant column, and I couldn't see an option for doing it without disrupting the schema. 
+  </defect> 
+
+  <defect number="DEF130814" title="PREQ1269: ALLOC Panic raised in scrserver.exe during uninstallation" revision="010"> 
+	 In ref. installer, fixed the order of closing sub-sessions and sessions in the SCR
+  </defect> 
+
+  <defect number="DEF129121" title="scr.iby references missing files when building Techview" revision="009">
+    Refered to the generic data file's path; and cleanup the iby file. 	
+  </defect>
+
+  <defect number="DEF131245" title="Incorrect date/time handling in the SCR" revision="008">
+	Fixed date/time handling in the SCR, so that CComponentEntry construction won't fail on the last month of the year or last day of the month. 
+  </defect>
+
+  <deliverystep number="1117" name="PREQ1269: Crypto Services: Plugin management and highly desirable features
+ (Phase 2)" osproject="Diran" revision="007">
+	  <milestone project="GT0433" number="3.2"/>
+	  <preq number="1269" title="Universal Software Install Framework">
+		  1) Post-manufacture plugin management 2) Complex queries in the SCR
+			3) Additional smaller requirements and changes and 4) Improved security in the SCR
+	  </preq>
+  </deliverystep>
+
+ <defect number="DEF128602" title="PREQ1269 - Application Manager is unresponsive" revision="006">
+	Added caching for the CComponentEntry object in the subsession. Improved the performance of RSisRegistryEntry::OpenL. Several other minor improvements. 
+  </defect>
+  
+  <defect number="DEF128615" title="PREQ1269 - SCR database consumes much more disk space than SIS Registry" revision="005">
+	As N- series devices tend to have many in ROM components, most settings in the SCR DB were changed to favour ROM components as the default settings. Additionally, more settings were made optional for all components (index etc.) 
+  </defect>
+ 
+  <defect number="DEF128618" title="PREQ1269 - Processing of ROM stubs is very slow" revision="004">
+	Removing queries while adding files. Improving bitmask management for installed drives. Making more properties optional. Made default options to favour ROM components.
+  </defect>
+
+  <defect number="DEF129328" title="PREQ1269: Read-Write lock fails" revision="003">
+	State variables were moved to the sub-session class instead of CRequestImpl class. This way the state is not shared across sub-sessions. 
+  </defect>
+ 
+  <defect number="DEF129120" title="PREQ1269: scrserver.exe::Main Panic KERN-EXEC 3 when listing with locale" revision="002">
+	Fixed a crash while matching downgraded locales for properties.
+  </defect>
+
+  <deliverystep number="1116" name="PREQ1269: Security and Data Privacy: Universal Software Install Framework (Phase 1)" osproject="Diran" revision="001">
+	  <milestone project="GT0433" number="3.1"/>
+	  <preq number="1269" title="Universal Software Install Framework">
+		   Delivers the main set of features for the Diran Early Phase. Includes the new components (SCR, SIF and STS), migration of the native installer to use the new components and most reference code.
+			Excludes non-mandatory features and post-production plugin management.
+	  </preq>
+  </deliverystep>
+
+</relnotes>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/group/security_softwarecomponentregistry.mrp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+component	security_softwarecomponentregistry
+source	\sf\mw\appinstall\installationservices\swcomponentregistry
+source	\sf\mw\appinstall\installationservices\swinstallationfw\common
+binary	\sf\mw\appinstall\installationservices\swcomponentregistry\group	all
+exports	\sf\mw\appinstall\installationservices\swcomponentregistry\group
+notes_source	\component_defs\release.src
+
+ipr D 
+ipr T \sf\mw\appinstall\installationservices\swcomponentregistry\test
+ipr T \sf\mw\appinstall\installationservices\swcomponentregistry\sqlite_secure\test
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc/scr.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1074 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* RSoftwareComponentRegistry provides interfaces allowing install, uninstall, and update 
+* of software components .
+* Software Components Registry interface is designed to be used by installers, application managers, device managers and the software install framework (SIF).
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifndef SOFTWARECOMPONENTREGISTRY_H
+#define SOFTWARECOMPONENTREGISTRY_H
+
+#include <e32base.h>
+#include <usif/usifcommon.h>
+#include <usif/scr/screntries.h>
+#include <scs/scsclient.h>
+
+namespace Usif
+	{	 
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+	class CScrLogEntry;
+	class CLocalizedSoftwareTypeName;
+#endif SYMBIAN_ENABLE_SPLIT_HEADERS
+
+	NONSHARABLE_CLASS(RSoftwareComponentRegistry) : public RScsClientBase
+	/*
+		The clients of Software Component Registry (SCR) use this class to communicate 
+		with the SCR server. 
+		
+		This class provides several sets of functionality:
+		(i) Components' management, such as adding and removing components, registering files and other operations
+		(ii) Transaction management, which allows rolling back or committing a set of mutating operations together.
+		(iii) Read-only queries, such as getting component properties, or component information. 
+		
+		Operations which update or create new components in the SCR are restricted to the registered installers or layered execution
+		environments (LEE). For example, only a Java installer or the Java Virtual Machine (JVM) can create new Java components. Additionally,
+		only the same entities can change properties of or delete already existing Java components.
+		
+		Please note that mutating functions of this class can be used if any of the following conditions applies:
+		- There is no active transaction or reading operation with component or file views.
+		- A transaction exists and has been started by this connection.
+		
+		Additionally, please note that SCR limits the size of strings it receives in input to 512 characters, e.g. supplying component names, property names longer than that
+		will result in KErrArgument.
+	 */
+		{
+	
+	public:
+		/**
+			Default constructor of SCR session.
+		 */
+		IMPORT_C RSoftwareComponentRegistry();
+		
+		/**
+			Opens a connection to the SCR server.
+			@return KErrNone, if the connection is successful. Otherwise, a system-wide error code.  
+		 */
+		IMPORT_C TInt Connect();
+		
+		/**
+			Closes the connection with the SCR server.
+		 */
+		IMPORT_C void Close();
+		
+		/**
+			The SCR allows its clients to perform all mutable operations related to a software component management operation
+			(e.g. install, uninstall, upgrade, and replace) within a single transaction. If a software component management operation 
+			fails or is aborted then the SCR will revert to a consistent state.  If mutating operations are not done under a transaction, 
+			it will be impossible to roll them back automatically in conjunction with other operations.
+
+			A transaction is started and persists throughout the connection until the next commit/rollback function call.
+			The transaction automatically rolls back if the server connection is closed without commit/rollback functions 
+			being invoked.  If the device unexpectedly shuts down while a transaction is in progress, the SCR server will 
+			revert to consistent state on next usage. 
+			 
+			Please note that nested/concurrent transactions are NOT supported. 
+			 
+			N.B. It is impossible to start a transaction if at least one component or file view (e.g. RSoftwareComponentRegistryView and
+			RSoftwareComponentRegistryFilesList) owned by another SCR session is in progress. 
+			
+			N.B. Transaction operations are permitted only to registered installers or execution environments.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction is already in progress on the SCR server.
+			@leave KErrScrReadOperationInProgress If one or more component views or file lists owned by other SCR sessions are open.
+			@leave KErrPermissionDenied An unauthorised process attempted a transaction operation. 
+			@leave Or system-wide error codes.
+		 */
+		IMPORT_C void CreateTransactionL();
+		
+		/**
+			Rolls back the transaction started by this session by reverting all the changes made during the transaction. 
+			
+			N.B. Transaction operations are permitted only to registered installers or execution environments.			
+			
+			@leave KErrScrNoActiveTransaction There is no active transaction on the SCR Server started by this connection.
+			@leave KErrPermissionDenied An unauthorised process attempted a transaction operation.
+			@leave Or system-wide error codes.
+		 */ 
+		IMPORT_C void RollbackTransactionL();
+		
+		/**
+			Commits the transaction started by this session.
+			
+			N.B. Transaction operations are permitted only to registered installers or execution environments.			
+			
+			@leave KErrScrNoActiveTransaction There is no active transaction on the SCR Server started by this connection.
+			@leave KErrPermissionDenied An unauthorised process attempted a transaction operation.
+			@leave Or system-wide error codes.
+		 */
+		IMPORT_C void CommitTransactionL();
+		
+		/**
+			Adds a new software component entry to the SCR database.
+			
+			If the component and vendor names of the software component being installed are NOT localizable, 
+			then this API should be used to add a new component.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+				
+			@param aName The non-localizable name of the component being added.
+			@param aVendor The non-localizable vendor name of the component being added.
+			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+			@param aGlobalId A named, nullable, case-sensitive string used to specify a deterministic identifier for the component 
+						that is unique within the context of that software type. The global component id might be 
+						the package UID for native applications or the MIDlet name/vendor pair for Java MIDLets, etc. 
+						Note that if KNullDesC is provided, the global identifier will be empty.
+			@param aCompOpType The type of the component operation. Typical operations are install or upgrade. @see Usif::TScrComponentOperationType
+			@return  The component ID of the newly added entry.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+		 */
+		IMPORT_C TComponentId AddComponentL(const TDesC& aName, const TDesC& aVendor, const TDesC& aUniqueSwTypeName, const TDesC* aGlobalId=NULL, TScrComponentOperationType aCompOpType=EScrCompInstall);
+		
+		/**
+			Adds a new software component entry to the SCR database.
+			If the component and vendor names of the software component being installed are localizable,
+			then this API should be used to add a new component.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+					
+			@param aComponentInfo The list of localizable component information (such as vendor and name) with one entry per each supported locale.
+			@param aUniqueSwTypeName The non-localized, unique software type name, e.g. "Native".
+			@param aGlobalId A named, nullable, case-sensitive string used to specify a deterministic identifier for the component 
+							that is unique within the context of that software type. The global component id would be 
+							the package UID for native applications or the midlet-names for Java, etc. 
+							Note that if KNullDesC is provided, the global identifier will be empty.
+			@param aCompOpType The type of the component operation. Typical operations are install or upgrade. @see Usif::TScrComponentOperationType
+			@return  The component ID of the newly added entry. 
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+		 */
+		IMPORT_C TComponentId AddComponentL(const RPointerArray<CLocalizableComponentInfo>& aComponentInfo, const TDesC& aUniqueSwTypeName, const TDesC* aGlobalId=NULL, TScrComponentOperationType aCompOpType=EScrCompInstall);
+		
+		/** 
+			Adds a new dependency between two software components (supplier and dependant) of any type.
+			For example, if VNC Viewer is ported to the Symbian OS using the POSIX library, VNC Viewer
+			depends on the POSIX library. Here, VNC Viewer is dependant, whereas the POSIX library is supplier. 
+			
+			A dependency exists on global component ids, since a dependency is a global relation between 
+			two components, regardless to their status on a particular system. While local component ids 
+			(@see TComponentId) are private to a particular device and can change for the same global id 
+			in the case of upgrades or reinstalls, global component ids are unique and equal for the same 
+			component on any device.
+			
+			Since a dependency is defined using global ids, it can be added even if the participant
+			components don't exist in the system. 
+			N.B. A duplicate dependency is not allowed. 
+					
+			@param aSupplierVerCompId The versioned software component identifier of the supplier component. 
+			@param aDependantGlobalCompId The global software component identifier of the dependant component.
+			@leave KErrAlreadyExists If the dependency is already defined in the SCR.
+			@leave Or other system-wide error codes.
+		 */
+		IMPORT_C void AddComponentDependencyL(const CVersionedComponentId& aSupplierVerCompId, const CGlobalComponentId& aDependantGlobalCompId);
+
+		/**
+			Adds a new named 8-bit descriptor property to the registry for a given software component and locale. 
+			If the property already exits, then its value is updated.
+						
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			 	
+			@param aComponentId The unique ID of the given software component.
+			@param aName The name of the software component property.
+			@param aValue The value of the software component property.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes. 
+		 */
+		
+		IMPORT_C void SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, const TDesC8& aValue);		
+		
+		/**
+			Adds a new named localizable 16-bit string property to the registry for a given software component and locale. 
+			If the property already exists, then its value is updated.
+			
+			N.B. If the property exists with the same value but for a different locale, it is NOT replaced, but instead added for the new locale.
+			N.B. This API should not be used for raw binary data. For binary data, the TDesC8 variant of SetComponentProperty should be used instead.
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			 	
+			@param aComponentId The unique ID of the given software component.
+			@param aName The name of the software component property.
+			@param aValue The value of the software component property.
+			@param aLocale The language code of the property. The default value is non-localized property.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes. 
+		 */
+		
+		IMPORT_C void SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, const TDesC& aValue, TLanguage aLocale=KNonLocalized);
+		
+		/**
+			Adds a new named numeric property to the registry for a given software component. If the property already
+			exits, then its value is updated. Signed values from -2^63+1 to +2^63-1 are supported. 
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+					 	
+			@param aComponentId The unique ID of the given software component.
+			@param aName The name of the software component property.
+			@param aValue The value of the software component property. Can be TInt; if the value cannot exceed 32-bit range, as TInt64 provides automatic casting from TInt.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+	     */
+		IMPORT_C void SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, TInt64 aValue);
+						
+		/**
+			Registers a file to a given software component.
+			
+			Before registration, tests whether the provided filename is syntactically correct. 
+			For more information about the syntax, check @see RFs::IsValidName.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			    
+			@param aComponentId The unique ID of the given software component.
+			@param aFileName The fully qualified name of the file being registered.
+			@param aConsiderForInstalledDrives This parameter specifies whether the list of installed drives ( @see CComponentEntry::InstalledDrives) should be maintained as a result of this operation. 
+			In most cases, this should be left at the default setting, unless a file is registered for uninstall purposes only and is not actually present on the system, for example a possible temporary file which might be created later by the component's application(s)
+			Please note that if UnregisterComponentFileL is later used on the component, this parameter will not apply, and the file registration may still affect the list of installed drives.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave KErrArgument If the file name is invalid or is not fully qualified
+			@leave Or system-wide error codes.
+		 */	
+		IMPORT_C void RegisterComponentFileL(TComponentId aComponentId, const TDesC& aFileName, TBool aConsiderForInstalledDrives = ETrue); 
+		
+		/**
+			Adds a new named 8-bit descriptor property to the registry for a given file and software component. If the property already
+			exits, then its value is updated.
+			
+			A file property allows adding custom information about a component’s file ownership, for example, a native installer 
+			may associate custom operations to be done on uninstall for a particular file.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			
+			@param aComponentId The unique ID of the given software component.
+			@param aFileName  The fully qualified name of the file.
+			@param aPropName  The name of the file property being added.
+			@param aPropValue The value of the file property being set.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+		*/
+		IMPORT_C void SetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName, const TDesC8& aPropValue);
+		
+		/**
+			Adds a new named numeric property to the registry for a given file and software component. 
+			If the property already exists, it is just updated.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+				
+			@param aComponentId The unique ID of the given software component.	 	
+			@param aFileName  The fully qualified name of the file.
+			@param aPropName  The name of the file property being added.
+			@param aPropValue The value of the file property being added.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+		 */
+		IMPORT_C void SetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName, TInt aPropValue);
+		
+		/**
+			Adds a new localized component name for a given software component. 
+			If the localized name already exists for the specified locale, or one of the locales in its downgrade path (@see BaflUtils::GetDowngradePathL),
+			then it is updated. 
+			If no locale is specified, then the default component name is updated (or added if no default name exists).
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			
+			@param aComponentId The unique ID of the given software component.
+			@param aName The new value of the component name for a given locale.
+			@param aLocale The language code of the requested locale. The default value is non-localized.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+		*/
+		IMPORT_C void SetComponentNameL(TComponentId aComponentId, const TDesC& aName, TLanguage aLocale=KNonLocalized);
+		
+		/**
+			Adds a new localized component vendor for a given software component. 
+			If the localized vendor name already exists for the specified locale, or one of the locales in its downgrade path (@see BaflUtils::GetDowngradePathL),
+			then it is updated. 
+			If no locale is specified, then the default vendor name is updated (or added if no default vendor name exists).
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+						
+			@param aComponentId The unique ID of the given software component.
+			@param aVendor The new value of the vendor name for a given locale.
+			@param aLocale The language code of the requested locale. The default value is non-localized.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+	    */
+		IMPORT_C void SetVendorNameL(TComponentId aComponentId, const TDesC& aVendor, TLanguage aLocale=KNonLocalized);
+		
+		/**
+			Updates the version of a given software component.
+			
+			N.B. The default value of component version is NULL.
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+						
+			@param aComponentId The unique ID of the given software component.
+			@param aVersion The new value of the version attribute.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+		 */
+		IMPORT_C void SetComponentVersionL(TComponentId aComponentId, const TDesC& aVersion);
+		
+		/**
+			Sets whether the component is removable.
+			When a component is added, this is set to True by default (i.e. all non-ROM components are removable unless stated otherwise).
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			 
+			@param aComponentId The unique ID of the given software component.
+			@param aValue ETrue to set component as removable. EFalse to set component as unremovable.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+			
+			@capability AllFiles Creating non-removable components requires AllFiles.
+		 */
+		IMPORT_C void SetIsComponentRemovableL(TComponentId aComponentId, TBool aValue);
+		
+		/**
+			Sets whether the component is DRM protected.
+			When a component is added, this is set to False by default (i.e. all components are non-DRM protected unless stated otherwise).
+					
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+					 
+			@param aComponentId The unique ID of the given software component.
+			@param aValue ETrue to set component as DRM protected. EFalse to set component as non-DRM protected.
+					
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+					
+			@capability WriteDeviceData Creating DRM protected components requires WriteDeviceData.
+		 */
+		IMPORT_C void SetIsComponentDrmProtectedL(TComponentId aComponentId, TBool aValue);
+		
+		/**
+			Sets the hidden attribute of a component indicating that the component shouldn't be displayed in the list of installed components.
+			When a component is added, this is set to False by default (i.e. all components are visible unless stated otherwise).
+			
+			N.B. SCR does not enforce usage of this flag, and application managers may ignore it, e.g. in an admin view.
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+							 
+			@param aComponentId The unique ID of the given software component.
+			@param aValue ETrue to set component as hidden. EFalse to set component as non-hidden.
+							
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+							
+			@capability WriteDeviceData Creating hidden components requires WriteDeviceData.
+		 */
+		IMPORT_C void SetIsComponentHiddenL(TComponentId aComponentId, TBool aValue);
+		
+		/**
+			Sets the Known-Revoked attribute of a component. If this attribute is true, then it indicates 
+			a revocation check was performed during or after the installation and the component
+			was found to be revoked. When a component is added, this is set to False by default.
+							
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+							 
+			@param aComponentId The unique ID of the given software component.
+			@param aValue ETrue to set component as known-revoked. EFalse to set component as known-unrevoked.
+							
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+							
+			@capability WriteDeviceData Creating known-revoked components requires WriteDeviceData.
+		 */
+		IMPORT_C void SetIsComponentKnownRevokedL(TComponentId aComponentId, TBool aValue);
+		
+		/**
+			Sets the Origin-Verified attribute of a component. If this attribute is true, then it indicates that 
+			the installer has verified the originator of the software component by using appropriate checking mechanisms (e.g. certificates). 
+			If the attribute is false, it means that such a verification has not been performed, or that the installer does not support origin verification. 
+			When a component is added, this is set to False by default.
+							
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+							 
+			@param aComponentId The unique ID of the given software component.
+			@param aValue ETrue to set component as origin-verified EFalse to set component as origin-non-verified.
+							
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+							
+			@capability WriteDeviceData Creating origin verified components requires WriteDeviceData.
+		 */
+		IMPORT_C void SetIsComponentOriginVerifiedL(TComponentId aComponentId, TBool aValue);
+
+		/**
+			Sets the total size in bytes of the files owned by a given component. Note that SCR doesn't maintain this value.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+									 	
+			@param aComponentId The unique ID of the given software component.
+			@param aComponentSizeInBytes The size of the component's files in bytes.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+		 */
+		IMPORT_C void SetComponentSizeL(TComponentId aComponentId, TInt64 aComponentSizeInBytes);
+		
+		/**
+			Deletes a specific property entry of a given software component.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			N.B. If the component or property doesn't exist, the function completes successfully.
+			N.B. If the property is specified for multiple locales, it is deleted for all of them.
+			 	
+			@param aComponentId The unique ID of the given software component.
+			@param aPropName The name of the component property being deleted.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+	     */
+		IMPORT_C void DeleteComponentPropertyL(TComponentId aComponentId, const TDesC& aPropName);
+		
+		/** 
+			Deletes a specific file property entry for a given file and software component.
+						
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			
+			@param aComponentId The unique ID of the given software component.
+			@param aFileName The fully qualified name of the file.
+			@param aPropName The name of the file property being deleted.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+		 */
+		IMPORT_C void DeleteFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName);
+		
+		/**
+			Unregisters a specific file entry from a given software component.
+			Note that all associated file properties for the same component are removed as well.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			N.B. This operation also deletes all the corresponding file properties.
+			  	
+			@param aComponentId The unique ID of the given software component.
+			@param aFileName The fully qualified name of the file being deregistered.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+	     */
+		IMPORT_C void UnregisterComponentFileL(TComponentId aComponentId, const TDesC& aFileName);
+		
+		/**
+			Deletes a sofware component entry and all its data from the registry, including properties and file registration records.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			N.B. If the component doesn't exist, the function completes successfully.
+				
+			@param aComponentId The unique ID of the given software component.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+		*/
+		IMPORT_C void DeleteComponentL(TComponentId aComponentId);
+		
+		/** 
+			Deletes an existing dependency between two software components (supplier and dependant) of any type.
+			(@see RSoftwareComponentRegistry::AddComponentDependencyL for more information about component dependency.)
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			N.B. If the dependency doesn't exist, the function completes successfully.
+							
+			@param aSupplierGlobalCompId The global software component identifier of the supplier component. 
+			@param aDependantGlobalCompId The global software component identifier of the dependant component.
+			@leave System-wide error codes.
+		 */
+		IMPORT_C void DeleteComponentDependencyL(const CGlobalComponentId& aSupplierGlobalCompId, const CGlobalComponentId& aDependantGlobalCompId);
+		
+		/**
+			Retrieves a specific software component entry with the component name and vendor for a particular locale. 
+							
+			@param aComponentId The unique ID of the given software component.
+			@param aEntry An output parameter for returning information for the component matching the given id. 
+				          If no such component is present, this parameter remains unchanged.
+			@param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale.
+						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find
+						   the names. If it fails, then the non-localized names are returned. If non-localized versions
+						   couldn't be found too, the first available language for the component is retrieved.
+						   If KNonLocalized is provided, then the non-localized component and vendor names are returned,
+						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
+						   If a particular language is provided, then the names are searched for this particular language
+						   and its downgraded languages. If there is no name and vendor with the provided language, then the function leaves with KErrScrUnsupportedLocale.
+		    @return If the requested component is found, then ETrue is returned. Otherwise, EFalse.
+		    @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale.
+		    @leave System-wide error codes.
+	     */
+		IMPORT_C TBool GetComponentL(TComponentId aComponentId, CComponentEntry& aEntry, TLanguage aLocale=KUnspecifiedLocale) const;							
+		
+		/**
+			Retrieves the localized information from ComponentLocalizable table for a given component id.
+							
+			@param aComponentId The unique ID of the given software component.
+			@param aCompLocalizedInfoArray An output parameter for returning localized information for a given component id. 
+			@leave System-wide error codes.
+			@capability  ReadUserData Accessing a component's localized information requires ReadUserData
+		*/
+		IMPORT_C void GetComponentLocalizedInfoL(TComponentId aComponentId, RPointerArray<CLocalizableComponentInfo>& aCompLocalizedInfoArray) const;
+		
+		/**
+			Retrieves the array of all software component IDs in the SCR, optionally matching a particular filter.
+				
+			@param aComponentIdList The component Id list of all sofwtare components.
+			@param aFilter Pointer to the filter object which will be used by the SCR to enumerate the software components.
+						   If no filter is provided, all software components in the SCR are listed.
+		
+			@leave System-wide error codes.
+
+			@capability  ReadUserData Accessing list of components installed by the user requires ReadUserData
+		 */
+		IMPORT_C void GetComponentIdsL(RArray<TComponentId>& aComponentIdList, CComponentFilter* aFilter=NULL) const;
+		
+		/**
+			Retrieves the local component id of a given global component id.
+			
+			@param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type.
+			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+			@return The local unique component id.
+			
+			@leave KErrNotFound Software component with this global id is not present in the system.
+			@leave System-wide error codes.
+		 */
+		IMPORT_C TComponentId GetComponentIdL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName) const;
+					
+		/**
+			Retrieves a specific software component entry with the specified global id and software type name for a given locale. 
+							
+			@param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type.
+			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+			@param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale.
+						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find
+						   the names. If it fails, then the non-localized names are returned. If non-localized versions
+						   couldn't be found too, the first available language for the component is retrieved.
+						   If KNonLocalized is provided, then the non-localized component and vendor names are returned,
+						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
+						   If a particular language is provided, then the names are searched for this particular language
+						   and its downgraded languages. If there is no name and vendor with the provided language, then the function leaves with KErrScrUnsupportedLocale.
+		    @return aEntry A pointer to the component entry object for the given global component id. 
+		    
+		    @leave KErrScrUnsupportedLocale The component requested with the global id couldn't be found for the specified locale.
+		    @leave System-wide error codes.
+		 */
+		IMPORT_C CComponentEntry* GetComponentL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName, TLanguage aLocale=KUnspecifiedLocale) const;
+		
+		/**
+			Retrieves the list of supplier components with the range of versions on which a given 
+			component depends. The range of versions here indicates specific versions of the returned 
+			components (suppliers) which the given component (dependant) depend on.
+
+			@param aDependantGlobalId The global component id of the given software component.
+			@param aSupplierList The versioned component id list of supplier components for the given dependant component.
+			@leave System-wide error codes.
+		 */
+		IMPORT_C void GetSupplierComponentsL(const CGlobalComponentId& aDependantGlobalId, RPointerArray<CVersionedComponentId>& aSupplierList) const;
+				
+		/**
+			Retrieves the list of components (dependants) with the range of versions that depend on 
+			a given component (supplier). The range of versions here indicates specific versions of 
+			the given component which the returned components depend on.
+					
+			@param aSupplierGlobalId The global component id of the given software component.
+			@param aDependantList The versioned component id list of dependant components for the given supplier component.
+			@leave System-wide error codes.
+		 */
+		IMPORT_C void GetDependantComponentsL(const CGlobalComponentId& aSupplierGlobalId, RPointerArray<CVersionedComponentId>& aDependantList) const;
+
+		/**
+			Retrieves the array of properties owned by a specific file registered to a given component.
+			
+			@param aComponentId The unique ID of the given software component.	
+			@param aFileName The fully qualified name of the file.
+			@param aProperties An output parameter for returning the list of properties owned by the given file.
+			@leave System-wide error codes.
+		 */
+		IMPORT_C void GetFilePropertiesL(TComponentId aComponentId, const TDesC& aFileName, RPointerArray<CPropertyEntry>& aProperties) const;
+		
+		/**
+			Retrieves a specified property entry for a given file and software component.
+					
+			@param aComponentId The unique ID of the given software component.
+			@param aFileName The fully qualified name of the file.
+			@param aPropertyName The name of the requested property.
+			@return Returns a pointer to the property object containing the requested file property.
+				    The ownership is transferred. If the property couldn't be found, then NULL is returned.
+			@leave System-wide error codes.	    
+		 */
+		IMPORT_C CPropertyEntry* GetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropertyName) const;
+		
+		/**
+			Retrieves the number of files registered by a component.
+					
+			@param aComponentId The unique ID of the given software component.
+			@return The number of registered files.
+			@leave System-wide error codes.	    
+		 */
+		IMPORT_C TUint GetComponentFilesCountL(TComponentId aComponentId) const;		
+		
+		/**
+			Retrieves the set of components which register a given file.
+				
+			@param aFileName The fully qualified name of the file.
+			@param aComponents An output parameter for returning for the list of components which own the given file.
+			@leave System-wide error codes.	
+		 */ 
+		IMPORT_C void GetComponentsL(const TDesC& aFileName, RArray<TComponentId>& aComponents) const;
+		
+		/**
+			Retrieves a specified property for a given component, property name and locale. 
+			
+			When searching for localizable properties, it is possible that the requested language 
+			variant is not available, however, there may be other language variants that are acceptable.
+			Therefore, a language downgrade path that starts with the language associated with the requested 
+			locale and ends with the least best match is first created. Then the downgrade path is used to
+			search for a language specific property and the first match is returned to the user.
+	
+			@param aComponentId The unique ID of the given software component.
+			@param aPropertyName The name of the component property.
+			@param aLocale The optional language code of the requested locale. The default value is KUnspecifiedLocale.
+						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used 
+						   as explained above to find the property.  If it fails, then the non-localized version is looked up.
+						   If non-localized version couldn't be found too, the function leaves with KErrNotFound.
+						   If KNonLocalized is provided, then the non-localized version of the property is returned,
+						   If non-localized version doesn't exist, then the function will leave with KErrNotFound.
+						   If a particular language is provided, then the property is searched for this particular language
+						   and its downgraded languages. If there is no property with the provided language, then the function 
+						   leaves with KErrNotFound.
+			@return Returns a pointer to the property object containing the requested component property entry.
+					The ownership is transferred. If the property couldn't be found, then NULL is returned.
+			@leave System-wide error codes.
+		 */
+		IMPORT_C CPropertyEntry* GetComponentPropertyL(TComponentId aComponentId, const TDesC& aPropertyName, TLanguage aLocale=KUnspecifiedLocale) const;
+		
+		/**
+			Retrieves the set of properties for a particular locale belonging to the given component.
+			if no locale is specified, then the current locale is used as default.
+			
+			For more information about searching for localized properties look at @see RSoftwareComponentRegistry::GetComponentPropertyL.
+				
+			@param aComponentId The unique ID of the given software component.
+			@param aProperties An output parameter for returning the list of properties which owned by the given component.
+			@param aLocale The optional language code of the requested locale. The default value is KUnspecifiedLocale.
+						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used 
+						   as explained above to find properties.  If it fails, then the non-localized version is looked up.
+						   If non-localized versions couldn't be found too, the function leaves with KErrNotFound.
+						   If KNonLocalized is provided, then the non-localized versions of properties are returned,
+						   If non-localized versions don't exist, then the function will leave with KErrNotFound.
+						   If a particular language is provided, then the properties are searched for this particular language
+						   and its downgraded languages. Otherwise, the function leaves with KErrNotFound.
+			@leave System-wide error codes.
+		*/
+		IMPORT_C void GetComponentPropertiesL(TComponentId aComponentId, RPointerArray<CPropertyEntry>& aProperties, TLanguage aLocale=KUnspecifiedLocale) const;
+				
+		/**
+			Returns whether all drives registered for the given component are present.
+			The list of drives is derived using the set of files registered by the component.
+			
+			N.B. For removable media, this method does NOT check that the actual media matches the one which contains the component's files.
+			It just verifies that any media is present in the drive.
+			
+			@param aComponentId The unique ID of the software component.
+			@return ETrue, if all drives registered for the component are present; otherwise EFalse.
+			@publishedPartner
+		 */
+		IMPORT_C TBool IsMediaPresentL(TComponentId aComponentId) const;
+		
+		/** 
+			Sets the SCOMO state of a given component.
+			
+			@param aComponentId The unique ID of the given software component. 	
+			@param aScomoState The new SCOMO state of the component.
+			@leave System-wide error codes.
+		 */
+		IMPORT_C void SetScomoStateL(TComponentId aComponentId, TScomoState aScomoState) const;
+		
+		/** 
+			Retrieves the UID of the plug-in which is responsible for a given MIME type.
+					
+			@param aMimeType The MIME type. 	
+			@return The UID of the plug-in.
+			@leave KErrSifUnsupportedSoftwareType There is no corresponding plug-in for this MIME type.
+			@leave System-wide error codes.			
+			@internalTechnology
+		 */
+		IMPORT_C TUid GetPluginUidL(const TDesC& aMimeType) const;
+		
+		/** 
+			Retrieves the UID of the plug-in that installed a given component.
+							
+			@param aComponentId Component's local identifier. 	
+			@return The UID of the plug-in.
+			@leave System-wide error codes.
+			@internalTechnology
+		 */
+		IMPORT_C TUid GetPluginUidL(TComponentId aComponentId) const;
+		
+		/**
+			Add a new software type name to the SCR database.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			
+			@param aUniqueSwTypeName Non-localized unique software type name.
+			@param aSifPluginUid The SIF plug-in UID of the installer which is responsible for installing components with this software type
+			@param aInstallerSecureId The secure id of the installer which is responsible for installing components with this software type
+			@param aExecutionLayerSecureId The secure id of the installer's execution layer which refers to an executable that interprets or  
+			                               executes byte code for programs written in a high level language Java, Python, Widgets, etc.
+			                               This paramater is optional. If it doesn't exist, it should be equal to the installer's secure id.                                
+			@param aMimeTypes The list of MIME types associated with this software type.
+			@param aLocalizedSwTypeNames A pointer to the list of optional localized software type names.
+			@leave System-wide error codes.
+			@internalTechnology
+		 */
+		IMPORT_C void AddSoftwareTypeL(const TDesC& aUniqueSwTypeName, TUid aSifPluginUid, TSecureId aInstallerSecureId, TSecureId aExecutionLayerSecureId, const RPointerArray<HBufC>& aMimeTypes, const RPointerArray<CLocalizedSoftwareTypeName>* aLocalizedSwTypeNames = NULL);
+		
+		/**
+			Deletes a sofware type name entry and all its mime types from the registry.
+			
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+			N.B. If the software type doesn't exist, the function completes successfully.
+			
+			@param aUniqueSwTypeName Non-localized unique software type name.
+			@param aDeletedMimeTypes An output parameter, where the MIME types deleted from SCR as a result of this operation will be stored.
+			@leave System-wide error codes.
+			@internalTechnology
+		 */
+		IMPORT_C void DeleteSoftwareTypeL(const TDesC& aUniqueSwTypeName, RPointerArray<HBufC>& aDeletedMimeTypes);
+	
+		/**
+			Returns whether the software installer of a given component is present.
+					
+			@param aComponentId The unique ID of the given software component. 
+			@return ETrue, if the software installer of the given component is present; otherwise EFalse.
+			@leave System-wide error codes.
+		 */
+		IMPORT_C TBool IsComponentOrphanedL(TComponentId aComponentId);
+		
+		 /**
+			Retrieve the log entries recorded by SCR. A log entry (@see Usif::CScrLogEntry) contains information 
+			about the component operation (installation, uninstallation or upgrade) made by SCR.
+		
+			@param aLogEntries The caller supplies an empty array of CScrLogEntry which is loaded
+					with the log entries from the SCR. If the SCR Log is empty then the array count 
+					will be zero. The caller is responsible for deleting all memory.
+			@param aUniqueSwTypeName Optional parameter for non-localized unique software type name.
+									 If provided, only the log entries of the given software type are returned.
+			@leave System-wide error codes.
+			@capability ReadUserData
+		 */
+		IMPORT_C void RetrieveLogEntriesL(RPointerArray<CScrLogEntry>& aLogEntries, const TDesC* aUniqueSwTypeName=NULL) const;
+		
+		/**
+			Compares two generic, arbitrary length, dotted decimal version numbers. e.g. "1.2.32.4" < "1.3"
+			
+			@param aVersionLeft The version on the left side of the equality.
+			@param aVersionRight The version on the right side of the equality.
+			@return A positive value indicates that the left version is greater than the right version. 
+				    A negative value indicates that the left version is less than the right version. 
+				    Zero indicates that the left and right versions are equal. 
+			@leave System-wide error codes.
+		 */
+		IMPORT_C static TInt CompareVersionsL(const TDesC& aVersionLeft, const TDesC& aVersionRight);
+
+		/**
+			Returns whether the component is on a read-only drive.
+
+			@param aComponentId The unique ID of the software component. 
+			@return ETrue, if the component is present on a read only drive; otherwise EFalse.
+			@leave System-wide error codes.
+		 */
+		IMPORT_C TBool IsComponentOnReadOnlyDriveL(TComponentId aComponentId) const;
+		
+		/**
+			Returns whether the component is present on the device. As a component might be 
+			installed to a media card which was later removed, not all components registered are 
+			necessarily present. Please note that IsMediaPresentL does not check whether the media 
+			card containing the component is present. 
+			
+			N.B. This function relies on values reported by installers, and thus, component presence 
+			might not be updated immediately when a media card is replaced.
+			
+			@param aComponentId The unique ID of the component.
+			@return ETrue, if the component is present; otherwise EFalse.
+			
+			@leave System-wide error codes.
+		 */
+		IMPORT_C TBool IsComponentPresentL(TComponentId aComponentId) const;
+		
+		/**
+			Sets whether the software component is present fully after being installed on to a 
+			removable drive.
+
+			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
+					 
+			@param aComponentId The unique ID of the given software component.
+			@param aValue ETrue to set component as present. EFalse to set component as not present.
+			
+			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
+			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
+			@leave Or system-wide error codes.
+		 */
+		IMPORT_C void SetIsComponentPresentL(TComponentId aComponentId, TBool aValue);
+		
+		/**
+			Gets the installed supported language ID's array.
+
+			@param aComponentId The unique ID of the given software component.
+			@param aMatchingSupportedLanguages RArray containing the list of installed supported languages
+			
+			@leave Or system-wide error codes.
+			@capability  ReadUserData Accessing the installed supported language ID's array requires ReadUserData
+		 */
+		IMPORT_C void GetComponentSupportedLocalesListL(TComponentId aComponentId, RArray<TLanguage>& aMatchingSupportedLanguages) const;
+		
+	private:
+
+		TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const;
+		template <class C> void SendDependencyArgsL(TInt aFunction, const C& aSupplierId, const CGlobalComponentId& aDependantGlobalCompId);
+		template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize);
+		template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs);
+		template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs);
+		template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray);
+		template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray);
+		};
+	
+	
+	NONSHARABLE_CLASS(RSoftwareComponentRegistryView) : public RScsClientSubsessionBase
+	/**
+		This class opens a sub-session to the SCR server and sends a request to create a component view
+		by using the supplied filter on the server side.
+	 */
+		{
+	public:
+		/**
+			Default constructor of registry view sub-session.
+		 */
+		IMPORT_C RSoftwareComponentRegistryView();
+		
+		/**
+			Closes the registry view on the SCR server.
+		 */
+		IMPORT_C void Close();
+		
+		/**
+	    	Opens a view of the installed software components in the SCR.
+			The SCR initializes the view by enumerating the components with the given filter.
+		
+			If the call to this function completes successfully, then the interface client will access 
+			the enumerated records by using @see RSoftwareComponentRegistryView::NextComponentL.
+			
+			If a transaction owned by another session is in progress on the SCR server, the open view request 
+			will be rejected.
+			
+			N.B. After this function completes successfully, NextComponentLor NextComponentSetL functions 
+			can be used together. However, GetComponentIdsL function cannot be called before or after
+			these functions. 
+			
+			@param aCompReg An active SCR connection.
+			@param aFilter Pointer to the filter object which will be used by the SCR to enumerate the software components.
+						   If no filter is provided, all software components in the SCR are enumerated.
+			@leave KErrScrWriteOperationInProgress If a transaction owned by another session is in progress.
+			@leave Or a system-wide error code.
+
+			@capability  ReadUserData Accessing list of components installed by the user requires ReadUserData
+		*/
+		IMPORT_C void OpenViewL(const RSoftwareComponentRegistry& aCompReg, CComponentFilter* aFilter=NULL);		
+		
+		/**
+			Retrieves the next software component entry from the view which has already been 
+			created in the SCR with @see RSoftwareComponentRegistryView::OpenViewL.
+			
+			The locale for the component name and vendor of the retrieved component can be specified.
+				
+			@param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale.
+						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find
+						   the names. If it fails, then the non-localized names are returned. If non-localized versions
+						   couldn't be found too, the first available language for the component is retrieved.
+						   If KNonLocalized is provided, then the non-localized component and vendor names are returned,
+						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
+						   If a particular language is provided, then the names are searched for this particular language
+						   and its downgraded languages. If there is no name and vendor with the provided language, 
+						   then the function leaves with KErrScrUnsupportedLocale.
+			@return Returns the next component matching the given filter. If no more components can be found, returns NULL.
+				     The ownership is transferred to the calling client.	     
+			@leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale.
+			@leave A system-wide error code.
+
+			@capability  ReadUserData Accessing list of components installed by the user requires ReadUserData
+		 */
+		IMPORT_C CComponentEntry* NextComponentL(TLanguage aLocale=KUnspecifiedLocale) const;
+		
+		/**
+			Retrieves the next software component entry from the view which has already been 
+			created in the SCR with @see RSoftwareComponentRegistryView::OpenViewL.
+			
+			The locale for the component name and vendor of the retrieved component can be specified.
+			
+			@param aEntry An output parameter for returning the current component registry entry of the view.	
+			@param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale.
+						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find
+						   the names. If it fails, then the non-localized names are returned. If non-localized versions
+						   couldn't be found too, the first available language for the component is retrieved.
+						   If KNonLocalized is provided, then the non-localized component and vendor names are returned,
+						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
+						   If a particular language is provided, then the names are searched for this particular language
+						   and its downgraded languages. If there is no name and vendor with the provided language, 
+						   then the function leaves with KErrScrUnsupportedLocale.		
+			@return EFalse, if the end of the view has been reached. Otherwise, ETrue.  		
+			@leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale.
+			@leave A system-wide error code.
+
+			@capability  ReadUserData Accessing list of components installed by the user requires ReadUserData
+	     */
+		IMPORT_C TBool NextComponentL(CComponentEntry& aEntry, TLanguage aLocale=KUnspecifiedLocale) const;				
+		
+		/**
+			Retrieves the set of software component records from a given view which has already been 
+			created in the SCR. The number of returned records is limited by the size of the component
+			list.  
+			
+			The locale for the component names and vendors of the retrieved components can be specified.
+						
+			@param aMaxCount The maximum size of the returned components array.
+			@param aComponentList The list of component entry objects retrieved from the given view. 
+			@param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale.
+						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find
+						   the names. If it fails, then the non-localized names are returned. If non-localized versions
+						   couldn't be found too, the first available language for the component is retrieved.
+						   If KNonLocalized is provided, then the non-localized component and vendor names are returned,
+						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
+						   If a particular language is provided, then the names are searched for this particular language
+						   and its downgraded languages. If there is no name and vendor with the provided language, 
+						   then the function leaves with KErrScrUnsupportedLocale.		
+			@leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale.
+			@leave A system-wide error code.
+
+			@capability  ReadUserData Accessing list of components installed by the user requires ReadUserData
+		 */
+		IMPORT_C void NextComponentSetL(TInt aMaxCount, RPointerArray<CComponentEntry>& aComponentList, TLanguage aLocale=KUnspecifiedLocale) const;
+	
+	private:
+		TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const;
+		template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize);
+		template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs);
+		template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray);
+		template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray);
+		};
+	
+	NONSHARABLE_CLASS(RSoftwareComponentRegistryFilesList) : public RScsClientSubsessionBase
+	/**
+		This class supports listing of files registered to a particular component.
+	 */
+		{
+	public:
+		/**
+			Default constructor of registry file list sub-session.
+		 */
+		IMPORT_C RSoftwareComponentRegistryFilesList();
+		
+		/**
+			Closes the registry view on the SCR server.
+		 */
+		IMPORT_C void Close();
+		
+		/**
+			Opens the list of files in the SCR owned by a given software component.
+			The SCR initializes the list by enumerating the files of the given component Id.
+				
+			If the call to this function completes successfully, then the interface client will access 
+			to the enumerated files by using NextFileL/NextFileSetL interface functions.
+			
+			If a transaction owned by another session is in progress on the SCR server, the open list request 
+			will be rejected.
+			
+			@param aCompReg An active SCR connection.	
+			@param aComponentId The unique ID of the given software component.
+			 
+			@leave KErrScrWriteOperationInProgress If a transaction owned by another session is in progress.
+			@leave Or a system-wide error code.
+		 */
+		IMPORT_C void OpenListL(const RSoftwareComponentRegistry& aCompReg, TComponentId aComponentId);		
+		
+		/**
+			Retrieves the next file name from the list which has already been created in the SCR with OpenListL.
+										
+			@return Returns the next file name. If no more files can be found, returns NULL
+			@leave A system-wide error code.	
+	     */
+		IMPORT_C HBufC* NextFileL() const;	
+		
+		/**
+			Retrieves the set of records from a given file list which has already been created in the SCR. 
+								
+			@param aMaxCount The maximum size of the files array returned.
+			@param aFileList The list of file names retrieved from the given list. 
+			@leave A system-wide error code.
+		 */
+		IMPORT_C void NextFileSetL(TInt aMaxCount, RPointerArray<HBufC>& aFileList) const;
+	
+	private:
+		TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const;
+		template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize);
+		template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs);
+		template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray);
+		};
+			
+	}// End of namespace Usif
+
+#endif // SOFTWARECOMPONENTREGISTRY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc/scr.iby	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef SCR_IBY
+#define SCR_IBY
+
+#include "sqlite3_secure.iby"
+
+REM Software Component Registry
+
+file=ABI_DIR\BUILD_DIR\scrclient.dll			sys\bin\scrclient.dll
+file=ABI_DIR\BUILD_DIR\scrdatabase.dll			sys\bin\scrdatabase.dll
+file=ABI_DIR\BUILD_DIR\scrserver.exe			sys\bin\scrserver.exe
+file=ABI_DIR\BUILD_DIR\scrhelperclient.dll		sys\bin\scrhelperclient.dll
+file=ABI_DIR\BUILD_DIR\scrhelperserver.exe		sys\bin\scrhelperserver.exe
+
+// Export SCR DB
+data=EPOCROOT##epoc32\release\winscw\udeb\z\sys\install\scr\provisioned\scr.db		sys\install\scr\provisioned\scr.db
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc/scrcommon.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,168 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Information shared between the Software Component Registry client and server implementations.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+ 
+#ifndef SCRCOMMON_H
+#define SCRCOMMON_H
+ 
+#include <e32ver.h>
+#include <e32uid.h>
+#include <f32file.h>
+#include <e32std.h>
+#include <s32file.h>
+
+namespace Usif
+	{
+	/** Identifies the Software Component Registry Symbian OS Server. */
+	_LIT(KSoftwareComponentRegistryName, "!SoftwareComponentRegistry");	
+
+	const TInt KScrVerMajor = 1;		///< SCR Server version major component.
+	const TInt KScrVerMinor = 0;		///< SCR Server version minor component.
+	const TInt KScrVerBuild = 0;		///< SCR Server version build component.
+
+	inline TVersion ScrServerVersion();
+		
+	/**
+		Executable which hosts SCR Server.  Required to launch the process.
+
+		@see KUidScrServer
+	*/
+	_LIT(KScrServerImageName, "scrserver.exe");
+		
+	/**
+		Hosting the executable's secure ID.  Required to launch the process.
+
+		@see KScrServerImageName
+	 */
+	const TUid KUidScrServer = {0x10285BC0};
+		
+	inline TUidType ScrServerImageFullUid();
+	 	
+	enum TScrSessionFunction
+	/**
+		Functions supported by a SCR server session.
+	 */
+		{
+		ECreateTransaction        	 	 = 0x00,	///< Create a new transaction
+		ERollbackTransaction       	 	 = 0x01,	///< Roll back the transaction in progress
+		ECommitTransaction           	 = 0x02,	///< Commit the transaction in progress
+		EAddComponent	         	 	 = 0x03,	///< Add a new component record into the SCR database 
+		EAddComponentDependency		 	 = 0x04,	///< Add a new dependency between two software components.
+		ESetComponentLocalizableProperty = 0x05, 	///< Set a string property of the component
+		ESetComponentNumericProperty 	 = 0x06, 	///< Set a numeric property of the component
+		ESetComponentBinaryProperty  	 = 0x07, 	///< Set a binary property of the component
+		ERegisterComponentFile		 	 = 0x08,	///< Register a file to an existing component
+		ESetFileStringProperty		 	 = 0x09,	///< Set a string property of the component's file
+		ESetFileNumericProperty		 	 = 0x0A,	///< Set a string property of the component's file
+		ESetComponentName		 	 	 = 0x0B,	///< Update the name of the component
+		ESetComponentVendor		     	 = 0x0C,	///< Update the vendor of the component
+		ESetComponentVersion		 	 = 0x0D,	///< Set the version of the component
+		ESetIsComponentRemovable     	 = 0x0E,    ///< Set the removable attribute of the component
+		ESetIsComponentDrmProtected		 = 0x0F,    ///< Set the DRM protected attribute of the component.
+		ESetIsComponentHidden			 = 0x10,    ///< Set the hidden attribute of the component.
+		ESetIsComponentKnownRevoked		 = 0x11,    ///< Set the known-revoked attribute of the component.
+		ESetIsComponentOriginVerified	 = 0x12,    ///< Set the origin-verified attribute of the component.
+		ESetComponentSize			 	 = 0x13, 	///< Set the install-time size of the component
+		EDeleteComponentProperty	 	 = 0x14,	///< Delete a property of the component
+		EDeleteFileProperty	 			 = 0x15,	///< Delete a property of the component's file
+		EUnregisterComponentFile		 = 0x16,	///< Deregister a component's file
+		EDeleteComponent				 = 0x17,	///< Delete a component from the SCR database
+		EDeleteComponentDependency       = 0x18,	///< Delete an existing dependency between two software components.
+		EGetSingleComponentSize		 	 = 0x19,	///< Retrieve the entry size of a given component id
+		EGetSingleComponentData		 	 = 0x1A,	///< Retrieve the entry data of a given component id
+		EGetFilePropertiesSize		 	 = 0x1B,	///< Retrieve the buffer size needed to write the file properties.
+		EGetFilePropertiesData		 	 = 0x1C,	///< Retrieve the data of the file properties obtained from the SCR server.
+		EGetSingleFilePropertySize   	 = 0x1D,	///< Retrieve the buffer size needed to write the value of the single file property given.
+		EGetSingleFilePropertyData   	 = 0x1E,	///< Retrieve the data of the single file property.
+		EGetComponentFilesCount		 	 = 0x1F,    ///< Retrieve the number of files registered by a component
+		EGetFileComponentsSize		 	 = 0x20,	///< Retrieve the buffer size needed to write the component IDs possessing the given file.
+		EGetFileComponentsData		 	 = 0x21,	///< Retrieve the data of the component IDs.
+		EGetComponentPropertiesSize	 	 = 0x22,	///< Retrieve the buffer size needed to write the given component's properties.
+		EGetComponentPropertiesData	 	 = 0x23,	///< Retrieve the data of the component's properties obtained from the SCR server.
+		EGetComponentSinglePropertySize	 = 0x24,	///< Retrieve the buffer size needed to write the value of the single component property given.
+		EGetComponentSinglePropertyData	 = 0x25,	///< Retrieve the data of the single component property.
+		EGetLocalComponentId         	 = 0x26,	///< Retrieve the local component id of a given global component id.
+		EGetComponentWithGlobalIdSize	 = 0x27,	///< Retrieve the component entry size of a given global component id
+		EGetComponentWithGlobalIdData	 = 0x28, 	///< Retrieve the component entry data of a given global component id
+		EGetSupplierComponentsSize	 	 = 0x29,	///< Retrieve the buffer size needed to write the supplier global IDs of a given dependant component.		
+		EGetSupplierComponentsData   	 = 0x2A,	///< Retrieve the data of the supplier global IDs of a given dependant component.
+		EGetDependantComponentsSize	 	 = 0x2B,	///< Retrieve the buffer size needed to write the dependant global IDs of a given supplier component.		
+		EGetDependantComponentsData  	 = 0x2C,	///< Retrieve the data of the dependant global IDs of a given supplier component.
+		EGetComponentIdListSize			 = 0x2D,   	///< Retrieve the buffer size needed to write the component IDs enumerated with a given filter.
+		EGetComponentIdListData		     = 0x2E,	///< Retrieve the data of the component IDs enumerated with a given filter.
+		EGetLogFileHandle		 		 = 0x2F,    ///< Transfer the handle of the SCR log file to the client process
+		EGetComponentSupportedLocalesListSize = 0x30,    ///< Transfer the buffer size needed to write the list of matching supported languages 
+		EGetComponentSupportedLocalesListData = 0x31,    ///< Retrieve the data of the list of matching supported languages
+		EGetLocalizedComponentSize            = 0x32,    ///< Retrieve the localized information entry size of a given component id
+		EGetLocalizedComponentData            = 0x33,    ///< Retrieve the localized information entry data of a given component id
+		
+		EGetIsMediaPresent				 = 0x41,	///< Retrieve the presence info of medias where the component is installed.
+		EGetIsComponentOrphaned			 = 0x42,	///< Retrieve whether the given component is orphaned.
+		EGetIsComponentOnReadOnlyDrive	 = 0x43,	///< Retrieve if the component is present on a read-only drive.
+		EGetIsComponentPresent			 = 0x44,	///< Retrieve if the software component is fully present.
+						
+		ESetScomoState				 	 = 0x50,	///< Set the scomo state of a given component.
+		ESetIsComponentPresent			 = 0x51,	///< Set the attribute if the component is present fully.
+		EGetPluginUidWithMimeType    	 = 0x52,	///< Retrieve the SIF plugin UID for a given MIME type.
+		EGetPluginUidWithComponentId 	 = 0x53,	///< Retrieves the SIF plugin UID for a given component Id.
+		
+		ESubSessCreateComponentsView 	 = 0x60,	///< Creates a sub-session to handle a components view. 
+		ESubSessCreateFileList 	     	 = 0x61,	///< Creates a sub-session to handle a file list.
+		
+		EAddSoftwareType			 	 = 0x65,    ///< Add a new software type to the SCR database with MIME types, unique and localized names.
+		EDeleteSoftwareType			 	 = 0x66,    ///< Delete an existing software type from the SCR database.
+		EGetDeletedMimeTypes			 = 0x67,    ///< Retrieve the list of MIME types deleted in last software type deletion operation.
+		};
+		
+	enum TScrSubSessionFunction
+	/**
+		Functions supported by a SCR server session.
+	 */
+		{
+		EOpenComponentsView       = 0x70,		///< A components view isopened on the server side by using a given filter
+		EGetNextComponentSize     = 0x71,		///< Get the size of the next component entry from the components view.
+		EGetNextComponentData     = 0x72,		///< Get the next component entry from the components view.
+		EGetNextComponentSetSize  = 0x73,		///< Get the size of the next component entry set from the components view.
+		EGetNextComponentSetData  = 0x74,		///< Get the next component entry set from the components view.
+		EOpenFileList		  	  = 0x77,		///< A file list is opened on the server side by using a given filter
+		EGetNextFileSize      	  = 0x78,		///< Get the size of the next file from the present file list.
+		EGetNextFileData      	  = 0x79,		///< Get the next file from the present file list.
+		EGetNextFileSetSize   	  = 0x7A,		///< Get teh size of the next file set from the present file list.
+		EGetNextFileSetData       = 0x7B		///< Get the next file set from the present file list.
+		};
+	
+	/**
+		Delay in microseconds before the SCR Server is shut down, after
+		the last remaining session has been closed.
+	 */
+	static const TInt KScrServerShutdownPeriod = 2 * 1000 * 1000;
+	
+	/** Maximum length of a UID string. */
+	static const TInt KUidStringLen = 8;
+	
+	} // End of namespace Usif
+ 
+ #include <usif/scr/scrcommon.inl>
+ 
+#endif // SCRCOMMON_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc/scrcommon.inl	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,66 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* The functions defined in this file provide constant data which is
+* used by both the SCR server and client side implementations.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+ 
+#ifndef SCRCOMMON_INL
+#define SCRCOMMON_INL
+
+#include <usif/scr/scrcommon.h>
+
+namespace Usif
+	{
+	inline TVersion ScrServerVersion()
+	/**
+		This function is defined because there is no literal constructor for TVersion.
+
+		@return					Defines a version number which the client side code	
+								can use to open the SCR server. If the client code
+								was built with a higher version number, then it cannot
+								open the SCR server.  This ensures that a client only
+								talks to the SSCR serevr version is at least as high as
+								its own.
+	*/
+		{
+		TVersion version(KScrVerMajor, KScrVerMinor, KScrVerBuild);
+		return version;
+		}
+
+	inline TUidType ScrServerImageFullUid()
+	/**
+		This function is defined because there is no literal constructor
+		for TUidType.  It returns the SCR server executable's UID, which is used
+		to ensure the client side code launches the correct server process, as opposed
+		to another application which uses the same executable name.
+
+		@return TUidType		The SCR server executable's full UID.
+	 */
+		{
+		TUidType typ(KExecutableImageUid, KNullUid, KUidScrServer);
+		return typ;
+		}
+
+	} // End of namespace Usif 
+	
+#endif // SCRCOMMON_INL
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc/screntries.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1073 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Declares entry classes for Software Components Registry interface.
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifndef SCRENTRIES_H
+#define SCRENTRIES_H
+
+#include <e32base.h>
+#include <s32strm.h>
+#include <f32file.h> 
+#include <usif/usifcommon.h>
+
+namespace Usif
+	{
+	// CONSTANTS
+	
+	/**
+		KUnspecifiedLocale means that the locale is not specified and locale resolving will be done by SCR.
+		First, the current locale with its downgraded languages (@see BaflUtils::GetDowngradePathL) is tried 
+		by SCR. If no value is found, then non-localized values are searched for. 
+	 */
+	static const TLanguage KUnspecifiedLocale = TLanguage(-1);
+	
+	/**
+		KNonLocalized means that only non-localized values are looked up by SCR.
+	 */
+	static const TLanguage KNonLocalized = TLanguage(0); 
+	
+	// CLASSES
+	
+		
+	NONSHARABLE_CLASS(CGlobalComponentId) : public CBase
+	/**
+		Encapsulates the global software component identifier which is a named, component level and nullable string.
+		that an installer may use to specify a deterministic identifier for the component that is unique within 
+		the context of that software type. This global component id would be the package UID for native applications 
+		or the midlet-names for Java etc 
+		
+		The global component id is consistent and equal on all devices. It is used to state dependencies 
+		and to check for the presence of installed software components of arbitrary types without each installer having 
+		to be aware of every other installers naming scheme.		
+	 */
+		{
+	public:
+		/**
+			Creates an empty global software component ID object.
+			@return A pointer to the newly allocated global software component ID object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+		 */
+		IMPORT_C static CGlobalComponentId* NewLC();
+				
+		/**
+			Creates a global software component ID object.
+			@param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type.
+			@param aUniqueSwTypeName Non-localized unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+			@return A pointer to the newly allocated global software component ID object, if creation is successful.
+		 */ 
+		IMPORT_C static CGlobalComponentId* NewL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName);
+		
+		/**
+			Creates a global software component ID object.
+			@param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type.
+			@param aUniqueSwTypeName Non-localized unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+			@return A pointer to the newly allocated global software component ID object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+		 */ 
+		IMPORT_C static CGlobalComponentId* NewLC(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName);
+		
+		/**
+			Creates a global software component ID object from a stream.
+			@param aStream The stream to read the software component entry object from
+			@return A pointer to the newly allocated global software component ID object, if creation is successful.
+			@internalComponent
+		 */
+		IMPORT_C static CGlobalComponentId* NewL(RReadStream& aStream);
+				
+		/**
+			Externalises this CGlobalComponentId object to a write stream.
+			@param aStream The stream to which the object is externalised.
+			@internalComponent
+		 */
+		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
+				
+		/**
+			Internalises this CGlobalComponentId object from a read stream.
+			@param aStream The stream from which the object is internalised.
+			@internalComponent
+		 */
+		IMPORT_C void InternalizeL(RReadStream& aStream);
+				
+		/** @return The global id name part (@see CGlobalComponentId::NewLC) of the global component id.*/
+		IMPORT_C const TDesC& GlobalIdName() const;
+			
+		/** @return The software type name part (@see CGlobalComponentId::NewLC) of the global component id. */
+		IMPORT_C const TDesC& SoftwareTypeName() const;
+		
+		IMPORT_C ~CGlobalComponentId();
+		
+	private:
+		CGlobalComponentId();
+		void ConstructL(const TDesC& aGlobalIdName, const TDesC& aSoftwareTypeName);
+		
+	private:
+		HBufC* iGlobalIdName;    	///< The global id name part of the global component id.
+		HBufC* iSoftwareTypeName; 	///< The software type name part of the global component id.
+		};
+	
+	
+	NONSHARABLE_CLASS(CVersionedComponentId) : public CBase
+	/**	 	
+	 	Class that represents a continuous set of versions for a particular component.
+		
+		This class is used for specifying dependencies, where a dependant component requires 
+		specific version(s) of the supplier to be present on the system. The version information 
+		is optional, i.e. this class can be used to represent any version of a component.
+		
+		If this class is used to represent a dependant component, it specifies the range of versions
+		of the dependency relationship defined by the dependant component. 
+	 */
+		{
+	public:
+		
+		/**
+			Creates an empty version component identifier object.
+			@return A pointer to the newly allocated version component identifier object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+		 */
+		IMPORT_C static CVersionedComponentId* NewLC();
+				
+		/**
+			Creates a versioned component identifier object.
+			
+			N.B. The version parameters are optional and used to set the lower and upper limit of the version range. 
+				 It is also possible to set only an upper limit or a lower limit or none. If only one version 
+				 parameter is supplied then a lower limit will be set. In this case, there is no upper limit. 
+				 If the first version parameter is upplied with KNullDesC, then the second version parameter
+				 will be used to set an upper limit.
+			
+			@param aGlobalId The global software component identifier.
+			@param aVersionFrom The first version of the specified version range.
+			@param aVersionTo The last version of the specified version range.
+					
+			@return A pointer to the newly allocated versioned component identifier object, if creation is successful.
+		 */ 
+		IMPORT_C static CVersionedComponentId* NewL(const CGlobalComponentId& aGlobalId, const TDesC* aVersionFrom=NULL, const TDesC* aVersionTo=NULL);
+
+		/**
+			Creates a versioned component identifier object.
+			For more information about the version parameters look at @see CVersionedComponentId::NewLC().
+			
+			@param aGlobalId The global software component identifier.
+			@param aVersionFrom The first version of the specified version range.  
+			@param aVersionTo The last version of the specified version range.
+			
+			@return A pointer to the newly allocated versioned component identifier object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+		 */ 
+		IMPORT_C static CVersionedComponentId* NewLC(const CGlobalComponentId& aGlobalId, const TDesC* aVersionFrom=NULL, const TDesC* aVersionTo=NULL);
+		
+		/**
+			Creates a versioned component identifier object from a stream.
+			@param aStream The stream to read the versioned component identifier object from
+			@return A pointer to the newly allocated versioned component identifier object, if creation is successful.
+			@internalComponent
+		  */
+		IMPORT_C static CVersionedComponentId* NewL(RReadStream& aStream);
+
+		/**
+			Internalises this CVersionedComponentId object from a read stream.
+			@param aStream The stream from which the object is internalised.
+			@internalComponent
+		 */
+		IMPORT_C void InternalizeL(RReadStream& aStream);
+		
+		/**
+			Externalises this CVersionedComponentId object to a write stream.
+			@param aStream The stream to which the object is externalised.
+			@internalComponent
+		 */
+		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
+		
+		/** @return The global id of the versioned component. */
+		IMPORT_C const CGlobalComponentId& GlobalId() const;
+		
+		/** @return The first version of the specified version range. NULL, if there is no lower limit for the version range. */
+		IMPORT_C const TDesC* VersionFrom() const;
+		
+		/** @return  The last version of the specified version range. NULL, if there is no upper limit for the version range. */
+		IMPORT_C const TDesC* VersionTo() const;
+		
+		IMPORT_C ~CVersionedComponentId();
+				
+	private:
+		CVersionedComponentId();
+		void ConstructL(const CGlobalComponentId& aGlobalId, const TDesC* aVersionFrom, const TDesC* aVersionTo);
+		
+	private:
+		CGlobalComponentId* iGlobalId;  ///< The global id of the versioned component identifier.
+		HBufC* iVersionFrom;		///< The first version of the specified version range.
+		HBufC* iVersionTo;		///< The last version of the specified version range.
+		};
+
+	
+	class CComponentEntry : public CBase
+	/**
+		Class that represents a software component entry stored in the SCR.
+	 */
+		{
+		friend class CScrRequestImpl;
+	public:
+		/**
+			Creates an empty software component entry object.
+			@return A pointer to the newly allocated software component object, if creation is successful.
+		 */
+		IMPORT_C static CComponentEntry* NewL();
+		
+		/**
+			Creates an empty software component entry object.
+			@return A pointer to the newly allocated software component object, if creation is successful.
+			        The pointer is also put onto the cleanup stack.
+		 */
+		IMPORT_C static CComponentEntry* NewLC();
+		
+		/**
+			Creates a software component entry object from a stream.
+			@param aStream The stream to read the software component entry object from
+			@return A pointer to the newly allocated software component entry object, if creation is successful.
+			@internalComponent
+		 */
+		IMPORT_C static CComponentEntry* NewL(RReadStream& aStream);
+		
+		/**
+			Creates a software component entry object.
+			
+			@param aId	The unique ID of the software component.
+			@param aName The name of of the software component.
+			@param aVendor The vendor name of the software component.
+			@param aSwType The software type of the component.
+			@param aGlobalId The globally unique identifier of the component.
+			@param aRemovable Whether the component is removable. ETrue means the component is removable.
+			@param aSize The total size of the component at installation time in bytes.
+			@param aScomoState The SCOMO state of the component.
+			@param aInstalledDrives The set of drives that files for the software component were installed to. 
+			@param aVersion The version identifier of the software component.
+			@param aInstallTime The formatted install time string. The format is as following: YYYYMMDD:HHMMSS
+			@param aDrmProtected Whether the component is DRM protected. ETrue means the component is DRM protected.
+			@param aHidden Whether the component is displayed in the list of installed components. ETrue means the component is hidden.
+			@param aKnownRevoked Whether the component has been revoked. ETrue means that a revocation check was
+						           performed during or after the installation and the component was found to be revoked.
+			@param aOriginVerified Whether the installer has verified the originator of the component. ETrue means the installer 
+						            has verified the originator of the software component by using appropriate checking mechanisms.
+			@return A pointer to the newly allocated software component object, if creation is successful.
+			@internalComponent
+		 */
+		IMPORT_C static CComponentEntry* NewL(const TComponentId& aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aSwType,
+											  const TDesC& aGlobalId, TBool aRemovable, TInt64 aSize, const TScomoState& aScomoState,
+											  const TDriveList& aInstalledDrives, const TDesC& aVersion, const TDesC& aInstallTime,
+											  TBool aDrmProtected, TBool aHidden, TBool aKnownRevoked, TBool aOriginVerified);
+		
+		/**
+			Creates a software component entry object.
+			
+			@param aId	The unique ID of the software component.
+			@param aName The name of of the software component.
+			@param aVendor The vendor name of the software component.
+			@param aSwType The software type of the component.
+			@param aGlobalId The globally unique identifier of the component.
+			@param aRemovable Whether the component is removable. ETrue means the component is removable.
+			@param aSize The total size of the component at installation time in bytes.
+			@param aScomoState The SCOMO state of the component.
+			@param aInstalledDrives The set of drives that files for the software component were installed to. 
+			@param aVersion The version identifier of the software component.
+			@param aInstallTime The formatted install time string. The format is as following: YYYYMMDD:HHMMSS	
+			@param aDrmProtected Whether the component is DRM protected. ETrue means the component is DRM protected.
+			@param aHidden Whether the component is displayed in the list of installed components. ETrue means the component is hidden.
+			@param aKnownRevoked Whether the component has been revoked. ETrue means that a revocation check was
+						           performed during or after the installation and the component was found to be revoked.
+			@param aOriginVerified Whether the installer has verified the originator of the component. ETrue means the installer 
+						            has verified the originator of the software component by using appropriate checking mechanisms.
+			@return A pointer to the newly allocated software component object, if creation is successful.
+			               The pointer is also put onto the cleanup stack.
+			@internalComponent
+		 */
+		IMPORT_C static CComponentEntry* NewLC(const TComponentId& aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aSwType, 
+											   const TDesC& aGlobalId, TBool aRemovable, TInt64 aSize, const TScomoState& aScomoState, 
+											   const TDriveList& aInstalledDrives, const TDesC& aVersion, const TDesC& aInstallTime,
+											   TBool aDrmProtected, TBool aHidden, TBool aKnownRevoked, TBool aOriginVerified);
+		
+		IMPORT_C ~CComponentEntry();
+		
+		/**
+			Externalises this CComponentEntry object to a write stream.
+			@param aStream The stream to which the object is externalised.
+			@internalComponent
+		*/
+		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
+		
+		/**
+			Internalises this CComponentEntry object from a read stream.
+			@param aStream The stream from which the object is internalised.
+			@internalComponent
+		*/
+		IMPORT_C void InternalizeL(RReadStream& aStream);
+		
+		/** @return The unique ID of the software component. */
+		IMPORT_C const TComponentId& ComponentId() const; 
+		
+		/** @return The name of the software component. */
+		IMPORT_C const TDesC& Name() const;
+		
+		/** @return The vendor name of the software component. */
+		IMPORT_C const TDesC& Vendor() const;
+		
+		/** @return The software type name of the software component, e.g @see Usif::KSoftwareTypeNative. */
+		IMPORT_C const TDesC& SoftwareType() const;
+		
+		/** @return Globally unique component identifier. */
+		IMPORT_C const TDesC& GlobalId() const;
+		
+		/** @return Whether the software component is removable. ETrue means it is removable. */
+		IMPORT_C TBool IsRemovable() const;
+		
+		/** @return The total size of the component at installation time in bytes. */
+		IMPORT_C TInt64  ComponentSize() const;
+		
+		/** @return The SCOMO state of the software component. @see Usif::TScomoState */
+		IMPORT_C const TScomoState& ScomoState() const;
+		
+		/** @return The set of drives that files for the software component were installed to. */
+		IMPORT_C const TDriveList& InstalledDrives() const;
+		
+		/** @return The version identifier of the software component. */
+		IMPORT_C const TDesC& Version() const;
+		
+		/** @return The install time of the component. */
+		IMPORT_C TTime InstallTimeL() const;
+		
+		/** @return  Whether the component is DRM protected. ETrue means the component is DRM protected.*/
+		IMPORT_C TBool IsDrmProtected() const;
+		
+		/** @return  Whether the component is hidden in the list of installed components. ETrue means the component is hidden. */
+		IMPORT_C TBool IsHidden() const;
+		
+		/** @return  Whether the component has been revoked. ETrue means that a revocation check was performed
+				  during or after the installation and the component was found to be revoked.
+		 */
+		IMPORT_C TBool IsKnownRevoked() const;
+		
+		/** @return  Whether the installer has verified the originator of the component. ETrue means the installer 
+			             has verified the originator of the software component by using appropriate checking mechanisms.
+		 */
+		IMPORT_C TBool IsOriginVerified()const;
+		
+	private:
+		CComponentEntry();
+		void ConstructL(const TComponentId& aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aSwType, const TDesC& aGlobalId, TBool aRemovable, 
+						TInt64 aSize, const TScomoState& aScomoState, const TDriveList& aInstalledDrives, const TDesC& aVersion, const TDesC& aInstallTime,
+						TBool aDrmProtected, TBool aHidden, TBool aKnownRevoked, TBool aOriginVerified);
+	private:
+		TComponentId iComponentId;	 ///< The unique id of the software component.
+		HBufC* iName;				 ///< Name of the software component.
+		HBufC* iVendor;				 ///< Vendor of the software component.
+		HBufC* iSwType;				 ///< Software type name of the component.
+		HBufC* iGlobalId;			 ///< Globally unique component identifier.
+		TBool iRemovable;			 ///< Whether the component is removable.
+		TInt64 iSize;				 ///< The total size of the component at installation time in bytes.
+		TScomoState iScomoState;	 ///< SCOMO state of the component.
+		TDriveList iInstalledDrives; ///< The set of drives that files for the software component were installed to.
+	    HBufC* iVersion;			 ///< Version identifier of the software component
+	    HBufC* iInstallTime;		 ///< The install time of the component. 
+	    TBool iDrmProtected;		 ///< Whether the component is DRM protected.
+	    TBool iHidden;				 ///< Whether the component is hidden in the list of installed components.
+	    TBool iKnownRevoked;		 ///< Whether the component has been revoked.
+	    TBool iOriginVerified;		 ///< Whether the installer has verified the originator of the component.
+		};
+		
+	class CPropertyEntry : public CBase
+	/**
+		Abstract base class for a software component property entry. 
+		Specifies the type of a software component property. Before getting a property value, 
+		the base property object must be converted to a derived property object (e.g. CIntPropertyEntry). 
+	 */
+		{
+	public:
+	/** 
+		Enumeration to indicate the type of the property.
+	 */
+	enum TPropertyType
+		{
+		EBinaryProperty = 1,	///< The property value is binary data. See @see CBinaryPropertyEntry.
+		EIntProperty,		///< The property value is integer. See @see CIntPropertyEntry.
+		ELocalizedProperty,  ///< The property is a localizable string. See @see CLocalizablePropertyEntry.
+		};	
+	public:
+		/**
+			Creates a base software component property object from a stream.
+			@param aStream The stream to read the software property object from.
+			@return A pointer to the newly allocated software property object, if creation is successful.
+			@internalComponent
+		 */
+		IMPORT_C static CPropertyEntry* NewL(RReadStream& aStream);
+		
+		/** @return The name of the property. */
+		IMPORT_C const TDesC& PropertyName() const;
+		
+		/** Virtual destructor for the component property object*/
+		IMPORT_C virtual ~CPropertyEntry();
+		
+		/**
+			Externalises a base/derived property object to a write stream.
+			@param aStream The stream to which the object is externalised.
+			@internalComponent
+		*/
+		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;		 
+		
+		/** @return The type of the property object. Implemented by derived classes. */
+		virtual CPropertyEntry::TPropertyType PropertyType() const = 0;
+		
+	protected:
+		CPropertyEntry();
+		void ConstructL(const TDesC& aPropertyName);
+	
+	private:
+		virtual void DoExternalizeL(RWriteStream &aStream) const = 0;
+		virtual void DoInternalizeL(RReadStream& aStream) = 0;
+		
+	private:	
+		HBufC* iPropertyName;      ///< The name of the property entry.
+		};
+	
+	class CIntPropertyEntry : public CPropertyEntry
+	/**
+		Class that represents an integer component property. 
+	 */
+		{
+	public:
+		/**
+			Creates an integer component property object.
+			
+			@param aPropertyName The name of the property.
+			@param aPropertyValue The value of the property.
+			@return A pointer to the newly allocated component property object, if creation is successful.
+		 */
+		IMPORT_C static CIntPropertyEntry* NewL(const TDesC& aPropertyName, TInt64 aPropertyValue);
+		
+		/**
+			Creates an integer component property object.
+			
+			@param aPropertyName The name of the property.
+			@param aPropertyValue The value of the property.
+			@return A pointer to the newly allocated component property object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+		 */
+		IMPORT_C static CIntPropertyEntry* NewLC(const TDesC& aPropertyName, TInt64 aPropertyValue);
+		
+		IMPORT_C ~CIntPropertyEntry();
+		
+		/**
+		 	The implementation of pure virtual function from @see Usif::CPropertyEntry.
+		 	@return The type of the property object.
+		 */
+		IMPORT_C CPropertyEntry::TPropertyType PropertyType() const;
+		
+		/** @return The 32-bit integer value. */ 
+		IMPORT_C TInt IntValue();
+		
+		/** @return The 64-bit integer value. */ 
+		IMPORT_C TInt64 Int64Value();
+		
+	private:
+		void DoExternalizeL(RWriteStream& aStream) const;
+		void DoInternalizeL(RReadStream& aStream);
+		
+		CIntPropertyEntry();
+		CIntPropertyEntry(TInt64 aPropertyIntValue);
+		void ConstructL(const TDesC& aPropertyName);
+		static CIntPropertyEntry* NewLC();
+		friend CPropertyEntry* CPropertyEntry::NewL(RReadStream& aStream);
+		
+	private:
+		TInt64 iIntValue;   ///< The integer property value.
+		};
+	
+	class CBinaryPropertyEntry : public CPropertyEntry
+	/**
+		Class that represents a binary non-localizable 8-bit descriptor component property.		
+	*/
+		{
+	public:
+		/**
+			Creates a binary component property object.
+				
+			@param aPropertyName The name of the property.
+			@param aPropertyValue The value of the property.
+			@return A pointer to the newly allocated component property object, if creation is successful.
+		 */
+		IMPORT_C static CBinaryPropertyEntry* NewL(const TDesC& aPropertyName, const TDesC8& aPropertyValue);
+		
+		/**
+			Creates a binary component property object.
+						
+			@param aPropertyName The name of the property.
+			@param aPropertyValue The value of the property.
+			@return A pointer to the newly allocated component property object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+		 */
+		IMPORT_C static CBinaryPropertyEntry* NewLC(const TDesC& aPropertyName, const TDesC8& aPropertyValue);
+		
+		IMPORT_C ~CBinaryPropertyEntry(); 
+		
+		/**
+			The implementation of pure virtual function from @see Usif::CPropertyEntry.
+			@return The type of the property object.
+		 */
+		IMPORT_C TPropertyType PropertyType() const;
+		
+		/** @return The binary property value. */ 
+		IMPORT_C const TDesC8& BinaryValue();
+	
+	private:
+		CBinaryPropertyEntry();
+		void ConstructL(const TDesC& aPropertyName, const TDesC8& aPropertyValue);
+		void DoExternalizeL(RWriteStream& aStream) const;
+		void DoInternalizeL(RReadStream& aStream);
+	
+		static CBinaryPropertyEntry* NewLC();
+		friend CPropertyEntry* CPropertyEntry::NewL(RReadStream& aStream);
+		
+	private:
+		HBufC8* iValue; ///< The value of the binary property.
+		};
+	
+	NONSHARABLE_CLASS(CLocalizablePropertyEntry) : public CPropertyEntry
+	/**
+		Class that represents a localizable string component property.
+		
+		A localized component property is a string property which can have different values 
+		for different locales. A particular instance of a localized component property includes 
+		both the localized string value and the locale in question.
+	 */
+		{
+	public:
+		/**
+			Creates a localizable component property object.
+					
+			@param aPropertyName The name of the property.
+			@param aPropertyValue The value of the property.
+			@param aLocale The locale of the property.
+			@return A pointer to the newly allocated component property object, if creation is successful.
+		 */
+		IMPORT_C static CLocalizablePropertyEntry* NewL(const TDesC& aPropertyName, const TDesC& aPropertyValue, TLanguage aLocale);
+		
+		/**
+			Creates a localizable component property object.
+							
+			@param aPropertyName The name of the property.
+			@param aPropertyValue The value of the property.
+			@param aLocale The locale of the property.
+			@return A pointer to the newly allocated component property object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+		 */
+		IMPORT_C static CLocalizablePropertyEntry* NewLC( const TDesC& aPropertyName, const TDesC& aPropertyValue, TLanguage aLocale);
+		
+		IMPORT_C ~CLocalizablePropertyEntry();
+		
+		/** The locale of the localizable property object. */
+		IMPORT_C TLanguage LocaleL() const;
+		
+		/**
+			The implementation of pure virtual function from @see Usif::CPropertyEntry.
+			@return The type of the property object.
+		 */
+		IMPORT_C TPropertyType PropertyType() const;
+		
+		/** @return The string property value. */
+		IMPORT_C const TDesC& StrValue() const;		
+		
+	private:
+		CLocalizablePropertyEntry();
+		CLocalizablePropertyEntry(TLanguage aLocale);
+		void DoExternalizeL(RWriteStream &aStream) const;
+		void DoInternalizeL(RReadStream& aStream);
+		static CLocalizablePropertyEntry* NewLC();
+		friend CPropertyEntry* CPropertyEntry::NewL(RReadStream& aStream);
+		void ConstructL(const TDesC& aPropertyName, const TDesC& aPropertyValue);
+		
+	private:
+		TLanguage iLocale; ///< The language code of the locale.
+		HBufC* iStrValue; ///< The string value of the property
+		};
+	
+	NONSHARABLE_CLASS(CComponentFilter) : public CBase
+	/**
+		A filter class which is used to filter the software components stored in the SCR.
+		An empty filter object is first created and then required filter keys are set separately.
+	 */
+		{
+		friend class CScrRequestImpl;
+	public:
+		/**
+			Creates an empty component filter object.
+			@return A pointer to the newly allocated component filter object, if creation is successful.
+		 */
+		IMPORT_C static CComponentFilter* NewL();
+		
+		/**
+			Creates an empty component filter object.
+			@return A pointer to the newly allocated component filter object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+		 */
+		IMPORT_C static CComponentFilter* NewLC();
+		
+		/**
+			Creates a component filter object from a stream.
+			@param aStream The stream to read the component filter object from
+			@return A pointer to the newly allocated component filter object, if creation is successful.
+			@internalComponent
+		 */
+		IMPORT_C static CComponentFilter* NewL(RReadStream& aStream);
+		
+		~CComponentFilter();
+		
+		/**
+			Restricts the returned component names in the filter.
+			Please note that wildcards are not supported and matching is case-sensitive.
+			@param aName The name of the software component.
+		 */
+		IMPORT_C void SetNameL(const TDesC& aName);
+		
+		/**
+			Restricts the returned component vendor names in the filter.
+			Please note that wildcards are not supported and matching is case-sensitive.
+			@param aVendor The vendor name of the software component.
+		 */
+		IMPORT_C void SetVendorL(const TDesC& aVendor);
+		
+		/**
+			Restricts the returned component software types in the filter.
+			@param aSwType The software type name of the software component (e.g. @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava). 
+		*/
+		IMPORT_C void SetSoftwareTypeL(const TDesC& aSwType);
+		
+		/**
+			Sets whether the software component which is being searched for is removable.
+			@param aValue ETrue, if the software component is removable. Otherwise, EFalse.
+		 */
+		IMPORT_C void SetRemovable(TBool aValue);
+		
+		/**
+			Sets whether the software component which is being searched for is DRM protected.
+			@param aValue ETrue, if the software component is DRM protected. Otherwise, EFalse.
+		 */
+		IMPORT_C void SetDrmProtected(TBool aValue);
+		
+		/**
+			Sets whether the software component which is being searched for is hidden.
+			@param aValue ETrue, if the software component is hidden. Otherwise, EFalse.
+		 */
+		IMPORT_C void SetHidden(TBool aValue);
+		
+		/**
+			Sets whether the software component which is being searched for is known-revoked.
+			@param aValue ETrue, if the software component is known-revoked. Otherwise, EFalse.
+		 */
+		IMPORT_C void SetKnownRevoked(TBool aValue);
+		
+		/**
+			Sets whether the software component which is being searched for is origin-verified.
+			@param aValue ETrue, if the software component is origin-verified. Otherwise, EFalse.
+		 */
+		IMPORT_C void SetOriginVerified(TBool aValue);
+		
+		/**
+			Restricts the returned component SCOMO states in the filter.
+			See @see Usif::TScomoState for the list of SCOMO states.
+			@param aScomoState The SCOMO state of the software component.
+		 */
+		IMPORT_C void SetScomoStateL(TScomoState aScomoState);
+		
+		/**
+			Sets the set of drives that files of the software components were installed to.
+			If more than one drive is supplied, all software components which files were installed to
+			any of these drives are returned.
+		 */
+		IMPORT_C void SetInstalledDrivesL(const TDriveList& aDrives);
+		
+		/**
+			Adds a localizable property to the filter. Only the software components having 
+			this property with the specified value are returned by the filter. It is possible to 
+			add more than one property. In this case, the software components possessing all provided 
+			properties with the specified values are returned by the filter.
+			
+			For more information about searching for current locale variant of properties look at 
+			@see RSoftwareComponentRegistry::GetComponentPropertyL.
+			
+			If the locale is provided, the component will be returned only if the property exists 
+			for the specified locale. If the locale is not provided, or is equal to KUnspecifiedLocale,
+			then all software components which have the property with the specified value for any locale will
+			match this condition.
+			
+			@param aName The name of the property. Please note that wildcards are not supported and matching is case-insensitive.
+			@param aValue The value of the property.	
+			@param aLocale Optional. The language code of the property value.			
+					
+		 */
+		IMPORT_C void AddPropertyL(const TDesC& aName, const TDesC& aValue, TLanguage aLocale=KUnspecifiedLocale);
+		
+		/**
+			Adds an integer property to the filter. The software components having this
+			property with the specified value are enumerated. It is possible to add more than one property. 
+			In this case, the software components possessing all provided properties with the specified 
+			values are enumerated.
+			
+			@param aName The name of the property. Please note that wildcards are not supported and matching is case-insensitive.
+			@param aValue The value of the property.
+		 */
+		IMPORT_C void AddPropertyL(const TDesC& aName, TInt64 aValue);
+		
+		/**
+			Adds a binary 8-bit descriptor property to the filter. The software components having this
+			property with the specified value are enumerated. It is possible to add more than one property. 
+			In this case, the software components possessing all provided properties with the specified 
+			values are enumerated.
+			
+			@param aName The name of the property. Please note that wildcards are not supported and matching is case-insensitive.
+			@param aValue The value of the property.
+		 */
+		IMPORT_C void AddPropertyL(const TDesC& aName, const TDesC8& aValue);		
+		
+		/**
+		 	Sets a file name to filter the software components having registered this file.
+		 	Please note that wildcards are not supported and matching is case-insensitive.
+			
+			N.B. This call can be invoked multiple times for the same filter in order to request components which register a particular set of files.
+		 	@param aFile The fully qualified file path.
+		 */
+		IMPORT_C void SetFileL(const TDesC& aFile);
+		
+		/**
+			Externalises a component filter object to a write stream.
+			@param aStream The stream to which the object is externalised.
+			@internalComponent
+		*/
+		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
+		
+	private:
+		CComponentFilter();
+		void ConstructL();
+		void InternalizeL(RReadStream& aStream);
+		
+		enum TFieldsFlag
+			{
+			EName 			= 0x0001,
+			EVendor 		= 0x0002,
+			ESoftwareType   = 0x0004,
+			ERemovable 		= 0x0008,
+			EScomoState 	= 0x0010,
+			EInstalledDrive = 0x0020,
+			EProperty       = 0x0040,
+			EFile			= 0x0080,
+			EDrmProtected   = 0x0100,
+			EHidden		    = 0x0200,
+			EKnownRevoked   = 0x0400,
+			EOriginVerified = 0x0800
+			};
+		
+	private:
+		TUint16 iSetFlag;			 ///< Flag variable that shows what fields have been set
+		HBufC* iName;				 ///< Name for the software component
+		HBufC* iVendor;				 ///< Vendor for the software component
+		HBufC* iSwType;				 ///< Software type of the component.
+		TBool iRemovable;			 ///< Whether the software component is removable
+		TScomoState iScomoState;	 ///< SCOMO state for the software component
+		TDriveList iInstalledDrives; ///< Installed drives for the software component
+		RPointerArray<CPropertyEntry> iPropertyList; ///< The list of key properties
+		HBufC* iFile;				///< The full name of the file owned by the component
+		TBool iDrmProtected;		 ///< Whether the component is DRM protected.
+		TBool iHidden;				 ///< Whether the component is displayed in the list of installed components.
+		TBool iKnownRevoked;		 ///< Whether the component has been revoked.
+		TBool iOriginVerified;		 ///< Whether the installer has verified the originator of the component.
+		};
+
+	
+	class CLocalizableCommonData : public CBase
+	/**
+		Base class which provides common functionality for localized information classes (e.g. CLocalizableComponentInfo). 
+		Please note that this class cannot be instantiated.
+	 */
+		{
+	public:
+		~CLocalizableCommonData();	
+		
+		/** @return The locale of the data. */
+		IMPORT_C TLanguage Locale() const;
+		
+	protected:
+		CLocalizableCommonData();
+		CLocalizableCommonData(TLanguage aLocale);
+		
+		void ExternalizeL(RWriteStream& aStream) const;
+		void InternalizeL(RReadStream& aStream);
+		
+	private:
+		TLanguage iLocale; ///< The language code of the locale.
+		};
+		
+	NONSHARABLE_CLASS(CLocalizableComponentInfo) : public CLocalizableCommonData
+	/**
+		This class contains the localizable information of a software component.
+		Component names and vendor names are localizable names and transferred to the SCR 
+		with the objects of this class.
+	 */
+		{
+	public:
+		/**
+			Creates a localizable component information object.
+			@param aName The name of the component.
+			@param aVendor The vendor of the component.
+			@param aLocale The language code of the object's locale.
+			@return A pointer to the newly allocated localizable component info object, if creation is successful.
+		 */
+		IMPORT_C static CLocalizableComponentInfo* NewL(const TDesC& aName, const TDesC& aVendor, TLanguage aLocale);
+		
+		/**
+			Creates a localizable component information object.
+			@param aName The name of the component.
+			@param aVendor The vendor of the component.
+			@param aLocale The language code of the object's locale.
+			@return A pointer to the newly allocated component information object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+		 */
+		IMPORT_C static CLocalizableComponentInfo* NewLC(const TDesC& aName, const TDesC& aVendor, TLanguage aLocale);
+		
+		/**
+			Creates a localizable component information from a stream.
+			@param aStream The stream to read the component information object from.
+			@return A pointer to the newly allocated component information object, if creation is successful.
+			@internalComponent
+		 */
+		IMPORT_C static CLocalizableComponentInfo* NewL(RReadStream& aStream);
+		
+		~CLocalizableComponentInfo();
+		
+		/**
+			Externalises a localizable component information object to a write stream.
+			@param aStream The stream to which the object is externalised.
+			@internalComponent
+		 */
+		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;	
+		
+		/** @return The localizable name of the component. */
+		IMPORT_C const TDesC& NameL() const;
+		
+		/** @return The localizable vendor name of the component. */
+		IMPORT_C const TDesC& VendorL() const;
+		
+	private:
+		CLocalizableComponentInfo();
+		CLocalizableComponentInfo(TLanguage aLocale);
+		void ConstructL(const TDesC& aName, const TDesC& aVendor);
+		void InternalizeL(RReadStream& aStream);
+		
+	private:
+		HBufC* iName;	   ///< The localizable component name.
+		HBufC* iVendor;    ///< The localizable component vendor name.
+		};
+	
+#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS	
+	NONSHARABLE_CLASS(CLocalizedSoftwareTypeName) : public CLocalizableCommonData
+		/**
+			This class contains localized software type names.
+			Software type names are localizable names and transferred to the SCR 
+			with the objects of this class.
+			
+			@internalTechnology
+		 */
+			{
+		public:	
+			/**
+				Creates a localized software type name object.
+				@param aName The name of the software type.
+				@param aLocale The language code of the object's locale.
+				@return A pointer to the newly allocated localized software type name object, if creation is successful.
+			 */
+			IMPORT_C static CLocalizedSoftwareTypeName* NewL(const TDesC& aName, TLanguage aLocale);
+			
+			/**
+				Creates a localized software type name object.
+				@param aName The name of the software type.
+				@param aLocale The language code of the object's locale.
+				@return A pointer to the newly allocated localized software type name object, if creation is successful.
+						The pointer is also put onto the cleanup stack.
+			 */
+			IMPORT_C static CLocalizedSoftwareTypeName* NewLC(const TDesC& aName, TLanguage aLocale);
+			
+			/**
+				Creates a localized software type name object from a stream.
+				@param aStream The stream to read the localized software type name object from.
+				@return A pointer to the newly allocated localized software type name object, if creation is successful.
+				@internalComponent
+			 */
+			IMPORT_C static CLocalizedSoftwareTypeName* NewL(RReadStream& aStream);
+			
+			~CLocalizedSoftwareTypeName();
+			
+			/**
+				Externalises a localized software type name object to a write stream.
+				@param aStream The stream to which the object is externalised.
+				@internalComponent
+			 */
+			IMPORT_C void ExternalizeL(RWriteStream& aStream) const;	
+			
+			/** @return The localized software type name. */
+			IMPORT_C const TDesC& NameL() const;
+			
+		private:
+			CLocalizedSoftwareTypeName();
+			CLocalizedSoftwareTypeName(TLanguage aLocale);
+			void ConstructL(const TDesC& aName);
+			void InternalizeL(RReadStream& aStream);
+			
+		private:
+			HBufC* iName;	   ///< The localized software type name.
+			};
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS	
+	
+	enum TScrComponentOperationType
+	/**
+		The type of the operation being performed on an SCR component. 
+	 */
+		{
+		EScrCompInstall =0,		///< A new SCR component is added.
+		EScrCompUnInstall,		///< A existing SCR component is removed.
+		EScrCompUpgrade,		///< An existing SCR component is updated.
+		EScrCompHidden			///< The component operation is hidden to the user. N.B. SCR doesn't save logs for this type of operation.
+		};
+	
+#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS	
+	NONSHARABLE_CLASS (CScrLogEntry) : public CBase
+	/**
+		Class that represents a software component log record generated by the SCR.
+	 */ 
+		{
+		friend class CScrRequestImpl;
+	public:
+		/**
+			Creates a log entry object.
+			@param aComponentName The name of the component.
+			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+			@param aGlobalId The global Id of the component.
+			@param aVersion The version of the component.
+			@param aCompOpType The type of the component operation. @see Usif::TScrComponentOperationType
+			@return A pointer to the newly allocated log entry object, if creation is successful.
+			@internalComponent
+		 */
+		IMPORT_C static CScrLogEntry* NewL(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType);
+		
+		/**
+			Creates a log entry object.
+			@param aComponentName The name of the component.
+			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+			@param aGlobalId The global Id of the component.
+			@param aVersion The version of the component.
+			@param aCompOpType The type of the component operation. @see Usif::TScrComponentOperationType
+			@return A pointer to the newly allocated log entry object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+			@internalComponent		
+		 */
+		IMPORT_C static CScrLogEntry* NewLC(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType);
+
+	 	/**
+	 		Creates a log entry object from a stream.
+	 		@param aStream The stream to read the log entry object from.
+	 		@return A pointer to the newly allocated log entry object, if creation is successful.
+	 				The pointer is also put onto the cleanup stack.
+	 		@internalComponent
+	 	*/
+		IMPORT_C static CScrLogEntry* NewLC(RReadStream& aStream);
+		
+		~CScrLogEntry();
+		
+	 	/**
+		 	Write the object to a stream 
+		 
+		 	@param aStream The stream to write to
+		 	@internalComponent
+		 */
+		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
+		 
+		/**
+		 	Read the object from a stream
+		 
+		 	@param aStream The stream to read from.
+		 	@internalComponent
+		 */
+		IMPORT_C void InternalizeL(RReadStream& aStream) ;
+	    
+	    /**
+			@return The name of the component for which the log was generated.
+		 */
+		IMPORT_C const TDesC& ComponentName() const; 
+		
+		/**
+			@return The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+		 */
+		IMPORT_C const TDesC& SoftwareTypeName() const;
+		
+		/**
+			The UID.
+		 	@return The global ID of the component.
+		 */
+		IMPORT_C const TDesC& GlobalId() const; 
+				
+		/**
+			@return The version of the component.
+		 */
+		IMPORT_C const TDesC& ComponentVersion() const; 
+	    
+		/**
+			@return The time when the operation occured.
+		 */
+		IMPORT_C const TTime OperationTime() const; 
+			    
+	    /**
+		    @return The type of the component operation for the log record.
+		 */
+		IMPORT_C TScrComponentOperationType OperationType() const;
+		
+		/**
+			@return The component id of the log record.
+			@internalComponent
+		 */
+		IMPORT_C TComponentId ComponentId() const;
+	
+	private:
+		CScrLogEntry();
+		void ConstructL(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType);
+		
+	private:	
+	    HBufC* iComponentName ;
+	    HBufC* iSwTypeName;
+		HBufC* iVersion;
+		TScrComponentOperationType iOpType ; 
+		TTime  iRecordTime ;   
+		HBufC* iGlobalId;
+		TComponentId iComponentId; 
+		};
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS	
+
+	} // End of namespace Usif
+
+#endif // SCRENTRIES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc/screntries_internal.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,210 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Declares entry classes for Software Components Registry interface.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#ifndef SCRENTRIES_INTERNAL_H
+#define SCRENTRIES_INTERNAL_H
+
+#include <e32base.h>
+#include <s32strm.h>
+#include <f32file.h> 
+#include <usif/usifcommon.h>
+#include <usif/scr/screntries.h>
+
+//class Usif::CLocalizableCommonData;
+//class Usif::CScrLogEntry;
+
+namespace Usif
+	{
+		class CLocalizableCommonData;
+		NONSHARABLE_CLASS(CLocalizedSoftwareTypeName) : public CLocalizableCommonData
+		/**
+			This class contains localized software type names.
+			Software type names are localizable names and transferred to the SCR 
+			with the objects of this class.
+			
+			@internalTechnology
+		 */
+			{
+		public:	
+			/**
+				Creates a localized software type name object.
+				@param aName The name of the software type.
+				@param aLocale The language code of the object's locale.
+				@return A pointer to the newly allocated localized software type name object, if creation is successful.
+			 */
+			IMPORT_C static CLocalizedSoftwareTypeName* NewL(const TDesC& aName, TLanguage aLocale);
+			
+			/**
+				Creates a localized software type name object.
+				@param aName The name of the software type.
+				@param aLocale The language code of the object's locale.
+				@return A pointer to the newly allocated localized software type name object, if creation is successful.
+						The pointer is also put onto the cleanup stack.
+			 */
+			IMPORT_C static CLocalizedSoftwareTypeName* NewLC(const TDesC& aName, TLanguage aLocale);
+			
+			/**
+				Creates a localized software type name object from a stream.
+				@param aStream The stream to read the localized software type name object from.
+				@return A pointer to the newly allocated localized software type name object, if creation is successful.
+				@internalComponent
+			 */
+			IMPORT_C static CLocalizedSoftwareTypeName* NewL(RReadStream& aStream);
+			
+			~CLocalizedSoftwareTypeName();
+			
+			/**
+				Externalises a localized software type name object to a write stream.
+				@param aStream The stream to which the object is externalised.
+				@internalComponent
+			 */
+			IMPORT_C void ExternalizeL(RWriteStream& aStream) const;	
+			
+			/** @return The localized software type name. */
+			IMPORT_C const TDesC& NameL() const;
+			
+		private:
+			CLocalizedSoftwareTypeName();
+			CLocalizedSoftwareTypeName(TLanguage aLocale);
+			void ConstructL(const TDesC& aName);
+			void InternalizeL(RReadStream& aStream);
+			
+		private:
+			HBufC* iName;	   ///< The localized software type name.
+			};
+	
+	NONSHARABLE_CLASS (CScrLogEntry) : public CBase
+	/**
+		Class that represents a software component log record generated by the SCR.
+	 */ 
+		{
+		friend class CScrRequestImpl;
+	public:
+		/**
+			Creates a log entry object.
+			@param aComponentName The name of the component.
+			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+			@param aGlobalId The global Id of the component.
+			@param aVersion The version of the component.
+			@param aCompOpType The type of the component operation. @see Usif::TScrComponentOperationType
+			@return A pointer to the newly allocated log entry object, if creation is successful.
+			@internalComponent
+		 */
+		IMPORT_C static CScrLogEntry* NewL(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType);
+		
+		/**
+			Creates a log entry object.
+			@param aComponentName The name of the component.
+			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+			@param aGlobalId The global Id of the component.
+			@param aVersion The version of the component.
+			@param aCompOpType The type of the component operation. @see Usif::TScrComponentOperationType
+			@return A pointer to the newly allocated log entry object, if creation is successful.
+					The pointer is also put onto the cleanup stack.
+			@internalComponent		
+		 */
+		IMPORT_C static CScrLogEntry* NewLC(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType);
+
+	 	/**
+	 		Creates a log entry object from a stream.
+	 		@param aStream The stream to read the log entry object from.
+	 		@return A pointer to the newly allocated log entry object, if creation is successful.
+	 				The pointer is also put onto the cleanup stack.
+	 		@internalComponent
+	 	*/
+		IMPORT_C static CScrLogEntry* NewLC(RReadStream& aStream);
+		
+		~CScrLogEntry();
+		
+	 	/**
+		 	Write the object to a stream 
+		 
+		 	@param aStream The stream to write to
+		 	@internalComponent
+		 */
+		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
+		 
+		/**
+		 	Read the object from a stream
+		 
+		 	@param aStream The stream to read from.
+		 	@internalComponent
+		 */
+		IMPORT_C void InternalizeL(RReadStream& aStream) ;
+	    
+	    /**
+			@return The name of the component for which the log was generated.
+		 */
+		IMPORT_C const TDesC& ComponentName() const; 
+		
+		/**
+			@return The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
+		 */
+		IMPORT_C const TDesC& SoftwareTypeName() const;
+		
+		/**
+			The UID.
+		 	@return The global ID of the component.
+		 */
+		IMPORT_C const TDesC& GlobalId() const; 
+				
+		/**
+			@return The version of the component.
+		 */
+		IMPORT_C const TDesC& ComponentVersion() const; 
+	    
+		/**
+			@return The time when the operation occured.
+		 */
+		IMPORT_C const TTime OperationTime() const; 
+			    
+	    /**
+		    @return The type of the component operation for the log record.
+		 */
+		IMPORT_C TScrComponentOperationType OperationType() const;
+		
+		/**
+			@return The component id of the log record.
+			@internalComponent
+		 */
+		IMPORT_C TComponentId ComponentId() const;
+	
+	private:
+		CScrLogEntry();
+		void ConstructL(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType);
+		
+	private:	
+	    HBufC* iComponentName ;
+	    HBufC* iSwTypeName;
+		HBufC* iVersion;
+		TScrComponentOperationType iOpType ; 
+		TTime  iRecordTime ;   
+		HBufC* iGlobalId;
+		TComponentId iComponentId; 
+		};
+	
+	} // End of namespace Usif
+
+#endif // SCRENTRIES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc/tscr.iby	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,56 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef TSCR_IBY
+#define TSCR_IBY
+
+#include  "tefeventlogpluginserver.iby"
+
+define ZDRIVE \epoc32\data\Z
+
+REM Software Component Registry Test Suite
+
+file=ABI_DIR\BUILD_DIR\tscr.exe				\sys\bin\tscr.exe
+file=ABI_DIR\BUILD_DIR\tscrdatalayer.exe	\sys\bin\tscrdatalayer.exe
+file=ABI_DIR\BUILD_DIR\tscraccessor.exe		\sys\bin\tscraccessor.exe
+
+data=ZDRIVE\tusif\tscr\tscr.ini					\tusif\tscr\tscr.ini	
+data=ZDRIVE\tusif\tscr\tscr.script				\tusif\tscr\tscr.script	
+data=ZDRIVE\tusif\tscr\tscr_api.script			\tusif\tscr\tscr_api.script
+data=ZDRIVE\tusif\tscrdatalayer\tscr_datalayer.script	\tusif\tscrdatalayer\tscr_datalayer.script	
+
+data=ZDRIVE\tusif\tscr\tscr_performance.ini				\tusif\tscr\tscr_performance.ini
+data=ZDRIVE\tusif\tscr\tscr_performance.script			\tusif\tscr\tscr_performance.script
+data=ZDRIVE\tusif\tscr\tscr_performance_cases.script	\tusif\tscr\tscr_performance_cases.script
+
+data=ZDRIVE\tusif\tscrdatalayer\data\nondb.db			\tusif\tscrdatalayer\data\nondb.db
+data=ZDRIVE\tusif\tscr\data\scr_small.db		\tusif\tscr\data\scr_small.db
+data=ZDRIVE\tusif\tscr\data\scr_medium.db		\tusif\tscr\data\scr_medium.db
+data=ZDRIVE\tusif\tscr\data\scr_large.db		\tusif\tscr\data\scr_large.db
+
+data=ZDRIVE\tusif\tscr\tscr_versioning.script			\tusif\tscr\tscr_versioning.script
+
+data=ZDRIVE\tusif\tscr\data\scr-differentbuildnumber.db			\tusif\tscr\data\scr-differentbuildnumber.db
+data=ZDRIVE\tusif\tscr\data\scr-newermajordbversion.db			\tusif\tscr\data\scr-newermajordbversion.db
+data=ZDRIVE\tusif\tscr\data\scr-oldermajordbversion.db			\tusif\tscr\data\scr-oldermajordbversion.db
+data=ZDRIVE\tusif\tscr\data\scr-olderminordbversion.db			\tusif\tscr\data\scr-olderminordbversion.db
+data=ZDRIVE\tusif\tscr\data\scr-newerminordbversion.db			\tusif\tscr\data\scr-newerminordbversion.db
+data=ZDRIVE\tusif\tscr\data\scr-noentriesinversiontable.db			\tusif\tscr\data\scr-noentriesinversiontable.db
+data=ZDRIVE\tusif\tscr\data\scr-noversiontable.db			\tusif\tscr\data\scr-noversiontable.db
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc_private/scrclient.inl	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,160 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Utils functions used by scr session and subsession clients.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#ifndef SCRCLIENT_INL
+#define SCRCLIENT_INL
+
+#include "scr.h"
+#include <scs/cleanuputils.h>
+#include <scs/streamingarray.h>
+#include <s32mem.h>
+
+namespace Usif
+	{
+	template <class C>
+	inline HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize)
+		{
+		HBufC8 *buf = HBufC8::NewLC(aDataSize);
+		TPtr8 ptrBuf(buf->Des());
+		TIpcArgs argBuf(&ptrBuf);
+		User::LeaveIfError(aConnection.SendSyncMessage(aFunction, argBuf));
+		return buf; 
+		}
+	
+	template <class T, class C>
+	inline T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs)
+		{
+		TInt size(0);
+		TPckg<TInt> sizePak(size);
+		aArgs.Set(aArgNum, &sizePak);
+		User::LeaveIfError(aConnection.SendSyncMessage(aSizeFunction, aArgs));
+		if(!size)
+			{// There is no related object return NULL
+			return NULL;
+			}
+		HBufC8 *buf = GetObjectDataLC(aConnection, aDataFunction, size);
+			
+		RDesReadStream stream(*buf);
+		CleanupClosePushL(stream);
+		T *retObject = TTraits<T>::ReadFromStreamL(stream);
+		CleanupStack::PopAndDestroy(2, buf);
+		return retObject;
+		}
+	
+	template <class T, class C>
+	inline TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs)
+		{
+		TInt size(0);
+		TPckg<TInt> sizePak(size);
+		aArgs.Set(aArgNum, &sizePak);
+		User::LeaveIfError(aConnection.SendSyncMessage(aSizeFunction, aArgs));
+		if(!size)
+			{// There is no related object, return EFalse
+			return EFalse;
+			}
+		HBufC8 *buf = GetObjectDataLC(aConnection, aDataFunction, size);
+				
+		RDesReadStream stream(*buf);
+		CleanupClosePushL(stream);
+		aObject.InternalizeL(stream);
+		CleanupStack::PopAndDestroy(2, buf);
+		return ETrue;
+		}
+	
+	template <class C, class T>
+	inline void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray)
+		{
+		TInt size(0);
+		TPckg<TInt> sizePak(size);
+		aArgs.Set(aArgNum, &sizePak);
+		User::LeaveIfError(aConnection.SendSyncMessage(aSizeFunction, aArgs));
+		if(!size)
+			{// There is no related data, return.
+			return;
+			}
+		HBufC8 *buf = GetObjectDataLC(aConnection, aDataFunction, size);
+			
+		RDesReadStream stream(*buf);
+		CleanupClosePushL(stream);
+		InternalizePointersArrayL(aArray, stream);
+		CleanupStack::PopAndDestroy(2, buf);
+		}
+	
+	template <class C, class T>
+	inline void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray)
+		{
+		TInt size(0);
+		TPckg<TInt> sizePak(size);
+		aArgs.Set(aArgNum, &sizePak);
+		User::LeaveIfError(aConnection.SendSyncMessage(aSizeFunction, aArgs));
+		if(!size)
+			{// There is no related data, return.
+			return;
+			}
+		HBufC8 *buf = GetObjectDataLC(aConnection, aDataFunction, size);
+				
+		RDesReadStream stream(*buf);
+		CleanupClosePushL(stream);
+		InternalizeFixedLengthArrayL(aArray, stream);
+		CleanupStack::PopAndDestroy(2, buf);
+		}
+	
+	template <class C>
+	inline void ExternalizeObjectL(const C* aObject, RBuf8& aBuf)
+		{
+		const C *localCopyOfObject(0);
+		
+		if(!aObject)
+			{// if object is not supplied, then create an empty one.
+			localCopyOfObject = C::NewLC();
+			}
+		else
+			{
+			localCopyOfObject = aObject;
+			}
+			
+		// Get the required buffer size for the externalized C object
+		TInt bufSize = GetObjectBufferSizeL(*localCopyOfObject);
+			
+		// Clean the buffer and re-create it with the required buffer size 
+		aBuf.Close();
+		aBuf.CreateL(bufSize);
+			
+		// Externalize the filter object into the buffer
+		RDesWriteStream wstream(aBuf);
+		wstream.PushL();
+		wstream << *localCopyOfObject;
+		wstream.CommitL();
+		wstream.Pop();
+		wstream.Release();
+			
+		if(!aObject)
+			{// destroy the filter if created locally
+			CleanupStack::PopAndDestroy((C*)localCopyOfObject);
+			}
+		}// Emd of ExternalizeFilterL
+	}
+
+#endif /* SCRCLIENT_INL */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc_private/scrdatabase.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,294 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* SCR Data Layer API which performs all interaction with the underlying database.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#ifndef SCRSCRDATABASE_H
+#define SCRSCRDATABASE_H
+
+#include <e32base.h>
+#include <f32file.h>
+
+namespace Usif
+	{
+	// Forward declarations
+	class CDatabaseImplementation;
+	class CStatementImplementation;
+	class CStatement;
+	
+	NONSHARABLE_CLASS(CDatabase) : public CBase
+	/**
+		This class provides the means to connect the SCR database and execute all SQL statements.
+		It is intended to be used as a singleton instance by the SCR sessions. 
+	 */
+		{
+		friend class CStatement; // CStatement class needs to access CheckSqlErrCodeL
+	public:
+		/**
+		 	Creates a new database object with an handle to the given database file.
+		 	
+			@param aDatabaseFile The database file handle.
+			@param aJournalNameZ The journal file handle.
+		 	@leave KErrNotFound The file opened is not a database file.
+		 	@leave KErrUnknown The database file is missing. 
+		 	@leave KErrCorrupt The database disk image is malformed.
+		 	@leave KErrNoMemory An attempt to allocate memory has failed.
+		 	@leave KErrInUse The database file is locked by another thread.
+		 	@leave KErrAccessDenied Unable to open the database file. Access permission may be denied.
+		 	@leave Or other system wide error codes
+		 */
+		IMPORT_C static CDatabase* NewL(RFile& aDatabaseFile, RFile& aJournalFile);
+		
+		/**
+			Creates a new database object with an handle to the given database file and leaves
+			the newly created object on the cleanup stack.
+			
+			@param aDatabaseFile The database file handle.
+			@param aJournalNameZ The journal file handle.
+		 	@see CDatabase::NewL
+		 */
+		IMPORT_C static CDatabase* NewLC(RFile& aDatabaseFile, RFile& aJournalFile);
+		
+		/**
+			Destructor. The handle to the database file is closed.
+		 */
+		IMPORT_C ~CDatabase();
+		
+		/**
+		    Prepares the provided SQL statement for execution and returns 
+		    the prepared statement object which can be executed later.  
+
+			The SQL statement must contain a single statement and end with semicolon(;).
+			
+			@param aStatementStr The satement which will be prepared.
+			@return A pointer to the statement object which has got a handle to the result rows set.
+			        The returned object is left on the cleanup stack.
+			@leave KErrNotFound The database file could not be opened for some reason OR the table 
+			                    or the requested record could not be found OR the database is empty. 
+			@leave KErrCorrupt The database schema has changed.
+			@leave KErrNoMemory An attempt to allocate memory has failed OR some kind of disk I/O 
+			                    operation couldn't be performed (probably no space left on the disk)
+			                    OR the database is too big (larger than 2GB in size).
+			@leave KErrInUse A table in the database is locked.
+			@leave KErrOverflow Too much data(probably more than 1 megabyte in a single row).
+			@leave KErrCancel The operation in progress has been terminated externally.
+			@leave KErrNotSupported The library has been used incorrectly,
+			@leave KErrAbort Abort due to constraint violation.
+			@leave KErrArgument This error value indicates that there was an error in the SQL
+			                    statement that was passed into. Data type mismatch may have been
+			                    occurred OR the provided SQL was badly constructed OR contains 
+			                    more than one statement.
+			@leave KErrUnknown An internal error in the underlaying database engine occurred.
+			@leave KErrGeneral An unspecified error ocurred in the database engine.		
+		 */
+		IMPORT_C CStatement* PrepareStatementLC(const TDesC& aStatementStr);
+			
+		/**
+			@return The row id of the most recent successful insert into the database from this connection.
+			@leave KErrNotFound If no successful inserts have ever occurred on this database connection.
+		 */
+		IMPORT_C TInt LastInsertedIdL();
+		
+	private:
+		CDatabase();
+		void ConstructL(RFile& aDatabaseFile, RFile& aJournalFile);
+		void CheckSqlErrCodeL(TInt aErr);
+		
+	private:
+		CDatabaseImplementation* iDbImpl;	///< Pointer to the database implementation object.
+		};
+	
+	
+	
+	NONSHARABLE_CLASS(CStatement) : public CBase
+	/**
+		An instance of this class is used to execute all types of SQL statements with or without
+		parameters. 
+	 */
+		{
+		friend class CDatabase; // Only CDatabase can construct an object of this class.
+	public:
+		IMPORT_C ~CStatement();
+		
+		/** 
+		 	If the SQL statement being executed returns any data, this function makes
+		 	a new row of data ready for processing. The values may be accessed using
+		 	the column access functions (@see CStatement::StrColumnL and @see CStatement::IntColumnL).
+		 	
+			When this function is called again to retrieve the next row of data, the previous row data
+			is not accessible any more.
+			
+			If the caller wants to close the statement before retrieving all the rows, it needs to
+			just destroy the CStatement object.
+			
+			@return Returns EFalse if no more rows are available. 
+			@leave Leaves with one of the error codes listed in @see CDatabase::PerformStatementLC
+		 */
+		IMPORT_C TBool ProcessNextRowL();
+		
+		/**
+			Eexecutes the prepared SQL statement. This function is appropriate to execute
+			SQL statements which do NOT return a result row set (e.g. INSERT and UPDATE).
+			If the SQL satetement contains parameters, the prepared statement can be bound
+			and executed many times.
+				 	
+			@param aStatement The satement which will be executed.
+			@leave Leaves with one of the leave codes given in @see CStatement::PrepareStatementLC.
+		 */
+		IMPORT_C void ExecuteStatementL();
+		
+		/**
+			Sets the parameter given with the index value to the specified 32-bit integer value.
+			A parameter value can be set:
+			- immediately after this object has been created
+			- after a call to @see CStatement::Reset 
+			@param aParameterIndex The index value identifying the parameter; the first parameter 
+			       has an index of 1.
+			@param The 32-bit integer value to be assigned to the parameter.
+			@leave Leaves with one of the error codes listed in @see CDatabase::PerformStatementLC 
+		 */
+		IMPORT_C void BindIntL(TInt aParameterIndex, TInt aParameterValue);
+		
+		/**
+			Sets the parameter given with the index value to the specified 64-bit integer value.
+			A parameter value can be set:
+			- immediately after this object has been created
+			- after a call to @see CStatement::Reset 
+			@param aParameterIndex The index value identifying the parameter; the first parameter 
+			       has an index of 1.
+			@param The 64-bit integer value to be assigned to the parameter.
+			@leave Leaves with one of the error codes listed in @see CDatabase::PerformStatementLC 
+		 */
+		IMPORT_C void BindInt64L(TInt aParameterIndex, TInt64 aParameterValue);
+		
+		/**
+			Sets the parameter given with the index value to the specified 16-bit descriptor.
+			A parameter value can be set:
+			- immediately after this object has been created
+			- after a call to @see CStatement::Reset 
+			@param aParameterIndex The index value identifying the parameter; the first parameter 
+			       has an index of 1.
+			@param aParameterStr The 16-bit descriptor whose content is to be assigned to the parameter.
+			@leave KErrArgument If the input string's length is more than 512 characters
+			@leave Leaves with one of the error codes listed in @see CDatabase::PerformStatementLC 
+		 */
+		IMPORT_C void BindStrL(TInt aParameterIndex, const TDesC &aParameterStr);
+		
+		/**
+			Sets the parameter given with the index value to the specified 8-bit descriptor.
+			A parameter value can be set:
+			- immediately after this object has been created
+			- after a call to @see CStatement::Reset 
+			@param aParameterIndex The index value identifying the parameter; the first parameter 
+			       has an index of 1.
+			@param aParameterStr The 8-bit descriptor whose content is to be assigned to the parameter.
+			@leave KErrArgument If the input string's length is more than 512 characters			
+			@leave Leaves with one of the error codes listed in @see CDatabase::PerformStatementLC 
+		 */
+		IMPORT_C void BindBinaryL(TInt aParameterIndex, const TDesC8 &aParameterStr);		
+		
+		/** 
+			Retrieves the value of a string column. The caller must know the string column index.
+			In addition, the caller must make the copy if they want to process multiple rows at once.
+			
+			@param aColIdx The index of the column in the result set.
+			@return The string value of the column given.
+			@leave KErrArgument The supplied column index is not valid or its type is not string.
+			@leave Or one of the error codes listed in @see CDatabase::PerformStatementLC
+		*/
+		IMPORT_C TPtrC StrColumnL(TInt aColIdx) const;
+		
+		/** 
+			Retrieves the value of a raw binary data column. The caller must know the column index.
+			In addition, the caller must make the copy if they want to process multiple rows at once.
+			
+			@param aColIdx The index of the column in the result set.
+			@return The binary value of the column given.
+			@leave KErrArgument The supplied column index is not valid or its type is not string.
+			@leave Or one of the error codes listed in @see CDatabase::PerformStatementLC
+		*/
+		IMPORT_C TPtrC8 BinaryColumnL(TInt aColIdx) const;		
+		
+		/** 
+			Retrieves the value of a integer column. The caller must know the integer column index.
+			The return value is 64-bit integer.
+			
+			@param aColIdx The index of the column in the result set.
+			@return The integer value of the column given.
+			@leave KErrArgument The supplied column index is not valid or its type is not integer.
+			@leave Or one of the error codes listed in @see CDatabase::PerformStatementLC
+		*/
+		IMPORT_C TInt64 Int64ColumnL(TInt aColIdx) const;
+		
+		/** 
+			Retrieves the value of an integer column. The caller must know the integer column index.
+			The return value is 32-bit integer. 
+					
+			@param aColIdx The index of the column in the result set.
+			@return The integer value of the column given.
+			@leave KErrArgument The supplied column index is not valid or its type is not integer.
+			@leave Or one of the error codes listed in @see CDatabase::PerformStatementLC
+		 */
+		IMPORT_C TInt IntColumnL(TInt aColIdx) const;
+				
+		/**
+			Resets this SQL statement object to its initial state and makes it ready to be executed again.
+			Any SQL statement parameters that had values bound to them, retain their values.
+			If this object processes a parameterised SQL statement, then the parameter values 
+			can be bound after the call to Reset().
+			@leave Leaves with one of the error codes listed in @see CDatabase::PerformStatementLC
+		 */
+		IMPORT_C void ResetL();
+		
+		/**
+			Returns whether the specified field (column) of a row is NULL.
+			Note that if the field is NULL, it does NOT mean that the corresponding fields of 
+			other rows are NULL as well.
+			@param aColIdx The index of the column in the result set.
+			@return ETrue, if the field is NULL, otherwise EFalse.
+			@leave KErrArgument The supplied column index is not valid.
+		 */
+		IMPORT_C TBool IsFieldNullL(TInt aColIdx) const;
+		
+	private:
+		/**
+			Creates a new CStatement object on the heap.
+			
+			@param aDb Refrence to the database object.
+			@param aStmtImpl Pointer to the statement implementation. The ownership is also passed
+			                 to the CStatement object.
+			@return The newly created CStatement object.
+			
+		 */
+		static CStatement* NewL(const CDatabase& aDb, CStatementImplementation* aStmtImpl);
+		
+		CStatement(const CDatabase& aDb, CStatementImplementation* aStmtImpl);
+		void ValidateRequestedColumnL(TInt aColIdx, TInt& aColumnType) const;
+		
+	private:
+		const CDatabase& iDb; ///< Reference to the database object which creates this statement object.
+		CStatementImplementation* iStmtImpl; ///< Pointer to the SQL statement implementation
+		};	
+	} // namespace Usif
+
+#endif // SCRSCRDATABASE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc_private/scrdbschema.sql	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,26 @@
+BEGIN TRANSACTION CreateScrDatabase;
+CREATE TABLE SoftwareTypes(SoftwareTypeId INTEGER PRIMARY KEY NOT NULL,SoftwareTypeName TEXT NOT NULL UNIQUE,SifPluginUid INTEGER,InstallerSecureId INTEGER,ExecutionLayerSecureId INTEGER);
+CREATE INDEX idx_SoftwareTypes_MimeType ON SoftwareTypes(SoftwareTypeName);
+CREATE TABLE MimeTypes(MimeTypeId INTEGER PRIMARY KEY NOT NULL,SoftwareTypeId INTEGER NOT NULL,MimeType TEXT NOT NULL UNIQUE COLLATE NOCASE);
+CREATE INDEX idx_MimeTypes_SoftwareType ON MimeTypes(SoftwareTypeId);
+CREATE TABLE Components(ComponentId INTEGER PRIMARY KEY AUTOINCREMENT,SoftwareTypeId INTEGER NOT NULL,Size INTEGER DEFAULT 0,Removable BOOLEAN DEFAULT 1,ScomoState INTEGER DEFAULT 0,DRMProtected INTEGER DEFAULT 0,Hidden INTEGER DEFAULT 0,KnownRevoked INTEGER DEFAULT 0,OriginVerified INTEGER DEFAULT 0,InstalledDrives INTEGER DEFAULT 0,GlobalIdHash INTEGER DEFAULT 0,GlobalId TEXT UNIQUE,Version TEXT,InstallTime TEXT NOT NULL,CompPresence BOOLEAN DEFAULT 1);
+CREATE INDEX idx_Components_SoftwareTypeId ON Components(SoftwareTypeId);
+CREATE INDEX idx_Components_GlobalIdIdHash ON Components(GlobalIdHash);
+CREATE TABLE ComponentLocalizables(CompLocalId INTEGER PRIMARY KEY AUTOINCREMENT, ComponentId INTEGER DEFAULT 0,ApplicationId INTEGER DEFAULT 0,Locale INTEGER DEFAULT 0,Name TEXT NOT NULL,Vendor TEXT);
+CREATE INDEX idx_ComponentLocalizables_ComponentId ON ComponentLocalizables(ComponentId);
+CREATE TABLE ComponentDependencies(GlobalIdHash INTEGER PRIMARY KEY NOT NULL,DependantGlobalIdHash INTEGER NOT NULL, SupplierGlobalIdHash INTEGER NOT NULL, DependantGlobalId TEXT NOT NULL,SupplierGlobalId TEXT NOT NULL,VersionFrom TEXT, VersionTo TEXT);
+CREATE INDEX idx_ComponentDependencies_DependantGlobalId ON ComponentDependencies(DependantGlobalIdHash);
+CREATE INDEX idx_ComponentDependencies_SupplierGlobalId ON ComponentDependencies(SupplierGlobalIdHash);
+CREATE TABLE ComponentsFiles(CmpFileId INTEGER PRIMARY KEY NOT NULL,ComponentId INTEGER NOT NULL,LocationHash INTEGER DEFAULT 0,Location TEXT NOT NULL COLLATE NOCASE);
+CREATE INDEX idx_ComponentsFiles_ComponentId ON ComponentsFiles(ComponentId);
+CREATE INDEX idx_ComponentsFiles_LocationHash ON ComponentsFiles(LocationHash);
+CREATE TABLE ComponentProperties(PropertyId INTEGER PRIMARY KEY NOT NULL,Name TEXT NOT NULL COLLATE NOCASE,Locale INTEGER DEFAULT 0,ComponentId INTEGER NOT NULL,IntValue INTEGER,StrValue TEXT,IsStr8Bit BOOLEAN DEFAULT 0);
+CREATE INDEX idx_ComponentProperties_Name ON ComponentProperties(Name);
+CREATE INDEX idx_ComponentProperties_ComponentId ON ComponentProperties(ComponentId);
+CREATE INDEX idx_ComponentProperties_IntValue ON ComponentProperties(IntValue);
+CREATE TABLE FileProperties(PropertyId INTEGER PRIMARY KEY NOT NULL,Name TEXT NOT NULL COLLATE NOCASE,CmpFileId INTEGER NOT NULL,IntValue INTEGER,StrValue TEXT, Locale INTEGER DEFAULT 0,IsStr8Bit BOOLEAN DEFAULT 0);
+CREATE INDEX idx_FileProperties_Name ON FileProperties(Name);
+CREATE INDEX idx_FileProperties_CmpFileId ON FileProperties(CmpFileId);
+CREATE TABLE ScrVersion(MajorVersion INTEGER NOT NULL, MinorVersion INTEGER NOT NULL, BuildNumber INTEGER NOT NULL);
+INSERT INTO ScrVersion(MajorVersion, MinorVersion, BuildNumber) VALUES(1, 1, 1);
+END TRANSACTION CreateScrDatabase;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc_private/scrrequestimpl.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,278 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Declares the class which implements SCR's session and sub-session service requests.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#ifndef SCRREQUESTIMPL_H
+#define SCRREQUESTIMPL_H
+
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "screntries_internal.h"
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "screntries.h"
+
+namespace Usif
+	{
+	// constants
+	static const TLanguage KLangNone = TLanguage(0);
+	static const TInt KMaxSwTypeIdDigits = 4; 		///< Maximum number of digits a software type id may have.
+	static const TInt KMaxSwTypeIdValue = 0xFFFF;   ///< Maximum value of a software type id.	
+	
+	// forward declaration
+	class CDatabase;
+	class CStatement;
+	class CScrAsyncRequestImpl;
+	class CScrSession;
+	class CScrSubsession;
+	class CCompViewSubsessionContext;
+
+	class CScrRequestImpl : public CBase
+		{
+	public:
+		static CScrRequestImpl* NewL(RFs& aFs, RFile& aDatabaseFile, RFile& aJournalFile);
+		~CScrRequestImpl();
+		
+		// Transaction Requests
+		void CreateTransactionL();
+		void RollbackTransactionL();
+		void CommitTransactionL();
+		
+		// Component Management Requests
+		void AddComponentL(const RMessage2& aMessage);
+		void AddComponentDependencyL(const RMessage2& aMessage);
+		void SetComponentLocalizablePropertyL(const RMessage2& aMessage);
+		void SetComponentBinaryPropertyL(const RMessage2& aMessage);		
+		void SetComponentIntPropertyL(const RMessage2& aMessage);
+		void RegisterComponentFileL(const RMessage2& aMessage); 
+		void SetFileStrPropertyL(const RMessage2& aMessage);
+		void SetFileIntPropertyL(const RMessage2& aMessage);
+		void SetComponentNameL(const RMessage2& aMessage);
+		void SetVendorNameL(const RMessage2& aMessage);
+		void SetIsComponentRemovableL(const RMessage2& aMessage);
+		void SetIsComponentDrmProtectedL(const RMessage2& aMessage);
+		void SetIsComponentHiddenL(const RMessage2& aMessage);
+		void SetIsComponentKnownRevokedL(const RMessage2& aMessage);
+		void SetIsComponentOriginVerifiedL(const RMessage2& aMessage);
+		void SetComponentSizeL(const RMessage2& aMessage);
+		void SetComponentVersionL(const RMessage2& aMessage);
+		void DeleteComponentPropertyL(const RMessage2& aMessage);
+		void DeleteFilePropertyL(const RMessage2& aMessage);
+		void UnregisterComponentFileL(const RMessage2& aMessage);
+		void DeleteComponentL(const RMessage2& aMessage);
+		void DeleteComponentDependencyL(const RMessage2& aMessage);
+		
+		// Component Query requests
+		void GetComponentEntrySizeL(const RMessage2& aMessage) const;							
+		void GetComponentEntryDataL(const RMessage2& aMessage) const;
+		void GetComponentLocalizedEntrySizeL(const RMessage2& aMessage) const;
+		void GetComponentLocalizedEntryDataL(const RMessage2& aMessage) const;
+		void GetFilePropertiesSizeL(const RMessage2& aMessage) const;
+		void GetFilePropertiesDataL(const RMessage2& aMessage) const;
+		void GetSingleFilePropertySizeL(const RMessage2& aMessage) const;
+		void GetSingleFilePropertyDataL(const RMessage2& aMessage) const;
+		void GetFileComponentsSizeL(const RMessage2& aMessage) const;
+		void GetFileComponentsDataL(const RMessage2& aMessage) const;
+		void GetComponentPropertiesSizeL(const RMessage2& aMessage) const;
+		void GetComponentPropertiesDataL(const RMessage2& aMessage) const;
+		void GetComponentSinglePropertySizeL(const RMessage2& aMessage) const;
+		void GetComponentSinglePropertyDataL(const RMessage2& aMessage) const;
+		void GetComponentIdListSizeL(const RMessage2& aMessage) const;
+		void GetComponentIdListDataL(const RMessage2& aMessage) const;
+		void GetComponentFilesCountL(const RMessage2& aMessage) const;
+		void GetComponentIdL(const RMessage2& aMessage) const;
+		void GetComponentWithGlobalIdSizeL(const RMessage2& aMessage) const;
+		void GetComponentWithGlobalIdDataL(const RMessage2& aMessage) const;
+		void GetSupplierComponentsSizeL(const RMessage2& aMessage) const;
+		void GetSupplierComponentsDataL(const RMessage2& aMessage) const;
+		void GetDependantComponentsSizeL(const RMessage2& aMessage) const;
+		void GetDependantComponentsDataL(const RMessage2& aMessage) const;
+		void GetComponentSupportedLocalesListSizeL(const RMessage2& aMessage) const;
+		void GetComponentSupportedLocalesListDataL(const RMessage2& aMessage) const;
+				
+		// Application Manager Requests
+		void GetIsMediaPresentL(const RMessage2& aMessage) const;
+		void GetIsComponentOrphanedL(const RMessage2& aMessage) const;
+		void GetLogFileHandleL(const RMessage2& aMessage) const;
+		void FlushLogEntriesArrayL();
+		void GetIsComponentOnReadOnlyDriveL(const RMessage2& aMessage) const;
+		void GetIsComponentPresentL(const RMessage2& aMessage) const;
+		void SetIsComponentPresentL(const RMessage2& aMessage);
+		
+		// SIF Requests
+		void SetScomoStateL(const RMessage2& aMessage);
+		void GetPluginUidWithMimeTypeL(const RMessage2& aMessage) const;
+		void GetPluginUidWithComponentIdL(const RMessage2& aMessage) const;
+		
+		// Security Layer Requests
+		TBool GetInstallerSidForComponentL(TComponentId aComponentId, TSecureId& aSid) const;
+		TBool GetSidsForSoftwareTypeL(const HBufC* aSoftwareTypeName, TSecureId& aInstallerSid, TSecureId& aExecutableEnvSid) const;
+		TBool GetExecutionEnvSidForComponentL(TComponentId aComponentId, TSecureId& aSid) const;
+		TBool IsInstallerOrExecutionEnvSidL(TSecureId& aSid) const;
+		TBool GetIsComponentOrphanedL(TComponentId aComponentId) const;
+		
+		// Component's view operations
+		CComponentFilter* ReadComponentFilterL(const RMessage2& aMessage) const;
+		CStatement* OpenComponentViewL(CComponentFilter& aFilter, RArray<TComponentId>& aComponentFilterSuperset, TBool& aFilterSupersetInUse) const;
+		void NextComponentSizeL(const RMessage2& aMessage, CStatement* aStmt, CComponentFilter* aFilter, CComponentEntry*& aEntry, CCompViewSubsessionContext* aSubsessionContext) const;
+		void NextComponentDataL(const RMessage2& aMessage, CComponentEntry*& aEntry) const;
+		void NextComponentSetSizeL(const RMessage2& aMessage, CStatement* aStmt, CComponentFilter* aFilter, RPointerArray<CComponentEntry>& aEntryList, CCompViewSubsessionContext* aSubsessionContext) const;
+		void NextComponentSetDataL(const RMessage2& aMessage, RPointerArray<CComponentEntry>& aEntryList) const;
+				
+		// Files's list operations
+		CStatement* OpenFileListL(const RMessage2& aMessage) const; 	 
+		void NextFileSizeL(const RMessage2& aMessage, CStatement* aStmt, HBufC*& aFilePath) const;
+		void NextFileDataL(const RMessage2& aMessage, HBufC*& aFilePath) const;
+		void NextFileSetSizeL(const RMessage2& aMessage, CStatement* aStmt, RPointerArray<HBufC>& aFileList) const;
+		void NextFileSetDataL(const RMessage2& aMessage, RPointerArray<HBufC>& aFileList) const;
+		
+		// Static utility functions - code reuse between SCRServer and this class
+		static TComponentId GetComponentIdFromMsgL(const RMessage2& aMessage);
+		static HBufC* GetSoftwareTypeNameFromMsgLC(const RMessage2& aMessage);
+		static HBufC* ReadFileNameFromMsgLC(const RMessage2& aMessage);
+		
+		// Sofwtare type management operations
+		void AddSoftwareTypeL(const RMessage2& aMessage);
+		void DeleteSoftwareTypeL(const RMessage2& aMessage);
+		void GetDeletedMimeTypesL(const RMessage2& aMessage) const;
+		
+	private:
+		CScrRequestImpl(RFs& aFs);
+		void ConstructL(RFile& aDatabaseFile, RFile& aJournalFile);
+	
+	private:
+		enum TValueType
+			{
+			EValueInteger 	 = 0x01,
+			EValueString 	 = 0x02,
+			EValueInteger64  = 0x03,
+			EValueLanguage   = 0x04,
+			EValueBinary = 0x05,
+			};
+		
+		enum TPropertyType
+			{
+			EPropertyUndefined = 0,	  // The property type is not defined yet
+			EPropertyInteger   = 1,   // The property type is integer
+			EPropertyLocalizable    = 2,    // The property type is a localizable string
+			EPropertyBinary    = 3    // The property type is a non-localizable 8-bit descriptor
+			};
+		
+		enum TFileOperationType
+			{
+			EFileRegistered,
+			EFileUnregistered
+			};
+		
+		class TRollbackParams
+			{
+		public:
+			TRollbackParams(TInt aIdColumnVal, CScrRequestImpl& aReqImplHandle)
+				: iIdColumnVal(aIdColumnVal), iReqImplHandle(aReqImplHandle){}
+		
+			TInt iIdColumnVal;
+			CScrRequestImpl& iReqImplHandle;
+			};
+		
+	    static HBufC* ReadDescLC(const RMessage2& aMessage, TInt aSlot);
+	    static HBufC8* ReadDesc8LC(const RMessage2& aMessage, TInt aSlot);
+		static TUint32 HashCaseInsensitiveL(const TDesC& aName);
+		static TUint32 HashCaseSensitiveL(const TDesC& aName);
+		static void ComponentRollback(TAny* aParam);
+		static void ComponentLocalizablesRollback(TAny* aParam);
+		
+		HBufC* FormatStatementLC(const TDesC& aStatement, TInt aFormatLength,...) const;
+		HBufC* GenerateGlobalIdL(const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId) const;
+		TComponentId CommonAddComponentL(const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId);
+		void AddComponentLocalizablesL(TComponentId aCompId, TLanguage aLocale, const TDesC& aName, const TDesC& aVendor);
+		HBufC* ReadAndGetGlobalIdLC(const RMessage2& aMessage, TInt aSlot) const;
+		TUint32 ReadAndHashGlobalIdL(const RMessage2& aMessage, TInt aGlobalIdNameSlot, TInt aSwTypeNameSlot) const;
+		TUint32 HashGlobalIdsL(const TDesC& aDependantId, const TDesC& aSupplierId) const;		
+		CStatement* CreateGeneralPropertyStatementWithLocaleL(const TDesC& aStmtStr, TInt aIdColumnValue, TLanguage aLocale, const TDesC& aPropName, TBool aDoLocaleResolving=ETrue) const;
+		TInt FindGeneralPropertyNoLocaleDowngradeL(const TDesC& aTableName, const TDesC& aIdColumnName , TInt aIdColumnValue, const TDesC& aPropertyName, TLanguage aLocale, TPropertyType& aPropertyType) const;
+		void SetGeneralLocalizablePropertyL(CScrRequestImpl::TPropertyType aPropType, TInt aPropertyId, const TDesC& aIdColumnName , TInt aIdColumnValue, const TDesC& aPropName, TLanguage aLocale, const TDesC& aPropValue);
+		void SetGeneralBinaryPropertyL(CScrRequestImpl::TPropertyType aPropType, TInt aPropertyId, const TDesC& aTableName, const TDesC& aIdColumnName , TInt aIdColumnValue, const TDesC& aPropName, const TDesC8& aPropValue);
+		void SetGeneralIntPropertyL(TPropertyType aPropType, TInt aPropertyId, const TDesC& aTableName, const TDesC& aIdColumnName , TInt aIdColumnValue, const TDesC& aPropName, TInt64 aPropValue);
+		void ExecuteStatementL(TRefByValue<const TDesC>, TInt aValuesNum=0,...);
+		void GetFileComponentsL(const TDesC& aFileName, RArray<TComponentId>& aComponents) const;
+		TInt GetComponentFileIdL(const TDesC& aFileName, TComponentId aComponentId) const;
+		TInt FindComponentFileL(const TDesC& aFileName, TComponentId aComponentId) const;
+		void SetComponentLocalizableL(TComponentId aComponentId, TLanguage aLocale, const TDesC& aColumnName, const TDesC& aName, const TDesC& aVendor);
+		CPropertyEntry* GetGeneralSinglePropertyL(const TDesC& aTableName, const TDesC& aIdColumnName , TInt aIdColumnValue, const TDesC& aPropName, TLanguage aLocale) const;
+		CPropertyEntry* GetPropertyEntryL(CStatement& aStmt, const TDesC& aPropName, TInt aStartingIndex) const;
+		void AddGeneralPropertiesArrayWithLocaleL(const TDesC& aStmtStr, TLanguage aLocale, TComponentId aIdColumnValue, RPointerArray<CPropertyEntry>& aProperties) const;
+		void GetGeneralPropertiesArrayL(const TDesC& aTableName, const TDesC& aIdColumnName , TComponentId aIdColumnValue, TLanguage aLocale, RPointerArray<CPropertyEntry>& aProperties) const;
+		TBool BindAndProcessStatementObjectL(CStatement& aStatementObj, TLanguage aLanguage, TInt aValuesNum, VA_LIST aList) const;
+		CStatement* CreateStatementObjectWithoutLocaleL(const TDesC& aStatement, TInt aValuesNum,...) const;		
+		CStatement* CreateStatementObjectWithLocaleL(const TDesC& aStatement, TLanguage aLocale, TInt aValuesNum,...) const;
+		CStatement* CreateStatementObjectWithLocaleNoDowngradeL(const TDesC& aStatement, TLanguage aLocale, TInt aValuesNum,...) const;
+		void BindStatementValuesL(CStatement& aStatement, TLanguage aLanguage, TInt aValuesNum, VA_LIST aList) const;
+		void GetComponentIdsHavingThePropertiesL(RArray<TComponentId>& aComponentIds, RPointerArray<CPropertyEntry> aProperties, TBool aDoIntersect) const;
+		CStatement* CreateStatementObjectForComponentLocalizablesLC(const TDesC& aName, const TDesC& aVendor, TUint aSetFlag, TComponentId aComponentId  = 0 ) const;
+		void GetComponentsHavingNameVendorL(RArray<TComponentId>& aComponentIds, const TDesC& aName, const TDesC& aVendor, TUint16 aSetFlag, TBool aDoIntersect) const;
+		CComponentEntry* GetNextComponentEntryL(CStatement& aStmt, CComponentFilter& aFilter, TLanguage aLocale, CCompViewSubsessionContext* aSubsessionContext) const;
+		HBufC* GetNextFilePathL(CStatement& aStmt) const;
+		CComponentEntry* CreateComponentEntryFromStatementHandleL(CStatement& aStmt) const;
+		CStatement* ExecuteLocalizableStatementL(const TDesC& aLocalizableStmtStr, const TDesC& aAnyValueStmtStr, TInt aConditionIntValue, TLanguage aConditionLocale) const;
+		void AddComponentEntryLocalizablesL(TComponentId aComponentId, CComponentEntry& aEntry, TLanguage aLocale) const;
+		void AddComponentEntryLocalizablesL(TComponentId aComponentId, CComponentEntry& aEntry, TLanguage aLocale, const CComponentFilter& aFilter) const;
+		void AddSoftwareTypeNameToComponentEntryL(CStatement& aStmt, CComponentEntry& aEntry, TLanguage aLocale) const;
+		TBool IsSoftwareTypeExistingL(TInt aSoftwareTypeId) const;
+		void GetGeneralComponentEntrySizeL(const RMessage2& aMessage, const TDesC& aConditionColumn, TUint32 aConditionValue, TInt aReturnSizeSlot, TLanguage aLocale, CComponentEntry*& aComponentEntry) const;
+        TInt GetDriveFromFilePath(const TDesC& aFilePath, TDriveUnit& aDriveUnit) const;
+		TInt InstalledDrivesToBitmaskL(const TDriveList& aDriveList) const;
+		void UpdateInstalledDrivesL(TComponentId aComponentId, const TDesC& aFilePath, TFileOperationType aType);
+		TBool GetIntSoftwareTypeDataForComponentLC(TComponentId aComponentId, const TDesC& aColumnName, TInt& aValue) const;
+		TInt GetInstalledDrivesBitmaskL(TComponentId aComponentId) const;
+		CGlobalComponentId* ParseGlobalComponendIdLC(const TDesC& aGlobalId) const;
+		void GetGeneralDependencyListL(const TDesC& aSelectColumn, const TDesC& aConditionColumn, const TDesC& aConditionValue, RPointerArray<CVersionedComponentId> &aVerCompIdList) const;
+		void ReadAndSetCommonComponentPropertyL(const RMessage2& aMessage, const TDesC& aPropertyColumn);
+		TBool HasFilesOnDriveL(TDriveUnit aDrive, TComponentId aComponentId);
+		CStatement* OpenFileListStatementL(TComponentId aComponentId) const;
+		TBool IsSoftwareTypeExistingL(TUint32 aSwTypeId, TUint32 aSifPluginUid, TUint32 aInstallerSecureId, TUint32 aExecutionLayerSecureId, const RPointerArray<HBufC>& aMimeTypesArray, const RPointerArray<CLocalizedSoftwareTypeName>& aLocalizedNamesArray);
+		void SubsessionAddLocalizableSoftwareTypeNameL(CStatement& aStmt, CComponentEntry& aEntry, TLanguage aLocale, CCompViewSubsessionContext* aSubsessionContext) const;
+		TBool IsDriveReadOnlyL(TInt driveIndex) const;
+		TBool CheckForMediaPresenceL(TComponentId aComponentId) const;
+		
+		// DB Version management
+		void InitializeDbVersionL();
+		void VerifyDbVersionCompatibilityL() const;
+		
+	private:
+		RFs& iFs;	///< Reference to the file handle. It is worth to consume a word of memory instead of passing the file handle to many functions.
+		CDatabase* iDbHandle; ///< Handle to the SCR database object.
+		TVersion iDbVersion;
+		mutable CComponentEntry* iComponentEntry; 			///< The component entry whose size calculated and sent to the client.
+		mutable CPropertyEntry* iSingleProperty;
+		mutable RArray<TComponentId> iFileComponents;
+		mutable RArray<TComponentId> iComponentIdList;
+		mutable RPointerArray<CPropertyEntry> iProperties;
+		mutable RPointerArray<CVersionedComponentId> iVerCompIdList; // The list of supplier/dependant versioned component IDs
+		mutable RPointerArray<HBufC> iDeletedMimeTypes; // The list of MIME types deleted as the result of software type deletion.
+		mutable RPointerArray<CScrLogEntry> iLogEntries; // The list of log entries recorded in a session
+		mutable RArray<TLanguage> iMatchingSupportedLanguageList; // The list of matching supported language list recorded in a session
+		mutable RPointerArray<CLocalizableComponentInfo> iCompLocalizedInfoArray; //Component's localized information (name, vendor, locale) 
+		};
+	
+	} // End of namespace Usif
+
+#endif /* SCRREQUESTIMPL_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc_private/scrserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,126 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines server-side classes which are used to implement the SCR server.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+ 
+
+#ifndef SCRSERVER_H
+#define SCRSERVER_H
+
+#include <scs/scsserver.h>
+#include "scrcommon.h"
+#include "usifcommon.h"
+
+namespace Usif
+	{
+	// forward declarations
+	class CScrServer;
+	class CScrRequestImpl;
+												
+	class CScrSession : public CScsSession
+	/**
+		The instance of this class is used to perform SCR client requests and 
+		is created for each client. 
+	 */
+		{
+	public:
+		static CScrSession* NewL(CScrServer &aServer, const RMessage2& aMessage);
+		~CScrSession();
+				
+		// implement CScsSession
+		TBool DoServiceL(TInt aFunction, const RMessage2& aMessage);
+		// override CScsSession
+		CScsSubsession* DoCreateSubsessionL(TInt aFunction, const RMessage2& aMessage);
+		
+	private:
+		CScrSession(CScrServer& aServer);
+		
+		void ApplySubsessionConstraintL(CScrServer& aServer);
+		void ApplyTransactionConstraintL(CScrServer& aServer, TBool& aCreateImplicitTransaction);
+		void MutatingOperationsPreambleL(CScrServer& aServer, TScrSessionFunction aFunction, TBool& aIsTransactionImplicit);
+		void MutatingOperationsPostambleL(CScrServer& aServer);
+		
+	private:
+		TBool iTransactionOwner; 
+		};
+	
+	class CScrServer : public CScsServer
+	/**
+		The CScsServer-derived object which is used to generate SCR sessions for the SCR clients.
+	 */
+		{
+	public:
+		static CScrServer* NewLC();
+				
+		~CScrServer();
+		
+		//Implement from CScsServer
+		CScsSession* DoNewSessionL(const RMessage2& aMessage);
+	
+		inline CScrRequestImpl* RequestImpL();
+		void ReconnectL();
+		
+		void AddSubsessionOwnerL(CScrSession* aSession);
+		void RemoveSubsessionOwner(CScrSession* aSession);
+		TBool IsTheOnlySubsessionOwner(CScrSession* aSession);
+		TInt SubsessionCount();
+		
+		void SetTransactionOwner(CScrSession* aSession);
+		TBool IsTransactionInProgress();
+		TBool IsTransactionOwner(CScrSession* aSession);
+		virtual void DoPreHeapMarkOrCheckL();
+		virtual void DoPostHeapMarkOrCheckL();
+	protected:
+		CPolicyServer::TCustomResult CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing);		
+		
+	private:
+		CScrServer();
+		void ConstructL();
+		void SetupL();
+		CPolicyServer::TCustomResult CheckDeleteComponentAllowedL(const RMessage2& aMsg);
+		CPolicyServer::TCustomResult CheckComponentIdMatchingEnvironmentL(const RMessage2& aMsg);				
+		CPolicyServer::TCustomResult CheckSoftwareNameMatchingEnvironmentL(const RMessage2& aMsg);
+		CPolicyServer::TCustomResult CheckAllowedFilePathL(const RMessage2& aMsg);
+		CPolicyServer::TCustomResult CheckClientIsInstallerL(const RMessage2& aMsg);
+		CPolicyServer::TCustomResult CheckCommonComponentPropertySettableL(const RMessage2& aMsg, TCapability aRequiredCapability);
+		
+	private:
+		RFs iFs;										///< File server session handle.
+		CScrRequestImpl* iRequestImpl;					///< Pointer to the request implementation object.
+		CScrSession* iTransactionOwningSession; 		///< Pointer to the session which is owner of the current transaction. Owned by another object. NULL means there is no transaction in progress.
+		RPointerArray<CScrSession> iSubsessionOwners;   ///< The list of sessions which own active subsessions
+		RFile iDatabaseFile;							///< The database file handle
+		RFile iJournalFile;								///< The journal file handle
+		};
+	
+	inline CScrRequestImpl* CScrServer::RequestImpL()
+		{
+		if(!iRequestImpl)
+			{
+			User::Leave(KErrArgument);
+			}
+		return iRequestImpl;
+		}
+	
+	} // End of namespace SCRSERVER_H	
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/inc_private/scrsubsession.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,120 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Declares SCR subsession implementation classes on the server side.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#ifndef SCRSUBSESSION_H
+#define SCRSUBSESSION_H
+
+#include "scrserver.h"
+#include "usifcommon.h"
+
+namespace Usif
+	{
+	// forward declarations
+	class CStatement;
+	class CComponentEntry;
+	class CComponentFilter;
+	
+	class CScrSubsession : public CScsSubsession
+	/**
+		Base SCR Subsession. Owns handle to an existing database session.
+	 */
+		{
+	public:
+		virtual ~CScrSubsession();
+		
+	protected:
+		CScrSubsession(CScrSession &aSession);
+		void ConstructL();
+		
+	public:
+		CStatement *iStatement;
+		// Pointer to the server object. Owned by the session object. 
+		// Do NOT delete. Added to make the code cleaner and more consistent.
+		CScrServer *iServer; 
+		// Pointer to the session object. The owner session passes its own pointer. 
+		// Do NOT delete. Added to make the code cleaner and more consistent.
+		CScrSession *iSession;
+		};
+		
+	class CCompViewSubsessionContext : public CBase
+		{
+	friend class CScrRequestImpl;
+	friend class CComponentViewSubsession;
+	public:
+		~CCompViewSubsessionContext();
+	private:
+		TInt iLastSoftwareTypeId;
+		HBufC* iLastSoftwareTypeName;
+		RArray<TComponentId> iComponentFilterSuperset; ///< A helper array for the component filter. The filter conditions are split into two, and this variable is used for maintaing all components matching the first set of conditions.
+		TBool iFilterSupersetInUse; ///< Specifies whether the filter superset array should be used when iterating over the filter query.		
+		};
+	
+	class CComponentViewSubsession : public CScrSubsession
+	/**
+		This object is created for each component view subsession opened by the SCR client.
+		Handles component view creation by using a provided filter and returns the row(s) of the view.
+	 */
+		{
+	public:
+		static CComponentViewSubsession* NewL(CScrSession& aSession);
+		~CComponentViewSubsession();
+		// Implement CScsSession
+		TBool DoServiceL(TInt aFunction, const RMessage2& aMessage);
+			
+	private:
+		CComponentViewSubsession(CScrSession& aSession);
+		void ConstructL();
+			
+	private:
+		CComponentFilter* iFilter;
+		CComponentEntry *iComponentEntry;
+		RPointerArray<CComponentEntry> iComponentEntryList;
+		CCompViewSubsessionContext* iSubsessionContext;
+		};	
+	
+	class CFileListSubsession : public CScrSubsession
+	/**
+		This object is created for each file list subsession opened by the SCR client
+		to retrieve the list of files owned by a given component.
+	 */
+		{
+	public:
+		static CFileListSubsession* NewL(CScrSession& aSession);
+		~CFileListSubsession();
+		// Implement CScsSession
+		TBool DoServiceL(TInt aFunction, const RMessage2& aMessage);
+				
+	private:
+		CFileListSubsession(CScrSession& aSession);
+				
+	private:
+		HBufC *iFilePath;
+		RPointerArray<HBufC> iFileList;
+		};	
+	
+	}// End of namespace Usif
+
+
+#endif /* SCRSUBSESSION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/scrhelper/group/scrhelperclient.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,39 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET		scrhelperclient.dll
+TARGETTYPE 	dll
+
+UID			0x1000008d 0x102866F3
+VENDORID	0x70000001
+
+CAPABILITY ProtServ
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+USERINCLUDE	  ../inc
+USERINCLUDE	  ../../../swinstallationfw/common/inc
+
+SOURCEPATH	../source
+
+SOURCE		scrhelperclient.cpp
+
+DEFFILE 	../../~/scrhelperclient.def
+
+LIBRARY		efsrv.lib euser.lib scsclient.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/scrhelper/group/scrhelperserver.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET		scrhelperserver.exe
+TARGETTYPE 	exe
+
+UID         0x0 0x102866F2
+VENDORID	0x70000001
+
+CAPABILITY  TCB AllFiles ProtServ
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+USERINCLUDE	    ../inc
+USERINCLUDE	  ../../../swinstallationfw/common/inc
+
+SOURCEPATH	../source
+SOURCE		scrhelperstartup.cpp
+SOURCE		scrhelperserver.cpp
+
+library		efsrv.lib euser.lib scsserver.lib 
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/scrhelper/inc/scrhelperclient.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,64 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#ifndef SCRHELPERCLIENT_H
+#define SCRHELPERCLIENT_H
+
+#include <e32std.h>
+#include <e32cmn.h>
+#include <f32file.h>
+#include <scs/scsclient.h>
+#include "scrhelpercommon.h"
+
+namespace Usif
+	{
+	
+	class RScrHelper : public RScsClientBase
+		{
+	public:
+		/**
+			Default constructor of SCR helper session.
+		 */
+		IMPORT_C RScrHelper();
+		
+		/**
+			Opens a connection to the SCR Helper server.
+			@return KErrNone, if the connection is successful. Otherwise, a system-wide error code.  
+		 */
+		IMPORT_C TInt Connect();
+		
+		/**
+			Closes the connection with the SCR Helper server.
+		 */
+		IMPORT_C void Close();
+		
+		IMPORT_C void RetrieveFileHandlesL(RFile& aScrDatabase, RFile& aScrJournal);
+	
+	private:
+		void GetFileHandleL(Usif::TScrHelperServerMessages aFunction, RFile& aFile);
+		};
+	
+	} // namespace Usif
+
+#endif /* SCRHELPERCLIENT_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/scrhelper/inc/scrhelpercommon.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,83 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#ifndef SCRHELPERCOMMON_H
+#define SCRHELPERCOMMON_H
+
+#include <e32cmn.h>
+#include <e32std.h>
+#include <e32ver.h>
+#include <e32uid.h>
+#include "usiflog.h"
+
+namespace Usif
+	{
+	/** Identifies the Scr Helper Symbian OS Server. */
+	_LIT(KScrHelperServerName, "!ScrHelper");
+	
+	/**
+		Executable which hosts SCR Helper Server.  Required to launch the process.
+		@see KScrHelperServerUid3
+	 */
+	_LIT(KScrHelperServerImg, "scrhelperserver.exe");
+	
+	/**
+		Hosting the executable's secure ID.  Required to launch the process.
+		@see KScrHelperServerImg
+	 */
+	static const TUid KScrHelperServerUid3 = {0x102866F2};
+	
+	static const TInt KScrHelperServerVersionMajor = 1;  ///< SCR Helper Server version major component.
+	static const TInt KScrHelperServerVersionMinor = 0;  ///< SCR Helper Server version minor component.
+	static const TInt KScrHelperServerVersionBuild = 0;  ///< SCR Helper Server version build component.
+	
+	enum TScrHelperServerMessages
+	/**
+		Functions supported by a SCR Helper Server session.
+	 */
+		{
+		EGetDatabaseFileHandle,
+		EGetJournalFileHandle
+		};
+	
+	/** The path of SCR database file */
+	_LIT(KScrDatabaseFilePath, "!:\\sys\\install\\scr\\scr.db");
+	
+	/** The path of SCR database journal file */
+	_LIT(KScrJournalFilePath, "!:\\sys\\install\\scr\\scr.db-journal");
+	
+	/** The full path of the default SCR database stored in ROM. */
+	_LIT(KScrDbRomPath,"z:\\sys\\install\\scr\\provisioned\\scr.db");
+	
+	/**
+		Delay in microseconds before the SCR Helper Server is shut down,
+		after the last remaining session has been closed.
+	 */
+	const TInt KScrHelperServerShutdownPeriod = 2 * 1000 * 1000;
+	
+	} // namespace Usif
+
+#include "scrhelpercommon.inl"
+
+#endif /* SCRHELPERCOMMON_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/scrhelper/inc/scrhelpercommon.inl	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* The functions defined in this file provide constant data which is
+* used by both the SCR Helper server and client side implementations.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+ 
+#ifndef SCRHELPERCOMMON_INL
+#define SCRHELPERCOMMON_INL
+
+#include <usif/scr/scrcommon.h>
+
+namespace Usif
+	{
+	inline TVersion ScrHelperServerVersion()
+	/**
+		This function is defined because there is no literal constructor for TVersion.
+
+		@return	Defines a version number which the client side code	
+				can use to open the SCR Helper server. If the client code
+				was built with a higher version number, then it cannot
+				open the SCR Helper server. This ensures that a client only
+				talks to the SCR Helper server version is at least as high as its own.
+	*/
+		{
+		TVersion version(KScrHelperServerVersionMajor, KScrHelperServerVersionMinor, KScrHelperServerVersionBuild);
+		return version;
+		}
+
+	inline TUidType ScrHelperServerImageFullUid()
+	/**
+		This function is defined because there is no literal constructor
+		for TUidType.  It returns the SCR Helper server executable's UID, which is used
+		to ensure the client side code launches the correct server process, as opposed
+		to another application which uses the same executable name.
+
+		@return TUidType		The SCR Helper server executable's full UID.
+	 */
+		{
+		TUidType typ(KExecutableImageUid, KNullUid, KScrHelperServerUid3);
+		return typ;
+		}
+
+	} // End of namespace Usif 
+	
+#endif // SCRHELPERCOMMON_INL
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/scrhelper/inc/scrhelperserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,70 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#ifndef SCRHELPERSERVER_H
+#define SCRHELPERSERVER_H
+
+#include <scs/scsserver.h>
+#include <e32cmn.h>
+#include <f32file.h> 
+
+namespace Usif
+	{
+	class CScrHelperServer : public CScsServer
+		{
+	public:
+		static CScrHelperServer* NewLC();
+		~CScrHelperServer();
+		
+		inline RFs& FileServer();
+		
+		//Implement from CScsServer
+		CScsSession* DoNewSessionL(const RMessage2& aMessage);
+		
+	private:
+		CScrHelperServer();
+		void ConstructL();
+	
+	private:
+		RFs iFs; ///< File server session handle.
+		};	
+	
+	
+	class CScrHelperSession : public CScsSession
+		{
+	public:
+		static CScrHelperSession* NewL(CScrHelperServer &aServer, const RMessage2& aMessage);
+		~CScrHelperSession();
+		
+		// implement CScsSession
+		TBool DoServiceL(TInt aFunction, const RMessage2& aMessage);	
+		
+	private:
+		CScrHelperSession(CScrHelperServer &aServer);
+		void GetFileHandleL(RFs& aFs, const RMessage2& aMessage, const TDesC& aFileName);
+		};
+	
+	} // namespace Usif
+
+#endif /* SCRHELPERSERVER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/scrhelper/source/scrhelperclient.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,64 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include <e32cmn.h>
+#include "scrhelperclient.h"
+
+using namespace Usif;
+
+EXPORT_C RScrHelper::RScrHelper()
+	:	RScsClientBase()
+	{
+	// empty
+	}
+
+EXPORT_C TInt RScrHelper::Connect()
+	{
+	DEBUG_PRINTF(_L8("Connecting to SCR Helper Server!"));
+	TVersion version = ScrHelperServerVersion();
+	TUidType fullUid = ScrHelperServerImageFullUid();		
+	return RScsClientBase::Connect(KScrHelperServerName(), version, KScrHelperServerImg(), fullUid);
+	}
+
+EXPORT_C void RScrHelper::Close()
+	{
+	DEBUG_PRINTF(_L8("Closing SCR Helper connection!"));
+	RScsClientBase::Close();
+	}
+
+EXPORT_C void RScrHelper::RetrieveFileHandlesL(RFile& aScrDatabase, RFile& aScrJournal)
+	{
+	DEBUG_PRINTF(_L8("Retrieving  database and journal file handles from SCR Helper Server!"));
+	// First, retrieve database file handle
+	GetFileHandleL(EGetDatabaseFileHandle, aScrDatabase);
+	// Then, retrieve journal file handle
+	GetFileHandleL(EGetJournalFileHandle, aScrJournal);
+	}
+
+void RScrHelper::GetFileHandleL(Usif::TScrHelperServerMessages aFunction, RFile& aFile)
+	{
+	// Retrieve the RFs and RFile handles from the server
+	TInt fsh;          	 // File server handle (RFs - session)
+	TPckgBuf<TInt> fh;   // File handle (RFile - subsession)
+		
+	fsh = CallSessionFunction(aFunction, TIpcArgs(&fh));   // pointer to fh in slot 0
+	User::LeaveIfError(fsh);
+	
+	// Adopt the file using the returned handles
+	User::LeaveIfError(aFile.AdoptFromServer(fsh, fh()));
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/scrhelper/source/scrhelperserver.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,213 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "scrhelpercommon.h"
+#include "scrhelperserver.h"
+#include <e32cmn.h>
+#include <e32debug.h>
+#include <usif/scr/scrcommon.h>
+
+using namespace Usif;
+
+static const TUint scrHelperRangeCount = 2;
+
+static const TInt scrHelperRanges[scrHelperRangeCount] =
+	{
+	0,							 // Range-0 - 0 to EBaseSession-1. Not used.
+	CScsServer::EBaseSession,	 // Range-1 - EBaseSession to KMaxTInt inclusive.
+	};
+
+static const TUint8 scrHelperElementsIndex[scrHelperRangeCount] =
+	{
+	CPolicyServer::ENotSupported, // Range 0 is not supported.
+	0,							  // Range 1 must come from the SCR Server.
+	};							
+
+static const CPolicyServer::TPolicyElement scrHelperElements[] =
+	{
+	{_INIT_SECURITY_POLICY_S0(KUidScrServer.iUid), CPolicyServer::EFailClient}
+	};
+
+static const CPolicyServer::TPolicy scrHelperPolicy =
+	{
+	CPolicyServer::EAlwaysPass, // Allow all connections
+	scrHelperRangeCount,
+	scrHelperRanges,
+	scrHelperElementsIndex,
+	scrHelperElements,
+	};
+
+/////////////////////
+// CScrHelperServer
+/////////////////////
+
+CScrHelperServer::CScrHelperServer()
+	:	CScsServer(ScrHelperServerVersion(), scrHelperPolicy)
+	{
+	// empty
+	}
+
+CScrHelperServer::~CScrHelperServer()
+	{
+	iFs.Close();
+	}
+
+CScrHelperServer* CScrHelperServer::NewLC()
+	{
+	CScrHelperServer* self = new(ELeave) CScrHelperServer();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+
+void CScrHelperServer::ConstructL() 
+	{
+	User::LeaveIfError(iFs.Connect());
+	User::LeaveIfError(iFs.ShareProtected());
+
+	StartL(KScrHelperServerName);
+	CScsServer::ConstructL(KScrHelperServerShutdownPeriod);	
+	}
+
+CScsSession* CScrHelperServer::DoNewSessionL(const RMessage2& aMessage)
+/**
+	Implement CScsServer by allocating a new instance of CScrHelperSession.
+
+	@param	aMessage	Standard server-side handle to message.
+	@return				New instance of the SCR Helper session class which is owned by the caller.
+ */
+	{
+	DEBUG_PRINTF(_L8("SCR Helper session creation!"));
+	return CScrHelperSession::NewL(*this, aMessage);
+	}
+
+inline RFs& CScrHelperServer::FileServer()
+	{
+	return iFs;
+	}
+
+/////////////////////
+// CScrHelperSession
+/////////////////////
+
+CScrHelperSession::CScrHelperSession(CScrHelperServer& aServer)
+	:	CScsSession(aServer)
+	{
+	// empty
+	}
+
+CScrHelperSession::~CScrHelperSession()
+	{
+	// empty
+	}
+
+CScrHelperSession* CScrHelperSession::NewL(CScrHelperServer &aServer, const RMessage2& aMessage)
+/**
+	Factory function allocates new instance of CScrSession.
+	
+	@param aServer  SCR Helper Server object.
+	@param aMessage	Standard server-side handle to message. Not used.
+	@return			Newly created instance of CScrHelperSession which is owned by the caller.
+ */
+	{
+	(void)aMessage; // Make the compiler happy in release mode
+	CScrHelperSession* self = new (ELeave) CScrHelperSession(aServer);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+TBool CScrHelperSession::DoServiceL(TInt aFunction, const RMessage2& aMessage)
+	{
+	TScrHelperServerMessages f = static_cast<TScrHelperServerMessages>(aFunction);
+	RFs& fs =  static_cast<CScrHelperServer*>(&iServer)->FileServer();
+	
+	switch (f)
+		{
+		case EGetDatabaseFileHandle:
+			GetFileHandleL(fs, aMessage, KScrDatabaseFilePath);
+			break;
+		case EGetJournalFileHandle:
+			GetFileHandleL(fs, aMessage, KScrJournalFilePath);
+			break;
+		default:
+			User::Leave(KErrNotSupported);
+		}
+	//RMessage2 object is closed by both TransferToClient() and SCS framework.
+	//return EFalse to prevent SCS to close the message object.
+	return EFalse;
+	}
+
+void CopyDbFromROMToSystemL(RFs& aFs, const TDesC& aTargetPath)
+	{
+	CFileMan* fileManager = CFileMan::NewL(aFs);
+	CleanupStack::PushL(fileManager);
+	User::LeaveIfError(fileManager->Copy(KScrDbRomPath, aTargetPath, 0));
+
+	// Reset the read-only attribute on the copied file
+	TTime time;
+	User::LeaveIfError(aFs.SetAtt(aTargetPath, 0, KEntryAttReadOnly));
+	CleanupStack::PopAndDestroy(fileManager);
+	}
+
+void CScrHelperSession::GetFileHandleL(RFs& aFs, const RMessage2& aMessage, const TDesC& aFileName)
+	{
+	DEBUG_PRINTF2(_L("Returning file handle of %S."), &aFileName);
+	RBuf filePath;
+	filePath.CreateL(aFileName.Length());
+	filePath.CleanupClosePushL();
+	filePath.Copy(aFileName);
+	filePath[0] = aFs.GetSystemDriveChar();
+	TInt err = aFs.MkDirAll(filePath);
+	if(KErrNone != err && KErrAlreadyExists != err)
+		{
+		DEBUG_PRINTF3(_L("An error (%d) occured while making all directories of %S."), err, &filePath);
+		User::Leave(err);
+		}
+	
+	RFile file;
+	TEntry entry;
+
+	if(KErrNone == aFs.Entry(filePath, entry))
+		{ // The file exists, just open it.
+		User::LeaveIfError(file.Open(aFs, filePath, EFileShareAny|EFileWrite));
+		}    
+	else
+		{ // The file doesn't exist. First, check if the requested file is database or journal file.
+		if(KScrDatabaseFilePath() == aFileName)
+			{ // This is the database file. Copy the default one into the requested location.
+			DEBUG_PRINTF(_L8("SCR database file doesn't exist. It is being copied from ROM"));
+			CopyDbFromROMToSystemL(aFs, filePath);
+			 // Then, open the file.
+			User::LeaveIfError(file.Open(aFs, filePath, EFileShareAny|EFileWrite));
+			}
+		else
+			{ // This is the journal file, simply create an empty file.
+			User::LeaveIfError(file.Create(aFs, filePath, EFileShareAny|EFileWrite));
+			}
+		}
+	CleanupStack::PopAndDestroy(&filePath);
+	CleanupClosePushL(file);
+	
+	// Store the RFile handle into the package buffer in slot 0 and complete the message with the RFs handle
+	User::LeaveIfError(file.TransferToClient(aMessage, 0));
+	ASSERT(aMessage.IsNull());  // The message should have been completed
+
+	CleanupStack::PopAndDestroy(&file);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/scrhelper/source/scrhelperstartup.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Executable entrypoint and server object factory function. The latter
+* is supplied to the SCS boilerplate code which starts up the server.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#include "scrhelperserver.h"
+
+using namespace Usif;
+
+static CScsServer* NewScrHelperServerLC()
+/**
+	This factory function is called by SCS framework.  It allocates
+	the SCR Helper Server object and leaves it on the cleanup stack.
+
+	@return		New initialized instance of CScrHelperServer.
+				On return this is on the cleanup stack.
+ */
+	{
+	return Usif::CScrHelperServer::NewLC();
+	}
+
+
+GLDEF_C TInt E32Main()
+/**
+	Executable entrypoint. Calls the SCS boilerplate code which starts the SCR Helper server
+	and does not return until the server shuts down.
+
+	@return	Symbian OS error code where KErrNone indicates success 
+			and any other value indicates failure.
+ */
+	{
+	return StartScsServer(NewScrHelperServerLC);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/source/client/scrclient.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,657 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* RSoftwareComponentRegistry implementation. See class and function 
+* declarations for more detail.
+*
+*/
+
+
+#include "scr.h"
+#include "scrclient.inl"
+#include "scrcommon.h"
+#include "usiflog.h"
+#include <e32cmn.h>
+#include <scs/streamingarray.h>
+#include <scs/scscommon.h>
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "screntries_internal.h"
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+
+using namespace Usif;
+
+TInt RSoftwareComponentRegistry::SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const
+	{
+	return CallSessionFunction(aFunction, aArgs);
+	}
+
+EXPORT_C RSoftwareComponentRegistry::RSoftwareComponentRegistry()
+	:	RScsClientBase()
+	{
+	// empty
+	}
+
+EXPORT_C TInt RSoftwareComponentRegistry::Connect()
+	{
+	DEBUG_PRINTF2(_L("Connecting to %S."), &KSoftwareComponentRegistryName);
+	TVersion version = ScrServerVersion();
+	TUidType scrFullUid = ScrServerImageFullUid();
+	
+	return RScsClientBase::Connect(KSoftwareComponentRegistryName(), version, KScrServerImageName(), scrFullUid);
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::Close()
+	{
+	DEBUG_PRINTF2(_L("Closing connection to %S."), &KSoftwareComponentRegistryName);
+	RScsClientBase::Close();
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::CreateTransactionL()
+	{
+	DEBUG_PRINTF(_L("Sending Create Transaction request."));
+	User::LeaveIfError(CallSessionFunction(ECreateTransaction));
+	}
+		
+EXPORT_C void RSoftwareComponentRegistry::RollbackTransactionL()
+	{
+	DEBUG_PRINTF(_L("Sending Rollback Transaction request."));
+	User::LeaveIfError(CallSessionFunction(ERollbackTransaction));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::CommitTransactionL()
+	{
+	DEBUG_PRINTF(_L("Sending Commit Transaction request."));
+	User::LeaveIfError(CallSessionFunction(ECommitTransaction));
+	}
+
+
+EXPORT_C TComponentId RSoftwareComponentRegistry::AddComponentL(const TDesC& aName, const TDesC& aVendor, const TDesC& aUniqueSwTypeName, const TDesC* aGlobalId, TScrComponentOperationType aCompOpType)
+	{
+	DEBUG_PRINTF3(_L("Sending add a new component ('%S','%S') request."), &aName, &aVendor);
+
+	CLocalizableComponentInfo *cmpInfo = CLocalizableComponentInfo::NewLC(aName, aVendor, KNonLocalized);
+	RPointerArray<CLocalizableComponentInfo> cmpInfoList;
+	cmpInfoList.AppendL(cmpInfo);
+	CleanupStack::Pop(cmpInfo);
+	CleanupResetAndDestroyPushL(cmpInfoList);
+	TComponentId compId = AddComponentL(cmpInfoList, aUniqueSwTypeName, aGlobalId, aCompOpType);
+	CleanupStack::PopAndDestroy(&cmpInfoList);
+	return compId;
+	}
+
+EXPORT_C TComponentId RSoftwareComponentRegistry::AddComponentL(const RPointerArray<CLocalizableComponentInfo>& aComponentInfo, const TDesC& aUniqueSwTypeName, const TDesC* aGlobalId, TScrComponentOperationType aCompOpType)
+	{
+	if(!aComponentInfo.Count())
+		{
+		DEBUG_PRINTF(_L("The localizables component info array is empty!."));
+		User::Leave(KErrArgument);
+		}
+	DEBUG_PRINTF(_L("Sending add a new component request with a set of localizable names."));
+	
+	TComponentId compId = static_cast<TComponentId>(aCompOpType);
+	// compId variable carries the component operation type to the SCR server.
+	// On return, it will contain the actual component Id value.
+	TPckg<TComponentId> compIdPckg(compId);
+	HBufC8* arrayBuf = ExternalizePointersArrayLC(aComponentInfo);
+	const TDesC *globalId = aGlobalId ? aGlobalId : &KNullDesC();
+	TIpcArgs args(&aUniqueSwTypeName, arrayBuf, globalId, &compIdPckg);
+	User::LeaveIfError(CallSessionFunction(EAddComponent, args));
+	CleanupStack::PopAndDestroy(arrayBuf);
+	return compId;
+	}
+
+template <class C>
+void RSoftwareComponentRegistry::SendDependencyArgsL(TInt aFunction, const C& aSupplierId, const CGlobalComponentId& aDependantGlobalCompId)
+	{
+	RBuf8 suppVerCompId;
+	suppVerCompId.CleanupClosePushL();
+	ExternalizeObjectL(&aSupplierId, suppVerCompId);
+		
+	RBuf8 depGlobalId;
+	depGlobalId.CleanupClosePushL();
+	ExternalizeObjectL(&aDependantGlobalCompId, depGlobalId);
+	// Send the software type of the dependant component seperately in order to apply custom security check properly on the server side.
+	TIpcArgs args(&aDependantGlobalCompId.SoftwareTypeName(),&suppVerCompId, &depGlobalId);
+	User::LeaveIfError(CallSessionFunction(aFunction, args));
+	CleanupStack::PopAndDestroy(2, &suppVerCompId); // suppVerCompId, depGlobalId
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::AddComponentDependencyL(const CVersionedComponentId& aSupplierVerCompId, const CGlobalComponentId& aDependantGlobalCompId)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to add a new dependency between two components (%S depends on %S)."), &aDependantGlobalCompId.GlobalIdName(), &aSupplierVerCompId.GlobalId().GlobalIdName());
+	SendDependencyArgsL(EAddComponentDependency, aSupplierVerCompId, aDependantGlobalCompId);
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, const TDesC8& aValue)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to set the binary property(%S) of the component(%d)."), &aName, aComponentId);
+	TIpcArgs args(aComponentId, &aName, &aValue);
+	User::LeaveIfError(CallSessionFunction(ESetComponentBinaryProperty, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, const TDesC& aValue, TLanguage aLocale)
+	{
+	DEBUG_PRINTF4(_L("Sending a request to set the string property(%S,%S) of the component(%d)."), &aName, &aValue, aComponentId);
+	TIpcArgs args(aComponentId, &aName, &aValue, aLocale);
+	User::LeaveIfError(CallSessionFunction(ESetComponentLocalizableProperty, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, TInt64 aValue)
+	{
+	DEBUG_PRINTF4(_L("Sending a request to set the numeric property(%S,%Ld) of the component(%d)."), &aName, aValue, aComponentId);
+	TIpcArgs args(aComponentId, &aName, I64HIGH(aValue), I64LOW(aValue));
+	User::LeaveIfError(CallSessionFunction(ESetComponentNumericProperty, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::RegisterComponentFileL(TComponentId aComponentId, const TDesC& aFileName, TBool aConsiderForInstalledDrives /*= ETrue*/ )
+	{
+	DEBUG_PRINTF4(_L("Sending a request to register the file(%S) for the component(%d). ConsiderFilesInDriveList:%d"), &aFileName, aComponentId, aConsiderForInstalledDrives);
+	TIpcArgs args(aComponentId, &aFileName, aConsiderForInstalledDrives);
+	User::LeaveIfError(CallSessionFunction(ERegisterComponentFile, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName, const TDesC8& aPropValue)
+	{
+	DEBUG_PRINTF4(_L("Sending a request to set the string property(%S) of the file(%S) of the component(%d)."), &aPropName, &aFileName, aComponentId);
+	TIpcArgs args(aComponentId, &aFileName, &aPropName, &aPropValue);
+	User::LeaveIfError(CallSessionFunction(ESetFileStringProperty, args));
+	}
+EXPORT_C void RSoftwareComponentRegistry::SetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName, TInt aPropValue)
+	{
+	DEBUG_PRINTF5(_L("Sending a request to set the numeric property(%S,%d) of the file(%S) of the component(%d)."), &aPropName, aPropValue, &aFileName, aComponentId);
+	TIpcArgs args(aComponentId, &aFileName, &aPropName, aPropValue);
+	User::LeaveIfError(CallSessionFunction(ESetFileNumericProperty, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetComponentNameL(TComponentId aComponentId, const TDesC& aName, TLanguage aLocale)
+	{
+	DEBUG_PRINTF4(_L("Sending a request to update the name(%S,%d) of the component(%d)."), &aName, aLocale, aComponentId);
+	TIpcArgs args(aComponentId, &aName, aLocale);
+	User::LeaveIfError(CallSessionFunction(ESetComponentName, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetVendorNameL(TComponentId aComponentId, const TDesC& aVendor, TLanguage aLocale)
+	{
+	DEBUG_PRINTF4(_L("Sending a request to update the vendor(%S,%d) of the component(%d)."), &aVendor, aLocale, aComponentId);
+	TIpcArgs args(aComponentId, &aVendor, aLocale);
+	User::LeaveIfError(CallSessionFunction(ESetComponentVendor, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetComponentVersionL(TComponentId aComponentId, const TDesC& aVersion)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to set the version(%S) of the component(%d)."), &aVersion, aComponentId);
+	TIpcArgs args(aComponentId, &aVersion);
+	User::LeaveIfError(CallSessionFunction(ESetComponentVersion, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetIsComponentRemovableL(TComponentId aComponentId, TBool aValue)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to set the removable attribute(%d) of the component(%d)."), aValue, aComponentId);
+	TIpcArgs args(aComponentId, aValue);
+	User::LeaveIfError(CallSessionFunction(ESetIsComponentRemovable, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetIsComponentDrmProtectedL(TComponentId aComponentId, TBool aValue)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to set the DRM protected attribute(%d) of the component(%d)."), aValue, aComponentId);
+	TIpcArgs args(aComponentId, aValue);
+	User::LeaveIfError(CallSessionFunction(ESetIsComponentDrmProtected, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetIsComponentHiddenL(TComponentId aComponentId, TBool aValue)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to set the hidden attribute(%d) of the component(%d)."), aValue, aComponentId);
+	TIpcArgs args(aComponentId, aValue);
+	User::LeaveIfError(CallSessionFunction(ESetIsComponentHidden, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetIsComponentKnownRevokedL(TComponentId aComponentId, TBool aValue)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to set the known-revoked attribute(%d) of the component(%d)."), aValue, aComponentId);
+	TIpcArgs args(aComponentId, aValue);
+	User::LeaveIfError(CallSessionFunction(ESetIsComponentKnownRevoked, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetIsComponentOriginVerifiedL(TComponentId aComponentId, TBool aValue)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to set the origin-verified attribute(%d) of the component(%d)."), aValue, aComponentId);
+	TIpcArgs args(aComponentId, aValue);
+	User::LeaveIfError(CallSessionFunction(ESetIsComponentOriginVerified, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetComponentSizeL(TComponentId aComponentId, TInt64 aComponentSizeInBytes)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to set the install-time size (%Ld) of the component(%d)."), aComponentSizeInBytes, aComponentId);
+	TIpcArgs args(aComponentId, I64HIGH(aComponentSizeInBytes), I64LOW(aComponentSizeInBytes));
+	User::LeaveIfError(CallSessionFunction(ESetComponentSize, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::DeleteComponentPropertyL(TComponentId aComponentId, const TDesC& aPropName)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to delete the property(%S) of the component(%d)."), &aPropName, aComponentId);
+	TIpcArgs args(aComponentId, &aPropName);
+	User::LeaveIfError(CallSessionFunction(EDeleteComponentProperty, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::DeleteFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName)
+	{
+	DEBUG_PRINTF4(_L("Sending a request to delete the property(%S) of the file(%S) of the component(%d)."), &aPropName, &aFileName, aComponentId);
+	TIpcArgs args(aComponentId, &aFileName, &aPropName);
+	User::LeaveIfError(CallSessionFunction(EDeleteFileProperty, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::UnregisterComponentFileL(TComponentId aComponentId, const TDesC& aFileName)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to deregister the file(%S) for the component(%d)."), &aFileName, aComponentId);
+	TIpcArgs args(aComponentId, &aFileName);
+	User::LeaveIfError(CallSessionFunction(EUnregisterComponentFile, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::DeleteComponentL(TComponentId aComponentId)
+	{
+	DEBUG_PRINTF2(_L("Sending a request to delete the component(%d)."), aComponentId);
+	TIpcArgs args(aComponentId);
+	User::LeaveIfError(CallSessionFunction(EDeleteComponent, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::DeleteComponentDependencyL(const CGlobalComponentId& aSupplierGlobalCompId, const CGlobalComponentId& aDependantGlobalCompId)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to delete an existing dependency between two components (%S depends on %S)."), &aDependantGlobalCompId.GlobalIdName(), &aSupplierGlobalCompId.GlobalIdName());
+	SendDependencyArgsL(EDeleteComponentDependency, aSupplierGlobalCompId, aDependantGlobalCompId);
+	}
+
+EXPORT_C TBool RSoftwareComponentRegistry::GetComponentL(TComponentId aComponentId, CComponentEntry& aEntry, TLanguage aLocale) const
+	{
+	DEBUG_PRINTF2(_L("Sending a request to retrieve the entry of the component(%d)."), aComponentId);
+	TIpcArgs args(aComponentId, aLocale);
+	TInt argNum = 2; // size descriptor will be added to this slot
+	return GetObjectL(*this, aEntry, EGetSingleComponentSize, EGetSingleComponentData, argNum, args);
+	}
+	
+EXPORT_C void RSoftwareComponentRegistry::GetComponentLocalizedInfoL(TComponentId aComponentId, RPointerArray<CLocalizableComponentInfo>& aCompLocalizedInfoArray) const
+    {
+    DEBUG_PRINTF2(_L("Sending a request to retrieve the localized entry of the component(%d)."), aComponentId);
+    TIpcArgs args(aComponentId);
+    TInt argNum = 1; // size descriptor will be added to this slot
+    GetObjectArrayL(*this, EGetLocalizedComponentSize, EGetLocalizedComponentData, argNum, args, aCompLocalizedInfoArray);
+    }
+
+EXPORT_C void RSoftwareComponentRegistry::GetComponentIdsL(RArray<TComponentId>& aComponentIdList, CComponentFilter* aFilter) const
+	{
+	RBuf8 buf;
+	buf.CleanupClosePushL();
+	ExternalizeObjectL(aFilter, buf);
+	
+	TIpcArgs args(&buf);
+	TInt argNum = 1;
+	GetObjectArrayL(*this, EGetComponentIdListSize, EGetComponentIdListData, argNum, args, aComponentIdList);
+	CleanupStack::PopAndDestroy(&buf);
+	}
+
+EXPORT_C TComponentId RSoftwareComponentRegistry::GetComponentIdL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName) const
+	{
+	DEBUG_PRINTF3(_L("Sending a request to retrieve the local component Id of a global component id (%S,%S)."), &aGlobalIdName, &aUniqueSwTypeName);
+	
+	TComponentId compId;
+	TPckg<TComponentId> compIdPckg(compId);
+		
+	TIpcArgs args(&aGlobalIdName, &aUniqueSwTypeName, &compIdPckg);
+	User::LeaveIfError(CallSessionFunction(EGetLocalComponentId, args));
+	
+	return compId;
+	}
+
+EXPORT_C CComponentEntry* RSoftwareComponentRegistry::GetComponentL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName, TLanguage aLocale) const
+	{
+	DEBUG_PRINTF3(_L("Sending a request with the global id(%S,%S) to retrieve the entry of the component."), &aGlobalIdName, &aUniqueSwTypeName);
+
+	TIpcArgs args(&aGlobalIdName, &aUniqueSwTypeName, aLocale);
+	TInt argNum = 3; // size descriptor will be added to this slot
+	return GetObjectL<CComponentEntry>(*this, EGetComponentWithGlobalIdSize, EGetComponentWithGlobalIdData, argNum, args);	
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::GetSupplierComponentsL(const CGlobalComponentId& aDependantGlobalId, RPointerArray<CVersionedComponentId>& aSupplierList) const
+	{
+	DEBUG_PRINTF2(_L("Sending a request to retrieve the supplier list of a dependant component (%S)."), &aDependantGlobalId.GlobalIdName());
+	
+	RBuf8 depGlobalId;
+	depGlobalId.CleanupClosePushL();
+	ExternalizeObjectL(&aDependantGlobalId, depGlobalId);
+	
+	TIpcArgs args(&depGlobalId);
+	TInt argNum = 1;
+	GetObjectArrayL(*this, EGetSupplierComponentsSize, EGetSupplierComponentsData, argNum, args, aSupplierList);
+	CleanupStack::PopAndDestroy(&depGlobalId);
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::GetDependantComponentsL(const CGlobalComponentId& aSupplierGlobalId, RPointerArray<CVersionedComponentId>& aDependantList) const
+	{
+	DEBUG_PRINTF2(_L("Sending a request to retrieve the dependant list of a supplier component (%S)."), &aSupplierGlobalId.GlobalIdName());
+	
+	RBuf8 supGlobalId;
+	supGlobalId.CleanupClosePushL();
+	ExternalizeObjectL(&aSupplierGlobalId, supGlobalId);
+	
+	TIpcArgs args(&supGlobalId);
+	TInt argNum = 1;
+	GetObjectArrayL(*this, EGetDependantComponentsSize, EGetDependantComponentsData, argNum, args, aDependantList);
+	CleanupStack::PopAndDestroy(&supGlobalId);
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::GetFilePropertiesL(TComponentId aComponentId, const TDesC& aFileName, RPointerArray<CPropertyEntry>& aProperties) const
+	{
+	DEBUG_PRINTF2(_L("Sending a request to retrieve the properties of the file(%S)."), &aFileName);
+	TIpcArgs args(aComponentId, &aFileName);
+	TInt argNum = 2;
+	GetObjectArrayL(*this, EGetFilePropertiesSize, EGetFilePropertiesData, argNum, args, aProperties);
+	}
+
+EXPORT_C CPropertyEntry* RSoftwareComponentRegistry::GetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropertyName) const
+	{
+	DEBUG_PRINTF3(_L("Sending a request to retrieve the property(%S) of the file(%S)."), &aPropertyName, &aFileName);
+	TIpcArgs args(aComponentId, &aFileName, &aPropertyName);
+	TInt argNum = 3;
+	return GetObjectL<CPropertyEntry>(*this, EGetSingleFilePropertySize, EGetSingleFilePropertyData, argNum, args);
+	}
+
+EXPORT_C TUint RSoftwareComponentRegistry::GetComponentFilesCountL(TComponentId aComponentId) const
+	{
+	TUint registeredFilesNum;
+	TPckg<TUint> resPckg(registeredFilesNum);
+	TIpcArgs args(aComponentId, &resPckg);
+	User::LeaveIfError(CallSessionFunction(EGetComponentFilesCount, args));
+	return registeredFilesNum;	
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::GetComponentsL(const TDesC& aFileName, RArray<TComponentId>& aComponents) const
+	{
+	TIpcArgs args(&aFileName);
+	TInt argNum = 1;
+	GetObjectArrayL(*this, EGetFileComponentsSize, EGetFileComponentsData, argNum, args, aComponents);
+	}
+
+EXPORT_C CPropertyEntry* RSoftwareComponentRegistry::GetComponentPropertyL(TComponentId aComponentId, const TDesC& aPropertyName, TLanguage aLocale) const
+	{
+	TIpcArgs args(aComponentId, &aPropertyName, aLocale);
+	TInt argNum = 3;
+	return GetObjectL<CPropertyEntry>(*this, EGetComponentSinglePropertySize, EGetComponentSinglePropertyData, argNum, args);
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::GetComponentPropertiesL(TComponentId aComponentId, RPointerArray<CPropertyEntry>& aProperties, TLanguage aLocale) const
+	{
+	TIpcArgs args(aComponentId, aLocale);
+	TInt argNum = 2;
+	GetObjectArrayL(*this, EGetComponentPropertiesSize, EGetComponentPropertiesData, argNum, args, aProperties);
+	}
+
+EXPORT_C TBool RSoftwareComponentRegistry::IsMediaPresentL(TComponentId aComponentId) const
+	{
+	DEBUG_PRINTF2(_L("Sending a request to retrieve the media presence status of component (%d)."), aComponentId);
+	TBool result;
+	TPckg<TBool> isMediaPresent(result);
+	User::LeaveIfError(CallSessionFunction(EGetIsMediaPresent, TIpcArgs(aComponentId, &isMediaPresent)));	
+
+	DEBUG_PRINTF3(_L("Received media presence status of component (%d) - result is %d."), aComponentId, result);
+	return result;
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetScomoStateL(TComponentId aComponentId, TScomoState aScomoState) const
+	{
+	DEBUG_PRINTF3(_L("Sending a request to set the scomo state (%d) of component(%d) at install time."), aScomoState, aComponentId);
+	TIpcArgs args(aComponentId, aScomoState);
+	User::LeaveIfError(CallSessionFunction(ESetScomoState, args));
+	}
+
+EXPORT_C TUid RSoftwareComponentRegistry::GetPluginUidL(const TDesC& aMimeType) const
+	{
+	DEBUG_PRINTF2(_L("Sending a request to retrieve the list of plugins for mime types %S."), &aMimeType);
+	TUint32 uidNum(0);
+	TPckg<TUint32> uidDes(uidNum);
+	TIpcArgs args(&aMimeType, &uidDes);
+	User::LeaveIfError(CallSessionFunction(EGetPluginUidWithMimeType, args));
+	TUid pluginUid = TUid::Uid(uidNum);
+	return pluginUid;
+	}
+
+EXPORT_C TUid RSoftwareComponentRegistry::GetPluginUidL(TComponentId aComponentId) const
+	{
+	DEBUG_PRINTF2(_L("Sending a request to retrieve the list of plugins for the component(%d)."), aComponentId);
+	TUint32 uidNum(0);
+	TPckg<TUint32> uidDes(uidNum);
+	TIpcArgs args(aComponentId, &uidDes);
+	User::LeaveIfError(CallSessionFunction(EGetPluginUidWithComponentId, args));
+	TUid pluginUid = TUid::Uid(uidNum);
+	return pluginUid;
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::AddSoftwareTypeL(const TDesC& aUniqueSwTypeName, TUid aSifPluginUid, TSecureId aInstallerSecureId, TSecureId aExecutionLayerSecureId, const RPointerArray<HBufC>& aMimeTypes, const RPointerArray<CLocalizedSoftwareTypeName>* aLocalizedSwTypeNames)
+	{
+	DEBUG_PRINTF2(_L("Sending add a new software type (%S) request."), &aUniqueSwTypeName);
+	
+	if(!aMimeTypes.Count())
+		{
+		DEBUG_PRINTF(_L("MIME types list cannot be empty!"));
+		User::Leave(KErrArgument);
+		}
+	
+	// Concatenate aSifPluginUid, aInstallerSecureId, and aExecutionLayerSecureId in order to gain spare slots to send other data
+	RBuf8 uidString;
+	uidString.CreateL(3*KUidStringLen); // 3 UIDs will be concatenated
+	uidString.CleanupClosePushL();
+	uidString.AppendNumFixedWidth(aSifPluginUid.iUid, EHex, KUidStringLen);
+	uidString.AppendNumFixedWidth(aInstallerSecureId.iId, EHex, KUidStringLen);
+	uidString.AppendNumFixedWidth(aExecutionLayerSecureId.iId, EHex, KUidStringLen);
+	
+	// Externalize the MIME types of the newly added software type
+	HBufC8* mimeTypesBuf = ExternalizePointersArrayLC(aMimeTypes);
+	
+	// Externalize the unique and localizable names for the newly added software type
+	const RPointerArray<CLocalizedSoftwareTypeName> *localCopyOfSwTypeNames(0);
+	if(!aLocalizedSwTypeNames)
+		{// if aLocalizedSwTypeNames is not supplied, then create an empty one.
+		localCopyOfSwTypeNames = new(ELeave) RPointerArray<CLocalizedSoftwareTypeName>;
+		CleanupStack::PushL(const_cast<RPointerArray<CLocalizedSoftwareTypeName>* >(localCopyOfSwTypeNames));
+		}
+	else
+		{
+		localCopyOfSwTypeNames = aLocalizedSwTypeNames;
+		}
+	HBufC8* localizedNamesBuf = ExternalizePointersArrayLC(*localCopyOfSwTypeNames);		
+
+	TIpcArgs swTypeArgs(&aUniqueSwTypeName, &uidString, mimeTypesBuf, localizedNamesBuf);
+	User::LeaveIfError(CallSessionFunction(EAddSoftwareType, swTypeArgs));
+	
+	CleanupStack::PopAndDestroy(localizedNamesBuf);
+	if(!aLocalizedSwTypeNames)
+		{// destroy the localCopyOfSwTypeNames if created locally
+		CleanupStack::PopAndDestroy(const_cast<RPointerArray<CLocalizedSoftwareTypeName>* >(localCopyOfSwTypeNames));
+		}
+	CleanupStack::PopAndDestroy(2, &uidString); // uidString, mimeTypesBuf
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::DeleteSoftwareTypeL(const TDesC& aUniqueSwTypeName, RPointerArray<HBufC>& aDeletedMimeTypes)
+	{
+	DEBUG_PRINTF2(_L("Sending a request to delete the software type (%S)."), &aUniqueSwTypeName);
+	TIpcArgs args(&aUniqueSwTypeName);
+	TInt argNum = 1;
+	GetObjectArrayL(*this, EDeleteSoftwareType, EGetDeletedMimeTypes, argNum, args, aDeletedMimeTypes);
+	// Please note that EDeleteSoftwareType IPC function returns the size of the deleted MIME types list.
+	}
+
+EXPORT_C TBool RSoftwareComponentRegistry::IsComponentOrphanedL(TComponentId aComponentId)
+	{
+	DEBUG_PRINTF2(_L("Sending a request to get whether the component (%d) is orphaned."), aComponentId);
+	TBool result;
+	TPckg<TBool> isComponentOrphaned(result);
+	User::LeaveIfError(CallSessionFunction(EGetIsComponentOrphaned, TIpcArgs(aComponentId, &isComponentOrphaned)));	
+	return result;
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::RetrieveLogEntriesL(RPointerArray<CScrLogEntry>& aLogEntries, const TDesC* aUniqueSwTypeName) const
+	{
+	DEBUG_PRINTF(_L("Sending a request to retrieve log entries."));
+	// Retrieve the RFs and RFile handles from the server
+	TInt fsh;          	 // File server handle (RFs - session)
+	TPckgBuf<TInt> fh;   // File handle (RFile - subsession)
+			
+	fsh = CallSessionFunction(EGetLogFileHandle, TIpcArgs(&fh));   // pointer to fh in slot 0
+	User::LeaveIfError(fsh);
+		
+	// Adopt the file using the returned handles
+	RFile logFile;
+	User::LeaveIfError(logFile.AdoptFromServer(fsh, fh()));
+	CleanupClosePushL(logFile);
+	
+	RFileReadStream logStream(logFile);		 
+	CleanupClosePushL(logStream);
+	(void)logStream.ReadInt32L(); // skip the major version of the log file
+	(void)logStream.ReadInt32L(); // skip the minor version of the log file
+	TInt logCount = logStream.ReadInt32L();
+	
+	CScrLogEntry *log = NULL;
+	
+	for (TInt i = 0; i < logCount; ++i)
+		{
+		log = CScrLogEntry::NewLC(logStream);
+		if(aUniqueSwTypeName && aUniqueSwTypeName->CompareF(log->SoftwareTypeName()))
+			{ // if unique sw type name is given and the log doesn't belong to that sw type, continue.
+			CleanupStack::PopAndDestroy(log);
+			continue;
+			}
+		// Otherwise, append the log into the log entries list
+		aLogEntries.AppendL(log);			
+		CleanupStack::Pop(log); // Ownership is transferred 					
+		} // for
+	
+	CleanupStack::PopAndDestroy(2, &logFile); // logFile, logStream
+	}
+
+TInt GetNextNumberFromVersionL(TLex& aVersion)
+	{
+	TInt number = KErrNotFound;
+	if(aVersion.Eos())
+		return number; // if the end of string has already been reached, return KErrNotFound.
+	
+	TChar c = aVersion.Peek(); // show the next character
+	
+	while(c != 0 && c != '.')
+		{ // Go forward until coming across a dot or reaching the end of the string
+		aVersion.Inc();
+		c = aVersion.Peek();	
+		}
+	
+	if(!aVersion.TokenLength())
+		{// unexpected format
+		DEBUG_PRINTF(_L8("Version token length is unexpectedly zero."));
+		User::Leave(KErrArgument);
+		}
+	
+	// Get the token and convert it to a decimal number
+	TInt err = TLex(aVersion.MarkedToken()).Val(number);
+	if(KErrNone != err)
+		{
+		if(KErrGeneral == err)
+			{ // Convert KErrGeneral (if nun-numeric chars exist in the token) to KErrArgument
+			err = KErrArgument;
+			}
+		User::Leave(err);
+		}
+			
+	if(c != 0)
+		{ // if it is not the end of the string
+		aVersion.Inc(); // Increment to get over the last dot
+		aVersion.Mark(); // and mark the extraction position
+		}
+	return number;
+	}
+
+EXPORT_C TInt RSoftwareComponentRegistry::CompareVersionsL(const TDesC& aVersionLeft, const TDesC& aVersionRight)
+	{
+	DEBUG_PRINTF3(_L("Comparing version left (%S) to version right (%S)."), &aVersionLeft, &aVersionRight);
+	__ASSERT_ALWAYS(aVersionLeft.Length()>0 && aVersionRight.Length()>0, User::Leave(KErrArgument));
+	
+	if(!aVersionLeft.Compare(aVersionRight))
+		return 0; // if the version strings are identical, simply return zero (means equality)
+	
+	TLex lVer(aVersionLeft);
+	TLex rVer(aVersionRight);
+	
+	TInt lNum = GetNextNumberFromVersionL(lVer);
+	TInt rNum = GetNextNumberFromVersionL(rVer);
+	
+	while(lNum != KErrNotFound && rNum != KErrNotFound)
+		{
+		TInt diff = lNum - rNum;
+		if(diff != 0)
+			return diff;
+		
+		lNum = GetNextNumberFromVersionL(lVer);
+		rNum = GetNextNumberFromVersionL(rVer);
+		}
+	
+	TInt lVal (0);
+	TInt rVal (0);
+	
+	// The following two while-loops are used to consider trailing zeros.
+	// Theoritically, 1.2.0 is equal to 1.2, however, 1.2.0.1 is greater than 1.2.
+	// In order to handle these conditions the extra parts of the version are sum up
+	// to see whether it is greater than zero.
+	while(lNum != KErrNotFound)
+		{
+		lVal += lNum;
+		lNum = GetNextNumberFromVersionL(lVer);
+		}
+	
+	while(rNum != KErrNotFound)
+		{
+		rVal += rNum;
+		rNum = GetNextNumberFromVersionL(rVer);
+		}
+	
+	return (lVal - rVal);
+	}
+
+EXPORT_C TBool RSoftwareComponentRegistry::IsComponentOnReadOnlyDriveL(TComponentId aComponentId) const
+	{
+	DEBUG_PRINTF2(_L("Sending a request to determine if the component (%d) is on read-only drive."), aComponentId);
+	
+	TBool result;
+	TPckg<TBool> isOnReadOnlyDrive(result);
+	User::LeaveIfError(CallSessionFunction(EGetIsComponentOnReadOnlyDrive, TIpcArgs(aComponentId, &isOnReadOnlyDrive)));	
+	return result;
+	}
+
+EXPORT_C TBool RSoftwareComponentRegistry::IsComponentPresentL(TComponentId aComponentId) const
+	{
+	DEBUG_PRINTF2(_L("Sending a request to determine if the component(%d) is fully present."), aComponentId);	
+	TBool result;
+	TPckg<TBool> isCompPresent(result);
+	User::LeaveIfError(CallSessionFunction(EGetIsComponentPresent, TIpcArgs(aComponentId, &isCompPresent)));	
+	return result;
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::SetIsComponentPresentL(TComponentId aComponentId, TBool aValue)
+	{
+	DEBUG_PRINTF3(_L("Sending a request to set the CompPresence attribute(%d) of the component(%d)."), aValue, aComponentId);
+	TIpcArgs args(aComponentId, aValue);
+	User::LeaveIfError(CallSessionFunction(ESetIsComponentPresent, args));
+	}
+
+EXPORT_C void RSoftwareComponentRegistry::GetComponentSupportedLocalesListL(TComponentId aComponentId,RArray<TLanguage>& aMatchingSupportedLanguages) const
+	{
+	TIpcArgs args(aComponentId);
+	TInt argNum = 1;
+	GetObjectArrayL(*this, EGetComponentSupportedLocalesListSize, EGetComponentSupportedLocalesListData, argNum, args, aMatchingSupportedLanguages);
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/source/client/scrclientsubsessions.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,155 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implementation for the subsessions of RSoftwareComponentRegistry. 
+* See class and function declarations for more detail.
+*
+*/
+
+
+#include "scr.h"
+#include "scrclient.inl"
+#include "scrcommon.h"
+#include "usiflog.h"
+#include <scs/streamingarray.h>
+
+using namespace Usif;
+
+//
+// RSoftwareComponentRegistryView
+//
+
+TInt RSoftwareComponentRegistryView::SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const
+	{
+	return CallSubsessionFunction(aFunction, aArgs);
+	}
+
+EXPORT_C RSoftwareComponentRegistryView::RSoftwareComponentRegistryView()
+/**
+	This constructor provides a single point of definition from
+	which the superclass constructor is called.
+ */
+	: RScsClientSubsessionBase()
+	{
+	// empty
+	}
+
+EXPORT_C void RSoftwareComponentRegistryView::Close()
+	{
+	RScsClientSubsessionBase::Close();
+	}
+
+EXPORT_C void RSoftwareComponentRegistryView::OpenViewL(const RSoftwareComponentRegistry& aCompReg, CComponentFilter* aFilter)
+	{
+	DEBUG_PRINTF(_L("Creating a subsession to the SCR server for the components view."));
+	
+	TInt err = CreateSubsession(aCompReg, ESubSessCreateComponentsView, TIpcArgs());
+	if(KErrNone != err)
+		{
+		DEBUG_PRINTF2(_L("Failed to create the subsession to the SCR server for the components view (Error:%d)"), err);
+		User::Leave(err);
+		}
+	
+	RBuf8 buf;
+	buf.CleanupClosePushL();
+	ExternalizeObjectL(aFilter, buf);
+	
+	DEBUG_PRINTF(_L("Sending the request to create a component view on the server side."));
+	TIpcArgs args(&buf);
+	User::LeaveIfError(CallSubsessionFunction(EOpenComponentsView, args));
+	CleanupStack::PopAndDestroy(&buf);
+	}
+
+EXPORT_C CComponentEntry* RSoftwareComponentRegistryView::NextComponentL(TLanguage aLocale) const
+	{
+	CComponentEntry* entry = CComponentEntry::NewLC();
+	if(!NextComponentL(*entry, aLocale))
+		{
+		CleanupStack::PopAndDestroy(entry);
+		return NULL;
+		}
+	CleanupStack::Pop(entry);
+	return entry;
+	}
+
+EXPORT_C TBool RSoftwareComponentRegistryView::NextComponentL(CComponentEntry& aEntry, TLanguage aLocale) const
+	{
+	DEBUG_PRINTF(_L("Sending the request to retrieve the next component from the component view."));
+	TIpcArgs args(aLocale);
+	TInt argNum = 1;
+	return GetObjectL(*this, aEntry, EGetNextComponentSize, EGetNextComponentData, argNum, args);
+	}
+
+EXPORT_C void RSoftwareComponentRegistryView::NextComponentSetL(TInt aMaxCount, RPointerArray<CComponentEntry>& aComponentList, TLanguage aLocale) const
+	{
+	DEBUG_PRINTF(_L("Sending the request to retrieve the next set of components from the component view."));
+	TIpcArgs args(aMaxCount, aLocale);
+	TInt argNum = 2;
+	GetObjectArrayL(*this, EGetNextComponentSetSize, EGetNextComponentSetData, argNum, args, aComponentList);
+	}
+
+//
+// RSoftwareComponentRegistryFilesList
+//
+
+TInt RSoftwareComponentRegistryFilesList::SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const
+	{
+	return CallSubsessionFunction(aFunction, aArgs);
+	}
+
+EXPORT_C RSoftwareComponentRegistryFilesList::RSoftwareComponentRegistryFilesList()
+/**
+	This constructor provides a single point of definition from
+	which the superclass constructor is called.
+ */
+	: RScsClientSubsessionBase()
+	{
+	// empty
+	}
+
+EXPORT_C void RSoftwareComponentRegistryFilesList::OpenListL(const RSoftwareComponentRegistry& aCompReg, TComponentId aComponentId)
+	{
+	DEBUG_PRINTF(_L("Creating a subsession to the SCR server for the file list."));
+		
+	TInt err = CreateSubsession(aCompReg, ESubSessCreateFileList, TIpcArgs());
+	if(KErrNone != err)
+		{
+		DEBUG_PRINTF2(_L("Failed to create the subsession to the SCR server for the file list (Error:%d)."), err);
+		User::Leave(err);
+		}
+	
+	DEBUG_PRINTF(_L("Sending a request to create a file list on the server side."));
+	TIpcArgs args(aComponentId);
+	User::LeaveIfError(CallSubsessionFunction(EOpenFileList, args));
+	}
+
+EXPORT_C HBufC* RSoftwareComponentRegistryFilesList::NextFileL() const
+	{
+	TIpcArgs args(TIpcArgs::ENothing);
+	TInt argNum = 0;
+	return GetObjectL<HBufC>(*this, EGetNextFileSize, EGetNextFileData, argNum, args);
+	}
+
+EXPORT_C void RSoftwareComponentRegistryFilesList::NextFileSetL(TInt aMaxCount, RPointerArray<HBufC>& aFileList) const
+	{
+	DEBUG_PRINTF(_L("Sending the request to retrieve the next set of components from the component view."));
+	TIpcArgs args(aMaxCount);
+	TInt argNum = 1;
+	GetObjectArrayL(*this, EGetNextFileSetSize, EGetNextFileSetData, argNum, args, aFileList);
+	}
+
+EXPORT_C void RSoftwareComponentRegistryFilesList::Close()
+	{
+	RScsClientSubsessionBase::Close();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/source/client/screntries.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1219 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implement entry classes for Software Components Registry interface.
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "screntries_internal.h"
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "screntries.h"
+#include "usiflog.h"
+#include <scs/streamingarray.h>
+#include <scs/cleanuputils.h>
+
+using namespace Usif;
+
+		
+///////////////////////
+// CGlobalComponentId
+///////////////////////
+
+CGlobalComponentId::CGlobalComponentId()
+	{
+	// empty
+	}
+
+EXPORT_C CGlobalComponentId::~CGlobalComponentId()
+	{
+	delete iGlobalIdName;
+	delete iSoftwareTypeName;
+	}
+
+EXPORT_C CGlobalComponentId* CGlobalComponentId::NewLC()
+	{
+	CGlobalComponentId *self = new(ELeave) CGlobalComponentId();
+	CleanupStack::PushL(self);
+	return self;
+	}
+
+EXPORT_C CGlobalComponentId* CGlobalComponentId::NewL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName)
+	{
+	CGlobalComponentId *self = CGlobalComponentId::NewLC(aGlobalIdName, aUniqueSwTypeName);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CGlobalComponentId* CGlobalComponentId::NewLC(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName)
+	{
+	CGlobalComponentId *self = CGlobalComponentId::NewLC();
+	self->ConstructL(aGlobalIdName, aUniqueSwTypeName);
+	return self;
+	}
+
+EXPORT_C CGlobalComponentId* CGlobalComponentId::NewL(RReadStream& aStream)
+	{
+	CGlobalComponentId *self = CGlobalComponentId::NewLC();
+	self->InternalizeL(aStream);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CGlobalComponentId::ConstructL(const TDesC& aGlobalIdName, const TDesC& aSoftwareTypeName)
+	{
+	iGlobalIdName = aGlobalIdName.AllocL();
+	iSoftwareTypeName = aSoftwareTypeName.AllocL();
+	}
+
+EXPORT_C void CGlobalComponentId::ExternalizeL(RWriteStream& aStream) const
+	{
+	aStream << *iGlobalIdName;
+	aStream << *iSoftwareTypeName;
+	}
+
+EXPORT_C void CGlobalComponentId::InternalizeL(RReadStream& aStream)
+	{
+	// Read global id name
+	DeleteObjectZ(iGlobalIdName);
+	iGlobalIdName = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	// Read software type name
+	DeleteObjectZ(iSoftwareTypeName);
+	iSoftwareTypeName = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	}
+
+EXPORT_C const TDesC& CGlobalComponentId::GlobalIdName() const
+	{
+	return *iGlobalIdName;
+	}
+
+EXPORT_C const TDesC& CGlobalComponentId::SoftwareTypeName() const
+	{
+	return *iSoftwareTypeName;
+	}
+
+
+////////////////////////
+// CVersionedComponentId
+////////////////////////
+
+CVersionedComponentId::CVersionedComponentId()
+	{
+	// empty
+	}
+
+EXPORT_C CVersionedComponentId::~CVersionedComponentId()
+	{
+	delete iGlobalId;
+	delete iVersionFrom;
+	delete iVersionTo;
+	}
+
+EXPORT_C CVersionedComponentId* CVersionedComponentId::NewLC()
+	{
+	CVersionedComponentId *self = new(ELeave) CVersionedComponentId();
+	CleanupStack::PushL(self);
+	return self;
+	}
+
+EXPORT_C CVersionedComponentId* CVersionedComponentId::NewL(const CGlobalComponentId& aGlobalId, const TDesC* aVersionFrom, const TDesC* aVersionTo)
+	{
+	CVersionedComponentId *self = CVersionedComponentId::NewLC(aGlobalId, aVersionFrom, aVersionTo);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CVersionedComponentId* CVersionedComponentId::NewLC(const CGlobalComponentId& aGlobalId, const TDesC* aVersionFrom, const TDesC* aVersionTo)
+	{
+	CVersionedComponentId *self = CVersionedComponentId::NewLC();
+	self->ConstructL(aGlobalId, aVersionFrom, aVersionTo);
+	return self;
+	}
+
+void CVersionedComponentId::ConstructL(const CGlobalComponentId& aGlobalId, const TDesC* aVersionFrom, const TDesC* aVersionTo)
+	{
+	iGlobalId = CGlobalComponentId::NewL(aGlobalId.GlobalIdName(), aGlobalId.SoftwareTypeName());
+	
+	if(aVersionFrom)
+		iVersionFrom = aVersionFrom->AllocL();
+	else
+		iVersionFrom = KNullDesC().AllocL();
+	
+	if(aVersionTo)
+		iVersionTo = aVersionTo->AllocL();
+	else
+		iVersionTo = KNullDesC().AllocL();
+	}
+
+EXPORT_C CVersionedComponentId* CVersionedComponentId::NewL(RReadStream& aStream)
+	{
+	CVersionedComponentId *self = CVersionedComponentId::NewLC();
+	self->InternalizeL(aStream);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C void CVersionedComponentId::InternalizeL(RReadStream& aStream)
+	{
+	// Read global id 
+	DeleteObjectZ(iGlobalId);
+	iGlobalId = CGlobalComponentId::NewL(aStream);
+	// Read version from
+	DeleteObjectZ(iVersionFrom);
+	iVersionFrom = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	// Read version to
+	DeleteObjectZ(iVersionTo);
+	iVersionTo = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	}
+
+EXPORT_C void CVersionedComponentId::ExternalizeL(RWriteStream& aStream) const
+	{
+	aStream << *iGlobalId;
+	aStream << *iVersionFrom;
+	aStream << *iVersionTo;
+	}
+
+EXPORT_C const CGlobalComponentId& CVersionedComponentId::GlobalId() const
+	{
+	return *iGlobalId;
+	}
+		
+EXPORT_C const TDesC* CVersionedComponentId::VersionFrom() const
+	{
+	if(!iVersionFrom->Length())
+		return NULL;
+	else
+		return iVersionFrom;
+	}
+		
+EXPORT_C const TDesC* CVersionedComponentId::VersionTo() const
+	{
+	if(!iVersionTo->Length())
+		return NULL;
+	else
+		return iVersionTo;
+	}
+
+
+///////////////////////
+// CComponentEntry
+///////////////////////
+
+CComponentEntry::CComponentEntry()
+	{
+	// empty
+	}
+
+EXPORT_C CComponentEntry::~CComponentEntry()
+	{
+	delete iName;
+	delete iVendor;
+	delete iSwType;
+	delete iGlobalId;
+	delete iVersion;
+	delete iInstallTime;
+	}
+
+EXPORT_C CComponentEntry* CComponentEntry::NewL()
+	{
+	CComponentEntry *self = CComponentEntry::NewLC();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CComponentEntry* CComponentEntry::NewLC()
+	{
+	CComponentEntry *self = new(ELeave) CComponentEntry();
+	CleanupStack::PushL(self);
+	return self;
+	}
+
+EXPORT_C CComponentEntry* CComponentEntry::NewL(RReadStream& aStream)
+	{
+	CComponentEntry *self = CComponentEntry::NewLC();
+	self->InternalizeL(aStream);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CComponentEntry* CComponentEntry::NewL(const TComponentId& aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aSwType,
+		  const TDesC& aGlobalId, TBool aRemovable, TInt64 aSize, const TScomoState& aScomoState, const TDriveList& aInstalledDrives, 
+		  const TDesC& aVersion, const TDesC& aInstallTime, TBool aDrmProtected, TBool aHidden, TBool aKnownRevoked, TBool aOriginVerified)
+	{
+	CComponentEntry *self = CComponentEntry::NewLC(aId, aName, aVendor, aSwType, aGlobalId, aRemovable, aSize, aScomoState, aInstalledDrives, 
+												   aVersion, aInstallTime, aDrmProtected, aHidden, aKnownRevoked, aOriginVerified);
+	CleanupStack::Pop(self);
+	return self;
+	}
+		
+EXPORT_C CComponentEntry* CComponentEntry::NewLC(const TComponentId& aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aSwType, 
+			const TDesC& aGlobalId, TBool aRemovable, TInt64 aSize, const TScomoState& aScomoState, const TDriveList& aInstalledDrives, 
+			const TDesC& aVersion, const TDesC& aInstallTime, TBool aDrmProtected, TBool aHidden, TBool aKnownRevoked, TBool aOriginVerified)		
+	{
+	CComponentEntry *self = new(ELeave) CComponentEntry();
+	CleanupStack::PushL(self);
+	self->ConstructL(aId, aName, aVendor, aSwType, aGlobalId, aRemovable, aSize, aScomoState, aInstalledDrives, aVersion, aInstallTime,
+					 aDrmProtected, aHidden, aKnownRevoked, aOriginVerified);
+	return self;
+	}
+
+void CComponentEntry::ConstructL(const TComponentId& aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aSwType, const TDesC& aGlobalId,
+				TBool aRemovable, TInt64 aSize, const TScomoState& aScomoState, const TDriveList& aInstalledDrives, 
+				const TDesC& aVersion, const TDesC& aInstallTime, TBool aDrmProtected, TBool aHidden, TBool aKnownRevoked, TBool aOriginVerified)
+	{
+	iComponentId = aId;
+	iName = aName.AllocL();
+	iVendor = aVendor.AllocL();
+	iSwType = aSwType.AllocL();
+	iGlobalId = aGlobalId.AllocL();
+	iRemovable = aRemovable;
+	iSize = aSize;
+	iScomoState = aScomoState;
+	iInstalledDrives.Copy(aInstalledDrives);
+	iVersion = aVersion.AllocL();
+	iInstallTime = aInstallTime.AllocL();
+	iDrmProtected = aDrmProtected;
+	iHidden = aHidden;
+	iKnownRevoked = aKnownRevoked;
+	iOriginVerified = aOriginVerified;
+	}
+
+void WriteInt64L(RWriteStream& aStream, TInt64 aValue)
+	{
+	aStream.WriteInt32L(I64LOW(aValue));
+	aStream.WriteInt32L(I64HIGH(aValue));
+	}
+
+EXPORT_C void CComponentEntry::ExternalizeL(RWriteStream& aStream) const
+	{
+	aStream << TCardinality(iComponentId); // Write the compressed value by using cardinality class
+	aStream << *iName;
+	aStream << *iVendor;
+	aStream << *iSwType;
+	aStream << *iGlobalId;
+	aStream << TCardinality(iRemovable);
+	WriteInt64L(aStream, iSize);
+	aStream << TCardinality(iScomoState);
+	aStream << iInstalledDrives;
+	aStream << *iVersion;
+	aStream << *iInstallTime;
+	aStream << TCardinality(iDrmProtected);
+	aStream << TCardinality(iHidden);
+	aStream << TCardinality(iKnownRevoked);
+	aStream << TCardinality(iOriginVerified);
+	}
+
+TInt64 ReadInt64L(RReadStream& aStream)
+	{
+	TInt32 low32Bit = aStream.ReadInt32L(); 
+	TInt32 high32Bit = aStream.ReadInt32L();
+	return MAKE_TINT64(high32Bit, low32Bit);
+	}
+
+EXPORT_C void CComponentEntry::InternalizeL(RReadStream& aStream)
+	{
+	TCardinality c;
+	// Read component id
+	aStream >> c;
+	iComponentId = TComponentId(c);
+	// Read component name
+	DeleteObjectZ(iName);
+	iName = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	// Read vendor name
+	DeleteObjectZ(iVendor);
+	iVendor = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	// Read software type
+	DeleteObjectZ(iSwType);
+	iSwType = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	// Read global id
+	DeleteObjectZ(iGlobalId);
+	iGlobalId = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	// Read if it is in removable
+	aStream >> c;
+	iRemovable = c;
+	// Read install-time component size
+	iSize = ReadInt64L(aStream);	
+	// Read scomo state
+	aStream >> c;
+	iScomoState = static_cast<TScomoState>(static_cast<TInt>(c));
+	// Read installed drives
+	aStream >> iInstalledDrives;
+	// Read version
+	DeleteObjectZ(iVersion);
+	iVersion = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	// Read install-time of the component
+	DeleteObjectZ(iInstallTime);
+	iInstallTime = HBufC::NewL(aStream, KMaxTInt); // No restriction on length	
+	// Read if it is DRM protected
+	aStream >> c;
+	iDrmProtected = c;
+	// Read if it is hidden
+	aStream >> c;
+	iHidden = c;
+	// Read if it is known revoked
+	aStream >> c;
+	iKnownRevoked = c;
+	// Read if it is origin verified
+	aStream >> c;
+	iOriginVerified = c;
+	}
+		
+EXPORT_C const TComponentId& CComponentEntry::ComponentId() const
+	{
+	return iComponentId;
+	}
+
+EXPORT_C const TDesC& CComponentEntry::Name() const
+	{
+	return *iName;
+	}
+
+EXPORT_C const TDesC& CComponentEntry::Vendor() const
+	{
+	return *iVendor;
+	}
+
+EXPORT_C const TDesC& CComponentEntry::SoftwareType() const
+	{
+	return *iSwType;
+	}
+
+EXPORT_C const TDesC& CComponentEntry::GlobalId() const
+	{
+	return *iGlobalId;
+	}
+
+EXPORT_C TBool CComponentEntry::IsRemovable() const
+	{
+	return iRemovable;
+	}
+
+EXPORT_C TInt64 CComponentEntry::ComponentSize() const
+	{
+	return iSize;
+	}
+
+EXPORT_C const TScomoState& CComponentEntry::ScomoState() const
+	{
+	return iScomoState;
+	}
+		
+EXPORT_C const TDriveList& CComponentEntry::InstalledDrives() const
+	{
+	return iInstalledDrives;
+	}
+		
+EXPORT_C const TDesC& CComponentEntry::Version() const
+	{
+	return *iVersion;
+	}
+
+EXPORT_C TTime CComponentEntry::InstallTimeL() const
+	{
+	TTime time;
+	User::LeaveIfError(time.Set(*iInstallTime));
+	return time;
+	}
+
+EXPORT_C TBool CComponentEntry::IsDrmProtected() const
+	{
+	return iDrmProtected;
+	}
+
+EXPORT_C TBool CComponentEntry::IsHidden() const
+	{
+	return iHidden;
+	}
+
+EXPORT_C TBool CComponentEntry::IsKnownRevoked() const
+	{ 
+	return iKnownRevoked;
+	}
+
+EXPORT_C TBool CComponentEntry::IsOriginVerified() const
+	{
+	return iOriginVerified;
+	}
+
+///////////////////////
+// CPropertyEntry
+///////////////////////
+
+CPropertyEntry::CPropertyEntry()
+	{
+	// empty
+	}
+
+EXPORT_C CPropertyEntry::~CPropertyEntry()
+	{
+	delete iPropertyName;
+	}
+    
+void CPropertyEntry::ConstructL(const TDesC& aPropertyName)
+	{
+	iPropertyName = aPropertyName.AllocL();
+	}
+
+EXPORT_C const TDesC& CPropertyEntry::PropertyName() const
+	{
+	return *iPropertyName;
+	}
+
+EXPORT_C CPropertyEntry* CPropertyEntry::NewL(RReadStream& aStream)
+	{
+	TCardinality c;
+	aStream >> c;
+	TPropertyType propType = TPropertyType(TInt(c));
+	CPropertyEntry *property(0);
+	switch(propType)
+		{
+	case EBinaryProperty:
+		property = CBinaryPropertyEntry::NewLC();
+		break;
+	case EIntProperty:
+		property = CIntPropertyEntry::NewLC();
+		break;
+	case ELocalizedProperty:
+		property = CLocalizablePropertyEntry::NewLC();
+		break;
+	default:
+		DEBUG_PRINTF2(_L("CPropertyEntry has got an invalid property type = %d"), propType);
+		User::Leave(KErrCorrupt);
+		}
+	property->DoInternalizeL(aStream);
+	property->iPropertyName = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	CleanupStack::Pop(property);
+	return property;
+	}
+
+EXPORT_C void CPropertyEntry::ExternalizeL(RWriteStream& aStream) const
+	{
+	TPropertyType t = this->PropertyType();
+	aStream << TCardinality(t);
+	this->DoExternalizeL(aStream);
+	aStream << *iPropertyName;
+	}
+
+
+///////////////////////
+// CIntPropertyEntry
+///////////////////////
+
+CIntPropertyEntry::CIntPropertyEntry()
+	{
+	// empty
+	}
+
+CIntPropertyEntry::CIntPropertyEntry(TInt64 aPropertyIntValue)
+	:	CPropertyEntry(), iIntValue(aPropertyIntValue)
+	{
+	// empty
+	}
+
+EXPORT_C CIntPropertyEntry::~CIntPropertyEntry()
+	{
+	// empty
+	}
+
+EXPORT_C CIntPropertyEntry* CIntPropertyEntry::NewL(const TDesC& aPropertyName, TInt64 aPropertyValue)
+	{
+	CIntPropertyEntry *self = CIntPropertyEntry::NewLC(aPropertyName, aPropertyValue);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CIntPropertyEntry* CIntPropertyEntry::NewLC(const TDesC& aPropertyName, TInt64 aPropertyValue)
+	{
+	CIntPropertyEntry *self = new (ELeave) CIntPropertyEntry(aPropertyValue);
+	CleanupStack::PushL(self);
+	self->ConstructL(aPropertyName);
+	return self;
+	}
+
+void CIntPropertyEntry::ConstructL(const TDesC& aPropertyName)
+	{
+	CPropertyEntry::ConstructL(aPropertyName);
+	}
+
+CIntPropertyEntry* CIntPropertyEntry::NewLC()
+	{
+	CIntPropertyEntry *self = new(ELeave) CIntPropertyEntry();
+	CleanupStack::PushL(self);
+	return self;
+	}
+		
+void CIntPropertyEntry::DoExternalizeL(RWriteStream& aStream) const
+	{
+	aStream.WriteInt32L(I64LOW(iIntValue));
+	aStream.WriteInt32L(I64HIGH(iIntValue));
+	}
+
+void CIntPropertyEntry::DoInternalizeL(RReadStream& aStream)
+	{
+	TInt32 low32Bit = aStream.ReadInt32L(); 
+	TInt32 high32Bit = aStream.ReadInt32L();
+	iIntValue = MAKE_TINT64(high32Bit, low32Bit);	
+	}
+
+EXPORT_C CPropertyEntry::TPropertyType CIntPropertyEntry::PropertyType() const
+	{
+	return CPropertyEntry::EIntProperty;
+	}
+
+EXPORT_C TInt CIntPropertyEntry::IntValue()
+	{
+	return static_cast<TInt>(iIntValue);
+	}
+
+EXPORT_C TInt64 CIntPropertyEntry::Int64Value()
+	{
+	return iIntValue;
+	}
+
+///////////////////////
+// CBinaryPropertyEntry
+///////////////////////
+
+CBinaryPropertyEntry::CBinaryPropertyEntry()
+	{
+	// empty
+	}
+
+EXPORT_C CBinaryPropertyEntry::~CBinaryPropertyEntry()
+	{
+	delete iValue;
+	}
+	
+EXPORT_C CBinaryPropertyEntry* CBinaryPropertyEntry::NewL(const TDesC& aPropertyName, const TDesC8& aPropertyValue)
+	{
+	CBinaryPropertyEntry *self = CBinaryPropertyEntry::NewLC(aPropertyName, aPropertyValue);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CBinaryPropertyEntry* CBinaryPropertyEntry::NewLC(const TDesC& aPropertyName, const TDesC8& aPropertyValue)
+	{
+	CBinaryPropertyEntry *self = new(ELeave) CBinaryPropertyEntry();
+	CleanupStack::PushL(self);
+	self->ConstructL(aPropertyName, aPropertyValue);
+	return self;
+	}
+
+void CBinaryPropertyEntry::ConstructL(const TDesC& aPropertyName, const TDesC8& aPropertyValue)
+	{
+	CPropertyEntry::ConstructL(aPropertyName);
+	iValue = aPropertyValue.AllocL();
+	}
+
+CBinaryPropertyEntry* CBinaryPropertyEntry::NewLC()
+	{
+	CBinaryPropertyEntry *self = new(ELeave) CBinaryPropertyEntry();
+	CleanupStack::PushL(self);
+	return self;
+	}
+			
+void CBinaryPropertyEntry::DoExternalizeL(RWriteStream &aStream) const	
+	{
+	aStream << *iValue;
+	}
+
+void CBinaryPropertyEntry::DoInternalizeL(RReadStream& aStream)
+	{
+	DeleteObjectZ(iValue);
+	iValue = HBufC8::NewL(aStream, KMaxTInt); // No restriction on length
+	}
+
+EXPORT_C CBinaryPropertyEntry::TPropertyType CBinaryPropertyEntry::PropertyType() const
+	{
+	return CBinaryPropertyEntry::EBinaryProperty;
+	}
+			
+EXPORT_C const TDesC8& CBinaryPropertyEntry::BinaryValue()
+	{
+	return *iValue;
+	}	
+
+///////////////////////
+// CLocalizablePropertyEntry
+///////////////////////
+
+CLocalizablePropertyEntry::CLocalizablePropertyEntry()
+	{
+	// empty
+	}
+
+CLocalizablePropertyEntry::CLocalizablePropertyEntry(TLanguage aLocale) : iLocale(aLocale)
+	{
+	// empty
+	}
+
+EXPORT_C CLocalizablePropertyEntry::~CLocalizablePropertyEntry()
+	{
+	delete iStrValue;
+	}
+
+EXPORT_C CLocalizablePropertyEntry* CLocalizablePropertyEntry::NewL(const TDesC& aPropertyName, const TDesC& aPropertyValue, TLanguage aLocale)
+	{
+	CLocalizablePropertyEntry *self = CLocalizablePropertyEntry::NewLC(aPropertyName, aPropertyValue, aLocale);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CLocalizablePropertyEntry* CLocalizablePropertyEntry::NewLC( const TDesC& aPropertyName, const TDesC& aPropertyValue, TLanguage aLocale)
+	{
+	CLocalizablePropertyEntry *self = new(ELeave) CLocalizablePropertyEntry(aLocale);
+	CleanupStack::PushL(self);
+	self->ConstructL(aPropertyName, aPropertyValue);
+	return self;
+	}
+
+CLocalizablePropertyEntry* CLocalizablePropertyEntry::NewLC()
+	{
+	CLocalizablePropertyEntry *self = new(ELeave) CLocalizablePropertyEntry();
+	CleanupStack::PushL(self);
+	return self;
+	}
+
+void CLocalizablePropertyEntry::ConstructL(const TDesC& aPropertyName, const TDesC& aPropertyValue)
+	{
+	CPropertyEntry::ConstructL(aPropertyName);
+	iStrValue = aPropertyValue.AllocL();
+	}
+
+void CLocalizablePropertyEntry::DoExternalizeL(RWriteStream &aStream) const
+	{
+	aStream << *iStrValue;
+	aStream.WriteInt32L(iLocale);
+	}
+
+void CLocalizablePropertyEntry::DoInternalizeL(RReadStream& aStream)
+	{
+	iStrValue = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	iLocale = TLanguage(aStream.ReadInt32L());
+	}
+
+EXPORT_C CPropertyEntry::TPropertyType CLocalizablePropertyEntry::PropertyType() const
+	{
+	return CPropertyEntry::ELocalizedProperty;
+	}
+
+EXPORT_C TLanguage CLocalizablePropertyEntry::LocaleL() const
+	{
+	return iLocale;
+	}
+
+EXPORT_C const TDesC& CLocalizablePropertyEntry::StrValue() const
+	{
+	return *iStrValue;
+	}
+
+///////////////////////
+// CLocalizableCommonData
+///////////////////////
+
+CLocalizableCommonData::CLocalizableCommonData()
+	{
+	// empty
+	}
+
+CLocalizableCommonData::CLocalizableCommonData(TLanguage aLocale)
+	:	iLocale(aLocale)
+	{
+	// empty
+	}
+
+CLocalizableCommonData::~CLocalizableCommonData()
+	{
+	// empty
+	}
+
+EXPORT_C TLanguage CLocalizableCommonData::Locale() const
+	{
+	return iLocale;
+	}
+
+void CLocalizableCommonData::ExternalizeL(RWriteStream& aStream) const
+	{
+	aStream.WriteInt32L(Locale());
+	}
+
+void CLocalizableCommonData::InternalizeL(RReadStream& aStream)
+	{
+	TLanguage locale = static_cast<TLanguage>(aStream.ReadInt32L());
+	iLocale = locale;
+	}
+
+/////////////////////////////
+// CLocalizableComponentInfo
+/////////////////////////////
+
+CLocalizableComponentInfo::CLocalizableComponentInfo()
+	{
+	// empty
+	}
+
+CLocalizableComponentInfo::CLocalizableComponentInfo(TLanguage aLocale)
+	:	CLocalizableCommonData(aLocale)
+	{
+	// empty
+	}
+
+CLocalizableComponentInfo::~CLocalizableComponentInfo()
+	{
+	delete iName;
+	delete iVendor;
+	}
+
+EXPORT_C CLocalizableComponentInfo* CLocalizableComponentInfo::NewL(const TDesC& aName, const TDesC& aVendor, TLanguage aLocale)
+	{
+	CLocalizableComponentInfo *self = CLocalizableComponentInfo::NewLC(aName, aVendor, aLocale);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CLocalizableComponentInfo* CLocalizableComponentInfo::NewLC(const TDesC& aName, const TDesC& aVendor, TLanguage aLocale)
+	{
+	CLocalizableComponentInfo *self = new(ELeave) CLocalizableComponentInfo(aLocale);
+	CleanupStack::PushL(self);
+	self->ConstructL(aName, aVendor);
+	return self;
+	}
+
+EXPORT_C CLocalizableComponentInfo* CLocalizableComponentInfo::NewL(RReadStream& aStream)
+	{
+	CLocalizableComponentInfo* self = new(ELeave) CLocalizableComponentInfo();
+	CleanupStack::PushL(self);
+	self->InternalizeL(aStream);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C void CLocalizableComponentInfo::ConstructL(const TDesC& aName, const TDesC& aVendor)
+	{
+	iName = aName.AllocL();
+	iVendor = aVendor.AllocL();
+	}
+
+
+EXPORT_C void CLocalizableComponentInfo::ExternalizeL(RWriteStream& aStream) const
+	{
+	CLocalizableCommonData::ExternalizeL(aStream);
+	aStream << *iName;
+	aStream << *iVendor;
+	}
+		
+EXPORT_C void CLocalizableComponentInfo::InternalizeL(RReadStream& aStream)
+	{
+	CLocalizableCommonData::InternalizeL(aStream);
+	
+	delete iName;
+	iName = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	
+	delete iVendor;
+	iVendor = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	}
+
+EXPORT_C const TDesC& CLocalizableComponentInfo::NameL() const
+	{
+	return *iName;
+	}
+
+EXPORT_C const TDesC& CLocalizableComponentInfo::VendorL() const
+	{
+	return *iVendor;
+	}
+			
+
+/////////////////////////////
+// CComponentFilter
+/////////////////////////////
+
+CComponentFilter::CComponentFilter()
+	{
+	// empty 
+	}
+
+CComponentFilter::~CComponentFilter()
+	{
+	delete iName;
+	delete iVendor;
+	delete iSwType;
+	delete iFile;
+	iPropertyList.ResetAndDestroy();
+	}
+
+EXPORT_C CComponentFilter* CComponentFilter::NewL()
+	{
+	CComponentFilter *self = CComponentFilter::NewLC();
+	CleanupStack::Pop(self);
+	return self;
+	}
+		
+EXPORT_C CComponentFilter* CComponentFilter::NewLC()
+	{
+	CComponentFilter *self = new(ELeave) CComponentFilter();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+		
+EXPORT_C CComponentFilter* CComponentFilter::NewL(RReadStream& aStream)
+	{
+	CComponentFilter *self = CComponentFilter::NewLC();
+	self->InternalizeL(aStream);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CComponentFilter::ConstructL()
+	{
+	iName   = KNullDesC().AllocL();
+	iVendor = KNullDesC().AllocL();
+	iSwType = KNullDesC().AllocL();
+	iFile   = KNullDesC().AllocL();
+	}
+
+EXPORT_C void CComponentFilter::SetNameL(const TDesC& aName)
+	{
+	DeleteObjectZ(iName);
+	iName = aName.AllocL();
+	iSetFlag |= EName;
+	}
+		
+EXPORT_C void CComponentFilter::SetVendorL(const TDesC& aVendor)
+	{
+	DeleteObjectZ(iVendor);
+	iVendor = aVendor.AllocL();
+	iSetFlag |= EVendor;
+	}
+
+EXPORT_C void CComponentFilter::SetSoftwareTypeL(const TDesC& aSwType)
+	{
+	DeleteObjectZ(iSwType);
+	iSwType = aSwType.AllocL();
+	iSetFlag |= ESoftwareType;
+	}
+
+EXPORT_C void CComponentFilter::SetRemovable(TBool aValue)
+	{
+	iRemovable = aValue;
+	iSetFlag |= ERemovable;
+	}
+
+EXPORT_C void CComponentFilter::SetDrmProtected(TBool aValue)
+	{
+	iDrmProtected = aValue;
+	iSetFlag |= EDrmProtected;
+	}
+
+EXPORT_C void CComponentFilter::SetHidden(TBool aValue)
+	{
+	iHidden = aValue;
+	iSetFlag |= EHidden;
+	}
+
+EXPORT_C void CComponentFilter::SetKnownRevoked(TBool aValue)
+	{
+	iKnownRevoked = aValue;
+	iSetFlag |= EKnownRevoked;
+	}
+
+EXPORT_C void CComponentFilter::SetOriginVerified(TBool aValue)
+	{
+	iOriginVerified = aValue;
+	iSetFlag |= EOriginVerified;
+	}
+
+EXPORT_C void CComponentFilter::SetScomoStateL(TScomoState aScomoState)
+	{
+	iScomoState = aScomoState;
+	iSetFlag |= EScomoState;
+	}
+		
+EXPORT_C void CComponentFilter::SetInstalledDrivesL(const TDriveList& aDrives)
+	{
+	iInstalledDrives.Copy(aDrives);
+	iSetFlag |= EInstalledDrive;
+	}
+					
+EXPORT_C void CComponentFilter::AddPropertyL(const TDesC& aName, const TDesC& aValue, TLanguage aLocale)
+	{
+	CPropertyEntry *prop = CLocalizablePropertyEntry::NewLC(aName, aValue, aLocale);
+	iPropertyList.AppendL(prop);
+	CleanupStack::Pop(prop);
+	iSetFlag |= EProperty;
+	}
+
+EXPORT_C void CComponentFilter::AddPropertyL(const TDesC& aName, TInt64 aValue)
+	{
+	CPropertyEntry *prop = CIntPropertyEntry::NewLC(aName, aValue);
+	iPropertyList.AppendL(prop);
+	CleanupStack::Pop(prop);
+	iSetFlag |= EProperty;
+	}
+
+EXPORT_C void CComponentFilter::AddPropertyL(const TDesC& aName, const TDesC8& aValue)
+	{
+	CPropertyEntry *prop = CBinaryPropertyEntry::NewLC(aName, aValue);
+	iPropertyList.AppendL(prop);
+	CleanupStack::Pop(prop);
+	iSetFlag |= EProperty;	
+	}
+
+EXPORT_C void CComponentFilter::SetFileL(const TDesC& aFile)
+	{
+	DeleteObjectZ(iFile);
+	iFile = aFile.AllocL();
+	iSetFlag |= EFile;
+	}
+		
+EXPORT_C void CComponentFilter::ExternalizeL(RWriteStream& aStream) const
+	{
+	aStream.WriteUint16L(iSetFlag);
+	aStream << *iName;
+	aStream << *iVendor;
+	aStream << *iSwType;
+	aStream << TCardinality(iScomoState);
+	aStream << iInstalledDrives;
+	aStream << TCardinality(iRemovable);
+	ExternalizePointersArrayL(iPropertyList, aStream);
+	aStream << *iFile;
+	aStream << TCardinality(iDrmProtected);
+	aStream << TCardinality(iHidden);
+	aStream << TCardinality(iKnownRevoked);
+	aStream << TCardinality(iOriginVerified);
+	}
+		
+void CComponentFilter::InternalizeL(RReadStream& aStream)
+	{
+	iSetFlag = aStream.ReadUint16L();
+	DeleteObjectZ(iName);
+	iName = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	DeleteObjectZ(iVendor);
+	iVendor = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	DeleteObjectZ(iSwType);
+	iSwType = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	TCardinality c;
+	aStream >> c;
+	iScomoState = static_cast<TScomoState>(static_cast<TInt>(c));
+	aStream >> iInstalledDrives;
+	aStream >> c;
+	iRemovable = c;
+	iPropertyList.Reset();
+	InternalizePointersArrayL(iPropertyList, aStream);
+	DeleteObjectZ(iFile);
+	iFile = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	// Read if it is DRM protected
+	aStream >> c;
+	iDrmProtected = c;
+	// Read if it is hidden
+	aStream >> c;
+	iHidden = c;
+	// Read if it is known revoked
+	aStream >> c;
+	iKnownRevoked = c;
+	// Read if it is origin verified
+	aStream >> c;
+	iOriginVerified = c;
+	}
+
+/////////////////////////////
+// CLocalizedSoftwareTypeName
+/////////////////////////////
+
+CLocalizedSoftwareTypeName::CLocalizedSoftwareTypeName()
+	{
+	// empty
+	}
+
+CLocalizedSoftwareTypeName::CLocalizedSoftwareTypeName(TLanguage aLocale)
+	:	CLocalizableCommonData(aLocale)
+	{
+	// empty
+	}
+
+CLocalizedSoftwareTypeName::~CLocalizedSoftwareTypeName()
+	{
+	delete iName;
+	}
+
+EXPORT_C CLocalizedSoftwareTypeName* CLocalizedSoftwareTypeName::NewL(const TDesC& aName, TLanguage aLocale)
+	{
+	CLocalizedSoftwareTypeName *self = CLocalizedSoftwareTypeName::NewLC(aName, aLocale);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CLocalizedSoftwareTypeName* CLocalizedSoftwareTypeName::NewLC(const TDesC& aName, TLanguage aLocale)
+	{
+	CLocalizedSoftwareTypeName *self = new(ELeave) CLocalizedSoftwareTypeName(aLocale);
+	CleanupStack::PushL(self);
+	self->ConstructL(aName);
+	return self;
+	}
+
+EXPORT_C CLocalizedSoftwareTypeName* CLocalizedSoftwareTypeName::NewL(RReadStream& aStream)
+	{
+	CLocalizedSoftwareTypeName* self = new(ELeave) CLocalizedSoftwareTypeName();
+	CleanupStack::PushL(self);
+	self->InternalizeL(aStream);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C void CLocalizedSoftwareTypeName::ConstructL(const TDesC& aName)
+	{
+	iName = aName.AllocL();
+	}
+
+
+EXPORT_C void CLocalizedSoftwareTypeName::ExternalizeL(RWriteStream& aStream) const
+	{
+	CLocalizableCommonData::ExternalizeL(aStream);
+	aStream << *iName;
+	}
+		
+EXPORT_C void CLocalizedSoftwareTypeName::InternalizeL(RReadStream& aStream)
+	{
+	CLocalizableCommonData::InternalizeL(aStream);
+	
+	delete iName;
+	iName = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	}
+
+EXPORT_C const TDesC& CLocalizedSoftwareTypeName::NameL() const
+	{
+	return *iName;
+	}
+
+
+////////////////
+// CScrLogEntry
+////////////////
+
+CScrLogEntry::CScrLogEntry()
+	{
+	//empty
+	}
+
+CScrLogEntry::~CScrLogEntry()
+	{
+	delete iComponentName;
+	delete iSwTypeName;
+	delete iVersion;   
+	delete iGlobalId;
+	}
+
+
+EXPORT_C CScrLogEntry* CScrLogEntry::NewL(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType)
+	{
+	CScrLogEntry *self = CScrLogEntry::NewLC(aComponentName, aUniqueSwTypeName, aGlobalId, aVersion, aCompOpType);
+	CleanupStack::Pop(self);
+	return self;
+	}
+		
+EXPORT_C CScrLogEntry* CScrLogEntry::NewLC(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType)
+	{
+	CScrLogEntry *self = new(ELeave) CScrLogEntry();
+	CleanupStack::PushL(self);
+	self->ConstructL(aComponentName, aUniqueSwTypeName, aGlobalId, aVersion, aCompOpType);
+	return self;
+	}
+
+EXPORT_C CScrLogEntry* CScrLogEntry::NewLC(RReadStream& aStream)
+	{
+	CScrLogEntry *self = new(ELeave) CScrLogEntry();
+	CleanupStack::PushL(self);
+	self->InternalizeL(aStream);
+	return self;
+	}
+		
+void CScrLogEntry::ConstructL(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType)
+	{
+	iComponentName = aComponentName.AllocL();
+	iSwTypeName = aUniqueSwTypeName.AllocL();
+	iGlobalId = aGlobalId.AllocL();
+	iVersion = aVersion.AllocL();
+	iOpType = aCompOpType;
+	iRecordTime.HomeTime();
+	}
+		
+	
+EXPORT_C void CScrLogEntry::ExternalizeL(RWriteStream& aStream) const
+	{
+	aStream << *iComponentName;
+	aStream << *iSwTypeName;
+	aStream << *iGlobalId; 
+	aStream << *iVersion; 
+	aStream.WriteInt32L(static_cast<TInt>(iOpType)); 
+	WriteInt64L(aStream, iRecordTime.Int64());
+	}
+		 
+	
+EXPORT_C void CScrLogEntry::InternalizeL(RReadStream& aStream) 
+	{
+	DeleteObjectZ(iComponentName);
+	iComponentName = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	DeleteObjectZ(iSwTypeName);
+	iSwTypeName = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	DeleteObjectZ(iGlobalId);
+	iGlobalId = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	DeleteObjectZ(iVersion);
+	iVersion = HBufC::NewL(aStream, KMaxTInt); // No restriction on length
+	iOpType = static_cast<TScrComponentOperationType>(aStream.ReadInt32L());
+	iRecordTime = TTime(ReadInt64L(aStream));
+	}
+	    
+	  
+EXPORT_C const TDesC& CScrLogEntry::ComponentName() const
+	{
+	return *iComponentName;
+	}
+
+EXPORT_C const TDesC& CScrLogEntry::SoftwareTypeName() const
+	{
+	return *iSwTypeName;
+	}
+
+EXPORT_C const TDesC& CScrLogEntry::GlobalId() const
+	{
+	return *iGlobalId;
+	}
+	
+EXPORT_C const TDesC& CScrLogEntry::ComponentVersion() const
+	{
+	return *iVersion;
+	}
+	
+EXPORT_C const TTime CScrLogEntry::OperationTime() const
+	{
+	return iRecordTime;
+	}
+	
+EXPORT_C TScrComponentOperationType CScrLogEntry::OperationType() const
+	{
+	return iOpType;
+	}
+
+EXPORT_C TComponentId CScrLogEntry::ComponentId() const
+	{
+	return iComponentId;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/source/database/scrdatabase.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,515 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements the SCR Data Layer API which performs all interaction with the underlying database.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+ 
+#include "scrdatabase.h"
+#include "usiflog.h"
+// Userinclude headers are used instead of the standard ones as SCR uses a custom version of SQLite
+#include "sqlite3.h"
+#include "SqliteSecure.h"
+#include <stdio.h> 
+
+using namespace Usif;
+ 
+namespace Usif
+	{
+	 class CDatabaseImplementation : public CBase
+	/**
+	 	The database implementation class encapsulates the implementation of CDatabase from its interface.
+	 */
+		{
+		friend class CDatabase;
+	public:
+		static CDatabaseImplementation* NewL(RFile& aDatabaseFile, RFile& aJournalFile);
+		~CDatabaseImplementation();	
+		/**
+			Maps the given SQL database error into a system wide symbian specific error code.
+			@leave If the given error code does not map to KErrNone, leaves with a system wide
+			       symbian error code.
+		 */
+		void CheckSqlErrCodeL(TInt aErr);
+		
+		/**
+			@return The extended error codes that provide more detailed information about errors.
+		 */
+		TInt ErrorCode();
+				
+	private:
+		/**
+			@return The English-language text that describes the most recent error.
+		 */
+		TPtrC8 ErrorMessage();
+		
+	private:
+		CDatabaseImplementation();
+		void ConstructorL(RFile& aDatabaseFile, RFile& aJournalFile);
+		
+	private:
+		sqlite3* iDbHandle;		 ///< The database handle, owned by CDatabaseImplementation.		
+		};
+		
+	 
+	class CStatementImplementation : public CBase
+	/**
+		This class encapsulates the implementation details of SQL statement object
+		which contains the result sets of queries.
+	 */
+		{
+	public:
+		static CStatementImplementation* NewLC(sqlite3_stmt* aStmtHandle);
+		~CStatementImplementation();
+		inline sqlite3_stmt* Handle() const;
+		
+	private:
+		CStatementImplementation(sqlite3_stmt* aStmtHandle);
+		
+	private:
+		sqlite3_stmt* iStmtHandle; //SQL statement handle
+		};	
+	
+	}// End of namespace Usif
+
+//
+// CDatabaseImplementation
+// 
+
+CDatabaseImplementation::CDatabaseImplementation()
+// Constructor
+	{
+	// empty
+	}
+
+CDatabaseImplementation::~CDatabaseImplementation()
+// Destructor
+	{
+	// Close the db handle
+	TInt err = sqlite3_close(iDbHandle);
+	if(err != SQLITE_OK)
+		{
+		TPtrC8 ptrErrMsg(ErrorMessage());
+		DEBUG_PRINTF3(_L8("Failed to close the database handle. Error code:%d, Error message:%S"), ErrorCode(), &ptrErrMsg);
+		}
+	}
+
+CDatabaseImplementation* CDatabaseImplementation::NewL(RFile& aDatabaseFile, RFile& aJournalFile)
+	{
+	CDatabaseImplementation* self = new(ELeave) CDatabaseImplementation();
+	CleanupStack::PushL(self);
+	self->ConstructorL(aDatabaseFile, aJournalFile);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CDatabaseImplementation::ConstructorL(RFile& aDatabaseFile, RFile& aJournalFile)
+	{
+	TSqliteSecure sqliteSecure; // Utility class to open sqlite database via file handles. Implemented by Symbian.
+	TInt err = sqliteSecure.Open(aDatabaseFile, aJournalFile, &iDbHandle);
+	
+	// Check the returned error code
+	CheckSqlErrCodeL(err);
+	
+	// If comes here, means the database file has been opened successfully
+	// Now, enable the extended result codes feature of SQLite. In SQLite, this feature is 
+	// disabled by default for historical compatibility.
+	err = sqlite3_extended_result_codes(iDbHandle, 0);
+	if(SQLITE_OK != err)
+		{
+		TPtrC8 ptrErrMsg(ErrorMessage());
+		DEBUG_PRINTF3(_L8("Failed to activate the extended error mechanism. Error code:%d, Error message:%S"), ErrorCode(), &ptrErrMsg);
+		}
+	}
+
+TPtrC8 CDatabaseImplementation::ErrorMessage()
+	{
+	const char *errMsg = sqlite3_errmsg(iDbHandle);
+	TPtrC8 errPtr((TUint8*)errMsg);
+	return errPtr;
+	}
+
+TInt CDatabaseImplementation::ErrorCode()
+	{
+	return sqlite3_errcode(iDbHandle);
+	}
+
+
+void CDatabaseImplementation::CheckSqlErrCodeL(TInt aErr)
+	{
+	TInt symbianErrCode(0);
+	
+	switch(aErr)
+		{
+	case SQLITE_OK:
+	case SQLITE_DONE:		// sqlite3_step() has finished executing
+	case SQLITE_ROW:		// sqlite3_step() has another row ready
+		symbianErrCode = KErrNone;
+		break;
+	case SQLITE_NOTADB:     // File opened that is not a database file
+	case SQLITE_NOTFOUND:	// Table or record not found
+	case SQLITE_EMPTY:      // Database is empty
+	case SQLITE_CANTOPEN:   // Unable to open the database file 
+		symbianErrCode = KErrNotFound;
+		break;
+	case SQLITE_CORRUPT:	// The database disk image is malformed 
+	case SQLITE_SCHEMA: 	// The database schema has changed
+	case SQLITE_FORMAT:     // Auxiliary database format error 
+		symbianErrCode = KErrCorrupt;
+		break;
+	case SQLITE_NOMEM:		// A malloc() failed in sqlite engine
+	case SQLITE_IOERR:      // Some kind of disk I/O error occurred
+	case SQLITE_FULL:       // there is no space left on the disk, or the database is too big to hold any more information
+		symbianErrCode = KErrNoMemory;
+		break;
+	case SQLITE_BUSY:		// The database file is locked
+	case SQLITE_LOCKED:     // A table in the database is locked
+		symbianErrCode = KErrInUse;
+		break;
+	case SQLITE_TOOBIG:		// Too much data for one row of a table 
+		symbianErrCode = KErrOverflow;
+		break;
+	case SQLITE_INTERRUPT:	// Operation terminated by sqlite_interrupt()
+		symbianErrCode = KErrCancel;
+		break;
+	case SQLITE_MISUSE: 	// The library has been used incorrectly
+		symbianErrCode = KErrNotSupported;
+		break;
+	case SQLITE_CONSTRAINT: // Abort due to constraint violation 
+		symbianErrCode = KErrAlreadyExists;
+		break;
+	case SQLITE_ERROR: 		// SQL error or missing database
+	case SQLITE_MISMATCH :  // Data type mismatch
+	case SQLITE_RANGE: 		// 2nd parameter to sqlite3_bind out of range
+		symbianErrCode = KErrArgument;
+		break;
+	case SQLITE_INTERNAL:   // An internal logic error in SQLite
+		symbianErrCode = KErrUnknown;
+		break;
+	case SQLITE_PERM:      // Access permission denied
+		symbianErrCode = KErrAccessDenied;
+		break;
+	default:
+		symbianErrCode = aErr < 0 ? aErr : KErrGeneral; // The porting layer may return Symbian error codes, which are negative
+		}// End of switch
+	
+	if(KErrNone != symbianErrCode)
+		{
+		if (aErr > 0) // If the error is negative, it does not come from SQLite
+			{
+			TPtrC8 ptrErrMsg(ErrorMessage());
+			DEBUG_PRINTF3(_L8("The SQL engine error code:%d, The SQL engine error message:%S"), ErrorCode(), &ptrErrMsg);
+			}
+		// Some functions returns standard error codes.
+		// Here ErrorCode is called to get the extended error code, if exists.
+
+		User::Leave(symbianErrCode);
+		}
+	}
+
+
+//
+// CStatementImplementation
+// 
+
+CStatementImplementation::CStatementImplementation(sqlite3_stmt* aStmtHandle)
+// Constructor
+	:iStmtHandle(aStmtHandle)
+	{
+	// Make sure that the statement handle is never NULL.
+	ASSERT(iStmtHandle != NULL);
+	}
+
+CStatementImplementation::~CStatementImplementation()
+// Destructor
+	{
+	TInt err = sqlite3_finalize(iStmtHandle);
+	if(SQLITE_OK != err)
+		{
+		DEBUG_PRINTF2(_L8("Failed to finalize the statement object. Error code:%d"), err);
+		}
+	}
+
+CStatementImplementation* CStatementImplementation::NewLC(sqlite3_stmt* aStmtHandle)
+	{
+	CStatementImplementation* self = new(ELeave) CStatementImplementation(aStmtHandle);
+	CleanupStack::PushL(self);
+	return self;
+	}
+
+inline sqlite3_stmt* CStatementImplementation::Handle() const
+	{
+	return iStmtHandle;
+	}
+
+//
+// CDatabase
+// 
+
+CDatabase::CDatabase()
+// Constructor
+	{
+	// Empty
+	}
+
+EXPORT_C CDatabase::~CDatabase()
+// Destructor
+	{
+	delete iDbImpl;
+	}
+
+EXPORT_C CDatabase* CDatabase::NewL(RFile& aDatabaseFile, RFile& aJournalFile)
+	{
+	CDatabase *self = CDatabase::NewLC(aDatabaseFile, aJournalFile);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CDatabase* CDatabase::NewLC(RFile& aDatabaseFile, RFile& aJournalFile)
+	{
+	CDatabase *self = new(ELeave) CDatabase();
+	CleanupStack::PushL(self);
+	self->ConstructL(aDatabaseFile, aJournalFile);
+	return self;
+	}
+
+void CDatabase::ConstructL(RFile& aDatabaseFile, RFile& aJournalFile)
+	{
+	iDbImpl = CDatabaseImplementation::NewL(aDatabaseFile, aJournalFile);
+	}
+
+EXPORT_C CStatement* CDatabase::PrepareStatementLC(const TDesC& aStatementStr)
+	{
+	// For statements which start with the SELECT key word, this function creates an sql statement  
+	// object and returns it.	
+	sqlite3_stmt* stmtHandle(0); // Temporary statement handle
+	const void* stmtTail(0);	 // Pointer to unused portion of Sql statement.                         
+	TInt err = sqlite3_prepare16_v2(iDbImpl->iDbHandle, aStatementStr.Ptr(), aStatementStr.Size(), &stmtHandle, &stmtTail);
+	
+	// Check the returned error code
+	iDbImpl->CheckSqlErrCodeL(err);
+	// Since we expect single statement, stmtTail pointer should be NULL or point to zero.
+	if(stmtTail && static_cast <const TUint16*> (stmtTail)[0] != 0)
+		{
+		err = sqlite3_finalize(stmtHandle);
+		iDbImpl->CheckSqlErrCodeL(err);
+		DEBUG_PRINTF(_L8("There is a problem with the provided SQL statement. It may contain more "
+						 "than one statement. Or It may not be terminated with semicolon. "
+						 "Or It may contain a space or invalid char after semicolon."));
+		User::Leave(KErrArgument);
+		}
+	// stmtHandle can be NULL for statements like this: ";"
+	if(!stmtHandle)
+		{
+		DEBUG_PRINTF(_L8("The statement handle is NULL."));
+		User::Leave(KErrArgument);
+		}
+	// The statement object which carries handle to the result set of the sql statement
+	CStatementImplementation* stmtImpl = CStatementImplementation::NewLC(stmtHandle);
+	CStatement* stmtObj = CStatement::NewL(*this, stmtImpl); 
+	CleanupStack::Pop(stmtImpl); // Ownership has been passed to CStatement
+	CleanupStack::PushL(stmtObj);
+
+	return stmtObj;	
+	}
+
+EXPORT_C TInt CDatabase::LastInsertedIdL()
+	{
+	TInt retVal = (TInt)sqlite3_last_insert_rowid(iDbImpl->iDbHandle); 
+	// it is now expected that row ids in scr will require 64-bit storage, so cast the return value to TInt
+	if(retVal <= 0)
+		{
+		User::Leave(KErrNotFound);
+		}
+	return retVal;
+	}
+
+//
+// CStatement
+//
+
+CStatement::CStatement(const CDatabase& aDb, CStatementImplementation* aStmtImpl)
+// Constructor
+	:iDb(aDb), iStmtImpl(aStmtImpl)
+	{
+	// Empty
+	}
+
+EXPORT_C CStatement::~CStatement()
+// Destructor
+	{
+	delete iStmtImpl;
+	}
+
+EXPORT_C CStatement* CStatement::NewL(const CDatabase& aDb, CStatementImplementation* aStmtImpl)
+	{
+	CStatement* self = new(ELeave) CStatement(aDb, aStmtImpl);
+	return self;
+	}
+
+EXPORT_C TBool CStatement::ProcessNextRowL()
+	{
+	TInt err = sqlite3_step(iStmtImpl->Handle());
+	
+	switch(err)
+		{
+	case SQLITE_ROW: // A new row of data is ready for processing.
+		return ETrue;
+	
+	case SQLITE_DONE: // The statement has finished executing successfully.
+		return EFalse;
+	default:		 
+		iDb.iDbImpl->CheckSqlErrCodeL(err);
+		}// End of switch
+	return EFalse;
+	}
+
+EXPORT_C void CStatement::ExecuteStatementL()
+	{
+	// If the statement doesn't return any result table, it should normally be executed
+	// with sqlite3_exec. However, sqlite does not have a 16-bit version of sqlite3_exec.  
+	// Therefore, the execution is made with PrepareStatementLC and ProcessNextRowL functions.
+	// Now, execute and check if the function has completed successfully by calling ProcessNextRowL.
+	// If the function has failed, ProcessNextRowL will leave with one of the system wide error codes.
+	while(ProcessNextRowL())
+		{
+		// nop
+		}
+	}
+
+EXPORT_C void CStatement::BindIntL(TInt aParameterIndex, TInt aParameterValue)
+	{
+	TInt err = sqlite3_bind_int(iStmtImpl->Handle(), aParameterIndex, aParameterValue);
+	iDb.iDbImpl->CheckSqlErrCodeL(err);
+	}
+
+EXPORT_C void CStatement::BindInt64L(TInt aParameterIndex, TInt64 aParameterValue)
+	{
+	TInt err = sqlite3_bind_int64(iStmtImpl->Handle(), aParameterIndex, aParameterValue);
+	iDb.iDbImpl->CheckSqlErrCodeL(err);
+	}
+
+template <class A> void VerifyDescriptorLengthL(const A& aDesc)
+	{
+	const TInt KMaxInputDescriptorLength = 512;	
+	if (aDesc.Length() > KMaxInputDescriptorLength)
+		User::Leave(KErrArgument);	
+	}
+	
+EXPORT_C void CStatement::BindStrL(TInt aParameterIndex, const TDesC &aParameterStr)
+	{
+	VerifyDescriptorLengthL(aParameterStr);	
+	TInt err = sqlite3_bind_text16(iStmtImpl->Handle(), aParameterIndex, aParameterStr.Ptr(), aParameterStr.Size(), SQLITE_TRANSIENT);
+	// The fifth argument has the value SQLITE_TRANSIENT, it means that SQLite makes its own private copy of the data immediately
+	iDb.iDbImpl->CheckSqlErrCodeL(err);
+	}
+
+EXPORT_C void CStatement::BindBinaryL(TInt aParameterIndex, const TDesC8 &aParameterStr)
+	{
+	VerifyDescriptorLengthL(aParameterStr);
+	TInt err = sqlite3_bind_blob(iStmtImpl->Handle(), aParameterIndex, reinterpret_cast<const char *>(aParameterStr.Ptr()), aParameterStr.Size(), SQLITE_TRANSIENT);
+	iDb.iDbImpl->CheckSqlErrCodeL(err);	
+	}
+
+EXPORT_C TPtrC8 CStatement::BinaryColumnL(TInt aColIdx) const
+	{
+	TInt colType = SQLITE_BLOB;
+	ValidateRequestedColumnL(aColIdx, colType);
+	
+	const TUint8* data = static_cast<const TUint8 *>(sqlite3_column_blob(iStmtImpl->Handle(), aColIdx));
+	if(!data)
+		iDb.iDbImpl->CheckSqlErrCodeL(iDb.iDbImpl->ErrorCode());
+
+	TInt len = sqlite3_column_bytes(iStmtImpl->Handle(), aColIdx);
+	if(!len)
+		iDb.iDbImpl->CheckSqlErrCodeL(iDb.iDbImpl->ErrorCode());
+
+	return TPtrC8(data, len);
+	}
+
+EXPORT_C TPtrC CStatement::StrColumnL(TInt aColIdx)	const
+	{
+	TInt colType = SQLITE_TEXT;
+	ValidateRequestedColumnL(aColIdx, colType);
+	
+	// Get the column data from the database
+	TUint16* str = (TUint16*)sqlite3_column_text16(iStmtImpl->Handle(), aColIdx);
+	if(!str)
+		{
+		iDb.iDbImpl->CheckSqlErrCodeL(iDb.iDbImpl->ErrorCode());
+		}
+	// Get the length of the column data
+	TInt len = sqlite3_column_bytes16(iStmtImpl->Handle(), aColIdx);
+	if(!len)
+		{
+		iDb.iDbImpl->CheckSqlErrCodeL(iDb.iDbImpl->ErrorCode());
+		}
+	// Return the value in a pointer descriptor
+	// len contains the number of bytes, so divide it by 2 to get the number of chars
+	ASSERT(len%2 == 0);
+	return TPtrC(str, len/2); 
+	}
+
+EXPORT_C TInt64 CStatement::Int64ColumnL(TInt aColIdx) const
+	{
+	TInt colType = SQLITE_INTEGER;
+	ValidateRequestedColumnL(aColIdx, colType);
+	return sqlite3_column_int64(iStmtImpl->Handle(), aColIdx);
+	}
+
+EXPORT_C TInt CStatement::IntColumnL(TInt aColIdx) const
+	{
+	TInt colType = SQLITE_INTEGER;
+	ValidateRequestedColumnL(aColIdx, colType);
+	return sqlite3_column_int(iStmtImpl->Handle(), aColIdx);
+	}
+ 
+void CStatement::ValidateRequestedColumnL(TInt aColIdx, TInt& aColumnType) const
+// Validate the type and existence of the requested column.
+	{
+	// Get the number of columns in the result set
+	TInt colNum = sqlite3_column_count(iStmtImpl->Handle());
+	// Get the type of the column
+	TInt colType = sqlite3_column_type(iStmtImpl->Handle(), aColIdx);
+	
+	if((aColIdx < 0 || aColIdx > colNum-1) ||	// if the column index is invalid
+	   (aColumnType != colType && aColumnType != SQLITE_NULL)) // if its type doesn't match with the expected one 
+		{// just column range validity is checked in case of SQLITE_NULL.
+		DEBUG_PRINTF5(_L("The provided column (Idx=%d, Type=%d) is not valid. Max Column Number=%d. Retrieved Column Type=%d"), aColIdx, aColumnType, colNum, colType);
+		User::Leave(KErrArgument);
+		}
+	aColumnType = colType;
+	}
+
+EXPORT_C void CStatement::ResetL()
+	{
+	TInt err = sqlite3_reset(iStmtImpl->Handle());
+	iDb.iDbImpl->CheckSqlErrCodeL(err);
+	err = sqlite3_clear_bindings(iStmtImpl->Handle());
+	iDb.iDbImpl->CheckSqlErrCodeL(err);
+	}
+
+EXPORT_C TBool CStatement::IsFieldNullL(TInt aColIdx) const
+	{
+	TInt colType = SQLITE_NULL;
+	ValidateRequestedColumnL(aColIdx, colType);
+	return (SQLITE_NULL == colType) ? ETrue : EFalse;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/source/server/scrrequestimpl.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,3232 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the class which implements SCR's service requests.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#include "scrrequestimpl.h"
+#include "scrdatabase.h"
+#include "screntries.h"
+#include "scrserver.h"
+#include "scrcommon.h"
+#include "scrsubsession.h"
+#include "usiflog.h"
+#include "usiferror.h"
+#include <s32mem.h>
+#include <bautils.h>
+#include <scs/streamingarray.h>
+#include <scs/ipcstream.h>
+#include <scs/ipcstream.inl>
+#include <scs/cleanuputils.h>
+#include <e32hashtab.h>
+#include <usif/sts/sts.h>
+
+using namespace Usif;
+
+_LIT(KComponentIdColumnName, "ComponentId"); 
+_LIT(KCompFileIdColumnName, "CmpFileId"); 
+_LIT(KComponentPropertiesTable, "ComponentProperties");
+_LIT(KFilePropertiesTable, "FileProperties");
+
+/** Maximum number of log records could be recorded by SCR. */
+// It is estimated that a thousand log entries create 40K-100K log file.
+const TInt KMaxScrLogEntries = 1000;
+/** The file path of SCR log file. */
+_LIT(KScrLogFileName, "!:\\private\\10285bc0\\scr.log");
+/** The file path of SCR temporary log file. */
+_LIT(KScrTempLogFileName, "!:\\private\\10285bc0\\scr_tmp.log");
+	
+const TUint KDbInterfaceMajorVersion = 1;
+const TUint KDbInterfaceMinorVersion = 1;
+#ifdef _DEBUG
+const TUint KDbInterfaceBuildNumber = 1;
+#endif
+
+enum TScrPanicId
+	{
+	KScrIllegalCallSequence = 1,
+	KScrIllegalParameter = 2
+	};
+
+static void PanicClient(const RMessagePtr2& aMessage, TScrPanicId aPanic)
+	{
+	_LIT(KPanicMessage, "ScrServer");
+    aMessage.Panic(KPanicMessage, aPanic);
+    }
+
+HBufC* UpdateFilePathDriveLC(const TDesC& aFilePath, TChar aDrive)
+	{
+	HBufC *fileName = HBufC::NewLC(aFilePath.Length());
+	TPtr ptrFileName(fileName->Des());
+	ptrFileName.Copy(aFilePath);
+	ptrFileName[0] = aDrive;
+	return fileName; 
+	}	
+	
+////////////////////////
+// CScrRequestImpl
+////////////////////////
+
+CScrRequestImpl::CScrRequestImpl(RFs& aFs)
+	: iFs(aFs)
+	{
+	}
+
+CScrRequestImpl::~CScrRequestImpl()
+	{
+	delete iDbHandle;
+	delete iComponentEntry;
+	iProperties.ResetAndDestroy();
+	delete iSingleProperty;
+	iFileComponents.Close();
+	iVerCompIdList.ResetAndDestroy();
+	iDeletedMimeTypes.ResetAndDestroy();
+	iLogEntries.ResetAndDestroy();
+	iMatchingSupportedLanguageList.Close();
+	}
+
+CScrRequestImpl* CScrRequestImpl::CScrRequestImpl::NewL(RFs& aFs, RFile& aDatabaseFile, RFile& aJournalFile)
+	{
+	CScrRequestImpl *self = new(ELeave) CScrRequestImpl(aFs);
+	CleanupStack::PushL(self);
+	self->ConstructL(aDatabaseFile, aJournalFile);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CScrRequestImpl::ConstructL(RFile& aDatabaseFile, RFile& aJournalFile)
+	{
+	iDbHandle = CDatabase::NewL(aDatabaseFile, aJournalFile);
+	InitializeDbVersionL();
+	VerifyDbVersionCompatibilityL();
+	// Make sure that private directory exists - required for temporary and log files
+	_LIT(KPrivateDirPath, "!:\\private\\10285bc0\\");
+	HBufC* privateDirPath = UpdateFilePathDriveLC(KPrivateDirPath, iFs.GetSystemDriveChar());
+	TInt res = iFs.MkDirAll(*privateDirPath);
+	__ASSERT_ALWAYS(res == KErrNone || res == KErrAlreadyExists, User::Leave(res));
+	CleanupStack::PopAndDestroy(privateDirPath);
+	}
+
+HBufC* CScrRequestImpl::ReadDescLC(const RMessage2& aMessage, TInt aSlot)
+	{
+	TInt len = aMessage.GetDesLengthL(aSlot);
+	HBufC* desc = HBufC::NewLC(len);
+	TPtr ptrDesc(desc->Des());
+	aMessage.ReadL(aSlot, ptrDesc);
+	return desc;
+	}
+
+HBufC8* CScrRequestImpl::ReadDesc8LC(const RMessage2& aMessage, TInt aSlot)
+	{
+	TInt len = aMessage.GetDesLengthL(aSlot);
+	HBufC8* desc = HBufC8::NewLC(len);
+	TPtr8 ptrDesc(desc->Des());
+	aMessage.ReadL(aSlot, ptrDesc);
+	return desc;
+	}
+
+HBufC* CScrRequestImpl::FormatStatementLC(const TDesC& aStatement, TInt aFormattedLength,...) const
+	{
+	VA_LIST list;
+	VA_START(list, aFormattedLength);
+	HBufC* statementStr = HBufC::NewLC(aStatement.Length() + aFormattedLength + 1);
+	TPtr statementStrPtr(statementStr->Des()); 
+	statementStrPtr.FormatList(aStatement, list);
+	VA_END(list);
+	
+	// SQLite requires the statement string to end with NULL char.
+	statementStrPtr.Append('\0');
+	return statementStr;
+	}
+
+void CScrRequestImpl::CreateTransactionL()
+	{
+	DEBUG_PRINTF(_L8("Create Transaction request received."));
+	_LIT(KBeginTransaction, "BEGIN IMMEDIATE;");
+	ExecuteStatementL(KBeginTransaction());	
+	DEBUG_PRINTF(_L8("Transaction has begun!"));
+	}
+
+void CScrRequestImpl::RollbackTransactionL()
+	{
+	DEBUG_PRINTF(_L8("Rollback Transaction request received."));
+	_LIT(KRollbackTransaction, "ROLLBACK;");
+	ExecuteStatementL(KRollbackTransaction());
+	DEBUG_PRINTF(_L8("Transaction has been rolled back successfuly!"));
+	}
+
+void CScrRequestImpl::CommitTransactionL()
+	{
+	DEBUG_PRINTF(_L8("Commit Transaction request received."));
+	_LIT(KCommitTransaction, "COMMIT;");
+	ExecuteStatementL(KCommitTransaction());
+	DEBUG_PRINTF(_L8("Transaction has been committed successfully!"));
+	}
+
+HBufC* CScrRequestImpl::GenerateGlobalIdL(const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId) const
+	{ 
+	HBufC *globalIdBuf = HBufC::NewL(aUniqueSwTypeName.Length() + aGlobalId.Length() + 1); // 1 is extra memory to put NULL char
+	TPtr globalIdDes(globalIdBuf->Des());
+	
+	globalIdDes.Copy(aUniqueSwTypeName);
+	globalIdDes.Append('\0');
+	globalIdDes.Append(aGlobalId);
+	
+	return globalIdBuf;
+	}
+
+TComponentId CScrRequestImpl::CommonAddComponentL(const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId)
+	{
+	DEBUG_PRINTF(_L8("Adding a base component."));
+	// Get the current time
+	TTime time;
+	time.HomeTime();
+	TDateTime datetime = time.DateTime();
+	TBuf<16> installTime;
+	// We cannot use TTime::FormatL, since it starts months and days with 01, which is not accepted by TTime::Set() which starts them from 0
+	installTime.Format(_L("%04d%02d%02d:%02d%02d%02d"), datetime.Year(), datetime.Month(), datetime.Day(), datetime.Hour(), datetime.Minute(), datetime.Second());
+	
+	// SoftwareTypeId is the hash of unique software type name. For more information, see CScrRequestImpl::AddSoftwareTypeL.
+	// In Components table, both SoftwareTypeId and unique SoftwareTypeName is stored so that the software type name of a component
+	// can be returned even if the corresponding installer (software type) has been uninstalled. The unique sofware type name
+	// might be used by the client to identify the installer required to uninstall the component.
+	TUint32 swTypeId = HashCaseSensitiveL(aUniqueSwTypeName);
+	
+	if(aGlobalId.CompareF(KNullDesC()))
+		{ // Global Id is supplied by client
+		HBufC *globalId = GenerateGlobalIdL(aUniqueSwTypeName, aGlobalId);
+		CleanupStack::PushL(globalId);
+		TUint32 globalIdHash = HashCaseSensitiveL(*globalId);
+		
+		_LIT(KInsertComponent,"INSERT INTO Components(SoftwareTypeId,SoftwareTypeName,GlobalIdHash,GlobalId,InstallTime) VALUES(?,?,?,?,?);");
+		TInt numberOfValues = 5;
+		ExecuteStatementL(KInsertComponent(), numberOfValues, EValueInteger, swTypeId, EValueString, &aUniqueSwTypeName, EValueInteger, globalIdHash, EValueString, globalId, EValueString, &installTime);
+		CleanupStack::PopAndDestroy(globalId);
+		}
+	else
+		{// Global Id is NOT supplied by client
+		_LIT(KInsertComponent,"INSERT INTO Components(SoftwareTypeId,SoftwareTypeName,InstallTime) VALUES(?,?,?);");
+		TInt numberOfValues = 3;
+		ExecuteStatementL(KInsertComponent(), numberOfValues, EValueInteger, swTypeId, EValueString, &aUniqueSwTypeName, EValueString, &installTime);
+		}
+	
+	DEBUG_PRINTF(_L8("The new component has been added to Components table successfully."));
+	return iDbHandle->LastInsertedIdL();
+	}
+
+void CScrRequestImpl::AddComponentLocalizablesL(TComponentId aCompId, TLanguage aLocale, const TDesC& aName, const TDesC& aVendor)
+	{
+	DEBUG_PRINTF4(_L("Adding the component(%d) localizables: name(%S) and vendor(%S)."), aCompId, &aName, &aVendor);
+	
+	if(!aName.CompareF(KNullDesC()))
+		{// Component name cannot be empty
+		DEBUG_PRINTF(_L8("Component name cannot be NULL string."));
+		User::Leave(KErrArgument);
+		}
+	
+	_LIT(KInsertComponentLocalizables, "INSERT INTO ComponentLocalizables(ComponentId,Locale,Name,Vendor) VALUES(?,?,?,?);");
+	TInt numberOfValues = 4;
+	ExecuteStatementL(KInsertComponentLocalizables(), numberOfValues, EValueInteger, aCompId, EValueInteger, aLocale, EValueString, &aName, EValueString, &aVendor);
+	
+	DEBUG_PRINTF(_L8("The component localizables have been added successfully."));
+	}
+
+void CScrRequestImpl::ComponentRollback(TAny* aParam)
+	{
+	TRollbackParams *param = static_cast<TRollbackParams*>(aParam);
+	_LIT(KDeleteComponents, "DELETE FROM Components WHERE ComponentId=?;");
+	TInt numberOfValues = 1;
+	TRAP_IGNORE(param->iReqImplHandle.ExecuteStatementL(KDeleteComponents, numberOfValues, EValueInteger, param->iIdColumnVal););
+	}
+	
+void CScrRequestImpl::ComponentLocalizablesRollback(TAny* aParam)
+	{
+	TRollbackParams *param = static_cast<TRollbackParams*>(aParam);
+	_LIT(KDeleteComponentLocalizables, "DELETE FROM ComponentLocalizables WHERE ComponentId=?;");
+	TInt numberOfValues = 1;
+	TRAP_IGNORE(param->iReqImplHandle.ExecuteStatementL(KDeleteComponentLocalizables, numberOfValues, EValueInteger, param->iIdColumnVal););
+	}
+
+void CScrRequestImpl::AddComponentL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Adding a new component."));
+	// First check if the supplied operation type is valid
+	TScrComponentOperationType compOpType;
+	TPckg<TScrComponentOperationType> opTypePckg(compOpType);
+	aMessage.ReadL(3, opTypePckg, 0);
+		
+	if(compOpType != EScrCompInstall && compOpType != EScrCompUpgrade && compOpType != EScrCompHidden)
+		{
+		DEBUG_PRINTF2(_L("Unexpected component operation type (%d) was provided!"), static_cast<TInt>(compOpType));
+		User::Leave(KErrArgument);
+		}
+	
+	RIpcReadStream componentInfoReader;
+	CleanupClosePushL(componentInfoReader);
+	componentInfoReader.Open(aMessage, 1);
+	
+	RPointerArray<CLocalizableComponentInfo> componentInfoArray;
+	CleanupResetAndDestroyPushL(componentInfoArray);
+	InternalizePointersArrayL(componentInfoArray, componentInfoReader);
+	TInt arrayCount = componentInfoArray.Count();
+	// This check is done at the client side - if we get this condition here, this means that a rogue client-server call bypassed the R-class
+	__ASSERT_ALWAYS(arrayCount > 0, PanicClient(aMessage, KScrIllegalParameter));
+
+	HBufC *uniqueSwTypeName = GetSoftwareTypeNameFromMsgLC(aMessage);
+	HBufC *globalId = ReadDescLC(aMessage, 2);
+	TComponentId newComponentId = CommonAddComponentL(*uniqueSwTypeName, *globalId);
+	
+	// Add the newly added component into the cleanupstack so that it can be deleted in case of leaving.
+	TRollbackParams cleanupParam(newComponentId, *this);
+	CleanupStack::PushL(TCleanupItem(CScrRequestImpl::ComponentRollback, &cleanupParam));
+	// Add the component localizables cleanup into the cleanupstack so that they can be deleted in case of leaving.
+	CleanupStack::PushL(TCleanupItem(CScrRequestImpl::ComponentLocalizablesRollback, &cleanupParam));
+	
+	// For a log record, the component name is chosen for the current locale. If it doesn't exist, 
+	// then the non-localized component name is picked. If none of them exist, the first name in the names 
+	// array is used as default.
+	TInt componentNameIndexForLog (0);
+	TInt indexForCurrentLocale = KErrNotFound;
+	TInt indexForNonLocalized = KErrNotFound;
+	for(TInt i=0; i<arrayCount; ++i)
+		{
+		TLanguage locale(componentInfoArray[i]->Locale());
+		const TDesC& name = componentInfoArray[i]->NameL();
+		const TDesC& vendor = componentInfoArray[i]->VendorL();
+		AddComponentLocalizablesL(newComponentId, locale, name, vendor);
+		if(locale == User::Language())
+			indexForCurrentLocale = i;
+		else if(locale == KNonLocalized)
+			indexForNonLocalized = i;
+		}
+	CleanupStack::Pop(2, &cleanupParam); // cleanupitem for ComponentRollback, cleanupitem for ComponentLocalizablesRollback
+	
+	if(indexForCurrentLocale != KErrNotFound)
+		componentNameIndexForLog = indexForCurrentLocale;
+	else if(indexForNonLocalized != KErrNotFound)
+		componentNameIndexForLog = indexForNonLocalized;
+	
+	if(EScrCompHidden != compOpType)
+		{
+		CScrLogEntry *logRecord = CScrLogEntry::NewLC(componentInfoArray[componentNameIndexForLog]->NameL(), *uniqueSwTypeName, *globalId, KNullDesC, compOpType);
+		logRecord->iComponentId = newComponentId;
+		iLogEntries.Append(logRecord);
+		CleanupStack::Pop(logRecord); // Ownershipd is transferred
+		}
+	CleanupStack::PopAndDestroy(4, &componentInfoReader); // componentInfoReader, componentInfoArray, uniqueSwTypeName, globalId
+	
+	TPckg<TComponentId> componentIdDes(newComponentId);
+	aMessage.WriteL(3, componentIdDes);
+	}
+
+HBufC* CScrRequestImpl::ReadAndGetGlobalIdLC(const RMessage2& aMessage, TInt aSlot) const
+	{
+	// Read global id object from the message
+	CGlobalComponentId *globalId = ReadObjectFromMessageLC<CGlobalComponentId>(aMessage, aSlot);
+	HBufC *globalIdBuf = GenerateGlobalIdL(globalId->SoftwareTypeName(), globalId->GlobalIdName());
+	CleanupStack::PopAndDestroy(globalId);
+	CleanupStack::PushL(globalIdBuf);
+	return globalIdBuf;
+	}
+
+TUint32 CScrRequestImpl::HashGlobalIdsL(const TDesC& aDependantId, const TDesC& aSupplierId) const
+	{
+	RBuf concatGlobalIds;
+	concatGlobalIds.CreateL(aDependantId.Length() + aSupplierId.Length());
+	concatGlobalIds.CleanupClosePushL();
+	concatGlobalIds.Copy(aDependantId);
+	concatGlobalIds.Append(aSupplierId);
+	TUint32 globalIdsHash = HashCaseSensitiveL(concatGlobalIds);
+	CleanupStack::PopAndDestroy(&concatGlobalIds);
+	return globalIdsHash;
+	}
+
+void CScrRequestImpl::AddComponentDependencyL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Adding a new component dependency."));
+	
+	CVersionedComponentId *verCompId = ReadObjectFromMessageLC<CVersionedComponentId>(aMessage, 1);
+	HBufC *suppGlobalId = GenerateGlobalIdL(verCompId->GlobalId().SoftwareTypeName(), verCompId->GlobalId().GlobalIdName());
+	CleanupStack::PushL(suppGlobalId);
+	TUint32 suppGlobalIdHash = HashCaseSensitiveL(*suppGlobalId);
+	
+	HBufC *depGlobalId = ReadAndGetGlobalIdLC(aMessage, 2);
+	TUint32 depGlobalIdHash = HashCaseSensitiveL(*depGlobalId);
+	
+	TUint32 globalIdsHash = HashGlobalIdsL(*depGlobalId, *suppGlobalId);
+	
+	const TDesC* versionFrom = verCompId->VersionFrom();
+	const TDesC* versionTo = verCompId->VersionTo();
+	
+	_LIT(KInsertDependencyFront, "INSERT INTO ComponentDependencies(GlobalIdHash,DependantGlobalIdHash,SupplierGlobalIdHash,DependantGlobalId,SupplierGlobalId");
+	_LIT(KInsertDependencyEnd, ") VALUES(?,?,?,?,?");
+
+	const TInt KMaxInsertDependencyLength = 180;     ///< Maximum length of a possible dependency insert statement (KInsertDependencyFront + KInsertDependencyEnd + some space for optional columns)
+	const TInt KMaxInsertDependencyValueLength = 30; ///< Maximum length of the end part of a possible dependency insert statement (KInsertDependencyEnd + some space for optional values).
+
+	TInt numberOfValues = 5; // 5->(GlobalIdHash, DependantGlobalIdHash, SupplierGlobalIdHash, DependantGlobalId, SupplierGlobalId)
+	RBuf insertStmtStr;
+	insertStmtStr.CreateL(KMaxInsertDependencyLength);
+	insertStmtStr.CleanupClosePushL();
+	insertStmtStr.Copy(KInsertDependencyFront());
+	
+	RBuf insertStmtEndStr;
+	insertStmtEndStr.CreateL(KMaxInsertDependencyValueLength);
+	insertStmtEndStr.CleanupClosePushL();
+	insertStmtEndStr.Copy(KInsertDependencyEnd());
+	
+	// VersionFrom and VersionTo values are optional. Hence, a dynamic insert statement will be created.
+	// insertStmtStr is initialized with the statement including mandatory columns. Then versionFrom/To
+	// values are checked. If any of them is provided, then the corresponding column name is added to the statement.
+	// insertStmtEndStr is constructed with a number of value characters(?) as new value chars will be added
+	// if new columns are added to the statement
+	// In the end, insertStmtEndStr is added to insertStmtStr in order to complete the dependency insert statement.
+	
+	const TDesC* firstVersionParam(0);
+	const TDesC* secondVersionParam(0);
+	
+	_LIT(KInsertValue, ",?");
+	if(versionFrom)
+		{
+		_LIT(KVersionFrom, ",VersionFrom");
+		insertStmtStr.Append(KVersionFrom());
+		insertStmtEndStr.Append(KInsertValue());
+		firstVersionParam = versionFrom;
+		++numberOfValues;
+		}
+	
+	if(versionTo)
+		{
+		_LIT(KVersionTo, ",VersionTo");
+		insertStmtStr.Append(KVersionTo());
+		insertStmtEndStr.Append(KInsertValue());
+		if(firstVersionParam)
+			{
+			secondVersionParam = versionTo;
+			}
+		else
+			{
+			firstVersionParam = versionTo;
+			}
+		++numberOfValues;
+		}
+	
+	// Append the end part of the statement to the front part.
+	insertStmtStr.Append(insertStmtEndStr);
+	// Close the statement
+	_LIT(KInsertClose,");");
+	insertStmtStr.Append(KInsertClose());
+	// SQLite requires the statement string to end with NULL char.
+	insertStmtStr.Append('\0');
+	// All parameters are supplied, but numberOfValues of them will be taken into account.
+	ExecuteStatementL(insertStmtStr, numberOfValues, EValueInteger, globalIdsHash, EValueInteger, depGlobalIdHash, EValueInteger, suppGlobalIdHash, EValueString, depGlobalId, EValueString, suppGlobalId, EValueString, firstVersionParam, EValueString, secondVersionParam);
+	
+	CleanupStack::PopAndDestroy(5, verCompId); // verCompId, suppGlobalId, depGlobalId, insertStmtStr, insertStmtEndStr
+	}
+
+CStatement* CScrRequestImpl::CreateGeneralPropertyStatementWithLocaleL(const TDesC& aStmtStr, TInt aIdColumnValue, TLanguage aLocale, const TDesC& aPropName, TBool aDoLocaleResolving) const
+	{
+	CStatement *stmt(0);
+	TInt numberOfValues = 3;
+	
+	if(KUnspecifiedLocale == aLocale)
+		{
+		// No locale is specified. Client wants SCR to find the property automatically.
+		// So, first look up the properties for the current locale and its downgraded languages.
+		ASSERT(aDoLocaleResolving); // We cannot get a situation where KUnspecifiedLocale is given with locale resolving disabled: it is an undefined state.
+		stmt = CreateStatementObjectWithLocaleL(aStmtStr, User::Language(), numberOfValues, EValueString, &aPropName, EValueInteger, aIdColumnValue, EValueLanguage);
+		
+		if(!stmt)
+			{
+			// No property is defined with the current locale. Look up the non-localized properties.
+			stmt = CreateStatementObjectWithLocaleL(aStmtStr, KNonLocalized, numberOfValues, EValueString, &aPropName, EValueInteger, aIdColumnValue, EValueLanguage);
+			}
+		}
+	else if(KNonLocalized == aLocale)
+		{
+		// Non-localized properties are requested. Look up the non-localized properties.
+		stmt = CreateStatementObjectWithLocaleL(aStmtStr, KNonLocalized, numberOfValues, EValueString, &aPropName, EValueInteger, aIdColumnValue, EValueLanguage);
+		}
+	else
+		{
+		// A particular language is specified. Look up the properties with for this particular language
+		// and its downgraded languages.
+		stmt = aDoLocaleResolving ? 
+			CreateStatementObjectWithLocaleL(aStmtStr, aLocale, numberOfValues, EValueString, &aPropName, EValueInteger, aIdColumnValue, EValueLanguage, aDoLocaleResolving) :
+			CreateStatementObjectWithLocaleNoDowngradeL(aStmtStr, aLocale, numberOfValues, EValueString, &aPropName, EValueInteger, aIdColumnValue, EValueLanguage, aDoLocaleResolving);
+		}
+	return stmt;
+	}
+
+TInt CScrRequestImpl::FindGeneralPropertyNoLocaleDowngradeL(const TDesC& aTableName, const TDesC& aIdColumnName, TInt aIdColumnValue, const TDesC& aPropertyName, TLanguage aLocale, TPropertyType& aPropertyType) const
+	{
+	_LIT(KFindProperty, "SELECT PropertyId,IntValue,StrValue,IsStr8Bit FROM %S WHERE Name=? AND %S=? AND Locale=?;");
+	TInt formattedLen = aTableName.Length() + aIdColumnName.Length();
+	HBufC *statementStr = FormatStatementLC(KFindProperty(), formattedLen, &aTableName, &aIdColumnName);
+
+	// As we do not require downgrading locales, the last parameter is EFalse
+	CStatement *stmtFind = CreateGeneralPropertyStatementWithLocaleL(*statementStr, aIdColumnValue, aLocale, aPropertyName, EFalse);
+	if(!stmtFind)
+		{ // the property does not exist, return
+		CleanupStack::PopAndDestroy(statementStr);
+		return KErrNotFound;
+		}
+	CleanupStack::PushL(stmtFind);
+	
+	// the property in question exists in the properties table 
+	TInt propertyId = stmtFind->IntColumnL(0);					// 0 -> PropertyId		
+	TBool isIntPropertyNull = stmtFind->IsFieldNullL(1); 	// 2 -> IntValue
+	TBool isStrPropertyNull = stmtFind->IsFieldNullL(2); 	// 3 -> StrValue
+			
+	if(!isIntPropertyNull)
+		{
+		aPropertyType = CScrRequestImpl::EPropertyInteger;
+		}
+	else if(!isStrPropertyNull)
+		{
+		TBool is8BitString = (stmtFind->IntColumnL(3) == 1);
+		aPropertyType = is8BitString ? CScrRequestImpl::EPropertyBinary : CScrRequestImpl::EPropertyLocalizable;
+		}
+	else // None of the columns is defined - corrupt DB 
+		{
+		DEBUG_PRINTF(_L8("Unexpected situation! Neither int value nor str value are defined for a property"));
+		User::Leave(KErrCorrupt);
+		}
+	CleanupStack::PopAndDestroy(2, statementStr); // stmtFind, statementStr
+	return propertyId;
+	}
+
+void CScrRequestImpl::BindStatementValuesL(CStatement& aStatement, TLanguage aLanguage, TInt aValuesNum, VA_LIST aList) const
+	{
+	TInt bindIdx(0);
+	while(aValuesNum--)
+		{
+		CScrRequestImpl::TValueType t = static_cast<CScrRequestImpl::TValueType>(VA_ARG(aList, TInt));
+		switch(t)
+			{
+			case EValueString:
+				{
+				const TDesC* strVal = VA_ARG(aList, const TDesC*);
+				aStatement.BindStrL(++bindIdx, *strVal);
+				break;
+				}
+			case EValueInteger:
+				{
+				TInt intVal = VA_ARG(aList, TInt);
+				aStatement.BindIntL(++bindIdx, intVal);
+				break;
+				}
+			case EValueInteger64:
+				{
+				TInt64 intVal64 = VA_ARG(aList, TInt64);
+				aStatement.BindInt64L(++bindIdx, intVal64);
+				break;
+				}
+			case EValueLanguage:
+				{
+				aStatement.BindIntL(++bindIdx, aLanguage);
+				break;
+				}
+			case EValueBinary:
+				{
+				const TDesC8* binaryVal = VA_ARG(aList, const TDesC8*);
+				aStatement.BindBinaryL(++bindIdx, *binaryVal);
+				break;
+				}				
+			default:
+				DEBUG_PRINTF2(_L8("Encountered unexpected value type (%d)!"), t);
+				ASSERT(0);
+			} // switch
+		} // while
+	} // End of the function
+
+void CScrRequestImpl::ExecuteStatementL(TRefByValue<const TDesC> aStatement, TInt aValuesNum,...)
+	{// TRefByValue is used to suppress rcvt compile warning
+	VA_LIST argList;
+	VA_START(argList, aValuesNum);
+	
+	CStatement *stmt = iDbHandle->PrepareStatementLC(aStatement);
+	BindStatementValuesL(*stmt, KLangNone, aValuesNum, argList);
+	stmt->ExecuteStatementL();
+	CleanupStack::PopAndDestroy(stmt);
+	
+	VA_END(argList);
+	}
+
+void CScrRequestImpl::SetGeneralLocalizablePropertyL(CScrRequestImpl::TPropertyType aPropType, TInt aPropertyId, const TDesC& aIdColumnName, TInt aIdColumnValue, const TDesC& aPropName, TLanguage aLocale, const TDesC& aPropValue)
+	{
+	switch(aPropType)
+		{
+		case CScrRequestImpl::EPropertyUndefined:
+			{// the property does NOT exist, insert a new one
+			_LIT(KInsertProperty, "INSERT INTO ComponentProperties(Name,Locale,%S,StrValue) VALUES(?,?,?,?);");
+			TInt formattedLen = aIdColumnName.Length();
+			HBufC *statementStr = FormatStatementLC(KInsertProperty(), formattedLen, &aIdColumnName );
+			TInt numberOfValues = 4;
+			ExecuteStatementL(*statementStr, numberOfValues, EValueString, &aPropName, EValueInteger, aLocale, EValueInteger, aIdColumnValue, EValueString, &aPropValue);
+			CleanupStack::PopAndDestroy(statementStr);
+			break;
+			}
+		case CScrRequestImpl::EPropertyLocalizable: 
+			{
+			// the property exists, update it
+			_LIT(KUpdateProperty, "UPDATE ComponentProperties SET StrValue=? WHERE PropertyId=?;");
+			TInt numberOfValues = 2;
+			ExecuteStatementL(KUpdateProperty(), numberOfValues, EValueString, &aPropValue, EValueInteger, aPropertyId);
+			break;
+			}
+		default:
+			DEBUG_PRINTF(_L8("The property type isn't localizable string and cannot be updated with this API."))
+			User::Leave(KErrAbort);
+		}
+	}
+
+void CScrRequestImpl::SetGeneralBinaryPropertyL(CScrRequestImpl::TPropertyType aPropType, TInt aPropertyId, const TDesC& aTableName, const TDesC& aIdColumnName, TInt aIdColumnValue, const TDesC& aPropName, const TDesC8& aPropValue)
+	{
+	switch(aPropType)
+		{
+		case CScrRequestImpl::EPropertyUndefined:
+			{// the property does NOT exist, insert a new one
+			_LIT(KInsertProperty, "INSERT INTO %S(Name,%S,StrValue,IsStr8Bit) VALUES(?,?,?,1);");
+			TInt formattedLen = aTableName.Length() + aIdColumnName.Length();
+			HBufC *statementStr = FormatStatementLC(KInsertProperty(), formattedLen, &aTableName, &aIdColumnName );
+			TInt numberOfValues = 3;
+			ExecuteStatementL(*statementStr, numberOfValues, EValueString, &aPropName, EValueInteger, aIdColumnValue, EValueBinary, &aPropValue);
+			CleanupStack::PopAndDestroy(statementStr);
+			break;
+			}
+		case CScrRequestImpl::EPropertyBinary: 
+			{
+			// the property exists, update it
+			_LIT(KUpdateProperty, "UPDATE %S SET StrValue=? WHERE PropertyId=?;");
+			HBufC *statementStr = FormatStatementLC(KUpdateProperty(), aTableName.Length(), &aTableName);
+			TInt numberOfValues = 2;
+			ExecuteStatementL(*statementStr, numberOfValues, EValueBinary, &aPropValue, EValueInteger, aPropertyId);
+			CleanupStack::PopAndDestroy(statementStr);
+			break;
+			}
+		default:
+			DEBUG_PRINTF(_L8("The property type isn't an 8-bit string and cannot be updated with this API."))
+			User::Leave(KErrAbort);
+		}
+	}
+
+void CScrRequestImpl::SetGeneralIntPropertyL(TPropertyType aPropType, TInt aPropertyId, const TDesC& aTableName, const TDesC& aIdColumnName , TInt aIdColumnValue, const TDesC& aPropName, TInt64 aPropValue)
+	{
+	switch(aPropType)
+		{
+		case CScrRequestImpl::EPropertyUndefined:
+			{// the property does NOT exist, insert a new one
+			_LIT(KInsertProperty, "INSERT INTO %S(Name,%S,IntValue) VALUES(?,?,?)");
+			TInt formattedLen = aTableName.Length() + aIdColumnName.Length();
+			HBufC* statementStr = FormatStatementLC(KInsertProperty(), formattedLen, &aTableName, &aIdColumnName );
+			TInt numberOfValues = 3;
+			ExecuteStatementL(*statementStr, numberOfValues,EValueString, &aPropName, EValueInteger, aIdColumnValue, EValueInteger64, aPropValue);
+			CleanupStack::PopAndDestroy(statementStr);
+			break;
+			}
+		case CScrRequestImpl::EPropertyInteger:
+			{// the property exists, update it
+			_LIT(KUpdateProperty, "UPDATE %S SET IntValue=? WHERE PropertyId=?;");
+			HBufC *statementStr = FormatStatementLC(KUpdateProperty(), aTableName.Length(), &aTableName);
+			TInt numberOfValues = 2;
+			ExecuteStatementL(*statementStr, numberOfValues, EValueInteger64, aPropValue, EValueInteger, aPropertyId);
+			CleanupStack::PopAndDestroy(statementStr);
+			break;
+			}
+		default:
+			DEBUG_PRINTF(_L8("The property type isn't integer and cannot be updated with this API."));
+			User::Leave(KErrAbort);
+		}
+	}
+
+template <class A> void VerifySetPropertyParamsL(HBufC* aPropName, A* aPropValue)
+	{
+	if (!aPropName || !aPropValue)
+		User::Leave(KErrArgument);	
+	}
+	
+void CScrRequestImpl::SetComponentLocalizablePropertyL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting component string property."));
+	// N.B. Don't change the order of IPC parameter reading, otherwise fails in UREL mode.
+	HBufC *propName = ReadDescLC(aMessage, 1);
+	HBufC *propValue = ReadDescLC(aMessage, 2);
+	VerifySetPropertyParamsL(propName, propValue);
+
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	TLanguage locale = TLanguage(aMessage.Int3());
+	
+	CScrRequestImpl::TPropertyType propType(CScrRequestImpl::EPropertyUndefined);
+	// The function name states that we don't want automatic locale resolving. If, e.g. we set a property for ELangAmerican, we don't want FindGeneralProperty to match existing value for ELangEnglish
+	TInt propertyId = FindGeneralPropertyNoLocaleDowngradeL(KComponentPropertiesTable(), KComponentIdColumnName(), componentId, *propName, locale, propType);
+	SetGeneralLocalizablePropertyL(propType, propertyId, KComponentIdColumnName(), componentId, *propName, locale, *propValue);
+	CleanupStack::PopAndDestroy(2, propName);
+	}
+
+void CScrRequestImpl::SetComponentBinaryPropertyL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting component binary property."));
+	// N.B. Don't change the order of IPC parameter reading, otherwise fails in UREL mode.
+	HBufC *propName = ReadDescLC(aMessage, 1);
+	HBufC8 *propValue = ReadDesc8LC(aMessage, 2);
+	
+	VerifySetPropertyParamsL(propName, propValue);
+	
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	
+	CScrRequestImpl::TPropertyType propType(CScrRequestImpl::EPropertyUndefined);
+	TInt propertyId = FindGeneralPropertyNoLocaleDowngradeL(KComponentPropertiesTable(), KComponentIdColumnName(), componentId, *propName, KLangNone, propType);
+	SetGeneralBinaryPropertyL(propType, propertyId, KComponentPropertiesTable(), KComponentIdColumnName(), componentId, *propName, *propValue);
+	CleanupStack::PopAndDestroy(2, propName);
+	}
+
+void CScrRequestImpl::SetComponentIntPropertyL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting component integer property."));
+	// N.B. Don't change the order of IPC parameter reading, otherwise fails in UREL mode.
+	HBufC* propName = ReadDescLC(aMessage, 1);
+	
+	if (!propName)
+		User::Leave(KErrArgument);
+	
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	TInt64 propValue = MAKE_TINT64(aMessage.Int2(), aMessage.Int3());	
+		
+	TPropertyType propType(CScrRequestImpl::EPropertyUndefined);
+	TInt propertyId = FindGeneralPropertyNoLocaleDowngradeL(KComponentPropertiesTable(), KComponentIdColumnName(), componentId, *propName, KLangNone, propType);
+	SetGeneralIntPropertyL(propType, propertyId, KComponentPropertiesTable(), KComponentIdColumnName(), componentId, *propName, propValue);
+	CleanupStack::PopAndDestroy(propName);
+	}
+
+TUint32 CScrRequestImpl::HashCaseInsensitiveL(const TDesC& aName)
+	{
+	RBuf temp;
+	temp.CreateMaxL(aName.Length());
+	temp.CleanupClosePushL();
+	temp.Copy(aName);
+	temp.LowerCase(); // The hashed column is case-insensitive. So, the hashed value must be
+					  // case-insensitive too. To achieve that we need to set to lower-case.	
+	TUint32 hashVal = HashCaseSensitiveL(temp);
+	CleanupStack::PopAndDestroy(&temp);
+	return hashVal;
+	}
+
+TUint32 CScrRequestImpl::HashCaseSensitiveL(const TDesC& aName)
+	{
+	TUint32 hashVal = 0;
+	Mem::Crc32(hashVal,aName.Ptr(),aName.Size());
+	return hashVal;
+	}
+
+TInt CScrRequestImpl::GetComponentFileIdL(const TDesC& aFileName, TComponentId aComponentId) const
+	{
+	DEBUG_PRINTF3(_L("Looking up a component(%d) file(%S)"), aComponentId, &aFileName);
+	
+	TUint32 hash = HashCaseInsensitiveL(aFileName);
+	_LIT(KFindComponentFile, "SELECT CmpFileId FROM ComponentsFiles WHERE ComponentId=? AND LocationHash=?;");
+	CStatement *stmtFind = iDbHandle->PrepareStatementLC(KFindComponentFile());
+	stmtFind->BindIntL(1, aComponentId);
+	stmtFind->BindIntL(2, hash);
+	
+	if(!stmtFind->ProcessNextRowL())
+		{
+		DEBUG_PRINTF3(_L("Component %d does not have File=%S!"), aComponentId, &aFileName);
+		CleanupStack::PopAndDestroy(stmtFind);
+		return KErrNotFound;
+		}
+	TInt componentFileId = stmtFind->IntColumnL(0);
+	CleanupStack::PopAndDestroy(stmtFind);
+	return componentFileId;
+	}
+
+TInt CScrRequestImpl::FindComponentFileL(const TDesC& aFileName, TComponentId aComponentId) const
+	{
+	TInt cmpFileId = GetComponentFileIdL(aFileName, aComponentId);
+	if(KErrNotFound == cmpFileId)
+		{
+		User::Leave(KErrNotFound);
+		}
+	return cmpFileId;
+	}
+
+TInt CScrRequestImpl::GetDriveFromFilePath(const TDesC& aFilePath, TDriveUnit& aDriveUnit) const
+	{
+	if(!iFs.IsValidName(aFilePath))
+		{// even if the file name validity is checked before registering the file, do double check
+		 // to be on the safe side. Because, if the file format is invalid, the rest of the code may panic.
+		DEBUG_PRINTF2(_L("The file (%S) doesn't have a valid name format!"), &aFilePath);
+		return KErrArgument;
+		}
+	
+	TParsePtrC fileParser(aFilePath);
+	TPtrC driveLetter(fileParser.Drive());
+	if(driveLetter == KNullDesC())
+		{
+		DEBUG_PRINTF2(_L("The file (%S) doesn't contain any drive letter!"), &aFilePath);
+		return KErrArgument;
+		}
+	aDriveUnit = driveLetter;
+	return KErrNone;
+	}
+
+TInt CScrRequestImpl::InstalledDrivesToBitmaskL(const TDriveList& aDriveList) const
+	{
+	TInt installedDrives(0);
+	for(TInt driveNum=EDriveA; driveNum<=EDriveZ; ++driveNum)
+		{
+		if(aDriveList[driveNum])
+			{
+			installedDrives |= 1<<driveNum;
+			}
+		}
+	return installedDrives;
+	}
+
+TInt CScrRequestImpl::GetInstalledDrivesBitmaskL(TComponentId aComponentId) const
+	{
+	// Get installed drives list from database
+	_LIT(KSelectInstalledDrivesBitmask, "SELECT InstalledDrives FROM Components WHERE ComponentId=?;");
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectInstalledDrivesBitmask);
+	stmt->BindIntL(1, aComponentId);
+	if(!stmt->ProcessNextRowL())
+		{
+		DEBUG_PRINTF2(_L8("Component (%d) couldn't be found in the SCR database."), aComponentId);
+		User::Leave(KErrNotFound);
+		}
+	TInt res = stmt->IntColumnL(0);
+	CleanupStack::PopAndDestroy(stmt);
+	return res;
+	}
+
+TBool CScrRequestImpl::HasFilesOnDriveL(TDriveUnit aDrive, TComponentId aComponentId)
+	{
+	CStatement *stmt = OpenFileListStatementL(aComponentId);
+	CleanupStack::PushL(stmt);
+	HBufC *nextFilePath(NULL);
+	TBool returnValue(EFalse);
+	
+	while ( returnValue == EFalse && (nextFilePath = GetNextFilePathL(*stmt)) != NULL)
+		{
+		TDriveUnit fileDrive;
+		TInt res = GetDriveFromFilePath(*nextFilePath, fileDrive);
+		// Files with invalid paths are ignored
+		if (res == KErrNone && fileDrive == aDrive)
+			{
+			returnValue = ETrue;
+			}
+		delete nextFilePath;			
+		}
+		
+	CleanupStack::PopAndDestroy(stmt);
+	return returnValue;
+	}
+	
+void CScrRequestImpl::UpdateInstalledDrivesL(TComponentId aComponentId, const TDesC& aFilePath, TFileOperationType aType)
+	{
+	TDriveUnit drive;
+	User::LeaveIfError(GetDriveFromFilePath(aFilePath, drive));
+	
+	TInt driveNum = static_cast<TInt>(drive);	
+	TInt oldDrivesBitmask = GetInstalledDrivesBitmaskL(aComponentId);
+
+	TInt newDrivesBitmask = oldDrivesBitmask;
+	// Update the list of installed drives
+	if(aType == EFileRegistered)
+		{
+		newDrivesBitmask |= 0x1 << driveNum;
+		}
+	else // aType == EFileUnregistered
+		{
+		TBool hasOtherFilesOnTheDrive = HasFilesOnDriveL(drive, aComponentId);
+		if (!hasOtherFilesOnTheDrive)
+			{
+			// Do a logical AND with a bitmask which looks like 111110111111
+			TInt andBitmask = ~(0x1 << driveNum);
+			newDrivesBitmask &= andBitmask;
+			}
+		}
+
+	if (newDrivesBitmask != oldDrivesBitmask)
+		{
+		// Write back the updated installed drives and list 
+		_LIT(KUpdateInstalledDrives, "UPDATE Components SET InstalledDrives=? WHERE ComponentId=?;");
+		TInt numberOfValues = 2;
+		ExecuteStatementL(KUpdateInstalledDrives, numberOfValues, EValueInteger, newDrivesBitmask, EValueInteger, aComponentId);
+		}
+	}
+
+void CScrRequestImpl::RegisterComponentFileL(const RMessage2& aMessage)
+   	{
+	DEBUG_PRINTF(_L8("Registering component file."));
+   	
+   	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+   	HBufC* fileName = ReadFileNameFromMsgLC(aMessage);
+ 	TBool considerFileInDrivesList = aMessage.Int2();	
+   	TUint32 hash = HashCaseInsensitiveL(*fileName);
+	TDriveUnit drive(*fileName);
+   	TVolumeInfo volInfo;
+   	
+   	_LIT(KInsertFile, "INSERT INTO ComponentsFiles(ComponentId,LocationHash,Location) VALUES(?,?,?);");
+   	TInt numberOfValues = 3;
+   	ExecuteStatementL(KInsertFile(), numberOfValues, EValueInteger, componentId, EValueInteger, hash, EValueString, fileName);
+   	// Reflect this file addition in the installed drives field of the components table
+	// Or the drive list is updated in case of a FILENULL operation on a removable drive
+   	// If this step fails (for example, this file name is incorrect) then we cannot register the file
+ 	if (KErrNone == iFs.Volume(volInfo, drive) || considerFileInDrivesList)
+ 		UpdateInstalledDrivesL(componentId, *fileName, EFileRegistered);
+ 	
+   	CleanupStack::PopAndDestroy(fileName);
+   	}
+
+void CScrRequestImpl::SetFileStrPropertyL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting file string property."));
+	
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);	
+	HBufC* fileName  = ReadFileNameFromMsgLC(aMessage);
+	
+	TInt compFileId = FindComponentFileL(*fileName, componentId);
+		
+	HBufC* propName  = ReadDescLC(aMessage, 2);
+	TPropertyType propType(CScrRequestImpl::EPropertyUndefined);
+	TInt propertyId = FindGeneralPropertyNoLocaleDowngradeL(KFilePropertiesTable(), KCompFileIdColumnName(), compFileId, *propName, KLangNone, propType);
+	
+	HBufC8* propValue = ReadDesc8LC(aMessage, 3);
+	SetGeneralBinaryPropertyL(propType, propertyId, KFilePropertiesTable(), KCompFileIdColumnName(), compFileId, *propName, *propValue);
+	CleanupStack::PopAndDestroy(3, fileName);
+	}
+
+void CScrRequestImpl::SetFileIntPropertyL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting integer file property."));
+		
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	HBufC* fileName  = ReadFileNameFromMsgLC(aMessage);
+	TInt compFileId = FindComponentFileL(*fileName, componentId);
+	
+	HBufC* propName  = ReadDescLC(aMessage, 2);
+	TPropertyType propType(CScrRequestImpl::EPropertyUndefined);
+	TInt propertyId = FindGeneralPropertyNoLocaleDowngradeL(KFilePropertiesTable(), KCompFileIdColumnName(), compFileId, *propName, KLangNone, propType);
+	
+	TInt propValue   = aMessage.Int3();
+	SetGeneralIntPropertyL(propType, propertyId, KFilePropertiesTable(), KCompFileIdColumnName(), compFileId, *propName, propValue);
+	CleanupStack::PopAndDestroy(2, fileName);
+	}
+
+void CScrRequestImpl::SetComponentLocalizableL(TComponentId aComponentId, TLanguage aLocale, const TDesC& aColumnName, const TDesC& aName, const TDesC& aVendor)
+	{
+	_LIT(KFindComponentLocalizable, "SELECT CompLocalId FROM ComponentLocalizables WHERE ComponentId=? AND Locale=?;");
+	TInt numberOfValues = 2;
+	CStatement *stmt = CreateStatementObjectWithLocaleL(KFindComponentLocalizable, aLocale, numberOfValues, EValueInteger, aComponentId, EValueLanguage);	
+	
+	if(!stmt)
+		{// Add a new name for this component
+		AddComponentLocalizablesL(aComponentId, aLocale, aName, aVendor);
+		}
+	else
+		{// Exists, update the localizable field of the component
+		CleanupStack::PushL(stmt);
+		TInt compLocId = stmt->IntColumnL(0);
+		_LIT(KUpdateComponentName, "UPDATE ComponentLocalizables SET %S=? WHERE CompLocalId=?;");
+		HBufC *statementStr = FormatStatementLC(KUpdateComponentName, aColumnName.Length(), &aColumnName);
+		const TDesC *value = aName.Length() ? &aName : &aVendor;
+		TInt numberOfValues = 2;
+		ExecuteStatementL(*statementStr, numberOfValues, EValueString, value, EValueInteger, compLocId);
+		CleanupStack::PopAndDestroy(2, stmt); // stmt, statementStr
+		}
+	}
+
+void CScrRequestImpl::SetComponentNameL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting component name."));
+	
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	HBufC *componentName = ReadDescLC(aMessage, 1);
+	if (!componentName->CompareF(KNullDesC()))
+		{// Component name cannot be empty
+		DEBUG_PRINTF(_L8("Component name cannot be set or modified to a NULL string."));
+		User::Leave(KErrArgument);
+		}	
+		
+	TLanguage locale = TLanguage(aMessage.Int2());
+	_LIT(KComponentNameField,"Name");
+	SetComponentLocalizableL(componentId, locale, KComponentNameField, *componentName, KNullDesC());
+	CleanupStack::PopAndDestroy(componentName);
+	}
+
+void CScrRequestImpl::SetVendorNameL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting vendor name."));
+	
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	HBufC *vendorName = ReadDescLC(aMessage, 1);
+	TLanguage locale = TLanguage(aMessage.Int2());
+	_LIT(KComponentVendorField,"Vendor");
+	SetComponentLocalizableL(componentId, locale, KComponentVendorField, KNullDesC(), *vendorName);
+	CleanupStack::PopAndDestroy(vendorName);
+	}
+
+void CScrRequestImpl::ReadAndSetCommonComponentPropertyL(const RMessage2& aMessage, const TDesC& aPropertyColumn)
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	TInt propertyValue = aMessage.Int1();
+	
+	_LIT(KUpdateCommonProperty, "UPDATE Components SET %S=? WHERE ComponentId=?;");
+	TInt formattedLen = aPropertyColumn.Length();
+	HBufC *statementStr = FormatStatementLC(KUpdateCommonProperty(), formattedLen, &aPropertyColumn );
+	TInt numberOfValues = 2;
+	ExecuteStatementL(*statementStr, numberOfValues, EValueInteger, propertyValue, EValueInteger, componentId);
+	CleanupStack::PopAndDestroy(statementStr);
+	}
+
+void CScrRequestImpl::SetIsComponentRemovableL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting the component's removable attribute."));
+	_LIT(KColumnNameRemovable, "Removable");
+	ReadAndSetCommonComponentPropertyL(aMessage, KColumnNameRemovable);
+	}
+
+void CScrRequestImpl::SetIsComponentDrmProtectedL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting the component's DRM protected attribute."));
+	_LIT(KColumnNameDrmProtected, "DRMProtected");
+	ReadAndSetCommonComponentPropertyL(aMessage, KColumnNameDrmProtected);	
+	}
+
+void CScrRequestImpl::SetIsComponentHiddenL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting the component's hidden attribute."));
+	_LIT(KColumnNameHidden, "Hidden");
+	ReadAndSetCommonComponentPropertyL(aMessage, KColumnNameHidden);		
+	}
+
+void CScrRequestImpl::SetIsComponentKnownRevokedL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting the component's known-revoked attribute."));
+	_LIT(KColumnNameKnownRevoked, "KnownRevoked");
+	ReadAndSetCommonComponentPropertyL(aMessage, KColumnNameKnownRevoked);	
+	}
+
+void CScrRequestImpl::SetIsComponentOriginVerifiedL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting the component's removable attribute."));
+	_LIT(KColumnNameOriginVerified, "OriginVerified");
+	ReadAndSetCommonComponentPropertyL(aMessage, KColumnNameOriginVerified);	
+	}
+		
+void CScrRequestImpl::SetComponentSizeL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting the component's install-time size."));
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	TInt64 componentSize = MAKE_TINT64(aMessage.Int1(), aMessage.Int2());
+	if (componentSize < 0)
+		{
+		DEBUG_PRINTF2(_L8("Received incorrect component size: %d."), componentSize);
+		User::Leave(KErrArgument);
+		}
+	_LIT(KUpdateComponentSize, "UPDATE Components SET Size=? WHERE ComponentId=?;");
+	TInt numberOfValues = 2;
+	ExecuteStatementL(KUpdateComponentSize, numberOfValues, EValueInteger64, componentSize, EValueInteger, componentId);
+	}
+
+TBool FindLogEntryWithComponentId(const TComponentId *aKey, const CScrLogEntry& aEntry)
+	{
+	return (*aKey == aEntry.ComponentId()); 
+	}
+
+void CScrRequestImpl::SetComponentVersionL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting component version."));
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	HBufC *version = ReadDescLC(aMessage, 1);
+	
+	_LIT(KUpdateVersion, "UPDATE Components SET Version=? WHERE ComponentId=?;");
+	TInt numberOfValues = 2;
+	ExecuteStatementL(KUpdateVersion, numberOfValues, EValueString, version, EValueInteger, componentId);
+	
+	TInt logIdx = iLogEntries.Find(componentId, FindLogEntryWithComponentId);
+	if(KErrNotFound == logIdx)
+		{
+		CleanupStack::PopAndDestroy(version);
+		return;
+		}
+	DeleteObjectZ(iLogEntries[logIdx]->iVersion);
+	iLogEntries[logIdx]->iVersion = version; // Ownership is transferred
+	CleanupStack::Pop(version);
+	}
+
+void CScrRequestImpl::DeleteComponentPropertyL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Deleting component property."));
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	HBufC *name = ReadDescLC(aMessage, 1);
+	
+	_LIT(KDeleteComponentProperty, "DELETE FROM ComponentProperties WHERE Name=? AND ComponentId=?;");
+	TInt numberOfValues = 2;
+	ExecuteStatementL(KDeleteComponentProperty, numberOfValues, EValueString, name, EValueInteger, componentId);
+	CleanupStack::PopAndDestroy(name);
+	}
+
+void CScrRequestImpl::DeleteFilePropertyL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Deleting file property."));
+	
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	HBufC* fileName  = ReadFileNameFromMsgLC(aMessage);
+	
+	TInt compFileId = FindComponentFileL(*fileName, componentId);
+	HBufC *propName = ReadDescLC(aMessage, 2);
+	
+	_LIT(KDeleteFileProperty, "DELETE FROM FileProperties WHERE CmpFileId=? AND Name=?;");
+	TInt numberOfValues = 2;
+	ExecuteStatementL(KDeleteFileProperty, numberOfValues, EValueInteger, compFileId, EValueString, propName);
+	CleanupStack::PopAndDestroy(2, fileName);
+	}
+
+void CScrRequestImpl::UnregisterComponentFileL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Unregistering a component file."));
+	
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	HBufC* fileName  = ReadFileNameFromMsgLC(aMessage);
+	
+	TInt compFileId = GetComponentFileIdL(*fileName, componentId);
+	if (compFileId == KErrNotFound)
+		{
+		CleanupStack::PopAndDestroy(fileName);
+		return; // If the file is not registered, we do not return an error - this sort of condition is better enforced at upper layers 
+		}
+		
+	_LIT(KDeleteComponentFileProperties, "DELETE from FileProperties WHERE CmpFileId=?;");
+	TInt numberOfValues = 1;
+	ExecuteStatementL(KDeleteComponentFileProperties, numberOfValues, EValueInteger, compFileId);
+	DEBUG_PRINTF3(_L("Properties of the file(%S) of the component(%d) have been deleted."), fileName, componentId);
+
+	_LIT(KUnregisterComponentFile, "DELETE FROM ComponentsFiles WHERE CmpFileId=?;");
+	ExecuteStatementL(KUnregisterComponentFile, numberOfValues, EValueInteger, compFileId);
+
+	// Reflect this file deletion in the installed drives field of the components table
+	UpdateInstalledDrivesL(componentId, *fileName, EFileUnregistered);
+	CleanupStack::PopAndDestroy(fileName);
+	}
+
+void ReadNullableStringFromStatementL(CStatement& aStmt, TPtrC& aValue, TInt aFieldNum)
+	{
+	aValue.Set(KNullDesC());
+	if(!aStmt.IsFieldNullL(aFieldNum))
+		{ // If the value is not NULL, set it.
+		aValue.Set(aStmt.StrColumnL(aFieldNum));
+		}
+	}
+
+void CScrRequestImpl::DeleteComponentL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Deleting a component."));
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	DEBUG_PRINTF2(_L8("Deleting component(%d)."), componentId);
+	
+	// Create the log record before deleting the component
+	_LIT(KSelectComponentInfo, "SELECT SoftwareTypeName,GlobalId,Version FROM Components WHERE ComponentId=?;");
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectComponentInfo);
+	stmt->BindIntL(1, componentId);
+	
+	// if the component doesn't exist, the code shouldn't come here. It should have left with KErrNotFound at security check level.
+	__ASSERT_ALWAYS(stmt->ProcessNextRowL(), User::Leave(KErrAbort));
+	
+	CComponentEntry *entry2bDeleted = CComponentEntry::NewLC();
+	entry2bDeleted->iSwType = stmt->StrColumnL(0).AllocL();
+	
+	TPtrC globalId;
+	ReadNullableStringFromStatementL(*stmt, globalId, 1);
+	if(globalId.Length() > 0)
+		{
+		CGlobalComponentId *globalIdObj = ParseGlobalComponendIdLC(globalId);
+		entry2bDeleted->iGlobalId = globalIdObj->GlobalIdName().AllocL();
+		CleanupStack::PopAndDestroy(globalIdObj);
+		}
+	else
+		{
+		entry2bDeleted->iGlobalId = globalId.AllocL();
+		}
+	TPtrC version;
+	ReadNullableStringFromStatementL(*stmt, version, 2);
+	entry2bDeleted->iVersion = version.AllocL();
+	AddComponentEntryLocalizablesL(componentId, *entry2bDeleted, KUnspecifiedLocale);
+
+	CScrLogEntry *logRecord = CScrLogEntry::NewL(entry2bDeleted->Name(), entry2bDeleted->SoftwareType(), entry2bDeleted->GlobalId(), entry2bDeleted->Version(), EScrCompUnInstall);
+	logRecord->iComponentId = componentId;
+	CleanupStack::PopAndDestroy(2, stmt); // stmt, entry2bDeleted
+	CleanupStack::PushL(logRecord);
+	
+	// Now begin the component deletion
+	TInt numberOfValues = 1;
+	_LIT(KDeleteComponentProperties,"DELETE FROM ComponentProperties WHERE ComponentId=?;");
+	ExecuteStatementL(KDeleteComponentProperties, numberOfValues, EValueInteger, componentId);
+	DEBUG_PRINTF2(_L8("Properties of component(%d) have been deleted."), componentId);
+	
+	_LIT(KDeleteComponentFileProperties, "DELETE from FileProperties WHERE CmpFileId IN \
+				(SELECT CmpFileId FROM ComponentsFiles WHERE ComponentId=?);");
+	ExecuteStatementL(KDeleteComponentFileProperties, numberOfValues, EValueInteger, componentId);
+	DEBUG_PRINTF2(_L8("Properties of files of component(%d) have been deleted."), componentId);
+
+	_LIT(KDeleteComponentFiles, "DELETE FROM ComponentsFiles WHERE ComponentId=?;");
+	ExecuteStatementL(KDeleteComponentFiles, numberOfValues, EValueInteger, componentId);
+	DEBUG_PRINTF2(_L8("File registrations of component(%d) have been deleted."), componentId);
+
+	_LIT(KDeleteComponentLocalizables, "DELETE FROM ComponentLocalizables WHERE ComponentId=?;");
+	ExecuteStatementL(KDeleteComponentLocalizables, numberOfValues, EValueInteger, componentId);
+	DEBUG_PRINTF2(_L8("Localizables of component(%d) have been deleted."), componentId);
+	
+	// Delete all dependencies where this component is dependant
+	_LIT(KDeleteComponentDependencies, "DELETE FROM ComponentDependencies WHERE DependantGlobalIdHash IN \
+				(SELECT GlobalIdHash FROM Components WHERE ComponentId=?);");
+	ExecuteStatementL(KDeleteComponentDependencies, numberOfValues, EValueInteger, componentId);
+	DEBUG_PRINTF2(_L8("Dependencies of component(%d) have been deleted."), componentId);
+	
+	_LIT(KDeleteComponents, "DELETE FROM Components WHERE ComponentId=?;");
+	ExecuteStatementL(KDeleteComponents, numberOfValues, EValueInteger, componentId);
+	DEBUG_PRINTF2(_L8("Finally component(%d) has been deleted."), componentId);
+	
+	// Add log record
+	iLogEntries.Append(logRecord);
+	CleanupStack::Pop(logRecord); // Ownership is transferred
+	}
+
+void CScrRequestImpl::DeleteComponentDependencyL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Deleting a component dependency."));
+	
+	HBufC *suppGlobalId = ReadAndGetGlobalIdLC(aMessage, 1);
+	HBufC *depGlobalId = ReadAndGetGlobalIdLC(aMessage, 2);
+	TUint32 globalIdsHash = HashGlobalIdsL(*depGlobalId, *suppGlobalId);
+	CleanupStack::PopAndDestroy(2, suppGlobalId); // suppGlobalId,depGlobalId
+	
+	_LIT(KDeleteDependency, "DELETE FROM ComponentDependencies WHERE GlobalIdHash=?;");
+	TInt numberOfValues = 1;
+	ExecuteStatementL(KDeleteDependency(), numberOfValues, EValueInteger, globalIdsHash);
+	}
+
+TBool CScrRequestImpl::BindAndProcessStatementObjectL(CStatement& aStatementObj, TLanguage aLanguage, TInt aValuesNum, VA_LIST aList) const
+	{
+	aStatementObj.ResetL();
+	BindStatementValuesL(aStatementObj, aLanguage, aValuesNum, aList);
+	return aStatementObj.ProcessNextRowL();
+	}
+
+CStatement* CScrRequestImpl::CreateStatementObjectWithoutLocaleL(const TDesC& aStatement, TInt aValuesNum,...) const	
+	{
+	VA_LIST argList;
+	VA_START(argList, aValuesNum);
+	
+	CStatement *stmt = iDbHandle->PrepareStatementLC(aStatement);
+	
+	// The language parameter is irrelevant. The BindAndProcessStatementObjectL is reused here to avoid code duplication. 
+	TBool success = BindAndProcessStatementObjectL(*stmt, ELangNone, aValuesNum, argList);
+	
+	VA_END(argList);
+	
+	if(!success)
+		{ // if the code reaches here, it means there is no record for the given criteria
+		CleanupStack::PopAndDestroy(stmt);
+		return NULL;
+		}
+	CleanupStack::Pop(stmt);
+	return stmt;	
+	}
+
+CStatement* CScrRequestImpl::CreateStatementObjectWithLocaleNoDowngradeL(const TDesC& aStatement, TLanguage aLocale, TInt aValuesNum,...) const	
+	{
+	VA_LIST argList;
+	VA_START(argList, aValuesNum);	
+	
+	CStatement *stmt = iDbHandle->PrepareStatementLC(aStatement);	
+	TBool success = BindAndProcessStatementObjectL(*stmt, aLocale, aValuesNum, argList);
+		
+	if(!success)
+		{ // if the code reaches here, it means there is no record for the given criteria		
+		CleanupStack::PopAndDestroy(stmt);			
+		return NULL;
+		}
+		
+	CleanupStack::Pop(stmt);	
+	return stmt;
+	
+	}
+
+// This function tries automatically downgrading languages to the nearest locale	
+CStatement* CScrRequestImpl::CreateStatementObjectWithLocaleL(const TDesC& aStatement, TLanguage aLocale, TInt aValuesNum,...) const
+	{
+	VA_LIST argList;
+	VA_START(argList, aValuesNum);
+	
+	CStatement *stmt = iDbHandle->PrepareStatementLC(aStatement);
+	//Avoiding call to BAFL for the current locale. If succeeds, BAFL will not be invoked
+	TBool success = BindAndProcessStatementObjectL(*stmt, aLocale, aValuesNum, argList);	
+    VA_START(argList, aValuesNum);
+	
+	if ( !success )
+	   {
+       // Run the given statement for the passed or its equivalent languages
+       // First, get the Equivalent Language path for the given locale. The first element
+       // in the array is the given language.		
+       TLanguagePath equivalentLanguages;
+       BaflUtils::GetEquivalentLanguageList(aLocale, equivalentLanguages);
+    
+       TInt i = 1; //skipping the current locale
+       while ( equivalentLanguages[i] != ELangNone && !success)	
+           {
+           success = BindAndProcessStatementObjectL(*stmt, equivalentLanguages[i], aValuesNum, argList);
+           VA_START(argList, aValuesNum);
+           i++;
+           }
+       VA_END(argList);
+        
+       if(!success)
+           { // if the code reaches here, it means there is no record for the given criteria       
+           CleanupStack::PopAndDestroy(stmt);          
+           return NULL;
+           }
+	    }
+	else
+		{
+		VA_END(argList);
+		}
+
+	CleanupStack::Pop(stmt);	
+	return stmt;
+	}
+
+CComponentEntry* CScrRequestImpl::CreateComponentEntryFromStatementHandleL(CStatement& aStmt) const
+	{
+	TComponentId componentId = aStmt.IntColumnL(0);
+	TInt removable = aStmt.IntColumnL(3);
+	TInt64 size = aStmt.Int64ColumnL(4);
+	TScomoState scomoState = TScomoState(aStmt.IntColumnL(5));
+	
+	TInt drmProtected = aStmt.IntColumnL(6);
+	TInt hidden = aStmt.IntColumnL(7);
+	TInt knownRevoked = aStmt.IntColumnL(8);
+	TInt originVerified = aStmt.IntColumnL(9);
+	
+	TPtrC globalIdDes;
+	ReadNullableStringFromStatementL(aStmt, globalIdDes, 10);
+	HBufC *globalId = NULL;
+	if(globalIdDes.Length())
+		{ // if global id is not NULL
+		CGlobalComponentId *globalIdObj = ParseGlobalComponendIdLC(globalIdDes);
+		globalId = globalIdObj->GlobalIdName().AllocL();
+		CleanupStack::PopAndDestroy(globalIdObj);
+		CleanupStack::PushL(globalId);
+		}
+	else
+		{ // Global Id is NULL
+		globalId = KNullDesC().AllocLC();
+		}
+	
+	TInt installedDrivesBitmask = aStmt.IntColumnL(11);
+	// Convert bitmask to TDriveList
+	TDriveList installedDriveList;
+	installedDriveList.FillZ(KMaxDrives);
+	for (TInt i = 0; i < KMaxDrives && installedDrivesBitmask > 0; ++i, installedDrivesBitmask >>= 1)
+		{
+		installedDriveList[i] = installedDrivesBitmask & 0x1;
+		}
+	
+	TPtrC version(KNullDesC());
+	if(!aStmt.IsFieldNullL(12))
+		version.Set(aStmt.StrColumnL(12));
+	
+	TPtrC installTime = aStmt.StrColumnL(13);
+		
+	CComponentEntry *entry = CComponentEntry::NewL(componentId, KNullDesC, KNullDesC, KNullDesC, *globalId, removable, size, scomoState, installedDriveList, version, installTime, drmProtected, hidden, knownRevoked, originVerified);
+	CleanupStack::PopAndDestroy(globalId);
+	return entry;
+	}
+
+//
+// aLocalizableStmtStr = A SELECT statement which queries a table for a specific locale. In other words, the statement has got a locale condition.
+// aAnyValueStmtStr = A SELECT statement which doesn't contain a locale condition. The result row set will include records with any locale.
+// aConditionIntValue = The value of the integer condition of the statements given.
+// aConditionLocale = The value of the locale condition of the localizable statement (first parameter).
+//
+CStatement* CScrRequestImpl::ExecuteLocalizableStatementL(const TDesC& aLocalizableStmtStr, const TDesC& aAnyValueStmtStr, TInt aConditionIntValue, TLanguage aConditionLocale) const
+	{
+	TInt numberOfValues = 2;
+	CStatement *stmtLoc(0);
+	
+	if(KUnspecifiedLocale == aConditionLocale)
+		{
+		// The locale is not specified. So, first try to run the statement for the current locale and its downgraded languages.
+		stmtLoc = CreateStatementObjectWithLocaleL(aLocalizableStmtStr, User::Language(), numberOfValues, EValueInteger, aConditionIntValue, EValueLanguage);
+		if (!stmtLoc)
+			{
+			// No result for the current locale at all. Try to find non-localized values.
+			stmtLoc = CreateStatementObjectWithLocaleL(aLocalizableStmtStr, KNonLocalized, numberOfValues, EValueInteger, aConditionIntValue, EValueLanguage);			
+			}
+
+		if (!stmtLoc)
+			{
+			// No result for the current locale or the non-localized, "neutral" locale. Try finding any locale
+			stmtLoc = CreateStatementObjectWithoutLocaleL(aAnyValueStmtStr, 1, EValueInteger, aConditionIntValue);		
+			}
+		}
+		else if(KNonLocalized == aConditionLocale)
+			{
+			// Only non-localized names are requested.
+			stmtLoc = CreateStatementObjectWithLocaleL(aLocalizableStmtStr, KNonLocalized, numberOfValues, EValueInteger, aConditionIntValue, EValueLanguage);
+			}
+		else
+			{
+			// Names are requested for a particular locale.
+			stmtLoc = CreateStatementObjectWithLocaleL(aLocalizableStmtStr, aConditionLocale, numberOfValues, EValueInteger, aConditionIntValue, EValueLanguage);
+			}
+	
+	return stmtLoc;
+	}
+
+void CScrRequestImpl::AddComponentEntryLocalizablesL(TComponentId aComponentId, CComponentEntry& aEntry, TLanguage aLocale) const
+	{
+	_LIT(KSelectLocalizableNames, "SELECT Name,Vendor FROM ComponentLocalizables WHERE ComponentId=? AND Locale=?;");
+	_LIT(KSelectAnyNames, "SELECT Name,Vendor FROM ComponentLocalizables WHERE ComponentId=?;");
+	
+	CStatement *stmtLoc = ExecuteLocalizableStatementL(KSelectLocalizableNames, KSelectAnyNames, aComponentId, aLocale);	
+	if(!stmtLoc)
+		{
+		DEBUG_PRINTF3(_L8("Name and Vendor couldn't be found for the component (%d) and locale(%d)."), aComponentId, aLocale);
+		User::Leave(KErrScrUnsupportedLocale);
+		}
+
+	CleanupStack::PushL(stmtLoc);	
+		
+	TPtrC name(stmtLoc->StrColumnL(0));
+	TPtrC vendor(stmtLoc->StrColumnL(1));
+	DeleteObjectZ(aEntry.iName);
+	aEntry.iName = name.AllocL(); // Ownership is transferred to the entry object
+	DeleteObjectZ(aEntry.iVendor);
+	if ( 0 != vendor.Ptr())
+		aEntry.iVendor = vendor.AllocL(); // Ownership is transferred to the entry object
+	else
+		aEntry.iVendor = HBufC::NewL(1);
+	
+	CleanupStack::PopAndDestroy(stmtLoc);
+	}
+
+void CScrRequestImpl::AddSoftwareTypeNameToComponentEntryL(CStatement& aStmt, CComponentEntry& aEntry, TLanguage aLocale) const
+	{
+	TInt softwareTypeId = aStmt.IntColumnL(1);
+	_LIT(KSelectLocalizableSwTypeName, "SELECT Name FROM SoftwareTypeNames WHERE SoftwareTypeId=? AND Locale=?;");
+	CStatement *stmtLoc = ExecuteLocalizableStatementL(KSelectLocalizableSwTypeName, KSelectLocalizableSwTypeName, softwareTypeId, aLocale);
+	if(stmtLoc)
+		{
+		CleanupStack::PushL(stmtLoc);
+		TPtrC name(stmtLoc->StrColumnL(0));
+		DeleteObjectZ(aEntry.iSwType);
+		aEntry.iSwType = name.AllocL(); // Ownership is transferred to the entry object
+		CleanupStack::PopAndDestroy(stmtLoc);
+		return;
+		}
+	
+	// The software type doesn't exist or there is no localized name of the software type, add the unique software type name
+	TPtrC uniqueSwTypeName = aStmt.StrColumnL(2);
+	DeleteObjectZ(aEntry.iSwType);
+	aEntry.iSwType = uniqueSwTypeName.AllocL(); // Ownership is transferred to the entry object
+	}
+
+void CScrRequestImpl::GetGeneralComponentEntrySizeL(const RMessage2& aMessage, const TDesC& aConditionColumn, TUint32 aConditionValue, TInt aReturnSizeSlot, TLanguage aLocale, CComponentEntry*& aComponentEntry) const
+	{
+	_LIT(KSelectComponents, "SELECT ComponentId,SoftwareTypeId,SoftwareTypeName,Removable,Size,ScomoState,DRMProtected,Hidden,KnownRevoked,OriginVerified,GlobalId,InstalledDrives,Version,InstallTime FROM Components WHERE %S=?;");
+	
+	TInt formattedLen = aConditionColumn.Length();
+	HBufC *statementStr = FormatStatementLC(KSelectComponents(), formattedLen, &aConditionColumn);
+	CStatement *stmt = iDbHandle->PrepareStatementLC(*statementStr);
+	stmt->BindIntL(1, aConditionValue);
+		
+	if(!stmt->ProcessNextRowL())
+		{
+		DEBUG_PRINTF2(_L8("The component(%d) couldn't be found. The size returned is zero."), aConditionValue);
+		WriteIntValueL(aMessage, aReturnSizeSlot, 0);
+		CleanupStack::PopAndDestroy(2, statementStr); // statementStr, stmt
+		return;
+		}
+		
+	DeleteObjectZ(aComponentEntry);
+	aComponentEntry = CreateComponentEntryFromStatementHandleL(*stmt);
+	AddComponentEntryLocalizablesL(aComponentEntry->ComponentId(), *aComponentEntry, aLocale);
+	AddSoftwareTypeNameToComponentEntryL(*stmt, *aComponentEntry, aLocale);
+	
+	WriteObjectSizeL(aMessage, aReturnSizeSlot, aComponentEntry);
+	CleanupStack::PopAndDestroy(2, statementStr); // statementStr, stmt
+	}
+
+void CScrRequestImpl::GetComponentEntrySizeL(const RMessage2& aMessage) const
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	DEBUG_PRINTF2(_L8("Returning the entry size of component(%d)."), componentId);
+	TLanguage locale = TLanguage(aMessage.Int1());
+	
+	_LIT(KConditionColumn, "ComponentId");
+	TInt returnSizeSlot=2;
+	GetGeneralComponentEntrySizeL(aMessage, KConditionColumn(), componentId, returnSizeSlot, locale, iComponentEntry);
+	}
+	
+void CScrRequestImpl::GetComponentEntryDataL(const RMessage2& aMessage) const
+	{
+	DEBUG_PRINTF(_L8("Returning the component entry data."));
+	WriteObjectDataL(aMessage, 0, iComponentEntry);
+	DeleteObjectZ(iComponentEntry); // Delete the object to prevent it to be resent.
+	}
+
+void CScrRequestImpl::GetComponentLocalizedEntrySizeL(const RMessage2& aMessage) const
+    {
+    TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+    DEBUG_PRINTF2(_L8("Returning the localized information entry size of component(%d)."), componentId);
+    _LIT(KSelectMatchingSupportedLocales, "SELECT Locale, Name, Vendor FROM ComponentLocalizables WHERE ComponentId=?;");
+    CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectMatchingSupportedLocales);
+    stmt->BindIntL(1, componentId);
+    while(stmt->ProcessNextRowL())
+       {
+        TPtrC name(stmt->StrColumnL(1));
+        TPtrC vendor(stmt->StrColumnL(2));
+        TInt locale(stmt->IntColumnL(0)); 
+        CLocalizableComponentInfo *compLocalizedInfo = Usif::CLocalizableComponentInfo::NewLC( name, vendor,(TLanguage)locale);
+        iCompLocalizedInfoArray.Insert(compLocalizedInfo,iCompLocalizedInfoArray.Count());
+        CleanupStack::Pop(compLocalizedInfo);
+        }
+    // Release allocated memories
+    CleanupStack::PopAndDestroy(1, stmt); // stmt
+    WriteArraySizeL(aMessage, 1, iCompLocalizedInfoArray);
+    }
+
+void CScrRequestImpl::GetComponentLocalizedEntryDataL(const RMessage2& aMessage) const
+    {
+    DEBUG_PRINTF(_L8("Returning the localized information entry data."));
+    WriteArrayDataL(aMessage, 0, iCompLocalizedInfoArray);
+    iCompLocalizedInfoArray.ResetAndDestroy(); 
+    }
+
+TBool CompareProperties(const CPropertyEntry& aRhs, const CPropertyEntry& aLhs)
+	{
+	return ((aRhs.PropertyType() == aLhs.PropertyType()) && 
+		   (aRhs.PropertyName() == aLhs.PropertyName()));		   
+	}
+
+void CScrRequestImpl::AddGeneralPropertiesArrayWithLocaleL(const TDesC& aStmtStr, TLanguage aLocale, TComponentId aIdColumnValue, RPointerArray<CPropertyEntry>& aProperties) const
+	{
+	TInt numberOfValues = 2;
+	CStatement *stmt = CreateStatementObjectWithLocaleL(aStmtStr, aLocale, numberOfValues, EValueInteger, aIdColumnValue, EValueLanguage);
+	if(!stmt)
+		{
+		return;
+		}
+	CleanupStack::PushL(stmt);	
+	do
+		{
+		TPtrC name(stmt->StrColumnL(0));
+		CPropertyEntry *entry = GetPropertyEntryL(*stmt, name, 1); // aStartingIndex=1
+		CleanupStack::PushL(entry);
+		if(KErrNotFound == aProperties.Find(entry, TIdentityRelation<CPropertyEntry>(CompareProperties)))
+			{
+			aProperties.AppendL(entry);
+			CleanupStack::Pop(entry);	// because array is now owner
+			}
+		else
+			{
+			CleanupStack::PopAndDestroy(entry);
+			}
+		} while(stmt->ProcessNextRowL());
+	CleanupStack::PopAndDestroy(stmt);
+	}
+
+void CScrRequestImpl::GetGeneralPropertiesArrayL(const TDesC& aTableName, const TDesC& aIdColumnName , TComponentId aIdColumnValue, TLanguage aLocale, RPointerArray<CPropertyEntry>& aProperties) const
+	{
+	_LIT(KSelectGeneralLocalizableProperties, "SELECT Name,IntValue,StrValue,Locale,IsStr8Bit FROM %S WHERE %S=? AND Locale=?;");
+	TInt formattedLen = aTableName.Length() + aIdColumnName.Length();
+	HBufC *statementStr = FormatStatementLC(KSelectGeneralLocalizableProperties, formattedLen, &aTableName, &aIdColumnName );
+	
+	if(KUnspecifiedLocale == aLocale)
+		{
+		// Locale is not specified. First get non-localized properties
+		AddGeneralPropertiesArrayWithLocaleL(*statementStr, KNonLocalized, aIdColumnValue, aProperties);		
+		// Then get the localizable properties with the current locale
+		AddGeneralPropertiesArrayWithLocaleL(*statementStr, User::Language(), aIdColumnValue, aProperties);
+		}
+	else if(KNonLocalized == aLocale)
+		{
+		// Only non-localized properties are requested.
+		AddGeneralPropertiesArrayWithLocaleL(*statementStr, KNonLocalized, aIdColumnValue, aProperties);
+		}
+	else
+		{
+		// Locale is specified. It means that only properties with this locale are wanted
+		AddGeneralPropertiesArrayWithLocaleL(*statementStr, aLocale, aIdColumnValue, aProperties);
+		}
+	
+	CleanupStack::PopAndDestroy(statementStr);
+#ifdef _DEBUG		
+	if(!aProperties.Count())
+		DEBUG_PRINTF4(_L("Property couldn't be found for column name=(%S), column id=%d and locale=%d."), &aIdColumnName, aIdColumnValue, aLocale);
+#endif
+	}
+
+void CScrRequestImpl::GetFilePropertiesSizeL(const RMessage2& aMessage) const
+	{
+	DEBUG_PRINTF(_L8("Returning the size of file properties."));
+	
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	HBufC* fileName  = ReadFileNameFromMsgLC(aMessage);
+	
+	TInt compFileId = FindComponentFileL(*fileName, componentId);
+	
+	iProperties.ResetAndDestroy();
+	GetGeneralPropertiesArrayL(KFilePropertiesTable(), KCompFileIdColumnName, compFileId, KNonLocalized, iProperties);
+	CleanupStack::PopAndDestroy(fileName);
+	WriteArraySizeL(aMessage, 2, iProperties);
+	}
+
+void CScrRequestImpl::GetFilePropertiesDataL(const RMessage2& aMessage) const
+	{
+	DEBUG_PRINTF(_L8("Returning the file properties data."));
+	WriteArrayDataL(aMessage, 0, iProperties);	
+	}
+
+CPropertyEntry* CScrRequestImpl::GetPropertyEntryL(CStatement& aStmt, const TDesC& aPropName, TInt aStartingIndex) const
+	{
+	CPropertyEntry *entry(0);
+		
+	if(!aStmt.IsFieldNullL(aStartingIndex))
+		{
+		TInt64 intVal = aStmt.Int64ColumnL(aStartingIndex);
+		entry = CIntPropertyEntry::NewL(aPropName, intVal);
+		}
+	else if(!aStmt.IsFieldNullL(aStartingIndex+1))
+		{
+		TBool is8BitString = (aStmt.IntColumnL(aStartingIndex + 3) != 0);
+		if (is8BitString)
+			{
+			TPtrC8 binaryVal(aStmt.BinaryColumnL(aStartingIndex+1));
+			entry = CBinaryPropertyEntry::NewL(aPropName, binaryVal);			
+			}
+		else
+			{
+			TPtrC strVal(aStmt.StrColumnL(aStartingIndex+1));
+			TLanguage locale = TLanguage(aStmt.IntColumnL(aStartingIndex + 2));
+			entry = CLocalizablePropertyEntry::NewL(aPropName, strVal, locale);			
+			}
+		}
+	else
+		{// Should never come here - shows DB inconsistency
+		DEBUG_PRINTF(_L("Both integer and string values are NULL. Inconsistency problem!"));
+		User::Leave(KErrCorrupt);
+		}	
+	return entry;
+	}
+
+CPropertyEntry* CScrRequestImpl::GetGeneralSinglePropertyL(const TDesC& aTableName, const TDesC& aIdColumnName , TInt aIdColumnValue, const TDesC& aPropName,  TLanguage aLocale) const
+	{
+	DEBUG_PRINTF5(_L("Getting general single property for %S. PropName=%S, Id=%d, Locale=%d"), &aIdColumnName , &aPropName, aIdColumnValue, aLocale);
+	
+	_LIT(KSelectSingleGeneralProperty, "SELECT IntValue,StrValue,Locale,IsStr8Bit FROM %S WHERE Name=? AND %S=? AND Locale=?;");
+	TInt formattedLen = aTableName.Length() + aIdColumnName.Length();
+	HBufC *statementStr = FormatStatementLC(KSelectSingleGeneralProperty, formattedLen, &aTableName, &aIdColumnName );
+	
+	CStatement *stmt = CreateGeneralPropertyStatementWithLocaleL(*statementStr, aIdColumnValue, aLocale, aPropName);
+	if(!stmt)
+		{
+		DEBUG_PRINTF4(_L("Property couldn't be found for column name=(%S), column id=%d and locale=%d."), &aIdColumnName, aIdColumnValue, aLocale);
+		CleanupStack::PopAndDestroy(statementStr);
+		return NULL;
+		}
+	CleanupStack::PushL(stmt);
+	
+	CPropertyEntry *entry = GetPropertyEntryL(*stmt, aPropName, 0); // aStartingIndex=0 
+	CleanupStack::PopAndDestroy(2, statementStr); // statementStr, stmt
+	return entry;
+	}
+
+void CScrRequestImpl::GetSingleFilePropertySizeL(const RMessage2& aMessage) const
+	{
+	DEBUG_PRINTF(_L8("Returning the size of single file property."));
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	HBufC* fileName  = ReadFileNameFromMsgLC(aMessage);
+	HBufC *propName = ReadDescLC(aMessage, 2);
+	
+	TInt compFileId = FindComponentFileL(*fileName, componentId);
+	
+	DeleteObjectZ(iSingleProperty);
+	iSingleProperty = GetGeneralSinglePropertyL(KFilePropertiesTable(), KCompFileIdColumnName, compFileId, *propName, KNonLocalized);
+	CleanupStack::PopAndDestroy(2, fileName); // fileName, propName
+	WriteObjectSizeL(aMessage, 3, iSingleProperty);
+	}
+
+void CScrRequestImpl::GetSingleFilePropertyDataL(const RMessage2& aMessage) const
+	{
+	DEBUG_PRINTF(_L8("Returning the single file property data."));
+	WriteObjectDataL(aMessage, 0, iSingleProperty);	
+	DeleteObjectZ(iSingleProperty); // Delete the object to prevent it to be resent.
+	}
+
+void CScrRequestImpl::GetComponentFilesCountL(const RMessage2& aMessage) const
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+
+	DEBUG_PRINTF2(_L8("Returning the files count for component %d."), componentId);
+	
+	_LIT(KGetComponentFilesCount, "SELECT COUNT(CmpFileId) FROM ComponentsFiles WHERE ComponentId=?;");
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KGetComponentFilesCount);
+	stmt->BindIntL(1, componentId);
+
+	TBool res = stmt->ProcessNextRowL();
+	// DB Query did not return a single row for component files count query - internal error!
+	__ASSERT_ALWAYS(res, User::Leave(KErrAbort));
+
+	TInt filesCountTmp = stmt->IntColumnL(0);
+	__ASSERT_DEBUG(filesCountTmp >= 0, User::Leave(KErrAbort));
+	TUint filesCount = static_cast<TUint>(filesCountTmp);
+	CleanupStack::PopAndDestroy(stmt);
+	
+	TPckg<TUint> filesCountPkg(filesCount);
+	aMessage.WriteL(1, filesCountPkg);
+	}
+
+void CScrRequestImpl::GetFileComponentsL(const TDesC& aFileName, RArray<TComponentId>& aComponents) const
+	{
+	_LIT(KSelectFileComponents, "SELECT ComponentId FROM ComponentsFiles WHERE LocationHash=?;");
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectFileComponents);
+	TUint32 hash = HashCaseInsensitiveL(aFileName);
+	stmt->BindIntL(1, hash);
+		
+	while(stmt->ProcessNextRowL())
+		{
+		User::LeaveIfError(aComponents.InsertInOrder(stmt->IntColumnL(0)));
+		}
+	CleanupStack::PopAndDestroy(stmt);
+	}
+
+void CScrRequestImpl::GetFileComponentsSizeL(const RMessage2& aMessage) const
+	{
+	HBufC *fileName = ReadDescLC(aMessage, 0);
+	
+	iFileComponents.Reset();
+	GetFileComponentsL(*fileName, iFileComponents);
+	CleanupStack::PopAndDestroy(fileName);
+	
+	WriteArraySizeL(aMessage, 1, iFileComponents);
+	}
+
+void CScrRequestImpl::GetFileComponentsDataL(const RMessage2& aMessage) const
+	{
+	WriteArrayDataL(aMessage, 0, iFileComponents);
+	}
+	
+void CScrRequestImpl::GetComponentPropertiesSizeL(const RMessage2& aMessage) const
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	TLanguage locale = TLanguage(aMessage.Int1());
+	
+	iProperties.ResetAndDestroy();
+	GetGeneralPropertiesArrayL(KComponentPropertiesTable(), KComponentIdColumnName, componentId, locale, iProperties);
+	WriteArraySizeL(aMessage, 2, iProperties);
+	}
+
+void CScrRequestImpl::GetComponentPropertiesDataL(const RMessage2& aMessage) const
+	{
+	WriteArrayDataL(aMessage, 0, iProperties);
+	}
+
+void CScrRequestImpl::GetComponentSinglePropertySizeL(const RMessage2& aMessage) const
+	{ 
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	HBufC *propName = ReadDescLC(aMessage, 1);
+	TLanguage locale = TLanguage(aMessage.Int2());
+	
+	DeleteObjectZ(iSingleProperty);
+	iSingleProperty = GetGeneralSinglePropertyL(KComponentPropertiesTable(), KComponentIdColumnName, componentId, *propName, locale);
+	CleanupStack::PopAndDestroy(propName);
+	WriteObjectSizeL(aMessage, 3, iSingleProperty);
+	}
+
+void CScrRequestImpl::GetComponentSinglePropertyDataL(const RMessage2& aMessage) const
+	{
+	WriteObjectDataL(aMessage, 0, iSingleProperty);
+	DeleteObjectZ(iSingleProperty); // Delete the object to prevent it to be resent.
+	}
+
+TUint32 CScrRequestImpl::ReadAndHashGlobalIdL(const RMessage2& aMessage, TInt aGlobalIdNameSlot, TInt aSwTypeNameSlot) const
+	{
+	HBufC *globalIdName = ReadDescLC(aMessage, aGlobalIdNameSlot);
+	HBufC *swTypeName = ReadDescLC(aMessage, aSwTypeNameSlot);
+	
+	// Concatenate the software type id with the global id name
+	HBufC *globalId = GenerateGlobalIdL(*swTypeName, *globalIdName);
+	CleanupStack::PushL(globalId);
+	// Hash the concatenated value
+	TUint32 globalIdHash = HashCaseSensitiveL(*globalId);
+	CleanupStack::PopAndDestroy(3, globalIdName); // globalIdName, swTypeName, concatGlobalId
+	return globalIdHash;
+	}
+
+void CScrRequestImpl::GetComponentIdL(const RMessage2& aMessage) const
+	{
+	DEBUG_PRINTF(_L8("Returning the local component id of a received global id."));
+	
+	TUint32 globalIdHash = ReadAndHashGlobalIdL(aMessage, 0, 1);
+	
+	_LIT(KSelectComponentId, "SELECT ComponentId FROM Components WHERE GlobalIdHash=?;");
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectComponentId);
+	stmt->BindIntL(1, globalIdHash);
+			
+	if(!stmt->ProcessNextRowL())
+		{
+		DEBUG_PRINTF2(_L8("There is no local component id corresponding to the supplied global id (hash=%d)."), globalIdHash);
+		User::Leave(KErrNotFound);
+		}
+	
+	TComponentId compId = stmt->IntColumnL(0);
+	CleanupStack::PopAndDestroy(stmt);
+	
+	TPckg<TComponentId> componentIdDes(compId);
+	aMessage.WriteL(2, componentIdDes);
+	}
+
+void CScrRequestImpl::GetComponentWithGlobalIdSizeL(const RMessage2& aMessage) const
+	{
+	TUint32 globalIdHash = ReadAndHashGlobalIdL(aMessage, 0, 1);
+	TLanguage locale = TLanguage(aMessage.Int2());
+	
+	_LIT(KConditionColumn, "GlobalIdHash");
+	TInt returnSizeSlot=3;
+	GetGeneralComponentEntrySizeL(aMessage, KConditionColumn(), globalIdHash, returnSizeSlot, locale, iComponentEntry);
+	}
+
+void CScrRequestImpl::GetComponentWithGlobalIdDataL(const RMessage2& aMessage) const
+	{
+	WriteObjectDataL(aMessage, 0, iComponentEntry);
+	DeleteObjectZ(iComponentEntry); // Delete the object to prevent the usage of this function
+								    // without calling GetComponentWithGlobalIdSizeL.
+	}
+
+CGlobalComponentId* CScrRequestImpl::ParseGlobalComponendIdLC(const TDesC& aGlobalId) const
+	{
+	TChar nullCr = '\0';
+	TInt pos = aGlobalId.Locate(nullCr);
+	__ASSERT_ALWAYS(pos != KErrNotFound, User::Leave(KErrCorrupt));
+	
+	TPtrC swTypeName = aGlobalId.Left(pos);
+	TPtrC globalIdName = aGlobalId.Right(aGlobalId.Length() - pos - 1);
+	
+	return CGlobalComponentId::NewLC(globalIdName, swTypeName);
+	}
+
+void CScrRequestImpl::GetGeneralDependencyListL(const TDesC& aSelectColumn, const TDesC& aConditionColumn, const TDesC& aConditionValue, RPointerArray<CVersionedComponentId> &aVerCompIdList) const
+	{
+	_LIT(KSelectDependencies, "SELECT %S,VersionFrom,VersionTo FROM ComponentDependencies WHERE %S=?;");
+	TInt formattedLen = aSelectColumn.Length() + aConditionColumn.Length();
+	HBufC *stmtStr = FormatStatementLC(KSelectDependencies(), formattedLen, &aSelectColumn, &aConditionColumn);
+	
+	CStatement *stmt = iDbHandle->PrepareStatementLC(*stmtStr);
+	TUint32 conditionValueHash = HashCaseSensitiveL(aConditionValue);
+	stmt->BindIntL(1, conditionValueHash);
+	
+	while(stmt->ProcessNextRowL())
+		{
+		TPtrC selectedGlobalId(stmt->StrColumnL(0));
+		CGlobalComponentId *globalId = ParseGlobalComponendIdLC(selectedGlobalId);
+		
+		TPtrC versionFrom;
+		ReadNullableStringFromStatementL(*stmt, versionFrom, 1);
+		TPtrC versionTo;
+		ReadNullableStringFromStatementL(*stmt, versionTo, 2);
+		
+		CVersionedComponentId *verCompId = CVersionedComponentId::NewLC(*globalId, &versionFrom, &versionTo);
+		aVerCompIdList.AppendL(verCompId);
+		
+		CleanupStack::Pop(verCompId); // Ownership passed to the array
+		CleanupStack::PopAndDestroy(globalId);
+		}
+	
+	CleanupStack::PopAndDestroy(2, stmtStr); // stmtStr, stmt
+	}
+
+void CScrRequestImpl::GetSupplierComponentsSizeL(const RMessage2& aMessage) const
+	{
+	HBufC *dependantGlobalId = ReadAndGetGlobalIdLC(aMessage, 0);
+	
+	_LIT(KSelectColumn, "SupplierGlobalId");
+	_LIT(KConditionColumn, "DependantGlobalIdHash");
+	iVerCompIdList.ResetAndDestroy();
+	
+	GetGeneralDependencyListL(KSelectColumn(), KConditionColumn(), *dependantGlobalId, iVerCompIdList);
+	CleanupStack::PopAndDestroy(dependantGlobalId);
+	WriteArraySizeL(aMessage, 1, iVerCompIdList);
+	}
+
+void CScrRequestImpl::GetSupplierComponentsDataL(const RMessage2& aMessage) const
+	{
+	WriteArrayDataL(aMessage, 0, iVerCompIdList);
+	}
+
+void CScrRequestImpl::GetDependantComponentsSizeL(const RMessage2& aMessage) const
+	{
+
+	HBufC *supplierGlobalId = ReadAndGetGlobalIdLC(aMessage, 0);
+		
+	_LIT(KSelectColumn, "DependantGlobalId");
+	_LIT(KConditionColumn, "SupplierGlobalIdHash");
+	iVerCompIdList.ResetAndDestroy();
+		
+	GetGeneralDependencyListL(KSelectColumn(), KConditionColumn(), *supplierGlobalId, iVerCompIdList);
+	CleanupStack::PopAndDestroy(supplierGlobalId);
+	WriteArraySizeL(aMessage, 1, iVerCompIdList);
+	}
+
+void CScrRequestImpl::GetDependantComponentsDataL(const RMessage2& aMessage) const
+	{
+	WriteArrayDataL(aMessage, 0, iVerCompIdList);
+	}
+		
+void CScrRequestImpl::GetIsMediaPresentL(const RMessage2& aMessage) const
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	DEBUG_PRINTF2(_L8("Retrieving media presence of component(%d)."), componentId);
+
+	TBool result = CheckForMediaPresenceL(componentId);
+	
+	TPckg<TBool> resultPkg(result);
+	aMessage.WriteL(1, resultPkg);	
+	}
+
+TBool CScrRequestImpl::CheckForMediaPresenceL(TComponentId aComponentId) const
+	{
+	TInt componentDrivesBitmask = GetInstalledDrivesBitmaskL(aComponentId);	
+	
+	TDriveList presentDriveSet;
+	User::LeaveIfError(iFs.DriveList(presentDriveSet));	
+	
+	// Check for each drive whether it is present in the system
+	for (TInt drive=0; componentDrivesBitmask; componentDrivesBitmask >>= 1, ++drive)
+		{
+		if ((componentDrivesBitmask & 0x1) && (presentDriveSet.Length() <= drive || !presentDriveSet[drive]))
+			{
+			DEBUG_PRINTF3(_L8("Component %d registers a file at drive %c which is not present. Returning EFalse for IsMediaPresent)."), aComponentId, drive + 'a');
+			return EFalse;			
+			}
+		}
+	
+	return ETrue;
+	}
+
+void CScrRequestImpl::SetScomoStateL(const RMessage2& aMessage)
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	TScomoState state = static_cast<TScomoState>(aMessage.Int1());
+	DEBUG_PRINTF3(_L8("Updating the scomo state of component(%d). New value=%d."), componentId, state);
+	
+	_LIT(KUpdateScomoState, "UPDATE Components SET ScomoState=? WHERE ComponentId=?;");
+	TInt numberOfValues = 2;
+	ExecuteStatementL(KUpdateScomoState, numberOfValues, EValueInteger, state, EValueInteger, componentId);
+	}
+
+void CScrRequestImpl::GetPluginUidWithMimeTypeL(const RMessage2& aMessage) const
+	{
+	DEBUG_PRINTF(_L8("Returning plugin for MIME type."));
+	HBufC *mimeType = ReadDescLC(aMessage, 0);
+	
+	_LIT(KSelectPluginsWithMimeType, "SELECT SifPluginUid FROM SoftwareTypes WHERE SoftwareTypeId IN (SELECT SoftwareTypeId FROM MimeTypes WHERE MimeType=?);");
+	CStatement* stmt = iDbHandle->PrepareStatementLC(KSelectPluginsWithMimeType);
+	stmt->BindStrL(1, *mimeType);
+	if(!stmt->ProcessNextRowL())
+		{
+		DEBUG_PRINTF2(_L("Sif Plugin Uid couldn't be found for Mime Type (%S)!"), mimeType);
+		User::Leave(KErrSifUnsupportedSoftwareType);
+		}
+	TUint32 uid = stmt->IntColumnL(0);
+	CleanupStack::PopAndDestroy(2, mimeType); // mimeType, stmt
+	
+	TPckg<TUint32> uidDes(uid);
+	aMessage.WriteL(1, uidDes);
+	}
+
+TBool CScrRequestImpl::GetIntSoftwareTypeDataForComponentLC(TComponentId aComponentId, const TDesC& aColumnName, TInt& aValue) const
+	{
+	_LIT(KSelectComponents, "SELECT SoftwareTypeId FROM Components WHERE ComponentId=?;");
+	TBool found = EFalse;
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectComponents);
+	stmt->BindIntL(1, aComponentId);
+	if(!stmt->ProcessNextRowL())
+		{
+		DEBUG_PRINTF2(_L("Component Id (%d) doesn't exist in the SCR database!"), aComponentId);
+		User::LeaveIfError(KErrNotFound);
+		}
+	TInt swTypeId = stmt->IntColumnL(0);
+	CleanupStack::PopAndDestroy(stmt);
+	
+	_LIT(KSelectSoftwareTypes, "SELECT %S FROM SoftwareTypes WHERE SoftwareTypeId=?;");
+	HBufC *statementStr = FormatStatementLC(KSelectSoftwareTypes(), aColumnName.Length(), &aColumnName);
+	CStatement *stmtSwType = iDbHandle->PrepareStatementLC(*statementStr);
+	stmtSwType->BindIntL(1, swTypeId);
+	
+	if(stmtSwType->ProcessNextRowL())
+		{
+		aValue = stmtSwType->IntColumnL(0);
+		found = ETrue;
+		}
+	CleanupStack::PopAndDestroy(2, statementStr); // statementStr, stmtSwType
+	return found;
+	}
+
+TBool CScrRequestImpl::GetInstallerSidForComponentL(TComponentId aComponentId, TSecureId& aSid) const	
+	{
+	_LIT(KInstallerSecureId, "InstallerSecureId");
+	TInt secureIdInt (0);
+	TBool found = GetIntSoftwareTypeDataForComponentLC(aComponentId, KInstallerSecureId, secureIdInt);	
+	aSid.iId = secureIdInt;
+	return found;
+	}
+
+TBool CScrRequestImpl::GetExecutionEnvSidForComponentL(TComponentId aComponentId, TSecureId& aSid) const
+	{
+	_LIT(KExecutionLayerSecureId, "ExecutionLayerSecureId");
+	TInt secureIdInt(0);
+	TBool found = GetIntSoftwareTypeDataForComponentLC(aComponentId, KExecutionLayerSecureId, secureIdInt);	
+	aSid.iId = secureIdInt;
+	return found;	
+	}
+
+TBool CScrRequestImpl::IsInstallerOrExecutionEnvSidL(TSecureId& aSid) const
+	{
+	_LIT(KSelectStatement, "SELECT InstallerSecureId FROM SoftwareTypes WHERE InstallerSecureId=? OR ExecutionLayerSecureId=?;");
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectStatement);
+	stmt->BindIntL(1, aSid);
+	stmt->BindIntL(2, aSid);	
+	TBool res = ETrue;
+	if(!stmt->ProcessNextRowL())
+		{
+		DEBUG_PRINTF2(_L("%d is not an installer SID"), TUint32(aSid));
+		res = EFalse;
+		}
+	CleanupStack::PopAndDestroy(stmt);
+	return res;	
+	}
+
+void CScrRequestImpl::GetPluginUidWithComponentIdL(const RMessage2& aMessage) const
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	DEBUG_PRINTF2(_L8("Returning the plugin of component(%d)."), componentId);
+	_LIT(KSifPluginUid, "SifPluginUid");
+	TInt uid (0);
+	TBool found = GetIntSoftwareTypeDataForComponentLC(componentId, KSifPluginUid, uid);
+	__ASSERT_ALWAYS(found, User::Leave(KErrNotFound));
+	
+	TPckg<TUint32> uidDes(uid);
+	aMessage.WriteL(1, uidDes);
+	}
+
+// This function returns whether the SID looked up has been found in the software types table.
+TBool CScrRequestImpl::GetSidsForSoftwareTypeL(const HBufC* aSoftwareTypeName, TSecureId& aInstallerSid, TSecureId& aExecutableEnvSid) const
+	{
+	DEBUG_PRINTF2(_L("Returning SIDs for software type(%S)."), aSoftwareTypeName);
+	TBool found = EFalse;
+	TUint32 swTypeId = HashCaseSensitiveL(*aSoftwareTypeName);
+	
+	_LIT(KSelectStatement, "SELECT ExecutionLayerSecureId, InstallerSecureId FROM SoftwareTypes WHERE SoftwareTypeId =?;");
+	CStatement* stmt = iDbHandle->PrepareStatementLC(KSelectStatement);
+	stmt->BindIntL(1, swTypeId);
+	
+	if(stmt->ProcessNextRowL())
+		{
+		aExecutableEnvSid = stmt->IntColumnL(0);
+		aInstallerSid = stmt->IntColumnL(1);
+		found = ETrue;
+		}
+	
+	CleanupStack::PopAndDestroy(stmt);
+	return found;
+	}
+
+void IntersectSortedArraysL(RArray<TComponentId>& aLhs, RArray<TComponentId> aRhs)
+	{
+	RArray<TComponentId> tmp;
+	CleanupClosePushL(tmp);
+	TInt idxLhs(0);
+	TInt idxRhs(0);
+	TInt countLhs = aLhs.Count();
+	TInt countRhs = aRhs.Count();
+	
+	while(idxLhs < countLhs && idxRhs < countRhs)
+		{
+		if(aLhs[idxLhs] < aRhs[idxRhs])
+			++idxLhs;
+		else if(aLhs[idxLhs] > aRhs[idxRhs])
+			++idxRhs;
+		else
+			{
+			tmp.AppendL(aRhs[idxRhs]);
+			++idxRhs;
+			++idxLhs;
+			}
+		}
+	
+	aLhs.Reset();
+	CopyFixedLengthArrayL(aLhs, tmp);
+	CleanupStack::PopAndDestroy(&tmp);
+	}
+
+void CScrRequestImpl::GetComponentIdsHavingThePropertiesL(RArray<TComponentId>& aComponentIds, RPointerArray<CPropertyEntry> aProperties, TBool aDoIntersect) const
+	{
+	// GROUP BY is added at the end to avoid fetching twice components which have the same localizable values for different locales
+	_LIT(KFindComponentsFromProperties, "SELECT ComponentId FROM ComponentProperties WHERE Name=? AND %S GROUP BY ComponentId;");
+	_LIT(KPropertyIntValue,"IntValue=?");
+	_LIT(KPropertyStrValue,"StrValue=?");
+	_LIT(KPropertyLocalizedValue,"StrValue=? AND Locale=?");
+			
+	TInt propCount = aProperties.Count();
+
+	HBufC *statementStr(0);
+	RArray<TComponentId> propCompIds;
+	CleanupClosePushL(propCompIds);
+	
+	for(TInt i=0; i<propCount; ++i)
+		{
+		switch(aProperties[i]->PropertyType())
+			{
+			case CPropertyEntry::EIntProperty:
+				statementStr = FormatStatementLC(KFindComponentsFromProperties, KPropertyIntValue().Length(), &KPropertyIntValue());
+				break;
+			case CPropertyEntry::EBinaryProperty:
+				statementStr = FormatStatementLC(KFindComponentsFromProperties, KPropertyStrValue().Length(), &KPropertyStrValue());
+				break;
+			case CPropertyEntry::ELocalizedProperty:
+				{
+				CLocalizablePropertyEntry *localizedProp = static_cast<CLocalizablePropertyEntry *>(aProperties[i]);
+				if (localizedProp->LocaleL() == KUnspecifiedLocale) // If the locale was not specified, then we match across all locales				
+					statementStr = FormatStatementLC(KFindComponentsFromProperties, KPropertyStrValue().Length(), &KPropertyStrValue());
+				else // Otherwise we match for a specific locale
+					statementStr = FormatStatementLC(KFindComponentsFromProperties, KPropertyLocalizedValue().Length(), &KPropertyLocalizedValue());
+				}
+				break;				
+			default:
+				DEBUG_PRINTF(_L8("The property type couldn't be recognized."));
+				User::Leave(KErrAbort);	
+			}
+				
+		CStatement *stmt = iDbHandle->PrepareStatementLC(*statementStr);
+		stmt->BindStrL(1, aProperties[i]->PropertyName());
+				
+		switch(aProperties[i]->PropertyType())
+			{
+			case CPropertyEntry::EIntProperty:
+				{
+				CIntPropertyEntry *intProp = static_cast<CIntPropertyEntry *>(aProperties[i]);
+				stmt->BindInt64L(2, intProp->Int64Value());
+				break;
+				}
+			case CPropertyEntry::EBinaryProperty:
+				{
+				CBinaryPropertyEntry *binaryProp = static_cast<CBinaryPropertyEntry *>(aProperties[i]);
+				stmt->BindBinaryL(2, binaryProp->BinaryValue());
+				break;
+				}
+			case CPropertyEntry::ELocalizedProperty:
+				{
+				CLocalizablePropertyEntry *localizedProp = static_cast<CLocalizablePropertyEntry *>(aProperties[i]);
+				stmt->BindStrL(2, localizedProp->StrValue());
+				if (localizedProp->LocaleL() != KUnspecifiedLocale)
+					stmt->BindIntL(3, localizedProp->LocaleL());
+				break;
+				}
+			default:
+				DEBUG_PRINTF(_L8("The property type couldn't be recognized."));
+				User::Leave(KErrAbort);	
+			}
+		
+		while(stmt->ProcessNextRowL())
+			{
+			User::LeaveIfError(propCompIds.InsertInOrder(stmt->IntColumnL(0)));
+			}
+		
+		CleanupStack::PopAndDestroy(2, statementStr); // stmt, statementStr
+		
+		if (aDoIntersect)
+			{
+			IntersectSortedArraysL(aComponentIds, propCompIds);
+			}
+		else
+			{
+			CopyFixedLengthArrayL(aComponentIds, propCompIds);
+			aDoIntersect = ETrue; // If many properties are present in the filter, we need to intersect the component Ids on further iterations
+			}
+		
+		propCompIds.Reset();
+		}
+	CleanupStack::PopAndDestroy(&propCompIds);
+	}
+
+void ReallocStatementIfNeededL(RBuf& aStatementStr, TInt aAddedLength)
+	{
+	TInt freeSpace = aStatementStr.MaxLength() - aStatementStr.Length();
+	TInt extraSpace = aAddedLength - freeSpace;
+	if (extraSpace > 0)
+		{
+		aStatementStr.ReAllocL(aStatementStr.MaxLength() +  extraSpace);
+		}	
+	}
+	
+void AppendConditionToStatementL(RBuf& aStatementStr, const TDesC& aConditionStr, TBool& aIsFirstCondition)
+	{
+	TInt addedLength = 2 + aConditionStr.Length(); // 2 chars used by spaces
+	
+	_LIT(KConditionAnd, " AND");
+	_LIT(KConditionWhere, " WHERE");
+	
+	if(aIsFirstCondition)
+		{
+		addedLength += KConditionWhere().Length();
+		}
+	else
+		{
+		addedLength += KConditionAnd().Length();
+		}
+	
+	ReallocStatementIfNeededL(aStatementStr, addedLength);
+	
+	if(aIsFirstCondition)
+		{
+		aStatementStr.Append(KConditionWhere);
+		aIsFirstCondition = EFalse;
+		}
+	else
+		{
+		aStatementStr.Append(KConditionAnd);
+		}
+	aStatementStr.Append(aConditionStr);
+	}
+
+CStatement* CScrRequestImpl::CreateStatementObjectForComponentLocalizablesLC(const TDesC& aName, const TDesC& aVendor, TUint aSetFlag, TComponentId aComponentId /* = 0*/ ) const
+	{
+	_LIT(KSelectComponentLocalizables, "SELECT ComponentId,Name,Vendor FROM ComponentLocalizables");
+	RBuf stmtStr;
+	stmtStr.CreateL(100); // 100 should be enough for this statement
+	stmtStr.CleanupClosePushL();
+	stmtStr.Copy(KSelectComponentLocalizables);
+	TBool isFirstCondition = ETrue;
+	
+	if(aComponentId > 0)
+		{
+		_LIT(KConditionComponentId, " ComponentId=?");
+		AppendConditionToStatementL(stmtStr, KConditionComponentId, isFirstCondition);	
+		}
+	
+	if (aSetFlag & CComponentFilter::EName)
+		{
+		_LIT(KConditionName, " Name=?");
+		AppendConditionToStatementL(stmtStr, KConditionName, isFirstCondition);	
+		}
+		
+	if (aSetFlag & CComponentFilter::EVendor)
+		{
+		_LIT(KConditionVendor, " Vendor=?");
+		AppendConditionToStatementL(stmtStr, KConditionVendor, isFirstCondition);
+		}		
+	// Take care not to return the same component id twice in case we have the same name or vendor for two different locales
+	_LIT(KComponentIdGroupBy, " GROUP BY ComponentId;");
+	ReallocStatementIfNeededL(stmtStr, KComponentIdGroupBy().Length() + 1); // one space for the NULL char
+	stmtStr.Append(KComponentIdGroupBy());
+	// SQLite requires the statement string to end with NULL char.
+	stmtStr.Append('\0');
+	
+	CStatement *stmt = iDbHandle->PrepareStatementLC(stmtStr);
+	
+	TInt bindIdx = 1;
+	if(aComponentId > 0)
+		{
+		stmt->BindIntL(bindIdx++, aComponentId);
+		}
+	if (aSetFlag & CComponentFilter::EName)
+		{
+		stmt->BindStrL(bindIdx++, aName);
+		}
+	if (aSetFlag & CComponentFilter::EVendor)
+		{
+		stmt->BindStrL(bindIdx, aVendor);
+		}
+	CleanupStack::Pop(stmt);
+	CleanupStack::PopAndDestroy(&stmtStr);
+	CleanupStack::PushL(stmt);
+	return stmt;
+	}
+
+void CScrRequestImpl::GetComponentsHavingNameVendorL(RArray<TComponentId>& aComponentIds, const TDesC& aName, const TDesC& aVendor, TUint16 aSetFlag, TBool aDoIntersect) const
+	{
+	CStatement *stmt = CreateStatementObjectForComponentLocalizablesLC(aName, aVendor, aSetFlag); 
+	
+	RArray<TComponentId> foundCompIds;
+	CleanupClosePushL(foundCompIds);
+	
+	while(stmt->ProcessNextRowL())
+		{
+		User::LeaveIfError(foundCompIds.InsertInOrder(stmt->IntColumnL(0)));
+		}
+	
+	if (aDoIntersect)
+		IntersectSortedArraysL(aComponentIds, foundCompIds);
+	else
+		CopyFixedLengthArrayL(aComponentIds, foundCompIds);
+
+	CleanupStack::PopAndDestroy(2, stmt); // stmt, foundCompIds
+	}
+
+CComponentFilter* CScrRequestImpl::ReadComponentFilterL(const RMessage2& aMessage) const
+	{
+	CComponentFilter *filter = ReadObjectFromMessageLC<CComponentFilter>(aMessage, 0);
+	CleanupStack::Pop(filter);
+	return filter;
+	}
+
+void AppendFilterConditionToStatementL(TUint16 aSetFlag, TUint16 aConditionFlag, RBuf& aStatementStr, const TDesC& aConditionStr, TBool& aIsFirstCondition)
+	{
+	if(aSetFlag & aConditionFlag)
+		{
+		AppendConditionToStatementL(aStatementStr, aConditionStr, aIsFirstCondition);
+		}
+	}
+
+void BindIntegerFilterToStatementL(CStatement& aStatement, TUint16 aSetFlag, TUint16 aConditionFlag, TInt aValue, TInt& aStmtIdx)
+	{
+	if(aSetFlag & aConditionFlag)
+		{
+		aStatement.BindIntL(aStmtIdx++, aValue);
+		}
+	}
+
+CStatement* CScrRequestImpl::OpenComponentViewL(CComponentFilter& aFilter, RArray<TComponentId>& aComponentFilterSuperset, TBool& aFilterSupersetInUse) const
+	{
+	aComponentFilterSuperset.Reset();
+	aFilterSupersetInUse = EFalse;
+
+	TBool doIntersect = EFalse; // We should intersect component ids iff one of the previous filters on component ids was invoked
+	if(aFilter.iSetFlag & CComponentFilter::EFile)
+		{
+		GetFileComponentsL(*aFilter.iFile, aComponentFilterSuperset);
+		// The component Ids which own the given file is copied into componentIds array.
+		doIntersect = ETrue;
+		aFilterSupersetInUse = ETrue;
+		}
+	
+	if(aFilter.iSetFlag & CComponentFilter::EProperty)
+		{
+		GetComponentIdsHavingThePropertiesL(aComponentFilterSuperset, aFilter.iPropertyList, doIntersect);
+		// Inside the function, componentIds array is intersected with the components Ids which have the given properties.
+		doIntersect = ETrue;
+		aFilterSupersetInUse = ETrue;
+		}
+	
+	if(aFilter.iSetFlag & (CComponentFilter::EName | CComponentFilter::EVendor))
+		{
+		GetComponentsHavingNameVendorL(aComponentFilterSuperset, *aFilter.iName, *aFilter.iVendor, aFilter.iSetFlag, doIntersect);
+		// Inside the function, componentIds array is intersected with the components Ids which have the given name/vendor.
+		aFilterSupersetInUse = ETrue;
+		}
+	
+	_LIT(KSelectComponents, "SELECT ComponentId,SoftwareTypeId,SoftwareTypeName,Removable,Size,ScomoState,DRMProtected,Hidden,KnownRevoked,OriginVerified,GlobalId,InstalledDrives,Version,InstallTime FROM Components");
+	
+	RBuf statementStr;
+	statementStr.CreateL(KSelectComponents().Length()+ 50); // A reasonable starting buffer length
+	statementStr.CleanupClosePushL();
+	statementStr.Copy(KSelectComponents);
+	
+	TBool isFirstCondition = ETrue;
+	
+	_LIT(KConditionSoftwareType, " SoftwareTypeId=?"); // as only unique sw type name can be defined in the filter.
+	AppendFilterConditionToStatementL(aFilter.iSetFlag, CComponentFilter::ESoftwareType, statementStr, KConditionSoftwareType, isFirstCondition);
+	
+	_LIT(KConditionRemovable, " Removable=?");
+	AppendFilterConditionToStatementL(aFilter.iSetFlag, CComponentFilter::ERemovable, statementStr, KConditionRemovable, isFirstCondition);
+	
+	_LIT(KConditionScomoState, " ScomoState=?");
+	AppendFilterConditionToStatementL(aFilter.iSetFlag, CComponentFilter::EScomoState, statementStr, KConditionScomoState, isFirstCondition);
+	
+	_LIT(KConditionInstalledDrives, " InstalledDrives&?"); // & -> bitwise AND operator
+	AppendFilterConditionToStatementL(aFilter.iSetFlag, CComponentFilter::EInstalledDrive, statementStr, KConditionInstalledDrives, isFirstCondition);
+		
+	_LIT(KConditionDrmProtected, " DRMProtected=?");
+	AppendFilterConditionToStatementL(aFilter.iSetFlag, CComponentFilter::EDrmProtected, statementStr, KConditionDrmProtected, isFirstCondition);
+	
+	_LIT(KConditionHidden, " Hidden=?");
+	AppendFilterConditionToStatementL(aFilter.iSetFlag, CComponentFilter::EHidden, statementStr, KConditionHidden, isFirstCondition);
+	
+	_LIT(KConditionKnownRevoked, " KnownRevoked=?");
+	AppendFilterConditionToStatementL(aFilter.iSetFlag, CComponentFilter::EKnownRevoked, statementStr, KConditionKnownRevoked, isFirstCondition);
+
+	_LIT(KConditionOriginVerified, " OriginVerified=?");
+	AppendFilterConditionToStatementL(aFilter.iSetFlag, CComponentFilter::EOriginVerified, statementStr, KConditionOriginVerified, isFirstCondition);
+		
+	statementStr.Append(';');
+	// SQLite requires the statement string to end with NULL char.
+	statementStr.Append('\0');
+	
+	CStatement *stmt = iDbHandle->PrepareStatementLC(statementStr);
+	TInt stmtIdx = 1;
+	
+	if(aFilter.iSetFlag & CComponentFilter::ESoftwareType)
+		{
+		TUint32 swTypeId = HashCaseSensitiveL(*aFilter.iSwType);
+		stmt->BindIntL(stmtIdx++, swTypeId);
+		}
+	
+	if(aFilter.iSetFlag & CComponentFilter::EInstalledDrive)
+		{
+		if (aFilter.iInstalledDrives.Length() != KMaxDrives)
+			{
+			DEBUG_PRINTF2(_L("Incorrect size of drive list supplied in filter, the string supplied was %S"), &aFilter.iInstalledDrives);
+			User::Leave(KErrArgument);
+			}
+		TInt installedDrivesBitmask = InstalledDrivesToBitmaskL(aFilter.iInstalledDrives);
+		stmt->BindIntL(stmtIdx++, installedDrivesBitmask);
+		}
+	
+	BindIntegerFilterToStatementL(*stmt, aFilter.iSetFlag, CComponentFilter::ERemovable, aFilter.iRemovable, stmtIdx);
+	BindIntegerFilterToStatementL(*stmt, aFilter.iSetFlag, CComponentFilter::EScomoState, aFilter.iScomoState, stmtIdx);
+	BindIntegerFilterToStatementL(*stmt, aFilter.iSetFlag, CComponentFilter::EDrmProtected, aFilter.iDrmProtected, stmtIdx);
+	BindIntegerFilterToStatementL(*stmt, aFilter.iSetFlag, CComponentFilter::EHidden, aFilter.iHidden, stmtIdx);
+	BindIntegerFilterToStatementL(*stmt, aFilter.iSetFlag, CComponentFilter::EKnownRevoked, aFilter.iKnownRevoked, stmtIdx);
+	BindIntegerFilterToStatementL(*stmt, aFilter.iSetFlag, CComponentFilter::EOriginVerified, aFilter.iOriginVerified, stmtIdx);
+	
+	CleanupStack::Pop(stmt);
+	CleanupStack::PopAndDestroy(&statementStr);
+	return stmt;
+	}
+
+void CScrRequestImpl::AddComponentEntryLocalizablesL(TComponentId aComponentId, CComponentEntry& aEntry, TLanguage aLocale, const CComponentFilter& aFilter) const
+	{
+	if(aFilter.iSetFlag & (CComponentFilter::EName | CComponentFilter::EVendor))
+		{ // If a name or vendor is specified in the filter, the locale is ignored
+		  // and the provided names are retrieved from the ComponentLocalizables table.
+		CStatement *stmt = CreateStatementObjectForComponentLocalizablesLC(*aFilter.iName, *aFilter.iVendor, aFilter.iSetFlag, aComponentId);
+		TBool res = stmt->ProcessNextRowL();
+		// If the name and the vendor are not found, it means that there is a defect in this class, the filter shouldn't have returned the component in the first place		
+		__ASSERT_ALWAYS(res, User::Leave(KErrNotFound)); 		
+		DeleteObjectZ(aEntry.iName);
+		aEntry.iName = stmt->StrColumnL(1).AllocL(); // Ownership is transferred to the entry object
+		DeleteObjectZ(aEntry.iVendor);
+		aEntry.iVendor = stmt->StrColumnL(2).AllocL(); // Ownership is transferred to the entry object
+		CleanupStack::PopAndDestroy(stmt);
+		}
+	else
+		{// if name and/or vendor are not defined in the filter, try to find them by using the nearest language algorithm. 
+		AddComponentEntryLocalizablesL(aComponentId, aEntry, aLocale);
+		}
+	}
+
+
+TBool CScrRequestImpl::IsSoftwareTypeExistingL(TInt aSoftwareTypeId) const
+	{
+	TBool result = EFalse;
+	_LIT(KComponentSoftwareType, "SELECT SoftwareTypeId FROM SoftwareTypes WHERE SoftwareTypeId=?;");	
+		
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KComponentSoftwareType);
+	stmt->BindIntL(1, aSoftwareTypeId);
+			
+	if(stmt->ProcessNextRowL())
+		{ // The software type exists. 
+		result = ETrue;
+		}
+	CleanupStack::PopAndDestroy(stmt);
+	return result;
+	}
+
+void CScrRequestImpl::SubsessionAddLocalizableSoftwareTypeNameL(CStatement& aStmt, CComponentEntry& aEntry, TLanguage aLocale, CCompViewSubsessionContext* aSubsessionContext) const	
+	{
+	TInt softwareTypeId = aStmt.IntColumnL(1);
+	// Check if we've already cached this software type name - caching is important here as fetching the same software type name for all components in the sub-session is expensive
+	if (softwareTypeId == aSubsessionContext->iLastSoftwareTypeId)
+		{
+		DeleteObjectZ(aEntry.iSwType);
+		aEntry.iSwType = aSubsessionContext->iLastSoftwareTypeName->AllocL();
+		}
+	else
+		{
+		AddSoftwareTypeNameToComponentEntryL(aStmt, aEntry, aLocale);
+		// Save the last results - if the next component in the filter has the same software type id, we won't have to recalculate the name
+		aSubsessionContext->iLastSoftwareTypeId = softwareTypeId;
+		DeleteObjectZ(aSubsessionContext->iLastSoftwareTypeName);
+		aSubsessionContext->iLastSoftwareTypeName = aEntry.iSwType->AllocL();
+		}
+	}
+
+CComponentEntry* CScrRequestImpl::GetNextComponentEntryL(CStatement& aStmt, CComponentFilter& aFilter, TLanguage aLocale, CCompViewSubsessionContext* aSubsessionContext) const
+	{
+	// Since the query does not account for filter's name, vendor, property and file conditions,
+	// we intersect the resut of the query with components which answer these conditions, i.e. iComponentFilterSuperset 
+	while (1)
+		{
+		if(!aStmt.ProcessNextRowL())
+			{
+			return NULL;
+			}
+		TComponentId queryComponentId = aStmt.IntColumnL(0); 
+		if (!aSubsessionContext->iFilterSupersetInUse || aSubsessionContext->iComponentFilterSuperset.FindInOrder(queryComponentId) >= 0) 
+			break; // The component id exists in both parts of the filter - return it.
+		}
+		
+	CComponentEntry *component = CreateComponentEntryFromStatementHandleL(aStmt);
+	CleanupStack::PushL(component);
+	AddComponentEntryLocalizablesL(component->ComponentId(), *component, aLocale, aFilter);
+	SubsessionAddLocalizableSoftwareTypeNameL(aStmt, *component, aLocale, aSubsessionContext);	
+	CleanupStack::Pop(component);
+	return component;
+	}
+
+void CScrRequestImpl::NextComponentSizeL(const RMessage2& aMessage, CStatement* aStmt, CComponentFilter* aFilter, CComponentEntry*& aEntry, CCompViewSubsessionContext* aSubsessionContext) const
+	{
+	__ASSERT_ALWAYS(aStmt && aFilter, PanicClient(aMessage, KScrIllegalCallSequence));
+	
+	TLanguage locale = TLanguage(aMessage.Int0());
+	
+	DeleteObjectZ(aEntry);
+	aEntry = GetNextComponentEntryL(*aStmt, *aFilter, locale, aSubsessionContext);
+	TInt sizeSlot = 1;
+	if(!aEntry)
+		{
+		DEBUG_PRINTF(_L8("Reached the end of the view."));
+		WriteIntValueL(aMessage, sizeSlot, 0);
+		return;
+		}
+	WriteObjectSizeL(aMessage, sizeSlot, aEntry);
+	}
+
+void CScrRequestImpl::NextComponentDataL(const RMessage2& aMessage, CComponentEntry*& aEntry) const
+	{
+	DEBUG_PRINTF(_L8("Returning the component entry data."));
+	WriteObjectDataL(aMessage, 0, aEntry);
+	DeleteObjectZ(aEntry); // Delete the object to prevent it to be resent.
+	}
+
+void CScrRequestImpl::NextComponentSetSizeL(const RMessage2& aMessage, CStatement* aStmt, CComponentFilter* aFilter, RPointerArray<CComponentEntry>& aEntryList, CCompViewSubsessionContext* aSubsessionContext) const
+	{
+	DEBUG_PRINTF(_L8("Returning the size of the next component entry set."));
+	__ASSERT_ALWAYS(aStmt && aFilter, PanicClient(aMessage, KScrIllegalCallSequence));	
+
+	TInt maxArraySize = aMessage.Int0();
+	TLanguage locale = TLanguage(aMessage.Int1());
+	
+	aEntryList.ResetAndDestroy();
+	for(TInt i=0; i<maxArraySize; ++i)
+		{
+		CComponentEntry *entry = GetNextComponentEntryL(*aStmt, *aFilter, locale, aSubsessionContext);
+		if(!entry)
+			{
+			break;
+			}
+		CleanupStack::PushL(entry);
+		aEntryList.AppendL(entry);
+		CleanupStack::Pop(entry); // Ownership is transferred
+		}
+	WriteArraySizeL(aMessage, 2, aEntryList);
+	}
+
+void CScrRequestImpl::NextComponentSetDataL(const RMessage2& aMessage, RPointerArray<CComponentEntry>& aEntryList) const
+	{
+	DEBUG_PRINTF(_L8("Returning the next component entry set."));
+	WriteArrayDataL(aMessage, 0, aEntryList);
+	}
+
+void CScrRequestImpl::GetComponentIdListSizeL(const RMessage2& aMessage) const
+	{
+	DEBUG_PRINTF(_L8("Returning the required size to copy all components IDs from the components view."));
+	// Get filter from the client
+	CComponentFilter *filter = ReadComponentFilterL(aMessage);
+	CleanupStack::PushL(filter);
+	
+	RArray<TComponentId> componentFilterSuperset;
+	CleanupClosePushL(componentFilterSuperset);
+	TBool filterSupersetInUse;
+	// Create a statement based on the filter
+	CStatement *stmt = OpenComponentViewL(*filter, componentFilterSuperset, filterSupersetInUse);
+	CleanupStack::PushL(stmt);
+	iComponentIdList.Reset();
+	// Fetch all components from the row set and put them into the component list
+	while(stmt->ProcessNextRowL())
+		{
+		TComponentId componentId = stmt->IntColumnL(0);
+		if (filterSupersetInUse && componentFilterSuperset.FindInOrder(componentId) < 0) 
+			continue; // The component id does not match the name/vendor/file/property filter - do not add it to the result		
+		iComponentIdList.InsertInOrder(componentId);
+		}
+	// Release allocated memories
+	CleanupStack::PopAndDestroy(3, filter); // stmt, componentFilterSuperset, filter
+	WriteArraySizeL(aMessage, 1, iComponentIdList);
+	}
+
+void CScrRequestImpl::GetComponentIdListDataL(const RMessage2& aMessage) const
+	{
+	DEBUG_PRINTF(_L8("Returning all components IDs from the components view."));
+	WriteArrayDataL(aMessage, 0, iComponentIdList);
+	}
+
+CStatement* CScrRequestImpl::OpenFileListStatementL(TComponentId aComponentId) const
+	{
+	_LIT(KSelectFilesOfComponent, "SELECT Location FROM ComponentsFiles WHERE ComponentId=?;");
+	
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectFilesOfComponent);
+	stmt->BindIntL(1, aComponentId);
+	CleanupStack::Pop(stmt); // Ownership is transferred to the caller
+	
+	return stmt;
+	}	
+	
+CStatement* CScrRequestImpl::OpenFileListL(const RMessage2& aMessage) const
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	DEBUG_PRINTF2(_L8("Creating the requested file list for component(%d)."), componentId);
+	return OpenFileListStatementL(componentId);
+	}
+
+HBufC* CScrRequestImpl::GetNextFilePathL(CStatement& aStmt) const
+	{
+	if(!aStmt.ProcessNextRowL())
+		{
+		return NULL;
+		}
+	return aStmt.StrColumnL(0).AllocL();
+	}
+
+void CScrRequestImpl::NextFileSizeL(const RMessage2& aMessage, CStatement* aStmt, HBufC*& aFilePath) const
+	{
+	__ASSERT_ALWAYS(aStmt, PanicClient(aMessage, KScrIllegalCallSequence));
+	DeleteObjectZ(aFilePath);
+	aFilePath = GetNextFilePathL(*aStmt);
+	WriteObjectSizeL(aMessage, 0, aFilePath);
+	}
+
+void CScrRequestImpl::NextFileDataL(const RMessage2& aMessage, HBufC*& aFilePath) const
+	{
+	WriteObjectDataL(aMessage, 0, aFilePath);
+	DeleteObjectZ(aFilePath); // Delete the file path to prevent it to be resent.
+	}
+
+void CScrRequestImpl::NextFileSetSizeL(const RMessage2& aMessage, CStatement* aStmt, RPointerArray<HBufC>& aFileList) const
+	{
+	__ASSERT_ALWAYS(aStmt, PanicClient(aMessage, KScrIllegalCallSequence));
+	TInt maxArraySize = aMessage.Int0();
+	aFileList.ResetAndDestroy();
+	for(TInt i=0; i<maxArraySize; ++i)
+		{
+		HBufC *filePath = GetNextFilePathL(*aStmt);
+		if(!filePath)
+			{
+			break;
+			}
+		CleanupStack::PushL(filePath);
+		aFileList.AppendL(filePath);
+		CleanupStack::Pop(filePath); // Ownership is transferred
+		}
+	WriteArraySizeL(aMessage, 1, aFileList);
+	}
+
+void CScrRequestImpl::NextFileSetDataL(const RMessage2& aMessage, RPointerArray<HBufC>& aFileList) const
+	{
+	DEBUG_PRINTF(_L8("Returning the next file path set."));
+	WriteArrayDataL(aMessage, 0, aFileList);
+	}
+
+TComponentId CScrRequestImpl::GetComponentIdFromMsgL(const RMessage2& aMessage)
+	{	
+	return aMessage.Int0();
+	}
+
+HBufC* CScrRequestImpl::GetSoftwareTypeNameFromMsgLC(const RMessage2& aMessage)
+	{	
+	switch (CScsServer::StripScsFunctionMask(aMessage.Function()))
+		{
+		case EAddComponent:
+		case EAddComponentDependency:
+		case EDeleteComponentDependency:
+			{
+			return ReadDescLC(aMessage, 0);
+			}
+		default:
+			__ASSERT_ALWAYS(0, User::Invariant());
+		}
+	return NULL;
+	}
+
+HBufC* CScrRequestImpl::ReadFileNameFromMsgLC(const RMessage2& aMessage)
+	{
+	return ReadDescLC(aMessage, 1);
+	}
+
+void CScrRequestImpl::InitializeDbVersionL()
+	{
+	_LIT(KSelectStatement, "SELECT MajorVersion, MinorVersion, BuildNumber FROM ScrVersion;");
+	CStatement* stmt = iDbHandle->PrepareStatementLC(KSelectStatement);
+	if(!stmt->ProcessNextRowL())
+		{
+		DEBUG_PRINTF(_L("Could not find entries in the version table - internal problem"));
+		User::Leave(KErrCorrupt);
+		}
+	
+	iDbVersion.iMajor = stmt->IntColumnL(0);
+	iDbVersion.iMinor = stmt->IntColumnL(1);
+	iDbVersion.iBuild = stmt->IntColumnL(2);	
+	CleanupStack::PopAndDestroy(stmt);
+	DEBUG_PRINTF4(_L8("Opened SCR database with major version %d, minor version %d, and build number %d."), iDbVersion.iMajor,
+			iDbVersion.iMinor, iDbVersion.iBuild);		
+	}
+
+void CScrRequestImpl::VerifyDbVersionCompatibilityL() const
+	{
+	if (iDbVersion.iMajor != KDbInterfaceMajorVersion)
+		{
+		DEBUG_PRINTF3(_L8("The SCR DB is incompatible! Supported major version is %d, and the DB major version is %d"), KDbInterfaceMajorVersion, iDbVersion.iMajor);
+		User::Leave(KErrCorrupt);
+		}
+	
+	if (iDbVersion.iMinor > KDbInterfaceMinorVersion)
+		{
+		DEBUG_PRINTF3(_L8("The SCR DB supports newer features which are not available in this software version. The DB minor version is %d, while the supported minor version is %d"), iDbVersion.iMinor, KDbInterfaceMinorVersion);
+		return;
+		}	
+	
+	if (iDbVersion.iMinor < KDbInterfaceMinorVersion)
+		{
+		DEBUG_PRINTF3(_L8("The SCR DB does not support some newer features available in this software version. The DB minor version is %d, while the supported minor version is %d"), iDbVersion.iMinor, KDbInterfaceMinorVersion); 
+		return;
+		}	
+	
+	DEBUG_PRINTF4(_L8("The SCR DB has matching version with the supported interface. Supported major version is %d, minor version %d and build number %d"), KDbInterfaceMajorVersion, KDbInterfaceMinorVersion, KDbInterfaceBuildNumber);	
+	}
+
+void ExtractNumberFromHexStringL(TInt& aPosition, const TDesC8& aString, TUint32& aIntValue)
+	{
+	TLex8 l(aString.Mid(aPosition, KUidStringLen));
+	l.Val(aIntValue, EHex);
+	aPosition += KUidStringLen;
+	}
+
+void ParseUidHexStringL(const TDesC8& aUidString, TUint32& aSifPluginUid, TUint32& aInstallerSid, TUint32& aExecutionLayerSid)
+	{
+	__ASSERT_ALWAYS(aUidString.Length() >= 3*KUidStringLen, User::Leave(KErrArgument));
+	TInt pos (0); // The starting position of aUidString
+	ExtractNumberFromHexStringL(pos, aUidString, aSifPluginUid);
+	ExtractNumberFromHexStringL(pos, aUidString, aInstallerSid);
+	ExtractNumberFromHexStringL(pos, aUidString, aExecutionLayerSid);
+	}
+
+TBool CompareLocalizedSoftwareTypeName(const CLocalizedSoftwareTypeName& aLeft, const CLocalizedSoftwareTypeName& aRight)
+	{
+	TBool result = EFalse;
+	
+	TRAPD(err, result = (aLeft.Locale() == aRight.Locale() && !aLeft.NameL().CompareF(aRight.NameL())));
+	if (err != KErrNone)
+		{
+		DEBUG_PRINTF2(_L("CompareLocalizedSoftwareTypeName has left with error %d"), err);
+		return EFalse;
+		}
+	else
+		{
+		return result;
+		}
+	}
+
+TBool CompareHBufDescs(const HBufC& aLeft, const HBufC& aRight)
+	{
+	return !aLeft.CompareF(aRight);
+	}
+
+TBool CScrRequestImpl::IsSoftwareTypeExistingL(TUint32 aSwTypeId, TUint32 aSifPluginUid, TUint32 aInstallerSecureId, TUint32 aExecutionLayerSecureId, const RPointerArray<HBufC>& aMimeTypesArray, const RPointerArray<CLocalizedSoftwareTypeName>& aLocalizedNamesArray)
+	{
+	_LIT(KSelectSoftwareType, "SELECT SifPluginUid,InstallerSecureId,ExecutionLayerSecureId FROM SoftwareTypes WHERE SoftwareTypeId=?;");
+	CStatement* stmt = iDbHandle->PrepareStatementLC(KSelectSoftwareType);
+	stmt->BindIntL(1, aSwTypeId);
+	if(!stmt->ProcessNextRowL())
+		{
+		DEBUG_PRINTF2(_L8("IsSoftwareTypeExistingL: Software Type Id (%d) doesn't exist in the SCR."), aSwTypeId);
+		CleanupStack::PopAndDestroy(stmt);
+		return EFalse;
+		}
+	TBool uidsNotEqual = aSifPluginUid != stmt->IntColumnL(0) ||
+						 aInstallerSecureId != stmt->IntColumnL(1) ||
+						 aExecutionLayerSecureId != stmt->IntColumnL(2);
+	if(uidsNotEqual)
+		{
+		DEBUG_PRINTF(_L8("IsSoftwareTypeExistingL: One of the UIDs is different from the one in the database."));
+		CleanupStack::PopAndDestroy(stmt);
+		return EFalse;
+		}
+	CleanupStack::PopAndDestroy(stmt);
+	
+	_LIT(KSelectSwTypeNames, "SELECT Locale,Name FROM SoftwareTypeNames WHERE SoftwareTypeId=? AND Locale!=?;");
+	CStatement* stmtNames = iDbHandle->PrepareStatementLC(KSelectSwTypeNames);
+	stmtNames->BindIntL(1, aSwTypeId);
+	stmtNames->BindIntL(2, KNonLocalized);
+	TInt numOfFoundNames (0);
+	while(stmtNames->ProcessNextRowL())
+		{
+		++numOfFoundNames;
+		const TDesC& swTypeNameValue = stmtNames->StrColumnL(1);
+		CLocalizedSoftwareTypeName *swTypeName = CLocalizedSoftwareTypeName::NewLC(swTypeNameValue, TLanguage(stmtNames->IntColumnL(0)));
+		TInt ret = aLocalizedNamesArray.Find(swTypeName, TIdentityRelation<CLocalizedSoftwareTypeName>(CompareLocalizedSoftwareTypeName));
+		CleanupStack::PopAndDestroy(swTypeName);
+		if(KErrNotFound == ret)
+			{
+			DEBUG_PRINTF2(_L("IsSoftwareTypeExistingL: %S doesn't exist in the provided sofwtare type names list."), &swTypeNameValue);
+			CleanupStack::PopAndDestroy(stmtNames);
+			return EFalse;
+			}
+		}
+	CleanupStack::PopAndDestroy(stmtNames);
+	if(numOfFoundNames != aLocalizedNamesArray.Count())
+		{
+		DEBUG_PRINTF3(_L("IsSoftwareTypeExistingL: the number of provided software type names (%d) is different than the number of existing software type names (%d) in the SCR."), numOfFoundNames, aLocalizedNamesArray.Count());
+		return EFalse;
+		}
+	
+	_LIT(KSelectMimeTypes, "SELECT MimeType FROM MimeTypes WHERE SoftwareTypeId=?;");
+	CStatement* stmtMimes = iDbHandle->PrepareStatementLC(KSelectMimeTypes);
+	stmtMimes->BindIntL(1, aSwTypeId);
+	TInt numOfFoundMimes (0);
+	while(stmtMimes->ProcessNextRowL())
+		{
+		++numOfFoundMimes;
+		HBufC *mimeType = stmtMimes->StrColumnL(0).AllocLC();
+		TInt ret = aMimeTypesArray.Find(mimeType, TIdentityRelation<HBufC>(CompareHBufDescs));
+		if(KErrNotFound == ret)
+			{
+			DEBUG_PRINTF2(_L("IsSoftwareTypeExistingL: %S doesn't exist in the provided MIME types list."), mimeType);
+			CleanupStack::PopAndDestroy(2, stmtMimes); // stmtMimes, mimeType
+			return EFalse;
+			}
+		CleanupStack::PopAndDestroy(mimeType);
+		}
+	CleanupStack::PopAndDestroy(stmtMimes);
+	if(numOfFoundMimes != aMimeTypesArray.Count())
+		{
+		DEBUG_PRINTF3(_L("IsSoftwareTypeExistingL: the number of provided MIME types (%d) is different than the number of existing MIME types (%d) in the SCR."), numOfFoundMimes, aMimeTypesArray.Count());
+		return EFalse;
+		}
+	// All software type details are identical
+	DEBUG_PRINTF(_L8("IsSoftwareTypeExistingL: All software type details are identical. This is a software type update."));
+	return ETrue;
+	}
+
+void CScrRequestImpl::AddSoftwareTypeL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Adding a new software type."));
+	// NB SoftwareTypeId is the hash of unique software type name. Since this name is unique, it is expected
+	// that there won't be any conflicts with software type ids. If an installer is uninstalled and then re-installed,
+	// the same software type id will be assigned for it as its unique name is not changed. The advantage is that
+	// the orphaned components will become non-orphaned again automatically when their installer is re-installed.
+	// Otherwise, we would have to find a complex solution to associate the software type id of orphaned components
+	// with the corresponding installer which had been re-installed.
+	// Another advantage of this approach is that it is not mandatory to query SoftwareTypes table in order to get
+	// the software type id of an installer. If the uniqe software type name of the installer is known, its hash
+	// is simply calculated to obtain its software type id.
+	
+	// Slot-0 contains Unique Software Type Name
+	HBufC *uniqueSwTypeName = ReadDescLC(aMessage, 0);
+	TUint32 swTypeId = HashCaseSensitiveL(*uniqueSwTypeName);
+	
+	// Slot-1 contains the concatenated values of SifPluginUid, InstallerSecureId and ExecutionLayerSecureId in turn.
+	HBufC8 *uidString = ReadDesc8LC(aMessage, 1);
+	TUint32 sifPluginUid (0);
+	TUint32 installerSecureId (0);
+	TUint32 executionLayerSecureId (0);
+	ParseUidHexStringL(*uidString, sifPluginUid, installerSecureId, executionLayerSecureId);
+	CleanupStack::PopAndDestroy(uidString);
+	
+	// Slot-2 contains the list of MIME types
+	RIpcReadStream mimeTypesReader;
+	CleanupClosePushL(mimeTypesReader);
+	mimeTypesReader.Open(aMessage, 2);
+				
+	RPointerArray<HBufC> mimeTypesArray;
+	CleanupResetAndDestroyPushL(mimeTypesArray);
+	InternalizePointersArrayL(mimeTypesArray, mimeTypesReader);
+	
+	// Slot-3 contains Localized Software Type Names
+	RIpcReadStream localizedNamesReader;
+	CleanupClosePushL(localizedNamesReader);
+	localizedNamesReader.Open(aMessage, 3);
+				
+	RPointerArray<CLocalizedSoftwareTypeName> localizedNamesArray;
+	CleanupResetAndDestroyPushL(localizedNamesArray);
+	InternalizePointersArrayL(localizedNamesArray, localizedNamesReader);
+	
+	if (IsSoftwareTypeExistingL(swTypeId, sifPluginUid, installerSecureId, executionLayerSecureId, mimeTypesArray, localizedNamesArray))
+		{ // If the software type exists, do nothing and return;	
+		CleanupStack::PopAndDestroy(5, uniqueSwTypeName); // uniqueSwTypeName, mimeTypesReader, mimeTypesArray, localizedNamesReader, localizedNamesArray
+		return; 
+		}
+	
+	// First, insert the main record to SoftwareTypes table
+	_LIT(KInsertSwType, "INSERT INTO SoftwareTypes(SoftwareTypeId,SifPluginUid,InstallerSecureId,ExecutionLayerSecureId) VALUES(?,?,?,?);");
+	TInt numberOfValuesSwType = 4;
+	ExecuteStatementL(KInsertSwType(), numberOfValuesSwType, EValueInteger, swTypeId, EValueInteger, sifPluginUid, EValueInteger, installerSecureId, EValueInteger, executionLayerSecureId);
+	
+	// Then, insert MIME types of this software type into MimeTypes table
+	_LIT(KInsertMimeType, "INSERT INTO MimeTypes(SoftwareTypeId,MimeType) VALUES(?,?);");
+	TInt numberOfValuesMimeType = 2;
+	TInt countMimeTypes = mimeTypesArray.Count();
+	for(TInt i=0; i<countMimeTypes; ++i)
+		{
+		ExecuteStatementL(KInsertMimeType(), numberOfValuesMimeType, EValueInteger, swTypeId, EValueString, mimeTypesArray[i]);
+		}
+		
+	// Finally, insert unique and localized names into SoftwareTypeNames table
+	_LIT(KInsertSwTypeName, "INSERT INTO SoftwareTypeNames(SoftwareTypeId,Locale,Name) VALUES(?,?,?);");
+	TInt numberOfValuesSwTypeName = 3;
+	ExecuteStatementL(KInsertSwTypeName(), numberOfValuesSwTypeName, EValueInteger, swTypeId, EValueInteger, KNonLocalized, EValueString, uniqueSwTypeName);
+		
+	TInt countNames = localizedNamesArray.Count();
+	for(TInt i=0; i<countNames; ++i)
+		{
+		TLanguage locale = localizedNamesArray[i]->Locale();
+		const TDesC& name = localizedNamesArray[i]->NameL();
+		ExecuteStatementL(KInsertSwTypeName(), numberOfValuesSwTypeName, EValueInteger, swTypeId, EValueInteger, locale, EValueString, &name);
+		}	
+	CleanupStack::PopAndDestroy(5, uniqueSwTypeName); // uniqueSwTypeName, mimeTypesReader, mimeTypesArray, localizedNamesReader, localizedNamesArray
+	}
+
+void CScrRequestImpl::DeleteSoftwareTypeL(const RMessage2& aMessage)
+	{
+	HBufC *uniqueSwTypeName = ReadDescLC(aMessage, 0);
+	DEBUG_PRINTF2(_L("Deleting Software type (%S)."), uniqueSwTypeName);
+	
+	TUint32 swTypeId = HashCaseSensitiveL(*uniqueSwTypeName);
+	CleanupStack::PopAndDestroy(uniqueSwTypeName);
+	
+	// First, delete software type names
+	_LIT(KDeleteSoftwareTypeNames, "DELETE FROM SoftwareTypeNames WHERE SoftwareTypeId=?;");
+	TInt numberOfValues = 1;
+	ExecuteStatementL(KDeleteSoftwareTypeNames(), numberOfValues, EValueInteger, swTypeId);
+	
+	// Secondly, delete the actual software type record
+	_LIT(KDeleteSoftwareType, "DELETE FROM SoftwareTypes WHERE SoftwareTypeId=?;");
+	ExecuteStatementL(KDeleteSoftwareType(), numberOfValues, EValueInteger, swTypeId);
+	
+	// Thirdly, get the list of MIME types belong to the deleted software type. 
+	// This list will be returned to the client with another request (GetDeletedMimeTypesL)
+	_LIT(KSelectMimeTypes, "SELECT MimeType FROM MimeTypes WHERE SoftwareTypeId=?;");
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectMimeTypes);
+	stmt->BindIntL(1, swTypeId);
+	
+	iDeletedMimeTypes.ResetAndDestroy();
+	while(stmt->ProcessNextRowL())
+		{
+		iDeletedMimeTypes.AppendL(stmt->StrColumnL(0).AllocL());	
+		}
+	CleanupStack::PopAndDestroy(stmt);
+	
+	// Finally, delete the MIME types belong to the deleted software type name
+	_LIT(KDeleteMimeTypes, "DELETE FROM MimeTypes WHERE SoftwareTypeId=?;");
+	ExecuteStatementL(KDeleteMimeTypes(), numberOfValues, EValueInteger, swTypeId);
+	WriteArraySizeL(aMessage, 1, iDeletedMimeTypes);
+	}
+
+void CScrRequestImpl::GetDeletedMimeTypesL(const RMessage2& aMessage) const
+	{
+	WriteArrayDataL(aMessage, 0, iDeletedMimeTypes);
+	iDeletedMimeTypes.ResetAndDestroy();
+	}
+
+TBool CScrRequestImpl::GetIsComponentOrphanedL(TComponentId aComponentId) const	
+	{
+	_LIT(KComponentSoftwareTypeId, "SELECT SoftwareTypeId FROM Components WHERE ComponentId=?;");	
+	
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KComponentSoftwareTypeId);
+	stmt->BindIntL(1, aComponentId);
+		
+	if(!stmt->ProcessNextRowL())
+		{ 
+		DEBUG_PRINTF2(_L("Component Id (%d) couldn't be found!"), aComponentId);
+		User::Leave(KErrNotFound);
+		}
+	
+	TUint32 swTypeId = stmt->IntColumnL(0);
+	CleanupStack::PopAndDestroy(stmt);
+	
+	// The component is orphaned iff the software type does not exist.
+	return !IsSoftwareTypeExistingL(swTypeId);
+	}
+	
+void CScrRequestImpl::GetIsComponentOrphanedL(const RMessage2& aMessage) const
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	TBool result = GetIsComponentOrphanedL(componentId);
+	DEBUG_PRINTF2(_L8("Retrieving whether the component(%d) is orphaned."), componentId);
+
+	TPckg<TBool> resultPkg(result);
+	
+	aMessage.WriteL(1, resultPkg);	
+	}
+
+void CheckAndCreateLogFileL(RFs& aFs, const TDesC& aFileName)
+	{
+	TEntry entry;
+	TInt err = aFs.Entry(aFileName, entry);
+	
+	if(KErrNone == err)
+		return;
+
+	if (KErrPathNotFound == err)
+		{
+		User::LeaveIfError(aFs.MkDirAll(aFileName));
+		}		
+	else if(KErrNotFound != err)
+		{
+		DEBUG_PRINTF2(_L("The log file couldn't be opened. Error=%d."), err);
+		User::Leave(err);	
+		}
+	
+	RFileWriteStream stream;
+	User::LeaveIfError(stream.Create(aFs, aFileName, EFileWrite | EFileShareAny | EFileStream));
+	stream.PushL();
+	stream.WriteInt32L(1); // The major version of the log file
+	stream.WriteInt32L(0); // The minor version of the log file
+	// Please note that the log file version is not used currently. It is implemented for a possible future need.
+	// If the version format is changed, then the end of FlushLogEntriesArrayL function where the final log count is written must be updated.
+	// FlushLogEntriesArrayL assumes that first 8 bytes store version information.
+	stream.WriteInt32L(0); // The number of log records in the log file
+	stream.CommitL();
+	CleanupStack::PopAndDestroy(&stream);			
+	}
+
+void CScrRequestImpl::FlushLogEntriesArrayL()
+	{
+	TInt logCount2bFlushed = iLogEntries.Count();
+	if(!logCount2bFlushed)
+		return; // No record to write into the log file.
+	
+	// Get the log file name
+	HBufC *logFileName = UpdateFilePathDriveLC(KScrLogFileName, iFs.GetSystemDriveChar());
+	// Check whether the log file exists. If not, create one.
+	CheckAndCreateLogFileL(iFs, *logFileName);
+	
+	RFileReadStream readStream;
+	User::LeaveIfError(readStream.Open(iFs, *logFileName, EFileRead|EFileShareExclusive|EFileStream));
+	readStream.PushL();
+	(void)readStream.ReadInt32L(); // skip the major version of the log file
+	(void)readStream.ReadInt32L(); // skip the minor version of the log file
+	TInt currentLogCount = readStream.ReadInt32L();
+		
+	if(KMaxScrLogEntries <= currentLogCount + logCount2bFlushed)
+		{
+		//Create a temporary file and read the log file in that
+		//oldest entries will be removed in the temporary log file
+		HBufC *tempLogName = UpdateFilePathDriveLC(KScrTempLogFileName, iFs.GetSystemDriveChar());
+		TInt err = iFs.Delete(*tempLogName);
+		__ASSERT_ALWAYS(err == KErrNotFound || err == KErrNone, User::Leave(err));
+		CheckAndCreateLogFileL(iFs, *tempLogName);
+		
+		RFileWriteStream writeStream;
+		User::LeaveIfError(writeStream.Open(iFs, *tempLogName, EFileWrite | EFileStream));
+		writeStream.PushL();
+		writeStream.Sink()->SeekL(MStreamBuf::EWrite,EStreamEnd); // Skip the version info and log count
+			
+		TInt tmpLogCount (0);
+		CScrLogEntry *log = NULL;
+			
+		for (TInt i = logCount2bFlushed; i < currentLogCount; ++i, ++tmpLogCount)
+			{
+			log = CScrLogEntry::NewLC(readStream);		
+			writeStream << *log;
+			CleanupStack::PopAndDestroy(log); 					
+			} // for
+			
+		currentLogCount = tmpLogCount; 
+		writeStream.CommitL();
+		CleanupStack::PopAndDestroy(&writeStream); 
+		readStream.Release();
+			
+		RStsSession stsSession; // transaction service
+		CleanupClosePushL(stsSession);
+		stsSession.CreateTransactionL();				
+			
+		stsSession.RemoveL(*logFileName);
+		stsSession.RegisterNewL(*logFileName);
+		stsSession.RegisterTemporaryL(*tempLogName);
+			
+		TInt renameErr = iFs.Rename(*tempLogName,*logFileName);							
+		if (KErrNone == renameErr)
+			{
+			// commit file changes.
+			stsSession.CommitL();
+			}
+		else
+			{
+			// rollback file changes and leave with the error code.
+			stsSession.RollBackL();
+			DEBUG_PRINTF2(_L("The log file couldn't be renamed. Error=%d."), renameErr);
+			User::Leave(renameErr);
+			}
+		CleanupStack::PopAndDestroy(2, tempLogName); // tempLogName, stsSession
+		} // endif KMaxScrLogEntries <=
+	
+	CleanupStack::PopAndDestroy(&readStream);
+	
+	RFile file;
+	User::LeaveIfError(file.Open(iFs, *logFileName, EFileRead|EFileWrite| EFileShareExclusive| EFileStream));
+	CleanupClosePushL(file);
+	TInt pos (0);
+	User::LeaveIfError(file.Seek(ESeekEnd, pos));	
+	RFileWriteStream stream(file, pos);
+	stream.PushL();
+	
+	TInt startIdx = (logCount2bFlushed - KMaxScrLogEntries)>0 ? (logCount2bFlushed - KMaxScrLogEntries) : 0;
+	TInt logCountFlushed (0);
+	for(TInt i=startIdx; i<logCount2bFlushed; ++i, ++logCountFlushed)
+		{
+		iLogEntries[i]->ExternalizeL(stream);
+		}
+	iLogEntries.ResetAndDestroy();
+	stream.CommitL();
+	stream.Release();
+	file.Close();
+	
+	// Update the log count
+	User::LeaveIfError(stream.Open(iFs, *logFileName, EFileRead|EFileWrite|EFileShareExclusive|EFileStream));
+	stream.Sink()->SeekL(MStreamBuf::EWrite,EStreamBeginning,8); // Skip the version info
+	stream.WriteInt32L(logCountFlushed + currentLogCount);
+	stream.CommitL();
+	
+	CleanupStack::PopAndDestroy(3, logFileName); // logFileName, file, stream
+	}
+
+void CScrRequestImpl::GetLogFileHandleL(const RMessage2& aMessage) const
+	{
+	// Get the log file name
+	HBufC *logFileName = UpdateFilePathDriveLC(KScrLogFileName, iFs.GetSystemDriveChar());
+	// Check whether the log file exists. If not, create one.
+	CheckAndCreateLogFileL(iFs, *logFileName);
+	
+	RFile file;
+	User::LeaveIfError(file.Open(iFs, *logFileName, EFileRead | EFileShareAny | EFileStream));
+	CleanupClosePushL(file);
+		
+	// Store the RFile handle into the package buffer in slot 0 and complete the message with the RFs handle
+	User::LeaveIfError(file.TransferToClient(aMessage, 0));
+	ASSERT(aMessage.IsNull());  // The message should have been completed
+	CleanupStack::PopAndDestroy(2, logFileName); // logFileName, file
+	}
+
+void CScrRequestImpl::GetIsComponentOnReadOnlyDriveL(const RMessage2& aMessage) const
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	DEBUG_PRINTF2(_L8("Checking if the component(%d) is on read-only drive."), componentId);
+	
+	// Get the drives on which the component files' are registered
+	TInt driveBitmask = GetInstalledDrivesBitmaskL(componentId);	
+			
+	TBool result = EFalse;
+	
+	for (TInt index = 0; index < KMaxDrives; ++index, driveBitmask >>= 1)
+		{
+		if ((driveBitmask & 0x1) && IsDriveReadOnlyL(index))
+			{
+			DEBUG_PRINTF3(_L8("Component %d has registered a file at read-only drive %c ."), componentId, index + 'a');
+			result = ETrue;
+			break;
+			}
+		}
+	
+	TPckg<TBool> resPkg(result);	
+	aMessage.WriteL(1, resPkg);	
+	}
+
+TBool CScrRequestImpl::IsDriveReadOnlyL(TInt driveIndex) const
+	{
+	TDriveInfo driveInfo;
+	User::LeaveIfError(iFs.Drive(driveInfo,driveIndex));
+		
+	TBool result = EFalse;
+	if ((driveInfo.iDriveAtt&KDriveAttRom) || (driveInfo.iType==EMediaRom))
+		result = ETrue;
+	
+	return result;
+	}
+
+void CScrRequestImpl::GetIsComponentPresentL(const RMessage2& aMessage) const
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	DEBUG_PRINTF2(_L8("Checking if the component(%d) is available."), componentId);
+	
+	_LIT(KSelectCompPresent, "SELECT CompPresence FROM Components WHERE ComponentId=?;");
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectCompPresent);
+	stmt->BindIntL(1, componentId);
+	if(!stmt->ProcessNextRowL())
+		{
+		DEBUG_PRINTF2(_L8("Component (%d) couldn't be found in the SCR database."), componentId);
+		User::Leave(KErrNotFound);
+		}
+	TBool result = (stmt->IntColumnL(0) == 1);
+	CleanupStack::PopAndDestroy(stmt);
+	
+	// The default value for CompPresence is ETrue. So when we find that the SCR DB contains the 
+	// default property value we check if the drives registered by the component are present.   
+	if (result && !CheckForMediaPresenceL(componentId))
+		{
+		result = EFalse;
+		}
+				
+	TPckg<TBool> isCompPresent(result);	
+	aMessage.WriteL(1, isCompPresent);	
+	}
+
+void CScrRequestImpl::SetIsComponentPresentL(const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF(_L8("Setting the component as present."));
+	_LIT(KColumnNameCompPresence, "CompPresence");
+	ReadAndSetCommonComponentPropertyL(aMessage, KColumnNameCompPresence);	
+	}
+
+void CScrRequestImpl::GetComponentSupportedLocalesListSizeL(const RMessage2& aMessage) const
+	{
+	TComponentId componentId = GetComponentIdFromMsgL(aMessage);
+	DEBUG_PRINTF2(_L8("Returning the required size to copy all matching supported language IDs for component =(%d)"), componentId);
+
+	_LIT(KSelectMatchingSupportedLocales, "SELECT Locale FROM ComponentLocalizables WHERE ComponentId=?;");
+	CStatement *stmt = iDbHandle->PrepareStatementLC(KSelectMatchingSupportedLocales);
+	stmt->BindIntL(1, componentId);
+	iMatchingSupportedLanguageList.Close();
+	while(stmt->ProcessNextRowL())
+		{
+		TLanguage languageId = (TLanguage)stmt->IntColumnL(0);
+		iMatchingSupportedLanguageList.Insert(languageId,iMatchingSupportedLanguageList.Count());
+		}
+	if (iMatchingSupportedLanguageList.Count() == 1)
+	    {
+	    iMatchingSupportedLanguageList.Close();
+	    }
+	
+	// Release allocated memories
+	CleanupStack::PopAndDestroy(1, stmt); // stmt
+	WriteArraySizeL(aMessage, 1, iMatchingSupportedLanguageList);
+	
+	}
+
+void CScrRequestImpl::GetComponentSupportedLocalesListDataL(const RMessage2& aMessage) const
+	{
+	DEBUG_PRINTF(_L8("Getting the Data of matching supported languages"));
+	WriteArrayDataL(aMessage, 0, iMatchingSupportedLanguageList);
+	iMatchingSupportedLanguageList.Close();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/source/server/scrserver.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,429 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements CScrServer providing management of SCR services.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#include "scrserver.h"
+#include "scrrequestimpl.h"
+#include "usiflog.h"
+#include <scs/cleanuputils.h>
+#include "scrhelperclient.h"
+#include <scs/securityutils.h>
+
+using namespace Usif;
+
+_LIT_SECURE_ID(KSisRegistryServerSid, 0x10202DCA); 
+
+static const TUint scrRangeCount = 11;
+
+static const TInt scrRanges[scrRangeCount] =
+	{
+	0,							 // Range-0 - 0 to EBaseSession-1. Not used.
+	CScsServer::EBaseSession,	 // Range-1 - EBaseSession to EBaseMustAllow exclusive.
+	CScsServer::EBaseSession | EGetSingleComponentSize, // Modification and transaction APIs have custom checks
+	CScsServer::EBaseSession | EGetComponentIdListSize, // Component-specific APIs are free for all
+	CScsServer::EBaseSession | EGetIsMediaPresent, // Getting all component IDs is restricted to ReadUserData
+	CScsServer::EBaseSession | ESetScomoState, // Component-specific APIs are free for all
+	CScsServer::EBaseSession | EGetPluginUidWithMimeType, // SetScomoState has custom checks (as with the rest of modification APIs)
+	CScsServer::EBaseSession | EAddSoftwareType, // File filter sub-sessions and plugin-fetching APIs are free for all
+	CScsServer::EBaseSubSession | EOpenComponentsView, // Software Type management APIs are only allowed for SWI 
+	CScsServer::EBaseSubSession | EOpenFileList, // Component filter sub-sessions require ReadUserData	
+	CScsServer::EBaseMustAllow // File filter sub-session are free for all, the rest of the range is reserved for SCS, and must be allowed( EBaseMustAllow to KMaxTInt inclusive)
+	};
+
+static const TUint8 scrElementsIndex[scrRangeCount] =
+	{
+	CPolicyServer::ENotSupported, // Range 0 is not supported.
+	CPolicyServer::ECustomCheck,
+	CPolicyServer::EAlwaysPass,
+	0, // Require ReadUserData
+	CPolicyServer::EAlwaysPass,
+	CPolicyServer::ECustomCheck,
+	CPolicyServer::EAlwaysPass,
+	1, // Only SWI process can invoke
+	0, // Require ReadUserData
+	CPolicyServer::EAlwaysPass,
+	CPolicyServer::EAlwaysPass 
+	};							
+
+static const CPolicyServer::TPolicyElement scrElements[] =
+	{
+	{_INIT_SECURITY_POLICY_C1(ECapabilityReadUserData), CPolicyServer::EFailClient},
+	{_INIT_SECURITY_POLICY_S0(KSisRegistryServerSid.iId), CPolicyServer::EFailClient}
+	};
+
+static const CPolicyServer::TPolicy scrPolicy =
+	{
+	CPolicyServer::EAlwaysPass, // Allow all connections
+	scrRangeCount,
+	scrRanges,
+	scrElementsIndex,
+	scrElements,
+	};
+
+//
+// CScrServer
+//
+
+CScrServer::CScrServer()
+/**
+	Intializes the SCR server object with its version and policy.
+ */
+	:	CScsServer(ScrServerVersion(), scrPolicy)
+		{
+		DEBUG_PRINTF(_L8("SCR server construction!"));
+		}
+
+CScrServer::~CScrServer()
+/**
+	Destructor. Cleanup the SCR Server.
+ */
+	{
+	DEBUG_PRINTF(_L8("SCR server destruction!"));
+	delete iRequestImpl;
+	iDatabaseFile.Close();
+	iJournalFile.Close();
+	iFs.Close();
+	iSubsessionOwners.Close();
+	}
+	
+	
+CScrServer* CScrServer::NewLC()
+/**
+	Factory function allocates a new instance of CScrServer.
+
+	@return		The newly created instance of CScrServer which is left on the cleanup stack.
+ */
+	{
+	CScrServer *self = new (ELeave) CScrServer();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+
+
+void CScrServer::ConstructL()
+/**
+	Second phase constructor starts the SCR server.
+ */
+	{
+	// StartL() must be called first in order to avoid concurrency issue when starting the server from two or more processes
+	StartL(KSoftwareComponentRegistryName);
+	CScsServer::ConstructL(KScrServerShutdownPeriod);
+	SetupL();
+	}
+
+void CheckFilePathL(RFs& aFs, RFile& aFile, const TDesC& aExpectedPath)
+	{
+	RBuf fileName;
+	fileName.CreateL(KMaxFileName);
+	fileName.CleanupClosePushL();
+	User::LeaveIfError(aFile.FullName(fileName));
+	
+	RBuf expectedFileName;
+	expectedFileName.CreateL(aExpectedPath.Length());
+	expectedFileName.CleanupClosePushL();
+	expectedFileName.Copy(aExpectedPath);
+	expectedFileName[0] = aFs.GetSystemDriveChar();
+	
+	__ASSERT_ALWAYS(!fileName.CompareF(expectedFileName), User::Leave(KErrBadHandle));
+		
+	CleanupStack::PopAndDestroy(2, &fileName); // fileName, expectedFileName
+	}
+
+void CScrServer::SetupL()
+	{
+	// Connect to the file server
+	User::LeaveIfError(iFs.Connect());
+	User::LeaveIfError(iFs.ShareProtected());
+	
+	// Connect to the SCR database
+	RScrHelper sh;
+	User::LeaveIfError(sh.Connect());
+	CleanupClosePushL(sh);
+	
+	// Retrieve handles for database and journal files
+	sh.RetrieveFileHandlesL(iDatabaseFile, iJournalFile);
+	CleanupStack::PopAndDestroy(&sh);
+	
+	// Check if the retrieved file handles belong to the expected files (KScrDatabaseFilePath/KScrJournalFilePath).
+	// This is an extra security measure in the SCR to check that the file handle transferred from SCR Helper Server  
+	// really corresponds to scr.db/scr.db-journal in the expected location.
+	CheckFilePathL(iFs, iDatabaseFile, KScrDatabaseFilePath);
+	CheckFilePathL(iFs, iJournalFile, KScrJournalFilePath);
+	
+	ReconnectL();
+	}
+
+CScsSession* CScrServer::DoNewSessionL(const RMessage2& aMessage)
+/**
+	Implement CScsServer by allocating a new instance of CScrSession.
+
+	@param	aMessage	Standard server-side handle to message.
+	@return				New instance of the SCR session class which is owned by the caller.
+ */
+	{
+	DEBUG_PRINTF(_L8("SCR session creation!"));
+	return CScrSession::NewL(*this, aMessage);
+	}
+
+CPolicyServer::TCustomResult CScrServer::CheckComponentIdMatchingEnvironmentL(const RMessage2& aMsg)
+	{	
+	TComponentId componentId = CScrRequestImpl::GetComponentIdFromMsgL(aMsg); 
+	TSecureId clientSid = aMsg.SecureId();
+	
+	TSecureId installerSid (0);
+	if(iRequestImpl->GetInstallerSidForComponentL(componentId, installerSid))
+		{
+		if (clientSid == installerSid)
+			return EPass;
+		}
+	
+	// Minor optimisation - in most legal cases, the installer is the one which should be doing operations,
+	// so we check it first to reduce the second query
+	TSecureId executionEnvironmentSid (0);
+	if(iRequestImpl->GetExecutionEnvSidForComponentL(componentId, executionEnvironmentSid))	
+		{
+		if (clientSid == executionEnvironmentSid)
+			return EPass;
+		}
+			
+	DEBUG_PRINTF5(_L("Neither installer nor execution environment matched the client while checking for component-matching environment. Installer SID %d, execution environment SID %d, client SID %d, component ID %d"), 
+			TUint32(installerSid), TUint32(executionEnvironmentSid), TUint32(clientSid), componentId);
+	return EFail;
+	}
+	
+CPolicyServer::TCustomResult CScrServer::CheckDeleteComponentAllowedL(const RMessage2& aMsg)	
+	{
+	const TUint KSifServerSid = 0x10285BCB;	
+	
+	if (CheckComponentIdMatchingEnvironmentL(aMsg) == EPass)
+		return EPass;
+		
+	TSecureId clientSid = aMsg.SecureId();		
+	TComponentId componentId = CScrRequestImpl::GetComponentIdFromMsgL(aMsg);
+	// If a component does not have corresponding environments, it means that it is orphaned. In this case, SIF is allowed to forcefully remove it
+	if (iRequestImpl->GetIsComponentOrphanedL(componentId) && (TUint32(clientSid) == KSifServerSid))
+		{
+		DEBUG_PRINTF2(_L("Allowing SIF to uninstall orphaned component %d"), componentId);
+		return EPass;	
+		}
+		
+	return EFail;
+	}
+
+CPolicyServer::TCustomResult CScrServer::CheckSoftwareNameMatchingEnvironmentL(const RMessage2& aMsg)
+	{
+	HBufC* softwareTypeName = CScrRequestImpl::GetSoftwareTypeNameFromMsgLC(aMsg);
+	
+	TSecureId installerSid, executionEnvSid;	
+	if(!iRequestImpl->GetSidsForSoftwareTypeL(softwareTypeName, installerSid, executionEnvSid))
+		{
+		DEBUG_PRINTF2(_L("SID couldn't be found for software type (%S)!"), softwareTypeName);
+		CleanupStack::PopAndDestroy(softwareTypeName);
+		return EFail;
+		}
+	CleanupStack::PopAndDestroy(softwareTypeName);
+	
+	TSecureId clientSid = aMsg.SecureId();
+	if (clientSid == installerSid || clientSid == executionEnvSid)
+		return EPass;	
+
+	DEBUG_PRINTF4(_L("Neither installer nor execution environment matched the client while checking for component-matching environment. Installer SID %d, execution environment SID %d, client SID %d"), 
+			TUint32(installerSid), TUint32(executionEnvSid), TUint32(clientSid));	
+	return EFail;
+	}
+
+CPolicyServer::TCustomResult CScrServer::CheckAllowedFilePathL(const RMessage2& aMsg)
+	{
+	HBufC* fileName = CScrRequestImpl::ReadFileNameFromMsgLC(aMsg);
+	
+	// Retrieve the required capabilities for write access to this path
+	TCapabilitySet requiredCapabilities = SecCommonUtils::FileModificationRequiredCapabilitiesL(*fileName, aMsg.SecureId());
+	
+	TBool result = EFalse;
+	TBool allFilesRequired = requiredCapabilities.HasCapability(ECapabilityAllFiles);
+	TBool tcbRequired = requiredCapabilities.HasCapability(ECapabilityTCB);
+	
+	// Test whether the client has at least one of the required capabilities
+	if (allFilesRequired)
+		result = aMsg.HasCapability(ECapabilityAllFiles);
+	if (!result && tcbRequired)
+		result = aMsg.HasCapability(ECapabilityTCB);
+	if (!allFilesRequired && !tcbRequired)
+		result = ETrue;
+	
+	CleanupStack::PopAndDestroy(fileName);
+	return result ? EPass : EFail;
+	}
+
+CPolicyServer::TCustomResult CScrServer::CheckClientIsInstallerL(const RMessage2& aMsg)
+	{
+	TSecureId clientSid = aMsg.SecureId();
+	DEBUG_PRINTF2(_L("The client SID is 0x%X"), clientSid.iId);
+	TBool isInstallerSid = iRequestImpl->IsInstallerOrExecutionEnvSidL(clientSid);
+	return isInstallerSid ? EPass : EFail;
+	}
+
+CPolicyServer::TCustomResult CScrServer::CheckCommonComponentPropertySettableL(const RMessage2& aMsg, TCapability aRequiredCapability)
+	{
+	// Setting a common component property is allowed either for the owning installer or for a process with corresponding capability
+	if (CheckComponentIdMatchingEnvironmentL(aMsg) == EPass)
+		return EPass;
+	return aMsg.HasCapability(aRequiredCapability)? EPass : EFail;
+	}
+
+CPolicyServer::TCustomResult CScrServer::CustomSecurityCheckL(const RMessage2& aMsg, TInt& /*aAction*/, TSecurityInfo& /*aMissing*/)
+	{	
+	// SCS framework adds its own bitmask to the function id - we need to strip it in order to detect the actual function invoked
+	TInt functionId = StripScsFunctionMask(aMsg.Function());
+
+	switch (functionId)
+		{
+		case ECreateTransaction:
+		case ERollbackTransaction:
+		case ECommitTransaction:
+			return CheckClientIsInstallerL(aMsg);
+		case EAddComponent:
+		case EAddComponentDependency:
+		case EDeleteComponentDependency:
+			return CheckSoftwareNameMatchingEnvironmentL(aMsg);
+		case ERegisterComponentFile:
+		case ESetFileStringProperty:
+		case ESetFileNumericProperty:
+		case EDeleteFileProperty:
+		case EUnregisterComponentFile:
+			// For file registration we check that the client is actually allowed to modify files under this location
+			// We do not check for the installer SID, since if the client can write to this location, then registering this location for other components
+			// does not pose additional risk			
+			return CheckAllowedFilePathL(aMsg);	
+		case ESetComponentLocalizableProperty:
+		case ESetComponentNumericProperty:
+		case ESetComponentBinaryProperty:
+		case ESetComponentName:
+		case ESetComponentVendor:
+		case ESetComponentVersion:
+		case ESetComponentSize:
+		case EDeleteComponentProperty:
+		case ESetScomoState:
+		case ESetIsComponentPresent:
+			return CheckComponentIdMatchingEnvironmentL(aMsg);
+		case EDeleteComponent:			
+			return CheckDeleteComponentAllowedL(aMsg);
+		case ESetIsComponentRemovable:
+			return CheckCommonComponentPropertySettableL(aMsg, ECapabilityAllFiles);
+		case ESetIsComponentDrmProtected:
+		case ESetIsComponentHidden:
+		case ESetIsComponentKnownRevoked:
+		case ESetIsComponentOriginVerified:		
+			return CheckCommonComponentPropertySettableL(aMsg, ECapabilityWriteDeviceData);
+		default:
+			DEBUG_PRINTF2(_L("Unknown function was invoked in CustomSecurityCheck - %d"), functionId);							
+			__ASSERT_DEBUG(0, User::Invariant());
+			return EFail;
+		}
+	}
+
+void CScrServer::ReconnectL()
+	{
+	DeleteObjectZ(iRequestImpl);	
+	iRequestImpl = CScrRequestImpl::NewL(iFs, iDatabaseFile, iJournalFile);	
+	}
+
+void CScrServer::AddSubsessionOwnerL(CScrSession* aSession)
+	{
+	iSubsessionOwners.InsertInAddressOrderAllowRepeatsL(aSession);
+	}
+
+void CScrServer::RemoveSubsessionOwner(CScrSession* aSession)
+	{
+	TInt index = iSubsessionOwners.FindInAddressOrder(aSession);
+	if(KErrNotFound != index)
+		iSubsessionOwners.Remove(index);
+	}
+
+TBool CScrServer::IsTheOnlySubsessionOwner(CScrSession* aSession)
+	{
+	TInt firstElementIdx = 0;
+	TInt lastElementIdx = iSubsessionOwners.Count();
+	// if both first element and the last element in the array is the provided session
+	// it means that all active subsessions is owned by this session. 
+	if(firstElementIdx == iSubsessionOwners.SpecificFindInAddressOrder(aSession, EArrayFindMode_First) &&
+	   lastElementIdx == iSubsessionOwners.SpecificFindInAddressOrder(aSession, EArrayFindMode_Last))
+		{
+		return ETrue;
+		}
+	return EFalse; 
+	}
+
+TInt CScrServer::SubsessionCount()
+	{
+	return iSubsessionOwners.Count();
+	}
+
+void CScrServer::SetTransactionOwner(CScrSession* aSession)
+	{
+	iTransactionOwningSession = aSession;
+	}
+
+
+TBool CScrServer::IsTransactionInProgress()
+	{
+	if(iTransactionOwningSession)
+		return ETrue;
+	else 
+		return EFalse;
+	}
+
+
+TBool CScrServer::IsTransactionOwner(CScrSession* aSession)
+	{	
+	__ASSERT_ALWAYS(aSession, User::Invariant());
+	if(aSession == iTransactionOwningSession) 
+		return ETrue;
+	else 
+		return EFalse;
+	}
+
+void CScrServer::DoPreHeapMarkOrCheckL()
+/**
+   This function is called by the framework just before settingchecking a heap mark. We need to compress/free memory
+   down to a state which should be the same both before and after the test operations.
+*/
+{
+#ifdef _DEBUG
+iSubsessionOwners.Compress();
+DeleteObjectZ(iRequestImpl);
+#endif
+}
+
+void CScrServer::DoPostHeapMarkOrCheckL()
+/**
+   This function is called by the framework just before settingchecking a heap mark. We need to compress/free memory
+   down to a state which should be the same both before and after the test operations.
+*/
+{
+#ifdef _DEBUG
+this->ReconnectL();
+#endif
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/source/server/scrsession.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,478 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements the SCR session class which is server-side session object.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#include "scrserver.h"
+#include "scrsubsession.h"
+#include "scrrequestimpl.h"
+#include "usiflog.h"
+#include "usiferror.h"
+
+using namespace Usif;
+
+//
+// CScrSession
+//
+
+CScrSession::CScrSession(CScrServer& aServer)
+/**
+	Intializes the SCR session object with the server handle.
+ */
+	:	CScsSession(aServer)
+		{
+		DEBUG_PRINTF(_L8("SCR session construction!"));
+		}
+
+
+CScrSession::~CScrSession()
+/**
+	Destructor for the SCR session object.
+ */
+	{
+	DEBUG_PRINTF(_L8("SCR session destruction!"));
+	CScrServer *server = static_cast<CScrServer*>(&iServer);
+	// Take care to close all outstanding subsesions first, as we wouldn't be able to roll-back with open statements
+	TRAP_IGNORE(CScsSession::CloseAllSubsessionsL());
+	// Now roll-back transaction in case it wasn't committed or rolled back explicitly
+	if(server->IsTransactionOwner(this))
+		{
+		TRAPD(err, server->RequestImpL()->RollbackTransactionL());
+		if(KErrNone != err)
+			{
+			TRAP_IGNORE(server->ReconnectL());
+			}
+		server->SetTransactionOwner(NULL);
+		}
+	// Any error during writing log entries can be ignored as it is done in the destructor of SCR session
+	// and error logs are already written inside the function.
+	TRAP_IGNORE(server->RequestImpL()->FlushLogEntriesArrayL());
+	}
+
+	
+CScrSession* CScrSession::NewL(CScrServer &aServer, const RMessage2& aMessage)
+/**
+	Factory function allocates new instance of CScrSession.
+	
+	@param aServer  SCR Server object.
+	@param aMessage	Standard server-side handle to message. Not used.
+	@return			Newly created instance of CScrSession which is owned by the caller.
+ */
+	{
+	DEBUG_PRINTF2(_L("A new SCR session for the process(0x%x) is being created."), aMessage.SecureId().iId);
+	(void)aMessage; // Happy the compiler in release mode
+	CScrSession* self = new (ELeave) CScrSession(aServer);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CancelTransaction(TAny* aParam)
+	{
+	CScrServer *server = static_cast<CScrServer*>(aParam);
+	TRAP_IGNORE(server->RequestImpL()->RollbackTransactionL());
+	server->SetTransactionOwner(NULL);
+	}
+
+TBool CScrSession::DoServiceL(TInt aFunction, const RMessage2& aMessage)
+/**
+	Implement CScsSession by handling the supplied message.
+
+	@param	aFunction		Function identifier without SCS code.
+	@param	aMessage		Standard server-side handle to message.  Not used.
+ */
+	{
+	TScrSessionFunction f = static_cast<TScrSessionFunction>(aFunction);
+	CScrServer *server = static_cast<CScrServer*>(&iServer);
+	
+	TBool isImplicitTransaction = EFalse;	
+	MutatingOperationsPreambleL(*server, f, isImplicitTransaction);
+	if(isImplicitTransaction)
+		{
+		CleanupStack::PushL(TCleanupItem(CancelTransaction, server));
+		}
+	
+	switch(f)
+		{
+		case ECreateTransaction:
+			server->RequestImpL()->CreateTransactionL();
+			server->SetTransactionOwner(this);
+			break;
+		case ERollbackTransaction:
+			server->RequestImpL()->RollbackTransactionL();
+			server->SetTransactionOwner(NULL);
+			break;
+		case ECommitTransaction:
+			server->RequestImpL()->CommitTransactionL();
+			server->SetTransactionOwner(NULL);
+			break;
+		case EAddComponent:
+			server->RequestImpL()->AddComponentL(aMessage);
+			break;
+		case ESetComponentLocalizableProperty:
+			server->RequestImpL()->SetComponentLocalizablePropertyL(aMessage);
+			break;
+		case ESetComponentNumericProperty:
+			server->RequestImpL()->SetComponentIntPropertyL(aMessage);
+			break;
+		case ESetComponentBinaryProperty:
+			server->RequestImpL()->SetComponentBinaryPropertyL(aMessage);
+			break;			
+		case ERegisterComponentFile:
+			server->RequestImpL()->RegisterComponentFileL(aMessage);
+			break;
+		case ESetFileStringProperty:
+			server->RequestImpL()->SetFileStrPropertyL(aMessage);
+			break;
+		case ESetFileNumericProperty:
+			server->RequestImpL()->SetFileIntPropertyL(aMessage);
+			break;
+		case ESetComponentName:
+			server->RequestImpL()->SetComponentNameL(aMessage);
+			break;
+		case ESetComponentVendor:
+			server->RequestImpL()->SetVendorNameL(aMessage);
+			break;
+		case ESetComponentVersion:
+			server->RequestImpL()->SetComponentVersionL(aMessage);
+			break;
+		case ESetIsComponentRemovable:
+			server->RequestImpL()->SetIsComponentRemovableL(aMessage);
+			break;
+		case ESetIsComponentDrmProtected:
+			server->RequestImpL()->SetIsComponentDrmProtectedL(aMessage);
+			break;
+		case ESetIsComponentHidden:
+			server->RequestImpL()->SetIsComponentHiddenL(aMessage);
+			break;
+		case ESetIsComponentKnownRevoked:
+			server->RequestImpL()->SetIsComponentKnownRevokedL(aMessage);
+			break;
+		case ESetIsComponentOriginVerified:
+			server->RequestImpL()->SetIsComponentOriginVerifiedL(aMessage);
+			break;
+		case ESetComponentSize:
+			server->RequestImpL()->SetComponentSizeL(aMessage);
+			break;
+		case EDeleteComponentProperty:
+			server->RequestImpL()->DeleteComponentPropertyL(aMessage);
+			break;
+		case EDeleteFileProperty:
+			server->RequestImpL()->DeleteFilePropertyL(aMessage);
+			break;
+		case EUnregisterComponentFile:
+			server->RequestImpL()->UnregisterComponentFileL(aMessage);
+			break;
+		case EDeleteComponent:
+			server->RequestImpL()->DeleteComponentL(aMessage);
+			break;
+		case EGetSingleComponentSize:
+			server->RequestImpL()->GetComponentEntrySizeL(aMessage);
+			break;
+		case EGetSingleComponentData:
+			server->RequestImpL()->GetComponentEntryDataL(aMessage);
+			break;
+		case EGetFilePropertiesSize:
+			server->RequestImpL()->GetFilePropertiesSizeL(aMessage);
+			break;
+		case EGetFilePropertiesData:
+			server->RequestImpL()->GetFilePropertiesDataL(aMessage);
+			break;
+		case EGetSingleFilePropertySize:
+			server->RequestImpL()->GetSingleFilePropertySizeL(aMessage);
+			break;
+		case EGetSingleFilePropertyData:
+			server->RequestImpL()->GetSingleFilePropertyDataL(aMessage);
+			break;
+		case EGetFileComponentsSize:
+			server->RequestImpL()->GetFileComponentsSizeL(aMessage);
+			break;
+		case EGetFileComponentsData:
+			server->RequestImpL()->GetFileComponentsDataL(aMessage);
+			break;
+		case EGetComponentPropertiesSize:
+			server->RequestImpL()->GetComponentPropertiesSizeL(aMessage);
+			break;
+		case EGetComponentPropertiesData:
+			server->RequestImpL()->GetComponentPropertiesDataL(aMessage);
+			break;
+		case EGetComponentSinglePropertySize:
+			server->RequestImpL()->GetComponentSinglePropertySizeL(aMessage);
+			break;
+		case EGetComponentSinglePropertyData:
+			server->RequestImpL()->GetComponentSinglePropertyDataL(aMessage);
+			break;
+		case EGetIsMediaPresent:
+			server->RequestImpL()->GetIsMediaPresentL(aMessage);
+			break;
+		case ESetScomoState:
+			server->RequestImpL()->SetScomoStateL(aMessage);
+			break;
+		case EGetPluginUidWithMimeType:
+			server->RequestImpL()->GetPluginUidWithMimeTypeL(aMessage);
+			break;
+		case EGetPluginUidWithComponentId:
+			server->RequestImpL()->GetPluginUidWithComponentIdL(aMessage);
+			break;
+		case EGetComponentIdListSize:
+			server->RequestImpL()->GetComponentIdListSizeL(aMessage);
+			break;
+		case EGetComponentIdListData:
+			server->RequestImpL()->GetComponentIdListDataL(aMessage);
+			break;
+		case EGetComponentFilesCount:
+			server->RequestImpL()->GetComponentFilesCountL(aMessage);
+			break;
+		case EAddComponentDependency:
+			server->RequestImpL()->AddComponentDependencyL(aMessage);
+			break;
+		case EDeleteComponentDependency:
+			server->RequestImpL()->DeleteComponentDependencyL(aMessage);
+			break;
+		case EGetLocalComponentId:
+			server->RequestImpL()->GetComponentIdL(aMessage);
+			break;
+		case EGetComponentWithGlobalIdSize:
+			server->RequestImpL()->GetComponentWithGlobalIdSizeL(aMessage);
+			break;
+		case EGetComponentWithGlobalIdData:
+			server->RequestImpL()->GetComponentWithGlobalIdDataL(aMessage);
+			break;
+		case EGetSupplierComponentsSize:
+			server->RequestImpL()->GetSupplierComponentsSizeL(aMessage);
+			break;
+		case EGetSupplierComponentsData:
+			server->RequestImpL()->GetSupplierComponentsDataL(aMessage);
+			break;
+		case EGetDependantComponentsSize:
+			server->RequestImpL()->GetDependantComponentsSizeL(aMessage);
+			break;
+		case EGetDependantComponentsData:
+			server->RequestImpL()->GetDependantComponentsDataL(aMessage);
+			break;
+		case EAddSoftwareType:
+			server->RequestImpL()->AddSoftwareTypeL(aMessage);
+			break;
+		case EDeleteSoftwareType:
+			server->RequestImpL()->DeleteSoftwareTypeL(aMessage);
+			break;
+		case EGetDeletedMimeTypes:
+			server->RequestImpL()->GetDeletedMimeTypesL(aMessage);
+			break;
+		case EGetIsComponentOrphaned:
+			server->RequestImpL()->GetIsComponentOrphanedL(aMessage);
+			break;
+		case EGetLogFileHandle:
+			server->RequestImpL()->GetLogFileHandleL(aMessage);
+			//RMessage2 object is closed by both TransferToClient() and SCS framework.
+			//return EFalse to prevent SCS to close the message object.
+			return EFalse;
+		case EGetIsComponentOnReadOnlyDrive:
+			server->RequestImpL()->GetIsComponentOnReadOnlyDriveL(aMessage);
+			break;
+		case EGetIsComponentPresent:
+			server->RequestImpL()->GetIsComponentPresentL(aMessage);
+			break;
+		case ESetIsComponentPresent:
+			server->RequestImpL()->SetIsComponentPresentL(aMessage);
+			break;
+		case EGetComponentSupportedLocalesListSize:
+			server->RequestImpL()->GetComponentSupportedLocalesListSizeL(aMessage);
+			break;
+		case EGetComponentSupportedLocalesListData:
+			server->RequestImpL()->GetComponentSupportedLocalesListDataL(aMessage);
+			break;
+		case EGetLocalizedComponentSize:
+		    server->RequestImpL()->GetComponentLocalizedEntrySizeL(aMessage);
+		    break;
+		case EGetLocalizedComponentData:
+		    server->RequestImpL()->GetComponentLocalizedEntryDataL(aMessage);
+		    break;
+		default:
+			User::Leave(KErrNotSupported);
+			break;
+		}//End of switch.
+	
+	if(isImplicitTransaction)
+		{
+		MutatingOperationsPostambleL(*server);
+		CleanupStack::Pop(server);
+		}
+	
+	return ETrue;
+	}//End of function DoServiceL
+	
+
+void CScrSession::ApplySubsessionConstraintL(CScrServer& aServer)
+	{// Check whether or not write operation is allowed. if a subsession is in progress
+	 // a mutating operation is not allowed to make the subsession results consistent.
+	if(aServer.SubsessionCount() > 0)
+		{
+		DEBUG_PRINTF(_L8("Subsession in progress. Database write access was rejected!"));
+		User::Leave(KErrScrReadOperationInProgress);
+		}
+	}
+
+void CScrSession::ApplyTransactionConstraintL(CScrServer& aServer, TBool& aCreateImplicitTransaction)
+	{// Check whether a transaction is in progress and owned by this session.
+	 // A mutating operation is not allowed if the transaction owned by another session.
+	if(aServer.IsTransactionInProgress())
+		{// A transaction is already in progress, check if it is owned by this session.
+		if(!aServer.IsTransactionOwner(this))
+			{
+			DEBUG_PRINTF(_L8("Transaction in progress owned by another session. Database write access was rejected!"));
+			User::Leave(KErrScrWriteOperationInProgress);
+			}
+		aCreateImplicitTransaction = EFalse;
+		}
+	else if(aCreateImplicitTransaction)
+		{// No transaction is in progress. Start an implicit transaction to improve
+		 // the performance of mutating APIs. The implicit transaction must be
+		 // committed when the API request is completed successfully, or rolled back 
+		 // if a failure occurs while performing the request.
+		aServer.RequestImpL()->CreateTransactionL();
+		aServer.SetTransactionOwner(this);
+		}
+	}
+
+void CScrSession::MutatingOperationsPreambleL(CScrServer& aServer, TScrSessionFunction aFunction, TBool& aIsTransactionImplicit)
+	{
+	// In SCR server, there can be ONLY ONE active TRANSACTION. Concurrent and nested
+	// transactions are not supported. A transaction can committed/cancelled only by 
+	// its owning session. While a transaction in progress, other sessions can invoke
+	// query APIs, but not mutating APIs. Only the owning session can invoke APIs altering
+	// database data. Moreover, a reading session (subsession) cannot be created while a transaction
+	// is in progress unless the transaction is owned by this session. A transaction cannot be created if a reading subsession exits.
+
+	switch(aFunction)
+		{
+		case ECreateTransaction:
+			{
+			if(aServer.IsTransactionInProgress())
+				{// A new transaction cannot be started if there is another in progress
+				User::Leave(KErrScrWriteOperationInProgress);
+				}
+			if(aServer.SubsessionCount() && !aServer.IsTheOnlySubsessionOwner(this))
+				{// If there is a subsession owned by another session, it is not allowed to start a new transaction.
+				 // Beacuse it is also not allowed to create a subsession if a transaction owned by another session is in progress.
+				User::Leave(KErrScrReadOperationInProgress);
+				}
+			break;
+			}
+		case ERollbackTransaction:
+		case ECommitTransaction:
+			{
+			if(!aServer.IsTransactionOwner(this))
+				{
+				DEBUG_PRINTF(_L8("There is no active transaction owned by this session!"));
+				User::Leave(KErrScrNoActiveTransaction);
+				}
+			break;
+			}
+		case ESetComponentLocalizableProperty:
+		case ESetComponentNumericProperty:
+		case ESetComponentBinaryProperty:
+		case ESetFileStringProperty:
+		case ESetFileNumericProperty:
+		case ESetComponentName:
+		case ESetComponentVendor:
+		case ESetComponentVersion:
+		case ESetIsComponentRemovable:
+		case ESetIsComponentDrmProtected:
+		case ESetIsComponentHidden:
+		case ESetIsComponentKnownRevoked:
+		case ESetIsComponentOriginVerified:
+		case ESetComponentSize:
+		case EDeleteComponentProperty:
+		case EDeleteFileProperty:
+		case EAddComponentDependency:
+		case EDeleteComponentDependency:
+		case ESetIsComponentPresent:
+			{ 
+			ApplySubsessionConstraintL(aServer);
+			// These mutating operations consist of a single mutating database statement.
+			// So, no need to create an implicit transaction
+			TBool createImplicitTransaction = EFalse; 
+			ApplyTransactionConstraintL(aServer,createImplicitTransaction);
+			break;
+			}
+		case EAddComponent:
+		case ERegisterComponentFile:
+		case EUnregisterComponentFile:
+		case EDeleteComponent:
+		case EAddSoftwareType:
+		case EDeleteSoftwareType:
+		case EGetDeletedMimeTypes:
+			{
+			ApplySubsessionConstraintL(aServer);
+			// These mutating operations consist of two or more mutating database statements.
+			// Therefore, an implicit transaction is begun if an explicit one doesn't exist.
+			TBool createImplicitTransaction = ETrue; 
+			ApplyTransactionConstraintL(aServer,createImplicitTransaction);
+			aIsTransactionImplicit = createImplicitTransaction;
+			break;
+			}
+		default:
+			// Other operations do NOT require write permission. Do nothing.
+			break;
+		}
+	}
+
+void CScrSession::MutatingOperationsPostambleL(CScrServer& aServer)
+	{
+	// This function is called to commit the implicit transaction opened for a specific mutating request.
+	aServer.RequestImpL()->CommitTransactionL();
+	aServer.SetTransactionOwner(NULL);
+	}
+
+CScsSubsession* CScrSession::DoCreateSubsessionL(TInt aFunction, const RMessage2& /*aMessage*/)
+/**
+	Override CScsSession::DoCreateSubsessionL by allocating a new SCR subsession object.
+
+	@param	aFunction		Function identifier without SCS code.
+	@param	aMessage		Standard server-side handle to message.	
+	@return					New, initialized instance of CScrSubsession, ownership is transferred.
+ */
+	{
+	TScrSessionFunction f = static_cast<TScrSessionFunction>(aFunction);
+	CScrServer *server = static_cast<CScrServer*>(&iServer);
+	
+	if(server->IsTransactionInProgress() && !server->IsTransactionOwner(this)) 
+		{
+		DEBUG_PRINTF(_L8("Transaction from another session is in progress. Subsession cannot be created!"));
+		User::Leave(KErrScrWriteOperationInProgress);
+		}
+	
+	switch(f)
+		{
+		case ESubSessCreateComponentsView:
+			return CComponentViewSubsession::NewL(*this);	
+		case ESubSessCreateFileList:
+			return CFileListSubsession::NewL(*this);
+		default:
+			User::Leave(KErrNotSupported);
+			/*lint -unreachable */
+			return 0;	// avoid compiler warning
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/source/server/scrsubsession.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,242 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements CScrSubsession. See class and function definitions for more information.
+*
+*/
+
+
+/**
+ @file
+*/
+
+#include "scrsubsession.h"
+#include "scrrequestimpl.h"
+#include "scrdatabase.h"
+#include <scs/ipcstream.h>
+#include <scs/cleanuputils.h>
+
+using namespace Usif;
+
+/////////////////
+// CScrSubsession
+/////////////////
+
+CScrSubsession::CScrSubsession(CScrSession &aSession)
+/**
+	This constructor is protected and prevents direct instantiation.
+ */
+	: CScsSubsession(aSession)
+	{
+	iSession = static_cast<CScrSession *>(&aSession);
+	iServer = static_cast<CScrServer *>(&iSession->iServer);
+	}
+
+void CScrSubsession::ConstructL()
+/**
+	Second-phase constructor.
+ */
+	{
+	iServer->AddSubsessionOwnerL(iSession);
+	}
+
+CScrSubsession::~CScrSubsession()
+/**
+ 	Virtual destructor. Closes the database session handle.
+ */
+	{
+	iServer->RemoveSubsessionOwner(iSession);
+	delete iStatement;
+	}
+	
+///////////////////////////
+// CCompViewSubsessionContext
+///////////////////////////	
+	
+CCompViewSubsessionContext::~CCompViewSubsessionContext()
+	{
+	delete iLastSoftwareTypeName;
+	iComponentFilterSuperset.Close();
+	}
+	
+///////////////////////////
+// CComponentViewSubsession
+///////////////////////////
+
+CComponentViewSubsession* CComponentViewSubsession::NewL(CScrSession &aSession)
+/**
+	Factory function allocates a new instance of CComponentViewSubsession.
+	
+	Note that CComponentViewSubsession derives from CObject and therefore it MUST NOT be deleted directly,
+	instead it should be closed.
+	 
+	@return					The newly created instance of CComponentViewSubsession.
+							Ownership is transferred to the caller.
+ */
+	{
+	CComponentViewSubsession* self = new(ELeave) CComponentViewSubsession(aSession);
+	CleanupClosePushL(*self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CComponentViewSubsession::CComponentViewSubsession(CScrSession &aSession)
+/**
+	This constructor is private and prevents direct instantiation. It provides
+	a single point of definition from which to call the superclass c'tor.
+ */
+	:	CScrSubsession(aSession)
+	{	
+	}
+
+void CComponentViewSubsession::ConstructL()
+/**
+	Second-phase constructor.
+ */
+	{
+	iSubsessionContext = new (ELeave) CCompViewSubsessionContext;		
+	CScrSubsession::ConstructL();
+	}
+
+CComponentViewSubsession::~CComponentViewSubsession()
+/**
+	Destructor for the subsession object.
+ */
+	{
+	delete iFilter;
+	delete iComponentEntry;
+	iComponentEntryList.ResetAndDestroy();
+	delete iSubsessionContext;
+	}
+
+TBool CComponentViewSubsession::DoServiceL(TInt aFunction, const RMessage2& aMessage)
+/**
+	Implement CComponentViewSubsession by handling the supplied message.
+
+	@param	aFunction		Function identifier without SCS code.
+	@param	aMessage		Standard server-side handle to message.
+	@return ETrue means complete client request now. EFalse for asynchronous tasks.
+ */
+	{
+	TScrSubSessionFunction f = static_cast<TScrSubSessionFunction>(aFunction);
+	
+	switch (f)
+		{
+		case EOpenComponentsView:
+			{
+			DeleteObjectZ(iFilter);
+			iFilter = iServer->RequestImpL()->ReadComponentFilterL(aMessage);
+			DeleteObjectZ(iStatement);
+			iStatement = iServer->RequestImpL()->OpenComponentViewL(*iFilter, iSubsessionContext->iComponentFilterSuperset, iSubsessionContext->iFilterSupersetInUse);
+			break;
+			}
+		case EGetNextComponentSize:
+			iServer->RequestImpL()->NextComponentSizeL(aMessage, iStatement, iFilter, iComponentEntry, this->iSubsessionContext);
+			break;
+		case EGetNextComponentData:
+			iServer->RequestImpL()->NextComponentDataL(aMessage, iComponentEntry);
+			break;
+		case EGetNextComponentSetSize:
+			iServer->RequestImpL()->NextComponentSetSizeL(aMessage, iStatement, iFilter, iComponentEntryList, this->iSubsessionContext);
+			break;
+		case EGetNextComponentSetData:
+			iServer->RequestImpL()->NextComponentSetDataL(aMessage, iComponentEntryList);
+			break;
+		default:
+			User::Leave(KErrNotSupported);
+			break;
+		}
+	return ETrue;
+	}
+
+
+///////////////////////
+// CFileListSubsession
+///////////////////////
+
+CFileListSubsession* CFileListSubsession::NewL(CScrSession &aSession)
+/**
+	Factory function allocates a new instance of CFileListSubsession.
+	
+	Note that CFileListSubsession derives from CObject and therefore it MUST NOT be deleted directly,
+	instead it should be closed.
+	 
+	@return					The newly created instance of CFileListSubsession.
+							Ownership is transferred to the caller.
+ */
+	{
+	CFileListSubsession* self = new(ELeave) CFileListSubsession(aSession);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CFileListSubsession::CFileListSubsession(CScrSession &aSession)
+/**
+	This constructor is private and prevents direct instantiation. It provides
+	a single point of definition from which to call the superclass c'tor.
+ */
+	:	CScrSubsession(aSession)
+	{
+	// empty.
+	}
+
+CFileListSubsession::~CFileListSubsession()
+/**
+	Destructor for the subsession object.
+ */
+	{		
+	delete iFilePath;
+	iFileList.Close();
+	}
+
+TBool CFileListSubsession::DoServiceL(TInt aFunction, const RMessage2& aMessage)
+/**
+	Implement CFileListSubsession by handling the supplied message.
+
+	@param	aFunction		Function identifier without SCS code.
+	@param	aMessage		Standard server-side handle to message.
+	@return ETrue means complete client request now. EFalse for asynchronous tasks.
+ */
+	{
+	TScrSessionFunction f = static_cast<TScrSessionFunction>(aFunction);
+	
+	switch (f)
+		{
+		case EOpenFileList:
+			{
+			DeleteObjectZ(iStatement);
+			iStatement = iServer->RequestImpL()->OpenFileListL(aMessage);
+			break;
+			}
+		case EGetNextFileSize:
+			iServer->RequestImpL()->NextFileSizeL(aMessage, iStatement, iFilePath);
+			break;
+		case EGetNextFileData:
+			iServer->RequestImpL()->NextFileDataL(aMessage, iFilePath);
+			break;
+		case EGetNextFileSetSize:
+			iServer->RequestImpL()->NextFileSetSizeL(aMessage, iStatement, iFileList);
+			break;
+		case EGetNextFileSetData:
+			iServer->RequestImpL()->NextFileSetDataL(aMessage, iFileList);
+			break;
+		default:
+			User::Leave(KErrNotSupported);
+			break;
+		}
+	return ETrue;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/source/server/startup.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Executable entrypoint and server object factory function. The latter
+* is supplied to the SCS boilerplate code which starts up the server.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#include "scrserver.h"
+
+using namespace Usif;
+
+static CScsServer* NewScrServerLC()
+/**
+	This factory function is called by SCS framework.  It allocates
+	the Scr Server object and leaves it on the cleanup stack.
+
+	@return		New initialized instance of CScrServer.
+				On return this is on the cleanup stack.
+ */
+	{
+	return Usif::CScrServer::NewLC();
+	}
+
+
+GLDEF_C TInt E32Main()
+/**
+	Executable entrypoint. Calls the SCS boilerplate code which starts the SCR server
+	and does not return until the server shuts down.
+
+	@return	Symbian OS error code where KErrNone indicates success 
+			and any other value indicates failure.
+ */
+	{
+	return StartScsServer(NewScrServerLC);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/group/tscr.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,62 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This is the project specification file for the Software Component Registry test harness
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @test
+*/
+
+TARGETTYPE EXE
+TARGET tscr.exe
+
+UID 0 0x10285BC9
+
+// ProtServ TrustedUI are used for scrdatabase testing
+CAPABILITY ProtServ ReadUserData WriteDeviceData TrustedUI AllFiles 
+
+SOURCEPATH 	../tscr/source
+
+SOURCE tscrserver.cpp 
+SOURCE tscrstep.cpp
+SOURCE componentmanagementsteps.cpp transactionmanagementsteps.cpp deletescrdbstep.cpp
+SOURCE componentquerysteps.cpp subsessionsteps.cpp sifsteps.cpp appmanagersteps.cpp
+SOURCE pluginmanagementsteps.cpp installloghistorysteps.cpp
+
+SOURCEPATH 	../tscraccessor/source
+SOURCE tscraccessor_client.cpp
+
+USERINCLUDE ../tscr/inc
+USERINCLUDE	../../inc_private
+USERINCLUDE ../tscraccessor/inc
+USERINCLUDE	../../inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+SMPSAFE
+
+LIBRARY euser.lib 
+LIBRARY efsrv.lib 
+LIBRARY testexecuteutils.lib
+LIBRARY testexecutelogclient.lib
+LIBRARY rfileloggerclient.lib
+LIBRARY scrdatabase.lib
+LIBRARY oomtestbase.lib
+LIBRARY scrclient.lib
+LIBRARY scsclient.lib
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/group/tscraccessor.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* tscraccessor.exe Accessor server to access SCR functionality requiring SWI Sid.
+*
+*/
+
+
+/**
+ @file
+*/
+
+target tscraccessor.exe
+targettype exe
+
+UID			0x1000007a 0x10202DCA
+VENDORID	0x70000001
+
+CAPABILITY TCB AllFiles
+
+USERINCLUDE ../tscraccessor/inc
+USERINCLUDE ../../inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH 	../tscraccessor/source
+
+SOURCE		tscraccessor_startup.cpp
+SOURCE		tscraccessor_server_session.cpp
+
+LIBRARY		euser.lib 
+LIBRARY		efsrv.lib
+LIBRARY		scrclient.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/group/tscrdatalayer.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,52 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This is the project specification file for the Software Component Registry test harness
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @test
+*/
+
+TARGETTYPE EXE
+TARGET tscrdatalayer.exe
+
+UID 0 0x1028634C
+
+// ProtServ is used for scrdatabase testing
+// AllFiles is needed for creating the SCR DB
+CAPABILITY ProtServ
+
+SOURCEPATH 	../tscrdatalayer/source
+
+SOURCE datalayersteps.cpp tscrdatalayer.cpp
+
+USERINCLUDE ../tscrdatalayer/inc
+USERINCLUDE	../../inc_private
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+
+LIBRARY euser.lib 
+LIBRARY efsrv.lib 
+LIBRARY testexecuteutils.lib
+LIBRARY testexecutelogclient.lib
+LIBRARY rfileloggerclient.lib
+LIBRARY scrdatabase.lib
+LIBRARY oomtestbase.lib
+SMPSAFE
Binary file installationservices/swcomponentregistry/test/testdb/scr.db has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/appmanagersteps.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,113 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines test steps for application manager related interface in the Software Component Registry
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef APPMANAGERSTEPS_H
+#define APPMANAGERSTEPS_H
+
+#include "tscrstep.h"
+class CScrTestServer;
+
+_LIT(KScrIsMediaPresentStep, "SCRIsMediaPresent");
+_LIT(KScrIsComponentOrphaned, "SCRIsComponentOrphaned");
+_LIT(KScrCompareVersions, "SCRCompareVersions");
+_LIT(KScrIsComponentOnReadOnlyDrive, "SCRIsComponentOnReadOnlyDrive");
+_LIT(KScrComponentPresence, "ScrComponentPresence");
+
+class CScrIsMediaPresentStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR IsMediaPresent interface
+ */
+	{
+public:
+	CScrIsMediaPresentStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	};
+
+class CScrIsComponentOrphanedStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR IsComponentOrphanedL interface
+ */
+	{
+public:
+	CScrIsComponentOrphanedStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	};
+
+class CScrCompareVersionsStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR CompareVersionsL interface
+ */
+	{
+public:
+	CScrCompareVersionsStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	};
+
+class CScrIsComponentOnReadOnlyDriveStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR IsComponentOnReadOnlyDriveL interface
+ */
+	{
+public:
+	CScrIsComponentOnReadOnlyDriveStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	};
+
+class CScrComponentPresenceStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR IsComponentPresentL interface
+ */
+	{
+public:
+	CScrComponentPresenceStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	};
+
+#endif /* APPMANAGERSTEPS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/componentmanagementsteps.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,245 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines test steps for component management APIs in the SCR
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef COMPONENTMANAGEMENTSTEPS_H
+#define COMPONENTMANAGEMENTSTEPS_H
+
+#include "tscrstep.h"
+class CScrTestServer;
+
+_LIT(KScrAddComponentStep, "SCRAddComponent");
+_LIT(KScrSetComponentPropertyStep, "SCRSetComponentProperty");
+_LIT(KScrRegisterFileStep, "SCRRegisterFile");
+_LIT(KScrAddFilePropertyStep, "SCRAddFileProperty");
+_LIT(KScrSetCommonPropertyStep, "SCRSetCommonProperty");
+_LIT(KScrDeleteComponentPropertyStep, "SCRDeleteComponentProperty");
+_LIT(KScrDeleteFilePropertyStep, "SCRDeleteFileProperty");
+_LIT(KScrUnregisterFileStep, "SCRUnregisterFile");
+_LIT(KScrDeleteComponentStep, "SCRDeleteComponent");
+_LIT(KScrDeleteAllComponentsStep, "SCRDeleteAllComponents");
+_LIT(KScrInstallComponentStep, "SCRInstallComponent");
+_LIT(KScrAddComponentDependencyStep, "SCRAddComponentDependency");
+_LIT(KScrDeleteComponentDependencyStep, "SCRDeleteComponentDependency");
+
+class CScrAddComponentStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR AddComponent interface
+ */
+	{
+public:
+	CScrAddComponentStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	
+private:
+	Usif::TComponentId AddLocalisableComponentL();	
+	void VerifyComponentLocalizablesL(Usif::TComponentId aComponentId);		
+	};
+
+class CScrSetComponentPropertyStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR SetComponentProperty interface.
+ */
+	{
+public:
+	CScrSetComponentPropertyStep(CScrTestServer& aParent);
+		
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};
+
+class CScrRegisterFileStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR RegisterComponentFile interface
+ */
+	{
+public:
+	CScrRegisterFileStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};		
+	
+class CScrAddFilePropertyStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR SetFilePropertyL interface
+ */
+	{
+public:
+	CScrAddFilePropertyStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};	
+
+class CScrSetCommonPropertyStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR SetComponentNameL, SetVendorNameL and SetVersionL interface
+ */
+	{
+public:
+	CScrSetCommonPropertyStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};	
+
+class CScrDeleteComponentPropertyStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR DeleteComponentPropertyL interface
+ */
+	{
+public:
+	CScrDeleteComponentPropertyStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();	
+	};	
+
+class CScrDeleteFilePropertyStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR DeleteFilePropertyL interface
+ */
+	{
+public:
+	CScrDeleteFilePropertyStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};	
+
+class CScrUnregisterFileStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR UnregisterComponentFileL interface
+ */
+	{
+public:
+	CScrUnregisterFileStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};	
+
+class CScrDeleteComponentStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR DeleteComponentL interface
+ */
+	{
+public:
+	CScrDeleteComponentStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};	
+
+class CScrDeleteAllComponentsStep : public CScrTestStep
+/**
+ 	TEF test step which deletes all components added by the harness.
+ */
+	{
+public:
+	CScrDeleteAllComponentsStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};	
+
+class CScrInstallComponentStep : public CScrTestStep
+/**
+ 	TEF test step which installs a typical SWI component.
+ */
+	{
+public:
+	CScrInstallComponentStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};	
+
+class CScrAddComponentDependencyStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR AddComponentDependencyL interface
+ */
+	{
+public:
+	CScrAddComponentDependencyStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();	
+	};
+
+class CScrDeleteComponentDependencyStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR DeleteComponentDependencyL interface
+ */
+	{
+public:
+	CScrDeleteComponentDependencyStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();	
+	};
+
+#endif /* COMPONENTMANAGEMENTSTEPS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/componentquerysteps.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,263 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the basic test step for the Software Component Registry test harness
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef COMPONENTQUERYSTEPS_H
+#define COMPONENTQUERYSTEPS_H
+
+#include "tscrstep.h"
+
+class CScrTestServer;
+
+_LIT(KScrGetComponentStep, "SCRGetComponent");
+_LIT(KScrGetComponentLocalizedStep, "SCRGetComponentLocalizedInfo");
+_LIT(KScrGetFilePropertiesStep, "SCRGetFileProperties");
+_LIT(KScrGetFilePropertyStep, "SCRGetFileProperty");
+_LIT(KScrGetFileComponentsStep, "SCRGetFileComponents");
+_LIT(KScrGetComponentPropertyStep, "SCRGetComponentProperty");
+_LIT(KScrGetComponentPropertiesStep, "SCRGetComponentProperties");
+_LIT(KScrGetComponentIdsStep, "SCRGetComponentIds");
+_LIT(KScrGetComponentFilesCountStep, "SCRGetComponentFilesCount");
+_LIT(KScrGetComponentWithGlobalIdStep, "SCRGetComponentWithGlobalId");
+_LIT(KScrGetComponentIdStep, "SCRGetComponentId");
+_LIT(KScrGetGlobalIdList, "SCRGetGlobalIdList");
+_LIT(KScrValuesNegativeStep, "SCRValuesNegative");
+_LIT(KScrOutOfMemoryStep, "SCROutOfMemory");
+
+class CScrGetComponentStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetComponent interface
+ */
+	{
+public:
+	CScrGetComponentStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};
+
+class CScrGetComponentLocalizedStep : public CScrTestStep
+/**
+    TEF test step which exercises the SCR GetComponentLocalized interface
+ */
+    {
+public:
+    CScrGetComponentLocalizedStep(CScrTestServer& aParent);
+    
+protected:
+    // From CScrTestStep
+    void ImplTestStepPreambleL();
+    void ImplTestStepL();
+    void ImplTestStepPostambleL();
+    };
+
+class CScrGetFilePropertiesStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetFileProperties interface
+ */
+	{
+public:
+	CScrGetFilePropertiesStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	};
+
+class CScrGetFilePropertyStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetFileProperties interface
+ */
+	{
+public:
+	CScrGetFilePropertyStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	};
+		
+class CScrGetFileComponentsStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetFileComponents interface
+ */
+	{
+public:
+	CScrGetFileComponentsStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	};
+
+class CScrGetComponentPropertyStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetComponentPropertyL interface
+ */
+	{
+public:
+	CScrGetComponentPropertyStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	};
+
+class CScrGetComponentPropertiesStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetComponentProperties interface
+ */
+	{
+public:
+	CScrGetComponentPropertiesStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	};
+
+class CScrGetComponentIdsStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetComponentIdsL interface
+ */
+	{
+public:
+	CScrGetComponentIdsStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};
+
+class CScrGetComponentFilesCountStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetComponentFilesCountL interface
+ */
+	{
+public:
+	CScrGetComponentFilesCountStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};
+
+class CScrGetComponentWithGlobalIdStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetComponentL interface
+ */
+	{
+public:
+	CScrGetComponentWithGlobalIdStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};
+
+class CScrGetComponentIdStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetComponentIdL interface
+ */
+	{
+public:
+	CScrGetComponentIdStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};
+
+class CScrGetGlobalIdListStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetSupplierComponentsL and GetDependantComponentsL interfaces
+ */
+	{
+public:
+	CScrGetGlobalIdListStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};
+
+class CScrValuesNegativeStep : public CScrTestStep
+/**
+ 	TEF test step which checks boundaries for values in SCR.
+ */
+	{
+public:
+	CScrValuesNegativeStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};	
+
+class SCROufOfMemory : public CScrTestStep
+/**
+ 	TEF test step which checks OOM conditions in SCR.
+ */
+	{
+public:
+	SCROufOfMemory(CScrTestServer& aParent);
+	SCROufOfMemory();
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	
+private:
+	void ExecuteL();
+	TInt iFailRate;
+	};	
+
+#endif //COMPONENTQUERYSTEPS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/deletescrdbstep.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,77 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the test step which deletes SCR database file. 
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef SCRDBDELETE_H
+#define SCRDBDELETE_H
+
+#include "tscrstep.h"
+#include "tscraccessor_client.h"
+class CScrTestServer;
+
+_LIT(KScrDeleteDbFileStep, "SCRDeleteDbFile");
+_LIT(KScrCopyDbFileStep, "SCRCopyDbFile");
+
+class CScrDeleteDbFileStep : public CScrTestStep
+/**
+ 	TEF test step which deletes the SCR DB database.
+ 	If the file cannot be deleted, it gives other tries in the specified amount of time.
+ */
+	{
+public:
+	CScrDeleteDbFileStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+
+private:
+	void DeleteFileL(const TDesC& aFilePath);
+	
+private:
+	RScrAccessor iScrAccessor;
+	};
+
+
+class CScrCopyDbFileStep : public CScrTestStep
+/**
+ 	TEF test step which copies a SCR database into the given location.
+ */
+	{
+public:
+	CScrCopyDbFileStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();		
+	
+private:
+	RScrAccessor iScrAccessor;
+	};
+	
+#endif /* SCRDBDELETE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/installloghistorysteps.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines test steps for the install log retrieving interface in the Software Component Registry
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef INSTALLLOGHISTORYSTEPS_H
+#define INSTALLLOGHISTORYSTEPS_H
+
+#include "tscrstep.h"
+#include "tscraccessor_client.h"
+class CScrTestServer;
+class Usif::CScrLogEntry;
+
+_LIT(KScrGetLogEntriesStep, "SCRGetLogEntries");
+_LIT(KScrSetLogFileReadOnlyAttrStep, "SCRSetLogFileReadOnlyAttr");
+_LIT(KScrCreateLogFileStep, "SCRCreateLogFile");
+
+class CScrGetLogEntriesStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR RetrieveLogEntriesL interface
+ */
+	{
+public:
+	CScrGetLogEntriesStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+
+private:
+	void GetLogEntriesFromConfigL(RPointerArray<Usif::CScrLogEntry>& aLogEntries);
+	TBool CompareLogEntriesL(RPointerArray<Usif::CScrLogEntry>& aFoundLogEntries, RPointerArray<Usif::CScrLogEntry>& aExpectedLogEntries);
+	};
+
+class CScrSetLogFileReadOnlyAttrStep : public CScrTestStep
+/**
+ 	TEF test step sets the SCR log file's readonly attribute.
+ */
+	{
+public:
+	CScrSetLogFileReadOnlyAttrStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};
+
+class CScrCreateLogFileStep : public CScrTestStep
+/**
+ 	TEF test step creates a log file including a preset number of records.
+ */
+	{
+public:
+	CScrCreateLogFileStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	};
+
+#endif /* INSTALLLOGHISTORYSTEPS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/pluginmanagementsteps.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,72 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines test steps for post-manufacture plugin management related interface in the Software Component Registry
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef PLUGINMANAGEMENTSTEPS_H
+#define PLUGINMANAGEMENTSTEPS_H
+
+#include "tscrstep.h"
+#include "tscraccessor_client.h"
+class CScrTestServer;
+
+_LIT(KScrAddSoftwareTypeStep, "SCRAddSoftwareType");
+_LIT(KScrDeleteSoftwareTypeStep, "SCRDeleteSoftwareType");
+
+class CScrAddSoftwareTypeStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR AddSoftwareTypeL interface
+ */
+	{
+public:
+	CScrAddSoftwareTypeStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+
+private:
+	RScrAccessor iScrAccessor;
+	};
+
+class CScrDeleteSoftwareTypeStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR DeleteSoftwareTypeL interface
+ */
+	{
+public:
+	CScrDeleteSoftwareTypeStep(CScrTestServer& aParent);
+	
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();	
+	
+private:
+	RScrAccessor iScrAccessor;
+	};
+	
+#endif /* PLUGINMANAGEMENTSTEPS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/sifsteps.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,69 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the basic test step for the Software Component Registry test harness
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef SIFSTEPS_H
+#define SIFSTEPS_H
+
+#include "tscrstep.h"
+class CScrTestServer;
+
+_LIT(KScrGetPluginStep, "SCRGetPlugin");
+_LIT(KScrSetScomoStateStep, "SCRSetScomoState");
+
+class CScrGetPluginStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR GetPluginUidL interfaces
+ */
+	{
+public:
+	CScrGetPluginStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+
+private:
+	TUid GetPluginUidFromConfigL();
+	TBool GetMimeTypeFromConfigL(TPtrC& aMimeType);
+	};	
+
+class CScrSetScomoStateStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR SetScomoStateL interface
+ */
+	{
+public:
+	CScrSetScomoStateStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};
+
+#endif /* SIFSTEPS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/subsessionsteps.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,75 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the basic test step for the Software Component Registry test harness
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef SUBSESSIONSTEPS_H
+#define SUBSESSIONSTEPS_H
+
+#include "tscrstep.h"
+class CScrTestServer;
+
+_LIT(KScrComponentRegistrySubsessionStep, "ScrComponentRegistrySubsession");
+_LIT(KScrFileListSubsessionStep, "ScrFileListSubsession");
+
+class CScrComponentRegistrySubsessionStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR RSoftwareComponentRegistryView interface
+ */
+	{
+public:
+	 CScrComponentRegistrySubsessionStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+private:	
+	void TestSingleModeL(const Usif::RSoftwareComponentRegistryView& aSubSession, RPointerArray<Usif::CComponentEntry>& aExpectedEntries);
+	void TestSetModeL(const Usif::RSoftwareComponentRegistryView& aSubSession, TInt aSetSize, RPointerArray<Usif::CComponentEntry>& aExpectedEntries);
+	void VerifyNonReturnedEntriesL(const RPointerArray<Usif::CComponentEntry>& aExpectedEntries);
+	void GetComponentEntriesFromConfigL(RPointerArray<Usif::CComponentEntry>& aEntries);
+	};
+
+class CScrFileListSubsessionStep : public CScrTestStep
+/**
+ 	TEF test step which exercises the SCR RSoftwareComponentRegistryFilesList interface
+ */
+	{
+public:
+	CScrFileListSubsessionStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+private:
+	void TestSingleModeL(const Usif::RSoftwareComponentRegistryFilesList& aSubSession, RPointerArray<HBufC>& expectedFiles);
+	void TestSetModeL(const Usif::RSoftwareComponentRegistryFilesList& aSubSession, TInt aSetSize, RPointerArray<HBufC>& expectedFiles);
+	void VerifyNonReturnedFilesL(const RPointerArray<HBufC>& aExpectedFiles);
+	void ReportUnexpectedFileL(const TDesC& aUnexpectedFileName);
+	};
+
+#endif /* SUBSESSIONSTEPS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/transactionmanagementsteps.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,81 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the basic test step for the Software Component Registry test harness
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef TRANSACTIONMANAGEMENTSTEPS_H
+#define TRANSACTIONMANAGEMENTSTEPS_H
+
+#include "tscrstep.h"
+class CScrTestServer;
+
+_LIT(KScrApplyTransactionStep, "SCRApplyTransaction");
+_LIT(KScrCreateTransactionStep, "SCRCreateTransaction");
+_LIT(KScrManageAnotherTransactionStep, "SCRManageAnotherTransaction");
+
+class CScrApplyTransactionStep : public CScrTestStep
+/**
+ 	TEF test step which exercises all SCR transaction interfaces
+ */
+	{
+public:
+	CScrApplyTransactionStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};
+
+class CScrCreateTransactionStep : public CScrTestStep
+/**
+ 	TEF test step which exercises transaction management logic
+ */
+	{
+public:
+	CScrCreateTransactionStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};		
+
+class CScrManageAnotherTransactionStep : public CScrTestStep
+/**
+ 	TEF test step which exercises transaction management logic
+ */
+	{
+public:
+	CScrManageAnotherTransactionStep(CScrTestServer& aParent);
+			
+protected:
+	// From CScrTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();			
+	};	
+
+#endif /* TRANSACTIONMANAGEMENTSTEPS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/tscrdefs.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,102 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the common constant definitions for the Software Component Registry test harness
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef TSCRDEFS_H
+#define TSCRDEFS_H
+
+const TInt MAX_SCR_ERROR_MESSAGE_LENGTH = 256;
+const TInt MAX_SCR_BUFFER_LENGTH = 64;
+const TInt MAX_SCR_PARAM_LENGTH = 32;
+const TInt MAX_SCR_PARAM_VALUE_LENGTH = 10;
+
+/** The path where data files live. */
+_LIT(KDataFilesPath, "z:\\tusif\\tscr\\data\\");
+
+// Common attribute names
+
+// Component related attribute names
+_LIT(KComponentsCountName, "ComponentsCount");
+_LIT(KComponentLocaleName, "ComponentLocale");
+_LIT(KComponentIdOffsetName, "ComponentIdOffset");
+_LIT(KComponentIdName, "ComponentId");
+_LIT(KComponentName, "ComponentName");
+_LIT(KVendorName, "VendorName");
+_LIT(KRemovableName, "Removable");
+_LIT(KDrmProtectedName, "DrmProtected");
+_LIT(KHiddenName, "Hidden");
+_LIT(KKnownRevokedName, "KnownRevoked");
+_LIT(KOriginVerifiedName, "OriginVerified");
+_LIT(KComponentSizeName, "ComponentSize");
+_LIT(KComponentScomoStateName, "ScomoState");
+_LIT(KInstalledDrivesName, "InstalledDrives");
+_LIT(KVersionName, "Version");
+_LIT(KSoftwareTypeName, "SoftwareType");
+_LIT(KGlobalIdName, "GlobalIdName");
+_LIT(KGlobalIdCount,"GlobalIdCount");
+_LIT(KOperationType, "OperationType");
+_LIT(KLogsCountParamName, "LogsCount");
+
+// File related attribute names
+_LIT(KSetSizeName, "SetSize");
+_LIT(KFileName, "FileName");
+_LIT(KFileCount, "FileCount");
+
+// Property related attribute names
+_LIT(KIntPropertyParamName, "IntProperty");
+_LIT(KStringPropertyParamName, "StringProperty");
+_LIT(KPropertiesCountParamName, "PropertiesCount");
+_LIT(KPropertyTypeParam, "PropertyType");
+_LIT(KPropertyNameParam, "PropertyName");
+_LIT(KPropertyValueParam, "PropertyValue");
+_LIT(KPropertyLocaleParam, "PropertyLocale");
+
+// Plug-in related attribute names
+_LIT(KMimeTypeName, "MimeType");
+_LIT(KPluginUidName, "PluginUid");
+
+// Performance related names
+_LIT(KMaxDurationName, "MaxDuration");
+_LIT(KMaxTestCaseDuration, "TEST_CASE_MAXIMUM_ALLOWED_DURATION");
+_LIT(KActualTestCaseDuration, "TEST_CASE_ACTUAL_DURATION");
+_LIT(KPerformanceTestInfo, "PERFORMANCE_LOG_INFORMATION");
+
+// Dependency related names
+_LIT(KGlobalIdType, "GlobalIdType");
+_LIT(KSupplierGlobalIdName, "SupplierGlobalIdName");
+_LIT(KSupplierSwTypeName, "SupplierSwTypeName");
+_LIT(KDependantGlobalIdName, "DependantGlobalIdName");
+_LIT(KDependantSwTypeName, "DependantSwTypeName");
+_LIT(KVersionFrom, "VersionFrom");
+_LIT(KVersionTo, "VersionTo");
+
+// Version comparetor names
+_LIT(KVersionLeft, "VersionLeft");
+_LIT(KVersionRight, "VersionRight");
+_LIT(KExpectedResult, "ExpectedResult");
+
+// Constants
+const TChar KComponentIdDelimeter = ',';
+
+#endif /* TSCRDEFS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/tscrserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the test server of the Software Component Registry test harness
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef TSCRSERVER_H
+#define TSCRSERVER_H
+
+#include <test/testexecuteserverbase.h>
+
+_LIT(KScrTestServerName, "tscr");
+
+class CScrTestServer : public CTestServer
+/**
+	Describes the test server for the SCR test harness.
+ */
+	{
+public:
+	static CScrTestServer* NewL();
+	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+	RFs& Fs();
+	~CScrTestServer();
+private:
+	TBool IsPerformanceTestStep(const TDesC& aStepName, TPtrC& aStrippedName);
+private:
+	RFs iFs;
+	};
+
+inline RFs& CScrTestServer::Fs()
+	{
+	return iFs;
+	}
+
+#endif /* TSCRSERVER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/inc/tscrstep.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,123 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the basic test step for the Software Component Registry test harness
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef TSCRSTEP_H
+#define TSCRSTEP_H
+
+#include <scs/oomteststep.h>
+#include <usif/usifcommon.h>
+#include <usif/scr/scr.h>
+
+class CScrTestServer;
+
+// Shared operators for comparing properties
+TBool operator !=(Usif::CPropertyEntry& lhsEntry, Usif::CPropertyEntry& rhsEntry);
+TBool operator ==(Usif::CPropertyEntry& lhsEntry, Usif::CPropertyEntry& rhsEntry);
+TBool operator ==(const Usif::CComponentEntry& aLhsEntry, const Usif::CComponentEntry& aRhsEntry);
+TBool operator !=(const Usif::CComponentEntry& aLhsEntry, const Usif::CComponentEntry& aRhsEntry);
+
+class CScrTestStep : public COomTestStep
+/**
+ 	Base class used to provide handy functions available to test step classes.
+ */
+	{
+	friend class CScrPerformanceTestStep;
+public:
+	virtual ~CScrTestStep();
+	void MarkAsPerformanceStep();
+	
+protected:
+	CScrTestStep(CScrTestServer& aParent);
+	
+	// From COomTestStep
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	RScsClientBase* ClientHandle();
+	
+	// Utility Functions
+	void PrintErrorL(const TDesC& aMsg, TInt aErrNum,...);
+	
+	// Shared code for comparing properties
+	TBool ComparePropertiesL(RPointerArray<Usif::CPropertyEntry>& aFoundProperties, RPointerArray<Usif::CPropertyEntry>& aExpectedProperties);
+	static void GenerateIndexedAttributeNameL(TDes& aInitialAttributeName, TInt aIndex);
+	void CompareComponentIdsL(RArray<Usif::TComponentId>& aFoundComponents, RArray<Usif::TComponentId>& aExpectedComponents);
+	
+	// Helper functions for getting common test step attributes	
+	void AppendSharedComponentIdL(Usif::TComponentId aComponentId);
+	void GetSoftwareTypeNameL(TPtrC& aSwTypeName);
+	TBool GetGlobalIdNameL(TPtrC& aGlobalIdName);
+	Usif::CGlobalComponentId* GetGlobalComponentIdLC();
+	Usif::CGlobalComponentId* GetGlobalComponentIdLC(const TDesC& aGlobalIdName, const TDesC& aSwTypeName);
+	HBufC* GetVersionFromConfigL(const TDesC& aVersionName);
+	void GetExpectedVersionedComponentIdListL(RPointerArray<Usif::CVersionedComponentId>& aVerCompIdList);
+	TBool CompareVersionedComponentIdsL(RPointerArray<Usif::CVersionedComponentId>& aFoundVerCompIdList, RPointerArray<Usif::CVersionedComponentId>& aExpectedVerCompIdList);
+	TBool GetLocaleFromConfigL(const TDesC& aParamName, TLanguage &aLocale);
+	TBool GetLocaleFromConfigL(TLanguage &aLocale);
+	void GetFileNameFromConfigL(TPtrC& aFileName);
+	void GetFileNameListFromConfigL(RPointerArray<HBufC>& aFileList);
+	TInt GetComponentIdL();
+	void ReadAllSharedComponentIdsL(RArray<TInt>& aComponentList);
+	void GetComponentNameFromConfigL(TPtrC& aComponentName);
+	void GetVendorNameFromConfigL(TPtrC& aVendorName);
+	Usif::CComponentEntry* GetComponentEntryFromConfigLC(TBool aIsSingle=ETrue, TInt aIndex=0); 
+	void GetPropertiesFromConfigL(RPointerArray<Usif::CPropertyEntry>& aProperties, TBool aSupportLocalized=EFalse);
+	Usif::CPropertyEntry* GetPropertyFromConfigLC(TBool aIsSingle, TInt aIndex = 0, TBool aSupportLocalized=EFalse);
+	void GetComponentIdsFromConfigL(RArray<Usif::TComponentId>& aComponentIds);
+	void GetComponentLocalizablesFromConfigL(TInt aIndex, TPtrC& aName, TPtrC& aVendor, TLanguage& aLocale);
+	void GetLocalisedComponentsFromConfigL(RPointerArray<Usif::CLocalizableComponentInfo>& aComponentInfo);
+	TBool GetInstalledDrivesFromConfigL(TDriveList& aDriveList, const TDesC& aAttributeName);
+	TBool GetScomoStateFromConfigL(Usif::TScomoState& aScomoState, const TDesC& aAttributeName);
+	TInt GetSetSizeFromConfigL();
+	TBool Get64BitIntegerFromConfigL(const TDesC& aConfigKeyName, TInt64& aRetVal);
+	
+	// Read component names from config file and add a new component
+	Usif::TComponentId AddNonLocalisableComponentL();
+	
+	// Read filter properties from config file
+	Usif::CComponentFilter* ReadComponentFilterFromConfigLC();
+	void ReadFilterPropertiesL(Usif::CComponentFilter* aFilter, TInt aPropertiesCount);
+	void StartTimer();
+	
+protected:
+	CScrTestServer& iParent;
+	Usif::RSoftwareComponentRegistry iScrSession;
+
+private:
+	TInt ReadSharedComponentIdL(TInt aOffset);
+	void StopTimerAndPrintResultL();
+	void PrintPerformanceLog(TTime aTime);
+
+protected:
+	// For plugin management test cases, the time is measured externally because they are performed via another accessor server (scr accessor).
+	// The actual test time is measured on the scr accessor server side and returned to the test code.
+	TInt iTimeMeasuredExternally;
+	
+private:
+	TBool iIsPerformanceTest;
+	TTime iStartTime;
+	};
+
+#endif /* TSCRSTEP_H */
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr-differentbuildnumber.db has changed
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr-newermajordbversion.db has changed
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr-newerminordbversion.db has changed
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr-noentriesinversiontable.db has changed
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr-noversiontable.db has changed
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr-oldermajordbversion.db has changed
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr-olderminordbversion.db has changed
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr_large.db has changed
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr_medium.db has changed
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr_small.db has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/scripts/performance_log_parser.pl	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,178 @@
+#
+# 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 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".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Script: performance_log_parser.pl
+#
+
+use strict;
+use FileHandle;
+
+my $Test_Case_Start_Tag = "START_TESTCASE";
+my $Test_Case_End_Tag = "END_TESTCASE";
+my $Event_print = "PERFORMANCE_LOG_INFORMATION";
+my $Test_Case_Max_Duration = "TEST_CASE_MAXIMUM_ALLOWED_DURATION";
+my $ScrEventCode = 1;
+
+my $defInputFile = "/epoc32/winscw/c/logs/testexecute/tscr_performance.htm";
+my $defOutputFile = "/epoc32/winscw/c/logs/scr_performance.txt";
+
+sub millisec
+	{  
+	no warnings 'uninitialized';
+	my ($mytime) = @_ ;
+	$mytime =~ /([0-9]*):([0-9]*):([0-9]*):([0-9]*)$/;
+	my $milisec = $4;
+	my $sec = $3;
+	my $min = $2;
+	my $hour = $1;
+
+	my $msecs = ($milisec / 1000) + ($sec *1000) + ($min * 60000) + ($hour * 3600000);
+	return $msecs;
+	}
+
+sub process_log_file
+	{
+	my ($data_file, $output_FH) = @_;
+	print $output_FH "#Test Case Name,Maximum Duration(ms),Actual Duration(ms),Result\n";
+	
+	# enable reading whole file as one chunk
+	my $SAVE_RS = $/;
+	undef $/;
+	
+	# open and read the log file in a single line
+	open(DAT, $data_file) || die("Could not open file $data_file!");
+	my $raw_data=<DAT>;
+	close(DAT);
+	$raw_data=~ s/\n/ /g;
+
+	# restore previous record separator
+	$/ = $SAVE_RS;	
+	
+	my $num_passed = 0;
+	my $num_failed = 0;
+	
+	while ($raw_data && $raw_data =~ /$Test_Case_Start_Tag\s+(\S+)/)
+		{
+		# step through the file in chunks delimited by the start/end test case tags.
+		
+		my $test_case_name = $1;
+		my ($test_case_data) = ($raw_data =~ /$Test_Case_Start_Tag(.*?)$Test_Case_End_Tag/);
+		
+		if (not $test_case_data)
+			{
+			print STDERR "Error: Test case: $test_case_name: Suspected missing END_TESTCASE tag.\n";
+			}
+		
+		($raw_data) = ($raw_data =~ /$Test_Case_End_Tag(.*)/);
+		($raw_data) = ($raw_data =~ /($Test_Case_Start_Tag.*)/) if $raw_data;
+		
+		my ($max_duration) = ($test_case_data =~ /$Test_Case_Max_Duration,([0-9]+)/);
+		if (!defined $max_duration)
+			{
+			$max_duration = 0;
+			}
+			
+		my $start_time = "0";
+		my $end_time = "0";
+		my $first = 1;
+		
+		while ($test_case_data and ($test_case_data =~ /$Event_print(.*)/) )
+			{
+			# get the event time. if this is the first time value in the chunk, it is the start time of the event.
+			#otherwise, continue until reaching the last time value.
+			my $start_log_msg = $1;
+		   
+			$start_log_msg =~ /,(.+?)\s(.*)/;
+			
+			if($first == 1)
+				{
+				$start_time = $1;
+				$first = 0;
+				}
+			else
+				{
+				$end_time = $1;
+				}
+	
+			$test_case_data = $2;
+			}	
+		
+		if(!($start_time eq "0") && !($end_time eq "0"))
+			{
+			my $actual_duration = millisec($end_time) - millisec($start_time);
+			my $result;
+			if( $actual_duration <= $max_duration)
+				{
+				$result = "Passed";
+				$num_passed += 1;
+				}
+			else
+				{
+				$result = "Failed";
+				$num_failed += 1;
+				}
+			
+			print $output_FH "$test_case_name,$max_duration,$actual_duration,$result\n";	
+			}
+		}
+	print $output_FH (sprintf "\n\n%d tests failed out of %d\n", $num_failed, $num_passed+$num_failed);
+	}
+	
+	
+sub usage
+	{
+	print <<USAGE;
+usage:
+	performance_log_parser.pl <input_file> <output_file>
+
+	<input_file>: A log file to process 
+			(default- $defInputFile)
+
+	<out_file>: Final output file name 
+			(default- $defOutputFile)
+USAGE
+	}
+
+	
+sub Main
+	{
+	my @argv = @_;
+	# if input and output files are not provided, default ones will be used
+	my $input_file = $defInputFile;
+	my $output_file = $defOutputFile;
+	
+	if(@argv > 2)
+		{
+		usage;
+		exit;
+		}
+	elsif(@argv == 2)
+		{# input and output files are provided, don't use default ones
+		$input_file = shift @argv;
+		$output_file = shift @argv;
+		}
+	
+	my $outputFH = \*STDOUT; # results to STDOUT by default
+	
+	if (defined $output_file)
+		{
+		$outputFH = FileHandle->new;
+		$outputFH->open("> $output_file") or die "Error: File $output_file: $!";
+		}
+	process_log_file($input_file,$outputFH);
+
+	$outputFH->close;
+}
+
+Main(@ARGV);
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/scripts/tscr.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,3950 @@
+// Configuration file for SCR Test Harness
+[db_file]
+DbFilePath=c:\sys\install\scr\scr.db
+JournalFilePath=c:\sys\install\scr\scr.db-journal
+
+[log_file]
+DbFilePath=c:\private\10285bc0\scr.log
+JournalFilePath=c:\private\10285bc0\scr_tmp.log
+
+[corrupted_db_file_no_version_table]
+SourceFilePath=z:\tusif\tscr\data\scr-noversiontable.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[corrupted_db_file_no_version_entries]
+SourceFilePath=z:\tusif\tscr\data\scr-noentriesinversiontable.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[db_file_older_major_version]
+SourceFilePath=z:\tusif\tscr\data\scr-oldermajordbversion.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[db_file_newer_major_version]
+SourceFilePath=z:\tusif\tscr\data\scr-newermajordbversion.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[db_file_newer_minor_version]
+SourceFilePath=z:\tusif\tscr\data\scr-newerminordbversion.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[db_file_older_minor_version]
+SourceFilePath=z:\tusif\tscr\data\scr-olderminordbversion.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[db_file_different_build_number]
+SourceFilePath=z:\tusif\tscr\data\scr-differentbuildnumber.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[scr_small_db]
+SourceFilePath=z:\tusif\tscr\data\scr_small.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[scr_medium_db]
+SourceFilePath=z:\tusif\tscr\data\scr_medium.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[scr_large_db]
+SourceFilePath=z:\tusif\tscr\data\scr_large.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[shared_data]
+shared_data_num = 1
+shared_name_1 = ComponentId  
+
+// Shared sections
+
+[common_component_names]
+SoftwareType=plain
+ComponentName=GeneralComponent
+VendorName=Symbian
+
+[common_component_attributes]
+ComponentIdOffset=0
+ComponentName=GeneralComponent
+VendorName=Symbian
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[common_component_properties]
+ComponentIdOffset=0
+PropertiesCount=3
+PropertyName0=StringProperty
+PropertyType0=1
+PropertyValue0=astring
+PropertyName1=IntegerProperty
+PropertyType1=2
+PropertyValue1=111
+PropertyName2=LocalizedProperty
+PropertyType2=3
+PropertyValue2=alocalizedstring
+PropertyLocale2=1
+
+[common_files]
+ComponentIdOffset=0
+FileCount= 2
+FileName0=c:\common_file_1.txt
+FileName1=z:\common_file_2.txt
+
+[common_file1_properties]
+ComponentIdOffset=0
+FileName=c:\common_file_1.txt
+PropertiesCount=2
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=afile1string
+PropertyName1=TestFilePropertyInt
+PropertyType1=2
+PropertyValue1=101
+
+[common_file2_properties]
+ComponentIdOffset=0
+FileName=z:\common_file_2.txt
+PropertiesCount=2
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=afile2string
+PropertyName1=TestFilePropertyInt
+PropertyType1=2
+PropertyValue1=102
+
+// SEC-SCR-API-0001
+// uses shared sections
+
+// SEC-SCR-API-0002
+
+[component_with_localizables]
+SoftwareType=plain
+IsLocalisable=True
+LocalesCount=4
+ComponentName0=Component_N2
+VendorName0=SecurityTeam
+ComponentLocale0=1 //English
+ComponentName1=Cåmponent_N2
+VendorName1=SäkerhetLag
+ComponentLocale1=6 //Swedish
+ComponentName2=Bilesen_N2
+VendorName2=GüvenlikTakimi
+ComponentLocale2=14 //Turkish
+ComponentName3=NonLocalizedName
+VendorName3=NonLocalizedVendor
+ComponentLocale3=0 //Default or Unique
+
+
+[verify_component_localizables1]
+FilterName=Component_N2
+FilterVendor=SecurityTeam
+ComponentLocale=0
+ComponentIdOffset=0
+ComponentName=Component_N2
+VendorName=SecurityTeam
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[verify_component_localizables2]
+FilterName=Cåmponent_N2
+FilterVendor=SäkerhetLag
+ComponentIdOffset=0
+ComponentName=Cåmponent_N2
+VendorName=SäkerhetLag
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[verify_component_localizables3]
+FilterName=Bilesen_N2
+FilterVendor=GüvenlikTakimi
+ComponentIdOffset=0
+ComponentName=Bilesen_N2
+VendorName=GüvenlikTakimi
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_nonlocalized_names]
+ComponentLocale=0
+ComponentIdOffset=0
+ComponentName=NonLocalizedName
+VendorName=NonLocalizedVendor
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_unspecified_names]
+ComponentLocale=-1
+ComponentIdOffset=0
+ComponentName=Component_N2
+VendorName=SecurityTeam
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_particular_names]
+ComponentLocale=14
+ComponentIdOffset=0
+ComponentName=Bilesen_N2
+VendorName=GüvenlikTakimi
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+// SEC-SCR-API-0003
+
+[component_with_empty_localizables]
+SoftwareType=plain
+IsLocalisable=True
+LocalesCount=0
+
+[component_with_empty_name]
+SoftwareType=plain
+ComponentName=
+VendorName=Symbian
+
+[update_component_set_empty_name]
+ComponentIdOffset=0
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=111
+ComponentName=
+VendorName=newVendorName
+PropertyLocale=0
+
+// SEC-SCR-API-0004
+
+[component_with_multiple_names]
+SoftwareType=plain
+IsLocalisable=True
+LocalesCount=2
+ComponentName0=ComponentThree
+VendorName0=VendorThree
+ComponentLocale0=1 //English
+ComponentName1=CåmponentTre
+VendorName1=FörsäljareTre
+ComponentLocale1=6 //Swedish
+
+[update_component_attributes]
+ComponentIdOffset=0
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=12345
+ComponentName=UppdateraCåmponentTre
+VendorName=NyFörsäljareTre
+PropertyLocale=6 //Swedish
+
+[verify_updated_component_attributes]
+FilterName=UppdateraCåmponentTre
+FilterVendor=NyFörsäljareTre
+ComponentIdOffset=0
+ComponentName=UppdateraCåmponentTre
+VendorName=NyFörsäljareTre
+SoftwareType=plain
+GlobalIdName=
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=12345
+ScomoState=0
+InstalledDrives=
+Version=0.1
+
+
+// SEC-SCR-API-0005
+
+[set_single_localized_property]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=SingleLocalizedProperty
+PropertyType0=3
+PropertyValue0=alocalizedstring
+PropertyLocale0=10
+
+[get_single_localized_property]
+ComponentIdOffset=0
+PropertyName=SingleLocalizedProperty
+PropertyType=3
+PropertyValue=alocalizedstring
+PropertyLocale=10
+
+[get_single_non_localized_property]
+ComponentIdOffset=0
+PropertyName=StringProperty
+PropertyType=1
+PropertyValue=astring
+
+[get_single_int_property]
+ComponentIdOffset=0
+PropertyName=IntegerProperty
+PropertyType=2
+PropertyValue=111
+
+[set_multiple_localized_property]
+ComponentIdOffset=0
+PropertiesCount=3
+PropertyName0=MultiLocalizedProperty
+PropertyType0=3
+PropertyValue0=currentlocalestring
+PropertyLocale0=1
+PropertyName1=MultiLocalizedProperty
+PropertyType1=3
+PropertyValue1=nonlocalizedstring
+PropertyLocale1=0
+PropertyName2=MultiLocalizedProperty
+PropertyType2=3
+PropertyValue2=anotherlocalestring
+PropertyLocale2=10
+
+[get_nonlocalized_version_property]
+ComponentIdOffset=0
+PropertyName=MultiLocalizedProperty
+PropertyType=3
+PropertyValue=nonlocalizedstring
+PropertyLocale=0 // Non-localized
+
+[get_unspecified_version_property]
+ComponentIdOffset=0
+PropertyName=MultiLocalizedProperty
+PropertyType=3
+PropertyValue=currentlocalestring
+PropertyLocale=1
+
+[get_specific_version_property]
+ComponentIdOffset=0
+PropertyName=MultiLocalizedProperty
+PropertyType=3
+PropertyValue=anotherlocalestring
+PropertyLocale=10
+
+[all_unspecified_locale_properties]
+ComponentIdOffset=0
+PropertyLocale=-1 //Unspecified
+PropertiesCount=4
+PropertyName0=StringProperty
+PropertyType0=1
+PropertyValue0=astring
+PropertyName1=IntegerProperty
+PropertyType1=2
+PropertyValue1=111
+PropertyName2=MultiLocalizedProperty
+PropertyType2=3
+PropertyValue2=nonlocalizedstring
+PropertyLocale2=1
+PropertyName3=LocalizedProperty
+PropertyType3=3
+PropertyValue3=alocalizedstring
+PropertyLocale3=1
+
+[all_non_localized_properties]
+ComponentIdOffset=0
+PropertyLocale=0 //Non-localized
+PropertiesCount=3
+PropertyName0=StringProperty
+PropertyType0=1
+PropertyValue0=astring
+PropertyName1=IntegerProperty
+PropertyType1=2
+PropertyValue1=111
+PropertyName2=MultiLocalizedProperty
+PropertyType2=3
+PropertyValue2=nonlocalizedstring
+PropertyLocale2=1
+
+[all_particular_properties]
+ComponentIdOffset=0
+PropertyLocale=10 // Particular
+PropertiesCount=2
+PropertyName0=SingleLocalizedProperty
+PropertyType0=3
+PropertyValue0=alocalizedstring
+PropertyLocale0=1
+PropertyName1=MultiLocalizedProperty
+PropertyType1=3
+PropertyValue1=anotherlocalestring
+PropertyLocale1=10
+
+// SEC-SCR-API-0006
+
+[new_component_properties]
+ComponentIdOffset=0
+PropertiesCount=3
+PropertyName0=StringProperty
+PropertyType0=1
+PropertyValue0=updatedstring
+PropertyName1=IntegerProperty
+PropertyType1=2
+PropertyValue1=222
+PropertyName2=LocalizedProperty
+PropertyType2=3
+PropertyValue2=updatedlocalizedstring
+PropertyLocale2=1
+
+// SEC-SCR-API-0007
+
+[first_component_files]
+ComponentIdOffset=0
+FileCount= 2
+FileName0=c:\logs\scr_test0.txt
+FileName1=z:\logs\scr_test1.txt
+
+[second_component_files]
+ComponentIdOffset=1
+FileCount= 2
+FileName0=z:\logs\scr_test1.txt
+FileName1=d:\logs\scr_test2.txt
+SetSize=3
+
+[third_component_files]
+ComponentIdOffset=2
+FileCount= 2
+FileName0=c:\logs\scr_test0.txt
+FileName1=c:\logs\scr_test3.txt
+
+
+// SEC-SCR-API-0008
+
+[component_files]
+ComponentIdOffset=0
+FileCount= 2
+FileName0=c:\logs\scr_test4.txt
+FileName1=z:\logs\scr_test5.txt
+
+[component_file1_properties]
+ComponentIdOffset=0
+FileName=c:\logs\scr_test4.txt
+PropertiesCount=2
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=abc
+PropertyName1=TestFilePropertyInt
+PropertyType1=2
+PropertyValue1=111
+
+[component_file2_properties]
+ComponentIdOffset=0
+FileName=z:\logs\scr_test5.txt
+PropertiesCount=2
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=def
+PropertyName1=TestFilePropertyInt
+PropertyType1=2
+PropertyValue1=222
+
+[component_file_property]
+ComponentIdOffset=0
+FileName=z:\logs\scr_test5.txt
+PropertyName=TestFilePropertyStr
+PropertyType=1
+PropertyValue=def
+
+// SEC-SCR-API-0009
+
+[delete_component_properties]
+ComponentIdOffset=0
+PropertiesCount=2
+PropertyName0=IntegerProperty
+PropertyType0=2
+PropertyValue0=111
+PropertyName1=LocalizedProperty
+PropertyType1=3
+PropertyValue1=alocalizedstring
+PropertyLocale1=1
+
+[component_properties_left]
+ComponentIdOffset=0
+PropertiesCount=1
+// This property should be left
+PropertyName0=StringProperty
+PropertyType0=1
+PropertyValue0=astring
+
+
+// SEC-SCR-API-0010
+
+[delete_common_file1_property1]
+ComponentIdOffset=0
+FileName=c:\common_file_1.txt
+PropertyName=TestFilePropertyInt
+
+[common_file1_properties_left]
+ComponentIdOffset=0
+FileName=c:\common_file_1.txt
+PropertiesCount=1
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=afile1string
+
+[delete_common_file2_property1]
+ComponentIdOffset=0
+FileName=z:\common_file_2.txt
+PropertyName=TestFilePropertyStr
+
+[common_file2_properties_left]
+ComponentIdOffset=0
+FileName=z:\common_file_2.txt
+PropertiesCount=1
+PropertyName0=TestFilePropertyInt
+PropertyType0=2
+PropertyValue0=102
+
+
+// SEC-SCR-API-0011
+
+[component_files_to_be_unregistered]
+ComponentIdOffset=0
+FileCount= 2
+FileName0=c:\file_to_be_unregistered.txt
+FileName1=z:\file_to_be_left.txt
+
+[component_file_properties_to_be_unregistered]
+ComponentIdOffset=0
+FileName=c:\file_to_be_unregistered.txt
+PropertiesCount=2
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=component11File1
+PropertyName1=TestFilePropertyInt
+PropertyType1=2
+PropertyValue1=111
+
+[unregister_component_file]
+ComponentIdOffset=0
+FileName=c:\file_to_be_unregistered.txt
+
+[unregistered_file_property]
+ComponentIdOffset=0
+FileName=c:\file_to_be_unregistered.txt
+PropertyName=TestFilePropertyInt
+PropertyType=2
+PropertyValue=111
+
+[registered_files]
+ComponentIdOffset=0
+FileCount= 1
+FileName0=z:\file_to_be_left.txt
+
+
+// SEC-SCR-API-0012
+
+[component_to_be_deleted]
+SoftwareType=plain
+ComponentName=Component2bDeleted
+VendorName=Symbian
+
+[delete_component]
+ComponentIdOffset=0
+
+[deleted_component_properties]
+ComponentIdOffset=0
+PropertiesCount=0
+PropertyName0=DummyProperty
+PropertyType0=1
+PropertyValue0=DummyValue
+
+[deleted_component_files]
+ComponentIdOffset=0
+FileCount= 0
+
+[deleted_component_file1_properties]
+ComponentIdOffset=0
+FileCount=1
+FileName0=c:\common_file_1.txt
+PropertiesCount=1
+PropertyName0=DummyProperty
+PropertyType0=1
+PropertyValue0=DummyValue
+
+[verify_component_deleted]
+FilterName=Component2bDeleted
+ComponentIdOffset=0
+ComponentName=Component2bDeleted
+VendorName=Symbian
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=C,Z
+Version=
+
+[delete_non_existing_component]
+ComponentId=123456
+
+// SEC-SCR-API-0013
+
+[add_component_with_default_language]
+SoftwareType=dummy
+IsLocalisable=True
+LocalesCount=2
+ComponentName0=Élément_N4
+VendorName0=SécuritéÉquipe
+ComponentLocale0=2 //French
+ComponentName1=Component_N4
+VendorName1=SecurityTeam
+ComponentLocale1=1 // English - Default
+
+[add_component_with_nondefault_language_only]
+SoftwareType=dummy
+IsLocalisable=True
+LocalesCount=1
+ComponentName0=Bilesen_N5
+VendorName0=GüvenlikTakimi
+ComponentLocale0=14 //Turkish
+
+[get_component_with_default_language]
+ComponentIdOffset=1
+ComponentName=Component_N4
+VendorName=SecurityTeam
+SoftwareType=dummy
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_unspecified_language]
+ComponentLocale=-1 // KUnspecifiedLocale
+ComponentIdOffset=1
+ComponentName=Component_N4
+VendorName=SecurityTeam
+SoftwareType=dummy
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_specified_language]
+ComponentLocale=2 // French
+ComponentIdOffset=1
+ComponentName=Élément_N4
+VendorName=SécuritéÉquipe
+SoftwareType=faux
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_nondefault_language_only_1]
+ComponentIdOffset=0
+ComponentName=Bilesen_N5
+VendorName=GüvenlikTakimi
+SoftwareType=dummy
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_nondefault_language_only_2]
+ComponentLocale=14 //Turkish
+ComponentIdOffset=0
+ComponentName=Bilesen_N5
+VendorName=GüvenlikTakimi
+SoftwareType=kukla
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_nondefault_language_only_3]
+ComponentLocale=15 //Icelandic
+ComponentIdOffset=0
+ComponentName=Bilesen_N5
+VendorName=GüvenlikTakimi
+SoftwareType=dummy
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_nondefault_language_only_4]
+ComponentLocale=0 //Non-specified locale
+ComponentIdOffset=0
+ComponentName=Bilesen_N5
+VendorName=GüvenlikTakimi
+SoftwareType=dummy
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+// SEC-SCR-API-0014
+
+[get_non_existing_component]
+ComponentId=-1	// This Id is shouldn't exist.
+ComponentName=DummyName
+VendorName=DummyName
+SoftwareType=dummy
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+
+// SEC-SCR-API-0015
+
+[getfileproperties_of_nonexisting_component]
+ComponentId=-1
+FileName=c:\common_file_1.txt
+PropertiesCount=2
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=afile1string
+PropertyName1=TestFilePropertyInt
+PropertyType1=2
+PropertyValue1=101
+
+[getfileproperties_of_nonexisting_file]
+ComponentIdOffset=0
+FileName=c:\nonexisting.file
+PropertiesCount=2
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=afile1string
+PropertyName1=TestFilePropertyInt
+PropertyType1=2
+PropertyValue1=101
+
+
+// SEC-SCR-API-0016
+
+
+[getfileproperty_of_nonexisting_component]
+ComponentId=-1
+FileName=z:\common_file_2.txt
+PropertyName=TestFilePropertyStr
+
+[getfileproperty_of_nonexisting_file]
+ComponentId=0
+FileName=z:\nonexisting.file
+PropertyName=TestFilePropertyStr
+
+[getfileproperty_of_nonexisting_property]
+ComponentId=0
+FileName=z:\common_file_2.txt
+PropertyName=NonexistingProperty
+
+
+// SEC-SCR-API-0017
+
+[register_file_to_first_component]
+ComponentIdOffset=0
+FileCount= 1
+FileName0=z:\get_file_components.txt
+
+[register_file_to_second_component]
+ComponentIdOffset=1
+FileCount= 1
+FileName0=z:\get_file_components.txt
+
+[component1_file_property]
+ComponentIdOffset=0
+FileName=z:\get_file_components.txt
+PropertiesCount=1
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=afile2string
+
+[component2_file_property]
+ComponentIdOffset=0
+FileName=z:\get_file_components.txt
+PropertiesCount=1
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=afile2string
+
+[get_file_components]
+ComponentsCount=2
+ComponentIdOffset0=0
+ComponentIdOffset1=1
+FileName=z:\get_file_components.txt
+
+
+// SEC-SCR-API-0018
+
+
+[component_properties_with_localizables]
+ComponentIdOffset=0
+PropertiesCount=5
+PropertyName0=ComponentPropertyString
+PropertyType0=1
+PropertyValue0=qwe
+PropertyName1=ComponentPropertyInteger
+PropertyType1=2
+PropertyValue1=123456789
+PropertyName2=ComponentPropertyLocalizable
+PropertyType2=3
+PropertyValue2=uo
+PropertyLocale2=1
+PropertyName3=ComponentPropertyLocalizable
+PropertyType3=3
+PropertyValue3=üö
+PropertyLocale3=14
+PropertyName4=ComponentPropertyAnotherLocalizable
+PropertyType4=3
+PropertyValue4=ç
+PropertyLocale4=14
+
+[component_nonlocalized_properties]
+ComponentIdOffset=0
+PropertiesCount=3
+PropertyName0=ComponentPropertyString
+PropertyType0=1
+PropertyValue0=qwe
+PropertyName1=ComponentPropertyInteger
+PropertyType1=2
+PropertyValue1=123456789
+PropertyName2=ComponentPropertyLocalizable
+PropertyType2=3
+PropertyValue2=uo
+PropertyLocale2=1
+
+[component_localized_properties]
+ComponentIdOffset=0
+PropertyLocale=14
+PropertiesCount=2
+PropertyName0=ComponentPropertyLocalizable
+PropertyType0=3
+PropertyValue0=üö
+PropertyLocale0=14
+PropertyName1=ComponentPropertyAnotherLocalizable
+PropertyType1=3
+PropertyValue1=ç
+PropertyLocale1=14
+
+// SEC-SCR-API-0019
+
+[get_plugin_with_mimetype_1]
+MimeType=x-epoc/x-sisx-app
+PluginUid=271080388
+
+[get_plugin_with_mimetype_2]
+MimeType=text/plain
+PluginUid=271080402
+
+[get_plugin_with_componentid]
+ComponentIdOffset=0
+PluginUid=271080402
+
+
+// SEC_SCR_API_0020
+
+[component_with_dummy_type]
+SoftwareType=dummy
+ComponentName=ComponentOne
+VendorName=VendorOne
+
+[component_with_plain_type]
+SoftwareType=plain
+ComponentName=ComponentTwo
+VendorName=VendorTwo
+
+[second_component_with_dummy_type]
+SoftwareType=dummy
+ComponentName=ComponentThree
+VendorName=VendorThree
+
+[get_dummy_components]
+FilterSoftwareType=dummy
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=ComponentOne
+VendorName0=VendorOne
+SoftwareType0=dummy
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=0
+ComponentName1=ComponentThree
+VendorName1=VendorThree
+SoftwareType1=dummy
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+
+// SEC-SCR-API-0021
+
+[first_component_with_same_vendor]
+SoftwareType=plain
+ComponentName=FirstComponent
+VendorName=SameVendor
+
+[second_component_with_same_vendor]
+SoftwareType=plain
+ComponentName=SecondComponent
+VendorName=SameVendor
+
+[component_with_different_vendor]
+SoftwareType=plain
+ComponentName=ThirdComponent
+VendorName=DifferentVendor
+
+[get_components_by_vendor]
+FilterVendor=SameVendor
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=FirstComponent
+VendorName0=SameVendor
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=1
+ComponentName1=SecondComponent
+VendorName1=SameVendor
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+
+// SEC-SCR-API-0022
+
+[first_component_properties]
+ComponentIdOffset=2
+PropertiesCount=8
+PropertyName0=S1
+PropertyType0=1
+PropertyValue0=Value1
+PropertyName1=S2
+PropertyType1=1
+PropertyValue1=Value2
+PropertyName2=I1
+PropertyType2=2
+PropertyValue2=1
+PropertyName3=I2
+PropertyType3=2
+PropertyValue3=2
+PropertyName4=L1
+PropertyType4=3
+PropertyValue4=Locale1
+PropertyLocale4=1 //English
+PropertyName5=L1
+PropertyType5=3
+PropertyValue5=Yerel1
+PropertyLocale5=14 //Turkish
+PropertyName6=L2
+PropertyType6=3
+PropertyValue6=Locale2
+PropertyLocale6=1 //English
+PropertyName7=L2
+PropertyType7=3
+PropertyValue7=Yerel2
+PropertyLocale7=14 //Turkish
+
+[second_component_properties]
+ComponentIdOffset=1
+PropertiesCount=8
+PropertyName0=S1
+PropertyType0=1
+PropertyValue0=Value1
+PropertyName1=S2
+PropertyType1=1
+PropertyValue1=AnotherValue2
+PropertyName2=I1
+PropertyType2=2
+PropertyValue2=11
+PropertyName3=I2
+PropertyType3=2
+PropertyValue3=2
+PropertyName4=L1
+PropertyType4=3
+PropertyValue4=Locale1
+PropertyLocale4=1 //English
+PropertyName5=L1
+PropertyType5=3
+PropertyValue5=Yerel1
+PropertyLocale5=14 //Turkish
+PropertyName6=L2
+PropertyType6=3
+PropertyValue6=AnotherLocale2
+PropertyLocale6=1 //English
+PropertyName7=L2
+PropertyType7=3
+PropertyValue7=DigerYerel2
+PropertyLocale7=14 //Turkish
+
+[third_component_properties]
+ComponentIdOffset=0
+PropertiesCount=8
+PropertyName0=S1
+PropertyType0=1
+PropertyValue0=AnotherValue1
+PropertyName1=S2
+PropertyType1=1
+PropertyValue1=Value2
+PropertyName2=I1
+PropertyType2=2
+PropertyValue2=11
+PropertyName3=I2
+PropertyType3=2
+PropertyValue3=22
+PropertyName4=L1
+PropertyType4=3
+PropertyValue4=AnotherLocale1
+PropertyLocale4=1 //English
+PropertyName5=L1
+PropertyType5=3
+PropertyValue5=DigerYerel1
+PropertyLocale5=14 //Turkish
+PropertyName6=L2
+PropertyType6=3
+PropertyValue6=AnotherLocale2
+PropertyLocale6=1 //English
+PropertyName7=L2
+PropertyType7=3
+PropertyValue7=DigerYerel2
+PropertyLocale7=14 //Turkish
+
+[get_components_with_integer_property1]
+FilterPropertiesCount=1
+FilterPropertyName0=I1
+FilterIntProperty0=11
+ComponentsCount=2
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=0
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+GlobalIdName1=
+SoftwareType1=plain
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+[get_components_with_integer_property2]
+FilterPropertiesCount=1
+FilterPropertyName0=I2
+FilterIntProperty0=2
+SetSize=2
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=1
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+[get_components_with_string_property1]
+FilterPropertiesCount=1
+FilterPropertyName0=S1
+FilterStringProperty0=Value1
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=1
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+[get_components_with_string_property2]
+FilterPropertiesCount=1
+FilterPropertyName0=S2
+FilterStringProperty0=AnotherValue2
+ComponentsCount=1
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+
+[get_components_with_localized_property1]
+FilterPropertiesCount=1
+FilterPropertyName0=L1
+FilterStringProperty0=Locale1
+FilterPropertyLocale0=1 //English
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=1
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+[get_components_with_localized_property2]
+FilterPropertiesCount=1
+FilterPropertyName0=L2
+FilterStringProperty0=DigerYerel2
+FilterPropertyLocale0=14 //Turkish
+ComponentsCount=2
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=0
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+// SEC-SCR-API-0023
+
+[files_to_first_component]
+ComponentIdOffset=2
+FileCount=2
+FileName0=c:\f1.txt
+FileName1=d:\f2.txt
+
+[files_to_second_component]
+ComponentIdOffset=1
+FileCount=2
+FileName0=d:\f2.txt
+FileName1=e:\f3.txt
+
+[files_to_third_component]
+ComponentIdOffset=0
+FileCount=2
+FileName0=c:\f1.txt
+FileName1=e:\f3.txt
+
+[get_components_with_file1]
+FilterFile=c:\f1.txt
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C,D
+Version0=
+ComponentIdOffset1=0
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=C,E
+Version1=
+
+[get_components_with_file2]
+FilterFile=d:\f2.txt
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C,D
+Version0=
+ComponentIdOffset1=1
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=D,E
+Version1=
+
+[get_components_with_file3]
+FilterFile=e:\f3.txt
+ComponentsCount=2
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=D,E
+Version0=
+ComponentIdOffset1=0
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=C,E
+Version1=
+
+
+// SEC-SCR-API-0024
+
+[update_first_component_attributes]
+ComponentIdOffset=0
+Version=1.2.3
+Removable=True
+DrmProtected=False
+Hidden=True
+KnownRevoked=False
+OriginVerified=True
+ComponentSize=1024
+ComponentName=GeneralComponent
+VendorName=Symbian
+PropertyLocale=1 //English
+
+[update_second_component_attributes]
+ComponentIdOffset=1
+Version=4.5.6
+Removable=False
+DrmProtected=True
+Hidden=False
+KnownRevoked=True
+OriginVerified=False
+ComponentSize=2048
+ComponentName=GeneralComponent
+VendorName=Symbian
+PropertyLocale=1 //English
+
+[get_removable_components]
+FilterIsRemovable=True
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+DrmProtected0=False
+Hidden0=True
+KnownRevoked0=False
+OriginVerified0=True
+ComponentSize0=1024
+ScomoState0=0
+InstalledDrives0=
+Version0=1.2.3
+
+[get_unremovable_components]
+FilterIsRemovable=False
+ComponentsCount=1
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=False
+DrmProtected0=True
+Hidden0=False
+KnownRevoked0=True
+OriginVerified0=False
+ComponentSize0=2048
+ScomoState0=0
+InstalledDrives0=
+Version0=4.5.6
+
+[get_drmprotected_components]
+FilterIsDrmProtected=True
+ComponentsCount=1
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=False
+DrmProtected0=True
+Hidden0=False
+KnownRevoked0=True
+OriginVerified0=False
+ComponentSize0=2048
+ScomoState0=0
+InstalledDrives0=
+Version0=4.5.6
+
+[get_drmunprotected_components]
+FilterIsDrmProtected=False
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+DrmProtected0=False
+Hidden0=True
+KnownRevoked0=False
+OriginVerified0=True
+ComponentSize0=1024
+ScomoState0=0
+InstalledDrives0=
+Version0=1.2.3
+
+[get_hidden_components]
+FilterIsHidden=True
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+DrmProtected0=False
+Hidden0=True
+KnownRevoked0=False
+OriginVerified0=True
+ComponentSize0=1024
+ScomoState0=0
+InstalledDrives0=
+Version0=1.2.3
+
+[get_nonhidden_components]
+FilterIsHidden=False
+ComponentsCount=1
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=False
+DrmProtected0=True
+Hidden0=False
+KnownRevoked0=True
+OriginVerified0=False
+ComponentSize0=2048
+ScomoState0=0
+InstalledDrives0=
+Version0=4.5.6
+
+[get_knownrevoked_components]
+FilterIsKnownRevoked=True
+ComponentsCount=1
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=False
+DrmProtected0=True
+Hidden0=False
+KnownRevoked0=True
+OriginVerified0=False
+ComponentSize0=2048
+ScomoState0=0
+InstalledDrives0=
+Version0=4.5.6
+
+[get_knownunrevoked_components]
+FilterIsKnownRevoked=False
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+DrmProtected0=False
+Hidden0=True
+KnownRevoked0=False
+OriginVerified0=True
+ComponentSize0=1024
+ScomoState0=0
+InstalledDrives0=
+Version0=1.2.3
+
+[get_originverified_components]
+FilterIsOriginVerified=True
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+DrmProtected0=False
+Hidden0=True
+KnownRevoked0=False
+OriginVerified0=True
+ComponentSize0=1024
+ScomoState0=0
+InstalledDrives0=
+Version0=1.2.3
+
+[get_originnonverified_components]
+FilterIsOriginVerified=False
+ComponentsCount=1
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=False
+DrmProtected0=True
+Hidden0=False
+KnownRevoked0=True
+OriginVerified0=False
+ComponentSize0=2048
+ScomoState0=0
+InstalledDrives0=
+Version0=4.5.6
+
+// SEC-SCR-API-0025
+
+[update_component_scomostate]
+ComponentIdOffset=1
+ScomoState=1
+
+[get_non_activated_components]
+FilterScomoState=1
+ComponentsCount=1
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=False
+DrmProtected0=True
+Hidden0=False
+KnownRevoked0=True
+OriginVerified0=False
+ComponentSize0=2048
+ScomoState0=1
+InstalledDrives0=
+Version0=4.5.6
+
+
+// SEC-SCR-API-0027
+
+[files_of_first_component]
+ComponentIdOffset=2
+FileCount=4
+FileName0=c:\component28.txt
+FileName1=d:\component28.txt
+FileName2=x:\component28.txt
+FileName3=z:\component28.txt
+
+[files_of_second_component]
+ComponentIdOffset=1
+FileCount=3
+FileName0=c:\component29.txt
+FileName1=e:\component29.txt
+FileName2=x:\component29.txt
+
+[files_of_third_component]
+ComponentIdOffset=0
+FileCount=2
+FileName0=x:\component30.txt
+FileName1=z:\component30.txt
+
+[components_on_driveC]
+FilterDrivesList=C
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C,D,X,Z
+Version0=
+ComponentIdOffset1=1
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=C,E,X
+Version1=
+
+[components_on_driveD]
+FilterDrivesList=D
+ComponentsCount=1
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C,D,X,Z
+Version0=
+
+[components_on_driveX]
+FilterDrivesList=X
+ComponentsCount=3
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C,D,X,Z
+Version0=
+ComponentIdOffset1=1
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=C,E,X
+Version1=
+ComponentIdOffset2=0
+ComponentName2=GeneralComponent
+VendorName2=Symbian
+SoftwareType2=plain
+GlobalIdName2=
+Removable2=True
+ComponentSize2=0
+ScomoState2=0
+InstalledDrives2=X,Z
+Version2=
+
+[components_on_driveZ]
+FilterDrivesList=Z
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C,D,X,Z
+Version0=
+ComponentIdOffset1=0
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=X,Z
+Version1=
+
+[components_on_driveCE]
+FilterDrivesList=C,E
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C,D,X,Z
+Version0=
+ComponentIdOffset1=1
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=C,E,X
+Version1=
+
+[components_on_driveCZ]
+FilterDrivesList=C,Z
+ComponentsCount=3
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C,D,X,Z
+Version0=
+ComponentIdOffset1=1
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=C,E,X
+Version1=
+ComponentIdOffset2=0
+ComponentName2=GeneralComponent
+VendorName2=Symbian
+SoftwareType2=plain
+GlobalIdName2=
+Removable2=True
+ComponentSize2=0
+ScomoState2=0
+InstalledDrives2=X,Z
+Version2=
+
+
+// SEC-SCR-API-0027
+
+[first_registration_of_file]
+ComponentIdOffset=1
+FileCount=1
+FileName0=y:\multiple_registered.txt
+
+[second_registration_of_file]
+ComponentIdOffset=0
+FileCount=1
+FileName0=y:\multiple_registered.txt
+
+[get_components_with_multiply_registered_file_1]
+FilterFile=y:\multiple_registered.txt
+ComponentsCount=2
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=Y
+Version0=
+ComponentIdOffset1=0
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=Y
+Version1=
+
+[unregister_first_component_file]
+ComponentIdOffset=1
+FileName=y:\multiple_registered.txt
+
+[get_components_with_multiply_registered_file_2]
+FilterFile=y:\multiple_registered.txt
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=Y
+Version0=
+
+[unregister_second_component_file]
+ComponentIdOffset=0
+FileName=y:\multiple_registered.txt
+
+[get_components_with_multiply_registered_file_3]
+FilterFile=y:\multiple_registered.txt
+ComponentsCount=0
+ComponentIdOffset0=0
+
+
+// SEC-SCR-API-0028
+
+[transaction_component]
+SoftwareType=plain
+ComponentName=TransactionComponent
+VendorName=Symbian
+FileName=c:\transaction_test.txt
+PropertyName=TransactionProperty
+PropertyType=2
+PropertyValue=333
+
+[transaction_component_attributes]
+ComponentIdOffset=0
+ComponentName=TransactionComponent
+VendorName=Symbian
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=C
+Version=
+
+[transaction_component_properties_rollback]
+ComponentIdOffset=0
+PropertiesCount=0
+PropertyName0=TransactionProperty
+PropertyType0=2
+PropertyValue0=333
+
+[transaction_component_properties_commit]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=TransactionProperty
+PropertyType0=2
+PropertyValue0=333
+
+[transaction_files]
+ComponentIdOffset=0
+FileCount=1
+FileName0=c:\transaction_test.txt
+
+// SEC-SCR-API-0029
+
+[commit_common_component]
+SoftwareType=plain
+ComponentName=TransactionComponent
+VendorName=Symbian
+FileName=c:\transaction_test.txt
+PropertyName=TransactionProperty
+PropertyType=2
+PropertyValue=333
+CommitTransaction=True
+
+
+// SEC-SCR-API-0030
+
+[cancel_common_component]
+SoftwareType=plain
+ComponentName=TransactionComponent
+VendorName=Symbian
+FileName=c:\transaction_test.txt
+PropertyName=TransactionProperty
+PropertyType=2
+PropertyValue=333
+CancelTransaction=True
+
+// SEC-SCR-API-0031
+
+[begin_before_subsession]
+BeginTransactionBeforeSubsession=True
+
+[open_reading_in_same_session]
+OpenSubsessionInTheSameSession=True
+
+// SEC-SCR-API-0032
+
+[begin_after_subsession]
+BeginTransactionAfterSubsession=True
+
+[begin_after_subsession_in_same_session]
+BeginTransactionInTheSameSession=True
+
+[mutating_operation_with_subsession]
+MutatingOperationWithSubsession=True
+
+// SEC-SCR-API-0033
+
+[begin_after_another_begin]
+BeginTransactionAfterAnotherBegin=True
+
+
+// SEC-SCR-API-0034
+
+[commit_another_transaction]
+CommitTransaction=True
+
+[another_transaction_mutating]
+InvokeMutatingFunction=True
+
+[another_transaction_nonmutating]
+InvokeNonMutatingFunction=True
+
+// SEC-SCR-API-0035
+
+[cancel_another_transaction]
+CancelTransaction=True
+
+
+// SEC-SCR-API-0036
+
+[multiple_subsessions]
+MultipleSubsessions=True
+
+[multiple_active_subsessions]
+MultipleActiveSubsessions=True
+
+// SEC-SCR-API-0037
+
+[write_after_begin]
+WriteAfterBeginTransaction=True
+
+
+// SEC-SCR-API-0038
+
+[read_after_begin]
+ReadAfterBeginTransaction=True
+
+
+// SEC-SCR-API-0039
+
+[all_components]
+ComponentsCount=3
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=1
+ComponentName1=ComponentOne
+VendorName1=VendorOne
+SoftwareType1=dummy
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+ComponentIdOffset2=0
+ComponentName2=GeneralComponent
+VendorName2=Symbian
+SoftwareType2=plain
+GlobalIdName2=
+Removable2=True
+ComponentSize2=0
+ScomoState2=0
+InstalledDrives2=
+Version2=
+
+
+// SEC-SCR-API-0040
+
+[concurrent_component_1]
+SoftwareType=plain
+ComponentName=ConcurrentComponent1
+VendorName=Symbian
+
+[concurrent_component_2]
+SoftwareType=plain
+ComponentName=ConcurrentComponent2
+VendorName=Symbian
+
+[concurrent_component1_attributes]
+ComponentIdOffset=1
+ComponentName=ConcurrentComponent1
+VendorName=Symbian
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[concurrent_component2_attributes]
+ComponentIdOffset=0
+ComponentName=ConcurrentComponent2
+VendorName=Symbian
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[concurrent_component_properties]
+ComponentIdOffset=1
+PropertiesCount=3
+PropertyName0=StringProperty
+PropertyType0=1
+PropertyValue0=astring
+PropertyName1=IntegerProperty
+PropertyType1=2
+PropertyValue1=111
+PropertyName2=LocalizedProperty
+PropertyType2=3
+PropertyValue2=alocalizedstring
+PropertyLocale2=1
+
+// SEC-SCR-API-0041
+
+[ismediapresent_positive_files_register1]
+ComponentIdOffset=0
+FileCount=1
+FileName0=c:\a.txt
+
+[ismediapresent_positive_files_register2]
+ComponentIdOffset=1
+FileCount=4
+FileName0=c:\a.txt
+FileName1=c:\abc\b.txt
+FileName2=Z:\a.txt
+FileName3=z:\def\b.txt
+
+[ismediapresent_positive_files_check1]
+ExpectedMediaPresent=True
+ComponentIdOffset=0
+
+[ismediapresent_positive_files_check2]
+ExpectedMediaPresent=True
+ComponentIdOffset=1
+
+// SEC-SCR-API-0042
+
+[ismediapresent_negative_files_register1]
+ComponentIdOffset=0
+FileCount=1
+FileName0=q:\a.txt
+
+[ismediapresent_negative_files_register2]
+ComponentIdOffset=1
+FileCount=5
+FileName0=c:\a.txt
+FileName1=c:\abc\b.txt
+FileName2=C:\b.txt
+FileName3=Q:\def\b.txt
+FileName4=q:\def\e.txt
+
+[ismediapresent_negative_files_check1]
+ExpectedMediaPresent=False
+ComponentIdOffset=0
+
+[ismediapresent_negative_files_check2]
+ExpectedMediaPresent=False
+ComponentIdOffset=1
+
+[ismediapresent_negative_non_existent_component]
+ExpectedMediaPresent=False
+ComponentId=1234567
+
+// SEC-SCR-API-0043
+
+[lower_case_property]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=caseinsensitivepropertyname
+PropertyType0=1
+PropertyValue0=alllowercase
+
+[mixed_lower_case_property]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=CAseInSENSitivePROPERtynamE
+PropertyType0=1
+PropertyValue0=miXedCasE
+
+[lower_case_file_name]
+ComponentIdOffset=0
+FileCount= 1
+FileName0=c:\case_insensitive_file.txt
+
+
+[filter_mixed_case_property_name]
+FilterPropertiesCount=1
+FilterPropertyName0=CaSeiNsensiTIVEproperTYnaMe
+FilterStrProperty0=alllowercase
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C
+Version0=
+
+[filter_mixed_case_file_name]
+FilterFile=C:\caSE_inseNSitive_FILe.txt
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C
+Version0=
+
+[case_insensitive_mimetype]
+MimeType=teXT/pLAiN
+PluginUid=271080402
+
+// SEC-SCR-API-0044
+[all_components_component_ids_test44]
+ComponentsCount=2
+ComponentIdOffset0=0
+ComponentIdOffset1=1 
+
+// SEC-SCR-API-0045
+[wrong_software_type_name]
+SoftwareType=justSomeDummySoftwareType
+ComponentName=GeneralComponent
+VendorName=Symbian
+
+[no_locales_in_add_component]
+SoftwareType=justSomeDummySoftwareType
+LocalesCount=0
+IsLocalisable=True
+
+[no_drive_file_name]
+ComponentIdOffset=0
+FileCount=1
+FileName0=test.fil
+
+[register_file_twice]
+ComponentIdOffset=0
+FileCount=1
+FileName0=c:\normal.fil
+
+[nonexisting_file_property]
+ComponentIdOffset=0
+FileName=c:\normal.fil
+PropertyName=ThisPropertyDoesNotExist
+PropertyType=1
+PropertyValue=def
+
+[unregister_file_twice]
+ComponentIdOffset=0
+FileName=c:\normal.fil
+
+[missing_single_property]
+ComponentIdOffset=0
+PropertyName=ThisPropertyDoesNotExist
+PropertyType=2
+PropertyValue=111
+
+[get_plugin_for_nonexisting_mimetype]
+MimeType=unknown/type
+PluginUid=271080388
+
+[set_negative_component_size]
+ComponentIdOffset=0
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=-667
+ComponentName=newName
+VendorName=newVendorName
+PropertyLocale=0
+
+[add_component_invalid_operation_type]
+SoftwareType=plain
+ComponentName=InvalidOpType
+VendorName=Symbian
+GlobalIdName=testglobalid
+OperationType=101
+
+// SEC-SCR-API-0046 (and other composite filter tests)
+[first_component_file]
+ComponentIdOffset=0
+FileCount=1
+FileName0=c:\normal.fil
+
+[third_component_file]
+ComponentIdOffset=2
+FileCount=1
+FileName0=c:\normal.fil
+
+[second_component_property]
+ComponentIdOffset=1
+PropertiesCount=1
+PropertyName0=TestProperty
+PropertyType0=1
+PropertyValue0=Test
+
+[fourth_component_property]
+ComponentIdOffset=3
+PropertiesCount=1
+PropertyName0=TestProperty
+PropertyType0=1
+PropertyValue0=Test
+
+[fourth_component_file]
+ComponentIdOffset=3
+FileCount=1
+FileName0=c:\normal.fil
+
+[get_components_with_file_and_property_empty]
+FilterPropertiesCount=1
+FilterPropertyName0=TestProperty
+FilterStringProperty0=Test
+FilterFile=c:\normal.fil
+ComponentsCount=0
+
+[get_components_with_file_and_property_fourth]
+FilterPropertiesCount=1
+FilterPropertyName0=TestProperty
+FilterStringProperty0=Test
+FilterFile=c:\normal.fil
+ComponentsCount=1
+ComponentIdOffset0=3
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C
+Version0=
+
+[filter_test_names_test49]
+SoftwareType=plain
+ComponentName=FilterTestComponent
+VendorName=FilterTestVendor
+
+[get_components_with_names_file_and_property_fourth]
+FilterPropertiesCount=1
+FilterPropertyName0=TestProperty
+FilterStringProperty0=Test
+FilterFile=c:\normal.fil
+FilterName=FilterTestComponent
+FilterVendor=FilterTestVendor
+ComponentsCount=1
+ComponentIdOffset0=3
+ComponentName0=FilterTestComponent
+VendorName0=FilterTestVendor
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C
+Version0=
+
+[filter_test_names_vendor_test50]
+SoftwareType=plain
+ComponentName=GeneralComponent
+VendorName=FilterTestVendor
+
+[get_components_with_vendor_and_property_second]
+FilterPropertiesCount=1
+FilterPropertyName0=TestProperty
+FilterStringProperty0=Test
+FilterVendor=FilterTestVendor
+ComponentsCount=1
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=FilterTestVendor
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+
+// SEC-SCR-API-0051
+[single_int64_property]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=SingleInt64Property
+PropertyType0=2
+PropertyValue0=72057594037927935
+
+[get_single_int64_property]
+ComponentIdOffset=0
+PropertyName=SingleInt64Property
+PropertyType=2
+PropertyValue=72057594037927935
+
+[update_single_int64_property]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=SingleInt64Property
+PropertyType0=2
+PropertyValue0=72057594037927932
+
+[get_updated_int64_property]
+ComponentIdOffset=0
+PropertyName=SingleInt64Property
+PropertyType=2
+PropertyValue=72057594037927932
+
+[verify_in64_property_filter]
+FilterPropertiesCount=1
+FilterPropertyName0=SingleInt64Property
+FilterIntProperty0=72057594037927932
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+
+[multiple_int64_properties]
+ComponentIdOffset=0
+PropertiesCount=3
+PropertyName0=StringProperty
+PropertyType0=1
+PropertyValue0=astring
+PropertyName1=IntegerProperty
+PropertyType1=2
+PropertyValue1=72057594037927932
+PropertyName2=LocalizedProperty
+PropertyType2=3
+PropertyValue2=alocalizedstring
+PropertyLocale2=1
+
+// SEC-SCR-API-0052
+
+[component1_test52]
+SoftwareType=plain
+ComponentName=ComponentA
+VendorName=FilterTestVendor
+
+[component2_test52]
+SoftwareType=plain
+ComponentName=ComponentB
+VendorName=FilterTestVendor
+
+[component3_test52]
+SoftwareType=plain
+ComponentName=ComponentC
+VendorName=FilterTestVendor
+
+[first_component_property_test52]
+ComponentIdOffset=0
+PropertiesCount=2
+PropertyName0=PropertyA
+PropertyType0=1
+PropertyValue0=Test
+PropertyName1=PropertyB
+PropertyType1=2
+PropertyValue1=1
+
+[second_component_property_test52]
+ComponentIdOffset=1
+PropertiesCount=2
+PropertyName0=PropertyB
+PropertyType0=2
+PropertyValue0=1
+PropertyName1=PropertyC
+PropertyType1=2
+PropertyValue1=2
+
+[third_component_property_test52]
+ComponentIdOffset=2
+PropertiesCount=3
+PropertyName0=PropertyA
+PropertyType0=1
+PropertyValue0=Test
+PropertyName1=PropertyB
+PropertyType1=2
+PropertyValue1=1
+PropertyName2=PropertyC
+PropertyType2=2
+PropertyValue2=2
+
+[get_components_with_int_properties_test52]
+FilterPropertiesCount=2
+FilterPropertyName0=PropertyB
+FilterIntProperty0=1
+FilterPropertyName1=PropertyC
+FilterIntProperty1=2
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=ComponentC
+VendorName0=FilterTestVendor
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=1
+ComponentName1=ComponentB
+VendorName1=FilterTestVendor
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+[get_components_with_str_int_property_test52]
+FilterPropertiesCount=2
+FilterPropertyName0=PropertyA
+FilterStringProperty0=Test
+FilterPropertyName1=PropertyB
+FilterIntProperty1=1
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=ComponentC
+VendorName0=FilterTestVendor
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=0
+ComponentName1=ComponentA
+VendorName1=FilterTestVendor
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+// SEC-SCR-API-0053
+[verify_first_component_count_test53]
+ComponentIdOffset=0
+ExpectedFilesCount=2
+
+[verify_second_component_count_test53]
+ComponentIdOffset=1
+ExpectedFilesCount=0
+
+// SEC-SCR-API-0054
+[component1_test54]
+SoftwareType=plain
+ComponentName=RightComponent
+VendorName=RightVendor
+
+[component2_test54]
+SoftwareType=plain
+ComponentName=RightComponent
+VendorName=WrongVendor
+
+[component3_test54]
+SoftwareType=plain
+ComponentName=RightComponent
+VendorName=RightVendor
+
+[component4_test54]
+SoftwareType=plain
+ComponentName=WrongComponent
+VendorName=RightVendor
+
+[component5_test54]
+SoftwareType=dummy
+ComponentName=RightComponent
+VendorName=RightVendor
+
+[get_components_subsession_test54]
+FilterSoftwareType=plain
+FilterName=RightComponent
+FilterVendor=RightVendor
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=RightComponent
+VendorName0=RightVendor
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=4
+ComponentName1=RightComponent
+VendorName1=RightVendor
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+[get_component_ids_test54]
+FilterSoftwareType=plain
+FilterName=RightComponent
+FilterVendor=RightVendor
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentIdOffset1=4
+
+// SEC-SCR-API-0055
+[huge_component_test55_update]
+ComponentIdOffset=0
+Version=0.1
+Removable=False
+DrmProtected=False
+Hidden=False
+KnownRevoked=False
+OriginVerified=False
+ComponentName=UpdatedName
+VendorName=UpdatedVendor
+PropertyLocale=6
+ComponentSize=281474976710655
+
+[huge_component_test55_verify]
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=False
+ComponentSize0=281474976710655
+ScomoState0=0
+InstalledDrives0=
+Version0=0.1
+
+// SEC-SCR-API-0057
+[component1_test57]
+SoftwareType=plain
+ComponentName=Component1
+VendorName=Symbian
+
+[component2_test57]
+SoftwareType=plain
+ComponentName=Component2
+VendorName=Symbian
+
+[component3_test57]
+SoftwareType=plain
+ComponentName=Component3
+VendorName=Symbian
+
+[component1_properties]
+ComponentIdOffset=2
+PropertiesCount=2
+PropertyName0=TestProperty
+PropertyType0=3
+PropertyValue0=EnglishValue
+PropertyLocale0=1
+PropertyName1=TestProperty
+PropertyType1=3
+PropertyValue1=JustValue
+PropertyLocale1=0 // KLangNone
+
+[component2_properties]
+ComponentIdOffset=1
+PropertiesCount=2
+PropertyName0=TestProperty
+PropertyType0=3
+PropertyValue0=EnglishValue
+PropertyLocale0=1
+PropertyName1=TestProperty
+PropertyType1=3
+PropertyValue1=JustValue
+PropertyLocale1=0 // KLangNone
+
+[component3_properties]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=TestProperty
+PropertyType0=3
+PropertyValue0=EnglishValue
+PropertyLocale0=0
+
+[get_components_english_property_test57]
+FilterPropertiesCount=1
+FilterPropertyName0=TestProperty
+FilterStringProperty0=EnglishValue
+FilterPropertyLocale0=1 //English
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=Component1
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=1
+ComponentName1=Component2
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+
+[get_components_any_property_test57]
+FilterPropertiesCount=1
+FilterPropertyName0=TestProperty
+FilterStringProperty0=EnglishValue
+FilterPropertyLocale0=-1 //KLangUnspecified
+ComponentsCount=3
+ComponentIdOffset0=2
+ComponentName0=Component1
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+ComponentIdOffset1=1
+ComponentName1=Component2
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=True
+ComponentSize1=0
+ScomoState1=0
+InstalledDrives1=
+Version1=
+ComponentIdOffset2=0
+ComponentName2=Component3
+VendorName2=Symbian
+SoftwareType2=plain
+GlobalIdName2=
+Removable2=True
+ComponentSize2=0
+ScomoState2=0
+InstalledDrives2=
+Version2=
+
+[get_components_negative_property_test57]
+FilterPropertiesCount=1
+FilterPropertyName0=TestProperty
+FilterStringProperty0=EnglishValue
+FilterPropertyLocale0=6 //KLangSwedish
+ComponentsCount=0
+
+// SEC-SCR-API-0058
+
+[component_with_global_id]
+SoftwareType=plain
+ComponentName=GeneralComponent
+VendorName=Symbian
+GlobalIdName=uniqueglobalid
+
+[component_attributes_with_global_id]
+ComponentIdOffset=0
+ComponentName=GeneralComponent
+VendorName=Symbian
+SoftwareType=plain
+GlobalIdName=uniqueglobalid
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[component_with_]
+
+// SEC-SCR-API-0059
+
+[supplier_component]
+SoftwareType=plain
+ComponentName=SupplierComponent1
+VendorName=Symbian
+GlobalIdName=suppliercomponent1globalid
+
+[supplier_component_globalid]
+GlobalIdName=suppliercomponent1globalid
+SoftwareType=plain
+ComponentIdOffset=0
+
+[dependant_component]
+SoftwareType=dummy
+ComponentName=DependantComponent1
+VendorName=Symbian
+GlobalIdName=dependantcomponent1globalid
+
+[dependant_component_globalid]
+ComponentIdOffset=0
+ComponentName=DependantComponent1
+VendorName=Symbian
+SoftwareType=dummy
+GlobalIdName=dependantcomponent1globalid
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[dependency_with_existing_components]
+SupplierGlobalIdName=suppliercomponent1globalid
+SupplierSwTypeName=plain
+DependantGlobalIdName=dependantcomponent1globalid
+DependantSwTypeName=dummy
+
+[dependant_components]
+GlobalIdType=Supplier
+GlobalIdName=suppliercomponent1globalid
+SoftwareType=plain
+GlobalIdCount=1
+GlobalIdName0=dependantcomponent1globalid
+SoftwareType0=dummy
+
+[supplier_components]
+GlobalIdType=Dependant
+GlobalIdName=dependantcomponent1globalid
+SoftwareType=dummy
+GlobalIdCount=1
+GlobalIdName0=suppliercomponent1globalid
+SoftwareType0=plain
+
+[deleted_supplier]
+GlobalIdType=Supplier
+GlobalIdName=suppliercomponent1globalid
+SoftwareType=plain
+GlobalIdCount=0
+
+[deleted_dependant]
+GlobalIdType=Dependant
+GlobalIdName=dependantcomponent1globalid
+SoftwareType=dummy
+GlobalIdCount=0
+
+[second_supplier_component]
+SoftwareType=dummy
+ComponentName=SupplierComponent2
+VendorName=Symbian
+GlobalIdName=suppliercomponent2globalid
+
+[dependency_with_second_supplier]
+SupplierGlobalIdName=suppliercomponent2globalid
+SupplierSwTypeName=dummy
+DependantGlobalIdName=dependantcomponent1globalid
+DependantSwTypeName=dummy
+
+[all_supplier_components]
+GlobalIdType=Dependant
+GlobalIdName=dependantcomponent1globalid
+SoftwareType=dummy
+GlobalIdCount=2
+GlobalIdName0=suppliercomponent1globalid
+SoftwareType0=plain
+GlobalIdName1=suppliercomponent2globalid
+SoftwareType1=dummy
+
+[second_dependant_component]
+SoftwareType=plain
+ComponentName=DependantComponent2
+VendorName=Symbian
+GlobalIdName=dependantcomponent2globalid
+
+[dependency_with_second_dependant]
+SupplierGlobalIdName=suppliercomponent2globalid
+SupplierSwTypeName=dummy
+DependantGlobalIdName=dependantcomponent2globalid
+DependantSwTypeName=plain
+
+[all_dependant_components]
+GlobalIdType=Supplier
+GlobalIdName=suppliercomponent2globalid
+SoftwareType=dummy
+GlobalIdCount=2
+GlobalIdName0=dependantcomponent2globalid
+SoftwareType0=plain
+GlobalIdName1=dependantcomponent1globalid
+SoftwareType1=dummy
+
+[dependency_to_nonexisting_component]
+SupplierGlobalIdName=nonexistingsuppliercomponentglobalid
+SupplierSwTypeName=nonexistinginstaller
+DependantGlobalIdName=dependantcomponent2globalid
+DependantSwTypeName=plain
+
+[existing_and_nonexisting_suppliers]
+GlobalIdType=Dependant
+GlobalIdName=dependantcomponent2globalid
+SoftwareType=plain
+GlobalIdCount=2
+GlobalIdName0=nonexistingsuppliercomponentglobalid
+SoftwareType0=nonexistinginstaller
+GlobalIdName1=suppliercomponent2globalid
+SoftwareType1=dummy
+
+[delete_second_dependant]
+ComponentIdOffset=0
+
+[suppliers_of_deleted_dependant]
+GlobalIdType=Dependant
+GlobalIdName=dependantcomponent2globalid
+SoftwareType=plain
+GlobalIdCount=0
+
+[delete_first_supplier]
+ComponentIdOffset=3
+
+[remained_dependencies]
+GlobalIdType=Supplier
+GlobalIdName=suppliercomponent1globalid
+SoftwareType=plain
+GlobalIdCount=1
+GlobalIdName0=dependantcomponent1globalid
+SoftwareType0=dummy
+
+[dependency_with_nonexisting_components]
+SupplierGlobalIdName=nonexistingsupplier
+SupplierSwTypeName=plain
+DependantGlobalIdName=nonexistingdependant
+DependantSwTypeName=plain
+
+[dependant_nonexisting_components]
+GlobalIdType=Supplier
+GlobalIdName=nonexistingsupplier
+SoftwareType=plain
+GlobalIdCount=1
+GlobalIdName0=nonexistingdependant
+SoftwareType0=plain
+
+[supplier_nonexisting_components]
+GlobalIdType=Dependant
+GlobalIdName=nonexistingdependant
+SoftwareType=plain
+GlobalIdCount=1
+GlobalIdName0=nonexistingsupplier
+SoftwareType0=plain
+
+// SEC-SCR-API-0061
+
+[update_first_component_attributes_test61]
+ComponentIdOffset=2
+Version=1.2.3
+Removable=True
+DrmProtected=True
+Hidden=True
+KnownRevoked=False
+OriginVerified=True
+ComponentSize=2048
+ComponentName=GeneralComponent
+VendorName=Symbian
+PropertyLocale=1 //English
+
+[update_second_component_attributes_test61]
+ComponentIdOffset=1
+Version=8.3.5
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=4096
+ComponentName=GeneralComponent
+VendorName=Symbian
+PropertyLocale=1 //English
+
+[update_third_component_attributes_test61]
+ComponentIdOffset=0
+Version=5.6.6
+Removable=False
+DrmProtected=False
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=512
+ComponentName=GeneralComponent
+VendorName=Symbian
+PropertyLocale=1 //English
+
+[get_components_with_drm_hidden_common_properties]
+FilterIsDrmProtected=True
+FilterIsHidden=True
+ComponentsCount=2
+ComponentIdOffset0=2
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+DrmProtected0=True
+Hidden0=True
+KnownRevoked0=False
+OriginVerified0=True
+ComponentSize0=2048
+ScomoState0=0
+InstalledDrives0=
+Version0=1.2.3
+ComponentIdOffset1=1
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=False
+DrmProtected1=True
+Hidden1=True
+KnownRevoked1=True
+OriginVerified1=True
+ComponentSize1=4096
+ScomoState1=0
+InstalledDrives1=
+Version1=8.3.5
+
+[get_components_with_originverified_knownrevoked_properties]
+FilterIsOriginVerified=True
+FilterIsKnownRevoked=True
+ComponentsCount=2
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=False
+DrmProtected0=True
+Hidden0=True
+KnownRevoked0=True
+OriginVerified0=True
+ComponentSize0=4096
+ScomoState0=0
+InstalledDrives0=
+Version0=8.3.5
+ComponentIdOffset1=0
+ComponentName1=GeneralComponent
+VendorName1=Symbian
+SoftwareType1=plain
+GlobalIdName1=
+Removable1=False
+DrmProtected1=False
+Hidden1=True
+KnownRevoked1=True
+OriginVerified1=True
+ComponentSize1=512
+ScomoState1=0
+InstalledDrives1=
+Version1=5.6.6
+
+[get_components_with_common_and_customized_attributes]
+FilterIsDrmProtected=True
+FilterPropertiesCount=1
+FilterPropertyName0=TestProperty
+FilterStringProperty0=Test
+ComponentsCount=1
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=False
+DrmProtected0=True
+Hidden0=True
+KnownRevoked0=True
+OriginVerified0=True
+ComponentSize0=4096
+ScomoState0=0
+InstalledDrives0=
+Version0=8.3.5
+
+// SEC-SCR-API-0062
+
+[versioned_dependency]
+SupplierGlobalIdName=suppliercomponent1globalid
+SupplierSwTypeName=plain
+VersionFrom=1.2.3
+VersionTo=9.8.7
+DependantGlobalIdName=dependantcomponent1globalid
+DependantSwTypeName=dummy
+
+
+[versioned_dependant_components]
+GlobalIdType=Supplier
+GlobalIdName=suppliercomponent1globalid
+SoftwareType=plain
+GlobalIdCount=1
+GlobalIdName0=dependantcomponent1globalid
+SoftwareType0=dummy
+VersionFrom0=1.2.3
+VersionTo0=9.8.7
+
+[versioned_supplier_components]
+GlobalIdType=Dependant
+GlobalIdName=dependantcomponent1globalid
+SoftwareType=dummy
+GlobalIdCount=1
+GlobalIdName0=suppliercomponent1globalid
+SoftwareType0=plain
+VersionFrom0=1.2.3
+VersionTo0=9.8.7
+
+[versioned_dependency_with_second_supplier]
+SupplierGlobalIdName=suppliercomponent2globalid
+SupplierSwTypeName=dummy
+VersionFrom=
+VersionTo=2.3.110
+DependantGlobalIdName=dependantcomponent1globalid
+DependantSwTypeName=dummy
+
+[versioned_all_supplier_components]
+GlobalIdType=Dependant
+GlobalIdName=dependantcomponent1globalid
+SoftwareType=dummy
+GlobalIdCount=2
+GlobalIdName0=suppliercomponent1globalid
+SoftwareType0=plain
+VersionFrom0=1.2.3
+VersionTo0=9.8.7
+GlobalIdName1=suppliercomponent2globalid
+SoftwareType1=dummy
+VersionFrom1=
+VersionTo1=2.3.110
+
+[versioned_dependency_with_second_dependant]
+SupplierGlobalIdName=suppliercomponent2globalid
+SupplierSwTypeName=dummy
+VersionFrom=1.45.987
+VersionTo=
+DependantGlobalIdName=dependantcomponent2globalid
+DependantSwTypeName=plain
+
+[versioned_all_dependant_components]
+GlobalIdType=Supplier
+GlobalIdName=suppliercomponent2globalid
+SoftwareType=dummy
+GlobalIdCount=2
+GlobalIdName0=dependantcomponent2globalid
+SoftwareType0=plain
+VersionFrom0=1.45.987
+VersionTo0=
+GlobalIdName1=dependantcomponent1globalid
+SoftwareType1=dummy
+VersionFrom1=
+VersionTo1=2.3.110
+
+// SEC-SCR-API-0063
+
+[add_nonlocalized_software_type]
+OperationType=NonLocalized
+
+[component_nonlocalized_software_type]
+SoftwareType=test_nonlocalizedinstaller_uniquename
+ComponentName=GeneralComponent
+VendorName=SymbianSecurityTeam
+
+[add_localized_software_type]
+OperationType=Localized
+
+[component_localized_software_type]
+SoftwareType=test_localizedinstaller_uniquename
+ComponentName=GeneralComponent
+VendorName=Symbian
+
+[add_software_type_without_mime_types]
+OperationType=NoMimeType
+
+[non_orphaned_component]
+ExpectedComponentOrphaned=False
+ComponentIdOffset=0
+
+[orphaned_component]
+ExpectedComponentOrphaned=True
+ComponentIdOffset=1
+
+[orphaned_component_attributes]
+ComponentIdOffset=1
+ComponentName=GeneralComponent
+VendorName=SymbianSecurityTeam
+SoftwareType=test_nonlocalizedinstaller_uniquename
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_orphaned_component_by_vendor]
+FilterVendor=SymbianSecurityTeam
+ComponentsCount=1
+ComponentIdOffset0=1
+ComponentName0=GeneralComponent
+VendorName0=SymbianSecurityTeam
+SoftwareType0=test_nonlocalizedinstaller_uniquename
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=
+Version0=
+
+[orphaned_non_existing_component]
+ExpectedComponentOrphaned=False
+ComponentId=123456
+
+[update_orphaned_component_attributes]
+ComponentIdOffset=1
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=12345
+ComponentName=UpdatedComponentName
+VendorName=UpdatedVendorName
+PropertyLocale=10
+
+[orphaned_component_files]
+ComponentIdOffset=1
+FileCount= 2
+FileName0=c:\logs\orphaned_test0.txt
+FileName1=z:\logs\orphaned_test1.txt
+
+[orphaned_component_properties]
+ComponentIdOffset=1
+PropertiesCount=1
+PropertyName0=OrphanedStringProperty
+PropertyType0=1
+PropertyValue0=orphanedstring
+
+[non_orphaned_component_after_reinstalling_swtype]
+ExpectedComponentOrphaned=False
+ComponentIdOffset=1
+
+[add_localized_software_type_with_different_plugin_uid]
+OperationType=LocalizedWithDifferentPluginUid
+
+[add_localized_software_type_with_extra_name]
+OperationType=LocalizedWithExtraName
+
+[add_localized_software_type_with_missing_name]
+OperationType=LocalizedWithMissingName
+
+[add_localized_software_type_with_extra_mime]
+OperationType=LocalizedExtraMime
+
+[add_localized_software_type_with_missing_mime]
+OperationType=LocalizedMissingMime
+
+
+// SEC-SCR-API-0064
+[drives_management_register_files]
+ComponentIdOffset=0
+FileCount= 3
+FileName0=c:\test1.txt
+FileName1=c:\test2.txt
+FileName2=d:\test3.txt
+
+[drives_management_both_drives]
+ComponentIdOffset=0
+ComponentName=GeneralComponent
+VendorName=Symbian
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=C,D
+Version=
+
+[drives_management_c_drive]
+ComponentIdOffset=0
+ComponentName=GeneralComponent
+VendorName=Symbian
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=C
+Version=
+
+[drives_management_unregister_first_c_file]
+ComponentIdOffset=0
+FileName=c:\test1.txt
+
+[drives_management_unregister_second_c_file]
+ComponentIdOffset=0
+FileName=c:\test2.txt
+
+[drives_management_unregister_first_d_file]
+ComponentIdOffset=0
+FileName=d:\test3.txt
+
+// SEC-SCR-API-0065
+[component_with_localizables_test65]
+SoftwareType=plain
+IsLocalisable=True
+LocalesCount=1
+ComponentName0=Component_Test65
+VendorName0=SecurityTeam
+ComponentLocale0=1 //English
+
+[set_base_language_property_test65]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=SingleLocalizedProperty
+PropertyType0=3
+PropertyValue0=alocalizedstring
+PropertyLocale0=1
+
+[get_base_language_property_test65]
+ComponentIdOffset=0
+PropertyName=SingleLocalizedProperty
+PropertyType=3
+PropertyValue=alocalizedstring
+PropertyLocale=1 
+
+[get_child_language_property_test65]
+ComponentIdOffset=0
+PropertyName=SingleLocalizedProperty
+PropertyType=3
+PropertyValue=alocalizedstring
+PropertyLocale=10
+
+[get_unspecified_language_property_test65]
+ComponentIdOffset=0
+PropertyName=SingleLocalizedProperty
+PropertyType=3
+PropertyValue=alocalizedstring
+PropertyLocale=-1
+
+[get_component_with_unspecified_names_test65]
+ComponentLocale=-1
+ComponentIdOffset=0
+ComponentName=Component_Test65
+VendorName=SecurityTeam
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_base_language_test65]
+ComponentLocale=1
+ComponentIdOffset=0
+ComponentName=Component_Test65
+VendorName=SecurityTeam
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+[get_component_with_child_language_test65]
+ComponentLocale=10
+ComponentIdOffset=0
+ComponentName=Component_Test65
+VendorName=SecurityTeam
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+// SEC-SCR-API-0066
+
+[common_component_names_with_version]
+SoftwareType=plain
+ComponentName=GeneralComponent
+VendorName=Symbian
+Version=1.2.3
+
+[update_common_component_names]
+SoftwareType=plain
+ComponentName=UpdatedGeneralComponent
+VendorName=Symbian
+GlobalIdName=updatedglobalid
+OperationType=2
+
+[log_entries]
+LogsCount=3
+ComponentName0=GeneralComponent
+SoftwareType0=plain
+Version0=1.2.3
+GlobalIdName0=
+OperationType0=0
+ComponentName1=GeneralComponent
+SoftwareType1=plain
+Version1=1.2.3
+GlobalIdName1=
+OperationType1=1
+ComponentName2=UpdatedGeneralComponent
+SoftwareType2=plain
+Version2=
+GlobalIdName2=updatedglobalid
+OperationType2=2
+
+[dummy_log_entries]
+LogsCount=1
+SoftwareType=dummy
+ComponentName0=ComponentOne
+SoftwareType0=dummy
+Version0=
+GlobalIdName0=
+OperationType0=0
+
+[component_with_currentlocale_name]
+SoftwareType=plain
+IsLocalisable=True
+LocalesCount=3
+ComponentName0=Cåmponent_N2
+VendorName0=SäkerhetLag
+ComponentLocale0=6 //Swedish
+ComponentName1=Component_NoLocale
+VendorName1=SecurityTeam
+ComponentLocale1=0
+ComponentName2=Component_CurrentLocale
+VendorName2=SecurityTeam
+ComponentLocale2=1 //English
+
+[component_with_nonlocalized_name]
+SoftwareType=plain
+IsLocalisable=True
+LocalesCount=2
+ComponentName0=Cåmponent_N2
+VendorName0=SäkerhetLag
+ComponentLocale0=6 //Swedish
+ComponentName1=Component_NoLocale
+VendorName1=SecurityTeam
+ComponentLocale1=0
+
+[component_with_localized_name]
+SoftwareType=plain
+IsLocalisable=True
+LocalesCount=2
+ComponentName0=Cåmponent_N2
+VendorName0=SäkerhetLag
+ComponentLocale0=6 //Swedish
+ComponentName1=Component_French
+VendorName1=SecurityTeam
+ComponentLocale1=2
+
+[name_log_entries]
+LogsCount=3
+ComponentName0=Component_CurrentLocale
+SoftwareType0=plain
+Version0=
+GlobalIdName0=
+OperationType0=0
+ComponentName1=Component_NoLocale
+SoftwareType1=plain
+Version1=
+GlobalIdName1=
+OperationType1=0
+ComponentName2=Cåmponent_N2
+SoftwareType2=plain
+Version2=
+GlobalIdName2=
+OperationType2=0
+
+[readonly_log_entries]
+LogsCount=1
+ComponentName0=GeneralComponent
+SoftwareType0=plain
+Version0=1.2.3
+GlobalIdName0=
+OperationType0=0
+
+[writable_log_entries]
+LogsCount=2
+ComponentName0=GeneralComponent
+SoftwareType0=plain
+Version0=1.2.3
+GlobalIdName0=
+OperationType0=0
+ComponentName1=GeneralComponent
+SoftwareType1=plain
+Version1=
+GlobalIdName1=
+OperationType1=0
+
+[hidden_common_component_names]
+SoftwareType=plain
+ComponentName=RomGeneralComponent
+VendorName=Symbian
+GlobalIdName=romglobalid
+OperationType=3
+
+[hidden_log_entries]
+LogsCount=0
+
+[read_only_log_file]
+LogFileReadOnly=True
+
+[writable_log_file]
+LogFileReadOnly=False
+
+[log_file_size]
+LogsCount=1001
+
+// SEC-SCR-API-0067
+
+[less_version_1]
+VersionLeft=1.2.32.4
+VersionRight=1.3
+ExpectedResult=-1
+
+[less_version_2]
+VersionLeft=1.2
+VersionRight=1.2.1
+ExpectedResult=-1
+
+[less_version_3]
+VersionLeft=1.2
+VersionRight=1.2.0.0.1
+ExpectedResult=-1
+
+[great_version_1]
+VersionLeft=1.2.32.4.67890
+VersionRight=1.2.32.4.67889
+ExpectedResult=1
+
+[great_version_2]
+VersionLeft=1.5.9
+VersionRight=1.5
+ExpectedResult=1
+
+[great_version_3]
+VersionLeft=1.5.0.0.0.12.0
+VersionRight=1.5.0
+ExpectedResult=1
+
+[equal_version_1]
+VersionLeft=5678.9000.7654
+VersionRight=5678.9000.7654
+ExpectedResult=0
+
+[equal_version_2]
+VersionLeft=1.2
+VersionRight=1.2.0
+ExpectedResult=0
+
+[equal_version_3]
+VersionLeft=1.5.9.0
+VersionRight=1.5.9
+ExpectedResult=0
+
+[equal_version_4]
+VersionLeft=1.5.
+VersionRight=1.5
+ExpectedResult=0
+
+[wrong_version_1]
+VersionLeft=1.5..2
+VersionRight=1.5
+ExpectedResult=0
+
+[wrong_version_2]
+VersionLeft=.1.5.
+VersionRight=1.5
+ExpectedResult=0
+
+[wrong_version_3]
+VersionLeft=
+VersionRight=1.5
+ExpectedResult=0
+
+[wrong_version_4]
+VersionLeft=1.5
+VersionRight=
+ExpectedResult=0
+
+[wrong_version_5]
+VersionLeft=abc.123
+VersionRight=0.0.1
+ExpectedResult=0
+
+// SEC-SCR-API-0068
+
+[iscomponentonrom_positive]
+ComponentIdOffset=0
+FileCount=4
+FileName0=c:\a.txt
+FileName1=c:\abc\b.txt
+FileName2=Z:\a.txt
+FileName3=z:\def\b.txt
+
+[iscomponentonrom_positive_check]
+ExpectedROMResult=True
+ComponentIdOffset=0
+
+[iscomponentonrom_negative]
+ComponentIdOffset=1
+FileCount=3
+FileName0=Y:\a.txt
+FileName1=c:\def\d.txt
+FileName2=E:\abc\b.txt
+
+[iscomponentonrom_negative_check]
+ExpectedROMResult=False
+ComponentIdOffset=1
+
+// SEC-SCR-API-0069
+
+[check_default_componentpresence]
+CompPresenceValue=True
+ComponentIdOffset=0
+
+[componentpresence_set_false]
+SetCompPresence=True
+CompPresenceValue=False
+ComponentIdOffset=0
+
+[componentpresence_set_true]
+SetCompPresence=True
+CompPresenceValue=True
+ComponentIdOffset=0
+
+[register_component_files]
+ComponentIdOffset=0
+FileCount=6
+FileName0=c:\a.txt
+FileName1=c:\abc\b.txt
+FileName2=z:\a.txt
+FileName3=e:\asd\f.txt
+FileName4=y:\abc.txt
+FileName5=q:\qwe\p.txt
+
+[componentpresence_is_false]
+CompPresenceValue=False
+ComponentIdOffset=0
+
+// SEC-SCR-API-0070
+[add_component_with_same_localizables_test70]
+SoftwareType=plain
+IsLocalisable=True
+LocalesCount=2
+ComponentName0=Component_Test70
+VendorName0=SecurityTeam
+ComponentLocale0=1 
+ComponentName1=Component_Test70
+VendorName1=SecurityTeam
+ComponentLocale1=1 
+
+[get_component_with_same_localizables_names_test70]
+ComponentLocale=-1
+ComponentIdOffset=0
+ComponentName=Component_Test70
+VendorName=SecurityTeam
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+FilterName=Component_Test70
+
+[set_same_localized_property_test70]
+ComponentIdOffset=0
+PropertiesCount=3
+PropertyName0=MultiLocalizedProperty
+PropertyType0=3
+PropertyValue0=samestring
+PropertyLocale0=1
+PropertyName1=MultiLocalizedProperty
+PropertyType1=3
+PropertyValue1=samestring
+PropertyLocale1=0
+PropertyName2=MultiLocalizedProperty
+PropertyType2=3
+PropertyValue2=samestring
+PropertyLocale2=10
+
+[get_component_with_same_localizables_properties_test70]
+ComponentLocale=-1
+ComponentIdOffset=0
+ComponentName=Component_Test70
+VendorName=SecurityTeam
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+FilterPropertiesCount=1
+FilterPropertyName0=MultiLocalizedProperty
+FilterStringProperty0=samestring
+FilterPropertyLocale0=-1 //KLangUnspecified
+
+// SEC-SCR-API-0071
+[component_empty_vendor_name]
+SoftwareType=plain
+ComponentName=GeneralComponent
+VendorName= 
+
+[get_component_with_empty_vendor_name_test71]
+ComponentIdOffset=0
+ComponentName=GeneralComponent
+VendorName=
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+FilterVendor=
+
+// SEC-SCR-API-0072
+[update_component_set_huge_name_vendor]
+ComponentIdOffset=0
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=0
+ComponentName=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+VendorName=newVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVennew
+PropertyLocale=0
+
+[get_component_huge_name_vendor]
+ComponentIdOffset=0
+ComponentName=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+VendorName=newVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVennew
+SoftwareType=plain
+GlobalIdName=
+ScomoState=0
+InstalledDrives=
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=0
+
+[component_huge_property]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=StringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringProper
+PropertyType0=1
+PropertyValue0=astringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastr
+
+[register_file_huge_test]
+ComponentIdOffset=0
+FileCount= 1
+FileName0=z:\file.txtfile
+
+[component_huge_file_property]
+ComponentIdOffset=0
+FileName=z:\file.txtfile
+PropertiesCount=1
+PropertyName0=TestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFile
+PropertyType0=1
+PropertyValue0=TestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFilePropertyValTestFil
+
+[get_component_by_huge_name_vendor]
+ComponentIdOffset=0
+ComponentName=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+VendorName=newVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVennew
+SoftwareType=plain
+GlobalIdName=
+ScomoState=0
+InstalledDrives=
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=0
+FilterName=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+FilterVendor=newVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVennew
+
+[get_component_by_huge_property]
+ComponentIdOffset=0
+ComponentName=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+VendorName=newVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVendorNamenewVennew
+SoftwareType=plain
+GlobalIdName=
+ScomoState=0
+InstalledDrives=
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=0
+FilterPropertiesCount=1
+FilterPropertyName0=StringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringProper
+FilterStringProperty0=astringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastringastr
+
+// SEC-SCR-API-0073
+[very_huge_component_name]
+SoftwareType=plain
+ComponentName=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanastanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+VendorName= 
+
+[very_huge_component_vendor_name]
+SoftwareType=plain
+ComponentName=stana
+VendorName=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanastanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+
+[update_component_set_very_huge_name]
+ComponentIdOffset=0
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=0
+ComponentName=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanastanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+VendorName=new
+PropertyLocale=0
+
+[update_component_set_very_huge_vendor]
+ComponentIdOffset=0
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=0
+ComponentName=new
+VendorName=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanastanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+PropertyLocale=0
+
+[set_component_very_huge_property_name]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=StringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringProperStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringProper
+PropertyType0=1
+PropertyValue0=astri
+
+[set_component_very_huge_property_value]
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=astri
+PropertyType0=1
+PropertyValue0=StringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringProperStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringProper
+
+[component_very_huge_file_property_name]
+ComponentIdOffset=0
+FileName=z:\file.txtfile
+PropertiesCount=1
+PropertyName0=TestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFileTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFile
+PropertyType0=1
+PropertyValue0=TestFilePropertyValTestF
+
+[component_very_huge_file_property_value]
+ComponentIdOffset=0
+FileName=z:\file.txtfile
+PropertiesCount=1
+PropertyName0=TestFilePropertyStrTestFil
+PropertyType0=1
+PropertyValue0=TestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFileTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFilePropertyStrTestFile
+
+[get_component_by_very_huge_name]
+ComponentIdOffset=0
+ComponentName=staname
+VendorName=newVendo
+SoftwareType=plain
+GlobalIdName=
+ScomoState=0
+InstalledDrives=
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=0
+FilterName=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanastanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+
+[get_component_by_very_huge_vendor]
+ComponentIdOffset=0
+ComponentName=stanam
+VendorName=newVendorNam
+SoftwareType=plain
+GlobalIdName=
+ScomoState=0
+InstalledDrives=
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=0
+FilterVendor=stanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanastanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustanamejustana
+
+[get_component_by_very_huge_property_name]
+ComponentIdOffset=0
+ComponentName=stan
+VendorName=newVe
+SoftwareType=plain
+GlobalIdName=
+ScomoState=0
+InstalledDrives=
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=0
+FilterPropertiesCount=1
+FilterPropertyName0=StringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringProperStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringProper
+FilterStringProperty0=a
+FilterPropertyLocale0=1 
+
+[get_component_by_very_huge_property_value]
+ComponentIdOffset=0
+ComponentName=stanamejustaname
+VendorName=newV
+SoftwareType=plain
+GlobalIdName=
+ScomoState=0
+InstalledDrives=
+Version=0.1
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=0
+FilterPropertiesCount=1
+FilterPropertyName0=a
+FilterStringProperty0=StringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringProperStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringPropertyStringProper
+FilterPropertyLocale0=1 
+
+// SEC-SCR-API-0075
+[close_session_with_open_subsession]
+CloseSessionWithoutClosingSubsession=True
+
+// SEC-SCR-API-0076
+
+[test76_component_without_drives]
+SoftwareType=plain
+ComponentName=test76-Component1
+VendorName=Symbian
+
+[test76_component_with_drives]
+SoftwareType=plain
+ComponentName=test76-Component2
+VendorName=Symbian
+
+[register_files_consider_drives_false_test76]
+ComponentIdOffset=1
+FileCount=2
+FileName0=c:\file1
+ConsiderDrives0=False
+FileName1=z:\file2
+ConsiderDrives1=False
+
+[register_files_consider_drives_true_test76]
+ComponentIdOffset=0
+FileCount=2
+FileName0=c:\file3
+FileName1=z:\file4
+
+[components_on_driveC_test76]
+FilterDrivesList=C
+ComponentsCount=1
+ComponentIdOffset0=0
+ComponentName0=test76-Component2
+VendorName0=Symbian
+SoftwareType0=plain
+GlobalIdName0=
+Removable0=True
+ComponentSize0=0
+ScomoState0=0
+InstalledDrives0=C,Z
+Version0=
+
+[component_files_test76]
+ComponentIdOffset=1
+FileCount=2
+FileName0=c:\file1
+FileName1=z:\file2
+
+[get_no_drives_component_test76]
+ComponentIdOffset=1
+ComponentName=test76-Component1
+VendorName=Symbian
+SoftwareType=plain
+GlobalIdName=
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
+// API-SEC-SCR-API-0077
+
+[component_localized_info]
+SoftwareType=plain
+IsLocalisable=True
+LocalesCount=4
+ComponentName0=Component_N2
+VendorName0=SecurityTeam
+ComponentLocale0=1 //English
+ComponentName1=Cåmponent_N2
+VendorName1=SäkerhetLag
+ComponentLocale1=6 //Swedish
+ComponentName2=Bilesen_N2
+VendorName2=GüvenlikTakimi
+ComponentLocale2=14 //Turkish
+ComponentName3=NonLocalizedName
+VendorName3=NonLocalizedVendor
+ComponentLocale3=0 //Default or Unique
+
+[verify_component_localized_info]
+ComponentIdOffset=0
+LocalesCount=4
+ComponentName0=Component_N2
+VendorName0=SecurityTeam
+ComponentLocale0=1 //English
+ComponentName1=Cåmponent_N2
+VendorName1=SäkerhetLag
+ComponentLocale1=6 //Swedish
+ComponentName2=Bilesen_N2
+VendorName2=GüvenlikTakimi
+ComponentLocale2=14 //Turkish
+ComponentName3=NonLocalizedName
+VendorName3=NonLocalizedVendor
+ComponentLocale3=0 //Default or Unique
+
+
+[scr_backup_db]
+SourceFilePath=c:\sys\install\scr\scr.db
+TargetFilePath=c:\sys\install\scr\backup.db
+
+[scr_restore_db]
+SourceFilePath=c:\sys\install\scr\backup.db
+TargetFilePath=c:\sys\install\scr\scr.db
+
+[backup_file]
+DbFilePath=c:\sys\install\scr\backup.db
+JournalFilePath=c:\sys\install\scr\scr.db-journal
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/scripts/tscr.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,22 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+
+
+PRINT Run all of the SCR tests.
+
+RUN_SCRIPT z:\tusif\tscrdatalayer\tscr_datalayer.script
+RUN_SCRIPT z:\tusif\tscr\tscr_api.script
+RUN_SCRIPT z:\tusif\tscr\tscr_versioning.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/scripts/tscr_api.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1472 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+// This script implements Software Component Registry API tests.
+// All APIs provided by SCR are covered by the test cases below.
+// For more information about the test cases, please see TMS:\Security,Privacy and Control Protection\USIF\SCR\tscr_api
+// 
+//
+
+PRINT Run Software Component Registry (SCR) API Tests
+
+// Load Suite
+LOAD_SUITE tscr -SharedData // SharedData is used for sharing the componentid between test steps
+SHARED_DATA z:\tusif\tscr\tscr.ini shared_data
+
+// Delete the SCR Database file
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0001
+//! @SYMTestCaseDesc 		Add a single software component with component name and vendor
+
+START_TESTCASE API-SEC-SCR-API-0001
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini common_component_attributes
+
+END_TESTCASE API-SEC-SCR-API-0001
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0002
+//! @SYMTestCaseDesc 		Adding a single software component with localizables names
+
+START_TESTCASE API-SEC-SCR-API-0002
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_localizables
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_component_localizables1 
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_component_localizables2
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_component_localizables3
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_nonlocalized_names
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_unspecified_names
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_particular_names
+
+END_TESTCASE API-SEC-SCR-API-0002
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0003
+//! @SYMTestCaseDesc 		Adding a software component with an empty component localizable object
+
+START_TESTCASE API-SEC-SCR-API-0003
+
+RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_empty_localizables
+RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_empty_name
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP !Result=-6 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_set_empty_name
+RUN_TEST_STEP 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_component
+
+END_TESTCASE API-SEC-SCR-API-0003
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0004
+//! @SYMTestCaseDesc 		Set attributes of a software component
+
+START_TESTCASE API-SEC-SCR-API-0004
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_multiple_names
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_attributes
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_updated_component_attributes
+
+END_TESTCASE API-SEC-SCR-API-0004
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0005
+//! @SYMTestCaseDesc 		Add general and localizable properties of a software component.
+
+START_TESTCASE API-SEC-SCR-API-0005
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini common_component_properties
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini common_component_properties
+
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_single_localized_property
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_single_localized_property
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_single_non_localized_property
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_single_int_property
+
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_multiple_localized_property
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_nonlocalized_version_property
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_unspecified_version_property
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_specific_version_property
+
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini all_unspecified_locale_properties
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini all_non_localized_properties
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini all_particular_properties
+
+END_TESTCASE API-SEC-SCR-API-0005
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0006
+//! @SYMTestCaseDesc 		Update general and localizable properties of a software component.
+
+START_TESTCASE API-SEC-SCR-API-0006
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini common_component_properties
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini common_component_properties
+
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini new_component_properties
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini new_component_properties
+
+END_TESTCASE API-SEC-SCR-API-0006
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0007
+//! @SYMTestCaseDesc 		Register files to existing components.
+
+START_TESTCASE API-SEC-SCR-API-0007
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini first_component_files
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini second_component_files
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini third_component_files
+
+RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini first_component_files
+RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini second_component_files
+RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini third_component_files
+
+END_TESTCASE API-SEC-SCR-API-0007
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0008
+//! @SYMTestCaseDesc 		Add general properties of a registered file
+
+START_TESTCASE API-SEC-SCR-API-0008
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini component_files
+
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_file1_properties
+RUN_TEST_STEP 100 tscr SCRGetFileProperties z:\tusif\tscr\tscr.ini component_file1_properties
+
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_file2_properties
+RUN_TEST_STEP 100 tscr SCRGetFileProperties z:\tusif\tscr\tscr.ini component_file2_properties
+
+RUN_TEST_STEP 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini component_file_property
+
+END_TESTCASE API-SEC-SCR-API-0008
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0009
+//! @SYMTestCaseDesc 		Delete component properties
+
+START_TESTCASE API-SEC-SCR-API-0009
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini common_component_properties
+
+RUN_TEST_STEP 100 tscr SCRDeleteComponentProperty z:\tusif\tscr\tscr.ini delete_component_properties
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties    z:\tusif\tscr\tscr.ini component_properties_left
+
+END_TESTCASE API-SEC-SCR-API-0009
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0010
+//! @SYMTestCaseDesc 		Delete file properties
+
+START_TESTCASE API-SEC-SCR-API-0010
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini common_files
+
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file1_properties
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file2_properties
+
+RUN_TEST_STEP 100 tscr SCRDeleteFileProperty z:\tusif\tscr\tscr.ini delete_common_file1_property1
+RUN_TEST_STEP 100 tscr SCRGetFileProperties  z:\tusif\tscr\tscr.ini common_file1_properties_left
+RUN_TEST_STEP 100 tscr SCRDeleteFileProperty z:\tusif\tscr\tscr.ini delete_common_file2_property1
+RUN_TEST_STEP 100 tscr SCRGetFileProperties  z:\tusif\tscr\tscr.ini common_file2_properties_left
+
+END_TESTCASE API-SEC-SCR-API-0010
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0011
+//! @SYMTestCaseDesc 		Unregister a component file
+
+START_TESTCASE API-SEC-SCR-API-0011
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini component_files_to_be_unregistered
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_file_properties_to_be_unregistered
+
+RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini unregister_component_file
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini unregistered_file_property
+RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini registered_files
+
+END_TESTCASE API-SEC-SCR-API-0011
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0012
+//! @SYMTestCaseDesc 		Delete a component
+
+START_TESTCASE API-SEC-SCR-API-0012
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_to_be_deleted
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini common_component_properties
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini common_files
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file1_properties
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file2_properties
+
+RUN_TEST_STEP 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_component
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini deleted_component_properties
+RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini deleted_component_files
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini deleted_component_file1_properties
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini common_component_attributes
+RUN_TEST_STEP !Result=Fail 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_component_deleted
+RUN_TEST_STEP !Result=-1 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_non_existing_component
+
+END_TESTCASE API-SEC-SCR-API-0012
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0013
+//! @SYMTestCaseDesc 		Retrieve software component entry
+
+START_TESTCASE API-SEC-SCR-API-0013
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini add_component_with_default_language
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini add_component_with_nondefault_language_only
+
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_default_language
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_unspecified_language
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_specified_language
+
+// Try getting the component without specifying locale - we should get the first available language
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_nondefault_language_only_1
+// Try getting the component while specifying matching locale
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_nondefault_language_only_2
+// Try getting the component while specifying a different locale - we should fail
+RUN_TEST_STEP !Result=-10323 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_nondefault_language_only_3
+// Try getting the component while specifying a "non-localized" locale - we should fail
+RUN_TEST_STEP !Result=-10323 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_nondefault_language_only_4
+
+END_TESTCASE API-SEC-SCR-API-0013
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0014
+//! @SYMTestCaseDesc 		Try to retrieve a non-existing software component
+
+START_TESTCASE API-SEC-SCR-API-0014
+
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_non_existing_component
+
+END_TESTCASE API-SEC-SCR-API-0014
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0015
+//! @SYMTestCaseDesc 		Negative tests for retrieving multiple file properties
+
+START_TESTCASE API-SEC-SCR-API-0015
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini common_files
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file1_properties
+
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperties z:\tusif\tscr\tscr.ini getfileproperties_of_nonexisting_component
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperties z:\tusif\tscr\tscr.ini getfileproperties_of_nonexisting_file
+
+END_TESTCASE API-SEC-SCR-API-0015
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0016
+//! @SYMTestCaseDesc 		Negative tests for retrieving single file property
+
+START_TESTCASE API-SEC-SCR-API-0016
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini common_files
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file2_properties
+
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini getfileproperty_of_nonexisting_component
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini getfileproperty_of_nonexisting_file
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini getfileproperty_of_nonexisting_property
+
+END_TESTCASE API-SEC-SCR-API-0016
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0017
+//! @SYMTestCaseDesc 		Get file components
+
+START_TESTCASE API-SEC-SCR-API-0017
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_to_first_component
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_to_second_component
+
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component1_file_property
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component2_file_property
+
+RUN_TEST_STEP 100 tscr SCRGetFileComponents z:\tusif\tscr\tscr.ini get_file_components
+
+END_TESTCASE API-SEC-SCR-API-0017
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0018
+//! @SYMTestCaseDesc 		Get component properties
+
+START_TESTCASE API-SEC-SCR-API-0018
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini component_properties_with_localizables
+
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini component_nonlocalized_properties
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini component_localized_properties
+
+END_TESTCASE API-SEC-SCR-API-0018
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0019
+//! @SYMTestCaseDesc 		Get Plugin UID with Mime Type and Component Id
+
+START_TESTCASE API-SEC-SCR-API-0019
+
+RUN_TEST_STEP 100 tscr SCRGetPlugin z:\tusif\tscr\tscr.ini get_plugin_with_mimetype_1
+RUN_TEST_STEP 100 tscr SCRGetPlugin z:\tusif\tscr\tscr.ini get_plugin_with_mimetype_2
+RUN_TEST_STEP 100 tscr SCRGetPlugin z:\tusif\tscr\tscr.ini get_plugin_with_componentid
+
+END_TESTCASE API-SEC-SCR-API-0019
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0020
+//! @SYMTestCaseDesc 		Get components by software type
+
+START_TESTCASE API-SEC-SCR-API-0020
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_dummy_type
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_plain_type
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_component_with_dummy_type
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_dummy_components
+
+END_TESTCASE API-SEC-SCR-API-0020
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0021
+//! @SYMTestCaseDesc 		Get components by vendor
+
+START_TESTCASE API-SEC-SCR-API-0021
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini first_component_with_same_vendor
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_component_with_same_vendor
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_different_vendor
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_by_vendor
+
+END_TESTCASE API-SEC-SCR-API-0021
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0022
+//! @SYMTestCaseDesc 		Get components by component properties
+
+START_TESTCASE API-SEC-SCR-API-0022
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini first_component_properties
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_properties
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini third_component_properties
+
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_integer_property1
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_integer_property2
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_string_property1
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_string_property2
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_localized_property1
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_localized_property2
+
+END_TESTCASE API-SEC-SCR-API-0022
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0023
+//! @SYMTestCaseDesc 		Get components by files
+
+START_TESTCASE API-SEC-SCR-API-0023
+
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_to_first_component
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_to_second_component
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_to_third_component
+
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file1
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file2
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file3
+
+END_TESTCASE API-SEC-SCR-API-0023
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0024
+//! @SYMTestCaseDesc 		Get components by common component attributes
+
+START_TESTCASE API-SEC-SCR-API-0024
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_first_component_attributes
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_second_component_attributes
+
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_removable_components
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_unremovable_components
+
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_drmprotected_components
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_drmunprotected_components
+
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_hidden_components
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_nonhidden_components
+
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_knownrevoked_components
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_knownunrevoked_components
+
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_originverified_components
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_originnonverified_components
+
+END_TESTCASE API-SEC-SCR-API-0024
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0025
+//! @SYMTestCaseDesc 		Set component SCOMO state
+
+START_TESTCASE API-SEC-SCR-API-0025
+
+RUN_TEST_STEP 100 tscr SCRSetScomoState z:\tusif\tscr\tscr.ini update_component_scomostate
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_non_activated_components
+
+END_TESTCASE API-SEC-SCR-API-0025
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0026
+//! @SYMTestCaseDesc 		Get components by installed drives
+
+START_TESTCASE API-SEC-SCR-API-0026
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_of_first_component
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_of_second_component
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_of_third_component
+
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveC
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveD
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveX
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveZ
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveCE
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveCZ
+
+END_TESTCASE API-SEC-SCR-API-0026
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0027
+//! @SYMTestCaseDesc 		Unregister the file registered to multiple files
+
+START_TESTCASE API-SEC-SCR-API-0027
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini first_registration_of_file
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini second_registration_of_file
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_multiply_registered_file_1
+
+RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini unregister_first_component_file
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_multiply_registered_file_2
+
+RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini unregister_second_component_file
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_multiply_registered_file_3
+
+END_TESTCASE API-SEC-SCR-API-0027
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0028
+//! @SYMTestCaseDesc 		Uncommitted transactions are rollbacked automatically
+
+START_TESTCASE API-SEC-SCR-API-0028
+
+RUN_TEST_STEP 100 tscr SCRApplyTransaction z:\tusif\tscr\tscr.ini transaction_component
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini transaction_component_attributes
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini transaction_component_properties_rollback
+RUN_TEST_STEP !Result=Fail 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini transaction_files
+
+END_TESTCASE API-SEC-SCR-API-0028
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0029
+//! @SYMTestCaseDesc 		Commit a started transaction.
+
+START_TESTCASE API-SEC-SCR-API-0029
+
+RUN_TEST_STEP 100 tscr SCRApplyTransaction z:\tusif\tscr\tscr.ini commit_common_component
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini transaction_component_attributes
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini transaction_component_properties_commit
+RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini transaction_files
+
+END_TESTCASE API-SEC-SCR-API-0029
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0030
+//! @SYMTestCaseDesc 		Cancel a started transaction.
+
+START_TESTCASE API-SEC-SCR-API-0030
+
+RUN_TEST_STEP 100 tscr SCRApplyTransaction z:\tusif\tscr\tscr.ini cancel_common_component
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini transaction_component_attributes
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini transaction_component_properties
+RUN_TEST_STEP !Result=Fail 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini transaction_files
+
+END_TESTCASE API-SEC-SCR-API-0030
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0031
+//! @SYMTestCaseDesc 		Create a reading session while a transaction is in progress
+
+START_TESTCASE API-SEC-SCR-API-0031
+
+// First, try to create a reading sub-session while a transaction owned by another session is in progress
+RUN_TEST_STEP !Result=-10320 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini begin_before_subsession
+// Then, try to create a reading sub-session while a transaction owned by the same session is in progress
+// Also, try creating a transaction while a sub-session is in progress (opposite order)
+RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini open_reading_in_same_session
+
+END_TESTCASE API-SEC-SCR-API-0031
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0032
+//! @SYMTestCaseDesc 		Create a transaction while a reading session is in progress
+
+START_TESTCASE API-SEC-SCR-API-0032
+
+// First, try to begin a transaction while a reading sub-session created in another session is in progress
+RUN_TEST_STEP !Result=-10321 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini begin_after_subsession
+// Try doing a mutating operation while a subsession is in progress
+RUN_TEST_STEP !Result=-10321 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini mutating_operation_with_subsession
+// Then, try to begin a transaction while a reading sub-session created in the same session is in progress
+RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini begin_after_subsession_in_same_session
+
+END_TESTCASE API-SEC-SCR-API-0032
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0033
+//! @SYMTestCaseDesc 		Create a transaction while another transaction is in progress
+
+START_TESTCASE API-SEC-SCR-API-0033
+
+RUN_TEST_STEP !Result=-10320 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini begin_after_another_begin
+
+END_TESTCASE API-SEC-SCR-API-0033
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0034
+//! @SYMTestCaseDesc 		Create a transaction while another transaction is in progress.
+//!				In addition, invoke mutating and non-mutating functions from another transaction.				
+
+START_TESTCASE API-SEC-SCR-API-0034
+
+RUN_TEST_STEP !Result=-10322 100 tscr SCRManageAnotherTransaction z:\tusif\tscr\tscr.ini commit_another_transaction
+RUN_TEST_STEP !Result=-10320 100 tscr SCRManageAnotherTransaction z:\tusif\tscr\tscr.ini another_transaction_mutating
+RUN_TEST_STEP 100 tscr SCRManageAnotherTransaction z:\tusif\tscr\tscr.ini another_transaction_nonmutating
+
+END_TESTCASE API-SEC-SCR-API-0034
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0035
+//! @SYMTestCaseDesc 		Cancel a transaction while another transaction is in progress
+
+START_TESTCASE API-SEC-SCR-API-0035
+
+RUN_TEST_STEP !Result=-10322 100 tscr SCRManageAnotherTransaction z:\tusif\tscr\tscr.ini cancel_another_transaction
+
+END_TESTCASE API-SEC-SCR-API-0035
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0036
+//! @SYMTestCaseDesc 		Open a subsession while another subsession is already opened by another session
+
+START_TESTCASE API-SEC-SCR-API-0036
+
+RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini multiple_subsessions
+RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini multiple_active_subsessions
+
+END_TESTCASE API-SEC-SCR-API-0036
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0037
+//! @SYMTestCaseDesc 		Invoke a mutating SCR interface while a transaction created by a different session is in progress.
+
+START_TESTCASE API-SEC-SCR-API-0037
+
+RUN_TEST_STEP !Result=-10320 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini write_after_begin
+
+END_TESTCASE API-SEC-SCR-API-0037
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0038
+//! @SYMTestCaseDesc 		Invoke a non-mutating SCR interface while a transaction created by a different session is in progress.
+
+START_TESTCASE API-SEC-SCR-API-0038
+
+RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini read_after_begin
+
+END_TESTCASE API-SEC-SCR-API-0038
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0039
+//! @SYMTestCaseDesc 		Retrieve all components from SCR
+
+START_TESTCASE API-SEC-SCR-API-0039
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_dummy_type
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini all_components
+
+END_TESTCASE API-SEC-SCR-API-0039
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0040
+//! @SYMTestCaseDesc 		Concurrent tests
+
+START_TESTCASE API-SEC-SCR-API-0040
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+CONCURRENT
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini concurrent_component_1
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini concurrent_component_2
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini concurrent_component_properties
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini concurrent_component1_attributes
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini concurrent_component2_attributes
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini concurrent_component_properties
+CONSECUTIVE
+
+END_TESTCASE API-SEC-SCR-API-0040
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0041
+//! @SYMTestCaseDesc 		IsMediaPresent - positive tests
+
+START_TESTCASE API-SEC-SCR-API-0041
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini ismediapresent_positive_files_register1
+RUN_TEST_STEP 100 tscr SCRIsMediaPresent z:\tusif\tscr\tscr.ini ismediapresent_positive_files_check1
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini ismediapresent_positive_files_register2
+RUN_TEST_STEP 100 tscr SCRIsMediaPresent z:\tusif\tscr\tscr.ini ismediapresent_positive_files_check2
+
+END_TESTCASE API-SEC-SCR-API-0041
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0042
+//! @SYMTestCaseDesc 		IsMediaPresent - negative tests
+
+START_TESTCASE API-SEC-SCR-API-0042
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini ismediapresent_negative_files_register1
+RUN_TEST_STEP 100 tscr SCRIsMediaPresent z:\tusif\tscr\tscr.ini ismediapresent_negative_files_check1
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini ismediapresent_negative_files_register2
+RUN_TEST_STEP 100 tscr SCRIsMediaPresent z:\tusif\tscr\tscr.ini ismediapresent_negative_files_check2
+RUN_TEST_STEP !Result=-1 100 tscr SCRIsMediaPresent z:\tusif\tscr\tscr.ini ismediapresent_negative_non_existent_component
+
+END_TESTCASE API-SEC-SCR-API-0042
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0043
+//! @SYMTestCaseDesc 		SCR property and file names are case-insensitive	
+
+START_TESTCASE API-SEC-SCR-API-0043
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini lower_case_property
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini lower_case_file_name
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini filter_mixed_case_property_name
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini filter_mixed_case_file_name
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini mixed_lower_case_property
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini mixed_lower_case_property
+RUN_TEST_STEP 100 tscr SCRGetPlugin z:\tusif\tscr\tscr.ini get_plugin_with_mimetype_1
+
+END_TESTCASE API-SEC-SCR-API-0043
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0044
+//! @SYMTestCaseDesc 		Get only component Ids by using a NULL filter.	
+
+START_TESTCASE API-SEC-SCR-API-0044
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRGetComponentIds z:\tusif\tscr\tscr.ini all_components_component_ids_test44
+
+END_TESTCASE API-SEC-SCR-API-0044
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0045
+//! @SYMTestCaseDesc  		Various negative tests
+
+START_TESTCASE API-SEC-SCR-API-0045
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP !Result=-46 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini wrong_software_type_name
+RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini no_locales_in_add_component
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP !Result=-6 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini no_drive_file_name
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_twice
+// Try to register the same file twice - should not return an error
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_twice
+// Try to get nonexisting file property
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini nonexisting_file_property
+// Try to unregister the same file twice - should not return an error
+RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini unregister_file_twice
+RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini unregister_file_twice
+// Try to get nonexisting property
+RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini missing_single_property
+// Try to get plugin for non-existing MIME type
+RUN_TEST_STEP !Result=-10303 100 tscr SCRGetPlugin z:\tusif\tscr\tscr.ini get_plugin_for_nonexisting_mimetype 
+// Try setting a negative component size
+RUN_TEST_STEP !Result=-6 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini set_negative_component_size
+// Add component with invalid operation type
+RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini add_component_invalid_operation_type
+END_TESTCASE API-SEC-SCR-API-0045
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0046
+//! @SYMTestCaseDesc 		Get components using composite filters - part 1
+
+START_TESTCASE API-SEC-SCR-API-0046
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add components
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Register the same file to components 1, 3
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini first_component_file
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini third_component_file
+// Add the same property to components 2, 4
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini fourth_component_property
+// Get all components with same file and property
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file_and_property_empty
+
+END_TESTCASE API-SEC-SCR-API-0046
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0047
+//! @SYMTestCaseDesc 		Get components using composite filters - part 2
+
+START_TESTCASE API-SEC-SCR-API-0047
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add components
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Do not register files
+// Add the same property to components 2, 4
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini fourth_component_property
+// Get all components with same file and property
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file_and_property_empty
+
+END_TESTCASE API-SEC-SCR-API-0047
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0048
+//! @SYMTestCaseDesc 		Get components using composite filters - part 3
+
+START_TESTCASE API-SEC-SCR-API-0048
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add components
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Register file to fourth component
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini fourth_component_file
+// Add the same property to components 2, 4
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini fourth_component_property
+// Get all components with same file and property
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file_and_property_fourth
+
+END_TESTCASE API-SEC-SCR-API-0048
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0049
+//! @SYMTestCaseDesc 		Get components using composite filters - part 4
+
+START_TESTCASE API-SEC-SCR-API-0049
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add components
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini filter_test_names_test49
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini filter_test_names_test49
+// Register file to fourth component
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini fourth_component_file
+// Add the same property to components 2, 4
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini fourth_component_property
+// Get all components with same file and property
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_names_file_and_property_fourth
+
+END_TESTCASE API-SEC-SCR-API-0049
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0050
+//! @SYMTestCaseDesc 		Get components using composite filters - part 5
+
+START_TESTCASE API-SEC-SCR-API-0050
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add components
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini filter_test_names_vendor_test50
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Add the same property to the second component
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
+// Get all components with same vendor name and property
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_vendor_and_property_second
+
+END_TESTCASE API-SEC-SCR-API-0050
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0051
+//! @SYMTestCaseDesc 		Test Int64 component property functionality
+
+START_TESTCASE API-SEC-SCR-API-0051
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Check adding an int64 property
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini single_int64_property
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_single_int64_property
+// Check updating an int64 property
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini update_single_int64_property
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_updated_int64_property
+
+// Check filters on int64 property
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_in64_property_filter
+
+RUN_TEST_STEP 100 tscr SCRDeleteComponentProperty z:\tusif\tscr\tscr.ini single_int64_property
+
+// Check handling multiple properties, where one of them is int64
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini multiple_int64_properties
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini multiple_int64_properties
+
+END_TESTCASE API-SEC-SCR-API-0051
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0052
+//! @SYMTestCaseDesc 		Get components using composite filters - part 6
+
+START_TESTCASE API-SEC-SCR-API-0052
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add components
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component3_test52
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component2_test52
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component1_test52
+// Add string property A and int property B to the first component
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini first_component_property_test52
+// Add int property B and int property C to the second component
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property_test52
+// Add string property A, int property B and int property C to the third component
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini third_component_property_test52
+// Get all components with integer properties B and C
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_int_properties_test52
+// Get all components with string property A and integer property B
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_str_int_property_test52
+
+END_TESTCASE API-SEC-SCR-API-0052
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0053
+//! @SYMTestCaseDesc 		Check GetComponentFilesCountL API
+
+START_TESTCASE API-SEC-SCR-API-0053
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add two components
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Register two files for the first component
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini first_component_files
+// Verify files count for both components
+RUN_TEST_STEP 100 tscr SCRGetComponentFilesCount z:\tusif\tscr\tscr.ini verify_first_component_count_test53
+RUN_TEST_STEP 100 tscr SCRGetComponentFilesCount z:\tusif\tscr\tscr.ini verify_second_component_count_test53
+
+END_TESTCASE API-SEC-SCR-API-0053
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0054
+//! @SYMTestCaseDesc 		Get components using composite filters - part 7
+
+START_TESTCASE API-SEC-SCR-API-0054
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add components
+// Components 1,2,3,4 have the same software type
+// Components 1,3,4,5 have the same vendor
+// Components 1,2,3,5 have the same name 
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component1_test54
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component2_test54
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component3_test54
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component4_test54
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component5_test54
+// Retrieve all components with given name, software type and vendor - components 1 and 3 should match
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_subsession_test54
+// Repeat the same, but for component ids 
+RUN_TEST_STEP 100 tscr SCRGetComponentIds z:\tusif\tscr\tscr.ini get_component_ids_test54
+
+END_TESTCASE API-SEC-SCR-API-0054
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0055
+//! @SYMTestCaseDesc 		Verify adding and retrieving components with large size
+
+START_TESTCASE API-SEC-SCR-API-0055
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini huge_component_test55_update
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini huge_component_test55_verify
+
+END_TESTCASE API-SEC-SCR-API-0055
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0057
+//! @SYMTestCaseDesc 		Check filters for multiple locales in properties
+
+START_TESTCASE API-SEC-SCR-API-0057
+
+// Components 1,2 have value EnglishValue for the test property for ELangEnglish and JustValue for ELangNone
+// Component 3 has value EnglishValue for the test property for ELangNone
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component1_test57
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component2_test57
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component3_test57
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini component1_properties
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini component2_properties
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini component3_properties
+// Retrieve all components with the test property EnglishValue for ELangEnglish
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_english_property_test57
+// Retrieve all components with the test property EnglishValue for any locale
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_any_property_test57
+// Retrieve all components with the test property EnglishValue for ELangSwedish
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_negative_property_test57
+
+END_TESTCASE API-SEC-SCR-API-0057
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0058
+//! @SYMTestCaseDesc 		Add a single software component with global id.
+
+START_TESTCASE API-SEC-SCR-API-0058
+
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_global_id
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini component_attributes_with_global_id
+// Add another component with the same global id
+RUN_TEST_STEP !Result=-11 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_global_id
+
+END_TESTCASE API-SEC-SCR-API-0058
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0059
+//! @SYMTestCaseDesc 		Add a new component dependency.
+
+START_TESTCASE API-SEC-SCR-API-0059
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// First add the supplier component (S1)
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini supplier_component
+RUN_TEST_STEP 100 tscr SCRGetComponentId z:\tusif\tscr\tscr.ini supplier_component_globalid
+// Then add the dependant component (D1)
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini dependant_component
+RUN_TEST_STEP 100 tscr SCRGetComponentWithGlobalId z:\tusif\tscr\tscr.ini dependant_component_globalid
+// Add dependency between the supplier and dependant components (D1 -> S1)
+RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_existing_components
+// Check the dependancy added successfully
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini dependant_components
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini supplier_components
+// Add another component which will be supplier (S2)
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_supplier_component
+// Add a second dependancy where the lastly added component is supplier. (D1 -> S2)
+RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_second_supplier
+// Get the all suppliers of the dependant component (D1)
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini all_supplier_components
+// Add another component which will be a dependant. (D2)
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_dependant_component
+// Add a second dependency where the D2 depends on S2
+RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_second_dependant
+// Get the all dependants of the supplier component (S2)
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini all_dependant_components
+// Try to duplicate an existing dependency
+RUN_TEST_STEP !Result=-11 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_second_dependant
+// Add a dependency to non-existing supplier
+RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_to_nonexisting_component
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini existing_and_nonexisting_suppliers
+// Delete D2
+RUN_TEST_STEP 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_second_dependant
+// Get the suppliers of the deleted dependant (D2). Should be empty.
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini suppliers_of_deleted_dependant
+// Get the all suppliers of the dependant component (D1). Should be deleted.
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini all_supplier_components
+// Delete S1
+RUN_TEST_STEP 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_first_supplier
+// Dependencies where S1 is supplier should remain
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini remained_dependencies
+
+END_TESTCASE API-SEC-SCR-API-0059
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0060
+//! @SYMTestCaseDesc 		Delete the component dependency.
+
+START_TESTCASE API-SEC-SCR-API-0060
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// First, add a dependency between two existing components, and then delete that dependency
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini supplier_component
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini dependant_component
+RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_existing_components
+RUN_TEST_STEP 100 tscr SCRDeleteComponentDependency z:\tusif\tscr\tscr.ini dependency_with_existing_components
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini deleted_dependant
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini deleted_supplier
+// Secondly, add a dependency between two non-existing components and then delete it.
+RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_nonexisting_components
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini dependant_nonexisting_components
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini supplier_nonexisting_components
+
+END_TESTCASE API-SEC-SCR-API-0060
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0061
+//! @SYMTestCaseDesc 		Get components using composite filters - part 8
+
+START_TESTCASE API-SEC-SCR-API-0061
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add components
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Set common component attributes
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_first_component_attributes_test61
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_second_component_attributes_test61
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_third_component_attributes_test61
+// Add a property to the second component
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
+// Get all components with two common properties
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_drm_hidden_common_properties
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_originverified_knownrevoked_properties
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_common_and_customized_attributes
+
+END_TESTCASE API-SEC-SCR-API-0061
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0062
+//! @SYMTestCaseDesc 		Add & query versioned component dependency.
+
+START_TESTCASE API-SEC-SCR-API-0062
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// First add the supplier component (S1)
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini supplier_component
+// Then add the dependant component (D1)
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini dependant_component
+// Add dependency between the supplier and dependant components (D1 -> S1)
+RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini versioned_dependency
+// Check the dependancy added successfully
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini versioned_dependant_components
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini versioned_supplier_components
+// Add another component which will be supplier (S2)
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_supplier_component
+// Add a second dependancy where the lastly added component is supplier. (D1 -> S2)
+RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini versioned_dependency_with_second_supplier
+// Get the all suppliers of the dependant component (D1)
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini versioned_all_supplier_components
+// Add another component which will be a dependant. (D2)
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_dependant_component
+// Add a second dependency where the D2 depends on S2
+RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini versioned_dependency_with_second_dependant
+// Get the all dependants of the supplier component (S2)
+RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini versioned_all_dependant_components
+
+END_TESTCASE API-SEC-SCR-API-0062
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0063
+//! @SYMTestCaseDesc 		Post-manufacture plugin management tests
+
+START_TESTCASE API-SEC-SCR-API-0063
+
+// Add a sofwtare component type with only unique name
+RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_nonlocalized_software_type
+// Add a component to check that the non-localized software type has been added successfully
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_nonlocalized_software_type
+// Check that the component is not orphaned 
+RUN_TEST_STEP 100 tscr SCRIsComponentOrphaned z:\tusif\tscr\tscr.ini non_orphaned_component
+// Add a sofwtare component type with unique and localized names
+RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type
+// Add a component to check that the localized software type has been added successfully
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_localized_software_type
+// Try to add a component without specifying MIME types
+RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_software_type_without_mime_types
+// Delete a software component type
+RUN_TEST_STEP 100 tscr SCRDeleteSoftwareType z:\tusif\tscr\tscr.ini
+// Check that the component is orphaned 
+RUN_TEST_STEP 100 tscr SCRIsComponentOrphaned z:\tusif\tscr\tscr.ini orphaned_component
+// Get the orphaned component
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini orphaned_component_attributes
+// Get the orphaned component via filter
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_orphaned_component_by_vendor
+// Set the common properties of the orphaned component
+RUN_TEST_STEP !Result=-46 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_orphaned_component_attributes
+// Try to register some files to the orphaned component
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini orphaned_component_files
+// Try to add a sutom property to the orphaned component
+RUN_TEST_STEP !Result=-46 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini orphaned_component_properties
+// Re-add the sofwtare component type with only unique name
+RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_nonlocalized_software_type
+// Check that the component is not orphaned 
+RUN_TEST_STEP 100 tscr SCRIsComponentOrphaned z:\tusif\tscr\tscr.ini non_orphaned_component_after_reinstalling_swtype
+// Check if a non-existing component is orphaned
+RUN_TEST_STEP !Result=-1 100 tscr SCRIsComponentOrphaned z:\tusif\tscr\tscr.ini orphaned_non_existing_component
+// Add the same software type again
+RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_nonlocalized_software_type
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_nonlocalized_software_type
+RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type_with_different_plugin_uid
+RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type_with_extra_name
+RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type_with_missing_name
+RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type_with_extra_mime
+RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type_with_missing_mime
+
+END_TESTCASE API-SEC-SCR-API-0063
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0064
+//! @SYMTestCaseDesc 		Verify drive bitmask management
+
+START_TESTCASE API-SEC-SCR-API-0064
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Register 2 files on drive C and one file on drive D
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini drives_management_register_files
+// Verify that both C and D drives are used by the component
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini drives_management_both_drives
+// Unregister one file on drive C
+RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini drives_management_unregister_first_c_file
+// Verify that both C and D drives are used by the component
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini drives_management_both_drives
+// Unregister one file on drive D
+RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini drives_management_unregister_first_d_file
+// Verify that drive C is used by the component
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini drives_management_c_drive
+// Unregister second file on drive C
+RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini drives_management_unregister_second_c_file
+// Verify that no drives are used by the component
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini common_component_attributes
+
+END_TESTCASE API-SEC-SCR-API-0064
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0065
+//! @SYMTestCaseDesc 		Verify language downgrade path functionality
+
+START_TESTCASE API-SEC-SCR-API-0065
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add a single component
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_localizables_test65
+// Set a localizable property for language English
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_base_language_property_test65
+// Get the property for language English
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_base_language_property_test65
+// Get the property for language American
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_child_language_property_test65
+// Get the property for non-specified locale
+RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_unspecified_language_property_test65
+// Get component for unspecified, English and American locale
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_unspecified_names_test65
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_base_language_test65
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_child_language_test65
+
+END_TESTCASE API-SEC-SCR-API-0065
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0066
+//! @SYMTestCaseDesc 		Install log history tests
+
+START_TESTCASE API-SEC-SCR-API-0066
+
+// Delete database and log files
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
+// Add a new component with version (since version is set in the same session, it is reflected to the log record)
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names_with_version
+// Delete the component
+RUN_TEST_STEP 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_component
+// Add the upgrade version of deleted component
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini update_common_component_names
+// Get log entries and compare with the expected ones
+RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini log_entries
+// Add a component and then set its version. Since a new session is started, version is not reflected the log record.
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_attributes
+// Add a component with dummy type
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_dummy_type
+// Get the log entries for dummy software type
+RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini dummy_log_entries
+// Test the recorded component name for various situations
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_currentlocale_name
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_nonlocalized_name
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_localized_name
+RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini name_log_entries
+// Delete log file for the following test steps
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
+// Add a component to create log file
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names_with_version
+// Make the log file read-only
+RUN_TEST_STEP 100 tscr SCRSetLogFileReadOnlyAttr z:\tusif\tscr\tscr.ini read_only_log_file
+// Try to write into the read-only log file by adding a component 
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Verify that the component log couldn't be added, but the component has been added successfully
+RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini readonly_log_entries
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini common_component_attributes
+// Make sure SCR server shuts
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+// Make the file writable
+RUN_TEST_STEP 100 tscr SCRSetLogFileReadOnlyAttr z:\tusif\tscr\tscr.ini writable_log_file
+// Try to add the component again
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Verify that the component log has been added this time
+RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini writable_log_entries
+// Delete the log file
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
+// Add a component with EScrCompHidden type
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini hidden_common_component_names
+// Get log entries. No log is written for a hidden component operation type.
+RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini hidden_log_entries
+// Delete the log file
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
+// Create the scr log file which includes maximum allowed records
+RUN_TEST_STEP 500 tscr SCRCreateLogFile z:\tusif\tscr\tscr.ini log_file_size
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Delete the log file not to affect other tests' performance
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
+
+END_TESTCASE API-SEC-SCR-API-0066
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0067
+//! @SYMTestCaseDesc 		Version comparetor tests
+
+START_TESTCASE API-SEC-SCR-API-0067
+
+RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini less_version_1 
+RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini less_version_2
+RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini less_version_3
+RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini great_version_1
+RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini great_version_2
+RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini great_version_3
+RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini equal_version_1
+RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini equal_version_2
+RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini equal_version_3
+RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini equal_version_4
+RUN_TEST_STEP !Result=-6 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini wrong_version_1
+RUN_TEST_STEP !Result=-6 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini wrong_version_2
+RUN_TEST_STEP !Result=-6 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini wrong_version_3
+RUN_TEST_STEP !Result=-6 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini wrong_version_4
+RUN_TEST_STEP !Result=-6 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini wrong_version_5
+
+END_TESTCASE API-SEC-SCR-API-0067
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0068
+//! @SYMTestCaseDesc 		Test if an isntalled component is on read-only drive
+
+START_TESTCASE API-SEC-SCR-API-0068
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini iscomponentonrom_positive
+RUN_TEST_STEP 100 tscr SCRIsComponentOnReadOnlyDrive z:\tusif\tscr\tscr.ini iscomponentonrom_positive_check
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini iscomponentonrom_negative
+RUN_TEST_STEP 100 tscr SCRIsComponentOnReadOnlyDrive z:\tusif\tscr\tscr.ini iscomponentonrom_negative_check
+
+END_TESTCASE API-SEC-SCR-API-0068
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0069
+//! @SYMTestCaseDesc		Tests for component presence
+
+START_TESTCASE API-SEC-SCR-API-0069
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Check for default componet presence value
+RUN_TEST_STEP 100 tscr ScrComponentPresence z:\tusif\tscr\tscr.ini check_default_componentpresence
+// Set the component presence value to false
+RUN_TEST_STEP 100 tscr ScrComponentPresence z:\tusif\tscr\tscr.ini componentpresence_set_false
+// Reset component presence value to true
+RUN_TEST_STEP 100 tscr ScrComponentPresence z:\tusif\tscr\tscr.ini componentpresence_set_true
+// Register the component files
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_component_files
+// Check for presence after the files registration
+RUN_TEST_STEP 100 tscr ScrComponentPresence z:\tusif\tscr\tscr.ini componentpresence_is_false
+// Set the component presence value to false after files being registered
+RUN_TEST_STEP 100 tscr ScrComponentPresence z:\tusif\tscr\tscr.ini componentpresence_set_false
+
+END_TESTCASE API-SEC-SCR-API-0069
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0070
+//! @SYMTestCaseDesc 		Verify that having the same name on different component's localizables works correctly
+
+START_TESTCASE API-SEC-SCR-API-0070
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add a component with same names on two different locales
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini add_component_with_same_localizables_test70
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_with_same_localizables_names_test70
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_same_localized_property_test70
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_with_same_localizables_properties_test70
+
+END_TESTCASE API-SEC-SCR-API-0070
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0071
+//! @SYMTestCaseDesc 		Verify that filters on empty vendor names work correctly
+
+START_TESTCASE API-SEC-SCR-API-0071
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add a component with a normal vendor name
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+// Add a component with an empty vendor name
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_empty_vendor_name
+// Retrieve all components with empty vendor names
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_with_empty_vendor_name_test71
+
+END_TESTCASE API-SEC-SCR-API-0071
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0072
+//! @SYMTestCaseDesc 		Verify that setting very long attributes works
+
+START_TESTCASE API-SEC-SCR-API-0072
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Add a component with a regular attributes
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_set_huge_name_vendor
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini component_huge_property
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_huge_name_vendor
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_huge_name_vendor
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_huge_property
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_huge_test
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_huge_file_property
+RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini component_huge_property
+RUN_TEST_STEP 100 tscr SCRGetFileProperties z:\tusif\tscr\tscr.ini component_huge_file_property
+
+END_TESTCASE API-SEC-SCR-API-0072
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0073
+//! @SYMTestCaseDesc 		Verify that setting extremely long attributes doesn't work and that a proper error code is returned
+
+START_TESTCASE API-SEC-SCR-API-0073
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini very_huge_component_name
+RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini very_huge_component_vendor_name
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP !Result=-6 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_set_very_huge_name
+RUN_TEST_STEP !Result=-6 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_set_very_huge_vendor
+RUN_TEST_STEP !Result=-6 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_component_very_huge_property_name
+RUN_TEST_STEP !Result=-6 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_component_very_huge_property_value
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_huge_test
+RUN_TEST_STEP !Result=-6 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_very_huge_file_property_name
+RUN_TEST_STEP !Result=-6 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_very_huge_file_property_value
+RUN_TEST_STEP !Result=-6 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_very_huge_name
+RUN_TEST_STEP !Result=-6 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_very_huge_vendor
+RUN_TEST_STEP !Result=-6 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_very_huge_property_name
+RUN_TEST_STEP !Result=-6 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_very_huge_property_value
+
+END_TESTCASE API-SEC-SCR-API-0073
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0074
+//! @SYMTestCaseDesc 		Verify that invalid parameters in filters don't cause failures
+
+START_TESTCASE API-SEC-SCR-API-0074
+
+RUN_TEST_STEP 100 tscr SCRValuesNegative z:\tusif\tscr\tscr.ini
+
+END_TESTCASE API-SEC-SCR-API-0074
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0075
+//! @SYMTestCaseDesc 		Try closing a session whilst a subsession is open
+
+START_TESTCASE API-SEC-SCR-API-0075
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Make sure that sub-sessions will have entries to iterate on by adding a component
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini close_session_with_open_subsession
+
+END_TESTCASE API-SEC-SCR-API-0075
+
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-0076
+//! @SYMTestCaseDesc 		Verify registering files when setting aConsiderForInstalledDrives to false
+
+START_TESTCASE API-SEC-SCR-API-0076
+
+RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
+// Register two components with different names
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini test76_component_without_drives
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini test76_component_with_drives
+// Register same files to both components, while setting the flag to false for the first component
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_files_consider_drives_false_test76
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_files_consider_drives_true_test76
+// Check that filter on components which have files on drive C does not return component 1, but returns component 2
+RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveC_test76
+// Verify that files were registered to the first component
+RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini component_files_test76
+// Verify that the first component does not list any registered drives
+RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_no_drives_component_test76
+END_TESTCASE API-SEC-SCR-API-0076
+
+
+//! @SYMTestCaseID		API-SEC-SCR-API-0077
+//! @SYMTestCaseDesc 		Add a single software component with localized information and retrieve the same
+
+START_TESTCASE API-SEC-SCR-API-0077
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_localized_info
+RUN_TEST_STEP 100 tscr SCRGetComponentLocalizedInfo z:\tusif\tscr\tscr.ini verify_component_localized_info
+END_TESTCASE API-SEC-SCR-API-0077
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/scripts/tscr_oom.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,30 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+// 
+//
+
+PRINT Run all SCR performance tests.
+LOAD_SUITE tscr
+
+// Copy SCR DB
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini scr_medium_db
+
+//! @SYMTestCaseID 		API-SEC-SCR-API-OOM-0001
+//! @SYMTestCaseDesc 	Testing for OOM condition at various locations in SCR Server
+
+START_TESTCASE API-SEC-SCR-API-OOM-0001
+RUN_TEST_STEP -1 tscr SCROutOfMemory
+END_TESTCASE API-SEC-SCR-API-OOM-0001
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/scripts/tscr_performance.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,379 @@
+// Configuration file for SCR Performance Tests
+
+[shared_data]
+shared_data_num = 1
+shared_name_1 = ComponentId 
+
+[filter_removable]
+MaxDuration=750
+FilterIsRemovable=True
+ComponentsCount=0
+NoVerification=True
+
+[component_names]
+MaxDuration=1200
+SoftwareType=plain
+ComponentName=PerformanceTestComponent
+VendorName=Symbian
+GlobalIdName=performancetestglobalid
+
+[component_localizable_names]
+MaxDuration=900
+SoftwareType=plain
+IsLocalisable=True
+LocalesCount=3
+ComponentName0=LocalizableTestComponent
+VendorName0=SecurityTeam
+ComponentLocale0=1 //English
+ComponentName1=TestCåmponent
+VendorName1=SäkerhetLag
+ComponentLocale1=6 //Swedish
+ComponentName2=TestBileseni
+VendorName2=GüvenlikTakimi
+ComponentLocale2=14 //Turkish
+
+[register_file]
+MaxDuration=2000
+ComponentIdOffset=0
+FileCount= 1
+FileName0=c:\performance_test.txt
+
+[update_component_attributes]
+MaxDuration=1100
+ComponentIdOffset=0
+Version=2.1.9
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=9999
+ComponentName=UppdateraCåmponentTre
+VendorName=NyFörsäljareTre
+PropertyLocale=6 //Swedish
+
+[updated_component]
+MaxDuration=60
+ComponentIdOffset=0
+ComponentName=LocalizableTestComponent
+VendorName=SecurityTeam
+SoftwareType=plain
+GlobalIdName=
+Removable=False
+DrmProtected=True
+Hidden=True
+KnownRevoked=True
+OriginVerified=True
+ComponentSize=9999
+ScomoState=0
+InstalledDrives=C
+Version=2.1.9
+
+[file_property]
+MaxDuration=800
+ComponentIdOffset=0
+FileName=c:\performance_test.txt
+PropertiesCount=1
+PropertyName0=TestFilePropertyStr
+PropertyType0=1
+PropertyValue0=abc
+
+[component_property]
+MaxDuration=450
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=StringProperty
+PropertyType0=1
+PropertyValue0=astring
+
+[localizable_component_property]
+MaxDuration=450
+ComponentIdOffset=0
+PropertiesCount=1
+PropertyName0=LocalizedProperty
+PropertyType0=3
+PropertyValue0=alocalizedstring
+PropertyLocale0=1
+
+[unregister_file]
+MaxDuration=1200
+ComponentIdOffset=0
+FileName=c:\performance_test.txt
+
+[delete_file_property]
+MaxDuration=750
+ComponentIdOffset=0
+FileName=c:\performance_test.txt
+PropertyName=TestFilePropertyStr
+
+[delete_component]
+MaxDuration=1150
+ComponentIdOffset=0
+
+[install_component]
+MaxDuration=2050
+
+[full_component_properties]
+MaxDuration=250
+ComponentIdOffset=0
+PropertiesCount=33
+PropertyName0=StringProperty0
+PropertyType0=1
+PropertyValue0=string0
+PropertyName1=IntegerProperty1
+PropertyType1=2
+PropertyValue1=589241380
+PropertyName2=IntegerProperty2
+PropertyType2=2
+PropertyValue2=589241381
+PropertyName3=IntegerProperty3
+PropertyType3=2
+PropertyValue3=589241382
+PropertyName4=IntegerProperty4
+PropertyType4=2
+PropertyValue4=589241383
+PropertyName5=IntegerProperty5
+PropertyType5=2
+PropertyValue5=589241384
+PropertyName6=IntegerProperty6
+PropertyType6=2
+PropertyValue6=589241385
+PropertyName7=IntegerProperty7
+PropertyType7=2
+PropertyValue7=589241386
+PropertyName8=IntegerProperty8
+PropertyType8=2
+PropertyValue8=589241387
+PropertyName9=IntegerProperty9
+PropertyType9=2
+PropertyValue9=589241388
+PropertyName10=IntegerProperty10
+PropertyType10=2
+PropertyValue10=589241389
+PropertyName11=IntegerProperty11
+PropertyType11=2
+PropertyValue11=589241390
+PropertyName12=IntegerProperty12
+PropertyType12=2
+PropertyValue12=589241391
+PropertyName13=IntegerProperty13
+PropertyType13=2
+PropertyValue13=589241392
+PropertyName14=IntegerProperty14
+PropertyType14=2
+PropertyValue14=589241393
+PropertyName15=IntegerProperty15
+PropertyType15=2
+PropertyValue15=589241394
+PropertyName16=IntegerProperty16
+PropertyType16=2
+PropertyValue16=589241395
+PropertyName17=IntegerProperty17
+PropertyType17=2
+PropertyValue17=589241396
+PropertyName18=IntegerProperty18
+PropertyType18=2
+PropertyValue18=589241397
+PropertyName19=IntegerProperty19
+PropertyType19=2
+PropertyValue19=589241398
+PropertyName20=IntegerProperty20
+PropertyType20=2
+PropertyValue20=589241399
+PropertyName21=StringProperty21
+PropertyType21=1
+PropertyValue21=string21
+PropertyName22=StringProperty22
+PropertyType22=1
+PropertyValue22=string22
+PropertyName23=StringProperty23
+PropertyType23=1
+PropertyValue23=string23
+PropertyName24=StringProperty24
+PropertyType24=1
+PropertyValue24=string24
+PropertyName25=IntegerProperty25
+PropertyType25=2
+PropertyValue25=589241400
+PropertyName26=IntegerProperty26
+PropertyType26=2
+PropertyValue26=589241401
+PropertyName27=IntegerProperty27
+PropertyType27=2
+PropertyValue27=589241402
+PropertyName28=IntegerProperty28
+PropertyType28=2
+PropertyValue28=589241403
+PropertyName29=IntegerProperty29
+PropertyType29=2
+PropertyValue29=589241404
+PropertyName30=IntegerProperty30
+PropertyType30=2
+PropertyValue30=589241405
+PropertyName31=IntegerProperty31
+PropertyType31=2
+PropertyValue31=589241406
+PropertyName32=StringProperty32
+PropertyType32=1
+PropertyValue32=string32
+
+[full_files_registration]
+ComponentIdOffset=0
+FileCount= 10
+FileName0=c:\performance_test0.txt
+FileName1=c:\performance_test1.txt
+FileName2=c:\performance_test2.txt
+FileName3=c:\performance_test3.txt
+FileName4=c:\performance_test4.txt
+FileName5=c:\performance_test5.txt
+FileName6=c:\performance_test6.txt
+FileName7=c:\performance_test7.txt
+FileName8=c:\performance_test8.txt
+FileName9=c:\performance_test9.txt
+
+[full_file_properties]
+MaxDuration=140
+ComponentIdOffset=0
+FileName=c:\performance_test5.txt
+PropertiesCount=8
+PropertyName0=FileStringProperty0
+PropertyType0=1
+PropertyValue0=filestring0
+PropertyName1=FileIntegerProperty1
+PropertyType1=2
+PropertyValue1=111111111
+PropertyName2=FileIntegerProperty2
+PropertyType2=2
+PropertyValue2=222222222
+PropertyName3=FileIntegerProperty3
+PropertyType3=2
+PropertyValue3=333333333
+PropertyName4=FileIntegerProperty4
+PropertyType4=2
+PropertyValue4=444444444
+PropertyName5=FileIntegerProperty5
+PropertyType5=2
+PropertyValue5=555555555
+PropertyName6=FileIntegerProperty6
+PropertyType6=2
+PropertyValue6=666666666
+PropertyName7=FileStringProperty7
+PropertyType7=1
+PropertyValue7=filestring7
+
+[specific_file_property]
+MaxDuration=50
+ComponentIdOffset=0
+FileName=c:\performance_test5.txt
+PropertyName=FileIntegerProperty4
+PropertyType=2
+PropertyValue=444444444
+
+[specific_component_property]
+MaxDuration=50
+ComponentIdOffset=0
+PropertyName=IntegerProperty20
+PropertyType=2
+PropertyValue=589241399
+
+[localizable_component_properties]
+ComponentIdOffset=0
+PropertiesCount=3
+PropertyName0=LocalizedProperty
+PropertyType0=3
+PropertyValue0=alocalizedstring
+PropertyLocale0=1
+PropertyName1=LocalizedProperty
+PropertyType1=3
+PropertyValue1=anotherlocale
+PropertyLocale1=7
+PropertyName2=LocalizedProperty
+PropertyType2=3
+PropertyValue2=somelocale
+PropertyLocale2=9
+
+[specific_localized_component_property]
+MaxDuration=50
+ComponentIdOffset=0
+PropertyName=LocalizedProperty
+PropertyType=3
+PropertyValue=alocalizedstring
+PropertyLocale=1
+
+[all_components]
+MaxDuration=1150
+FilterSoftwareType=plain
+ComponentsCount=0
+NoVerification=True
+
+[filter_name_vendor]
+MaxDuration=100
+FilterName=LocalizableTestComponent
+FilterVendor=SecurityTeam
+ComponentsCount=0
+NoVerification=True
+
+[filter_name_vendor_property]
+MaxDuration=250
+FilterName=LocalizableTestComponent
+FilterVendor=SecurityTeam
+FilterPropertiesCount=1
+FilterPropertyName0=IntegerProperty28
+FilterIntProperty0=589241403
+ComponentsCount=0
+NoVerification=True
+
+[filter_property]
+MaxDuration=100
+FilterPropertiesCount=1
+FilterPropertyName0=IntegerProperty17
+FilterIntProperty0=589241396
+ComponentsCount=0
+NoVerification=True
+
+[filter_file]
+MaxDuration=100
+FilterFile=c:\performance_test8.txt
+ComponentsCount=0
+NoVerification=True
+
+[filter_drive]
+MaxDuration=950
+FilterDrivesList=L
+ComponentsCount=0
+NoVerification=True
+
+[dependency]
+MaxDuration=950
+SupplierGlobalIdName=nonexistingsupplier
+SupplierSwTypeName=plain
+DependantGlobalIdName=nonexistingdependant
+DependantSwTypeName=plain
+
+[supplier_components]
+MaxDuration=50
+GlobalIdType=Dependant
+GlobalIdName=TestDependantGlobalId
+SoftwareType=plain
+NoVerification=True
+
+[dependant_components]
+MaxDuration=50
+GlobalIdType=Supplier
+GlobalIdName=TestSupplierGlobalId
+SoftwareType=plain
+NoVerification=True
+
+[component_globalid]
+MaxDuration=100
+ComponentIdOffset=3
+ComponentName=PerformanceTestComponent
+VendorName=Symbian
+SoftwareType=plain
+GlobalIdName=performancetestglobalid
+Removable=True
+ComponentSize=0
+ScomoState=0
+InstalledDrives=
+Version=
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/scripts/tscr_performance.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,48 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+// 
+//
+
+PRINT Run all SCR performance tests.
+LOAD_SUITE tscr
+
+// Copy small SCR DB
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini scr_backup_db
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini scr_small_db
+
+// Run SCR performance tests for a small size db
+RUN_SCRIPT z:\tusif\tscr\tscr_performance_cases.script
+
+
+// Copy medium SCR DB
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini scr_medium_db
+
+// Run SCR performance tests for a small size db
+RUN_SCRIPT z:\tusif\tscr\tscr_performance_cases.script
+
+
+// Copy large SCR DB
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini scr_large_db
+
+// Run SCR performance tests for a small size db
+RUN_SCRIPT z:\tusif\tscr\tscr_performance_cases.script
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini scr_restore_db
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini backup_file 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/scripts/tscr_performance_cases.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,373 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+// This script implements Software Component Registry Performance tests.
+// For more information about the test cases, please see TMS:\Security,Privacy and Control Protection\USIF\SCR\tscr_performance
+// 
+//
+
+PRINT Run Software Component Registry (SCR) Performance Tests
+
+// Load the event logger test suite
+LOAD_SUITE EventLogServer -SharedData
+
+// Load SCR test suite
+LOAD_SUITE tscr -SharedData // SharedData is used for sharing the componentid between test steps
+SHARED_DATA z:\tusif\tscr\tscr_performance.ini shared_data
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0001
+//! @SYMTestCaseDesc 		The time taken to generate a localised list of removable software components.
+//! SYMTestPerformanceTarget   1000ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0001
+
+RUN_TEST_STEP 100 tscr Performance-ScrComponentRegistrySubsession z:\tusif\tscr\tscr_performance.ini filter_removable
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0001
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0002
+//! @SYMTestCaseDesc 		The time taken to add a new component to the Components table.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0002
+
+RUN_TEST_STEP 100 tscr Performance-SCRAddComponent z:\tusif\tscr\tscr_performance.ini component_names
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0002
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0003
+//! @SYMTestCaseDesc 		The time taken to add a new component with localizable names to the Components table.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0003
+
+RUN_TEST_STEP 100 tscr Performance-SCRAddComponent z:\tusif\tscr\tscr_performance.ini component_localizable_names
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0003
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0004
+//! @SYMTestCaseDesc 		The time taken to register a file to an existing component.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0004
+
+RUN_TEST_STEP 100 tscr Performance-SCRRegisterFile z:\tusif\tscr\tscr_performance.ini register_file
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0004
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0005
+//! @SYMTestCaseDesc 		The time taken to set 9 common properties of an existing component.
+//! SYMTestPerformanceTarget   500ms (~50ms for each common property)
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0005
+
+RUN_TEST_STEP 250 tscr Performance-SCRSetCommonProperty z:\tusif\tscr\tscr_performance.ini update_component_attributes
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0005
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0006
+//! @SYMTestCaseDesc 		The time taken to set a custom property of an registered file.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0006
+
+RUN_TEST_STEP 100 tscr Performance-SCRAddFileProperty z:\tusif\tscr\tscr_performance.ini file_property
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0006
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0007
+//! @SYMTestCaseDesc 		The time taken to update a common property of a component.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0007
+
+RUN_TEST_STEP 100 tscr Performance-SCRSetComponentProperty z:\tusif\tscr\tscr_performance.ini component_property
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0007
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0008
+//! @SYMTestCaseDesc 		The time taken to update a localizable property (name or vendor) of a component.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0008
+
+RUN_TEST_STEP 100 tscr Performance-SCRSetComponentProperty z:\tusif\tscr\tscr_performance.ini localizable_component_property
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0008
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0009
+//! @SYMTestCaseDesc 		The time taken to unregister a file from a component.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0009
+
+RUN_TEST_STEP 100 tscr Performance-SCRUnregisterFile z:\tusif\tscr\tscr_performance.ini unregister_file
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0009
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0010
+//! @SYMTestCaseDesc 		The time taken to delete a custom component property.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0010
+
+RUN_TEST_STEP 100 tscr Performance-SCRDeleteComponentProperty z:\tusif\tscr\tscr_performance.ini component_property
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0010
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0011
+//! @SYMTestCaseDesc 		The time taken to delete a custom file property.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0011
+
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr_performance.ini register_file
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr_performance.ini file_property
+RUN_TEST_STEP 100 tscr Performance-SCRDeleteFileProperty z:\tusif\tscr\tscr_performance.ini delete_file_property
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0011
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0012
+//! @SYMTestCaseDesc 		The time taken to delete a component together with all its properties and files.
+//! SYMTestPerformanceTarget   500ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0012
+
+// Add a complete component which to delete.
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr_performance.ini component_localizable_names
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr_performance.ini update_component_attributes
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr_performance.ini full_component_properties
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr_performance.ini full_files_registration
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr_performance.ini full_file_properties
+RUN_TEST_STEP 500 tscr Performance-SCRDeleteComponent z:\tusif\tscr\tscr_performance.ini delete_component
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0012
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0013
+//! @SYMTestCaseDesc 		The time taken to install a typical component installed by SWI.
+//! SYMTestPerformanceTarget   1000ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0013
+
+// Measure a complete component installation performance. The component values are hardcoded.
+RUN_TEST_STEP 1000 tscr Performance-SCRInstallComponent z:\tusif\tscr\tscr_performance.ini install_component
+// Add another complete component which is used by the rest of test cases.
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr_performance.ini component_localizable_names
+RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr_performance.ini update_component_attributes
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr_performance.ini full_component_properties
+RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr_performance.ini full_files_registration
+RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr_performance.ini full_file_properties
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0013
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0014
+//! @SYMTestCaseDesc 		The time taken to retrieve a component registry entry by using the component Id.
+//! SYMTestPerformanceTarget   60ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0014
+
+RUN_TEST_STEP 50 tscr Performance-SCRGetComponent z:\tusif\tscr\tscr_performance.ini updated_component
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0014
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0015
+//! @SYMTestCaseDesc 		The time taken to retrieve a specific file property.
+//! SYMTestPerformanceTarget   50ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0015
+
+RUN_TEST_STEP 50 tscr Performance-SCRGetFileProperty  z:\tusif\tscr\tscr_performance.ini specific_file_property
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0015
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0016
+//! @SYMTestCaseDesc 		The time taken to retrieve all properties of a file
+//! SYMTestPerformanceTarget   200ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0016
+
+RUN_TEST_STEP 200 tscr Performance-SCRGetFileProperties z:\tusif\tscr\tscr_performance.ini full_file_properties
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0016
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0017
+//! @SYMTestCaseDesc 		The time taken to retrieve a specific component property.
+//! SYMTestPerformanceTarget   50ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0017
+
+RUN_TEST_STEP 50 tscr Performance-SCRGetComponentProperty z:\tusif\tscr\tscr_performance.ini specific_component_property
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0017
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0018
+//! @SYMTestCaseDesc 		The time taken to retrieve all properties of a typical component installed by SWI.
+//! SYMTestPerformanceTarget   300ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0018
+
+RUN_TEST_STEP 300 tscr Performance-SCRGetComponentProperties z:\tusif\tscr\tscr_performance.ini full_component_properties
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0018
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0019
+//! @SYMTestCaseDesc 		The time taken to retrieve a specific localized component property.
+//! SYMTestPerformanceTarget   50ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0019
+
+RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr_performance.ini localizable_component_properties
+RUN_TEST_STEP 50 tscr Performance-SCRGetComponentProperty z:\tusif\tscr\tscr_performance.ini specific_localized_component_property
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0019
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0020
+//! @SYMTestCaseDesc 		The time taken to filter all components for an installer
+//! SYMTestPerformanceTarget   1200ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0020
+
+RUN_TEST_STEP 1000 tscr Performance-ScrComponentRegistrySubsession z:\tusif\tscr\tscr_performance.ini all_components
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0020
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0021
+//! @SYMTestCaseDesc 		The time taken to filter components by using name and vendor.
+//! SYMTestPerformanceTarget   70ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0021
+
+RUN_TEST_STEP 70 tscr Performance-ScrComponentRegistrySubsession z:\tusif\tscr\tscr_performance.ini filter_name_vendor
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0021
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0022
+//! @SYMTestCaseDesc 		The time taken to filter components by using name,vendor and a property.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0022
+
+RUN_TEST_STEP 100 tscr Performance-ScrComponentRegistrySubsession z:\tusif\tscr\tscr_performance.ini filter_name_vendor_property
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0022
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0023
+//! @SYMTestCaseDesc 		The time taken to filter components by using a single property.
+//! SYMTestPerformanceTarget   70ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0023
+
+RUN_TEST_STEP 70 tscr Performance-ScrComponentRegistrySubsession z:\tusif\tscr\tscr_performance.ini filter_property
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0023
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0024
+//! @SYMTestCaseDesc 		The time taken to filter components by a file name.
+//! SYMTestPerformanceTarget   70ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0024
+
+RUN_TEST_STEP 70 tscr Performance-ScrComponentRegistrySubsession z:\tusif\tscr\tscr_performance.ini filter_file
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0024
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0025
+//! @SYMTestCaseDesc 		The time taken to filter components installed into a specific drive.
+//! SYMTestPerformanceTarget   1100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0025
+
+RUN_TEST_STEP 1000 tscr Performance-ScrComponentRegistrySubsession z:\tusif\tscr\tscr_performance.ini filter_drive
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0025
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0026
+//! @SYMTestCaseDesc 		The time taken to add a new dependency to the SCR.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0026
+
+RUN_TEST_STEP 100 tscr Performance-SCRAddComponentDependency z:\tusif\tscr\tscr_performance.ini dependency
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0026
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0027
+//! @SYMTestCaseDesc 		The time taken to delete an existing dependency from the SCR.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0027
+
+RUN_TEST_STEP 100 tscr Performance-SCRDeleteComponentDependency z:\tusif\tscr\tscr_performance.ini dependency
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0027
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0028
+//! @SYMTestCaseDesc 		The time taken to list all suppliers of a dependant component.
+//! SYMTestPerformanceTarget   50ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0028
+
+RUN_TEST_STEP 100 tscr Performance-SCRGetGlobalIdList z:\tusif\tscr\tscr_performance.ini supplier_components
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0028
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0029
+//! @SYMTestCaseDesc 		The time taken to list all dependants of a supplier component.
+//! SYMTestPerformanceTarget   50ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0029
+
+RUN_TEST_STEP 100 tscr Performance-SCRGetGlobalIdList z:\tusif\tscr\tscr_performance.ini dependant_components
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0029
+
+
+//! @SYMTestCaseID		API-SEC-SCR-PERFORMANCE-0030
+//! @SYMTestCaseDesc 		The time taken to retrieve a component with its global id.
+//! SYMTestPerformanceTarget   100ms
+
+START_TESTCASE API-SEC-SCR-PERFORMANCE-0030
+
+RUN_TEST_STEP 100 tscr Performance-SCRGetComponentWithGlobalId z:\tusif\tscr\tscr_performance.ini component_globalid
+
+END_TESTCASE API-SEC-SCR-PERFORMANCE-0030
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/scripts/tscr_versioning.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,118 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+// This script implements Software Component Registry compatibility and versioning tests.
+// For more information about the test cases, please see TMS:\Security,Privacy and Control Protection\USIF\SCR\tscr_versioning
+// 
+//
+
+PRINT Run Software Component Registry (SCR) Versioning Tests
+
+// Load Suite
+LOAD_SUITE tscr -SharedData // SharedData is used for sharing the componentid between test steps
+SHARED_DATA z:\tusif\tscr\tscr.ini shared_data
+
+//! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0001
+//! @SYMTestCaseDesc 		Negative test - check that version table is required
+
+START_TESTCASE API-SEC-SCR-VERSIONING-0001
+
+// Delete the SCR Database file
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+// Copy a corrupted DB file - does not contain version table
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini corrupted_db_file_no_version_table
+RUN_TEST_STEP !Result=-2 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+END_TESTCASE API-SEC-SCR-VERSIONING-0001
+
+
+//! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0002
+//! @SYMTestCaseDesc 		Negative test - check that entries in version table are required
+
+START_TESTCASE API-SEC-SCR-VERSIONING-0002
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+// Copy a corrupted DB file - does not have entries in the version table
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini corrupted_db_file_no_version_entries
+RUN_TEST_STEP !Result=-2 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+END_TESTCASE API-SEC-SCR-VERSIONING-0002
+
+
+//! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0003
+//! @SYMTestCaseDesc 		Negative test - check that older major versions are not allowed
+
+START_TESTCASE API-SEC-SCR-VERSIONING-0003
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+// Copy a DB file with an older major version
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini db_file_older_major_version
+RUN_TEST_STEP !Result=-2 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+END_TESTCASE API-SEC-SCR-VERSIONING-0003
+
+
+//! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0004
+//! @SYMTestCaseDesc 		Negative test - check that newer major versions are not allowed
+
+START_TESTCASE API-SEC-SCR-VERSIONING-0004
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+// Copy a DB file with an newer major version
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini db_file_newer_major_version
+RUN_TEST_STEP !Result=-2 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+END_TESTCASE API-SEC-SCR-VERSIONING-0004
+
+
+//! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0005
+//! @SYMTestCaseDesc 		Positive test - check that newer minor versions are allowed
+
+START_TESTCASE API-SEC-SCR-VERSIONING-0005
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+// Copy a DB file with an newer minor version
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini db_file_newer_minor_version
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+END_TESTCASE API-SEC-SCR-VERSIONING-0005
+
+
+//! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0006
+//! @SYMTestCaseDesc 		Positive test - check that older minor versions are allowed
+
+START_TESTCASE API-SEC-SCR-VERSIONING-0006
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+// Copy a DB file with an older minor version
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini db_file_older_minor_version
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+END_TESTCASE API-SEC-SCR-VERSIONING-0006
+
+
+//! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0007
+//! @SYMTestCaseDesc 		Positive test - check that different build numbers are allowed
+
+START_TESTCASE API-SEC-SCR-VERSIONING-0007
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+// Copy a DB file with a different build number
+RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini db_file_different_build_number
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
+
+END_TESTCASE API-SEC-SCR-VERSIONING-0007
+
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/appmanagersteps.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,204 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "appmanagersteps.h"
+#include "tscrdefs.h"
+
+using namespace Usif;
+
+// -----------CScrIsMediaPresentStep-----------------
+
+CScrIsMediaPresentStep::CScrIsMediaPresentStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrIsMediaPresentStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrIsMediaPresentStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+	TBool expectedMediaPresent(EFalse);
+	if (!GetBoolFromConfig(ConfigSection(), _L("ExpectedMediaPresent"), expectedMediaPresent))
+		{
+		PrintErrorL(_L("ExpectedMediaPresent property not found"), KErrNotFound);
+		}
+	TBool foundMediaPresent = iScrSession.IsMediaPresentL(componentId);
+	if (foundMediaPresent != expectedMediaPresent)
+		{
+		ERR_PRINTF4(_L("Mismatch for IsMediaPresentL for component id %d. Expected %d and the result was %d."), componentId, expectedMediaPresent, foundMediaPresent);
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CScrIsMediaPresentStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrIsComponentOrphanedStep-----------------
+
+CScrIsComponentOrphanedStep::CScrIsComponentOrphanedStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrIsComponentOrphanedStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrIsComponentOrphanedStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+	TBool expectedComponentOrphaned(EFalse);
+	if (!GetBoolFromConfig(ConfigSection(), _L("ExpectedComponentOrphaned"), expectedComponentOrphaned))
+		{
+		PrintErrorL(_L("ExpectedComponentOrphaned property not found"), KErrNotFound);
+		}
+	TBool foundComponentOrphaned = iScrSession.IsComponentOrphanedL(componentId);
+	if (foundComponentOrphaned != expectedComponentOrphaned)
+		{
+		ERR_PRINTF4(_L("Mismatch for IsComponentOrphanedL for component id %d. Expected %d and the result was %d."), componentId, expectedComponentOrphaned, foundComponentOrphaned);
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CScrIsComponentOrphanedStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrCompareVersionsStep-----------------
+
+CScrCompareVersionsStep::CScrCompareVersionsStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrCompareVersionsStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrCompareVersionsStep::ImplTestStepL()
+	{
+	HBufC *lVer = GetVersionFromConfigL(KVersionLeft());
+	CleanupStack::PushL(lVer);
+	
+	HBufC *rVer = GetVersionFromConfigL(KVersionRight());
+	CleanupStack::PushL(rVer);
+	
+	if(!lVer || !rVer)
+		PrintErrorL(_L("Missing version!"), KErrNotFound);
+	
+	TInt expectedResult;
+	if (!GetIntFromConfig(ConfigSection(), KExpectedResult, expectedResult))
+		PrintErrorL(_L("The expected result param could not be found in configuration."), KErrNotFound);
+	
+	TInt retrievedResult = iScrSession.CompareVersionsL(*lVer, *rVer);
+	
+	if(retrievedResult > 0)
+		retrievedResult = 1;
+	else if(retrievedResult < 0)
+		retrievedResult = -1;
+	
+	if(retrievedResult != expectedResult)
+		PrintErrorL(_L("The retrieved result (%d) is different from the expected one (%d)."), KErrNotFound, retrievedResult, expectedResult);
+	
+	CleanupStack::PopAndDestroy(2, lVer); // lVer, rVer
+	}
+
+void CScrCompareVersionsStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrIsComponentOnReadOnlyDriveStep-----------------
+
+CScrIsComponentOnReadOnlyDriveStep::CScrIsComponentOnReadOnlyDriveStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrIsComponentOnReadOnlyDriveStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrIsComponentOnReadOnlyDriveStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+	TBool expectedROMResult(EFalse);
+	if (!GetBoolFromConfig(ConfigSection(), _L("ExpectedROMResult"), expectedROMResult))
+		{
+		PrintErrorL(_L("ExpectedROMResult property not found"), KErrNotFound);
+		}
+	
+	TBool result = iScrSession.IsComponentOnReadOnlyDriveL(componentId);
+	if (result != expectedROMResult)
+		{
+		ERR_PRINTF4(_L("Mismatch for IsComponentOnReadOnlyDriveL for component id %d. Expected %d and the result was %d."), componentId, expectedROMResult, result);
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CScrIsComponentOnReadOnlyDriveStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrComponentPresenceStep-----------------
+
+CScrComponentPresenceStep::CScrComponentPresenceStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrComponentPresenceStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrComponentPresenceStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+	
+	TBool compPresenceValue(ETrue);
+	if (!GetBoolFromConfig(ConfigSection(), _L("CompPresenceValue"), compPresenceValue))
+		{
+		PrintErrorL(_L("CompPresenceValue property not found"), KErrNotFound);
+		}
+		
+	TBool setCompPresence(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("SetCompPresence"), setCompPresence);
+	if (setCompPresence)
+		{		
+		iScrSession.SetIsComponentPresentL(componentId, compPresenceValue);
+		}
+	
+	TBool result = iScrSession.IsComponentPresentL(componentId);
+	if (result != compPresenceValue)
+		{
+		ERR_PRINTF4(_L("Mismatch for IsComponentPresentL for component id %d. Expected %d and the result was %d."), componentId, compPresenceValue, result);
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CScrComponentPresenceStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/componentmanagementsteps.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,605 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements the test steps for component management APIs in the SCR 
+*
+*/
+
+
+#include "componentmanagementsteps.h"
+#include "tscrdefs.h"
+#include <scs/cleanuputils.h>
+
+using namespace Usif;
+
+
+// -----------CScrAddComponentStep-----------------
+
+CScrAddComponentStep::CScrAddComponentStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrAddComponentStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+Usif::TComponentId CScrAddComponentStep::AddLocalisableComponentL()
+	{
+	RPointerArray<CLocalizableComponentInfo> componentInfo;
+	CleanupResetAndDestroyPushL(componentInfo);
+	GetLocalisedComponentsFromConfigL(componentInfo);
+	
+	TPtrC swTypeName;
+	GetSoftwareTypeNameL(swTypeName);
+	
+	TScrComponentOperationType operationType(EScrCompInstall);
+	TInt opTypeInt(0);
+	if(GetIntFromConfig(ConfigSection(), KOperationType, opTypeInt))
+		{
+		operationType = static_cast<TScrComponentOperationType>(opTypeInt);
+		}
+		
+	TComponentId componentId;
+	TPtrC globalIdName;
+	if(GetGlobalIdNameL(globalIdName))
+		componentId = iScrSession.AddComponentL(componentInfo, swTypeName, &globalIdName,operationType);
+	else
+		componentId = iScrSession.AddComponentL(componentInfo, swTypeName,NULL,operationType);
+	
+	CleanupStack::PopAndDestroy(&componentInfo);
+	return componentId;
+	}
+
+void CScrAddComponentStep::ImplTestStepL()
+	{		
+	TBool isLocalisable(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("IsLocalisable"), isLocalisable);
+	TComponentId componentId(0);
+	
+	if (isLocalisable)
+		componentId = AddLocalisableComponentL();
+	else
+		componentId = AddNonLocalisableComponentL();
+	
+	TPtrC version;
+	if (GetStringFromConfig(ConfigSection(), KVersionName, version))
+		{
+		// Version param is provided. Set the version of the component.
+		iScrSession.SetComponentVersionL(componentId, version);
+		}
+			
+	AppendSharedComponentIdL(componentId);
+	}
+
+
+void CScrAddComponentStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrSetComponentPropertyStep-----------------
+
+CScrSetComponentPropertyStep::CScrSetComponentPropertyStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrSetComponentPropertyStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrSetComponentPropertyStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+
+	RPointerArray<CPropertyEntry> properties;
+	CleanupResetAndDestroyPushL(properties);
+	GetPropertiesFromConfigL(properties, ETrue); // ETrue means that the localizable properties are supported.
+	TInt count = properties.Count();
+	for(TInt i=0; i<count; ++i)
+		{
+		CPropertyEntry::TPropertyType propertyType = properties[i]->PropertyType();
+		switch(propertyType)
+			{
+			case CPropertyEntry::EBinaryProperty:
+				{
+				CBinaryPropertyEntry* binaryProperty = dynamic_cast<CBinaryPropertyEntry*>(properties[i]);
+				iScrSession.SetComponentPropertyL(componentId, binaryProperty->PropertyName(), binaryProperty->BinaryValue());
+				break;
+				}
+			case CPropertyEntry::ELocalizedProperty:
+				{
+				CLocalizablePropertyEntry *locProperty = static_cast<CLocalizablePropertyEntry*>(properties[i]);
+				iScrSession.SetComponentPropertyL(componentId, locProperty->PropertyName(), locProperty->StrValue(), locProperty->LocaleL());
+				break;
+				}
+			case CPropertyEntry::EIntProperty:
+				{
+				CIntPropertyEntry *intProperty = dynamic_cast<CIntPropertyEntry*>(properties[i]);
+				iScrSession.SetComponentPropertyL(componentId, intProperty->PropertyName(), intProperty->Int64Value());
+				}
+			}// switch
+		}// for
+	
+	CleanupStack::PopAndDestroy(&properties);
+	}
+
+void CScrSetComponentPropertyStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrRegisterFileStep-----------------
+
+CScrRegisterFileStep::CScrRegisterFileStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrRegisterFileStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrRegisterFileStep::ImplTestStepL()
+	{
+	RPointerArray<HBufC> fileList;
+	CleanupResetAndDestroyPushL(fileList);
+	GetFileNameListFromConfigL(fileList);
+	
+	TInt componentId = GetComponentIdL();
+	
+	TInt fileCount = fileList.Count();
+	
+	for(TInt i=0; i<fileCount; ++i)
+		{
+		// Fetch the Boolean flag which would tell SCR that the registered file needn't affect the drive list used by the component. The flag is optional with default ETrue
+		_LIT(KConsiderDrivesPrefix, "ConsiderDrives");
+		TBuf<MAX_SCR_PARAM_LENGTH> considerDrivesParamName = KConsiderDrivesPrefix();
+		GenerateIndexedAttributeNameL(considerDrivesParamName, i);
+		TBool considerFileInDriveList(ETrue);
+		(void)GetBoolFromConfig(ConfigSection(), considerDrivesParamName, considerFileInDriveList);
+		
+		iScrSession.RegisterComponentFileL(componentId, *fileList[i], considerFileInDriveList);
+		}
+	CleanupStack::PopAndDestroy(&fileList);
+	}
+
+void CScrRegisterFileStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrAddFilePropertyStep-----------------
+CScrAddFilePropertyStep::CScrAddFilePropertyStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrAddFilePropertyStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrAddFilePropertyStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+	
+	TPtrC fileName;
+	GetFileNameFromConfigL(fileName);	
+	
+	RPointerArray<CPropertyEntry> propertiesAdded;
+	CleanupResetAndDestroyPushL(propertiesAdded);
+	GetPropertiesFromConfigL(propertiesAdded);
+	
+	TInt count = propertiesAdded.Count();
+	for(TInt i=0; i<count; ++i)
+		{
+		CPropertyEntry::TPropertyType propertyType = propertiesAdded[i]->PropertyType();
+		switch(propertyType)
+			{
+			case CPropertyEntry::EBinaryProperty:
+				{
+				CBinaryPropertyEntry *binaryProperty = dynamic_cast<CBinaryPropertyEntry*>(propertiesAdded[i]);
+				iScrSession.SetFilePropertyL(componentId, fileName, binaryProperty->PropertyName(), binaryProperty->BinaryValue());
+				break;
+				}
+			case CPropertyEntry::EIntProperty:
+				{
+				CIntPropertyEntry *intProperty = dynamic_cast<CIntPropertyEntry*>(propertiesAdded[i]);
+				iScrSession.SetFilePropertyL(componentId, fileName, intProperty->PropertyName(), intProperty->IntValue());
+				break;
+				}
+			case CPropertyEntry::ELocalizedProperty:
+				{
+				PrintErrorL(_L("Localizable properties are not supported for files!"), KErrAbort);
+				}								
+			}// switch
+		}// for
+	
+	CleanupStack::PopAndDestroy(&propertiesAdded);
+	}
+
+void CScrAddFilePropertyStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrSetCommonPropertyStep-----------------
+CScrSetCommonPropertyStep::CScrSetCommonPropertyStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrSetCommonPropertyStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrSetCommonPropertyStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+	
+	TPtrC version;
+	if(!GetStringFromConfig(ConfigSection(), KVersionName, version))
+		PrintErrorL(_L("Version was not found!"), KErrNotFound);
+
+	TBool isRemovable;
+	if(!GetBoolFromConfig(ConfigSection(), KRemovableName, isRemovable))
+		PrintErrorL(_L("Removable was not found!"), KErrNotFound);
+
+	TBool isDrmProtected;
+	if(!GetBoolFromConfig(ConfigSection(), KDrmProtectedName, isDrmProtected))
+		PrintErrorL(_L("DrmProtected flag was not found!"), KErrNotFound);
+
+	TBool isHidden;
+	if(!GetBoolFromConfig(ConfigSection(), KHiddenName, isHidden))
+		PrintErrorL(_L("Hidden flag was not found!"), KErrNotFound);
+
+	TBool isKnownRevoked;
+	if(!GetBoolFromConfig(ConfigSection(), KKnownRevokedName, isKnownRevoked))
+		PrintErrorL(_L("KnownRevoked flag was not found!"), KErrNotFound);
+
+	TBool isOriginVerified;
+	if(!GetBoolFromConfig(ConfigSection(), KOriginVerifiedName, isOriginVerified))
+		PrintErrorL(_L("OriginVerified flag was not found!"), KErrNotFound);
+
+	TInt64 componentSize(0);
+	if(!Get64BitIntegerFromConfigL(KComponentSizeName(), componentSize))
+		PrintErrorL(_L("ComponentSize was not found!"), KErrNotFound);
+	
+	TLanguage locale(ELangNone);
+	if(!GetLocaleFromConfigL(locale))
+		PrintErrorL(_L("Locale was not found!"), KErrNotFound);
+	
+	TPtrC componentName;
+	GetComponentNameFromConfigL(componentName);
+
+	TPtrC vendorName;
+	GetVendorNameFromConfigL(vendorName);
+
+	StartTimer();
+    iScrSession.SetComponentVersionL(componentId, version);
+    iScrSession.SetIsComponentRemovableL(componentId, isRemovable);
+    iScrSession.SetIsComponentDrmProtectedL(componentId, isDrmProtected);
+    iScrSession.SetIsComponentHiddenL(componentId, isHidden);
+    iScrSession.SetIsComponentKnownRevokedL(componentId, isKnownRevoked);
+    iScrSession.SetIsComponentOriginVerifiedL(componentId, isOriginVerified);
+    iScrSession.SetComponentSizeL(componentId, componentSize);
+    iScrSession.SetComponentNameL(componentId, componentName, locale);
+    iScrSession.SetVendorNameL(componentId, vendorName, locale);	
+	
+	}
+
+void CScrSetCommonPropertyStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrDeleteComponentPropertyStep-----------------
+CScrDeleteComponentPropertyStep::CScrDeleteComponentPropertyStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrDeleteComponentPropertyStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrDeleteComponentPropertyStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();		
+	RPointerArray<CPropertyEntry> propertiesToBeDeleted;
+	CleanupResetAndDestroyPushL(propertiesToBeDeleted);
+	GetPropertiesFromConfigL(propertiesToBeDeleted);
+	
+	TInt propCount = propertiesToBeDeleted.Count();
+	for(TInt i=0; i<propCount; ++i)
+		{
+		iScrSession.DeleteComponentPropertyL(componentId, propertiesToBeDeleted[i]->PropertyName());
+		}
+	CleanupStack::PopAndDestroy(&propertiesToBeDeleted);
+	}
+
+void CScrDeleteComponentPropertyStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrDeleteFilePropertyStep-----------------
+CScrDeleteFilePropertyStep::CScrDeleteFilePropertyStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrDeleteFilePropertyStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrDeleteFilePropertyStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+
+	TPtrC propertyName;
+	if (!GetStringFromConfig(ConfigSection(), KPropertyNameParam, propertyName))
+		PrintErrorL(_L("Property was not found!"), KErrNotFound);	
+	
+	TPtrC fileName;
+	GetFileNameFromConfigL(fileName);			
+
+	iScrSession.DeleteFilePropertyL(componentId, fileName, propertyName);
+	}
+
+void CScrDeleteFilePropertyStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrUnregisterFileStep-----------------
+CScrUnregisterFileStep::CScrUnregisterFileStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrUnregisterFileStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrUnregisterFileStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+	
+	TPtrC fileName;
+	GetFileNameFromConfigL(fileName);			
+
+	iScrSession.UnregisterComponentFileL(componentId, fileName);
+	}
+
+void CScrUnregisterFileStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrDeleteComponentStep-----------------
+CScrDeleteComponentStep::CScrDeleteComponentStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrDeleteComponentStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrDeleteComponentStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+	iScrSession.DeleteComponentL(componentId);
+	}
+
+void CScrDeleteComponentStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrDeleteAllComponentsStep-----------------
+CScrDeleteAllComponentsStep::CScrDeleteAllComponentsStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrDeleteAllComponentsStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrDeleteAllComponentsStep::ImplTestStepL()
+	{
+	RArray<TInt> componentList;
+	CleanupClosePushL(componentList);
+	ReadAllSharedComponentIdsL(componentList);
+	
+	TInt componentCount = componentList.Count();
+	for(TInt i=0; i<componentCount; ++i)
+		{
+		TRAPD(err,iScrSession.DeleteComponentL(componentList[i]));
+		if(KErrNone == err)
+			{
+			INFO_PRINTF2(_L("Component Id %d has been deleted."), componentList[i]);
+			}
+		else if(KErrNotFound == err)
+			{ // Since some components might have been deleted in the previous test cases, ignore this error.
+			INFO_PRINTF2(_L("Component Id %d has already been deleted."), componentList[i]);
+			}
+		else
+			{
+			ERR_PRINTF3(_L("Component Id %d couldn't be deleted. Error Number:%d"),componentList[i],err);
+			SetTestStepResult(EFail);
+			}
+		};
+	CleanupStack::PopAndDestroy(&componentList);
+	
+	TBuf<MAX_SCR_BUFFER_LENGTH> componentIdBuf = KNullDesC();
+	WriteSharedDataL(KComponentIdName, componentIdBuf, ESetText);
+	}
+
+void CScrDeleteAllComponentsStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrInstallComponentStep-----------------
+
+CScrInstallComponentStep::CScrInstallComponentStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrInstallComponentStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrInstallComponentStep::ImplTestStepL()
+	{
+	// BEGIN transaction
+	iScrSession.CreateTransactionL();
+	
+	// Add component record with localizable names
+	RPointerArray<CLocalizableComponentInfo> localNames;
+	CleanupResetAndDestroyPushL(localNames);
+	CLocalizableComponentInfo *localName1 = CLocalizableComponentInfo::NewLC(_L("name1"), _L("vendor1"),ELangEnglish);
+	localNames.AppendL(localName1);
+	CleanupStack::Pop(localName1);
+	CLocalizableComponentInfo *localName2 = CLocalizableComponentInfo::NewLC(_L("name2"), _L("vendor2"),ELangAmerican);
+	localNames.AppendL(localName2);
+	CleanupStack::Pop(localName2);
+	TComponentId compId = iScrSession.AddComponentL(localNames, _L("plain"));
+	CleanupStack::PopAndDestroy(&localNames);
+	
+	// Set common component attributes
+	iScrSession.SetComponentVersionL(compId, _L("2.1.3"));
+	iScrSession.SetComponentSizeL(compId, 2346);
+	iScrSession.SetIsComponentRemovableL(compId, EFalse);
+	
+	// Set custom component attributes
+	TBuf<10> propName;
+	for(TInt i=0; i<27; ++i)
+		{
+		propName.Copy(_L("intprop"));
+		propName.AppendNum(i);
+		iScrSession.SetComponentPropertyL(compId, propName, i);
+		}
+	for(TInt i=0; i<6; ++i)
+		{
+		propName.Copy(_L("strprop"));
+		propName.AppendNum(i);
+		iScrSession.SetComponentPropertyL(compId, propName, propName);
+		}
+	
+	// Register files
+	TBuf<50> fileName;
+	for(TInt i=0; i<10; ++i)
+		{
+		fileName.Copy(_L("c:\\file"));
+		fileName.AppendNum(i);
+		fileName.Append(_L(".txt"));
+		iScrSession.RegisterComponentFileL(compId, fileName);
+		}
+	
+	// Set file properties
+	for(TInt i=0; i<6; ++i)
+		{
+		propName.Copy(_L("fintprop"));
+		propName.AppendNum(i);
+		iScrSession.SetFilePropertyL(compId, fileName, propName, i);
+		}
+	TBuf8<50> propValue;
+	for(TInt i=0; i<3; ++i)
+		{
+		propName.Copy(_L("fstrprop"));
+		propName.AppendNum(i);
+		propValue.Copy(_L8("propValue"));
+		propValue.AppendNum(i);
+		iScrSession.SetFilePropertyL(compId, fileName, propName, propValue);
+		}
+		
+	// Commit transaction
+	iScrSession.CommitTransactionL();
+	}
+	
+void CScrInstallComponentStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrAddComponentDependencyStep-----------------
+
+CScrAddComponentDependencyStep::CScrAddComponentDependencyStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrAddComponentDependencyStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrAddComponentDependencyStep::ImplTestStepL()
+	{		
+	CGlobalComponentId *supplierGlobalId  = GetGlobalComponentIdLC(KSupplierGlobalIdName(), KSupplierSwTypeName());
+	
+	HBufC *versionFrom = GetVersionFromConfigL(KVersionFrom);
+	if(versionFrom)
+		CleanupStack::PushL(versionFrom);
+	HBufC *versionTo = GetVersionFromConfigL(KVersionTo);
+	if(versionTo)
+		CleanupStack::PushL(versionTo);
+	CVersionedComponentId *supplierVersionedId = CVersionedComponentId::NewL(*supplierGlobalId, versionFrom, versionTo);
+	if(versionTo)
+		CleanupStack::PopAndDestroy(versionTo);
+	if(versionFrom)
+		CleanupStack::PopAndDestroy(versionFrom);
+	CleanupStack::PopAndDestroy(supplierGlobalId);
+	CleanupStack::PushL(supplierVersionedId);
+	
+	CGlobalComponentId *dependantGlobalId = GetGlobalComponentIdLC(KDependantGlobalIdName(), KDependantSwTypeName());
+	iScrSession.AddComponentDependencyL(*supplierVersionedId, *dependantGlobalId);
+	CleanupStack::PopAndDestroy(2, supplierVersionedId); // supplierVersionedId, dependantGlobalId
+	}
+
+
+void CScrAddComponentDependencyStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrDeleteComponentDependencyStep-----------------
+
+CScrDeleteComponentDependencyStep::CScrDeleteComponentDependencyStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrDeleteComponentDependencyStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrDeleteComponentDependencyStep::ImplTestStepL()
+	{		
+	CGlobalComponentId *supplierGlobalId  = GetGlobalComponentIdLC(KSupplierGlobalIdName(), KSupplierSwTypeName());
+	CGlobalComponentId *dependantGlobalId = GetGlobalComponentIdLC(KDependantGlobalIdName(), KDependantSwTypeName());
+	iScrSession.DeleteComponentDependencyL(*supplierGlobalId, *dependantGlobalId);
+	CleanupStack::PopAndDestroy(2, supplierGlobalId); // supplierGlobalId, dependantGlobalId
+	}
+
+
+void CScrDeleteComponentDependencyStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/componentquerysteps.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,658 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements test steps for component query APIs in the SCR
+*
+*/
+
+
+#include "componentquerysteps.h"
+#include <scs/cleanuputils.h>
+#include <usif/scr/screntries.h>
+#include "tscrdefs.h"
+
+using namespace Usif;
+
+// -----------CScrGetComponentStep-----------------
+
+CScrGetComponentStep::CScrGetComponentStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetComponentStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetComponentStep::ImplTestStepL()
+	{
+	CComponentEntry *componentExpected = GetComponentEntryFromConfigLC();	
+	CComponentEntry *componentRetrieved = CComponentEntry::NewL();
+	CleanupStack::PushL(componentRetrieved);
+	
+	TLanguage locale = KUnspecifiedLocale;
+	GetLocaleFromConfigL(KComponentLocaleName, locale);
+	// Start timer just before invocation of SCR API
+	StartTimer();
+	if(!iScrSession.GetComponentL(componentExpected->ComponentId(), *componentRetrieved, locale))
+		{
+		ERR_PRINTF2(_L("Component Id %d doesn't exist!."), componentExpected->ComponentId());
+		User::Leave(KErrNotFound);
+		}
+	
+	TTime time = componentRetrieved->InstallTimeL(); // For the sake of coverage print install time
+	INFO_PRINTF2(_L("Component InstallTime is %ld."), componentRetrieved->InstallTimeL().Int64());
+	
+	if(*componentExpected != *componentRetrieved)
+		{
+		ERR_PRINTF5(_L("Returned component entry values(%S,%S) don't match with the expected ones(%S,%S)."),&componentRetrieved->Name(),&componentRetrieved->Vendor(),&componentExpected->Name(),&componentExpected->Vendor());
+		SetTestStepResult(EFail);
+		}
+	
+	CleanupStack::PopAndDestroy(2, componentExpected); // componentExpected, componentRetrieved
+	}
+
+void CScrGetComponentStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrGetComponentLocalizedStep-----------------
+
+CScrGetComponentLocalizedStep::CScrGetComponentLocalizedStep(CScrTestServer& aParent) : CScrTestStep(aParent)
+    {
+    }
+
+void CScrGetComponentLocalizedStep::ImplTestStepPreambleL()
+    {
+    CScrTestStep::ImplTestStepPreambleL();
+    }
+
+void CScrGetComponentLocalizedStep::ImplTestStepL()
+    {
+    TComponentId expectedComponentId = GetComponentIdL();
+    RPointerArray<Usif::CLocalizableComponentInfo> compLocalizedInfoArrayExpected;
+    CleanupResetAndDestroyPushL(compLocalizedInfoArrayExpected);
+    
+    GetLocalisedComponentsFromConfigL(compLocalizedInfoArrayExpected);
+    
+    RPointerArray<Usif::CLocalizableComponentInfo> compLocalizedInfoArrayRetrieved;
+    // Start timer just before invocation of SCR API
+    StartTimer();
+    CleanupResetAndDestroyPushL(compLocalizedInfoArrayRetrieved);
+    iScrSession.GetComponentLocalizedInfoL(expectedComponentId, compLocalizedInfoArrayRetrieved);
+    if(compLocalizedInfoArrayExpected.Count()!=compLocalizedInfoArrayRetrieved.Count())
+        {
+        ERR_PRINTF1(_L("Returned component entry count doesnt match the expected count")); 
+        SetTestStepResult(EFail);
+        }
+    else
+        {
+        for(TInt i=0;i<compLocalizedInfoArrayExpected.Count();i++)
+            {
+            if((compLocalizedInfoArrayExpected[i]->NameL()!=compLocalizedInfoArrayExpected[i]->NameL())||(compLocalizedInfoArrayExpected[i]->VendorL()!=compLocalizedInfoArrayExpected[i]->VendorL())||(compLocalizedInfoArrayExpected[i]->Locale()!=compLocalizedInfoArrayExpected[i]->Locale()))
+                {
+                ERR_PRINTF7(_L("Returned component entry values(%S,%S,%d) don't match with the expected ones(%S,%S,%d)."),&(compLocalizedInfoArrayRetrieved[i]->NameL()),&(compLocalizedInfoArrayRetrieved[i]->VendorL()),compLocalizedInfoArrayRetrieved[i]->Locale(),&(compLocalizedInfoArrayExpected[i]->NameL()),&(compLocalizedInfoArrayExpected[i]->VendorL()),compLocalizedInfoArrayExpected[i]->Locale());
+                SetTestStepResult(EFail);
+                }
+            }
+        }           
+        
+    CleanupStack::Pop(2,&compLocalizedInfoArrayExpected); //compLocalizedInfoArrayExpected ,compLocalizedInfoArrayRetrieved 
+    compLocalizedInfoArrayRetrieved.ResetAndDestroy();
+    compLocalizedInfoArrayExpected.ResetAndDestroy();
+    }
+    
+void CScrGetComponentLocalizedStep::ImplTestStepPostambleL()
+    {
+    CScrTestStep::ImplTestStepPostambleL();
+    }
+
+
+
+// -----------CScrGetFilePropertiesStep-----------------
+
+CScrGetFilePropertiesStep::CScrGetFilePropertiesStep(CScrTestServer& aParent) : CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetFilePropertiesStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetFilePropertiesStep::ImplTestStepL()
+	{
+	TComponentId componentId = GetComponentIdL();
+	
+	TPtrC fileName;
+	GetFileNameFromConfigL(fileName);	
+	
+	RPointerArray<CPropertyEntry> expectedFileProperties;
+	CleanupResetAndDestroyPushL(expectedFileProperties);	
+	GetPropertiesFromConfigL(expectedFileProperties);	
+
+	RPointerArray<CPropertyEntry> retrievedFileProperties;
+	CleanupResetAndDestroyPushL(retrievedFileProperties);
+	// Start timer just before invocation of SCR API
+	StartTimer();
+	iScrSession.GetFilePropertiesL(componentId, fileName, retrievedFileProperties);
+	
+	if(!ComparePropertiesL(expectedFileProperties, retrievedFileProperties))
+		{
+		ERR_PRINTF1(_L("Retrieved file properties don't match with the expected ones."));
+		SetTestStepResult(EFail);	
+		}
+	CleanupStack::PopAndDestroy(2, &expectedFileProperties); // expectedFileProperties, retrievedFileProperties
+	}
+
+void CScrGetFilePropertiesStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+
+// -----------CScrGetFilePropertyStep-----------------
+
+CScrGetFilePropertyStep::CScrGetFilePropertyStep(CScrTestServer& aParent) : CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetFilePropertyStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetFilePropertyStep::ImplTestStepL()
+	{
+	TComponentId componentId = GetComponentIdL();
+	
+	CPropertyEntry *expectedProperty = GetPropertyFromConfigLC(ETrue);
+	
+	TPtrC fileName;
+	GetFileNameFromConfigL(fileName);	
+	// Start timer just before invocation of SCR API
+	StartTimer();	
+	CPropertyEntry *retrievedProperty = iScrSession.GetFilePropertyL(componentId, fileName, expectedProperty->PropertyName());
+	
+	if(!retrievedProperty)
+		{
+		ERR_PRINTF1(_L("The requested file property couldn't be found!"));
+		User::Leave(KErrNotFound);
+		}
+	CleanupStack::PushL(retrievedProperty);
+		
+	if(*retrievedProperty != *expectedProperty)
+		{
+		ERR_PRINTF3(_L("The retrieved property(%S) doesn't match with the expected one(%S)."), &retrievedProperty->PropertyName(), &expectedProperty->PropertyName());
+		SetTestStepResult(EFail);
+		}
+	CleanupStack::PopAndDestroy(2, expectedProperty); // expectedProperty, retrievedProperty
+	}
+
+void CScrGetFilePropertyStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrGetFileComponentsStep-----------------
+
+CScrGetFileComponentsStep::CScrGetFileComponentsStep(CScrTestServer& aParent) : CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetFileComponentsStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetFileComponentsStep::ImplTestStepL()
+	{
+	TPtrC fileName;
+	GetFileNameFromConfigL(fileName);
+
+	RArray<TComponentId> expectedComponents;
+	CleanupClosePushL(expectedComponents);
+	GetComponentIdsFromConfigL(expectedComponents);
+	
+	RArray<TComponentId> foundComponents;
+	CleanupClosePushL(foundComponents);
+	// Start timer just before invocation of SCR API
+	StartTimer();
+	iScrSession.GetComponentsL(fileName, foundComponents);
+	
+	CompareComponentIdsL(foundComponents, expectedComponents);
+	
+	CleanupStack::PopAndDestroy(2, &expectedComponents); // expectedComponents, foundComponents
+	}
+
+void CScrGetFileComponentsStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrGetComponentPropertyStep-----------------
+
+CScrGetComponentPropertyStep::CScrGetComponentPropertyStep(CScrTestServer& aParent) : CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetComponentPropertyStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetComponentPropertyStep::ImplTestStepL()
+	{
+	TComponentId componentId = GetComponentIdL();
+	
+	CPropertyEntry *expectedProperty = GetPropertyFromConfigLC(ETrue,0,ETrue);
+	CPropertyEntry *retrievedProperty(0);
+	// Start timer just before invocation of SCR API
+	StartTimer();
+	switch(expectedProperty->PropertyType())
+		{
+		case CPropertyEntry::EBinaryProperty:
+		case CPropertyEntry::EIntProperty:
+			{
+			retrievedProperty = iScrSession.GetComponentPropertyL(componentId, expectedProperty->PropertyName());
+			break;
+			}
+		case CPropertyEntry::ELocalizedProperty:
+			{
+			CLocalizablePropertyEntry *locProperty = static_cast<CLocalizablePropertyEntry*>(expectedProperty);
+			retrievedProperty = iScrSession.GetComponentPropertyL(componentId, locProperty->PropertyName(), locProperty->LocaleL());
+			break;
+			}
+		}// switch
+	
+	if(!retrievedProperty)
+		{
+		ERR_PRINTF1(_L("The requested component property couldn't be found!"));
+		User::Leave(KErrNotFound);
+		}
+	CleanupStack::PushL(retrievedProperty);
+	
+	if(*retrievedProperty != *expectedProperty)
+		{
+		ERR_PRINTF3(_L("The retrieved property(%S) doesn't match with the expected one(%S)."), &retrievedProperty->PropertyName(), &expectedProperty->PropertyName());
+		SetTestStepResult(EFail);
+		}
+	CleanupStack::PopAndDestroy(2, expectedProperty); // expectedProperty, retrievedProperty
+	}
+
+void CScrGetComponentPropertyStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+
+// -----------CScrGetComponentPropertiesStep-----------------
+
+CScrGetComponentPropertiesStep::CScrGetComponentPropertiesStep(CScrTestServer& aParent) : CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetComponentPropertiesStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetComponentPropertiesStep::ImplTestStepL()
+	{
+	TComponentId componentId = GetComponentIdL();
+
+	RPointerArray<CPropertyEntry> expectedProperties;
+	CleanupResetAndDestroyPushL(expectedProperties);	
+	GetPropertiesFromConfigL(expectedProperties, ETrue); // ETrue means that localizable properties are supported
+	
+	RPointerArray<CPropertyEntry> foundProperties;
+	CleanupResetAndDestroyPushL(foundProperties);
+	
+	TLanguage locale = static_cast<TLanguage>(0);
+	// Start timer just before invocation of SCR API
+	StartTimer();
+	if(GetLocaleFromConfigL(locale))
+		{
+		iScrSession.GetComponentPropertiesL(componentId, foundProperties, locale);
+		}
+	else
+		{
+		iScrSession.GetComponentPropertiesL(componentId, foundProperties);
+		}
+
+	if (!ComparePropertiesL(foundProperties, expectedProperties))
+		{
+		ERR_PRINTF1(_L("The retrieved properties are different from the expected ones."));
+		SetTestStepResult(EFail);
+		}
+	
+	CleanupStack::PopAndDestroy(2, &expectedProperties); // expectedProperties, foundProperties	
+	}
+
+void CScrGetComponentPropertiesStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrGetComponentIdsStep-----------------
+
+CScrGetComponentIdsStep::CScrGetComponentIdsStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetComponentIdsStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetComponentIdsStep::ImplTestStepL()
+	{
+	CComponentFilter *componentFilter = ReadComponentFilterFromConfigLC();
+	INFO_PRINTF1(_L("Read component filter from configuration"));
+	
+	// Get expected list of component ids from config
+	RArray<TComponentId> expectedComponentIds;
+	CleanupClosePushL(expectedComponentIds);
+	GetComponentIdsFromConfigL(expectedComponentIds);
+			
+	RArray<TComponentId> foundComponentIds;
+	CleanupClosePushL(foundComponentIds);
+	// Start timer just before invocation of SCR API
+	StartTimer();
+	iScrSession.GetComponentIdsL(foundComponentIds, componentFilter);
+		
+	CompareComponentIdsL(foundComponentIds, expectedComponentIds);
+		
+	CleanupStack::PopAndDestroy(3, componentFilter); // foundComponentIds, expectedComponentIds, componentFilter
+	}
+
+void CScrGetComponentIdsStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrGetComponentFilesCountStep-----------------
+
+CScrGetComponentFilesCountStep::CScrGetComponentFilesCountStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetComponentFilesCountStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetComponentFilesCountStep::ImplTestStepL()
+	{
+	TComponentId componentId = GetComponentIdL();
+	TInt expectedFilesCountTmp(0);
+	if (!GetIntFromConfig(ConfigSection(), _L("ExpectedFilesCount"), expectedFilesCountTmp))
+		{
+		PrintErrorL(_L("ExpectedFilesCount property was not found!"), KErrNotFound);
+		}
+	if (expectedFilesCountTmp < 0)
+		{
+		PrintErrorL(_L("ExpectedFilesCount is negative!"), KErrArgument);
+		}
+	TUint expectedFilesCount = static_cast<TUint>(expectedFilesCountTmp);
+	
+	// Start timer just before invocation of SCR API
+	StartTimer();
+	TUint foundFilesCount = iScrSession.GetComponentFilesCountL(componentId);
+	
+	if (foundFilesCount != expectedFilesCount)
+		{
+		ERR_PRINTF4(_L("The retrieved files count is different from the expected one for component %d. Expected %d, but found %d"),
+				componentId, foundFilesCount, expectedFilesCount);
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CScrGetComponentFilesCountStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+
+// -----------CScrGetComponentWithGlobalIdStep-----------------
+
+CScrGetComponentWithGlobalIdStep::CScrGetComponentWithGlobalIdStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetComponentWithGlobalIdStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetComponentWithGlobalIdStep::ImplTestStepL()
+	{
+	CComponentEntry *componentExpected = GetComponentEntryFromConfigLC();	
+	TLanguage locale = KUnspecifiedLocale;
+	GetLocaleFromConfigL(KComponentLocaleName, locale);
+	
+	// Start timer just before invocation of SCR API
+	StartTimer();
+	CComponentEntry *componentRetrieved = iScrSession.GetComponentL(componentExpected->GlobalId(), componentExpected->SoftwareType());
+	if(!componentRetrieved)
+		{
+		INFO_PRINTF3(_L("Global Id (%S,%S) doesn't exist!."), &componentExpected->GlobalId(), &componentExpected->SoftwareType());
+		User::Leave(KErrNotFound);
+		}
+	CleanupStack::PushL(componentRetrieved);
+	
+	if(*componentExpected != *componentRetrieved)
+		{
+		ERR_PRINTF5(_L("Returned component entry values(%S,%S) don't match with the expected ones(%S,%S)."),&componentRetrieved->Name(),&componentRetrieved->Vendor(),&componentExpected->Name(),&componentExpected->Vendor());
+		SetTestStepResult(EFail);
+		}
+	
+	CleanupStack::PopAndDestroy(2, componentExpected); // componentExpected, componentRetrieved
+	}
+
+void CScrGetComponentWithGlobalIdStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrGetComponentIdStep-----------------
+
+CScrGetComponentIdStep::CScrGetComponentIdStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetComponentIdStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetComponentIdStep::ImplTestStepL()
+	{
+	CGlobalComponentId *globalId = GetGlobalComponentIdLC();
+	TComponentId expectedCompId = GetComponentIdL();
+	
+	// Start timer just before invocation of SCR API
+	StartTimer();
+	TComponentId retrievedCompId = iScrSession.GetComponentIdL(globalId->GlobalIdName(), globalId->SoftwareTypeName());
+	CleanupStack::PopAndDestroy(globalId);
+	
+	if(expectedCompId != retrievedCompId)
+		{
+		ERR_PRINTF3(_L("Returned component id (%d) don't match with the expected one(%d)."), retrievedCompId, expectedCompId);
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CScrGetComponentIdStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrGetGlobalIdListStep-----------------
+
+CScrGetGlobalIdListStep::CScrGetGlobalIdListStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetGlobalIdListStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetGlobalIdListStep::ImplTestStepL()
+	{
+	CGlobalComponentId *globalId = GetGlobalComponentIdLC();
+	
+	TBool noVerification = EFalse;
+	GetBoolFromConfig(ConfigSection(), _L("NoVerification"), noVerification);
+	RPointerArray<CVersionedComponentId> expectedVerCompIdList;
+	CleanupResetAndDestroyPushL(expectedVerCompIdList);
+	if(!noVerification)
+		{
+		GetExpectedVersionedComponentIdListL(expectedVerCompIdList);
+		}
+	
+	RPointerArray<CVersionedComponentId> retrievedVerCompIdList;
+	CleanupResetAndDestroyPushL(retrievedVerCompIdList);
+	
+	TPtrC globalIdType;
+	if (!GetStringFromConfig(ConfigSection(), KGlobalIdType, globalIdType))
+		PrintErrorL(_L("Global Id Type was not found!"), KErrNotFound);
+
+	// Start timer just before invocation of SCR API
+    StartTimer();
+	
+	if(!globalIdType.CompareF(_L("Dependant")))
+		iScrSession.GetSupplierComponentsL(*globalId, retrievedVerCompIdList);
+	else if (!globalIdType.CompareF(_L("Supplier")))
+		iScrSession.GetDependantComponentsL(*globalId, retrievedVerCompIdList);
+	else {
+		 ERR_PRINTF1(_L("The global Id type couldn't be identified."));
+		 SetTestStepResult(EFail);
+		 }
+	
+	if (!noVerification && !CompareVersionedComponentIdsL(retrievedVerCompIdList, expectedVerCompIdList))
+		{
+		ERR_PRINTF1(_L("The retrieved global Ids are different from the expected ones."));
+		SetTestStepResult(EFail);
+		}
+
+	CleanupStack::PopAndDestroy(3, globalId); // depGlobalId, expectedGlobalIdList, retrievedGlobalIdList
+	}
+
+void CScrGetGlobalIdListStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+	
+// -----------CScrValuesNegativeStep-----------------
+CScrValuesNegativeStep::CScrValuesNegativeStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrValuesNegativeStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrValuesNegativeStep::ImplTestStepL()
+	{
+	CComponentFilter* componentFilter = CComponentFilter::NewLC();
+	TDriveList driveList;
+	// Set an empty drive list
+	componentFilter->SetInstalledDrivesL(driveList);
+	RSoftwareComponentRegistryView subSession;
+	CleanupClosePushL(subSession);	
+	// Start timer just before invocation of SCR API
+	StartTimer();
+	TRAPD(err, subSession.OpenViewL(iScrSession, componentFilter));	
+	if (err != KErrArgument)
+		{
+		ERR_PRINTF2(_L("Received incorrect error %d on missing param in filter."), err);
+		SetTestStepResult(EFail);
+		}
+	CleanupStack::PopAndDestroy(2, componentFilter); // subSession
+	}
+
+void CScrValuesNegativeStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrOom-----------------
+SCROufOfMemory::SCROufOfMemory(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	iFailRate = 0;
+	}
+
+void SCROufOfMemory::ImplTestStepPreambleL()
+	{
+	}
+
+void SCROufOfMemory::ImplTestStepL()
+	{
+	TInt i = 5000;
+	while(i--)
+		{
+		TRAPD(err, ExecuteL());
+		if (err == KErrNone)
+			{
+			}
+		}
+	}
+
+void SCROufOfMemory::ImplTestStepPostambleL()
+	{
+	}
+
+void SCROufOfMemory::ExecuteL()
+	{
+	// Connect to the SCR server
+	RSoftwareComponentRegistry scr;
+	TInt err = scr.Connect();
+	if (err != KErrNone)
+		{
+		INFO_PRINTF1(_L("Failed to connect to the SCR server"));
+		User::Leave(err);
+		}
+	CleanupClosePushL(scr);
+
+	scr.SetServerHeapFail(++iFailRate);
+	INFO_PRINTF2(_L("HeapFail set for %d allocation"),iFailRate);
+	
+	// Create an SCR view
+	RSoftwareComponentRegistryView scrView;
+	scrView.OpenViewL(scr);
+	CleanupClosePushL(scrView);
+
+	// Iterate over the matching components
+	CComponentEntry* entry = CComponentEntry::NewLC();
+	while (scrView.NextComponentL(*entry))
+	    {
+		RPointerArray<Usif::CLocalizableComponentInfo> compLocalizedInfoArray;
+		CleanupResetAndDestroyPushL(compLocalizedInfoArray);
+		scr.GetComponentLocalizedInfoL(entry->ComponentId(), compLocalizedInfoArray);
+		CleanupStack::Pop(&compLocalizedInfoArray);
+		compLocalizedInfoArray.ResetAndDestroy();
+	    }
+	
+	scrView.Close();
+	// Disconnect from the SCR server and cleanup the entry
+	scr.ResetServerHeapFail();
+	CleanupStack::PopAndDestroy();
+	CleanupStack::Pop();
+	CleanupStack::PopAndDestroy();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/deletescrdbstep.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,97 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "deletescrdbstep.h"
+
+// -----------CScrDeleteDbFileStep-----------------
+
+CScrDeleteDbFileStep::CScrDeleteDbFileStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrDeleteDbFileStep::ImplTestStepPreambleL()
+	{
+	User::LeaveIfError(iScrAccessor.Connect());
+	}
+
+void CScrDeleteDbFileStep::DeleteFileL(const TDesC& aFilePath)
+	{
+	TInt err = iScrAccessor.DeleteFile(aFilePath);
+	TInt tries = 0;
+	
+	while((KErrNone != err && KErrNotFound != err && KErrPathNotFound != err) && tries++ < 60)
+		{
+		User::After(500000);
+		err = iScrAccessor.DeleteFile(aFilePath);
+		}
+	if(KErrNone != err && KErrNotFound != err && KErrPathNotFound != err)
+		{
+		ERR_PRINTF3(_L("%S file couldn't be deleted! Error=%d"), &aFilePath, err);
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CScrDeleteDbFileStep::ImplTestStepL()
+	{
+	TPtrC dbFilePath;
+	if (!GetStringFromConfig(ConfigSection(), _L("DbFilePath"), dbFilePath))
+		PrintErrorL(_L("Database File Path was not found!"), KErrNotFound);
+	
+	TPtrC journalFilePath;
+	if (!GetStringFromConfig(ConfigSection(), _L("JournalFilePath"), journalFilePath))
+		PrintErrorL(_L("Journal File Path was not found!"), KErrNotFound);
+		
+	DeleteFileL(dbFilePath);
+	DeleteFileL(journalFilePath);
+	User::After(500000);
+	}
+
+void CScrDeleteDbFileStep::ImplTestStepPostambleL()
+	{
+	iScrAccessor.Close();
+	}
+
+// -----------CScrCopyDbFileStep-----------------
+
+CScrCopyDbFileStep::CScrCopyDbFileStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrCopyDbFileStep::ImplTestStepPreambleL()
+	{
+	User::LeaveIfError(iScrAccessor.Connect());
+	}
+
+
+void CScrCopyDbFileStep::ImplTestStepL()
+	{
+	TPtrC sourceFilePath;
+	if (!GetStringFromConfig(ConfigSection(), _L("SourceFilePath"), sourceFilePath))
+		PrintErrorL(_L("Source File Path was not found!"), KErrNotFound);
+	
+	TPtrC targetFilePath;
+	if (!GetStringFromConfig(ConfigSection(), _L("TargetFilePath"), targetFilePath))
+		PrintErrorL(_L("Target File Path was not found!"), KErrNotFound);
+		
+	User::LeaveIfError(iScrAccessor.CopyFile(sourceFilePath, targetFilePath));
+	}
+
+void CScrCopyDbFileStep::ImplTestStepPostambleL()
+	{
+	iScrAccessor.Close();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/installloghistorysteps.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,261 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "installloghistorysteps.h"
+#include <scs/cleanuputils.h>
+#include "tscrdefs.h"
+#include <usif/scr/screntries.h>
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "screntries_internal.h"
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+
+using namespace Usif;
+
+_LIT(KScrLogFile, "!:\\private\\10285bc0\\scr.log");
+
+// -----------CScrGetLogEntriesStep-----------------
+
+CScrGetLogEntriesStep::CScrGetLogEntriesStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetLogEntriesStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrGetLogEntriesStep::GetLogEntriesFromConfigL(RPointerArray<CScrLogEntry>& aLogEntries)
+	{
+	TInt logCount = 0;
+	if (!GetIntFromConfig(ConfigSection(), KLogsCountParamName, logCount))
+		PrintErrorL(_L("Logs count was not found!"), KErrNotFound);
+		
+	if (logCount < 0)
+			PrintErrorL(_L("Logs count is negative!"), KErrNotFound);
+	
+	TBuf<MAX_SCR_PARAM_LENGTH> componentNameParam, swTypeNameParam, versionParam, operationTypeParam, globalIdParam;
+	
+	for(TInt index=0; index < logCount; ++index)	
+		{
+		componentNameParam = KComponentName;
+		swTypeNameParam = KSoftwareTypeName;
+		versionParam = KVersionName;
+		operationTypeParam = KOperationType;
+		globalIdParam = KGlobalIdName;
+			
+		GenerateIndexedAttributeNameL(componentNameParam, index);
+		GenerateIndexedAttributeNameL(swTypeNameParam, index);
+		GenerateIndexedAttributeNameL(versionParam, index);
+		GenerateIndexedAttributeNameL(operationTypeParam, index);
+		GenerateIndexedAttributeNameL(globalIdParam, index);
+		
+		TPtrC componentName;
+		if (!GetStringFromConfig(ConfigSection(), componentNameParam, componentName))
+			{
+			ERR_PRINTF2(_L("The component name param %S could not be found in configuration."), &componentNameParam);
+			User::Leave(KErrNotFound);
+			}
+		
+		TPtrC swTypeName;
+		if (!GetStringFromConfig(ConfigSection(), swTypeNameParam, swTypeName))
+			{
+			ERR_PRINTF2(_L("The software type name param %S could not be found in configuration."), &swTypeNameParam);
+			User::Leave(KErrNotFound);
+			}
+		
+		TPtrC version;
+		if (!GetStringFromConfig(ConfigSection(), versionParam, version))
+			{
+			ERR_PRINTF2(_L("The version param %S could not be found in configuration."), &versionParam);
+			User::Leave(KErrNotFound);
+			}
+		
+		TInt operationType;
+		if (!GetIntFromConfig(ConfigSection(), operationTypeParam, operationType))
+			{
+			ERR_PRINTF2(_L("The operation type param %S could not be found in configuration."), &operationTypeParam);
+			User::Leave(KErrNotFound);
+			}
+		
+		TPtrC globalId;
+		if (!GetStringFromConfig(ConfigSection(), globalIdParam, globalId))
+			{
+			ERR_PRINTF2(_L("The global id param %S could not be found in configuration."), &globalIdParam);
+			User::Leave(KErrNotFound);
+			}
+		
+		CScrLogEntry *logEntry = CScrLogEntry::NewLC(componentName, swTypeName, globalId, version, static_cast<TScrComponentOperationType>(operationType));
+		aLogEntries.AppendL(logEntry);
+		CleanupStack::Pop(logEntry); // Ownership is transferred
+		}
+	}
+
+TBool operator ==(CScrLogEntry& aLhsEntry, CScrLogEntry& aRhsEntry)
+	{
+	return (aLhsEntry.ComponentName() == aRhsEntry.ComponentName() && 
+			aLhsEntry.SoftwareTypeName() == aRhsEntry.SoftwareTypeName()&& 
+			aLhsEntry.ComponentVersion() == aRhsEntry.ComponentVersion()&&
+			aLhsEntry.GlobalId() == aRhsEntry.GlobalId()&&
+			aLhsEntry.OperationType() == aRhsEntry.OperationType());
+	}
+
+TBool operator !=(CScrLogEntry& aLhsEntry, CScrLogEntry& aRhsEntry)
+	{
+	return !(aLhsEntry == aRhsEntry);
+	}
+
+TBool CScrGetLogEntriesStep::CompareLogEntriesL(RPointerArray<CScrLogEntry>& aFoundLogEntries, RPointerArray<CScrLogEntry>& aExpectedLogEntries)
+	{
+	TInt foundEntriesCount = aFoundLogEntries.Count();
+	TInt expectedEntriesCount = aExpectedLogEntries.Count();
+		
+	if (foundEntriesCount != expectedEntriesCount)
+		{
+		ERR_PRINTF3(_L("The number of expected log entries %d did not match the number of provided log entries %d."), expectedEntriesCount, foundEntriesCount);
+		return EFalse; 
+		}
+		
+	for (TInt i = 0; i < foundEntriesCount; ++i)
+		{
+		if (*aFoundLogEntries[i] != *aExpectedLogEntries[i])
+			{
+			ERR_PRINTF2(_L("Log entry %d did not match."), i);
+			return EFalse;
+			}
+		}	
+	return ETrue;
+	}
+	
+void CScrGetLogEntriesStep::ImplTestStepL()
+	{
+	TBool isLogFileReadOnly = EFalse; 
+	(void)GetBoolFromConfig(ConfigSection(), _L("LogFileReadOnly"), isLogFileReadOnly); // since this is an optional param, ignore the return code.
+	if(isLogFileReadOnly)
+		{
+		RBuf fn;
+		fn.CreateL(KMaxFileName);
+		fn.CleanupClosePushL();
+		fn.Copy(KScrLogFile);
+		RFs fs;
+		User::Leave(fs.Connect());
+		CleanupClosePushL(fs);
+		fn[0] = fs.GetSystemDriveChar();
+		User::LeaveIfError(fs.SetAtt(fn, KEntryAttReadOnly, 0));
+		CleanupStack::PopAndDestroy(2, &fn); // fn, fs
+		}
+
+	RPointerArray<CScrLogEntry> expectedLogEntries;
+	CleanupResetAndDestroyPushL(expectedLogEntries);
+	GetLogEntriesFromConfigL(expectedLogEntries);
+	
+	TPtrC *ptrSwTypeName = NULL;
+	TPtrC swTypeName;
+	if (GetStringFromConfig(ConfigSection(), KSoftwareTypeName, swTypeName))
+		{
+		ptrSwTypeName = &swTypeName; 
+		}
+	
+	RPointerArray<CScrLogEntry> retrievedLogEntries;
+	CleanupResetAndDestroyPushL(retrievedLogEntries);
+	
+	iScrSession.RetrieveLogEntriesL(retrievedLogEntries, ptrSwTypeName);
+	
+	if (!CompareLogEntriesL(retrievedLogEntries, expectedLogEntries))
+		{
+		ERR_PRINTF1(_L("The retrieved log entries are different from the expected ones."));
+		SetTestStepResult(EFail);
+		}
+		
+	CleanupStack::PopAndDestroy(2, &expectedLogEntries); // expectedLogEntries, retrievedLogEntries	
+	}
+
+void CScrGetLogEntriesStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrSetLogFileReadOnlyAttrStep-----------------
+
+CScrSetLogFileReadOnlyAttrStep::CScrSetLogFileReadOnlyAttrStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrSetLogFileReadOnlyAttrStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+	
+void CScrSetLogFileReadOnlyAttrStep::ImplTestStepL()
+	{
+	RFs fs;
+	User::LeaveIfError(fs.Connect());
+	CleanupClosePushL(fs);
+				
+	RBuf fn;
+	fn.CreateL(KMaxFileName);
+	fn.CleanupClosePushL();
+	fn.Copy(KScrLogFile);
+	fn[0] = fs.GetSystemDriveChar();
+			
+	TBool isLogFileReadOnly = EFalse; 
+	if(!GetBoolFromConfig(ConfigSection(), _L("LogFileReadOnly"), isLogFileReadOnly))
+		PrintErrorL(_L("LogFileReadOnly flag was not found!"), KErrNotFound);
+	
+	if(isLogFileReadOnly)
+		User::LeaveIfError(fs.SetAtt(fn, KEntryAttReadOnly, 0));
+	else
+		User::LeaveIfError(fs.SetAtt(fn, 0, KEntryAttReadOnly));
+	
+	CleanupStack::PopAndDestroy(2, &fs); // fs, fn
+	}
+
+void CScrSetLogFileReadOnlyAttrStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrCreateLogFileStep-----------------
+
+CScrCreateLogFileStep::CScrCreateLogFileStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrCreateLogFileStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+	
+void CScrCreateLogFileStep::ImplTestStepL()
+	{
+	TInt numOfRecords;
+	if (!GetIntFromConfig(ConfigSection(), KLogsCountParamName, numOfRecords))
+		PrintErrorL(_L("The logs count param could not be found in configuration!"), KErrNotFound);
+	
+	TComponentId compId (0);
+	
+	for(TInt i=0; i<numOfRecords; ++i)
+		{
+		compId = iScrSession.AddComponentL(_L("TestComponentName"), _L("TestComponentVendor"),_L("plain"));
+		iScrSession.SetComponentVersionL(compId,_L("1.2.3"));
+		}
+	}
+
+void CScrCreateLogFileStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/pluginmanagementsteps.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,161 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* appmanagersteps.cpp
+*
+*/
+
+
+#include "pluginmanagementsteps.h"
+
+using namespace Usif;
+
+// -----------CScrAddSoftwareTypeStep-----------------
+
+CScrAddSoftwareTypeStep::CScrAddSoftwareTypeStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrAddSoftwareTypeStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	User::LeaveIfError(iScrAccessor.Connect());
+	}
+
+void CScrAddSoftwareTypeStep::ImplTestStepL()
+	{
+	TPtrC operationType;
+	if (!GetStringFromConfig(ConfigSection(), _L("OperationType"), operationType))
+		PrintErrorL(_L("Operation type could not be found in configuration."), KErrNotFound);
+	
+	_LIT(KNonLocalizedSwTypeName, "NonLocalized");
+	_LIT(KLocalizedSwTypeName, "Localized");
+	_LIT(KSwTypeNoMimeType, "NoMimeType");
+	_LIT(KLocalizedSwTypeDiffPluginUid, "LocalizedWithDifferentPluginUid");
+	_LIT(KLocalizedSwTypeExtraName, "LocalizedWithExtraName");
+	_LIT(KLocalizedSwTypeMissingName, "LocalizedWithMissingName");
+	_LIT(KLocalizedSwTypeExtraMime, "LocalizedExtraMime");
+	_LIT(KLocalizedSwTypeMissingMime, "LocalizedMissingMime");
+	
+	RScrAccessor::TAccessorOperationResult opResult = RScrAccessor::EOpSucessful;
+	
+	if(KNonLocalizedSwTypeName() == operationType)
+		{
+		iScrAccessor.AddSoftwareTypeL(RScrAccessor::EAddNonLocalizedSoftwareType, opResult, iTimeMeasuredExternally);
+		}
+	else if(KLocalizedSwTypeName() == operationType)
+		{
+		iScrAccessor.AddSoftwareTypeL(RScrAccessor::EAddLocalizedSoftwareType, opResult, iTimeMeasuredExternally);
+		}
+	else if(KSwTypeNoMimeType() == operationType)
+		{
+		TRAPD(err, iScrAccessor.AddSoftwareTypeL(RScrAccessor::EAddSofwtareTypeWithoutMimeTypes, opResult, iTimeMeasuredExternally));
+		if(KErrArgument != err)
+			{
+			ERR_PRINTF3(_L("The result of the function (%d) is not expected (%d)!"), err, KErrArgument);
+			SetTestStepResult(EFail);
+			}
+		}
+	else if(KLocalizedSwTypeDiffPluginUid() == operationType)
+		{
+		iScrAccessor.AddSoftwareTypeL(RScrAccessor::EAddLocalizedSoftwareTypeWithDifferentPluginUid, opResult, iTimeMeasuredExternally);
+		}
+	else if(KLocalizedSwTypeExtraName() == operationType)
+		{
+		iScrAccessor.AddSoftwareTypeL(RScrAccessor::EAddLocalizedSoftwareTypeWithExtraName, opResult, iTimeMeasuredExternally);
+		}
+	else if(KLocalizedSwTypeMissingName() == operationType)
+		{
+		iScrAccessor.AddSoftwareTypeL(RScrAccessor::EAddLocalizedSoftwareTypeWithMissingName, opResult, iTimeMeasuredExternally);
+		}
+	else if(KLocalizedSwTypeExtraMime() == operationType)
+		{
+		iScrAccessor.AddSoftwareTypeL(RScrAccessor::EAddLocalizedSoftwareTypeWithExtraMime, opResult, iTimeMeasuredExternally);
+		}
+	else if(KLocalizedSwTypeMissingMime() == operationType)
+		{
+		iScrAccessor.AddSoftwareTypeL(RScrAccessor::EAddLocalizedSoftwareTypeWithMissingMime, opResult, iTimeMeasuredExternally);
+		}
+	else
+		{
+		ERR_PRINTF2(_L("The operation type (%S) couldn't be recognised!"), &operationType);
+		SetTestStepResult(EFail);
+		}
+	
+	if(opResult != RScrAccessor::EOpSucessful)
+		{
+		SetTestStepResult(EFail);
+		switch(opResult)
+			{
+			case RScrAccessor::EOpFailSwTypeNotFound:
+				ERR_PRINTF1(_L("The newly added software type couldn't be found in SCR!"));
+				break;
+			case RScrAccessor::EOpFailUnexpectedPluginUid:
+				ERR_PRINTF1(_L("The plugin Uid of the newly added software type doesn't match the expected one!"));
+				break;
+			default:
+				ERR_PRINTF1(_L("Unknown test result received!"));
+			}
+		}
+	}
+
+void CScrAddSoftwareTypeStep::ImplTestStepPostambleL()
+	{
+	iScrAccessor.Close();
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrDeleteSoftwareTypeStep-----------------
+
+CScrDeleteSoftwareTypeStep::CScrDeleteSoftwareTypeStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrDeleteSoftwareTypeStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	User::LeaveIfError(iScrAccessor.Connect());
+	}
+
+void CScrDeleteSoftwareTypeStep::ImplTestStepL()
+	{
+	RScrAccessor::TAccessorOperationResult opResult = RScrAccessor::EOpSucessful;
+	
+	iScrAccessor.DeleteSoftwareTypeL(opResult, iTimeMeasuredExternally);
+	
+	if(opResult != RScrAccessor::EOpSucessful)
+		{
+		SetTestStepResult(EFail);
+		switch(opResult)
+			{
+			case RScrAccessor::EOpFailUnexpectedMimeTypeNum:
+				ERR_PRINTF1(_L("The number of deleted MIME types is unexpected!"));
+				break;
+			case RScrAccessor::EOpFailReturnedUnexpectedMimeType:
+				ERR_PRINTF1(_L("One of the returned deleted MIME type is unexpected!"));
+				break;
+			case RScrAccessor::EOpFailSwTypeStillExists:
+				ERR_PRINTF1(_L("The deleted sofwtare type still exists in SCR!"));
+				break;
+			default:
+				ERR_PRINTF1(_L("Unknown test result received!"));	
+			}
+		}
+	}
+
+void CScrDeleteSoftwareTypeStep::ImplTestStepPostambleL()
+	{
+	iScrAccessor.Close();
+	CScrTestStep::ImplTestStepPostambleL();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/sifsteps.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,104 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements the test steps for SIF-oriented APIs in the SCR
+*
+*/
+
+
+#include "sifsteps.h"
+#include <scs/cleanuputils.h>
+#include "tscrdefs.h"
+
+using namespace Usif;
+
+// -----------CScrGetPluginStep-----------------
+
+CScrGetPluginStep::CScrGetPluginStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrGetPluginStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+
+void CScrGetPluginStep::ImplTestStepL()
+	{
+	TUid expectedPluginUid = GetPluginUidFromConfigL();
+	TUid retPluginUid = TUid::Null();
+	
+	TPtrC mimeType;
+	if(GetMimeTypeFromConfigL(mimeType))
+		{
+		retPluginUid = iScrSession.GetPluginUidL(mimeType);
+		}
+	else
+		{
+		TComponentId componentId = GetComponentIdL();
+		retPluginUid = iScrSession.GetPluginUidL(componentId);
+		}
+	
+	if(retPluginUid != expectedPluginUid)
+		{
+		ERR_PRINTF3(_L("Returned plugin Uid (%d) doesn't match with the expected one(%d)."), retPluginUid.iUid, expectedPluginUid.iUid);
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CScrGetPluginStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+TUid CScrGetPluginStep::GetPluginUidFromConfigL()
+	{
+	TInt pluginUid;
+	if (!GetIntFromConfig(ConfigSection(), KPluginUidName, pluginUid))
+			PrintErrorL(_L("Plugin UID was not found!"), KErrNotFound);	
+	return TUid::Uid(pluginUid);
+	}
+
+TBool CScrGetPluginStep::GetMimeTypeFromConfigL(TPtrC& aMimeType)
+	{
+	return GetStringFromConfig(ConfigSection(), KMimeTypeName, aMimeType);
+	}
+
+// -----------CScrSetScomoStateStep-----------------
+
+CScrSetScomoStateStep::CScrSetScomoStateStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrSetScomoStateStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrSetScomoStateStep::ImplTestStepL()
+	{
+	TInt componentId = GetComponentIdL();
+	
+	TScomoState scomoState;
+	if (!GetScomoStateFromConfigL(scomoState, _L("ScomoState")))
+		PrintErrorL(_L("ScomoState attribute not found"), KErrNotFound);
+	
+	iScrSession.SetScomoStateL(componentId, scomoState);
+	}
+
+void CScrSetScomoStateStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/subsessionsteps.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,321 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements test steps for the subsessions interfaces in the SCR
+*
+*/
+
+
+#include "subsessionsteps.h"
+#include <scs/cleanuputils.h>
+#include "tscrdefs.h"
+
+using namespace Usif;
+
+TBool IsEqual(const CComponentEntry& aLhsEntry, const CComponentEntry& aRhsEntry)
+	{
+	return (aLhsEntry == aRhsEntry);
+	}
+
+TBool IsEqual(const HBufC& aLhs, const HBufC& aRhs)
+	{
+	return const_cast<HBufC &>(aLhs).Des() == const_cast<HBufC &>(aRhs).Des();
+	}
+
+template <class T> TBool VerifyMatchingL(const T* aObj, RPointerArray<T>& aExpectedArray)
+	{
+	TInt pos = aExpectedArray.Find(aObj, IsEqual);
+	if (pos != KErrNotFound)
+		{
+		T* foundObj = aExpectedArray[pos];
+		delete foundObj;
+		aExpectedArray.Remove(pos);
+		return ETrue;
+		}
+	return EFalse;
+	}
+
+
+// -----------CScrGetComponentStep-----------------
+
+CScrComponentRegistrySubsessionStep::CScrComponentRegistrySubsessionStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrComponentRegistrySubsessionStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrComponentRegistrySubsessionStep::GetComponentEntriesFromConfigL(RPointerArray<CComponentEntry>& aEntries)
+	{
+	TInt componentsCount(0);
+	if (!GetIntFromConfig(ConfigSection(), KComponentsCountName, componentsCount))
+		{
+		CComponentEntry *componentEntry = GetComponentEntryFromConfigLC();
+		aEntries.AppendL(componentEntry);
+		CleanupStack::Pop(componentEntry);
+		}
+	
+	for (TInt i = 0; i < componentsCount; ++i)
+		{
+		CComponentEntry *componentEntry = GetComponentEntryFromConfigLC(EFalse,i);
+		aEntries.AppendL(componentEntry);
+		CleanupStack::Pop(componentEntry);
+		}
+	}
+
+void CScrComponentRegistrySubsessionStep::VerifyNonReturnedEntriesL(const RPointerArray<CComponentEntry>& aExpectedEntries)
+	{
+	// Check if we need to verify the returned components
+	// Performance tests don't need verification.
+	TBool noVerification = EFalse;
+	GetBoolFromConfig(ConfigSection(), _L("NoVerification"), noVerification);
+	if(noVerification) return;
+
+	if (aExpectedEntries.Count() > 0)
+		{
+		TComponentId componentId = aExpectedEntries[0]->ComponentId(); 
+		const TDesC& componentName = aExpectedEntries[0]->Name();
+		ERR_PRINTF3(_L("At least one expected entry was not returned by the API - id %d, name %S"), componentId, &componentName);
+		SetTestStepResult(EFail);
+		}	
+	}
+
+void CScrComponentRegistrySubsessionStep::TestSingleModeL(const RSoftwareComponentRegistryView& aSubSession, RPointerArray<CComponentEntry>& aExpectedEntries)
+	{
+	// Check if we need to verify the returned components
+	// Performance tests don't need verification. Because the impact verification on performance results.
+	// In addition, we cannot simply verify some test cases such as retrieving all components or removable components. 
+	// Because, the perforamce test databases are populated with random data, and in the future we cannot guarantee 
+	// the values will stay same if the databases are recreated.
+	
+	TBool noVerification = EFalse;
+	GetBoolFromConfig(ConfigSection(), _L("NoVerification"), noVerification);
+
+	// Read continuously entries from the sub-session
+	while (1)
+		{
+		CComponentEntry* componentEntry = aSubSession.NextComponentL();
+		if (componentEntry == NULL)
+			break; // No more entries were found
+		CleanupStack::PushL(componentEntry);
+		
+		if(noVerification)
+			{
+			CleanupStack::PopAndDestroy(componentEntry);
+			continue;
+			}
+		// For each entry, check whether it was found in the expected array.
+		// If found, delete it from the expected array. If not, fail the test step
+		if (!VerifyMatchingL(componentEntry, aExpectedEntries))
+			{
+			ERR_PRINTF2(_L("The API returned an unexpected entry with id %d"), componentEntry->ComponentId());
+			SetTestStepResult(EFail);		
+			CleanupStack::PopAndDestroy(componentEntry);
+			return;
+			}
+				
+		CleanupStack::PopAndDestroy(componentEntry);
+		}
+			
+	// At the end, check whether there were expected entries which were not found
+	VerifyNonReturnedEntriesL(aExpectedEntries);
+	}
+
+void CScrComponentRegistrySubsessionStep::TestSetModeL(const RSoftwareComponentRegistryView& aSubSession, TInt aSetSize, RPointerArray<CComponentEntry>& aExpectedEntries)
+	{
+	// Check if we need to verify the returned components
+	// Performance tests don't need verification. See TestSingleModeL for more information.
+	TBool noVerification = EFalse;
+	GetBoolFromConfig(ConfigSection(), _L("NoVerification"), noVerification);
+
+	while (1)
+		{
+		RPointerArray<CComponentEntry> componentSet;
+		CleanupResetAndDestroyPushL(componentSet);
+		
+		aSubSession.NextComponentSetL(aSetSize, componentSet);
+		TInt returnedComponentsCount = componentSet.Count(); 
+		if (returnedComponentsCount <= 0)
+			{
+			CleanupStack::PopAndDestroy(&componentSet);
+			break;
+			}
+		
+		if(noVerification) 
+			{
+			CleanupStack::PopAndDestroy(&componentSet);
+			continue;
+			}
+				
+		for (TInt i = 0; i < returnedComponentsCount; ++i)
+			{
+			if (!VerifyMatchingL(componentSet[i], aExpectedEntries))
+				{
+				ERR_PRINTF2(_L("The API returned an unexpected entry with id %d"), componentSet[i]->ComponentId());
+				SetTestStepResult(EFail);				
+				CleanupStack::PopAndDestroy(&componentSet);
+				return;
+				}
+			}
+		
+		CleanupStack::PopAndDestroy(&componentSet);
+		}
+	
+	VerifyNonReturnedEntriesL(aExpectedEntries); 
+	}
+
+void CScrComponentRegistrySubsessionStep::ImplTestStepL()
+	{	
+	CComponentFilter* componentFilter = ReadComponentFilterFromConfigLC();
+	INFO_PRINTF1(_L("Read component filter from configuration"));
+	
+	INFO_PRINTF1(_L("Opened subsession to SCR"));
+	
+	//Get testing mode from configuration (sets or single iteration)
+	//Delegate the actual invocation and comparison according to the testing mode	
+	TInt setSize = GetSetSizeFromConfigL();
+	INFO_PRINTF2(_L("Test set size %d"), setSize);
+	
+	// Read expected results from config
+	RPointerArray<CComponentEntry> expectedComponentEntries;
+	CleanupResetAndDestroyPushL(expectedComponentEntries);
+	GetComponentEntriesFromConfigL(expectedComponentEntries);
+	StartTimer();
+	// Open the subsession
+	RSoftwareComponentRegistryView subSession;
+	CleanupClosePushL(subSession);	
+	subSession.OpenViewL(iScrSession, componentFilter);
+		
+	if (setSize == 1)
+		TestSingleModeL(subSession, expectedComponentEntries);
+	else
+		TestSetModeL(subSession, setSize, expectedComponentEntries);
+		
+	CleanupStack::PopAndDestroy(3, componentFilter); // expectedComponentEntries, subSession, componentFilter
+	}
+
+void CScrComponentRegistrySubsessionStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
+
+// -----------CScrFileListSubsessionStep-----------------
+
+CScrFileListSubsessionStep::CScrFileListSubsessionStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrFileListSubsessionStep::ImplTestStepPreambleL()
+	{
+	CScrTestStep::ImplTestStepPreambleL();
+	}
+
+void CScrFileListSubsessionStep::VerifyNonReturnedFilesL(const RPointerArray<HBufC>& aExpectedFiles)
+	{
+	if (aExpectedFiles.Count() > 0)
+		{
+		HBufC* fileName = aExpectedFiles[0]; 
+		ERR_PRINTF2(_L("At least one expected files was not returned by the API - name %S"), fileName);
+		SetTestStepResult(EFail);
+		}	
+	}
+
+void CScrFileListSubsessionStep::ReportUnexpectedFileL(const TDesC& aUnexpectedFileName)
+	{
+	ERR_PRINTF2(_L("The API returned an unexpected file entry with name %S"), &aUnexpectedFileName);
+	SetTestStepResult(EFail);		
+	}
+
+void CScrFileListSubsessionStep::TestSingleModeL(const RSoftwareComponentRegistryFilesList& aSubSession, 
+													 RPointerArray<HBufC> &aExpectedFiles)
+	{
+	FOREVER
+		{
+		HBufC *nextFile = aSubSession.NextFileL();
+		if (!nextFile)
+			break;
+		CleanupStack::PushL(nextFile);
+		
+		if (!VerifyMatchingL(nextFile, aExpectedFiles))
+			{
+			ReportUnexpectedFileL(*nextFile);
+			CleanupStack::PopAndDestroy(nextFile);
+			return;
+			}
+		
+		CleanupStack::PopAndDestroy(nextFile);
+		}
+	
+	VerifyNonReturnedFilesL(aExpectedFiles);
+	}
+
+void CScrFileListSubsessionStep::TestSetModeL(const RSoftwareComponentRegistryFilesList& aSubSession, TInt aSetSize, 
+											 	  RPointerArray<HBufC>& aExpectedFiles)
+	{
+	FOREVER
+		{
+		RPointerArray<HBufC> foundFiles;
+		CleanupResetAndDestroyPushL(foundFiles);
+		
+		aSubSession.NextFileSetL(aSetSize, foundFiles);
+		TInt returnedFilesCount = foundFiles.Count(); 
+		if (returnedFilesCount <= 0)
+			{
+			CleanupStack::PopAndDestroy(&foundFiles);
+			break;
+			}
+		for (TInt i = 0; i < returnedFilesCount; ++i)
+			{
+			if (!VerifyMatchingL(foundFiles[i], aExpectedFiles))
+				{
+				ReportUnexpectedFileL(*foundFiles[i]);
+				CleanupStack::PopAndDestroy(&foundFiles);
+				return;
+				}
+			}
+		
+		CleanupStack::PopAndDestroy(&foundFiles);
+		}
+	VerifyNonReturnedFilesL(aExpectedFiles);
+	}
+
+
+void CScrFileListSubsessionStep::ImplTestStepL()
+	{	
+	TInt componentId = GetComponentIdL();
+	RSoftwareComponentRegistryFilesList subSession;
+	CleanupClosePushL(subSession);
+	
+	subSession.OpenListL(iScrSession, componentId);
+	
+	RPointerArray<HBufC> expectedFiles;
+	CleanupResetAndDestroyPushL(expectedFiles);
+	
+	GetFileNameListFromConfigL(expectedFiles);
+	TInt setSize = GetSetSizeFromConfigL();
+
+	if (setSize > 1)
+		TestSingleModeL(subSession, expectedFiles);
+	else
+		TestSetModeL(subSession, setSize, expectedFiles);	
+			
+	CleanupStack::PopAndDestroy(2, &subSession); //expectedEntries 
+	}
+
+void CScrFileListSubsessionStep::ImplTestStepPostambleL()
+	{
+	CScrTestStep::ImplTestStepPostambleL();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/transactionmanagementsteps.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,362 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements the test steps for transaction management APIs in the SCR
+*
+*/
+
+
+#include "transactionmanagementsteps.h"
+
+using namespace Usif;
+
+
+// -----------CScrApplyTransactionStep-----------------
+
+CScrApplyTransactionStep::CScrApplyTransactionStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrApplyTransactionStep::ImplTestStepPreambleL()
+	{
+	// empty
+	}
+
+
+void CScrApplyTransactionStep::ImplTestStepL()
+	{
+	User::LeaveIfError(iScrSession.Connect());
+	iScrSession.CreateTransactionL();
+	
+	// Add a new component into SCR database
+	TComponentId componentId= AddNonLocalisableComponentL();
+	AppendSharedComponentIdL(componentId);
+	
+	// Register a file to the component
+	TPtrC fileName;
+	GetFileNameFromConfigL(fileName);
+	iScrSession.RegisterComponentFileL(componentId, fileName);
+	
+	// Get a property from config file and set it.
+	CPropertyEntry *property = GetPropertyFromConfigLC(ETrue);
+	if(property->PropertyType() != CPropertyEntry::EIntProperty)
+		{
+		ERR_PRINTF1(_L("The property is not an integer property which is expected!"));
+		User::Leave(KErrArgument);
+		}
+	CIntPropertyEntry *propertyInt = dynamic_cast<CIntPropertyEntry*>(property);
+	iScrSession.SetComponentPropertyL(componentId, propertyInt->PropertyName(), propertyInt->IntValue());
+	CleanupStack::PopAndDestroy(propertyInt);
+	
+	// Commit the transaction if it is marked in the configuration
+	TBool isCommitTransaction(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("CommitTransaction"), isCommitTransaction);
+	if(isCommitTransaction)
+		{
+		iScrSession.CommitTransactionL();
+		}
+	
+	// Cancel thetransaction if it is marked in the configuration
+	TBool isCancelTransaction(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("CancelTransaction"), isCancelTransaction);
+	if(isCancelTransaction)
+		{
+		iScrSession.RollbackTransactionL();
+		}
+	
+	// Close the session
+	iScrSession.Close();
+	}
+
+void CScrApplyTransactionStep::ImplTestStepPostambleL()
+	{
+	// empty
+	}
+
+
+// -----------CScrCreateTransactionStep-----------------
+
+void OpenSessionLC(RSoftwareComponentRegistry& aSession)
+	{
+	User::LeaveIfError(aSession.Connect());
+	CleanupClosePushL(aSession);
+	}
+
+void CreateTransactionL(RSoftwareComponentRegistry& aSession)
+	{
+	aSession.CreateTransactionL();
+	}
+	
+void OpenSubsessionL(RSoftwareComponentRegistry aSession, RSoftwareComponentRegistryView& aSubsession)
+	{
+	CComponentFilter *filter = CComponentFilter::NewL(); // NewL is used for the sake of coverage
+	CleanupStack::PushL(filter);
+	aSubsession.OpenViewL(aSession, filter);
+	CleanupStack::PopAndDestroy(filter);
+	}	
+
+void OpenSubsessionLC(RSoftwareComponentRegistry aSession, RSoftwareComponentRegistryView& aSubsession)
+	{
+	OpenSubsessionL(aSession, aSubsession);
+	CleanupClosePushL(aSubsession);
+	}
+
+CScrCreateTransactionStep::CScrCreateTransactionStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrCreateTransactionStep::ImplTestStepPreambleL()
+	{
+	// empty
+	}
+
+
+void CScrCreateTransactionStep::ImplTestStepL()
+	{
+	RSoftwareComponentRegistry session1;
+	RSoftwareComponentRegistry session2;
+	RSoftwareComponentRegistryView subsession;
+	RSoftwareComponentRegistryView subsession2;
+	
+	TBool isBeginTransactionBeforeSubsession(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("BeginTransactionBeforeSubsession"), isBeginTransactionBeforeSubsession);
+	if(isBeginTransactionBeforeSubsession)
+		{
+		OpenSessionLC(session1);
+		CreateTransactionL(session1);
+		OpenSessionLC(session2);
+		OpenSubsessionLC(session2, subsession);
+		CleanupStack::PopAndDestroy(3, &session1);
+		}
+	
+	TBool isOpenSubsessionInTheSameSession(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("OpenSubsessionInTheSameSession"), isOpenSubsessionInTheSameSession);
+	if(isOpenSubsessionInTheSameSession)
+		{
+		OpenSessionLC(session1);
+		CreateTransactionL(session1);
+		OpenSubsessionLC(session1, subsession);
+		CleanupStack::PopAndDestroy(2, &session1);
+		
+		// Now do the same,  but in reverse order
+		OpenSessionLC(session1);
+		OpenSubsessionLC(session1, subsession);		
+		CreateTransactionL(session1);
+		CleanupStack::PopAndDestroy(2, &session1);
+		}
+		
+	TBool isBeginTransactionAfterSubsession(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("BeginTransactionAfterSubsession"), isBeginTransactionAfterSubsession);
+	if(isBeginTransactionAfterSubsession)
+		{		
+		OpenSessionLC(session1);
+		OpenSessionLC(session2);
+		OpenSubsessionLC(session1, subsession);
+		CreateTransactionL(session2);
+		CleanupStack::PopAndDestroy(3, &subsession);
+		}
+	
+	TBool isBeginTransactionInTheSameSession(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("BeginTransactionInTheSameSession"), isBeginTransactionInTheSameSession);
+	if(isBeginTransactionAfterSubsession)
+		{		
+		OpenSessionLC(session1);
+		OpenSubsessionLC(session1, subsession);
+		CreateTransactionL(session1);
+		CleanupStack::PopAndDestroy(2, &subsession);
+		}
+		
+	TBool isBeginAfterAnotherBegin(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("BeginTransactionAfterAnotherBegin"), isBeginAfterAnotherBegin);
+	if(isBeginAfterAnotherBegin)
+		{
+		OpenSessionLC(session1);
+		CreateTransactionL(session1);
+		OpenSessionLC(session2);
+		CreateTransactionL(session2);
+		CleanupStack::PopAndDestroy(2, &session1);
+		}
+	
+	TBool isMultipleSubsessions(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("MultipleSubsessions"), isMultipleSubsessions);
+	if(isMultipleSubsessions)
+		{
+		OpenSessionLC(session1);
+		OpenSubsessionLC(session1, subsession);
+		OpenSessionLC(session2);
+		OpenSubsessionLC(session2, subsession2);
+		CleanupStack::PopAndDestroy(4, &session1);
+		}
+	
+	TBool isWriteAfterBegin(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("WriteAfterBeginTransaction"), isWriteAfterBegin);
+	if(isWriteAfterBegin)
+		{
+		OpenSessionLC(session1);
+		CreateTransactionL(session1);
+		OpenSessionLC(session2);
+		session2.AddComponentL(_L("test"),_L("vendor"),_L("plain"));	
+		CleanupStack::PopAndDestroy(2, &session1);
+		}
+	
+	TBool isReadAfterBegin(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("ReadAfterBeginTransaction"), isReadAfterBegin);
+	if(isReadAfterBegin)
+		{
+		OpenSessionLC(session1);
+		CreateTransactionL(session1);
+		OpenSessionLC(session2);
+		CComponentEntry *entry = CComponentEntry::NewLC();
+		session2.GetComponentL(1, *entry);	
+		CleanupStack::PopAndDestroy(3, &session1);
+		}
+		
+	TBool mutatingOperationWithSubsession(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("MutatingOperationWithSubsession"), mutatingOperationWithSubsession);
+	if(mutatingOperationWithSubsession)
+		{
+		OpenSessionLC(session1);
+		OpenSubsessionLC(session1, subsession);
+		OpenSessionLC(session2);
+		session2.AddComponentL(_L("test"),_L("vendor"),_L("plain"));
+		CleanupStack::PopAndDestroy(3, &session1); // session2, subsession
+		}	
+		
+	TBool closeSessionWithoutClosingSubsession(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("CloseSessionWithoutClosingSubsession"), closeSessionWithoutClosingSubsession);
+  	if(closeSessionWithoutClosingSubsession)
+   		{
+   		OpenSessionLC(session1);
+  		CreateTransactionL(session1);
+  		OpenSubsessionL(session1, subsession);
+  		OpenSubsessionL(session1, subsession2);
+  		CComponentEntry *entry = subsession.NextComponentL();
+  		CleanupStack::PushL(entry);
+  		CComponentEntry *entry2 = subsession2.NextComponentL();
+  		CleanupStack::PushL(entry2);		
+  		CleanupStack::PopAndDestroy(3, &session1); // entry, entry2
+		}
+	
+	
+	TBool isMultipleActiveSubsessions (EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("MultipleActiveSubsessions"), isMultipleActiveSubsessions);
+ 	if(isMultipleActiveSubsessions)
+ 	    {
+		OpenSessionLC(session1);
+ 	 	OpenSubsessionLC(session1, subsession);
+ 	 	TInt foundRecords (0);
+ 	 	CComponentEntry *entry = subsession.NextComponentL();
+ 	 	if(entry)
+			{
+			++foundRecords;
+ 	 	 	delete entry;
+ 	 	 	entry = NULL;
+ 	 	 	}
+
+		OpenSessionLC(session2);
+ 	 	CComponentFilter *filter = CComponentFilter::NewL(); // NewL is used for the sake of coverage
+ 	 	CleanupStack::PushL(filter);
+ 	 	filter->SetNameL(_L("nonexistingcomponentnamefortransactionmanagementtest"));
+ 	 	filter->SetVendorL(_L("nonexistingvendornamefortransactionmanagementtest"));
+ 	 	subsession2.OpenViewL(session2, filter);
+ 	 	CleanupStack::PopAndDestroy(filter);
+ 	 	CleanupClosePushL(subsession2);
+ 	 	
+ 	 	CComponentEntry *entry2 = subsession2.NextComponentL();
+ 	 	if(entry2)
+			{
+ 	 	 	delete entry2;
+ 	 	 	entry2 = NULL;
+ 	 	 	entry2 = subsession2.NextComponentL();
+ 	 	 	ERR_PRINTF1(_L("Subsession2 has unexpectedly retrieved a component!"));
+ 	 	 	SetTestStepResult(EFail);
+ 	 	 	}
+		CleanupStack::PopAndDestroy(2, &session2); // session2, subsession2
+
+ 	 	entry = subsession.NextComponentL();
+ 	 	while(entry)
+			{
+ 	 	 	++foundRecords;
+ 	 	 	delete entry;
+ 	 	 	entry = NULL;
+ 	 	 	entry = subsession.NextComponentL();
+ 	 	 	}
+		if(foundRecords < 2)
+			{
+ 	 	 	ERR_PRINTF1(_L("Subsession1 has unexpectedly reached the end of the view!"));
+ 	 	 	SetTestStepResult(EFail);
+ 	 	 	}
+		CleanupStack::PopAndDestroy(2, &session1);
+ 	 	}	
+	}
+
+void CScrCreateTransactionStep::ImplTestStepPostambleL()
+	{
+	// empty
+	}
+
+// -----------CScrManageAnotherTransactionStep-----------------
+
+CScrManageAnotherTransactionStep::CScrManageAnotherTransactionStep(CScrTestServer& aParent)	: CScrTestStep(aParent)
+	{
+	}
+
+void CScrManageAnotherTransactionStep::ImplTestStepPreambleL()
+	{
+	// empty
+	}
+
+
+void CScrManageAnotherTransactionStep::ImplTestStepL()
+	{
+	User::LeaveIfError(iScrSession.Connect());
+	iScrSession.CreateTransactionL();
+	
+	RSoftwareComponentRegistry anotherSession;
+	User::LeaveIfError(anotherSession.Connect());
+	CleanupClosePushL(anotherSession);
+	
+	// Commit the transaction if it is marked in the configuration
+	TBool isCommitTransaction(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("CommitTransaction"), isCommitTransaction);
+	if(isCommitTransaction)
+		anotherSession.CommitTransactionL();
+	
+	TBool isCancelTransaction(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("CancelTransaction"), isCancelTransaction);
+	if(isCancelTransaction)
+		anotherSession.RollbackTransactionL();
+	
+	TBool isInvokeMutatingFunction(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("InvokeMutatingFunction"), isInvokeMutatingFunction);
+	if(isInvokeMutatingFunction)
+		anotherSession.AddComponentL(_L("test"), _L("vendor"),_L("plain"));
+	
+	TBool isInvokeNonMutatingFunction(EFalse);
+	GetBoolFromConfig(ConfigSection(), _L("InvokeNonMutatingFunction"), isInvokeNonMutatingFunction);
+	if(isInvokeNonMutatingFunction)
+		{
+		RArray<TComponentId> componentIdList;
+		anotherSession.GetComponentIdsL(componentIdList);
+		componentIdList.Close();
+		}
+	
+	CleanupStack::PopAndDestroy(&anotherSession);
+	iScrSession.Close();
+	}
+
+void CScrManageAnotherTransactionStep::ImplTestStepPostambleL()
+	{
+	// empty
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/tscrserver.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,226 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements the test server of the Software Component Registry test harness
+*
+*/
+
+
+#include "tscrserver.h" 			// TEF Test Server
+#include "tscrstep.h" 				// TEF Steps Test Code
+#include "componentmanagementsteps.h"
+#include "componentquerysteps.h"
+#include "transactionmanagementsteps.h"
+#include "subsessionsteps.h"
+#include "sifsteps.h"
+#include "appmanagersteps.h"
+#include "deletescrdbstep.h"
+#include "pluginmanagementsteps.h"
+#include "installloghistorysteps.h"
+
+CScrTestServer* CScrTestServer::NewL()
+/**
+	Called inside the MainL() function to create and start the CTestServer derived server.
+	@return Instance of the test server
+ */
+	{	
+	CScrTestServer* server = new (ELeave) CScrTestServer();
+	CleanupStack::PushL(server);
+	User::LeaveIfError(server->iFs.Connect());
+	User::LeaveIfError(server->iFs.ShareProtected());
+	User::LeaveIfError(server->iFs.CreatePrivatePath(server->iFs.GetSystemDrive()));
+	server->ConstructL(KScrTestServerName);
+	CleanupStack::Pop(server);
+	return server;
+	}
+	
+	
+CScrTestServer::~CScrTestServer()
+/**
+ 	Destructor.
+ */
+	{
+	iFs.Close();	
+	}
+
+
+LOCAL_C void MainL()
+	{
+	
+	CActiveScheduler *scheduler = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(scheduler);
+
+	CScrTestServer* server = NULL;
+	
+	// Create the CTestServer derived server
+	TRAPD(err,server = CScrTestServer::NewL());
+	if(!err)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		scheduler->Start();
+		}
+		
+	delete server;
+	delete scheduler;
+	}
+
+
+GLDEF_C TInt E32Main()
+/**
+ * @return - Standard Epoc error code on process exit
+ * Process entry point. Called by client using RProcess API
+ */
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD(err,MainL());
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return err;
+    }
+
+TBool CScrTestServer::IsPerformanceTestStep(const TDesC& aStepName, TPtrC& aStrippedName)
+	{
+	_LIT(KPerformanceStepKeyWord, "Performance-");
+	if (KErrNotFound == aStepName.FindF(KPerformanceStepKeyWord()))
+		{
+		aStrippedName.Set(aStepName);
+		return EFalse;
+		}
+	
+	TInt len = KPerformanceStepKeyWord().Length();
+	aStrippedName.Set(aStepName.Mid(len));
+	return ETrue;
+	}
+
+CTestStep* CScrTestServer::CreateTestStep(const TDesC& aStepName)
+/**
+	Creates a new test step.
+	@param aStepName The name of the requested test step.
+	@return A pointer to the object of the requested test step.
+ */
+	{
+	TBool performanceStep = EFalse;
+	TPtrC strippedStepName;
+	performanceStep = IsPerformanceTestStep(aStepName, strippedStepName);
+	
+	// Initialise test step object to NULL if no TEF steps are assigned
+	CTestStep* testStep = NULL;
+	
+	if (strippedStepName == KScrAddComponentStep)
+		testStep = new CScrAddComponentStep(*this);
+	else if (strippedStepName == KScrSetComponentPropertyStep)
+		testStep = new CScrSetComponentPropertyStep(*this);
+	else if (strippedStepName == KScrRegisterFileStep)
+		testStep = new CScrRegisterFileStep(*this);
+	else if (strippedStepName == KScrAddFilePropertyStep)
+		testStep = new CScrAddFilePropertyStep(*this);
+	else if (strippedStepName == KScrSetCommonPropertyStep)
+		testStep = new CScrSetCommonPropertyStep(*this);
+	else if (strippedStepName == KScrDeleteComponentPropertyStep)
+		testStep = new CScrDeleteComponentPropertyStep(*this);	
+	else if (strippedStepName == KScrDeleteFilePropertyStep)
+		testStep = new CScrDeleteFilePropertyStep(*this);	
+	else if (strippedStepName == KScrUnregisterFileStep)
+		testStep = new CScrUnregisterFileStep(*this);
+	else if (strippedStepName == KScrDeleteComponentStep)
+		testStep = new CScrDeleteComponentStep(*this);
+	else if (strippedStepName == KScrDeleteAllComponentsStep)
+		testStep = new CScrDeleteAllComponentsStep(*this);
+	else if (strippedStepName == KScrApplyTransactionStep)
+		testStep = new CScrApplyTransactionStep(*this);
+	else if (strippedStepName == KScrCreateTransactionStep)
+		testStep = new CScrCreateTransactionStep(*this);
+	else if (strippedStepName == KScrManageAnotherTransactionStep)
+		testStep = new CScrManageAnotherTransactionStep(*this);	
+	else if (strippedStepName == KScrGetComponentStep)
+		testStep = new CScrGetComponentStep(*this);
+	else if (strippedStepName == KScrGetComponentLocalizedStep)
+	        testStep = new CScrGetComponentLocalizedStep(*this);
+	else if (strippedStepName == KScrGetFilePropertiesStep)
+		testStep = new CScrGetFilePropertiesStep(*this);	
+	else if (strippedStepName == KScrGetFilePropertyStep)
+		testStep = new CScrGetFilePropertyStep(*this);	
+	else if (strippedStepName == KScrGetFileComponentsStep)
+		testStep = new CScrGetFileComponentsStep(*this);
+	else if (strippedStepName == KScrGetComponentPropertiesStep)
+		testStep = new CScrGetComponentPropertiesStep(*this);
+	else if (strippedStepName == KScrGetComponentIdsStep)
+		testStep = new CScrGetComponentIdsStep(*this);
+	else if (strippedStepName == KScrGetComponentPropertyStep)
+		testStep = new CScrGetComponentPropertyStep(*this);
+	else if (strippedStepName == KScrComponentRegistrySubsessionStep)
+		testStep = new CScrComponentRegistrySubsessionStep(*this);
+	else if (strippedStepName == KScrFileListSubsessionStep)
+		testStep = new CScrFileListSubsessionStep(*this);
+	else if (strippedStepName == KScrGetPluginStep)
+		testStep = new CScrGetPluginStep(*this);
+	else if (strippedStepName == KScrSetScomoStateStep)
+		testStep = new CScrSetScomoStateStep(*this);	
+	else if (strippedStepName == KScrIsMediaPresentStep)
+		testStep = new CScrIsMediaPresentStep(*this);		
+	else if (strippedStepName == KScrInstallComponentStep)
+		testStep = new CScrInstallComponentStep(*this);
+	else if (strippedStepName == KScrGetComponentFilesCountStep)
+		testStep = new CScrGetComponentFilesCountStep(*this);
+	else if (strippedStepName == KScrAddComponentDependencyStep)
+		testStep = new CScrAddComponentDependencyStep(*this);
+	else if (strippedStepName == KScrDeleteComponentDependencyStep)
+		testStep = new CScrDeleteComponentDependencyStep(*this);
+	else if (strippedStepName == KScrGetComponentWithGlobalIdStep)
+		testStep = new CScrGetComponentWithGlobalIdStep(*this);
+	else if (strippedStepName == KScrGetComponentIdStep)
+		testStep = new CScrGetComponentIdStep(*this);
+	else if (strippedStepName == KScrGetGlobalIdList)
+		testStep = new CScrGetGlobalIdListStep(*this);	
+	else if (strippedStepName == KScrDeleteDbFileStep)
+		testStep = new CScrDeleteDbFileStep(*this);
+	else if (strippedStepName == KScrAddSoftwareTypeStep)
+		testStep = new CScrAddSoftwareTypeStep(*this);
+	else if (strippedStepName == KScrDeleteSoftwareTypeStep)
+		testStep = new CScrDeleteSoftwareTypeStep(*this);
+	else if (strippedStepName == KScrIsComponentOrphaned)
+		testStep = new CScrIsComponentOrphanedStep(*this);
+	else if (strippedStepName == KScrCopyDbFileStep)
+		testStep = new CScrCopyDbFileStep(*this);
+	else if (strippedStepName == KScrGetLogEntriesStep)
+		testStep = new CScrGetLogEntriesStep(*this);
+	else if (strippedStepName == KScrSetLogFileReadOnlyAttrStep)
+		testStep = new CScrSetLogFileReadOnlyAttrStep(*this);
+	else if (strippedStepName == KScrCreateLogFileStep)
+		testStep = new CScrCreateLogFileStep(*this);
+	else if (strippedStepName == KScrCompareVersions)
+		testStep = new CScrCompareVersionsStep(*this);
+	else if (strippedStepName == KScrIsComponentOnReadOnlyDrive)
+		testStep = new CScrIsComponentOnReadOnlyDriveStep(*this);
+	else if (strippedStepName == KScrComponentPresence)
+		testStep = new CScrComponentPresenceStep(*this);
+  	else if (strippedStepName == KScrValuesNegativeStep)
+  		testStep = new CScrValuesNegativeStep(*this);		
+  	else if (strippedStepName == KScrOutOfMemoryStep)
+  		testStep = new SCROufOfMemory(*this);
+	
+	if(performanceStep)
+		{
+		CScrTestStep *scrTestStep = dynamic_cast<CScrTestStep*>(testStep);
+		scrTestStep->MarkAsPerformanceStep();
+		}
+	
+	return testStep;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscr/source/tscrstep.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1044 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements the basic test step for the Software Component Registry test harness
+*
+*/
+
+
+#include "tscrstep.h"
+#include "tscrserver.h"
+#include "tscrdefs.h"
+#include <f32file.h>
+#include <scs/cleanuputils.h>
+
+using namespace Usif;
+
+CScrTestStep::CScrTestStep(CScrTestServer& aParent)
+// Constructor.
+	: iParent(aParent)
+	{	
+	}
+
+CScrTestStep::~CScrTestStep()
+// Destructor.
+	{
+	iScrSession.Close();
+	}
+
+void CScrTestStep:: MarkAsPerformanceStep()
+	{
+	iIsPerformanceTest = ETrue;
+	}
+
+void CScrTestStep::PrintPerformanceLog(TTime aTime)
+	{
+	TDateTime timer = aTime.DateTime();
+	INFO_PRINTF6(_L("%S,%d:%d:%d:%d"), &KPerformanceTestInfo(), timer.Hour(), timer.Minute(), timer.Second(), timer.MicroSecond());
+	}
+
+void CScrTestStep::StartTimer()
+	{
+	iStartTime.HomeTime();
+	PrintPerformanceLog(iStartTime);
+	}
+
+void CScrTestStep::StopTimerAndPrintResultL()
+	{
+	TTime endTime;
+	endTime.HomeTime();
+	PrintPerformanceLog(endTime);
+	
+	TTimeIntervalMicroSeconds duration = endTime.MicroSecondsFrom(iStartTime);
+	TInt actualDuration = I64INT(duration.Int64())/1000; // in millisecond
+	
+	if(iTimeMeasuredExternally)
+		{ // if the time is measured by the scr accessor, update the actual time with the external time.
+		actualDuration = iTimeMeasuredExternally;
+		}
+	
+	TInt maxDuration = 0;
+	if(!GetIntFromConfig(ConfigSection(), KMaxDurationName, maxDuration))
+		{
+		ERR_PRINTF2(_L("%S could not be found in configuration."), &KMaxDurationName());
+		User::Leave(KErrNotFound);
+		}
+	else
+		{
+		INFO_PRINTF3(_L("%S,%d"), &KMaxTestCaseDuration(), maxDuration);
+		INFO_PRINTF3(_L("%S,%d"), &KActualTestCaseDuration(), actualDuration);
+		}
+	
+	if(actualDuration <= maxDuration)
+		{
+		INFO_PRINTF2(_L("This test meets performance requirement (Duration=%d)."), actualDuration);
+		}
+	else
+		{
+		ERR_PRINTF2(_L("This test does not meet performance requirement (Duration=%d)."), actualDuration);
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CScrTestStep::ImplTestStepPreambleL()
+/**
+ 	From COomTestStep.
+ */
+	{
+	User::LeaveIfError(iScrSession.Connect());
+	if(iIsPerformanceTest)
+		{
+		StartTimer();
+		}
+	}
+
+void CScrTestStep::ImplTestStepL()
+/**
+	From COomTestStep.
+ */
+	{
+	// empty
+	}
+
+
+void CScrTestStep::ImplTestStepPostambleL()
+/**
+ 	From COomTestStep.
+ */
+	{
+	if(iIsPerformanceTest)
+		{
+		StopTimerAndPrintResultL();
+		}
+	}
+
+
+RScsClientBase* CScrTestStep::ClientHandle()
+/**
+ 	From COomTestStep.
+ */
+	{
+	return &iScrSession;
+	}
+
+void CScrTestStep::PrintErrorL(const TDesC& aMsg, TInt aErrNum,...)
+	{
+	VA_LIST list;
+	VA_START(list, aErrNum);
+	
+	RBuf msgBuf;
+	msgBuf.CreateL(MAX_SCR_ERROR_MESSAGE_LENGTH);
+	msgBuf.CleanupClosePushL();
+	msgBuf.AppendFormatList(aMsg, list);
+	
+	ERR_PRINTF1(msgBuf);
+	SetTestStepResult(EFail);
+
+	CleanupStack::PopAndDestroy(&msgBuf);
+	User::Leave(aErrNum);
+	}
+
+//--------------------Code for properties' comparison
+
+TBool operator ==(const TDriveList& aLhsEntry, const TDriveList& aRhsEntry)
+	{
+	// If two drives are equal, each byte of them must be zero or non-zero together. 
+	// Otherwise, the drive lists are different.
+	for(TInt driveNumber=EDriveA; driveNumber<=EDriveZ; ++driveNumber)
+		{ 
+		if((aLhsEntry[driveNumber] || aRhsEntry[driveNumber]) && !(aLhsEntry[driveNumber] && aRhsEntry[driveNumber]))
+			return EFalse;
+		}
+	return ETrue;
+	}
+
+TBool operator ==(const CComponentEntry& aLhsEntry, const CComponentEntry& aRhsEntry)
+	{
+	return (aLhsEntry.ComponentId() == aRhsEntry.ComponentId() && 
+			aLhsEntry.Name() == aRhsEntry.Name()&& 
+			aLhsEntry.Vendor() == aRhsEntry.Vendor() && 
+			aLhsEntry.SoftwareType() == aRhsEntry.SoftwareType() &&
+			aLhsEntry.GlobalId() == aRhsEntry.GlobalId() &&
+			aLhsEntry.IsRemovable() == aRhsEntry.IsRemovable() && 
+			aLhsEntry.IsDrmProtected() == aRhsEntry.IsDrmProtected() && 
+			aLhsEntry.IsHidden() == aRhsEntry.IsHidden() && 
+			aLhsEntry.IsKnownRevoked() == aRhsEntry.IsKnownRevoked() && 
+			aLhsEntry.IsOriginVerified() == aRhsEntry.IsOriginVerified() && 
+			aLhsEntry.ComponentSize() == aRhsEntry.ComponentSize() &&
+			aLhsEntry.ScomoState() == aRhsEntry.ScomoState() && 
+			aLhsEntry.InstalledDrives() == aRhsEntry.InstalledDrives() && 
+			aLhsEntry.Version() == aRhsEntry.Version());
+	}
+
+TBool operator !=(const CComponentEntry& aLhsEntry, const CComponentEntry& aRhsEntry)
+	{
+	return !operator ==(aLhsEntry, aRhsEntry);
+	}
+
+TBool operator ==(CLocalizablePropertyEntry& lhsEntry, CLocalizablePropertyEntry& rhsEntry)
+	{
+	return lhsEntry.StrValue() == rhsEntry.StrValue();
+	}
+
+TBool operator ==(CBinaryPropertyEntry& lhsEntry, CBinaryPropertyEntry& rhsEntry)
+	{
+	return lhsEntry.BinaryValue() == rhsEntry.BinaryValue();
+	}
+
+TBool operator ==(CIntPropertyEntry& lhsEntry, CIntPropertyEntry& rhsEntry)
+	{
+	return lhsEntry.Int64Value() == rhsEntry.Int64Value();
+	}
+
+template <class T> TBool CompareProperty(CPropertyEntry& lhsEntry, CPropertyEntry& rhsEntry)
+	{
+	// Cannot use reference dynamic_cast - Symbian does not support std::bad_cast or any other exception	
+	T& lhsSubclassEntry = static_cast<T &>(lhsEntry);
+	T& rhsSubclassEntry = static_cast<T &>(rhsEntry);
+	return (lhsSubclassEntry == rhsSubclassEntry);	
+	}
+
+TBool operator ==(CPropertyEntry& lhsEntry, CPropertyEntry& rhsEntry)
+	{
+	CPropertyEntry::TPropertyType lhsPropertyType = lhsEntry.PropertyType();
+	CPropertyEntry::TPropertyType rhsPropertyType = rhsEntry.PropertyType();
+	if (lhsPropertyType != rhsPropertyType)
+		return EFalse;
+	
+	switch (rhsPropertyType)
+		{
+		case CPropertyEntry::EBinaryProperty:
+			{
+			return CompareProperty<CBinaryPropertyEntry>(lhsEntry, rhsEntry);
+			}
+		case CPropertyEntry::ELocalizedProperty:
+			{
+			return CompareProperty<CLocalizablePropertyEntry>(lhsEntry, rhsEntry);
+			}			
+		case CPropertyEntry::EIntProperty:
+			{
+			return CompareProperty<CIntPropertyEntry>(lhsEntry, rhsEntry);
+			}
+		default:
+			ASSERT(0);
+		}
+	ASSERT(0);
+	return ETrue; // Should not reach here
+	}
+
+TBool operator !=(CPropertyEntry& lhsEntry, CPropertyEntry& rhsEntry)
+	{
+	return !operator ==(lhsEntry, rhsEntry);
+	}
+
+
+TBool CScrTestStep::ComparePropertiesL(RPointerArray<CPropertyEntry>& aFoundProperties, RPointerArray<CPropertyEntry>& aExpectedProperties)
+	{
+	TInt foundPropertiesCount = aFoundProperties.Count();
+	
+	if (aExpectedProperties.Count() != foundPropertiesCount)
+		{
+		ERR_PRINTF3(_L("The number of expected properties %d did not match the number of found properties %d."), aExpectedProperties.Count(), foundPropertiesCount);
+		return EFalse; 
+		}
+	
+	for (TInt i = 0; i < foundPropertiesCount; ++i)
+		{
+		if (*aFoundProperties[i] != *aExpectedProperties[i])
+			{
+			ERR_PRINTF2(_L("Property %d did not match."), i);
+			return EFalse;
+			}
+		}	
+	return ETrue;
+	}
+
+TBool operator ==(const CGlobalComponentId& lhsEntry, const CGlobalComponentId& rhsEntry)
+	{
+	return (lhsEntry.GlobalIdName() == rhsEntry.GlobalIdName()) && 
+		   (lhsEntry.SoftwareTypeName() == rhsEntry.SoftwareTypeName());
+	}
+
+TBool operator !=(const CGlobalComponentId& lhsEntry, const CGlobalComponentId& rhsEntry)
+	{
+	return !operator==(lhsEntry,rhsEntry);
+	}
+
+TBool operator ==(const CVersionedComponentId& lhsEntry, const CVersionedComponentId& rhsEntry)
+	{
+	return (lhsEntry.GlobalId() == rhsEntry.GlobalId()) &&
+		   ((lhsEntry.VersionFrom()?*lhsEntry.VersionFrom():KNullDesC()) == (rhsEntry.VersionFrom()?*rhsEntry.VersionFrom():KNullDesC())) &&
+		   ((lhsEntry.VersionTo()?*lhsEntry.VersionTo():KNullDesC()) == (rhsEntry.VersionTo()?*rhsEntry.VersionTo():KNullDesC()));
+	}
+
+TBool operator !=(CVersionedComponentId& lhsEntry, CVersionedComponentId& rhsEntry)
+	{
+	return !operator==(lhsEntry,rhsEntry);
+	}
+
+TBool CScrTestStep::CompareVersionedComponentIdsL(RPointerArray<CVersionedComponentId>& aFoundVerCompIdList, RPointerArray<CVersionedComponentId>& aExpectedVerCompIdList)
+	{
+	TInt foundVerCompIdsCount = aFoundVerCompIdList.Count();
+	TInt expectedVerCompIdsCount = aExpectedVerCompIdList.Count();
+	
+	if (foundVerCompIdsCount != expectedVerCompIdsCount)
+		{
+		ERR_PRINTF3(_L("The number of expected versioned component Ids %d did not match the number of found ones %d."), expectedVerCompIdsCount, foundVerCompIdsCount);
+		return EFalse; 
+		}
+	
+	for (TInt i = 0; i < foundVerCompIdsCount; ++i)
+		{
+		if (*aFoundVerCompIdList[i] != *aExpectedVerCompIdList[i])
+			{
+			ERR_PRINTF2(_L("Versioned Component Id %d did not match."), i);
+			return EFalse;
+			}
+		}	
+	
+	return ETrue;
+	}
+
+void CScrTestStep::CompareComponentIdsL(RArray<TComponentId>& aFoundComponents, RArray<TComponentId>& aExpectedComponents)
+	{
+	TInt foundComponentsCount = aFoundComponents.Count();
+	if (foundComponentsCount != aExpectedComponents.Count())
+		{
+		ERR_PRINTF3(_L("The number of expected components %d did not match the number of found components %d."), aExpectedComponents.Count(), foundComponentsCount);
+		SetTestStepResult(EFail);
+		return;			
+		}
+
+	aFoundComponents.Sort();
+	aExpectedComponents.Sort();	
+	for (TInt i = 0; i < foundComponentsCount; ++i)
+		{
+		if (aFoundComponents[i] < aExpectedComponents[i])
+			{
+			ERR_PRINTF2(_L("Component %d was not expected in the test."), aFoundComponents[i]);
+			SetTestStepResult(EFail);
+			break;
+			}
+		else if (aExpectedComponents[i] < aFoundComponents[i])
+			{
+			ERR_PRINTF2(_L("Component %d was expected, but not found."), aExpectedComponents[i]);
+			SetTestStepResult(EFail);
+			break;			
+			}
+		}	
+	}
+
+
+// Helper functions for getting commong attributes from configuration
+
+void CScrTestStep::GetSoftwareTypeNameL(TPtrC& aSwTypeName)
+	{
+	if (!GetStringFromConfig(ConfigSection(), KSoftwareTypeName, aSwTypeName))
+		PrintErrorL(_L("Software Type was not found!"), KErrNotFound);
+	}
+
+TBool CScrTestStep::GetGlobalIdNameL(TPtrC& aGlobalIdName)
+	{
+	if (!GetStringFromConfig(ConfigSection(), KGlobalIdName, aGlobalIdName))
+		return EFalse;
+	return ETrue;
+	}
+
+Usif::CGlobalComponentId* CScrTestStep::GetGlobalComponentIdLC()
+	{
+	TPtrC globalIdName;
+	if (!GetGlobalIdNameL(globalIdName))
+		PrintErrorL(_L("Global Id Name was not found!"), KErrNotFound);
+		
+	TPtrC swTypeName;
+	GetSoftwareTypeNameL(swTypeName);
+		
+	return CGlobalComponentId::NewLC(globalIdName, swTypeName);
+	}
+
+Usif::CGlobalComponentId* CScrTestStep::GetGlobalComponentIdLC(const TDesC& aGlobalIdName, const TDesC& aSwTypeName)
+	{
+	TPtrC globalIdName;
+	if (!GetStringFromConfig(ConfigSection(), aGlobalIdName, globalIdName))
+		PrintErrorL(_L("Global Id Name was not found!"), KErrNotFound);
+	
+	TPtrC swTypeName;
+	if (!GetStringFromConfig(ConfigSection(), aSwTypeName, swTypeName))
+		PrintErrorL(_L("Software Type Name was not found!"), KErrNotFound);
+	
+	return CGlobalComponentId::NewLC(globalIdName, swTypeName);
+	}
+
+HBufC* CScrTestStep::GetVersionFromConfigL(const TDesC& aVersionName)
+	{
+	TPtrC version(KNullDesC());
+	if(!GetStringFromConfig(ConfigSection(), aVersionName, version))
+		return NULL;
+	return version.AllocL();
+	}
+
+void CScrTestStep::GetExpectedVersionedComponentIdListL(RPointerArray<CVersionedComponentId>& aVerCompIdList)
+	{
+	TInt globalIdCount(0);
+	if(!GetIntFromConfig(ConfigSection(), KGlobalIdCount, globalIdCount))
+			PrintErrorL(_L("Global Id count was not found!"), KErrNotFound);
+			
+	TBuf<MAX_SCR_PARAM_LENGTH> paramGlobalIdName, paramSwTypeName, paramVersionFrom, paramVersionTo;
+	
+	for(TInt i=0; i<globalIdCount; ++i)
+		{
+		paramGlobalIdName = KGlobalIdName;	
+		paramSwTypeName = KSoftwareTypeName;
+		paramVersionFrom = KVersionFrom;
+		paramVersionTo = KVersionTo;
+		
+		GenerateIndexedAttributeNameL(paramGlobalIdName, i);
+		GenerateIndexedAttributeNameL(paramSwTypeName, i);
+		GenerateIndexedAttributeNameL(paramVersionFrom, i);
+		GenerateIndexedAttributeNameL(paramVersionTo, i);
+		
+		TPtrC globalIdName;
+		if (!GetStringFromConfig(ConfigSection(), paramGlobalIdName, globalIdName))
+			{
+			ERR_PRINTF2(_L("The %S param could not be found in configuration."), &paramGlobalIdName);
+			User::Leave(KErrNotFound);
+			}
+		
+		TPtrC swTypeName;
+		if (!GetStringFromConfig(ConfigSection(), paramSwTypeName, swTypeName))
+			{
+			ERR_PRINTF2(_L("The %S param could not be found in configuration."), &paramSwTypeName);
+			User::Leave(KErrNotFound);
+			}
+		
+		HBufC *versionFrom = GetVersionFromConfigL(paramVersionFrom);
+		if(versionFrom)
+			CleanupStack::PushL(versionFrom);
+		HBufC *versionTo = GetVersionFromConfigL(paramVersionTo);
+		if(versionTo)
+			CleanupStack::PushL(versionTo);
+				
+		CGlobalComponentId *globalId = CGlobalComponentId::NewLC(globalIdName, swTypeName);
+		CVersionedComponentId *verCompId = CVersionedComponentId::NewLC(*globalId, versionFrom, versionTo);
+		aVerCompIdList.AppendL(verCompId);
+		CleanupStack::Pop(verCompId); // owned by the array
+		CleanupStack::PopAndDestroy(globalId);
+		if(versionTo)
+			CleanupStack::PopAndDestroy(versionTo);
+		if(versionFrom)
+			CleanupStack::PopAndDestroy(versionFrom);
+		}
+	}
+
+void CScrTestStep::AppendSharedComponentIdL(Usif::TComponentId aComponentId)
+	{
+	TBuf<MAX_SCR_BUFFER_LENGTH> componentIdBuf;
+	ReadSharedDataL(KComponentIdName, componentIdBuf);
+	componentIdBuf.AppendNum(aComponentId);
+	componentIdBuf.Append(KComponentIdDelimeter);
+	WriteSharedDataL(KComponentIdName, componentIdBuf, ESetText);
+	}
+
+void CScrTestStep::ReadAllSharedComponentIdsL(RArray<TInt>& aComponentList)
+	{
+	TBuf<MAX_SCR_BUFFER_LENGTH> componentIdBuf;
+	ReadSharedDataL(KComponentIdName, componentIdBuf);
+		
+	TLex parser(componentIdBuf);
+	TChar currentChar;
+	
+	parser.Mark();
+	while(!parser.Eos())
+		{
+		currentChar = parser.Get();
+		if(KComponentIdDelimeter == currentChar)
+			{
+			TPtrC token = parser.MarkedToken();
+			TLex tokenLex(token);
+			TInt componentId;
+			tokenLex.Val(componentId);
+			aComponentList.AppendL(componentId);
+			parser.Mark();
+			}
+		}
+	}
+
+TInt CScrTestStep::ReadSharedComponentIdL(TInt aOffset)
+	{
+	RArray<TInt> componentList;
+	CleanupClosePushL(componentList);
+	ReadAllSharedComponentIdsL(componentList);
+	
+	TInt maxListIndex = componentList.Count() - 1;
+	if(aOffset<0 || aOffset>maxListIndex)
+		PrintErrorL(_L("Component Id offset is not valid!"), KErrArgument);
+	
+	TInt componentId = componentList[maxListIndex - aOffset];
+	CleanupStack::PopAndDestroy(&componentList);
+	return componentId;
+	}
+
+TBool CScrTestStep::GetLocaleFromConfigL(const TDesC& aParamName, TLanguage &aLocale)
+	{
+	TInt localeParam;
+	if (!GetIntFromConfig(ConfigSection(), aParamName, localeParam))
+		return EFalse;
+	aLocale = static_cast<TLanguage>(localeParam);
+	return ETrue;
+	}
+
+TBool CScrTestStep::GetLocaleFromConfigL(TLanguage &aLocale)
+	{
+	return GetLocaleFromConfigL(KPropertyLocaleParam, aLocale);
+	}
+
+TInt CScrTestStep::GetComponentIdL()
+	{
+	TInt componentId(0);
+	if(GetIntFromConfig(ConfigSection(), KComponentIdName, componentId))
+		return componentId;
+	
+	TInt componentIdOffset;
+	if (!GetIntFromConfig(ConfigSection(), KComponentIdOffsetName, componentIdOffset))
+		PrintErrorL(_L("ComponentId Offset was not found!"), KErrNotFound);
+	
+	componentId = ReadSharedComponentIdL(componentIdOffset);
+	INFO_PRINTF2(_L("Component Id %d"), componentId);
+	return componentId;
+	}
+
+void CScrTestStep::GetFileNameFromConfigL(TPtrC& aFileName)
+	{
+	if (!GetStringFromConfig(ConfigSection(), KFileName, aFileName))
+		PrintErrorL(_L("FileName was not found!"), KErrNotFound);
+	}
+
+void CScrTestStep::GetFileNameListFromConfigL(RPointerArray<HBufC>& aFileList)
+	{
+	TInt fileCount(0);
+	if(!GetIntFromConfig(ConfigSection(), KFileCount, fileCount))
+		PrintErrorL(_L("File count was not found!"), KErrNotFound);
+		
+	TBuf<MAX_SCR_PARAM_LENGTH> paramName;
+	for(TInt i=0; i<fileCount; ++i)
+		{
+		paramName = KFileName;	
+		GenerateIndexedAttributeNameL(paramName, i);
+		TPtrC fileName;
+		if (!GetStringFromConfig(ConfigSection(), paramName, fileName))
+			{
+			ERR_PRINTF2(_L("The File Name param %S could not be found in configuration."), &paramName);
+			User::Leave(KErrNotFound);
+			}
+		HBufC* fileNameBuf = fileName.AllocLC();
+		aFileList.AppendL(fileNameBuf);
+		CleanupStack::Pop(fileNameBuf);
+		}
+	}
+
+void CScrTestStep::GetComponentNameFromConfigL(TPtrC& aComponentName)
+	{
+	if(!GetStringFromConfig(ConfigSection(), KComponentName, aComponentName))
+		PrintErrorL(_L("Component name was not found!"), KErrNotFound);
+	}
+
+void CScrTestStep::GetVendorNameFromConfigL(TPtrC& aVendorName)
+	{
+	if(!GetStringFromConfig(ConfigSection(), KVendorName, aVendorName))
+		PrintErrorL(_L("Vendor name was not found!"), KErrNotFound);
+	}
+
+CComponentEntry* CScrTestStep::GetComponentEntryFromConfigLC(TBool aIsSingle, TInt aIndex)
+	{
+	// First, we need to generate the property name
+	TBuf<MAX_SCR_PARAM_LENGTH> componentIdParam, componentIdOffsetParam, componentNameParam, componentVendorParam, softwareTypeNameParam;
+	TBuf<MAX_SCR_PARAM_LENGTH> globalIdParam, installedDrivesParam, isRemovableParam, componentSizeParam, scomoStateParam, versionParam;
+	TBuf<MAX_SCR_PARAM_LENGTH> isDrmProtectedParam, isHiddenParam, isKnownRevokedParam, isOriginVerifiedParam; 
+	
+	componentIdParam = KComponentIdName;
+	componentIdOffsetParam = KComponentIdOffsetName;
+	componentNameParam = KComponentName;
+	componentVendorParam = KVendorName;
+	softwareTypeNameParam = KSoftwareTypeName;
+	globalIdParam = KGlobalIdName;
+	isRemovableParam = KRemovableName;
+	isDrmProtectedParam = KDrmProtectedName;
+	isHiddenParam = KHiddenName;
+	isKnownRevokedParam = KKnownRevokedName;
+	isOriginVerifiedParam = KOriginVerifiedName;
+	componentSizeParam = KComponentSizeName;
+	scomoStateParam = KComponentScomoStateName;
+	installedDrivesParam = KInstalledDrivesName;
+	versionParam = KVersionName;
+	
+	if (!aIsSingle)
+		{
+		GenerateIndexedAttributeNameL(componentIdParam, aIndex);
+		GenerateIndexedAttributeNameL(componentIdOffsetParam, aIndex);
+		GenerateIndexedAttributeNameL(componentNameParam, aIndex);
+		GenerateIndexedAttributeNameL(componentVendorParam, aIndex);
+		GenerateIndexedAttributeNameL(softwareTypeNameParam, aIndex);
+		GenerateIndexedAttributeNameL(globalIdParam, aIndex);
+		GenerateIndexedAttributeNameL(isRemovableParam, aIndex);
+		GenerateIndexedAttributeNameL(isDrmProtectedParam, aIndex);
+		GenerateIndexedAttributeNameL(isHiddenParam, aIndex);
+		GenerateIndexedAttributeNameL(isKnownRevokedParam, aIndex);
+		GenerateIndexedAttributeNameL(isOriginVerifiedParam, aIndex);
+		GenerateIndexedAttributeNameL(componentSizeParam, aIndex);
+		GenerateIndexedAttributeNameL(scomoStateParam, aIndex);
+		GenerateIndexedAttributeNameL(installedDrivesParam, aIndex);
+		GenerateIndexedAttributeNameL(versionParam, aIndex);
+		}
+		
+	TComponentId componentId(0);
+	if (!GetIntFromConfig(ConfigSection(), componentIdParam, componentId))
+		{
+		TInt componentIdOffset;
+		if (!GetIntFromConfig(ConfigSection(), componentIdOffsetParam, componentIdOffset))
+			PrintErrorL(_L("The component entry params %S and %S could not be found in configuration."), KErrNotFound, &componentIdParam, &componentIdOffsetParam);
+		
+		componentId = ReadSharedComponentIdL(componentIdOffset);
+		INFO_PRINTF2(_L("Component Id %d"), componentId);
+		}
+		
+	TPtrC componentName;
+	if (!GetStringFromConfig(ConfigSection(), componentNameParam, componentName))
+		PrintErrorL(_L("The component entry param %S could not be found in configuration."), KErrNotFound, &componentNameParam);
+			
+	TPtrC componentVendor;
+	if (!GetStringFromConfig(ConfigSection(), componentVendorParam, componentVendor))
+		PrintErrorL(_L("The component entry param %S could not be found in configuration."), KErrNotFound, &componentVendorParam);
+	
+	TPtrC softwareTypeName;
+	if (!GetStringFromConfig(ConfigSection(), softwareTypeNameParam, softwareTypeName))
+		PrintErrorL(_L("The component entry param %S could not be found in configuration."), KErrNotFound, &softwareTypeNameParam);
+	
+	TPtrC globalId(KNullDesC);
+	(void)GetStringFromConfig(ConfigSection(), globalIdParam, globalId); // This is an optional attribute. It is not crucial even if it is not provided.
+	
+	TBool isRemovable;
+	if (!GetBoolFromConfig(ConfigSection(), isRemovableParam, isRemovable))
+		PrintErrorL(_L("The component entry param %S could not be found in configuration."), KErrNotFound, &isRemovableParam);
+		
+	TInt64 componentSize;
+	if (!Get64BitIntegerFromConfigL(componentSizeParam, componentSize))
+		PrintErrorL(_L("The component entry param %S could not be found in configuration."), KErrNotFound, &componentSizeParam);	
+		
+	TInt scomoStateValue;
+	if (!GetIntFromConfig(ConfigSection(), scomoStateParam, scomoStateValue))
+		PrintErrorL(_L("The component entry param %S could not be found in configuration."), KErrNotFound, &scomoStateParam);
+	TScomoState scomoState = static_cast<TScomoState>(scomoStateValue);
+			
+	TDriveList driveList;
+	if(!GetInstalledDrivesFromConfigL(driveList, installedDrivesParam))
+		PrintErrorL(_L("The component entry param %S could not be found in configuration."), KErrNotFound, &installedDrivesParam);
+		
+	TPtrC version;
+	if (!GetStringFromConfig(ConfigSection(), versionParam, version))
+		PrintErrorL(_L("The component entry param %S could not be found in configuration."), KErrNotFound, &versionParam);
+	
+	TBool isDrmProtected = EFalse;
+	(void)GetBoolFromConfig(ConfigSection(), isDrmProtectedParam, isDrmProtected); // This is an optional attribute. It is not crucial even if it is not provided.
+
+	TBool isHidden = EFalse;
+	(void)GetBoolFromConfig(ConfigSection(), isHiddenParam, isHidden); // This is an optional attribute. It is not crucial even if it is not provided.
+	
+	TBool isKnownRevoked = EFalse;
+	(void)GetBoolFromConfig(ConfigSection(), isKnownRevokedParam, isKnownRevoked); // This is an optional attribute. It is not crucial even if it is not provided.
+		
+	TBool isOriginVerified = EFalse;
+	(void)GetBoolFromConfig(ConfigSection(), isOriginVerifiedParam, isOriginVerified); // This is an optional attribute. It is not crucial even if it is not provided.
+	
+	_LIT(KInstallTime, "20080706:112000");	
+	
+	return CComponentEntry::NewLC(componentId, componentName, componentVendor, softwareTypeName, globalId, isRemovable, componentSize, scomoState, driveList, version, KInstallTime, isDrmProtected, isHidden, isKnownRevoked, isOriginVerified);
+	}
+
+void CScrTestStep::GenerateIndexedAttributeNameL(TDes& aInitialAttributeName, TInt aIndex)
+	{
+	const TInt MAX_INT_STR_LEN = 8;
+	TBuf<MAX_INT_STR_LEN> integerAppendStr;
+	integerAppendStr.Format(_L("%d"), aIndex);
+	aInitialAttributeName.Append(integerAppendStr);
+	}
+
+TBool CScrTestStep::Get64BitIntegerFromConfigL(const TDesC& aConfigKeyName, TInt64& aRetVal)
+	{
+	TPtrC int64Str;
+	if (!GetStringFromConfig(ConfigSection(), aConfigKeyName, int64Str))
+		return EFalse;
+
+	TLex lex(int64Str);
+	User::LeaveIfError(lex.Val(aRetVal));
+	return ETrue;
+	}
+
+CPropertyEntry* CScrTestStep::GetPropertyFromConfigLC(TBool aIsSingle, TInt aIndex, TBool aSupportLocalized)
+	{
+	// This function can be used for getting a single property, which is defined by attributes such as PropertyName etc.
+	// or a property in a set - in this case the properties would be PropertyType0, PropertyName0 etc.
+	// aIsSingle defines the working mode. aIndex applies only if aIsSingle is false
+	
+	// First, we need to generate the property name
+	TBuf<MAX_SCR_PARAM_LENGTH> propertyTypeParam, propertyNameParam, propertyValueParam, propertyLocaleParam;
+	propertyTypeParam = KPropertyTypeParam;
+	propertyNameParam = KPropertyNameParam;
+	propertyValueParam = KPropertyValueParam;
+	propertyLocaleParam = KPropertyLocaleParam;
+	if (!aIsSingle)
+		{
+		GenerateIndexedAttributeNameL(propertyTypeParam, aIndex);
+		GenerateIndexedAttributeNameL(propertyNameParam, aIndex);
+		GenerateIndexedAttributeNameL(propertyValueParam, aIndex);
+		GenerateIndexedAttributeNameL(propertyLocaleParam, aIndex);
+		}
+
+	TPtrC propertyName;
+	if (!GetStringFromConfig(ConfigSection(), propertyNameParam, propertyName))
+		{
+		ERR_PRINTF2(_L("The property name param %S could not be found in configuration."), &propertyNameParam);
+		User::Leave(KErrNotFound);
+		}
+	
+	TInt propertyTypeInt;
+	if (!GetIntFromConfig(ConfigSection(), propertyTypeParam, propertyTypeInt))
+		{
+		ERR_PRINTF2(_L("The property type param %S could not be found in configuration."), &propertyTypeParam);
+		User::Leave(KErrNotFound);
+		}
+	
+	CPropertyEntry::TPropertyType propertyType = static_cast<CPropertyEntry::TPropertyType>(propertyTypeInt);
+	
+	CPropertyEntry* propertyEntry(NULL);
+	switch (propertyType)
+		{
+		case CPropertyEntry::EBinaryProperty:
+		case CPropertyEntry::ELocalizedProperty:
+			{
+			TPtrC propertyStrValue;
+			if (!GetStringFromConfig(ConfigSection(), propertyValueParam, propertyStrValue))
+				{
+				ERR_PRINTF2(_L("The property value param %S could not be found in configuration."), &propertyValueParam);
+				User::Leave(KErrNotFound);
+				}
+			if(!aSupportLocalized || propertyType == CPropertyEntry::EBinaryProperty)
+				{
+				HBufC8* buffer8Bit = ConvertBufferTo8bitL(propertyStrValue);
+				CleanupStack::PushL(buffer8Bit);
+				propertyEntry = CBinaryPropertyEntry::NewL(propertyName, *buffer8Bit);
+				CleanupStack::PopAndDestroy(buffer8Bit);
+				break;
+				}
+			// Handle ELocalProperty case
+			TLanguage locale;
+			if (!GetLocaleFromConfigL(propertyLocaleParam, locale))
+				{
+				ERR_PRINTF2(_L("The property locale param %S could not be found in configuration."), &propertyLocaleParam);
+				User::Leave(KErrNotFound);	
+				}
+			propertyEntry = CLocalizablePropertyEntry::NewL(propertyName, propertyStrValue, locale);
+			break;						
+			}
+		case CPropertyEntry::EIntProperty:
+			{
+			TInt64 int64Value;
+			if (!Get64BitIntegerFromConfigL(propertyValueParam, int64Value))
+				{
+				ERR_PRINTF2(_L("The integer param %S could not be found in configuration."), &propertyValueParam);
+				User::Leave(KErrNotFound);
+				}
+			propertyEntry = CIntPropertyEntry::NewL(propertyName, int64Value);
+			break;
+			}			
+		}
+	CleanupStack::PushL(propertyEntry);
+	return propertyEntry;
+	}
+
+void CScrTestStep::GetPropertiesFromConfigL(RPointerArray<CPropertyEntry>& aProperties, TBool aSupportLocalized)
+	{
+	TInt propertiesCount = 0;
+	if (!GetIntFromConfig(ConfigSection(), KPropertiesCountParamName, propertiesCount))
+		PrintErrorL(_L("Properties count was not found!"), KErrNotFound);
+	
+	if (propertiesCount < 0)
+		PrintErrorL(_L("Properties count is negative!"), KErrNotFound);
+	
+	for (TInt i = 0; i < propertiesCount; ++i)
+		{
+		CPropertyEntry *propertyEntry = GetPropertyFromConfigLC(EFalse, i, aSupportLocalized);
+		User::LeaveIfError(aProperties.Append(propertyEntry));
+		CleanupStack::Pop(propertyEntry);
+		}
+	}
+
+void CScrTestStep::GetComponentIdsFromConfigL(RArray<TComponentId>& aComponentIds)
+	{
+	TInt componentsCount = 0;
+	if (!GetIntFromConfig(ConfigSection(), KComponentsCountName, componentsCount))
+		PrintErrorL(_L("Components count was not found!"), KErrNotFound);
+		
+	TBuf<MAX_SCR_PARAM_LENGTH> paramName;
+	 
+	for (TInt i = 0; i < componentsCount; ++i)
+		{
+		paramName = KComponentIdOffsetName;	
+		GenerateIndexedAttributeNameL(paramName, i);
+		TInt componentIdOffset(0);
+		if (!GetIntFromConfig(ConfigSection(), paramName, componentIdOffset))
+			{
+			ERR_PRINTF2(_L("The component id param %S could not be found in configuration."), &paramName);
+			User::Leave(KErrNotFound);
+			}
+		TInt componentId = ReadSharedComponentIdL(componentIdOffset);
+		aComponentIds.AppendL(componentId);
+		}
+	}
+
+void CScrTestStep::GetComponentLocalizablesFromConfigL(TInt aIndex, TPtrC& aName, TPtrC& aVendor, TLanguage& aLocale)
+	{
+	TBuf<20> vendorParamName, componentParamName, localeParamName;
+	vendorParamName = KVendorName;
+	GenerateIndexedAttributeNameL(vendorParamName, aIndex);
+			
+	componentParamName = KComponentName;
+	GenerateIndexedAttributeNameL(componentParamName, aIndex);
+			
+	localeParamName = KComponentLocaleName;
+	GenerateIndexedAttributeNameL(localeParamName, aIndex);
+			
+	if (!GetStringFromConfig(ConfigSection(), componentParamName, aName))
+		PrintErrorL(_L("Localised component name was not found!"), KErrNotFound);
+	if (!GetStringFromConfig(ConfigSection(), vendorParamName, aVendor))
+		PrintErrorL(_L("Localised vendor name was not found!"), KErrNotFound);
+	if (!GetLocaleFromConfigL(localeParamName, aLocale))
+		PrintErrorL(_L("Locale was not found!"), KErrNotFound);
+	}
+
+void CScrTestStep::GetLocalisedComponentsFromConfigL(RPointerArray<Usif::CLocalizableComponentInfo>& aComponentInfo)
+	{
+	TInt localesCount = 0;
+	if (!GetIntFromConfig(ConfigSection(), _L("LocalesCount"), localesCount))
+		PrintErrorL(_L("Locales count was not found!"), KErrNotFound);	
+	
+	for (TUint i = 0; i < localesCount; ++i)
+		{
+		TPtrC componentName, vendorName;
+		TLanguage locale;
+		GetComponentLocalizablesFromConfigL(i, componentName, vendorName, locale);
+		
+		CLocalizableComponentInfo* localisableComponentInfo(0);
+		// If-condition is used for the sake of coverage 
+		if(i)
+			{
+			localisableComponentInfo = CLocalizableComponentInfo::NewLC(componentName, vendorName, locale);
+			}
+		else
+			{
+			localisableComponentInfo = CLocalizableComponentInfo::NewL(componentName, vendorName, locale);
+			CleanupStack::PushL(localisableComponentInfo);
+			}
+		aComponentInfo.AppendL(localisableComponentInfo);
+		CleanupStack::Pop(localisableComponentInfo);
+		}	
+	}
+
+TBool CScrTestStep::GetInstalledDrivesFromConfigL(TDriveList& aDriveList, const TDesC& aAttributeName)
+	{
+	TPtrC installedDrives;
+	if (!GetStringFromConfig(ConfigSection(), aAttributeName, installedDrives))
+		{
+		return EFalse;
+		}
+	
+	TLex parser(installedDrives);
+	TChar currentChar;
+	aDriveList.FillZ(KMaxDrives);
+	
+	parser.Mark();
+	while(!parser.Eos())
+		{
+		currentChar = parser.Get();
+		if(KComponentIdDelimeter == currentChar || parser.Eos())
+			{
+			TPtrC token = parser.MarkedToken();
+			TLex tokenLex(token);		
+			TInt driveNumber(0);
+			driveNumber = token[0] - 'A';
+			if(driveNumber < EDriveA || driveNumber > EDriveZ)
+				{
+				ERR_PRINTF3(_L("%S contains an unexpected token(%S)."), &aAttributeName, &token);
+				User::Leave(KErrArgument);
+				}
+			++aDriveList[driveNumber];
+			parser.Mark();
+			}
+		}
+	return ETrue;
+	}
+
+TBool CScrTestStep::GetScomoStateFromConfigL(TScomoState& aScomoState, const TDesC& aAttributeName)
+	{
+	TInt tempScomoState(0);
+	if (!GetIntFromConfig(ConfigSection(), aAttributeName, tempScomoState))
+		return EFalse;
+		
+	aScomoState = static_cast<TScomoState>(tempScomoState);
+	return ETrue;
+	}
+
+
+TInt CScrTestStep::GetSetSizeFromConfigL()
+	{
+	TInt setSize(1);
+	GetIntFromConfig(ConfigSection(), KSetSizeName, setSize);
+	if (setSize < 1)
+		PrintErrorL(_L("Invalid set size in component filter definition"), KErrArgument);
+	return setSize;
+	}
+
+Usif::TComponentId CScrTestStep::AddNonLocalisableComponentL()
+	{
+	TPtrC componentName;
+	GetComponentNameFromConfigL(componentName);
+	TPtrC vendorName;;
+	GetVendorNameFromConfigL(vendorName);
+	TPtrC swTypeName;
+	GetSoftwareTypeNameL(swTypeName);
+	
+	TScrComponentOperationType operationType(EScrCompInstall);
+	TInt opTypeInt(0);
+	if(GetIntFromConfig(ConfigSection(), KOperationType, opTypeInt))
+		{
+		operationType = static_cast<TScrComponentOperationType>(opTypeInt);
+		}
+		
+	Usif::TComponentId componentId;
+	TPtrC globalIdName;
+	if(GetGlobalIdNameL(globalIdName))
+		componentId = iScrSession.AddComponentL(componentName, vendorName, swTypeName, &globalIdName, operationType);
+	else
+		componentId = iScrSession.AddComponentL(componentName, vendorName, swTypeName, NULL, operationType);
+	
+	return componentId;
+	}
+
+void CScrTestStep::ReadFilterPropertiesL(CComponentFilter* aFilter, TInt aPropertiesCount)
+	{
+	for (TInt i = 0; i < aPropertiesCount; ++i)
+		{		
+		TBuf<MAX_SCR_PARAM_LENGTH> propertyNameParam, intAttributeParam, strAttributeParam, localeAttributeParam;
+		
+		propertyNameParam = _L("FilterPropertyName");
+		GenerateIndexedAttributeNameL(propertyNameParam, i);
+				
+		TPtrC propertyName;
+		if (!GetStringFromConfig(ConfigSection(), propertyNameParam, propertyName))
+			{			
+			PrintErrorL(_L("Property name for property was not found in filter"), KErrNotFound);
+			}		
+		
+		intAttributeParam = _L("FilterIntProperty");
+		GenerateIndexedAttributeNameL(intAttributeParam, i);		
+		
+		strAttributeParam = _L("FilterStringProperty");
+		GenerateIndexedAttributeNameL(strAttributeParam, i);
+		
+		localeAttributeParam = _L("FilterPropertyLocale");
+		GenerateIndexedAttributeNameL(localeAttributeParam, i);		
+		
+		TPtrC propertyStrValue;		
+		TInt64 int64Value;
+		
+		if (Get64BitIntegerFromConfigL(intAttributeParam, int64Value))
+			{			
+			aFilter->AddPropertyL(propertyName, int64Value);
+			continue;
+			}
+		
+		if (!GetStringFromConfig(ConfigSection(), strAttributeParam, propertyStrValue))
+			continue;
+
+		TLanguage locale;
+		if (GetLocaleFromConfigL(localeAttributeParam, locale))
+			{
+			aFilter->AddPropertyL(propertyName, propertyStrValue, locale);
+			}
+		else
+			{
+			HBufC8* buffer8bit = ConvertBufferTo8bitL(propertyStrValue);
+			CleanupStack::PushL(buffer8bit);
+			aFilter->AddPropertyL(propertyName, *buffer8bit);
+			CleanupStack::PopAndDestroy(buffer8bit);
+			}									
+		} 
+	}
+
+CComponentFilter* CScrTestStep::ReadComponentFilterFromConfigLC()
+	{
+	CComponentFilter* componentFilter = CComponentFilter::NewLC();
+	
+	TPtrC filterName;
+	if (GetStringFromConfig(ConfigSection(), _L("FilterName"), filterName))
+		componentFilter->SetNameL(filterName);
+	
+	TPtrC filterVendor;
+	if (GetStringFromConfig(ConfigSection(), _L("FilterVendor"), filterVendor))
+		componentFilter->SetVendorL(filterVendor);
+	
+	TPtrC filterSwType;
+	if (GetStringFromConfig(ConfigSection(), _L("FilterSoftwareType"), filterSwType))
+	componentFilter->SetSoftwareTypeL(filterSwType);
+	
+	TScomoState scomoState;
+	if (GetScomoStateFromConfigL(scomoState, _L("FilterScomoState")))
+		componentFilter->SetScomoStateL(scomoState);
+	
+	TDriveList filterInstalledDrives;
+	_LIT(KFilterInstalledDrives, "FilterDrivesList");
+	if (GetInstalledDrivesFromConfigL(filterInstalledDrives, KFilterInstalledDrives()))
+		componentFilter->SetInstalledDrivesL(filterInstalledDrives);
+	
+	TBool filterIsRemovable(EFalse);
+	if (GetBoolFromConfig(ConfigSection(), _L("FilterIsRemovable"), filterIsRemovable))
+		componentFilter->SetRemovable(filterIsRemovable);
+	
+	TInt propertiesCount(0);
+	if (GetIntFromConfig(ConfigSection(), _L("FilterPropertiesCount"), propertiesCount))
+		{
+		ReadFilterPropertiesL(componentFilter, propertiesCount);
+		}
+		
+	TPtrC filterFile;
+	if (GetStringFromConfig(ConfigSection(), _L("FilterFile"), filterFile))
+		componentFilter->SetFileL(filterFile);
+	
+	TBool filterIsDrmProtected(EFalse);
+	if (GetBoolFromConfig(ConfigSection(), _L("FilterIsDrmProtected"), filterIsDrmProtected))
+		componentFilter->SetDrmProtected(filterIsDrmProtected);
+	
+	TBool filterIsHidden(EFalse);
+	if (GetBoolFromConfig(ConfigSection(), _L("FilterIsHidden"), filterIsHidden))
+		componentFilter->SetHidden(filterIsHidden);
+	
+	TBool filterIsKnownRevoked(EFalse);
+	if (GetBoolFromConfig(ConfigSection(), _L("FilterIsKnownRevoked"), filterIsKnownRevoked))
+		componentFilter->SetKnownRevoked(filterIsKnownRevoked);
+	
+	TBool filterIsOriginVerified(EFalse);
+	if (GetBoolFromConfig(ConfigSection(), _L("FilterIsOriginVerified"), filterIsOriginVerified))
+		componentFilter->SetOriginVerified(filterIsOriginVerified);
+	
+	return componentFilter;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscraccessor/inc/tscraccessor_client.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* SCR Accessor - client interface
+*
+*/
+
+
+/**
+ @file 
+ @test
+ @internalComponent
+*/
+
+#ifndef TSCRACCESSOR_CLIENT_H
+#define TSCRACCESSOR_CLIENT_H
+
+#include <e32std.h>
+#include <usif/scr/scr.h>
+
+
+class RScrAccessor : public RSessionBase
+	{
+public:
+	enum TAccessorOperationType
+		{
+		EAddNonLocalizedSoftwareType,
+		EAddLocalizedSoftwareType,
+		EAddSofwtareTypeWithoutMimeTypes,
+		EAddLocalizedSoftwareTypeWithDifferentPluginUid,
+		EAddLocalizedSoftwareTypeWithExtraName,
+		EAddLocalizedSoftwareTypeWithMissingName,
+		EAddLocalizedSoftwareTypeWithExtraMime,
+		EAddLocalizedSoftwareTypeWithMissingMime,
+		};
+	
+	enum TAccessorOperationResult
+		{
+		EOpSucessful,
+		EOpFailSwTypeNotFound,
+		EOpFailUnexpectedPluginUid,
+		EOpFailUnexpectedMimeTypeNum,
+		EOpFailReturnedUnexpectedMimeType,
+		EOpFailSwTypeStillExists
+		};
+public: 
+	TInt Connect();
+
+	/**
+	 	Adds a new software type name to the SCR database. 
+	 	The properties of the software type are chosen by the server.
+		
+		@param aOpType The type of the software type adding operation. For example, add a software type with localized names.
+		@param aOpResult Specific information about the result of the operation.
+		@param aSpentTimeInMillisecond The time spent to perform this operation.
+	 */
+	void AddSoftwareTypeL(TAccessorOperationType aOpType, TAccessorOperationResult& aOpResult, TInt& aSpentTimeInMillisecond);
+	
+	/**
+		Deletes a sofware type name entry and all its mime types from the registry.
+		The server decides which software type will be deleted.
+		
+		@param aOpResult Specific information about the result of the operation.				
+		@param aSpentTimeInMillisecond The time spent to perform this operation.
+	 */
+	void DeleteSoftwareTypeL(TAccessorOperationResult& aOpResult, TInt& aSpentTimeInMillisecond);
+	
+	/**
+		Deletes a given file from the system.
+		This function is intended to mainly delete TCB files.
+		
+		@param aFilePath The full path of the file being deleted.
+		@return KErrNone if successful, otherwise one of the other system-wide error codes.
+	 */
+	TInt DeleteFile(const TDesC& aFilePath);
+	
+	/**
+		Copies a given file into a destination file.
+		This function is intended to mainly copy TCB files.
+			
+		@param aSourceFilePath Path indicating the file to be copied.
+		@param aDestinationFilePath Path indicating the directory into which the file is to be copied.
+		@return KErrNone if successful, otherwise one of the other system-wide error codes.
+	 */
+	TInt CopyFile(const TDesC& aSourceFilePath, const TDesC& aDestinationFilePath);
+	};
+
+#endif	// TSCRACCESSOR_CLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscraccessor/inc/tscraccessor_common.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,38 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* SCR Accessor - shared client/server definitions
+*
+*/
+
+
+/**
+ @file 
+ @test
+ @internalComponent
+*/
+
+#include <e32std.h>
+
+_LIT(KScrAccessServerName, "ScrAcessorServer");
+_LIT(KScrAccessServerBinary, "tscraccessor");		// EXE name
+const TUid KScrAccessServerUid3 = {0x10202DCA};
+
+enum TScrAccessMessages
+	{
+	EAddSoftwareType,
+	EDeleteSoftwareType,
+	EDeleteFile,
+	ECopyFile
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscraccessor/inc/tscraccessor_server_session.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,84 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Scr Acessor - server and session classes
+*
+*/
+
+
+/**
+ @file 
+ @test
+ @internalComponent
+*/
+
+#ifndef TSCRACCESSOR_SERVER_SESSION_H
+#define TSCRACCESSOR_SERVER_SESSION_H
+
+#include <e32base.h>
+#include <usif/scr/scr.h>
+
+//////////////////////// Server declarations /////////////////////////
+
+enum TScrAccessPanic
+	{
+	EPanicBadDescriptor,
+	EPanicIllegalFunction
+	};
+
+void PanicClient(const RMessagePtr2& aMessage, TScrAccessPanic aPanic);
+
+class CScrAccessServer : public CServer2
+	{
+public:
+	static CServer2* NewLC();
+	virtual ~CScrAccessServer();
+	void AddSession();
+	void DropSession();
+	inline Usif::RSoftwareComponentRegistry& ScrSession();
+private:
+	CScrAccessServer();
+	void ConstructL();
+	CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
+private:
+	TInt iSessionCount;
+	Usif::RSoftwareComponentRegistry iScrSession;
+	};
+
+inline Usif::RSoftwareComponentRegistry& CScrAccessServer::ScrSession()
+	{
+	return iScrSession;
+	}
+
+//////////////////////// Session declarations /////////////////////////
+
+class CScrAccessSession : public CSession2
+	{
+public:
+	CScrAccessSession();
+	void CreateL();
+private:
+	~CScrAccessSession();
+	inline CScrAccessServer& Server();
+	void ServiceL(const RMessage2& aMessage);
+	void ServiceError(const RMessage2& aMessage, TInt aError);
+private:
+	RMessagePtr2 iReceiveMsg;
+	};
+
+inline CScrAccessServer& CScrAccessSession::Server()
+	{return *static_cast<CScrAccessServer*>(const_cast<CServer2*>(CSession2::Server()));}
+
+#endif	// TSCRACCESSOR_SERVER_SESSION_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscraccessor/source/tscraccessor_client.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,105 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Scr Accessor - client interface implementation
+*
+*/
+
+
+/**
+ @file 
+ @test
+ @internalComponent
+*/
+ 
+#include "tscraccessor_client.h"
+#include "tscraccessor_common.h"
+
+static TInt StartScrAccessServer()
+	{
+	const TUidType serverUid(KNullUid, KNullUid, KScrAccessServerUid3);
+	RProcess server;
+	TInt err = server.Create(KScrAccessServerBinary, KNullDesC, serverUid);
+	if (err != KErrNone)
+		{
+		return err;
+		}
+	TRequestStatus stat;
+	server.Rendezvous(stat);
+	if (stat != KRequestPending)
+		{
+		server.Kill(0);		// abort startup
+		}
+	else
+		{
+		server.Resume();	// logon OK - start the server
+		}
+	User::WaitForRequest(stat);		// wait for start or death
+	// we can't use the 'exit reason' if the server panicked as this
+	// is the panic 'reason' and may be '0' which cannot be distinguished
+	// from KErrNone
+	err = (server.ExitType() == EExitPanic) ? KErrGeneral : stat.Int();
+	server.Close();
+	return err;
+	}
+
+//
+// Connect to the server, attempting to start it if necessary
+//
+TInt RScrAccessor::Connect()
+	{
+	TInt retry = 2;
+	for (;;)
+		{
+		TInt err = CreateSession(KScrAccessServerName, TVersion(0, 0, 0), 2);
+		if (err != KErrNotFound && err != KErrServerTerminated)
+			{
+			return err;
+			}
+		if (--retry == 0)
+			{
+			return err;
+			}
+		err = StartScrAccessServer();
+		if (err != KErrNone && err != KErrAlreadyExists)
+			{
+			return err;
+			}
+		}
+	}
+
+void RScrAccessor::AddSoftwareTypeL(TAccessorOperationType aOpType, TAccessorOperationResult& aOpResult, TInt& aSpentTimeInMillisecond)
+	{
+	TPckg<TAccessorOperationResult> opResult(aOpResult);
+	TPckg<TInt> time(aSpentTimeInMillisecond);
+	User::LeaveIfError(SendReceive(EAddSoftwareType, TIpcArgs(aOpType, &opResult, &time)));
+	}
+
+void RScrAccessor::DeleteSoftwareTypeL(TAccessorOperationResult& aOpResult, TInt& aSpentTimeInMillisecond)
+	{
+	TPckg<TAccessorOperationResult> opResult(aOpResult);
+	TPckg<TInt> time(aSpentTimeInMillisecond);
+	User::LeaveIfError(SendReceive(EDeleteSoftwareType, TIpcArgs(&opResult, &time)));
+	}
+
+TInt RScrAccessor::DeleteFile(const TDesC& aFilePath)
+	{
+	return SendReceive(EDeleteFile, TIpcArgs(&aFilePath));
+	}
+
+TInt RScrAccessor::CopyFile(const TDesC& aSourceFilePath, const TDesC& aDestinationFilePath)
+	{
+	return SendReceive(ECopyFile, TIpcArgs(&aSourceFilePath, &aDestinationFilePath));
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscraccessor/source/tscraccessor_server_session.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,408 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Scr Accessor - server and implementation
+*
+*/
+
+
+/**
+ @file 
+ @test
+ @internalComponent
+*/
+
+#include "tscraccessor_server_session.h"
+#include "tscraccessor_common.h"
+#include "tscraccessor_client.h"
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "screntries_internal.h"
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+#include <scs/cleanuputils.h>
+#include <usif/usiferror.h>
+
+using namespace Usif;
+
+/////////////////////// Utility functions //////////////////////////////
+void StartTimer(TTime& aTimer)
+	{
+	aTimer.HomeTime();
+	}
+
+TInt StopTimer(TTime aStartTimer)
+	{
+	TTime endTime;
+	endTime.HomeTime();
+		
+	TTimeIntervalMicroSeconds duration = endTime.MicroSecondsFrom(aStartTimer);
+	TInt actualDuration = I64INT(duration.Int64())/1000; // in millisecond
+	return actualDuration;
+	}
+
+//////////////////////// Server implementation /////////////////////////
+
+CServer2* CScrAccessServer::NewLC()
+	{
+	CScrAccessServer* self=new(ELeave) CScrAccessServer;
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+
+CScrAccessServer::CScrAccessServer()
+	:CServer2(0, ESharableSessions)
+	{
+	}
+
+CScrAccessServer::~CScrAccessServer()
+	{
+	iScrSession.Close();
+	}
+
+void CScrAccessServer::ConstructL()
+	{
+	StartL(KScrAccessServerName);
+	}
+
+CSession2* CScrAccessServer::NewSessionL(const TVersion&, const RMessage2&) const
+	{
+	return new(ELeave) CScrAccessSession();
+	}
+
+void CScrAccessServer::AddSession()
+	{
+	++iSessionCount;
+	}
+
+void CScrAccessServer::DropSession()
+	{
+	--iSessionCount;
+	if(!iSessionCount)
+		CActiveScheduler::Stop();
+	}
+
+
+//////////////////////// Session implementation /////////////////////////
+CScrAccessSession::CScrAccessSession()
+	{
+	}
+
+void CScrAccessSession::CreateL()
+	{
+	Server().AddSession();
+	}
+
+CScrAccessSession::~CScrAccessSession()
+	{
+	Server().DropSession();
+	}
+
+HBufC* ReadDescFromMessageLC(const RMessage2& aMessage, TInt aSlot)
+	{
+	TInt len = aMessage.GetDesLengthL(aSlot);
+	HBufC* desc = HBufC::NewLC(len);
+	TPtr ptrDesc(desc->Des());
+	aMessage.ReadL(aSlot, ptrDesc);
+	return desc;
+	}
+
+void VerifySoftwareTypeAdditionL(TInt& aError, RScrAccessor::TAccessorOperationResult& aOpResult, RSoftwareComponentRegistry& aScrSession, const TDesC& aMimeType, TUid aExpectedPluginUid)
+	{
+	// Do verification, there is no error until this step
+	if(KErrNone == aError)
+		{ // if adding software type operation is successful, check if the software type has really been added to teh sCR.
+		  // Get the plugin uid of the newly added MIME type
+		TUid retrievedPluginUid;
+		TRAP(aError, retrievedPluginUid = aScrSession.GetPluginUidL(aMimeType));
+		if(KErrNone == aError)
+			{ // if the plugin uid is found, then compare it with the expected one.
+			if(retrievedPluginUid != aExpectedPluginUid)
+				aOpResult = RScrAccessor::EOpFailUnexpectedPluginUid;
+			}
+		else if(KErrNotFound == aError)
+			aOpResult = RScrAccessor::EOpFailSwTypeNotFound;
+		// if the returned error is different from KErrNone and KErrNotFound, pass it to the client.
+		}
+	}
+
+void GenerateTestDataL(RPointerArray<HBufC>& aMimeTypes, const TDesC& aBaseMimeTypeName, TInt aMimeTypeNum, RPointerArray<CLocalizedSoftwareTypeName>& aLocalizedSwTypeNames, const TDesC& aBaseSwTypeName, TInt aSwTypesNum)
+	{
+	RBuf buf;
+	buf.CreateL(aBaseMimeTypeName.Length() + 3); // 3 is extra bytes to append number to the buffer
+	buf.CleanupClosePushL();
+	buf.Copy(aBaseMimeTypeName);
+	
+	for(TInt i=0; i<aMimeTypeNum; ++i)
+		{
+		buf.AppendNum(i);
+		HBufC *name = buf.AllocLC();
+		aMimeTypes.AppendL(name);
+		CleanupStack::Pop(name);
+		buf.SetLength(buf.Length()-1);
+		}
+	buf.Close();
+	
+	buf.CreateL(aBaseSwTypeName.Length() + 3);
+	buf.Copy(aBaseSwTypeName);
+	
+	for(TInt i=0; i<aSwTypesNum; ++i)
+		{
+		buf.AppendNum(i);
+		CLocalizedSoftwareTypeName *localizedName = CLocalizedSoftwareTypeName::NewL(buf, TLanguage(i+1));
+		CleanupStack::PushL(localizedName); // Use NewL for coverage
+		aLocalizedSwTypeNames.AppendL(localizedName);
+		CleanupStack::Pop(localizedName); // ownership is transferred
+		}
+	CleanupStack::PopAndDestroy(&buf);
+	}
+
+TInt AddSoftwareTypeL(RSoftwareComponentRegistry& aScrSession, const TDesC& aUniqueSwTypeName, TUid aSifPluginUid, TSecureId aInstallerSid, TSecureId aExecutionLayerSid, const TDesC& aBaseMimeTypeName, TInt aMimeTypeNum, const TDesC& aBaseSwTypeName, TInt aSwTypesNum, RScrAccessor::TAccessorOperationResult& aOpResult)
+	{
+	RPointerArray<HBufC> mimeTypesArray;
+	CleanupResetAndDestroyPushL(mimeTypesArray);
+	RPointerArray<CLocalizedSoftwareTypeName> localizedSwNames;
+	CleanupResetAndDestroyPushL(localizedSwNames);
+						
+	GenerateTestDataL(mimeTypesArray, aBaseMimeTypeName, aMimeTypeNum, localizedSwNames, aBaseSwTypeName, aSwTypesNum);
+	
+	RPointerArray<CLocalizedSoftwareTypeName> *plocalizedSwNames = 	&localizedSwNames;
+	if(!aSwTypesNum)
+		plocalizedSwNames = NULL;
+	
+	HBufC *mimeType2BChecked (0);
+	if(mimeTypesArray.Count() > 0)
+		mimeType2BChecked = mimeTypesArray[0]->AllocLC();
+	else
+		mimeType2BChecked = KNullDesC().AllocLC();
+	
+	TRAPD(err, aScrSession.AddSoftwareTypeL(aUniqueSwTypeName, aSifPluginUid, aInstallerSid, aExecutionLayerSid, mimeTypesArray, plocalizedSwNames));
+	VerifySoftwareTypeAdditionL(err, aOpResult, aScrSession, *mimeType2BChecked, aSifPluginUid);
+	CleanupStack::PopAndDestroy(3, &mimeTypesArray); // mimeTypesArray, localizedSwNames, mimeType2BChecked
+	return err;
+	}
+
+void CScrAccessSession::ServiceL(const RMessage2& aMessage)
+	{
+	TInt err(0);
+	TTime timer;
+	StartTimer(timer);
+	TInt actualTestDuration(0);
+	
+	RScrAccessor::TAccessorOperationResult opResult = RScrAccessor::EOpSucessful;
+	
+	TScrAccessMessages f = static_cast<TScrAccessMessages>(aMessage.Function());
+	
+	if(EAddSoftwareType == f || EDeleteSoftwareType == f)
+		{
+		User::LeaveIfError(Server().ScrSession().Connect());
+		// create transaction on SCR for mutable operations
+		Server().ScrSession().CreateTransactionL();
+		}
+	
+	switch (f)
+		{
+		case EAddSoftwareType:
+			{
+			RScrAccessor::TAccessorOperationType opType = static_cast<RScrAccessor::TAccessorOperationType>(aMessage.Int0());
+			
+			TUid localizedSifPluginUid = {0xA01B7222};
+			_LIT_SECURE_ID(localizedInstallerSid, 0x10285BC9);					
+			_LIT(KMimeTypeBaseNameLocalized, "test_mimetype_localizedinstaller");
+			_LIT(KSwTypeBaseLocalizableName, "test_localizedinstaller_name");
+			_LIT(KSwTypeUniqueNameLocalized, "test_localizedinstaller_uniquename");
+								
+			switch(opType)
+				{
+				case RScrAccessor::EAddNonLocalizedSoftwareType:
+					{	
+					TUid sifPluginUid = {0xA01B7211};
+					_LIT_SECURE_ID(installerSid, 0x10285BC9);
+					_LIT_SECURE_ID(executionLayerSid, 0xAAEEDD11);
+					
+					_LIT(KMimeTypeBaseName, "test_mimetype_nonlocalizedinstaller");
+					_LIT(KSwTypeUniqueName, "test_nonlocalizedinstaller_uniquename");
+										
+					err = AddSoftwareTypeL(Server().ScrSession(), KSwTypeUniqueName, sifPluginUid, installerSid, executionLayerSid, KMimeTypeBaseName, 2, KNullDesC, 0, opResult);
+					break;
+					}
+				case RScrAccessor::EAddLocalizedSoftwareType:
+					{
+					err = AddSoftwareTypeL(Server().ScrSession(), KSwTypeUniqueNameLocalized, localizedSifPluginUid, localizedInstallerSid, localizedInstallerSid, KMimeTypeBaseNameLocalized, 2, KSwTypeBaseLocalizableName, 2, opResult);
+					break;
+					}
+				case RScrAccessor::EAddSofwtareTypeWithoutMimeTypes:
+					{
+					TUid sifPluginUid = {0xA01B7333};
+					_LIT_SECURE_ID(installerSid, 0x10285BC9);
+										
+					_LIT(KSwTypeUniqueName, "test_nomimeinstaller_uniquename");
+					
+					err = AddSoftwareTypeL(Server().ScrSession(), KSwTypeUniqueName, sifPluginUid, installerSid, installerSid, KNullDesC, 0, KNullDesC, 0, opResult);
+					break;
+					} 
+				case RScrAccessor::EAddLocalizedSoftwareTypeWithDifferentPluginUid:
+					{
+					TUid localizedDifferentSifPluginUid = {0xCC1B7333};
+					err = AddSoftwareTypeL(Server().ScrSession(), KSwTypeUniqueNameLocalized, localizedDifferentSifPluginUid, localizedInstallerSid, localizedInstallerSid, KMimeTypeBaseNameLocalized, 2, KSwTypeBaseLocalizableName, 2, opResult);
+					if(KErrAlreadyExists == err)
+						err = KErrNone; // The expected result is KErrAlreadyExists. So return no error to the test client.
+					break;
+					}
+				case RScrAccessor::EAddLocalizedSoftwareTypeWithExtraName:
+					{
+					err = AddSoftwareTypeL(Server().ScrSession(), KSwTypeUniqueNameLocalized, localizedSifPluginUid, localizedInstallerSid, localizedInstallerSid, KMimeTypeBaseNameLocalized, 2, KSwTypeBaseLocalizableName, 3, opResult);
+					if(KErrAlreadyExists == err)
+						err = KErrNone; // The expected result is KErrAlreadyExists. So return no error to the test client.
+					break;
+					}
+				case RScrAccessor::EAddLocalizedSoftwareTypeWithMissingName:
+					{
+					err = AddSoftwareTypeL(Server().ScrSession(), KSwTypeUniqueNameLocalized, localizedSifPluginUid, localizedInstallerSid, localizedInstallerSid, KMimeTypeBaseNameLocalized, 2, KSwTypeBaseLocalizableName, 1, opResult);
+					if(KErrAlreadyExists == err)
+						err = KErrNone; // The expected result is KErrAlreadyExists. So return no error to the test client.
+					break;
+					}
+				case RScrAccessor::EAddLocalizedSoftwareTypeWithExtraMime:
+					{
+					err = AddSoftwareTypeL(Server().ScrSession(), KSwTypeUniqueNameLocalized, localizedSifPluginUid, localizedInstallerSid, localizedInstallerSid, KMimeTypeBaseNameLocalized, 3, KSwTypeBaseLocalizableName, 2, opResult);
+					if(KErrAlreadyExists == err)
+						err = KErrNone; // The expected result is KErrAlreadyExists. So return no error to the test client.
+					break;
+					}
+				case RScrAccessor::EAddLocalizedSoftwareTypeWithMissingMime:
+					{
+					err = AddSoftwareTypeL(Server().ScrSession(), KSwTypeUniqueNameLocalized, localizedSifPluginUid, localizedInstallerSid, localizedInstallerSid, KMimeTypeBaseNameLocalized, 1, KSwTypeBaseLocalizableName, 2, opResult);
+					if(KErrAlreadyExists == err)
+						err = KErrNone; // The expected result is KErrAlreadyExists. So return no error to the test client.
+					break;
+					}				
+				} // switch(opType)
+			actualTestDuration = StopTimer(timer);
+			break;
+			}
+		case EDeleteSoftwareType:
+			{
+			_LIT(KSwTypeUniqueName, "test_nonlocalizedinstaller_uniquename");
+			_LIT(KMimeTypeBaseName, "test_mimetype_nonlocalizedinstaller");
+			RPointerArray<HBufC> deletedMimeTypes;
+			CleanupResetAndDestroyPushL(deletedMimeTypes);
+			TRAP(err, Server().ScrSession().DeleteSoftwareTypeL(KSwTypeUniqueName,deletedMimeTypes));
+			actualTestDuration = StopTimer(timer);
+				
+			// If the delete operation is successfull, check the returned MIME types deleted are as expected.
+			// If the delete operation fails, just return the error code to teh client.
+			if(KErrNone == err) 
+				{
+				RPointerArray<HBufC> mimeTypesArray;
+				CleanupResetAndDestroyPushL(mimeTypesArray);
+				RPointerArray<CLocalizedSoftwareTypeName> localizedSwNames;
+				GenerateTestDataL(mimeTypesArray, KMimeTypeBaseName, 2, localizedSwNames, KNullDesC, 0);
+
+				TInt expectedMimeTypesCount = mimeTypesArray.Count();
+				TInt retrievedMimeTypesCount = deletedMimeTypes.Count();
+				if(retrievedMimeTypesCount != expectedMimeTypesCount)
+					opResult = RScrAccessor::EOpFailUnexpectedMimeTypeNum;
+				else
+					{
+					for(TInt i=0; i<retrievedMimeTypesCount; ++i)
+						{
+						if(*(deletedMimeTypes[i]) != *(mimeTypesArray[i]))
+							opResult = RScrAccessor::EOpFailUnexpectedMimeTypeNum;;
+						} // for
+					} // if-else
+				
+				TRAP(err, Server().ScrSession().GetPluginUidL(KSwTypeUniqueName));
+				if(KErrNone == err)
+					{
+					// The plugin UID has been retrieved successfully. This is unexpected result.
+					opResult = RScrAccessor::EOpFailSwTypeStillExists;
+					}
+				else if(KErrSifUnsupportedSoftwareType == err)
+					{
+					// The plugin UID couldn't be found as expected. As the operation is successfull,
+					// return KErrNone to the client
+					err = KErrNone;
+					}
+				CleanupStack::PopAndDestroy(&mimeTypesArray);
+				} 
+			CleanupStack::PopAndDestroy(&deletedMimeTypes);
+			break;
+			}
+		case EDeleteFile:
+			{
+			HBufC *file = ReadDescFromMessageLC(aMessage, 0);
+			RFs fs;
+			User::LeaveIfError(fs.Connect());
+			CleanupClosePushL(fs);
+			err = fs.Delete(*file);
+			CleanupStack::PopAndDestroy(2, file); // file, fs
+			break;
+			}
+		case ECopyFile:
+			{
+			HBufC *sourceFile = ReadDescFromMessageLC(aMessage, 0);
+			HBufC *targetFile = ReadDescFromMessageLC(aMessage, 1);
+			RFs fs;
+			User::LeaveIfError(fs.Connect());
+			CleanupClosePushL(fs);
+			
+			CFileMan* fileManager = CFileMan::NewL(fs);
+			CleanupStack::PushL(fileManager);
+			err = fileManager->Copy(*sourceFile, *targetFile, 0);
+
+			// Reset the read-only attribute on the copied file
+			TTime time;
+			User::LeaveIfError(fileManager->Attribs(*targetFile, 0, KEntryAttReadOnly, time));		
+			CleanupStack::PopAndDestroy(4, sourceFile); // sourceFile, targetFile, fs, fileManager
+			break;
+			}
+		default:
+			{
+			PanicClient(aMessage, EPanicIllegalFunction);
+			break;
+			}
+		}
+	
+	if(EAddSoftwareType == f || EDeleteSoftwareType == f)
+		{
+		// create transaction on SCR for mutable operations
+		Server().ScrSession().CommitTransactionL();
+		
+		TPckg<TInt> timePckg(actualTestDuration);
+		TPckg<RScrAccessor::TAccessorOperationResult> opResultPckg(opResult);
+			
+		if(EDeleteSoftwareType == f)
+			{
+			aMessage.WriteL(0, opResultPckg);
+			aMessage.WriteL(1, timePckg);
+			}
+		else if (EAddSoftwareType == f)
+			{
+			aMessage.WriteL(1, opResultPckg);
+			aMessage.WriteL(2, timePckg);
+			}
+		}
+
+	aMessage.Complete(err);
+	}
+
+void CScrAccessSession::ServiceError(const RMessage2& aMessage, TInt aError)
+	{
+	if (aError == KErrBadDescriptor)
+		PanicClient(aMessage, EPanicBadDescriptor);
+	CSession2::ServiceError(aMessage,aError);
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscraccessor/source/tscraccessor_startup.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,86 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Scr Accessor - entry point
+*
+*/
+
+
+/**
+ @file 
+ @test
+ @internalComponent
+*/
+
+#include <e32std.h>
+#include <e32base.h>
+
+#include "tscraccessor_server_session.h"
+#include "tscraccessor_common.h"
+
+//
+// Perform server initialisation, in particular creation of the scheduler and 
+// server and then run the scheduler
+//
+static void RunServerL()
+	{
+	// naming the server thread after the server helps to debug panics
+	User::LeaveIfError(RThread().RenameMe(KScrAccessServerName));
+	//
+	// create and install the active scheduler we need
+	CActiveScheduler* sched = new(ELeave) CActiveScheduler;
+	CleanupStack::PushL(sched);
+	CActiveScheduler::Install(sched);
+	//
+	// create the server (leave it on the cleanup stack)
+	CScrAccessServer::NewLC();
+
+	//
+	// Initialisation complete, now signal the client
+	RProcess::Rendezvous(KErrNone);
+
+	//
+	// Ready to run
+	CActiveScheduler::Start();
+	//
+	// Cleanup the server and scheduler
+	CleanupStack::PopAndDestroy(2, sched);
+	}
+
+//
+// Server process entry-point
+//
+TInt E32Main()
+	{
+	__UHEAP_MARK;
+
+	//
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	TInt r = KErrNoMemory;
+	if (cleanup)
+		{
+		TRAP(r, RunServerL());
+		delete cleanup;
+		}
+	//
+
+	__UHEAP_MARKEND;
+	return r;
+	}
+
+void PanicClient(const RMessagePtr2& aMessage, TScrAccessPanic aPanic)
+	{
+	_LIT(KPanic,"ScrAccessServer");
+	aMessage.Panic(KPanic,aPanic);		// Also completes the message
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscrdatalayer/inc/datalayersteps.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the unit test steps for the SCR Data Layer.
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef TSCRDATALAYER_H
+#define TSCRDATALAYER_H
+
+#include "scrdatabase.h"
+#include "tscrdatalayerserver.h"
+
+#include <scs/oomteststep.h>
+using namespace Usif;
+
+// Constant used to name this test case
+_LIT(KScrDataLayerStep,"SCRDataLayer");
+
+class CScrTestDataLayer : public COomTestStep
+	{
+public:
+	CScrTestDataLayer(CScrDataLayerTestServer& aParent);
+	~CScrTestDataLayer();
+	void ImplTestStepPreambleL();
+	void ImplTestStepL();
+	void ImplTestStepPostambleL();
+	
+private:
+    void InsertRecordL(CStatement& aStmt, TInt aCol1, const TDesC& aCol2, const TDesC& aCol3);
+	void VerifyRecordL(CStatement& aStmt, TInt aCol1, const TDesC& aCol2, const TDesC& aCol3);
+	void ExecuteBadStatementL(CDatabase &aDb, TInt aTestNum, const TDesC& aStatement);
+	void PrintErrorL(const TDesC& aMsg, TInt aErrNum,...);
+	};
+
+#endif /* TSCRDATALAYER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscrdatalayer/inc/tscrdatalayerserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,44 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines the test server of the Software Component Registry data layer unit test
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef TSCRDATALAYERSERVER_H
+#define TSCRDATALAYERSERVER_H
+
+#include <test/testexecuteserverbase.h>
+
+_LIT(KScrDataLayerTestServerName, "tscrdatalayer");
+
+class CScrDataLayerTestServer : public CTestServer
+/**
+	Describes the test server for the SCR data layer unit test harness.
+ */
+	{
+public:
+	static CScrDataLayerTestServer* NewL();
+	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+	~CScrDataLayerTestServer();
+	};
+
+#endif /* TSCRSERVER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscrdatalayer/scripts/data/nondb.db	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,2 @@
+This file is not a database file.
+It is used to simulate the non-database file.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscrdatalayer/scripts/tscr_datalayer.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,79 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+// tscr_datalayer.script
+// Software Component Registry Tests
+
+PRINT Run Software Component Registry (SCR) - Data Layer Tests
+
+// Load Suite
+LOAD_SUITE tscr -SharedData // SharedData is used for sharing the componentid between test steps
+SHARED_DATA z:\tusif\tscr\tscr.ini shared_data
+
+// Delete the SCR Database file - this step ensures that the SCR DB is down before starting the test
+// As the Secure SQLite layer does not support two connections at the same time, this test step prevents this from happening
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+
+// Load Suite
+LOAD_SUITE tscrdatalayer
+
+// Create the private directory for tdatalayer
+RUN_UTILS MkDir c:\private\1028634C
+// Delete the SCR Database file if it has been left from the previous session
+RUN_UTILS DeleteFile c:\private\1028634C\scr.db
+// Copy the an empty scr db into the test harness private directory, so that the test harness won't require AllFiles.
+// Since tscrdatalayer test harness loads scrdatabase.dll, it cannot have AllFiles capability.
+RUN_UTILS CopyFile z:\tusif\tscr\data\scr-noversiontable.db c:\private\1028634C\scr.db
+RUN_UTILS MakeReadWrite c:\private\1028634C\scr.db
+// Copy the invalid scr db
+RUN_UTILS CopyFile z:\tusif\tscrdatalayer\data\nondb.db c:\private\1028634C\nonscr.db
+RUN_UTILS MakeReadWrite c:\private\1028634C\nonscr.db
+
+//********************** SEC-SCR-DataLayer : SCR DATA LAYER  **********************
+
+//! @SYMTestCaseID 		API-SEC-SCR-DataLayer-0001
+//! @SYMTestCaseDesc 		Unit tests for SCR Data Layer
+//! @SYMPREQ 			PREQ1269
+//! @SYMTestPriority 		Critical
+//! @SYMTestStatus   		3. Released
+//! @SYMTestActions 		Test Actions:
+//!				SEC-SCR-DataLayer-0001: Open database file
+//!				SEC-SCR-DataLayer-0002: Insert records
+//!				SEC-SCR-DataLayer-0003: Verify inserted records
+//!				SEC-SCR-DataLayer-0004: Update a record
+//!				SEC-SCR-DataLayer-0005: Verify updated record
+//!				SEC-SCR-DataLayer-0006: Delete a record
+//!                             SEC-SCR-DataLayer-0007: Verify the deleted record 	
+//!                             SEC-SCR-DataLayer-0008: Begin a transaction	
+//!                             SEC-SCR-DataLayer-0009: Insert a record while a transaction is active
+//!                             SEC-SCR-DataLayer-0010: Insert a second record while a transaction is active
+//!                             SEC-SCR-DataLayer-0011: Rollback the transaction.
+//!                             SEC-SCR-DataLayer-0012: Verify the rollback
+//!                             SEC-SCR-DataLayer-0013: Execute a bad SQL statement (1) 
+//!                             SEC-SCR-DataLayer-0014: Execute a bad SQL statement (2)
+//!                             SEC-SCR-DataLayer-0015: Execute a bad SQL statement (3)
+//!                             SEC-SCR-DataLayer-0016: Open a non-existing database
+//!                             SEC-SCR-DataLayer-0017: Open and work on a non-database file
+//!                             SEC-SCR-DataLayer-0018: Bind a column which doesn't exist
+//!                             SEC-SCR-DataLayer-0018: Retrieve the value of a column which doesn't exist
+//!                             SEC-SCR-DataLayer-0020: Retrieve the value of a column whose type doesn't match
+//! @SYMTestExpectedResults 	The intended database operations are performed successfully.
+//! @SYMTestType 		UT
+
+START_TESTCASE API-SEC-SCR-DataLayer-0001
+
+RUN_TEST_STEP 100 tscrdatalayer SCRDataLayer
+
+END_TESTCASE API-SEC-SCR-DataLayer-0001
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscrdatalayer/scripts/tscr_datalayer_oom.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,2 @@
+[datalayerOOM]
+OOMTest=True
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscrdatalayer/scripts/tscr_datalayer_oom.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,81 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+// tscr_datalayer_oom.script
+// Software Component Registry Database Layer Out-Of-Memory Tests
+
+PRINT Run Software Component Registry (SCR) - Data Layer OOM Tests
+
+// Load Suite
+LOAD_SUITE tscr -SharedData // SharedData is used for sharing the componentid between test steps
+SHARED_DATA z:\tusif\tscr\tscr.ini shared_data
+
+// Delete the SCR Database file - this step ensures that the SCR DB is down before starting the test
+// As the Secure SQLite layer does not support two connections at the same time, this test step prevents this from happening
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+
+// Load Suite
+LOAD_SUITE tscrdatalayer
+
+// Create the private directory for tdatalayer
+RUN_UTILS MkDir c:\private\1028634C
+// Delete the SCR Database file if it has been left from the previous session
+RUN_UTILS DeleteFile c:\private\1028634C\scr.db
+// Copy the an empty scr db into the test harness private directory, so that the test harness won't require AllFiles.
+// Since tscrdatalayer test harness loads scrdatabase.dll, it cannot have AllFiles capability.
+RUN_UTILS CopyFile z:\tusif\tscr\data\scr-noversiontable.db c:\private\1028634C\scr.db
+RUN_UTILS MakeReadWrite c:\private\1028634C\scr.db
+// Copy the invalid scr db
+RUN_UTILS CopyFile z:\tusif\tscrdatalayer\data\nondb.db c:\private\1028634C\nonscr.db
+RUN_UTILS MakeReadWrite c:\private\1028634C\nonscr.db
+
+//********************** SEC-SCR-DataLayer : SCR DATA LAYER  **********************
+
+//! @SYMTestCaseID 		API-SEC-SCR-DataLayer-OOM-0001
+//! @SYMTestCaseDesc 		Unit tests for SCR Data Layer
+//! @SYMPREQ 			PREQ1269
+//! @SYMTestPriority 		Critical
+//! @SYMTestStatus   		3. Released
+//! @SYMTestActions 		Test Actions:
+//!				• SEC-SCR-DataLayer-0001: Open database file
+//!				• SEC-SCR-DataLayer-0002: Insert records
+//!				• SEC-SCR-DataLayer-0003: Verify inserted records
+//!				• SEC-SCR-DataLayer-0004: Update a record
+//!				• SEC-SCR-DataLayer-0005: Verify updated record
+//!				• SEC-SCR-DataLayer-0006: Delete a record
+//!                             • SEC-SCR-DataLayer-0007: Verify the deleted record 	
+//!                             • SEC-SCR-DataLayer-0008: Begin a transaction	
+//!                             • SEC-SCR-DataLayer-0009: Insert a record while a transaction is active
+//!                             • SEC-SCR-DataLayer-0010: Insert a second record while a transaction is active
+//!                             • SEC-SCR-DataLayer-0011: Rollback the transaction.
+//!                             • SEC-SCR-DataLayer-0012: Verify the rollback
+//!                             • SEC-SCR-DataLayer-0013: Execute a bad SQL statement (1) 
+//!                             • SEC-SCR-DataLayer-0014: Execute a bad SQL statement (2)
+//!                             • SEC-SCR-DataLayer-0015: Execute a bad SQL statement (3)
+//!                             • SEC-SCR-DataLayer-0016: Open a non-existing database
+//!                             • SEC-SCR-DataLayer-0017: Open and work on a non-database file
+//!                             • SEC-SCR-DataLayer-0018: Bind a column which doesn't exist
+//!                             • SEC-SCR-DataLayer-0018: Retrieve the value of a column which doesn't exist
+//!                             • SEC-SCR-DataLayer-0020: Retrieve the value of a column whose type doesn't match
+//!
+//! @SYMTestExpectedResults 	• The intended database operations are performed successfully.
+//! @SYMTestType 		UT
+
+START_TESTCASE API-SEC-SCR-DataLayer-OOM-0001
+
+RUN_TEST_STEP 100 tscrdatalayer SCRDataLayer z:\tusif\tscrdatalayer\tscr_datalayer_oom.ini datalayerOOM
+
+END_TESTCASE API-SEC-SCR-DataLayer-OOM-0001
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscrdatalayer/source/datalayersteps.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,355 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements the unit test steps for the SCR Data Layer.
+*
+*/
+
+
+#include "datalayersteps.h"
+
+
+CScrTestDataLayer::CScrTestDataLayer(CScrDataLayerTestServer&)
+// Constructor.
+	:	COomTestStep()
+	{
+	SetTestStepName(KScrDataLayerStep);
+	}
+
+CScrTestDataLayer::~CScrTestDataLayer()
+// Destructor.
+	{
+	}
+
+void CScrTestDataLayer::ImplTestStepPreambleL()
+	{
+	}
+
+void CScrTestDataLayer::ImplTestStepPostambleL()
+	{
+	}
+
+static const TUint MAX_SCR_ERROR_MESSAGE_LENGTH = 512;
+
+void CScrTestDataLayer::PrintErrorL(const TDesC& aMsg, TInt aErrNum,...)
+	{
+	VA_LIST list;
+	VA_START(list, aErrNum);
+	
+	RBuf msgBuf;
+	msgBuf.CreateL(MAX_SCR_ERROR_MESSAGE_LENGTH);
+	msgBuf.CleanupClosePushL();
+	msgBuf.AppendFormatList(aMsg, list);
+	
+	ERR_PRINTF1(msgBuf);
+	SetTestStepResult(EFail);
+
+	CleanupStack::PopAndDestroy(&msgBuf);
+	User::Leave(aErrNum);
+	}
+
+
+void CScrTestDataLayer::ImplTestStepL()
+	{
+	INFO_PRINTF1(_L("SCR Data Layer Unit Tests"));
+	
+	INFO_PRINTF1(_L(" SEC_SCR_DataLayer_0001: Open database file"));
+
+	_LIT(KDbFilePath, "c:\\private\\1028634C\\scr.db");
+	_LIT(KJournalFilePath, "c:\\private\\1028634C\\scr.db-journal");
+	RFs fs;
+	User::LeaveIfError(fs.Connect());
+	CleanupClosePushL(fs);
+	RFile databaseFile;
+	User::LeaveIfError(databaseFile.Open(fs, KDbFilePath, EFileShareAny|EFileWrite));
+	CleanupClosePushL(databaseFile);
+	RFile journalFile;
+	User::LeaveIfError(journalFile.Replace(fs, KJournalFilePath, EFileShareAny|EFileWrite));
+	CleanupClosePushL(journalFile);
+	CDatabase *db = CDatabase::NewL(databaseFile, journalFile);
+	CleanupStack::PushL(db);
+	
+	INFO_PRINTF1(_L(" SEC_SCR_DataLayer_0001.1: Negative test in LastInsertedIdL"));
+	TRAPD(err, db->LastInsertedIdL());
+	if (err != KErrNotFound)
+		PrintErrorL(_L("Unexpected error for LastInsertedIdL when nothing was inserted"), err);
+	
+	INFO_PRINTF1(_L(" SEC_SCR_DataLayer_0002: Insert records"));
+	_LIT(KScrTestInsert, "INSERT INTO Components(SoftwareTypeId,InstalledDrivesRefCount,Version,InstallTime) VALUES(?,?,?,?);");
+	CStatement* stmt = db->PrepareStatementLC(KScrTestInsert());
+	// Insert first record
+	const TInt KSoftTypeIdRow1 = 1;
+	_LIT(KInstalledDrivesRow1, "123");
+	_LIT(KVersionRow1, "1.1.1");
+	InsertRecordL(*stmt, KSoftTypeIdRow1, KInstalledDrivesRow1(), KVersionRow1());
+	// Insert second record
+	const TInt KSoftTypeIdRow2 = 2;
+	_LIT(KInstalledDrivesRow2, "456");
+	_LIT(KVersionRow2, "1.1.2");
+	InsertRecordL(*stmt, KSoftTypeIdRow2, KInstalledDrivesRow2(), KVersionRow2());
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L(" SEC_SCR_DataLayer_0003: Verify inserted records"));
+	_LIT(KScrTestSelect, "SELECT SoftwareTypeId,InstalledDrivesRefCount,Version FROM Components;");
+	stmt = db->PrepareStatementLC(KScrTestSelect());
+	if(!stmt->ProcessNextRowL())
+		PrintErrorL(_L("Result row set contains unexpected number of records (0)!"), KErrGeneral);
+	VerifyRecordL(*stmt, KSoftTypeIdRow1, KInstalledDrivesRow1, KVersionRow1);
+	if(!stmt->ProcessNextRowL())
+		PrintErrorL(_L("Result row set contains unexpected number of records (1)!"), KErrGeneral);
+	VerifyRecordL(*stmt, KSoftTypeIdRow2, KInstalledDrivesRow2(), KVersionRow2());
+	if(stmt->ProcessNextRowL())
+		PrintErrorL(_L("Result row set contains more records than expected ones (2)!"), KErrGeneral);
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L(" SEC_SCR_DataLayer_0004: Update a record"));
+	_LIT(KScrTestUpdate, "UPDATE Components SET Version=? WHERE InstalledDrivesRefCount=?;");
+	stmt = db->PrepareStatementLC(KScrTestUpdate());
+	_LIT(KNewVersionRow2, "6.7.9");
+	stmt->BindStrL(1, KNewVersionRow2());
+	stmt->BindStrL(2, KInstalledDrivesRow2());
+	stmt->ExecuteStatementL();
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L(" SEC_SCR_DataLayer_0005: Verify updated record"));
+	_LIT(KScrTestSelectCond, "SELECT SoftwareTypeId,InstalledDrivesRefCount,Version FROM Components WHERE InstalledDrivesRefCount=?;");
+	stmt = db->PrepareStatementLC(KScrTestSelectCond());
+	stmt->BindStrL(1, KInstalledDrivesRow2());
+	if(!stmt->ProcessNextRowL())
+		PrintErrorL(_L("Updated record could not be found!"), KErrGeneral);
+	VerifyRecordL(*stmt, KSoftTypeIdRow2, KInstalledDrivesRow2(), KNewVersionRow2());
+	CleanupStack::PopAndDestroy(stmt);
+		
+	INFO_PRINTF1(_L(" SEC_SCR_DataLayer_0006: Delete a record"));
+	_LIT(KScrTestDelete, "DELETE FROM Components WHERE InstalledDrivesRefCount=?;");
+	stmt = db->PrepareStatementLC(KScrTestDelete());
+	stmt->BindStrL(1, KInstalledDrivesRow1());
+	stmt->ExecuteStatementL();
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0007: Verify deleted record"));
+	_LIT(KScrTestSelectVerify, "SELECT * FROM Components WHERE InstalledDrivesRefCount=?;");
+	stmt = db->PrepareStatementLC(KScrTestSelectVerify());
+	stmt->BindStrL(1, KInstalledDrivesRow1());
+	if(stmt->ProcessNextRowL())
+		PrintErrorL(_L("Deleted record has been retrieved!"), KErrGeneral);
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0008: Begin a transaction"));
+	_LIT(KScrTestBegin, "BEGIN TRANSACTION SCRUnitTest;");
+	stmt = db->PrepareStatementLC(KScrTestBegin());
+	stmt->ExecuteStatementL();
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0009: Insert a record"));
+	stmt = db->PrepareStatementLC(KScrTestInsert());
+	const TInt KSoftTypeIdRow3 = 1;
+	_LIT(KInstalledDrivesRow3, "789");
+	_LIT(KVersionRow3, "1.1.3");
+	InsertRecordL(*stmt, KSoftTypeIdRow3, KInstalledDrivesRow3(), KVersionRow3());
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0010: Insert second record"));
+	stmt = db->PrepareStatementLC(KScrTestInsert());
+	const TInt KSoftTypeIdRow4 = 3;
+	_LIT(KInstalledDrivesRow4, "001");
+	_LIT(KVersionRow4, "0.0.7");
+	InsertRecordL(*stmt, KSoftTypeIdRow4, KInstalledDrivesRow4(), KVersionRow4());
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0011: Rollback the transaction"));
+	_LIT(KScrTestRollback, "ROLLBACK TRANSACTION SCRUnitTest;");
+	stmt = db->PrepareStatementLC(KScrTestRollback());
+	stmt->ExecuteStatementL();
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0012: Verify rollback"));
+	stmt = db->PrepareStatementLC(KScrTestSelectVerify());
+	stmt->BindStrL(1, KInstalledDrivesRow3());
+	if(stmt->ProcessNextRowL())
+		PrintErrorL(_L("First record inserted  has been retrieved! It should have been rolled back!"), KErrGeneral);
+	stmt->ResetL();
+	stmt->BindStrL(1, KInstalledDrivesRow4());
+	if(stmt->ProcessNextRowL())
+		PrintErrorL(_L("Second record inserted  has been retrieved! It should have been rolled back!"), KErrGeneral);
+	CleanupStack::PopAndDestroy(stmt);
+	
+	ExecuteBadStatementL(*db, 13, _L("INSERT INTO Components;"));
+	ExecuteBadStatementL(*db, 14, _L(";"));
+	ExecuteBadStatementL(*db, 15, _L("SELECT * FROM Components;SELECT * FROM Files;"));
+		
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0016: Bind to a column which does not exist"));
+	stmt = db->PrepareStatementLC(KScrTestInsert());
+	TRAP(err, stmt->BindIntL(5, 1)); // There is no 5th column
+	if(err != KErrArgument)
+		PrintErrorL(_L("Unexpected error returned with binding to a non-existing column!"), err);
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0017: Retrieve the value of a column which does not exist"));
+	stmt = db->PrepareStatementLC(KScrTestSelect());
+	if(!stmt->ProcessNextRowL())
+			PrintErrorL(_L("The database is empty!"), KErrGeneral);
+	TRAP(err,TPtrC ptrColX(stmt->StrColumnL(5))); // There is no 5th column
+	if(err != KErrArgument)
+		PrintErrorL(_L("Unexpected error returned with retrieving a non-existing column!"), err);
+	
+	TRAP(err,TPtrC ptrColX(stmt->StrColumnL(-1))); // Check negative value
+	if(err != KErrArgument)
+		PrintErrorL(_L("Unexpected error returned with retrieving a negative column!"), err);	
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0018: Retrieve the value of a column whose type doesn't match"));
+	TRAP(err,TPtrC ptrCol0(stmt->StrColumnL(0))); // Column0 is integer
+	if(err != KErrArgument)
+		PrintErrorL(_L("Unexpected error returned with retrieving the type mismatched column!"), err);
+	CleanupStack::PopAndDestroy(stmt);
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0019: Insert a record - attempt injecting raw SQL in parameters"));
+	stmt = db->PrepareStatementLC(KScrTestInsert());
+	const TInt KSoftTypeIdRowInject1 = 1;
+	_LIT(KRowInject1, "a?b");
+	_LIT(KVersionRowInject1, "???");
+	InsertRecordL(*stmt, KSoftTypeIdRowInject1, KRowInject1(), KVersionRowInject1());
+	
+	_LIT(KRowInject2, "';<>!?\\/.,~#:");
+	_LIT(KRowInject3, "\n\r\t\b");	
+	InsertRecordL(*stmt, KSoftTypeIdRowInject1, KRowInject2(), KRowInject3());
+	
+	CleanupStack::PopAndDestroy(stmt);	
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0020: Query - attempt injecting raw SQL"));
+	_LIT(KScrInjectTestQuery, "SELECT * FROM Components WHERE ComponentId=?;");
+	stmt = db->PrepareStatementLC(KScrInjectTestQuery());
+	stmt->BindStrL(1, KRowInject1());
+	stmt->ProcessNextRowL();
+	CleanupStack::PopAndDestroy(stmt);
+	
+	stmt = db->PrepareStatementLC(KScrInjectTestQuery());
+	stmt->BindStrL(1, KRowInject2());
+	stmt->ProcessNextRowL();
+	CleanupStack::PopAndDestroy(stmt);
+	
+	stmt = db->PrepareStatementLC(KScrInjectTestQuery());
+	stmt->BindStrL(1, KRowInject3());
+	stmt->ProcessNextRowL();		
+	CleanupStack::PopAndDestroy(stmt);	
+	
+	_LIT8(K8BitInstalledDrives, "testInstalledDrives");
+	_LIT8(K8BitVersion, "testVersion");
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0021: Test 8-bit field support"));
+	stmt = db->PrepareStatementLC(KScrTestInsert());
+	
+	stmt->BindIntL(1, 1);
+	stmt->BindBinaryL(2, K8BitInstalledDrives());	
+	stmt->BindBinaryL(3, K8BitVersion());
+	stmt->BindIntL(4, 0); // install time
+	stmt->ExecuteStatementL();
+	CleanupStack::PopAndDestroy(stmt);
+	// Try and do a select by 8-bit values, followed by their retrieval
+	_LIT(KScr8BitTestQuery, "SELECT InstalledDrivesRefCount, ComponentId FROM Components WHERE Version=?;");
+	stmt = db->PrepareStatementLC(KScr8BitTestQuery());
+	stmt->BindBinaryL(1, K8BitVersion());
+	if(!stmt->ProcessNextRowL())
+		PrintErrorL(_L("8-bit value SELECT did not match!"), KErrGeneral);
+	TPtrC8 ptrCol(stmt->BinaryColumnL(0));
+	if (ptrCol != K8BitInstalledDrives)
+		PrintErrorL(_L("8-bit values did not match!"), KErrGeneral);
+	TRAP(err, stmt->BinaryColumnL(1));
+	if (err != KErrArgument)
+		PrintErrorL(_L("Expected error on non-binary columnb did not match!"), KErrGeneral);
+
+	CleanupStack::PopAndDestroy(stmt);			
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0022: Try binding huge parameters"));	
+	stmt = db->PrepareStatementLC(KScrInjectTestQuery());
+  	static TUint charsCount = 1024;
+  	_LIT(KTestPrefix, "TestValuePrefix");
+  	
+  	// Test large localizable property with negative values
+  	RBuf propertyValue;
+  	propertyValue.CreateL(charsCount * 2 + KTestPrefix().Length());
+  	CleanupClosePushL(propertyValue);
+  	propertyValue.Copy(KTestPrefix);
+  	const TChar testChar(0xFFFD);
+  	propertyValue.AppendFill(testChar, charsCount);
+	TRAP(err, stmt->BindStrL(2, propertyValue));
+	if (err != KErrArgument)
+		PrintErrorL(_L("Expected error wasn't returned on large parameter!"), KErrGeneral);
+	CleanupStack::PopAndDestroy(&propertyValue);
+		
+	CleanupStack::PopAndDestroy(4, &databaseFile); // databaseFile, journalFile, db, stmt
+	
+	INFO_PRINTF1(_L("SEC_SCR_DataLayer_0023: Open and work on a non-database file"));
+	CDatabase* nondb(0); 
+
+	_LIT(KScrTestNonDbFile, "c:\\private\\1028634C\\nonscr.db");
+	_LIT(KScrTestNonDbFileJournal, "c:\\private\\1028634C\\nonscr.db-journal");
+	User::LeaveIfError(databaseFile.Open(fs, KScrTestNonDbFile, EFileShareAny|EFileRead));
+	CleanupClosePushL(databaseFile);
+	User::LeaveIfError(journalFile.Replace(fs, KScrTestNonDbFileJournal, EFileShareAny|EFileWrite));
+	CleanupClosePushL(journalFile);
+	nondb = CDatabase::NewL(databaseFile, journalFile);
+	CleanupStack::PushL(nondb);
+  	stmt = NULL;
+  	TRAP(err, stmt = nondb->PrepareStatementLC(KScrTestSelect()));
+  	if (stmt) 
+  		CleanupStack::PopAndDestroy(stmt);
+   	
+  	if(err == KErrNoMemory)
+  		User::Leave(err);
+  	else if(err != KErrNotFound)
+  		PrintErrorL(_L("Unexpected error returned with non-database file!"), err);			
+
+	CleanupStack::PopAndDestroy(4, &fs); // fs, databaseFile, journalFile, nondb
+	}
+
+void CScrTestDataLayer::InsertRecordL(CStatement& aStmt, TInt aCol1, const TDesC& aCol2, const TDesC& aCol3)
+	{
+	aStmt.BindIntL(1, aCol1);
+	aStmt.BindStrL(2, aCol2);
+	aStmt.BindStrL(3, aCol3);
+	aStmt.BindIntL(4, aCol1); // install time
+	aStmt.ExecuteStatementL();
+	aStmt.ResetL();
+	}
+
+void CScrTestDataLayer::VerifyRecordL(CStatement& aStmt, TInt aCol1, const TDesC& aCol2, const TDesC& aCol3)
+	{
+	TInt intCol1 = aStmt.IntColumnL(0);
+	TInt64 int64Col1 = aStmt.Int64ColumnL(0); // Due to coverage concerns
+	if((intCol1 != aCol1) || (int64Col1 != aCol1))
+		{
+		ERR_PRINTF1(_L("The integer column does not match with the returned one."));
+		SetTestStepResult(EFail);
+		User::Leave(KErrGeneral);
+		}
+	TPtrC ptrCol2(aStmt.StrColumnL(1));
+	TPtrC ptrCol3(aStmt.StrColumnL(2));
+	if(ptrCol2.Compare(aCol2) || ptrCol3.Compare(aCol3))
+		{
+		ERR_PRINTF1(_L("The string column does not match with the returned one."));
+		SetTestStepResult(EFail);
+		User::Leave(KErrGeneral);	
+		}
+	}
+
+void CScrTestDataLayer::ExecuteBadStatementL(CDatabase &aDb, TInt aTestNum, const TDesC& aStatement)
+	{
+	INFO_PRINTF3(_L("SEC_SCR_DataLayer_00%d: Run a badly constructed statement (%S)"), aTestNum, &aStatement);
+	CStatement	*stmt = NULL;
+	TRAPD(err, stmt = aDb.PrepareStatementLC(aStatement); 
+		  if(stmt) 
+			  CleanupStack::PopAndDestroy(stmt););// end of TRAPD
+	if(err != KErrArgument)
+			PrintErrorL(_L("The badly constructed statement did not cause the expected err"), err);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swcomponentregistry/test/tscrdatalayer/source/tscrdatalayer.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,95 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements the test server of the Software Component Registry test harness
+*
+*/
+
+
+#include "tscrdatalayerserver.h" 			// TEF Test Server
+#include "datalayersteps.h"
+
+CScrDataLayerTestServer* CScrDataLayerTestServer::NewL()
+/**
+	Called inside the MainL() function to create and start the CTestServer derived server.
+	@return Instance of the test server
+ */
+	{	
+	CScrDataLayerTestServer* server = new (ELeave) CScrDataLayerTestServer();
+	CleanupStack::PushL(server);
+	server->ConstructL(KScrDataLayerTestServerName);
+	CleanupStack::Pop(server);
+	return server;
+	}
+	
+	
+CScrDataLayerTestServer::~CScrDataLayerTestServer()
+	{	
+	}
+
+
+LOCAL_C void MainL()
+	{	
+	CActiveScheduler *scheduler = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(scheduler);
+
+	CScrDataLayerTestServer* server = NULL;
+	
+	// Create the CTestServer derived server
+	TRAPD(err,server = CScrDataLayerTestServer::NewL());
+	if(!err)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		scheduler->Start();
+		}
+		
+	delete server;
+	delete scheduler;
+	}
+
+
+GLDEF_C TInt E32Main()
+/**
+ * @return - Standard Epoc error code on process exit
+ * Process entry point. Called by client using RProcess API
+ */
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD(err,MainL());
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return err;
+    }
+
+CTestStep* CScrDataLayerTestServer::CreateTestStep(const TDesC& aStepName)
+/**
+	Creates a new test step.
+	@param aStepName The name of the requested test step.
+	@return A pointer to the object of the requested test step.
+ */
+	{
+	// Initialise test step object to NULL if no TEF steps are assigned
+	CTestStep* testStep = NULL;
+	
+	if(aStepName == KScrDataLayerStep)
+		testStep = new CScrTestDataLayer(*this);
+
+	return testStep;
+	}
--- a/installationservices/swi/source/backuprestore/backupsession.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/installationservices/swi/source/backuprestore/backupsession.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -42,6 +42,11 @@
 		DEBUG_PRINTF(_L8("RBackupSession::Close"));
 		iSession.Close();		
 		}
+
+	// Format for metadata ( Ensure that nothing is added in between to maintain compatability) :
+	// Drive ( for Base SA ) + No of Controllers ( SA + PU + SP ) + Controllers for SA and PU +
+	// Controllers for Augmentation + File Count + File Names Array ( for SA,PU and SP ) + 
+	// Augmentation Drives + Matching Supported Languages ( for SA and SP with ELANGNONE as separator )
 		
 	EXPORT_C HBufC8* RBackupSession::GetMetaDataL(TUid aPackageUid, RPointerArray<HBufC>& aFilesArray)
 		{
@@ -72,70 +77,127 @@
 		CleanupResetAndDestroyPushL(packages);
 		entry.AugmentationsL(packages);
 
+        TInt augmentationCount(packages.Count());
+        TInt augCount = augmentationCount;
+		
 		RBufWriteStream stream(*tempBuffer);
 		CleanupClosePushL(stream);
-		stream.WriteUint32L(drive);		
-		
-		// backup the base package (except for PA and ROM stubs) plus partial upgrades and augmentations.		
-		entry.FilesL(aFilesArray);
-		
+        stream.WriteUint32L(drive); 
+        
+		if (entry.RemovableL()) //Cannot Backup non-removable (NR) packages
+	    {
+	        // backup the base package (except for PA and ROM stubs) plus partial upgrades and augmentations.		
+            entry.FilesL(aFilesArray);
 		
-		// Filter out any files on the Z drive
-		TInt fileIndex = aFilesArray.Count() - 1;
-		while (fileIndex >= 0)
-			{
-			TChar driveCh = (*aFilesArray[fileIndex])[0];
-			if (driveCh == 'z' || driveCh == 'Z')
-				{
-				delete aFilesArray[fileIndex];
-				aFilesArray.Remove(fileIndex);
-				}
-			--fileIndex;
-			}
+            // Filter out any files on the Z drive
+            TInt fileIndex = aFilesArray.Count() - 1;
+            while (fileIndex >= 0)
+                {
+                TChar driveCh = (*aFilesArray[fileIndex])[0];
+                if (driveCh == 'z' || driveCh == 'Z')
+                    {
+                    delete aFilesArray[fileIndex];
+                    aFilesArray.Remove(fileIndex);
+                    }
+                --fileIndex;
+                }
 
-		TInt controllersCount = controllers.Count();
-		TInt firstController = 0;
-		if (entry.PreInstalledL() || entry.IsInRomL())
-			{
-			firstController = 1;	// Don't backup the controller for the ROM stub 
-			if (controllersCount <= 1)
-				{				
-				DEBUG_PRINTF(_L8("Base package is pre-installed or in ROM and has not been upgraded"));				
-				stream.WriteInt32L(packages.Count());
-				if (entry.IsInRomL())
+            TInt controllersCount = controllers.Count();
+            TInt firstController = 0;
+            if (entry.PreInstalledL() || entry.IsInRomL())
+                {
+                firstController = 1;	// Don't backup the controller for the ROM stub 
+                if (controllersCount <= 1)
+                    {				
+                    DEBUG_PRINTF(_L8("Base package is pre-installed or in ROM and has not been upgraded"));				
+                    stream.WriteInt32L(packages.Count());
+                    if (entry.IsInRomL())
+                        {
+                        matchingSupportedLanguagesArray.Close();
+                        }
+                    }			
+                else 
                     {
-                    matchingSupportedLanguagesArray.Close();
+                    // Backup any PUs for the ROM stub.
+                    DEBUG_PRINTF2(_L8("Found %d partial upgrades"), controllersCount - 1);				
+                    stream.WriteInt32L(controllersCount - 1 + packages.Count());
                     }
-				}			
-			else 
-				{
-				// Backup any PUs for the ROM stub.
-				DEBUG_PRINTF2(_L8("Found %d partial upgrades"), controllersCount - 1);				
-				stream.WriteInt32L(controllersCount - 1 + packages.Count());
-				}
+                }
+            else
+                {
+                // Standard SA package
+                DEBUG_PRINTF2(_L8("Found %d controllers"), controllersCount);		
+                stream.WriteInt32L(controllers.Count() + packages.Count());			
+                }
+		
+            for (TInt i = firstController; i < controllersCount; ++i)
+                {
+                stream << *controllers[i];
+                }
+            
 			}
 		else
-			{
-			// Standard SA package
-			DEBUG_PRINTF2(_L8("Found %d controllers"), controllersCount);		
-			stream.WriteInt32L(controllers.Count() + packages.Count());			
-			}
-		
-		for (TInt i = firstController; i < controllersCount; ++i)
-			{
-			stream << *controllers[i];
-			}
-		
-		TInt augmentationCount(packages.Count());
+		    {
+                if(!augmentationCount)
+                {
+                    DEBUG_PRINTF2(_L("RBackupSession::GetMetaDataL - Cannot Backup non-removable application; Uid: '0x%08x'"),aPackageUid.iUid);
+                    CleanupStack::PopAndDestroy(6, &entry); // stream, controllers, matchingSupportedLanguagesArray, tempBuffer, packages, entry
+                    User::Leave(KErrNotSupported); // cannot remove non-removable (NR) packages 
+                }
+                else
+                {
+                for (TInt i = 0; i < augmentationCount; ++i)
+                    {           
+                    RSisRegistryEntry augmentation;
+                    augmentation.OpenL(iSession, *packages[i]);
+                    CleanupClosePushL(augmentation);
+                    
+                     if (!augmentation.RemovableL())
+                        {                      
+                            augCount--;
+                            CleanupStack::PopAndDestroy(1, &augmentation);
+                            continue;
+                        }
+                     CleanupStack::PopAndDestroy(1, &augmentation);
+                    }
+                if(!augCount)
+                    {
+                    DEBUG_PRINTF2(_L("RBackupSession::GetMetaDataL - Cannot Backup non-removable augmentation; Uid: '0x%08x'"),aPackageUid.iUid);
+                    CleanupStack::PopAndDestroy(6, &entry); // stream, controllers, matchingSupportedLanguagesArray, tempBuffer, packages, entry
+                    User::Leave(KErrNotSupported); // cannot remove non-removable (NR) packages 
+                    }
+                else
+                    {
+                    stream.WriteInt32L(augCount); // Writing removable augmentations controller count  
+                    if (entry.IsInRomL())
+                        {
+                        matchingSupportedLanguagesArray.Close();
+                        }
+                    }
+                }
+		    }
+
 		RArray<TChar> augmentationDrives;
 		CleanupClosePushL(augmentationDrives);
 		
+		TBool nonRemovableAugmentation = ETrue;
+		
 		for (TInt i = 0; i < augmentationCount; ++i)
 			{			
 			RSisRegistryEntry augmentation;
 			augmentation.OpenL(iSession, *packages[i]);
 			CleanupClosePushL(augmentation);
 			
+			if(augCount != augmentationCount)
+			    {
+                 if (!augmentation.RemovableL()) //if loops are not clubed to avoid augmentation.RemovableL() API Call
+                    {		          
+                        CleanupStack::PopAndDestroy(1, &augmentation);
+                        continue;
+                    }
+			    }
+		    nonRemovableAugmentation = EFalse;
+		    
 			augmentation.FilesL(aFilesArray);
 			
 			RPointerArray<HBufC8> augmentationControllers;
@@ -159,6 +221,13 @@
 			CleanupStack::PopAndDestroy(2, &augmentation);
 			}
 			
+		if(nonRemovableAugmentation && augmentationCount)
+		    {
+            DEBUG_PRINTF2(_L("RBackupSession::GetMetaDataL - Cannot Backup non-removable Augmentation; Uid: '0x%08x'"),aPackageUid.iUid);
+            CleanupStack::PopAndDestroy(7, &entry); // augmentationDrives, stream, controllers, matchingSupportedLanguagesArray, tempBuffer, packages
+            User::Leave(KErrNotSupported); // cannot remove non-removable (NR) packages 
+		    }
+		
 		// Write the number of files originally installed,
   		// and their names to the backup metadata		
   		TInt filesCount(aFilesArray.Count());
@@ -172,7 +241,7 @@
 		// Add the selected drive for each augmentation in the same order as
 		// as the list of controllers.  The augmentation controllers will
 		// be counted on restore to be sure to correct number of drives.
-  		for (TInt k = 0; k < augmentationCount; ++k)
+  		for (TInt k = 0; k < augCount; ++k)
   			{
 			stream.WriteUint32L(augmentationDrives[k]);
   			}
@@ -193,5 +262,4 @@
 		return result; 
 		
 		}	
-	
 	}
--- a/installationservices/swi/test/tbackuprestore/scripts/batchfiles/tbackuprestore_post.bat	Tue Feb 02 00:20:15 2010 +0200
+++ b/installationservices/swi/test/tbackuprestore/scripts/batchfiles/tbackuprestore_post.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -20,4 +20,13 @@
 del /s /f /q \epoc32\release\winscw\urel\z\sys\bin\tswisidupgradeexe.exe
 
 del /s /f /q \epoc32\winscw\c\tswi\tbackuprestore\backup*.*
-del /s /f /q \epoc32\winscw\c\tswi\tbackuprestore\metadata*
\ No newline at end of file
+del /s /f /q \epoc32\winscw\c\tswi\tbackuprestore\metadata*
+
+rem cleanup anything from previous tests.
+del /f /q \epoc32\winscw\c\sys\install\scr\scr.*
+del /s /f /q \epoc32\winscw\c\sys\install\sisregistry\802730A0
+del /s /f /q \epoc32\winscw\c\sys\install\sisregistry\80000077
+del /s /f /q \epoc32\winscw\c\sys\install\sisregistry\80000076
+del /s /f /q \epoc32\winscw\c\sys\install\sisregistry\
+del /s /f /q \epoc32\winscw\c\sys\bin\
+del /s /f /q \epoc32\winscw\c\sys\hash\
\ No newline at end of file
--- a/installationservices/swi/test/tbackuprestore/scripts/ini	Tue Feb 02 00:20:15 2010 +0200
+++ b/installationservices/swi/test/tbackuprestore/scripts/ini	Fri Mar 19 09:33:35 2010 +0200
@@ -4,6 +4,45 @@
 FILE1.1 = C:\sys\bin\tswinocapability.exe
 INSTALLDRIVE1 = C
 
+[A1_NR]
+SIS1 = c:\tswi\tsis\data\int_nr_option_05_sucert.sis
+UID1 = 80000077
+DATA1.1 = C:\Documents\abc4.txt
+INSTALLDRIVE1 = C
+UninstallResult = -5
+
+[NR_SP]
+SIS1 = c:\tswi\tsis\data\sp_int_nr_option_06_sucert.sis
+UID1 = 80000076
+DATA1.1 = C:\Documents\abc5.txt
+INSTALLDRIVE1 = C
+UninstallResult = -5
+
+[A_NR]
+SIS1 = c:\tswi\tsis\data\int_nr_option_04_sucert.sis
+UID1 = 80000076
+DATA1.1 = C:\Documents\abc1.txt
+INSTALLDRIVE1 = C
+UninstallResult = -5
+
+[A_SP]
+SIS1 = c:\tswi\tsis\data\sp_int_nr_option_04.sis
+UID1 = 80000076
+DATA1.1 = C:\Documents\abc3.txt
+INSTALLDRIVE1 = C
+
+[A_SP_U]
+uid=80000076
+vendorName=Nokia
+packageName=Interpretsis_NR_option_SP
+script=c:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
+[A_SP_U_NR]
+uid=80000076
+vendorName=Nokia
+packageName=Interpretsis_NR_option_SP_NR
+script=c:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
 [B]
 SIS1 = z:\tswi\tsis\data\tswiusergrantable_RSACA_DSACA.sis
 UID1 = 81113022
--- a/installationservices/swi/test/tbackuprestore/scripts/ini_armv5	Tue Feb 02 00:20:15 2010 +0200
+++ b/installationservices/swi/test/tbackuprestore/scripts/ini_armv5	Fri Mar 19 09:33:35 2010 +0200
@@ -4,6 +4,45 @@
 FILE1.1 = C:\sys\bin\tswinocapability.exe
 INSTALLDRIVE1 = C
 
+[A1_NR]
+SIS1 = z:\tswi\tsis\data\int_nr_option_05_sucert.sis
+UID1 = 80000077
+DATA1.1 = C:\Documents\abc4.txt
+INSTALLDRIVE1 = C
+UninstallResult = -5
+
+[NR_SP]
+SIS1 = z:\tswi\tsis\data\sp_int_nr_option_06_sucert.sis
+UID1 = 80000076
+DATA1.1 = C:\Documents\abc5.txt
+INSTALLDRIVE1 = C
+UninstallResult = -5
+
+[A_NR]
+SIS1 = z:\tswi\tsis\data\int_nr_option_04_sucert.sis
+UID1 = 80000076
+DATA1.1 = C:\Documents\abc1.txt
+INSTALLDRIVE1 = C
+UninstallResult = -5
+
+[A_SP]
+SIS1 = z:\tswi\tsis\data\sp_int_nr_option_04.sis
+UID1 = 80000076
+DATA1.1 = C:\Documents\abc3.txt
+INSTALLDRIVE1 = C
+
+[A_SP_U]
+uid=80000076
+vendorName=Nokia
+packageName=Interpretsis_NR_option_SP
+script=z:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
+[A_SP_U_NR]
+uid=80000076
+vendorName=Nokia
+packageName=Interpretsis_NR_option_SP_NR
+script=z:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
 [B]
 SIS1 = z:\tswi\tsis\data\tswiusergrantable_RSACA_DSACA.sis
 UID1 = 81113022
--- a/installationservices/swi/test/tbackuprestore/scripts/tbackuprestore.script	Tue Feb 02 00:20:15 2010 +0200
+++ b/installationservices/swi/test/tbackuprestore/scripts/tbackuprestore.script	Fri Mar 19 09:33:35 2010 +0200
@@ -241,11 +241,11 @@
  RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		romstubpu
  RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
  
- RUN_TEST_STEP	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+ RUN_TEST_STEP_RESULT -5 100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		romstubpu
  RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
  
- RUN_TEST_STEP	100	tbackuprestore	RESTORE		z:\tswi\tbackuprestore\scripts\ini		romstubpu
- RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+ //RUN_TEST_STEP	100	tbackuprestore	RESTORE		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+ //RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
  
  RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		romstubsaru
  RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubsaru
@@ -1810,7 +1810,7 @@
 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		romstubpu
 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
 
-RUN_TEST_STEP	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+RUN_TEST_STEP_RESULT -5	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		romstubpu
 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
 
 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		romstubsaru
@@ -1819,8 +1819,8 @@
 RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini		romstubsaru
 RUN_TEST_STEP	100	tuiscriptadaptors	MmcCheckFilesStep	z:\tswi\tbackuprestore\scripts\ini	romstubsaru_clean
 
-RUN_TEST_STEP	100	tbackuprestore	RESTORE		z:\tswi\tbackuprestore\scripts\ini		romstubpu
-RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+//RUN_TEST_STEP	100	tbackuprestore	RESTORE		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+//RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
 
 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		romstubsaru
 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubsaru
@@ -1830,6 +1830,99 @@
 
 END_TESTCASE API-SEC-INC126755-0002
 
+//! @SYMTestCaseID		API-SEC-BACKUPNONREMOVABLE-0001
+//! @SYMTestCaseDesc		Checks backup of NR SA
+//! @SYMTestPriority		High
+//! @SYMTestStatus		3. Released
+//! @SYMTestActions		Installs, backs up, uninstalls, 
+//! @SYMTestExpectedResults	Install Success, Backup and Uninstall Fails.
+//! @SYMREQ			REQ405-4255
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-BACKUPNONREMOVABLE-0001
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		A1_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A1_NR
+
+RUN_TEST_STEP_RESULT -5	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		A1_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A1_NR
+
+RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini		A1_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A1_NR
+
+END_TESTCASE API-SEC-BACKUPNONREMOVABLE-0001
+
+//! @SYMTestCaseID		API-SEC-BACKUPNONREMOVABLE-0002
+//! @SYMTestCaseDesc		Checks backup of SP Over NR SA
+//! @SYMTestPriority		High
+//! @SYMTestStatus		3. Released
+//! @SYMTestActions		Installs, backs up, uninstalls
+//! @SYMTestExpectedResults	Success, clean environment.
+//! @SYMREQ			REQ405-4255
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-BACKUPNONREMOVABLE-0002
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP_RESULT -5	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		A_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_SP
+
+RUN_TEST_STEP   100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		A_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_SP
+
+RUN_TEST_STEP 	100 tuiscriptadaptors UninstallAugStep z:\tswi\tbackuprestore\scripts\ini  A_SP_U
+
+END_TESTCASE API-SEC-BACKUPNONREMOVABLE-0002
+
+//! @SYMTestCaseID		API-SEC-BACKUPNONREMOVABLE-0003
+//! @SYMTestCaseDesc		Checks backup of SP Over NR SP Over NR SA
+//! @SYMTestPriority		High
+//! @SYMTestStatus		3. Released
+//! @SYMTestActions		Installs, backs up, uninstalls
+//! @SYMTestExpectedResults	Success, clean environment.
+//! @SYMREQ			REQ405-4255
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-BACKUPNONREMOVABLE-0003
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP_RESULT -5	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		NR_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		NR_SP
+
+RUN_TEST_STEP_RESULT -5 100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		NR_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		NR_SP
+
+RUN_TEST_STEP_RESULT -5	100 tuiscriptadaptors UninstallAugStep z:\tswi\tbackuprestore\scripts\ini  A_SP_U_NR
+
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		NR_SP
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		A_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_SP
+
+RUN_TEST_STEP   100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		A_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_SP
+
+RUN_TEST_STEP 	100 tuiscriptadaptors UninstallAugStep z:\tswi\tbackuprestore\scripts\ini  A_SP_U
+
+END_TESTCASE API-SEC-BACKUPNONREMOVABLE-0003
+
+RUN_UTILS DeleteFile C:\Documents\abc*.txt
 
 // Ensure that SWIS shuts down after the above tests to make sure heap checks run
 RUN_TEST_STEP 5 tuiscriptadaptors SwisNotRunning
--- a/installationservices/swi/test/tbackuprestore/scripts/tbackuprestore_armv5.script	Tue Feb 02 00:20:15 2010 +0200
+++ b/installationservices/swi/test/tbackuprestore/scripts/tbackuprestore_armv5.script	Fri Mar 19 09:33:35 2010 +0200
@@ -212,11 +212,11 @@
  RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		romstubpu
  RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
  
- RUN_TEST_STEP	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+ RUN_TEST_STEP_RESULT -5 100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		romstubpu
  RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
  
- RUN_TEST_STEP	100	tbackuprestore	RESTORE		z:\tswi\tbackuprestore\scripts\ini		romstubpu
- RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+ //RUN_TEST_STEP	100	tbackuprestore	RESTORE		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+ //RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
  
  RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		romstubsaru
  RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubsaru
@@ -1596,7 +1596,7 @@
 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		romstubpu
 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
 
-RUN_TEST_STEP	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+RUN_TEST_STEP_RESULT -5	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		romstubpu
 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
 
 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		romstubsaru
@@ -1605,8 +1605,8 @@
 RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini		romstubsaru
 RUN_TEST_STEP	100	tuiscriptadaptors	MmcCheckFilesStep	z:\tswi\tbackuprestore\scripts\ini	romstubsaru_clean
 
-RUN_TEST_STEP	100	tbackuprestore	RESTORE		z:\tswi\tbackuprestore\scripts\ini		romstubpu
-RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+//RUN_TEST_STEP	100	tbackuprestore	RESTORE		z:\tswi\tbackuprestore\scripts\ini		romstubpu
+//RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubpu
 
 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		romstubsaru
 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		romstubsaru
@@ -1642,6 +1642,99 @@
 
 END_TESTCASE API-SEC-SWI-DEF140527_HUGE_CTL_PU-HW-0001
 
+//! @SYMTestCaseID		API-SEC-BACKUPNONREMOVABLE-HW-0001
+//! @SYMTestCaseDesc		Checks backup of NR SA
+//! @SYMTestPriority		High
+//! @SYMTestStatus		3. Released
+//! @SYMTestActions		Installs, backs up, uninstalls, 
+//! @SYMTestExpectedResults	Install Success, Backup and Uninstall Fails.
+//! @SYMREQ			REQ405-4255
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-BACKUPNONREMOVABLE-HW-0001
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		A1_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A1_NR
+
+RUN_TEST_STEP_RESULT -5	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		A1_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A1_NR
+
+RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini		A1_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A1_NR
+
+END_TESTCASE API-SEC-BACKUPNONREMOVABLE-HW-0001
+
+//! @SYMTestCaseID		API-SEC-BACKUPNONREMOVABLE-HW-0002
+//! @SYMTestCaseDesc		Checks backup of SP Over NR SA
+//! @SYMTestPriority		High
+//! @SYMTestStatus		3. Released
+//! @SYMTestActions		Installs, backs up, uninstalls
+//! @SYMTestExpectedResults	Success, clean environment.
+//! @SYMREQ			REQ405-4255
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-BACKUPNONREMOVABLE-HW-0002
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP_RESULT -5	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		A_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_SP
+
+RUN_TEST_STEP   100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		A_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_SP
+
+RUN_TEST_STEP 	100 tuiscriptadaptors UninstallAugStep z:\tswi\tbackuprestore\scripts\ini  A_SP_U
+
+END_TESTCASE API-SEC-BACKUPNONREMOVABLE-HW-0002
+
+//! @SYMTestCaseID		API-SEC-BACKUPNONREMOVABLE-HW-0003
+//! @SYMTestCaseDesc		Checks backup of SP Over NR SP Over NR SA
+//! @SYMTestPriority		High
+//! @SYMTestStatus		3. Released
+//! @SYMTestActions		Installs, backs up, uninstalls
+//! @SYMTestExpectedResults	Success, clean environment.
+//! @SYMREQ			REQ405-4255
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-BACKUPNONREMOVABLE-HW-0003
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP_RESULT -5	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini		A_NR
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_NR
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		NR_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		NR_SP
+
+RUN_TEST_STEP_RESULT -5 100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		NR_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		NR_SP
+
+RUN_TEST_STEP_RESULT -5	100 tuiscriptadaptors UninstallAugStep z:\tswi\tbackuprestore\scripts\ini  A_SP_U_NR
+
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		NR_SP
+
+RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini		A_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_SP
+
+RUN_TEST_STEP   100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini		A_SP
+RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini		A_SP
+
+RUN_TEST_STEP 	100 tuiscriptadaptors UninstallAugStep z:\tswi\tbackuprestore\scripts\ini  A_SP_U
+
+END_TESTCASE API-SEC-BACKUPNONREMOVABLE-HW-0003
+
+RUN_UTILS DeleteFile C:\Documents\abc*.txt
 
 // Ensure that SWIS shuts down after the above tests to make sure heap checks run
 RUN_TEST_STEP 5 tuiscriptadaptors SwisNotRunning
--- a/installationservices/swi/test/tbackuprestore/scripts/tbackuprestore_second_part.script	Tue Feb 02 00:20:15 2010 +0200
+++ b/installationservices/swi/test/tbackuprestore/scripts/tbackuprestore_second_part.script	Fri Mar 19 09:33:35 2010 +0200
@@ -35,8 +35,8 @@
 START_TESTCASE API-ROM_PU_backup_restore-0001
 
 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini	INC128848_install_pu_rom_upgrade
-RUN_TEST_STEP	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini	INC128848_rom_package
-RUN_TEST_STEP	100	tbackuprestore	RESTORE		z:\tswi\tbackuprestore\scripts\ini	INC128848_rom_package
+RUN_TEST_STEP_RESULT -5	100	tbackuprestore	BACKUP		z:\tswi\tbackuprestore\scripts\ini	INC128848_rom_package
+//RUN_TEST_STEP	100	tbackuprestore	RESTORE		z:\tswi\tbackuprestore\scripts\ini	INC128848_rom_package
 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini	INC128848_rom_package
 
 END_TESTCASE API-ROM_PU_backup_restore-0001
--- a/installationservices/swi/test/tbackuprestore/scripts/tbackuprestore_second_part_post.bat	Tue Feb 02 00:20:15 2010 +0200
+++ b/installationservices/swi/test/tbackuprestore/scripts/tbackuprestore_second_part_post.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -18,4 +18,9 @@
 move /Y \epoc32\winscw\c\sys_save \epoc32\winscw\c\sys 
 
 del /s /f /q \epoc32\winscw\c\tswi\tbackuprestore\backup*.*
-del /s /f /q \epoc32\winscw\c\tswi\tbackuprestore\metadata*
\ No newline at end of file
+del /s /f /q \epoc32\winscw\c\tswi\tbackuprestore\metadata*
+del /s /f /q \epoc32\winscw\c\sys\bin\backuprestore_test_*
+del /s /f /q \epoc32\winscw\c\sys\hash\backuprestore_test_*
+del /s /f /q \epoc32\winscw\c\sys\install\scr\scr.*
+del /s /f /q \epoc32\winscw\c\sys\install\sisregistry\2baecde2\*.*
+del /s /f /q \epoc32\winscw\c\sys\install\sisregistry\2baecde2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_01.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia Software Ltd", "Nokia Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_NR_option", "Interpretsis_NR_option1"}, (0x80000086), 1,0,0, Type=SA
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc1.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_02.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia Software Ltd", "Nokia Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_NR_option3", "Interpretsis_NR_option2"}, (0x80000087), 1,0,0, Type=SA
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc2.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_03.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia Software Ltd", "Nokia Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_NR_option", "Interpretsis_NR_option1"}, (0x80000086), 1,0,0, Type=SA,RU
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc1.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_04.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia Software Ltd", "Nokia Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_NR_option", "Interpretsis_NR_option1"}, (0x80000076), 1,0,0, Type=SA,RU,NR
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc1.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_05.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia Software Ltd", "Nokia Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_NR_option", "Interpretsis_NR_option1"}, (0x80000077), 1,0,0, Type=SA,RU,NR
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc4.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/pu_int_nr_option_01.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia Software Ltd", "Nokia Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_NR_option", "Interpretsis_NR_option1"}, (0x80000086), 1,0,0, Type=PU
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc2.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_01.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia", "Nokia"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_NR_option_SP", "Interpretsis_NR_option1_SP"}, (0x80000086), 1,0,0, Type=SP
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc3.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_04.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia", "Nokia"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_NR_option_SP", "Interpretsis_NR_option1_SP"}, (0x80000076), 1,0,0, Type=SP
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc3.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_06.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia", "Nokia"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_NR_option_SP_NR", "Interpretsis_NR_option1_SP_NR"}, (0x80000076), 1,0,0, Type=SP,NR,RU
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc5.txt"
\ No newline at end of file
--- a/installationservices/swi/test/testexes/prepareexes.pl	Tue Feb 02 00:20:15 2010 +0200
+++ b/installationservices/swi/test/testexes/prepareexes.pl	Fri Mar 19 09:33:35 2010 +0200
@@ -40,6 +40,7 @@
 my $configuration = lc($ARGV[1]);
 my $packagedir = "packages";
 my $non_iby_packagedir = "non_iby_packages";
+my $packages_interpretsis_testcase = "packages_interpretsis_testcase";
 my $builddir = "buildsis_${platform}_${configuration}";
 
 usage() if $opt{h};
@@ -121,7 +122,7 @@
 	my ($file, $data) = @_;
 
 	# Ensure directory exists
-	if ($file =~ basename($1) && ! -e $1) {
+	if ($1 && $file =~ basename($1) && ! -e $1) {
 		mkdir($1);
 	}
 
@@ -149,6 +150,8 @@
 print "Processing files in directory: $builddir\n\n";
 MakeSISFiles($packagedir,"yes");
 MakeSISFiles($non_iby_packagedir,"no");
+MakeSISFiles($packages_interpretsis_testcase,"yes");
+
 
 # Copy emulator version of preinstalled exes to location script expects.
 # They will be moved by the test script to the e: drive.
@@ -791,6 +794,9 @@
 
 # non-removable test
 SignFileWithSpecifiedCert("nonremovablebase.sis", "nonremovablebase_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
+SignFileWithSpecifiedCert("int_nr_option_04.sis", "int_nr_option_04_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
+SignFileWithSpecifiedCert("int_nr_option_05.sis", "int_nr_option_05_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
+SignFileWithSpecifiedCert("sp_int_nr_option_06.sis", "sp_int_nr_option_06_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
 
 SignFile("romupgrademorecapsthansucert_sucert.sis", "romupgrademorecapsthansucert_sucert_root5.sis", "root5ca", \*iby);
 
Binary file installationservices/swiconfig/usif/scr/scr.db has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/bwins/siftransportu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,73 @@
+EXPORTS
+	?PrepareResultsForIpcL@COpaqueNamedParams@Usif@@QAEXAAVTIpcArgs@@H@Z @ 1 NONAME ; void Usif::COpaqueNamedParams::PrepareResultsForIpcL(class TIpcArgs &, int)
+	?HasCapability@TSecurityContext@Usif@@QBEHW4TCapability@@@Z @ 2 NONAME ; int Usif::TSecurityContext::HasCapability(enum TCapability) const
+	?NewL@CComponentInfo@Usif@@SAPAV12@XZ @ 3 NONAME ; class Usif::CComponentInfo * Usif::CComponentInfo::NewL(void)
+	?CancelOperation@RSifTransportClient@Usif@@QAEXXZ @ 4 NONAME ; void Usif::RSifTransportClient::CancelOperation(void)
+	??0TTransportTaskParams@Usif@@QAE@XZ @ 5 NONAME ; Usif::TTransportTaskParams::TTransportTaskParams(void)
+	?HasCapabilityL@TSecurityContext@Usif@@QBEXW4TCapability@@@Z @ 6 NONAME ; void Usif::TSecurityContext::HasCapabilityL(enum TCapability) const
+	?Authenticity@CNode@CComponentInfo@Usif@@QBE?AW4TAuthenticity@3@XZ @ 7 NONAME ; enum Usif::TAuthenticity Usif::CComponentInfo::CNode::Authenticity(void) const
+	?SetRootNodeAsChildL@CComponentInfo@Usif@@QAEXAAVCNode@12@@Z @ 8 NONAME ; void Usif::CComponentInfo::SetRootNodeAsChildL(class Usif::CComponentInfo::CNode &)
+	?Activate@RSifTransportClient@Usif@@QAEXHAAVTRequestStatus@@@Z @ 9 NONAME ; void Usif::RSifTransportClient::Activate(int, class TRequestStatus &)
+	?NewSifTransportServerLC@CSifTransportServer@Usif@@SAPAVCScsServer@@XZ @ 10 NONAME ; class CScsServer * Usif::CSifTransportServer::NewSifTransportServerLC(void)
+	?NewLC@COpaqueNamedParams@Usif@@SAPAV12@XZ @ 11 NONAME ; class Usif::COpaqueNamedParams * Usif::COpaqueNamedParams::NewLC(void)
+	?Uninstall@RSifTransportClient@Usif@@QAEXHAAVTRequestStatus@@H@Z @ 12 NONAME ; void Usif::RSifTransportClient::Uninstall(int, class TRequestStatus &, int)
+	?InstallStatus@CNode@CComponentInfo@Usif@@QBE?AW4TInstallStatus@3@XZ @ 13 NONAME ; enum Usif::TInstallStatus Usif::CComponentInfo::CNode::InstallStatus(void) const
+	?Cleanup@COpaqueNamedParams@Usif@@QAEXXZ @ 14 NONAME ; void Usif::COpaqueNamedParams::Cleanup(void)
+	??0RSifTransportClient@Usif@@QAE@XZ @ 15 NONAME ; Usif::RSifTransportClient::RSifTransportClient(void)
+	?CountL@COpaqueNamedParams@Usif@@QBEHXZ @ 16 NONAME ; int Usif::COpaqueNamedParams::CountL(void) const
+	?SecurityContext@CSifTransportTask@Usif@@IBEPBVTSecurityContext@2@XZ @ 17 NONAME ; class Usif::TSecurityContext const * Usif::CSifTransportTask::SecurityContext(void) const
+	?RootNodeL@CComponentInfo@Usif@@QBEABVCNode@12@XZ @ 18 NONAME ; class Usif::CComponentInfo::CNode const & Usif::CComponentInfo::RootNodeL(void) const
+	??1CNode@CComponentInfo@Usif@@UAE@XZ @ 19 NONAME ; Usif::CComponentInfo::CNode::~CNode(void)
+	?GetComponentInfo@RSifTransportClient@Usif@@QAEXABVTDesC16@@AAVCComponentInfo@2@AAVTRequestStatus@@@Z @ 20 NONAME ; void Usif::RSifTransportClient::GetComponentInfo(class TDesC16 const &, class Usif::CComponentInfo &, class TRequestStatus &)
+	?Deactivate@RSifTransportClient@Usif@@QAEXHAAVTRequestStatus@@@Z @ 21 NONAME ; void Usif::RSifTransportClient::Deactivate(int, class TRequestStatus &)
+	?Install@RSifTransportClient@Usif@@QAEXAAVRFile@@ABVCOpaqueNamedParams@2@AAV42@AAVTRequestStatus@@H@Z @ 22 NONAME ; void Usif::RSifTransportClient::Install(class RFile &, class Usif::COpaqueNamedParams const &, class Usif::COpaqueNamedParams &, class TRequestStatus &, int)
+	?ExternalizeL@COpaqueNamedParams@Usif@@QBEXAAVRWriteStream@@@Z @ 23 NONAME ; void Usif::COpaqueNamedParams::ExternalizeL(class RWriteStream &) const
+	?FileHandle@CSifTransportTask@Usif@@IAEPAVRFile@@XZ @ 24 NONAME ; class RFile * Usif::CSifTransportTask::FileHandle(void)
+	?Vendor@CNode@CComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 25 NONAME ; class TDesC16 const & Usif::CComponentInfo::CNode::Vendor(void) const
+	?ComponentName@CNode@CComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 26 NONAME ; class TDesC16 const & Usif::CComponentInfo::CNode::ComponentName(void) const
+	?NewLC@CNode@CComponentInfo@Usif@@SAPAV123@ABVTDesC16@@000W4TScomoState@3@W4TInstallStatus@3@H0W4TAuthenticity@3@ABVTCapabilitySet@@HHPAV?$RPointerArray@VCNode@CComponentInfo@Usif@@@@@Z @ 27 NONAME ; class Usif::CComponentInfo::CNode * Usif::CComponentInfo::CNode::NewLC(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, enum Usif::TScomoState, enum Usif::TInstallStatus, int, class TDesC16 const &, enum Usif::TAuthenticity, class TCapabilitySet const &, int, class RPointerArray<class Usif::CComponentInfo::CNode> *)
+	??0TSecurityContext@Usif@@AAE@ABVRMessage2@@@Z @ 28 NONAME ; Usif::TSecurityContext::TSecurityContext(class RMessage2 const &)
+	??1COpaqueNamedParams@Usif@@UAE@XZ @ 29 NONAME ; Usif::COpaqueNamedParams::~COpaqueNamedParams(void)
+	?SoftwareTypeName@CNode@CComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 30 NONAME ; class TDesC16 const & Usif::CComponentInfo::CNode::SoftwareTypeName(void) const
+	?UserGrantableCaps@CNode@CComponentInfo@Usif@@QBEABVTCapabilitySet@@XZ @ 31 NONAME ; class TCapabilitySet const & Usif::CComponentInfo::CNode::UserGrantableCaps(void) const
+	?CancelImpl@CSifTransportTask@Usif@@MAEXXZ @ 32 NONAME ; void Usif::CSifTransportTask::CancelImpl(void)
+	?CustomResults@CSifTransportTask@Usif@@IAEPAVCOpaqueNamedParams@2@XZ @ 33 NONAME ; class Usif::COpaqueNamedParams * Usif::CSifTransportTask::CustomResults(void)
+	?IntByNameL@COpaqueNamedParams@Usif@@QBEHABVTDesC16@@@Z @ 34 NONAME ; int Usif::COpaqueNamedParams::IntByNameL(class TDesC16 const &) const
+	?Install@RSifTransportClient@Usif@@QAEXAAVRFile@@AAVTRequestStatus@@H@Z @ 35 NONAME ; void Usif::RSifTransportClient::Install(class RFile &, class TRequestStatus &, int)
+	?StringByNameL@COpaqueNamedParams@Usif@@QBEABVTDesC16@@ABV3@@Z @ 36 NONAME ; class TDesC16 const & Usif::COpaqueNamedParams::StringByNameL(class TDesC16 const &) const
+	??0CSifTransportTask@Usif@@IAE@AAUTTransportTaskParams@1@H@Z @ 37 NONAME ; Usif::CSifTransportTask::CSifTransportTask(struct Usif::TTransportTaskParams &, int)
+	??1CSifTransportTask@Usif@@MAE@XZ @ 38 NONAME ; Usif::CSifTransportTask::~CSifTransportTask(void)
+	?ScomoState@CNode@CComponentInfo@Usif@@QBE?AW4TScomoState@3@XZ @ 39 NONAME ; enum Usif::TScomoState Usif::CComponentInfo::CNode::ScomoState(void) const
+	?AddIntL@COpaqueNamedParams@Usif@@QAEXABVTDesC16@@H@Z @ 40 NONAME ; void Usif::COpaqueNamedParams::AddIntL(class TDesC16 const &, int)
+	?Install@RSifTransportClient@Usif@@QAEXABVTDesC16@@AAVTRequestStatus@@H@Z @ 41 NONAME ; void Usif::RSifTransportClient::Install(class TDesC16 const &, class TRequestStatus &, int)
+	?Children@CNode@CComponentInfo@Usif@@QBEABV?$RPointerArray@VCNode@CComponentInfo@Usif@@@@XZ @ 42 NONAME ; class RPointerArray<class Usif::CComponentInfo::CNode> const & Usif::CComponentInfo::CNode::Children(void) const
+	?FileName@CSifTransportTask@Usif@@IBEPBVTDesC16@@XZ @ 43 NONAME ; class TDesC16 const * Usif::CSifTransportTask::FileName(void) const
+	?Uninstall@RSifTransportClient@Usif@@QAEXHABVCOpaqueNamedParams@2@AAV32@AAVTRequestStatus@@H@Z @ 44 NONAME ; void Usif::RSifTransportClient::Uninstall(int, class Usif::COpaqueNamedParams const &, class Usif::COpaqueNamedParams &, class TRequestStatus &, int)
+	?PrepareForIpcL@CComponentInfo@Usif@@QAEXAAVTIpcArgs@@H@Z @ 45 NONAME ; void Usif::CComponentInfo::PrepareForIpcL(class TIpcArgs &, int)
+	?GetComponentInfo@RSifTransportClient@Usif@@QAEXAAVRFile@@AAVCComponentInfo@2@AAVTRequestStatus@@@Z @ 46 NONAME ; void Usif::RSifTransportClient::GetComponentInfo(class RFile &, class Usif::CComponentInfo &, class TRequestStatus &)
+	?NewLC@CComponentInfo@Usif@@SAPAV12@XZ @ 47 NONAME ; class Usif::CComponentInfo * Usif::CComponentInfo::NewLC(void)
+	?GetIntByNameL@COpaqueNamedParams@Usif@@QBEHABVTDesC16@@AAH@Z @ 48 NONAME ; int Usif::COpaqueNamedParams::GetIntByNameL(class TDesC16 const &, int &) const
+	?SetRootNodeL@CComponentInfo@Usif@@QAEXPAVCNode@12@@Z @ 49 NONAME ; void Usif::CComponentInfo::SetRootNodeL(class Usif::CComponentInfo::CNode *)
+	?CustomArguments@CSifTransportTask@Usif@@IBEPBVCOpaqueNamedParams@2@XZ @ 50 NONAME ; class Usif::COpaqueNamedParams const * Usif::CSifTransportTask::CustomArguments(void) const
+	?GetNamesL@COpaqueNamedParams@Usif@@QBEXAAV?$RPointerArray@VHBufC16@@@@@Z @ 51 NONAME ; void Usif::COpaqueNamedParams::GetNamesL(class RPointerArray<class HBufC16> &) const
+	?MaxInstalledSize@CNode@CComponentInfo@Usif@@QBEHXZ @ 52 NONAME ; int Usif::CComponentInfo::CNode::MaxInstalledSize(void) const
+	?Version@CNode@CComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 53 NONAME ; class TDesC16 const & Usif::CComponentInfo::CNode::Version(void) const
+	?RequestStatus@CSifTransportTask@Usif@@IAEPAVTRequestStatus@@XZ @ 54 NONAME ; class TRequestStatus * Usif::CSifTransportTask::RequestStatus(void)
+	?Install@RSifTransportClient@Usif@@QAEXABVTDesC16@@ABVCOpaqueNamedParams@2@AAV42@AAVTRequestStatus@@H@Z @ 55 NONAME ; void Usif::RSifTransportClient::Install(class TDesC16 const &, class Usif::COpaqueNamedParams const &, class Usif::COpaqueNamedParams &, class TRequestStatus &, int)
+	?AddStringL@COpaqueNamedParams@Usif@@QAEXABVTDesC16@@0@Z @ 56 NONAME ; void Usif::COpaqueNamedParams::AddStringL(class TDesC16 const &, class TDesC16 const &)
+	?ExternalizeL@CComponentInfo@Usif@@QBEXAAVRWriteStream@@@Z @ 57 NONAME ; void Usif::CComponentInfo::ExternalizeL(class RWriteStream &) const
+	?AddChildL@CNode@CComponentInfo@Usif@@QAEXPAV123@@Z @ 58 NONAME ; void Usif::CComponentInfo::CNode::AddChildL(class Usif::CComponentInfo::CNode *)
+	?ComponentId@CNode@CComponentInfo@Usif@@QBEHXZ @ 59 NONAME ; int Usif::CComponentInfo::CNode::ComponentId(void) const
+	?ComponentId@CSifTransportTask@Usif@@IBEHXZ @ 60 NONAME ; int Usif::CSifTransportTask::ComponentId(void) const
+	?StartTransportServer@Usif@@YAHABVTDesC16@@ABVTVersion@@P6APAVCSifTransportTask@1@W4TTaskType@TransportTaskFactory@1@AAUTTransportTaskParams@1@@ZH@Z @ 61 NONAME ; int Usif::StartTransportServer(class TDesC16 const &, class TVersion const &, class Usif::CSifTransportTask * (*)(enum Usif::TransportTaskFactory::TTaskType, struct Usif::TTransportTaskParams &), int)
+	?Close@RSifTransportClient@Usif@@QAEXXZ @ 62 NONAME ; void Usif::RSifTransportClient::Close(void)
+	?SecureId@TSecurityContext@Usif@@QBE?AVTSecureId@@XZ @ 63 NONAME ; class TSecureId Usif::TSecurityContext::SecureId(void) const
+	?NewL@COpaqueNamedParams@Usif@@SAPAV12@XZ @ 64 NONAME ; class Usif::COpaqueNamedParams * Usif::COpaqueNamedParams::NewL(void)
+	?Connect@RSifTransportClient@Usif@@QAEHABVTDesC16@@ABVTVersion@@0VTUid@@@Z @ 65 NONAME ; int Usif::RSifTransportClient::Connect(class TDesC16 const &, class TVersion const &, class TDesC16 const &, class TUid)
+	??1CComponentInfo@Usif@@UAE@XZ @ 66 NONAME ; Usif::CComponentInfo::~CComponentInfo(void)
+	?GlobalComponentId@CNode@CComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 67 NONAME ; class TDesC16 const & Usif::CComponentInfo::CNode::GlobalComponentId(void) const
+	?ComponentInfo@CSifTransportTask@Usif@@IAEPAVCComponentInfo@2@XZ @ 68 NONAME ; class Usif::CComponentInfo * Usif::CSifTransportTask::ComponentInfo(void)
+	?InternalizeL@COpaqueNamedParams@Usif@@QAEXAAVRReadStream@@@Z @ 69 NONAME ; void Usif::COpaqueNamedParams::InternalizeL(class RReadStream &)
+	?PrepareArgumentsForIpcL@COpaqueNamedParams@Usif@@QBEXAAVTIpcArgs@@H@Z @ 70 NONAME ; void Usif::COpaqueNamedParams::PrepareArgumentsForIpcL(class TIpcArgs &, int) const
+	?HasExecutable@CNode@CComponentInfo@Usif@@QBEHXZ @ 71 NONAME ; int Usif::CComponentInfo::CNode::HasExecutable(void) const
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/bwins/sifu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,59 @@
+EXPORTS
+	?PrepareResultsForIpcL@COpaqueNamedParams@Usif@@QAEXAAVTIpcArgs@@H@Z @ 1 NONAME ; void Usif::COpaqueNamedParams::PrepareResultsForIpcL(class TIpcArgs &, int)
+	?HasCapability@TSecurityContext@Usif@@QBEHW4TCapability@@@Z @ 2 NONAME ; int Usif::TSecurityContext::HasCapability(enum TCapability) const
+	?SoftwareTypeName@CNode@CComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 3 NONAME ; class TDesC16 const & Usif::CComponentInfo::CNode::SoftwareTypeName(void) const
+	?NewL@CComponentInfo@Usif@@SAPAV12@XZ @ 4 NONAME ; class Usif::CComponentInfo * Usif::CComponentInfo::NewL(void)
+	?UserGrantableCaps@CNode@CComponentInfo@Usif@@QBEABVTCapabilitySet@@XZ @ 5 NONAME ; class TCapabilitySet const & Usif::CComponentInfo::CNode::UserGrantableCaps(void) const
+	?IntByNameL@COpaqueNamedParams@Usif@@QBEHABVTDesC16@@@Z @ 6 NONAME ; int Usif::COpaqueNamedParams::IntByNameL(class TDesC16 const &) const
+	?HasCapabilityL@TSecurityContext@Usif@@QBEXW4TCapability@@@Z @ 7 NONAME ; void Usif::TSecurityContext::HasCapabilityL(enum TCapability) const
+	?Close@RSoftwareInstall@Usif@@QAEXXZ @ 8 NONAME ; void Usif::RSoftwareInstall::Close(void)
+	?Authenticity@CNode@CComponentInfo@Usif@@QBE?AW4TAuthenticity@3@XZ @ 9 NONAME ; enum Usif::TAuthenticity Usif::CComponentInfo::CNode::Authenticity(void) const
+	?SetRootNodeAsChildL@CComponentInfo@Usif@@QAEXAAVCNode@12@@Z @ 10 NONAME ; void Usif::CComponentInfo::SetRootNodeAsChildL(class Usif::CComponentInfo::CNode &)
+	?Uninstall@RSoftwareInstall@Usif@@QAEXHAAVTRequestStatus@@H@Z @ 11 NONAME ; void Usif::RSoftwareInstall::Uninstall(int, class TRequestStatus &, int)
+	?StringByNameL@COpaqueNamedParams@Usif@@QBEABVTDesC16@@ABV3@@Z @ 12 NONAME ; class TDesC16 const & Usif::COpaqueNamedParams::StringByNameL(class TDesC16 const &) const
+	?ScomoState@CNode@CComponentInfo@Usif@@QBE?AW4TScomoState@3@XZ @ 13 NONAME ; enum Usif::TScomoState Usif::CComponentInfo::CNode::ScomoState(void) const
+	?Install@RSoftwareInstall@Usif@@QAEXABVTDesC16@@ABVCOpaqueNamedParams@2@AAV42@AAVTRequestStatus@@H@Z @ 14 NONAME ; void Usif::RSoftwareInstall::Install(class TDesC16 const &, class Usif::COpaqueNamedParams const &, class Usif::COpaqueNamedParams &, class TRequestStatus &, int)
+	?AddIntL@COpaqueNamedParams@Usif@@QAEXABVTDesC16@@H@Z @ 15 NONAME ; void Usif::COpaqueNamedParams::AddIntL(class TDesC16 const &, int)
+	?NewLC@COpaqueNamedParams@Usif@@SAPAV12@XZ @ 16 NONAME ; class Usif::COpaqueNamedParams * Usif::COpaqueNamedParams::NewLC(void)
+	?InstallStatus@CNode@CComponentInfo@Usif@@QBE?AW4TInstallStatus@3@XZ @ 17 NONAME ; enum Usif::TInstallStatus Usif::CComponentInfo::CNode::InstallStatus(void) const
+	?Children@CNode@CComponentInfo@Usif@@QBEABV?$RPointerArray@VCNode@CComponentInfo@Usif@@@@XZ @ 18 NONAME ; class RPointerArray<class Usif::CComponentInfo::CNode> const & Usif::CComponentInfo::CNode::Children(void) const
+	?Cleanup@COpaqueNamedParams@Usif@@QAEXXZ @ 19 NONAME ; void Usif::COpaqueNamedParams::Cleanup(void)
+	?CancelOperation@RSoftwareInstall@Usif@@QAEXXZ @ 20 NONAME ; void Usif::RSoftwareInstall::CancelOperation(void)
+	?PrepareForIpcL@CComponentInfo@Usif@@QAEXAAVTIpcArgs@@H@Z @ 21 NONAME ; void Usif::CComponentInfo::PrepareForIpcL(class TIpcArgs &, int)
+	?NewLC@CComponentInfo@Usif@@SAPAV12@XZ @ 22 NONAME ; class Usif::CComponentInfo * Usif::CComponentInfo::NewLC(void)
+	?CountL@COpaqueNamedParams@Usif@@QBEHXZ @ 23 NONAME ; int Usif::COpaqueNamedParams::CountL(void) const
+	?SetRootNodeL@CComponentInfo@Usif@@QAEXPAVCNode@12@@Z @ 24 NONAME ; void Usif::CComponentInfo::SetRootNodeL(class Usif::CComponentInfo::CNode *)
+	?GetIntByNameL@COpaqueNamedParams@Usif@@QBEHABVTDesC16@@AAH@Z @ 25 NONAME ; int Usif::COpaqueNamedParams::GetIntByNameL(class TDesC16 const &, int &) const
+	?MaxInstalledSize@CNode@CComponentInfo@Usif@@QBEHXZ @ 26 NONAME ; int Usif::CComponentInfo::CNode::MaxInstalledSize(void) const
+	?GetNamesL@COpaqueNamedParams@Usif@@QBEXAAV?$RPointerArray@VHBufC16@@@@@Z @ 27 NONAME ; void Usif::COpaqueNamedParams::GetNamesL(class RPointerArray<class HBufC16> &) const
+	?Version@CNode@CComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 28 NONAME ; class TDesC16 const & Usif::CComponentInfo::CNode::Version(void) const
+	?RootNodeL@CComponentInfo@Usif@@QBEABVCNode@12@XZ @ 29 NONAME ; class Usif::CComponentInfo::CNode const & Usif::CComponentInfo::RootNodeL(void) const
+	??1CNode@CComponentInfo@Usif@@UAE@XZ @ 30 NONAME ; Usif::CComponentInfo::CNode::~CNode(void)
+	?GetComponentInfo@RSoftwareInstall@Usif@@QAEXABVTDesC16@@AAVCComponentInfo@2@AAVTRequestStatus@@@Z @ 31 NONAME ; void Usif::RSoftwareInstall::GetComponentInfo(class TDesC16 const &, class Usif::CComponentInfo &, class TRequestStatus &)
+	?Uninstall@RSoftwareInstall@Usif@@QAEXHABVCOpaqueNamedParams@2@AAV32@AAVTRequestStatus@@H@Z @ 32 NONAME ; void Usif::RSoftwareInstall::Uninstall(int, class Usif::COpaqueNamedParams const &, class Usif::COpaqueNamedParams &, class TRequestStatus &, int)
+	?Deactivate@RSoftwareInstall@Usif@@QAEXHAAVTRequestStatus@@@Z @ 33 NONAME ; void Usif::RSoftwareInstall::Deactivate(int, class TRequestStatus &)
+	?AddStringL@COpaqueNamedParams@Usif@@QAEXABVTDesC16@@0@Z @ 34 NONAME ; void Usif::COpaqueNamedParams::AddStringL(class TDesC16 const &, class TDesC16 const &)
+	?AddChildL@CNode@CComponentInfo@Usif@@QAEXPAV123@@Z @ 35 NONAME ; void Usif::CComponentInfo::CNode::AddChildL(class Usif::CComponentInfo::CNode *)
+	?ComponentId@CNode@CComponentInfo@Usif@@QBEHXZ @ 36 NONAME ; int Usif::CComponentInfo::CNode::ComponentId(void) const
+	?ExternalizeL@CComponentInfo@Usif@@QBEXAAVRWriteStream@@@Z @ 37 NONAME ; void Usif::CComponentInfo::ExternalizeL(class RWriteStream &) const
+	??0RSoftwareInstall@Usif@@QAE@XZ @ 38 NONAME ; Usif::RSoftwareInstall::RSoftwareInstall(void)
+	?SecureId@TSecurityContext@Usif@@QBE?AVTSecureId@@XZ @ 39 NONAME ; class TSecureId Usif::TSecurityContext::SecureId(void) const
+	?Activate@RSoftwareInstall@Usif@@QAEXHAAVTRequestStatus@@@Z @ 40 NONAME ; void Usif::RSoftwareInstall::Activate(int, class TRequestStatus &)
+	?ExternalizeL@COpaqueNamedParams@Usif@@QBEXAAVRWriteStream@@@Z @ 41 NONAME ; void Usif::COpaqueNamedParams::ExternalizeL(class RWriteStream &) const
+	?Install@RSoftwareInstall@Usif@@QAEXABVTDesC16@@AAVTRequestStatus@@H@Z @ 42 NONAME ; void Usif::RSoftwareInstall::Install(class TDesC16 const &, class TRequestStatus &, int)
+	?Vendor@CNode@CComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 43 NONAME ; class TDesC16 const & Usif::CComponentInfo::CNode::Vendor(void) const
+	?NewL@COpaqueNamedParams@Usif@@SAPAV12@XZ @ 44 NONAME ; class Usif::COpaqueNamedParams * Usif::COpaqueNamedParams::NewL(void)
+	?GetComponentInfo@RSoftwareInstall@Usif@@QAEXAAVRFile@@AAVCComponentInfo@2@AAVTRequestStatus@@@Z @ 45 NONAME ; void Usif::RSoftwareInstall::GetComponentInfo(class RFile &, class Usif::CComponentInfo &, class TRequestStatus &)
+	?ComponentName@CNode@CComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 46 NONAME ; class TDesC16 const & Usif::CComponentInfo::CNode::ComponentName(void) const
+	?Connect@RSoftwareInstall@Usif@@QAEHXZ @ 47 NONAME ; int Usif::RSoftwareInstall::Connect(void)
+	?Install@RSoftwareInstall@Usif@@QAEXAAVRFile@@ABVCOpaqueNamedParams@2@AAV42@AAVTRequestStatus@@H@Z @ 48 NONAME ; void Usif::RSoftwareInstall::Install(class RFile &, class Usif::COpaqueNamedParams const &, class Usif::COpaqueNamedParams &, class TRequestStatus &, int)
+	??1CComponentInfo@Usif@@UAE@XZ @ 49 NONAME ; Usif::CComponentInfo::~CComponentInfo(void)
+	?NewLC@CNode@CComponentInfo@Usif@@SAPAV123@ABVTDesC16@@000W4TScomoState@3@W4TInstallStatus@3@H0W4TAuthenticity@3@ABVTCapabilitySet@@HHPAV?$RPointerArray@VCNode@CComponentInfo@Usif@@@@@Z @ 50 NONAME ; class Usif::CComponentInfo::CNode * Usif::CComponentInfo::CNode::NewLC(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, enum Usif::TScomoState, enum Usif::TInstallStatus, int, class TDesC16 const &, enum Usif::TAuthenticity, class TCapabilitySet const &, int, class RPointerArray<class Usif::CComponentInfo::CNode> *)
+	??0TSecurityContext@Usif@@AAE@ABVRMessage2@@@Z @ 51 NONAME ; Usif::TSecurityContext::TSecurityContext(class RMessage2 const &)
+	?GlobalComponentId@CNode@CComponentInfo@Usif@@QBEABVTDesC16@@XZ @ 52 NONAME ; class TDesC16 const & Usif::CComponentInfo::CNode::GlobalComponentId(void) const
+	?PrepareArgumentsForIpcL@COpaqueNamedParams@Usif@@QBEXAAVTIpcArgs@@H@Z @ 53 NONAME ; void Usif::COpaqueNamedParams::PrepareArgumentsForIpcL(class TIpcArgs &, int) const
+	?InternalizeL@COpaqueNamedParams@Usif@@QAEXAAVRReadStream@@@Z @ 54 NONAME ; void Usif::COpaqueNamedParams::InternalizeL(class RReadStream &)
+	??1COpaqueNamedParams@Usif@@UAE@XZ @ 55 NONAME ; Usif::COpaqueNamedParams::~COpaqueNamedParams(void)
+	?Install@RSoftwareInstall@Usif@@QAEXAAVRFile@@AAVTRequestStatus@@H@Z @ 56 NONAME ; void Usif::RSoftwareInstall::Install(class RFile &, class TRequestStatus &, int)
+	?HasExecutable@CNode@CComponentInfo@Usif@@QBEHXZ @ 57 NONAME ; int Usif::CComponentInfo::CNode::HasExecutable(void) const
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/bwins/sifutilsu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	?UninstallL@Usif@@YAXH@Z @ 1 NONAME ; void Usif::UninstallL(int)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/common/inc/usifcommon.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,63 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This header defines common USIF entities
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifndef USIFCOMMON_H
+#define USIFCOMMON_H
+
+#include <e32base.h>
+
+namespace Usif
+	{
+	/**
+		This enumeration defines the possible states of a software component. According to the SCOMO specification
+		a component may be Deactivated or Activated. New software components are activated during installation by
+		default. However, the 'InstallInactive' param can be passed to the SIF in order not to activated a newly installed
+		component. Please refer to the SIF API documentation for more details.
+	 */
+	enum TScomoState
+		{
+		EDeactivated = 0,
+		EActivated   = 1
+		};
+
+	/**
+		TComponentId defines an instance of a software component in the Software Component Registry. Two different components cannot 
+		have the same id on the system, however, it is not global and different components may have the same component id
+		on separate devices.Please refer to @see GlobalId for a unique identifier for software components across different devices.
+	*/
+	typedef TInt TComponentId;
+
+	
+	/**
+		Pre-defined software type names for the Universal Software Install Framework. 
+		'native' stands for Symbian native components delivered in the SIS/SISX packages.
+		'java' stands for Java MIDlets.
+	*/
+	_LIT(KSoftwareTypeNative, "native");
+	_LIT(KSoftwareTypeJava, "java");
+	
+	} // end namespace Usif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/common/inc/usiferror.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,86 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Error codes defined by the Universal Software Install Framework.
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released 
+*/
+
+#ifndef USIFERROR_H
+#define USIFERROR_H
+
+/** A general error in one of the Unified Installer Framework components. */
+const TInt KErrSifUnknown = -10300;
+
+/** Installation of a software upgrade could not complete because the package being upgraded was not installed on the device. */
+const TInt KErrSifMissingBasePackage = -10301;
+
+/** Installation of a software component could not complete because one or more of the packages it depends on are not present on the device. */
+const TInt KErrSifMissingDependencies = -10302;
+
+/** Installation of a software component could not complete because there was no matching installer for the package. */
+const TInt KErrSifUnsupportedSoftwareType = -10303;
+
+/** Installation of a software component failed because the delivery package was corrupt. */
+const TInt KErrSifCorruptedPackage = -10304;
+
+/** Installation of a software component failed since the parameters passed via the Software Install Framework were too large. */
+const TInt KErrSifOverflow = -10307;
+
+/** Installation of a software component failed because the same version of the component is already installed on the system. */
+const TInt KErrSifSameVersionAlreadyInstalled = -10309;
+
+/** Installation of a software component failed because a newer version of the same component is already installed on the system. */
+const TInt KErrSifNewerVersionAlreadyInstalled = -10310;
+
+/** Activation of a component failed because it was already activated. */
+const TInt KErrSifAlreadyActivated = -10311;
+
+/** Deactivation of a component failed because it was already inactive. */
+const TInt KErrSifAlreadyDeactivated = -10312;
+
+/** The component id specified is not installed on the system. */
+const TInt KErrSifBadComponentId = -10313;
+
+/** The component was not installed due to lack of free space on the target drive. */
+const TInt KErrSifNotEnoughSpace = -10314;
+
+/** The component was not installed due to an internal problem with the corresponding installer. */
+const TInt KErrSifBadInstallerConfiguration = -10315;
+
+/** Installation of a component failed because the package is not targeted for this device. */
+const TInt KErrSifPackageCannotBeInstalledOnThisDevice = -10316;
+
+/** Installation of a component failed because the component's language is not supported this device. */
+const TInt KErrSifUnsupportedLanguage = -10317;
+
+/** At least one writing operation is in progress on the SCR server. A new transaction or subsession cannot be created.*/
+const TInt KErrScrWriteOperationInProgress = -10320;
+
+/** At least one reading operation exists on the SCR server. A new transaction cannot be created. */
+const TInt KErrScrReadOperationInProgress = -10321;
+
+/** There is no active transaction on the SCR Server owned by the calling session. */
+const TInt KErrScrNoActiveTransaction = -10322;
+
+/** The requested value couldn't be found for the specified locale. */
+const TInt KErrScrUnsupportedLocale = -10323;
+
+#endif // USIFERROR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/common/inc/usiflog.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements print functions for the Universal Software Install Framework components.
+*
+*/
+
+
+/**
+ @file 
+ @internalComponent 
+ @released
+*/
+ 
+#ifndef USIFLOG_H
+#define USIFLOG_H
+
+#include <scs/securitylog.h>
+
+namespace Usif
+	{
+	 _LIT8(KComponentName, "[USIF]");
+	   
+	#define DEBUG_PRINTF(a) {SEC_DEBUG_PRINTF(KComponentName, a);}
+	#define DEBUG_PRINTF2(a, b) {SEC_DEBUG_PRINTF2(KComponentName, a, b);}
+	#define DEBUG_PRINTF3(a, b, c) {SEC_DEBUG_PRINTF3(KComponentName, a, b, c);}
+	#define DEBUG_PRINTF4(a, b, c, d) {SEC_DEBUG_PRINTF4(KComponentName, a, b, c, d);}
+	#define DEBUG_PRINTF5(a, b, c, d, e) {SEC_DEBUG_PRINTF5(KComponentName, a, b, c, d, e);}
+	
+	#define DEBUG_CODE_SECTION(a) {SEC_DEBUG_CODE_SECTION(a);}
+	 
+	}	// End of namespace StreamAccess
+
+#endif // USIFLOG_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/eabi/siftransportu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,98 @@
+EXPORTS
+	_ZN4Usif14CComponentInfo12SetRootNodeLEPNS0_5CNodeE @ 1 NONAME
+	_ZN4Usif14CComponentInfo14PrepareForIpcLER8TIpcArgsi @ 2 NONAME
+	_ZN4Usif14CComponentInfo19SetRootNodeAsChildLERNS0_5CNodeE @ 3 NONAME
+	_ZN4Usif14CComponentInfo4NewLEv @ 4 NONAME
+	_ZN4Usif14CComponentInfo5CNode5NewLCERK7TDesC16S4_S4_S4_NS_11TScomoStateENS_14TInstallStatusEiS4_NS_13TAuthenticityERK14TCapabilitySetiiP13RPointerArrayIS1_E @ 5 NONAME
+	_ZN4Usif14CComponentInfo5CNode9AddChildLEPS1_ @ 6 NONAME
+	_ZN4Usif14CComponentInfo5CNodeD0Ev @ 7 NONAME
+	_ZN4Usif14CComponentInfo5CNodeD1Ev @ 8 NONAME
+	_ZN4Usif14CComponentInfo5CNodeD2Ev @ 9 NONAME
+	_ZN4Usif14CComponentInfo5NewLCEv @ 10 NONAME
+	_ZN4Usif14CComponentInfoD0Ev @ 11 NONAME
+	_ZN4Usif14CComponentInfoD1Ev @ 12 NONAME
+	_ZN4Usif14CComponentInfoD2Ev @ 13 NONAME
+	_ZN4Usif16TSecurityContextC1ERK9RMessage2 @ 14 NONAME
+	_ZN4Usif16TSecurityContextC2ERK9RMessage2 @ 15 NONAME
+	_ZN4Usif17CSifTransportTask10CancelImplEv @ 16 NONAME
+	_ZN4Usif17CSifTransportTask10FileHandleEv @ 17 NONAME
+	_ZN4Usif17CSifTransportTask13ComponentInfoEv @ 18 NONAME
+	_ZN4Usif17CSifTransportTask13CustomResultsEv @ 19 NONAME
+	_ZN4Usif17CSifTransportTask13RequestStatusEv @ 20 NONAME
+	_ZN4Usif17CSifTransportTaskC2ERNS_20TTransportTaskParamsEi @ 21 NONAME
+	_ZN4Usif17CSifTransportTaskD0Ev @ 22 NONAME
+	_ZN4Usif17CSifTransportTaskD1Ev @ 23 NONAME
+	_ZN4Usif17CSifTransportTaskD2Ev @ 24 NONAME
+	_ZN4Usif18COpaqueNamedParams10AddStringLERK7TDesC16S3_ @ 25 NONAME
+	_ZN4Usif18COpaqueNamedParams12InternalizeLER11RReadStream @ 26 NONAME
+	_ZN4Usif18COpaqueNamedParams21PrepareResultsForIpcLER8TIpcArgsi @ 27 NONAME
+	_ZN4Usif18COpaqueNamedParams4NewLEv @ 28 NONAME
+	_ZN4Usif18COpaqueNamedParams5NewLCEv @ 29 NONAME
+	_ZN4Usif18COpaqueNamedParams7AddIntLERK7TDesC16i @ 30 NONAME
+	_ZN4Usif18COpaqueNamedParams7CleanupEv @ 31 NONAME
+	_ZN4Usif18COpaqueNamedParamsD0Ev @ 32 NONAME
+	_ZN4Usif18COpaqueNamedParamsD1Ev @ 33 NONAME
+	_ZN4Usif18COpaqueNamedParamsD2Ev @ 34 NONAME
+	_ZN4Usif19CSifTransportServer23NewSifTransportServerLCEv @ 35 NONAME
+	_ZN4Usif19RSifTransportClient10DeactivateEiR14TRequestStatus @ 36 NONAME
+	_ZN4Usif19RSifTransportClient15CancelOperationEv @ 37 NONAME
+	_ZN4Usif19RSifTransportClient16GetComponentInfoER5RFileRNS_14CComponentInfoER14TRequestStatus @ 38 NONAME
+	_ZN4Usif19RSifTransportClient16GetComponentInfoERK7TDesC16RNS_14CComponentInfoER14TRequestStatus @ 39 NONAME
+	_ZN4Usif19RSifTransportClient5CloseEv @ 40 NONAME
+	_ZN4Usif19RSifTransportClient7ConnectERK7TDesC16RK8TVersionS3_4TUid @ 41 NONAME
+	_ZN4Usif19RSifTransportClient7InstallER5RFileR14TRequestStatusi @ 42 NONAME
+	_ZN4Usif19RSifTransportClient7InstallER5RFileRKNS_18COpaqueNamedParamsERS3_R14TRequestStatusi @ 43 NONAME
+	_ZN4Usif19RSifTransportClient7InstallERK7TDesC16R14TRequestStatusi @ 44 NONAME
+	_ZN4Usif19RSifTransportClient7InstallERK7TDesC16RKNS_18COpaqueNamedParamsERS4_R14TRequestStatusi @ 45 NONAME
+	_ZN4Usif19RSifTransportClient8ActivateEiR14TRequestStatus @ 46 NONAME
+	_ZN4Usif19RSifTransportClient9UninstallEiR14TRequestStatusi @ 47 NONAME
+	_ZN4Usif19RSifTransportClient9UninstallEiRKNS_18COpaqueNamedParamsERS1_R14TRequestStatusi @ 48 NONAME
+	_ZN4Usif19RSifTransportClientC1Ev @ 49 NONAME
+	_ZN4Usif19RSifTransportClientC2Ev @ 50 NONAME
+	_ZN4Usif20StartTransportServerERK7TDesC16RK8TVersionPFPNS_17CSifTransportTaskENS_20TransportTaskFactory9TTaskTypeERNS_20TTransportTaskParamsEEi @ 51 NONAME
+	_ZN4Usif20TTransportTaskParamsC1Ev @ 52 NONAME
+	_ZN4Usif20TTransportTaskParamsC2Ev @ 53 NONAME
+	_ZNK4Usif14CComponentInfo12ExternalizeLER12RWriteStream @ 54 NONAME
+	_ZNK4Usif14CComponentInfo5CNode10ScomoStateEv @ 55 NONAME
+	_ZNK4Usif14CComponentInfo5CNode11ComponentIdEv @ 56 NONAME
+	_ZNK4Usif14CComponentInfo5CNode12AuthenticityEv @ 57 NONAME
+	_ZNK4Usif14CComponentInfo5CNode13ComponentNameEv @ 58 NONAME
+	_ZNK4Usif14CComponentInfo5CNode13InstallStatusEv @ 59 NONAME
+	_ZNK4Usif14CComponentInfo5CNode16MaxInstalledSizeEv @ 60 NONAME
+	_ZNK4Usif14CComponentInfo5CNode16SoftwareTypeNameEv @ 61 NONAME
+	_ZNK4Usif14CComponentInfo5CNode17GlobalComponentIdEv @ 62 NONAME
+	_ZNK4Usif14CComponentInfo5CNode17UserGrantableCapsEv @ 63 NONAME
+	_ZNK4Usif14CComponentInfo5CNode6VendorEv @ 64 NONAME
+	_ZNK4Usif14CComponentInfo5CNode7VersionEv @ 65 NONAME
+	_ZNK4Usif14CComponentInfo5CNode8ChildrenEv @ 66 NONAME
+	_ZNK4Usif14CComponentInfo9RootNodeLEv @ 67 NONAME
+	_ZNK4Usif16TSecurityContext13HasCapabilityE11TCapability @ 68 NONAME
+	_ZNK4Usif16TSecurityContext14HasCapabilityLE11TCapability @ 69 NONAME
+	_ZNK4Usif16TSecurityContext8SecureIdEv @ 70 NONAME
+	_ZNK4Usif17CSifTransportTask11ComponentIdEv @ 71 NONAME
+	_ZNK4Usif17CSifTransportTask15CustomArgumentsEv @ 72 NONAME
+	_ZNK4Usif17CSifTransportTask15SecurityContextEv @ 73 NONAME
+	_ZNK4Usif17CSifTransportTask8FileNameEv @ 74 NONAME
+	_ZNK4Usif18COpaqueNamedParams10IntByNameLERK7TDesC16 @ 75 NONAME
+	_ZNK4Usif18COpaqueNamedParams12ExternalizeLER12RWriteStream @ 76 NONAME
+	_ZNK4Usif18COpaqueNamedParams13GetIntByNameLERK7TDesC16Ri @ 77 NONAME
+	_ZNK4Usif18COpaqueNamedParams13StringByNameLERK7TDesC16 @ 78 NONAME
+	_ZNK4Usif18COpaqueNamedParams23PrepareArgumentsForIpcLER8TIpcArgsi @ 79 NONAME
+	_ZNK4Usif18COpaqueNamedParams6CountLEv @ 80 NONAME
+	_ZNK4Usif18COpaqueNamedParams9GetNamesLER13RPointerArrayI7HBufC16E @ 81 NONAME
+	_ZTIN4Usif14CComponentInfo5CNodeE @ 82 NONAME
+	_ZTIN4Usif14CComponentInfoE @ 83 NONAME
+	_ZTIN4Usif17CSifTransportTaskE @ 84 NONAME
+	_ZTIN4Usif18COpaqueNamedParamsE @ 85 NONAME
+	_ZTIN4Usif19CSifTransportServerE @ 86 NONAME
+	_ZTIN4Usif20CSifTransportRequestE @ 87 NONAME
+	_ZTIN4Usif20CSifTransportSessionE @ 88 NONAME
+	_ZTVN4Usif14CComponentInfo5CNodeE @ 89 NONAME
+	_ZTVN4Usif14CComponentInfoE @ 90 NONAME
+	_ZTVN4Usif17CSifTransportTaskE @ 91 NONAME
+	_ZTVN4Usif18COpaqueNamedParamsE @ 92 NONAME
+	_ZTVN4Usif19CSifTransportServerE @ 93 NONAME
+	_ZTVN4Usif20CSifTransportRequestE @ 94 NONAME
+	_ZTVN4Usif20CSifTransportSessionE @ 95 NONAME
+	_ZNK4Usif14CComponentInfo5CNode13HasExecutableEv @ 96 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/eabi/sifu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,73 @@
+EXPORTS
+	_ZN4Usif14CComponentInfo12SetRootNodeLEPNS0_5CNodeE @ 1 NONAME
+	_ZN4Usif14CComponentInfo14PrepareForIpcLER8TIpcArgsi @ 2 NONAME
+	_ZN4Usif14CComponentInfo19SetRootNodeAsChildLERNS0_5CNodeE @ 3 NONAME
+	_ZN4Usif14CComponentInfo4NewLEv @ 4 NONAME
+	_ZN4Usif14CComponentInfo5CNode5NewLCERK7TDesC16S4_S4_S4_NS_11TScomoStateENS_14TInstallStatusEiS4_NS_13TAuthenticityERK14TCapabilitySetiiP13RPointerArrayIS1_E @ 5 NONAME
+	_ZN4Usif14CComponentInfo5CNode9AddChildLEPS1_ @ 6 NONAME
+	_ZN4Usif14CComponentInfo5CNodeD0Ev @ 7 NONAME
+	_ZN4Usif14CComponentInfo5CNodeD1Ev @ 8 NONAME
+	_ZN4Usif14CComponentInfo5CNodeD2Ev @ 9 NONAME
+	_ZN4Usif14CComponentInfo5NewLCEv @ 10 NONAME
+	_ZN4Usif14CComponentInfoD0Ev @ 11 NONAME
+	_ZN4Usif14CComponentInfoD1Ev @ 12 NONAME
+	_ZN4Usif14CComponentInfoD2Ev @ 13 NONAME
+	_ZN4Usif16RSoftwareInstall10DeactivateEiR14TRequestStatus @ 14 NONAME
+	_ZN4Usif16RSoftwareInstall15CancelOperationEv @ 15 NONAME
+	_ZN4Usif16RSoftwareInstall16GetComponentInfoER5RFileRNS_14CComponentInfoER14TRequestStatus @ 16 NONAME
+	_ZN4Usif16RSoftwareInstall16GetComponentInfoERK7TDesC16RNS_14CComponentInfoER14TRequestStatus @ 17 NONAME
+	_ZN4Usif16RSoftwareInstall5CloseEv @ 18 NONAME
+	_ZN4Usif16RSoftwareInstall7ConnectEv @ 19 NONAME
+	_ZN4Usif16RSoftwareInstall7InstallER5RFileR14TRequestStatusi @ 20 NONAME
+	_ZN4Usif16RSoftwareInstall7InstallER5RFileRKNS_18COpaqueNamedParamsERS3_R14TRequestStatusi @ 21 NONAME
+	_ZN4Usif16RSoftwareInstall7InstallERK7TDesC16R14TRequestStatusi @ 22 NONAME
+	_ZN4Usif16RSoftwareInstall7InstallERK7TDesC16RKNS_18COpaqueNamedParamsERS4_R14TRequestStatusi @ 23 NONAME
+	_ZN4Usif16RSoftwareInstall8ActivateEiR14TRequestStatus @ 24 NONAME
+	_ZN4Usif16RSoftwareInstall9UninstallEiR14TRequestStatusi @ 25 NONAME
+	_ZN4Usif16RSoftwareInstall9UninstallEiRKNS_18COpaqueNamedParamsERS1_R14TRequestStatusi @ 26 NONAME
+	_ZN4Usif16RSoftwareInstallC1Ev @ 27 NONAME
+	_ZN4Usif16RSoftwareInstallC2Ev @ 28 NONAME
+	_ZN4Usif16TSecurityContextC1ERK9RMessage2 @ 29 NONAME
+	_ZN4Usif16TSecurityContextC2ERK9RMessage2 @ 30 NONAME
+	_ZN4Usif18COpaqueNamedParams10AddStringLERK7TDesC16S3_ @ 31 NONAME
+	_ZN4Usif18COpaqueNamedParams12InternalizeLER11RReadStream @ 32 NONAME
+	_ZN4Usif18COpaqueNamedParams21PrepareResultsForIpcLER8TIpcArgsi @ 33 NONAME
+	_ZN4Usif18COpaqueNamedParams4NewLEv @ 34 NONAME
+	_ZN4Usif18COpaqueNamedParams5NewLCEv @ 35 NONAME
+	_ZN4Usif18COpaqueNamedParams7AddIntLERK7TDesC16i @ 36 NONAME
+	_ZN4Usif18COpaqueNamedParams7CleanupEv @ 37 NONAME
+	_ZN4Usif18COpaqueNamedParamsD0Ev @ 38 NONAME
+	_ZN4Usif18COpaqueNamedParamsD1Ev @ 39 NONAME
+	_ZN4Usif18COpaqueNamedParamsD2Ev @ 40 NONAME
+	_ZNK4Usif14CComponentInfo12ExternalizeLER12RWriteStream @ 41 NONAME
+	_ZNK4Usif14CComponentInfo5CNode10ScomoStateEv @ 42 NONAME
+	_ZNK4Usif14CComponentInfo5CNode11ComponentIdEv @ 43 NONAME
+	_ZNK4Usif14CComponentInfo5CNode12AuthenticityEv @ 44 NONAME
+	_ZNK4Usif14CComponentInfo5CNode13ComponentNameEv @ 45 NONAME
+	_ZNK4Usif14CComponentInfo5CNode13InstallStatusEv @ 46 NONAME
+	_ZNK4Usif14CComponentInfo5CNode16MaxInstalledSizeEv @ 47 NONAME
+	_ZNK4Usif14CComponentInfo5CNode16SoftwareTypeNameEv @ 48 NONAME
+	_ZNK4Usif14CComponentInfo5CNode17GlobalComponentIdEv @ 49 NONAME
+	_ZNK4Usif14CComponentInfo5CNode17UserGrantableCapsEv @ 50 NONAME
+	_ZNK4Usif14CComponentInfo5CNode6VendorEv @ 51 NONAME
+	_ZNK4Usif14CComponentInfo5CNode7VersionEv @ 52 NONAME
+	_ZNK4Usif14CComponentInfo5CNode8ChildrenEv @ 53 NONAME
+	_ZNK4Usif14CComponentInfo9RootNodeLEv @ 54 NONAME
+	_ZNK4Usif16TSecurityContext13HasCapabilityE11TCapability @ 55 NONAME
+	_ZNK4Usif16TSecurityContext14HasCapabilityLE11TCapability @ 56 NONAME
+	_ZNK4Usif16TSecurityContext8SecureIdEv @ 57 NONAME
+	_ZNK4Usif18COpaqueNamedParams10IntByNameLERK7TDesC16 @ 58 NONAME
+	_ZNK4Usif18COpaqueNamedParams12ExternalizeLER12RWriteStream @ 59 NONAME
+	_ZNK4Usif18COpaqueNamedParams13GetIntByNameLERK7TDesC16Ri @ 60 NONAME
+	_ZNK4Usif18COpaqueNamedParams13StringByNameLERK7TDesC16 @ 61 NONAME
+	_ZNK4Usif18COpaqueNamedParams23PrepareArgumentsForIpcLER8TIpcArgsi @ 62 NONAME
+	_ZNK4Usif18COpaqueNamedParams6CountLEv @ 63 NONAME
+	_ZNK4Usif18COpaqueNamedParams9GetNamesLER13RPointerArrayI7HBufC16E @ 64 NONAME
+	_ZTIN4Usif14CComponentInfo5CNodeE @ 65 NONAME
+	_ZTIN4Usif14CComponentInfoE @ 66 NONAME
+	_ZTIN4Usif18COpaqueNamedParamsE @ 67 NONAME
+	_ZTVN4Usif14CComponentInfo5CNodeE @ 68 NONAME
+	_ZTVN4Usif14CComponentInfoE @ 69 NONAME
+	_ZTVN4Usif18COpaqueNamedParamsE @ 70 NONAME
+	_ZNK4Usif14CComponentInfo5CNode13HasExecutableEv @ 71 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/eabi/sifutilsu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	_ZN4Usif10UninstallLEi @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/engineering/Doxyfile.cfg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,245 @@
+# Doxyfile 1.4.6
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = "Universal Install Framework"
+PROJECT_NUMBER         = 
+OUTPUT_DIRECTORY       = ./output
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+USE_WINDOWS_ENCODING   = YES
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = 
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = NO
+STRIP_FROM_PATH        = 
+STRIP_FROM_INC_PATH    = 
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = YES
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+SEPARATE_MEMBER_PAGES  = NO
+TAB_SIZE               = 8
+ALIASES                = "publishedAll=@par Interface: publishedAll\n" \
+                         "publishedPartner=@par Interface: publishedPartner\n" \
+                         "internalAll=@par Interface: internalAll\n" \
+                         "internalComponent=@par Interface: internalComponent\n" \
+                         "internalTechnology=@par Interface: internalTechnology\n" \
+                         "prototype=@par Interface: prototype\n" \
+                         "interim=@par Interface: interim\n" \
+                         "released=@par Interface: released\n" \
+                         "deprecated=@par Interface: deprecated\n" \
+                         "removed=@par Interface: removed\n" \
+                         "capability=@par Capability: \n" \
+                         "leave=@par Leave: \n" \
+                         "panic=@par Panic: \n" \
+                         "SYMPurpose=@par File Purpose: \n"
+OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_JAVA   = NO
+BUILTIN_STL_SUPPORT    = NO
+DISTRIBUTE_GROUP_DOC   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = NO
+EXTRACT_STATIC         = YES
+EXTRACT_LOCAL_CLASSES  = NO
+EXTRACT_LOCAL_METHODS  = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = YES
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = NO
+GENERATE_TESTLIST      = NO
+GENERATE_BUGLIST       = NO
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_DIRECTORIES       = NO
+FILE_VERSION_FILTER    = 
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = ../common/inc \
+						 ../scr/inc \
+						 ../sts/inc \
+						 ../sif/inc \
+FILE_PATTERNS          = *.cpp \
+                         *.h \
+                         *.inl \
+                         *.hrh \
+                         *.rss
+RECURSIVE              = YES
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = *.policy
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = 
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = .
+INPUT_FILTER           = 
+FILTER_PATTERNS        = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = NO
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
+USE_HTAGS              = NO
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = NO
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = YES
+CHM_FILE               = ../../UsifApi.chm
+HHC_LOCATION           = "C:/Program Files/HTML Help Workshop/hhc.exe"
+GENERATE_CHI           = NO
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 2
+GENERATE_TREEVIEW      = NO
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = YES
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = YES
+LATEX_BATCHMODE        = YES
+LATEX_HIDE_INDICES     = YES
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = YES
+EXPAND_ONLY_PREDEF     = YES
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = EXPORT_C \
+                         REMOVE_CAF1 \
+                         "NONSHARABLE_CLASS(name)=class name"
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = NO
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = 
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = YES
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = YES
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = 
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 0
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = NO
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/engineering/builddox.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+rmdir /S /Q output
+mkdir output
+del /F /Q UsifApi.chm
+del /F /Q UsifApi.pdf
+doxygen Doxyfile.cfg > doxygen.log 2>&1
+UsifApi.chm
+doxygen.log
+echo Building PDF...
+cd output\latex
+make pdf
+cd ..\..
+ren output\latex\refman.pdf .\UsifApi.pdf
+echo Done.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/engineering/readme.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,38 @@
+/*
+* Portions 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+// Description:		Universal Install Framework Readme file
+
+
+This folder holds the Doxygen files needed to build the Compiled HTML Help file 
+that documents the USIF APIs.
+
+
+// ----------------------------------------------------
+// Pre-requisites for building the documentation
+// ----------------------------------------------------
+
+Windows PC with:
+
+o DOxygen 1.4.6 or later, 
+	http://www.stack.nl/~dimitri/doxygen/
+o Graphviz 2.8 or later, 
+	http://www.graphviz.org/
+o Microsoft HTML Help Workshop 4.74 or later,  
+	http://www.microsoft.com/downloads/details.aspx?familyid=00535334-c8a6-452f-9aa0-d597d16580cc&displaylang=en
+o MikTex
+	http://miktex.org/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/examples/refnativeplugin/group/refnativeplugin.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Project specification file for SIF plugin for native software
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+TARGET			refnativeplugin.dll
+TARGETTYPE		PLUGIN
+
+UID				0x10009D8D 0x10285BC3
+
+CAPABILITY		ProtServ TrustedUI ReadUserData
+
+SOURCEPATH		../source
+SOURCE			refnativeplugin.cpp
+
+USERINCLUDE		../../../common/inc
+USERINCLUDE		../../../../swi/inc
+USERINCLUDE		../../../../swi/inc/swi
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+START RESOURCE	10285BC3.rss
+	TARGET refnativeplugin.rsc
+END
+LIBRARY			euser.lib sishelper.lib sif.lib scrclient.lib
+LIBRARY			sisregistryclient.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/examples/refnativeplugin/source/10285BC3.rss	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* ECOM DLL UID:			0x10285BC3
+* ECOM interface UID:		0x10285BC2 (KUidSifPlugin)
+* ECOM Implementation:		0x10285BC4
+*
+*/
+
+
+#include <ecom/registryinfo.rh>
+
+RESOURCE REGISTRY_INFO so_registry
+	{
+	dll_uid = 0x10285BC3;
+	interfaces =
+		{
+		INTERFACE_INFO
+			{
+			interface_uid = 0x10285BC2;
+			
+			implementations =
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = 0x10285BC4;
+					version_no = 1;
+					default_data = "";
+					opaque_data = "";
+					}
+				};
+			}
+		};
+	}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/examples/refnativeplugin/source/refnativeplugin.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,713 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "refnativeplugin.h"
+#include "usiflog.h"
+#include <usif/sif/sif.h>
+#include <usif/sif/sifcommon.h>
+#include <usif/usiferror.h>
+#include <usif/sif/sifplugin.h>
+#include <usif/scr/screntries.h>
+#include <usif/scr/scr.h>
+#include <swi/msisuihandlers.h>
+#include <swi/asynclauncher.h>
+#include <swi/sisinstallerrors.h>
+#include <e32property.h>
+#include <sacls.h>
+#include "sisregistrywritablesession.h"
+#include "sisregistrysession.h"
+
+using namespace Usif;
+
+static const TInt KRefNativePluginImpId = 0x10285BC4;
+
+static const TImplementationProxy ImplementationTable[] = 
+	{
+	IMPLEMENTATION_PROXY_ENTRY(KRefNativePluginImpId, CRefNativePlugin::NewL)
+	};
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+	{
+	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+	return ImplementationTable;
+	}
+
+CRefNativePlugin* CRefNativePlugin::NewL()
+	{
+	DEBUG_PRINTF(_L8("Constructing CRefNativePlugin"));
+	CRefNativePlugin *self = new (ELeave) CRefNativePlugin();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CRefNativePlugin::ConstructL()
+	{
+	iImpl = CRefNativePluginActiveImpl::NewL();
+	}
+
+CRefNativePlugin::~CRefNativePlugin()
+	{
+	delete iImpl;
+	}
+
+void CRefNativePlugin::CancelOperation()
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - Cancel"));
+	iImpl->Cancel();
+	}
+
+void CRefNativePlugin::GetComponentInfo(const TDesC& aFileName, const TSecurityContext& /*aSecurityContext*/,
+										 CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	iImpl->GetComponentInfo(aFileName, aComponentInfo, aStatus);
+	}
+
+void CRefNativePlugin::GetComponentInfo(RFile& aFileHandle, const TSecurityContext& /*aSecurityContext*/,
+						 				CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	iImpl->GetComponentInfo(aFileHandle, aComponentInfo, aStatus);
+	}
+
+void CRefNativePlugin::Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+								TRequestStatus& aStatus)
+	{
+	iImpl->Install(aFileName, aSecurityContext, aInputParams, aOutputParams, aStatus);
+	}
+
+void CRefNativePlugin::Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+								TRequestStatus& aStatus)
+	{
+	iImpl->Install(aFileHandle, aSecurityContext, aInputParams, aOutputParams, aStatus);
+	}
+
+void CRefNativePlugin::Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus)
+	{
+	iImpl->Uninstall(aComponentId, aSecurityContext, aInputParams, aOutputParams, aStatus);
+	}
+
+void CRefNativePlugin::Activate(TComponentId aComponentId, const TSecurityContext& aSecurityContext, TRequestStatus& aStatus)
+
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - Activate"));
+	iImpl->Activate(aComponentId, aSecurityContext, aStatus);
+	}
+
+void CRefNativePlugin::Deactivate(TComponentId aComponentId, const TSecurityContext& aSecurityContext, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - Deactivate"));
+	iImpl->Deactivate(aComponentId, aSecurityContext, aStatus);
+	}
+
+//------------------CRefNativePluginActiveImpl---------------------
+
+CRefNativePluginActiveImpl* CRefNativePluginActiveImpl::NewL()
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - Constructing CRefNativePluginActiveImpl"));
+	CRefNativePluginActiveImpl *self = new (ELeave) CRefNativePluginActiveImpl();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(1, self);
+	return self;
+	}
+
+void CRefNativePluginActiveImpl::ConstructL()
+	{
+	iInstallPrefs = Swi::CInstallPrefs::NewL();
+	iAsyncLauncher = Swi::CAsyncLauncher::NewL();
+	iComponentInfo = CComponentInfo::NewL();
+	CActiveScheduler::Add(this);
+	}
+
+CRefNativePluginActiveImpl::~CRefNativePluginActiveImpl()
+	{
+	delete iAsyncLauncher;
+	delete iInstallPrefs;
+	delete iComponentInfo;
+	}
+
+const TInt KSystemWideErrorsBoundary = -100;
+
+TInt ConvertToSifErrorCode(TInt aSwiErrorCode)
+	{
+	if (aSwiErrorCode > KSystemWideErrorsBoundary)
+		return aSwiErrorCode; 
+	switch (aSwiErrorCode)
+		{
+		case KErrSISFieldIdMissing:
+		case KErrSISFieldLengthMissing:
+		case KErrSISFieldLengthInvalid:
+		case KErrSISStringInvalidLength:
+		case KErrSISSignedControllerSISControllerMissing:
+		case KErrSISControllerSISInfoMissing:
+		case KErrSISInfoSISUidMissing:
+		case KErrSISInfoSISNamesMissing:
+		case KErrSISFieldBufferTooShort:
+		case KErrSISStringArrayInvalidElement:
+		case KErrSISInfoSISVendorNamesMissing:
+		case KErrSISInfoSISVersionMissing:
+		case KErrSISControllerSISSupportedLanguagesMissing:
+		case KErrSISSupportedLanguagesInvalidElement:
+		case KErrSISLanguageInvalidLength:
+		case KErrSISContentsSISSignedControllerMissing:
+		case KErrSISContentsSISDataMissing:
+		case KErrSISDataSISFileDataUnitMissing:
+		case KErrSISFileDataUnitTargetMissing:
+		case KErrSISFileOptionsMissing:
+		case KErrSISFileDataUnitDescriptorMissing:
+		case KErrSISFileDataDescriptionMissing:
+		case KErrSISContentsMissing:
+		case KErrSISEmbeddedControllersMissing:
+		case KErrSISEmbeddedDataUnitsMissing:
+		case KErrSISControllerOptionsMissing:
+		case KErrSISExpressionMissing:
+		case KErrSISExpressionStringValueMissing:
+		case KErrSISOptionsStringMissing:
+		case KErrSISFileOptionsExpressionMissing:
+		case KErrSISExpressionHeadValueMissing:
+		case KErrSISEmbeddedSISOptionsMissing:
+		case KErrSISInfoSISUpgradeRangeMissing:
+		case KErrSISDependencyMissingUid:
+		case KErrSISDependencyMissingVersion:
+		case KErrSISDependencyMissingNames:
+		case KErrSISControllerMissingPrerequisites:
+		case KErrSISUpgradeRangeMissingVersion:
+		case KErrSISUnexpectedFieldType:
+		case KErrSISExpressionUnknownOperator:
+		case KErrSISArrayReadError:
+		case KErrSISArrayTypeMismatch:
+		case KErrSISInvalidStringLength:
+		case KErrSISCompressionNotSupported:
+		case KErrSISTooDeeplyEmbedded:
+		case KErrWrongHeaderFormat:
+		case KErrExpressionToComplex:
+		case KErrInvalidExpression:
+		case KErrInvalidType:
+
+			return KErrSifCorruptedPackage;
+
+		case KErrBadUsage:
+		case KErrInstallerLeave:
+
+			return KErrSifUnknown;
+
+		case KErrSISPrerequisitesMissingDependency:
+
+			return KErrSifMissingDependencies;
+
+		case KErrMissingBasePackage:
+
+			return KErrSifMissingBasePackage;
+
+		case KErrCapabilitiesMismatch:
+		case KErrInvalidEclipsing:
+		case KErrSecurityError:
+		case KErrBadHash:
+		case KErrDigestNotSupported:
+		case KErrSignatureSchemeNotSupported:
+		case KErrSISWouldOverWrite:
+		case KErrSISInvalidTargetFile:
+
+			return KErrPermissionDenied;
+
+		case KErrPolicyFileCorrupt:
+
+			return KErrSifBadInstallerConfiguration;
+
+		case KErrInvalidUpgrade:
+		case KErrLegacySisFile:
+
+			return KErrSifPackageCannotBeInstalledOnThisDevice;
+
+		case KErrSISNotEnoughSpaceToInstall:
+
+			return KErrSifNotEnoughSpace;
+
+		default:
+			return KErrSifUnknown;
+		}
+	}
+
+TBool CRefNativePluginActiveImpl::NeedUserCapabilityL()
+	{
+	// Silent install is not allowed when the package requires additional capabilities
+	// than what it is signed for (Pakage may request for some capability that is not 
+	// granted by the certificate used to sign it).
+	for(TInt cap=0; cap<ECapability_Limit; ++cap)
+		{
+		if (iComponentInfo->RootNodeL().UserGrantableCaps().HasCapability(TCapability(cap)))
+			{
+			DEBUG_PRINTF2(_L("Package requires additional capability - %d"), cap);
+			return ETrue;
+			}
+		}
+			
+	return EFalse;
+	}
+
+void CRefNativePluginActiveImpl::RunL()
+	{
+	if (iSilentInstall)
+		{
+		DEBUG_PRINTF(_L("Silent install  - CRefNativePluginActiveImpl::RunL"));
+		ProcessSilentInstallL();
+		}
+	else
+		{
+		TInt res = iStatus.Int();
+		DEBUG_PRINTF2(_L8("Reference native plugin - Operation finished with result %d"), res);
+	
+		// Output options
+		if (iOutputParams != NULL)
+			{
+			iOutputParams->AddIntL(KSifOutParam_ExtendedErrCode, res);
+			
+			if (iInstallRequest && res == KErrNone)
+				{
+				TComponentId resultComponentId = 0;
+				TRAPD(getLastIdErr, resultComponentId = GetLastInstalledComponentIdL());
+				if (getLastIdErr == KErrNone)
+					iOutputParams->AddIntL(KSifOutParam_ComponentId, resultComponentId);
+				}
+			}
+	
+		User::RequestComplete(iClientStatus, ConvertToSifErrorCode(res));
+		iClientStatus = NULL;
+		}
+	}
+
+void CRefNativePluginActiveImpl::ProcessSilentInstallL()
+	{
+	// We need to do this only once per installation request
+	iSilentInstall = EFalse;
+	iInstallRequest = ETrue;
+	
+	TBool isNotAuthenticated = (ENotAuthenticated == iComponentInfo->RootNodeL().Authenticity());
+	TBool reqUserCap = NeedUserCapabilityL();
+	if (isNotAuthenticated || reqUserCap)
+		{
+		if (isNotAuthenticated)
+			{
+				DEBUG_PRINTF(_L("Silent Install is not allowed on unsigned or self-signed packages"));
+			}
+		
+		if (reqUserCap)
+			{
+				DEBUG_PRINTF(_L("Silent Install is not allowed when user capabilities are required"));
+			}
+		
+		User::RequestComplete(iClientStatus, KErrNotSupported);
+		iClientStatus = NULL;
+		}		
+	else
+		{
+		TInt err;
+		if (iFileHandle)
+			{
+			TRAP(err, iAsyncLauncher->InstallL(*this, *iFileHandle, *iInstallPrefs, iStatus));
+			}
+		else
+			{
+			//DEBUG_PRINTF2(_L("!!!Silent install for %S"), iFileName);
+			TRAP(err, iAsyncLauncher->InstallL(*this, iFileName, *iInstallPrefs, iStatus));
+			}
+		
+		if (err != KErrNone)
+			{
+			User::RequestComplete(iClientStatus, err);
+			iClientStatus = NULL;			
+			}
+		
+		SetActive();
+		}
+	}
+
+void CRefNativePluginActiveImpl::DoCancel()
+	{
+	if (iClientStatus)
+		{
+		iAsyncLauncher->CancelOperation();
+		delete iAsyncLauncher;
+		iAsyncLauncher = NULL;
+		
+		User::RequestComplete(iClientStatus, KErrCancel);
+		iClientStatus = NULL;
+		}
+	}
+
+void CRefNativePluginActiveImpl::CommonRequestPreamble(const TSecurityContext& aSecurityContext, const COpaqueNamedParams& aInputParams, 
+				COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus)
+	{
+	aStatus = KRequestPending;
+	iClientStatus = &aStatus;
+
+	iInputParams = &aInputParams;
+	iOutputParams = &aOutputParams;
+
+	TInt declineOperation = 0;
+	TRAPD(err, aInputParams.GetIntByNameL(KDeclineOperationOptionName, declineOperation));
+	if(err == KErrNone && declineOperation)
+		{
+		iDeclineOperation = ETrue;
+		}
+	
+	// Check to see if we have the opaque input argument - InstallSilently 
+	TInt silentInstall = 0;
+	TRAP_IGNORE(aInputParams.GetIntByNameL(KSifInParam_InstallSilently, silentInstall));
+	if (silentInstall)
+		{
+		iSilentInstall = ETrue;
+		if (!aSecurityContext.HasCapability(ECapabilityTrustedUI))
+			{
+			User::RequestComplete(iClientStatus, KErrPermissionDenied);
+			iClientStatus = NULL;			
+			}
+		}	
+	}
+
+TComponentId CRefNativePluginActiveImpl::GetLastInstalledComponentIdL()
+  	{
+  	ASSERT(iInstallRequest);
+  
+  	// Find the id of the last installed component and return it
+  	TInt uid;
+  	User::LeaveIfError(RProperty::Get(KUidSystemCategory, KUidSwiLatestInstallation, uid));
+
+	Swi::RSisRegistrySession sisRegistrySession;
+	User::LeaveIfError(sisRegistrySession.Connect());
+	CleanupClosePushL(sisRegistrySession);
+  
+	TUid tuid(TUid::Uid(uid));
+	TComponentId componentId = sisRegistrySession.GetComponentIdForUidL(tuid);
+	CleanupStack::PopAndDestroy(&sisRegistrySession);
+	
+	return componentId;
+  	}
+
+void CRefNativePluginActiveImpl::GetComponentInfo(const TDesC& aFileName, CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF2(_L("Reference native plugin - retrieving component info for %S"), &aFileName);
+
+	aStatus = KRequestPending;
+	iClientStatus = &aStatus;
+
+	TRAPD(err, iAsyncLauncher->GetComponentInfoL(*this, aFileName, *iInstallPrefs, aComponentInfo, iStatus));
+	if (err != KErrNone)
+		{
+		TRequestStatus *statusPtr(&aStatus);
+		User::RequestComplete(statusPtr, err);
+		return;
+		}
+
+	SetActive();
+	}
+
+void CRefNativePluginActiveImpl::GetComponentInfo(RFile& aFileHandle, CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - getting component info by file handle"));
+	
+	aStatus = KRequestPending;
+	iClientStatus = &aStatus;	
+
+	TRAPD(err, iAsyncLauncher->GetComponentInfoL(*this, aFileHandle, *iInstallPrefs, aComponentInfo, iStatus));
+	if (err != KErrNone)
+		{
+		TRequestStatus *statusPtr(&aStatus);
+		User::RequestComplete(statusPtr, err);
+		return;
+		}
+
+	SetActive();
+	}	
+
+void CRefNativePluginActiveImpl::Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+											const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+											TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF2(_L("Reference native plugin - install for %S"), &aFileName);
+	
+	CommonRequestPreamble(aSecurityContext, aInputParams, aOutputParams, aStatus);
+	
+	TInt err;
+	if (iSilentInstall)
+		{
+		// Silent install does a few addtional checks on the package to see if is 
+		// signed and had the required capabilities. So we need to the get the 
+		// package component information with out installing it.
+		DEBUG_PRINTF2(_L("Silent install  - Get the ComponentInfo for %S"), &aFileName);
+		iFileName = aFileName;
+		TRAP(err, iAsyncLauncher->GetComponentInfoL(*this, aFileName, *iInstallPrefs, *iComponentInfo, iStatus));
+		}
+	else
+		{
+		// Proceed with the normal installation.
+		TRAP(err, iAsyncLauncher->InstallL(*this, aFileName, *iInstallPrefs, iStatus));
+		iInstallRequest = ETrue;
+		}
+	
+	if (err != KErrNone)
+		{
+		TRequestStatus *statusPtr(&aStatus);
+		User::RequestComplete(statusPtr, err);
+		return;
+		}
+	
+	SetActive();
+	}
+
+void CRefNativePluginActiveImpl::Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+											const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+											TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - install by file handle"));
+
+	CommonRequestPreamble(aSecurityContext, aInputParams, aOutputParams, aStatus);
+
+	TInt err;
+	if (iSilentInstall)
+		{
+		// Silent install does a few addtional checks on the package to see if is 
+		// signed and had the required capabilities. So we need to the get the 
+		// package component information with out installing it.
+		iFileHandle = &aFileHandle;
+		TRAP(err, iAsyncLauncher->GetComponentInfoL(*this, aFileHandle, *iInstallPrefs, *iComponentInfo, iStatus));
+		}
+	else
+		{
+		// Proceed with the normal installation.
+		TRAP(err, iAsyncLauncher->InstallL(*this, aFileHandle, *iInstallPrefs, iStatus));
+		iInstallRequest = ETrue;
+		}
+	
+	if (err != KErrNone)
+		{
+		TRequestStatus *statusPtr(&aStatus);
+		User::RequestComplete(statusPtr, err);
+		return;
+		}
+
+	SetActive();
+	}
+
+void CRefNativePluginActiveImpl::Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+		  const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus)
+	{
+	TRAPD(err, UninstallL(aComponentId, aSecurityContext, aInputParams, aOutputParams, aStatus));
+	if (err != KErrNone)
+		{
+		TRequestStatus *statusPtr(&aStatus);
+		User::RequestComplete(statusPtr, err);
+		return;
+		}
+	SetActive();
+	}
+
+void CRefNativePluginActiveImpl::UninstallL(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+		  const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - uninstall"));
+	CommonRequestPreamble(aSecurityContext, aInputParams, aOutputParams, aStatus);
+    // Get UID for given component id
+	RSoftwareComponentRegistry scrSession;
+	User::LeaveIfError(scrSession.Connect());
+	CleanupClosePushL(scrSession);
+	
+	CPropertyEntry* propertyEntry = scrSession.GetComponentPropertyL(aComponentId, _L("CompUid"));
+	CleanupStack::PushL(propertyEntry);
+
+	CIntPropertyEntry* intPropertyEntry = dynamic_cast<CIntPropertyEntry *>(propertyEntry); 
+	
+	TRequestStatus *statusPtr(&aStatus);
+	if (intPropertyEntry == NULL)
+		{
+		DEBUG_PRINTF2(_L8("UID property for component %d was not found"), aComponentId);
+		User::RequestComplete(statusPtr, KErrNotFound);
+		return;
+		}
+
+	TUid objectId = TUid::Uid(intPropertyEntry->IntValue());
+	CleanupStack::PopAndDestroy(2, &scrSession);
+
+	iAsyncLauncher->UninstallL(*this, objectId, iStatus);
+	}
+
+void CRefNativePluginActiveImpl::Activate(TComponentId aComponentId, const TSecurityContext& /*aSecurityContext*/, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - activate"));
+	iStatus = KRequestPending;
+	aStatus = KRequestPending;
+	iClientStatus = &aStatus;
+
+	TRequestStatus* rs(&iStatus);
+	
+	Swi::RSisRegistryWritableSession sisRegSession;
+	TRAPD(err, 
+			User::LeaveIfError(sisRegSession.Connect());
+			sisRegSession.ActivateComponentL(aComponentId);
+			)
+	sisRegSession.Close();
+
+	User::RequestComplete(rs, err);
+	SetActive();
+	}
+
+void CRefNativePluginActiveImpl::Deactivate(TComponentId aComponentId, const TSecurityContext& /*aSecurityContext*/, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - deactivate"));
+	iStatus = KRequestPending;
+	aStatus = KRequestPending;
+	iClientStatus = &aStatus;
+
+	TRequestStatus* rs(&iStatus);
+
+	Swi::RSisRegistryWritableSession sisRegSession;
+	TRAPD(err, 
+			User::LeaveIfError(sisRegSession.Connect());
+			sisRegSession.DeactivateComponentL(aComponentId);
+			)
+	sisRegSession.Close();
+
+	User::RequestComplete(rs, err);
+	SetActive();
+	}
+
+// SWI::MUiHandler implementation
+TInt CRefNativePluginActiveImpl::DisplayLanguageL(const Swi::CAppInfo& /*aAppInfo*/,const RArray<TLanguage>& /*aLanguages*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayLanguageL"));
+	return 0;
+	}
+
+TInt CRefNativePluginActiveImpl::DisplayDriveL(const Swi::CAppInfo& /*aAppInfo*/,TInt64 /*aSize*/, const RArray<TChar>& /*aDriveLetters*/, const RArray<TInt64>& /*aDriveSpaces*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayDriveL"));
+	return 0;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayUninstallL(const Swi::CAppInfo& /*aAppInfo*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayUninstallL"));
+	if (iDeclineOperation)
+		{
+		DEBUG_PRINTF(_L8("Reference native plugin - Received an option to decline operation - stopping uninstall"));
+		return EFalse;
+		}
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayTextL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TFileTextOption /*aOption*/, const TDesC& /*aText*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayTextL"));
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayDependencyBreakL(const Swi::CAppInfo& /*aAppInfo*/, const RPointerArray<TDesC>& /*aComponents*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayDependencyBreakL"));
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayApplicationsInUseL(const Swi::CAppInfo& /*aAppInfo*/, const RPointerArray<TDesC>& /*aAppNames*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayApplicationsInUseL"));
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayQuestionL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TQuestionDialog /*aQuestion*/, const TDesC& /*aDes*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayQuestionL"));
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayInstallL(const Swi::CAppInfo& /*aAppInfo*/, const CApaMaskedBitmap* /*aLogo*/, const RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayInstallL"));
+
+	if (iDeclineOperation)
+		{
+		DEBUG_PRINTF(_L8("Reference native plugin - Received an option to decline operation - stopping install"));
+		return EFalse;
+		}
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayGrantCapabilitiesL(const Swi::CAppInfo& /*aAppInfo*/, const TCapabilitySet& /*aCapabilitySet*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayGrantCapabilitiesL"));
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayUpgradeL(const Swi::CAppInfo& /*aAppInfo*/, const Swi::CAppInfo& /*aExistingAppInfo*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayUpgradeL"));
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayOptionsL(const Swi::CAppInfo& /*aAppInfo*/, const RPointerArray<TDesC>& /*aOptions*/, RArray<TBool>& /*aSelections*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayOptionsL"));
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplaySecurityWarningL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TSignatureValidationResult /*aSigValidationResult*/,
+						RPointerArray<CPKIXValidationResultBase>& /*aPkixResults*/, RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/, TBool /*aInstallAnyway*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplaySecurityWarningL"));
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayOcspResultL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TRevocationDialogMessage /*aMessage*/, RPointerArray<TOCSPOutcome>& /*aOutcomes*/, 
+						RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/,TBool /*aWarningOnly*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayOcspResultL"));
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::DisplayMissingDependencyL(const Swi::CAppInfo& /*aAppInfo*/, const TDesC& /*aDependencyName*/, TVersion /*aWantedVersionFrom*/,
+						TVersion /*aWantedVersionTo*/, TVersion /*aInstalledVersion*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayMissingDependencyL"));
+	return ETrue;
+	}
+
+TBool CRefNativePluginActiveImpl::HandleInstallEventL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TInstallEvent /*aEvent*/, TInt /*aValue*/, const TDesC& /*aDes*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - HandleInstallEventL"));
+	return ETrue;
+	}
+
+void CRefNativePluginActiveImpl::HandleCancellableInstallEventL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TInstallCancellableEvent /*aEvent*/, Swi::MCancelHandler& /*aCancelHandler*/,
+						TInt /*aValue*/,const TDesC& /*aDes*/)
+	{	
+	DEBUG_PRINTF(_L8("Reference native plugin - HandleCancellableInstallEventL"));
+	}
+
+void CRefNativePluginActiveImpl::DisplayCannotOverwriteFileL(const Swi::CAppInfo& /*aAppInfo*/, const Swi::CAppInfo& /*aInstalledAppInfo*/,const TDesC& /*aFileName*/)
+	{	
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayCannotOverwriteFileL"));
+	}
+
+void CRefNativePluginActiveImpl::DisplayErrorL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TErrorDialog /*aType*/, const TDesC& /*aParam*/)
+	{
+	DEBUG_PRINTF(_L8("Reference native plugin - DisplayErrorL"));
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/examples/refnativeplugin/source/refnativeplugin.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,173 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This class implements a test SIF plugin for native software
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+*/
+
+#ifndef REFNATIVEPLUGIN_H
+#define REFNATIVEPLUGIN_H
+
+#include <usif/sif/sifplugin.h>
+#include <usif/scr/screntries.h>
+#include <swi/msisuihandlers.h>
+#include <e32base.h>
+#include <e32std.h>
+
+namespace Swi
+{
+	class CAsyncLauncher;
+	class CInstallPrefs;
+}
+
+namespace Usif
+	{
+	
+	_LIT(KDeclineOperationOptionName, "SwiDeclineOperation");
+	// ECOM objects and CActive do not interact well - especially since SIFPlugin inherits from CBase
+	// and double C-inheritance is impossible. So, a separate class is used to drive the asynchronous interaction
+	// to the CAsyncLauncher
+	NONSHARABLE_CLASS(CRefNativePluginActiveImpl) : public CActive, public Swi::MUiHandler
+	{
+	public:
+		static CRefNativePluginActiveImpl* NewL();
+		~CRefNativePluginActiveImpl();
+
+		// CActive interface
+		void RunL();
+		void DoCancel();
+			
+		void Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+							const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+							TRequestStatus& aStatus);
+
+		void Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+							const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+							TRequestStatus& aStatus);
+							
+		void GetComponentInfo(const TDesC& aFileName, CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+
+		void GetComponentInfo(RFile& aFileHandle, CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+
+		void Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+							const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, 
+							TRequestStatus& aStatus);
+
+		void Activate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+							TRequestStatus& aStatus);
+
+		void Deactivate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+							TRequestStatus& aStatus);
+
+		// Swi::MUiHandler interface
+		TInt DisplayLanguageL(const Swi::CAppInfo& aAppInfo,const RArray<TLanguage>& aLanguages);
+		TInt DisplayDriveL(const Swi::CAppInfo& aAppInfo,TInt64 aSize, const RArray<TChar>& aDriveLetters,const RArray<TInt64>& aDriveSpaces);
+		TBool DisplayUninstallL(const Swi::CAppInfo& aAppInfo);
+		TBool DisplayTextL(const Swi::CAppInfo& aAppInfo,Swi::TFileTextOption aOption,const TDesC& aText);
+		TBool DisplayDependencyBreakL(const Swi::CAppInfo& aAppInfo, const RPointerArray<TDesC>& aComponents);
+		TBool DisplayApplicationsInUseL(const Swi::CAppInfo& aAppInfo, const RPointerArray<TDesC>& aAppNames);
+		TBool DisplayQuestionL(const Swi::CAppInfo& aAppInfo, Swi::TQuestionDialog aQuestion, const TDesC& aDes);
+		TBool DisplayInstallL(const Swi::CAppInfo& aAppInfo,const CApaMaskedBitmap* aLogo, const RPointerArray<Swi::CCertificateInfo>& aCertificates); 
+		TBool DisplayGrantCapabilitiesL(const Swi::CAppInfo& aAppInfo, const TCapabilitySet& aCapabilitySet);
+		TBool DisplayUpgradeL(const Swi::CAppInfo& aAppInfo, const Swi::CAppInfo& aExistingAppInfo);
+		TBool DisplayOptionsL(const Swi::CAppInfo& aAppInfo, const RPointerArray<TDesC>& aOptions,RArray<TBool>& aSelections);
+		TBool DisplaySecurityWarningL(const Swi::CAppInfo& aAppInfo, Swi::TSignatureValidationResult aSigValidationResult,
+									RPointerArray<CPKIXValidationResultBase>& aPkixResults, RPointerArray<Swi::CCertificateInfo>& aCertificates,TBool aInstallAnyway);
+		TBool DisplayOcspResultL(const Swi::CAppInfo& aAppInfo, Swi::TRevocationDialogMessage aMessage,RPointerArray<TOCSPOutcome>& aOutcomes, 
+									RPointerArray<Swi::CCertificateInfo>& aCertificates,TBool aWarningOnly);
+		TBool DisplayMissingDependencyL(const Swi::CAppInfo& aAppInfo, const TDesC& aDependencyName,TVersion aWantedVersionFrom,
+									TVersion aWantedVersionTo,TVersion aInstalledVersion);
+		TBool HandleInstallEventL(const Swi::CAppInfo& aAppInfo, Swi::TInstallEvent aEvent,TInt aValue = 0,const TDesC& aDes = KNullDesC);
+		void HandleCancellableInstallEventL(const Swi::CAppInfo& aAppInfo, Swi::TInstallCancellableEvent aEvent,Swi::MCancelHandler& aCancelHandler,
+									TInt aValue = 0,const TDesC& aDes=KNullDesC);
+		void DisplayCannotOverwriteFileL(const Swi::CAppInfo& aAppInfo, const Swi::CAppInfo& aInstalledAppInfo,const TDesC& aFileName);
+		void DisplayErrorL(const Swi::CAppInfo& aAppInfo,Swi::TErrorDialog aType,const TDesC& aParam);
+	private:
+		CRefNativePluginActiveImpl() : CActive(EPriorityStandard) {}
+		CRefNativePluginActiveImpl(const CRefNativePluginActiveImpl &);
+		CRefNativePluginActiveImpl & operator =(const CRefNativePluginActiveImpl &);
+		void ConstructL();
+		void CommonRequestPreamble(const TSecurityContext& aSecurityContext, const COpaqueNamedParams& aInputParams, 
+									COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus);
+		void UninstallL(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+						const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, 
+						TRequestStatus& aStatus);
+						
+		TComponentId GetLastInstalledComponentIdL();
+		TBool NeedUserCapabilityL();
+		void ProcessSilentInstallL();
+	private:
+		Swi::CAsyncLauncher* iAsyncLauncher;
+		Swi::CInstallPrefs* iInstallPrefs;
+		TRequestStatus* iClientStatus;
+		const COpaqueNamedParams* iInputParams;
+		COpaqueNamedParams* iOutputParams;
+		CComponentInfo* iComponentInfo;
+		TFileName iFileName;
+		RFile* iFileHandle; // FileHandle is not owned by the plug-in
+		TBool iDeclineOperation; // Used for plugin options - optionally specifies that the operation will not be confirmed at the first callback
+		TBool iInstallRequest; // Used to identify the type of the current requst in RunL() so we know if the id of an installed component should be sent
+		TBool iSilentInstall; // Used to identify a silent install
+		};
+
+
+	NONSHARABLE_CLASS(CRefNativePlugin) : public CSifPlugin
+		{
+	public:
+		static CRefNativePlugin* NewL();
+		~CRefNativePlugin();
+	
+		// MSIFPlugin interface
+		void GetComponentInfo(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+							  CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+
+		void GetComponentInfo(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+							  CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+		
+		void Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+							const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+							TRequestStatus& aStatus);
+
+		void Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+							const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+							TRequestStatus& aStatus);
+
+		virtual void Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+								TRequestStatus& aStatus);
+
+		virtual void Activate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								TRequestStatus& aStatus);
+
+		virtual void Deactivate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								TRequestStatus& aStatus);
+
+		void CancelOperation();
+	private:
+		CRefNativePlugin() {}
+		void ConstructL();
+		CRefNativePlugin(const CRefNativePlugin &);
+		CRefNativePlugin & operator =(const CRefNativePlugin &);
+	private:
+		CRefNativePluginActiveImpl *iImpl;
+		};
+	} // end namespace Usif
+
+#endif // REFNATIVEPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/group/bld.inf	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,113 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* @ Software Install Framework
+*
+*/
+
+
+/**
+ @file
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+// SIF includes
+../inc/sif.h												SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/sif/sif.h)
+../inc/sifcommon.h											SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/sif/sifcommon.h)
+../inc/sifplugin.h											SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/sif/sifplugin.h)
+../inc/sifutils.h											SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/sif/sifutils.h)
+../inc/siftransportclient.h									SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/sif/siftransportclient.h)
+../inc/siftransportserverstartup.h							SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/sif/siftransportserverstartup.h)
+../inc/siftransporttask.h									SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/sif/siftransporttask.h)
+
+// ROMKIT includes
+../inc/sif.iby												/epoc32/rom/include/sif.iby
+
+PRJ_TESTEXPORTS
+
+// TEF test scripts
+../test/tusif/scripts/tsifintegration.ini				z:/tusif/tsifintegration/tsifintegration.ini
+../test/tusif/scripts/tsifintegration.script				z:/tusif/tsifintegration/tsifintegration.script
+
+../test/scripts/tsif.ini									z:/tusif/tsif/tsif.ini
+../test/scripts/tsif.script									z:/tusif/tsif/tsif.script
+../test/scripts/tsifoom.script								z:/tusif/tsif/tsifoom.script
+
+../test/scripts/data/test.nonnativepackage.txt				z:/tusif/tsif/data/test.nonnativepackage.txt
+../test/scripts/data/test.overflow.txt						z:/tusif/tsif/data/test.overflow.txt
+../test/scripts/data/noninstallable.gif						z:/tusif/tsif/data/noninstallable.gif
+
+../test/securitytests/scripts/usifsecuritytests.script	z:/tusif/securitytests/usifsecuritytests.script
+../test/securitytests/scripts/usifsecuritytests.ini		z:/tusif/securitytests/usifsecuritytests.ini
+
+../test/tusif/scripts/tsifswtypeintegration.ini			z:/tusif/tswtype/tsifswtypeintegration.ini
+../test/tusif/scripts/tsifswtypeintegration.script		z:/tusif/tswtype/tsifswtypeintegration.script
+../test/tusif/scripts/data/test.siftestpkg				z:/tusif/tswtype/data/test.siftestpkg
+../test/tusif/scripts/data/swtypereginfo.xml				z:/tusif/tswtype/data/swtypereginfo.xml
+
+// ROMKIT includes
+../inc/tsif.iby												/epoc32/rom/include/tsif.iby
+
+PRJ_MMPFILES
+
+#ifndef TOOLS
+#ifndef TOOLS2
+
+// SIF API implementation
+../group/siftransport.mmp
+../group/sif.mmp
+../group/sifutils.mmp
+../group/sifserver.mmp
+../group/siflauncher.mmp
+
+#endif // TOOLS2
+#endif // TOOLS
+
+PRJ_TESTMMPFILES
+
+#ifndef TOOLS
+#ifndef TOOLS2
+
+// Test version of the SIF Launcher
+makefile ../test/group/cleansiflauncher.makefile
+../test/group/tsiflauncher.mmp
+// Test package file recognizer
+../test/tusif/group/tsifpkgrec.mmp
+// Reference SWI plugin for USIF
+../examples/refnativeplugin/group/refnativeplugin.mmp
+// Non-native test plug-in
+../test/plugins/nonnativeplugin/group/testnonnativeplugin.mmp
+../test/plugins/nonnativeplugin/group/testnonnativeplugin2.mmp
+// TEF suite for SIF
+../test/tusif/group/tsif.mmp
+// Test executables for SIF tests
+../test/tusif/group/sifintegrationtestbasepackage.mmp
+../test/tusif/group/sifintegrationtestupgradepackage.mmp
+../test/tusif/group/sifintegusercapsbasepackage.mmp
+../test/tusif/group/siftestintegrationlockfile.mmp
+../test/tusif/group/sifintegsufficientusercaps.mmp
+// Creation of SIS files for SIF tests
+makefile ../test/tusif/group/siftest.makefile
+
+// Security tests
+../test/securitytests/group/usifsecuritytests.mmp
+../test/securitytests/group/usifsecuritytests-tcb.mmp
+
+#endif // TOOLS2
+#endif // TOOLS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/group/security_softwareinstallframework.history.xml	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<relnotes name="Software Install Framework">
+  <purpose>
+    Provides a uniform framework for managing software under Symbian OS.
+  </purpose>
+ 
+   <defect number="DEF136782" title="CBR errors related to sif in M04892 v9.6 build " revision="013">
+    CBR errors related to sif in M04892 v9.6 build  are fixed.
+  </defect>
+  
+    <deliverystep number="1140" name="PREQ1269: Crypto Services: Reference Native Installer provision" osproject="Diran" revision="012">
+    <milestone project="GT0433" number="MS3.3"/>
+    <preq number="1269" title="Universal Software Install Framework">
+      Delivers the set of features for the Preq1269 Phase III. Changes has been done for Reference Native Installer.
+    </preq>
+  </deliverystep>
+  
+  <defect number="DEF133526" title="KERN-EXEC 3 panic in sifserver.exe when changing the SCOMO state " revision="011">
+    Panic is resolved.
+  </defect>
+
+  <defect number="DEF132132" title="PREQ1269: SIFLauncher's configuration should be split into production and test" revision="010">
+    SIFLauncher's configuration has been splitted into production and test. 
+  </defect>
+
+   <defect number="DEF131621" title="tsif failures under CS2 " revision="009">
+	Changed SIS file generation in SIF tests to use permanent certificates.
+  </defect>
+
+   <defect number="DEF131412" title="checklocationofcertificateslog fails in ONB " revision="008">
+    Added deletion of temporary certificates added by createsis. 
+  </defect>
+
+  <defect number="DEF131880" title="RVCT3.1 error in security/usif/sif/inc/siftransporttask.h " revision="007">
+    Added IMPORT_C where required. 
+  </defect>
+
+  <defect number="DEF131875" title="SMPSAFE MMP file updates for SWI and USIF" revision="006">
+    updated MMP files for SWI and USIF components to declare them SMPSAFE 
+  </defect>
+
+  <defect number="DEF130796" title="PREQ1269: Can set the component size negative" revision="005"> 
+	 The API wasn't changed to Uint, as this would require the DB also to support unsigned values in the relevant column, and I couldn't see an option for doing it without disrupting the schema. 
+  </defect> 
+
+  <deliverystep number="1430" name="PREQ1269: Indication of executable code" osproject="Diran" revision="004">
+	  <milestone project="GT0433" number="3.15"/>
+	  <preq number="1269" title="Universal Software Install Framework">
+		  Incudes changes to enable the installer to indicate that the software component has an executable, before the installation takes place.
+	  </preq>
+  </deliverystep>
+
+  <deliverystep number="1117" name="PREQ1269: Crypto Services: Plugin management and highly desirable features
+ (Phase 2)" osproject="Diran" revision="003">
+	  <milestone project="GT0433" number="3.2"/>
+	  <preq number="1269" title="Universal Software Install Framework">
+		  1) Post-manufacture plugin management 2) Complex queries in the SCR
+			3) Additional smaller requirements and changes and 4) Improved security in the SCR
+	  </preq>
+  </deliverystep>
+
+  <defect number="DEF128672" title="PREQ1269: SIFSERVER.EXE crashing with panic KERN-EXEC 3" revision="002">
+	Parameter handling (filename, file handle, component id) in CSifServerTask::SelectAndLoadPluginL() for different types of task (install, uninstall, get component info, activate, deactivate) has been fixed.
+  </defect>
+
+  <deliverystep number="1116" name="PREQ1269: Security and Data Privacy: Universal Software Install Framework (Phase 1)" osproject="Diran" revision="001">
+	  <milestone project="GT0433" number="3.1"/>
+	  <preq number="1269" title="Universal Software Install Framework">
+		   Delivers the main set of features for the Diran Early Phase. Includes the new components (SCR, SIF and STS), migration of the native installer to use the new components and most reference code.
+			Excludes non-mandatory features and post-production plugin management.
+	  </preq>
+  </deliverystep>
+
+</relnotes>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/group/security_softwareinstallframework.mrp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,12 @@
+component	security_softwareinstallframework
+source	\sf\mw\appinstall\installationservices\swinstallationfw
+source	\sf\mw\appinstall\installationservices\swinstallationfw\test
+source  \sf\mw\appinstall\installationservices\swinstallationfw\examples\refnativeplugin
+binary	\sf\mw\appinstall\installationservices\swinstallationfw\group	all
+exports	\sf\mw\appinstall\installationservices\swinstallationfw\group
+notes_source	\component_defs\release.src
+
+ipr E 
+ipr T \sf\mw\appinstall\installationservices\swinstallationfw\test
+ipr T \sf\mw\appinstall\installationservices\swinstallationfw\examples\refnativeplugin
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/group/sif.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,41 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* SIF API
+* SIF API implementation
+*
+*/
+
+
+/**
+ @file
+*/
+
+TARGET sif.dll
+TARGETTYPE dll
+
+UID 0x1000008D 0x10285BC7
+
+CAPABILITY All -Tcb
+
+SOURCEPATH ../source
+SOURCE sif.cpp sifcommon.cpp
+
+USERINCLUDE ../inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY euser.lib efsrv.lib estor.lib
+LIBRARY siftransport.lib
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/group/siflauncher.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,42 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET				siflauncher.exe
+TARGETTYPE			exe
+TARGETPATH			/sys/bin
+
+CAPABILITY			TrustedUI
+
+VENDORID			0x70000001
+
+UID					0x0 0x10285BD0
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+USERINCLUDE			../inc
+USERINCLUDE			../common/inc
+
+SOURCEPATH			../source
+SOURCE				siflauncher.cpp
+
+SOURCEPATH			../../swiconfig/usif/siflauncher
+
+LIBRARY				euser.lib efsrv.lib
+LIBRARY				apgrfx.lib apparc.lib apmime.lib
+LIBRARY				sif.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/group/sifserver.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,38 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET				sifserver.exe        
+TARGETTYPE			exe
+
+CAPABILITY			ProtServ TrustedUI ReadUserData
+
+VENDORID			0x70000001
+
+UID					0x0 0x10285BCB
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+USERINCLUDE			../inc
+USERINCLUDE			../common/inc
+
+SOURCEPATH			../source
+SOURCE				sifserverstartup.cpp sifservertask.cpp
+
+LIBRARY				estor.lib efsrv.lib euser.lib ecom.lib apgrfx.lib apmime.lib
+LIBRARY				siftransport.lib scrclient.lib sifutils.lib
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/group/siftransport.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,42 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* SIF API
+* SIF transport client implementation
+*
+*/
+
+
+/**
+ @file
+*/
+
+TARGET siftransport.dll
+TARGETTYPE dll
+
+UID 0x1000008D 0x10286353
+
+CAPABILITY All -Tcb
+
+SOURCEPATH ../source
+SOURCE siftransportclient.cpp sifcommon.cpp
+SOURCE siftransportserver.cpp siftransportsession.cpp siftransportrequest.cpp siftransporttask.cpp
+
+USERINCLUDE ../inc
+USERINCLUDE ../common/inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY euser.lib efsrv.lib estor.lib scsclient.lib scsserver.lib ipcstream.lib
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/group/sifutils.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,41 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* SIF Utils Library
+* SIF Utils Library implementation
+*
+*/
+
+
+/**
+ @file
+*/
+
+TARGET sifutils.dll
+TARGETTYPE dll
+
+UID 0x1000008D 0x10286355
+
+CAPABILITY All -Tcb
+
+SOURCEPATH ../source
+SOURCE sifutils.cpp
+
+USERINCLUDE ../inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY euser.lib efsrv.lib estor.lib
+LIBRARY scrclient.lib stsclient.lib
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/sif.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,275 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines the SIF API.
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifndef SIF_H
+#define SIF_H
+
+#include <usif/sif/siftransportclient.h>
+
+namespace Usif
+	{
+	/**
+		The RSoftwareInstall class provides an asynchronous interface to the Software
+		Install Framework. This class wraps all the details of client-server communication
+		with the SIF server residing in a separate process. This API is asynchronous and
+		therefore clients may issue concurrect requests. However, the SIF constrains
+		concurrent operations by default. A client issuing an Install or Uninstall request
+		may set the aExclusiveOperation flag to EFalse in order to allow for concurrent
+		execution of his request. However, even if this flag is set to EFalse, a request
+		may fail with KErrServerBusy if a corresponding underlying installer doesn't
+		support concurrent operations.
+
+		This class is intended to be used by SIF client applications, for example, application
+		or device managers.
+
+		Software @see TComponentId needed for the Uninstall/Activate/Deactivate APIs is a unique
+		identifier of an installed component regardless of its type across the system.  When installing
+		a package containing other embedded packages each embedded component gets its own @see
+		TComponentId in the descending order. For example, we have a package P1 that contains an
+		embedded package P2 that contains yet another embedded package P3.
+		After installation the components may be identified by the following Ids:
+		- Id of Component 1 (Package 1): 6 (example value)
+		- Id of Component 2 (Package 2): 7
+		- Id of Component 3 (Package 3): 8
+		Component 3 with Id = 8 is the last installed/most embedded component and therefore its id
+		is the highest.
+
+		All the SIF operations may require special capabilities in order to complete successfully.
+		This check may be implemented in a SIF plug-in. For example, a silent installation may require
+		the TrustedUI capability. However, this is expected behavour that standard operations
+		don't require any capabilities. Please see @see Usif::CSifPlugin description for further details
+		if there are any deviations from this rule.
+	 */
+
+	class RSoftwareInstall
+		{
+	public:
+		IMPORT_C RSoftwareInstall();
+
+		/**
+		   Connects a client to the SIF server.
+		 
+		@return	Symbian OS error code where KErrNone indicates
+				success and any other value indicates failure.
+		*/
+		IMPORT_C TInt Connect();
+
+		/**
+		   Disconnects a client from the SIF server.
+		*/
+		IMPORT_C void Close();
+
+		/**
+		Returns the details of a component to be installed by file name
+		 
+		@param aFileName The file name of a component to be queried
+		@param aComponentInfo On return, contains the details of a component
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		IMPORT_C void GetComponentInfo(const TDesC& aFileName, CComponentInfo& aComponentInfo,
+										TRequestStatus& aStatus);
+
+		/**
+		 * Returns the details of a component to be installed by file handle
+		 
+		@param aFileHandle The file handle of a component to be queried
+		@param aComponentInfo On return, contains the details of a component
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		IMPORT_C void GetComponentInfo(RFile& aFileHandle, CComponentInfo& aComponentInfo,
+										TRequestStatus& aStatus);
+
+		/**
+		Installs a component by file name
+		
+		@param aFileName The file name of a component to be installed
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation If this flag is set to ETrue, the Install
+		operation is executed in the Exclusive mode. In this mode the SIF
+		Server executes only one operation at a time. If there is another
+		operation in progress the SIF Server returns KErrServerBusy.
+		If this flag is set to EFalse, the SIF Server executes the operation
+		even if there is a concurrent operation in progress. The default value
+		is ETrue.
+		*/
+		IMPORT_C void Install(const TDesC& aFileName, TRequestStatus& aStatus,
+							TBool aExclusiveOperation = ETrue);
+
+		/**
+		Installs a component by file name using opaque arguments/results
+		
+		@param aFileName The file name of a component to be installed
+		@param aArguments The array of opaque params for a SIF plug-in. An empty
+		array may be passed.  The following param is defined for the "SCOMO Install
+		Inactive" operation:
+		Name: InstallInactive, Type: Int, Value: ETrue
+		@param aResults The array of opaque params returned from a SIF plug-in.
+		The following return param is defined for the id of an installed component:
+		Name: ComponentId, Type: Int
+		For packages containing embedded components, the returned param contains
+		the id of the last/most embedded component.
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation If this flag is set to ETrue, the Install
+		operation is executed in the Exclusive mode. In this mode the SIF
+		Server executes only one operation at a time. If there is another
+		operation in progress the SIF Server returns KErrServerBusy.
+		If this flag is set to EFalse, the SIF Server executes the operation
+		even if there is a concurrent operation in progress. The default value
+		is ETrue.
+		*/
+		IMPORT_C void Install(const TDesC& aFileName, const COpaqueNamedParams& aArguments,
+								COpaqueNamedParams& aResults, TRequestStatus& aStatus,
+								TBool aExclusiveOperation = ETrue);
+
+		/**
+		Installs a component by file handle
+		
+		@param aFileHandle The file handle of a component to be installed
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation If this flag is set to ETrue, the Install
+		operation is executed in the Exclusive mode. In this mode the SIF
+		Server executes only one operation at a time. If there is another
+		operation in progress the SIF Server returns KErrServerBusy.
+		If this flag is set to EFalse, the SIF Server executes the operation
+		even if there is a concurrent operation in progress. The default value
+		is ETrue.
+		*/
+		IMPORT_C void Install(RFile& aFileHandle, TRequestStatus& aStatus,
+								TBool aExclusiveOperation = ETrue);
+
+		/**
+		Installs a component by file handle using opaque arguments/results
+		
+		@param aFileHandle The file handle of a component to be installed
+		@param aArguments The array of opaque params for a SIF plug-in. An empty
+		array may be passed.  The following param is defined for the "SCOMO Install
+		Inactive" operation:
+		Name: InstallInactive, Type: Int, Value: ETrue
+		@param aResults The array of opaque params returned from a SIF plug-in.
+		The following return param is defined for the id of an installed component:
+		Name: ComponentId, Type: Int
+		For packages containing embedded components, the returned param contains
+		the id of the last/most embedded component.
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation If this flag is set to ETrue, the Install
+		operation is executed in the Exclusive mode. In this mode the SIF
+		Server executes only one operation at a time. If there is another
+		operation in progress the SIF Server returns KErrServerBusy.
+		If this flag is set to EFalse, the SIF Server executes the operation
+		even if there is a concurrent operation in progress. The default value
+		is ETrue.
+		*/
+		IMPORT_C void Install(RFile& aFileHandle, const COpaqueNamedParams& aArguments,
+								COpaqueNamedParams& aResults, TRequestStatus& aStatus,
+								TBool aExclusiveOperation = ETrue);
+
+		/**
+		Uninstalls a component
+		
+		@param aComponentId The id of a component to be uninstalled
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation If this flag is set to ETrue, the Uninstall
+		operation is executed in the Exclusive mode. In this mode the SIF
+		Server executes only one operation at a time. If there is another
+		operation in progress the SIF Server returns KErrServerBusy.
+		If this flag is set to EFalse, the SIF Server executes the operation
+		even if there is a concurrent operation in progress. The default value
+		is ETrue.
+		*/
+		IMPORT_C void Uninstall(TComponentId aComponentId, TRequestStatus& aStatus,
+								TBool aExclusiveOperation = ETrue);
+
+		/**
+		Uninstalls a component
+		
+		@param aComponentId The id of a component to be uninstalled
+		@param aArguments The array of opaque params for a SIF plug-in. An empty
+		array may be passed.
+		@param aResults The array of opaque results returned from a SIF plug-in.
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation If this flag is set to ETrue, the Uninstall
+		operation is executed in the Exclusive mode. In this mode the SIF
+		Server executes only one operation at a time. If there is another
+		operation in progress the SIF Server returns KErrServerBusy.
+		If this flag is set to EFalse, the SIF Server executes the operation
+		even if there is a concurrent operation in progress. The default value
+		is ETrue.
+		*/
+		IMPORT_C void Uninstall(TComponentId aComponentId, const COpaqueNamedParams& aArguments,
+								COpaqueNamedParams& aResults, TRequestStatus& aStatus,
+								TBool aExclusiveOperation = ETrue);
+
+		/**
+		Activates a component.
+
+  		The SCOMO state of a component can be changed at any time through the SIF API. However, capability
+		checking may apply depending on the particular installer. For example, a Python installer may require the 
+		ECapabilityWriteUserData capability to activate or deactivate a Python component.
+		
+		@param aComponentId The id of a component to be activated
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		IMPORT_C void Activate(TComponentId aComponentId, TRequestStatus& aStatus);
+
+		/**
+		Deactivates a component.
+
+  		The SCOMO state of a component can be changed at any time through the SIF API. However, capability
+		checking may apply depending on the particular installer. For example, a Python installer may require the 
+		ECapabilityWriteUserData capability to activate or deactivate a Python component.
+		
+		@param aComponentId The id of a component to be deactivated
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		IMPORT_C void Deactivate(TComponentId aComponentId, TRequestStatus& aStatus);
+
+		/**
+		Cancels an ongoing asynchronous request
+		
+		This is a synchronous call. When it returns the original asynchronous call is completed.
+		*/
+		IMPORT_C void CancelOperation();
+	
+#ifdef _DEBUG
+		friend class CSifOperationStep;
+#endif //_DEBUG
+
+	private:
+		RSifTransportClient iTransport;
+		};
+
+	} // namespace Usif
+
+#endif // SIF_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/sif.iby	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef SIF_IBY
+#define SIF_IBY
+
+define ZDRIVE \epoc32\data\Z
+
+//#include "siflauncherconfig.iby"
+
+REM Software Install Framework
+
+file=ABI_DIR\BUILD_DIR\sif.dll				\sys\bin\sif.dll
+file=ABI_DIR\BUILD_DIR\sifutils.dll			\sys\bin\sifutils.dll
+file=ABI_DIR\BUILD_DIR\siftransport.dll		\sys\bin\siftransport.dll
+file=ABI_DIR\BUILD_DIR\sifserver.exe		\sys\bin\sifserver.exe
+file=ABI_DIR\BUILD_DIR\siflauncher.exe		\sys\bin\siflauncher.exe
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/sifcommon.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,575 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines common types for the SIF APIs.
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifndef SIFCOMMON_H
+#define SIFCOMMON_H
+
+#include <ct/rcpointerarray.h>
+#include <s32strm.h>
+#include <usif/usifcommon.h>
+
+namespace Usif
+	{
+
+	/**
+		This enumeration defines the possible values of the status of an installation package. This status
+		can be obtained from a @see CComponentInfo object using the @see CComponentInfo::InstallStatusL()
+		method.
+	 */
+	enum TInstallStatus
+		{
+		ENewComponent,					///< New installation; the component is not present in the system
+		EUpgrade,						///< This is a valid upgrade of an existing component
+		EAlreadyInstalled,				///< Component with the same version is already installed
+		ENewerVersionAlreadyInstalled,	///< A newer version of the component is already installed
+		EInvalid						///< Package is not valid and cannot be installed, for example,
+										///< it may be an upgrade of an uninstalled component or the
+										///< package may be corrupt
+		};
+
+	/**
+		This enumeration defines the possible values of the authenticity of an installation package. This authenticity
+		can be obtained from a @see CComponentInfo object using the @see CComponentInfo::Authenticity()
+		method.
+	 */
+	enum TAuthenticity
+		{
+		ENotAuthenticated,			///< Component could not be authenticated by the installer, e.g. unsigned or self-signed
+		EAuthenticated,				///< Component is authenticated
+		};
+
+	/**
+		The TSecurityContext class allows SIF plug-ins to verify the capabilities and secure Ids of SIF clients.
+		For example, when a SIF client requests silent installation a SIF plug-in may verify that that the client
+		has the TrustedUI capability.
+	 */
+	class TSecurityContext
+		{
+	public:
+		/**
+			Checks if the SIF client has a given capability.
+
+			@param aCapability The capability to test.
+			@return ETrue if the SIF client has the capability, EFalse otherwise.
+		*/
+		IMPORT_C TBool HasCapability(TCapability aCapability) const;
+
+		/**
+			Checks if the SIF client has a given capability.
+
+			@param aCapability The capability to test.
+			@leave KErrPermissionDenied If the SIF client does not have the capability.
+		*/
+		IMPORT_C void HasCapabilityL(TCapability aCapability) const;
+
+		/**
+			Returns the secure Id of a SIF client.
+		*/
+		IMPORT_C TSecureId SecureId() const;
+
+	private:
+		friend class CSifTransportRequest;
+		IMPORT_C TSecurityContext(const RMessage2& aMessage);
+
+		const RMessagePtr2 iMsg;
+		};
+
+	/**
+		This class provides information about a software package. Returned by RSoftwareInstall::GetComponentInfo()."
+	 */
+	class CComponentInfo : public CBase
+		{
+	public:
+
+		class CNode : public CBase
+			{
+		public:
+			/**
+				Initializes the object with the details of a component.
+
+				@param aSoftwareTypeName The name of the software type of a component.
+				@param aComponentName The name of a component.
+				@param aVersion The version of a component.
+				@param aVendor The name of a component vendor.
+				@param aScomoState The SCOMO state of a component.
+				@param TInstallStatus The installation status of a component.
+				@param aComponentId The Id of a component.
+				@param aGlobalComponentId The global Id of a component.
+				@param aAuthenticity The authenticity of a component.
+				@param aUserGrantableCaps User grantable capabilities of a component.
+				@param aHasExe Whether component has an executable.
+				@param aChildren Child nodes describing embedded components of a component. This method
+				passes the ownership of the child nodes to this new node and empties the aChildren array.
+				However, if the leave occurs the caller must delete the child nodes in the array.
+				@leave KErrOverflow it the total length of aName, aVersion and aVendor exceeds 512 characters.
+				@leave Or other system wide error code
+			*/
+			IMPORT_C static CNode* NewLC(const TDesC& aSoftwareTypeName, const TDesC& aComponentName,
+								const TDesC& aVersion, const TDesC& aVendor, TScomoState aScomoState,
+								TInstallStatus aInstallStatus, TComponentId aComponentId,
+								const TDesC& aGlobalComponentId, TAuthenticity aAuthenticity,
+								const TCapabilitySet& aUserGrantableCaps, TInt aMaxInstalledSize,
+								TBool aHasExe,
+								RPointerArray<CNode>* aChildren = NULL);
+
+			/**
+				Adds a child node to this node. This method passes the ownership of the child node
+				to this node so the caller must pop it from the cleanup stack but not delete.
+
+				@return The pointer to the child node to be added.
+				@leave System wide error code
+			*/
+			IMPORT_C void AddChildL(CNode* aChild);
+
+			/**
+				Returns the name of software type of a component.
+
+				@return The name of the software type of a component.
+				@leave System wide error code
+			*/
+			IMPORT_C const TDesC& SoftwareTypeName() const;
+
+			/**
+				Returns the name of a component.
+
+				@return The name of a component.
+				@leave System wide error code
+			*/
+			IMPORT_C const TDesC& ComponentName() const;
+
+			/**
+				Returns the version of a component.
+
+				@return The version of a component.
+				@leave System wide error code
+			*/
+			IMPORT_C const TDesC& Version() const;
+
+			/**
+				Returns the name of the component vendor.
+
+				@return The name of the component vendor.
+				@leave System wide error code
+			*/
+			IMPORT_C const TDesC& Vendor() const;
+
+			/**
+				Returns the SCOMO state of a component. This has meaning only if the installStatus of the component
+				is not EInvalid or ENewComponent.
+
+				@return The SCOMO state of a component.
+				@leave System wide error code
+			*/
+			IMPORT_C TScomoState ScomoState() const;
+
+			/**
+				Returns the installation status of a component.
+
+				@return The installation status of a component.
+				@leave System wide error code
+			*/
+			IMPORT_C TInstallStatus InstallStatus() const;
+
+			/**
+				Returns the Id of a component.
+
+				@return The Id of a component.
+				@leave System wide error code
+			*/
+			IMPORT_C TComponentId ComponentId() const;
+
+			/**
+				Returns the global Id of a component.
+
+				@return The global Id of a component.
+				@leave System wide error code
+			*/
+			IMPORT_C const TDesC& GlobalComponentId() const;
+
+			/**
+				Returns the authenticity of a component.
+
+				@return The authenticity of a component.
+				@leave System wide error code
+			*/
+			IMPORT_C TAuthenticity Authenticity() const;
+
+			/**
+				Returns user capabilities required by a component.
+
+				@return The user grantable capabilities.
+				@leave System wide error code
+			*/
+			IMPORT_C const TCapabilitySet& UserGrantableCaps() const;
+
+			/**
+				Returns the maximum size of a component after installation.
+
+				@return The maximum size of a component.
+				@leave System wide error code
+			*/
+			IMPORT_C TInt MaxInstalledSize() const;
+
+			/**
+				Returns the array of CComponentInfo objects for the components embedded
+				in the component being queried.
+
+				@return The array of the embedded CComponentInfo objects.
+				@leave System wide error code
+			*/
+			IMPORT_C const RPointerArray<CNode>& Children() const;
+
+			/**
+				Destructor.
+			*/
+			IMPORT_C virtual ~CNode();
+			/**
+				Returns the HasExecutable Flag which indicates whether the
+				component has an executable.
+
+				@return The HasExecutable TBool Flag .
+			*/
+			IMPORT_C TBool HasExecutable() const;
+
+		private:
+			friend class CComponentInfo;
+
+			CNode();
+			CNode& operator=(const CNode& other);
+			CNode(const CNode& other);
+
+			static CNode* NewL(RReadStream& aStream);
+			void ExternalizeL(RWriteStream& aStream) const;
+
+			HBufC* iSoftwareTypeName;				///< The name of software type of the component
+			HBufC* iComponentName;					///< The name of the software component
+			HBufC* iVersion;						///< The Version of the software component 
+			HBufC* iVendor;							///< The of the vendor of the software component
+			HBufC* iGlobalComponentId;				///< The global id of the component if already installed
+			TScomoState iScomoState;				///< The SCOMO status of the component
+			TInstallStatus iInstallStatus;			///< Informs whether the component is already installed or upgradeable
+			TComponentId iComponentId;				///< The unique id of the component if already installed
+			TAuthenticity iAuthenticity;			///< The authenticity of the component
+			TCapabilitySet iUserGrantableCaps;		///< User grantable capabilities required be the component
+			TInt iMaxInstalledSize;					///< The maximum size of the component after installation
+			TBool iHasExe;							///< Indicates Whether the component has an executable
+			RCPointerArray<CNode> iChildren;		///< The array of components embedded in the component being queried
+			};
+
+	public:
+
+		/**
+			Creates a new instance of the CComponentInfo class.
+
+			@leave System wide error code
+		 */
+		IMPORT_C static CComponentInfo* NewL();
+
+		/**
+			Creates a new instance of the CComponentInfo class.
+
+			@leave System wide error code
+		 */
+		IMPORT_C static CComponentInfo* NewLC();
+
+		/**
+			Returns the root node of this CComponentInfo object.
+
+			@return The root node of this CComponentInfo object.
+			@leave System wide error code
+		 */
+		IMPORT_C const CNode& RootNodeL() const;
+
+		/**
+			Sets a node as the root node of this component info. This method passes the
+			ownership of the root node to this object so the caller must pop it from the
+			cleanup stack but not delete.
+			
+			@return The pointer to the root node to be set.
+			@leave System wide error code
+		 */
+		IMPORT_C void SetRootNodeL(CNode* aRootNode);
+
+		/**
+			Returns the pointer to the root node of this object. The caller takes the ownership
+			of this node and must delete it when no longer needed. After this call the CComponentInfo
+			object doesn't contain a root node. Hence, calling RootNodeL() results in the leave with
+			 KErrNotFound.
+			
+			@return The pointer to the root node.
+			@leave System wide error code
+		 */
+		IMPORT_C void SetRootNodeAsChildL(CNode& aParentNode);
+
+		/**
+			Externalises an object of this class to a write stream.
+
+			@param aStream Stream to which the object should be externalised.
+			@leave System wide error code
+		 */
+		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
+
+		/**
+			Allocates a buffer for serialized CComponentInfo and registers it in the @see TIpcArgs class.
+			The SIF server serializes a @see CComponentInfo object into this buffer.
+
+			@param aIpcArgs Arguments to be sent to the SIF Server.
+			@param aIndex An index value that identifies the slot in the array of arguments into which
+			the argument value is to be placed. This must be a value in the range 0 to 3.
+			@leave System wide error code
+		*/
+		IMPORT_C void PrepareForIpcL(TIpcArgs& aIpcArgs, TInt aIndex);
+
+		/**
+			Destructor.
+		*/
+		IMPORT_C virtual ~CComponentInfo();
+
+	private:
+		CComponentInfo();
+		CComponentInfo& operator=(const CComponentInfo& other);
+		CComponentInfo(const CComponentInfo& other);
+
+		void InternalizeFromExternalBufferL() const;
+		void ConstInternalizeL(RReadStream& aStream) const;
+		void CleanupExternalBuffer() const;
+
+		CNode* iRootNode;
+
+		mutable HBufC8* iExternalBuffer;
+		mutable TPtr8 iExternalBufferPtr;
+		mutable TBool iDeferredInternalization;
+
+		enum
+			{
+			// An arbitrary limit for the length of a single descriptor, for example aComponentName, aVersion or aVendor.
+			KMaxDescriptorLength = 256,
+			// An arbitrary limit for the total length of iSoftwareTypeName, iComponentName, iVersion, iVendor and iGlobalComponentId.
+			KMaxHeapBufLength = 2048,
+			// An arbitrary size of the internal buffer for sending the component info across the process boundary
+			KMaxComponentInfoStreamedSize = 2*KMaxHeapBufLength+6*sizeof(TInt)+sizeof(TInt8),
+			};
+		};
+
+
+	/**
+		The COpaqueNamedParams class is a container for integer and string values identified by name.
+
+		This class is designed for sending opaque params across the process boundary. For example, a SIF
+		client may use it to send custom arguments to the SIF server or receive custom results.
+	*/
+	class COpaqueNamedParams : public CBase
+		{
+	public:
+		/**
+			Creates a new instance of the COpaqueNamedParams class.
+
+			@leave System wide error code
+		 */
+		IMPORT_C static COpaqueNamedParams* NewL();
+
+		/**
+			Creates a new instance of the COpaqueNamedParams class.
+
+			@leave System wide error code
+		 */
+		IMPORT_C static COpaqueNamedParams* NewLC();
+
+		/**
+			Externalises an object of this class to a write stream.
+
+			@param aStream Stream to which the object should be externalised.
+			@leave System wide error code
+		 */
+		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
+
+		/**
+			Internalises an object of this class from a read stream.
+
+			@param aStream Stream from which the object should be internalised.
+			@leave System wide error code
+		 */
+		IMPORT_C void InternalizeL(RReadStream& aStream);
+
+		/**
+			Allocates a buffer and serializes the params of this object into it. The buffer is registered
+			in the @see TIpcArgs class in order to be sent to the SIF Server.
+
+			@param aIpcArgs Ipc arguments to be sent to the SIF Server.
+			@param aIndex An index value that identifies the slot in the array of arguments into which
+			the argument value is to be placed. This must be a value in the range 0 to 3.
+			@leave System wide error code
+		*/
+		IMPORT_C void PrepareArgumentsForIpcL(TIpcArgs& aIpcArgs, TInt aIndex) const;
+
+		/**
+			Allocates a buffer for serialized opaque results and registers it in the TIpcArgs class.
+			The SIF server serializes opaque results into this buffer.
+
+			@param aIpcArgs Arguments to be sent to the SIF Server.
+			@param aIndex An index value that identifies the slot in the array of arguments into which
+			the argument value is to be placed. This must be a value in the range 0 to 3.
+			@leave System wide error code
+		*/
+		IMPORT_C void PrepareResultsForIpcL(TIpcArgs& aIpcArgs, TInt aIndex);
+
+		/**
+			Returns the number of the opaque params added to this object.
+			@leave System wide error code
+		*/
+		IMPORT_C TInt CountL() const;
+
+		/**
+			Adds a string param to this object. If a param with the same name already exists it gets overwritten.
+
+			@param aName The name of the string param to be added.
+			@param aValue The value of the string param to be added.
+			@leave KErrOverflow if the size of the name or value of the string param being added exceeds 128 bytes or
+			the memory allocated for all the params added to this container exceeds 512 bytes.
+			@leave System wide error code
+		*/
+		IMPORT_C void AddStringL(const TDesC& aName, const TDesC& aValue);
+
+		/**
+			Adds an integer param to this object. If a param with the same name already exists it gets overwritten.
+
+			@param aName The name of the integer param to be added.
+			@param aValue The value of the integer param to be added.
+			@leave KErrOverflow if the size of the name the integer param being added exceeds 128 bytes or
+			the memory allocated for all the params added to this container exceeds 512 bytes.
+			@leave System wide error code
+		*/
+		IMPORT_C void AddIntL(const TDesC& aName, TInt aValue);
+
+		/**
+			Returns the list of the names of params added to the object.
+
+			@param aNames The list of the names of params. The caller is responsible for the instantiation
+			and cleanup of RPointerArray<HBufC>. The caller must also destroy all the elements of aNames added
+			by this method.
+			@leave System wide error code
+		*/
+		IMPORT_C void GetNamesL(RPointerArray<HBufC>& aNames) const; 
+
+		/**
+			Gets a reference to the string param identified by aName.
+
+			@param aName The name of the string param to be obtained.
+			@return The value of the string param or KNullDesC if not found.
+			@leave System wide error code
+		*/
+		IMPORT_C const TDesC& StringByNameL(const TDesC& aName) const;
+
+		/**
+			Returns the integer param identified by aName.
+
+			@param aName The name of the integer param to be obtained.
+			@param aValue The value of the integer param returned by this method.
+			@return Indicates if the requested param has been found.
+			@leave System wide error code
+		*/
+		IMPORT_C TBool GetIntByNameL(const TDesC& aName, TInt& aValue) const;
+
+		/**
+			Returns the integer param identified by aName.
+
+			@param aName The name of the integer param to be obtained.
+			@return The value of the integer param.
+			@leave KErrNotFound if not found
+			@leave Or other system-wide error code.
+		*/
+		IMPORT_C TInt IntByNameL(const TDesC& aName) const;
+
+		/**
+			Empties the container and frees all memory allocated to the params.
+		*/
+		IMPORT_C void Cleanup();
+
+		/**
+			Destructor.
+		*/
+		IMPORT_C virtual ~COpaqueNamedParams();
+
+	private:
+		COpaqueNamedParams();
+		COpaqueNamedParams& operator=(const COpaqueNamedParams& other);
+		COpaqueNamedParams(const COpaqueNamedParams& other);
+		
+		void InternalizeFromExternalBufferL() const;
+		void ConstInternalizeL(RReadStream& aStream) const;
+		void ConstCleanup() const;
+		void CleanupExternalBuffer() const;
+		void VerifyExternalizedSizeForNewParamL(TInt aNameSize, TInt aValueSize) const;
+		void VerifyExternalizedSizeForExistingParamL(TInt aOldValueSize, TInt aNewValueSize) const;
+
+		struct TItem
+			{
+			HBufC* iName;
+			HBufC* iValue;
+			};
+		RArray<TItem> iParams;
+
+		mutable HBufC8* iExternalBuffer;
+		mutable TPtr8 iExternalBufferPtr;
+		mutable TBool iDeferredInternalization;
+		mutable TInt iExternalizedSize;
+
+		enum
+			{
+			// An arbitrary limit for the length of a single descriptor (the name or value of a param)
+			KMaxDescriptorLength = 128,
+			// An arbitrary size of the internal buffer for sending the component info across the process boundary
+			KMaxExternalizedSize = 512
+			};
+
+		};
+
+	/**
+		Pre-defined opaque arguments and results:
+		"InstallInactive" - If provided in the opaque installation parameters, requests the installation of
+		a component without activating it. Otherwise, components are activeted after installation by default.
+		"InstallSilently" - If provided in the opaque installation parameters, requests a silent installation,
+		i.e. one which avoids interaction with the user whenever possible. Please note that this may involve
+		additional security checks, and is not necessarily supported by all installers.
+		"ComponentId" - If returned in the custom results, provides the id of the newly added component
+		after an install. Please note that not all installers (i.e. SIF Plugins) may support this.
+		"ExtendedErrCode" - If returned in the custom results gives the extended error information, that is 
+		specific to a software component type.
+	*/
+	_LIT(KSifInParam_InstallInactive, "InstallInactive");
+	_LIT(KSifInParam_InstallSilently, "InstallSilently");
+	_LIT(KSifOutParam_ComponentId, "ComponentId");
+	_LIT(KSifOutParam_ExtendedErrCode, "ExtendedErrCode");
+
+	/**
+		SIF Server Secure ID
+	
+		Installers should use this id to verify that installation requests come from the SIF Server.
+	*/
+	_LIT_SECURE_ID(KSifServerUid,0x10285BCB);
+
+	} // namespace Usif
+
+#endif // USIF_SIF_COMMON_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/sifplugin.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,179 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines a SIF plug-in interface.
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifndef SIFPLUGIN_H
+#define SIFPLUGIN_H
+
+#include <e32cmn.h>
+#include <f32file.h>
+#include <usif/sif/sifcommon.h>
+
+#include <ecom/ecom.h>
+#include <ecom/implementationproxy.h>
+
+namespace Usif
+	{
+	/** ECOM SIF plug-in Uid */
+	const TUid PluginEcomUid = {0x10285BC2};
+
+	/**
+	An abstract SIF plug-in interface. It implements the SIF software management
+	services interfaces for a particular software type. 
+
+	The SIF Server uses a SIF plug-in when a package of a type it supports
+	is to be processed.
+
+	Each method in this interface provides a security context. An installer may
+	use it in order to verify client's identity and capabilities. For example, a Java
+	installer may require the ECapabilityWriteUserData capability to activate or
+	deactivate a MIDlet.
+
+	Complex installers that need to be implemented as stand-alone servers may use
+	the SIF Transport library in order to simplify sending/receiving SIF requests
+	across a process boundary.
+	*/
+	class CSifPlugin : public CBase
+		{
+	public:
+
+		/**
+		A derived class must provide an implementation that returns details of a component
+		to be installed by file name.
+		
+		@param aFileName Component's file name
+		@param aSecurityContext this param allows the plug-in to verify client's identity
+		@param aComponentInfo On return, contains component's details
+		@param aStatus Asynchronous completion status
+		*/
+		virtual void GetComponentInfo(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+									CComponentInfo& aComponentInfo, TRequestStatus& aStatus) = 0;
+		
+		/**
+		A derived class must provide an implementation that returns details of a component
+		to be installed by file handle.
+		
+		@param aFileHandle Component's file name
+		@param aSecurityContext this param allows the plug-in to verify client's identity
+		@param aComponentInfo On return, contains component's details
+		@param aStatus Asynchronous completion status
+		*/
+		virtual void GetComponentInfo(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+									CComponentInfo& aComponentInfo, TRequestStatus& aStatus) = 0;
+
+		/**
+		A derived class must provide an implementation that installs a component by file name.
+		
+		@param aFileName Component's file name
+		@param aSecurityContext this param allows the plug-in to verify client's identity
+		@param aArguments The array of opaque params for the plug-in. An empty
+		array may be passed.  The following param is defined for the "SCOMO Install
+		Inactive" operation:
+		Name: InstallInactive, Type: Int, Value: ETrue
+		If a plug-in receives this param, it must install a component normally but the SCOMO
+		State should remain EDeactivated.
+		@param aResults The array of opaque params returned from the plug-in.
+		The following return param is defined for the id of an installed component:
+		Name: ComponentId, Type: Int
+		Each plug-in must add this param to aResults after a successful installation.
+		For packages containing embedded components, the returned param contains
+		the id of the last/most embedded component.
+		@param aStatus Asynchronous completion status
+		*/
+		virtual void Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+							const COpaqueNamedParams& aArguments, COpaqueNamedParams& aResults,
+							TRequestStatus& aStatus) = 0;
+
+		/**
+		A derived class must provide an implementation that installs a component by file handle.
+		
+		@param aFileHandle Component's file handle
+		@param aSecurityContext this param allows the plug-in to verify client's identity
+		@param aArguments The array of opaque params for the plug-in. An empty
+		array may be passed.  The following param is defined for the "SCOMO Install
+		Inactive" operation:
+		Name: InstallInactive, Type: Int, Value: ETrue
+		If a plug-in receives this param, it must install a component normally but the SCOMO
+		State should remain EDeactivated.
+		@param aResults The array of opaque params returned from the plug-in.
+		The following return param is defined for the id of an installed component:
+		Name: ComponentId, Type: Int
+		Each plug-in must add this param to aResults after a successful installation.
+		For packages containing embedded components, the returned param contains
+		the id of the last/most embedded component.
+		@param aStatus Asynchronous completion status
+		*/
+		virtual void Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+							const COpaqueNamedParams& aArguments, COpaqueNamedParams& aResults,
+							TRequestStatus& aStatus) = 0;
+
+		/**
+		A derived class must provide an implementation that uninstalls a component.
+		
+		@param aComponentId The id of a component to be uninstalled
+		@param aSecurityContext this param allows the plug-in to verify client's identity
+		@param aArguments The array of opaque params for the plug-in. An empty
+		array may be passed.
+		@param aResults The array of opaque results returned from the plug-in.
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		virtual void Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aArguments, COpaqueNamedParams& aResults,
+								TRequestStatus& aStatus) = 0;
+
+		/**
+		A derived class must provide an implementation that activates a component.
+
+		@param aComponentId The id of a component to be activated
+		@param aSecurityContext this param allows the plug-in to verify client's identity
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		virtual void Activate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								TRequestStatus& aStatus) = 0;
+
+		/**
+		A derived class must provide an implementation that deactivates a component.
+
+		@param aComponentId The id of a component to be deactivated
+		@param aSecurityContext this param allows the plug-in to verify client's identity
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		virtual void Deactivate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								TRequestStatus& aStatus) = 0;
+
+		/**
+		A derived class must provide an implementation that cancels an ongoing asynchronous request.
+		
+		This is a synchronous call. When it returns the original asynchronous call is completed.
+		*/
+		virtual void CancelOperation() = 0;
+
+		virtual ~CSifPlugin() {}
+		};
+	} // namespace Usif
+
+#endif // SIFPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/sifservercommon.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,60 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Common stuff for the Universal Software Install Framework server and client
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+*/
+
+#ifndef SIFSERVERCOMMON_H
+#define SIFSERVERCOMMON_H
+
+#include <e32uid.h>
+
+namespace Usif
+	{
+
+	/** The name of the SIF Server */
+	_LIT(KSifServerName,"!SifServer");
+
+	const TInt KSifVerMajor = 1;	///< SIF server version major component.
+	const TInt KSifVerMinor = 0;	///< SIF server version minor component.
+	const TInt KSifVerBuild = 0;	///< SIF server version build number.
+
+	/** Executable image which runs the server process. */
+	_LIT(KServerImageName, "sifserver.exe");
+
+	/**
+		Returns the version of the SIF Server.
+
+		This function is defined because there is no literal constructor for TVersion.
+
+		@return	Defines a version number which the client can use to open the server.  If the client
+				was built with a higher version number, then it cannot open the server.  This ensures that
+				a client only talks to a server whose version is at least as high as its own.
+	 */
+	inline TVersion Version()
+		{
+		TVersion v(KSifVerMajor, KSifVerMinor, KSifVerBuild);
+		return v;
+		}
+
+	} // End of namespace Usif
+
+#endif	// #ifndef SIFSERVERCOMMON_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/sifservertask.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,82 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines a SIF Server task that implements the CSifTransportTask interface.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+*/
+
+#ifndef SIFSERVERTASK_H
+#define SIFSERVERTASK_H
+
+#include <f32file.h>
+#include <usif/sif/siftransporttask.h>
+#include "sifservercommon.h"
+
+namespace Usif
+	{
+	class CSifPlugin;
+
+	/**
+	A SIF Server task. It implements the functionality of the SIF Server.
+	
+	This task is instantiated and executed by the @see CSifTransportRequest class
+	in response to an incoming software management request.
+	*/
+	class CSifServerTask : public CSifTransportTask
+		{
+	public:
+		/**
+		Instantiates a SIF Server task.
+		
+		@return Pointer to a @see CSifServerTask object.
+		*/
+		static CSifServerTask* NewL(TransportTaskFactory::TTaskType aTaskType, TTransportTaskParams& aParams);
+
+		virtual ~CSifServerTask();
+
+	protected:
+		/**
+		Implements the functionality of the SIF Server.
+		
+		@return TBool, ETrue if the processing of a software management request
+		is completed and the task can be cleaned up, EFalse if the request requires
+		further processing so this method will be called again.
+		*/
+		virtual TBool ExecuteImplL();
+
+		/**
+		Cancels an ongoing asynchronous request.
+		*/
+		virtual void CancelImpl();
+
+	private:
+		CSifServerTask(TransportTaskFactory::TTaskType aTaskType, TTransportTaskParams& aParams);
+
+		void SelectAndLoadPluginL();
+
+		TransportTaskFactory::TTaskType iTaskType;
+		CSifPlugin* iPlugin;
+		TUid iEcomKey;
+		};
+
+	} // End of namespace Usif
+
+
+#endif	// #ifndef SIFSERVERTASK_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/siftransportclient.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,218 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines the client side of the SIF Transport.
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifndef SIFTRANSPORTCLIENT_H
+#define SIFTRANSPORTCLIENT_H
+
+#include <usif/sif/sifcommon.h>
+#include <scs/scsclient.h>
+#include <e32base.h>
+#include <f32file.h>
+
+namespace Usif
+	{
+
+	/**
+	A client part of the SIF Transport. This class sends software management requests
+	across the process boundary to a specified Transport Server.
+	*/
+	class RSifTransportClient : public RScsClientBase
+		{
+	public:
+		IMPORT_C RSifTransportClient();
+
+		/**
+		 Connects a client to the SIF server.
+		 
+		@return	Symbian OS error code where KErrNone indicates
+				success and any other value indicates failure.
+		*/
+		IMPORT_C TInt Connect(const TDesC& aServerName, const TVersion& aRequiredVersion, const TDesC& aServerImageName, TUid aServerUid);
+
+		/**
+		   Disconnects a client from the SIF server.
+		*/
+		IMPORT_C void Close();
+
+		/**
+		Returns the details of a component to be installed by file name
+		 
+		@param aFileName The file name of a component to be queried
+		@param aComponentInfo On return, contains the details of a component
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		IMPORT_C void GetComponentInfo(const TDesC& aFileName, CComponentInfo& aComponentInfo,
+										TRequestStatus& aStatus);
+
+		/**
+		 * Returns the details of a component to be installed by file handle
+		 
+		@param aFileHandle The file handle of a component to be queried
+		@param aComponentInfo On return, contains the details of a component
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		IMPORT_C void GetComponentInfo(RFile& aFileHandle, CComponentInfo& aComponentInfo,
+										TRequestStatus& aStatus);
+
+		/**
+		Installs a component by file name
+		
+		@param aFileName The file name of a component to be installed
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation If this flag is set to ETrue, the Install
+		operation is executed in the Exclusive mode. In this mode the SIF Transport
+		Server executes only one operation at a time. If there is another
+		operation in progress the SIF Server returns KErrServerBusy.
+		If this flag is set to EFalse, the SIF Server executes the operation
+		even if there is a concurrent operation in progress.
+		*/
+		IMPORT_C void Install(const TDesC& aFileName, TRequestStatus& aStatus,
+							TBool aExclusiveOperation);
+
+		/**
+		Installs a component by file name using opaque arguments/results
+		
+		@param aFileName The file name of a component to be installed
+		@param aArguments The array of opaque params for the plug-in. An empty
+		array may be passed.  The following param is defined for the "SCOMO Install
+		Inactive" operation:
+		Name: InstallInactive, Type: Int, Value: ETrue
+		@param aResults The array of opaque params returned from the plug-in.
+		The following return param is defined for the id of an installed component:
+		Name: ComponentId, Type: Int
+		For packages containing embedded components, the returned param contains
+		the id of the last/most embedded component.
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation Enables the ExclusiveOperation mode. Please
+		see @see RSifTransportClient::Install by file name for details.
+		*/
+		IMPORT_C void Install(const TDesC& aFileName, const COpaqueNamedParams& aArguments,
+								COpaqueNamedParams& aResults, TRequestStatus& aStatus,
+								TBool aExclusiveOperation);
+
+		/**
+		Installs a component by file handle
+		
+		@param aFileHandle The file handle of a component to be installed
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation Enables the ExclusiveOperation mode. Please
+		see @see RSifTransportClient::Install by file name for details.
+		*/
+		IMPORT_C void Install(RFile& aFileHandle, TRequestStatus& aStatus,
+							TBool aExclusiveOperation);
+
+		/**
+		Installs a component by file handle using opaque arguments/results
+		
+		@param aFileHandle The file handle of a component to be installed
+		@param aArguments The array of opaque params for the plug-in. An empty
+		array may be passed.  The following param is defined for the "SCOMO Install
+		Inactive" operation:
+		Name: InstallInactive, Type: Int, Value: ETrue
+		@param aResults The array of opaque params returned from the plug-in.
+		The following return param is defined for the id of an installed component:
+		Name: ComponentId, Type: Int
+		For packages containing embedded components, the returned param contains
+		the id of the last/most embedded component.
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation Enables the ExclusiveOperation mode. Please
+		see @see RSifTransportClient::Install by file name for details.
+		*/
+		IMPORT_C void Install(RFile& aFileHandle, const COpaqueNamedParams& aArguments,
+								COpaqueNamedParams& aResults, TRequestStatus& aStatus,
+								TBool aExclusiveOperation);
+
+		/**
+		Uninstalls a component
+		
+		@param aComponentId The id of a component to be uninstalled
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation Enables the ExclusiveOperation mode. Please
+		see @see RSifTransportClient::Install by file name for details.
+		*/
+		IMPORT_C void Uninstall(TComponentId aComponentId, TRequestStatus& aStatus,
+								TBool aExclusiveOperation);
+
+		/**
+		Uninstalls a component
+		
+		@param aComponentId The id of a component to be uninstalled
+		@param aArguments The array of opaque params for the plug-in. An empty
+		array may be passed.
+		@param aResults The array of opaque results returned from the plug-in.
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		@param aExclusiveOperation Enables the ExclusiveOperation mode. Please
+		see @see RSifTransportClient::Install by file name for details.
+		*/
+		IMPORT_C void Uninstall(TComponentId aComponentId, const COpaqueNamedParams& aArguments,
+								COpaqueNamedParams& aResults, TRequestStatus& aStatus,
+								TBool aExclusiveOperation);
+
+		/**
+		Activates a component
+		
+		@param aComponentId The id of a component to be activated
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		IMPORT_C void Activate(TComponentId aComponentId, TRequestStatus& aStatus);
+
+		/**
+		Deactivates a component
+		
+		@param aComponentId The id of a component to be deactivated
+		@param aStatus The request status. KErrNone, if successful, otherwise
+		one of the other system-wide or SIF error codes defined in usiferror.h.
+		*/
+		IMPORT_C void Deactivate(TComponentId aComponentId, TRequestStatus& aStatus);
+
+		/**
+		Cancels an ongoing asynchronous request
+		
+		This is a synchronous call. When it returns the original asynchronous call is completed.
+		*/
+		IMPORT_C void CancelOperation();
+
+	private:
+		void CallSifFunction(TInt aFunction, const TIpcArgs& aArgs, TRequestStatus& aStatus);
+		void PrepareOpaqueParamsL(TIpcArgs& aIpcArgs, const COpaqueNamedParams& aArguments,
+									COpaqueNamedParams& aResults);
+
+		HBufC8* iArgBuf;
+		HBufC8* iResBuf;
+		TInt iOngoingFunction;
+		};
+
+	} // namespace Usif
+
+#endif // SIFTRANSPORTCLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/siftransportcommon.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,68 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Common stuff for the Sit Transport library.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+*/
+
+#ifndef SIFTRANSPORTCOMMON_H
+#define SIFTRANSPORTCOMMON_H
+
+#include <e32uid.h>
+
+namespace Usif
+	{
+
+		/**
+			Operations supported by the SIF Server
+
+			bit 0 reserved for requests that send file name in an asynchronous IPC,
+			bit 1 reserved for requests that send file handle in an asynchronous IPC,
+			bit 2 reserved for requests that send component info in an asynchronous IPC,
+			bit 3 reserved for requests that send component id in an asynchronous IPC,
+			bit 4 reserved for requests that send opaque data in an asynchronous IPC,
+			bit 5 reserved for requests that send opaque data to a plug-in,
+			bit 6 reserved for installation requests
+	 	*/
+	enum TSifTransportFunction
+		{
+		EFileNameInIpc								= 0x01,
+		EFileHandleInIpc							= 0x02,
+		EComponentInfoInIpc							= 0x04,
+		EComponentIdInIpc							= 0x08,
+		EOpaqueDataInIpc							= 0x10,
+		EOpaqueDataToPlugin							= 0x20,
+		EInstall									= 0x40,
+		EGetComponentInfoByFileName 				= 0x100|EFileNameInIpc|EComponentInfoInIpc,
+		EGetComponentInfoByFileHandle				= 0x200|EFileHandleInIpc|EComponentInfoInIpc,
+		EInstallByFileName							= 0x300|EInstall|EFileNameInIpc|EOpaqueDataToPlugin,
+		EInstallByFileNameWithOpaqueData			= 0x400|EInstall|EFileNameInIpc|EOpaqueDataInIpc|EOpaqueDataToPlugin,
+		EInstallByFileHandle						= 0x500|EInstall|EFileHandleInIpc|EOpaqueDataToPlugin,
+		EInstallByFileHandleWithOpaqueData			= 0x600|EInstall|EFileHandleInIpc|EOpaqueDataInIpc|EOpaqueDataToPlugin,
+		EInstallByFileHandleWithOpaqueDataPreamble	= 0x700,
+		EUninstall									= 0x800|EComponentIdInIpc|EOpaqueDataToPlugin,
+		EUninstallWithOpaqueData					= 0x900|EComponentIdInIpc|EOpaqueDataInIpc|EOpaqueDataToPlugin,
+		EActivate									= 0xa00|EComponentIdInIpc,
+		EDeactivate									= 0xb00|EComponentIdInIpc
+		};
+
+	} // End of namespace Usif
+
+#endif	// #ifndef SIFSERVERCOMMON_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/siftransportserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,142 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* The server side of the SIF Transport library
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+*/
+
+#ifndef SIFTRANSPORTSERVER_H
+#define SIFTRANSPORTSERVER_H
+
+#include <f32file.h>
+#include <scs/scsserver.h>
+#include <usif/sif/sifcommon.h>
+#include <usif/sif/siftransporttask.h>
+#include "siftransportcommon.h"
+
+namespace Usif
+	{
+	// forward declaration
+	class CSifTransportServer;
+
+	/**
+	A SIF Transport session. It is instantiated by the @see CSifTransportServer class in response
+	to an incoming connection. The session instantiates an asynchronous request (an instance
+	of the @see CSifTransportRequest class) and hands over the processing of a request to it.
+	*/
+	class CSifTransportSession : public CScsSession
+		{
+	public:
+		/** Creates an instance of the CSifTransportSession class. */
+		static CSifTransportSession* NewL(CSifTransportServer &aServer, TransportTaskFactory::GenerateTask aTaskFactory);
+
+		/** Destroys an instance of the CSifTransportSession class. */
+		virtual ~CSifTransportSession();
+
+		/** Implements the CScsSession interface */
+		virtual TBool DoServiceL(TInt aFunction, const RMessage2& aMessage);
+
+	private:
+		CSifTransportSession(CSifTransportServer &aServer, TransportTaskFactory::GenerateTask aTaskFactory);
+
+		TransportTaskFactory::GenerateTask iTaskFactory;
+		TBool iExclusiveOperation;
+		};
+
+	/**
+	A SIF Transport server. It is instantiated by the system when a client submits a connection request.
+	The server instantiates a SIF Transport session object in response to an incoming software management
+	request and hands over further processing to it.
+	
+	This is a transient server which means that it is instantiated in response to an incoming connection
+	and shuts down itself, after timeout specified in @see StartTransportServer, if there are no sessions.
+	*/
+	class CSifTransportServer : public CScsServer
+		{
+	public:
+		/** Creates an instance of the CSifTransportSession class. */
+		IMPORT_C static CScsServer* NewSifTransportServerLC();
+
+		/** Destroys an instance of the CSifTransportServer class. */
+		virtual ~CSifTransportServer();
+
+		/** Implements the CScsServer interface */
+		virtual CScsSession* DoNewSessionL(const RMessage2& aMessage);
+
+	private:
+		friend TInt StartTransportServer(const TDesC& aServerName, const TVersion& aVersion, TransportTaskFactory::GenerateTask aTaskFactory, TInt aShutdownPeriodUs);
+		static CSifTransportServer* NewLC(const TDesC& aServerName, const TVersion& aVersion, TransportTaskFactory::GenerateTask aTaskFactory, TInt aShutdownPeriodUs);
+
+		CSifTransportServer(const TVersion& aVersion, TransportTaskFactory::GenerateTask aFactory);
+		void ConstructL(const TDesC& aServerName, TInt aShutdownPeriodUs);
+
+		TransportTaskFactory::GenerateTask iTaskFactory;
+		};
+
+	/**
+	A SIF Transport request. An instance of this object is created by @see CSifTransportSession
+	class to represent an asynchronous software management request. The request takes a task
+	factory in the @see CSifTransportRequest::CreateAndExecuteL() method and uses it to
+	instantiate an appropriate task and execute it.
+	 */
+	class CSifTransportRequest : public CAsyncRequest
+		{
+	public:
+		/** Creates an instance of the CSifTransportRequest class. */
+		static void CreateAndExecuteL(TInt aFunction, CSifTransportSession* aSession, TransportTaskFactory::GenerateTask aTaskFactory, const RMessage2& aMessage);
+		
+		/** Destroys an instance of the CSifTransportRequest class. */
+		virtual ~CSifTransportRequest();
+
+	private:
+		CSifTransportRequest(TInt aFunction, CSifTransportSession* aSession, const RMessage2& aMessage);
+		void PrepareParamsL();
+		void SetupRequestL(TransportTaskFactory::GenerateTask aTaskFactory);
+		TInt AdoptFileHandle(TInt aFunction, const RMessage2& aMessage);
+		
+		void ProcessTaskResultsL();
+		void ProcessOpaqueResultsL();
+		void LaunchTask();
+
+		// Implement CAsyncRequest and CActive
+		virtual void DoCleanup();
+		virtual void DoCancel();
+		virtual void RunL();
+
+	private:
+		enum { EInvalidComponentId = -1 };
+
+		RFile iFile;
+		TInt iFunction;
+		const TSecurityContext iSecurityContext;
+		TComponentId iComponentId;
+
+		// Task to be executed by the server and its params
+		CSifTransportTask* iTask;
+		TTransportTaskParams iParams;
+		TBool iTaskComplete;
+		};
+
+	// The string below must be up to 16 characters, otherwise it will be truncated
+	_LIT(KSifTransportServerRequestError, "SifTransportError");
+
+	} // End of namespace Usif
+
+#endif	// #ifndef SIFTRANSPORTSERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/siftransportserverstartup.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines a SIF Transport Server startup function
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifndef SIFTRANSPORTSERVERSTARTUP_H
+#define SIFTRANSPORTSERVERSTARTUP_H
+
+#include <usif/sif/siftransporttask.h>
+
+namespace Usif
+	{
+	/** Default shutdown period is 2 seconds */
+	const TInt KDefaultShutdownPeriodUs = 2 * 1000 * 1000;
+
+	/**
+	Starts a transient server. This function should be called from an executable entrypoint
+	which is the @see E32Main() function.
+	
+	@param aServerName The name of a server to be started.
+	@param aVersion The version of a server to be started.
+	@param aTaskFactory A factory function. It is used to generate tasks which implement
+	software management requests for the installer.
+	@param aShutdownPeriodUs A shutdown period after which a server shuts down itself
+	if there are no sessions.
+	*/
+	IMPORT_C TInt StartTransportServer(const TDesC& aServerName, const TVersion& aVersion, TransportTaskFactory::GenerateTask aTaskFactory, TInt aShutdownPeriodUs = KDefaultShutdownPeriodUs);
+
+	} // End of namespace Usif
+
+#endif	// #ifndef SIFTRANSPORTSERVERSTARTUP_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/siftransporttask.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,161 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* The file defines a base class for SIF Transport tasks and a factory function for them.
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifndef SIFTRANSPORTTASK_H
+#define SIFTRANSPORTTASK_H
+
+#include <f32file.h>
+#include <usif/sif/sifcommon.h>
+
+namespace Usif
+	{
+
+	/** An auxiliary data structure for passing task's parameters across the SIF Transport library. */
+	struct TTransportTaskParams
+		{
+		IMPORT_C TTransportTaskParams();
+		CComponentInfo* iComponentInfo;
+		TComponentId iComponentId;
+		const TDesC* iFileName;
+		RFile* iFileHandle;
+		const COpaqueNamedParams* iCustomArguments;
+		COpaqueNamedParams* iCustomResults;
+		const TSecurityContext* iSecurityContext;
+		TRequestStatus* iRequestStatus;
+		enum { EInvalidComponentId = -1 };
+		};
+
+// ===========================================================================================================
+
+	/**
+	The core class of the SIF Transport library.
+	
+	It defines an abstract interface for SIF Transport tasks. These tasks are instantiated
+	and executed to handle processing of incoming software management requests.
+	
+	Each Transport task is executed in the context of the active object. If a task issues
+	a request to an asynchronous service provider, it should use a @see TRequestStatus
+	object provided in @see TTransportTaskParams. Otherwise, tasks that don't issue
+	asynchronous requests must complete this request status themselves before they leave
+	the @see CSifTransportTask::ExecuteImplL method. In order to simplify tasks that don't
+	deal with asynchronous service providers the AutoCompletion mode has been implementd. In this
+	mode the request status is completed automatically by the base class. The AutoCompletion
+	mode is enabled by default and should be disabled in constructors of tasks that issue
+	asynchronous requests.
+	
+	An implementation of the Transport Task Factory defined below is responsible for
+	instantiating Transport tasks.
+	*/
+	class CSifTransportTask : public CBase
+		{
+	protected:
+		/**
+		Constructs the object.
+		
+		@param aParams Parameters needed to execute the task. Please
+		see @see TTransportTaskParams for details.
+		@param aAutoCompletion Enables the AutoCompletion mode. 
+		*/
+		IMPORT_C CSifTransportTask(TTransportTaskParams& aParams, TBool aAutoCompletion = ETrue);
+
+		/** Destroys the object. */
+		IMPORT_C virtual ~CSifTransportTask();
+
+		/**
+		Implementation of this abstract method is supposed to process an incoming software
+		management request.
+		
+		If this method leaves with any error code the execution of the task terminates
+		immediately. The leave code is passed to the user as a request completion code.
+		
+		@return TBool, ETrue it the processing of a software management request has been
+		completed and the task can be cleaned up, EFalse if the method must be called again
+		for further processing.
+		*/
+		IMPORT_C virtual TBool ExecuteImplL() = 0;
+		
+		/**
+		Cancels the execution of an asynchronous task.
+		
+		The default implementation is empty. Tasks that issue requests to asynchronous
+		service providers must implement this method in order to cancel them.
+		*/
+		IMPORT_C virtual void CancelImpl();
+
+		/** Gets the id of a component */
+		IMPORT_C TComponentId ComponentId() const;
+		/** Gets the file name of a package */
+		IMPORT_C const TDesC* FileName() const;
+		/** Gets the file handle of a package */
+		IMPORT_C RFile* FileHandle();
+		/** Gets custom arguments */
+		IMPORT_C const COpaqueNamedParams* CustomArguments() const;
+		/** Gets custom results */
+		IMPORT_C COpaqueNamedParams* CustomResults();
+		/** Gets security context */
+		IMPORT_C const TSecurityContext* SecurityContext() const;
+		/** Gets request status associated with the task */
+		IMPORT_C TRequestStatus* RequestStatus();
+		/** Gets component info */
+		IMPORT_C CComponentInfo* ComponentInfo();
+
+	private:
+		// These methods are used only by the CSifTransportRequest class to execute and cancel SIF Transport tasks
+		friend class CSifTransportRequest;
+		TBool Execute();
+		void Cancel();
+
+	private:
+		CSifTransportTask(const CSifTransportTask&);
+		CSifTransportTask& operator=(const CSifTransportTask&);
+		
+		TTransportTaskParams& iParams;
+		TBool iAutoCompletion;
+		};
+
+// ===========================================================================================================
+
+	/**
+	Definition of a factory function for the SIF Transport library. The @see SifTransportRequest class uses implementations
+	of this function to instantiate and execute appropriate SIF Transport tasks. It happens in response to incoming software
+	management requests.
+	*/
+	namespace TransportTaskFactory
+		{
+		enum TTaskType
+			{
+			EGetComponentInfo,
+			EInstall,
+			EUninstall,
+			EActivate,
+			EDeactivate
+			};
+
+		typedef CSifTransportTask* (*GenerateTask)(TTaskType aTaskType, TTransportTaskParams& aParams);
+		}
+
+	} // namespace Usif
+
+#endif // SIFTRANSPORTTASK_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/sifutils.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,42 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines a SIF utility library.
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+#ifndef SIFUTILS_H
+#define SIFUTILS_H
+
+namespace Usif
+	{
+		/**
+			This function uninstalls a component by removing it from the SCR and deleting its files.
+			This is a synchronous API and therefore doesn't support cancellation. Hence, it is designated
+			for simple installers that don't require this functionlaity.
+
+			@param aComponentId The id of a component to be uninstalled
+			@leave System wide error code
+		*/
+		IMPORT_C void UninstallL(TComponentId aComponentId);
+	}
+
+#endif // SIFUTILS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/inc/tsif.iby	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,72 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef TSIF_IBY
+#define TSIF_IBY
+
+REM Software Install Framework
+
+define ZDRIVE \epoc32\data\Z
+define DATADRIVE \tusif\tsif\data
+
+ECOM_PLUGIN(refnativeplugin.dll,10285BC3.rsc)
+ECOM_PLUGIN(testnonnativeplugin.dll,10285BD1.rsc)
+
+file=ABI_DIR\BUILD_DIR\tusifsuite.exe							\sys\bin\tusifsuite.exe
+
+data=ZDRIVE\tusif\tsif\tsif.ini									\tusif\tsif\tsif.ini
+data=ZDRIVE\tusif\tsif\tsif.script								\tusif\tsif\tsif.script
+data=ZDRIVE\tusif\tsifintegration\tsifintegration.ini			\tusif\tsifintegration\tsifintegration.ini
+data=ZDRIVE\tusif\tsifintegration\tsifintegration.script		\tusif\tsifintegration\tsifintegration.script
+data=ZDRIVE\tusif\tsifintegration\data\compound.sifrefbinpkg	\tusif\tsifintegration\data\compound.sifrefbinpkg
+data=ZDRIVE\tusif\tswtype\tsifswtypeintegration.ini				\tusif\tswtype\tsifswtypeintegration.ini
+data=ZDRIVE\tusif\tswtype\tsifswtypeintegration.script			\tusif\tswtype\tsifswtypeintegration.script
+data=ZDRIVE\tusif\tswtype\data\test.siftestpkg					\tusif\tswtype\data\test.siftestpkg
+data=ZDRIVE\tusif\tsif\data\test.nonnativepackage.txt			DATADRIVE\test.nonnativepackage.txt
+data=ZDRIVE\tusif\tsif\data\test.overflow.txt					DATADRIVE\test.overflow.txt
+data=ZDRIVE\tusif\tsif\data\noninstallable.gif					DATADRIVE\noninstallable.gif
+
+data=ABI_DIR\BUILD_DIR\sifintegrationtestbase.sis				DATADRIVE\sifintegrationtestbase.sis
+data=ABI_DIR\BUILD_DIR\sifintegrationtestupgrade.sis			DATADRIVE\sifintegrationtestupgrade.sis
+data=ABI_DIR\BUILD_DIR\sifintegrationtestinvalidupgrade.sis		DATADRIVE\sifintegrationtestinvalidupgrade.sis
+data=ABI_DIR\BUILD_DIR\sifselfsignedwithprotecteduid.sis		DATADRIVE\sifselfsignedwithprotecteduid.sis
+data=ABI_DIR\BUILD_DIR\sifcomponentinfointegration.sis			DATADRIVE\sifcomponentinfointegration.sis
+data=ABI_DIR\BUILD_DIR\sifcomponentinfointegpu.sis				DATADRIVE\sifcomponentinfointegpu.sis
+data=ABI_DIR\BUILD_DIR\sifcomponentinfointegsp.sis				DATADRIVE\sifcomponentinfointegsp.sis
+data=ABI_DIR\BUILD_DIR\embeddingouterbase.sis					DATADRIVE\embeddingouterbase.sis
+data=ABI_DIR\BUILD_DIR\emptynameandvendor.sis					DATADRIVE\emptynameandvendor.sis
+data=ABI_DIR\BUILD_DIR\embeddingbasewithexe.sis					DATADRIVE\embeddingbasewithexe.sis
+data=ABI_DIR\BUILD_DIR\sifintegusercapsbase.sis					DATADRIVE\sifintegusercapsbase.sis
+data=ABI_DIR\BUILD_DIR\sifintegrationtestnocaps.sis				DATADRIVE\sifintegrationtestnocaps.sis
+data=ABI_DIR\BUILD_DIR\embeddingbasewithtextandinnerwithexe.sis			DATADRIVE\embeddingbasewithtextandinnerwithexe.sis
+data=ABI_DIR\BUILD_DIR\sifintegrationtestmultiplefiles.sis			DATADRIVE\sifintegrationtestmultiplefiles.sis
+data=ABI_DIR\BUILD_DIR\sifintegrationtestextensionindifferentcase.sis		DATADRIVE\sifintegrationtestextensionindifferentcase.sis
+data=ABI_DIR\BUILD_DIR\sifintegrationtestwithonlydll.sis			DATADRIVE\sifintegrationtestwithonlydll.sis
+data=ABI_DIR\BUILD_DIR\sifintegsufficientusercaps.sis			DATADRIVE\sifintegsufficientusercaps.sis
+
+data=ZDRIVE\tusif\tswtype\data\sifswtypebase.sis				\tusif\tswtype\data\sifswtypebase.sis
+data=ZDRIVE\tusif\tswtype\data\sifswtypeupgrade.sis				\tusif\tswtype\data\sifswtypeupgrade.sis
+
+
+REM security tests
+file=ABI_DIR\BUILD_DIR\usifsecuritytests.dll					\sys\bin\usifsecuritytests.dll
+
+data=ZDRIVE\tusif\securitytests\usifsecuritytests.ini			\tusif\securitytests\usifsecuritytests.ini
+data=ZDRIVE\tusif\securitytests\usifsecuritytests.script		\tusif\securitytests\usifsecuritytests.script
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/sif.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements the RSoftwareInstall API.
+*
+*/
+
+
+#include <usif/sif/sif.h>
+#include "sifservercommon.h"
+
+using namespace Usif;
+
+EXPORT_C RSoftwareInstall::RSoftwareInstall()
+	{
+	}
+
+EXPORT_C TInt RSoftwareInstall::Connect()
+	{
+	TVersion ver = Version();
+	return iTransport.Connect(KSifServerName, ver, KServerImageName, KSifServerUid);
+	}
+
+EXPORT_C void RSoftwareInstall::Close()
+	{
+	iTransport.Close();
+	}
+
+EXPORT_C void RSoftwareInstall::GetComponentInfo(const TDesC& aFileName, CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	iTransport.GetComponentInfo(aFileName, aComponentInfo, aStatus);
+	}
+
+EXPORT_C void RSoftwareInstall::GetComponentInfo(RFile& aFileHandle, CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	iTransport.GetComponentInfo(aFileHandle, aComponentInfo, aStatus);
+	}
+
+EXPORT_C void RSoftwareInstall::Install(const TDesC& aFileName, TRequestStatus& aStatus, TBool aExclusiveOperation)
+	{
+	iTransport.Install(aFileName, aStatus, aExclusiveOperation);
+	}
+
+EXPORT_C void RSoftwareInstall::Install(const TDesC& aFileName, const COpaqueNamedParams& aArguments,
+										COpaqueNamedParams& aResults, TRequestStatus& aStatus,
+										TBool aExclusiveOperation)
+	{
+	iTransport.Install(aFileName, aArguments, aResults, aStatus, aExclusiveOperation);
+	}
+
+EXPORT_C void RSoftwareInstall::Install(RFile& aFileHandle, TRequestStatus& aStatus, TBool aExclusiveOperation)
+	{
+	iTransport.Install(aFileHandle, aStatus, aExclusiveOperation);
+	}
+
+EXPORT_C void RSoftwareInstall::Install(RFile& aFileHandle, const COpaqueNamedParams& aArguments,
+										COpaqueNamedParams& aResults, TRequestStatus& aStatus,
+										TBool aExclusiveOperation)
+	{
+	iTransport.Install(aFileHandle, aArguments, aResults, aStatus, aExclusiveOperation);
+	}
+
+EXPORT_C void RSoftwareInstall::Uninstall(TComponentId aComponentId, TRequestStatus& aStatus, TBool aExclusiveOperation)
+	{
+	iTransport.Uninstall(aComponentId, aStatus, aExclusiveOperation);
+	}
+
+EXPORT_C void RSoftwareInstall::Uninstall(TComponentId aComponentId, const COpaqueNamedParams& aArguments,
+										COpaqueNamedParams& aResults, TRequestStatus& aStatus,
+										TBool aExclusiveOperation)
+	{
+	iTransport.Uninstall(aComponentId, aArguments, aResults, aStatus, aExclusiveOperation);
+	}
+
+EXPORT_C void RSoftwareInstall::Activate(TComponentId aComponentId, TRequestStatus& aStatus)
+	{
+	iTransport.Activate(aComponentId, aStatus);
+	}
+
+	EXPORT_C void RSoftwareInstall::Deactivate(TComponentId aComponentId, TRequestStatus& aStatus)
+	{
+	iTransport.Deactivate(aComponentId, aStatus);
+	}
+
+EXPORT_C void RSoftwareInstall::CancelOperation()
+	{
+	iTransport.CancelOperation();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/sifcommon.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,682 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include <f32file.h>
+#include <usif/sif/sifcommon.h>
+#include <s32mem.h>
+
+using namespace Usif;
+
+/**
+	The COpaqueNamedParams and CComponentInfo containers implement the deferred internalization
+	logic. This mechanism is necessary because these containers may be passed through IPC between
+	the SIF client and server. Hence, they must be externalized and internalized on both sides.
+	However, The SIF client doesn't implement an active object and therefore it cannot internalize
+	parameters returned by the SIF server. This de-serialization is done by the deferred internalization
+	logic when the user accesses them first time.
+	Hence, all the get methods, for example Name(), GetIntByName(), StringByNameL(), call the
+	InternalizeFromExternalBufferL() method which calls ConstInternalizeL() in order to unpack
+	the data recived from the SIF server if there is any. ConstInternalizeL() is a const method despite
+	the fact it modifies class'es members. This is done to keep the get methods const as expected by
+	the users.
+ */
+
+// ##########################################################################################
+
+namespace
+	{
+	TInt PackCapabilitySet(const TCapabilitySet& aCapSet)
+		{
+		TInt caps=0;
+		for (TInt c=0; c<ECapability_Limit; ++c)
+			{
+			if (aCapSet.HasCapability(TCapability(c)))
+				{
+				caps += (1<<c);
+				}
+			}
+		return caps;
+		}
+
+	void UnpackCapabilitySet(TInt aPackedCapSet, TCapabilitySet& aCapSet)
+		{
+		for (TInt c=0; c<ECapability_Limit; ++c)
+			{
+			const TInt cap = 1<<c;
+			if (aPackedCapSet&cap)
+				{
+				aCapSet.AddCapability(TCapability(c));
+				}
+			}
+		}
+	}
+
+// ##########################################################################################
+ 
+EXPORT_C TSecurityContext::TSecurityContext(const RMessage2& aMessage): iMsg(aMessage)
+	{
+	}
+
+EXPORT_C TBool TSecurityContext::HasCapability(TCapability aCapability) const
+	{
+	return iMsg.HasCapability(aCapability);
+	}
+
+EXPORT_C void TSecurityContext::HasCapabilityL(TCapability aCapability) const
+	{
+	iMsg.HasCapabilityL(aCapability);
+	}
+
+EXPORT_C TSecureId TSecurityContext::SecureId() const
+	{
+	return iMsg.SecureId();
+	}
+
+// ##########################################################################################
+
+CComponentInfo::CNode::CNode() : iAuthenticity(ENotAuthenticated)
+	{
+	iUserGrantableCaps.SetEmpty();
+	}
+
+EXPORT_C CComponentInfo::CNode::~CNode()
+	{
+	delete iSoftwareTypeName;
+	delete iComponentName;
+	delete iGlobalComponentId;
+	delete iVersion;
+	delete iVendor;
+
+	iChildren.Close();
+	}
+
+EXPORT_C CComponentInfo::CNode* CComponentInfo::CNode::NewLC(const TDesC& aSoftwareTypeName, const TDesC& aComponentName,
+															const TDesC& aVersion, const TDesC& aVendor, TScomoState aScomoState,
+															TInstallStatus aInstallStatus, TComponentId aComponentId,
+															const TDesC& aGlobalComponentId, TAuthenticity aAuthenticity,
+															const TCapabilitySet& aUserGrantableCaps, TInt aMaxInstalledSize,
+															TBool aHasExe,
+															RPointerArray<CNode>* aChildren)
+	{
+	// We leave if aSoftwareTypeName, aComponentName, aVersion, aVendor or aGlobalComponentId exceeds KMaxDescriptorLength
+	if (aSoftwareTypeName.Length() > KMaxDescriptorLength ||
+		aComponentName.Length() > KMaxDescriptorLength ||
+		aVersion.Length() > KMaxDescriptorLength ||
+		aVendor.Length() > KMaxDescriptorLength ||
+		aGlobalComponentId.Length() > KMaxDescriptorLength)
+		{
+		User::Leave(KErrOverflow);
+		}
+		
+
+	// Since the max heap buffer length is 2K, which is more than (num of parameters * KMaxDescriptorLength), we just assert this condition
+	__ASSERT_ALWAYS(aSoftwareTypeName.Length() + aComponentName.Length() + aVersion.Length() + aVendor.Length() + 
+					aGlobalComponentId.Length() <= KMaxHeapBufLength, User::Leave(KErrOverflow));
+
+	// Create an instance of CNode
+	CNode* self = new (ELeave) CNode();
+	CleanupStack::PushL(self);
+
+	// Copy Software Type Name, Component Name, Version, aVendor, aGlobalComponentId
+	self->iSoftwareTypeName = aSoftwareTypeName.AllocL();
+	self->iComponentName = aComponentName.AllocL();
+	self->iVersion = aVersion.AllocL();
+	self->iVendor = aVendor.AllocL();
+	self->iGlobalComponentId = aGlobalComponentId.AllocL();
+
+	// Others
+	self->iScomoState = aScomoState;
+	self->iInstallStatus = aInstallStatus;
+	self->iComponentId = aComponentId;
+	self->iAuthenticity = aAuthenticity;
+	self->iUserGrantableCaps = aUserGrantableCaps;
+	self->iMaxInstalledSize = aMaxInstalledSize;
+	self->iHasExe = aHasExe;
+
+	// Embedded Components
+	if(aChildren != NULL)
+		{
+		for (TInt i=aChildren->Count()-1; i>=0; --i)
+			{
+			self->iChildren.InsertL((*aChildren)[i], 0);
+			aChildren->Remove(i);
+			}
+		}
+	
+	return self;
+	}
+
+EXPORT_C void CComponentInfo::CNode::AddChildL(CComponentInfo::CNode* aChild)
+	{
+	if (aChild == NULL)
+		{
+		User::Leave(KErrArgument);
+		}
+
+	iChildren.AppendL(aChild);
+	}
+
+CComponentInfo::CNode* CComponentInfo::CNode::NewL(RReadStream& aStream)
+	{
+	// Create an instance of CNode
+	CNode* self = new (ELeave) CNode();
+	CleanupStack::PushL(self);
+	
+	self->iSoftwareTypeName = HBufC::NewL(aStream, KMaxDescriptorLength);
+	self->iComponentName = HBufC::NewL(aStream, KMaxDescriptorLength);
+	self->iVersion = HBufC::NewL(aStream, KMaxDescriptorLength);
+	self->iVendor = HBufC::NewL(aStream, KMaxDescriptorLength);
+	self->iGlobalComponentId = HBufC::NewL(aStream, KMaxDescriptorLength);
+	self->iScomoState = static_cast<TScomoState>(aStream.ReadInt32L());
+	self->iInstallStatus = static_cast<TInstallStatus>(aStream.ReadInt32L());
+	self->iComponentId = aStream.ReadInt32L();
+	self->iAuthenticity = static_cast<TAuthenticity>(aStream.ReadInt32L());
+	UnpackCapabilitySet(aStream.ReadInt32L(), self->iUserGrantableCaps);
+	self->iMaxInstalledSize = aStream.ReadInt32L();
+	self->iHasExe = aStream.ReadInt32L();
+
+	const TInt numChildren = aStream.ReadInt32L();
+	for (TInt i=0; i<numChildren; ++i)
+		{
+		CNode* node = CNode::NewL(aStream);
+		CleanupStack::PushL(node);
+		self->iChildren.AppendL(node);
+		CleanupStack::Pop(node);
+		}
+	
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CComponentInfo::CNode::ExternalizeL(RWriteStream& aStream) const
+	{
+	ASSERT (iSoftwareTypeName!=NULL && iComponentName!=NULL && iVersion!=NULL && iVendor!=NULL && iGlobalComponentId!=NULL);
+
+	aStream << *iSoftwareTypeName;
+	aStream << *iComponentName;
+	aStream << *iVersion;
+	aStream << *iVendor;
+	aStream << *iGlobalComponentId;
+
+	aStream.WriteInt32L(iScomoState);
+	aStream.WriteInt32L(iInstallStatus);
+	aStream.WriteInt32L(iComponentId);
+	aStream.WriteInt32L(static_cast<TInt>(iAuthenticity));
+	aStream.WriteInt32L(PackCapabilitySet(iUserGrantableCaps));
+	aStream.WriteInt32L(iMaxInstalledSize);
+	aStream.WriteInt32L(iHasExe);
+	
+	const TInt numChildren = iChildren.Count();
+	aStream.WriteInt32L(numChildren);
+	for (TInt i=0; i<numChildren; ++i)
+		{
+		iChildren[i]->ExternalizeL(aStream);
+		}
+	}
+
+EXPORT_C const TDesC& CComponentInfo::CNode::SoftwareTypeName() const
+	{
+	return *iSoftwareTypeName;
+	}
+
+EXPORT_C const TDesC& CComponentInfo::CNode::ComponentName() const
+	{
+	return *iComponentName;
+	}
+
+EXPORT_C const TDesC& CComponentInfo::CNode::Version() const
+	{
+	return *iVersion;
+	}
+
+EXPORT_C const TDesC& CComponentInfo::CNode::Vendor() const
+	{
+	return *iVendor;
+	}
+
+EXPORT_C TScomoState CComponentInfo::CNode::ScomoState() const
+	{
+	return iScomoState;
+	}
+
+EXPORT_C TInstallStatus CComponentInfo::CNode::InstallStatus() const
+	{
+	return iInstallStatus;
+	}
+
+EXPORT_C TComponentId CComponentInfo::CNode::ComponentId() const
+	{
+	return iComponentId;
+	}
+
+EXPORT_C const TDesC& CComponentInfo::CNode::GlobalComponentId() const
+	{
+	return *iGlobalComponentId;
+	}
+
+EXPORT_C TAuthenticity CComponentInfo::CNode::Authenticity() const
+	{
+	return iAuthenticity;
+	}
+
+EXPORT_C const TCapabilitySet& CComponentInfo::CNode::UserGrantableCaps() const
+	{
+	return iUserGrantableCaps;
+	}
+
+EXPORT_C TInt CComponentInfo::CNode::MaxInstalledSize() const
+	{
+	return iMaxInstalledSize;
+	}
+
+EXPORT_C TBool CComponentInfo::CNode::HasExecutable() const
+	{
+	return iHasExe;
+	}
+
+EXPORT_C const RPointerArray<CComponentInfo::CNode>& CComponentInfo::CNode::Children() const
+	{
+	return iChildren;
+	}
+
+// ##########################################################################################
+
+CComponentInfo::CComponentInfo() : iExternalBufferPtr(NULL, 0, 0)
+	{
+	}
+
+EXPORT_C CComponentInfo::~CComponentInfo()
+	{
+	delete iRootNode;
+
+	CleanupExternalBuffer();
+	}
+
+EXPORT_C CComponentInfo* CComponentInfo::NewL()
+	{
+	return new (ELeave) CComponentInfo;
+	}
+
+EXPORT_C CComponentInfo* CComponentInfo::NewLC()
+	{
+	CComponentInfo* self = new (ELeave) CComponentInfo;
+	CleanupStack::PushL(self);
+	return self;
+	}
+
+EXPORT_C const CComponentInfo::CNode& CComponentInfo::RootNodeL() const
+	{
+	InternalizeFromExternalBufferL();
+	
+	if (iRootNode == NULL)
+		{
+		User::Leave(KErrNotFound);
+		}
+	
+	return *iRootNode;
+	}
+
+EXPORT_C void CComponentInfo::SetRootNodeL(CNode* aRootNode)
+	{
+	InternalizeFromExternalBufferL();
+	
+	if (aRootNode == NULL)
+		{
+		User::Leave(KErrArgument);
+		}
+	
+	delete iRootNode;
+	iRootNode = aRootNode;
+	}
+
+EXPORT_C void CComponentInfo::SetRootNodeAsChildL(CNode& aParentNode)
+	{
+	InternalizeFromExternalBufferL();
+	
+	if (iRootNode == NULL)
+		{
+		User::Leave(KErrNotFound);
+		}
+	
+	aParentNode.AddChildL(iRootNode);
+	iRootNode = NULL;
+	}
+
+EXPORT_C void CComponentInfo::ExternalizeL(RWriteStream& aStream) const
+	{
+	InternalizeFromExternalBufferL();
+	
+	aStream.WriteInt8L(iRootNode != NULL);
+	
+	if (iRootNode != NULL)
+		{
+		iRootNode->ExternalizeL(aStream);
+		}
+	}
+
+void CComponentInfo::ConstInternalizeL(RReadStream& aStream) const
+	{
+	CNode*& rootNode = const_cast<CNode*&>(iRootNode);
+	delete rootNode;
+	rootNode = NULL;
+	
+	if (aStream.ReadInt8L() != 0)
+		{
+		rootNode = CNode::NewL(aStream);
+		}
+	}
+
+void CComponentInfo::CleanupExternalBuffer() const
+	{
+	delete iExternalBuffer;
+	iExternalBuffer = NULL;
+	iDeferredInternalization = EFalse;
+	}
+
+void CComponentInfo::InternalizeFromExternalBufferL() const
+	{
+	if (iDeferredInternalization)
+		{
+		iDeferredInternalization = EFalse;
+
+		RDesReadStream rs(*iExternalBuffer);
+		CleanupClosePushL(rs);
+		ConstInternalizeL(rs);
+		CleanupStack::PopAndDestroy(&rs);
+
+		CleanupExternalBuffer();
+		}
+	}
+
+EXPORT_C void CComponentInfo::PrepareForIpcL(TIpcArgs& aIpcArgs, TInt aIndex)
+	{
+	delete iExternalBuffer;
+	iExternalBuffer = NULL;
+
+	iExternalBuffer = HBufC8::NewL(KMaxComponentInfoStreamedSize);
+	iExternalBufferPtr.Set(iExternalBuffer->Des());
+	
+	aIpcArgs.Set(aIndex, &iExternalBufferPtr);
+	
+	iDeferredInternalization = ETrue;
+	}
+
+// ##########################################################################################
+
+COpaqueNamedParams::COpaqueNamedParams()
+	: iExternalBuffer(NULL), iExternalBufferPtr(NULL, 0, 0), iDeferredInternalization(EFalse), iExternalizedSize(sizeof(TInt))
+	{
+	}
+
+EXPORT_C COpaqueNamedParams::~COpaqueNamedParams()
+	{
+	Cleanup();
+	iParams.Close();
+	CleanupExternalBuffer();
+	}
+
+EXPORT_C COpaqueNamedParams* COpaqueNamedParams::NewL()
+	{
+	return new (ELeave) COpaqueNamedParams;
+	}
+
+EXPORT_C COpaqueNamedParams* COpaqueNamedParams::NewLC()
+	{
+	COpaqueNamedParams* self = new (ELeave) COpaqueNamedParams;
+	CleanupStack::PushL(self);
+	return self;
+	}
+
+void COpaqueNamedParams::VerifyExternalizedSizeForNewParamL(TInt aNameSize, TInt aValueSize) const
+	{
+	const TInt load = 2*sizeof(TInt) + aNameSize + aValueSize;
+	if (aNameSize > KMaxDescriptorLength || aValueSize > KMaxDescriptorLength ||
+		iExternalizedSize + load > KMaxExternalizedSize)
+		{
+		User::Leave(KErrOverflow);
+		}
+	iExternalizedSize += load;
+	}
+
+void COpaqueNamedParams::VerifyExternalizedSizeForExistingParamL(TInt aOldValueSize, TInt aNewValueSize) const
+	{
+	const TInt diff = aNewValueSize - aOldValueSize;
+	if (aNewValueSize > KMaxDescriptorLength ||
+		iExternalizedSize + diff > KMaxExternalizedSize)
+		{
+		User::Leave(KErrOverflow);
+		}
+	iExternalizedSize += diff;
+	}
+
+EXPORT_C void COpaqueNamedParams::AddStringL(const TDesC& aName, const TDesC& aValue)
+	{
+	HBufC* value = HBufC::NewLC(aValue.Length());
+	TPtr bufValue(value->Des());
+	bufValue.Copy(aValue);
+
+	const TInt len = iParams.Count();
+	for (TInt i=0; i<len; ++i)
+		{
+		if (iParams[i].iName->CompareF(aName) == 0)
+			{
+			VerifyExternalizedSizeForExistingParamL(iParams[i].iValue->Size(), value->Size());
+			delete iParams[i].iValue;
+			iParams[i].iValue = value;
+			CleanupStack::Pop(value);
+			return;
+			}
+		}
+
+	VerifyExternalizedSizeForNewParamL(aName.Size(), aValue.Size());
+
+	HBufC* name = HBufC::NewLC(aName.Length());
+	TPtr bufName(name->Des());
+	bufName.Copy(aName);
+
+	TItem item = {name, value};
+	iParams.AppendL(item);
+
+	CleanupStack::Pop(2, value);
+	}
+
+EXPORT_C void COpaqueNamedParams::AddIntL(const TDesC& aName, TInt aValue)
+	{
+  	// Assumption: the code below won't be compiled in __KERNEL_MODE__ so HBufC is always defined as HBufC16
+  	TBuf<sizeof(TInt)/2> buf;
+  	buf.Copy(reinterpret_cast<TUint16*>(&aValue), sizeof(TInt)/2);
+	AddStringL(aName, buf);
+	}
+
+EXPORT_C void COpaqueNamedParams::GetNamesL(RPointerArray<HBufC>& aNames) const
+	{
+	InternalizeFromExternalBufferL();
+
+	const TInt len = iParams.Count();
+	for (TInt i=0; i<len; ++i)
+		{
+		const TDesC& ref = *iParams[i].iName;
+		HBufC* name = HBufC::NewLC(ref.Length());
+		TPtr bufName(name->Des());
+		bufName.Copy(ref);
+		aNames.AppendL(name);
+		CleanupStack::Pop(name);
+		}
+	}
+	
+EXPORT_C void COpaqueNamedParams::ExternalizeL(RWriteStream& aStream) const
+	{
+	InternalizeFromExternalBufferL();
+
+	TInt len = iParams.Count();
+	aStream.WriteInt32L(len);
+	for (TInt i=0; i<len; ++i)
+		{
+		aStream << *iParams[i].iName;
+		aStream << *iParams[i].iValue;
+		}
+	}
+
+EXPORT_C void COpaqueNamedParams::InternalizeL(RReadStream& aStream)
+	{
+	Cleanup();
+	ConstInternalizeL(aStream);
+	}
+
+void COpaqueNamedParams::ConstInternalizeL(RReadStream& aStream) const
+	{
+	RArray<TItem>& refParams = const_cast<RArray<TItem>&>(iParams);
+	
+	TInt len = aStream.ReadInt32L();
+	for (TInt i=0; i<len; ++i)
+		{
+		HBufC* name = HBufC::NewLC(aStream, KMaxDescriptorLength);
+		HBufC* value = HBufC::NewLC(aStream, KMaxDescriptorLength);
+
+		// We need to update iExternalizedSize here because its value must correspond to the params beind added from aStream
+		VerifyExternalizedSizeForNewParamL(name->Size(), value->Size());
+
+		TItem item = {name, value};
+		refParams.AppendL(item);
+
+		CleanupStack::Pop(2, name);
+		}
+	}
+
+EXPORT_C void COpaqueNamedParams::PrepareArgumentsForIpcL(TIpcArgs& aIpcArgs, TInt aIndex) const
+	{
+	delete iExternalBuffer;
+	iExternalBuffer = NULL;
+	iExternalBuffer = HBufC8::NewL(iExternalizedSize);
+	iExternalBufferPtr.Set(iExternalBuffer->Des());
+	
+	RDesWriteStream ws(iExternalBufferPtr);
+	CleanupClosePushL(ws);
+	ExternalizeL(ws);
+	ws.CommitL();
+	CleanupStack::PopAndDestroy(&ws);
+	
+	aIpcArgs.Set(aIndex, &iExternalBufferPtr);
+	}
+
+EXPORT_C void COpaqueNamedParams::PrepareResultsForIpcL(TIpcArgs& aIpcArgs, TInt aIndex)
+	{
+	delete iExternalBuffer;
+	iExternalBuffer = NULL;
+	iExternalBuffer = HBufC8::NewL(KMaxExternalizedSize);
+	iExternalBufferPtr.Set(iExternalBuffer->Des());
+	
+	RDesWriteStream ws(iExternalBufferPtr);
+	CleanupClosePushL(ws);
+	ws.WriteInt32L(0); // Write the initial count of results, so that the object will be valid even if no results are added
+	CleanupStack::PopAndDestroy(&ws);
+	
+	aIpcArgs.Set(aIndex, &iExternalBufferPtr);
+	
+	iDeferredInternalization = ETrue;
+	}
+
+void COpaqueNamedParams::InternalizeFromExternalBufferL() const
+	{
+	if (iDeferredInternalization)
+		{
+		iDeferredInternalization = EFalse;
+
+		ConstCleanup();
+		
+		RDesReadStream rs(*iExternalBuffer);
+		CleanupClosePushL(rs);
+		ConstInternalizeL(rs);
+		CleanupStack::PopAndDestroy(&rs);
+
+		CleanupExternalBuffer();
+		}
+	}
+
+EXPORT_C const TDesC& COpaqueNamedParams::StringByNameL(const TDesC& aName) const
+	{
+	InternalizeFromExternalBufferL();
+	
+	const TInt len = iParams.Count();
+	for (TInt i=0; i<len; ++i)
+		{
+		if (iParams[i].iName->CompareF(aName) == 0)
+			{
+			return *iParams[i].iValue;
+			}
+		}
+	return KNullDesC;    
+	}
+
+EXPORT_C TBool COpaqueNamedParams::GetIntByNameL(const TDesC& aName, TInt& aValue) const
+	{
+	InternalizeFromExternalBufferL();
+
+	const TDesC& value = StringByNameL(aName);
+	if (value == KNullDesC)
+		{
+		return EFalse;
+		}
+	aValue = *(reinterpret_cast<const TUint*>(value.Ptr()));
+	return ETrue;
+	}
+
+EXPORT_C TInt COpaqueNamedParams::IntByNameL(const TDesC& aName) const
+	{
+	InternalizeFromExternalBufferL();
+
+	TInt val;
+	if (!GetIntByNameL(aName, val))
+		{
+		User::Leave(KErrNotFound);
+		}
+	return val;
+	}
+
+EXPORT_C TInt COpaqueNamedParams::CountL() const
+	{
+	InternalizeFromExternalBufferL();
+	return iParams.Count();
+	}
+	
+EXPORT_C void COpaqueNamedParams::Cleanup()
+	{
+	ConstCleanup();
+	}
+
+void COpaqueNamedParams::ConstCleanup() const
+	{
+	// Cleanup internal params
+	iExternalizedSize = sizeof(TInt);
+
+	const TInt len = iParams.Count();
+	for (TInt i=0; i<len; ++i)
+		{
+		delete iParams[i].iName;
+		delete iParams[i].iValue;
+		}
+	RArray<TItem>& refParams = const_cast<RArray<TItem>&>(iParams);
+	refParams.Reset();
+	}
+
+	void COpaqueNamedParams::CleanupExternalBuffer() const
+	{
+	delete iExternalBuffer;
+	iExternalBuffer = NULL;
+	iDeferredInternalization = EFalse;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/siflauncher.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,114 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements  a built-in SIF launcher that integrates the SIF API with AppArc.
+* Thanks to this integration,  generic applications may launch installation of
+* a common scenario widely used, for example by file and web browsers, when
+* the user clicks on a file or link.
+*
+*/
+
+
+/**
+ a software component using @see RApaLsSession::StartDocument. This is
+*/
+
+#include <e32base.h>
+#include <apgcli.h>
+#include <apacmdln.h>
+#include <f32file.h>
+#include <usif/sif/sif.h>
+#include "usiflog.h"
+
+using namespace Usif;
+
+LOCAL_C void LaunchInstallL();
+
+/** main function called by E32 */
+GLDEF_C TInt E32Main()
+	{
+	CTrapCleanup* cleanup=CTrapCleanup::New();
+
+	__UHEAP_MARK;
+	TRAPD(err,LaunchInstallL());
+	__UHEAP_MARKEND;
+
+	delete cleanup;
+	return err;
+	}
+
+LOCAL_C void LaunchInstallL()
+    {
+	// Get the command line object with data as attached to the process by AppArc.
+	CApaCommandLine* commandLine = NULL;
+	TInt err = CApaCommandLine::GetCommandLineFromProcessEnvironment(commandLine);
+	DEBUG_PRINTF2(_L8("SIF Launcher: CApaCommandLine::GetCommandLineFromProcessEnvironment result = %d\n"),err);
+	User::LeaveIfError(err);
+	
+	CleanupStack::PushL(commandLine);
+	
+	switch (commandLine->Command())
+		{
+		case EApaCommandOpen:
+			{
+			// Open the file and use the handle to install it
+			RFile fileHandle;
+			CleanupClosePushL(fileHandle);
+			commandLine->GetFileByHandleL(fileHandle);
+
+			// Establish a connection with the SIF server
+			RSoftwareInstall sif;
+			err = sif.Connect();
+			if (err != KErrNone)
+				{
+				DEBUG_PRINTF2(_L8("SIF Launcher: RSoftwareInstall::Connect() failed, error = %d\n"),err);
+				User::Leave(err);
+				}
+
+			CleanupClosePushL(sif);
+			TRequestStatus status;
+			
+			if (fileHandle.SubSessionHandle() != KNullHandle)
+				{
+				// We've got a working file handle, so use it...
+				DEBUG_PRINTF(_L8("SIF Launcher: installation by file handle...\n"));
+				sif.Install(fileHandle, status);
+				}
+			else
+				{
+				// ...otherwise the file name of a package
+				DEBUG_PRINTF(_L8("SIF Launcher: installation by file name...\n"));
+				sif.Install(commandLine->DocumentName(), status);
+				}
+				
+			User::WaitForRequest(status);
+			DEBUG_PRINTF2(_L8("SIF Launcher: installation finished with err = %d\n"),status.Int());
+			CleanupStack::PopAndDestroy(2, &fileHandle);
+			break;
+			}
+			
+		/* SIF Launcher doesn't support the following commands:
+		- EApaCommandCreate,
+		- EApaCommandRun,
+		- EApaCommandBackground,
+		- EApaCommandViewActivate,
+		- EApaCommandRunWithoutViews,
+		- EApaCommandBackgroundAndWithoutViews */
+		default:
+			User::Leave(KErrNotSupported);
+			break;
+		}
+
+	CleanupStack::PopAndDestroy(commandLine);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/sifserverstartup.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,43 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Executable entrypoint and server object factory function.
+*
+*/
+
+
+#include <usif/sif/siftransportserverstartup.h>
+#include "sifservertask.h"
+
+using namespace Usif;
+
+namespace
+	{
+	/** A factory function for the SIF Server */
+	CSifTransportTask* SifServerTaskFactoryL(TransportTaskFactory::TTaskType aTaskType, TTransportTaskParams& aParams)
+		{
+		return CSifServerTask::NewL(aTaskType, aParams);
+		}
+	}
+
+/**
+	Executable entrypoint.
+
+	@return	Symbian OS error code where KErrNone indicates
+			success and any other value indicates failure.
+ */
+TInt E32Main()
+	{
+	return StartTransportServer(KSifServerName, Version(), SifServerTaskFactoryL);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/sifservertask.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,217 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements a SIF Transport task for the SIF Server.
+*
+*/
+
+
+#include <e32base.h>
+#include <e32std.h>
+#include <usif/usiferror.h>
+#include <usif/sif/sifplugin.h>
+#include <usif/scr/scr.h>
+#include <apgcli.h>
+#include "sifservertask.h"
+#include "siftransportcommon.h"
+#include "usiflog.h"
+#include "sifutils.h"
+
+using namespace Usif;
+
+CSifServerTask* CSifServerTask::NewL(TransportTaskFactory::TTaskType aTaskType, TTransportTaskParams& aParams)
+	{
+	CSifServerTask* self = new (ELeave) CSifServerTask(aTaskType, aParams);
+	CleanupStack::PushL(self);
+
+	// Query AppArc about the (MIME) type of the package to be processed and instantiate an appropriate SIF plug-in
+	self->SelectAndLoadPluginL();
+
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CSifServerTask::CSifServerTask(TransportTaskFactory::TTaskType aTaskType, TTransportTaskParams& aParams)
+	: CSifTransportTask(aParams, EFalse), iTaskType(aTaskType)
+	{
+	}
+
+CSifServerTask::~CSifServerTask()
+	{
+	DEBUG_PRINTF2(_L8("CSifServerTask::~CSifServerTask() for aFunction = %d\n"),iTaskType);
+
+	// Clean up the plugin
+	delete iPlugin;
+	iPlugin = NULL;
+	REComSession::DestroyedImplementation(iEcomKey);
+	REComSession::FinalClose();
+	}
+
+TBool CSifServerTask::ExecuteImplL()
+	{
+	DEBUG_PRINTF2(_L8("CSifServerTask::ExecuteImpl() for aRequest = %d\n"),iTaskType);
+	
+	// Plug-in does not exists and request is not for default uninstallation so leave.
+	if (!iPlugin && iTaskType != TransportTaskFactory::EUninstall)
+		User::Leave(KErrNotFound);
+
+	// Hand over the software management request to the plug-in
+	switch (iTaskType)
+		{
+		case TransportTaskFactory::EGetComponentInfo:
+			{
+			if (FileName())
+				{
+				iPlugin->GetComponentInfo(*FileName(), *SecurityContext(), *ComponentInfo(), *RequestStatus());
+				}
+			else
+				{
+				iPlugin->GetComponentInfo(*FileHandle(), *SecurityContext(), *ComponentInfo(), *RequestStatus());
+				}
+			break;
+			}
+
+		case TransportTaskFactory::EInstall:
+			{
+			if (FileName())
+				{
+				iPlugin->Install(*FileName(), *SecurityContext(), *CustomArguments(), *CustomResults(), *RequestStatus());
+				}
+			else
+				{
+				iPlugin->Install(*FileHandle(), *SecurityContext(), *CustomArguments(), *CustomResults(), *RequestStatus());
+				}
+			break;
+			}
+
+		case TransportTaskFactory::EUninstall:
+			{
+			if (!iPlugin)
+				{
+				// The default uninstaller is used when the Plugin is no longer present.
+				UninstallL(ComponentId());
+				TRequestStatus* requestStatusPtr(RequestStatus());
+				User::RequestComplete(requestStatusPtr, KErrNone);
+				}
+			else
+				{
+				iPlugin->Uninstall(ComponentId(), *SecurityContext(), *CustomArguments(), *CustomResults(), *RequestStatus());
+				}
+			break;
+			}
+
+		case TransportTaskFactory::EActivate:
+			{
+			iPlugin->Activate(ComponentId(), *SecurityContext(), *RequestStatus());
+			break;
+			}
+
+		case TransportTaskFactory::EDeactivate:
+			{
+			iPlugin->Deactivate(ComponentId(), *SecurityContext(), *RequestStatus());
+			break;
+			}
+
+		default:
+			ASSERT(0);
+		}
+	return ETrue;
+	}
+
+void CSifServerTask::CancelImpl()
+	{
+	DEBUG_PRINTF2(_L8("CSifServerTask::Cancel for aTaskType = %d\n"), iTaskType);
+	ASSERT(iPlugin);
+	iPlugin->CancelOperation();
+	}
+
+void CSifServerTask::SelectAndLoadPluginL()
+	{
+	DEBUG_PRINTF2(_L8("CSifServerTask::SelectAndLoadPluginL() for aFunction = %d\n"),iTaskType);
+
+	// The code below assumes that each SIF request provides a component id xor a file handle xor a file name.
+	// In case of changes that invalidate this assumption the code must be modified.
+
+	TDataType dataType;
+	if (iTaskType == TransportTaskFactory::EGetComponentInfo || iTaskType  == TransportTaskFactory::EInstall)
+		{
+		// Get the MIME type of the component to be installed from AppArc
+		DEBUG_PRINTF(_L8("Getting the MIME type of the component to be installed from AppArc\n"));
+		RApaLsSession apa;
+		TInt err = apa.Connect();
+		if (err != KErrNone)
+			{
+			DEBUG_PRINTF2(_L8("Failed to connect to the AppArc server, err = %d\n"),err);
+			User::Leave(err);
+			}
+		CleanupClosePushL(apa);
+		TUid appUid = TUid::Null();
+		if (FileName())
+			{
+			err = apa.AppForDocument(*FileName(), appUid, dataType);
+			}
+		else
+			{
+			err = apa.AppForDocument(*FileHandle(), appUid, dataType);
+			}
+		// A possible problem with recognizers is returning a successful result, but forgetting to set the MIME type. The second condition below protects against that.
+		if (err != KErrNone || dataType.Des8().Ptr() == NULL) 
+			{
+			DEBUG_PRINTF2(_L8("Failed to obtain the MIME type of a component, err = %d\n"),err);
+			User::Leave(err);
+			}
+		CleanupStack::PopAndDestroy(&apa);
+		}
+
+	// Get the uid of the matching plug-in from SCR for ...
+	RSoftwareComponentRegistry scr;
+	TInt err = scr.Connect();
+	if (err != KErrNone)
+		{
+		DEBUG_PRINTF2(_L8("Failed to connect to the SCR, err = %d\n"),err);
+		User::Leave(err);
+		}
+	CleanupClosePushL(scr);
+
+	//... iComponentId or the MIME type obtained above
+	TUid pluginUid = TUid::Null();
+	if (iTaskType != TransportTaskFactory::EInstall && iTaskType != TransportTaskFactory::EGetComponentInfo)
+		{
+		// Verify the given component id
+		CComponentEntry* entry = CComponentEntry::NewLC();
+		if (!scr.GetComponentL(ComponentId(), *entry))
+			{
+			DEBUG_PRINTF2(_L8("ComponentId = %d not found in the SCR"), ComponentId());
+			User::Leave(KErrSifBadComponentId);
+			}
+		CleanupStack::PopAndDestroy(entry);
+		
+		// Get the PluginUid only when an Installer Plugin is present.
+		if (!scr.IsComponentOrphanedL(ComponentId()))
+			{
+			pluginUid = scr.GetPluginUidL(ComponentId());
+			}
+		}
+	else
+		{
+		pluginUid = scr.GetPluginUidL(dataType.Des());
+		}
+	CleanupStack::PopAndDestroy(&scr);
+
+	// Load the plug-in
+	if( pluginUid != TUid::Null() )
+		{
+		iPlugin = reinterpret_cast<CSifPlugin*>(REComSession::CreateImplementationL(pluginUid, iEcomKey));
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/siftransportclient.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,186 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements the client side of the SIF Transport library
+*
+*/
+
+
+#include <f32file.h>
+#include <usif/sif/sif.h>
+#include <scs/scscommon.h>
+#include "siftransportclient.h"
+#include "siftransportcommon.h"
+
+using namespace Usif;
+
+	EXPORT_C RSifTransportClient::RSifTransportClient()
+	: RScsClientBase(), iArgBuf(NULL), iResBuf(NULL), iOngoingFunction(0)
+	{
+	}
+
+EXPORT_C TInt RSifTransportClient::Connect(const TDesC& aServerName, const TVersion& aRequiredVersion, const TDesC& aServerImageName, TUid aServerUid)
+	{
+	TUidType uidType(KExecutableImageUid, KNullUid, aServerUid);
+	return RScsClientBase::Connect(aServerName, aRequiredVersion, aServerImageName, uidType);
+	}
+
+EXPORT_C void RSifTransportClient::Close()
+	{
+	delete iArgBuf;
+	delete iResBuf;
+
+	RScsClientBase::Close();
+	}
+
+EXPORT_C void RSifTransportClient::GetComponentInfo(const TDesC& aFileName, CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	TIpcArgs ipcArgs(&aFileName);
+	TRAPD(err, aComponentInfo.PrepareForIpcL(ipcArgs, 2));
+	if (err)
+		{
+		TRequestStatus *status(&aStatus);
+		User::RequestComplete(status, err);
+		return;
+		}
+	
+	CallSifFunction(EGetComponentInfoByFileName, ipcArgs, aStatus);
+	}
+
+EXPORT_C void RSifTransportClient::GetComponentInfo(RFile& aFileHandle, CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	TIpcArgs ipcArgs;
+	TInt transferErr = aFileHandle.TransferToServer(ipcArgs, 0, 1);
+	TRAPD(err, aComponentInfo.PrepareForIpcL(ipcArgs, 2));
+	if (err || transferErr)
+		{
+		TRequestStatus *status(&aStatus);
+		User::RequestComplete(status, err ? err : transferErr);
+		return;
+		}
+	
+	CallSifFunction(EGetComponentInfoByFileHandle, ipcArgs, aStatus);
+	}
+
+EXPORT_C void RSifTransportClient::Install(const TDesC& aFileName, TRequestStatus& aStatus, TBool aExclusiveOperation)
+	{
+	TIpcArgs ipcArgs(&aFileName, aExclusiveOperation);
+	CallSifFunction(EInstallByFileName, ipcArgs, aStatus);
+	}
+
+EXPORT_C void RSifTransportClient::Install(const TDesC& aFileName, const COpaqueNamedParams& aArguments,
+										COpaqueNamedParams& aResults, TRequestStatus& aStatus, TBool aExclusiveOperation)
+	{
+	TIpcArgs ipcArgs(&aFileName, aExclusiveOperation);
+	TRAPD(err, PrepareOpaqueParamsL(ipcArgs, aArguments, aResults));
+	if (err)
+		{
+		TRequestStatus *status(&aStatus);
+		User::RequestComplete(status, err);
+		return;
+		}
+	
+	CallSifFunction(EInstallByFileNameWithOpaqueData, ipcArgs, aStatus);
+	}
+
+EXPORT_C void RSifTransportClient::Install(RFile& aFileHandle, TRequestStatus& aStatus, TBool aExclusiveOperation)
+	{
+	TIpcArgs ipcArgs(0, 0, aExclusiveOperation);
+	TInt err = aFileHandle.TransferToServer(ipcArgs, 0, 1);
+	if (err)
+		{
+		TRequestStatus *status(&aStatus);
+		User::RequestComplete(status, err);
+		return;
+		}	
+
+	CallSifFunction(EInstallByFileHandle, ipcArgs, aStatus);
+	}
+
+EXPORT_C void RSifTransportClient::Install(RFile& aFileHandle, const COpaqueNamedParams& aArguments,
+										COpaqueNamedParams& aResults, TRequestStatus& aStatus, TBool aExclusiveOperation)
+	{
+	// An axiliary synchronous call to pass the aExclusiveOperation flag the server as a fifth parameter
+	TIpcArgs ipcArgs1(aExclusiveOperation);
+	CallSessionFunction(EInstallByFileHandleWithOpaqueDataPreamble, ipcArgs1);
+
+	// Proper asynchronous call
+	TIpcArgs ipcArgs2;
+	TInt transferErr = aFileHandle.TransferToServer(ipcArgs2, 0, 1);
+	TRAPD(err, PrepareOpaqueParamsL(ipcArgs2, aArguments, aResults));
+	if (err || transferErr)
+		{
+		TRequestStatus *status(&aStatus);
+		User::RequestComplete(status, err ? err : transferErr);
+		return;
+		}
+	CallSifFunction(EInstallByFileHandleWithOpaqueData, ipcArgs2, aStatus);
+	}
+
+EXPORT_C void RSifTransportClient::Uninstall(TComponentId aComponentId, TRequestStatus& aStatus, TBool aExclusiveOperation)
+	{
+	TIpcArgs ipcArgs(aComponentId, aExclusiveOperation);
+	CallSifFunction(EUninstall, ipcArgs, aStatus);
+	}
+
+EXPORT_C void RSifTransportClient::Uninstall(TComponentId aComponentId, const COpaqueNamedParams& aArguments,
+											COpaqueNamedParams& aResults, TRequestStatus& aStatus, TBool aExclusiveOperation)
+	{
+	TIpcArgs ipcArgs(aComponentId, aExclusiveOperation);
+	TRAPD(err, PrepareOpaqueParamsL(ipcArgs, aArguments, aResults));
+	if (err)
+		{
+		TRequestStatus *status(&aStatus);
+		User::RequestComplete(status, err);
+		return;
+		}
+	
+	CallSifFunction(EUninstallWithOpaqueData, ipcArgs, aStatus);
+	}
+	
+EXPORT_C void RSifTransportClient::Activate(TComponentId aComponentId, TRequestStatus& aStatus)
+	{
+	TIpcArgs ipcArgs(aComponentId);
+	CallSifFunction(EActivate, ipcArgs, aStatus);
+	}
+	
+	
+EXPORT_C void RSifTransportClient::Deactivate(TComponentId aComponentId, TRequestStatus& aStatus)
+	{
+	TIpcArgs ipcArgs(aComponentId);
+	CallSifFunction(EDeactivate, ipcArgs, aStatus);
+	}
+
+EXPORT_C void RSifTransportClient::CancelOperation()
+	{
+	if (iOngoingFunction > 0)
+		{
+		CancelSessionFunction(iOngoingFunction);
+		iOngoingFunction = 0;
+		}
+	}
+	
+void RSifTransportClient::CallSifFunction(TInt aFunction, const TIpcArgs& aArgs, TRequestStatus& aStatus)
+	{
+	aStatus = KRequestPending;
+	iOngoingFunction = aFunction;
+	CallSessionFunction(aFunction, aArgs, aStatus);
+	}
+
+void RSifTransportClient::PrepareOpaqueParamsL(TIpcArgs& aIpcArgs, const COpaqueNamedParams& aArguments,
+											COpaqueNamedParams& aResults)
+	{
+	aArguments.PrepareArgumentsForIpcL(aIpcArgs, 2);
+	aResults.PrepareResultsForIpcL(aIpcArgs, 3);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/siftransportrequest.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,279 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements an AsyncRequest object for the SIF Transport library
+*
+*/
+
+
+#include <e32base.h>
+#include <e32std.h>
+#include <apgcli.h>
+#include <scs/ipcstream.h>
+#include <scs/nullstream.h>
+#include <scs/cleanuputils.h>
+#include <usif/usiferror.h>
+#include "usiflog.h"
+#include "siftransportserver.h"
+#include "siftransportcommon.h"
+
+using namespace Usif;
+
+void CSifTransportRequest::CreateAndExecuteL(TInt aFunction, CSifTransportSession* aSession, TransportTaskFactory::GenerateTask aTaskFactory, const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF2(_L8("CSifTransportRequest::CreateAndExecuteL for aFunction = %d\n"),aFunction);
+		
+	CSifTransportRequest* self = new (ELeave) CSifTransportRequest(aFunction, aSession, aMessage);
+	CleanupStack::PushL(self);
+	
+	// Validate the file handle adoption.
+	TInt err = self->AdoptFileHandle(aFunction, aMessage);
+	if (err != KErrNone)
+		{
+		DEBUG_PRINTF2(_L8("Failed to adopt a file handle from RMessage2, error = %d\n"),err);
+		aMessage.Panic(KSifTransportServerRequestError, err);
+		User::Leave(err);
+		}
+		
+	self->PrepareParamsL();
+	self->SetupRequestL(aTaskFactory);
+	self->TransferToScsFrameworkL();
+	CleanupStack::Pop(self);
+	self->SetActive();
+	self->LaunchTask();
+	}
+
+// Read file handle from aMessage for all request by file handle.
+TInt CSifTransportRequest::AdoptFileHandle(TInt aFunction, const RMessage2& aMessage)
+	{	
+	if (aFunction & EFileHandleInIpc)
+		{
+		 return (iFile.AdoptFromClient(aMessage, 0, 1));
+		}
+	return KErrNone;
+	}
+
+CSifTransportRequest::CSifTransportRequest(TInt aFunction, CSifTransportSession* aSession, const RMessage2& aMessage)
+	:	CAsyncRequest(aSession, 0, aMessage), iFunction(aFunction), iSecurityContext(aMessage)
+	// iFile and iSecurityContext above cannot be a local variable because we pass it to SIF plug-ins during asynchronous calls.
+	// Hence, their lifetime must be guaranteed.
+	{
+	if (iFunction & EInstall)
+		{
+		iComponentId = EInvalidComponentId;
+		}
+
+	// Read component id from aMessage.
+	if (aFunction & EComponentIdInIpc)
+		{
+		iComponentId = aMessage.Int0();
+		}
+	}
+
+CSifTransportRequest::~CSifTransportRequest()
+	{
+	DEBUG_PRINTF2(_L8("CSifRequest::~CSifRequest() for aFunction = %d\n"),iFunction);
+
+	Cancel();
+	
+	if (iParams.iFileHandle != NULL)
+		{
+		iParams.iFileHandle->Close();
+		}
+
+	delete iParams.iFileName;
+	delete iParams.iComponentInfo;
+	delete iParams.iCustomArguments;
+	delete iParams.iCustomResults;
+	delete iTask;
+	}
+
+void CSifTransportRequest::PrepareParamsL()
+	{
+	DEBUG_PRINTF2(_L8("CSifRequest::PrepareParamsL() for aFunction = %d\n"),iFunction);
+
+	// Make sure that the buffers for opaque containers are not allocated
+	ASSERT(iParams.iComponentInfo == NULL);
+	ASSERT(iParams.iCustomArguments == NULL);
+	ASSERT(iParams.iCustomResults == NULL);
+
+	// Read file name from iMessagePtr2
+	if (iFunction & EFileNameInIpc)
+		{
+		// iFileName below cannot be a local variable because we pass it to installation
+		// requests during asynchronous calls. Hence, the lifetime of it must be guaranteed.
+		HBufC* fileName = HBufC::NewL(KMaxFileName);
+		iParams.iFileName = fileName;
+		TPtr bufFileName(fileName->Des());
+		iMessagePtr2.ReadL(0, bufFileName);
+		}
+
+	// Create component info
+	if (iFunction & EComponentInfoInIpc)
+		{
+		iParams.iComponentInfo = CComponentInfo::NewL();
+		}
+
+	// Create containers for custom params
+	if (iFunction & EOpaqueDataToPlugin)
+		{
+		// We have to also create these containers for asynchronous requests
+		// without opaque params. This is because a request API may not
+		// provide methods without opaque params in order to keep it small.
+		iParams.iCustomArguments = COpaqueNamedParams::NewL();
+		iParams.iCustomResults = COpaqueNamedParams::NewL();
+		}
+
+	// Read custom arguments from iMessagePtr2
+	if ((iFunction & EOpaqueDataInIpc) && (iFunction & EOpaqueDataToPlugin))
+		{
+		RIpcReadStream ipcrstream;
+		ipcrstream.Open(iMessagePtr2, 2);
+		CleanupClosePushL(ipcrstream);
+		ipcrstream >> const_cast<COpaqueNamedParams&>(*iParams.iCustomArguments);
+		CleanupStack::PopAndDestroy(&ipcrstream);
+		}
+	}
+
+void CSifTransportRequest::SetupRequestL(TransportTaskFactory::GenerateTask aTaskFactory)
+	{
+	DEBUG_PRINTF2(_L8("CSifTransportRequest::SetupInstallerRequestL() for aFunction = %d\n"),iFunction);
+
+	iParams.iSecurityContext = &iSecurityContext;
+	iParams.iRequestStatus = &iStatus;
+
+	// Instantiate an appropriate SIF Transport Task using aTaskFactory
+	switch (iFunction)
+		{
+		case EGetComponentInfoByFileName:
+		case EGetComponentInfoByFileHandle:
+			{
+			if (iParams.iFileName == NULL)
+				{
+				iParams.iFileHandle = &iFile;
+				}
+
+			iTask = aTaskFactory(TransportTaskFactory::EGetComponentInfo, iParams);
+			break;
+			}
+
+		case EInstallByFileName:
+		case EInstallByFileHandle:
+		case EInstallByFileNameWithOpaqueData:
+		case EInstallByFileHandleWithOpaqueData:
+			{
+			if (iParams.iFileName == NULL)
+				{
+				iParams.iFileHandle = &iFile;
+				}
+
+			iTask = aTaskFactory(TransportTaskFactory::EInstall, iParams);
+			break;
+			}
+
+		case EUninstall:
+		case EUninstallWithOpaqueData:
+			{
+			iParams.iComponentId = iComponentId;
+			iTask = aTaskFactory(TransportTaskFactory::EUninstall, iParams);
+			break;
+			}
+
+		case EActivate:
+			{
+			iParams.iComponentId = iComponentId;
+
+			iTask = aTaskFactory(TransportTaskFactory::EActivate, iParams);
+			break;
+			}
+
+		case EDeactivate:
+			{
+			iParams.iComponentId = iComponentId;
+			iTask = aTaskFactory(TransportTaskFactory::EDeactivate, iParams);
+			break;
+			}
+
+		default:
+			ASSERT(0);
+		}
+	}
+
+void CSifTransportRequest::DoCancel()
+	{
+	DEBUG_PRINTF2(_L8("CSifTransportRequest::DoCancel() for aFunction = %d\n"),iFunction);
+	
+	ASSERT(iTask != NULL);
+
+	iTask->Cancel();
+	}
+
+void CSifTransportRequest::DoCleanup()
+	{
+	DEBUG_PRINTF2(_L8("CSifTransportRequest::DoCleanup() for aFunction = %d\n"),iFunction);
+	Cancel();
+	}
+
+void CSifTransportRequest::ProcessOpaqueResultsL()
+	{
+	// Write custom results to iMessagePtr2
+	RIpcWriteStream ipcwstream;
+	ipcwstream.Open(iMessagePtr2, 3);
+	CleanupClosePushL(ipcwstream);
+	ipcwstream << *iParams.iCustomResults;
+	CleanupStack::PopAndDestroy(&ipcwstream);
+	}
+
+void CSifTransportRequest::ProcessTaskResultsL()
+	{
+	if (iFunction & EComponentInfoInIpc)
+		{
+		// Write component info to iMessagePtr2
+		RIpcWriteStream ipcwstream;
+		ipcwstream.Open(iMessagePtr2, 2);
+		CleanupClosePushL(ipcwstream);
+		ipcwstream << *iParams.iComponentInfo;
+		CleanupStack::PopAndDestroy(&ipcwstream);
+		}
+
+	if (iFunction & EOpaqueDataInIpc)
+		{
+		TRAPD(err, ProcessOpaqueResultsL());
+		if (err != KErrNone)
+			{
+			DEBUG_PRINTF3(_L8("CSifRequest::RunL() for aFunction = %d - received error %d while processing opaque results. The error is ignored, since the install operation has already completed"),iFunction, err);
+			}
+		}
+	}
+
+void CSifTransportRequest::RunL()
+	{
+	DEBUG_PRINTF2(_L8("CSifTransportRequest::RunL() for aFunction = %d\n"),iFunction);
+	
+	if (iTaskComplete)
+		{
+		ProcessTaskResultsL();
+		CAsyncRequest::RunL();
+		}
+	else
+		{
+		SetActive();
+		iTaskComplete = iTask->Execute();
+		}
+	}
+
+void CSifTransportRequest::LaunchTask()
+	{
+	iTaskComplete = iTask->Execute();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/siftransportserver.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,117 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements the SIF Transport Server.
+*
+*/
+
+
+#include "siftransportserver.h"
+#include "siftransportcommon.h"
+#include <e32property.h>
+
+using namespace Usif;
+
+CSifTransportServer* CSifTransportServer::NewLC(const TDesC& aServerName, const TVersion& aVersion,
+									TransportTaskFactory::GenerateTask aTaskFactory, TInt aShutdownPeriodUs)
+/**
+	Factory function allocates new, initialized instance of
+	CSifServer which is left on the cleanup stack.
+
+	@return					New, initialized instance of CSifServer
+							which is left on the cleanup stack.
+ */
+	{
+	CSifTransportServer* self = new (ELeave) CSifTransportServer(aVersion, aTaskFactory);
+	CleanupStack::PushL(self);
+	self->ConstructL(aServerName, aShutdownPeriodUs);
+	return self;
+	}
+
+CSifTransportServer::CSifTransportServer(const TVersion& aVersion, TransportTaskFactory::GenerateTask aTaskFactory)
+/**
+	Initializes the superclass with this server's version.
+ */
+	:	CScsServer(aVersion), iTaskFactory(aTaskFactory)
+	{
+	}
+
+void CSifTransportServer::ConstructL(const TDesC& aServerName, TInt aShutdownPeriodUs)
+/**
+	Second-phase construction initializes the superclass and
+	starts the server.
+ */
+	{
+	CScsServer::ConstructL(aShutdownPeriodUs);
+
+	StartL(aServerName);
+	}
+
+
+CSifTransportServer::~CSifTransportServer()
+/**
+	Cleanup the server, in particular close the RFs session.
+ */
+	{
+	}
+
+CScsSession* CSifTransportServer::DoNewSessionL(const RMessage2& /*aMessage*/)
+/**
+	Implement CScsServer by allocating a new instance of CSifSession.
+
+	@param	aMessage	Standard server-side handle to message.	 Not used.
+	@return			New instance of CSifSession which is owned by the
+					caller.
+ */
+	{
+	return CSifTransportSession::NewL(*this, iTaskFactory);
+	}
+
+namespace
+	{
+	struct TServerStartupInfo
+		{
+		const TDesC* iServerName;
+		const TVersion* iVersion;
+		TransportTaskFactory::GenerateTask iTaskFactory;
+		TInt iShutdownPeriodUs;
+		};
+	}
+
+EXPORT_C CScsServer* CSifTransportServer::NewSifTransportServerLC()
+/**
+	This factory function is called by SCS.  It allocates
+	the server object and leaves it on the cleanup stack.
+
+	@return	New initialized instance of CScsTestServer.
+			On return this is on the cleanup stack.
+*/ 
+	{
+	TServerStartupInfo* ssi = static_cast<TServerStartupInfo*>(Dll::Tls());
+	return CSifTransportServer::NewLC(*ssi->iServerName, *ssi->iVersion, ssi->iTaskFactory, ssi->iShutdownPeriodUs);
+	}
+
+namespace Usif
+	{
+	EXPORT_C TInt StartTransportServer(const TDesC& aServerName, const TVersion& aVersion, TransportTaskFactory::GenerateTask aTaskFactory,  TInt aShutdownPeriodUs)
+		{
+		// A local object can be used with TLS here because it is read by CSifTransportServer::NewSifTransportServerLC()
+		// before we leave the scope of this function. This is because CSifTransportServer::NewSifTransportServerLC() is a callback
+		// function called by the SCS Server in response to StartScsServer().
+		TServerStartupInfo ssi = {&aServerName, &aVersion, aTaskFactory, aShutdownPeriodUs};
+		Dll::SetTls(&ssi);
+		TInt err = StartScsServer(CSifTransportServer::NewSifTransportServerLC);
+		return err;
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/siftransportsession.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,129 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements the SIF Transport Session
+*
+*/
+
+
+#include "siftransportserver.h"
+#include <scs/ipcstream.h>
+#include <scs/nullstream.h>
+#include <usif/sif/sif.h>
+#include "siftransportcommon.h"
+#include "usiflog.h"
+
+using namespace Usif;
+
+CSifTransportSession* CSifTransportSession::NewL(CSifTransportServer &aServer, TransportTaskFactory::GenerateTask aTaskFactory)
+/**
+	Factory function allocates new instance of CSifTransportSession.
+
+	@return	New, initialized instance of CSifTransportSession
+			which is owned by the caller.
+ */
+	{
+	CSifTransportSession* self = new (ELeave) CSifTransportSession(aServer, aTaskFactory);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CSifTransportSession::CSifTransportSession(CSifTransportServer &aServer, TransportTaskFactory::GenerateTask aTaskFactory)
+/**
+	This private constructor prevents direct instantiation.
+ */
+	: CScsSession(aServer), iTaskFactory(aTaskFactory), iExclusiveOperation(ETrue)
+	{
+	DEBUG_PRINTF3(_L8("0x%x CSifSession(server %x)\n"), this, &aServer);
+	}
+
+CSifTransportSession::~CSifTransportSession()
+/**
+	The base class destructor destroys any remaining subsessions
+	or outstanding requests.
+ */
+	{
+	DEBUG_PRINTF2(_L8("0x%x ~CSifTransportSession)\n"), this);
+	}
+
+TBool CSifTransportSession::DoServiceL(TInt aFunction, const RMessage2& aMessage)
+/**
+	Implement CScsSession by handling the supplied message.
+
+	Note the subsession creation command is automatically sent to
+	DoCreateSubsessionL, and not this function.
+
+	@param	aFunction	Function identifier without SCS code.
+	@param	aMessage	Standard server-side handle to message.
+ */
+	{
+
+	DEBUG_PRINTF3(_L8("0x%x CSifSession::DoServiceL function %d\n"), this, aFunction);
+
+	// Check if aFunction falls into the expected range
+	if (aFunction < EGetComponentInfoByFileName || aFunction > EDeactivate)
+		{
+		aMessage.Panic(KSifTransportServerRequestError, KErrNotSupported);
+		return ETrue;
+		}
+
+	// Check if this is an Install or Uninstall request, if yes read the ExclusiveOperation flag from aMessage
+	if (aFunction == EGetComponentInfoByFileName || aFunction == EGetComponentInfoByFileHandle)
+		{
+		// GetComponentInfo requests are always processed regardless of the state of the SIF server.
+		iExclusiveOperation = EFalse;
+		}
+	else if (aFunction >= EInstallByFileName && aFunction <= EUninstallWithOpaqueData)
+		{
+		// Read the ExclusiveOperation flag from aMessage for a synchronous request
+		if (aFunction == EInstallByFileHandleWithOpaqueDataPreamble)
+			{
+			iExclusiveOperation = aMessage.Int0() != EFalse;
+			return ETrue;
+			}
+
+		// Read the ExclusiveOperation flag from aMessage for asynchronous requests
+		if (aFunction == EInstallByFileName ||
+			aFunction == EInstallByFileNameWithOpaqueData ||
+			aFunction == EUninstall ||
+			aFunction == EUninstallWithOpaqueData)
+			{
+			iExclusiveOperation = aMessage.Int1() != EFalse;
+			}
+		else if (aFunction == EInstallByFileHandle)
+			{
+			iExclusiveOperation = aMessage.Int2() != EFalse;
+			}
+		}
+	else
+		{
+		// We set iExclusiveOperation to ETrue in the constructor. However, we have to
+		// set it here again because the client may send more requests within the same
+		// session.
+		iExclusiveOperation = ETrue;
+		}
+
+	// If the  ExclusiveOperation flag is set to ETrue and there is another pending request we leave with KErrServerBusy
+	if (iExclusiveOperation && iServer.iAsyncRequests.Count() > 0)
+		{
+		User::Leave(KErrServerBusy);
+		}
+
+	// Create new request and execute it
+	CSifTransportRequest::CreateAndExecuteL(aFunction, this, iTaskFactory, aMessage);
+
+	return EFalse;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/siftransporttask.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,113 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* sifinstallerrequest.cpp
+* This file implements the CSifTransportTask class.
+*
+*/
+
+
+#include <usif/sif/siftransporttask.h>
+#include <usif/usiferror.h>
+
+using namespace Usif;
+
+EXPORT_C TTransportTaskParams::TTransportTaskParams()
+	: iComponentInfo(NULL),
+	iComponentId(EInvalidComponentId),
+	iFileName(NULL),
+	iFileHandle(NULL),
+	iCustomArguments(NULL),
+	iCustomResults(NULL),
+	iRequestStatus(NULL)
+	{
+	}
+
+// ===========================================================================================================
+
+EXPORT_C CSifTransportTask::CSifTransportTask(TTransportTaskParams& aParams, TBool aAutoCompletion)
+	: iParams(aParams), iAutoCompletion(aAutoCompletion)
+	{
+	}
+
+EXPORT_C CSifTransportTask::~CSifTransportTask()
+	{
+	}
+
+TBool CSifTransportTask::Execute()
+	{
+	TBool done(EFalse);
+	TRAPD(err, done = ExecuteImplL());
+	if (err != KErrNone)
+		{
+		TRequestStatus* status(iParams.iRequestStatus);
+		User::RequestComplete(status, err);
+		done = ETrue;
+		}
+	else if (iAutoCompletion)
+		{
+		TRequestStatus* status(iParams.iRequestStatus);
+		User::RequestComplete(status, KErrNone);
+		}
+	return done;
+	}
+
+void CSifTransportTask::Cancel()
+	{
+	CancelImpl();
+	}
+
+EXPORT_C void CSifTransportTask::CancelImpl()
+	{
+	}
+
+EXPORT_C TComponentId CSifTransportTask::ComponentId() const
+	{
+	return iParams.iComponentId;
+	}
+
+EXPORT_C const TDesC* CSifTransportTask::FileName() const
+	{
+	return iParams.iFileName;
+	}
+
+EXPORT_C RFile* CSifTransportTask::FileHandle()
+	{
+	return iParams.iFileHandle;
+	}
+
+EXPORT_C const COpaqueNamedParams* CSifTransportTask::CustomArguments() const
+	{
+	return iParams.iCustomArguments;
+	}
+
+EXPORT_C COpaqueNamedParams* CSifTransportTask::CustomResults()
+	{
+	return iParams.iCustomResults;
+	}
+
+EXPORT_C const TSecurityContext* CSifTransportTask::SecurityContext() const
+	{
+	return iParams.iSecurityContext;
+	}
+
+EXPORT_C TRequestStatus* CSifTransportTask::RequestStatus()
+	{
+	return iParams.iRequestStatus;
+	}
+
+EXPORT_C CComponentInfo* CSifTransportTask::ComponentInfo()
+	{
+	return iParams.iComponentInfo;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/source/sifutils.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,62 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements the SifUtils library
+*
+*/
+
+
+#include <usif/scr/scr.h>
+#include <usif/sts/sts.h>
+
+namespace Usif
+	{
+	EXPORT_C void UninstallL(TComponentId aComponentId)
+		{
+		// Connect to the SCR and start a transaction
+		RSoftwareComponentRegistry scr;
+		User::LeaveIfError(scr.Connect());
+		CleanupClosePushL(scr);
+		scr.CreateTransactionL();
+
+		// Connect to the STS and start a transaction
+		RStsSession sts;
+		sts.CreateTransactionL();
+		CleanupClosePushL(sts);
+
+		// Get a list of files to be deleted
+		RSoftwareComponentRegistryFilesList fileList;
+		fileList.OpenListL(scr, aComponentId);
+		CleanupClosePushL(fileList);
+
+		// Unregister and delete the files from iFileList
+		HBufC* file = NULL;
+		while ((file = fileList.NextFileL()) != NULL)
+			{
+			CleanupStack::PushL(file);
+			sts.RemoveL(*file);
+			CleanupStack::PopAndDestroy(file);
+			}
+		CleanupStack::PopAndDestroy(&fileList);
+
+		// Delete the component from the SCR
+		scr.DeleteComponentL(aComponentId);
+
+		// Commit the STS & SCR transactions
+		sts.CommitL();
+		scr.CommitTransactionL();
+
+		CleanupStack::PopAndDestroy(2, &scr);
+		}
+	} // namespace Usif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/group/cleansiflauncher.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,22 @@
+@rem
+@rem Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description: 
+@rem
+
+@echo off
+
+set PLATFORM=%1
+set CFG=%2
+
+del /f /q %EPOCROOT%epoc32\release\%PLATFORM%\%CFG%\siflauncher.exe
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/group/cleansiflauncher.makefile	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,39 @@
+# 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 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".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+# cleansiflauncher.makefile cleans the production version of the SIF Launcher.
+#
+
+do_nothing:
+	rem do nothing
+
+#
+# The targets invoked by abld...
+#
+
+MAKMAKE : do_nothing
+FREEZE : do_nothing
+LIB : do_nothing
+RESOURCE : do_nothing
+CLEANLIB : do_nothing
+FINAL : do_nothing
+SAVESPACE : do_nothing
+CLEAN : do_nothing
+RELEASABLES : do_nothing
+
+BLD : 
+	echo **************************************************
+	echo Removing SIF Launcher files after production build
+	echo **************************************************
+	call cleansiflauncher.bat $(PLATFORM) $(CFG)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/group/tsiflauncher.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,63 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Test version of the SIF Launcher. It registers the reference
+* software type "binary/sif-refpkg" in addition to the production
+* configuration that registers "x-epoc/x-sisx-app" only.
+*
+*/
+
+
+TARGET				siflauncher.exe
+TARGETTYPE			exe
+TARGETPATH			/sys/bin
+
+CAPABILITY			TrustedUI
+
+VENDORID			0x70000001
+
+UID					0x0 0x10285BD0
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+USERINCLUDE			../../inc
+USERINCLUDE			../../common/inc
+
+SOURCEPATH			../../source
+SOURCE				siflauncher.cpp
+
+SOURCEPATH			../siflauncherconfig
+
+START RESOURCE		siflauncher_reg.rss
+TARGETPATH			/private/10003a3f/apps
+END
+
+start resource		siflauncher_loc.rss
+targetpath			/resource/apps
+lang				sc
+end
+
+// Bitmaps
+START BITMAP		siflauncher.mbm
+SOURCEPATH			../../../swiconfig/usif/siflauncher
+TARGETPATH			/resource/apps
+HEADER
+SOURCE				c8,1 INST24.bmp INST24M.BMP INST32.BMP INST32M.BMP INST48.BMP INST48M.BMP
+END
+
+LIBRARY				euser.lib efsrv.lib
+LIBRARY				apgrfx.lib apparc.lib apmime.lib
+LIBRARY				sif.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/plugins/nonnativeplugin/group/testnonnativeplugin.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Project specification file for a SIF non-native reference plugin
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+TARGET				testnonnativeplugin.dll
+TARGETTYPE			PLUGIN
+
+UID 0x10009D8D 0x10285BD1
+
+CAPABILITY			ProtServ TrustedUI ReadUserData
+
+SOURCEPATH			../source
+SOURCE				testnonnativeplugin.cpp
+
+USERINCLUDE			../../../../common/inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+START RESOURCE 10285BD1.rss
+	TARGET testnonnativeplugin.rsc
+END
+
+LIBRARY euser.lib efsrv.lib
+
+LIBRARY sif.lib scrclient.lib stsclient.lib sifutils.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/plugins/nonnativeplugin/group/testnonnativeplugin2.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Project specification file for a SIF non-native reference plugin
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+MACRO TESTNONNATIVEPLUGIN2
+
+TARGET				testnonnativeplugin2.dll
+TARGETTYPE			PLUGIN
+
+UID 0x10009D8D 0x102866EE
+
+VENDORID	0x70000001
+
+CAPABILITY			ProtServ TrustedUI ReadUserData
+
+SOURCEPATH			../source
+SOURCE				testnonnativeplugin.cpp
+
+USERINCLUDE			../../../../common/inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+START RESOURCE 102866EE.rss
+	TARGET testnonnativeplugin2.rsc
+END
+
+LIBRARY euser.lib efsrv.lib
+
+LIBRARY sif.lib scrclient.lib stsclient.lib sifutils.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/plugins/nonnativeplugin/source/10285BD1.rss	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* ECOM DLL UID:			0x10285BD1
+* ECOM interface UID:		0x10285BC2 (KUidSifPlugin)
+* ECOM Implementation:		0x10285BD2
+*
+*/
+
+
+#include <ecom/registryinfo.rh>
+
+RESOURCE REGISTRY_INFO so_registry
+	{
+	dll_uid = 0x10285BD1;
+	interfaces =
+		{
+		INTERFACE_INFO
+			{
+			interface_uid = 0x10285BC2;
+			
+			implementations =
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = 0x10285BD2;
+					version_no = 1;
+					default_data = "";
+					opaque_data = "";
+					}
+				};
+			}
+		};
+	}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/plugins/nonnativeplugin/source/102866EE.rss	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* ECOM DLL UID:			0x102866EE
+* ECOM interface UID:		0x10285BC2 (KUidSifPlugin)
+* ECOM Implementation:		0x102866EF
+*
+*/
+
+
+#include <ecom/registryinfo.rh>
+
+RESOURCE REGISTRY_INFO so_registry
+	{
+	dll_uid = 0x102866EE;
+	interfaces =
+		{
+		INTERFACE_INFO
+			{
+			interface_uid = 0x10285BC2;
+			
+			implementations =
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = 0x102866EF;
+					version_no = 1;
+					default_data = "";
+					opaque_data = "";
+					}
+				};
+			}
+		};
+	}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/plugins/nonnativeplugin/source/testnonnativeplugin.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,420 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "testnonnativeplugin.h"
+#include "usiflog.h"
+#include <usif/sif/sif.h>
+#include <usif/sif/sifcommon.h>
+#include <usif/usiferror.h>
+#include <usif/sif/sifplugin.h>
+#include <usif/scr/screntries.h>
+#include <usif/scr/scr.h>
+#include <usif/sts/sts.h>
+#include <usif/sif/sifutils.h>
+
+using namespace Usif;
+
+namespace
+	{
+	const TInt KUserGrantableCapsBitMask = 49152; // ECapabilityReadUserData, ECapabilityWriteUserData
+	const TInt KMaxInstalledSize = 1234;
+	const TBool KHasExe = EFalse;
+	const TAuthenticity KAuthenticity = EAuthenticated;
+	_LIT_SECURE_ID(KSifTestSuiteSecureId, 0x10285BCC);
+	_LIT_SECURE_ID(KSifRefInstallerServerSecureId, 0x1028634E);
+	_LIT_SECURE_ID(KSifLauncherSecureId, 0x10285BD0);
+	_LIT(KSifTestComponentVersion, "1.0.0");
+	_LIT(KSifTestGlobalComponentId, "test.nonnativepackage.txt");
+#ifndef TESTNONNATIVEPLUGIN2
+	const TInt KTestNonNativePluginImpId = 0x10285BD2;
+	const TComponentId KSifTestComponentId = 12345678;
+	_LIT(KSifTestSoftwareType, "plain");
+	_LIT(KSifTestComponentName, "Test Component");
+	_LIT(KSifTestComponentVendor, "Symbian");
+	_LIT(KSifTestInstallPath, "c:\\tusif\\tsif\\nonnativeplugin\\%S\\file%d");
+	_LIT(KSifTestOutIntParam, "NonNativePlugin");
+#else
+	const TInt KTestNonNativePluginImpId = 0x102866EF;
+	const TComponentId KSifTestComponentId = 87654321;
+	_LIT(KSifTestSoftwareType, "testSoftwareType");
+	_LIT(KSifTestComponentName, "Test Layered Execution Environment");
+	_LIT(KSifTestComponentVendor, "Test Vendor");
+	_LIT(KSifTestInstallPath, "c:\\tusif\\tsif\\nonnativeplugin2\\%S\\file%d");
+	_LIT(KSifTestOutIntParam, "NonNativePlugin2");
+#endif
+
+	const TImplementationProxy ImplementationTable[] = 
+		{
+		IMPLEMENTATION_PROXY_ENTRY(KTestNonNativePluginImpId, CTestNonNativePlugin::NewL)
+		};
+
+	void UnpackCapabilitySet(TInt aPackedCapSet, TCapabilitySet& aCapSet)
+		{
+		for (TInt c=0; c<ECapability_Limit; ++c)
+			{
+			const TInt cap = 1<<c;
+			if (aPackedCapSet&cap)
+				{
+				aCapSet.AddCapability(TCapability(c));
+				}
+			}
+		}
+
+	TComponentId AddComponentToScrL(RSoftwareComponentRegistry& aScr, const TDesC& aComponentName, const TDesC& aVendor)
+		{
+		// Check if the component is already installed
+		RSoftwareComponentRegistryView scrView;
+		CComponentFilter* filter = CComponentFilter::NewLC();
+		filter->SetNameL(aComponentName);
+		filter->SetVendorL(aVendor);
+
+		scrView.OpenViewL(aScr, filter);
+		CleanupClosePushL(scrView);
+
+		CComponentEntry* component = scrView.NextComponentL();
+		CleanupStack::PopAndDestroy(2, filter);
+		if (component != NULL)
+			{
+			delete component;
+			DEBUG_PRINTF2(_L("Non-native component: %S already installed"), &aComponentName);
+			User::Leave(KErrSifSameVersionAlreadyInstalled);
+			}
+
+		TComponentId componentId = aScr.AddComponentL(aComponentName, aVendor, KSifTestSoftwareType);
+		DEBUG_PRINTF2(_L("Added a non-native component with id %d"), componentId);
+
+		return componentId;
+		}
+
+	void CreateAndRegisterFilesL(RSoftwareComponentRegistry& aScr, TComponentId aComponentId, const TDesC& aComponentName)
+		{
+		RStsSession sts;
+		sts.CreateTransactionL();
+		CleanupClosePushL(sts);
+
+		const TInt numComponentFiles = 3;
+		const TInt maxIntDigits = 10;
+		
+		TInt componentSize = 0;
+		
+		for (TInt i=0; i<numComponentFiles; ++i)
+			{
+			// Generate the full path of the i-th file
+			const TInt maxPathLen = KSifTestInstallPath.iTypeLength+aComponentName.Length()+maxIntDigits;
+			HBufC* filePath = HBufC::NewLC(maxPathLen);
+			TPtr filePathPtr = filePath->Des();
+			filePathPtr.Format(KSifTestInstallPath, &aComponentName, i);
+
+			// Create the file
+			RFile file;
+			sts.CreateNewL(*filePath, file, TFileMode(EFileShareExclusive |EFileWrite));
+			_LIT8(KNonNativeFootprint, "This file belongs to the Non-Native Test component.");
+			User::LeaveIfError(file.Write(KNonNativeFootprint));
+			componentSize += KNonNativeFootprint.iTypeLength;
+			file.Close();
+
+			// Register the file in the SCR
+			aScr.RegisterComponentFileL(aComponentId, *filePath);
+
+			CleanupStack::PopAndDestroy(filePath);
+			}
+
+		aScr.SetComponentSizeL(aComponentId, componentSize);
+
+		sts.CommitL();
+		CleanupStack::PopAndDestroy(&sts);
+		}
+
+	// The literals below are hardcoded because they are used only here so there
+	// is no risk of duplication or a typo. Of course, they are also used in the
+	// sif.ini file but we cannot reuse them there in any case.
+
+	void ProcessOpaqueParamsL(const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams)
+		{
+		aOutputParams.AddIntL(KSifTestOutIntParam, ETrue);
+		TInt silent = ETrue;
+		TBool silentFound = aInputParams.GetIntByNameL(_L("DoSilent"), silent);
+		if (silentFound)
+			{
+			aOutputParams.AddIntL(_L("DoneSilently"), silent);
+			}
+		}
+
+	void InstallL(const TDesC& aComponentName, COpaqueNamedParams& aOutputParams)
+		{
+		RSoftwareComponentRegistry scr;
+		User::LeaveIfError(scr.Connect());
+		CleanupClosePushL(scr);
+		scr.CreateTransactionL();
+
+		TComponentId componentId = AddComponentToScrL(scr, aComponentName, KSifTestComponentVendor);
+		aOutputParams.AddIntL(KSifOutParam_ComponentId, componentId);
+
+		CreateAndRegisterFilesL(scr, componentId, aComponentName);
+
+		scr.CommitTransactionL();
+		CleanupStack::PopAndDestroy(&scr);
+		}
+
+	void InstallImplL(const TDesC& aFileName, const TSecurityContext& /*aSecurityContext*/,
+					const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams)
+		{
+		// The "DummyInstallation" param instructs the installer not to execute any real operation. This dummy installation
+		// is needed in order to test the ExcludeOperation mode supported by the SIF APIs. Running multiple concurrent
+		// SIF operations may lead to concurrent SCR transactions which are not supported. Hence, this dummy installation
+		// is used as a 'safe' installation that may be launched concurrently with a regular native installation.
+		TInt dummyInstallation = EFalse;
+		if (aInputParams.GetIntByNameL(_L("DummyInstallation"), dummyInstallation) && dummyInstallation)
+			{
+			return;
+			}
+
+		ProcessOpaqueParamsL(aInputParams, aOutputParams);
+
+		TPtrC name;
+		const TInt pos = aFileName.LocateReverse('\\');
+		if (pos != KErrNotFound)
+			{
+			name.Set(aFileName.Mid(pos+1));
+			}
+		else
+			{
+			name.Set(aFileName);
+			}
+		
+		InstallL(name, aOutputParams);
+		}
+
+	void InstallImplL(RFile& aFileHandle, const TSecurityContext& /*aSecurityContext*/,
+					const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams)
+		{
+		ProcessOpaqueParamsL(aInputParams, aOutputParams);
+		HBufC* name = HBufC::NewLC(KMaxFullName);
+		TPtr namePtr = name->Des();
+		User::LeaveIfError(aFileHandle.Name(namePtr));
+		InstallL(*name, aOutputParams);
+		CleanupStack::PopAndDestroy(name);
+		}
+
+	void UninstallImplL(TComponentId aComponentId, const TSecurityContext& /*aSecurityContext*/,
+						const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams)
+		{
+		ProcessOpaqueParamsL(aInputParams, aOutputParams);
+
+		// Uninstall the component using the SIF Utils Library
+		UninstallL(aComponentId);
+		}
+
+	void CheckSecurityContextL(const TSecurityContext& aSecurityContext)
+		{
+		// There are three executables that may issue software management request for TestNonNative packages.
+		// These are:
+		// (1) TEF test server (KSifTestSuiteSecureId) - all USIF tests
+		// (2) the Reference Installer (KSifRefInstallerServerSecureId) - cross installer tests (for embedded packages)
+		// (3) the SIF Launcher - for testing integration with AppArc
+		// For the first two we also check ReadUserData to ensure coverage in integration tests
+		if (aSecurityContext.SecureId() == KSifLauncherSecureId)
+			return;
+		aSecurityContext.HasCapabilityL(ECapabilityReadUserData);
+		if (aSecurityContext.SecureId() != KSifTestSuiteSecureId &&
+			aSecurityContext.SecureId() != KSifRefInstallerServerSecureId )
+			{
+			User::Leave(KErrPermissionDenied);
+			}
+		}
+
+	TBool CheckSecurityContext(const TSecurityContext& aSecurityContext)
+		{
+		if (aSecurityContext.SecureId() == KSifLauncherSecureId)
+			return ETrue;
+		return aSecurityContext.HasCapability(ECapabilityReadUserData) &&
+			   (aSecurityContext.SecureId() == KSifTestSuiteSecureId ||
+			    aSecurityContext.SecureId() == KSifRefInstallerServerSecureId);
+		}
+
+	void GetComponentInfoImplL(CComponentInfo& aComponentInfo, TBool aTestOverflow = EFalse)
+		{
+		// Prepare capabilities
+		TCapabilitySet capSet;
+		capSet.SetEmpty();
+		UnpackCapabilitySet(KUserGrantableCapsBitMask, capSet);
+		
+		// Create the root node of the CComponentInfo object
+		CComponentInfo::CNode* rootNode = CComponentInfo::CNode::NewLC(KSifTestSoftwareType, KSifTestComponentName,
+						KSifTestComponentVersion, KSifTestComponentVendor, EDeactivated, ENewComponent,
+						KSifTestComponentId, KSifTestGlobalComponentId, KAuthenticity, capSet, KMaxInstalledSize, KHasExe);
+
+		// Create a long string used for overflow tests
+		HBufC* longStr = NULL;
+
+		if (aTestOverflow)
+			{
+			// The CComponentInfo class defines KMaxComponentInfoStreamedSize as:
+			// KMaxComponentInfoStreamedSize = 2*KMaxHeapBufLength+6*sizeof(TInt)+sizeof(TInt8), where KMaxHeapBufLength = 2048
+			// So, we need a tree of CNode objects in order to cause a KErrOverflow error
+			const TInt longStrLen = 256;
+			longStr = HBufC::NewLC(longStrLen);
+			TPtr longStrPtr(longStr->Des());
+			longStrPtr.Fill(TChar(0xadcb), longStrLen);
+
+			const TInt numChildren = 3;
+			for (TInt i=0; i<numChildren; ++i)
+				{
+				CComponentInfo::CNode* childNode = CComponentInfo::CNode::NewLC(KSifTestSoftwareType, *longStr,
+						KSifTestComponentVersion, *longStr, EDeactivated, ENewComponent,
+						KSifTestComponentId, *longStr, KAuthenticity, capSet, KMaxInstalledSize, KHasExe);
+				
+				rootNode->AddChildL(childNode);
+				CleanupStack::Pop(childNode);
+				}
+			
+			CleanupStack::PopAndDestroy(longStr);
+			}
+
+		aComponentInfo.SetRootNodeL(rootNode);
+		CleanupStack::Pop(rootNode);
+
+		}
+	}
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+	{
+	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+	return ImplementationTable;
+	}
+
+CTestNonNativePlugin* CTestNonNativePlugin::NewL()
+	{
+	DEBUG_PRINTF(_L8("Constructing CTestNonNativePlugin"));
+	CTestNonNativePlugin *self = new (ELeave) CTestNonNativePlugin();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CTestNonNativePlugin::ConstructL()
+	{
+	}
+
+CTestNonNativePlugin::~CTestNonNativePlugin()
+	{
+	}
+
+void CTestNonNativePlugin::CancelOperation()
+	{
+	DEBUG_PRINTF(_L8("Test non-native plugin - Cancel"));
+	}
+
+void CTestNonNativePlugin::GetComponentInfo(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+										CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Test non-native plugin - GetComponentInfo by filename"));
+	aStatus = KRequestPending;
+
+	TInt err = KErrNone;
+	// We test a non-leaving version of TSecurityContext::HasCapability() here
+	if (CheckSecurityContext(aSecurityContext))
+		{
+		_LIT(KTxtTestOverflow, "z:\\tusif\\tsif\\data\\test.overflow.txt");
+		TRAP(err, GetComponentInfoImplL(aComponentInfo, aFileName == KTxtTestOverflow));
+		}
+	else
+		{
+		err = KErrPermissionDenied;
+		}
+
+	TRequestStatus *statusPtr(&aStatus);
+	User::RequestComplete(statusPtr, err);
+	}
+
+void CTestNonNativePlugin::GetComponentInfo(RFile& /*aFileHandle*/, const TSecurityContext& aSecurityContext,
+											CComponentInfo& aComponentInfo, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Test non-native plugin - GetComponentInfo by file handle"));
+	aStatus = KRequestPending;
+
+	TRAPD(err, CheckSecurityContextL(aSecurityContext);
+			   GetComponentInfoImplL(aComponentInfo));
+
+	TRequestStatus *statusPtr(&aStatus);
+	User::RequestComplete(statusPtr, err);
+	}
+
+void CTestNonNativePlugin::Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+									const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+									TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF2(_L("Test non-native plugin - install for %S"), &aFileName);
+	aStatus = KRequestPending;
+
+	TRAPD(err, CheckSecurityContextL(aSecurityContext);
+				InstallImplL(aFileName, aSecurityContext, aInputParams, aOutputParams));
+
+	TRequestStatus *statusPtr(&aStatus);
+	User::RequestComplete(statusPtr, err);
+	}
+
+void CTestNonNativePlugin::Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+									const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+									TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L("Test non-native plugin - install by file handle"));
+	aStatus = KRequestPending;
+	
+	TRAPD(err, CheckSecurityContextL(aSecurityContext);
+			   InstallImplL(aFileHandle, aSecurityContext, aInputParams, aOutputParams));
+
+	TRequestStatus *statusPtr(&aStatus);
+	User::RequestComplete(statusPtr, err);
+	}
+
+void CTestNonNativePlugin::Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF2(_L8("Test non-native plugin - uninstall for ComponentId =  %d"), aComponentId);
+	aStatus = KRequestPending;
+
+	TRAPD(err, CheckSecurityContextL(aSecurityContext);
+	 		   UninstallImplL(aComponentId, aSecurityContext, aInputParams, aOutputParams));
+
+	TRequestStatus* statusPtr(&aStatus);
+	User::RequestComplete(statusPtr, err);
+	}
+
+void CTestNonNativePlugin::Activate(TComponentId /*aComponentId*/, const TSecurityContext& aSecurityContext, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Test non-native plugin - activate"));
+	aStatus = KRequestPending;
+
+	TRAPD(err, CheckSecurityContextL(aSecurityContext));
+
+	TRequestStatus* statusPtr(&aStatus);
+	User::RequestComplete(statusPtr, err);
+	}
+
+void CTestNonNativePlugin::Deactivate(TComponentId /*aComponentId*/, const TSecurityContext& aSecurityContext, TRequestStatus& aStatus)
+	{
+	DEBUG_PRINTF(_L8("Test non-native plugin - deactivate"));
+	aStatus = KRequestPending;
+
+	TRAPD(err, CheckSecurityContextL(aSecurityContext));
+
+	TRequestStatus* statusPtr(&aStatus);
+	User::RequestComplete(statusPtr, err);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/plugins/nonnativeplugin/source/testnonnativeplugin.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,76 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This class implements a non-native test SIF plug-in
+*
+*/
+
+
+/**
+ @file
+ //@internalComponent
+*/
+
+#ifndef TESTNONNATIVEPLUGIN_H
+#define TESTNONNATIVEPLUGIN_H
+
+#include <usif/sif/sifplugin.h>
+#include <usif/scr/screntries.h>
+#include <e32base.h>
+#include <e32std.h>
+
+namespace Usif
+	{
+
+	NONSHARABLE_CLASS(CTestNonNativePlugin) : public CSifPlugin
+		{
+	public:
+		static CTestNonNativePlugin* NewL();
+		~CTestNonNativePlugin();
+	
+		// MSIFPlugin interface
+		void GetComponentInfo(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+							CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+
+		void GetComponentInfo(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+							CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
+		
+		void Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
+					const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+					TRequestStatus& aStatus);
+
+		void Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
+					const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+					TRequestStatus& aStatus);
+
+		virtual void Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
+								TRequestStatus& aStatus);
+
+		virtual void Activate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								TRequestStatus& aStatus);
+
+		virtual void Deactivate(TComponentId aComponentId, const TSecurityContext& aSecurityContext,
+								TRequestStatus& aStatus);
+
+		void CancelOperation();
+	private:
+		CTestNonNativePlugin() {}
+		void ConstructL();
+		CTestNonNativePlugin(const CTestNonNativePlugin &);
+		CTestNonNativePlugin & operator =(const CTestNonNativePlugin &);
+		};
+	} // end namespace Usif
+
+#endif // TESTNONNATIVEPLUGIN_H
Binary file installationservices/swinstallationfw/test/scripts/data/noninstallable.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/scripts/data/test.nonnativepackage.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is a temporary non-native test package file.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/scripts/data/test.overflow.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is a temporary non-native test package file.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/scripts/tsif.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,351 @@
+
+[GetComponentInfoByFileNameOOM]
+OOMServerTest=True
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=False
+root.softwareTypeName=plain
+root.componentName=Test Component
+root.componentVersion=1.0.0
+root.componentVendor=Symbian
+root.scomoState=0
+root.installStatus=0
+root.componentId=12345678
+root.globalComponentId=test.nonnativepackage.txt
+root.authenticity=1
+root.userGrantableCapsBitMask=49152 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=1234
+root.hasExecutable=False
+
+[InstallClientOOM]
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=False
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=2
+OOMTest=True
+
+[GetComponentInfoByFileHandleOOM]
+OOMServerTest=True
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=True
+root.softwareTypeName=plain
+root.componentName=Test Component
+root.componentVersion=1.0.0
+root.componentVendor=Symbian
+root.scomoState=0
+root.installStatus=0
+root.componentId=12345678
+root.globalComponentId=test.nonnativepackage.txt
+root.authenticity=1
+root.userGrantableCapsBitMask=49152 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=1234
+root.hasExecutable=False
+
+[InstallByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallByFileNameWithOpaqueParams]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=False
+useEnhancedApi=True
+pluginOpaqueArgumentName0=SwiDeclineOperation
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=0
+pluginOpaqueArgumentName1=installInactive
+pluginOpaqueArgumentType1=Int
+pluginOpaqueArgumentValue1=0
+pluginRefOpaqueResultName0=ExtendedErrCode
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=0
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=1
+
+[InstallByFileHandleWithOpaqueParams]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=True
+useEnhancedApi=True
+pluginOpaqueArgumentName0=SwiDeclineOperation
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=0
+pluginRefOpaqueResultName0=ExtendedErrCode
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=0
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=2
+
+[UninstallByNameAndVendor]
+componentName=Sif Integration Test
+componentVendor=Security Team
+useEnhancedApi=False
+
+[SynchronousCancelInstallByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=False
+useEnhancedApi=True
+pluginOpaqueArgumentName0=SwiDeclineOperation
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=ExtendedErrCode
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=-3
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=3
+
+[SynchronousCancelInstallByFileHandle]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=True
+useEnhancedApi=True
+pluginOpaqueArgumentName0=SwiDeclineOperation
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=ExtendedErrCode
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=-3
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=4
+
+// Currently, SWI does not support activation/deactivation. Expected result should change from -5 once it does
+[ActivateByNameAndVendor]
+componentName=Sif Integration Test
+componentVendor=Security Team
+
+[DeactivateByNameAndVendor]
+componentName=Sif Integration Test
+componentVendor=Security Team
+
+[ActivateByInvalidId]
+componentId=12345678
+
+[DeactivateByInvalidId]
+componentId=12345678
+
+[NonNativeInstallByFileName]
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=False
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=1
+
+[NonNativeInstallByFileNameOOM]
+OOMServerTest=True
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=False
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=1
+
+[NonNativeInstallByFileHandle]
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=True
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=2
+
+[NonNativeInstallByFileHandleOOM]
+OOMServerTest=True
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=True
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=3
+
+[NonNativeInstallAlreadyInstalled]
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=False
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=2
+
+[InvalidNonNativeUninstallByNameAndVendor]
+componentName=test.nonnativepackage.txt
+componentVendor=Symbian
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+
+[NonNativeUninstallByNameAndVendor]
+componentName=test.nonnativepackage.txt
+componentVendor=Symbian
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+
+[NonNativeUninstallByNameAndVendorOOM]
+OOMServerTest=True
+componentName=test.nonnativepackage.txt
+componentVendor=Symbian
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+
+[UninstallClientOOM]
+OOMTest=True
+componentName=test.nonnativepackage.txt
+componentVendor=Symbian
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+
+[NonNativeSilentInstall]
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=False
+useEnhancedApi=True
+pluginOpaqueArgumentName0=DoSilent
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+pluginRefOpaqueResultName1=DoneSilently
+pluginRefOpaqueResultType1=Int
+pluginRefOpaqueResultValue1=1
+pluginRefOpaqueResultName2=ComponentId
+pluginRefOpaqueResultType2=Int
+pluginRefOpaqueResultValue2=3
+
+[VerifyNonNativePackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=test.nonnativepackage.txt
+componentVendor=Symbian
+packageFile0=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file0
+packageFile1=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file1
+packageFile2=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file2
+scomoState=0
+
+[VerifyNonNativePackageNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=test.nonnativepackage.txt
+componentVendor=Symbian
+packageFile0=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file0
+packageFile1=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file1
+packageFile2=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file2
+
+[VerifyPackageExistence]
+verifyExistence=True
+componentName=Sif Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+executableReturnCode=1397310977
+scomoState=1
+
+[VerifyPackageNonExistence]
+verifyExistence=False
+componentName=Sif Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+
+[VerifyInactivePackageExistence]
+verifyExistence=True
+componentName=Sif Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+executableReturnCode=1397310977
+scomoState=0
+
+[UninstallByInvalidId]
+componentId=12345678
+useEnhancedApi=False
+
+[UninstallByInvalidId2]
+componentId=-1
+useEnhancedApi=False
+
+[UninstallNonRemovable]
+componentName=c32exe
+componentVendor=symbian
+useEnhancedApi=False
+
+[InstallNonInstallableByFileName]
+packageFile=z:\tusif\tsif\data\noninstallable.gif
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallNonInstallableByFileHandle]
+packageFile=z:\tusif\tsif\data\noninstallable.gif
+operationByFileHandle=True
+useEnhancedApi=False
+
+[InvalidInstallByFileName]
+packageFile=z:\tusif\tsif\data\sifselfsignedwithprotecteduid.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InvalidInstallByFileHandle]
+packageFile=z:\tusif\tsif\data\sifselfsignedwithprotecteduid.sis
+operationByFileHandle=True
+useEnhancedApi=False
+
+[MultipleInstallWithOverlappingSession]
+expectedConcurrentResult=0
+overlapRequest=False
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[MultipleInstallWithOverlappingRequest]
+expectedConcurrentResult=-16
+overlapRequest=True
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[MultipleNonExclusiveInstall]
+expectedConcurrentResult=0
+overlapRequest=True
+exclusiveOperation=False
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+packageFile2=z:\tusif\tsif\data\test.nonnativepackage.txt
+useEnhancedApi=True
+pluginOpaqueArgumentName0=DummyInstallation
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+
+[SifCommonOOM]
+OOMTest=True
+
+[NonNativeInstallByFileNameDoNotMatchComponentId]
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=False
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=String
+pluginRefOpaqueResultValue1=__ANY_VALUE_PERMITTED__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/scripts/tsif.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,224 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+PRINT Run all tsif Suite Tests
+
+// Delete the SCR Database file
+LOAD_SUITE tscr
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+
+LOAD_SUITE tUsifSuite
+
+/// ************************ SIF Component test cases ************************
+
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-0001
+//! @SYMTestCaseDesc 		Test plugin resolution by MIME type
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-0001
+
+// by file name
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyNonNativePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyNonNativePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini NonNativeUninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyNonNativePackageNonExistence
+RUN_TEST_STEP !Result=-1 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini InvalidNonNativeUninstallByNameAndVendor
+// by file handle
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini NonNativeInstallByFileHandle
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini NonNativeUninstallByNameAndVendor
+
+END_TESTCASE API-SEC-SIF-tsif-0001
+
+
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-0002
+//! @SYMTestCaseDesc 		Test plugin "selection" by passing opaque options
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-0002
+
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini NonNativeSilentInstall
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini NonNativeUninstallByNameAndVendor
+
+END_TESTCASE API-SEC-SIF-tsif-0002
+
+
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-0003
+//! @SYMTestCaseDesc 		Plugin resolution - negative test
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-0003
+
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini InstallNonInstallableByFileName
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini InstallNonInstallableByFileHandle
+
+END_TESTCASE API-SEC-SIF-tsif-0003
+
+// Ensure clean database before the next test, as it relies on component ids starting from 1
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-0004
+//! @SYMTestCaseDesc 		Install/uninstall - negative test
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-0004
+
+// install already installed
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini NonNativeInstallByFileName
+RUN_TEST_STEP !Result=-10309 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini NonNativeInstallAlreadyInstalled
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini NonNativeUninstallByNameAndVendor
+// invalid install
+RUN_TEST_STEP !Result=-46 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini InvalidInstallByFileName
+RUN_TEST_STEP !Result=-46 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini InvalidInstallByFileHandle
+// invalid uninstall
+RUN_TEST_STEP !Result=-10313 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallByInvalidId
+RUN_TEST_STEP !Result=-10313 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallByInvalidId2
+// Temporarily removed - requires adding a non-removable component
+///RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallNonRemovable
+
+END_TESTCASE API-SEC-SIF-tsif-0004
+
+
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-0005
+//! @SYMTestCaseDesc 		Activate/deactivate test
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-0005
+
+// deactivate
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini InstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifDeactivateStep z:\tusif\tsif\tsif.ini DeactivateByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyInactivePackageExistence
+// activate
+RUN_TEST_STEP 100 tUsifSuite SifActivateStep z:\tusif\tsif\tsif.ini ActivateByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageNonExistence
+
+END_TESTCASE API-SEC-SIF-tsif-0005
+
+
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-0006
+//! @SYMTestCaseDesc 		Activate/deactivate - negative test
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-0006
+
+RUN_TEST_STEP !Result=-10313 100 tUsifSuite SifActivateStep z:\tusif\tsif\tsif.ini ActivateByInvalidId
+RUN_TEST_STEP !Result=-10313 100 tUsifSuite SifDeactivateStep z:\tusif\tsif\tsif.ini DeactivateByInvalidId
+
+END_TESTCASE API-SEC-SIF-tsif-0006
+
+
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-0007
+//! @SYMTestCaseDesc 		Test opaque params by file name/handle
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-0007
+
+// Ensure clean database before the next test, as it relies on component ids starting from 1
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+// by file name
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini InstallByFileNameWithOpaqueParams
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageNonExistence
+// by file handle
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini InstallByFileHandleWithOpaqueParams
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageNonExistence
+
+END_TESTCASE API-SEC-SIF-tsif-0007
+
+
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-0008
+//! @SYMTestCaseDesc 		Synchronous cancellation by file name/handle
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-0008
+
+// Synchronous cancellation by file name
+RUN_TEST_STEP !Result=-3 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini SynchronousCancelInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageNonExistence
+// Synchronous cancellation by file handle
+RUN_TEST_STEP !Result=-3 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini SynchronousCancelInstallByFileHandle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageNonExistence
+
+END_TESTCASE API-SEC-SIF-tsif-0008
+
+
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-0009
+//! @SYMTestCaseDesc 		Concurrent operations
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-0009
+
+// with overlapping session
+RUN_TEST_STEP 100 tUsifSuite SifMultipleInstallStep z:\tusif\tsif\tsif.ini MultipleInstallWithOverlappingSession
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallByNameAndVendor
+// with overlapping request
+RUN_TEST_STEP 100 tUsifSuite SifMultipleInstallStep z:\tusif\tsif\tsif.ini MultipleInstallWithOverlappingRequest
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageNonExistence
+// with disabled ExclusiveOperation flag
+RUN_TEST_STEP 100 tUsifSuite SifMultipleInstallStep z:\tusif\tsif\tsif.ini MultipleNonExclusiveInstall
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsif\tsif.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallByNameAndVendor
+
+END_TESTCASE API-SEC-SIF-tsif-0009
+
+
+// ************************ SIF Unit test cases ************************
+//! @SYMTestCaseID 		API-SEC-SIF-tsifunit-0001
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsifunit-0001
+
+RUN_TEST_STEP 100 tUsifSuite SifCommonUnitTestStep
+
+END_TESTCASE API-SEC-SIF-tsifunit-0001
+
+
+/// ************************ SIF Concurrency  Test  ************************
+//! @SYMTestCaseID 		API-SEC-SIF-tsifconcurrent-0001
+//! @SYMTestStatus   		3. Released
+
+CONCURRENT
+
+START_TESTCASE API-SEC-SIF-tsifconcurrent-0001
+
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini InstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifrefinstaller\tsifrefinstaller.ini GetComponentInfoByFileNameForUninstalledComponent
+// Since we cannot guarantee the order of installs, we cannot check reliably for componentId in the returned opaque results
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini NonNativeInstallByFileNameDoNotMatchComponentId
+
+END_TESTCASE API-SEC-SIF-tsifconcurrent-0001
+
+CONSECUTIVE
+
+// Cleanup after SEC-SIF-tsifconcurrent-001
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini NonNativeUninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallByNameAndVendor
+
+// Wait 3 seconds in order to let the SIF server shutdown itself
+DELAY 3000
+
+PRINT Completed SIF component tests
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/scripts/tsifoom.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,71 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+PRINT Run tsif OOM Suite Tests
+
+// Delete the SCR Database file
+LOAD_SUITE tscr
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+
+LOAD_SUITE tUsifSuite
+
+// ************************ SIF Component OOM test cases ************************
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-oom-0001
+//! @SYMTestCaseDesc 		Test OOM on server side
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-oom-0001
+
+// by file name - simulate OOM at server side
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini NonNativeInstallByFileNameOOM
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini NonNativeUninstallByNameAndVendorOOM
+// by file name - simulate OOM at client side
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini InstallClientOOM
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini UninstallClientOOM
+// by file handle
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsif\tsif.ini NonNativeInstallByFileHandleOOM
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsif\tsif.ini NonNativeUninstallByNameAndVendorOOM
+
+END_TESTCASE API-SEC-SIF-tsif-oom-0001
+
+
+//! @SYMTestCaseID 		API-SEC-SIF-tsif-oom-0002
+//! @SYMTestCaseDesc 		Test OOM on getting component information
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsif-oom-0002
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsif\tsif.ini GetComponentInfoByFileNameOOM
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsif\tsif.ini GetComponentInfoByFileHandleOOM
+
+END_TESTCASE API-SEC-SIF-tsif-oom-0002
+
+
+// ************************ SIF Unit test cases ************************
+//! @SYMTestCaseID 		API-SEC-SIF-tsifunit-OOM-0001
+//! @SYMTestStatus   		3. Released
+
+START_TESTCASE API-SEC-SIF-tsifunit-OOM-0001
+
+RUN_TEST_STEP 100 tUsifSuite SifCommonUnitTestStep z:\tusif\tsif\tsif.ini SifCommonOOM 
+
+END_TESTCASE API-SEC-SIF-tsifunit-OOM-0001
+
+
+// Wait 3 seconds in order to let the SIF server shutdown itself
+DELAY 3
+
+PRINT Complate_te_Sif_Tests
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/bwins/usifsecuritytests-tcbu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	?CapabilityTestFactory@@YAPAVMCapabilityTestFactory@@XZ @ 1 NONAME ; class MCapabilityTestFactory * CapabilityTestFactory(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/bwins/usifsecuritytestsu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	?CapabilityTestFactory@@YAPAVMCapabilityTestFactory@@XZ @ 1 NONAME ; class MCapabilityTestFactory * CapabilityTestFactory(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/eabi/usifsecuritytests-tcbu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,5 @@
+EXPORTS
+	_Z21CapabilityTestFactoryv @ 1 NONAME
+	_ZTI23CSifSecurityContextTest @ 2 NONAME
+	_ZTV23CSifSecurityContextTest @ 3 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/eabi/usifsecuritytestsu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,27 @@
+EXPORTS
+	_Z21CapabilityTestFactoryv @ 1 NONAME
+	_ZTI21CStsPublicPathSecTest @ 2 NONAME
+	_ZTI23CScrReadUserDataSecTest @ 3 NONAME
+	_ZTI24CScrNonRestrictedSecTest @ 4 NONAME
+	_ZTI26CScrWriteDeviceDataSecTest @ 5 NONAME
+	_ZTI28CScrComponentSpecificSecTest @ 6 NONAME
+	_ZTI28CScrTCBPathProtectionSecTest @ 7 NONAME
+	_ZTI28CStsTCBPathProtectionSecTest @ 8 NONAME
+	_ZTI32CScrPrivatePathProtectionSecTest @ 9 NONAME
+	_ZTI32CStsPrivatePathProtectionSecTest @ 10 NONAME
+	_ZTV21CStsPublicPathSecTest @ 11 NONAME
+	_ZTV23CScrReadUserDataSecTest @ 12 NONAME
+	_ZTV24CScrNonRestrictedSecTest @ 13 NONAME
+	_ZTV26CScrWriteDeviceDataSecTest @ 14 NONAME
+	_ZTV28CScrComponentSpecificSecTest @ 15 NONAME
+	_ZTV28CScrTCBPathProtectionSecTest @ 16 NONAME
+	_ZTV28CStsTCBPathProtectionSecTest @ 17 NONAME
+	_ZTV32CScrPrivatePathProtectionSecTest @ 18 NONAME
+	_ZTV32CStsPrivatePathProtectionSecTest @ 19 NONAME
+	_ZTI22CStsRollbackAllSecTest @ 20 NONAME
+	_ZTV22CStsRollbackAllSecTest @ 21 NONAME
+	_ZTI19CScrAllFilesSecTest @ 22 NONAME
+	_ZTV19CScrAllFilesSecTest @ 23 NONAME
+	_ZTI27CScrPluginManagementSecTest @ 24 NONAME
+	_ZTV27CScrPluginManagementSecTest @ 25 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/group/usifsecuritytests-tcb.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,42 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* usifsecuritytests-tcb.dll Test harness for USIF security testing without the TCB capability
+*
+*/
+
+
+/**
+ @file
+*/
+
+//         Capabilities are set by captestframework
+CAPABILITY All -Tcb
+
+TARGET			usifsecuritytests-tcb.dll
+TARGETTYPE		dll
+UID				0x101F7295 0x10285DE8
+VENDORID		0x70000001
+
+SOURCEPATH		../source
+SOURCE			usifsecuritytests-tcb.cpp
+SOURCE			sifsecuritycontext.cpp
+
+USERINCLUDE		.
+USERINCLUDE		../inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib aprcaptestframeworkutil.lib sif.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/group/usifsecuritytests.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* usifsecuritytests.dll Test harness for USIF security testing
+*
+*/
+
+
+/**
+ @file
+*/
+
+//         Capabilities are set by captestframework
+CAPABILITY All
+
+TARGET			usifsecuritytests.dll
+TARGETTYPE		dll
+UID				0x101F7295 0x10285DE3
+VENDORID		0x70000001
+
+SOURCEPATH		../source
+SOURCE			usifsecuritytests.cpp
+SOURCE			scrcomponentspecific.cpp
+SOURCE			scrreaduserdata.cpp
+SOURCE			scrnonrestricted.cpp
+SOURCE			scrfilepathprotection.cpp
+SOURCE			scrallfiles.cpp
+SOURCE			scrwritedevicedata.cpp
+SOURCE			stsfilepathprotection.cpp
+SOURCE			stsrollbackalltest.cpp
+SOURCE			scrpluginmanagement.cpp
+
+USERINCLUDE		.
+USERINCLUDE		../inc
+USERINCLUDE		../../../../swtransactionservices/inc
+USERINCLUDE		../../../../swcomponentregistry/inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib efsrv.lib
+LIBRARY			aprcaptestframeworkutil.lib
+LIBRARY			scrclient.lib stsclient.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/inc/scrallfiles.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+
+class CScrAllFilesSecTest : public CDefaultCapabilityTest
+	{
+public:
+	static CScrAllFilesSecTest* NewL();
+	
+
+private:
+	CScrAllFilesSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/inc/scrcomponentspecific.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+
+class CScrComponentSpecificSecTest : public CDefaultCapabilityTest
+	{
+public:
+	static CScrComponentSpecificSecTest* NewL();
+	
+
+private:
+	CScrComponentSpecificSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/inc/scrfilepathprotection.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+
+namespace Usif
+	{
+	class RSoftwareComponentRegistry;
+	}
+
+class CScrPathProtectionSecTest : public CDefaultCapabilityTest
+	{
+protected:
+	void TestFileApisL(Usif::RSoftwareComponentRegistry& aScrSession, const TDesC& aFilename, const TDesC& aLogHeader);
+	};
+
+
+class CScrPrivatePathProtectionSecTest : public CScrPathProtectionSecTest
+	{
+public:
+	static CScrPrivatePathProtectionSecTest* NewL();
+	
+private:
+	CScrPrivatePathProtectionSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
+
+class CScrTCBPathProtectionSecTest : public CScrPathProtectionSecTest
+	{
+public:
+	static CScrTCBPathProtectionSecTest* NewL();
+	
+private:
+	CScrTCBPathProtectionSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/inc/scrnonrestricted.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+
+class CScrNonRestrictedSecTest : public CDefaultCapabilityTest
+	{
+public:
+	static CScrNonRestrictedSecTest* NewL();
+	
+
+private:
+	CScrNonRestrictedSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/inc/scrpluginmanagement.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+
+class CScrPluginManagementSecTest : public CDefaultCapabilityTest
+	{
+public:
+	static CScrPluginManagementSecTest* NewL();
+	
+
+private:
+	CScrPluginManagementSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/inc/scrreaduserdata.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+
+class CScrReadUserDataSecTest : public CDefaultCapabilityTest
+	{
+public:
+	static CScrReadUserDataSecTest* NewL();
+	
+
+private:
+	CScrReadUserDataSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/inc/scrwritedevicedata.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+
+class CScrWriteDeviceDataSecTest : public CDefaultCapabilityTest
+	{
+public:
+	static CScrWriteDeviceDataSecTest* NewL();
+	
+
+private:
+	CScrWriteDeviceDataSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/inc/sifsecuritycontext.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,39 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+
+class CSifSecurityContextTest : public CDefaultCapabilityTest
+	{
+public:
+	static CSifSecurityContextTest* NewL();
+
+private:
+	CSifSecurityContextTest();
+
+	void RunTestL();
+
+	void ConstructL();
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/inc/stsfilepathprotection.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+
+class CStsPrivatePathProtectionSecTest : public CDefaultCapabilityTest
+	{
+public:
+	static CStsPrivatePathProtectionSecTest* NewL();
+	
+private:
+	CStsPrivatePathProtectionSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
+
+class CStsTCBPathProtectionSecTest : public CDefaultCapabilityTest
+	{
+public:
+	static CStsTCBPathProtectionSecTest* NewL();
+	
+private:
+	CStsTCBPathProtectionSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
+
+class CStsPublicPathSecTest : public CDefaultCapabilityTest
+	{
+public:
+	static CStsPublicPathSecTest* NewL();
+	
+private:
+	CStsPublicPathSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/inc/stsrollbackalltest.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,37 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+ /*
+ * @file
+ * @test
+ */
+
+#include <captestframework/aprcaptestutility.h>
+
+class CStsRollbackAllSecTest : public CDefaultCapabilityTest
+	{
+public:
+	static CStsRollbackAllSecTest* NewL();
+	
+private:
+	CStsRollbackAllSecTest();
+	
+	void RunTestL();
+
+	void ConstructL();
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/scripts/usifsecuritytests.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+[usifsecuritytests]
+DllName=usifsecuritytests.dll
+
+[usifsecuritytests-tcb]
+DllName=usifsecuritytests-tcb.dll
+OmitTCBCapInComplementSet=True
+
+[add_test_component]
+SoftwareType=dummy
+ComponentName=testName
+VendorName=testVendor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/scripts/usifsecuritytests.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+// USIF Security tests
+PRINT Run USIF Security tests
+
+LOAD_SUITE aprcaptestframework
+LOAD_SUITE tscr -SharedData
+
+SHARED_DATA z:\tusif\tscr\tscr.ini shared_data
+
+//! @SYMTestCaseID 		API-SEC-USIF-SecurityTests-0001
+//! @SYMTestCaseDesc 		Runs the whole suite of security test cases for USIF interfaces. 
+//! @SYMTestPriority 		High
+//! @SYMTestActions Tests 	IPC calls from different SIDs and capabilities
+//! @SYMTestExpectedResults 	KErrPermissionDenied received on calls which should fail
+//! @SYMDevelopedForRelease 	Diran
+
+
+START_TESTCASE API-SEC-USIF-SecurityTests-0001
+
+// Delete the SCR Database file
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
+  
+// Add a dummy component for the APIs tests
+RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\securitytests\usifsecuritytests.ini add_test_component
+RUN_TEST_STEP 100 aprcaptestframework RunThoroughCapabilityChecks z:\tusif\securitytests\usifsecuritytests.ini usifsecuritytests
+RUN_TEST_STEP 100 aprcaptestframework RunThoroughCapabilityChecks z:\tusif\securitytests\usifsecuritytests.ini usifsecuritytests-tcb
+
+END_TESTCASE API-SEC-USIF-SecurityTests-0001
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/scrallfiles.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,67 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include "scrallfiles.h"
+
+#include <usif/scr/scr.h>
+#include <e32def.h>
+
+_LIT(KScrAllFilesSecName, "SCR AllFiles APIs test");
+
+using namespace Usif;
+
+CScrAllFilesSecTest* CScrAllFilesSecTest::NewL()
+	{
+	CScrAllFilesSecTest* self=new(ELeave) CScrAllFilesSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CScrAllFilesSecTest::CScrAllFilesSecTest()
+	{
+	SetCapabilityRequired(ECapabilityAllFiles);
+	}
+	
+void CScrAllFilesSecTest::ConstructL()
+	{
+	SetNameL(KScrAllFilesSecName);
+	}
+
+void CScrAllFilesSecTest::RunTestL()
+	{
+	RSoftwareComponentRegistry scrSession;
+	User::LeaveIfError(scrSession.Connect());
+	CleanupClosePushL(scrSession);
+	
+	TInt err(0);
+			
+	TRAP(err, scrSession.SetIsComponentRemovableL(1, ETrue));
+	CheckFailL(err, _L("SetIsComponentRemovableL - set as removable"));
+	
+	TRAP(err, scrSession.SetIsComponentRemovableL(1, EFalse));
+	CheckFailL(err, _L("SetIsComponentRemovableL - set as non-removable"));
+	
+	CleanupStack::PopAndDestroy(&scrSession);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/scrcomponentspecific.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,153 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include "scrcomponentspecific.h"
+
+#include <usif/scr/scr.h>
+#include <scs/cleanuputils.h>
+#include <e32def.h>
+
+_LIT(KScrCompSecName, "SCR Component-specific APIs test");
+
+using namespace Usif;
+
+CScrComponentSpecificSecTest* CScrComponentSpecificSecTest::NewL()
+	{
+	CScrComponentSpecificSecTest* self=new(ELeave) CScrComponentSpecificSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CScrComponentSpecificSecTest::CScrComponentSpecificSecTest()
+	{
+	SetSidRequired(TUid::Uid(0x10285BC9)); // Use tscr SID as the one required for modifying dummy components
+	}
+	
+void CScrComponentSpecificSecTest::ConstructL()
+	{
+	SetNameL(KScrCompSecName);
+	}
+
+void CScrComponentSpecificSecTest::RunTestL()
+	{
+	RSoftwareComponentRegistry scrSession;
+	User::LeaveIfError(scrSession.Connect());
+	CleanupClosePushL(scrSession);
+
+	// The transaction APIs are tested separately. If this command fails, then we can proceed, as the following operations would fail also, and no transaction management would be required
+	TRAP_IGNORE(scrSession.CreateTransactionL()); 
+	_LIT(KStringPropertyName, "StringName");
+	
+	TComponentId componentId(0);
+	TRAPD(err, componentId = scrSession.AddComponentL(_L("TestComponent"), _L("TestVendor"), _L("dummy"))); // "dummy" is a reserved test software type name
+	CheckFailL(err, _L("AddComponentL"));
+	
+	// We rely on the fact that at least one component exists in the DB, created by the script. If we failed
+	// to create a legitimate component of our own (negative security test), then we attempt doing operations
+	// on that component (they should fail also)
+	if (err != KErrNone)
+		componentId = 1; 
+	
+	TRAP(err, scrSession.SetComponentPropertyL(componentId, KStringPropertyName, _L8("PropertyValue")));
+	CheckFailL(err, _L("SetComponentPropertyL - string"));
+		
+	TRAP(err, scrSession.SetComponentPropertyL(componentId, _L("IntName"), 1));
+	CheckFailL(err, _L("SetComponentPropertyL - int"));	
+		
+	TRAP(err, scrSession.SetComponentPropertyL(componentId, _L("LocalName"), _L("PropertyValue"), ELangEnglish));
+	CheckFailL(err, _L("SetComponentPropertyL - locale"));
+		
+	TRAP(err, scrSession.SetComponentNameL(componentId, _L("TestComponentName")));
+	CheckFailL(err, _L("SetComponentNameL"));	
+	
+	TRAP(err, scrSession.SetVendorNameL(componentId, _L("TestComponentVendor")));
+	CheckFailL(err, _L("SetVendorNameL"));	
+	
+	TRAP(err, scrSession.SetComponentVersionL(componentId, _L("1.0")));
+	CheckFailL(err, _L("SetComponentVersionL"));
+	
+	TRAP(err, scrSession.SetComponentSizeL(componentId, 1));
+	CheckFailL(err, _L("SetComponentSizeL"));	
+	
+	TRAP(err, scrSession.DeleteComponentPropertyL(componentId, KStringPropertyName));
+	CheckFailL(err, _L("DeleteComponentPropertyL"));	
+		
+	TRAP(err, scrSession.SetScomoStateL(componentId, Usif::EActivated));
+	CheckFailL(err, _L("SetScomoStateL"));	
+
+	TRAP(err, scrSession.SetIsComponentRemovableL(componentId, EFalse));
+	CheckFailL(err, _L("SetIsComponentRemovableL"));		
+	
+	TRAP(err, scrSession.SetIsComponentDrmProtectedL(componentId, EFalse));
+	CheckFailL(err, _L("SetIsComponentDrmProtectedL"));
+	
+	TRAP(err, scrSession.SetIsComponentHiddenL(componentId, EFalse));
+	CheckFailL(err, _L("SetIsComponentHiddenL"));
+	
+	TRAP(err, scrSession.SetIsComponentKnownRevokedL(componentId, EFalse));
+	CheckFailL(err, _L("SetIsComponentKnownRevokedL"));
+	
+	TRAP(err, scrSession.SetIsComponentOriginVerifiedL(componentId, EFalse));
+	CheckFailL(err, _L("SetIsComponentOriginVerifiedL"));
+	
+	TRAP(err, scrSession.SetIsComponentPresentL(componentId, EFalse));
+	CheckFailL(err, _L("SetIsComponentPresentL"));
+	
+	TRAP(err, scrSession.DeleteComponentL(componentId));
+	CheckFailL(err, _L("DeleteComponentL"));	
+		
+	RPointerArray<CLocalizableComponentInfo> localisableInfoArray;
+	CleanupResetAndDestroyPushL(localisableInfoArray);
+	CLocalizableComponentInfo* localisableInfo = CLocalizableComponentInfo::NewLC(_L("TestComponent"), _L("TestVendor"), static_cast<TLanguage>(1)); 
+	localisableInfoArray.AppendL(localisableInfo);
+	CleanupStack::Pop(localisableInfo);
+		
+	TRAP(err, scrSession.AddComponentL(localisableInfoArray, _L("dummy")));
+	CheckFailL(err, _L("AddComponentL - localisable"));
+	CleanupStack::PopAndDestroy(&localisableInfoArray);
+	
+	CGlobalComponentId *dependantGlobalId = CGlobalComponentId::NewLC(_L("DependantGlobalId"), _L("dummy"));
+	CGlobalComponentId *supplierGlobalId = CGlobalComponentId::NewLC(_L("DependantGlobalId"), _L("plain"));
+	CVersionedComponentId *supplierVerCompId = CVersionedComponentId::NewLC(*supplierGlobalId);
+	TRAP(err, scrSession.AddComponentDependencyL(*supplierVerCompId, *dependantGlobalId));
+	CheckFailL(err, _L("AddComponentDependencyL"));
+	
+	TRAP(err, scrSession.DeleteComponentDependencyL(*supplierGlobalId, *dependantGlobalId));
+	CheckFailL(err, _L("DeleteComponentDependencyL"));
+	CleanupStack::PopAndDestroy(3, dependantGlobalId); // dependantGlobalId, supplierGlobalId, supplierVerCompId
+	
+	// Verify transaction APIs - can be invoked only by an installer
+	TRAP(err, scrSession.CreateTransactionL());
+	CheckFailL(err, _L("CreateTransactionL"));
+	
+	TRAP(err, scrSession.RollbackTransactionL());
+	CheckFailL(err, _L("RollbackTransactionL"));	
+	
+	TRAP(err, scrSession.CommitTransactionL());
+	CheckFailL(err, _L("CommitTransactionL"));	
+		
+	CleanupStack::PopAndDestroy(&scrSession);
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/scrfilepathprotection.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,148 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include "scrfilepathprotection.h"
+
+#include <usif/scr/scr.h>
+#include <scs/cleanuputils.h>
+#include <e32def.h>
+
+_LIT(KScrPrivatePathSecName, "SCR private path file registration APIs test");
+
+using namespace Usif;
+
+// Throughout the tests we assume that at least one component is present, i.e. that component id 1 is valid
+const TComponentId KExistingComponentId = 1;
+
+void CScrPathProtectionSecTest::TestFileApisL(RSoftwareComponentRegistry& aScrSession, const TDesC& aFilename, const TDesC& aLogHeader)
+	{
+	TBuf<256> debugHeader;
+	
+	TInt err(0);
+	
+	TRAP(err, aScrSession.RegisterComponentFileL(KExistingComponentId, aFilename));
+	debugHeader.Format(_L("RegisterComponentFileL - %S"), &aLogHeader);
+	CheckFailL(err, debugHeader);	
+			
+	TRAP(err, aScrSession.SetFilePropertyL(KExistingComponentId, aFilename, _L("IntName"), 1));
+	debugHeader.Format(_L("SetFilePropertyL - int - %S"), &aLogHeader);
+	CheckFailL(err, debugHeader);	
+			
+	TRAP(err, aScrSession.SetFilePropertyL(KExistingComponentId, aFilename, _L("StringName"), _L8("PropertyValue")));
+	debugHeader.Format(_L("SetFilePropertyL - string - %S"), &aLogHeader);
+	CheckFailL(err, debugHeader);	
+	
+	TRAP(err, aScrSession.DeleteFilePropertyL(KExistingComponentId, aFilename, _L("StringName")));
+	debugHeader.Format(_L("DeleteFilePropertyL - %S"), &aLogHeader);
+	CheckFailL(err, debugHeader);
+	
+	TRAP(err, aScrSession.UnregisterComponentFileL(KExistingComponentId, aFilename));
+	debugHeader.Format(_L("UnregisterComponentFileL - %S"), &aLogHeader);
+	CheckFailL(err, debugHeader);		
+	}
+
+CScrPrivatePathProtectionSecTest* CScrPrivatePathProtectionSecTest::NewL()
+	{
+	CScrPrivatePathProtectionSecTest* self=new(ELeave) CScrPrivatePathProtectionSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CScrPrivatePathProtectionSecTest::CScrPrivatePathProtectionSecTest()
+	{
+	SetSidRequired(TUid::Uid(0x12345678)); // Require SID which corresponds to private directory path
+	}
+	
+void CScrPrivatePathProtectionSecTest::ConstructL()
+	{
+	SetNameL(KScrPrivatePathSecName);
+	}
+
+void CScrPrivatePathProtectionSecTest::RunTestL()
+	{
+	RSoftwareComponentRegistry scrSession;
+	User::LeaveIfError(scrSession.Connect());
+	CleanupClosePushL(scrSession);
+
+	_LIT(KOwnPrivatePathFilename, "c:\\private\\12345678\\file.txt");
+
+	TestFileApisL(scrSession, KOwnPrivatePathFilename, _L("own private path"));	
+			
+	// This test should always fail, as we are registering a file in a private directory which does not belong to us
+	SetExpectPermissionDenied(ETrue); 
+	_LIT(KOthersPrivatePathFilename, "c:\\private\\99999999\\file.txt");
+	TestFileApisL(scrSession, KOthersPrivatePathFilename, _L("others' private path"));
+		
+	SetExpectPermissionDenied(EFalse);
+	
+	// Public and import path should always succeed
+	_LIT(KOthersImportPrivatePathFilename, "c:\\private\\99999999\\import\\file.txt");
+	TestFileApisL(scrSession, KOthersImportPrivatePathFilename, _L("others' import path"));
+	
+	_LIT(KPublicFilename, "c:\file.txt");
+	TestFileApisL(scrSession, KPublicFilename, _L("public path"));	
+	CleanupStack::PopAndDestroy(&scrSession);
+	}
+
+//---------------CScrTCBPathProtectionSecTest------------------
+
+_LIT(KScrTCBPathSecName, "SCR TCB path file registration APIs test");
+
+CScrTCBPathProtectionSecTest* CScrTCBPathProtectionSecTest::NewL()
+	{
+	CScrTCBPathProtectionSecTest* self=new(ELeave) CScrTCBPathProtectionSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CScrTCBPathProtectionSecTest::CScrTCBPathProtectionSecTest()
+	{
+	SetCapabilityRequired(ECapabilityTCB);
+	}
+	
+void CScrTCBPathProtectionSecTest::ConstructL()
+	{
+	SetNameL(KScrTCBPathSecName);
+	}
+
+void CScrTCBPathProtectionSecTest::RunTestL()
+	{
+	RSoftwareComponentRegistry scrSession;
+	User::LeaveIfError(scrSession.Connect());
+	CleanupClosePushL(scrSession);
+
+	_LIT(KTcbPathFilename, "c:\\sys\\file.txt");
+	
+	TestFileApisL(scrSession, KTcbPathFilename, _L("\\sys path"));
+	
+	_LIT(KResourcePathFilename, "c:\\resource\\file.txt");
+		
+	TestFileApisL(scrSession, KResourcePathFilename, _L("\\resource path"));
+		
+	CleanupStack::PopAndDestroy(&scrSession);
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/scrnonrestricted.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,169 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include "scrnonrestricted.h"
+
+#include <usif/scr/scr.h>
+#include <scs/cleanuputils.h>
+#include <e32def.h>
+
+_LIT(KScrNonRestrictedSecName, "SCR non-restricted APIs test");
+
+using namespace Usif;
+
+CScrNonRestrictedSecTest* CScrNonRestrictedSecTest::NewL()
+	{
+	CScrNonRestrictedSecTest* self=new(ELeave) CScrNonRestrictedSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CScrNonRestrictedSecTest::CScrNonRestrictedSecTest()
+	{
+	}
+	
+void CScrNonRestrictedSecTest::ConstructL()
+	{
+	SetNameL(KScrNonRestrictedSecName);
+	}
+
+_LIT(KFileName, "c:\test.fil");
+_LIT(KPropertyName, "DummyProperty");
+
+void CScrNonRestrictedSecTest::RunTestL()
+	{
+
+	// Throughout the tests we assume that at least one component is present, i.e. that component id 1 is valid
+	const TComponentId KExistingComponentId = 1;	
+	
+	RSoftwareComponentRegistry scrSession;
+	User::LeaveIfError(scrSession.Connect());
+	CleanupClosePushL(scrSession);
+	
+	TInt err(0);
+	
+	// Check component query APIs
+	
+	CComponentEntry* entry = CComponentEntry::NewLC();
+	TRAP(err, scrSession.GetComponentL(KExistingComponentId, *entry));
+	CheckFailL(err, _L("GetComponent"));
+	CleanupStack::PopAndDestroy(entry);
+
+	RArray<TComponentId> componentIds;
+	TRAP(err, scrSession.GetComponentsL(KFileName, componentIds));
+	CleanupClosePushL(componentIds);
+	CheckFailL(err, _L("GetComponentsL"));
+	CleanupStack::PopAndDestroy(&componentIds);	
+	
+	RPointerArray<CPropertyEntry> properties;
+	CleanupResetAndDestroyPushL(properties);
+	TRAP(err, scrSession.GetFilePropertiesL(KExistingComponentId, KFileName, properties));
+	CheckFailL(err, _L("GetFilePropertiesL"));
+	CleanupStack::PopAndDestroy(&properties);
+	
+	CPropertyEntry* propertyEntry(NULL);
+	TRAP(err, propertyEntry = scrSession.GetFilePropertyL(KExistingComponentId, KFileName, KPropertyName));
+	CleanupStack::PushL(propertyEntry);
+	CheckFailL(err, _L("GetFilePropertyL"));
+	CleanupStack::PopAndDestroy(propertyEntry);
+	
+	propertyEntry = NULL;
+	TRAP(err, propertyEntry = scrSession.GetComponentPropertyL(KExistingComponentId, KPropertyName));
+	CleanupStack::PushL(propertyEntry);
+	CheckFailL(err, _L("GetComponentPropertyL"));
+	CleanupStack::PopAndDestroy(propertyEntry);
+	
+	propertyEntry = NULL;
+	TRAP(err, propertyEntry = scrSession.GetComponentPropertyL(KExistingComponentId, KPropertyName, ELangEnglish));
+	CleanupStack::PushL(propertyEntry);
+	CheckFailL(err, _L("GetComponentPropertyL - localised"));
+	CleanupStack::PopAndDestroy(propertyEntry);	
+	
+	TRAP(err, scrSession.GetComponentPropertiesL(KExistingComponentId, properties));
+	CleanupResetAndDestroyPushL(properties);
+	CheckFailL(err, _L("GetFilePropertiesL"));
+	CleanupStack::PopAndDestroy(&properties);
+	
+	TRAP(err, scrSession.GetComponentPropertiesL(KExistingComponentId, properties, ELangEnglish));
+	CleanupResetAndDestroyPushL(properties);
+	CheckFailL(err, _L("GetFilePropertiesL - localised"));
+	CleanupStack::PopAndDestroy(&properties);
+	
+	TRAP(err, scrSession.GetComponentFilesCountL(KExistingComponentId));
+	CheckFailL(err, _L("GetComponentFilesCountL"));
+	
+	entry = NULL;
+	TRAP(err, entry = scrSession.GetComponentL(_L("GlobalId"), _L("dummy")));
+	CheckFailL(err, _L("GetComponentL - global id"));
+	if(entry)
+		delete entry;
+	
+	TRAP(err, scrSession.GetComponentIdL(_L("GlobalId"), _L("dummy")));
+	CheckFailL(err, _L("GetComponentIdL"));
+	
+	RPointerArray<CVersionedComponentId> globalIdList;
+	CGlobalComponentId *dependantGlobalId = CGlobalComponentId::NewLC(_L("DependantGlobalId"), _L("dummy"));
+	TRAP(err, scrSession.GetSupplierComponentsL(*dependantGlobalId, globalIdList));
+	CheckFailL(err, _L("GetSupplierComponentsL"));
+	CleanupStack::PopAndDestroy(dependantGlobalId);
+	globalIdList.Reset();
+	
+	CGlobalComponentId *supplierGlobalId = CGlobalComponentId::NewLC(_L("SupplierGlobalId"), _L("dummy"));
+	TRAP(err, scrSession.GetDependantComponentsL(*supplierGlobalId, globalIdList));
+	CheckFailL(err, _L("GetDependantComponentsL"));
+	CleanupStack::PopAndDestroy(supplierGlobalId);
+	globalIdList.ResetAndDestroy();
+	
+	// Check application manager APIs
+	
+	TRAP(err, scrSession.IsMediaPresentL(1));
+	CheckFailL(err, _L("IsMediaPresentL"));
+	
+	TRAP(err, scrSession.IsComponentOrphanedL(KExistingComponentId));
+	CheckFailL(err, _L("IsComponentOrphanedL"));
+	
+	TRAP(err, scrSession.CompareVersionsL(_L("1.2"), _L("3.2")));
+	CheckFailL(err, _L("CompareVersionsL"));
+
+	TRAP(err, scrSession.IsComponentOnReadOnlyDriveL(KExistingComponentId));
+	CheckFailL(err, _L("IsComponentOnReadOnlyDriveL"));
+	
+	TRAP(err, scrSession.IsComponentPresentL(KExistingComponentId));
+	CheckFailL(err, _L("IsComponentPresentL"));
+		
+	// Check sub-session APIs
+	RSoftwareComponentRegistryFilesList compFilesListView;
+	TRAP(err, compFilesListView.OpenListL(scrSession, KExistingComponentId));
+	CheckFailL(err, _L("RSoftwareComponentRegistryFilesList::OpenListL"));
+	CleanupClosePushL(compFilesListView);
+
+	TRAP(err, compFilesListView.NextFileL());
+	CheckFailL(err, _L("RSoftwareComponentRegistryFilesList::NextFileL"));
+	
+	CleanupStack::PopAndDestroy(&compFilesListView);
+	
+	CleanupStack::PopAndDestroy(&scrSession);
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/scrpluginmanagement.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,89 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include "scrpluginmanagement.h"
+
+#include <usif/scr/scr.h>
+#include <scs/cleanuputils.h>
+#include <e32def.h>
+
+_LIT_SECURE_ID(KSisRegistryServerSid, 0x10202DCA);
+_LIT(KScrPluginManagementSecName, "SCR Plugin Management APIs test");
+
+using namespace Usif;
+
+CScrPluginManagementSecTest* CScrPluginManagementSecTest::NewL()
+	{
+	CScrPluginManagementSecTest* self=new(ELeave) CScrPluginManagementSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CScrPluginManagementSecTest::CScrPluginManagementSecTest()
+	{
+	SetSidRequired(KSisRegistryServerSid);
+	}
+	
+void CScrPluginManagementSecTest::ConstructL()
+	{
+	SetNameL(KScrPluginManagementSecName);
+	}
+
+void CScrPluginManagementSecTest::RunTestL()
+	{
+	RSoftwareComponentRegistry scrSession;
+	User::LeaveIfError(scrSession.Connect());
+	CleanupClosePushL(scrSession);
+	
+	// The transaction APIs are tested separately. If this command fails, then we can proceed, as the following operations would fail also, and no transaction management would be required
+	TRAP_IGNORE(scrSession.CreateTransactionL()); 
+	
+	TInt err(0);
+	
+	// First, add a new sofwtare type
+	_LIT(KSwTypeName, "usifsecuritytestsoftwaretype");
+	TUid sifPluginUid = {0xA01B7211};
+	_LIT_SECURE_ID(installerSecureId, 0xAAFFEE11);
+	_LIT_SECURE_ID(executionLayerSecureId, 0xAAEEDD11);
+	
+	_LIT(KMimeType, "usifsecuritytestmimetype");
+	RPointerArray<HBufC> mimeTypes;
+	CleanupResetAndDestroyPushL(mimeTypes);
+	mimeTypes.Append(KMimeType().AllocL());
+	
+	TRAP(err, scrSession.AddSoftwareTypeL(KSwTypeName, sifPluginUid, installerSecureId, executionLayerSecureId, mimeTypes));
+	CheckFailL(err, _L("AddSoftwareTypeL"));
+	CleanupStack::PopAndDestroy(&mimeTypes);
+	
+	// Then, delete the newly added sofwtare type. 
+	RPointerArray<HBufC> deletedMimeTypes;
+	CleanupResetAndDestroyPushL(deletedMimeTypes);
+	TRAP(err, scrSession.DeleteSoftwareTypeL(KSwTypeName,deletedMimeTypes));
+	CheckFailL(err, _L("DeleteSoftwareTypeL"));
+	CleanupStack::PopAndDestroy(&deletedMimeTypes); 
+		
+	TRAP_IGNORE(scrSession.CommitTransactionL());
+	CleanupStack::PopAndDestroy(&scrSession);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/scrreaduserdata.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,106 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include "scrreaduserdata.h"
+#include <scs/cleanuputils.h>
+#include <usif/scr/scr.h>
+#include <e32def.h>
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "screntries_internal.h"
+#endif
+
+_LIT(KScrReadUserDataSecName, "SCR ReadUserData APIs test");
+
+using namespace Usif;
+
+CScrReadUserDataSecTest* CScrReadUserDataSecTest::NewL()
+	{
+	CScrReadUserDataSecTest* self=new(ELeave) CScrReadUserDataSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CScrReadUserDataSecTest::CScrReadUserDataSecTest()
+	{
+	SetCapabilityRequired(ECapabilityReadUserData);
+	}
+	
+void CScrReadUserDataSecTest::ConstructL()
+	{
+	SetNameL(KScrReadUserDataSecName);
+	}
+
+void CScrReadUserDataSecTest::RunTestL()
+	{
+	RSoftwareComponentRegistry scrSession;
+	User::LeaveIfError(scrSession.Connect());
+	CleanupClosePushL(scrSession);
+
+	TInt err(0);
+	TComponentId testComponentId(1);
+	// Check subsession APIs
+	CComponentFilter* componentFilter = CComponentFilter::NewLC();
+
+	RSoftwareComponentRegistryView compRegistryView;
+	TRAP(err, compRegistryView.OpenViewL(scrSession, componentFilter));
+	CheckFailL(err, _L("CComponentFilter::OpenViewL"));
+	if (err == KErrNone)
+		{
+		// In a negative test, we should fail opening a sub-session. In this case we cannot continue with NextComponentL
+		TRAP(err, compRegistryView.NextComponentL());
+		CheckFailL(err, _L("CComponentFilter::NextComponentL"));		
+		compRegistryView.Close();
+		}
+
+	RArray<TComponentId> componentIds;
+	TRAP(err, scrSession.GetComponentIdsL(componentIds));
+	if(KErrNone==err && componentIds.Count()!=0)
+	    testComponentId=componentIds[0];       //The testComponentId retrieved, is used in the subsequent tests to get its localized information
+	CleanupClosePushL(componentIds);
+	CheckFailL(err, _L("RSoftwareComponentRegistry::GetComponentIdsL"));
+
+	RPointerArray<Usif::CLocalizableComponentInfo> compLocalizedInfoArray;
+	CleanupResetAndDestroyPushL(compLocalizedInfoArray);
+	TRAP(err, scrSession.GetComponentLocalizedInfoL(testComponentId, compLocalizedInfoArray));
+	CheckFailL(err, _L("RSoftwareComponentRegistry::GetComponentLocalizedInfoL"));
+	CleanupStack::Pop(&compLocalizedInfoArray);
+	compLocalizedInfoArray.ResetAndDestroy();
+	
+	
+	RArray<TLanguage> matchingSupportedLanguages;
+	CleanupClosePushL(matchingSupportedLanguages);
+	TRAP(err, scrSession.GetComponentSupportedLocalesListL(testComponentId, matchingSupportedLanguages));
+	CheckFailL(err, _L("RSoftwareComponentRegistry::GetComponentSupportedLocalesListL"));
+    CleanupStack::PopAndDestroy(&matchingSupportedLanguages);
+	
+	RPointerArray<CScrLogEntry> logEntries;
+	TRAP(err, scrSession.RetrieveLogEntriesL(logEntries));
+	logEntries.ResetAndDestroy();
+	CheckFailL(err, _L("RSoftwareComponentRegistry::RetrieveLogEntriesL"));
+		
+	CleanupStack::PopAndDestroy(2, componentFilter); // componentIds,  componentFilter  
+
+	CleanupStack::PopAndDestroy(&scrSession);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/scrwritedevicedata.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include "scrwritedevicedata.h"
+
+#include <usif/scr/scr.h>
+#include <e32def.h>
+
+_LIT(KScrWriteDeviceDataSecName, "SCR WriteDeviceData APIs test");
+
+using namespace Usif;
+
+CScrWriteDeviceDataSecTest* CScrWriteDeviceDataSecTest::NewL()
+	{
+	CScrWriteDeviceDataSecTest* self=new(ELeave) CScrWriteDeviceDataSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CScrWriteDeviceDataSecTest::CScrWriteDeviceDataSecTest()
+	{
+	SetCapabilityRequired(ECapabilityWriteDeviceData);
+	}
+	
+void CScrWriteDeviceDataSecTest::ConstructL()
+	{
+	SetNameL(KScrWriteDeviceDataSecName);
+	}
+
+void CScrWriteDeviceDataSecTest::RunTestL()
+	{
+	RSoftwareComponentRegistry scrSession;
+	User::LeaveIfError(scrSession.Connect());
+	CleanupClosePushL(scrSession);
+	
+	TInt err(0);
+	// SetIsComponentDrmProtectedL API	
+	TRAP(err, scrSession.SetIsComponentDrmProtectedL(1, ETrue));
+	CheckFailL(err, _L("SetIsComponentDrmProtectedL - set as DRM protected"));
+	
+	TRAP(err, scrSession.SetIsComponentDrmProtectedL(1, EFalse));
+	CheckFailL(err, _L("SetIsComponentDrmProtectedL - set as non-DRM protected"));
+	
+	// SetIsComponentHiddenL API		
+	TRAP(err, scrSession.SetIsComponentHiddenL(1, ETrue));
+	CheckFailL(err, _L("SetIsComponentHiddenL - set as hidden"));
+		
+	TRAP(err, scrSession.SetIsComponentHiddenL(1, EFalse));
+	CheckFailL(err, _L("SetIsComponentHiddenL - set as visible"));
+	
+	// SetIsComponentKnownRevokedL API		
+	TRAP(err, scrSession.SetIsComponentKnownRevokedL(1, ETrue));
+	CheckFailL(err, _L("SetIsComponentKnownRevokedL - set as known-revoked"));
+		
+	TRAP(err, scrSession.SetIsComponentKnownRevokedL(1, EFalse));
+	CheckFailL(err, _L("SetIsComponentKnownRevokedL - set as non-known-revoked"));
+	
+	// SetIsComponentOriginVerifiedL API		
+	TRAP(err, scrSession.SetIsComponentOriginVerifiedL(1, ETrue));
+	CheckFailL(err, _L("SetIsComponentOriginVerifiedL - set as origin-verified"));
+		
+	TRAP(err, scrSession.SetIsComponentOriginVerifiedL(1, EFalse));
+	CheckFailL(err, _L("SetIsComponentOriginVerifiedL - set as non-origin-verified"));
+	
+	CleanupStack::PopAndDestroy(&scrSession);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/sifsecuritycontext.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,80 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include "sifsecuritycontext.h"
+#include <usif/sif/sif.h>
+#include <e32def.h>
+
+_LIT(KSifSecurityContextName, "SIF TSecurityContext APIs test");
+
+using namespace Usif;
+
+// This test calls only the GetComponentInfo() API because the logic of passing TSecurityContext to
+// a SIF plug-in is exactly the same for all the SIF operations.
+namespace
+	{
+	_LIT(KFileName, "z:\\tusif\\tsif\\data\\test.nonnativepackage.txt");
+	_LIT_SECURE_ID(KTestSuiteSecureId, 0x10285BCC);
+
+	void DoTestL()
+		{
+		RSoftwareInstall sif;
+		User::LeaveIfError(sif.Connect());
+		CleanupClosePushL(sif);
+
+		CComponentInfo* compInfo = CComponentInfo::NewLC();
+
+		TRequestStatus status;
+		sif.GetComponentInfo(KFileName, *compInfo, status);
+		User::WaitForRequest(status);
+
+		CleanupStack::PopAndDestroy(2, &sif);
+		User::LeaveIfError(status.Int());
+		}
+	}
+
+CSifSecurityContextTest* CSifSecurityContextTest::NewL()
+	{
+	CSifSecurityContextTest* self=new(ELeave) CSifSecurityContextTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CSifSecurityContextTest::CSifSecurityContextTest()
+	{
+	SetCapabilityRequired(ECapabilityReadUserData);
+	SetSidRequired(KTestSuiteSecureId);
+	}
+
+void CSifSecurityContextTest::ConstructL()
+	{
+	SetNameL(KSifSecurityContextName);
+	}
+
+void CSifSecurityContextTest::RunTestL()
+	{
+	TRAPD(err, DoTestL());
+	CheckFailL(err, _L("CSifSecurityContextTest::DoTestL()"));
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/stsfilepathprotection.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,294 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include "stsfilepathprotection.h"
+
+#include <usif/sts/sts.h>
+#include <scs/cleanuputils.h>
+#include <e32def.h>
+#include <f32file.h>
+
+_LIT(KStsPrivatePathSecName, "STS private path file registration APIs test");
+
+using namespace Usif;
+
+CStsPrivatePathProtectionSecTest* CStsPrivatePathProtectionSecTest::NewL()
+	{
+	CStsPrivatePathProtectionSecTest* self=new(ELeave) CStsPrivatePathProtectionSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CStsPrivatePathProtectionSecTest::CStsPrivatePathProtectionSecTest()
+	{
+	SetSidRequired(TUid::Uid(0x10285DDF)); //this ID must match the one used in the file path below
+	}
+	
+void CStsPrivatePathProtectionSecTest::ConstructL()
+	{
+	SetNameL(KStsPrivatePathSecName);
+	}
+
+void CStsPrivatePathProtectionSecTest::RunTestL()
+	{
+	RStsSession stsSession;
+	TInt32 transactionId(stsSession.CreateTransactionL());
+	CleanupClosePushL(stsSession);
+	TInt err(0);	
+	TUint newFileMode(EFileShareExclusive | EFileWrite);
+	
+	_LIT(KOwnPrivatePathFilename, 	"c:\\private\\10285DDF\\file.txt");
+
+	TRAP(err, stsSession.RegisterNewL(KOwnPrivatePathFilename));
+	CheckFailL(err, _L("RegisterNewL - own private path c:\\private\\10285DDF"));
+	
+	RFile dummyFileHandle;
+	CleanupClosePushL(dummyFileHandle);
+
+	TRAP(err, stsSession.CreateNewL(KOwnPrivatePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("CreateNewL - own private path c:\\private\\10285DDF"));
+	
+	TRAP(err, stsSession.RemoveL(KOwnPrivatePathFilename));
+	CheckFailL(err, _L("RemoveL - own private path c:\\private\\10285DDF"));
+
+	TRAP(err, stsSession.RegisterTemporaryL(KOwnPrivatePathFilename));
+	CheckFailL(err, _L("RegisterTemporaryL - own private path c:\\private\\10285DDF"));
+
+	TRAP(err, stsSession.CreateTemporaryL(KOwnPrivatePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("CreateTemporaryL - own private path c:\\private\\10285DDF"));
+
+	TRAP(err, stsSession.OverwriteL(KOwnPrivatePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("OverwriteL - own private path c:\\private\\10285DDF"));
+	
+	//---------------------------------------------------------------------------------	
+	
+	// This test should always pass, as we are registering a file in an import directory which can be accessed regardless of the SID
+	SetExpectPermissionDenied(EFalse); 
+	_LIT(KOthersImportPrivatePathFilename, "c:\\private\\99999999\\import\\file.txt");
+	
+
+	TRAP(err, stsSession.RegisterNewL(KOthersImportPrivatePathFilename));
+	CheckFailL(err, _L("RegisterNewL - others import path c:\\private\\99999999\\import"));
+	
+	TRAP(err, stsSession.CreateNewL(KOthersImportPrivatePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("CreateNewL - others import path c:\\private\\99999999\\import"));
+	
+	TRAP(err, stsSession.RemoveL(KOthersImportPrivatePathFilename));
+	CheckFailL(err, _L("RemoveL - others import path c:\\private\\99999999\\import"));
+
+	TRAP(err, stsSession.RegisterTemporaryL(KOthersImportPrivatePathFilename));
+	CheckFailL(err, _L("RegisterTemporaryL - others import path c:\\private\\99999999\\import"));
+
+	TRAP(err, stsSession.CreateTemporaryL(KOthersImportPrivatePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("CreateTemporaryL - others import path c:\\private\\99999999\\import"));
+
+	TRAP(err, stsSession.OverwriteL(KOthersImportPrivatePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("OverwriteL - others import path c:\\private\\99999999\\import"));
+	
+	//---------------------------------------------------------------------------------	
+	
+	// This test should always fail, as we are registering a file in a private directory which does not belong to us
+	SetExpectPermissionDenied(ETrue); 
+	_LIT(KOthersPrivatePathFilename, "c:\\private\\99999999\\file.txt");
+
+	TRAP(err, stsSession.RegisterNewL(KOthersPrivatePathFilename));
+	CheckFailL(err, _L("RegisterNewL - others private path c:\\private\\99999999"));
+	
+	TRAP(err, stsSession.CreateNewL(KOthersPrivatePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("CreateNewL - others private path c:\\private\\99999999"));
+	
+	TRAP(err, stsSession.RemoveL(KOthersPrivatePathFilename));
+	CheckFailL(err, _L("RemoveL - others private path c:\\private\\99999999"));
+
+	TRAP(err, stsSession.RegisterTemporaryL(KOthersPrivatePathFilename));
+	CheckFailL(err, _L("RegisterTemporaryL - others private path c:\\private\\99999999"));
+
+	TRAP(err, stsSession.CreateTemporaryL(KOthersPrivatePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("CreateTemporaryL - others private path c:\\private\\99999999"));
+
+	TRAP(err, stsSession.OverwriteL(KOthersPrivatePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("OverwriteL - others private path c:\\private\\99999999"));
+	
+	CleanupStack::PopAndDestroy(&dummyFileHandle);
+	CleanupStack::PopAndDestroy(&stsSession);
+	}
+
+//---------------CStsTCBPathProtectionSecTest------------------
+
+_LIT(KStsTCBPathSecName, "STS TCB path file registration APIs test");
+
+CStsTCBPathProtectionSecTest* CStsTCBPathProtectionSecTest::NewL()
+	{
+	CStsTCBPathProtectionSecTest* self=new(ELeave) CStsTCBPathProtectionSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CStsTCBPathProtectionSecTest::CStsTCBPathProtectionSecTest()
+	{
+	SetCapabilityRequired(ECapabilityTCB);
+	}
+	
+void CStsTCBPathProtectionSecTest::ConstructL()
+	{
+	SetNameL(KStsTCBPathSecName);
+	}
+
+void CStsTCBPathProtectionSecTest::RunTestL()
+	{
+	RStsSession stsSession;
+	TInt32 transactionId(stsSession.CreateTransactionL());
+	CleanupClosePushL(stsSession);
+	TInt err(0);	
+	
+	_LIT(KTcbPathFilename, "c:\\sys\\file.txt");
+
+	TRAP(err, stsSession.RegisterNewL(KTcbPathFilename));
+	CheckFailL(err, _L("RegisterNewL - \\sys path"));
+	
+	TUint newFileMode(EFileShareExclusive | EFileWrite);
+	RFile dummyFileHandle;
+	CleanupClosePushL(dummyFileHandle);
+
+	TRAP(err, stsSession.CreateNewL(KTcbPathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("CreateNewL - \\sys path"));
+	
+	TRAP(err, stsSession.RemoveL(KTcbPathFilename));
+	CheckFailL(err, _L("RemoveL - \\sys path"));
+
+	TRAP(err, stsSession.RegisterTemporaryL(KTcbPathFilename));
+	CheckFailL(err, _L("RegisterTemporaryL - \\sys path"));
+
+	TRAP(err, stsSession.CreateTemporaryL(KTcbPathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("CreateTemporaryL - \\sys path"));
+
+	TRAP(err, stsSession.OverwriteL(KTcbPathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("OverwriteL - \\sys path"));
+
+
+	_LIT(KResourcePathFilename, "c:\\resource\\file.txt");
+
+	TRAP(err, stsSession.RegisterNewL(KResourcePathFilename));
+	CheckFailL(err, _L("RegisterNewL - \\resource path"));
+	
+	TRAP(err, stsSession.CreateNewL(KResourcePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("CreateNewL - \\resource path"));
+
+	TRAP(err, stsSession.RemoveL(KResourcePathFilename));
+	CheckFailL(err, _L("RemoveL - \\resource path"));
+
+	TRAP(err, stsSession.RegisterTemporaryL(KResourcePathFilename));
+	CheckFailL(err, _L("RegisterTemporaryL - \\resource path"));
+
+	TRAP(err, stsSession.CreateTemporaryL(KResourcePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("CreateTemporaryL - \\resource path"));
+
+	TRAP(err, stsSession.OverwriteL(KResourcePathFilename, dummyFileHandle, newFileMode));
+	dummyFileHandle.Close();
+	CheckFailL(err, _L("OverwriteL - \\resource path"));
+		
+	CleanupStack::PopAndDestroy(&dummyFileHandle);
+	CleanupStack::PopAndDestroy(&stsSession);
+	}
+
+ 
+ //---------------CStsPublicPathSecTest------------------
+ 
+ _LIT(KStsPublicPathSecName, "STS public path file registration APIs test");
+ 
+ CStsPublicPathSecTest* CStsPublicPathSecTest::NewL()
+ 	{
+ 	CStsPublicPathSecTest* self=new(ELeave) CStsPublicPathSecTest();
+ 	CleanupStack::PushL(self);
+ 	self->ConstructL();
+ 	CleanupStack::Pop(self);
+ 	return self;
+ 	}
+ 
+ CStsPublicPathSecTest::CStsPublicPathSecTest()
+ 	{
+ 	}
+ 	
+ void CStsPublicPathSecTest::ConstructL()
+ 	{
+ 	SetNameL(KStsPublicPathSecName);
+ 	}
+ 
+ void CStsPublicPathSecTest::RunTestL()
+ 	{
+ 	RStsSession stsSession;
+ 	TInt32 transactionId(stsSession.CreateTransactionL());
+ 	CleanupClosePushL(stsSession);
+ 	TInt err(0);	
+
+	TUint newFileMode(EFileShareExclusive | EFileWrite);
+
+ 	//this test must always pass
+ 	SetExpectPermissionDenied(EFalse); 
+ 	_LIT(KPublicPathFilename, "c:\\publicdir\\file.txt");
+ 
+ 	TRAP(err, stsSession.RegisterNewL(KPublicPathFilename));
+ 	CheckFailL(err, _L("RegisterNewL - \\publicdir path"));
+ 	
+ 	RFile dummyFileHandle;
+ 	CleanupClosePushL(dummyFileHandle);
+ 
+ 	TRAP(err, stsSession.CreateNewL(KPublicPathFilename, dummyFileHandle, newFileMode));
+ 	dummyFileHandle.Close();
+ 	CheckFailL(err, _L("CreateNewL - \\publicdir path"));
+ 	
+ 	TRAP(err, stsSession.RemoveL(KPublicPathFilename));
+ 	CheckFailL(err, _L("RemoveL - \\publicdir path"));
+ 
+ 	TRAP(err, stsSession.RegisterTemporaryL(KPublicPathFilename));
+ 	CheckFailL(err, _L("RegisterTemporaryL - \\publicdir path"));
+ 
+ 	TRAP(err, stsSession.CreateTemporaryL(KPublicPathFilename, dummyFileHandle, newFileMode));
+ 	dummyFileHandle.Close();
+ 	CheckFailL(err, _L("CreateTemporaryL - \\publicdir path"));
+ 
+ 	TRAP(err, stsSession.OverwriteL(KPublicPathFilename, dummyFileHandle, newFileMode));
+ 	dummyFileHandle.Close();
+ 	CheckFailL(err, _L("OverwriteL - \\publicdir path"));
+ 
+ 	CleanupStack::PopAndDestroy(&dummyFileHandle);
+ 	CleanupStack::PopAndDestroy(&stsSession);
+ 	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/stsrollbackalltest.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,63 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include "stsrollbackalltest.h"
+
+#include <usif/sts/sts.h>
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "stsrecovery.h"
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+#include <scs/cleanuputils.h>
+#include <e32def.h>
+
+_LIT(KStsRollBackAllSecName, "STS RollBAckAllPending APIs test");
+
+using namespace Usif;
+
+CStsRollbackAllSecTest* CStsRollbackAllSecTest::NewL()
+	{
+	CStsRollbackAllSecTest* self=new(ELeave) CStsRollbackAllSecTest();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CStsRollbackAllSecTest::CStsRollbackAllSecTest()
+	{
+	SetSidRequired(TUid::Uid(0x10202DCE)); //SWI daemon's UID3 (ie: SID)
+	}
+	
+void CStsRollbackAllSecTest::ConstructL()
+	{
+	SetNameL(KStsRollBackAllSecName);
+	}
+
+void CStsRollbackAllSecTest::RunTestL()
+	{
+	RStsRecoverySession stsRecoverySession;
+	CleanupClosePushL(stsRecoverySession);
+	TRAPD(err, stsRecoverySession.RollbackAllPendingL());
+	CheckFailL(err, _L("RollbackAllPendingL"));
+	CleanupStack::PopAndDestroy(&stsRecoverySession);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/usifsecuritytests-tcb.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+#include "sifsecuritycontext.h"
+
+#include <s32file.h>
+
+// Factory function
+MCapabilityTestFactory* CapabilityTestFactoryL()
+	{
+	CDefaultCapabilityTestFactory* factory=new(ELeave) CDefaultCapabilityTestFactory();
+
+	factory->AddTestL(CSifSecurityContextTest::NewL());
+
+	return factory;
+	}
+
+EXPORT_C MCapabilityTestFactory* CapabilityTestFactory()
+	{
+	MCapabilityTestFactory* factory=NULL;
+	TRAP_IGNORE(factory = CapabilityTestFactoryL());
+	return factory;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/securitytests/source/usifsecuritytests.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+*/
+
+#include <captestframework/aprcaptestutility.h>
+#include "scrcomponentspecific.h"
+#include "scrreaduserdata.h"
+#include "scrallfiles.h"
+#include "scrwritedevicedata.h"
+#include "scrnonrestricted.h"
+#include "scrfilepathprotection.h"
+#include "stsfilepathprotection.h"
+#include "stsrollbackalltest.h"
+#include "scrpluginmanagement.h"
+
+#include <s32file.h>
+
+// Factory function
+MCapabilityTestFactory* CapabilityTestFactoryL()
+	{
+	CDefaultCapabilityTestFactory* factory=new(ELeave) CDefaultCapabilityTestFactory();
+
+	factory->AddTestL(CScrComponentSpecificSecTest::NewL());
+	factory->AddTestL(CScrReadUserDataSecTest::NewL());
+	factory->AddTestL(CScrNonRestrictedSecTest::NewL());
+	factory->AddTestL(CScrPrivatePathProtectionSecTest::NewL());
+	factory->AddTestL(CScrTCBPathProtectionSecTest::NewL());
+	factory->AddTestL(CScrAllFilesSecTest::NewL());
+	factory->AddTestL(CScrWriteDeviceDataSecTest::NewL());
+	factory->AddTestL(CStsTCBPathProtectionSecTest::NewL());
+	factory->AddTestL(CStsPrivatePathProtectionSecTest::NewL());
+	factory->AddTestL(CStsPublicPathSecTest::NewL());
+	factory->AddTestL(CStsRollbackAllSecTest::NewL());
+	factory->AddTestL(CScrPluginManagementSecTest::NewL());
+
+	return factory;
+	}
+
+EXPORT_C MCapabilityTestFactory* CapabilityTestFactory()
+	{
+	MCapabilityTestFactory* factory=NULL;
+	TRAP_IGNORE(factory = CapabilityTestFactoryL());
+	return factory;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/siflauncherconfig/siflauncher_loc.rls	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,21 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+rls_string STRING_r_siflauncher_icon_path "z:\\resource\\apps\\siflauncher.mbm"
+rls_string STRING_r_siflauncher__short_caption "USIF"
+rls_string STRING_r_siflauncher_caption "Universal Software Install Framework"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/siflauncherconfig/siflauncher_loc.rss	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,34 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include <appinfo.rh>
+#include "siflauncher_loc.rls"
+
+RESOURCE LOCALISABLE_APP_INFO
+	{
+	short_caption = STRING_r_siflauncher_short_caption;
+	caption_and_icon =
+		{
+		CAPTION_AND_ICON_INFO 
+			{
+			caption=STRING_r_siflauncher_caption;
+			number_of_icons=1;
+			icon_file=STRING_r_siflauncher_icon_path;
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/siflauncherconfig/siflauncher_reg.rss	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,39 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* siflauncher.rss
+* Test version of the SIF Launcher registration resource file 
+*
+*/
+
+
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x10285BD0
+
+RESOURCE APP_REGISTRATION_INFO 
+	{
+	app_file="siflauncher";
+	localisable_resource_file="\\resource\\apps\\siflauncher_loc";
+
+	hidden=KAppNotHidden; 
+	embeddability=KAppNotEmbeddable;
+	newfile=KAppDoesNotSupportNewFile;
+	datatype_list=
+		{
+		DATATYPE { priority=EDataTypePriorityHigh; type="x-epoc/x-sisx-app"; },
+		DATATYPE { priority=EDataTypePriorityHigh; type="binary/sif-refpkg"; }
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/createleesisfiles.pl	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,123 @@
+#
+# 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 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".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+
+use Cwd;
+use File::Copy;
+use File::Basename;
+
+# Helpers
+sub ReadFile($);
+sub WriteFile($$);
+sub EditFile($$$);
+
+print "This script creates SIS files containing LEEs for SIF integration tests\n";
+
+my $PLATFORM=@ARGV[0];
+my $CONFIGURATION=@ARGV[1];
+
+my $securitySourceDir = $ENV{SECURITYSOURCEDIR};
+my $CERTPATH = "$securitySourceDir\\installationservices\\switestfw\\testcertificates\\swi\\test\\tsisfile\\data\\signedsis\\Root5CA\\cert_chain_dsa_len1\\first.dsa.cer";
+my $KEYPATH = "$securitySourceDir\\installationservices\\swi\\test\\tsisfile\\data\\signedsis\\Root5CA\\cert_chain_dsa_len1\\dsa1.key";
+my $PKGDIR = "$securitySourceDir\\installationservices\\swinstallationfw\\test\\tusif\\scripts\\data";
+my $BUILDDIR = "\\epoc32\\release\\$PLATFORM\\$CONFIGURATION";
+my $DATADIR = "$BUILDDIR\\z\\tusif\\tswtype\\data";
+my $ARMV5DATADIR = "\\epoc32\\data\\z\\tusif\\tswtype\\data";
+
+my $BASE = 'sifswtypebase';
+my $UPGRADE = 'sifswtypeupgrade';
+my $suffix = '_edited';
+
+# Replace <BUILDMIDPATH> and <ZDRIVEMIDPATH> in the PKG files with the current values
+my $ZDRIVEMIDPATH = 'data';
+if (lc($PLATFORM) ne "armv5")
+	{
+	$ZDRIVEMIDPATH = "release\\$PLATFORM\\$CONFIGURATION";
+	}
+my $BUILDMIDPATH = "release\\$PLATFORM\\$CONFIGURATION";
+EditFile("$PKGDIR\\$BASE.pkg", "$PKGDIR\\$BASE$suffix.pkg" , sub { s/<BUILDMIDPATH>/$BUILDMIDPATH/gm; s/<ZDRIVEMIDPATH>/$ZDRIVEMIDPATH/gm; });
+EditFile("$PKGDIR\\$UPGRADE.pkg", "$PKGDIR\\$UPGRADE$suffix.pkg" , sub { s/<BUILDMIDPATH>/$BUILDMIDPATH/gm; s/<ZDRIVEMIDPATH>/$ZDRIVEMIDPATH/gm; });
+
+my $dir = getcwd;
+chdir $PKGDIR;
+
+# Generate SIS files for SIF integration tests
+my $CREATESISCMD = "createsis create -cert $CERTPATH -key $KEYPATH";
+`$CREATESISCMD $PKGDIR\\$BASE$suffix.pkg`;
+`$CREATESISCMD $PKGDIR\\$UPGRADE$suffix.pkg`;
+unlink "*.cer"; #delete all certificates to avoid failure on checklocationofcertificates test
+
+# Copy generated SIS files onto the Z drive
+if (lc($PLATFORM) ne "armv5")
+	{
+	unlink "$DATADIR\\$BASE.sis";
+	move("$PKGDIR\\$BASE$suffix.sis", "$DATADIR\\$BASE.sis");
+	unlink "$DATADIR\\$UPGRADE.sis";
+	move("$PKGDIR\\$UPGRADE$suffix.sis", "$DATADIR\\$UPGRADE.sis");
+	}
+else
+	{
+	mkdir "$ARMV5DATADIR" unless -d "$ARMV5DATADIR";
+	unlink "$DATADIR\\$BASE.sis";
+	move("$PKGDIR\\$BASE$suffix.sis", "$ARMV5DATADIR\\$BASE.sis");
+	unlink "$DATADIR\\$UPGRADE.sis";
+	move("$PKGDIR\\$UPGRADE$suffix.sis", "$ARMV5DATADIR\\$UPGRADE.sis");
+	}
+
+unlink "$PKGDIR\\$BASE$suffix.pkg";
+unlink "$PKGDIR\\$UPGRADE$suffix.pkg";
+
+chdir $dir;
+
+
+# Read the contents of a file into a string and return it
+sub ReadFile ($) {
+	my ($file) = @_;
+	open FILE, "<$file" or die "Can't read from $file: $!";
+	local $/ = undef;
+	my $data = <FILE>;
+	close FILE;
+	return $data;
+}
+
+# Replace a file with a string
+sub WriteFile ($$) {
+	my ($file, $data) = @_;
+
+	# Ensure directory exists
+	if ($file =~ basename($1) && ! -e $1)
+		{
+		mkdir($1);
+		}
+	
+	if (-e $file)
+		{
+		system("attrib -r $file");
+		}
+	
+	open FILE, ">$file" or die "Can't write to $file: $!";
+	print FILE $data;
+	close FILE;
+}
+
+# Edit a file
+sub EditFile ($$$) {
+	my ($infile, $outfile, $coderef) = @_;
+	local $_ = ReadFile($infile);
+	&$coderef();
+	WriteFile($outfile, $_);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/createrefbinfiles.pl	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,160 @@
+#
+# 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 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".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# This script creates reference binary packages that may consists of embedded packages
+#
+
+use File::Copy;
+
+sub MakeBinPkg ($);
+
+my $PLATFORM=@ARGV[0];
+my $CONFIGURATION=@ARGV[1];
+
+my $SecuritySourceDir = $ENV{SECURITYSOURCEDIR};
+my $RefSamplePath = "$SecuritySourceDir\\installationservices\\refswinstallationplugin\\sample";
+my $RefDataPath = "$SecuritySourceDir\\installationservices\\refswinstallationplugin\\test\\scripts\\data";
+my $IntegTestDataPath = "$SecuritySourceDir\\installationservices\\swinstallationfw\\test\\tusif\\scripts\\data";
+my $SifTestDataPath = "$SecuritySourceDir\\installationservices\\swinstallationfw\\test\\scripts\\data";
+my $BUILDDIR = "\\epoc32\\release\\$PLATFORM\\$CONFIGURATION";
+
+my $DATADIR = "$BUILDDIR\\z\\tusif\\tsifintegration\\data";
+my $ARMV5DATADIR = "\\epoc32\\data\\z\\tusif\\tsifintegration\\data";
+
+my $REFDATADIR = "$BUILDDIR\\z\\tusif\\tsifrefinstaller\\data";
+my $REFARMV5DATADIR = "\\epoc32\\data\\z\\tusif\\tsifrefinstaller\\data";
+
+my $BASE = 'base.sifrefpkg';
+my $BASE3 = 'base3.sifrefpkg';
+my $UPGRADE = 'upgrade.sifrefpkg';
+my $INVALID = 'invalid.sifrefpkg';
+my $INVALID2 = 'invalid2.sifrefpkg';
+my $INVALID3 = 'invalid3.sifrefpkg';
+my $INVALID4 = 'invalid4.sifrefpkg';
+my $INVALID5 = 'invalid5.sifrefpkg';
+my $INVALID6 = 'invalid6.sifrefpkg';
+my $INVALID7 = 'invalid7.sifrefpkg';
+my $INVALID8 = 'invalid8.sifrefpkg';
+my $INVALID9 = 'invalid9.sifrefpkg';
+my $INVALID10 = 'invalid10.sifrefpkg';
+my $INVALID11 = 'invalid11.sifrefpkg';
+my $INVALID12 = 'invalid12.sifrefpkg';
+my $BASE2 = 'base2.sifrefpkg';
+my $SISCHILD = 'sifintegrationtestbase.sis';
+my $FILEINUSETEST = 'fileinusetest.sifrefpkg';
+my $BINBASE = 'base.sifrefbinpkg';
+my $BINBASE3 = 'base3.sifrefbinpkg';
+my $BINUPGRADE = 'upgrade.sifrefbinpkg';
+my $BININVALID = 'invalid.sifrefbinpkg';
+my $BININVALID2 = 'invalid2.sifrefbinpkg';
+my $BININVALID3 = 'invalid3.sifrefbinpkg';
+my $BININVALID4 = 'invalid4.sifrefbinpkg';
+my $BININVALID5 = 'invalid5.sifrefbinpkg';
+my $BININVALID6 = 'invalid6.sifrefbinpkg';
+my $BININVALID7 = 'invalid7.sifrefbinpkg';
+my $BININVALID8 = 'invalid8.sifrefbinpkg';
+my $BININVALID9 = 'invalid9.sifrefbinpkg';
+my $BININVALID10 = 'invalid10.sifrefbinpkg';
+my $BININVALID11 = 'invalid11.sifrefbinpkg';
+my $BININVALID12 = 'invalid12.sifrefbinpkg';
+my $BINFILEINUSETEST = 'fileinusetest.sifrefbinpkg';
+my $BINCHILD = 'child.sifrefbinpkg';
+my $GRANDCHILD = 'test.nonnativepackage.txt';
+my $BINPARENT = 'compound.sifrefbinpkg';
+my $BINHOMOGENEOUSPARENT = 'homogeneouscompound.sifrefbinpkg';
+
+print "Generating simple packages...\n";
+
+# Create a simple base package
+MakeBinPkg("--pkg $RefSamplePath\\$BASE --binpkg $RefSamplePath\\$BINBASE");
+MakeBinPkg("--pkg $RefSamplePath\\$UPGRADE --binpkg $RefSamplePath\\$BINUPGRADE");
+MakeBinPkg("--pkg $RefSamplePath\\$INVALID --binpkg $RefSamplePath\\$BININVALID");
+MakeBinPkg("--pkg $RefDataPath\\$BASE3 --binpkg $RefDataPath\\$BINBASE3");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID2 --binpkg $RefDataPath\\$BININVALID2");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID3 --binpkg $RefDataPath\\$BININVALID3");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID4 --binpkg $RefDataPath\\$BININVALID4");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID5 --binpkg $RefDataPath\\$BININVALID5");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID6 --binpkg $RefDataPath\\$BININVALID6");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID7 --binpkg $RefDataPath\\$BININVALID7");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID8 --binpkg $RefDataPath\\$BININVALID8");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID9 --binpkg $RefDataPath\\$BININVALID9");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID10 --binpkg $RefDataPath\\$BININVALID10");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID11 --binpkg $RefDataPath\\$BININVALID11");
+MakeBinPkg("--pkg $RefDataPath\\$INVALID12 --binpkg $RefDataPath\\$BININVALID12");
+MakeBinPkg("--pkg $RefDataPath\\$FILEINUSETEST --binpkg $RefDataPath\\$BINFILEINUSETEST");
+print "Generating embedded packages...\n";
+
+# Create a compound package that consists of 3 embedded packages of the same type
+MakeBinPkg("perl $RefSamplePath\\makebinpkg.pl --pkg $RefDataPath\\$BASE2 --emb $RefSamplePath\\$BINBASE --emb $RefDataPath\\$BINBASE3 --binpkg $RefDataPath\\$BINHOMOGENEOUSPARENT");
+# Create a compound package that consists of 3 embedded packages of mixed types
+MakeBinPkg("perl $RefSamplePath\\makebinpkg.pl --pkg $RefSamplePath\\$BASE --emb $SifTestDataPath\\$GRANDCHILD --binpkg $IntegTestDataPath\\$BINCHILD");
+MakeBinPkg("perl $RefSamplePath\\makebinpkg.pl --pkg $RefDataPath\\$BASE2 --emb $IntegTestDataPath\\$BINCHILD --emb $BUILDDIR\\$SISCHILD --emb $RefDataPath\\$BINBASE3 --binpkg $IntegTestDataPath\\$BINPARENT");
+
+# Copy the generated package onto the Z drive
+# move reference packages
+my $CURREFDATADIR = '';
+if (lc($PLATFORM) ne "armv5")
+	{
+	$CURREFDATADIR = $REFDATADIR;
+	}
+else
+	{
+	$CURREFDATADIR = $REFARMV5DATADIR;
+	}
+unlink "$CURREFDATADIR\\$BINBASE";
+unlink "$CURREFDATADIR\\$BINUPGRADE";
+unlink "$CURREFDATADIR\\$BININVALID";
+unlink "$CURREFDATADIR\\$BININVALID2";
+mkdir "$CURREFDATADIR" unless -d "$CURREFDATADIR";
+move("$RefSamplePath\\$BINBASE", "$CURREFDATADIR\\$BINBASE");
+move("$RefSamplePath\\$BINUPGRADE", "$CURREFDATADIR\\$BINUPGRADE");
+move("$RefSamplePath\\$BININVALID", "$CURREFDATADIR\\$BININVALID");
+move("$RefDataPath\\$BINBASE3", "$CURREFDATADIR\\$BINBASE3");
+move("$RefDataPath\\$BININVALID2", "$CURREFDATADIR\\$BININVALID2");
+move("$RefDataPath\\$BININVALID3", "$CURREFDATADIR\\$BININVALID3");
+move("$RefDataPath\\$BININVALID4", "$CURREFDATADIR\\$BININVALID4");
+move("$RefDataPath\\$BININVALID5", "$CURREFDATADIR\\$BININVALID5");
+move("$RefDataPath\\$BININVALID6", "$CURREFDATADIR\\$BININVALID6");
+move("$RefDataPath\\$BININVALID7", "$CURREFDATADIR\\$BININVALID7");
+move("$RefDataPath\\$BININVALID8", "$CURREFDATADIR\\$BININVALID8");
+move("$RefDataPath\\$BININVALID9", "$CURREFDATADIR\\$BININVALID9");
+move("$RefDataPath\\$BININVALID10", "$CURREFDATADIR\\$BININVALID10");
+move("$RefDataPath\\$BININVALID11", "$CURREFDATADIR\\$BININVALID11");
+move("$RefDataPath\\$BININVALID12", "$CURREFDATADIR\\$BININVALID12");
+move("$RefDataPath\\$BINHOMOGENEOUSPARENT", "$CURREFDATADIR\\$BINHOMOGENEOUSPARENT");
+move("$RefDataPath\\$BINFILEINUSETEST", "$CURREFDATADIR\\$BINFILEINUSETEST");
+
+# move integration packages
+my $CURDATADIR = '';
+if (lc($PLATFORM) ne "armv5")
+	{
+	$CURDATADIR = $DATADIR;
+	}
+else
+	{
+	$CURDATADIR = $ARMV5DATADIR;
+	}
+
+unlink "$CURDATADIR\\$BINPARENT";
+mkdir "$CURDATADIR" unless -d "$CURDATADIR";
+move("$IntegTestDataPath\\$BINPARENT", "$CURDATADIR\\$BINPARENT");
+
+unlink "$IntegTestDataPath\\$BINCHILD";
+
+# Read the contents of a file into a string and return it
+sub MakeBinPkg ($) {
+	my ($args) = @_;
+	my $cmd = "perl $RefSamplePath\\makebinpkg.pl $args";
+	`$cmd`;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/createsisfiles.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,187 @@
+@rem
+@rem Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description: 
+@rem
+
+@echo off
+
+echo This script creates SIS files for SIF integration tests
+
+set PLATFORM=%1
+set CFG=%2
+
+set BUILDDIR=\epoc32\release\%PLATFORM%\%CFG%
+set PKGDIR=%SECURITYSOURCEDIR%\installationservices\swinstallationfw\test\tusif\scripts\data
+set DATADIR=%BUILDDIR%\z\tusif\tsif\data
+set ARMV5DATADIR=\epoc32\data\z\tusif\tsif\data
+set CERTDIR=%SECURITYSOURCEDIR%\installationservices\switestfw\testcertificates\usif
+
+set BASE=sifintegrationtestbase
+set UPGRADE=sifintegrationtestupgrade
+set INVALIDUPGRADE=sifintegrationtestinvalidupgrade
+set NOCAPSBASE=sifintegrationtestnocaps
+set INVALIDINSTALL=sifselfsignedwithprotecteduid
+set USERCAPSBASE=sifintegusercapsbase
+set COMPONENTINFOINTEGRATION=sifcomponentinfointegration
+set COMPONENTINFOINTEGRATIONPU=sifcomponentinfointegpu
+set COMPONENTINFOINTEGRATIONSP=sifcomponentinfointegsp
+set EMBEDDINGOUTERBASE=embeddingouterbase
+set EMBEDDEDINNERBASE1=embeddedinnerbase1
+set EMBEDDEDINNERBASE11=embeddedinnerbase11
+set EMBEDDEDINNERBASE2=embeddedinnerbase2
+set EMPTYNAMEANDVENDOR=emptynameandvendor
+set EMBEDDINGBASEWITHEXE=embeddingbasewithexe
+set EMBEDDEDBASEWITHUSERCAPSEXE=embeddedbasewithusercapsexe
+set EMBEDDEDBASEWITHEXE=sifintegrationtestbase
+set EMBEDDINGBASEWITHTEXT=embeddingbasewithtextandinnerwithexe
+set COMPONENTINFOWITHMULTIPLEFILES=sifintegrationtestmultiplefiles
+set COMPONENTINFOWITHEXTENSIONINDIFFERENTCASE=sifintegrationtestextensionindifferentcase
+set COMPONENTINFOWITHONLYDLL=sifintegrationtestwithonlydll
+set SUFFICIENTUSERCAPS=sifintegsufficientusercaps
+set DUMMYTEXT=dummy
+
+set CREATESISCMD=createsis create -pass usif
+set CREATESISEXISTINGCERTCMD=createsis create -key %CERTDIR%\root5ca_key.pem -cert %CERTDIR%\root5ca.pem
+
+rem Check if SIS files already exist
+if not exist %DATADIR%\%BASE%.sis goto generate_sis_files
+if not exist %DATADIR%\%UPGRADE%.sis goto generate_sis_files
+if not exist %DATADIR%\%INVALIDUPGRADE%.sis goto generate_sis_files
+if not exist %DATADIR%\%NOCAPSBASE%.sis goto generate_sis_files
+if not exist %DATADIR%\%INVALIDINSTALL%.sis goto generate_sis_files
+if not exist %DATADIR%\%USERCAPSBASE%.sis goto generate_sis_files
+if not exist %DATADIR%\%COMPONENTINFOINTEGRATION%.sis goto generate_sis_files
+if not exist %DATADIR%\%COMPONENTINFOINTEGRATIONPU%.sis goto generate_sis_files
+if not exist %DATADIR%\%COMPONENTINFOINTEGRATIONSP%.sis goto generate_sis_files
+if not exist %DATADIR%\%EMBEDDINGOUTERBASE%.sis goto generate_sis_files
+if not exist %DATADIR%\%EMPTYNAMEANDVENDOR%.sis goto generate_sis_files
+if not exist %DATADIR%\%EMBEDDINGBASEWITHEXE%.sis goto generate_sis_files
+if not exist %DATADIR%\%EMBEDDEDBASEWITHUSERCAPSEXE%.sis goto generate_sis_files
+if not exist %DATADIR%\%EMBEDDEDBASEWITHEXE%.sis goto generate_sis_files
+if not exist %DATADIR%\%EMBEDDINGBASEWITHTEXT%.sis goto generate_sis_files
+if not exist %DATADIR%\%COMPONENTINFOWITHMULTIPLEFILES%.sis goto generate_sis_files
+if not exist %DATADIR%\%COMPONENTINFOWITHEXTENSIONINDIFFERENTCASE%.sis goto generate_sis_files
+if not exist %DATADIR%\%COMPONENTINFOWITHONLYDLL%.sis goto generate_sis_files
+if not exist %DATADIR%\%SUFFICIENTUSERCAPS%.sis goto generate_sis_files
+
+goto:eof
+
+:generate_sis_files
+
+rem Copy pkg files for createsis.exe
+copy /y %PKGDIR%\%BASE%.pkg %BUILDDIR%\%BASE%.pkg
+copy /y %PKGDIR%\%UPGRADE%.pkg %BUILDDIR%\%UPGRADE%.pkg
+copy /y %PKGDIR%\%INVALIDUPGRADE%.pkg %BUILDDIR%\%INVALIDUPGRADE%.pkg
+copy /y %PKGDIR%\%NOCAPSBASE%.pkg %BUILDDIR%\%NOCAPSBASE%.pkg
+copy /y %PKGDIR%\%INVALIDINSTALL%.pkg %BUILDDIR%\%INVALIDINSTALL%.pkg
+copy /y %PKGDIR%\%USERCAPSBASE%.pkg %BUILDDIR%\%USERCAPSBASE%.pkg
+copy /y %PKGDIR%\%EMBEDDINGBASEWITHEXE%.pkg %BUILDDIR%\%EMBEDDINGBASEWITHEXE%.pkg
+copy /y %PKGDIR%\%EMBEDDEDBASEWITHUSERCAPSEXE%.pkg %BUILDDIR%\%EMBEDDEDBASEWITHUSERCAPSEXE%.pkg
+copy /y %PKGDIR%\%EMBEDDEDBASEWITHEXE%.pkg %BUILDDIR%\%EMBEDDEDBASEWITHEXE%.pkg
+copy /y %PKGDIR%\%DUMMYTEXT%.txt %BUILDDIR%\%DUMMYTEXT%.txt
+copy /y %PKGDIR%\%EMBEDDINGBASEWITHTEXT%.pkg %BUILDDIR%\%EMBEDDINGBASEWITHTEXT%.pkg
+
+copy /y %PKGDIR%\%COMPONENTINFOWITHMULTIPLEFILES%.pkg %BUILDDIR%\%COMPONENTINFOWITHMULTIPLEFILES%.pkg
+copy /y %PKGDIR%\%COMPONENTINFOWITHEXTENSIONINDIFFERENTCASE%.pkg %BUILDDIR%\%COMPONENTINFOWITHEXTENSIONINDIFFERENTCASE%.pkg
+copy /y %PKGDIR%\%COMPONENTINFOWITHONLYDLL%.pkg %BUILDDIR%\%COMPONENTINFOWITHONLYDLL%.pkg
+copy /y %PKGDIR%\%SUFFICIENTUSERCAPS%.pkg %BUILDDIR%\%SUFFICIENTUSERCAPS%.pkg
+
+pushd %PKGDIR%
+rem These package uses local files in the package directory
+call %CREATESISEXISTINGCERTCMD% %COMPONENTINFOINTEGRATION%.pkg
+move %COMPONENTINFOINTEGRATION%.sis %BUILDDIR%
+call %CREATESISEXISTINGCERTCMD% %COMPONENTINFOINTEGRATIONPU%.pkg
+move %COMPONENTINFOINTEGRATIONPU%.sis %BUILDDIR%
+call %CREATESISEXISTINGCERTCMD% %COMPONENTINFOINTEGRATIONSP%.pkg
+move %COMPONENTINFOINTEGRATIONSP%.sis %BUILDDIR%
+call %CREATESISEXISTINGCERTCMD% %EMPTYNAMEANDVENDOR%.pkg
+move %EMPTYNAMEANDVENDOR%.sis %BUILDDIR%
+
+rem construct the embedded ackages inner to outer.
+call %CREATESISEXISTINGCERTCMD% %EMBEDDEDINNERBASE2%.pkg
+call %CREATESISEXISTINGCERTCMD% %EMBEDDEDINNERBASE1%.pkg
+call %CREATESISEXISTINGCERTCMD% %EMBEDDEDINNERBASE11%.pkg
+call %CREATESISEXISTINGCERTCMD% %EMBEDDINGOUTERBASE%.pkg
+move %EMBEDDINGOUTERBASE%.sis %BUILDDIR%
+
+rem Make sure that we leave no certificates after createsis, otherwise checklocationofcertificates test will return an error
+del /Q *.cer
+
+popd
+rem Go to build directory, as the packages below use dynamically built executables
+pushd %BUILDDIR%
+
+rem Generate SIS files for SIF integration tests 
+rem We avoid using temporary ceritificates for installed SIS files, as their FROM date may be later than the current date/time in the testing env.
+call %CREATESISEXISTINGCERTCMD% %BASE%.pkg
+call %CREATESISEXISTINGCERTCMD% %UPGRADE%.pkg
+call %CREATESISEXISTINGCERTCMD% %INVALIDUPGRADE%.pkg
+call %CREATESISCMD% %NOCAPSBASE%.pkg
+call %CREATESISCMD% %INVALIDINSTALL%.pkg
+call %CREATESISEXISTINGCERTCMD% %USERCAPSBASE%.pkg
+call %CREATESISEXISTINGCERTCMD% %EMBEDDEDBASEWITHUSERCAPSEXE%.pkg
+call %CREATESISEXISTINGCERTCMD% %EMBEDDINGBASEWITHEXE%.pkg
+call %CREATESISEXISTINGCERTCMD% %EMBEDDINGBASEWITHTEXT%.pkg
+call %CREATESISEXISTINGCERTCMD% %COMPONENTINFOWITHMULTIPLEFILES%.pkg
+call %CREATESISEXISTINGCERTCMD% %COMPONENTINFOWITHEXTENSIONINDIFFERENTCASE%.pkg
+call %CREATESISEXISTINGCERTCMD% %COMPONENTINFOWITHONLYDLL%.pkg
+call %CREATESISEXISTINGCERTCMD% %SUFFICIENTUSERCAPS%.pkg
+
+rem Dynamically built executables are removed
+del sifintegsufficientusercaps.exe
+del sifintegusercapsbasepackage.exe
+
+rem Copy generated SIS files onto the Z drive
+if /i %PLATFORM% neq ARMV5 (
+copy /y %BASE%.sis %DATADIR%\%BASE%.sis
+copy /y %UPGRADE%.sis %DATADIR%\%UPGRADE%.sis
+copy /y %INVALIDUPGRADE%.sis %DATADIR%\%INVALIDUPGRADE%.sis
+copy /y %NOCAPSBASE%.sis %DATADIR%\%NOCAPSBASE%.sis
+copy /y %INVALIDINSTALL%.sis %DATADIR%\%INVALIDINSTALL%.sis
+copy /y %USERCAPSBASE%.sis %DATADIR%\%USERCAPSBASE%.sis
+copy /y %COMPONENTINFOINTEGRATION%.sis %DATADIR%\%COMPONENTINFOINTEGRATION%.sis
+copy /y %COMPONENTINFOINTEGRATIONPU%.sis %DATADIR%\%COMPONENTINFOINTEGRATIONPU%.sis
+copy /y %COMPONENTINFOINTEGRATIONSP%.sis %DATADIR%\%COMPONENTINFOINTEGRATIONSP%.sis
+copy /y %EMBEDDINGOUTERBASE%.sis %DATADIR%\%EMBEDDINGOUTERBASE%.sis
+copy /y %EMBEDDEDBASEWITHUSERCAPSEXE%.sis %DATADIR%\%EMBEDDEDBASEWITHUSERCAPSEXE%.sis
+copy /y %EMPTYNAMEANDVENDOR%.sis %DATADIR%\%EMPTYNAMEANDVENDOR%.sis
+copy /y %EMBEDDINGBASEWITHEXE%.sis %DATADIR%\%EMBEDDINGBASEWITHEXE%.sis
+copy /y %EMBEDDINGBASEWITHTEXT%.sis %DATADIR%\%EMBEDDINGBASEWITHTEXT%.sis
+copy /y %COMPONENTINFOWITHMULTIPLEFILES%.sis %DATADIR%\%COMPONENTINFOWITHMULTIPLEFILES%.sis
+copy /y %COMPONENTINFOWITHEXTENSIONINDIFFERENTCASE%.sis %DATADIR%\%COMPONENTINFOWITHEXTENSIONINDIFFERENTCASE%.sis
+copy /y %COMPONENTINFOWITHONLYDLL%.sis %DATADIR%\%COMPONENTINFOWITHONLYDLL%.sis
+copy /y %SUFFICIENTUSERCAPS%.sis %DATADIR%\%SUFFICIENTUSERCAPS%.sis
+) else (
+mkdir %ARMV5DATADIR%
+copy /y %BASE%.sis %ARMV5DATADIR%\%BASE%.sis
+copy /y %UPGRADE%.sis %ARMV5DATADIR%\%UPGRADE%.sis
+copy /y %INVALIDUPGRADE%.sis %ARMV5DATADIR%\%INVALIDUPGRADE%.sis
+copy /y %NOCAPSBASE%.sis %ARMV5DATADIR%\%NOCAPSBASE%.sis
+copy /y %INVALIDINSTALL%.sis %ARMV5DATADIR%\%INVALIDINSTALL%.sis
+copy /y %USERCAPSBASE%.sis %ARMV5DATADIR%\%USERCAPSBASE%.sis
+copy /y %COMPONENTINFOINTEGRATION%.sis %DATADIR%\%COMPONENTINFOINTEGRATION%.sis
+copy /y %COMPONENTINFOINTEGRATIONPU%.sis %ARMV5DATADIR%\%COMPONENTINFOINTEGRATIONPU%.sis
+copy /y %COMPONENTINFOINTEGRATIONSP%.sis %ARMV5DATADIR%\%COMPONENTINFOINTEGRATIONSP%.sis
+copy /y %EMBEDDEDBASEWITHUSERCAPSEXE%.sis %DATADIR%\%EMBEDDEDBASEWITHUSERCAPSEXE%.sis
+copy /y %EMBEDDINGOUTERBASE%.sis %DATADIR%\%EMBEDDINGOUTERBASE%.sis
+copy /y %EMPTYNAMEANDVENDOR%.sis %DATADIR%\%EMPTYNAMEANDVENDOR%.sis
+copy /y %EMBEDDINGBASEWITHEXE%.sis %DATADIR%\%EMBEDDINGBASEWITHEXE%.sis
+copy /y %EMBEDDINGBASEWITHTEXT%.sis %DATADIR%\%EMBEDDINGBASEWITHTEXT%.sis
+copy /y %COMPONENTINFOWITHMULTIPLEFILES%.sis %DATADIR%\%COMPONENTINFOWITHMULTIPLEFILES%.sis
+copy /y %COMPONENTINFOWITHEXTENSIONINDIFFERENTCASE%.sis %DATADIR%\%COMPONENTINFOWITHEXTENSIONINDIFFERENTCASE%.sis
+copy /y %COMPONENTINFOWITHONLYDLL%.sis %DATADIR%\%COMPONENTINFOWITHONLYDLL%.sis
+copy /y %SUFFICIENTUSERCAPS%.sis %DATADIR%\%SUFFICIENTUSERCAPS%.sis
+)
+
+popd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/sifintegrationtestbasepackage.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,31 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET			sifIntegrationTestBase.exe
+TARGETTYPE		exe
+
+UID				0x10000007 0x80285DE0
+VENDORID		0x0
+
+SOURCEPATH		../source
+SOURCE			sifintegrationtestbasepackage.cpp
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/sifintegrationtestupgradepackage.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,31 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET			sifIntegrationTestUpgrade.exe
+TARGETTYPE		exe
+
+UID				0x10000007 0x80285DE0
+VENDORID		0x0
+
+SOURCEPATH		../source
+SOURCE			sifintegrationtestupgradepackage.cpp
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/sifintegsufficientusercaps.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,32 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+TARGET			sifintegsufficientusercaps.exe
+TARGETTYPE		exe
+
+UID				0x10000007 0x80285DE0
+VENDORID		0x0
+
+SOURCEPATH		../source
+SOURCE			sifintegsufficientusercaps.cpp
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib
+SMPSAFE
+CAPABILITY ReadDeviceData WriteDeviceData
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/sifintegusercapsbasepackage.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,32 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET			sifintegusercapsbasepackage.exe
+TARGETTYPE		exe
+CAPABILITY 		ReadUserData WriteUserData
+
+UID				0x10000007 0x80285DE0
+VENDORID		0x0
+
+SOURCEPATH		../source
+SOURCE			sifintegusercapsbasepackage.cpp
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/siftest.makefile	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,42 @@
+# 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 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".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+# siftest.amkefile is an extended test makefile which generates
+# self-signed SIS files for the USIF integration tests
+
+
+do_nothing:
+	rem do nothing
+
+#
+# The targets invoked by abld...
+#
+
+MAKMAKE : do_nothing
+FREEZE : do_nothing
+LIB : do_nothing
+RESOURCE : do_nothing
+CLEANLIB : do_nothing
+BLD : do_nothing
+SAVESPACE : do_nothing
+CLEAN : do_nothing
+RELEASABLES : do_nothing
+
+FINAL : 
+	echo ***************************************************************
+	echo maketestsis - Running createsisfiles.bat for $(PLATFORM) $(CFG)
+	echo ***************************************************************
+	createsisfiles.bat $(PLATFORM) $(CFG)
+	perl createleesisfiles.pl $(PLATFORM) $(CFG)
+	perl createrefbinfiles.pl $(PLATFORM) $(CFG)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/siftestintegrationlockfile.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,33 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+// siftestintegrationlockfile.mmp
+//
+
+TARGET        siftestintegrationlockfile.exe
+TARGETTYPE    exe
+UID           0x0 0x10285BBF
+VENDORID 0x0
+
+SOURCEPATH    ../source/testexes
+SOURCE        siftestintegrationlockfile.cpp
+
+USERINCLUDE   .
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY       euser.lib bafl.lib efsrv.lib
+SMPSAFE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/tsif.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET			tusifsuite.exe
+TARGETTYPE		exe
+UID				0x1000007A 0x10285BCC
+
+CAPABILITY		ReadUserData TrustedUI
+
+//Please add any change under here
+SOURCEPATH		../source
+SOURCE			tsifsuiteserver.cpp
+SOURCE			tsifsuitestepbase.cpp
+SOURCE			tsifoperationstep.cpp
+SOURCE			tsifcommonverificationstep.cpp
+SOURCE			tsifgenericbrowserinstallstep.cpp
+SOURCE			tsifcommonunitteststep.cpp
+
+USERINCLUDE		../source
+USERINCLUDE		../../../../swcomponentregistry/inc_private
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+//Please add your system include under here. 
+LIBRARY			euser.lib
+LIBRARY			efsrv.lib
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib
+LIBRARY			scsclient.lib
+
+//Please add your libraries under here. For example:
+LIBRARY			sif.lib estor.lib apgrfx.lib apparc.lib
+
+LIBRARY			scrclient.lib sisregistryclient.lib scrdatabase.lib oomtestbase.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/group/tsifpkgrec.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Mime type recogniser for SIF test package type
+*
+*/
+
+
+/**
+ @file
+*/
+TARGET			tsifpkgrec.dll
+
+CAPABILITY		TrustedUI ProtServ
+
+TARGETTYPE		PLUGIN
+UID				0x10009D8D 0x102866F0
+VENDORID 		0x70000001
+
+SOURCEPATH		../source
+SOURCE			tsifpkgrec.cpp
+
+START RESOURCE	102866F0.rss
+TARGET			tsifpkgrec.rsc
+END
+
+USERINCLUDE		../source
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib apmime.lib efsrv.lib
+
+START WINS
+BASEADDRESS		0x44700000
+END
+
+START MARM
+END
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/dummy.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+Just a dummy test file. I'm used for component info tests - if you'll change a byte here you'll have to update quite a few tests, so do it only if you feel creative.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/dummyAugmentation.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+Just a dummy augmentation test file. I'm used for component info tests - if you'll change a byte here you'll have to update quite a few tests, so do it only if you feel creative.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/dummyUpgrade.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+Just a dummy upgrade test file. I'm used for component info tests - if you'll change a byte here you'll have to update quite a few tests, so do it only if you feel creative.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/embeddedbasewithusercapsexe.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,26 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Embedded Base With User Caps EXE"}, (0x80706056), 1, 0, 0, TYPE=SA
+
+%{"Security and Data Privacy"}
+:"Security and Data Privacy"
+
+;Executable file with ReadUserData and WriteUserData (User grantable) capbilities enabled to selected drive.
+"sifintegusercapsbasepackage.exe"-"c:\sys\bin\sifintegusercapsbasepackage.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/embeddedinnerbase1.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Embedded Inner Base-1"}, (0x80706051), 1, 0, 0, TYPE=SA
+
+%{"Security and Data Privacy"}
+:"Security and Data Privacy"
+
+;Use a text file - using an executable file can break tests, as we compare installed size and executable's size can change easily
+"dummyupgrade.txt"-"c:\embeddedinnerbase1\dummy.txt", FF
+
+;embedded
+@"embeddedinnerbase2.sis",(0x80706052)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/embeddedinnerbase11.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,26 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Embedded Inner Base-11"}, (0x80706053), 1, 0, 0, TYPE=SA
+
+%{"Security and Data Privacy"}
+:"Security and Data Privacy"
+
+;Use a text file - using an executable file can break tests, as we compare installed size and executable's size can change easily
+"dummy.txt"-"c:\embeddedinnerbase11\dummy.txt", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/embeddedinnerbase2.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,26 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Embedded Inner Base-2"}, (0x80706052), 1, 0, 0, TYPE=SA
+
+%{"Security and Data Privacy"}
+:"Security and Data Privacy"
+
+;Use a text file - using an executable file can break tests, as we compare installed size and executable's size can change easily
+"dummyaugmentation.txt"-"c:\embeddedinnerbase2\dummy.txt", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/embeddingbasewithexe.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Embedding Base With EXE"}, (0x80706055), 1, 0, 0, TYPE=SA
+
+%{"Security and Data Privacy"}
+:"Security and Data Privacy"
+
+;Executable file with out any user grantable capability to selected drive.
+"sifIntegrationTestBase.exe"-"c:\sys\bin\sifIntegrationTest.exe", FF
+
+;embedded
+@"embeddedbasewithusercapsexe.sis",(0x80706056)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/embeddingbasewithtextandinnerwithexe.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Embedding Base With EXE"}, (0x80706055), 1, 0, 0, TYPE=SA
+
+%{"Security and Data Privacy"}
+:"Security and Data Privacy"
+
+;Use a text file 
+"dummy.txt"-"c:\dummy.txt", FF
+
+;embedded
+@"sifintegrationtestbase.sis",(0x80534946)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/embeddingouterbase.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,31 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Embedding Outer Base"}, (0x80706050), 1, 0, 0, TYPE=SA
+
+%{"Security and Data Privacy"}
+:"Security and Data Privacy"
+
+;Use a text file - using an executable file can break tests, as we compare installed size and executable's size can change easily
+"dummy.txt"-"c:\embeddingouterbase\dummy.txt", FF
+
+;embedded
+@"embeddedinnerbase1.sis",(0x80706051)
+
+@"embeddedinnerbase11.sis",(0x80706053)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/emptynameandvendor.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,26 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{""}, (0x80706054), 1, 0, 0, TYPE=SA
+
+%{""}
+:""
+
+;Use a text file - using an executable file can break tests, as we compare installed size and executable's size can change easily
+"dummy.txt"-"c:\dummy.txt", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifcomponentinfointegpu.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Component Info Integration Test"}, (0x80545946), 2, 0, 0, TYPE=PU
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Use a text file - using an executable file can break tests, as we compare installed size and executable's size can change easily
+"dummyUpgrade.txt"-"!:\dummyUpgrade.txt", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifcomponentinfointegration.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Component Info Integration Test"}, (0x80545946), 1, 0, 0, TYPE=SA
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Use a text file - using an executable file can break tests, as we compare installed size and executable's size can change easily
+"dummy.txt"-"c:\dummy.txt", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifcomponentinfointegsp.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Component Info Integration Test Patch"}, (0x80545946), 3, 0, 0, TYPE=SP
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Use a text file - using an executable file can break tests, as we compare installed size and executable's size can change easily
+"dummyAugmentation.txt"-"c:\dummyAugmentation.txt", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestbase.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Integration Test"}, (0x80534946), 1, 0, 0, TYPE=SA
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Ordinary file to selected drive. 
+"sifIntegrationTestBase.exe"-"c:\sys\bin\sifIntegrationTest.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestextensionindifferentcase.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,30 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Integration Test"}, (0x80534946), 1, 0, 0, TYPE=SA
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+ 
+;Only used for Get component Info
+"sifIntegrationTestBase.exe"-"c:\sys\bin\sifIntegrationTest.eXe", FF
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestinvalidupgrade.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Integration Test"}, (0x88534946), 2, 0, 0, TYPE=PU
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Ordinary file to selected drive. 
+"sifIntegrationTestUpgrade.exe"-"c:\sys\bin\sifIntegrationTest.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestmultiplefiles.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,30 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Integration Test"}, (0x80534946), 1, 0, 0, TYPE=SA
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Ordinary file to selected drive.
+"dummy.txt"-"c:\dummy.txt",FF 
+"sifIntegrationTestBase.exe"-"c:\sys\bin\sifIntegrationTest.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestnocaps.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif No Capability Test"}, (0x88534946), 1, 1, 1, TYPE=SA
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Ordinary file to selected drive. 
+"sifIntegrationTestUpgrade.exe"-"c:\sys\bin\sifIntegrationTest.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestupgrade.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Integration Test"}, (0x80534946), 2, 0, 0, TYPE=PU
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Ordinary file to selected drive. 
+"sifIntegrationTestUpgrade.exe"-"c:\sys\bin\sifIntegrationTest.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifintegrationtestwithonlydll.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Integration Test"}, (0x80534946), 1, 0, 0, TYPE=SA
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Used for testing GetcomponentInfo only
+"tsifpkgrec.dll"-"c:\sys\bin\tsifpkgrec.dll", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifintegsufficientusercaps.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Sufficient Caps"}, (0x88534947), 1, 0, 0, TYPE=SA
+
+; Language-specific vendor names
+%{"Installation Team"}
+
+; Unique, global vendor name
+:"Installation Team"
+
+;Ordinary file to selected drive. 
+"sifintegsufficientusercaps.exe"-"c:\sys\bin\sifintegsufficientusercaps.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifintegusercapsbase.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif User Caps Base"}, (0x88534947), 1, 0, 0, TYPE=SA
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Ordinary file to selected drive. 
+"sifintegusercapsbasepackage.exe"-"c:\sys\bin\sifintegusercapsbasepackage.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifselfsignedwithprotecteduid.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Self Signed With Protected Uid"}, (0x10285DE0), 1, 0, 0, TYPE=SA
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Ordinary file to selected drive. 
+"sifIntegrationTestBase.exe"-"c:\sys\bin\sifIntegrationTest.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifswtypebase.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,37 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif LEE Integration Test"}, (0x77534946), 1, 0, 0, TYPE=SA
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;LEE registration file
+"\epoc32\<ZDRIVEMIDPATH>\z\tusif\tswtype\data\swtypereginfo.xml"-"c:\resource\usif\leestore\77534946.xml", FF
+;SIF plug-in
+"\epoc32\<BUILDMIDPATH>\testnonnativeplugin2.dll"-"c:\sys\bin\testnonnativeplugin2.dll", FF
+"\epoc32\<ZDRIVEMIDPATH>\z\resource\plugins\testnonnativeplugin2.rsc"-"c:\resource\plugins\testnonnativeplugin2.rsc", FF
+;test package recognizer
+"\epoc32\<BUILDMIDPATH>\tsifpkgrec.dll"-"c:\sys\bin\tsifpkgrec.dll", FF
+"\epoc32\<ZDRIVEMIDPATH>\z\resource\plugins\tsifpkgrec.rsc"-"c:\resource\plugins\tsifpkgrec.rsc", FF
+;example LEE executable
+"\epoc32\<BUILDMIDPATH>\sifIntegrationTestBase.exe"-"c:\sys\bin\sifIntegrationTest.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifswtypeupgrade.pkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,37 @@
+;
+; 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 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".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Languages
+&EN
+
+;Header
+#{"Upgrade Sif LEE Integration Test"}, (0x77534946), 1, 0, 0, TYPE=PU
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;LEE registration file
+"\epoc32\<ZDRIVEMIDPATH>\z\tusif\tswtype\data\swtypereginfo.xml"-"c:\resource\usif\leestore\77534946.xml", FF
+;SIF plug-in
+"\epoc32\<BUILDMIDPATH>\testnonnativeplugin2.dll"-"c:\sys\bin\testnonnativeplugin2.dll", FF
+"\epoc32\<ZDRIVEMIDPATH>\z\resource\plugins\testnonnativeplugin2.rsc"-"c:\resource\plugins\testnonnativeplugin2.rsc", FF
+;test package recognizer
+"\epoc32\<BUILDMIDPATH>\tsifpkgrec.dll"-"c:\sys\bin\tsifpkgrec.dll", FF
+"\epoc32\<ZDRIVEMIDPATH>\z\resource\plugins\tsifpkgrec.rsc"-"c:\resource\plugins\tsifpkgrec.rsc", FF
+;example LEE executable
+"\epoc32\<BUILDMIDPATH>\sifIntegrationTestUpgrade.exe"-"c:\sys\bin\sifIntegrationTest.exe", FF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/swtype.dtd	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,13 @@
+<!ELEMENT LayeredExecutionEnvironments (softwareType+)>
+
+<!ELEMENT softwareType (localizedName*,mimeType+,sifPluginUid,installerSecureId,executionLayerSecureId)>
+<!ATTLIST softwareType name CDATA #REQUIRED>
+
+<!ELEMENT localizedName (#PCDATA)>
+<!ATTLIST localizedName language CDATA #REQUIRED>
+
+<!ELEMENT sifPluginUid (#PCDATA)>
+
+<!ELEMENT installerSecureId (#PCDATA)>
+
+<!ELEMENT executionLayerSecureId (#PCDATA)>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/swtypereginfo.xml	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE LayeredExecutionEnvironments SYSTEM "swtype.dtd">
+<LayeredExecutionEnvironments>
+	<softwareType name="testSoftwareType">
+		<localizedName language="15">testSwTypeLoc15</localizedName>
+		<localizedName language="31">testSwTypeLoc31</localizedName>
+		<mimeType>binary/sif-testpkg</mimeType>
+		<sifPluginUid>102866EF</sifPluginUid>
+		<installerSecureId>10285BCB</installerSecureId>
+		<executionLayerSecureId>80285DE0</executionLayerSecureId>
+	</softwareType>
+</LayeredExecutionEnvironments>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/test.siftestpkg	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+Æëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèêÆëí^ÃSV‹t$WVèê
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/tsifintegration.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,938 @@
+
+[GetComponentInfoByFileName]
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=False
+root.softwareTypeName=plain
+root.componentName=Test Component
+root.componentVersion=1.0.0
+root.componentVendor=Symbian
+root.scomoState=0
+root.installStatus=0
+root.componentId=12345678
+root.globalComponentId=test.nonnativepackage.txt
+root.authenticity=1
+root.userGrantableCapsBitMask=49152 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=1234
+root.hasExecutable=False
+
+[GetComponentInfoByFileHandle]
+packageFile=z:\tusif\tsif\data\test.nonnativepackage.txt
+operationByFileHandle=True
+root.softwareTypeName=plain
+root.componentName=Test Component
+root.componentVersion=1.0.0
+root.componentVendor=Symbian
+root.scomoState=0
+root.installStatus=0
+root.componentId=12345678
+root.globalComponentId=test.nonnativepackage.txt
+root.authenticity=1
+root.userGrantableCapsBitMask=49152 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=1234
+root.hasExecutable=False
+
+[GetComponentInfoOverflowByFileName]
+packageFile=z:\tusif\tsif\data\test.overflow.txt
+operationByFileHandle=False
+root.softwareTypeName=plain
+root.componentName=Test Component
+root.componentVersion=1.0.0
+root.componentVendor=Symbian
+root.scomoState=0
+root.installStatus=0
+root.componentId=12345678
+root.globalComponentId=test.nonnativepackage.txt
+root.authenticity=1
+root.userGrantableCapsBitMask=49152 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=1234
+root.hasExecutable=False
+
+[GetComponentInfoByFileNameForUninstalledCompoundComponent]
+packageFile=z:\tusif\tsifintegration\data\compound.sifrefbinpkg
+operationByFileHandle=False
+compareMaxInstalledSize=False
+root.softwareTypeName=reference
+root.componentName=SIF Reference Component 2
+root.componentVersion=1.00(0)
+root.componentVendor=Symbian
+root.scomoState=0
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=SIF Reference Component 2
+root.authenticity=0
+root.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=3072
+root.hasExecutable=False
+root.numChildren=3
+root.child0.softwareTypeName=reference
+root.child0.componentName=SIF Reference Component 3
+root.child0.componentVersion=1.00(0)
+root.child0.componentVendor=Symbian
+root.child0.scomoState=0
+root.child0.installStatus=0
+root.child0.componentId=0
+root.child0.globalComponentId=SIF Reference Component 3
+root.child0.authenticity=0
+root.child0.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.child0.maxInstalledSize=0
+root.child0.hasExecutable=False
+root.child1.softwareTypeName=native
+root.child1.componentName=Sif Integration Test
+root.child1.componentVersion=1.0.0
+root.child1.componentVendor=Security Team
+root.child1.scomoState=0
+root.child1.installStatus=0
+root.child1.componentId=0
+root.child1.globalComponentId=80534946
+root.child1.authenticity=1
+root.child1.userGrantableCapsBitMask=0
+root.child1.maxInstalledSize=125244
+root.child1.hasExecutable=True
+root.child2.softwareTypeName=reference
+root.child2.componentName=SIF Reference Component
+root.child2.componentVersion=1.00(0)
+root.child2.componentVendor=Symbian
+root.child2.scomoState=0
+root.child2.installStatus=0
+root.child2.componentId=0
+root.child2.globalComponentId=SIF Reference Component
+root.child2.authenticity=0
+root.child2.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.child2.maxInstalledSize=3072
+root.child2.hasExecutable=False
+root.child2.numChildren=1
+root.child2.child0.softwareTypeName=plain
+root.child2.child0.componentName=Test Component
+root.child2.child0.componentVersion=1.0.0
+root.child2.child0.componentVendor=Symbian
+root.child2.child0.scomoState=0
+root.child2.child0.installStatus=0
+root.child2.child0.componentId=12345678
+root.child2.child0.globalComponentId=test.nonnativepackage.txt
+root.child2.child0.authenticity=1
+root.child2.child0.userGrantableCapsBitMask=49152 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.child2.child0.maxInstalledSize=1234
+root.child2.child0.hasExecutable=False
+
+
+[GetComponentInfoByFileHandleForUninstalledCompoundComponent]
+packageFile=z:\tusif\tsifintegration\data\compound.sifrefbinpkg
+operationByFileHandle=True
+compareMaxInstalledSize=False
+root.softwareTypeName=reference
+root.componentName=SIF Reference Component 2
+root.componentVersion=1.00(0)
+root.componentVendor=Symbian
+root.scomoState=0
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=SIF Reference Component 2
+root.authenticity=0
+root.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.maxInstalledSize=3072
+root.hasExecutable=False
+root.numChildren=3
+root.child0.softwareTypeName=reference
+root.child0.componentName=SIF Reference Component 3
+root.child0.componentVersion=1.00(0)
+root.child0.componentVendor=Symbian
+root.child0.scomoState=0
+root.child0.installStatus=0
+root.child0.componentId=0
+root.child0.globalComponentId=SIF Reference Component 3
+root.child0.authenticity=0
+root.child0.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.child0.maxInstalledSize=0
+root.child0.hasExecutable=False
+root.child1.softwareTypeName=native
+root.child1.componentName=Sif Integration Test
+root.child1.componentVersion=1.0.0
+root.child1.componentVendor=Security Team
+root.child1.scomoState=0
+root.child1.installStatus=0
+root.child1.componentId=0
+root.child1.globalComponentId=80534946
+root.child1.authenticity=1
+root.child1.userGrantableCapsBitMask=0
+root.child1.maxInstalledSize=125244
+root.child1.hasExecutable=True
+root.child2.softwareTypeName=reference
+root.child2.componentName=SIF Reference Component
+root.child2.componentVersion=1.00(0)
+root.child2.componentVendor=Symbian
+root.child2.scomoState=0
+root.child2.installStatus=0
+root.child2.componentId=0
+root.child2.globalComponentId=SIF Reference Component
+root.child2.authenticity=0
+root.child2.userGrantableCapsBitMask=98304 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.child2.maxInstalledSize=3072
+root.child2.hasExecutable=False
+root.child2.numChildren=1
+root.child2.child0.softwareTypeName=plain
+root.child2.child0.componentName=Test Component
+root.child2.child0.componentVersion=1.0.0
+root.child2.child0.componentVendor=Symbian
+root.child2.child0.scomoState=0
+root.child2.child0.installStatus=0
+root.child2.child0.componentId=12345678
+root.child2.child0.globalComponentId=test.nonnativepackage.txt
+root.child2.child0.authenticity=1
+root.child2.child0.userGrantableCapsBitMask=49152 // ECapabilityReadUserData, ECapabilityWriteUserData
+root.child2.child0.maxInstalledSize=1234
+root.child2.child0.hasExecutable=False
+
+[InstallByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallHighVersionByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestupgradehigh.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallByFileHandle]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=True
+useEnhancedApi=False
+
+[InstallInactiveByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=False
+useEnhancedApi=True
+pluginOpaqueArgumentName0=InstallInactive
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=ExtendedErrCode
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=0
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=String
+pluginRefOpaqueResultValue1=__ANY_VALUE_PERMITTED__
+
+[InstallCompoundComponentByFileName]
+packageFile=z:\tusif\tsifintegration\data\compound.sifrefbinpkg
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallCompoundComponentByFileHandle]
+packageFile=z:\tusif\tsifintegration\data\compound.sifrefbinpkg
+operationByFileHandle=True
+useEnhancedApi=False
+
+[UninstallByNameAndVendor]
+componentName=Sif Integration Test
+componentVendor=Security Team
+useEnhancedApi=False
+
+[AsynchronousCancelInstallByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=False
+useEnhancedApi=False
+cancelAfter=100
+
+[AsynchronousCancelInstallByFileHandle]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=True
+useEnhancedApi=False
+cancelAfter=100
+
+[GenericBrowserInstallRefPkgByFileName]
+packageFile=z:\tusif\tsifrefinstaller\data\base.sifrefbinpkg
+operationByFileHandle=False
+
+[GenericBrowserInstallRefPkgByFileHandle]
+packageFile=z:\tusif\tsifrefinstaller\data\upgrade.sifrefbinpkg
+operationByFileHandle=True
+
+[UninstallRefPkgByNameAndVendor]
+componentName=SIF Reference Component
+componentVendor=Symbian
+useEnhancedApi=False
+
+[UninstallRootPkgByNameAndVendor]
+componentName=SIF Reference Component
+componentVendor=Symbian
+useEnhancedApi=False
+
+[UninstallRootChild0PkgByNameAndVendor]
+componentName=SIF Reference Component 2
+componentVendor=Symbian
+useEnhancedApi=False
+
+[UninstallRootChild1PkgByNameAndVendor]
+componentName=Sif Integration Test
+componentVendor=Security Team
+useEnhancedApi=False
+
+[UninstallRootChild2PkgByNameAndVendor]
+componentName=SIF Reference Component 3
+componentVendor=Symbian
+useEnhancedApi=False
+
+[UninstallRootChild0Child0PkgByNameAndVendor]
+componentName=test.nonnativepackage.txt
+componentVendor=Symbian
+useEnhancedApi=False
+
+[VerifyRefPackageNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file1.ref
+packageFile1=c:\RefComponent\file2.ref
+packageFile2=c:\RefComponent\file3.ref
+packageFile3=c:\RefComponent\file4.ref
+
+[VerifyRefBasePackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file1.ref
+packageFile1=c:\RefComponent\file2.ref
+packageFile2=c:\RefComponent\file3.ref
+scomoState=1
+
+[VerifyRefUpgradePackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file3.ref
+packageFile1=c:\RefComponent\file4.ref
+scomoState=1
+
+[VerifyRootPkgExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file1.ref
+packageFile1=c:\RefComponent\file2.ref
+packageFile2=c:\RefComponent\file3.ref
+scomoState=1
+
+[VerifyRootChild0PkgExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component 2
+componentVendor=Symbian
+packageFile0=c:\RefComponent2\file1.ref
+packageFile1=c:\RefComponent2\file2.ref
+packageFile2=c:\RefComponent2\file3.ref
+scomoState=1
+
+[VerifyRootChild1PkgExistence]
+verifyExistence=True
+componentName=Sif Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+executableReturnCode=1397310977
+scomoState=1
+
+[VerifyRootChild2PkgExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=SIF Reference Component 3
+componentVendor=Symbian
+scomoState=1
+
+[VerifyRootChild0Child0PkgExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=test.nonnativepackage.txt
+componentVendor=Symbian
+packageFile0=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file0
+packageFile1=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file1
+packageFile2=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file2
+scomoState=0
+
+[VerifyRootPkgNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=SIF Reference Component
+componentVendor=Symbian
+packageFile0=c:\RefComponent\file1.ref
+packageFile1=c:\RefComponent\file2.ref
+packageFile2=c:\RefComponent\file3.ref
+scomoState=1
+
+[VerifyRootChild0PkgNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=SIF Reference Component 2
+componentVendor=Symbian
+packageFile0=c:\RefComponent2\file1.ref
+packageFile1=c:\RefComponent2\file2.ref
+packageFile2=c:\RefComponent2\file3.ref
+scomoState=1
+
+[VerifyRootChild1PkgNonExistence]
+verifyExistence=False
+componentName=Sif Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+
+[VerifyRootChild2PkgNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=SIF Reference Component 3
+componentVendor=Symbian
+scomoState=1
+
+[VerifyRootChild0Child0PkgNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=test.nonnativepackage.txt
+componentVendor=Symbian
+packageFile0=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file0
+packageFile1=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file1
+packageFile2=c:\tusif\tsif\nonnativeplugin\test.nonnativepackage.txt\file2
+scomoState=0
+
+[UpgradeByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestupgrade.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[UpgradeByFileHandle]
+packageFile=z:\tusif\tsif\data\sifintegrationtestupgrade.sis
+operationByFileHandle=True
+useEnhancedApi=False
+
+[InvalidUpgradeByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestinvalidupgrade.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InvalidUpgradeByFileHandle]
+packageFile=z:\tusif\tsif\data\sifintegrationtestinvalidupgrade.sis
+operationByFileHandle=True
+useEnhancedApi=False
+
+[VerifyPackageExistence]
+verifyExistence=True
+componentName=Sif Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+executableReturnCode=1397310977
+scomoState=1
+
+[VerifyUpgradePackageExistence]
+verifyExistence=True
+componentName=Sif Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+executableReturnCode=1397310978
+scomoState=1
+
+[VerifyPackageNonExistence]
+verifyExistence=False
+componentName=Sif Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+
+[VerifyInactivePackageExistence]
+verifyExistence=True
+componentName=Sif Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+executableReturnCode=1397310977
+scomoState=1 // Currently, SWI does not support deactivation of packages - this should be returned to 0 once it does
+
+[InstallUpgradeByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestupgradehigh.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[GetCompInfoForNewNativeBaseCompByFileName]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegration.sis
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Component Info Integration Test
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80545946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=165
+root.hasExecutable=False
+
+[GetCompInfoForNewNativeBaseCompByFileHandle]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegration.sis
+operationByFileHandle=True
+root.softwareTypeName=native
+root.componentName=Sif Component Info Integration Test
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80545946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=165
+root.hasExecutable=False
+
+[InstallComponentInfoIntegByFileName]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegration.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallComponentInfoIntegUpgradeByFileName]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegpu.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[UninstallComponentInfoInteg]
+componentName=Sif Component Info Integration Test
+componentVendor=Security Team
+useEnhancedApi=False
+
+[GetCompInfoForInstalledNativeBaseByFileName]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegration.sis
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Component Info Integration Test
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=2
+root.componentId=1
+root.globalComponentId=80545946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=165
+root.hasExecutable=False
+
+[GetCompInfoForInstalledNativeBaseByFileHandle]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegration.sis
+operationByFileHandle=True
+root.softwareTypeName=native
+root.componentName=Sif Component Info Integration Test
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=2
+root.componentId=1
+root.globalComponentId=80545946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=165
+root.hasExecutable=False
+
+[GetCompInfoForUpgradeByFNWhenBaseInstalled]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegpu.sis
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Component Info Integration Test
+root.componentVersion=2.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=1
+root.componentId=1
+root.globalComponentId=80545946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=173
+root.hasExecutable=False
+
+[GetCompInfoForUpgradeByFNWhenBaseMissing]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegpu.SIS
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Component Info Integration Test
+root.componentVersion=2.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=4
+root.componentId=0
+root.globalComponentId=80545946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=173
+root.hasExecutable=False
+
+[GetCompInfoForPatchByFNWhenBaseInstalled]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegsp.SIS
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Component Info Integration Test Patch
+root.componentVersion=3.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80545946_Sif Component Info Integration Test Patch
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=178
+root.hasExecutable=False
+
+[GetCompInfoForPatchByFNWhenBaseMissing]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegsp.SIS
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Component Info Integration Test Patch
+root.componentVersion=3.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=4
+root.componentId=0
+root.globalComponentId=80545946_Sif Component Info Integration Test Patch
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=178
+root.hasExecutable=False
+
+[GetCompInfoForUpgradeByFNWhenHigherInstalled]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegration.sis
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Component Info Integration Test
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=3
+root.componentId=2
+root.globalComponentId=80545946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=165
+root.hasExecutable=False
+
+[GetCompInfoForNoCapabilityBaseByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestnocaps.SIS
+// Since the SIS file contains an executable, the maxInstalledSize is unreliable - it might change when executable is rebuilt
+compareMaxInstalledSize=False 
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif No Capability Test
+root.componentVersion=1.1.1
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=88534946
+root.authenticity=0
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=124988
+root.hasExecutable=True
+
+[GetCompInfoForBaseWithUserCapsByFileName]
+packageFile=z:\tusif\tsif\data\sifintegusercapsbase.SIS
+// Since the SIS file contains an executable, the maxInstalledSize is unreliable - it might change when executable is rebuilt
+compareMaxInstalledSize=False 
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif User Caps Base
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=88534947
+root.authenticity=1
+root.userGrantableCapsBitMask=98304	// ReadUserDara and WriteUserData
+root.maxInstalledSize=124972
+root.hasExecutable=True
+
+[CancelAsyncGetCompInfoRequestByFileName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestbase.sis
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Integration Test
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80534946
+root.authenticity=0
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=124972
+root.hasExecutable=False
+cancelAfter=100
+
+[GetComponentInfoForEmptyNameAndVendor]
+packageFile=z:\tusif\tsif\data\emptynameandvendor.sis
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=
+root.componentVersion=1.0.0
+root.componentVendor=
+root.scomoState=0
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80706054
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=165
+root.hasExecutable=False
+
+[GetCompInfoForEmbeddedWithExes]
+packageFile=z:\tusif\tsif\data\embeddingbasewithexe.sis
+compareMaxInstalledSize=False
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Embedding Base With EXE
+root.componentVersion=1.0.0
+root.componentVendor=Security and Data Privacy
+root.scomoState=0
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80706055
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=124988
+root.hasExecutable=True
+root.numChildren=1
+root.child0.softwareTypeName=native
+root.child0.componentName=Embedded Base With User Caps EXE
+root.child0.componentVersion=1.0.0
+root.child0.componentVendor=Security and Data Privacy
+root.child0.scomoState=0
+root.child0.installStatus=0
+root.child0.componentId=0
+root.child0.globalComponentId=80706056
+root.child0.authenticity=1
+root.child0.userGrantableCapsBitMask=98304
+root.child0.maxInstalledSize=124972
+root.child0.hasExecutable=True
+
+[GetCompInfoForEmbededNativePackages]
+packageFile=z:\tusif\tsif\data\embeddingouterbase.sis
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Embedding Outer Base
+root.componentVersion=1.0.0
+root.componentVendor=Security and Data Privacy
+root.scomoState=0
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80706050
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=165
+root.hasExecutable=False
+root.numChildren=2
+root.child0.softwareTypeName=native
+root.child0.componentName=Embedded Inner Base-1
+root.child0.componentVersion=1.0.0
+root.child0.componentVendor=Security and Data Privacy
+root.child0.scomoState=0
+root.child0.installStatus=0
+root.child0.componentId=0
+root.child0.globalComponentId=80706051
+root.child0.authenticity=1
+root.child0.userGrantableCapsBitMask=0
+root.child0.maxInstalledSize=173
+root.child0.hasExecutable=False
+root.child1.softwareTypeName=native
+root.child1.componentName=Embedded Inner Base-11
+root.child1.componentVersion=1.0.0
+root.child1.componentVendor=Security and Data Privacy
+root.child1.scomoState=0
+root.child1.installStatus=0
+root.child1.componentId=0
+root.child1.globalComponentId=80706053
+root.child1.authenticity=1
+root.child1.userGrantableCapsBitMask=0
+root.child1.maxInstalledSize=165
+root.child1.hasExecutable=False
+root.child0.numChildren=1
+root.child0.child0.softwareTypeName=native
+root.child0.child0.componentName=Embedded Inner Base-2
+root.child0.child0.componentVersion=1.0.0
+root.child0.child0.componentVendor=Security and Data Privacy
+root.child0.child0.scomoState=0
+root.child0.child0.installStatus=0
+root.child0.child0.componentId=0
+root.child0.child0.globalComponentId=80706052
+root.child0.child0.authenticity=1
+root.child0.child0.userGrantableCapsBitMask=0
+root.child0.child0.maxInstalledSize=178
+root.child0.child0.hasExecutable=False
+
+[GetCompInfoForEmbeddedWithTextAndInnerWithExe]
+packageFile=z:\tusif\tsif\data\embeddingbasewithtextandinnerwithexe.sis
+compareMaxInstalledSize=False
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Embedding Base With EXE
+root.componentVersion=1.0.0
+root.componentVendor=Security and Data Privacy
+root.scomoState=0
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80706055
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=124988
+root.hasExecutable=False
+root.numChildren=1
+root.child0.softwareTypeName=native
+root.child0.componentName=Sif Integration Test
+root.child0.componentVersion=1.0.0
+root.child0.componentVendor=Security Team
+root.child0.scomoState=0
+root.child0.installStatus=0
+root.child0.componentId=0
+root.child0.globalComponentId=80534946
+root.child0.authenticity=1
+root.child0.userGrantableCapsBitMask=0
+root.child0.maxInstalledSize=124972
+root.child0.hasExecutable=True
+
+[GetComponentInfoWithMultipleFiles]
+packageFile=z:\tusif\tsif\data\sifintegrationtestmultiplefiles.sis
+compareMaxInstalledSize=False
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Integration Test
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80534946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=125169
+root.hasExecutable=True
+
+[GetComponentInfoWithExtensionInDifferentCase]
+packageFile=z:\tusif\tsif\data\sifintegrationtestextensionindifferentcase.sis
+compareMaxInstalledSize=False
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Integration Test
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80534946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=125004
+root.hasExecutable=True
+
+
+[GetComponentInfoWithOnlyDll]
+packageFile=z:\tusif\tsif\data\sifintegrationtestwithonlydll.sis
+compareMaxInstalledSize=False
+operationByFileHandle=False
+root.softwareTypeName=native
+root.componentName=Sif Integration Test
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=0
+root.componentId=0
+root.globalComponentId=80534946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=171496
+root.hasExecutable=True
+
+[SilentInstallSelfSignedByName]
+packageFile=z:\tusif\tsif\data\sifintegrationtestnocaps.sis
+operationByFileHandle=False
+useEnhancedApi=True
+pluginOpaqueArgumentName0=InstallSilently
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=ExtendedErrCode
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=0
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=String
+pluginRefOpaqueResultValue1=__ANY_VALUE_PERMITTED__
+
+[SilentInstallSelfSignedByHandle]
+packageFile=z:\tusif\tsif\data\sifintegrationtestnocaps.sis
+operationByFileHandle=True
+useEnhancedApi=True
+pluginOpaqueArgumentName0=InstallSilently
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=ExtendedErrCode
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=0
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=String
+pluginRefOpaqueResultValue1=__ANY_VALUE_PERMITTED__
+
+[SilentInstallSignedByName]
+packageFile=z:\tusif\tsif\data\sifintegsufficientusercaps.sis
+operationByFileHandle=False
+useEnhancedApi=True
+pluginOpaqueArgumentName0=InstallSilently
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=ExtendedErrCode
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=0
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=String
+pluginRefOpaqueResultValue1=__ANY_VALUE_PERMITTED__
+
+[SilentInstallSignedByHandle]
+packageFile=z:\tusif\tsif\data\sifintegsufficientusercaps.sis
+operationByFileHandle=True
+useEnhancedApi=True
+pluginOpaqueArgumentName0=InstallSilently
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=ExtendedErrCode
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=0
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=String
+pluginRefOpaqueResultValue1=__ANY_VALUE_PERMITTED__
+
+[SignedPkgExistence]
+verifyExistence=True
+componentName=Sif Sufficient Caps
+componentVendor=Installation Team
+executableName=sifintegsufficientusercaps.exe
+executableReturnCode=1397310980
+scomoState=1
+
+[SignedPkgNonExistence]
+verifyExistence=False
+componentName=Sif Sufficient Caps
+componentVendor=Installation Team
+executableName=sifintegsufficientusercaps.exe
+
+[UninstallSignedPkg]
+componentName=Sif Sufficient Caps
+componentVendor=Installation Team
+useEnhancedApi=False
+
+[SignedLessCapsPkg]
+packageFile=z:\tusif\tsif\data\sifintegusercapsbase.sis
+operationByFileHandle=False
+useEnhancedApi=True
+pluginOpaqueArgumentName0=InstallSilently
+pluginOpaqueArgumentType0=Int
+pluginOpaqueArgumentValue0=1
+pluginRefOpaqueResultName0=ExtendedErrCode
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=0
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=String
+pluginRefOpaqueResultValue1=__ANY_VALUE_PERMITTED__
+
+[SignedLessCapsNonExistence]
+verifyExistence=False
+componentName=Sif User Caps Base
+componentVendor=Security Team
+executableName=sifintegusercapsbasepackage.exe
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/tsifintegration.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,435 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+PRINT Run all USIF integration tests
+
+// Delete the SCR Database file
+LOAD_SUITE tscr
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+
+LOAD_SUITE tUsifSuite
+
+// ************************ Integration test cases ************************
+
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0001
+//! @SYMTestCaseDesc 		Getting information about a component
+//! @SYMTestStatus 		3. Released
+ 
+START_TESTCASE API-SEC-USIF-tsifintegration-0001
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifintegration\tsifintegration.ini GetComponentInfoByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifintegration\tsifintegration.ini GetComponentInfoByFileHandle
+RUN_TEST_STEP !Result=-9 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifintegration\tsifintegration.ini GetComponentInfoOverflowByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifintegration\tsifintegration.ini GetComponentInfoByFileNameForUninstalledCompoundComponent
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifintegration\tsifintegration.ini GetComponentInfoByFileHandleForUninstalledCompoundComponent
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0001
+
+
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0002
+//! @SYMTestCaseDesc 		Installation/uninstallation of a native component through SIF by file name/handle
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0002
+
+// by file name
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini InstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+// by file handle
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini InstallByFileHandle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+// compound package by file name
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootPkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild0PkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild1PkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild2PkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild0Child0PkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini InstallCompoundComponentByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootPkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild0PkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild1PkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild2PkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild0Child0PkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRootPkgByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRootChild0PkgByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRootChild1PkgByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRootChild2PkgByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRootChild0Child0PkgByNameAndVendor
+// compound package by file handle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootPkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild0PkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild1PkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild2PkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild0Child0PkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini InstallCompoundComponentByFileHandle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootPkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild0PkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild1PkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild2PkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRootChild0Child0PkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRootPkgByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRootChild0PkgByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRootChild1PkgByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRootChild2PkgByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRootChild0Child0PkgByNameAndVendor
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0002
+
+
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0003
+//! @SYMTestCaseDesc 		Generic browser installation by file name/handle
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0003
+
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRefPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifGenericBrowserInstallStep z:\tusif\tsifintegration\tsifintegration.ini GenericBrowserInstallRefPkgByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRefBasePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRefPkgByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRefPackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifGenericBrowserInstallStep z:\tusif\tsifintegration\tsifintegration.ini GenericBrowserInstallRefPkgByFileHandle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRefUpgradePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallRefPkgByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyRefPackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0003
+
+
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0004
+//! @SYMTestCaseDesc 		SCOMO install inactivate
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0004
+
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini InstallInactiveByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyInactivePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0004
+
+
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0007
+//! @SYMTestCaseDesc 		Upgrade of a native component through SIF
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0007
+
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini InstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini UpgradeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyUpgradePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0007
+
+//! @SYMTestCaseID		API-SEC-USIF-tsifintegration-0008
+//! @SYMTestCaseDesc		Incorrect Upgrade of a native component through SIF
+//! @SYMTestStatus		3. Released
+START_TESTCASE API-SEC-USIF-tsifintegration-0008
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini InstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageExistence
+RUN_TEST_STEP !Result=-10301 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini InvalidUpgradeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+END_TESTCASE API-SEC-USIF-tsifintegration-0008
+
+
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0009
+//! @SYMTestCaseDesc 		Asynchronous cancellation of native installation
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0009
+
+RUN_TEST_STEP !Result=-3 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini AsynchronousCancelInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+RUN_TEST_STEP !Result=-3 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini AsynchronousCancelInstallByFileHandle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0009
+
+
+// Ensure clean database before the following tests (0011 - 0020), as they rely on component ids starting from 1
+// Get the component information for a new base(SA type) component when it wasn't installed on the device and check that
+// the information retrieved is as expected.
+
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0010
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0010
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForNewNativeBaseCompByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForNewNativeBaseCompByFileHandle
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0010
+
+
+// Get the base(SA type) component information when the same component was already installed on the device and check that 
+// the information retrieved is as expected.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0011
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0011
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep            z:\tusif\tsifintegration\tsifintegration.ini InstallComponentInfoIntegByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForInstalledNativeBaseByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForInstalledNativeBaseByFileHandle
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep          z:\tusif\tsifintegration\tsifintegration.ini UninstallComponentInfoInteg
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0011
+
+
+// Get the Upgrading(PU type) component information when the base(SA type) component was already installed on the device
+// and check that the information retrieved is matching with the expected values.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0012
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0012
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep            z:\tusif\tsifintegration\tsifintegration.ini InstallComponentInfoIntegByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForUpgradeByFNWhenBaseInstalled
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep 	       z:\tusif\tsifintegration\tsifintegration.ini UninstallComponentInfoInteg
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0012
+
+
+// Get the Upgrading(PU type) component information when the base(SA type) component was not installed on the device and 
+// check that the install status in retrieved info results in base package missing.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0013
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0013
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForUpgradeByFNWhenBaseMissing
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0013
+
+
+// Get the Patch(SP type) component information when the base(SA type) component was already installed on the device
+// and check that the information retrieved is matching with the expected values.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0014
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0014
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep            z:\tusif\tsifintegration\tsifintegration.ini InstallComponentInfoIntegByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForPatchByFNWhenBaseInstalled
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep 	       z:\tusif\tsifintegration\tsifintegration.ini UninstallComponentInfoInteg
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0014
+
+
+// Get the Patch(SP type) component information when the base(SA type) component was not installed on the device and
+// check that the install status in retrieved info results in base package missing.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0015
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0015
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForPatchByFNWhenBaseMissing
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0015
+
+
+// Get component information when the base component has a higher version
+// and check that the install status in retrieved info results in ENewerVersionAlreadyInstalled.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0016
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0016
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep            z:\tusif\tsifintegration\tsifintegration.ini InstallComponentInfoIntegByFileName
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep            z:\tusif\tsifintegration\tsifintegration.ini InstallComponentInfoIntegUpgradeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForUpgradeByFNWhenHigherInstalled
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep 	       z:\tusif\tsifintegration\tsifintegration.ini UninstallComponentInfoInteg
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0016
+
+
+// Get the component information for the new base(SA type) package with User Grantable capabilities, signed by a trusted CA
+// and check that the authenticity and userGrantableCapsBitMask in the retrieved info is equal to  EValidatedToAnchor(50) 
+// and 98304 (ReadUserData & WriteUserData) respectively.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0017
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0017
+
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForBaseWithUserCapsByFileName
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0017
+
+
+// Get the component information for the base(SA) component with an exe which doesn't have any cpability and 
+// check that the retrieved info matches with the expected values.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0018
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0018
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForNoCapabilityBaseByFileName
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0018
+
+
+// Check whether the get component info request is cancelable.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0019
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0019
+
+RUN_TEST_STEP !Result=-3 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini CancelAsyncGetCompInfoRequestByFileName
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0019
+
+
+// Get the component information for the base (SA type) package with the package name and vendor name are empty and 
+// check that the retrieved info matches with the expected values.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0020
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0020
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetComponentInfoForEmptyNameAndVendor
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0020
+
+
+// Get the component information for the set of embedded components in the order of EmbeddingBaseWithEXE->EmbeddedBaseWithUserCapsEXE and 
+// check that the retrieved info matches with the expected values.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0021
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0021
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForEmbeddedWithExes
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0021
+
+
+// Get the component information for the set of embedded components in the order of EmbeddingBase->Embedded1->Embedded2 and 
+// check that the retrieved info matches with the expected values.
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0022
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0022
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForEmbededNativePackages
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0022
+
+
+// Get the component information for the set of embedded components in the order of EmbeddingBaseWithText->EmbeddedWithExe and
+// check that the retrieved info matches with the expected values.
+//! @SYMTestCaseID		API-SEC-USIF-tsifintegration-0023
+//! @SYMTestStatus		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0023
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForEmbeddedWithTextAndInnerWithExe
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0023
+
+
+// Get the component information for multiple files in a sis file, first file is text file and second is executable 
+// check that the retrieved info matches with the expected values.
+//! @SYMTestCaseID		API-SEC-USIF-tsifintegration-0024
+//! @SYMTestStatus		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0024
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetComponentInfoWithMultipleFiles
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0024
+
+
+// Get the component information for multiple files with extension in different case
+// check that the retrieved info matches with the expected values.
+//! @SYMTestCaseID		API-SEC-USIF-tsifintegration-0025
+//! @SYMTestStatus		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0025
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetComponentInfoWithExtensionInDifferentCase
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0025
+
+
+// Get the component information for sis file containing only one dll
+// check that the retrieved info matches with the expected values.
+//! @SYMTestCaseID		API-SEC-USIF-tsifintegration-0026
+//! @SYMTestStatus		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0026
+
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetComponentInfoWithOnlyDll
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0026
+
+
+// Slient installation : Self-signed package
+START_TESTCASE API-SEC-USIF-tsifintegration-00027
+// by file name
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+RUN_TEST_STEP !Result=-5 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini SilentInstallSelfSignedByName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+// by file handle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+RUN_TEST_STEP !Result=-5 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini SilentInstallSelfSignedByHandle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini VerifyPackageNonExistence
+END_TESTCASE API-SEC-USIF-tsifintegration-00027
+
+// Slient installation : Signed package
+START_TESTCASE API-SEC-USIF-tsifintegration-00028
+// by file name
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini SignedPkgNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini SilentInstallSignedByName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini SignedPkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallSignedPkg
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini SignedPkgNonExistence
+// by file handle
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini SilentInstallSignedByHandle
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini SignedPkgExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tsifintegration\tsifintegration.ini UninstallSignedPkg
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini SignedPkgNonExistence
+END_TESTCASE API-SEC-USIF-tsifintegration-00028
+
+// Slient installation : Signed package with less capabilities (Package needs some capabilities additional to the ones 
+// granted by the certificate used to sign it)
+START_TESTCASE API-SEC-USIF-tsifintegration-00029
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini SignedLessCapsNonExistence
+RUN_TEST_STEP !Result=-5 100 tUsifSuite SifInstallStep z:\tusif\tsifintegration\tsifintegration.ini SignedLessCapsPkg
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tsifintegration\tsifintegration.ini SignedLessCapsNonExistence
+END_TESTCASE API-SEC-USIF-tsifintegration-00029
+
+// Wait 3 seconds in order to let the SIF server shutdown itself
+DELAY 3000
+
+PRINT Complate_te_Sif_Tests
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/tsifswtypeintegration.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,99 @@
+
+[InstallSwTypeByFileName]
+packageFile=z:\tusif\tswtype\data\sifswtypebase.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[InstallUpgradeSwTypeByFileName]
+packageFile=z:\tusif\tswtype\data\sifswtypeupgrade.sis
+operationByFileHandle=False
+useEnhancedApi=False
+
+[UninstallSwTypeByNameAndVendor]
+componentName=Sif LEE Integration Test
+componentVendor=Security Team
+useEnhancedApi=False
+
+[VerifySwTypePackageNonExistence]
+verifyExistence=False
+componentName=Sif LEE Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+
+[VerifySwTypePackageExistence]
+verifyExistence=True
+componentName=Sif LEE Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+executableReturnCode=1397310977
+scomoState=1
+
+[VerifyUpgradeSwTypePackageExistence]
+verifyExistence=True
+componentName=Sif LEE Integration Test
+componentVendor=Security Team
+executableName=sifIntegrationTest.exe
+executableReturnCode=1397310978
+scomoState=1
+
+[VerifyNonNativePackageNonExistence]
+verifyExistence=False
+checkSisRegistry=False
+componentName=test.siftestpkg
+componentVendor=Test Vendor
+packageFile0=c:\tusif\tsif\nonnativeplugin2\test.siftestpkg\file0
+packageFile1=c:\tusif\tsif\nonnativeplugin2\test.siftestpkg\file1
+packageFile2=c:\tusif\tsif\nonnativeplugin2\test.siftestpkg\file2
+
+[NonNativeInstallByFileName]
+packageFile=z:\tusif\tswtype\data\test.siftestpkg
+operationByFileHandle=False
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin2
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+pluginRefOpaqueResultName1=ComponentId
+pluginRefOpaqueResultType1=String
+pluginRefOpaqueResultValue1=__ANY_VALUE_PERMITTED__
+
+[VerifyNonNativePackageExistence]
+verifyExistence=True
+checkSisRegistry=False
+componentName=test.siftestpkg
+componentVendor=Test Vendor
+packageFile0=c:\tusif\tsif\nonnativeplugin2\test.siftestpkg\file0
+packageFile1=c:\tusif\tsif\nonnativeplugin2\test.siftestpkg\file1
+packageFile2=c:\tusif\tsif\nonnativeplugin2\test.siftestpkg\file2
+scomoState=0
+
+[NonNativeUninstallByNameAndVendor]
+componentName=test.siftestpkg
+componentVendor=Test Vendor
+useEnhancedApi=True
+pluginRefOpaqueResultName0=NonNativePlugin2
+pluginRefOpaqueResultType0=Int
+pluginRefOpaqueResultValue0=1
+
+[NonNativeUninstallByNameAndVendorNoOpaque]
+componentName=test.siftestpkg
+componentVendor=Test Vendor
+useEnhancedApi=True
+
+[BackupRestoreSoftwareType]
+SIS1=z:\tusif\tswtype\data\sifswtypebase.sis
+UID1=77534946
+FILE1.1=c:\resource\usif\leestore\77534946.xml
+FILE1.2=c:\sys\bin\testnonnativeplugin2.dll
+FILE1.3=c:\resource\plugins\testnonnativeplugin2.rsc
+FILE1.4=c:\sys\bin\tsifpkgrec.dll
+FILE1.5=c:\resource\plugins\tsifpkgrec.rsc
+FILE1.6=c:\sys\bin\sifIntegrationTest.exe
+INSTALLDRIVE1=C
+
+[GenericBrowserInstallByFileName]
+packageFile=z:\tusif\tswtype\data\test.siftestpkg
+operationByFileHandle=False
+
+[ActivateTestPackage]
+componentName=test.siftestpkg
+componentVendor=Test Vendor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/tsifswtypeintegration.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,338 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+// Integration tests for Post manufacture installation of a Layered Execution
+// Environment run on hardware only. This is because a LEE must register a MIME
+// type recognizer in order to be invoked by the SIF. A MIME type recognizer is
+// an ECOM plug-in that cannot be uninstalled properly on the WINSCW Emulator.
+// This is because Windows locks dlls being loaded and therefore uninstallation
+// of an ECOM plug-in fails.
+// However, if you really want to launch the test below, please ensure that:
+// 1) folder \epoc32\release\winscw\udeb\z\resource\plugins doesn't contain
+// the following files: files testnonnativeplugin2.rsc, tsifpkgrec.rsc
+// 2) folder \epoc32\release\winscw\udeb doesn't contain the following files:
+// files testnonnativeplugin2.dll, tsifpkgrec.dll
+// 3) z:\resource\swicertstore.dat allows for installation of packages with
+// the TrustedUI and ProtServ capabilities. In order to do this, please overwrite
+// this file with security\swi\test\tsisfile\data\signedsis\swicertstore.dat
+
+PRINT Run integration tests for Post manufacture installation of a Layered Execution Environment
+
+// Delete the SCR Database file
+LOAD_SUITE tscr
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+
+LOAD_SUITE tUsifSuite
+
+//################################################################################
+// This test case installs a Layered Execution Environment and in turn uses
+// it to install a non-native package. Finally, the test uninstalls both packages.
+//################################################################################
+//! @SYMTestCaseID 		API-SEC-USIF-tsifswtypeintegration-0001
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifswtypeintegration-0001
+
+// Install the LEE
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini InstallSwTypeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageExistence
+
+// Wait 3 seconds in order to let AppArc discover the MIME type recognizer we have just installed as part of LEE
+DELAY 3000
+
+// Install and uninstall the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeUninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+
+// Uninstall the LEE
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini UninstallSwTypeByNameAndVendor
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifswtypeintegration-0001
+
+
+//####################################################################################
+// This test case installs a base package containing a Layered Execution Environment
+// and in turn uses it to install and uninstall a non-native package. Then, it
+// installs an upgrade package of the LEE and in turn uses it to install and uninstall
+// the non-native package again. Finally, the test uninstalls the LEE.
+//####################################################################################
+//! @SYMTestCaseID 		API-SEC-USIF-tsifswtypeintegration-0002
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifswtypeintegration-0002
+
+// Install the LEE
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini InstallSwTypeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageExistence
+
+// Wait 3 seconds in order to let AppArc discover the MIME type recognizer we have just installed
+DELAY 3000
+
+// Install and uninstall the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeUninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+
+// Upgrade the LEE
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini InstallUpgradeSwTypeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyUpgradeSwTypePackageExistence
+
+// Wait 3 seconds in order to let AppArc re-discover the MIME type recognizer we have just installed
+DELAY 3000
+
+// Install and uninstall the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeUninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+
+// Uninstall the LEE
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini UninstallSwTypeByNameAndVendor
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifswtypeintegration-0002
+
+//################################################################################
+// This test case installs a Layered Execution Environment. Then this LEE is
+// backuped and restored and in turn used to install and uninstall a non-native
+// package. Finally, the test uninstalls the LEE.
+//################################################################################
+//! @SYMTestCaseID 		API-SEC-USIF-tsifswtypeintegration-0003
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifswtypeintegration-0003
+
+LOAD_SUITE tbackuprestore
+
+// Make sure the test directory exists
+RUN_UTILS MkDir c:\tswi\
+RUN_UTILS MkDir c:\tswi\tbackuprestore\
+
+// Install the LEE
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini InstallSwTypeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageExistence
+
+// Wait 3 seconds in order to let AppArc discover the MIME type recognizer we have just installed as part of LEE
+DELAY 3000
+
+// Backup the LEE
+RUN_TEST_STEP 100 tbackuprestore BACKUP z:\tusif\tswtype\tsifswtypeintegration.ini BackupRestoreSoftwareType
+
+// Uninstall the LEE
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini UninstallSwTypeByNameAndVendor
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+
+// Restore the LEE
+RUN_TEST_STEP 100 tbackuprestore RESTORE z:\tusif\tswtype\tsifswtypeintegration.ini BackupRestoreSoftwareType
+
+// Wait 3 seconds in order to let AppArc discover the MIME type recognizer we have just restored as a part of the LEE
+DELAY 3000
+
+// Install and uninstall the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeUninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+
+// Uninstall the LEE
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini UninstallSwTypeByNameAndVendor
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifswtypeintegration-0003
+
+
+//##################################################################################
+// This test case installs a Layered Execution Environment and in turn uses it to
+// install a non-native package. Then, the test uninstalls the LEE so the non-native
+// package becomes orphaned. Finally, the test installs the LEE again in order to
+// uninstall the non-native plugin and the LEE.
+//##################################################################################
+//! @SYMTestCaseID 		API-SEC-USIF-tsifswtypeintegration-0004
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifswtypeintegration-0004
+
+// Install the LEE
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini InstallSwTypeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageExistence
+
+// Wait 3 seconds in order to let AppArc discover the MIME type recognizer we have just installed as part of LEE
+DELAY 3000
+
+// Install the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+
+// Uninstall the LEE
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini UninstallSwTypeByNameAndVendor
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+
+// Install the LEE again
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini InstallSwTypeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageExistence
+
+// Wait 3 seconds in order to let AppArc discover the MIME type recognizer we have just installed as part of LEE
+DELAY 3000
+
+// Uninstall the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeUninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+
+// Uninstall the LEE
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini UninstallSwTypeByNameAndVendor
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifswtypeintegration-0004
+
+
+//##################################################################################
+// Tests the default uninstaller. The test case installs a Layered Execution 
+// Environment (LEE) and uses it to install a non-native package. The LEE is then 
+// uninstalled. It then tries to uninstall the non-native package using the default 
+// uninstaller provided in SIF Utils Library
+//##################################################################################
+//! @SYMTestCaseID 		API-SEC-USIF-tsifswtypeintegration-0005
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifswtypeintegration-0005
+
+// Install the LEE
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini InstallSwTypeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageExistence
+
+// Wait 3 seconds in order to let AppArc discover the MIME type recognizer we have just installed as part of LEE
+DELAY 3000
+
+// Install the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+
+// Uninstall the LEE
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini UninstallSwTypeByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+
+// Uninstall the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeUninstallByNameAndVendorNoOpaque
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifswtypeintegration-0005
+
+
+//##################################################################################
+// This test case installs a Layered Execution Environment and in turn uses it to
+// install a non-native package through the RApaLsSession::StartDocument() API.
+// Then, the test uninstalls the LEE so the non-native package becomes orphaned.
+// Finally, the test installs the LEE again in order to uninstall the non-native
+// plugin and the LEE.
+//##################################################################################
+//! @SYMTestCaseID 		API-SEC-USIF-tsifswtypeintegration-0006
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifswtypeintegration-0006
+
+// Install the LEE
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini InstallSwTypeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageExistence
+
+// Wait 3 seconds in order to let AppArc discover the MIME type recognizer we have just installed as part of LEE
+DELAY 3000
+
+// Install the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifGenericBrowserInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini GenericBrowserInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+
+// Uninstall the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeUninstallByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+
+// Uninstall the LEE
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini UninstallSwTypeByNameAndVendor
+RUN_TEST_STEP !Result=-10303 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+
+END_TESTCASE API-SEC-USIF-tsifswtypeintegration-0006
+
+
+//##################################################################################
+// Tests the actvation of package  after uninstalling LEE . The test case installs a  
+// Layered Execution Environment (LEE) and uses it to install a non-native package.  
+// Then uninstall LEE and try to activat SCOMO state and then uninstall non-native 
+// package using the default uninstaller provided in SIF Utils Library
+//##################################################################################
+START_TESTCASE SEC-USIF-tsifswtypeintegration-0007
+
+// Install the LEE
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini InstallSwTypeByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageExistence
+
+// Wait 3 seconds in order to let AppArc discover the MIME type recognizer we have just installed as part of LEE
+DELAY 3000
+
+// Install the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeInstallByFileName
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+
+// Uninstall the LEE
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini UninstallSwTypeByNameAndVendor
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifySwTypePackageNonExistence
+
+//Activate SCOMO state
+RUN_TEST_STEP !Result=-1 100  tUsifSuite SifActivateStep z:\tusif\tswtype\tsifswtypeintegration.ini ActivateTestPackage
+
+// Uninstall the non-native package
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageExistence
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep z:\tusif\tswtype\tsifswtypeintegration.ini NonNativeUninstallByNameAndVendorNoOpaque
+RUN_TEST_STEP 100 tUsifSuite SifCommonVerificationStep z:\tusif\tswtype\tsifswtypeintegration.ini VerifyNonNativePackageNonExistence
+
+END_TESTCASE SEC-USIF-tsifswtypeintegration-0007
+
+// Wait 3 seconds in order to let the SIF server shutdown itself
+DELAY 3000
+
+PRINT Complate_te_Sif_Tests
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/102866F0.rss	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* UIDs quick-ref
+* ECOM DLL UID:			0x102866F0
+* ECOM interface UID:		0x101F7D87
+* ECOM Implementation:		0x102866F1
+*
+*/
+
+
+#include <ecom/registryinfo.rh>
+RESOURCE REGISTRY_INFO r_registry
+{
+	dll_uid = 0x102866F0;
+	interfaces =
+	{
+		INTERFACE_INFO
+		{
+		interface_uid = 0x101F7D87;	// Const for all data recognisers
+		implementations = 
+			{
+			IMPLEMENTATION_INFO
+				{
+				implementation_uid = 0x102866F1;
+				version_no = 1;
+				display_name = "tsifpkgrec";
+				default_data = "";
+				opaque_data = "";
+				}
+			};
+		}
+	};
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/sifintegrationtestbasepackage.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,26 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* sifintegrationtest.cpp
+*
+*/
+
+
+#include <e32base.h>
+#include "sifintegrationtestpackage.h"
+
+GLDEF_C TInt E32Main() // main function called by E32
+	{
+	return sifBasePackageExitCode;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/sifintegrationtestpackage.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,28 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* sifintegrationtest.h
+*
+*/
+
+
+#ifndef SIFINTEGRATIONTESTPACKAGE_H
+#define SIFINTEGRATIONTESTPACKAGE_H
+
+const TInt sifBasePackageExitCode = 0x53494601;
+const TInt sifUpgradePackageExitCode = 0x53494602;
+const TInt sifUserCapsPackageExitCode = 0x53494603;
+const TInt sifSufficientCapsPackageExitCode = 0x53494604;
+
+#endif // SIFINTEGRATIONTESTPACKAGE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/sifintegrationtestupgradepackage.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,26 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* sifintegrationtest.cpp
+*
+*/
+
+
+#include <e32base.h>
+#include "sifintegrationtestpackage.h"
+
+GLDEF_C TInt E32Main() // main function called by E32
+	{
+	return sifUpgradePackageExitCode;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/sifintegsufficientusercaps.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,25 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <e32base.h>
+#include "sifintegrationtestpackage.h"
+
+GLDEF_C TInt E32Main() // main function called by E32
+	{
+	return sifSufficientCapsPackageExitCode;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/sifintegusercapsbasepackage.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,25 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include <e32base.h>
+#include "sifintegrationtestpackage.h"
+
+GLDEF_C TInt E32Main() // main function called by E32
+	{
+	return sifUserCapsPackageExitCode;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/testexes/siftestintegrationlockfile.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,92 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* sifintegrationlockfile.cpp
+* This executable is used to lock a file in order to simulate errors while deleting files
+*
+*/
+
+
+#include <e32base.h>
+#include <e32cons.h>
+#include <bacline.h>
+#include <f32file.h>
+
+LOCAL_C void mainL();
+
+TInt E32Main() // main function called by E32
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack
+	TRAPD(error,mainL()); // Run main method
+	__ASSERT_ALWAYS(!error, User::Panic(_L("SifIntegrationTest"),error));
+	delete cleanup; // destroy clean-up stack
+	__UHEAP_MARKEND;
+	return 0; // and return
+	}
+
+LOCAL_C void mainL()
+	{
+	CCommandLineArguments* cmdLine = CCommandLineArguments::NewLC();
+	CConsoleBase* console = Console::NewL(_L("Siftestintegrationlockfile"),TSize(KConsFullScreen,KConsFullScreen));
+	CleanupStack::PushL(console);
+	TInt argTotal(cmdLine->Count());
+	if (argTotal < 2  || argTotal > 3)
+		{
+		console->Printf(_L("Incorrect arguments specified: expected 1, received %d"), argTotal - 1);
+		User::Leave(KErrArgument);
+		}
+		
+	TPtrC filename(cmdLine->Arg(1));
+	_LIT(KDoLockFileParam, " lockfile");
+	if (argTotal == 2)
+		{
+		RBuf params;
+		params.CreateL(filename.Length() + KDoLockFileParam().Length());
+		params.CleanupClosePushL();
+		params.Append(cmdLine->Arg(1));
+		params.Append(KDoLockFileParam());
+		// Since this executable is used by TEF, we wish to lock the file after the launched process has exited, so we spawn this process again with a different set of parameters
+		RProcess newInstance;
+		User::LeaveIfError(newInstance.Create(_L("Siftestintegrationlockfile"), params));
+		CleanupClosePushL(newInstance);
+		newInstance.Resume();
+		TRequestStatus status;		
+		newInstance.Rendezvous(status);
+		User::WaitForRequest(status);
+		User::LeaveIfError(status.Int());
+		CleanupStack::PopAndDestroy(2, &params); // newInstance
+		}
+	else
+		{
+		// This is the execution for locking the file, invoked using the branch above
+		console->Printf(_L("Locking file %S for read"), &filename);	
+		RFs fs;
+		User::LeaveIfError(fs.Connect());
+		CleanupClosePushL(fs);
+	
+		RFile file;
+		User::LeaveIfError(file.Open(fs, filename, EFileShareReadersOnly|EFileRead));
+		CleanupClosePushL(file);
+		// Signal the invoker only here, so that the file will definitely get locked before TEF proceeds to the next step
+		RProcess::Rendezvous(KErrNone);		
+		
+		User::After(10*1000*1000); // Wait for 10 seconds
+	
+		CleanupStack::PopAndDestroy(2 , &fs); // file
+		}
+	CleanupStack::PopAndDestroy(2, cmdLine); // console,
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifcommonunitteststep.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,437 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#include "tsifcommonunitteststep.h"
+#include "tsifsuitedefs.h"
+#include <usif/sif/sifcommon.h>
+#include <ct/rcpointerarray.h>
+
+using namespace Usif;
+
+namespace
+	{
+	TInt PackCapabilitySet(const TCapabilitySet& aCapSet)
+		{
+		TInt caps=0;
+		for (TInt c=0; c<ECapability_Limit; ++c)
+			{
+			if (aCapSet.HasCapability(TCapability(c)))
+				{
+				caps += (1<<c);
+				}
+			}
+		return caps;
+		}
+	}
+
+CSifCommonUnitTestStep::~CSifCommonUnitTestStep()
+/**
+* Destructor
+*/
+	{
+	INFO_PRINTF1(_L("Cleanup in CSifCommonUnitTestStep::~CSifCommonUnitTestStep()"));
+	}
+
+CSifCommonUnitTestStep::CSifCommonUnitTestStep()
+/**
+* Constructor
+*/
+	{
+	}
+
+void CSifCommonUnitTestStep::ImplTestStepL()
+/**
+* @return - TVerdict code
+* Override of base class pure virtual
+* Our implementation only gets called if the base class doTestStepPreambleL() did
+* not leave. That being the case, the current test result value will be EPass.
+*/
+	{
+	INFO_PRINTF1(_L("I am in CSifCommonUnitTestStep::doTestStep()."));
+
+	SetTestStepResult(EFail);
+
+	TestComponentInfoL();
+	TestOpaqueNamedParamsL();
+
+	SetTestStepResult(EPass);
+	}
+
+
+
+void CSifCommonUnitTestStep::ImplTestStepPostambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{
+	}
+
+
+void CSifCommonUnitTestStep::ImplTestStepPreambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{
+	}
+
+void CSifCommonUnitTestStep::TestComponentInfoL()
+	{
+	TCapabilitySet capSet(ECapabilityReadDeviceData);
+	
+	CComponentInfo* compInfo = CComponentInfo::NewLC();
+	
+	/* Internalize from an empty descriptor and read invalid root node */
+	TIpcArgs ipcArgs;
+	compInfo->PrepareForIpcL(ipcArgs, 0);
+	TDes8* des = reinterpret_cast<TDes8*>(ipcArgs.iArgs[0]);
+	des->FillZ(1);
+	TRAPD(err, compInfo->RootNodeL());
+	if (err != KErrNotFound)
+		{
+		INFO_PRINTF1(_L("Internalize from an empty descriptor and read invalid root node"));
+		User::Leave(err);
+		}
+	CleanupStack::PopAndDestroy(compInfo);
+
+	/* Add invalid child */
+	CComponentInfo::CNode* node = CComponentInfo::CNode::NewLC(KNullDesC, KNullDesC, KNullDesC, KNullDesC, EDeactivated, ENewComponent, 12345678, KNullDesC, ENotAuthenticated, capSet, 1234, EFalse);
+	TRAP(err, node->AddChildL(NULL));
+	if (err != KErrArgument)
+		{
+		INFO_PRINTF1(_L("TestComponentInfoL: Add invalid child"));
+		User::Leave(err);
+		}
+	/* Get empty GlobalComponentId */
+	if (node->GlobalComponentId() != KNullDesC)
+		{
+		INFO_PRINTF1(_L("TestComponentInfoL: Get empty GlobalComponentId"));
+		User::Leave(KErrGeneral);
+		}
+	CleanupStack::PopAndDestroy(node);
+
+	/* Overflow detection */
+	const TInt maxDescriptorLength = 256;
+	const TInt tooBigLen = maxDescriptorLength + 1;
+	const TInt maxSize = 1234;
+	const TBool hasExe = EFalse;
+
+	HBufC* tooBigStr = HBufC::NewLC(tooBigLen);
+	TPtr tooBigStrPtr = tooBigStr->Des();
+	tooBigStrPtr.FillZ(tooBigLen);
+	
+	// for SoftwareTypeName
+	TRAP(err, CComponentInfo::CNode::NewLC(*tooBigStr, KNullDesC, KNullDesC, KNullDesC, EDeactivated, ENewComponent, 12345678, KNullDesC, ENotAuthenticated, capSet, maxSize, hasExe));
+	if (err != KErrOverflow)
+		{
+		INFO_PRINTF1(_L("TestComponentInfoL: Overflow detection for SoftwareTypeName"));
+		User::Leave(err);
+		}
+
+	// for ComponentName
+	TRAP(err, CComponentInfo::CNode::NewLC(KNullDesC, *tooBigStr, KNullDesC, KNullDesC, EDeactivated, ENewComponent, 12345678, KNullDesC, ENotAuthenticated, capSet, maxSize, hasExe));
+	if (err != KErrOverflow)
+		{
+		INFO_PRINTF1(_L("TestComponentInfoL: Overflow detection for ComponentName"));
+		User::Leave(err);
+		}
+
+	// for Version
+	TRAP(err, CComponentInfo::CNode::NewLC(KNullDesC, KNullDesC, *tooBigStr, KNullDesC, EDeactivated, ENewComponent, 12345678, KNullDesC, ENotAuthenticated, capSet, maxSize, hasExe));
+	if (err != KErrOverflow)
+		{
+		INFO_PRINTF1(_L("TestComponentInfoL: Overflow detection for aVersion"));
+		User::Leave(err);
+		}
+
+	// for Vendor
+	TRAP(err, CComponentInfo::CNode::NewLC(KNullDesC, KNullDesC, KNullDesC, *tooBigStr, EDeactivated, ENewComponent, 12345678, KNullDesC, ENotAuthenticated, capSet, maxSize, hasExe));
+	if (err != KErrOverflow)
+		{
+		INFO_PRINTF1(_L("TestComponentInfoL: Overflow detection for aVendor"));
+		User::Leave(err);
+		}
+
+	// for GlobalComponentId
+	TRAP(err, CComponentInfo::CNode::NewLC(KNullDesC, KNullDesC, KNullDesC, KNullDesC, EDeactivated, ENewComponent, 12345678, *tooBigStr, ENotAuthenticated, capSet, maxSize, hasExe));
+	if (err != KErrOverflow)
+		{
+		INFO_PRINTF1(_L("TestComponentInfoL: Overflow detection for GlobalComponentId"));
+		User::Leave(err);
+		}
+
+	CleanupStack::PopAndDestroy(tooBigStr);
+	
+	/* Testing embedded nodes */
+	compInfo = CComponentInfo::NewLC();
+	
+	/* Set invalid root node */
+	TRAP(err, compInfo->SetRootNodeL(NULL));
+	if (err != KErrArgument)
+		{
+		INFO_PRINTF1(_L("TestComponentInfoL: Set invalid root node"));
+		User::Leave(err);
+		}
+
+	CComponentInfo::CNode* emptyNode = CComponentInfo::CNode::NewLC(KNullDesC, KNullDesC, KNullDesC, KNullDesC, EDeactivated, ENewComponent, 12345678, KNullDesC, ENotAuthenticated, capSet, 1234, EFalse);
+	const TDesC& globalComponentId(emptyNode->GlobalComponentId());
+	ASSERT(globalComponentId.Length() == 0);
+	TRAP(err, compInfo->SetRootNodeAsChildL(*emptyNode));
+	if (err != KErrNotFound)
+		{
+		INFO_PRINTF1(_L("TestComponentInfoL: Set root node as child without a root node"));
+		User::Leave(err);
+		}
+	CleanupStack::PopAndDestroy(emptyNode);
+	
+	// Create root node
+	_LIT(KTxtRootSoftwareTypeName, "Test Software Type");
+	_LIT(KTxtRootComponentName, "Root Component");
+	_LIT(KTxtRootVersion, "1.0.0");
+	_LIT(KTxtRootVendor, "Symbian");
+	_LIT(KTxtRootGlobalComponentId, "Root Component Global Id");
+	CComponentInfo::CNode* root = CComponentInfo::CNode::NewLC(KTxtRootSoftwareTypeName,
+				KTxtRootComponentName, KTxtRootVersion, KTxtRootVendor, EDeactivated,
+				ENewComponent, 12345678, KTxtRootGlobalComponentId, ENotAuthenticated, capSet, maxSize, hasExe);
+	
+	// Create an array of nodes
+	RCPointerArray<CComponentInfo::CNode> children;
+	CleanupClosePushL(children);
+	
+	// Create second child node
+	_LIT(KTxtChild2SoftwareTypeName, "Test Software Type");
+	_LIT(KTxtChild2ComponentName, "Child2 Component");
+	_LIT(KTxtChild2Version, "1.2.0");
+	_LIT(KTxtChild2Vendor, "Symbian");
+	_LIT(KTxtChild2GlobalComponentId, "Child2 Component Global Id");
+	CComponentInfo::CNode* child2 = CComponentInfo::CNode::NewLC(KTxtChild2SoftwareTypeName,
+				KTxtChild2ComponentName, KTxtChild2Version, KTxtChild2Vendor, EDeactivated,
+				ENewComponent, 12345678, KTxtChild2GlobalComponentId, ENotAuthenticated, capSet, maxSize, hasExe);
+	children.AppendL(child2);
+	CleanupStack::Pop(child2);
+	
+	// Create third child node
+	_LIT(KTxtChild3SoftwareTypeName, "Test Software Type");
+	_LIT(KTxtChild3ComponentName, "Child3 Component");
+	_LIT(KTxtChild3Version, "1.3.0");
+	_LIT(KTxtChild3Vendor, "Symbian");
+	_LIT(KTxtChild3GlobalComponentId, "Child3 Component Global Id");
+	CComponentInfo::CNode* child3 = CComponentInfo::CNode::NewLC(KTxtChild3SoftwareTypeName,
+				KTxtChild3ComponentName, KTxtChild3Version, KTxtChild3Vendor, EDeactivated,
+				ENewComponent, 12345678, KTxtChild3GlobalComponentId, ENotAuthenticated, capSet, maxSize, hasExe);
+	children.AppendL(child3);
+	CleanupStack::Pop(child3);
+	
+	// Create first child node
+	_LIT(KTxtChild1SoftwareTypeName, "Test Software Type");
+	_LIT(KTxtChild1ComponentName, "Child1 Component");
+	_LIT(KTxtChild1Version, "1.1.0");
+	_LIT(KTxtChild1Vendor, "Symbian");
+	_LIT(KTxtChild1GlobalComponentId, "Child1 Component Global Id");
+	CComponentInfo::CNode* child1 = CComponentInfo::CNode::NewLC(KTxtChild1SoftwareTypeName,
+				KTxtChild1ComponentName, KTxtChild1Version, KTxtChild1Vendor, EDeactivated,
+				ENewComponent, 12345678, KTxtChild1GlobalComponentId, ENotAuthenticated, capSet,
+				maxSize, hasExe, &children);
+	root->AddChildL(child1);
+	CleanupStack::Pop(child1);
+	CleanupStack::PopAndDestroy(&children);
+	
+	// Set the root node
+	compInfo->SetRootNodeL(root);
+	CleanupStack::Pop(root);
+	
+	// Check the content of the third node
+	const CComponentInfo::CNode& rootNode = compInfo->RootNodeL();
+	const CComponentInfo::CNode& child1Node = *rootNode.Children()[0];
+	const CComponentInfo::CNode& child3Node = *child1Node.Children()[1];
+	
+	if (child3Node.SoftwareTypeName() != KTxtChild3SoftwareTypeName ||
+		child3Node.ComponentName() != KTxtChild3ComponentName ||
+		child3Node.Version() != KTxtChild3Version ||
+		child3Node.Vendor() != KTxtChild3Vendor ||
+		child3Node.ScomoState() != EDeactivated ||
+		child3Node.InstallStatus() != ENewComponent ||
+		child3Node.ComponentId() != 12345678 ||
+		child3Node.GlobalComponentId() != KTxtChild3GlobalComponentId ||
+		child3Node.Authenticity() != ENotAuthenticated ||
+		PackCapabilitySet(child3Node.UserGrantableCaps()) != PackCapabilitySet(capSet) ||
+		child3Node.MaxInstalledSize() != maxSize ||
+		child3Node.Children().Count() != 0)
+		{
+		INFO_PRINTF1(_L("TestComponentInfoL: 'Testing embedded nodes' failed"));
+		User::Leave(KErrGeneral);
+		}
+	
+	CleanupStack::PopAndDestroy(compInfo);
+	}
+
+void CSifCommonUnitTestStep::TestOpaqueNamedParamsL()
+	{
+	_LIT(KParamName1, "param 1");
+	_LIT(KParamName2, "param 2");
+	_LIT(KParamName3, "param 3");
+	_LIT(KParamName4, "param 4");
+	_LIT(KParamName5, "param 5");
+	
+	_LIT(KStringValue1, "value 1");
+	_LIT(KStringValue2, "value 2");
+
+	const TInt KIntValue1 = 111;
+	const TInt KIntValue2 = 222;
+	const TInt KIntValue3 = 333;
+	
+	/*  NewL */
+	COpaqueNamedParams* params1 = COpaqueNamedParams::NewL();
+	CleanupStack::PushL(params1);
+
+	/* String operations */
+
+	// AddStringL for a new param
+	params1->AddStringL(KParamName1, KStringValue2);
+	// AddStringL for an already existing param
+	params1->AddStringL(KParamName1, KStringValue1);
+	// StringByName for an existing param
+	if (params1->StringByNameL(KParamName1) != KStringValue1)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'StringByName for an existing param' failed"));
+		User::Leave(KErrGeneral);
+		}
+	// StringByName for a non-existing param
+	if (params1->StringByNameL(KParamName2) != KNullDesC)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'StringByName for a non-existing param' failed"));
+		User::Leave(KErrGeneral);
+		}
+	// StringByNameL for an existing param
+	if (params1->StringByNameL(KParamName1) != KStringValue1)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'StringByNameL for an existing param' failed"));
+		User::Leave(KErrGeneral);
+		}
+	// StringByNameL for a non-existing param
+	if (params1->StringByNameL(KParamName2) != KNullDesC)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'StringByNameL for a non-existing param' failed"));
+		User::Leave(KErrGeneral);
+		}
+
+	CleanupStack::PopAndDestroy(params1);
+
+	/* NewLC */
+	COpaqueNamedParams* params2 = COpaqueNamedParams::NewLC();
+
+	/* Int operations */
+
+	// AddIntL for a new param
+	params2->AddIntL(KParamName1, KIntValue2);
+	// AddIntL for an already existing param
+	params2->AddIntL(KParamName1, KIntValue1);
+	// GetIntByName for an existing param
+	TInt intValue1 = 0;
+	if (!params2->GetIntByNameL(KParamName1, intValue1) || intValue1 != KIntValue1)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'GetIntByName for an existing param' failed"));
+		User::Leave(KErrGeneral);
+		}
+	// GetIntByName for a non-existing param
+	if (params2->GetIntByNameL(KParamName2, intValue1))
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'GetIntByName for a non-existing param' failed"));
+		User::Leave(KErrGeneral);
+		}
+	// IntByNameL for an existing param
+	if (params2->IntByNameL(KParamName1) != KIntValue1)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'IntByNameL for an existing param' failed"));
+		User::Leave(KErrGeneral);
+		}
+	// IntByNameL for a non-existing param
+	TRAPD(err, params2->IntByNameL(KParamName2));
+	if (err != KErrNotFound)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'IntByNameL for a non-existing param' failed"));
+		User::Leave(err);
+		}
+
+	/* GetNamesL & Count*/
+	params2->AddStringL(KParamName2, KStringValue2);
+	params2->AddIntL(KParamName3, KIntValue3);
+	RCPointerArray<HBufC> names;
+	CleanupClosePushL(names);
+	params2->GetNamesL(names);
+	if (params2->CountL() != 3 || names.Count() != 3 ||
+		*names[0] != KParamName1 || *names[1] != KParamName2 || *names[2] != KParamName3)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'GetNamesL & Count' failed"));
+		User::Leave(KErrGeneral);
+		}
+
+	/* Overflow detection */
+
+	COpaqueNamedParams* params3 = COpaqueNamedParams::NewLC();
+
+	const TInt bigLen = 128;
+	HBufC* bigStr = HBufC::NewLC(bigLen);
+	TPtr bigStrPtr = bigStr->Des();
+	bigStrPtr.FillZ(bigLen);
+
+	// Max acceptable length of descriptor
+	const TInt maxGoodLen = 128/2; 
+	TRAP(err, params3->AddStringL(KParamName1, bigStr->Left(maxGoodLen)));
+	if (err != KErrNone)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'Overflow detection: Max acceptable length of descriptor'"));
+		User::Leave(err);
+		}
+		
+	// Too big descriptor - same param name
+	const TInt tooBigLen = 128/2+1;
+	TRAP(err, params3->AddStringL(KParamName1, bigStr->Left(tooBigLen)));
+	if (err != KErrOverflow)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'Overflow detection: Too big descriptor - updated param'"));
+		User::Leave(err);
+		}		
+
+	// Too big descriptor - different param name
+	TRAP(err, params3->AddStringL(KParamName2, bigStr->Left(tooBigLen)));
+	if (err != KErrOverflow)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'Overflow detection: Too big descriptor - new param'"));
+		User::Leave(err);
+		}
+
+	// Overflow in KMaxExternalizedSize
+	params3->AddStringL(KParamName3, bigStr->Left(maxGoodLen));
+	params3->AddStringL(KParamName4, bigStr->Left(maxGoodLen));
+	params3->AddStringL(KParamName4, bigStr->Left(maxGoodLen)); // Add the same param to check overwriting
+	TRAP(err, params3->AddStringL(KParamName5, bigStr->Left(maxGoodLen)));
+	if (err != KErrOverflow)
+		{
+		INFO_PRINTF1(_L("TestOpaqueNamedParamsL: 'Overflow detection: Overflow in KMaxExternalizedSize'"));
+		User::Leave(err);
+		}
+
+	CleanupStack::PopAndDestroy(4, params2);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifcommonunitteststep.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#if (!defined TSIFCOMMONUNITTESTSTEP_H)
+#define TSIFCOMMONUNITTESTSTEP_H
+#include <test/testexecutestepbase.h>
+#include "tsifsuitestepbase.h"
+
+namespace Usif
+	{
+
+	class CSifCommonUnitTestStep : public CSifSuiteStepBase
+		{
+	public:
+		virtual ~CSifCommonUnitTestStep();
+		CSifCommonUnitTestStep();
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepL();
+		virtual void ImplTestStepPostambleL();
+
+	private:
+		void TestComponentInfoL();
+		void TestOpaqueNamedParamsL();
+		};
+
+	_LIT(KSifCommonUnitTestStep,"SifCommonUnitTestStep");
+
+	} // namespace Sif
+
+#endif // TSIFCOMMONUNITTESTSTEP_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifcommonverificationstep.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,300 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#include "tsifcommonverificationstep.h"
+#include "tsifsuitedefs.h"
+#include <swi/sisregistrysession.h>
+#include <swi/sisregistrypackage.h>
+#include <ct/rcpointerarray.h>
+#include <usif/scr/scr.h>
+#include <apgcli.h>
+#include <apacmdln.h>
+
+using namespace Usif;
+
+namespace
+	{
+	TBool CheckPathExistenceL(const TDesC& filePath)
+		{
+		TBool exists = EFalse;
+
+		RFs fs;
+		User::LeaveIfError(fs.Connect());
+		CleanupClosePushL(fs);
+		TEntry entry;
+		TInt error = fs.Entry(filePath, entry);
+		if (error == KErrNone)
+			{
+			exists = ETrue;
+			}
+		else if (error != KErrPathNotFound && error != KErrNotFound)
+			{
+			User::Leave(error);
+			}
+		
+		CleanupStack::PopAndDestroy(&fs);
+		return exists;
+		}
+	}
+
+CSifCommonVerificationStep::~CSifCommonVerificationStep()
+/**
+* Destructor
+*/
+	{
+	INFO_PRINTF1(_L("Cleanup in CSifCommonVerificationStep::~CSifCommonVerificationStep()"));
+	}
+
+CSifCommonVerificationStep::CSifCommonVerificationStep()
+/**
+* Constructor
+*/
+	{
+	}
+
+void CSifCommonVerificationStep::ImplTestStepPreambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{
+	INFO_PRINTF1(_L("I am in CSifCommonVerificationStep::ImplTestStepPreambleL()."));
+	}
+
+TScomoState CSifCommonVerificationStep::GetScomoStateL(TComponentId aComponentId)
+	{
+	RSoftwareComponentRegistry scr;
+	User::LeaveIfError(scr.Connect());
+	CleanupClosePushL(scr);
+
+	CComponentEntry* entry = CComponentEntry::NewLC();
+	if (!scr.GetComponentL(aComponentId, *entry))
+		{
+		INFO_PRINTF1(_L("CSifCommonVerificationStep::GetScomoStateL() failed!"));
+		CleanupStack::PopAndDestroy(2, &scr);
+		User::Leave(KErrNotFound);
+		}
+
+	TScomoState scomoState = entry->ScomoState();
+	CleanupStack::PopAndDestroy(2, &scr);
+
+	return scomoState;
+	}
+
+void CSifCommonVerificationStep::ImplTestStepL()
+/**
+* @return - TVerdict code
+* Override of base class pure virtual
+* Our implementation only gets called if the base class doTestStepPreambleL() did
+* not leave. That being the case, the current test result value will be EPass.
+*/
+	{
+	INFO_PRINTF1(_L("I am in CSifCommonVerificationStep::ImplTestStepL()."));
+
+	// Read the configuration from the ini file
+	TBool verifyExistence = ETrue;
+	if (!GetBoolFromConfig(ConfigSection(), KTe_VerifyPackageExistence, verifyExistence))
+		{
+		SetTestStepResult(EFail);
+		INFO_PRINTF2(_L("Failed to read %S from ini file."), &KTe_VerifyPackageExistence);
+		return;
+		}
+
+	TInt exeReturnCode = 0;
+	TInt refScomoState = 0;
+	TPtrC componentName, componentVendor, executableName;
+	if (!GetStringFromConfig(ConfigSection(), KTe_ComponentName, componentName) ||
+		!GetStringFromConfig(ConfigSection(), KTe_ComponentVendor, componentVendor) ||
+		(verifyExistence && !GetIntFromConfig(ConfigSection(), KTe_ScomoState, refScomoState)))
+		{
+		SetTestStepResult(EFail);
+		INFO_PRINTF4(_L("Failed to read %S, %S or %S from ini file."), &KTe_ComponentName, &KTe_ComponentVendor, &KTe_ScomoState);
+		return;
+		}
+
+	TBool launchExecutable = GetStringFromConfig(ConfigSection(), KTe_ExecutableName, executableName);
+	if (launchExecutable && verifyExistence)
+		{
+		if (!GetIntFromConfig(ConfigSection(), KTe_ExecutableReturnCode, exeReturnCode))
+			{
+			SetTestStepResult(EFail);
+			INFO_PRINTF2(_L("Failed to read %S from ini file."), &KTe_ExecutableReturnCode);
+			return;
+			}
+		}
+
+	// Look for a component in the SCR
+	TScomoState scomoState = EDeactivated;
+	TBool foundInScr = EFalse;
+	TComponentId componentId = FindComponentInScrL(componentName, componentVendor);
+	if (componentId != 0)
+		{
+		foundInScr = ETrue;
+		scomoState = GetScomoStateL(componentId);
+		}
+
+	// Look for a component in the SIS Registry
+	TBool checkSisRegistry = ETrue;
+	GetBoolFromConfig(ConfigSection(), KTe_CheckSisRegistry, checkSisRegistry);
+	TBool foundInSisRegistry = EFalse;
+	if (checkSisRegistry)
+		{
+		Swi::RSisRegistrySession sisRegistry;
+		User::LeaveIfError(sisRegistry.Connect());
+		CleanupClosePushL(sisRegistry);
+
+		RCPointerArray<Swi::CSisRegistryPackage> installedPackages;
+		sisRegistry.InstalledPackagesL(installedPackages);
+		CleanupClosePushL(installedPackages);
+
+		const TInt numPackages = installedPackages.Count();
+		for (TInt i=0; i<numPackages; ++i)
+			{
+			const TDesC& name = installedPackages[i]->Name();
+			const TDesC& vendor = installedPackages[i]->Vendor();
+			if (name == componentName && vendor == componentVendor)
+				{
+				foundInSisRegistry = ETrue;
+				break;
+				}
+			}
+		CleanupStack::PopAndDestroy(2, &sisRegistry);
+		}
+
+	// Launch the executable
+	TInt apaErr = KErrNone;
+	TRequestStatus launchStatus;
+	if (launchExecutable)
+		{
+		RApaLsSession apa;
+		apaErr = apa.Connect();
+		if (apaErr != KErrNone)
+			{
+			INFO_PRINTF2(_L("Failed to connect to the application architecture server, error code: %d"), apaErr);
+			User::Leave(apaErr);
+			}
+		CleanupClosePushL(apa);
+
+		CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
+		cmdLine->SetExecutableNameL(executableName);
+
+		TThreadId threadId;
+		apaErr = apa.StartApp(*cmdLine, threadId, &launchStatus);
+		if (apaErr == KErrNone)
+			{
+			INFO_PRINTF3(_L("Launched: %S with error code: %d"), &executableName, launchStatus.Int());
+			User::WaitForRequest(launchStatus);
+			}
+		else if (apaErr != KErrNotFound)
+			{
+			INFO_PRINTF2(_L("Failed to call RApaLsSession::StartApp(), error code: %d"), apaErr);
+			User::Leave(apaErr);
+			}
+		CleanupStack::PopAndDestroy(2, &apa);
+		}
+
+	// Look for the component's files
+	TInt numDefinedFiles = 0;
+	TInt numFoundFiles = 0;
+	const TInt maxComponentFiles = 16;
+	for (TInt i=0; i<maxComponentFiles; ++i)
+		{
+		// Read the name of a file
+		HBufC* filePattern = HBufC::NewLC(KTe_PackageFile.iTypeLength+KMaxIntDigits);
+		TPtr filePatternPtr(filePattern->Des());
+		filePatternPtr.Copy(KTe_PackageFile);
+		filePatternPtr.AppendNum(i);
+		TPtrC filePath;
+		if (!GetStringFromConfig(ConfigSection(), *filePattern, filePath))
+			{
+			CleanupStack::PopAndDestroy(filePattern);
+			break;
+			}
+		++numDefinedFiles;
+
+		// Verify file existence
+		if (CheckPathExistenceL(filePath))
+			{
+			++numFoundFiles;
+			}
+		
+		CleanupStack::PopAndDestroy(filePattern);
+		}
+
+	// Calculate the test step result
+	TVerdict verdict = EFail;
+	if (verifyExistence)
+		{
+		if (foundInScr && scomoState == refScomoState && checkSisRegistry == foundInSisRegistry && numDefinedFiles == numFoundFiles)
+			{
+			if (launchExecutable)
+				{
+				if (exeReturnCode == launchStatus.Int())
+					{
+					verdict = EPass;
+					}
+				}
+			else
+				{
+				verdict = EPass;
+				}
+			}
+		}
+	else // verify NonExistence
+		{
+		if (!foundInScr && numFoundFiles == 0)
+			{
+			verdict = EPass;
+
+			if (checkSisRegistry && foundInSisRegistry)
+				{
+				verdict = EFail;
+				}
+			if (launchExecutable && apaErr != KErrNotFound)
+				{
+				verdict = EFail;
+				}
+			}
+		}
+
+	SetTestStepResult(verdict);
+
+	INFO_PRINTF1(_L("================== Begin Of Common Verification Steps =================="));
+	INFO_PRINTF3(_L("Verification of existence/non-existence: (%d/%d)"), verifyExistence, !verifyExistence);
+	INFO_PRINTF3(_L("Component name: %S, vendor: %S"), &componentName, &componentVendor);
+	INFO_PRINTF2(_L("Found in Scr = %d"), foundInScr);
+	INFO_PRINTF2(_L("Found in Swi = %d"), foundInSisRegistry);
+	INFO_PRINTF2(_L("Scomo state = %d"), scomoState);
+	INFO_PRINTF2(_L("Exe return code = %d"), exeReturnCode);
+	INFO_PRINTF3(_L("Test executable: %S launched with error code = %d"), &executableName, apaErr);
+	INFO_PRINTF3(_L("Component files: defined = %d, found = %d"), numDefinedFiles, numFoundFiles);
+	INFO_PRINTF1(_L("=================== End Of Common Verification Steps ==================="));
+	}
+
+void CSifCommonVerificationStep::ImplTestStepPostambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifcommonverificationstep.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#if (!defined TSIFCOMMONVERIFICATIONSTEP_H)
+#define TSIFCOMMONVERIFICATIONSTEP_H
+#include <test/testexecutestepbase.h>
+#include "tsifsuitestepbase.h"
+
+namespace Usif
+	{
+	class CSifCommonVerificationStep : public CSifSuiteStepBase
+		{
+	public:
+		CSifCommonVerificationStep();
+		~CSifCommonVerificationStep();
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepL();
+		virtual void ImplTestStepPostambleL();
+
+	private:
+	TScomoState GetScomoStateL(TComponentId aComponentId);
+
+	private:
+		TInt iExpectedResult;
+		};
+
+	_LIT(KSifCommonVerificationStep,"SifCommonVerificationStep");
+
+	} // namespace Sif
+
+#endif // TSIFCOMMONVERIFICATIONSTEP_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifgenericbrowserinstallstep.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,147 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#include "tsifgenericbrowserinstallstep.h"
+#include "tsifsuitedefs.h"
+#include <apgcli.h>
+
+using namespace Usif;
+
+CSifGenericBrowserInstallStep::~CSifGenericBrowserInstallStep()
+/**
+* Destructor
+*/
+	{
+	INFO_PRINTF1(_L("Cleanup in CSifGenericBrowserInstallStep::~CSifGenericBrowserInstallStep()"));
+	}
+
+CSifGenericBrowserInstallStep::CSifGenericBrowserInstallStep()
+/**
+* Constructor
+*/
+	{
+	}
+
+void CSifGenericBrowserInstallStep::ImplTestStepPreambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{
+	INFO_PRINTF1(_L("I am in CSifGenericBrowserInstallStep::ImplTestStepPreambleL()."));
+	}
+
+
+void CSifGenericBrowserInstallStep::ImplTestStepL()
+/**
+* @return - TVerdict code
+* Override of base class pure virtual
+* Our implementation only gets called if the base class doTestStepPreambleL() did
+* not leave. That being the case, the current test result value will be EPass.
+*/
+	{
+	INFO_PRINTF1(_L("I am in CSifGenericBrowserInstallStep::ImplTestStepL()."));
+
+	TPtrC fileName;
+	if(!GetStringFromConfig(ConfigSection(),KTe_PackageFile, fileName))
+		{
+		INFO_PRINTF1(_L("Failed to read package file name from ini file, error: KErrNotFound"));
+		User::Leave(KErrNotFound);
+		}
+		
+	TBool installByFileHandle = EFalse;
+	if(!GetBoolFromConfig(ConfigSection(),KTe_OperationByFileHandle, installByFileHandle))
+		{
+		INFO_PRINTF1(_L("Failed to read KTe_InstallByFileHandle from ini file, error: KErrNotFound"));
+		User::Leave(KErrNotFound);
+		}
+
+	RApaLsSession apa;
+	User::LeaveIfError(apa.Connect());
+	CleanupClosePushL(apa);
+
+	TRequestStatus status;
+	if (installByFileHandle)
+		{
+		RFs fs;
+		RFile file;
+		User::LeaveIfError(fs.Connect());
+		fs.ShareProtected();
+		CleanupClosePushL(fs);
+		User::LeaveIfError(file.Open(fs, fileName, EFileRead | EFileShareReadersOnly));
+		CleanupClosePushL(file);
+
+		TThreadId threadId;
+		TInt err = apa.StartDocument(file, threadId, &status);
+		if (err != KErrNone)
+			{
+			INFO_PRINTF2(_L("Failed to call RApaLsSession::StartDocument(), error code: %d"), err);
+			User::Leave(err);
+			}
+		User::WaitForRequest(status);
+		CleanupStack::PopAndDestroy(2, &fs);
+		}
+	else
+		{
+		TThreadId threadId;
+		TInt err = apa.StartDocument(fileName, threadId);
+		if (err != KErrNone)
+			{
+			INFO_PRINTF2(_L("Failed to call RApaLsSession::StartDocument(), error code: %d"), err);
+			User::Leave(err);
+			}
+
+		RThread thread;
+		err = thread.Open(threadId);
+		if (err != KErrNone)
+			{
+			INFO_PRINTF2(_L("Failed to call RThread::Open(), error code: %d"), err);
+			User::Leave(err);
+			}
+
+		thread.Rendezvous(status);
+		User::WaitForRequest(status);
+		}
+
+	CleanupStack::PopAndDestroy(&apa);
+
+	if (status != iExpectedResult)
+		{
+		INFO_PRINTF3(_L("Expected result doesn't match: current: %d expected: %d"), status.Int(), iExpectedResult);
+		SetTestStepResult(EFail);
+		}
+	else
+		{
+		SetTestStepResult(EPass);
+		}
+	}
+
+
+
+void CSifGenericBrowserInstallStep::ImplTestStepPostambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifgenericbrowserinstallstep.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#if (!defined TSIFGENERICBROWSERSTEPSTEP_H)
+#define TSIFGENERICBROWSERSTEPSTEP_H
+#include <test/testexecutestepbase.h>
+#include "tsifsuitestepbase.h"
+
+namespace Usif
+	{
+	class CSifGenericBrowserInstallStep : public CSifSuiteStepBase
+		{
+	public:
+		CSifGenericBrowserInstallStep();
+		~CSifGenericBrowserInstallStep();
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepL();
+		virtual void ImplTestStepPostambleL();
+
+	private:
+		TInt iExpectedResult;
+		};
+
+	_LIT(KSifGenericBrowserInstallStep,"SifGenericBrowserInstallStep");
+
+	} // namespace Sif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifoperationstep.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1056 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#include "tsifoperationstep.h"
+#include "tsifsuitedefs.h"
+#include <ct/rcpointerarray.h>
+
+using namespace Usif;
+
+CSifOperationStep::~CSifOperationStep()
+/**
+* Destructor
+*/
+	{
+	}
+
+CSifOperationStep::CSifOperationStep() : iExclusiveOperation(ETrue)
+/**
+* Constructor
+*/
+	{
+	}
+
+void CSifOperationStep::ImplTestStepPreambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{
+	CSifSuiteStepBase::ImplTestStepPreambleL();
+	INFO_PRINTF1(_L("I am in CSifOperationStep::ImplTestStepPreambleL()."));
+	if (TestStepResult()!=EPass)
+		{
+		return;
+		}
+
+	if (!GetIntFromConfig(ConfigSection(),KTe_CancelAfter, iCancelAfter))
+		{
+		iCancelAfter = -1;
+		}
+
+	TInt err = iSif.Connect();
+	if (err != KErrNone)
+		{
+		SetTestStepResult(EFail);
+		INFO_PRINTF2(_L("Failed to connect to the SIF server, error code: %d"), err);
+		}
+	else
+		{
+		SetTestStepResult(EPass);
+		}
+
+	LoadExclusiveOperationFlagFromConfigL();
+	}
+
+void CSifOperationStep::ImplTestStepPostambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{	
+	INFO_PRINTF1(_L("Cleanup in CSifOperationStep::~CSifOperationStep()"));
+	
+	iSif.Close();
+	
+	delete iComponentInfo;
+	iComponentInfo = NULL;
+	ClearOpaqueParams();
+	}
+	
+void CSifOperationStep::ClearOpaqueParams()
+	{
+	delete iPluginOpaqueArguments;
+	iPluginOpaqueArguments = NULL;
+	delete iPluginOpaqueResults;
+	iPluginOpaqueResults = NULL;
+	delete iPluginRefOpaqueResults;
+	iPluginRefOpaqueResults = NULL;	
+	}	
+
+void CSifOperationStep::CancelableWait()
+	{
+	if (iCancelAfter >= 0)
+		{
+		User::After(iCancelAfter);
+		iSif.CancelOperation();
+		}
+	else
+		{
+		User::WaitForRequest(iStatus);
+		}
+	}
+
+
+void CSifOperationStep::LoadFileNameFromConfigL()
+	{
+	if(!GetStringFromConfig(ConfigSection(),KTe_PackageFile, iFileName))
+		{
+		INFO_PRINTF2(_L("Parameter %S not found in the ini file"), &KTe_PackageFile);
+		User::Leave(KErrNotFound);
+		}
+	}
+
+void CSifOperationStep::LoadComponentIdFromConfigL()
+	{
+	TPtrC componentName, componentVendor;
+	if (GetStringFromConfig(ConfigSection(), KTe_ComponentName, componentName) &&
+		GetStringFromConfig(ConfigSection(), KTe_ComponentVendor, componentVendor))
+		{
+		iComponentId = FindComponentInScrL(componentName, componentVendor);
+		if (iComponentId != 0)
+			{
+			return;
+			}
+		INFO_PRINTF3(_L("Component name = %S, vendor = %S not found in SCR"), &componentName, &componentVendor);
+		User::Leave(KErrNotFound);
+		}
+
+
+	if(!GetIntFromConfig(ConfigSection(), KTe_ComponentId, iComponentId))
+		{
+		User::Leave(KErrNotFound);
+		}
+	}
+
+void CSifOperationStep::LoadComponentInfoFromConfigL()
+	{
+	}
+
+void CSifOperationStep::LoadExclusiveOperationFlagFromConfigL()
+	{
+	GetBoolFromConfig(ConfigSection(),KTe_ExclusiveOperation, iExclusiveOperation);
+	}
+
+void CSifOperationStep::LoadPluginOpaqueParamsFromConfigL(const TDesC& aNamePattern, const TDesC& aTypePattern, const TDesC& aValuePattern, COpaqueNamedParams& aOpaqueParams)
+	{
+	// name pattern
+	HBufC* namePattern = HBufC::NewLC(aNamePattern.Length()+KMaxIntDigits);
+	TPtr bufNamePattern(namePattern->Des());
+	// value pattern
+	HBufC* valuePattern = HBufC::NewLC(aValuePattern.Length()+KMaxIntDigits);
+	TPtr bufValuePattern(valuePattern->Des());
+	// value type pattern
+	HBufC* typePattern = HBufC::NewLC(aTypePattern.Length()+KMaxIntDigits);
+	TPtr bufTypePattern(typePattern->Des());
+
+	const TInt maxNumParams = 16;
+	for (TInt i=0; i<maxNumParams; ++i)
+		{
+		// param name
+		bufNamePattern.Copy(aNamePattern);
+		bufNamePattern.AppendNum(i);
+		TPtrC name;
+		if (!GetStringFromConfig(ConfigSection(), *namePattern, name))
+			{
+			break;
+			}
+		
+		//param type
+		bufTypePattern.Copy(aTypePattern);
+		bufTypePattern.AppendNum(i);
+		TPtrC type;
+		if (!GetStringFromConfig(ConfigSection(), *typePattern, type))
+			{
+			INFO_PRINTF2(_L("Expected opaque param type: %S not found "), typePattern);
+			User::Leave(KErrNotFound);
+			}
+
+		//param value
+		bufValuePattern.Copy(aValuePattern);
+		bufValuePattern.AppendNum(i);
+		if (type.Compare(KTe_PluginOpaqueValueTypeString) == 0)
+			{
+			TPtrC value;
+			if (GetStringFromConfig(ConfigSection(), *valuePattern, value))
+				{
+				aOpaqueParams.AddStringL(name, value);
+				}
+			else
+				{
+				INFO_PRINTF2(_L("Expected opaque param value: %S not found "), valuePattern);
+				User::Leave(KErrNotFound);
+				}
+			}
+		else if (type.Compare(KTe_PluginOpaqueValueTypeInt) == 0)
+			{
+			TInt value = 0;
+			if(GetIntFromConfig(ConfigSection(), *valuePattern, value))
+				{
+				aOpaqueParams.AddIntL(name, value);
+				}
+			else
+				{
+				INFO_PRINTF2(_L("Expected opaque param value: %S not found "), valuePattern);
+				User::Leave(KErrNotFound);
+				}
+			}
+		else
+			{
+			INFO_PRINTF2(_L("Unknow type of opaque param value: %S "), &type);
+			User::Leave(KErrUnknown);
+			}
+		
+		}
+	CleanupStack::PopAndDestroy(3, namePattern);
+	}
+
+void ClearOpaqueParamsCleanup(TAny* aParam)
+	{
+	static_cast<CSifOperationStep*>(aParam)->ClearOpaqueParams();
+	}	
+	
+void CSifOperationStep::LoadOpaqueParamsL()
+	{
+	GetBoolFromConfig(ConfigSection(),KTe_UseEnhancedApi, iUseEnhancedApi);
+
+	CleanupStack::PushL(TCleanupItem(ClearOpaqueParamsCleanup, this));
+	if (iUseEnhancedApi)
+		{
+		delete iPluginOpaqueArguments;
+		iPluginOpaqueArguments = NULL;
+		iPluginOpaqueArguments = COpaqueNamedParams::NewL();
+		delete iPluginOpaqueResults;
+		iPluginOpaqueResults = NULL;
+		iPluginOpaqueResults = COpaqueNamedParams::NewL();
+		delete iPluginRefOpaqueResults;
+		iPluginRefOpaqueResults = NULL;
+		iPluginRefOpaqueResults = COpaqueNamedParams::NewL();
+
+		LoadPluginOpaqueParamsFromConfigL(KTe_PluginOpaqueArgumentName, KTe_PluginOpaqueArgumentType, KTe_PluginOpaqueArgumentValue, *iPluginOpaqueArguments);
+		LoadPluginOpaqueParamsFromConfigL(KTe_PluginRefOpaqueResultName, KTe_PluginRefOpaqueResultType, KTe_PluginRefOpaqueResultValue, *iPluginRefOpaqueResults);
+		}
+	CleanupStack::Pop(); // ClearOpaqueParams
+	}
+
+TBool CSifOperationStep::CompareOpaqueResultsL()
+	{
+	if (iPluginOpaqueResults == NULL && iPluginRefOpaqueResults == NULL)
+		{
+		return ETrue;
+		}
+	else if (iPluginOpaqueResults == NULL || iPluginRefOpaqueResults == NULL)
+		{
+		return EFalse;
+		}
+	
+	const TInt llen = iPluginOpaqueResults->CountL();
+	const TInt rlen = iPluginRefOpaqueResults->CountL();
+	if (llen != rlen)
+		{
+		INFO_PRINTF3(_L("The number of expected and returned opaque params differs. Expected: %d, returned: %d "), rlen, llen);
+		return EFalse;
+		}
+
+	RCPointerArray<HBufC> names;
+	CleanupClosePushL(names);
+	iPluginOpaqueResults->GetNamesL(names);
+
+	for (TInt i=0; i<llen; ++i)
+		{
+		const TDesC& lName = *names[i];
+		const TDesC& lValue = iPluginOpaqueResults->StringByNameL(lName);
+		const TDesC& rValue = iPluginRefOpaqueResults->StringByNameL(lName);
+		
+		if (rValue == KTe_AnyValuePermitted && rValue != KNullDesC)
+			{
+			continue;
+			}
+
+		if (lValue.Size() != rValue.Size())
+			{
+			INFO_PRINTF4(_L("Mismatch on param sizes for param %S. Expected size %d, returned size %d"), &lName, rValue.Size(), lValue.Size());
+			CleanupStack::PopAndDestroy(&names);
+			return EFalse;
+			}
+		if (lValue.Size() != sizeof(TInt) && lValue != rValue)
+			{
+			INFO_PRINTF4(_L("Mismatch for string param %S. Expected %S, returned %S"), &lName, &rValue, &lValue);
+			CleanupStack::PopAndDestroy(&names);
+			return EFalse;
+			}
+		if (lValue.Size() == sizeof(TInt))
+			{
+			TInt lIntValue = iPluginOpaqueResults->IntByNameL(lName);
+			TInt rIntValue = iPluginRefOpaqueResults->IntByNameL(lName);
+			if (lIntValue != rIntValue)
+				{
+				INFO_PRINTF4(_L("Mismatch for integer param %S. Expected %d, returned %d"), &lName, rIntValue, lIntValue);
+				CleanupStack::PopAndDestroy(&names);
+				return EFalse;
+				}
+			}
+		}
+
+	CleanupStack::PopAndDestroy(&names);
+	return ETrue;
+	}
+
+void CSifOperationStep::PrintOpaqueParamsL(const COpaqueNamedParams& aOpaqueParams)
+	{
+	RCPointerArray<HBufC> names;
+	CleanupClosePushL(names);
+	aOpaqueParams.GetNamesL(names);
+	for (TInt i=0; i<names.Count(); ++i)
+		{
+		const TDesC& name = *names[i];
+		const TDesC& value = aOpaqueParams.StringByNameL(name);
+		if (value.Size() == sizeof(TInt))
+			{
+			const TInt intValue = aOpaqueParams.IntByNameL(name);
+			INFO_PRINTF4(_L("Param: %d, Name: %S, IntValue: %d"), i, &name, intValue);
+			}
+		else
+			{
+			INFO_PRINTF4(_L("Param: %d, Name: %S, Value: %S"), i, &name, &value);
+			}
+		}
+	CleanupStack::PopAndDestroy(&names);
+	}
+
+TBool CSifOperationStep::CheckOpaqueResultsL()
+	{
+	if (CompareOpaqueResultsL())
+		{
+		return ETrue;
+		}
+
+	INFO_PRINTF1(_L("==================== Begin of opaque results ===================="));
+
+	if (iPluginOpaqueResults)
+		{
+		INFO_PRINTF1(_L("Expected opaque results:"));
+		PrintOpaqueParamsL(*iPluginOpaqueResults);
+		}
+
+	INFO_PRINTF1(_L("-----------------------------------------------------------------"));
+
+	if (iPluginRefOpaqueResults)
+		{
+		INFO_PRINTF1(_L("Returned opaque results:"));
+		PrintOpaqueParamsL(*iPluginRefOpaqueResults);
+		}
+
+	INFO_PRINTF1(_L("===================== End of opaque results ====================="));
+
+	return EFalse;
+	}
+
+
+// *****************************************************************************************************
+
+
+CSifGetComponentInfoStep::~CSifGetComponentInfoStep()
+/**
+* Destructor
+*/
+	{
+	delete iComponentInfo;
+	}
+
+CSifGetComponentInfoStep::CSifGetComponentInfoStep() : iCompareMaxInstalledSize(ETrue)
+/**
+* Constructor
+*/
+	{
+	SetTestStepName(KSifGetComponentInfoStep);
+	}
+
+namespace
+	{
+	TInt PackCapabilitySet(const TCapabilitySet& aCapSet)
+		{
+		TInt caps=0;
+		for (TInt c=0; c<ECapability_Limit; ++c)
+			{
+			if (aCapSet.HasCapability(TCapability(c)))
+				{
+				caps+=(1<<c);
+				}
+			}
+		return caps;
+		}
+
+	void UnpackCapabilitySet(TInt aPackedCapSet, TCapabilitySet& aCapSet)
+		{
+		for (TInt c=0; c<ECapability_Limit; ++c)
+			{
+			const TInt cap = 1<<c;
+			if (aPackedCapSet&cap)
+				{
+				aCapSet.AddCapability(TCapability(c));
+				}
+			}
+		}
+	}
+
+void CSifGetComponentInfoStep::LoadComponentInfoL()
+	{
+	ASSERT(iComponentInfo == NULL);
+
+	// Load the tree of CComponentInfo nodes
+	CComponentInfo::CNode* rootNode = LoadCompInfoNodeLC(KTe_CompInfoRootNodePrefix);
+	
+	// Create an instance of CComponentInfo
+	iComponentInfo = CComponentInfo::NewL();
+	iComponentInfo->SetRootNodeL(rootNode);
+	CleanupStack::Pop(rootNode);
+	}
+
+namespace
+	{
+	HBufC* CompInfoParamNameLC(const TDesC& aStr1, const TDesC& aStr2)
+		{
+		HBufC* conc = HBufC::NewLC(aStr1.Length()+aStr2.Length()+1);
+		TPtr bufConc(conc->Des());
+		bufConc.Copy(aStr1);
+		bufConc.Append(_L("."));
+		bufConc.Append(aStr2);
+		return conc;
+		}
+	}
+
+TPtrC CSifGetComponentInfoStep::LoadCompInfoNodeStringParamL(const TDesC& aNodePrefix, const TDesC& aParamName)
+	{
+	HBufC* name = CompInfoParamNameLC(aNodePrefix, aParamName);
+
+	TPtrC value;
+	if (!GetStringFromConfig(ConfigSection(), *name, value))
+		{
+		INFO_PRINTF2(_L("ComponentInfo param: %S not found in the ini file"), name);
+		User::Leave(KErrNotFound);
+		}
+
+	CleanupStack::PopAndDestroy(name);
+	return value;
+	}
+
+TInt CSifGetComponentInfoStep::LoadCompInfoNodeIntParamL(const TDesC& aNodePrefix, const TDesC& aParamName, TBool aMandatory)
+	{
+	HBufC* name = CompInfoParamNameLC(aNodePrefix, aParamName);
+
+	TInt value(0);
+	if (!GetIntFromConfig(ConfigSection(), *name, value) && aMandatory)
+		{
+		INFO_PRINTF2(_L("ComponentInfo param: %S not found in the ini file"), name);
+		User::Leave(KErrNotFound);
+		}
+
+	CleanupStack::PopAndDestroy(name);
+	return value;
+	}
+
+TBool CSifGetComponentInfoStep::LoadCompInfoNodeBoolParamL(const TDesC& aNodePrefix, const TDesC& aParamName, TBool aMandatory)
+	{
+	HBufC* name = CompInfoParamNameLC(aNodePrefix, aParamName);
+
+	TBool value(EFalse);
+	if (!GetBoolFromConfig(ConfigSection(), *name, value) && aMandatory)
+		{
+		INFO_PRINTF2(_L("ComponentInfo param: %S not found in the ini file"), name);
+		User::Leave(KErrNotFound);
+		}
+
+	CleanupStack::PopAndDestroy(name);
+	return value;
+	}
+
+CComponentInfo::CNode* CSifGetComponentInfoStep::LoadCompInfoNodeLC(const TDesC& aNodeName)
+	{
+	TPtrC swType(LoadCompInfoNodeStringParamL(aNodeName, KTe_SoftwareTypeName));
+	TPtrC name(LoadCompInfoNodeStringParamL(aNodeName, KTe_ComponentName));
+	TPtrC vendor(LoadCompInfoNodeStringParamL(aNodeName, KTe_ComponentVendor));
+	TPtrC version(LoadCompInfoNodeStringParamL(aNodeName, KTe_ComponentVersion));
+	TPtrC globalId(LoadCompInfoNodeStringParamL(aNodeName, KTe_GlobalComponentId));
+
+	TInt scomoState(LoadCompInfoNodeIntParamL(aNodeName, KTe_ScomoState));
+	TInt installStatus(LoadCompInfoNodeIntParamL(aNodeName, KTe_InstallStatus));
+	TInt componentId(LoadCompInfoNodeIntParamL(aNodeName, KTe_ComponentId));
+	TInt authenticity(LoadCompInfoNodeIntParamL(aNodeName, KTe_Authenticity));
+	TInt size(LoadCompInfoNodeIntParamL(aNodeName, KTe_MaxInstalledSize));
+	TBool hasexe(LoadCompInfoNodeBoolParamL(aNodeName, KTe_HasExecutable));
+	
+	TInt packedCaps(LoadCompInfoNodeIntParamL(aNodeName, KTe_UserGrantableCaps));
+	TCapabilitySet capSet;
+	capSet.SetEmpty();
+	UnpackCapabilitySet(packedCaps, capSet);
+
+	CComponentInfo::CNode* node = CComponentInfo::CNode::NewLC(swType, name, version, vendor,
+					static_cast<TScomoState>(scomoState), static_cast<TInstallStatus>(installStatus),
+					static_cast<TComponentId>(componentId), globalId, static_cast<TAuthenticity>(authenticity),
+					capSet, size, hasexe);
+	
+	// Load children
+	TInt numChildren(LoadCompInfoNodeIntParamL(aNodeName, KTe_CompInfoNumChildren, EFalse));
+	for (TInt i=0; i<numChildren; ++i)
+		{
+		HBufC* childNodeName = HBufC::NewLC(aNodeName.Length() + KTe_CompInfoChildNodePrefix.iTypeLength + KMaxIntDigits);
+		TPtr childNodeNamePtr(childNodeName->Des());
+		childNodeNamePtr.Copy(aNodeName);
+		childNodeNamePtr.Append(KTe_CompInfoChildNodePrefix);
+		childNodeNamePtr.AppendNum(i);
+		
+		CComponentInfo::CNode* childNode = LoadCompInfoNodeLC(*childNodeName);
+		node->AddChildL(childNode);
+		CleanupStack::Pop(childNode);
+		
+		CleanupStack::PopAndDestroy(childNodeName);
+		}
+
+	return node;
+	}
+
+TBool CSifGetComponentInfoStep::CompareCompInfoNodeL(const CComponentInfo::CNode& aExpectedNode, const CComponentInfo::CNode& aObtainedNode)
+	{
+	INFO_PRINTF2(_L("Checking CComponentInfo for component: '%S'"), &aExpectedNode.ComponentName());
+	if (aExpectedNode.SoftwareTypeName() != aObtainedNode.SoftwareTypeName())
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained SoftwareTypeName: '%S'/'%S'"), &aExpectedNode.SoftwareTypeName(), &aObtainedNode.SoftwareTypeName());
+		return EFalse;
+		}
+
+	if (aExpectedNode.ComponentName() != aObtainedNode.ComponentName())
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained ComponentName: '%S'/'%S'"), &aExpectedNode.ComponentName(), &aObtainedNode.ComponentName());
+		return EFalse;
+		}
+
+	if (aExpectedNode.Version() != aObtainedNode.Version())
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained Version: '%S'/'%S'"), &aExpectedNode.Version(), &aObtainedNode.Version());
+		return EFalse;
+		}
+
+	if (aExpectedNode.Vendor() != aObtainedNode.Vendor())
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained Vendor: '%S'/'%S'"), &aExpectedNode.Vendor(), &aObtainedNode.Vendor());
+		return EFalse;
+		}
+
+	if (aExpectedNode.ScomoState() != aObtainedNode.ScomoState() && aObtainedNode.InstallStatus() != EInvalid &&
+		aObtainedNode.InstallStatus() != ENewComponent) // SCOMO status is meaningless on non-existing components
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained ScomoState: %d/%d"), aExpectedNode.ScomoState(), aObtainedNode.ScomoState());
+		return EFalse;
+		}
+
+	if (aExpectedNode.InstallStatus() != aObtainedNode.InstallStatus())
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained InstallStatus: %d/%d"), aExpectedNode.InstallStatus(), aObtainedNode.InstallStatus());
+		return EFalse;
+		}
+
+	if (aExpectedNode.ComponentId() != aObtainedNode.ComponentId())
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained ComponentId: %d/%d"), aExpectedNode.ComponentId(), aObtainedNode.ComponentId());
+		return EFalse;
+		}
+
+	if (aExpectedNode.GlobalComponentId() != aObtainedNode.GlobalComponentId())
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained GlobalComponentId: '%S'/'%S'"), &aExpectedNode.GlobalComponentId(), &aObtainedNode.GlobalComponentId());
+		return EFalse;
+		}
+
+	if (aExpectedNode.Authenticity() != aObtainedNode.Authenticity())
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained Authenticity: %d/%d"), aExpectedNode.Authenticity(), aObtainedNode.Authenticity());
+		return EFalse;
+		}
+
+	if (PackCapabilitySet(aExpectedNode.UserGrantableCaps()) != PackCapabilitySet(aObtainedNode.UserGrantableCaps()))
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained UserGrantableCaps: %d/%d"), PackCapabilitySet(aExpectedNode.UserGrantableCaps()), PackCapabilitySet(aObtainedNode.UserGrantableCaps()));
+		return EFalse;
+		}
+
+	if (iCompareMaxInstalledSize && aExpectedNode.MaxInstalledSize() != aObtainedNode.MaxInstalledSize())
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained MaxInstalledSize: %d/%d"), aExpectedNode.MaxInstalledSize(), aObtainedNode.MaxInstalledSize());
+		return EFalse;
+		}
+	if (aExpectedNode.HasExecutable() != aObtainedNode.HasExecutable())
+		{
+		INFO_PRINTF3(_L("CComponentInfo doesn't match: expected/obtained Has Executable Flag: %d/%d"), aExpectedNode.HasExecutable(), aObtainedNode.HasExecutable());
+		return EFalse;
+		}
+	
+	const RPointerArray<CComponentInfo::CNode>& expectedChildren = aExpectedNode.Children();
+	const RPointerArray<CComponentInfo::CNode>& obtainedChildren = aObtainedNode.Children();
+	if (expectedChildren.Count() != obtainedChildren.Count())
+		{
+		INFO_PRINTF4(_L("CComponentInfo doesn't match: component %S has different number of embedded components, expected/obtained: %d/%d"), &aExpectedNode.ComponentName(), expectedChildren.Count(), obtainedChildren.Count());
+		return EFalse;
+		}
+	
+	for (TInt i=0; i<expectedChildren.Count(); ++i)
+		{
+		const CComponentInfo::CNode& expectedChild = *expectedChildren[i];
+		const CComponentInfo::CNode& obtainedChild = *obtainedChildren[i];
+		if (!CompareCompInfoNodeL(expectedChild, obtainedChild))
+			{
+			INFO_PRINTF3(_L("CComponentInfo tree comparison failed at component: %S, vendor: %S"), &aExpectedNode.ComponentName(), &aExpectedNode.Vendor());
+			return EFalse;
+			}
+		}
+	
+	return ETrue;
+	}
+
+void CSifGetComponentInfoStep::ImplTestStepPreambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{
+	CSifOperationStep::ImplTestStepPreambleL();
+	INFO_PRINTF1(_L("I am in Test Step Preamble in Class CSifGetComponentInfoStep"));
+
+	if (TestStepResult()==EPass)
+		{
+		LoadFileNameFromConfigL();
+
+		LoadComponentInfoL();
+
+		GetBoolFromConfig(ConfigSection(),KTe_OperationByFileHandle, iOperationByFileHandle);
+		
+		GetBoolFromConfig(ConfigSection(),KTe_CompareMaxInstalledSize, iCompareMaxInstalledSize);
+		}
+	}
+
+
+void CSifGetComponentInfoStep::ImplTestStepL()
+/**
+* @return - TVerdict code
+* Override of base class pure virtual
+* Our implementation only gets called if the base class ImplTestStepPreambleL() did
+* not leave. That being the case, the current test result value will be EPass.
+*/
+	{
+	if (TestStepResult()!=EPass)
+		{
+		INFO_PRINTF1(_L("CSifGetComponentInfoStep::ImplTestStepL() called with TestStepResult()!=EPass"));
+		return;
+		}
+
+	INFO_PRINTF1(_L("In the file CSifGetComponentInfoStep::ImplTestStepL()"));
+
+	CComponentInfo* compInfo = CComponentInfo::NewLC();
+
+	RFs fs;
+	RFile file;
+	if (iOperationByFileHandle)
+		{
+		User::LeaveIfError(fs.Connect());
+		fs.ShareProtected();
+		CleanupClosePushL(fs);
+		User::LeaveIfError(file.Open(fs, iFileName, EFileShareReadersOnly));
+		CleanupClosePushL(file);
+
+		iSif.GetComponentInfo(file, *compInfo, iStatus);
+		}
+	else
+		{
+		iSif.GetComponentInfo(iFileName, *compInfo, iStatus);
+		}
+
+	CancelableWait();
+
+	if (iOperationByFileHandle)
+		{
+		CleanupStack::PopAndDestroy(2, &fs);
+		}
+	
+	User::LeaveIfError(iStatus.Int());
+
+	SetTestStepResult(CompareCompInfoNodeL(iComponentInfo->RootNodeL(), compInfo->RootNodeL()) ? EPass : EFail);
+
+	CleanupStack::PopAndDestroy(compInfo);
+	}
+
+// *****************************************************************************************************
+
+
+CSifInstallStep::~CSifInstallStep()
+/**
+* Destructor
+*/
+	{
+	}
+
+CSifInstallStep::CSifInstallStep()
+/**
+* Constructor
+*/
+	{
+	SetTestStepName(KSifInstallStep);
+	}
+
+void CSifInstallStep::ImplTestStepPreambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{
+	CSifOperationStep::ImplTestStepPreambleL();
+	INFO_PRINTF1(_L("I am in Test Step Preamble in Class CSifInstallStep"));
+	}
+
+
+void CSifInstallStep::ImplTestStepL()
+/**
+* @return - TVerdict code
+* Override of base class pure virtual
+* Our implementation only gets called if the base class ImplTestStepPreambleL() did
+* not leave. That being the case, the current test result value will be EPass.
+*/
+	{
+	if (TestStepResult()!=EPass)
+		{
+		INFO_PRINTF1(_L("CSifInstallStep::ImplTestStepL() called with TestStepResult()!=EPass"));
+		return;
+		}
+
+	INFO_PRINTF1(_L("In the file CSifInstallStep::ImplTestStepL()"));	
+	
+	LoadOpaqueParamsL();
+	CleanupStack::PushL(TCleanupItem(ClearOpaqueParamsCleanup, this));
+	
+	LoadFileNameFromConfigL();
+		
+	GetBoolFromConfig(ConfigSection(),KTe_OperationByFileHandle, iInstallByFileHandle);
+		
+	RFs fs;
+	RFile file;
+	if (iInstallByFileHandle)
+		{
+		User::LeaveIfError(fs.Connect());
+		fs.ShareProtected();
+		CleanupClosePushL(fs);
+		User::LeaveIfError(file.Open(fs, iFileName, EFileRead | EFileShareReadersOnly));
+		CleanupClosePushL(file);
+
+		if (iUseEnhancedApi)
+			{
+			iSif.Install(file, *iPluginOpaqueArguments, *iPluginOpaqueResults, iStatus, iExclusiveOperation);
+			}
+		else
+			{
+			iSif.Install(file, iStatus, iExclusiveOperation);
+			}
+		}
+	else
+		{
+		if (iUseEnhancedApi)
+			{
+			iSif.Install(iFileName, *iPluginOpaqueArguments, *iPluginOpaqueResults, iStatus, iExclusiveOperation);
+			}
+		else
+			{
+			iSif.Install(iFileName, iStatus, iExclusiveOperation);
+			}
+		}
+
+	CancelableWait();
+
+	if (iInstallByFileHandle)
+		{
+		CleanupStack::PopAndDestroy(2, &fs);
+		}
+
+	TInt err = iStatus.Int();
+	if (err != KErrNone)
+		{
+		INFO_PRINTF2(_L("CSifInstallStep::ImplTestStepL failed with error code = %d"), err);
+		User::LeaveIfError(err);
+		}
+	
+	TBool res = EFalse;
+	TRAP(err, res = CompareOpaqueResultsL());
+	if (err != KErrNoMemory)
+		User::Leave(err); // Do not treat OOM errors as fatal by this point - otherwise OOM tests will atempt to uninstall the component again after uninstall has completed	
+	
+	if (err == KErrNoMemory) // Handling KErrNoMemory as it is done purposefully as part of OOM Test
+	    SetTestStepResult(EPass);
+	else if (!res)
+		{
+		SetTestStepResult(EFail);
+		INFO_PRINTF1(_L("CSifInstallStep::ImplTestStepL failed because of CompareOpaqueResultsL"));
+		INFO_PRINTF1(_L("=================== Begin of Received Opaque Results ==================="));
+		PrintOpaqueParamsL(*iPluginOpaqueResults);
+		INFO_PRINTF1(_L("=================== End of Received Opaque Results ==================="));
+		INFO_PRINTF1(_L("=================== Begin of Expected Opaque Results ==================="));
+		PrintOpaqueParamsL(*iPluginRefOpaqueResults);
+		INFO_PRINTF1(_L("=================== End of Expected Opaque Results ==================="));
+		}
+	CleanupStack::PopAndDestroy(); //ClearOpaqueParamsCleanup
+	}
+
+// *****************************************************************************************************
+
+
+CSifUninstallStep::~CSifUninstallStep()
+/**
+* Destructor
+*/
+	{
+	}
+
+CSifUninstallStep::CSifUninstallStep()
+/**
+* Constructor
+*/
+	{
+	SetTestStepName(KSifUninstallStep);
+	}
+
+void CSifUninstallStep::ImplTestStepPreambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{
+	CSifOperationStep::ImplTestStepPreambleL();
+	INFO_PRINTF1(_L("I am in Test Step Preamble in Class CSifUninstallStep"));
+	
+	LoadComponentIdFromConfigL();
+	}
+
+void CSifUninstallStep::ImplTestStepL()
+/**
+* @return - TVerdict code
+* Override of base class pure virtual
+* Our implementation only gets called if the base class ImplTestStepPreambleL() did
+* not leave. That being the case, the current test result value will be EPass.
+*/
+	{
+	INFO_PRINTF1(_L("In the file CSifUninstallStep::ImplTestStepL()"));  //Block start	
+	LoadOpaqueParamsL();
+	CleanupStack::PushL(TCleanupItem(ClearOpaqueParamsCleanup, this));
+	
+	if (iUseEnhancedApi)
+		{
+		iSif.Uninstall(iComponentId, *iPluginOpaqueArguments, *iPluginOpaqueResults, iStatus, iExclusiveOperation);
+		}
+	else
+		{
+		iSif.Uninstall(iComponentId, iStatus, iExclusiveOperation);
+		}
+
+	CancelableWait();
+	
+	User::LeaveIfError(iStatus.Int());
+
+	TBool res = EFalse;
+	TRAPD(err, res = CompareOpaqueResultsL());
+	if (err != KErrNoMemory)
+		User::Leave(err); // Do not treat OOM errors as fatal by this point - otherwise OOM tests will atempt to uninstall the component again after uninstall has completed
+	
+	if (err == KErrNoMemory) // Handling KErrNoMemory as it is done purposefully as part of OOM Test
+	    SetTestStepResult(EPass);
+	else if (!res)
+		SetTestStepResult(EFail);
+		
+	CleanupStack::PopAndDestroy(); //ClearOpaqueParamsCleanup		
+	}
+	
+// *****************************************************************************************************
+
+	
+CSifActivateStep::CSifActivateStep(TBool aActivate): iActivate(aActivate)
+	{
+	SetTestStepName(KSifActivateStep);
+	}
+
+CSifActivateStep::~CSifActivateStep()
+	{
+	}
+
+void CSifActivateStep::ImplTestStepPreambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{
+	CSifOperationStep::ImplTestStepPreambleL();
+	INFO_PRINTF1(_L("I am in Test Step Preamble in Class CSifActivateStep"));
+
+	if (TestStepResult()==EPass)
+		{
+		LoadComponentIdFromConfigL();
+		}
+
+	}
+
+void CSifActivateStep::ImplTestStepL()
+/**
+* @return - TVerdict code
+* Override of base class pure virtual
+* Our implementation only gets called if the base class ImplTestStepPreambleL() did
+* not leave. That being the case, the current test result value will be EPass.
+*/
+	{
+	INFO_PRINTF1(_L("In the file CSifActivateStep::ImplTestStepL()"));
+
+	if (iActivate)
+		{
+		iSif.Activate(iComponentId, iStatus);
+		}
+	else
+		{
+		iSif.Deactivate(iComponentId, iStatus);
+		}
+
+	CancelableWait();
+	
+	User::LeaveIfError(iStatus.Int());
+	
+	if (!CompareOpaqueResultsL())
+		SetTestStepResult(EFail);
+	}
+
+/**
+* This test step implements verification of concurrent operations.
+*/
+
+CSifMultipleInstallStep::~CSifMultipleInstallStep()
+	/**
+	* Destructor
+	*/
+	{
+	}
+
+CSifMultipleInstallStep::CSifMultipleInstallStep()
+	/**
+	* Constructor
+	*/
+	{
+	SetTestStepName(KSifMultipleInstallStep);
+	}
+
+void CSifMultipleInstallStep::ImplTestStepPreambleL()
+/**
+* @return - TVerdict code
+* Override of base class virtual
+*/
+	{
+	INFO_PRINTF1(_L("This is TestStepPreamble method of class CSifMultipleInstallStep"));
+
+	LoadFileNameFromConfigL();
+	LoadExclusiveOperationFlagFromConfigL();
+	}
+
+void CSifMultipleInstallStep::ImplTestStepL()
+	{
+	INFO_PRINTF1(_L("In the file CSifMultipleInstallStep::ImplTestStepL()"));
+	LoadOpaqueParamsL();
+
+	if (TestStepResult()!=EPass)
+		{
+		INFO_PRINTF1(_L("CSifMultipleInstallStep::ImplTestStepL() called with TestStepResult()!=EPass"));
+		return;
+		}
+
+	TInt expectedConcurrentResult = 0;
+	TInt overlapRequest = EFalse;
+	if (!GetIntFromConfig(ConfigSection(), KTe_ExpectedConcurrentResult, expectedConcurrentResult) ||
+		!GetBoolFromConfig(ConfigSection(), KTe_OverlapRequest, overlapRequest))
+		{
+		INFO_PRINTF3(_L("Expected test parameters: %S or %S not found "), &KTe_ExpectedConcurrentResult, &KTe_OverlapRequest);
+		User::Leave(KErrNotFound);
+		}
+
+	/* First installation request */
+	RSoftwareInstall sif1;
+	TInt error = sif1.Connect();
+	if (error != KErrNone)
+		{
+		INFO_PRINTF2(_L("Failed to connect to the SIF server, error code: %d"), error);
+		User::Leave(error);
+		}
+	CleanupClosePushL(sif1);
+
+	TRequestStatus status1;
+	sif1.Install(iFileName, status1);
+
+	if (!overlapRequest)
+		{
+		User::WaitForRequest(status1);
+		}
+
+	/* Second installation request */
+	
+	// Use different file name if provided
+	TPtrC fileName2;
+	if (!GetStringFromConfig(ConfigSection(), _L("packageFile2"), fileName2))
+		{
+		fileName2.Set(iFileName);
+		}
+
+	RSoftwareInstall sif2;
+	error = sif2.Connect();
+	if (error != KErrNone)
+		{
+		INFO_PRINTF2(_L("Failed to connect to the SIF server, error code: %d"), error);
+		User::Leave(error);
+		}
+	CleanupClosePushL(sif2);
+
+	TRequestStatus status2;
+	
+	if (iUseEnhancedApi)
+		{
+		sif2.Install(fileName2, *iPluginOpaqueArguments, *iPluginOpaqueResults, status2, iExclusiveOperation);
+		}
+	else
+		{
+		sif2.Install(fileName2, status2, iExclusiveOperation);
+		}
+
+	if (overlapRequest)
+		{
+		User::WaitForRequest(status1);
+		}
+
+	User::WaitForRequest(status2);
+
+	//close both the sessions at the end.
+	CleanupStack::PopAndDestroy(2, &sif1);
+
+	if(status2 != expectedConcurrentResult) 
+		{
+		INFO_PRINTF3(_L("status2: %d expectedResult1: %d"), status2.Int(), expectedConcurrentResult);
+		SetTestStepResult(EFail);
+		}
+	User::LeaveIfError(status1.Int());
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifoperationstep.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,145 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#if (!defined TSIFOPERATIONSTEP_H)
+#define TSIFOPERATIONSTEP_H
+#include <test/testexecutestepbase.h>
+#include "tsifsuitestepbase.h"
+#include <usif/sif/sif.h>
+
+namespace Usif
+	{
+	class CSifOperationStep : public CSifSuiteStepBase
+		{
+	public:
+		CSifOperationStep();
+		~CSifOperationStep();
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+#ifdef _DEBUG
+		virtual RScsClientBase* ClientHandle() { return &(iSif.iTransport);}
+#endif
+		// Used by a non-member function
+		void ClearOpaqueParams();
+		
+	protected:
+		TBool CompareOpaqueResultsL();
+		TBool CheckOpaqueResultsL();
+		void PrintOpaqueParamsL(const COpaqueNamedParams& aOpaqueParams);
+		void CancelableWait();
+
+		void LoadExclusiveOperationFlagFromConfigL();
+		void LoadFileNameFromConfigL();
+		void LoadComponentIdFromConfigL();
+		void LoadComponentInfoFromConfigL();
+		void LoadPluginOpaqueParamsFromConfigL(const TDesC& aNamePattern, const TDesC& aTypePattern, const TDesC& aValuePattern, Usif::COpaqueNamedParams& aOpaqueParams);
+		void LoadOpaqueParamsL();
+
+		TBool iUseEnhancedApi;
+		TBool iExclusiveOperation;
+		TPtrC iFileName;
+		Usif::TComponentId iComponentId;
+		Usif::CComponentInfo* iComponentInfo;
+		Usif::COpaqueNamedParams* iPluginOpaqueArguments;
+		Usif::COpaqueNamedParams* iPluginOpaqueResults;
+		Usif::COpaqueNamedParams* iPluginRefOpaqueResults;
+
+		Usif::RSoftwareInstall iSif;
+		TRequestStatus iStatus;
+
+	private:
+		TInt iCancelAfter;
+		};
+
+	class CSifGetComponentInfoStep : public CSifOperationStep
+		{
+	public:
+		CSifGetComponentInfoStep();
+		~CSifGetComponentInfoStep();
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepL();
+
+	private:
+		void LoadComponentInfoL();
+		TPtrC LoadCompInfoNodeStringParamL(const TDesC& aNodePrefix, const TDesC& aParamName);
+		TInt LoadCompInfoNodeIntParamL(const TDesC& aNodePrefix, const TDesC& aParamName, TBool aMandatory = ETrue);
+		TBool LoadCompInfoNodeBoolParamL(const TDesC& aNodePrefix, const TDesC& aParamName, TBool aMandatory = ETrue);
+		CComponentInfo::CNode* LoadCompInfoNodeLC(const TDesC& aNodeName);
+		TBool CompareCompInfoNodeL(const CComponentInfo::CNode& aExpectedNode, const CComponentInfo::CNode& aObtainedNode);
+
+		TBool iOperationByFileHandle;
+		TBool iCompareMaxInstalledSize;
+		};
+
+	class CSifInstallStep : public CSifOperationStep
+		{
+	public:
+		CSifInstallStep();
+		~CSifInstallStep();
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepL();
+
+	private:
+		TBool iInstallByFileHandle;
+		};
+
+	class CSifUninstallStep : public CSifOperationStep
+		{
+	public:
+		CSifUninstallStep();
+		~CSifUninstallStep();
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepL();
+		};
+
+	class CSifActivateStep : public CSifOperationStep
+		{
+	public:
+		CSifActivateStep(TBool aActivate);
+		~CSifActivateStep();
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepL();
+		
+	private:
+		TBool iActivate;
+		};
+		
+	class CSifMultipleInstallStep : public CSifOperationStep
+		{
+	public:
+		CSifMultipleInstallStep();
+		~CSifMultipleInstallStep();
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepL();
+		};
+
+	_LIT(KSifGetComponentInfoStep,"SifGetComponentInfoStep");
+	_LIT(KSifInstallStep,"SifInstallStep");
+	_LIT(KSifUninstallStep,"SifUninstallStep");
+	_LIT(KSifActivateStep,"SifActivateStep");
+	_LIT(KSifDeactivateStep,"SifDeactivateStep");
+	_LIT(KSifMultipleInstallStep,"SifMultipleInstallStep");
+
+	} // namespace Sif
+	
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifpkgrec.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,85 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file implements a package file recognizer for the Reference Installer.
+*
+*/
+
+
+#include <apmrec.h>
+#include <apmstd.h>
+#include <ecom/ecom.h>
+#include <ecom/implementationproxy.h>
+#include "tsifpkgrec.h"
+
+const TUid KUidTestPkgRecDll = {0x102866F0};
+const TInt KUidTestPkgRecImpl = 0x102866F1;
+const TInt KTestNumMimeTypes = 1;
+const TInt KMaxBufferLength = 0xf;
+
+/**
+A file extension and MIME type for reference package files.
+*/
+_LIT(KTestPkgFileExt, ".siftestpkg");
+_LIT8(KDataTestMimeType, "binary/sif-testpkg");
+
+CTestSifPkgRecognizer::CTestSifPkgRecognizer()
+	: CApaDataRecognizerType(KUidTestPkgRecDll, CApaDataRecognizerType::EHigh)
+	{
+	iCountDataTypes = KTestNumMimeTypes;
+	}
+
+TUint CTestSifPkgRecognizer::PreferredBufSize()
+	{
+	return KMaxBufferLength;
+	}
+
+TDataType CTestSifPkgRecognizer::SupportedDataTypeL(TInt /*aIndex*/) const
+	{
+	return TDataType(KDataTestMimeType);
+	}
+
+void CTestSifPkgRecognizer::DoRecognizeL(const TDesC& aName, const TDesC8& /*aBuffer*/)
+	{
+	
+	// This recognition is based only on the file extension
+	const TInt dotPos = aName.LocateReverse('.');
+	if (dotPos == KErrNotFound)
+		{
+		iConfidence = ENotRecognized;
+		return;
+		}
+	TInt extLen = aName.Length() - dotPos;
+	if (aName.Right(extLen).CompareF(KTestPkgFileExt) == 0)
+		{
+		iDataType = TDataType(KDataTestMimeType);
+		iConfidence = ECertain;
+		}
+	}
+
+CApaDataRecognizerType* CTestSifPkgRecognizer::CreateRecognizerL()
+	{
+	return new (ELeave) CTestSifPkgRecognizer();
+	}
+
+const TImplementationProxy ImplementationTable[] = 
+	{
+		IMPLEMENTATION_PROXY_ENTRY(KUidTestPkgRecImpl, CTestSifPkgRecognizer::CreateRecognizerL)
+	};
+
+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/installationservices/swinstallationfw/test/tusif/source/tsifpkgrec.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This file defines a package recognizer for the Reference Installer.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ exampleCode
+*/
+
+#ifndef TSIFPKGREC_H
+#define TSIFPKGREC_H
+
+/**
+A test package recognizer. This class implements the CApaDataRecognizerType interface.
+Please see the description of @see CApaDataRecognizerType for details. 
+
+The SIF Server uses this class through the AppArc APIs to recognize reference packages.
+*/
+class CTestSifPkgRecognizer : public CApaDataRecognizerType
+	{
+public:
+	/**
+	Gets the size of buffer preferred for the purpose of recognizing the data type.
+	*/
+	TUint PreferredBufSize();
+
+	/**
+	Gets one of the data (MIME) types that the recognizer can recognize.
+	
+	@param aIndex An index that identifies the data type.
+	@return The data (MIME) type.
+	*/
+	TDataType SupportedDataTypeL(TInt aIndex) const;
+
+	/**
+	Creates an instance of the recognizer.
+	*/
+	static CApaDataRecognizerType* CreateRecognizerL();
+
+private:
+	CTestSifPkgRecognizer();
+
+	/**
+	Implements the recognition algorithm for the Reference Installer.
+	*/
+	void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer);
+	};
+
+#endif // TSIFPKGREC_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifsuitedefs.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,75 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#if (!defined TSIFSUITEDEFS_H)
+#define TSIFSUITEDEFS_H
+
+namespace Usif
+	{
+	_LIT(KTe_ExpectedResult,"expectedResult");
+	_LIT(KTe_UiScript,"uiScript");
+	_LIT(KTe_CancelAfter,"cancelAfter");
+	_LIT(KTe_OperationByFileHandle,"operationByFileHandle");
+	_LIT(KTe_CompareMaxInstalledSize,"compareMaxInstalledSize");
+	_LIT(KTe_UseEnhancedApi,"useEnhancedApi");
+	_LIT(KTe_PackageFile,"packageFile");
+	_LIT(KTe_ComponentId,"componentId");
+	_LIT(KTe_PluginOpaqueArgumentName,"pluginOpaqueArgumentName");
+	_LIT(KTe_PluginOpaqueArgumentType,"pluginOpaqueArgumentType");
+	_LIT(KTe_PluginOpaqueArgumentValue,"pluginOpaqueArgumentValue");
+	_LIT(KTe_PluginRefOpaqueResultName,"pluginRefOpaqueResultName");
+	_LIT(KTe_PluginRefOpaqueResultType,"pluginRefOpaqueResultType");
+	_LIT(KTe_PluginRefOpaqueResultValue,"pluginRefOpaqueResultValue");
+	_LIT(KTe_PluginOpaqueValueTypeInt,"Int");
+	_LIT(KTe_PluginOpaqueValueTypeString,"String");
+	_LIT(KTe_SoftwareTypeName,"softwareTypeName");
+	_LIT(KTe_ComponentName,"componentName");
+	_LIT(KTe_ComponentVersion,"componentVersion");
+	_LIT(KTe_ComponentVendor,"componentVendor");
+	_LIT(KTe_GlobalComponentId,"globalComponentId");
+	_LIT(KTe_Authenticity,"authenticity");
+	_LIT(KTe_UserGrantableCaps,"userGrantableCapsBitMask");
+	_LIT(KTe_MaxInstalledSize,"maxInstalledSize");
+	_LIT(KTe_HasExecutable,"hasExecutable");
+	_LIT(KTe_VerifyPackageExistence,"verifyExistence");
+	_LIT(KTe_CheckSisRegistry,"checkSisRegistry");
+	_LIT(KTe_ExecutableName,"executableName");
+	_LIT(KTe_ExecutableReturnCode,"executableReturnCode");
+	_LIT(KTe_AnyValuePermitted,"__ANY_VALUE_PERMITTED__");
+	_LIT(KTe_ScomoState,"scomoState");
+	_LIT(KTe_ExpectedConcurrentResult ,"expectedConcurrentResult");
+	_LIT(KTe_OverlapRequest,"overlapRequest");
+	_LIT(KTe_InstallStatus,"installStatus");
+	_LIT(KTe_ExclusiveOperation,"exclusiveOperation");
+	_LIT(KTe_CompInfoRootNodePrefix,"root");
+	_LIT(KTe_CompInfoChildNodePrefix,".child");
+	_LIT(KTe_CompInfoNumChildren,"numChildren");
+
+	// For test step panics
+	_LIT(KTe_SifSuitePanic,"Te_SifSuite");
+
+	const TInt KMaxIntDigits = 10;
+
+	} // namespace Sif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifsuiteserver.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,129 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#include "tsifsuiteserver.h"
+#include "tsifoperationstep.h"
+#include "tsifgenericbrowserinstallstep.h"
+#include "tsifcommonverificationstep.h"
+#include "tsifcommonunitteststep.h"
+
+using namespace Usif;
+
+_LIT(KSifServerName,"tUsifSuite");
+CSifSuiteServer* CSifSuiteServer::NewL()
+/**
+ * @return - Instance of the test server
+ * Same code for Secure and non-secure variants
+ * Called inside the MainL() function to create and start the
+ * CTestServer derived server.
+ */
+	{
+	CSifSuiteServer * server = new (ELeave) CSifSuiteServer();
+	CleanupStack::PushL(server);
+
+	server->ConstructL(KSifServerName);
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+
+// Secure variants much simpler
+// For EKA2, just an E32Main and a MainL()
+LOCAL_C void MainL()
+/**
+ * Secure variant
+ * Much simpler, uses the new Rendezvous() call to sync with the client
+ */
+	{
+	// Leave the hooks in for platform security
+#if (defined __DATA_CAGING__)
+	RProcess().DataCaging(RProcess::EDataCagingOn);
+	RProcess().DataCaging(RProcess::ESecureApiOn);
+#endif
+	CActiveScheduler* sched=NULL;
+	sched=new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+	CSifSuiteServer* server = NULL;
+	// Create the CTestServer derived server
+	TRAPD(err,server = CSifSuiteServer::NewL());
+	if(!err)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+
+
+
+GLDEF_C TInt E32Main()
+/**
+ * @return - Standard Epoc error code on process exit
+ * Secure variant only
+ * Process entry point. Called by client using RProcess API
+ */
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD(err,MainL());
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return err;
+	}
+
+
+CTestStep* CSifSuiteServer::CreateTestStep(const TDesC& aStepName)
+/**
+ * @return - A CTestStep derived instance
+ * Secure and non-secure variants
+ * Implementation of CTestServer pure virtual
+ */
+	{
+	CTestStep* testStep = NULL;
+	if(aStepName == KSifInstallStep)
+		testStep = new CSifInstallStep();
+	else if(aStepName == KSifGetComponentInfoStep)
+		testStep = new CSifGetComponentInfoStep();
+	else if(aStepName == KSifUninstallStep)
+		testStep = new CSifUninstallStep();
+	else if(aStepName == KSifActivateStep)
+		testStep = new CSifActivateStep(ETrue);
+	else if(aStepName == KSifDeactivateStep)
+		testStep = new CSifActivateStep(EFalse);
+	else if(aStepName == KSifGenericBrowserInstallStep)
+		testStep = new CSifGenericBrowserInstallStep();
+	else if(aStepName == KSifCommonVerificationStep)
+		testStep = new CSifCommonVerificationStep();
+	else if(aStepName == KSifMultipleInstallStep)
+		testStep = new CSifMultipleInstallStep();
+	else if(aStepName == KSifCommonUnitTestStep)
+		testStep = new CSifCommonUnitTestStep();
+
+	return testStep;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifsuiteserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#if (!defined TSIFSUITESERVER_H)
+#define TSIFSUITESERVER_H
+#include <test/testexecuteserverbase.h>
+
+namespace Usif
+	{
+	class CSifSuiteServer : public CTestServer
+		{
+	public:
+		static CSifSuiteServer* NewL();
+		// Base class pure virtual override
+		virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+		};
+		
+	} // namespace Sif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifsuitestepbase.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#include "tsifsuitestepbase.h"
+#include "tsifsuitedefs.h"
+#include <usif/scr/scr.h>
+
+using namespace Usif;
+
+TComponentId Usif::FindComponentInScrL(const TDesC& aName, const TDesC& aVendor)
+	{
+	RSoftwareComponentRegistry scr;
+	User::LeaveIfError(scr.Connect());
+	CleanupClosePushL(scr);
+
+	RSoftwareComponentRegistryView scrView;
+	CComponentFilter* filter = CComponentFilter::NewLC();
+	filter->SetNameL(aName);
+	filter->SetVendorL(aVendor);
+
+	scrView.OpenViewL(scr, filter);
+	CleanupClosePushL(scrView);
+
+	CComponentEntry* component = scrView.NextComponentL();
+	TComponentId componentId = 0;
+	if (component != NULL)
+		{
+		componentId = component->ComponentId();
+		delete component;
+		}
+
+	CleanupStack::PopAndDestroy(3, &scr);
+	
+	return componentId;
+	}
+
+CSifSuiteStepBase::~CSifSuiteStepBase()
+	{
+	}
+
+CSifSuiteStepBase::CSifSuiteStepBase()
+	{
+	}
+
+void CSifSuiteStepBase::ImplTestStepPreambleL()
+/**
+ * Implementation of CTestStep base class virtual
+ * It is used for doing all initialisation common to derived classes in here.
+ * Make it being able to leave if there are any errors here as there's no point in
+ * trying to run a test step if anything fails.
+ * The leave will be picked up by the framework.
+ */
+	{
+	INFO_PRINTF1(_L("I am in doTestStepPreambleL() of the class CSifSuiteStepBase!"));
+
+	SetTestStepResult(EPass);
+	}
+
+void CSifSuiteStepBase::ImplTestStepPostambleL()
+/**
+ * Implementation of CTestStep base class virtual
+ * It is used for doing all after test treatment common to derived classes in here.
+ * Make it being able to leave
+ * The leave will be picked up by the framework.
+ */
+	{
+	INFO_PRINTF1(_L("I am in doTestStepPostambleL() of the class CSifSuiteStepBase!"));
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifsuitestepbase.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#if (!defined TSIFSUITESTEPBASE_H)
+#define TSIFSUITESTEPBASE_H
+#include <test/testexecutestepbase.h>
+#include <usif/usifcommon.h>
+#include <scs/oomteststep.h>
+
+namespace Usif
+	{
+
+	TComponentId FindComponentInScrL(const TDesC& aName, const TDesC& aVendor);
+
+	class CSifSuiteStepBase : public COomTestStep
+		{
+	public:
+		virtual ~CSifSuiteStepBase();
+		CSifSuiteStepBase();
+		virtual void ImplTestStepPreambleL(); 
+		virtual void ImplTestStepPostambleL();
+		};
+
+	} // namespace Sif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/bwins/stsclientu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,18 @@
+EXPORTS
+	?RegisterTemporaryL@RStsSession@Usif@@QAEXABVTDesC16@@@Z @ 1 NONAME ; void Usif::RStsSession::RegisterTemporaryL(class TDesC16 const &)
+	?CommitL@RStsSession@Usif@@QAEXXZ @ 2 NONAME ; void Usif::RStsSession::CommitL(void)
+	?CreateTransactionL@RStsSession@Usif@@QAEKXZ @ 3 NONAME ; unsigned long Usif::RStsSession::CreateTransactionL(void)
+	?RollBackL@RStsSession@Usif@@QAEXXZ @ 4 NONAME ; void Usif::RStsSession::RollBackL(void)
+	?RollbackAllPendingL@RStsRecoverySession@Usif@@QAEXXZ @ 5 NONAME ; void Usif::RStsRecoverySession::RollbackAllPendingL(void)
+	?Close@RStsSession@Usif@@QAEXXZ @ 6 NONAME ; void Usif::RStsSession::Close(void)
+	?TransactionIdL@RStsSession@Usif@@QAEKXZ @ 7 NONAME ; unsigned long Usif::RStsSession::TransactionIdL(void)
+	??0RStsRecoverySession@Usif@@QAE@XZ @ 8 NONAME ; Usif::RStsRecoverySession::RStsRecoverySession(void)
+	?OverwriteL@RStsSession@Usif@@QAEXABVTDesC16@@AAVRFile@@I@Z @ 9 NONAME ; void Usif::RStsSession::OverwriteL(class TDesC16 const &, class RFile &, unsigned int)
+	?RemoveL@RStsSession@Usif@@QAEXABVTDesC16@@@Z @ 10 NONAME ; void Usif::RStsSession::RemoveL(class TDesC16 const &)
+	?Close@RStsRecoverySession@Usif@@QAEXXZ @ 11 NONAME ; void Usif::RStsRecoverySession::Close(void)
+	?CreateTemporaryL@RStsSession@Usif@@QAEXABVTDesC16@@AAVRFile@@I@Z @ 12 NONAME ; void Usif::RStsSession::CreateTemporaryL(class TDesC16 const &, class RFile &, unsigned int)
+	?OpenTransactionL@RStsSession@Usif@@QAEXK@Z @ 13 NONAME ; void Usif::RStsSession::OpenTransactionL(unsigned long)
+	?CreateNewL@RStsSession@Usif@@QAEXABVTDesC16@@AAVRFile@@I@Z @ 14 NONAME ; void Usif::RStsSession::CreateNewL(class TDesC16 const &, class RFile &, unsigned int)
+	?RegisterNewL@RStsSession@Usif@@QAEXABVTDesC16@@@Z @ 15 NONAME ; void Usif::RStsSession::RegisterNewL(class TDesC16 const &)
+	??0RStsSession@Usif@@QAE@XZ @ 16 NONAME ; Usif::RStsSession::RStsSession(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/eabi/stsclientu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN4Usif11RStsSession10CreateNewLERK7TDesC16R5RFilej @ 1 NONAME
+	_ZN4Usif11RStsSession10OverwriteLERK7TDesC16R5RFilej @ 2 NONAME
+	_ZN4Usif11RStsSession12RegisterNewLERK7TDesC16 @ 3 NONAME
+	_ZN4Usif11RStsSession14TransactionIdLEv @ 4 NONAME
+	_ZN4Usif11RStsSession16CreateTemporaryLERK7TDesC16R5RFilej @ 5 NONAME
+	_ZN4Usif11RStsSession16OpenTransactionLEm @ 6 NONAME
+	_ZN4Usif11RStsSession18CreateTransactionLEv @ 7 NONAME
+	_ZN4Usif11RStsSession18RegisterTemporaryLERK7TDesC16 @ 8 NONAME
+	_ZN4Usif11RStsSession5CloseEv @ 9 NONAME
+	_ZN4Usif11RStsSession7CommitLEv @ 10 NONAME
+	_ZN4Usif11RStsSession7RemoveLERK7TDesC16 @ 11 NONAME
+	_ZN4Usif11RStsSession9RollBackLEv @ 12 NONAME
+	_ZN4Usif11RStsSessionC1Ev @ 13 NONAME
+	_ZN4Usif11RStsSessionC2Ev @ 14 NONAME
+	_ZN4Usif19RStsRecoverySession19RollbackAllPendingLEv @ 15 NONAME
+	_ZN4Usif19RStsRecoverySession5CloseEv @ 16 NONAME
+	_ZN4Usif19RStsRecoverySessionC1Ev @ 17 NONAME
+	_ZN4Usif19RStsRecoverySessionC2Ev @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/group/bld.inf	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,195 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* @ Software Transaction System
+*
+*/
+
+
+/**
+ @file
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+// STS exported headers
+
+../inc/sts.h			SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/sts/sts.h)
+../inc/stsdefs.h		SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(usif/sts/stsdefs.h)
+
+// ROMKIT includes
+../inc/sts.iby                       /epoc32/rom/include/sts.iby
+
+PRJ_MMPFILES
+
+#ifndef TOOLS
+#ifndef TOOLS2
+
+stsserver.mmp			// STS Server
+stsclient.mmp			// STS Client
+
+#endif // TOOLS2
+#endif // TOOLS
+
+PRJ_TESTMMPFILES
+
+#ifndef TOOLS
+#ifndef TOOLS2
+
+../test/group/tsts.mmp                                           //STS test framework
+../test/group/tstsrollbackall.mmp                                //STS test framework
+../test/tintegrityservices/group/tstsintegrityservicesclient.mmp    //legacy client-server framework for testing integrity services code
+../test/tintegrityservices/group/tstsintegrityservicesserver.mmp    //legacy client-server framework for testing integrity services code
+
+#endif // TOOLS2
+#endif // TOOLS
+
+PRJ_TESTEXPORTS
+
+// ROMKIT includes
+../inc/tsts.iby                       /epoc32/rom/include/tsts.iby
+
+../test/scripts/tsts.ini					z:/tusif/tsts/tsts.ini
+../test/scripts/tsts.script					z:/tusif/tsts/tsts.script
+../test/scripts/tsts_rollbackall.script				z:/tusif/tsts/tsts_rollbackall.script
+../test/scripts/data/tstsdummy.txt			z:/tusif/tsts/data/tstsdummy.txt
+../test/scripts/tsts_bootuptimerecovery.script			z:/tusif/tsts/tsts_bootuptimerecovery.script
+../test/scripts/batchfiles/tsts_bootuptimerecovery.bat		z:/tusif/tsts/batchfiles/tsts_bootuptimerecovery.bat
+
+
+//tsts rollback-all testexports - testcase1
+../test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8/0.bak       z:/tusif/tsts/data/rollbackall/testcase1/c_drive/61f7bbf8/0.bak
+../test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8/1.bak       z:/tusif/tsts/data/rollbackall/testcase1/c_drive/61f7bbf8/1.bak
+../test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8.drv         z:/tusif/tsts/data/rollbackall/testcase1/c_drive/61f7bbf8.drv
+../test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8.log         z:/tusif/tsts/data/rollbackall/testcase1/c_drive/61f7bbf8.log
+../test/scripts/data/rollbackall/testcase1/e_drive/61f7bbf8/0.bak       z:/tusif/tsts/data/rollbackall/testcase1/e_drive/61f7bbf8/0.bak
+../test/scripts/data/rollbackall/testcase1/e_drive/61f7bbf8/1.bak       z:/tusif/tsts/data/rollbackall/testcase1/e_drive/61f7bbf8/1.bak
+../test/scripts/data/rollbackall/testcase1/e_drive/61f7bbf8.log         z:/tusif/tsts/data/rollbackall/testcase1/e_drive/61f7bbf8.log
+
+//tsts rollback-all testexports - testcase2
+../test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3/0.bak       z:/tusif/tsts/data/rollbackall/testcase2/c_drive/b06c42f3/0.bak
+../test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3/1.bak       z:/tusif/tsts/data/rollbackall/testcase2/c_drive/b06c42f3/1.bak
+../test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3.drv         z:/tusif/tsts/data/rollbackall/testcase2/c_drive/b06c42f3.drv
+../test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3.log         z:/tusif/tsts/data/rollbackall/testcase2/c_drive/b06c42f3.log
+../test/scripts/data/rollbackall/testcase2/e_drive/b06c42f3/0.bak       z:/tusif/tsts/data/rollbackall/testcase2/e_drive/b06c42f3/0.bak
+../test/scripts/data/rollbackall/testcase2/e_drive/b06c42f3/1.bak       z:/tusif/tsts/data/rollbackall/testcase2/e_drive/b06c42f3/1.bak
+../test/scripts/data/rollbackall/testcase2/e_drive/b06c42f3.log         z:/tusif/tsts/data/rollbackall/testcase2/e_drive/b06c42f3.log
+
+//tsts rollback-all testexports - testcase3
+../test/scripts/data/rollbackall/testcase3/c_drive/bd596810.drv         z:/tusif/tsts/data/rollbackall/testcase3/c_drive/bd596810.drv
+../test/scripts/data/rollbackall/testcase3/c_drive/bd596810.log         z:/tusif/tsts/data/rollbackall/testcase3/c_drive/bd596810.log
+../test/scripts/data/rollbackall/testcase3/e_drive/bd596810.log         z:/tusif/tsts/data/rollbackall/testcase3/e_drive/bd596810.log
+
+//tsts rollback-all testexports - testcase4
+../test/scripts/data/rollbackall/testcase4/c_drive/cb94c9f0.drv         z:/tusif/tsts/data/rollbackall/testcase4/c_drive/cb94c9f0.drv
+../test/scripts/data/rollbackall/testcase4/c_drive/cb94c9f0.log         z:/tusif/tsts/data/rollbackall/testcase4/c_drive/cb94c9f0.log
+../test/scripts/data/rollbackall/testcase4/e_drive/cb94c9f0.log         z:/tusif/tsts/data/rollbackall/testcase4/e_drive/cb94c9f0.log
+
+//tsts rollback-all testexports - testcase5
+../test/scripts/data/rollbackall/testcase5/c_drive/b630b6f0.drv         z:/tusif/tsts/data/rollbackall/testcase5/c_drive/b630b6f0.drv
+../test/scripts/data/rollbackall/testcase5/c_drive/b630b6f0.log         z:/tusif/tsts/data/rollbackall/testcase5/c_drive/b630b6f0.log
+../test/scripts/data/rollbackall/testcase5/e_drive/b630b6f0.log         z:/tusif/tsts/data/rollbackall/testcase5/e_drive/b630b6f0.log
+
+//tsts rollback-all testexports - testcase6
+../test/scripts/data/rollbackall/testcase6/c_drive/be3d42f0.drv         z:/tusif/tsts/data/rollbackall/testcase6/c_drive/be3d42f0.drv
+../test/scripts/data/rollbackall/testcase6/c_drive/be3d42f0.log         z:/tusif/tsts/data/rollbackall/testcase6/c_drive/be3d42f0.log
+../test/scripts/data/rollbackall/testcase6/e_drive/be3d42f0.log         z:/tusif/tsts/data/rollbackall/testcase6/e_drive/be3d42f0.log
+
+//tsts rollback-all testexports - SEC-STS-RollbackAll-0002
+../test/scripts/data/rollbackall/sec-sts-rollbackall-0002/b6da9d45.drv         z:/tusif/tsts/data/rollbackall/sec-sts-rollbackall-0002/b6da9d45.drv
+../test/scripts/data/rollbackall/sec-sts-rollbackall-0002/b6da9d45.log         z:/tusif/tsts/data/rollbackall/sec-sts-rollbackall-0002/b6da9d45.log
+
+//legacy tintegrityservices test export
+../test/tintegrityservices/scripts/tintegrityservices.script 	        z:/tusif/tsts/tintegrityservices/scripts/tsts_tintegrityservices.script
+../test/tintegrityservices/scripts/tintegrityservices.ini 		z:/tusif/tsts/tintegrityservices/scripts/tintegrityservices.ini
+../test/tintegrityservices/scripts/oom.ini 						z:/tusif/tsts/tintegrityservices/scripts/oom.ini
+
+../test/tintegrityservices/scripts/install_v1/EFailAddingNewFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/install_v1/efailaddingnewfile.ini
+../test/tintegrityservices/scripts/install_v1/EFailAddingTempFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/install_v1/efailaddingtempfile.ini
+../test/tintegrityservices/scripts/install_v1/EFailBackupFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/install_v1/efailbackupfilesremoved.ini
+../test/tintegrityservices/scripts/install_v1/EFailDeletingFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/install_v1/efaildeletingfile.ini
+../test/tintegrityservices/scripts/install_v1/EFailInstallComplete.ini 		z:/tusif/tsts/tintegrityservices/scripts/install_v1/efailinstallcomplete.ini
+../test/tintegrityservices/scripts/install_v1/EFailNone.ini 				z:/tusif/tsts/tintegrityservices/scripts/install_v1/efailnone.ini
+../test/tintegrityservices/scripts/install_v1/EFailTempFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/install_v1/efailtempfilesremoved.ini
+
+../test/tintegrityservices/scripts/install_v2/EFailAddingNewFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/install_v2/efailaddingnewfile.ini
+../test/tintegrityservices/scripts/install_v2/EFailAddingTempFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/install_v2/efailaddingtempfile.ini
+../test/tintegrityservices/scripts/install_v2/EFailBackupFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/install_v2/efailbackupfilesremoved.ini
+../test/tintegrityservices/scripts/install_v2/EFailDeletingFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/install_v2/efaildeletingfile.ini
+../test/tintegrityservices/scripts/install_v2/EFailInstallComplete.ini 		z:/tusif/tsts/tintegrityservices/scripts/install_v2/efailinstallcomplete.ini
+../test/tintegrityservices/scripts/install_v2/EFailNone.ini 				z:/tusif/tsts/tintegrityservices/scripts/install_v2/efailnone.ini
+../test/tintegrityservices/scripts/install_v2/EFailTempFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/install_v2/efailtempfilesremoved.ini
+
+../test/tintegrityservices/scripts/rollback_install_v1/EFailDeletingFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/rollback_install_v1/efaildeletingfile.ini
+../test/tintegrityservices/scripts/rollback_install_v1/EFailNewFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_install_v1/efailnewfilesremoved.ini
+../test/tintegrityservices/scripts/rollback_install_v1/EFailNone.ini 				z:/tusif/tsts/tintegrityservices/scripts/rollback_install_v1/efailnone.ini
+../test/tintegrityservices/scripts/rollback_install_v1/EFailOldFilesRestored.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_install_v1/efailoldfilesrestored.ini
+../test/tintegrityservices/scripts/rollback_install_v1/EFailTempFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_install_v1/efailtempfilesremoved.ini
+
+../test/tintegrityservices/scripts/rollback_install_v2/EFailDeletingFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/rollback_install_v2/efaildeletingfile.ini
+../test/tintegrityservices/scripts/rollback_install_v2/EFailNewFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_install_v2/efailnewfilesremoved.ini
+../test/tintegrityservices/scripts/rollback_install_v2/EFailNone.ini 				z:/tusif/tsts/tintegrityservices/scripts/rollback_install_v2/efailnone.ini
+../test/tintegrityservices/scripts/rollback_install_v2/EFailOldFilesRestored.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_install_v2/efailoldfilesrestored.ini
+../test/tintegrityservices/scripts/rollback_install_v2/EFailTempFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_install_v2/efailtempfilesremoved.ini
+
+../test/tintegrityservices/scripts/rollback_uninstall_v1/EFailDeletingFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v1/efaildeletingfile.ini
+../test/tintegrityservices/scripts/rollback_uninstall_v1/EFailNewFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v1/efailnewfilesremoved.ini
+../test/tintegrityservices/scripts/rollback_uninstall_v1/EFailNone.ini 				z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v1/efailnone.ini
+../test/tintegrityservices/scripts/rollback_uninstall_v1/EFailOldFilesRestored.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v1/efailoldfilesrestored.ini
+../test/tintegrityservices/scripts/rollback_uninstall_v1/EFailRestoringFile.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v1/efailrestoringfile.ini
+../test/tintegrityservices/scripts/rollback_uninstall_v1/EFailTempFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v1/efailtempfilesremoved.ini
+
+../test/tintegrityservices/scripts/rollback_uninstall_v2/EFailDeletingFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v2/efaildeletingfile.ini
+../test/tintegrityservices/scripts/rollback_uninstall_v2/EFailNewFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v2/efailnewfilesremoved.ini
+../test/tintegrityservices/scripts/rollback_uninstall_v2/EFailNone.ini 				z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v2/efailnone.ini
+../test/tintegrityservices/scripts/rollback_uninstall_v2/EFailOldFilesRestored.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v2/efailoldfilesrestored.ini
+../test/tintegrityservices/scripts/rollback_uninstall_v2/EFailRestoringFile.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v2/efailrestoringfile.ini
+../test/tintegrityservices/scripts/rollback_uninstall_v2/EFailTempFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_uninstall_v2/efailtempfilesremoved.ini
+
+../test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailDeletingFile.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_upgrade_v1-v2/efaildeletingfile.ini
+../test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailNewFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_upgrade_v1-v2/efailnewfilesremoved.ini
+../test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailNone.ini 			z:/tusif/tsts/tintegrityservices/scripts/rollback_upgrade_v1-v2/efailnone.ini
+../test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailOldFilesRestored.ini z:/tusif/tsts/tintegrityservices/scripts/rollback_upgrade_v1-v2/efailoldfilesrestored.ini
+../test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailRestoringFile.ini 	z:/tusif/tsts/tintegrityservices/scripts/rollback_upgrade_v1-v2/efailrestoringfile.ini
+../test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailTempFilesRemoved.ini z:/tusif/tsts/tintegrityservices/scripts/rollback_upgrade_v1-v2/efailtempfilesremoved.ini
+
+../test/tintegrityservices/scripts/uninstall_v1/EFailBackupFilesRemoved.ini z:/tusif/tsts/tintegrityservices/scripts/uninstall_v1/efailbackupfilesremoved.ini
+../test/tintegrityservices/scripts/uninstall_v1/EFailDeletingFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/uninstall_v1/efaildeletingfile.ini
+../test/tintegrityservices/scripts/uninstall_v1/EFailInstallComplete.ini 	z:/tusif/tsts/tintegrityservices/scripts/uninstall_v1/efailinstallcomplete.ini
+../test/tintegrityservices/scripts/uninstall_v1/EFailNone.ini 				z:/tusif/tsts/tintegrityservices/scripts/uninstall_v1/efailnone.ini
+../test/tintegrityservices/scripts/uninstall_v1/EFailRemovingFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/uninstall_v1/efailremovingfile.ini
+../test/tintegrityservices/scripts/uninstall_v1/EFailTempFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/uninstall_v1/efailtempfilesremoved.ini
+
+../test/tintegrityservices/scripts/uninstall_v2/EFailBackupFilesRemoved.ini z:/tusif/tsts/tintegrityservices/scripts/uninstall_v2/efailbackupfilesremoved.ini
+../test/tintegrityservices/scripts/uninstall_v2/EFailDeletingFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/uninstall_v2/efaildeletingfile.ini
+../test/tintegrityservices/scripts/uninstall_v2/EFailInstallComplete.ini 	z:/tusif/tsts/tintegrityservices/scripts/uninstall_v2/efailinstallcomplete.ini
+../test/tintegrityservices/scripts/uninstall_v2/EFailNone.ini 				z:/tusif/tsts/tintegrityservices/scripts/uninstall_v2/efailnone.ini
+../test/tintegrityservices/scripts/uninstall_v2/EFailRemovingFile.ini 		z:/tusif/tsts/tintegrityservices/scripts/uninstall_v2/efailremovingfile.ini
+../test/tintegrityservices/scripts/uninstall_v2/EFailTempFilesRemoved.ini 	z:/tusif/tsts/tintegrityservices/scripts/uninstall_v2/efailtempfilesremoved.ini
+
+../test/tintegrityservices/scripts/upgrade_v1-v2/EFailAddingNewFile.ini 	 z:/tusif/tsts/tintegrityservices/scripts/upgrade_v1-v2/efailaddingnewfile.ini
+../test/tintegrityservices/scripts/upgrade_v1-v2/EFailAddingTempFile.ini 	 z:/tusif/tsts/tintegrityservices/scripts/upgrade_v1-v2/efailaddingtempfile.ini
+../test/tintegrityservices/scripts/upgrade_v1-v2/EFailBackupFilesRemoved.ini z:/tusif/tsts/tintegrityservices/scripts/upgrade_v1-v2/efailbackupfilesremoved.ini
+../test/tintegrityservices/scripts/upgrade_v1-v2/EFailDeletingFile.ini 		 z:/tusif/tsts/tintegrityservices/scripts/upgrade_v1-v2/efaildeletingfile.ini
+../test/tintegrityservices/scripts/upgrade_v1-v2/EFailInstallComplete.ini 	 z:/tusif/tsts/tintegrityservices/scripts/upgrade_v1-v2/efailinstallcomplete.ini
+../test/tintegrityservices/scripts/upgrade_v1-v2/EFailNone.ini 				 z:/tusif/tsts/tintegrityservices/scripts/upgrade_v1-v2/efailnone.ini
+../test/tintegrityservices/scripts/upgrade_v1-v2/EFailRemovingFile.ini 		 z:/tusif/tsts/tintegrityservices/scripts/upgrade_v1-v2/efailremovingfile.ini
+../test/tintegrityservices/scripts/upgrade_v1-v2/EFailTempFilesRemoved.ini   z:/tusif/tsts/tintegrityservices/scripts/upgrade_v1-v2/efailtempfilesremoved.ini
+
+../test/tintegrityservices/scripts/data/unittests/testjournal.log z:/tusif/tsts/tintegrityservices/scripts/data/unittests/myjournal.log
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/group/security_softwaretransactionservices.history.xml	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<relnotes name="Software Transaction Services">
+  <purpose>
+    Provide transactional services on top of Symbian OS file system.
+  </purpose>
+  
+  <defect number="DEF130781" title="PREQ1269: STS deletes the existing empty directories on rollback of transaction" revision="008">
+	Issue solved for empty directories on rollback of transaction
+  </defect>
+  
+  <defect number="DEF131875" title="SMPSAFE MMP file updates for SWI and USIF" revision="007">
+    updated MMP files for SWI and USIF components to declare them SMPSAFE 
+  </defect>
+
+  <defect number="DEF130602" title="PREQ1269: STS returns -15 error when rollback large number of files" revision="006">
+	 STS returns -15 error when rollback large number of files
+  </defect>
+  
+  <defect number="DEF130332" title=" PREQ1269: STS server creating unnecessarry directories." revision="005">
+	 STS server now doesn't create unnecessarry directories 
+  </defect>
+
+  <defect number="DEF130535" title="PREQ1269: TFileMode enum is used as function paramter type, which is incorrect." revision="004">
+	Used TUint as function paramter type in the following methods:
+    1)RStsSession::CreateTemporaryL()
+	2)RStsSession::CreateNewL() 
+	3)RStsSession::OverwriteL() 
+  </defect>
+  
+  <deliverystep number="1117" name="PREQ1269: Crypto Services: Plugin management and highly desirable features
+ (Phase 2)" osproject="Diran" revision="003">
+	  <milestone project="GT0433" number="3.2"/>
+	  <preq number="1269" title="Universal Software Install Framework">
+		  1) Post-manufacture plugin management 2) Complex queries in the SCR
+			3) Additional smaller requirements and changes and 4) Improved security in the SCR
+	  </preq>
+  </deliverystep>
+
+  <defect number="DEF128988" title="RollBackAllL() should be TRAPed in CStsServer::ConstructL()" revision="002">
+	RollBackAllL() call in CStsServer::ConstructL() has been put in TRAP_IGNORE to ignore any errors returned form the roll-back all procedure and provide smooth STS server startup
+  </defect>
+
+  <deliverystep number="1116" name="PREQ1269: Security and Data Privacy: Universal Software Install Framework (Phase 1)" osproject="Diran" revision="001">
+	  <milestone project="GT0433" number="3.1"/>
+	  <preq number="1269" title="Universal Software Install Framework">
+		   Delivers the main set of features for the Diran Early Phase. Includes the new components (SCR, SIF and STS), migration of the native installer to use the new components and most reference code.
+			Excludes non-mandatory features and post-production plugin management.
+	  </preq>
+  </deliverystep>
+
+</relnotes>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/group/security_softwaretransactionservices.mrp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,9 @@
+component	security_softwaretransactionservices
+source	\sf\mw\appinstall\installationservices\swtransactionservices
+binary	\sf\mw\appinstall\installationservices\swtransactionservices\group	all
+exports	\sf\mw\appinstall\installationservices\swtransactionservices\group
+notes_source	\component_defs\release.src
+
+ipr E 
+ipr T \sf\mw\appinstall\installationservices\swtransactionservices\test
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/group/stsclient.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,41 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* STS Client
+*
+*/
+
+
+TARGET				stsclient.dll
+TARGETTYPE			dll
+
+UID					0x0 0x10285BCE
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+USERINCLUDE			../inc
+USERINCLUDE			../inc_private
+
+SOURCEPATH			../source/client
+
+SOURCE				sts.cpp
+SOURCE				stsrecovery.cpp
+
+CAPABILITY			All
+
+VENDORID			0x70000001
+
+LIBRARY				euser.lib 
+LIBRARY				scsclient.lib efsrv.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/group/stsserver.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* STS Server 
+*
+*/
+
+TARGET				softwaretransactionservices.exe
+TARGETTYPE			exe
+
+UID					0x0 0x10285BCD
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+USERINCLUDE			../inc
+USERINCLUDE			../inc_private
+USERINCLUDE			../../swinstallationfw/common/inc
+
+SOURCEPATH			../source/server
+
+SOURCE				startup.cpp
+SOURCE				stsserver.cpp
+SOURCE				stsserversession.cpp
+
+SOURCE				integrityservices.cpp
+SOURCE              integritytree.cpp
+SOURCE              journal.cpp
+SOURCE              journalfile.cpp
+SOURCE              operationfunctions.cpp
+SOURCE              transactionwrapper.cpp
+
+CAPABILITY			ProtServ TCB AllFiles
+
+VENDORID			0x70000001
+
+LIBRARY				euser.lib
+LIBRARY				scsserver.lib efsrv.lib
+LIBRARY				estor.lib
+LIBRARY				sectcbutil.lib
+LIBRARY				securityutils.lib 
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc/sts.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,243 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+
+#ifndef __STSSESSION_H__
+#define __STSSESSION_H__
+
+#include <scs/scsclient.h>
+#include <f32file.h>
+#include <usif/sts/stsdefs.h>
+
+namespace Usif
+{
+/**
+	The RStsSession class provides synchronous interface to the STS server.
+	This class wraps all the details of client-server communication with the STS server
+	residing in a separate process.
+
+	This class is intended to be used by STS client applications.
+
+        RStsSession class uses a unique transaction ID to identify operations belonging to different FS management transactions.
+        A transaction is a logical set of file system operations to be executed or rolled back atomically so that either all 
+        operations fail or all operations succeed together.
+
+        Closing the session through RStsSession::Close() rolls back the transaction unless it was explicitly rolled back or committed
+        using the respective methods.
+	
+	@publishedAll
+	@released	
+ */
+
+    class RStsSession : public RScsClientBase
+		{
+	public:
+		IMPORT_C RStsSession();
+
+		/**
+		 Opens a session to the STS server and creates a new transaction
+		 @pre Neither CreateTransactionL nor OpenTransactionL have been invoked previously on this STS session.
+		 @leave system wide error codes
+		 @return the newly created transaction's unique ID
+		 */
+		IMPORT_C TStsTransactionId CreateTransactionL();
+
+		/**
+		 Opens a session to the STS server and joins an existing transaction.
+		 This API should not be called throughout a valid session to the STS server
+		 (i.e: CreateTransactionL() >> OpenTransactionL() or OpenTransactionL() >> OpenTransactionL())
+		 @pre There is an active transaction with the supplied id.
+		 @pre Neither CreateTransactionL nor OpenTransactionL have been invoked previously on this STS session. 
+		 @leave system wide error codes
+		 @param aTransactionID the unique TInt32 transaction ID
+		 */
+		IMPORT_C void OpenTransactionL(TStsTransactionId aTransactionID);
+
+	public:
+		//journalling related functions
+
+		/**
+		 Notifies the STS server that a file or directory is being added to the file system.
+		 Important note: the actual file operation is not executed. It has to be done 
+		 by the client code AFTER calling this API.
+		 On commit the file is kept, on rollback it is removed.                
+		 @leave system wide error codes
+		 @param aFileName - Fully qualified name of file or directory
+		 */
+		IMPORT_C void RegisterNewL(const TDesC& aFileName);
+
+		/**
+		 Instructs the STS server to create a new file.
+		 The server creates a file and returns a handle to it. 
+		 On commit the file is kept, on rollback it is removed.
+		 Important note: ownership of the newly created file is transfered from the server
+		 to the client, so it is the client's responsibility to make sure that the file is
+		 closed properly.
+		 On creation the new file is empty.
+		 @leave system wide error codes
+		 @leave KErrAlreadyExist If the file already exists
+		 @param aFileName - Fully qualified name of file
+		 @param aFile - Reference of a file handle that is set to the new created file
+		 @param aFileMode - File creation mode of the new file (see TFileMode documentation
+		                    for the possible mode or combination of modes)
+		 */
+		IMPORT_C void CreateNewL(const TDesC& aFileName, RFile &aFile, TUint aCreateMode);
+
+		/**
+		 Instructs the STS server to remove the specified file or directory.
+		 Important note: the file is removed by the STS server. The client doesn't have to delete it
+		 after a call to this API.
+		 If the file does not exist, this function does nothing.
+		 On commit the file remains permanently deleted, on rollback it is restored.
+		 @leave system wide error codes
+		 @param aFileName - Fully qualified name of file or directory
+		 */
+		IMPORT_C void RemoveL(const TDesC& aFileName);
+
+		/**
+		 Notifies the STS server that a temporary file is being added to the file system.
+		 Important note: the actual file operation (i.e: creating the file at the target location) is not executed. 
+		 It has to be done by the client code AFTER calling this API.
+		 The temporary file is deleted both on commit and on rollback.
+		 @leave system wide error codes
+		 @param aFileName - Fully qualified name of file or directory
+		 */
+		IMPORT_C void RegisterTemporaryL(const TDesC& aFileName);
+
+		/**
+		 Instructs the STS server to create a new temporary file.
+		 The server creates a file and returns a handle to it. 
+		 The temporary file is deleted both on commit and on rollback.
+		 Important note: ownership of the newly created file is transfered from the server
+		 to the client, so it is the client's responsibility to make sure that the file is
+		 closed properly.                
+		 On creation the new file is empty.
+
+		 @leave system wide error codes
+		 @leave KErrAlreadyExists  A file with this name already exists
+		 @param aFileName - Fully qualified name of file
+		 @param aFile - Reference of a file handle that is set to the new created file
+		 @param aFileMode - File creation mode of the new file (see TFileMode documentation
+		                    for the possible mode or combination of modes)
+		 */
+		IMPORT_C void CreateTemporaryL(const TDesC& aFileName, RFile &aFile, TUint aCreateMode);
+
+		/**
+		 Instructs the STS server to overwrite the target file.
+		 If the file doesn't exist, an empty new file is created. If the file already exists, it is overwritten with an empty one. 
+		 A file handle to the new file is returned to the client in both cases.		 
+		 Important note: ownership of the newly created file is transfered from the server
+		 to the client, so it is the client's responsibility to make sure that the file is
+		 closed properly.        
+		 On creation the new file is empty.
+		 On commit the new file is kept. On rollback, the new file is removed and the original one is restored.
+		 
+		 Please note that this function is recommended whenever the client generates the content for the new file.
+		 If the new file's content is not generated (e.g. it is copied), it is recommended to use RemoveL followed by RegisterNewL.
+		 
+		 @leave system wide error codes
+		 @param aFileName - Fully qualified name of file or directory
+		 @param aFile - Reference of a file handle that is set to the new created file
+		 @param aFileMode - File creation mode of the new file (see TFileMode documentation
+		                    for the possible mode or combination of modes)
+		 */
+		IMPORT_C void OverwriteL(const TDesC& aFileName, RFile &aFile, TUint aCreateMode);
+
+		/**
+		 Commits the current file system transaction. After commiting a transaction its file 
+		 operations cannot be reverted.
+		 Important note: this function implies closing the session to the server.
+		 @leave system wide error codes
+		 */
+		IMPORT_C void CommitL();
+
+		/**
+		 Starts the recovery process for the transaction. All operations are reverted during roll back restoring
+		 the file system to a state that it was in right before starting the transaction.
+		 Important note: This function implies closing the session to the server;
+		                 any affected directories(including pre-existing) which were found empty will be deleted.
+		 @leave system wide error codes
+		 */
+		IMPORT_C void RollBackL();
+
+		/**
+		 Returns the currently active transcation's id.
+		 @leave system wide error codes
+		 @leave KErrArgument If no transaction is active in this session - either it was not opened, or it has been already committed or rolled back.
+		 */
+		IMPORT_C TStsTransactionId TransactionIdL();
+
+		/**
+		 Closes this session to the STS server. Also rolls back the transaction in case neither CommitL not RollBackL
+		 were invoked previously.
+		 NOTE: Any affected directories(including pre-existing) which were found empty will be deleted.
+		 */
+		IMPORT_C void Close();
+
+	private:
+		/**
+		 Connects to the STS server and starts it if necessary
+		 @leave system wide error codes
+		 */
+		void ConnectL();
+
+		};//class RStsSession
+   
+
+#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
+   /**
+	 This class provides provides synchronous interface to the STS server for rolling back all pending transactions.
+
+	 @internalTechnology
+	 @released
+	 */
+	class RStsRecoverySession : public RScsClientBase
+		{
+	public:
+		IMPORT_C RStsRecoverySession();
+
+		/**
+		 Connects to the STS server and instructs it to roll back all pending transactions. 
+		 Does nothing if there are no pending transactions.
+		 @leave system wide error codes
+		 */
+		IMPORT_C void RollbackAllPendingL();
+
+		/**
+		 Closes this session to the STS server.
+		 */
+		IMPORT_C void Close();
+
+	private:
+		/**
+		 Connects to the STS server and starts it if necessary
+		 @leave system wide error codes
+		 */
+		void ConnectL();
+
+		};//class RStsRecoverySession   
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+	}////namespace Usif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc/sts.iby	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,28 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef STS_IBY
+#define STS_IBY
+
+REM Software Transaction Services
+
+file=ABI_DIR\BUILD_DIR\softwaretransactionservices.exe			sys\bin\softwaretransactionservices.exe
+file=ABI_DIR\BUILD_DIR\stsclient.dll			                sys\bin\stsclient.dll
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc/stsdefs.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,37 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This header defines common STS entities
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+
+
+#ifndef __STSDEFS_H__
+#define __STSDEFS_H__
+
+#include <e32def.h>
+
+namespace Usif
+	{
+	typedef ::TUint32 TStsTransactionId; ///Transaction id in STS
+	}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc/stsrecovery.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,69 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+
+#ifndef __STSRECOVERY_H__
+#define __STSRECOVERY_H__
+
+#include <scs/scsclient.h>
+#include <f32file.h>
+#include <usif/sts/stsdefs.h>
+
+namespace Usif
+{
+
+   /**
+	 This class provides provides synchronous interface to the STS server for rolling back all pending transactions.
+
+	 @internalComponent
+	 @released
+	 */
+	class RStsRecoverySession : public RScsClientBase
+		{
+	public:
+		IMPORT_C RStsRecoverySession();
+
+		/**
+		 Connects to the STS server and instructs it to roll back all pending transactions. 
+		 Does nothing if there are no pending transactions.
+		 @leave system wide error codes
+		 */
+		IMPORT_C void RollbackAllPendingL();
+
+		/**
+		 Closes this session to the STS server.
+		 */
+		IMPORT_C void Close();
+
+	private:
+		/**
+		 Connects to the STS server and starts it if necessary
+		 @leave system wide error codes
+		 */
+		void ConnectL();
+
+		};//class RStsRecoverySession   
+	}////namespace Usif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc/tsts.iby	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,150 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef TSTS_IBY
+#define TSTS_IBY
+
+define ZDRIVE \epoc32\data\Z
+
+REM Software Transaction Services Test Suite
+
+
+file=ABI_DIR\BUILD_DIR\tststestserver.exe	  sys\bin\tststestserver.exe
+file=ABI_DIR\BUILD_DIR\tststestserverrollbackall.exe	  sys\bin\tststestserverrollbackall.exe
+
+data = ZDRIVE\tusif\tsts\tsts.script             \tusif\tsts\tsts.script
+data = ZDRIVE\tusif\tsts\tsts_rollbackall.script \tusif\tsts\tsts_rollbackall.script
+data = ZDRIVE\tusif\tsts\tsts.ini                \tusif\tsts\tsts.ini
+data = ZDRIVE\tusif\tsts\data\tstsdummy.txt      \tusif\tsts\data\tstsdummy.txt
+
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase1\c_drive\61f7bbf8.drv    \tusif\tsts\data\rollbackall\testcase1\c_drive\61f7bbf8.drv
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase1\c_drive\61f7bbf8.log    \tusif\tsts\data\rollbackall\testcase1\c_drive\61f7bbf8.log
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase1\c_drive\61f7bbf8\0.bak  \tusif\tsts\data\rollbackall\testcase1\c_drive\61f7bbf8\0.bak
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase1\c_drive\61f7bbf8\1.bak  \tusif\tsts\data\rollbackall\testcase1\c_drive\61f7bbf8\1.bak
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase1\e_drive\61f7bbf8.log    \tusif\tsts\data\rollbackall\testcase1\e_drive\61f7bbf8.log
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase1\e_drive\61f7bbf8\0.bak  \tusif\tsts\data\rollbackall\testcase1\e_drive\61f7bbf8\0.bak
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase1\e_drive\61f7bbf8\1.bak  \tusif\tsts\data\rollbackall\testcase1\e_drive\61f7bbf8\1.bak
+
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase2\c_drive\b06c42f3.drv    \tusif\tsts\data\rollbackall\testcase2\c_drive\b06c42f3.drv
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase2\c_drive\b06c42f3.log    \tusif\tsts\data\rollbackall\testcase2\c_drive\b06c42f3.log
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase2\c_drive\b06c42f3\0.bak  \tusif\tsts\data\rollbackall\testcase2\c_drive\b06c42f3\0.bak
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase2\c_drive\b06c42f3\1.bak  \tusif\tsts\data\rollbackall\testcase2\c_drive\b06c42f3\1.bak
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase2\e_drive\b06c42f3.log    \tusif\tsts\data\rollbackall\testcase2\e_drive\b06c42f3.log
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase2\e_drive\b06c42f3\0.bak  \tusif\tsts\data\rollbackall\testcase2\e_drive\b06c42f3\0.bak
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase2\e_drive\b06c42f3\1.bak  \tusif\tsts\data\rollbackall\testcase2\e_drive\b06c42f3\1.bak
+
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase3\c_drive\bd596810.drv    \tusif\tsts\data\rollbackall\testcase3\c_drive\bd596810.drv
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase3\c_drive\bd596810.log    \tusif\tsts\data\rollbackall\testcase3\c_drive\bd596810.log
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase3\e_drive\bd596810.log    \tusif\tsts\data\rollbackall\testcase3\e_drive\bd596810.log
+
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase4\c_drive\cb94c9f0.drv    \tusif\tsts\data\rollbackall\testcase4\c_drive\cb94c9f0.drv
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase4\c_drive\cb94c9f0.log    \tusif\tsts\data\rollbackall\testcase4\c_drive\cb94c9f0.log
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase4\e_drive\cb94c9f0.log    \tusif\tsts\data\rollbackall\testcase4\e_drive\cb94c9f0.log
+
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase5\c_drive\b630b6f0.drv    \tusif\tsts\data\rollbackall\testcase5\c_drive\b630b6f0.drv
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase5\c_drive\b630b6f0.log    \tusif\tsts\data\rollbackall\testcase5\c_drive\b630b6f0.log
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase5\e_drive\b630b6f0.log    \tusif\tsts\data\rollbackall\testcase5\e_drive\b630b6f0.log
+
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase6\c_drive\be3d42f0.drv    \tusif\tsts\data\rollbackall\testcase6\c_drive\be3d42f0.drv
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase6\c_drive\be3d42f0.log    \tusif\tsts\data\rollbackall\testcase6\c_drive\be3d42f0.log
+data = ZDRIVE\tusif\tsts\data\rollbackall\testcase6\e_drive\be3d42f0.log    \tusif\tsts\data\rollbackall\testcase6\e_drive\be3d42f0.log
+
+data = ZDRIVE\tusif\tsts\data\rollbackall\sec-sts-rollbackall-0002\b6da9d45.drv    \tusif\tsts\data\rollbackall\sec-sts-rollbackall-0002\b6da9d45.drv
+data = ZDRIVE\tusif\tsts\data\rollbackall\sec-sts-rollbackall-0002\b6da9d45.log    \tusif\tsts\data\rollbackall\sec-sts-rollbackall-0002\b6da9d45.log
+
+//these files are for the "legacy" tintegrityservices tests
+file=ABI_DIR\BUILD_DIR\tstsintegrityservicesclient.dll		sys\bin\tstsintegrityservicesclient.dll
+file=ABI_DIR\BUILD_DIR\tstsintegrityservicesserver.exe	  	sys\bin\tstsintegrityservicesserver.exe
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\tsts_tintegrityservices.script   \tusif\tsts\tintegrityservices\scripts\tsts_tintegrityservices.script
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini           \tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\oom.ini                          \tusif\tsts\tintegrityservices\scripts\oom.ini
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v1\EFailAddingNewFile.ini      \tusif\tsts\tintegrityservices\scripts\install_v1\EFailAddingNewFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v1\EFailAddingTempFile.ini     \tusif\tsts\tintegrityservices\scripts\install_v1\EFailAddingTempFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v1\EFailBackupFilesRemoved.ini \tusif\tsts\tintegrityservices\scripts\install_v1\EFailBackupFilesRemoved.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v1\EFailDeletingFile.ini       \tusif\tsts\tintegrityservices\scripts\install_v1\EFailDeletingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v1\EFailInstallComplete.ini    \tusif\tsts\tintegrityservices\scripts\install_v1\EFailInstallComplete.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v1\EFailNone.ini               \tusif\tsts\tintegrityservices\scripts\install_v1\EFailNone.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v1\EFailTempFilesRemoved.ini   \tusif\tsts\tintegrityservices\scripts\install_v1\EFailTempFilesRemoved.ini
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v2\EFailAddingNewFile.ini      \tusif\tsts\tintegrityservices\scripts\install_v2\EFailAddingNewFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v2\EFailAddingTempFile.ini     \tusif\tsts\tintegrityservices\scripts\install_v2\EFailAddingTempFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v2\EFailBackupFilesRemoved.ini \tusif\tsts\tintegrityservices\scripts\install_v2\EFailBackupFilesRemoved.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v2\EFailDeletingFile.ini       \tusif\tsts\tintegrityservices\scripts\install_v2\EFailDeletingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v2\EFailInstallComplete.ini    \tusif\tsts\tintegrityservices\scripts\install_v2\EFailInstallComplete.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v2\EFailNone.ini               \tusif\tsts\tintegrityservices\scripts\install_v2\EFailNone.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\install_v2\EFailTempFilesRemoved.ini   \tusif\tsts\tintegrityservices\scripts\install_v2\EFailTempFilesRemoved.ini
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailDeletingFile.ini     \tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailDeletingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailNewFilesRemoved.ini  \tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailNewFilesRemoved.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailNone.ini             \tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailNone.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailOldFilesRestored.ini \tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailOldFilesRestored.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailTempFilesRemoved.ini \tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailTempFilesRemoved.ini
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_install_v2\EFailDeletingFile.ini     \tusif\tsts\tintegrityservices\scripts\rollback_install_v2\EFailDeletingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_install_v2\EFailNewFilesRemoved.ini  \tusif\tsts\tintegrityservices\scripts\rollback_install_v2\EFailNewFilesRemoved.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_install_v2\EFailNone.ini             \tusif\tsts\tintegrityservices\scripts\rollback_install_v2\EFailNone.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_install_v2\EFailOldFilesRestored.ini \tusif\tsts\tintegrityservices\scripts\rollback_install_v2\EFailOldFilesRestored.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_install_v2\EFailTempFilesRemoved.ini \tusif\tsts\tintegrityservices\scripts\rollback_install_v2\EFailTempFilesRemoved.ini
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailDeletingFile.ini     \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailDeletingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailNewFilesRemoved.ini  \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailNewFilesRemoved.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailNone.ini             \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailNone.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailOldFilesRestored.ini \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailOldFilesRestored.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailRestoringFile.ini    \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailRestoringFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailTempFilesRemoved.ini \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v1\EFailTempFilesRemoved.ini
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailDeletingFile.ini      \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailDeletingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailNewFilesRemoved.ini   \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailNewFilesRemoved.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailNone.ini              \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailNone.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailOldFilesRestored.ini  \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailOldFilesRestored.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailRestoringFile.ini     \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailRestoringFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailTempFilesRemoved.ini  \tusif\tsts\tintegrityservices\scripts\rollback_uninstall_v2\EFailTempFilesRemoved.ini
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailDeletingFile.ini     \tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailDeletingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailNewFilesRemoved.ini  \tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailNewFilesRemoved.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailNone.ini             \tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailNone.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailOldFilesRestored.ini \tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailOldFilesRestored.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailRestoringFile.ini    \tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailRestoringFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailTempFilesRemoved.ini \tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailTempFilesRemoved.ini
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailBackupFilesRemoved.ini \tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailBackupFilesRemoved.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailDeletingFile.ini       \tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailDeletingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailInstallComplete.ini    \tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailInstallComplete.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailNone.ini               \tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailNone.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailRemovingFile.ini       \tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailRemovingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailTempFilesRemoved.ini   \tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailTempFilesRemoved.ini
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailBackupFilesRemoved.ini \tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailBackupFilesRemoved.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailDeletingFile.ini       \tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailDeletingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailInstallComplete.ini    \tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailInstallComplete.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailNone.ini               \tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailNone.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailRemovingFile.ini       \tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailRemovingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailTempFilesRemoved.ini   \tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailTempFilesRemoved.ini
+
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailAddingNewFile.ini      \tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailAddingNewFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailAddingTempFile.ini     \tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailAddingTempFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailBackupFilesRemoved.ini \tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailBackupFilesRemoved.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailDeletingFile.ini       \tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailDeletingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailInstallComplete.ini    \tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailInstallComplete.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailNone.ini               \tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailNone.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailRemovingFile.ini       \tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailRemovingFile.ini
+data = ZDRIVE\tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailTempFilesRemoved.ini   \tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailTempFilesRemoved.ini
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc_private/integrityservices.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,331 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Definition of CIntegrityServices
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology 
+*/
+
+#ifndef __INTEGRITYSERVICES_H__
+#define __INTEGRITYSERVICES_H__
+
+#include <e32base.h>
+#include <f32file.h>
+#include <usif/sts/stsdefs.h>
+#include "integrityservicesevent.h"
+
+
+class RFs;
+
+namespace Usif
+{
+class CJournal;
+class CIntegrityTreeNode;
+/**
+ * This class maintains the integrity of installed software by ensuring that
+ * the device is always left in a consistent state. If a software modification
+ * process (install, upgrade or uninstall) is interrupted then that process is
+ * reverted, returning the device to its original state with no orphaned or
+ * missing files.
+ *
+ * @released
+ * @internalTechnology 
+ */
+class CIntegrityServices : public CBase
+	{
+	public:
+
+		/**
+		 * Constructs a new CIntegrityServices object specifying a path for
+		 * the journal files
+		 *
+		 * @code
+		 *
+		 *	TTime currentTime;
+		 *	currentTime.UniversalTime();
+		 *	_LIT(KIntegrityServicesPath, "\\private\\SID\\");
+		 *	iIntegrityServices = CIntegrityServices::NewL(currentTime.Int64(), 
+		 *											KIntegrityServicesPath);
+		 *
+		 * @endcode
+		 *
+		 * @param aTransactionID A unique ID provided by the client to
+		 *						 identify this transaction. It is suggested
+		 *						 that the client use the current time as the
+		 *						 unique ID. This value can then be shared
+		 *						 between different processes so that they use
+		 *						 the same journal.
+		 */
+		 static CIntegrityServices* NewL(TStsTransactionId aTransactionID);
+		
+		/**
+		 * Constructs a new CIntegrityServices object specifying a path for
+		 * the journal files and puts it on the cleanup stack
+		 * @param aTransactionID A unique ID provided by the client to
+		 *						 identify this transaction. It is suggested
+		 *						 that the client use the current time as the
+		 *						 unique ID. This value can then be shared
+		 *						 between different processes so that they use
+		 *						 the same journal.
+		 */
+		 static CIntegrityServices* NewLC(TStsTransactionId aTransactionID);
+		
+		 ~CIntegrityServices();
+		
+		/**
+		 * Notifies Integrity Services that a file or directory is being added
+		 * so that it can be removed if a rollback occurs. A record is created
+		 * in the journal file on the appropriate drive.
+		 *
+		 * @param aFileName - Name of file or directory including path
+		 */
+		 void RegisterNewL(const TDesC& aFileName);
+
+		/**
+		 * Instructs Integrity Services to create a new file. 
+		 * It is removed if a rollback occurs. A record is created
+		 * in the journal file on the appropriate drive.
+		 *
+		 * @param aFileName - Name of file or directory including path
+		 * @param newFile - Reference of a file handle that is set to the newly created file
+		 * @param aFileMode - File creation mode of the new file (see TFileMode documentation
+		 *                    for the possible mode or combination of modes)
+		 */
+		 void CreateNewL(const TDesC& aFileName, RFile &newFile, TUint aFileMode);
+		
+		/**
+		 * Removes the specified file or directory, first backing it up before
+		 * deleting it. A record is created in the journal file on the
+		 * appropriate drive.
+		 *
+		 * @param aFileName - Name of file or directory including path
+		 */
+		 void RemoveL(const TDesC& aFileName);
+		
+		/**
+		 * Notifies Integrity Services that a file or directory is being added
+		 * that must later be removed. A record is created in the journal file
+		 * on the appropriate drive.
+		 *
+		 * @param aFileName - Name of file including path
+		 */
+		 void RegisterTemporaryL(const TDesC& aFileName);
+
+		/**
+		 * Instructs Integrity Services to create a new temporary file. 
+		 * It is removed if a rollback occurs. A record is created
+		 * in the journal file on the appropriate drive.
+		 *
+		 * @param aFileName - Name of file including path
+		 * @param newFile - Reference of a file handle that is set to the newly created file
+		 * @param aFileMode - File creation mode of the new file (see TFileMode documentation
+		 *                    for the possible mode or combination of modes)
+		 */
+		 void CreateTemporaryL(const TDesC& aFileName, RFile &newFile, TUint aFileMode);
+
+		/**
+		 * Instructs Integrity Services to create a new file.
+		 * If the file already exists it's removed to a backup location first before the new file is created. 
+		 * The newly created file is removed if a rollback occurs and the old one is restored. 
+		 * A record is created in the journal file on the appropriate drive.
+		 * @param aFileName - Name of file or directory including path
+		 * @param newFile - Reference of a file handle that is set to the newly created file
+		 * @param aFileMode - File creation mode of the new file (see TFileMode documentation
+		 *                    for the possible mode or combination of modes)
+		 */
+		 void OverwriteL(const TDesC& aFileName, RFile &newFile, TUint aFileMode);
+
+		/**
+		 * Commits the current transaction by deleting backup, temporary and
+		 * journal files. The journal files are first refreshed so that
+		 * operations shared between processes and spread across multiple
+		 * drives are committed at the same time. If any journal file from this
+		 * transaction is not present or has already been rolledback the
+		 * commit will fail.
+		 */
+		 void CommitL();
+		
+		/**
+		 * Starts the recovery process for all drives.
+		 * Drive are rolled back independantly since removable media may be at
+		 * a different state to internal drives (which may have already been 
+		 * rolled back).
+		 *
+		 * @param aRecordAllRollbackEvents- This parameter specifies whether we should record events during the rollback.
+		 *  This allows continuing the rollback in case it has been interrupted. In most cases, this flag should be "on", however
+		 *   if we failed a previous roll back due to low space or low memory, it can prevent any roll back due to lack of resources for recording
+		 *   the rollback events. In these cases, it should be set to "off".
+		 *
+		 */
+		 void RollBackL(TBool aRecordAllRollbackEvents = ETrue);
+
+		/**
+		 * Returns the TransactionID
+		 *
+		 * @return a TStsTransactionId representing the transaction
+		 */
+		inline TStsTransactionId TransactionId() const;
+
+		/**
+		 * Scans through the transaction path and returns a list if transaction ids that have been found.
+		 *  
+		 * @param idArray - an array of TStsTransactionId in which the found ids are returned to the caller
+		 */
+		static void GetListOfTransactionsL(RArray<TStsTransactionId>& aIdArray);
+
+		/**
+		 * Roll back all transactions that it can find in the transaction path in the filesystem
+		 * Important note: The function tries the best effort to roll back all transactions found. 
+		 *                 Failing to roll back one transaction doesn't influence the roll back of others,
+		 *                 however if any of the transactions fail to roll back properly the function finally
+		 *                 will leave with the latest error encountered. (After it has tried to roll back all!)    
+		 */
+		static void RollbackAllL();
+
+
+		/**
+		 * Creates a backup file by copying the source to a defined backup name. This MUST be used for executables.
+		 * The source files will then be deleted by invoking RLoader::Delete
+		 * @param aSource	the file to backup
+		 * @param aBackup	the name of the backup file
+		*/
+		void CopyToBackupL(const TDesC& aSource, const TDesC& aBackup);
+
+		/**
+		 * Failure types - indicate when to simulate power failure during
+		 * testing
+		 */
+		enum TFailType
+			{
+			EFailNone,
+			EFailAddingNewFile,
+			EFailRemovingFile,
+			EFailAddingTempFile,
+			EFailRestoringFile,
+			EFailDeletingFile,
+			EFailInstallComplete,
+			EFailNewFilesRemoved,
+			EFailOldFilesRestored,
+			EFailTempFilesRemoved,
+			EFailBackupFilesRemoved,
+			};
+		
+		/**
+		 * Failure position - indicate when to simulate power failure during
+		 * testing
+		 */	
+		enum TFailPosition
+			{
+			EBeforeJournal,
+			EAfterJournal,
+			EBeforeAction,
+			EAfterAction
+			};
+			
+	private:
+		/**
+		 * Constructor for CIntegrityServices
+		 *
+		 * @param aTransactionID A unique ID provided by the client to
+		 *						 identify this transaction. It is suggested
+		 *						 that the client use the current time as the
+		 *						 unique ID. This value can then be shared
+		 *						 between different processes so that they use
+		 *						 the same journal.
+		 */
+		 CIntegrityServices(TStsTransactionId aTransactionID);
+		
+		/**
+		 * Second phase constructor for CIntegrityServices
+		 *
+		 */
+		 void ConstructL();
+						
+		/**
+		 * Removes a trailing slash from directory name, if needed.
+		 * 
+		 * @param aFileName the filename to modify. If the filename does not represent a directory, it is not modified
+		 */
+		static void NormalizeDirectoryName(TDes& aFileName);
+
+	private:
+	
+	    /**
+		 * Pointer to the journal - uses log file(s) for persistant storage
+		 * A log file is created on each drive involved so that they can be
+		 * recovered independantly.
+		 */
+		CJournal* iJournal;
+		
+		/**
+		 * Provided by the client to identify this transaction.
+		 */
+		TStsTransactionId iTransactionID;
+		
+		/**
+		 * The supplied path in which to read and write journal files.
+		 */
+		TPath iJournalPath;
+
+		 /**
+		 The drive number for the system drive.
+		 */
+		 TDriveNumber iSystemDrive;
+		 
+	private:
+	
+		RFs iFs;
+		
+		RLoader iLoader;
+	
+	public:
+	    /** 
+		 * Failure type (used only by test code)
+		 */
+		static TFailType iFailType;
+		
+		/** 
+		 * Failure position (used only by test code)
+		 */
+		static TFailPosition iFailPosition;
+		
+		/** 
+		 * Specify the name of the file to fail on (used only in test code)
+		 */
+		static TFileName iFailFileName;
+		static TBool iIsFailureTestingEnabled;
+		
+		/**
+		 * Test utility function
+		 *
+		 * @param aFailType		 The operation on which to fail
+		 * @param aFailPosition	 The position at which to fail
+		 * @param aFailFileName	 The filename on which to fail
+		 */
+		static void SimulatePowerFailureL(TFailType aFailType, TFailPosition aPosition, const TDesC& aFailFileName);
+	};
+
+inline TStsTransactionId CIntegrityServices::TransactionId() const
+	{
+	return iTransactionID;
+	}
+
+} //namespace
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc_private/integrityservicesevent.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Definition of TIntegrityServicesEvent
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology
+*/
+
+#ifndef __INTEGRITYSERVICESEVENT_H__
+#define __INTEGRITYSERVICESEVENT_H__
+
+namespace Usif
+{
+	
+/**
+ * Defines the events recorded in the journal file
+ */
+enum TIntegrityServicesEvent
+	{
+	ENone,
+	ERemovedFile,
+	EBackupFile,
+	ETempFile,
+	EAddedFile,
+	ECommitted,
+	EBackupFilesRemoved,
+	EAddedFilesRemoved,
+	ERemovedFilesRestored,
+	ETempFilesRemoved
+	};
+
+} //namespace
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc_private/integritytree.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,202 @@
+/*
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology
+*/
+
+#ifndef __INTEGRITYTREE_H__
+#define __INTEGRITYTREE_H__
+
+#include <e32base.h>
+#include <f32file.h>
+#include "integrityservicesevent.h"
+#include "integrityservices.h"
+
+namespace Usif
+{
+
+class CIntegrityTreeNode;
+class CIntegrityTreeLeaf;
+
+typedef void(* TTreeWalkFunctionL)(const TDesC& aPath, CIntegrityTreeLeaf* aLeaf, RFs& aFs, RLoader& aLoader, CFileMan& aFileMan);
+
+class CIntegrityTreeLeaf : public CBase
+	{
+public:
+	/**
+	 * Constructs a file tree leaf, and places it on the cleanup stack
+	 *
+	 * @param aFileName The filename for this leaf node
+	 * @param aType The type of this leaf
+	 * @param aOwningJournal A reference to the filename of the owning journal
+	 * @return A fully constructed tree leaf
+	 */
+	static CIntegrityTreeLeaf* NewLC(const TDesC& aFileName, TIntegrityServicesEvent aType,
+		const TDesC& aOwningJournal);
+	
+	/**
+	 * Sets the peer node if applicable. This is used for leaves that
+	 * naturally form pairs, for example a removed file and its backup.
+	 * 
+	 * @param aPeer The leaf's peer.
+	 *
+	 */
+	
+	void SetPeer(CIntegrityTreeLeaf* aPeer);
+	
+	/**
+	 * Returns the leaf's peer, or null if none was set
+	 *
+	 * @return The leaf's peer node if available
+	 *
+	 */
+	
+	CIntegrityTreeLeaf* Peer();
+	
+	/**
+	 * Returns the type of this leaf. 
+	 *
+	 * @return This leaf's type
+	 */
+	 
+	TIntegrityServicesEvent Type();
+	
+	/**
+	 * Returns the file name for this leaf
+	 *
+	 * @return The file name for this leaf
+	 */
+	
+	const TDesC& Name();
+	
+	/**
+	 * Returns the name of the journal file that owns this leaf
+	 *
+	 * @return The associated journal file name
+	 */
+	
+	const TDesC& Journal();
+	
+	~CIntegrityTreeLeaf();
+private:
+	CIntegrityTreeLeaf(TIntegrityServicesEvent aType, const TDesC& aOwningJournal);
+	void ConstructL(const TDesC& aFileName);
+	
+private:
+	HBufC* iFileName;
+	TIntegrityServicesEvent iType;
+	CIntegrityTreeLeaf* iPeer;
+	
+	const TDesC& iOwningJournal;
+	
+	};
+	
+class CIntegrityTreeNode : public CBase
+	{
+public:
+	/**
+	 * Constructs a file tree node, and places it on the cleanup stack
+	 *
+	 * @param aDirectoryName The name of the directory this node represents
+	 * @return A fully constructed tree node
+	 */
+	
+	static CIntegrityTreeNode* NewL(const TDesC& aDirectoryName);
+	
+	/**
+	 * Constructs a file tree node
+	 *
+	 * @param aDirectoryName The name of the directory this node represents
+	 * @return A fully constructed tree node
+	 */
+	
+	static CIntegrityTreeNode* NewLC(const TDesC& aDirectoryName);
+	
+	/**
+	 * Returns the name of the directory this node represents
+	 * 
+	 * @return The name of this directory
+	 */
+	
+	const TDesC& Name();
+	
+	/**
+	 * Adds a leaf node to this tree structure, adding intermediate (directory) nodes along
+	 * the way as appropriate.
+	 * 
+	 * @param aFileName The fully qualified file name of the node to add
+	 * @param aType The type of the node to add
+	 * @param aOwningJournal The file name of the journal that owns this node
+	 * @return The leaf node added.
+	 *
+	 */
+	
+	CIntegrityTreeLeaf* AddNodeL(const TDesC& aFileName, TIntegrityServicesEvent aType, const TDesC& aOwningJournal);
+	
+	/**
+	 * Finds a node in the tree if it exists.
+	 *
+	 * @param aFileName The file name to find
+	 * @param aType The type of node to find
+	 * @return KErrNone if found, otherwise one of the system wide error codes
+	 */
+	
+	TInt FindNode(const TDesC& aFileName, TIntegrityServicesEvent aType);
+	
+	/**
+	 * Applies a function to every applicable node in the tree
+	 *
+	 * @param aFunc The function to apply
+	 * @param aTypeFilter The type of node to apply the function to
+	 * @param aFs A connected file server session
+	 * @param aLoader reference to the RLoader server session
+	 * @param aFileMan A constructed CFileMan object
+	 * @param aFailType The type of failure to induce if required. Used exclusively in testing.
+	 *
+	 */
+	
+	void WalkTreeL(TTreeWalkFunctionL aFunc, TIntegrityServicesEvent aTypeFilter,
+		RFs& aFs, RLoader& aLoader, CFileMan& aFileMan, 
+		CIntegrityServices::TFailType aFailType);
+		
+	~CIntegrityTreeNode();
+protected:
+	CIntegrityTreeLeaf* DoAddNodeL(TDes& aFileName, TIntegrityServicesEvent aType, const TDesC& aOwningJournal);
+	TInt DoFindNode(TDes& aFileName, TIntegrityServicesEvent aType);
+	void DoWalkTreeL(TDes& aPath, TTreeWalkFunctionL aFunc, TIntegrityServicesEvent aTypeFilter, 
+		RFs& aFs, RLoader& aLoader, CFileMan& aFileMan,
+		CIntegrityServices::TFailType aFailType);
+	
+private:
+	CIntegrityTreeNode();
+	void ConstructL(const TDesC& aDirectoryName);
+	
+private:
+	HBufC* iDirName;
+	RPointerArray<CIntegrityTreeNode> iDirectories;
+	RPointerArray<CIntegrityTreeLeaf> iFiles;
+	
+	friend class Usif::CIntegrityServices;
+	};
+
+} // namespace Usif
+
+#endif /* __INTEGRITYTREE_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc_private/journal.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,366 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Definition of CJournal
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology 
+*/
+
+#ifndef __JOURNAL_H__
+#define __JOURNAL_H__
+
+#include <e32base.h>
+#include <usif/sts/stsdefs.h>
+#include "journalfile.h"
+#include "integrityservicesevent.h"
+
+class RFs;
+
+namespace Usif
+{
+
+_LIT(KJournalExt, "log"); // extension for journal files on each drive
+_LIT(KDriveExt, "drv"); // extension for this transaction's drive array
+
+/**
+ * The journal stores integrity services events and their related filenames
+ * in files spread across several drives. Each drive has its own journal file
+ * so that recovery of drives can occur independantly. This class handles both
+ * the reading and writing of these files. The filename of each journal is:
+ *
+ * JournalPath|TransactionID
+ *   |--------|--------|
+ * ?:\????????\00000000.log
+ *
+ * @released
+ * @internalTechnology 
+ */
+class CJournal : public CBase
+	{
+	public:
+
+		/**
+		 * Constructs a new CJournal
+		 *
+		 * @code
+		 *
+		 *	TTime currentTime;
+		 *	currentTime.UniversalTime();
+		 *	_LIT(KIntegrityServicesPath, "\\private\\SID\\");
+		 *	iIntegrityServices = CIntegrityServices::NewL(currentTime.Int64(), 
+		 *											KIntegrityServicesPath);
+		 *
+		 * @endcode
+		 *
+		 * @param aFs reference to the file system provided by CIntegrityServices
+		 * @param aLoader reference to the RLoader provided by CIntegrityServices
+		 * @param aTransactionID A unique ID provided by the client to
+		 *						 identify this transaction. It is suggested
+		 *						 that the client use the current time as the
+		 *						 unique ID. This value can then be shared
+		 *						 between different processes so that they use
+		 *						 the same journal.
+		 * @param aPath			 The path in which to read and write journal
+		 *						 files. eg "\\private\\SID\\"
+		 */
+		static CJournal* NewL(RFs& aFs, RLoader& aLoader, TStsTransactionId aTransactionID, const TDesC& aPath);
+		
+		/**
+		 * Constructs a new CJournal and places it on the cleanup stack
+		 *
+		 * @code
+		 *
+		 *	TTime currentTime;
+		 *	currentTime.UniversalTime();
+		 *	_LIT(KIntegrityServicesPath, "\\private\\SID\\");
+		 *	iIntegrityServices = CIntegrityServices::NewL(currentTime.Int64(), 
+		 *											KIntegrityServicesPath);
+		 *
+		 * @endcode
+		 *
+		 * @param aFs reference to the file system provided by CIntegrityServices
+		 * @param aLoader reference to the RLoader provided by CIntegrityServices
+		 * @param aTransactionID A unique ID provided by the client to
+		 *						 identify this transaction. It is suggested
+		 *						 that the client use the current time as the
+		 *						 unique ID. This value can then be shared
+		 *						 between different processes so that they use
+		 *						 the same journal.
+		 * @param aPath			 The path in which to read and write journal
+		 *						 files. eg "\\private\\SID\\"
+		 */
+		static CJournal* NewLC(RFs& aFs, RLoader& aLoader, TStsTransactionId aTransactionID, const TDesC& aPath);
+		
+		virtual ~CJournal();
+
+		/**
+		 * Notifies Integrity Services that a file or directory is being added
+		 * so that it can be removed if a rollback occurs. A record is created
+		 * in the journal file on the appropriate drive.
+		 *
+		 * @param aFileName - Name of file or directory including path
+		 */
+		void AddL(const TDesC& aFileName);
+		
+		/**
+		 * Removes the specified file or directory, first backing it up before
+		 * deleting it. A record is created in the journal file on the
+		 * appropriate drive.
+		 *
+		 * @param aFileName - Name of file or directory including path
+		 * @param aFileName - the generated backup filename to return
+		 */
+		void RemoveL(const TDesC& aFileName, TDes& aBackupFileName);
+		
+		/**
+		 * Notifies Integrity Services that a file or directory is being added
+		 * that must later be removed. A record is created in the journal file
+		 * on the appropriate drive.
+		 *
+		 * @param aFileName - Name of file or directory including path
+		 */
+		void TemporaryL(const TDesC& aFileName);
+		
+		/** 
+		 * Commits all journals for this transaction 
+		 * */
+		void CommitL();		
+				
+		/**
+		 * Performs a file restore operation on a single drive
+		 * 
+		 * @param aDrive The drive to apply this operation to
+		 */
+		
+		void RestoreFilesL(TInt aDrive);
+			
+		/**
+		 * Rolls back the journal on all drives
+		 @see CIntegrityServices::RollbackL on explanation for aRecordAllRollbackEvents
+		 */
+		void RollBackL(TBool aRecordAllRollbackEvents = ETrue);
+		
+		/**
+		 * Creates the <sysdrive>:\<journal path>\<transactionID>.drv file's name 
+		 * This file is used by the journal to keep track of affected drives.
+		 * @param aTransactionID The transaction id for which the filename is to be assembled
+		 * @param aPath The journal path to be used when assembling the filename.
+		 * @param aDrvFileName The assembled fully qualfied filename is returned in this descriptor
+		 */
+		 static void CreateDrvFileNameL(TStsTransactionId aTransactionID, const TDesC& aPath, TDes& aDrvFileName);
+			
+		/**
+		 * Creates drive independent journal file name eg: \<journal path>\<transactionID>.<journalfileextension> and appends to aJournalFileName  
+		 * @param aTransactionID The transaction id for which the filename is to be assembled
+		 * @param aPath The journal path to be used when assembling the filename.
+		 * @param aJournalFileName The assembled drive independent filename is appended to the end of this descriptor
+		 */
+		 static void CreateJournalFileNameL(TStsTransactionId aTransactionID, const TDesC& aPath, TDes& aJournalFileName);
+		 
+		 static TInt RecoverTransactionIdFromDrvFileName(const TDesC& aDrvFileName, TStsTransactionId& aTransactionID);
+		 
+	private:
+	
+		CJournal(RFs& aFs, RLoader& aLoader);
+		
+		/**
+		 * Second phase constructor for CJournal
+		 *
+		 * @param aTransactionID A unique ID provided by the client to
+		 *						 identify this transaction. It is suggested
+		 *						 that the client use the current time as the
+		 *						 unique ID. This value can then be shared
+		 *						 between different processes so that they use
+		 *						 the same journal.
+		 * @param aPath			 The path in which to read and write journal
+		 *						 files. eg "\\private\\SID\\"
+		 */
+		void ConstructL(TStsTransactionId aTransactionID, const TDesC& aPath);
+
+		/**
+		 * Closes then deletes all files used by this journal. Records completed
+		 * drives to the drives array.
+		 */
+		void DeleteJournalFilesL();
+		
+		/**
+		 * Removes the journal file from the indicated drive if possible.
+		 * @see CIntegrityServices::RollbackL on explanation for aRecordAllRollbackEvents		 
+		 *
+		 */
+
+		void DeleteJournalFileL(TInt aDrive, TBool aRecordAllRollbackEvents = ETrue );
+		
+		/**
+		 * Removes the drives file from the system drive for this journal.
+		 *
+		 */
+		
+		void DeleteDrivesFileL();
+		
+		/**
+		 * Reads the array of drives used by this transaction from a file.
+		 */
+		void RefreshDrivesArrayL();
+		
+		/**
+		 * Opens a CJournalFile object on this drive, locking the journal file
+		 * and preventing use by other instances of CIntegrityServices using
+		 * the same Transaction ID. If a journal file does not exist it will
+		 * be created.
+		 *
+		 * @param aDrive the drive on which to open the journal file
+		 */
+		TInt PrepareToWriteL(TInt aDrive);
+		
+		/**
+		 * Adds the specified drive to the drives array used by this
+		 * transaction an records it in a file.
+		 *
+		 * @param aDrive the drive to add
+		 */
+		void UpdateDrivesFileL(TInt aDrive);
+		
+		/**
+		 * Performs the initial read of the drives file, and creates journal file
+		 * objects for every present drive already used in this transaction.
+		 */
+		void InitJournalsL();
+		
+		/**
+		 * Closes, then deletes the journal file opened with StartRollbackL().
+		@see CIntegrityServices::RollbackL on explanation for aRecordAllRollbackEvents		 
+		 */
+		void FinishRollbackL(TInt aDrive, TBool aRecordAllRollbackEvents = ETrue );
+		
+		/**
+		 * Returns the last event found in the journal files.
+		 * (used to determine how far the installation progressed)
+		 *
+		 * @return TIntegrityServicesEvent representing the last event in the journal
+		 */
+		TIntegrityServicesEvent LastEventL() const;
+				
+		/**
+		 * Performs a file delete operation on all drives referenced by this journal
+		 * 
+		 * @param aTypeFilter The type of file to apply this operation to
+		 * @param aFailType The type of test failure to induce during testing
+		 */	
+		void DeleteFilesL(TIntegrityServicesEvent aTypeFilter);
+
+		/**
+		 * Performs a file delete operation on a single drive
+		 * 
+		 * @param aTypeFilter The type of file to apply this operation to
+		 * @param aDrive The drive to apply this operation to
+		 * @param aFailType The type of test failure to induce during testing
+		 */
+		
+		void DeleteFilesL(TIntegrityServicesEvent aTypeFilter, TInt aDrive);		
+		
+		/**
+		 * Write a journal event to a specific drive
+		 *
+		 * @param aEvent the TEvent describing the current operation
+		 * @param aDrive The drive to write the event to
+		 * @param aSerializeEventToJournal Specifies whether the journal event should be serialized
+		 */
+		 
+		void WriteJournalEventL(TIntegrityServicesEvent aEvent, TInt aDrive, TBool aSerializeEventToJournal);
+		
+  		/**
+  		 * Performs recovery of the journal for a particular drive.
+  		 * 
+  		 * @param aDrive	The drive to rollback
+		 * @param aRecordAllRollbackEvents @see CIntegrityServices::RollbackL
+  		 */
+  		void RollBackDriveL(TInt aDrive, TBool aRecordAllRollbackEvents);
+  		
+		/**
+		 * Writes the event to all journal files
+		 *
+		 * @param aEvent the TEvent describing the current operation
+		 */
+		void WriteJournalEventL(TIntegrityServicesEvent aEvent);
+		
+		/**
+		 * Opens all journal file(s) belonging to this transaction, first
+		 * reading and verifying the existing contents. The files remain
+		 * open (and therefore locked) until FinishCommitL() is called.
+		 */
+		void StartCommitL();
+		
+		/*
+		 * Closes, then deletes the journal file(s) opened with StartCommitL().
+		 */
+		void FinishCommitL();
+
+		/**
+		 * Retrieves the last event from the journal on a specific drive
+		 *
+		 * @param aDrive The drive for which to retrieve the last event
+		 * @return TIntegrityServicesEvent representing the last event in the journal
+		 */
+		
+		TIntegrityServicesEvent LastEventL(TInt aDrive) const;		
+
+		/**
+		 * Retrieves the matching index in iJournalFiles for a journal which matches aDrive. Returns KErrNotFound if there's no journal for the drive
+		 */
+
+		TInt FindJournalFileIndexL(TInt aDrive) const;
+		
+	    /**
+		 * Reference to opened file server session
+		 */
+		RFs& iFs;
+		
+		/**
+		 * Reference to RLoader server session
+		 */
+		RLoader& iLoader;
+		/**
+		 * The generic journal filename (does not include a drive)
+		 */
+		TFileName iJournalFileName;
+		
+		/**
+		 * The filename for the drives array (located on the system drive)
+		 * This file stores the drives used, and drives completed for this
+		 * transaction.
+		 */
+		TFileName iDriveArrayFileName;
+
+		/**
+		 * The array of completed drives for this transaction
+		 */
+		RArray<TInt> iCompletedDrives;
+		 
+		RArray<TInt> iAllDrives;
+		
+		/**
+		 * Array of CJournalFile objects
+		 */
+		RPointerArray<CJournalFile> iJournalFiles;
+	};
+
+} ///namespace
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc_private/journalfile.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,232 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Definition of CJournalFile
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology
+*/
+
+#ifndef __JOURNALFILE_H__
+#define __JOURNALFILE_H__
+
+#include <e32base.h>
+#include <s32file.h>
+
+#include "integrityservicesevent.h"
+#include "integritytree.h"
+
+namespace Usif
+{
+	
+/**
+ * The purpose of this class is to wrap a RFileWriteStream so that multiple
+ * journal files can be held open by the client. This eliminates the need to 
+ * constantly open and close files. 
+ *
+ * @released
+ * @internalTechnology 
+ */
+class CJournalFile : public CBase
+	{
+	public:
+		
+		/**
+		 * Constructs a new CJournalFile
+		 *
+		 * @param aFs reference to the supplied file system session
+		 * @param aLoader reference to the RLoader session
+		 * @param aFileName the filename of the journal
+		 */
+		static CJournalFile* NewL(RFs& aFs, RLoader& aLoader, const TDesC& aFileName, TInt aDrive);
+
+		/**
+		 * Constructs a new CJournalFile an places it on the cleanup stack
+		 *
+		 * @param aFs reference to the supplied file system session
+		 * @param aLoader reference to the RLoader session
+		 * @param aFileName the filename of the journal
+		 */
+		static CJournalFile* NewLC(RFs& aFs, RLoader& aLoader, const TDesC& aFileName, TInt aDrive);
+		
+		virtual ~CJournalFile();
+
+		/**
+		 * Records an event in this journal file.
+		 *
+		 * @param aEvent	the event to record
+		 * @param aEvent	specifies whether the event should be serialized. If set to False, only the "in-memory" state of the journal is changed
+		 This parameter is used in possible low memory or low disk space conditions.
+		 */
+		void EventL(TIntegrityServicesEvent aEvent, TBool aSerializeEventToJournal = ETrue);
+		
+		/**
+		 * Notifies Integrity Services that a file or directory is being added
+		 * so that it can be removed if a rollback occurs. A record is created
+		 * in the journal file on the appropriate drive.
+		 *
+		 * @param aFileName - Name of file or directory including path
+		 */
+		void AddL(const TDesC& aFileName);
+		
+		/**
+		 * Checks if the file being removed has already been journalled for
+		 * adding in the same journal file.  If it has been, nothing is
+		 * journalled and the backup file name is set to zero length. Otherwise
+		 * a record is journalled for the removal and the backup filename is
+		 * set to the appropriate next name to use.
+		 *
+		 * @param aFileName - Name of file or directory including path
+		 * @param aBackupFileName - the generated backup filename to return or
+		 *                          zero-length if the file doesn't need to
+		 *                          be backed up.
+		 */
+		void RemoveL(const TDesC& aFileName, TDes& aBackupFileName);
+		
+		/**
+		 * Notifies Integrity Services that a file or directory is being added
+		 * that must later be removed. A record is created in the journal file
+		 * on the appropriate drive.
+		 *
+		 * @param aFileName - Name of file or directory including path
+		 */
+		void TemporaryL(const TDesC& aFileName);
+		
+		/**
+		 * Performs an operation on the file tree structure
+		 *
+		 * @param aFunc A function to apply to all nodes
+		 * @param aTypeFilter The type of node to apply the function to
+		 * @param aFailType The type of failure to induce, used exclusively in testing.
+		 *
+		 */
+		
+		void JournalOperationL(TTreeWalkFunctionL aFunc, TIntegrityServicesEvent aTypeFilter,
+			CIntegrityServices::TFailType aFailType);
+		
+		/**
+		 * Returns the last event found in the journal, used to determine how far the 
+		 * installation progressed
+		 *
+		 * @return TIntegrityServicesEvent representing the last event in the file
+		 */
+		TIntegrityServicesEvent LastEvent() const;
+		
+		/**
+		 * Checks that the filename is valid and complete
+		 *
+		 * @param aFs a reference to an open file system session
+		 * @param aFileName the filename to check
+		 * @return TInt representing the drive specified in this filename
+		 */
+		static TInt CheckFileNameL(RFs& aFs, const TDesC& aFileName);
+		
+		/**
+		 * Accessor method that tells us which drive this journal file is on
+		 */
+		
+		TInt Drive();
+				
+		/**
+		 * Closes any file handle held open by this object. The journal file object
+		 * must not be used again after this call.
+		 */
+		 		
+		void Close();
+		
+	private:
+		/**
+		 * Constructor for CJournalFile
+		 *
+		 * @param aFs a reference to the supplied file system session
+		 * @param aLoader reference to the RLoader session
+		 */
+		CJournalFile(RFs& aFs, RLoader& aLoader, TInt aDrive);
+		
+		/**
+		 * Second phase constructor for CJournalFile
+		 *
+		 * @param aFileName the filename of the journal
+		 */
+		void ConstructL(const TDesC& aFileName);
+		
+		/**
+		 * Reads and verifies the journal file
+		 */
+		void ReadL();
+
+		/**
+		 * Reads and verifies a journal entry from the supplied stream
+		 *
+		 * @param aJournalStream the stream to read
+		 * @param aDrive used to verify files referred to are only from that drive
+		 */
+		void ReadEntryL(RFileReadStream& aJournalStream, TInt aDrive);
+		
+		/**
+		 * Prepares to write to the journal file by opening an RFileWriteStream
+		 */
+		void PrepareToWriteL();
+		
+		/**
+		 * Generates the next backup filename for this journal file.
+		 */
+		void NextBackupFileNameL(TDes& aBackupFileName);
+
+		/**
+		 * Reference to the supplied file system session
+		 */
+		RFs& iFs;
+
+		/**
+		 * Reference to RLoader server session
+		 */
+		RLoader& iLoader;
+		
+		/**
+		 * The write stream for this journal
+		 */
+		RFileWriteStream iWriteStream;
+		
+		/**
+		 * The last journal event recorded in the journal
+		 */
+		TIntegrityServicesEvent iLastEvent;
+		
+		CIntegrityTreeNode* iTreeRoot;
+		
+		/**
+		 * The count of backup files in this journal
+		 */
+		TInt iBackupFilesCount;
+		
+		/**
+		 * The filename of this journal
+		 */
+		TFileName iJournalFileName;
+		
+		/**
+		 * The drive number this journal file is on
+		 */
+		
+		TInt iDrive;
+	};
+
+} //namespace
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc_private/operationfunctions.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,43 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology
+*/
+
+#ifndef __OPERATIONFUNCTIONS_H__
+#define __OPERATIONFUNCTIONS_H__
+
+#include <e32base.h>
+#include <f32file.h>
+
+namespace Usif
+{
+class CIntegrityTreeLeaf;
+
+void IntegrityDeleteFileL(const TDesC& aPath, CIntegrityTreeLeaf* aLeaf, RFs& aFs, RLoader& aLoader, 
+						  CFileMan& aFileMan);
+void IntegrityRestoreFileL(const TDesC& aPath, CIntegrityTreeLeaf* aLeaf, RFs& aFs, RLoader& aLoader, 
+	 					   CFileMan& aFileMan);
+void RemoveDirectoryTreeL(RFs& aFs, const TDesC& aFileName);
+
+} // namespace Usif
+
+#endif /* __OPERATIONFUNCTIONS_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc_private/stscommon.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,79 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* sts.h
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+
+#ifndef __STSCOMMON_H__
+#define __STSCOMMON_H__
+
+namespace Usif
+	{
+	_LIT(KStsServerName, "!SoftwareTransactionServicesServer");
+	_LIT(KStsServerImgName, "softwaretransactionservices.exe");
+	const TInt KStsVerMajor = 1;		
+	const TInt KStsVerMinor = 0;		
+	const TInt KStsVerBuild = 0;		
+		
+    const TInt KUidStsClient         = 0x10285BCE;
+    const TInt KUidStsRecoveryClient = 0x10285BD0;
+    const TInt KUidStsServer         = 0x10285BCD;
+    const TInt KUidDaemon 			 = 0x10202DCE;
+    
+    enum TStsClientServerFunctionType
+		{
+		//client to server
+		ECreateTransaction,  //creates a new transaction
+		EOpenTransaction,    //opens an existing transaction
+		ECommit,             //instructs the server to commit the transaction that is currently associated with the session
+		ERollBack,           //instructs the server to roll back the transaction that is currently associated with the session
+		EGetId,              //instructs the server to retrieve the id of the transaction that is currently associated with the session
+
+		ERegisterNew,        //notifies the server that a new file was added by client
+		ECreateNew,          //instructs the server to create a new file and return a handle to it to the client
+		ERemove,             //instructs the server to remove a file
+		ERegisterTemporary,  //notifies the server that a new temporary file was added by client
+		ECreateTemporary,    //instructs the server to create a new temporary file and return a handle to it to the client
+		EOverwrite,          //instructs the server to create a new file (owervriting the existing one)
+		
+		//recovery of all transactions
+		ERollBackAllPending
+		};
+		/**
+			Delay in microseconds before the STS Server is shut down, after
+			the last remaining session has been closed.
+		 */
+		const TInt KStsServerShutdownPeriod = 2 * 1000 * 1000;
+
+		//IPC argument slot in client-server messaging
+		const TInt KFilePathIPCSlot 	= 0;
+		const TInt KIdIPCSlot       	= 1;
+		const TInt KFileHandleIPCSlot	= 2;
+		const TInt KFileModeIPCSlot	    = 3;
+		
+	}//endof namespace Usif
+#endif
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc_private/stsserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,85 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Defines server-side classes which are used to implement the STS server.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+ 
+
+#ifndef __STSSERVER_H__
+#define __STSSERVER_H__
+
+#include <f32file.h>
+#include <scs/scsserver.h>
+#include <usif/sts/stsdefs.h>
+#include "stscommon.h"
+#include "integrityservices.h"
+#include "transactionwrapper.h"
+
+namespace Usif
+	{
+	class CStsServerSession;
+	
+	class CStsServer : public CScsServer
+	/**
+		The CScsServer-derived object which is used to generate STS sessions for the STS clients.
+	 */
+		{
+		friend class CStsServerSession;
+		
+		public:
+			static CStsServer* NewLC();
+					
+			~CStsServer();
+			
+			//Implement from CScsServer
+			CScsSession* DoNewSessionL(const RMessage2& aMessage);
+		
+			//Transaction management functions
+			CIntegrityServices* CreateTransactionL();
+			CIntegrityServices* AttachTransactionL(TStsTransactionId aTransactionID);
+			void ReleaseTransactionL(CIntegrityServices* &aTransactionPtr, TBool aMarkAsCompleted=EFalse);
+			void FinaliseTransactionL(CIntegrityServices* &aTransactionPtr);
+			
+		protected:
+			CPolicyServer::TCustomResult CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing);		
+
+		private:
+			CStsServer();
+			void ConstructL();
+			//Transaction management helper functions
+			TInt FindActiveTransaction(TStsTransactionId aTransactionID);
+			TStsTransactionId CreateTransactionID();
+			TBool  IsExistingTransaction(TStsTransactionId aTransactionID);
+			
+			//custom security check
+			TBool CheckIfFileModificationAllowedL(const RMessage2& aMsg);
+			
+			//rolls back all pending transactions
+			void RollBackAllPendingL();
+			
+		private:
+//			RFs iFs;						
+			RPointerArray<CReferenceCountedTransactionWrapper> iTransactionWrapperContainer;
+			}; //End of class CStsServer
+	
+	} // End of namespace USIF				
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc_private/stsserversession.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,61 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* stsserver.h
+* Defines server-side class which is used to implement the STS server session.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+ 
+
+#ifndef __STSSERVERSESSION_H__
+#define __STSSERVERSESSION_H__
+
+#include <scs/scsserver.h>
+#include "stscommon.h"
+#include "integrityservices.h"
+
+namespace Usif
+	{
+    class CStsServer;
+    
+	class CStsServerSession : public CScsSession
+	/**
+		The instance of this class is used to service STS client requests and 
+		is created for each client. 
+	 */
+		{
+	public:
+		static CStsServerSession* NewL(CStsServer &aServer, const RMessage2& aMessage);
+		~CStsServerSession();
+				
+		// implement CScsSession
+		TBool DoServiceL(TInt aFunction, const RMessage2& aMessage);
+
+	private:
+		CStsServerSession(CStsServer& aServer);
+		void ConstructL();
+		
+	private:
+		CIntegrityServices* iTransactionPtr;
+		};
+	
+	} // End of namespace SCRSERVER_H				
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/inc_private/transactionwrapper.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,58 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+
+#ifndef __TRANSACTIOWRAPPER_H__
+#define __TRANSACTIOWRAPPER_H__
+
+#include <e32def.h>
+#include <e32base.h>
+#include "integrityservices.h"
+#include <usif/sts/stsdefs.h>
+
+namespace Usif
+{
+	class CReferenceCountedTransactionWrapper : public CBase
+	{
+	public:
+		static CReferenceCountedTransactionWrapper* NewLC(TStsTransactionId aTransactionID);
+		~CReferenceCountedTransactionWrapper();
+		CIntegrityServices* Attach();
+		TInt Detach();
+		TStsTransactionId TransactionId() const {return iTrPtr->TransactionId();}
+		TBool IsCompleted(){return iCompleted;}
+		void SetCompleted(){iCompleted=ETrue;}
+	private:
+		CReferenceCountedTransactionWrapper();
+		void ConstructL(TStsTransactionId aTransactionID);
+		
+	private:
+		TInt iRefCount;
+		CIntegrityServices* iTrPtr;
+		TBool iCompleted;
+	};
+
+}//namespace Usif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/client/sts.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,166 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* sts.h
+*
+*/
+
+
+/**
+ @file
+ @publishedAll
+ @released
+*/
+#include <usif/sts/sts.h>
+#include "stscommon.h"
+#include <e32cmn.h>
+#include <e32uid.h>
+
+using namespace Usif;
+
+
+void RStsSession::ConnectL()
+	{
+	__ASSERT_DEBUG(iHandle == NULL, User::Invariant());
+	TInt err = RScsClientBase::Connect(KStsServerName, TVersion(KStsVerMajor,
+			KStsVerMinor, KStsVerBuild), KStsServerImgName, TUidType(
+			KExecutableImageUid, KNullUid, TUid::Uid(KUidStsServer)));
+	User::LeaveIfError(err);
+	}
+
+EXPORT_C RStsSession::RStsSession()
+: RScsClientBase()
+	{
+	// empty
+	}
+
+EXPORT_C void RStsSession::Close()
+	{
+	RScsClientBase::Close();
+	}
+
+EXPORT_C TStsTransactionId RStsSession::CreateTransactionL()
+	{
+	// It is possible to create several transactions on the same session, assuming that they are all sequential
+	if (iHandle == NULL)
+		ConnectL();
+	TStsTransactionId trID;
+	TPckg<TStsTransactionId> idPkg(trID);
+	TIpcArgs ipcArgs;
+	ipcArgs.Set(KIdIPCSlot, &idPkg);
+	User::LeaveIfError(CallSessionFunction(ECreateTransaction, ipcArgs));
+	return trID;
+	}
+
+EXPORT_C void RStsSession::OpenTransactionL(TStsTransactionId aTransactionID)
+	{
+	if (iHandle == NULL)
+		ConnectL();
+	TPckgC<TStsTransactionId> idPkg(aTransactionID);
+	TIpcArgs ipcArgs;
+	ipcArgs.Set(KIdIPCSlot, &idPkg);
+	User::LeaveIfError(CallSessionFunction(EOpenTransaction, ipcArgs));
+	}
+
+EXPORT_C void RStsSession::RegisterNewL(const TDesC& aFileName)
+	{
+	TIpcArgs ipcArgs;
+	ipcArgs.Set(KFilePathIPCSlot, &aFileName);
+	User::LeaveIfError(CallSessionFunction(ERegisterNew, ipcArgs));
+	}
+
+EXPORT_C void RStsSession::CreateNewL(const TDesC& aFileName, RFile &aFile, TUint aCreateMode)
+	{
+	__ASSERT_DEBUG(((KFilePathIPCSlot!=KFileHandleIPCSlot) &&
+					(KFilePathIPCSlot!=KFileModeIPCSlot)   &&
+					(KFileModeIPCSlot!=KFileHandleIPCSlot)), User::Invariant());
+
+	TPckgBuf<TInt> fileHandlePkg;
+	TPckgC<TUint> pkgFileMode(aCreateMode);
+	TIpcArgs ipcArgs;
+	ipcArgs.Set(KFilePathIPCSlot, &aFileName);
+	ipcArgs.Set(KFileHandleIPCSlot, &fileHandlePkg);
+	ipcArgs.Set(KFileModeIPCSlot, &pkgFileMode);
+	TInt fileServerHandle = User::LeaveIfError(CallSessionFunction(ECreateNew, ipcArgs));
+	User::LeaveIfError(aFile.AdoptFromServer(fileServerHandle, fileHandlePkg()));
+	}
+
+EXPORT_C void RStsSession::RemoveL(const TDesC& aFileName)
+	{
+	TIpcArgs ipcArgs;
+	ipcArgs.Set(KFilePathIPCSlot, &aFileName);
+	User::LeaveIfError(CallSessionFunction(ERemove, ipcArgs));
+	}
+
+EXPORT_C void RStsSession::RegisterTemporaryL(const TDesC& aFileName)
+	{
+	TIpcArgs ipcArgs;
+	ipcArgs.Set(KFilePathIPCSlot, &aFileName);
+	User::LeaveIfError(CallSessionFunction(ERegisterTemporary, ipcArgs));
+	}
+
+EXPORT_C void RStsSession::CreateTemporaryL(const TDesC& aFileName, RFile &aFile, TUint aCreateMode)
+	{
+	__ASSERT_DEBUG(((KFilePathIPCSlot!=KFileHandleIPCSlot) &&
+					(KFilePathIPCSlot!=KFileModeIPCSlot)   &&
+					(KFileModeIPCSlot!=KFileHandleIPCSlot)), User::Invariant());
+
+	TPckgBuf<TInt> fileHandlePkg;
+	TPckgC<TUint> pkgFileMode(aCreateMode);
+	TIpcArgs ipcArgs;
+	ipcArgs.Set(KFilePathIPCSlot, &aFileName);
+	ipcArgs.Set(KFileHandleIPCSlot, &fileHandlePkg);
+	ipcArgs.Set(KFileModeIPCSlot, &pkgFileMode);
+	TInt fileServerHandle = User::LeaveIfError(CallSessionFunction(ECreateTemporary, ipcArgs));
+	User::LeaveIfError(aFile.AdoptFromServer(fileServerHandle, fileHandlePkg()));
+	}
+
+EXPORT_C void RStsSession::OverwriteL(const TDesC& aFileName, RFile &aFile, TUint aCreateMode)
+	{
+	__ASSERT_DEBUG(((KFilePathIPCSlot!=KFileHandleIPCSlot) &&
+					(KFilePathIPCSlot!=KFileModeIPCSlot)   &&
+					(KFileModeIPCSlot!=KFileHandleIPCSlot)), User::Invariant());
+
+	TPckgBuf<TInt> fileHandlePkg;
+	TPckgC<TUint> pkgFileMode(aCreateMode);
+	TIpcArgs ipcArgs;
+	ipcArgs.Set(KFilePathIPCSlot, &aFileName);
+	ipcArgs.Set(KFileHandleIPCSlot, &fileHandlePkg);
+	ipcArgs.Set(KFileModeIPCSlot, &pkgFileMode);
+	TInt fileServerHandle = User::LeaveIfError(CallSessionFunction(EOverwrite, ipcArgs));
+	User::LeaveIfError(aFile.AdoptFromServer(fileServerHandle, fileHandlePkg()));
+	}
+
+EXPORT_C void RStsSession::CommitL()
+	{
+	User::LeaveIfError(CallSessionFunction(ECommit));
+	Close();
+	}
+
+EXPORT_C void RStsSession::RollBackL()
+	{
+	User::LeaveIfError(CallSessionFunction(ERollBack));
+	Close();
+	}
+
+EXPORT_C TStsTransactionId RStsSession::TransactionIdL()
+	{
+	TStsTransactionId id;
+	TPckg<TStsTransactionId> idPkg(id);
+	TIpcArgs ipcArgs;
+	ipcArgs.Set(KIdIPCSlot, &idPkg);
+	User::LeaveIfError(CallSessionFunction(EGetId, ipcArgs));
+	return id;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/client/stsrecovery.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,60 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#include <usif/sts/sts.h>
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "stsrecovery.h"
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "stscommon.h"
+#include <e32cmn.h>
+#include <e32uid.h>
+
+namespace Usif
+	{
+	void RStsRecoverySession::ConnectL()
+		{
+		TInt err = RScsClientBase::Connect(KStsServerName, 
+				                           TVersion(KStsVerMajor, KStsVerMinor, KStsVerBuild), 
+				                           KStsServerImgName, 
+				                           TUidType (KExecutableImageUid, KNullUid, TUid::Uid(KUidStsServer)));
+		User::LeaveIfError(err);
+		}
+	
+	EXPORT_C RStsRecoverySession::RStsRecoverySession()
+		:	RScsClientBase()
+		{
+		}
+
+	EXPORT_C void RStsRecoverySession::Close()
+		{
+		RScsClientBase::Close();
+		}
+
+	EXPORT_C void RStsRecoverySession::RollbackAllPendingL()
+		{
+		ConnectL();
+		User::LeaveIfError(CallSessionFunction(ERollBackAllPending));
+		Close();
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/server/integrityservices.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,428 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* CIntegrityServices implementation
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology
+*/
+
+#include "integrityservices.h"
+#include "journal.h"
+#include "operationfunctions.h"
+#include "usiflog.h"
+
+#include <f32file.h>
+
+using namespace Usif;
+
+_LIT(KTransactionPath, "\\sys\\install\\integrityservices\\");
+
+CIntegrityServices::TFailType CIntegrityServices::iFailType = EFailNone;
+CIntegrityServices::TFailPosition CIntegrityServices::iFailPosition = EBeforeJournal;
+TFileName CIntegrityServices::iFailFileName;
+TBool CIntegrityServices::iIsFailureTestingEnabled = EFalse;
+
+
+/**
+ * This is a trivial C class that just encapsulates a TEntryArray object in order to 
+ * facilitate its storage on the heap.
+ *
+ * @released
+ * @internalComponent 
+ */
+class CEntryArray : public CBase
+	{
+public:
+	inline TEntryArray& operator()();
+
+private:
+	/**
+	 * Container to hold file entries
+	 */
+	TEntryArray iEntryArray;
+	};
+
+inline TEntryArray& CEntryArray::operator()()
+	{
+	return iEntryArray;
+	}
+
+ CIntegrityServices* CIntegrityServices::NewL(TStsTransactionId aTransactionID)
+	{
+	CIntegrityServices* self = CIntegrityServices::NewLC(aTransactionID);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+ CIntegrityServices* CIntegrityServices::NewLC(TStsTransactionId aTransactionID)
+	{
+	CIntegrityServices* self = new(ELeave) CIntegrityServices(aTransactionID);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+
+ CIntegrityServices::CIntegrityServices(TStsTransactionId aTransactionID) : iTransactionID(aTransactionID)
+	{
+	}
+
+ CIntegrityServices::~CIntegrityServices()
+	{
+	delete iJournal;
+	iFs.Close();
+	
+	iLoader.Close();
+	}
+
+ void CIntegrityServices::ConstructL()
+	{
+	DEBUG_PRINTF2(_L("CIntegrityServices::ConstructL() - Opening session with  Session ID %X."), iTransactionID);
+	
+	User::LeaveIfError(iFs.Connect());
+	User::LeaveIfError(iFs.ShareProtected()); //needed as new RFiles are to be passed back to client's side
+	User::LeaveIfError(iLoader.Connect());
+
+	// store the journal path and create the journal
+	TParsePtrC pathPtr(KTransactionPath);
+	iJournalPath = pathPtr.Path();
+	iJournal = CJournal::NewL(iFs, iLoader, iTransactionID, iJournalPath);
+	iSystemDrive = ::RFs::GetSystemDrive();
+	}
+ 
+const TInt KIntegrityServicesSimulatedBatteryFailure=-10205; 
+ 
+/*static*/ void CIntegrityServices::SimulatePowerFailureL(TFailType aFailType, TFailPosition aFailPosition, const TDesC& aFailFileName)
+	{
+	if (!iIsFailureTestingEnabled)
+		return;
+	
+	if(iFailType == aFailType && iFailPosition == aFailPosition && iFailFileName == aFailFileName)
+		{
+		User::Leave(KIntegrityServicesSimulatedBatteryFailure);
+		}
+	}
+
+/*static*/ void CIntegrityServices::NormalizeDirectoryName(TDes& aFileName)
+{
+	// Directories are represented in the integrity tree and integrity journal exactly as files,
+	// without the trailing slash 
+	TInt lastCharPos = aFileName.Length() - 1;
+	if ( lastCharPos >= 0 && aFileName[lastCharPos] == KPathDelimiter &&
+		 aFileName.Locate(KPathDelimiter) != lastCharPos) // Take care not to remove slash from "c:\" and the like
+		{
+		aFileName.Delete(lastCharPos, 1);
+		}			
+}
+
+void CIntegrityServices::CopyToBackupL(const TDesC& aSource, const TDesC& aBackup)
+{
+	// Copying a file isn't atomic so we create a temporary backup file first
+	RBuf backupTmpName;
+	backupTmpName.Create(aBackup.Length() + 4);
+	CleanupClosePushL(backupTmpName);
+	backupTmpName.Copy(aBackup);
+	_LIT(KTmpExt, ".tmp");
+	backupTmpName.Append(KTmpExt);
+	
+	// Copying a file is not an atomic operation so add the temporary
+	// file to the journal to enable cleanup if a power failure occurs before
+	// the rename
+	SimulatePowerFailureL(EFailAddingTempFile, EBeforeJournal, backupTmpName);
+	RegisterTemporaryL(backupTmpName);
+	SimulatePowerFailureL(EFailAddingTempFile, EAfterJournal, backupTmpName);	
+		
+	CFileMan* fileMan = CFileMan::NewL(iFs);
+	CleanupStack::PushL(fileMan);
+		
+	TInt err = fileMan->Copy(aSource, backupTmpName);
+	DEBUG_PRINTF4(_L("CIntegrityServices::CopyToBackupL() - Copying %S to %S, err %d"), &aSource, &backupTmpName, err);
+	User::LeaveIfError(err);
+	
+	// Backup is complete, use RFs::Rename as atomic 'commit' of backup
+	err = iFs.Rename(backupTmpName, aBackup);			
+	DEBUG_PRINTF2(_L("CIntegrityServices::CopyToBackupL() - Commit backup returned error %d"), err);	
+	User::LeaveIfError(err);	
+	CleanupStack::PopAndDestroy(2, &backupTmpName); // backupTmpName, fileMan 
+	
+	//  Now the backup is safe the original can be deleted
+	err = iLoader.Delete(aSource);
+	DEBUG_PRINTF3(_L("CIntegrityServices::CopyToBackupL() - RLoader::Delete %S returned error %d"), &aSource, err);
+	User::LeaveIfError(err);
+}
+
+
+ void CIntegrityServices::RegisterNewL(const TDesC& aFileName)
+	{
+	DEBUG_PRINTF3(_L("CIntegrityServices::RegisterNewL() - Session %X, File: %S."),	iTransactionID, &aFileName);
+
+	HBufC* localFilenameHeap = aFileName.AllocLC();
+	TPtr localFilename = localFilenameHeap->Des();
+	NormalizeDirectoryName(localFilename); // If it is a directory name, make sure to normalize it
+		
+	// Record the added file or directory in the journal
+	SimulatePowerFailureL(EFailAddingNewFile, EBeforeJournal, aFileName);
+	iJournal->AddL(localFilename);
+	SimulatePowerFailureL(EFailAddingNewFile, EAfterJournal, aFileName);
+	CleanupStack::PopAndDestroy(localFilenameHeap);
+	}
+
+ void VerifyMkDirErrorL(TInt err)
+	{
+	if(err != KErrNone && err != KErrAlreadyExists)
+		{
+		User::Leave(err);
+		}	
+	}
+ 
+ void ProcessNewFileRegistrationResultL(TInt err, RFs& aFs, const TDesC& aFileName, RFile& aFile)
+	{
+	if(err!= KErrNone)
+		{
+		//if we hit this point it means we successfully created the new file however registering with the transaction has  failed
+		//so we have to remove the new file to make the journal and the file system consistent
+		aFile.Close();
+		aFs.Delete(aFileName);
+		User::Leave(err);
+		}	
+	}
+
+ void CIntegrityServices::CreateNewL(const TDesC& aFileName, RFile &newFile, TUint aFileMode)
+	{
+	DEBUG_PRINTF3(_L("CIntegrityServices::CreateNewL() - Session %X, File: %S."),	iTransactionID, &aFileName);
+	TInt err = iFs.MkDirAll(aFileName); //first we have to create the full directory path to aFileName otherwise RFs::Create will fail
+	VerifyMkDirErrorL(err);
+	User::LeaveIfError(newFile.Create(iFs, aFileName, aFileMode));
+	TRAPD(regResult, RegisterNewL(aFileName));	
+	ProcessNewFileRegistrationResultL(regResult, iFs, aFileName, newFile); //checks if the registration failed and cleans up the file in the filesystem if it did
+	}
+
+ void CIntegrityServices::RemoveL(const TDesC& aFileName)
+	{
+	DEBUG_PRINTF3(_L("CIntegrityServices::RemoveL() - Session %X, File: %S."), iTransactionID, &aFileName);
+
+	// before doing anything check that the file or directory exists
+	TEntry entry;
+	
+	TInt res = iFs.Entry(aFileName, entry);
+	if (res == KErrNotFound || res == KErrPathNotFound)
+		return; // If the file is not present, do nothing. Returning an error would require the user of the API to do additional checks
+	User::LeaveIfError(res);
+
+	// We might need to grow this buffer by one byte later
+	HBufC* localFilenameHeap = HBufC::NewLC(aFileName.Length() + 1);
+	TPtr localFilename = localFilenameHeap->Des();
+	localFilename.Copy(aFileName);
+	
+	TBool isFilenameDir = entry.IsDir();
+	// The "if" below is not functionally necessary, but it is a slight optimization - 
+	// so that we won't attempt to normalize directory name on files. The optimization is not
+	// done in AddL or NormalizeDirectoryName itself, since we don't have future use for TEntry there, and the cost for RFs::Entry overweighs the one for NormalizeDirectoryName
+	if ( isFilenameDir ) 
+		{
+		NormalizeDirectoryName(localFilename);
+		}
+
+	RBuf backupFileName;
+	backupFileName.CreateL(KMaxFileName);
+	CleanupClosePushL(backupFileName);
+	SimulatePowerFailureL(EFailRemovingFile, EBeforeJournal, aFileName);
+	iJournal->RemoveL(localFilename, backupFileName);
+		
+	if (backupFileName.Length())
+		{
+		SimulatePowerFailureL(EFailRemovingFile, EAfterJournal, aFileName);
+
+		TInt err = iFs.MkDirAll(backupFileName);
+		VerifyMkDirErrorL(err);
+
+		SimulatePowerFailureL(EFailRemovingFile, EBeforeAction, aFileName);
+		_LIT(KSysBinMatch, "?:\\sys\\bin\\*");
+		if (localFilename.MatchF(KSysBinMatch) == 0)
+		{
+			// A copy is slower than a rename to only use the 
+			// demand paging safe API for files in sys\bin
+			CopyToBackupL(localFilename, backupFileName);			
+		}
+		else
+		{
+			err = iFs.Rename(localFilename, backupFileName);
+			DEBUG_PRINTF4(_L("CIntegrityServices::RemoveL() - Renamed %S as %S error %d"), &localFilename, &backupFileName, err);
+			User::LeaveIfError(err);
+		}				
+		SimulatePowerFailureL(EFailRemovingFile, EAfterAction, aFileName);
+		}
+	else
+		{
+		DEBUG_PRINTF2(_L("CIntegrityServices::RemoveL() - %S already backed up"), &aFileName);
+		SimulatePowerFailureL(EFailRemovingFile, EBeforeAction, aFileName);
+		// If backupFileName is zero-length, the file was added earlier
+		// in the same journal and doesn't need to be backed up.
+		if (isFilenameDir)
+			{
+			CFileMan* fileman = CFileMan::NewL(iFs);
+			CleanupStack::PushL(fileman);			
+			// Make sure to append slash before calling RmDir - otherwise it deletes the parent directory
+			if (localFilename[localFilename.Length()-1] != KPathDelimiter)
+	  			{
+  				localFilename.Append(KPathDelimiter);
+  				}			
+			User::LeaveIfError(fileman->RmDir(localFilename)); // A directory cannot be a paged exec., so we don't have to use iLoader
+			CleanupStack::PopAndDestroy(fileman);
+			}
+		else
+			{
+			User::LeaveIfError(iLoader.Delete(aFileName));
+			}
+		SimulatePowerFailureL(EFailRemovingFile, EAfterAction, aFileName);			
+		}
+
+	// Don't leave an empty directory structure, try pruning it
+	RemoveDirectoryTreeL(iFs, aFileName);
+
+	CleanupStack::PopAndDestroy(2, localFilenameHeap); // backupFileName
+	}
+
+ void CIntegrityServices::RegisterTemporaryL(const TDesC& aFileName)
+	{
+	DEBUG_PRINTF3(_L("CIntegrityServices::RegisterTemporaryL() - Session %X, File: %S."), iTransactionID, &aFileName);
+
+	// record the temporary file or directory in the journal
+	SimulatePowerFailureL(EFailAddingTempFile, EBeforeJournal, aFileName);
+	iJournal->TemporaryL(aFileName);
+	SimulatePowerFailureL(EFailAddingTempFile, EAfterJournal, aFileName);
+	}
+
+ void CIntegrityServices::CreateTemporaryL(const TDesC& aFileName, RFile &newFile, TUint aFileMode)
+	{
+	DEBUG_PRINTF3(_L("CIntegrityServices::CreateTemporaryL() - Session %X, File: %S."), iTransactionID, &aFileName);
+
+	TInt err = iFs.MkDirAll(aFileName); //first we have to create the full directory path to aFileName otherwise RFs::Create will fail
+	VerifyMkDirErrorL(err);
+	User::LeaveIfError(newFile.Create(iFs, aFileName, aFileMode));
+	TRAPD(regResult, RegisterTemporaryL(aFileName));
+	ProcessNewFileRegistrationResultL(regResult, iFs, aFileName, newFile);
+	}
+
+ void CIntegrityServices::OverwriteL(const TDesC& aFileName, RFile &newFile, TUint aFileMode)
+	{
+	DEBUG_PRINTF3(_L("CIntegrityServices::OverwriteL() - Session %X, File: %S."), iTransactionID, &aFileName);
+
+	TBool b;
+	TInt err;
+	if((err=iFs.IsFileOpen(aFileName, b))== KErrNone) //returned error code shows whether the file exists or not; the bool value is ignored
+		{
+		//file exists remove first
+		RemoveL(aFileName);
+		}
+	else
+		{
+		if(err != KErrNotFound)
+			{
+			User::Leave(err);
+			}
+		}
+	CreateNewL(aFileName, newFile, aFileMode);
+	}
+
+ void CIntegrityServices::CommitL()
+	{
+	DEBUG_PRINTF2(_L("CIntegrityServices::CommitL() - Session %X."), iTransactionID);	
+	iJournal->CommitL();
+	}
+
+ void CIntegrityServices::RollBackL(TBool aRecordAllRollbackEvents /* = ETrue */)
+	{
+	DEBUG_PRINTF2(_L("CIntegrityServices::RollBackL() - transaction %X"), iTransactionID);
+	iJournal->RollBackL(aRecordAllRollbackEvents);
+	}
+
+/*static*/ void CIntegrityServices::GetListOfTransactionsL(RArray<TStsTransactionId>& aIdArray)
+	{
+	RFs fs;
+	User::LeaveIfError(fs.Connect());
+	CleanupClosePushL(fs);
+	TDriveUnit systemDrive(::RFs::GetSystemDrive());
+	RBuf fileSpec;
+	fileSpec.CreateL(systemDrive.Name(), KMaxFileName);
+	CleanupClosePushL(fileSpec);
+	fileSpec.Append(KTransactionPath);
+	fileSpec.Append(KMatchAny);
+	fileSpec.Append(KExtDelimiter);
+	fileSpec.Append(KDriveExt);
+
+	RDir dir;
+	TInt err = dir.Open(fs, fileSpec, KEntryAttNormal);
+	CleanupStack::PopAndDestroy(&fileSpec);
+	if (err == KErrPathNotFound || err == KErrNotFound)
+		{
+		CleanupStack::PopAndDestroy(&fs);
+		return; // These errors are not considered fatal - there may be no journals present
+		}
+	User::LeaveIfError(err);
+	CleanupClosePushL(dir);
+	
+	CEntryArray* entryArrayContainer = new (ELeave) CEntryArray;
+	TEntryArray& entryArray = (*entryArrayContainer)();
+	err = dir.Read(entryArray);
+	CleanupStack::PopAndDestroy(&dir);
+	CleanupStack::PushL(entryArrayContainer);	
+	if (err != KErrNone && err != KErrEof)
+		{
+		User::Leave(err);
+		}
+	TInt entryCount(entryArray.Count());
+	for (TInt index = 0; index < entryCount; ++index)
+		{
+		TStsTransactionId transactionID;
+		if (CJournal::RecoverTransactionIdFromDrvFileName(
+				entryArray[index].iName, transactionID) == KErrNone)
+			{
+			aIdArray.AppendL(transactionID);
+			}
+		}
+	CleanupStack::PopAndDestroy(entryArrayContainer);
+	CleanupStack::PopAndDestroy(&fs);
+	}
+
+/*static*/ void CIntegrityServices::RollbackAllL()
+	{
+	RArray<TStsTransactionId> transactionIDs;
+	CleanupClosePushL(transactionIDs);
+	CIntegrityServices::GetListOfTransactionsL(transactionIDs);
+	TInt numberOfTransactions(transactionIDs.Count());
+	TInt lastError=KErrNone;
+	DEBUG_PRINTF2(_L("CIntegrityServices::RollbackAllL() %d transactions have been found."), numberOfTransactions );							
+	for(TInt i=0; i<numberOfTransactions; ++i)
+		{
+		DEBUG_PRINTF2(_L("CIntegrityServices::RollbackAllL() Trying to roll back transaction %X"), transactionIDs[i]);
+		TRAPD(err,
+			CIntegrityServices* transactionPtr = CIntegrityServices::NewLC(transactionIDs[i]);
+			transactionPtr->RollBackL(EFalse); // Specify not to record roll back events. If we failed in the middle of a previous roll back, due to lack of resources we shouldn't be trying to record more events
+			CleanupStack::PopAndDestroy(transactionPtr);
+			); //failing to roll back one transaction shouldn't affect the overall rollback all procedure
+		if(err!=KErrNone)
+			{
+			lastError=err; //remember last error and leave with that error code indicating an error in the overall procedure
+			}
+		DEBUG_PRINTF2(_L("CIntegrityServices::RollbackAllL() Rolled back transaction %X"), transactionIDs[i]);			
+		}
+	CleanupStack::PopAndDestroy(&transactionIDs);
+	User::LeaveIfError(lastError);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/server/integritytree.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,281 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology
+*/
+
+#include "integritytree.h"
+
+#include "integrityservices.h"
+#include <f32file.h>
+
+namespace Usif
+{
+CIntegrityTreeLeaf* CIntegrityTreeLeaf::NewLC(const TDesC& aFileName, TIntegrityServicesEvent aType,
+	const TDesC& aOwningJournal)
+	{
+	CIntegrityTreeLeaf* self = new (ELeave) CIntegrityTreeLeaf(aType, aOwningJournal);
+	CleanupStack::PushL(self);
+	self->ConstructL(aFileName);
+	return self;
+	}
+	
+CIntegrityTreeLeaf::~CIntegrityTreeLeaf()
+	{
+	delete iFileName;
+	}
+
+CIntegrityTreeLeaf::CIntegrityTreeLeaf(TIntegrityServicesEvent aType, const TDesC& aOwningJournal)
+	: iType(aType), iOwningJournal(aOwningJournal)
+	{
+	}
+	
+void CIntegrityTreeLeaf::ConstructL(const TDesC& aFileName)	
+	{
+	iFileName = aFileName.AllocL();
+	}
+
+CIntegrityTreeLeaf* CIntegrityTreeLeaf::Peer()
+	{
+	return iPeer;
+	}
+	
+TIntegrityServicesEvent CIntegrityTreeLeaf::Type()
+	{
+	return iType;
+	}
+	
+const TDesC& CIntegrityTreeLeaf::Name()
+	{
+	return *iFileName;
+	}
+	
+const TDesC& CIntegrityTreeLeaf::Journal()
+	{
+	return iOwningJournal;
+	}
+	
+void CIntegrityTreeLeaf::SetPeer(CIntegrityTreeLeaf* aPeer)
+	{
+	iPeer = aPeer;
+	} 
+	
+CIntegrityTreeNode* CIntegrityTreeNode::NewL(const TDesC& aDirectoryName)
+	{
+	CIntegrityTreeNode* self = CIntegrityTreeNode::NewLC(aDirectoryName);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CIntegrityTreeNode* CIntegrityTreeNode::NewLC(const TDesC& aDirectoryName)
+	{
+	CIntegrityTreeNode* self = new (ELeave) CIntegrityTreeNode;
+	CleanupStack::PushL(self);
+	self->ConstructL(aDirectoryName);
+	return self;
+	}
+	
+	
+const TDesC& CIntegrityTreeNode::Name()
+	{
+	return *iDirName;
+	}
+	
+CIntegrityTreeLeaf* CIntegrityTreeNode::AddNodeL(const TDesC& aFileName, TIntegrityServicesEvent aType, const TDesC& aOwningJournal)
+	{
+	RBuf filename;
+	filename.CreateL(aFileName, aFileName.Length());
+	CleanupClosePushL(filename);
+	CIntegrityTreeLeaf* leaf = DoAddNodeL(filename, aType, aOwningJournal);
+	CleanupStack::PopAndDestroy(&filename);
+	return leaf;
+	}
+
+TInt CIntegrityTreeNode::FindNode(const TDesC& aFileName, TIntegrityServicesEvent aType)
+	{
+	RBuf filename;
+	TInt found = 0;
+	TRAPD(err, 
+			filename.CreateL(aFileName, aFileName.Length());
+			CleanupClosePushL(filename);
+			found = DoFindNode(filename, aType);
+			CleanupStack::PopAndDestroy(&filename);
+		);
+	if (err != KErrNone)
+		{
+		return err;
+		}
+	return found;
+	}
+
+void CIntegrityTreeNode::WalkTreeL(TTreeWalkFunctionL aFunc, TIntegrityServicesEvent aTypeFilter,
+	RFs& aFs, RLoader& aLoader, CFileMan& aFileMan, CIntegrityServices::TFailType aFailType)
+	{
+	RBuf filename;
+	filename.CreateL(*iDirName, KMaxFileName);
+	CleanupClosePushL(filename);
+	DoWalkTreeL(filename, aFunc, aTypeFilter, aFs, aLoader, aFileMan, aFailType);
+	CleanupStack::PopAndDestroy(&filename);
+	}
+	
+CIntegrityTreeLeaf* CIntegrityTreeNode::DoAddNodeL(TDes& aFileName, TIntegrityServicesEvent aType, const TDesC& aOwningJournal)
+	{
+	TInt pathDividerPos = aFileName.Locate(KPathDelimiter);
+	User::LeaveIfError(pathDividerPos); // The must be at least /this/ directory name
+	
+	TPtrC dirPtr(aFileName.Left(pathDividerPos));
+	if (dirPtr.CompareF(*iDirName) != 0)
+		{
+		User::Leave(KErrBadName); // this doesn't belong to us.
+		}
+	
+	// remove the directory section of the path.
+	aFileName.Delete(0, pathDividerPos+1);
+	
+	// Now, see if we need to pass it on up the chain.
+	pathDividerPos = aFileName.Locate(KPathDelimiter);
+	if (pathDividerPos == KErrNotFound)
+		{
+		// This is now just a file name, add a new file name leaf here.
+		CIntegrityTreeLeaf* leaf = CIntegrityTreeLeaf::NewLC(aFileName, aType, aOwningJournal);
+		iFiles.AppendL(leaf);
+		CleanupStack::Pop(leaf);
+		return leaf;
+		}
+	else
+		{
+		// There are more directories in the chain... See if we have an entry...
+		dirPtr.Set(aFileName.Left(pathDividerPos));
+	 
+		TInt dirCount(iDirectories.Count());
+		for (TInt i = 0; i < dirCount; ++i)
+			{
+			if (dirPtr.CompareF(iDirectories[i]->Name()) == 0)
+				{
+				return iDirectories[i]->DoAddNodeL(aFileName, aType, aOwningJournal);
+				}
+			}
+		// doesn't yet exist. Add it to the tree.
+		CIntegrityTreeNode* node = CIntegrityTreeNode::NewLC(dirPtr);
+		iDirectories.AppendL(node);
+		CleanupStack::Pop(node);
+		
+		// pass the remaining path down the tree
+		return node->DoAddNodeL(aFileName, aType, aOwningJournal);
+		}
+	}
+	
+TInt CIntegrityTreeNode::DoFindNode(TDes& aFileName, TIntegrityServicesEvent aType)
+	{
+	TInt pathDividerPos = aFileName.Locate(KPathDelimiter);
+	if (pathDividerPos < 0)
+		return pathDividerPos; // The must be at least one path delimiter in the file name	
+	
+	TPtrC dirPtr(aFileName.Left(pathDividerPos));
+	if (dirPtr.CompareF(*iDirName) != 0)
+		{
+		return KErrBadName; // this doesn't belong to us.
+		}
+	
+	// remove the directory section of the path.
+	aFileName.Delete(0, pathDividerPos+1);
+	
+	// Now, see if we need to pass it on up the chain.
+	pathDividerPos = aFileName.Locate(KPathDelimiter);
+	if (pathDividerPos == KErrNotFound)
+		{
+		TInt nameCount(iFiles.Count());
+		for (TInt i = 0; i < nameCount; ++i)
+			{
+			if (iFiles[i]->Type() == aType &&
+				iFiles[i]->Name().CompareF(aFileName) == 0)
+				{
+				return KErrNone;
+				}
+			}
+		return KErrNotFound;
+		}
+	else
+		{
+		// There are more directories in the chain... See if we have an entry...
+		dirPtr.Set(aFileName.Left(pathDividerPos));
+	 
+		TInt dirCount(iDirectories.Count());
+		for (TInt i = 0; i < dirCount; ++i)
+			{
+			if (dirPtr.CompareF(iDirectories[i]->Name()) == 0)
+				{
+				return iDirectories[i]->DoFindNode(aFileName, aType);
+				}
+			}
+		return KErrNotFound;
+		}
+	}
+	
+void CIntegrityTreeNode::DoWalkTreeL(TDes& aPath, TTreeWalkFunctionL aFunc, 
+	TIntegrityServicesEvent aTypeFilter, RFs& aFs, RLoader& aLoader, CFileMan& aFileMan,
+	CIntegrityServices::TFailType aFailType)
+	{
+	aPath.Append(KPathDelimiter);
+	
+	// Feed all the files for this node to the walk function
+	
+	TInt fileCount(iFiles.Count());
+	TInt i;
+	for (i = 0; i < fileCount; ++i)
+		{
+		CIntegrityTreeLeaf* leaf = iFiles[i];
+		if (leaf->Type() == aTypeFilter)
+			{
+			CIntegrityServices::SimulatePowerFailureL(aFailType, CIntegrityServices::EBeforeAction, leaf->Name());
+			aFunc(aPath, leaf, aFs, aLoader, aFileMan);
+			CIntegrityServices::SimulatePowerFailureL(aFailType, CIntegrityServices::EAfterAction, leaf->Name());
+			}
+		}
+	
+	// Walk the child nodes for this tree	
+	TInt len = aPath.Length();
+	TInt dirCount(iDirectories.Count());
+	for (i = 0; i < dirCount; ++i)
+		{
+		CIntegrityTreeNode* node = iDirectories[i];
+		aPath.SetLength(len);
+		aPath.Append(node->Name());
+		node->DoWalkTreeL(aPath, aFunc, aTypeFilter, aFs, aLoader, aFileMan, aFailType);
+		}
+	}
+	
+CIntegrityTreeNode::CIntegrityTreeNode()
+	{
+	}
+	
+void CIntegrityTreeNode::ConstructL(const TDesC& aDirectoryName)
+	{
+	iDirName = aDirectoryName.AllocL();
+	}
+	
+CIntegrityTreeNode::~CIntegrityTreeNode()
+	{
+	delete iDirName;
+	iDirectories.ResetAndDestroy();
+	iFiles.ResetAndDestroy();
+	}
+}//End of namespace Usif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/server/journal.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,646 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* CJournal implementation
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology
+*/
+
+#include "journal.h"
+#include "journalfile.h"
+#include "operationfunctions.h"
+#include "usiflog.h"
+#include <f32file.h>
+
+using namespace Usif;
+
+CJournal* CJournal::NewL(RFs& aFs, RLoader& aLoader, TStsTransactionId aTransactionID, const TDesC& aPath)
+	{
+	CJournal* self = CJournal::NewLC(aFs, aLoader, aTransactionID, aPath);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CJournal* CJournal::NewLC(RFs& aFs, RLoader& aLoader, TStsTransactionId aTransactionID, const TDesC& aPath)
+	{
+	CJournal* self = new(ELeave) CJournal(aFs, aLoader);
+	CleanupStack::PushL(self);
+	self->ConstructL(aTransactionID, aPath);
+	return self;
+	}
+
+CJournal::~CJournal()
+	{
+	iCompletedDrives.Reset();
+	iAllDrives.Reset();
+	iJournalFiles.ResetAndDestroy();
+	}
+
+CJournal::CJournal(RFs& aFs, RLoader& aLoader) : iFs(aFs), iLoader(aLoader)
+	{
+	}
+
+void CJournal::ConstructL(TStsTransactionId aTransactionID, const TDesC& aPath)
+	{
+	// construct the generic journal filename (does not include a drive)
+	CJournal::CreateJournalFileNameL(aTransactionID, aPath, iJournalFileName);
+	// construct the filename for the drives journal (located on the system drive)
+	CJournal::CreateDrvFileNameL(aTransactionID, aPath, iDriveArrayFileName);	
+	InitJournalsL();
+	}
+
+void CJournal::InitJournalsL()
+	{	
+	RefreshDrivesArrayL();
+	
+	// attempt to read the journals from all drives
+	
+	TInt drivesCount(iAllDrives.Count());
+	RBuf journal;
+	journal.CreateL(KMaxFileName);
+	CleanupClosePushL(journal);
+	for (TInt i = 0; i < drivesCount; ++i)
+		{
+		TDriveUnit drive(iAllDrives[i]);
+		journal = drive.Name();
+		journal.Append(iJournalFileName);
+
+		// do not load completed drives
+		if (iCompletedDrives.Find(drive) != KErrNotFound)
+			{
+			continue;
+			}
+		
+		CJournalFile* journalFile = NULL;
+		TRAPD(err, journalFile = CJournalFile::NewL(iFs, iLoader, journal, iAllDrives[i]));
+		
+		// ignore error'd drives. These will either not be rolled back,
+		// or the user will find out later we can't write or commit to them.
+		
+		if (err == KErrNone)
+			{
+			CleanupStack::PushL(journalFile);
+			iJournalFiles.AppendL(journalFile);
+			CleanupStack::Pop(journalFile);
+			}
+		}
+	CleanupStack::PopAndDestroy(&journal);
+	}
+
+TInt CJournal::FindJournalFileIndexL(TInt aDrive) const
+	{
+	for(TInt index = 0; index < iJournalFiles.Count(); ++index)
+		if (iJournalFiles[index]->Drive() == aDrive)
+			return index;
+		
+	return KErrNotFound;
+	}
+
+void CJournal::DeleteJournalFilesL()
+	{
+	// delete all journal files
+	for(TInt drive = 0; drive < iJournalFiles.Count(); drive++)
+		{		
+		DeleteJournalFileL(iJournalFiles[drive]->Drive());		
+		}	
+	iJournalFiles.ResetAndDestroy();
+	
+	// delete the drive array only after all journals have been completed
+	// (committed or rolled back)
+	if (iAllDrives.Count() == iCompletedDrives.Count())
+		{
+		DeleteDrivesFileL();
+		}
+	}
+
+void VerifyDirectoryDeletionErrorL(TInt err)
+	{
+	if(err != KErrNone && err != KErrNotFound && err != KErrPathNotFound && err != KErrInUse && err != KErrAccessDenied)
+		{
+		User::Leave(err);
+		}	
+	}
+
+
+void CJournal::DeleteJournalFileL(TInt aDrive, TBool aRecordAllRollbackEvents /* = ETrue */)
+	{	
+	TInt index = FindJournalFileIndexL(aDrive);
+	iJournalFiles[index]->Close();
+	TDriveUnit journalDrive(aDrive);
+	RBuf journal;
+	journal.CreateL(journalDrive.Name(), KMaxFileName);
+	CleanupClosePushL(journal);
+	journal.Append(iJournalFileName);
+
+	User::LeaveIfError(iFs.Delete(journal));
+
+	// record that we have completed this drive
+	if (aRecordAllRollbackEvents)
+		UpdateDrivesFileL(aDrive);
+		
+	iCompletedDrives.InsertInOrder(aDrive);
+	
+	VerifyDirectoryDeletionErrorL(iFs.RmDir(journal));
+	
+	CleanupStack::PopAndDestroy(&journal);
+	}
+	
+void CJournal::DeleteDrivesFileL()
+	{
+	iCompletedDrives.Reset();
+	TInt err = KErrNone;
+	
+	err = iFs.Delete(iDriveArrayFileName);
+			
+	if(err != KErrNone && err != KErrPathNotFound && err != KErrNotFound)
+		{
+		User::Leave(err);
+		}
+    
+    // try removing the journal path
+	TParse directory;
+	User::LeaveIfError(directory.SetNoWild(iDriveArrayFileName, NULL, NULL));
+	while(!directory.IsRoot())
+		{
+		// try to remove this directory
+		TInt err = iFs.RmDir(directory.DriveAndPath());
+		if(err != KErrNone)
+			{
+			VerifyDirectoryDeletionErrorL(err);
+			break;
+			}
+		User::LeaveIfError(directory.PopDir());
+		}
+	}
+
+// This function parses all the drives registered in the main drive file for this transaction.
+// This function also checks which drives have been completed.
+// As a result, two main drive sets: iCompletedDrives and iAllDrives are populated.
+void CJournal::RefreshDrivesArrayL()
+	{
+	// clear existing journal drive arrays prior to reloading them from file
+	iCompletedDrives.Reset();
+	iAllDrives.Reset();
+	
+	RFileReadStream journalStream;
+	TInt err = journalStream.Open(iFs, iDriveArrayFileName, EFileStream);
+	if (err == KErrNotFound || err == KErrPathNotFound)
+		return;
+	User::LeaveIfError(err);
+
+	CleanupClosePushL(journalStream);
+	while(ETrue)
+		{
+		// read the next entry in the drives' file
+		TInt drive = 0;
+		TRAP(err, drive = journalStream.ReadInt32L());
+		if (err == KErrEof)
+			break;
+		
+		User::LeaveIfError(err);
+
+		if(iAllDrives.Find(drive) == KErrNotFound)
+			{
+			// first instance indicates this drive was part of this
+			// transaction
+			iAllDrives.InsertInOrder(drive);
+			}
+		else
+			{
+			// second instance indicates this drive has been committed
+			// or rolled back
+			iCompletedDrives.InsertInOrder(drive);
+			}
+		}
+	CleanupStack::PopAndDestroy(&journalStream);
+	}
+
+void CJournal::UpdateDrivesFileL(TInt aDrive)
+	{
+	RFile file;
+	CleanupClosePushL(file);
+	// try opening the file if it already exists
+	TInt err = file.Open(iFs, iDriveArrayFileName, EFileWrite);
+	if (err != KErrNone)
+		{
+		if (err == KErrNotFound || err == KErrPathNotFound)
+			{
+			err = iFs.MkDirAll(iDriveArrayFileName);
+			if(err != KErrNone && err != KErrAlreadyExists)
+				{
+				User::Leave(err);
+				}
+			// journal does not exist, try creating one
+			User::LeaveIfError(file.Create(iFs, iDriveArrayFileName, EFileWrite));
+			}
+		else
+			{
+			User::Leave(err);
+			}
+		}
+	
+	TInt fileSize;
+	User::LeaveIfError(file.Size(fileSize));
+	
+	// attach to end of file for writing
+	RFileWriteStream stream;
+	stream.Attach(file, fileSize);	
+	CleanupStack::Pop(&file); // file ownership
+	CleanupClosePushL(stream);// transfered to stream
+	stream.WriteInt32L(aDrive);
+	CleanupStack::PopAndDestroy(&stream);
+	}
+
+void CJournal::StartCommitL()
+	{
+	DEBUG_PRINTF3(_L("CJournal::StartCommitL() - iJournalFileName %S   iDriveArrayFileName %S"), &iJournalFileName, &iDriveArrayFileName);							
+	// To commit, all drives must exist. No exceptions.
+	if (iJournalFiles.Count() != iAllDrives.Count())
+		{
+		User::Leave(KErrNotReady);
+		}
+		
+	// none of the drives must yet be completed...
+	if (iCompletedDrives.Count() != 0)
+		{
+		User::Leave(KErrNotSupported);
+		}
+		
+	// synch up all the drives
+	TInt drivesCount(iJournalFiles.Count());
+	for (TInt i = 0; i < drivesCount; ++i)
+		{
+ 		//Check if Journal drives are present.
+ 		TDriveInfo info;
+ 		if (iFs.Drive(info, iJournalFiles[i]->Drive())!=KErrNone || info.iType==EMediaNotPresent)
+ 			{
+ 			User::Leave(KErrNotReady);	
+ 			}
+		}		
+	}
+
+void CJournal::FinishCommitL()
+	{
+	DEBUG_PRINTF3(_L("CJournal::FinishCommitL() - iJournalFileName %S   iDriveArrayFileName %S"), &iJournalFileName, &iDriveArrayFileName);							
+	DeleteJournalFilesL();
+	
+	// return the journal to a state where it can be used again,
+	// in the insane event that someone wants to...
+	// (I'm looking at you sisregistry)
+	iCompletedDrives.Reset();
+	iAllDrives.Reset();
+	}
+
+void CJournal::FinishRollbackL(TInt aDrive, TBool aRecordAllRollbackEvents /* = ETrue */)
+	{
+	DEBUG_PRINTF4(_L("CJournal::FinishRollbackL() - iJournalFileName %S   iDriveArrayFileName %S   aDrive %d"), &iJournalFileName, &iDriveArrayFileName, aDrive);
+	DeleteJournalFileL(aDrive, aRecordAllRollbackEvents);
+	
+	if (iCompletedDrives.Count() == iAllDrives.Count())
+		{
+		DeleteDrivesFileL();
+		}
+	}
+
+// This function verifies whether a journal exists for this drive in this transaction.
+// If it doesn't, then the journal file is created and added to iJournalFiles
+TInt CJournal::PrepareToWriteL(TInt aDrive)
+	{	
+	TInt index = FindJournalFileIndexL(aDrive);
+	if (index >= 0) // The journal already exists
+		{
+		return index;
+		}
+	
+	__ASSERT_ALWAYS(index == KErrNotFound, User::Invariant());
+	// The journal does not exist - we need to create one
+	
+	TDriveUnit drive(aDrive);
+	RBuf journalPath;
+	journalPath.CreateL(drive.Name(), KMaxFileName);
+	CleanupClosePushL(journalPath);
+	journalPath.Append(iJournalFileName);
+
+	CJournalFile* journalFile = CJournalFile::NewLC(iFs, iLoader, journalPath, aDrive);
+	iJournalFiles.AppendL(journalFile);
+	CleanupStack::Pop(journalFile);
+	CleanupStack::PopAndDestroy(&journalPath);
+	
+	UpdateDrivesFileL(aDrive);
+	
+	User::LeaveIfError(iAllDrives.InsertInOrder(aDrive));
+
+	return iJournalFiles.Count() - 1; // Since we appended the entry, we return the last index
+	}
+	
+void CJournal::DeleteFilesL(TIntegrityServicesEvent aTypeFilter)
+	{
+	TInt journalsCount(iJournalFiles.Count());
+	for (TInt i = 0; i < journalsCount; ++i)
+		{
+		iJournalFiles[i]->JournalOperationL(IntegrityDeleteFileL, aTypeFilter, CIntegrityServices::EFailDeletingFile);
+		}
+	}
+	
+void CJournal::RestoreFilesL(TInt aDrive)
+	{
+	TInt index = FindJournalFileIndexL(aDrive);
+	User::LeaveIfError(index);
+	iJournalFiles[index]->JournalOperationL(IntegrityRestoreFileL, ERemovedFile, CIntegrityServices::EFailRestoringFile);
+	}
+		
+void CJournal::DeleteFilesL(TIntegrityServicesEvent aTypeFilter, TInt aDrive)
+	{
+	TInt index = FindJournalFileIndexL(aDrive);
+	User::LeaveIfError(index);
+	iJournalFiles[index]->JournalOperationL(IntegrityDeleteFileL, aTypeFilter, CIntegrityServices::EFailDeletingFile);
+	}
+
+void CJournal::WriteJournalEventL(TIntegrityServicesEvent aEvent)
+	{
+	// write the event to each journal file
+	for(TInt index = 0; index < iJournalFiles.Count(); index++)
+		{
+		iJournalFiles[index]->EventL(aEvent);
+		}
+	}
+	
+void CJournal::WriteJournalEventL(TIntegrityServicesEvent aEvent, TInt aDrive, TBool aSerializeEventToJournal)
+	{
+	TInt index = FindJournalFileIndexL(aDrive);
+	User::LeaveIfError(index);
+	iJournalFiles[index]->EventL(aEvent, aSerializeEventToJournal);
+	}
+
+void CJournal::AddL(const TDesC& aFileName)
+	{
+	DEBUG_PRINTF2(_L("CJournal::AddL() - aFileName %S"), &aFileName);							
+	// write the filename to the journal on the same drive
+	TInt drive = CJournalFile::CheckFileNameL(iFs, aFileName);
+	TInt index = PrepareToWriteL(drive);
+	iJournalFiles[index]->AddL(aFileName);
+	}
+
+void CJournal::RemoveL(const TDesC& aFileName, TDes& backupFileName)
+	{
+	DEBUG_PRINTF2(_L("CJournal::RemoveL() - aFileName %S"), &aFileName);							
+	// write the filename to the journal on the same drive
+	TInt drive = CJournalFile::CheckFileNameL(iFs, aFileName);
+	TInt index = PrepareToWriteL(drive);
+	iJournalFiles[index]->RemoveL(aFileName, backupFileName);
+	}
+
+void CJournal::TemporaryL(const TDesC& aFileName)
+	{
+	DEBUG_PRINTF2(_L("CJournal::TemporaryL() - aFileName %S"), &aFileName);							
+	// write the filename to the journal on the same drive
+	TInt drive = CJournalFile::CheckFileNameL(iFs, aFileName);
+	TInt index = PrepareToWriteL(drive);
+	iJournalFiles[index]->TemporaryL(aFileName);
+	}
+
+TIntegrityServicesEvent CJournal::LastEventL() const
+	{
+	TIntegrityServicesEvent lastEvent = ENone;
+	// work out the "real" last event
+	// journals states may be at different since they cannot all be written
+	// to simultaneously
+	for(TInt index = 0; index < iJournalFiles.Count(); index++)
+		{
+		TInt position = iCompletedDrives.Find(iJournalFiles[index]->Drive());
+		
+		if(position!=KErrNotFound) 
+			continue; //don't check completed drives
+		
+		TIntegrityServicesEvent currentJournalLastEvent = iJournalFiles[index]->LastEvent();
+		if (currentJournalLastEvent >= lastEvent)
+			lastEvent = currentJournalLastEvent;
+		}//for
+	return lastEvent;
+	}
+	
+TIntegrityServicesEvent CJournal::LastEventL(TInt aDrive) const
+	{
+	DEBUG_PRINTF2(_L("CJournal::LastEventL() - aDrive %d"), aDrive);							
+	TInt index = FindJournalFileIndexL(aDrive);
+	User::LeaveIfError(index);
+
+	return iJournalFiles[index]->LastEvent();
+	}
+
+/*static*/ void CJournal::CreateDrvFileNameL(TStsTransactionId aTransactionID, const TDesC& aPath, TDes& aDrvFileName)
+	{
+	DEBUG_PRINTF3(_L("CJournal::CreateDrvFileNameL() - aTransactionID %X aPath %S"), aTransactionID, &aPath);							
+	aDrvFileName = TDriveUnit(::RFs::GetSystemDrive()).Name();
+	aDrvFileName.Append(aPath);
+	aDrvFileName.AppendNumUC(static_cast<TUint32>(aTransactionID), EHex);
+	aDrvFileName.Append(KExtDelimiter);
+	aDrvFileName.Append(KDriveExt);
+	}
+
+/*static*/ void CJournal::CreateJournalFileNameL(TStsTransactionId aTransactionID, const TDesC& aPath, TDes& aJournalFileName)
+	{
+	aJournalFileName.Append(aPath);
+	aJournalFileName.AppendNumUC(static_cast<TUint32>(aTransactionID), EHex);
+	aJournalFileName.Append(KExtDelimiter);
+	aJournalFileName.Append(KJournalExt);
+	}
+
+/*static*/ TInt CJournal::RecoverTransactionIdFromDrvFileName(const TDesC& aDrvFileName, TStsTransactionId& aTransactionID)
+	{
+	TLex lex(aDrvFileName);
+	TUint32 tmp;
+	TInt result = lex.Val(tmp, EHex);
+	aTransactionID = static_cast<TStsTransactionId>(tmp);
+	return result;
+	}
+
+void CJournal::RollBackDriveL(TInt aDrive, TBool aRecordAllRollbackEvents)
+	{
+	switch (LastEventL())
+		{
+		// Transaction did not complete, rollback required
+		case ERemovedFile:
+		case EBackupFile:
+		case ETempFile:
+		case EAddedFile:
+		case EAddedFilesRemoved:
+		case ERemovedFilesRestored:
+			// rollback this individual journal from where it last got to.
+			switch (LastEventL(aDrive))
+				{
+			case ERemovedFile:
+			case EBackupFile:
+			case ETempFile:
+			case EAddedFile:
+				DeleteFilesL(EAddedFile, aDrive);
+				
+				CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailNewFilesRemoved, CIntegrityServices::EBeforeJournal, KNullDesC);				
+				WriteJournalEventL(EAddedFilesRemoved, aDrive, aRecordAllRollbackEvents);
+				CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailNewFilesRemoved, CIntegrityServices::EAfterJournal, KNullDesC);
+				
+			// fall-through - automatically proceed to the next state, we'll start from EAddedFilesRemoved in case the RestoreFileL has failed
+			case EAddedFilesRemoved:
+				RestoreFilesL(aDrive);				
+				CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailOldFilesRestored, CIntegrityServices::EBeforeJournal, KNullDesC);			
+				WriteJournalEventL(ERemovedFilesRestored, aDrive, aRecordAllRollbackEvents);
+				CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailOldFilesRestored, CIntegrityServices::EAfterJournal, KNullDesC);
+
+			// fall-through - automatically proceed to the next state
+			case ERemovedFilesRestored:				
+				DeleteFilesL(ETempFile, aDrive);
+				
+				CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailTempFilesRemoved, CIntegrityServices::EBeforeJournal, KNullDesC);				
+				WriteJournalEventL(ETempFilesRemoved, aDrive, aRecordAllRollbackEvents);
+				CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailTempFilesRemoved, CIntegrityServices::EAfterJournal, KNullDesC);
+				break;
+				
+			case ETempFilesRemoved:
+				break;
+		
+			// nothing was done, just delete the journal file
+			case ENone:
+				break;
+		
+			// Erk! Bad state, bad state!
+			default:
+				User::Leave(KErrCorrupt);
+				break;
+				}
+			break;
+			
+		// Transaction complete, just need to remove the backup
+		case ECommitted:
+		case EBackupFilesRemoved:
+			switch (LastEventL(aDrive))
+				{
+			// At least one journal had a complete transaction...
+			// roll forwards all journal files.
+			case ERemovedFile:
+			case EBackupFile:
+			case ETempFile:
+			case EAddedFile:
+			case ECommitted:
+				DeleteFilesL(EBackupFile, aDrive);
+			
+				CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailBackupFilesRemoved, CIntegrityServices::EBeforeJournal, KNullDesC);			
+				WriteJournalEventL(EBackupFilesRemoved, aDrive, aRecordAllRollbackEvents);
+				CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailBackupFilesRemoved, CIntegrityServices::EAfterJournal, KNullDesC);
+
+				//fall-through - automatically proceed to the next state
+			case EBackupFilesRemoved:				
+				DeleteFilesL(ETempFile, aDrive);
+			
+				CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailTempFilesRemoved, CIntegrityServices::EBeforeJournal, KNullDesC);
+				WriteJournalEventL(ETempFilesRemoved, aDrive, aRecordAllRollbackEvents);
+				CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailTempFilesRemoved, CIntegrityServices::EAfterJournal, KNullDesC);
+				break;
+							
+			case ETempFilesRemoved:
+				break;
+		
+			// nothing was done, just delete the journal file
+			case ENone:
+				break;
+		
+			// unknown state	
+			default:
+				User::Leave(KErrCorrupt);
+				break;
+				}
+			break;
+			
+		case ETempFilesRemoved:
+			break;
+		
+		// nothing was done, just delete the journal file
+		case ENone:
+			break;
+		
+		// unknown state	
+		default:
+			User::Leave(KErrCorrupt);
+			break;
+		}
+		
+	FinishRollbackL(aDrive, aRecordAllRollbackEvents);
+	}
+
+void CJournal::CommitL()
+	{
+	StartCommitL();
+	
+	CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailInstallComplete, CIntegrityServices::EBeforeJournal, KNullDesC);
+	WriteJournalEventL(ECommitted);
+	CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailInstallComplete, CIntegrityServices::EAfterJournal, KNullDesC);
+	
+	DeleteFilesL(EBackupFile);
+	
+	CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailBackupFilesRemoved, CIntegrityServices::EBeforeJournal, KNullDesC);
+	WriteJournalEventL(EBackupFilesRemoved);
+	CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailBackupFilesRemoved, CIntegrityServices::EAfterJournal, KNullDesC);
+	
+	DeleteFilesL(ETempFile);
+	
+	CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailTempFilesRemoved, CIntegrityServices::EBeforeJournal, KNullDesC);
+	WriteJournalEventL(ETempFilesRemoved);
+	CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailTempFilesRemoved, CIntegrityServices::EAfterJournal, KNullDesC);
+	
+	FinishCommitL();
+	}
+
+void CJournal::RollBackL(TBool aRecordAllRollbackEvents /*= ETrue*/)
+	{
+#ifdef __WINSCW__
+	// For 2 minutes after initial boot, DLLs are not unloaded. If we are doing a
+	// rollback, we need to make sure any pending unloadeds are actioned, otherwise a
+	// previously loaded DLL could cause the rollback to fail on windows (on arm it is legal to
+	// delete a loaded DLL/EXE, whilst on windows it is not).
+	RLoader loader;
+	TInt r = loader.Connect();
+	if(r == KErrNone)
+		{
+		(void)loader.CancelLazyDllUnload();
+		loader.Close();
+		}
+#endif
+	
+	for(TInt index = 0; index < iJournalFiles.Count(); index++)
+		{
+		TDriveUnit drive = iJournalFiles[index]->Drive();
+		// check to see if this drive has already been completed
+		if(iCompletedDrives.Find(drive) != KErrNotFound)
+			continue;
+			
+		// only attempt to recover writeable drives that are present
+		TDriveInfo info;
+		User::LeaveIfError(iFs.Drive(info, drive));
+		if (info.iMediaAtt & KMediaAttWriteProtected || info.iType==EMediaNotPresent)
+			continue;
+
+		TRAPD(err, RollBackDriveL(drive, aRecordAllRollbackEvents));
+		if(err != KErrNone && err != KErrPathNotFound && err != KErrNotFound
+			&& err != KErrNotReady)
+			{
+			// unexpected error
+			User::Leave(err);
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/server/journalfile.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,402 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* CJournalFile implementation
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology
+*/
+
+#include "journalfile.h"
+#include "usiflog.h"
+
+_LIT(KBackupExt, "bak"); // extension for removed files in backup location
+
+namespace Usif
+{
+CJournalFile* CJournalFile::NewL(RFs& aFs, RLoader& aLoader, const TDesC& aFileName, TInt aDrive)
+	{
+	CJournalFile* self = CJournalFile::NewLC(aFs, aLoader, aFileName, aDrive);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CJournalFile* CJournalFile::NewLC(RFs& aFs, RLoader& aLoader, const TDesC& aFileName, TInt aDrive)
+	{
+	CJournalFile* self = new(ELeave) CJournalFile(aFs, aLoader, aDrive);
+	CleanupStack::PushL(self);
+	self->ConstructL(aFileName);
+	return self;
+	}
+
+CJournalFile::CJournalFile(RFs& aFs, RLoader& aLoader, TInt aDrive) 
+	: iFs(aFs), iLoader(aLoader), iLastEvent(ENone), iDrive(aDrive)
+	{
+	}
+
+CJournalFile::~CJournalFile()
+	{
+	iWriteStream.Close();
+	delete iTreeRoot;
+	}
+
+void CJournalFile::ConstructL(const TDesC& aFileName)
+	{
+	DEBUG_PRINTF2(_L("CJournalFile::ConstructL() - aFileName %S"), &aFileName);							
+	iJournalFileName = aFileName;
+	
+	TChar drive;
+	User::LeaveIfError(iFs.DriveToChar(iDrive, drive));
+	
+	TBuf<2> driveSpec;
+	driveSpec.Append(drive);
+	driveSpec.Append(KDriveDelimiter);
+	iTreeRoot = CIntegrityTreeNode::NewL(driveSpec);
+	
+	// read any existing entries from this journal
+	TRAPD(err, ReadL());
+	if(err != KErrNone)
+		{
+		DEBUG_PRINTF2(_L("CJournalFile::ConstructL() - CJournalFile::ReadL() has left with error %d"), err);							
+		// if necessary create the path
+		if(err == KErrPathNotFound)
+			{
+			User::LeaveIfError(iFs.MkDirAll(iJournalFileName));
+			}
+		else if (err != KErrNotFound)
+			{
+			DEBUG_PRINTF2(_L("CJournalFile::ConstructL() - Leaving with error %d"), err);							
+			User::Leave(err);
+			}
+		}
+	// now prepare for writing
+	PrepareToWriteL();
+	}
+
+void CJournalFile::ReadL()
+	{
+	RFileReadStream journalStream;
+	User::LeaveIfError(journalStream.Open(iFs, iJournalFileName, EFileRead | EFileShareAny));
+	CleanupClosePushL(journalStream);
+	
+	// we need to check that any filenames read from the journal are on the
+	// same drive as the journal itself
+	TDriveUnit journalDrive(iJournalFileName);
+	
+	TInt err = KErrNone;
+	while(err == KErrNone)
+		{
+		// read the next journal entry
+		TRAP(err, ReadEntryL(journalStream, journalDrive));
+		if(err != KErrNone && err != KErrEof)
+			{
+			DEBUG_PRINTF2(_L("CJournalFile::ReadL() - CJournalFile::ReadEntryL() has left with error %d Leaving with this error!"), err);							
+			User::Leave(err);
+			}
+		}
+	CleanupStack::PopAndDestroy(&journalStream);
+	}
+
+void VerifyIsFileEventL(TIntegrityServicesEvent aEvent)
+	{
+	if (aEvent != ERemovedFile &&
+		aEvent != ETempFile && aEvent != EAddedFile)
+		{
+		User::Leave(KErrCorrupt);
+		}	
+	}
+
+void VerifyIsEmptyOrFileEventL(TIntegrityServicesEvent aEvent)
+	{
+	if (aEvent == ENone)
+		return;
+
+	VerifyIsFileEventL(aEvent);
+	}
+
+void CJournalFile::ReadEntryL(RFileReadStream& aJournalStream, TInt aDrive)
+	{
+	TIntegrityServicesEvent event = static_cast<TIntegrityServicesEvent> (aJournalStream.ReadInt32L());
+	
+	HBufC* removedFile = NULL;
+	HBufC* backupFile = NULL;
+	HBufC* tempFile = NULL;
+	HBufC* addedFile = NULL;
+	
+	switch(event)
+		{
+		case ERemovedFile:
+			{
+			VerifyIsEmptyOrFileEventL(iLastEvent);
+			removedFile = HBufC::NewLC(aJournalStream, KMaxFileName);
+			// should be followed by the backup event
+			if(aJournalStream.ReadInt32L() != EBackupFile)
+				{
+				User::Leave(KErrCorrupt);
+				}
+			backupFile = HBufC::NewLC(aJournalStream, KMaxFileName);
+			// make sure files are located on the same drive as the journal
+			if(CJournalFile::CheckFileNameL(iFs, *removedFile) != aDrive 
+				|| CJournalFile::CheckFileNameL(iFs, *backupFile) != aDrive)
+				{
+				User::Leave(KErrCorrupt);
+				}
+	
+			CIntegrityTreeLeaf* removeLeaf = iTreeRoot->AddNodeL(*removedFile, ERemovedFile, iJournalFileName);
+			CIntegrityTreeLeaf* backupLeaf = iTreeRoot->AddNodeL(*backupFile, EBackupFile, iJournalFileName);
+
+			removeLeaf->SetPeer(backupLeaf);
+			backupLeaf->SetPeer(removeLeaf);
+
+			CleanupStack::PopAndDestroy(backupFile);
+			CleanupStack::PopAndDestroy(removedFile);
+			iBackupFilesCount++;
+			iLastEvent = ERemovedFile;
+			}
+			break;
+			
+		case EBackupFile:
+			// cannot have a backup file on its own
+			User::Leave(KErrCorrupt);
+			break;
+			
+		case ETempFile:
+			VerifyIsEmptyOrFileEventL(iLastEvent);
+			
+			tempFile = HBufC::NewLC(aJournalStream, KMaxFileName);
+			// make the file is located on the same drive as the journal
+			if(CJournalFile::CheckFileNameL(iFs, *tempFile) != aDrive)
+				{
+				User::Leave(KErrCorrupt);
+				}
+			iTreeRoot->AddNodeL(*tempFile, ETempFile, iJournalFileName);
+			CleanupStack::PopAndDestroy(tempFile);
+			iLastEvent = ETempFile;
+			break;
+			
+		case EAddedFile:
+			VerifyIsEmptyOrFileEventL(iLastEvent);
+			
+			addedFile = HBufC::NewLC(aJournalStream, KMaxFileName);
+			// make the file is located on the same drive as the journal
+			if(CJournalFile::CheckFileNameL(iFs, *addedFile) != aDrive)
+				{
+				User::Leave(KErrCorrupt);
+				}
+			iTreeRoot->AddNodeL(*addedFile, EAddedFile, iJournalFileName);
+			CleanupStack::PopAndDestroy(addedFile);
+			iLastEvent = EAddedFile;
+			break;
+			
+		case ECommitted:
+			VerifyIsFileEventL(iLastEvent);
+				
+			iLastEvent = ECommitted;
+			break;
+			
+		case EBackupFilesRemoved:
+			if(iLastEvent != ECommitted)
+				{
+				User::Leave(KErrCorrupt);
+				}
+			iLastEvent = EBackupFilesRemoved;
+			break;
+			
+		case EAddedFilesRemoved:
+			if(iLastEvent != ECommitted)
+				VerifyIsFileEventL(iLastEvent); // The last event can be only a commit, or one of the file events
+
+			iLastEvent = EAddedFilesRemoved;
+			break;
+			
+		case ETempFilesRemoved:
+			if(iLastEvent != EBackupFilesRemoved && iLastEvent != ERemovedFilesRestored)
+				{
+				User::Leave(KErrCorrupt);
+				}
+			iLastEvent = ETempFilesRemoved;
+			break;
+			
+		case ERemovedFilesRestored:
+			if(iLastEvent != EAddedFilesRemoved)
+				{
+				User::Leave(KErrCorrupt);
+				}
+			iLastEvent = ERemovedFilesRestored;
+			break;
+			
+		default:
+			User::Leave(KErrCorrupt);
+			break;
+   		}
+	}
+
+void CJournalFile::PrepareToWriteL()
+	{
+	DEBUG_PRINTF2(_L("CJournalFile::PrepareToWriteL() iJournalFileName %S"), &iJournalFileName);							
+	RFile file;
+	CleanupClosePushL(file);
+	// try opening the journal if it already exists
+	TEntry entry;
+	TBool journalFileExists = (iFs.Entry(iJournalFileName, entry) == KErrNone);
+	if (journalFileExists)
+		{
+		User::LeaveIfError(file.Open(iFs, iJournalFileName, EFileWrite | EFileShareAny));
+		}
+	else
+		{
+		// journal does not exist, try creating one
+		User::LeaveIfError(file.Create(iFs, iJournalFileName, EFileWrite | EFileShareAny));
+		}
+	
+	TInt fileSize;
+	User::LeaveIfError(file.Size(fileSize));
+	
+	// attach to end of file for writing
+	iWriteStream.Attach(file, fileSize);
+	CleanupStack::Pop(&file); // file ownership transfered to stream
+	}
+
+void CJournalFile::EventL(TIntegrityServicesEvent aEvent, TBool aSerializeEventToJournal /* = ETrue*/ )
+	{
+	DEBUG_PRINTF2(_L("CJournalFile::EventL() - aEvent %d"), aEvent);							
+	if (aSerializeEventToJournal)
+		{
+		iWriteStream.WriteInt32L(static_cast<TInt> (aEvent));
+		iWriteStream.CommitL();
+		}
+	
+	iLastEvent = aEvent;
+	}
+
+void CJournalFile::AddL(const TDesC& aFileName)
+	{
+	DEBUG_PRINTF2(_L("CJournalFile::AddL() - aFileName %S"), &aFileName);							
+	iTreeRoot->AddNodeL(aFileName, EAddedFile, iJournalFileName);
+
+	// write filename to journal
+	iWriteStream.WriteInt32L(static_cast<TInt> (EAddedFile));
+	iWriteStream << aFileName;
+	iWriteStream.CommitL();
+	
+	iLastEvent = EAddedFile;
+	}
+
+void CJournalFile::RemoveL(const TDesC& aFileName, TDes& aBackupFileName)
+	{
+	DEBUG_PRINTF2(_L("CJournalFile::RemoveL() - aFileName %S"), &aFileName);							
+	// Only journal removals if the file hasn't been added in the same
+	// journalfile.
+	TInt err = iTreeRoot->FindNode(aFileName, EAddedFile);
+	if (err == KErrNotFound)
+		{
+		CIntegrityTreeLeaf* removalNode = iTreeRoot->AddNodeL(aFileName, ERemovedFile, iJournalFileName);
+
+		// generate the next backup filename for this journal
+		NextBackupFileNameL(aBackupFileName);
+	
+		CIntegrityTreeLeaf* backupNode = iTreeRoot->AddNodeL(aBackupFileName, EBackupFile, iJournalFileName);
+	
+		// set peers on both nodes
+		removalNode->SetPeer(backupNode);
+		backupNode->SetPeer(removalNode);
+		
+		// write filenames to journal
+		iWriteStream.WriteInt32L(static_cast<TInt> (ERemovedFile));
+		iWriteStream << aFileName;
+		iWriteStream.WriteInt32L(static_cast<TInt> (EBackupFile));
+		iWriteStream << aBackupFileName;
+		iWriteStream.CommitL();
+	
+		iLastEvent = ERemovedFile;
+		}
+	else
+		{
+		User::LeaveIfError(err);
+		}
+	}
+	
+void CJournalFile::TemporaryL(const TDesC& aFileName)
+	{
+	DEBUG_PRINTF2(_L("CJournalFile::TemporaryL() - aFileName %S"), &aFileName);							
+	iTreeRoot->AddNodeL(aFileName, ETempFile, iJournalFileName);
+	
+	// write filename to journal
+	iWriteStream.WriteInt32L(static_cast<TInt> (ETempFile));
+	iWriteStream << aFileName;
+	iWriteStream.CommitL();
+	
+	iLastEvent = ETempFile;
+	}
+	
+void CJournalFile::JournalOperationL(TTreeWalkFunctionL aFunc, TIntegrityServicesEvent aTypeFilter,
+	CIntegrityServices::TFailType aFailType)
+	{
+	CFileMan* fileman = CFileMan::NewL(iFs);
+	CleanupStack::PushL(fileman);
+	iTreeRoot->WalkTreeL(aFunc, aTypeFilter, iFs, iLoader, *fileman, aFailType);
+	CleanupStack::PopAndDestroy(fileman);
+	}
+
+void CJournalFile::NextBackupFileNameL(TDes& aBackupFileName)
+	{
+	TParsePtrC fileNamePtr(iJournalFileName);
+	aBackupFileName = fileNamePtr.DriveAndPath();
+	aBackupFileName.Append(fileNamePtr.Name());
+	aBackupFileName.Append(KPathDelimiter);
+	aBackupFileName.AppendNumUC(iBackupFilesCount, EHex);
+	aBackupFileName.Append(KExtDelimiter);
+	aBackupFileName.Append(KBackupExt);
+	
+	iBackupFilesCount++;
+	}
+
+
+TIntegrityServicesEvent CJournalFile::LastEvent() const
+	{
+	return iLastEvent;
+	}
+
+TInt CJournalFile::Drive()
+	{
+	return iDrive;
+	}
+	
+void CJournalFile::Close()
+	{
+	iWriteStream.Close();
+	}
+
+/*static*/ TInt CJournalFile::CheckFileNameL(RFs&, const TDesC& aFileName)
+	{
+	TParse parse;
+
+	User::LeaveIfError(parse.Set(aFileName, NULL, NULL));
+
+	if (!parse.DrivePresent())
+		User::Leave(KErrArgument);
+	
+	if (!parse.PathPresent())
+		User::Leave(KErrArgument);	
+	
+	TDriveUnit drive(parse.Drive());
+	return drive;
+	}
+}//End of namespace Usif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/server/operationfunctions.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,139 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file 
+ @released
+ @internalTechnology
+*/
+
+#include "operationfunctions.h"
+
+#include "integritytree.h"
+
+namespace Usif
+{
+
+void VerifyDeletionErrorL(TInt err)
+	{
+	if (err != KErrNone && err != KErrNotFound && err != KErrPathNotFound)
+		User::Leave(err);
+	}
+
+void IntegrityDeleteFileL(const TDesC& aPath, CIntegrityTreeLeaf* aLeaf, RFs& aFs, 
+							   RLoader& aLoader, CFileMan& aFileMan)
+	{
+	RBuf name;
+	name.CreateL(aPath, KMaxFileName);
+	CleanupClosePushL(name);
+	name.Append(aLeaf->Name());
+
+	TEntry entry;
+	TInt err = aFs.Entry(name, entry);
+	if (err == KErrNone)
+		{
+		aFs.SetAtt(name, 0, KEntryAttReadOnly);
+		if(entry.IsDir())
+			{
+			// Make sure to append slash before calling RmDir - otherwise it deletes the parent directory			
+			if (name[name.Length()-1] != KPathDelimiter) 
+	  			{
+  				name.Append(KPathDelimiter);
+  				}
+			User::LeaveIfError(aFileMan.RmDir(name));
+			}
+		else
+			{
+			User::LeaveIfError(aLoader.Delete(name));
+			}
+			
+		// prune the directory tree if possible
+		RemoveDirectoryTreeL(aFs, name);
+		}
+	else
+		{
+		VerifyDeletionErrorL(err);
+		}
+	CleanupStack::PopAndDestroy(&name);
+	}
+
+void IntegrityRestoreFileL(const TDesC& aPath, CIntegrityTreeLeaf* aLeaf, RFs& aFs, 
+								RLoader& /*aLoader*/, CFileMan& /*aFileMan*/)
+	{
+	RBuf name;
+	name.CreateL(aPath, KMaxFileName);
+	CleanupClosePushL(name);
+	name.Append(aLeaf->Name());
+
+	// find the peer file, and check it's a backup.
+	CIntegrityTreeLeaf* peer = aLeaf->Peer();
+	if (peer->Type() != EBackupFile)
+		{
+		User::Leave(KErrCorrupt);
+		}
+	
+	TParsePtrC parse(peer->Journal());
+	RBuf backup;
+	backup.CreateL(parse.DriveAndPath(), KMaxFileName);
+	CleanupClosePushL(backup);
+	backup.Append(parse.Name());
+	backup.Append(KPathDelimiter);
+	backup.Append(peer->Name());
+
+	TInt err = aFs.MkDirAll(name);
+	if(err != KErrNone && err != KErrAlreadyExists)
+		{
+		User::Leave(err);
+		}
+			
+	err = aFs.Rename(backup, name);
+	if (err != KErrNone)
+		{
+		VerifyDeletionErrorL(err);
+		// we may have already moved it back during a previous recovery
+		// attempt, check for its presence in the original location
+		TEntry restoredEntry;
+		User::LeaveIfError(aFs.Entry(name, restoredEntry));
+		}
+	else
+		{
+		// prune the backup directory tree if possible.
+		RemoveDirectoryTreeL(aFs, backup);
+		}
+	CleanupStack::PopAndDestroy(2, &name);	// backup
+	}
+	
+void RemoveDirectoryTreeL(RFs& aFs, const TDesC& aFileName)
+	{
+	TParse directory;
+	User::LeaveIfError(directory.SetNoWild(aFileName, NULL, NULL));
+	while(!directory.IsRoot())
+		{
+		// try to remove this directory
+		TInt err = aFs.RmDir(directory.DriveAndPath());
+		if(err == KErrInUse || err == KErrAccessDenied)
+			{
+			break;
+			}
+		VerifyDeletionErrorL(err);		
+		// move to deleted directory's parent
+		User::LeaveIfError(directory.PopDir());
+		}	
+	}
+
+} // end namespace Usif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/server/startup.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,55 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Executable entrypoint and server object factory function. The latter
+* is supplied to the SCS boilerplate code which starts up the server.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#include "stsserver.h"
+#include <scs/scsserver.h>
+
+using namespace Usif;
+
+	static CScsServer* NewStsServerLC()
+/**
+	This factory function is called by SCS framework.  It allocates
+	the Sts Server object and leaves it on the cleanup stack.
+
+	@return		New initialized instance of CStsServer.
+				On return this is on the cleanup stack.
+ */
+	{
+	return static_cast<CScsServer*>(CStsServer::NewLC());
+	}
+
+
+GLDEF_C TInt E32Main()
+/**
+	Executable entrypoint. Calls the SCS boilerplate code which starts the SCR server
+	and does not return until the server shuts down.
+
+	@return	Symbian OS error code where KErrNone indicates success 
+			and any other value indicates failure.
+ */
+	{
+	return StartScsServer(NewStsServerLC);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/server/stsserver.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,271 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements CStsServer.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#include "stsserver.h"
+#include "stsserversession.h"
+#include "usiflog.h"
+#include <scs/securityutils.h>
+
+namespace Usif
+{
+static const TUint stsServerRangeCount = 5;
+
+static const TInt stsServerRanges[stsServerRangeCount] =
+	{
+	0,							                                      //Range 0 - 0 to EBaseSession-1. Not used.
+	CScsServer::EBaseSession,	                                      //Range 1 - EBaseSession to (EBaseSession+ERegisterNew)-1. ==> from ECreateTransaction to EGetId inclusive
+	CScsServer::EBaseSession|static_cast<TInt>(ERegisterNew),         //Range 2 - (EBaseSession+ERegisterNew) to (EBaseSession+ERollBackAllPending)-1 ==> from ERegisterNew to EOverwrite inclusive
+	CScsServer::EBaseSession|static_cast<TInt>(ERollBackAllPending),  //Range 3 - (EBaseSession+ERollBackAllPending) to ((EBaseSession+ERollBackAllPending)+1)-1==> only ERollBackAllPending
+	CScsServer::EBaseSession|static_cast<TInt>(ERollBackAllPending)+1 //Range 4 - (EBaseSession+ERollBackAllPending)+1 to KMaxTInt inclusive  (i.e: ScsImpl::EPreCloseSession)
+	};
+
+static const TUint8 stsServerElementsIndex[stsServerRangeCount] =
+	{
+	CPolicyServer::ENotSupported, // Range 0 : is not supported.
+	CPolicyServer::EAlwaysPass,   // Range 1
+	CPolicyServer::ECustomCheck,  // Range 2 : custom check will be made made for each function to see if client is authorised to do that
+	0,                            // Range 3 : Can only be issued by KUidDaemon
+	CPolicyServer::EAlwaysPass    // Range 4
+	};							
+
+static const CPolicyServer::TPolicyElement stsServerElements[] =
+	{
+	{_INIT_SECURITY_POLICY_S0(KUidDaemon), CPolicyServer::EFailClient}, //special handling of function ERollBackAllPending 
+	};
+
+static const CPolicyServer::TPolicy stsServerPolicy =
+	{
+	CPolicyServer::EAlwaysPass, // Allow all connects
+	stsServerRangeCount,
+	stsServerRanges,
+	stsServerElementsIndex,
+	stsServerElements,
+	};
+
+//
+//CStsServer
+//
+
+CStsServer::CStsServer()
+/**
+	Intializes the STS server object with its version and policy.
+ */
+	:	CScsServer(TVersion(KStsVerMajor, KStsVerMinor, KStsVerBuild),stsServerPolicy)
+		{
+		//empty
+		}
+
+CStsServer::~CStsServer()
+/**
+	Destructor. Cleanup the STS server.
+ */
+	{
+	iTransactionWrapperContainer.ResetAndDestroy();
+	}
+	
+	
+CStsServer* CStsServer::NewLC()
+/**
+	Factory function allocates new, initialized instance of CStsServer.
+
+	@return		New, initialized instance of CStsServer
+				which is left on the cleanup stack.
+ */
+	{
+	CStsServer *so = new (ELeave) CStsServer();
+	CleanupStack::PushL(so);
+	so->ConstructL();
+	return so;
+	}
+
+
+void CStsServer::ConstructL()
+/**
+	Second phase constructor starts the STS server.
+ */
+	{
+	// Roll back all previous transactions in case the STS process died unexpectedly
+	// Note: error returned from RollBackAllPendingL() is ignored at this point to prevent STS server startup from failing
+	// It is important to roll back before calling CScsServer::ConstructL as the roll back may be longer than the shutdown period for the timer started by that function
+	TRAP_IGNORE(RollBackAllPendingL());
+	
+	CScsServer::ConstructL(KStsServerShutdownPeriod); 
+		
+	StartL(KStsServerName);
+	}
+
+
+CScsSession* CStsServer::DoNewSessionL(const RMessage2& aMessage)
+/**
+	Implement CStsServer by allocating a new instance of CStsServerSession.
+
+	@param	aMessage	Standard server-side handle to message.
+	@return				New instance of CStsServerSession which is owned by the caller.
+ */
+	{
+	return CStsServerSession::NewL(*this, aMessage);
+	}
+
+void CStsServer::RollBackAllPendingL()
+/**
+	Rolls back all pending transactions that have persistent information stored in the transaction
+	path in the file system.
+	Important note: this function can only be invoked if there are no active transactions in the server as it is
+	not intended to roll back active transactions. (ie: intended to be invoked at boot-up time and STS start up only) 
+ */
+	{
+	if(iTransactionWrapperContainer.Count()!=0) 
+		{
+		User::Leave(KErrInUse); //there can be no active transaction when this function is invoked 
+		}
+	CIntegrityServices::RollbackAllL();
+	}
+
+TInt TransactionWrapperLinearOrderByIdKey(const TStsTransactionId *id, const CReferenceCountedTransactionWrapper &aSecond)
+	{
+	return *id-aSecond.TransactionId();
+	}
+
+TInt TransactionWrapperLinearOrder(const CReferenceCountedTransactionWrapper &aFirst, const CReferenceCountedTransactionWrapper &aSecond)
+	{
+	return aFirst.TransactionId()-aSecond.TransactionId();
+	}
+
+TStsTransactionId CStsServer::CreateTransactionID()
+	{
+	TTime currentTime;
+	TStsTransactionId transactionID;
+	do
+		{
+		currentTime.UniversalTime();
+		transactionID = I64LOW(currentTime.Int64());
+		}
+    while(IsExistingTransaction(transactionID));
+    return transactionID;
+	}
+
+TBool CStsServer::IsExistingTransaction(TStsTransactionId aTransactionID)
+	{
+	return (FindActiveTransaction(aTransactionID)>=0);
+	} 
+
+CIntegrityServices* CStsServer::CreateTransactionL()
+	{
+	TStsTransactionId id = CreateTransactionID();
+	CReferenceCountedTransactionWrapper* wrapper = CReferenceCountedTransactionWrapper::NewLC(id);
+	iTransactionWrapperContainer.InsertInOrderL(wrapper, TLinearOrder<CReferenceCountedTransactionWrapper>(&TransactionWrapperLinearOrder));
+	CleanupStack::Pop(wrapper);
+	return wrapper->Attach();
+	}
+
+CIntegrityServices* CStsServer::AttachTransactionL(TStsTransactionId aTransactionID)
+	{
+	TInt pos=FindActiveTransaction(aTransactionID);
+	if(pos>=0) //joining an existing active transaction
+		{
+		return iTransactionWrapperContainer[pos]->Attach();
+		}
+	User::Leave(KErrNotFound);
+	return 0;
+	}
+
+void CStsServer::ReleaseTransactionL(CIntegrityServices* &aTransactionPtr, TBool aMarkAsCompleted /*=EFalse*/)
+	{
+	__ASSERT_DEBUG(aTransactionPtr, User::Invariant());
+	TInt pos=FindActiveTransaction(aTransactionPtr->TransactionId());
+	__ASSERT_DEBUG(pos>=0, User::Invariant());
+	CReferenceCountedTransactionWrapper* wrapper=iTransactionWrapperContainer[pos];
+	if(aMarkAsCompleted)
+		wrapper->SetCompleted(); //set transaction as completed (this should be done after a succesful commit or rollback) 
+	TInt refCount=wrapper->Detach();
+	__ASSERT_DEBUG(refCount>=0, User::Invariant());
+	if(refCount==0) 
+		{
+		if(!wrapper->IsCompleted()) //do an auto roll back if and only if the transaction has not been committed or rolled-back previously
+			aTransactionPtr->RollBackL();
+		delete wrapper;
+		iTransactionWrapperContainer.Remove(pos);
+		}
+	aTransactionPtr=0;
+	}
+/*
+ This function is a slight optimization of CStsServer::ReleaseTransactionL() as it is intended to be called
+ on cleanup of a committed or rolled-back transaction that obviously don't need auto rollbak again.
+ */
+void CStsServer::FinaliseTransactionL(CIntegrityServices* &aTransactionPtr)
+	{
+	ReleaseTransactionL(aTransactionPtr, ETrue);
+	}
+
+TInt CStsServer::FindActiveTransaction(TStsTransactionId aTransactionID)
+	{
+	return iTransactionWrapperContainer.FindInOrder(aTransactionID, &TransactionWrapperLinearOrderByIdKey);
+	}
+
+CPolicyServer::TCustomResult CStsServer::CustomSecurityCheckL(const RMessage2& aMsg, TInt& /*aAction*/, TSecurityInfo& /*aMissing*/)		
+	{
+	TInt functionId(StripScsFunctionMask(aMsg.Function()));
+	CPolicyServer::TCustomResult ret(EFail);
+		
+	switch(functionId)
+		{
+		case ERegisterNew:
+		case ECreateNew:
+		case ERemove:
+		case ERegisterTemporary:
+		case ECreateTemporary:
+		case EOverwrite:
+			ret = CheckIfFileModificationAllowedL(aMsg)? EPass : EFail;
+			break;
+		}
+	return ret;
+	}
+
+/*static*/TBool CStsServer::CheckIfFileModificationAllowedL(const RMessage2& aMsg)
+	{
+	RBuf filePath;
+	filePath.CreateL(KMaxFileName);
+	filePath.CleanupClosePushL();
+	aMsg.ReadL(KFilePathIPCSlot, filePath, 0);
+
+	// Retrieve the required capabilities for write access to this path
+	TCapabilitySet requiredCapabilities = SecCommonUtils::FileModificationRequiredCapabilitiesL(filePath, aMsg.SecureId());
+	
+	TBool result = EFalse;
+	TBool allFilesRequired = requiredCapabilities.HasCapability(ECapabilityAllFiles);
+	TBool tcbRequired = requiredCapabilities.HasCapability(ECapabilityTCB);
+	
+	// Test whether the client has at least one of the required capabilities
+	if (allFilesRequired)
+		result = aMsg.HasCapability(ECapabilityAllFiles);
+	if (!result && tcbRequired)
+		result = aMsg.HasCapability(ECapabilityTCB);
+	if (!allFilesRequired && !tcbRequired)
+		result = ETrue;
+	
+	CleanupStack::PopAndDestroy(&filePath);
+	return result;
+	}	
+}//end of namespace Usif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/server/stsserversession.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,221 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements CStsServer.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#include "stsserver.h"
+#include "stsserversession.h"
+#include <random.h>
+#include <e32cmn.h>
+#include <e32std.h>
+#include <usif/sts/stsdefs.h>
+#include "usiflog.h"
+
+namespace Usif
+{
+
+CStsServerSession::CStsServerSession(CStsServer& aStsserver)
+	: CScsSession(static_cast<CScsServer &>(aStsserver))
+	{
+	}
+
+CStsServerSession::~CStsServerSession()
+	{
+	if (iTransactionPtr)
+		TRAP_IGNORE(static_cast<CStsServer*>(&iServer)->ReleaseTransactionL(iTransactionPtr));
+	}
+
+CStsServerSession* CStsServerSession::NewL(CStsServer &aServer, const RMessage2& /*aMessage*/)
+	{
+	CStsServerSession* self = new (ELeave) CStsServerSession(aServer);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CStsServerSession::ConstructL()
+	{
+	CScsSession::ConstructL();
+	}
+
+
+_LIT(KStsPanicCategory, "StsServer");
+static const TInt KInvalidMessagePanicCode = KErrArgument;
+
+TBool CStsServerSession::DoServiceL(TInt aFunction, const RMessage2& aMessage)
+	{
+	DEBUG_PRINTF2(_L("CStsServerSession::DoServiceL() - Function %d"), static_cast<TStsClientServerFunctionType>(aFunction));							
+
+	TBool ret = ETrue; //used in CScsSession::ServiceL(); if set to ETRue >> aMessage.Complete(KErrNone); is executed
+	TStsTransactionId transactionID;
+	TPckg<TStsTransactionId> idPkg(transactionID);
+	RBuf buf;
+	CStsServer* server=static_cast<CStsServer*>(&iServer);
+	
+	switch(static_cast<TStsClientServerFunctionType>(aFunction))
+		{
+		case ECreateTransaction:
+			{
+			if(iTransactionPtr)
+				{
+				User::Leave(KErrInUse);
+				}
+			iTransactionPtr = server->CreateTransactionL();
+			transactionID = iTransactionPtr->TransactionId();
+			aMessage.WriteL(KIdIPCSlot, idPkg);
+			break;
+			}
+		case EOpenTransaction:
+			{
+			if(iTransactionPtr)
+				{
+				User::Leave(KErrInUse);
+				}
+			aMessage.ReadL(KIdIPCSlot, idPkg, 0);
+			iTransactionPtr = server->AttachTransactionL(transactionID);
+			break;
+			}
+		case ERegisterNew:
+			{
+			__ASSERT_ALWAYS(iTransactionPtr, aMessage.Panic(KStsPanicCategory, KInvalidMessagePanicCode));
+			buf.CreateL(KMaxFileName);
+			buf.CleanupClosePushL();
+			aMessage.ReadL(KFilePathIPCSlot, buf, 0);
+			iTransactionPtr->RegisterNewL(buf);
+			CleanupStack::PopAndDestroy(&buf);
+			break;
+			}
+		case ECreateNew:
+			{
+			__ASSERT_ALWAYS(iTransactionPtr, aMessage.Panic(KStsPanicCategory, KInvalidMessagePanicCode));			
+			// Taking the filename size from the IPC Arguments
+			// No need to do any validation of filename as it is done by File Server
+			TInt srcFileNameLen = aMessage.GetDesLengthL(KFilePathIPCSlot);
+			buf.CreateL(srcFileNameLen);
+			buf.CleanupClosePushL();
+			aMessage.ReadL(KFilePathIPCSlot, buf, 0);
+			TPckgBuf<TFileMode> pkgFileMode;
+			aMessage.ReadL(KFileModeIPCSlot, pkgFileMode, 0);
+			RFile newFile;
+			CleanupClosePushL(newFile);
+			iTransactionPtr->CreateNewL(buf, newFile, pkgFileMode());
+	        User::LeaveIfError(newFile.TransferToClient(aMessage, KFileHandleIPCSlot));
+	        ASSERT(aMessage.IsNull());  // message should have been completed
+	        ret = EFalse; //message need not be completed in CScsSession::ServiceL()
+			CleanupStack::PopAndDestroy(2, &buf);
+			break;
+			}
+		case ERemove:
+			{
+			__ASSERT_ALWAYS(iTransactionPtr, aMessage.Panic(KStsPanicCategory, KInvalidMessagePanicCode));			
+			buf.CreateL(KMaxFileName);
+			buf.CleanupClosePushL();
+			aMessage.ReadL(KFilePathIPCSlot, buf, 0);
+			iTransactionPtr->RemoveL(buf);
+			CleanupStack::PopAndDestroy(&buf);
+			break;
+			}
+		case ERegisterTemporary:
+			{
+			__ASSERT_ALWAYS(iTransactionPtr, aMessage.Panic(KStsPanicCategory, KInvalidMessagePanicCode));			
+			buf.CreateL(KMaxFileName);
+			buf.CleanupClosePushL();
+			aMessage.ReadL(KFilePathIPCSlot, buf, 0);
+			iTransactionPtr->RegisterTemporaryL(buf);
+			CleanupStack::PopAndDestroy(&buf);
+			break;
+			}
+		case ECreateTemporary:
+			{
+			__ASSERT_ALWAYS(iTransactionPtr, aMessage.Panic(KStsPanicCategory, KInvalidMessagePanicCode));			
+			// Taking the filename size from the IPC Arguments
+			// No need to do any validation of filename as it is done by File Server
+			TInt srcFileNameLen = aMessage.GetDesLengthL(KFilePathIPCSlot);
+			buf.CreateL(srcFileNameLen);
+			buf.CleanupClosePushL();
+			aMessage.ReadL(KFilePathIPCSlot, buf, 0);
+			TPckgBuf<TFileMode> pkgFileMode;
+			aMessage.ReadL(KFileModeIPCSlot, pkgFileMode, 0);
+			RFile newTempFile;
+			CleanupClosePushL(newTempFile);
+			iTransactionPtr->CreateTemporaryL(buf, newTempFile, pkgFileMode());
+	        User::LeaveIfError(newTempFile.TransferToClient(aMessage, KFileHandleIPCSlot));
+	        ASSERT(aMessage.IsNull());  // message should have been completed
+	        ret = EFalse; //message need not be completed in CScsSession::ServiceL()
+			CleanupStack::PopAndDestroy(2, &buf);
+			break;
+			}
+		case EOverwrite:
+			{
+			__ASSERT_ALWAYS(iTransactionPtr, aMessage.Panic(KStsPanicCategory, KInvalidMessagePanicCode));			
+			buf.CreateL(KMaxFileName);
+			buf.CleanupClosePushL();
+			aMessage.ReadL(KFilePathIPCSlot, buf, 0);
+			TPckgBuf<TFileMode> pkgFileMode;
+			aMessage.ReadL(KFileModeIPCSlot, pkgFileMode, 0);
+			RFile newFile;
+			CleanupClosePushL(newFile);
+			iTransactionPtr->OverwriteL(buf, newFile, pkgFileMode());
+	        User::LeaveIfError(newFile.TransferToClient(aMessage, KFileHandleIPCSlot));
+	        ASSERT(aMessage.IsNull());  // message should have been completed
+	        ret = EFalse; //message need not be completed in CScsSession::ServiceL()
+			CleanupStack::PopAndDestroy(2, &buf);
+			break;
+			}
+		case ECommit:
+			{
+			__ASSERT_ALWAYS(iTransactionPtr, aMessage.Panic(KStsPanicCategory, KInvalidMessagePanicCode));
+			iTransactionPtr->CommitL(); 
+			server->FinaliseTransactionL(iTransactionPtr); //releases transaction and erases pointer!
+			break;
+			}
+		case ERollBack:
+			{
+			__ASSERT_ALWAYS(iTransactionPtr, aMessage.Panic(KStsPanicCategory, KInvalidMessagePanicCode));
+			iTransactionPtr->RollBackL();
+			server->FinaliseTransactionL(iTransactionPtr); //releases transaction and erases pointer!
+			break;
+			}
+		case EGetId:
+			{
+			__ASSERT_ALWAYS(iTransactionPtr, aMessage.Panic(KStsPanicCategory, KInvalidMessagePanicCode));
+			transactionID = iTransactionPtr->TransactionId();
+			//return ID back to client
+			aMessage.WriteL(KIdIPCSlot, idPkg);
+			break;
+			}
+		case ERollBackAllPending:
+			{
+			server->RollBackAllPendingL();
+			break;
+			}
+		default:
+			{
+			User::Leave(KErrNotSupported);
+			break;
+			}
+		}
+	return ret; 
+	}
+}//end of namespace Usif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/source/server/transactionwrapper.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Implements CStsServer.
+*
+*/
+
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#include "transactionwrapper.h"
+
+namespace Usif
+{
+CReferenceCountedTransactionWrapper::CReferenceCountedTransactionWrapper()
+	{
+	
+	}
+
+CReferenceCountedTransactionWrapper::~CReferenceCountedTransactionWrapper()
+	{
+	delete iTrPtr;
+	}
+
+/*static*/ CReferenceCountedTransactionWrapper* CReferenceCountedTransactionWrapper::NewLC(TStsTransactionId aTransactionID)
+	{
+	CReferenceCountedTransactionWrapper* wrapper= new (ELeave) CReferenceCountedTransactionWrapper();
+	CleanupStack::PushL(wrapper);
+	wrapper->ConstructL(aTransactionID);
+	return wrapper;
+	}
+
+void CReferenceCountedTransactionWrapper::ConstructL(TStsTransactionId aTransactionID)
+	{
+	iTrPtr = CIntegrityServices::NewL(aTransactionID);
+	iRefCount=0;
+	iCompleted=EFalse;
+	}
+
+CIntegrityServices* CReferenceCountedTransactionWrapper::Attach()
+	{
+	++iRefCount; 
+	return iTrPtr; 
+	}
+
+TInt CReferenceCountedTransactionWrapper::Detach() 
+	{
+	return --iRefCount;
+	}
+}//end of namespace Usif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/group/tsts.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,62 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET		tststestserver.exe
+TARGETTYPE	exe
+UID			0x1000007A 0x10285DDF
+
+
+
+USERINCLUDE	../inc
+USERINCLUDE	../tintegrityservices/inc
+USERINCLUDE	../../../swi/test/testutilswi/client
+USERINCLUDE	../../inc_private
+USERINCLUDE	../../inc
+
+USERINCLUDE	../../../swinstallationfw/common/inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH	../source
+SOURCE		tststestsuiteserver.cpp
+SOURCE		tststestsuitestep.cpp
+
+SOURCEPATH	../tintegrityservices/source
+SOURCE		tintegrityservicesstep.cpp
+
+//we need to include these soruces as unit tests, which reqire these sources, are also implemented
+
+SOURCEPATH	../../source/server
+SOURCE		integrityservices.cpp
+SOURCE      integritytree.cpp
+SOURCE      journal.cpp
+SOURCE      journalfile.cpp
+SOURCE      operationfunctions.cpp
+
+
+LIBRARY		euser.lib
+LIBRARY		efsrv.lib
+LIBRARY		testexecuteutils.lib
+LIBRARY		testexecutelogclient.lib
+LIBRARY		stsclient.lib
+LIBRARY		estor.lib
+LIBRARY		tstsintegrityservicesclient.lib
+LIBRARY		testutilclientswi.lib 
+LIBRARY		sectcbutil.lib
+LIBRARY		oomtestbase.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/group/tstsrollbackall.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET		tststestserverrollbackall.exe
+TARGETTYPE	exe
+//UID3 must match swi daemon's UID3 as STS server restricts access to 
+//the RollbackAllPending interface to that particular UID
+UID		0x1000007A 0x10202DCE
+
+
+
+USERINCLUDE	../inc
+USERINCLUDE	../../inc_private
+USERINCLUDE	../../inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH	../source
+SOURCE		tststestsuiteserverrollbackall.cpp
+SOURCE		tststestsuitesteprollbackall.cpp
+
+LIBRARY		euser.lib
+LIBRARY		efsrv.lib
+LIBRARY		testexecuteutils.lib
+LIBRARY		testexecutelogclient.lib
+LIBRARY		stsclient.lib
+LIBRARY		estor.lib
+LIBRARY		tstsintegrityservicesclient.lib
+LIBRARY		testutilclientswi.lib 
+LIBRARY		sectcbutil.lib
+LIBRARY		oomtestbase.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/inc/tststestsuiteserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,69 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+ @internalComponent
+*/
+
+#ifndef __TSTSTESTSUITESERVER_H__
+#define __TSTSTESTSUITESERVER_H__
+#include <test/testexecuteserverbase.h>
+#include <f32file.h> 
+#include <usif/sts/sts.h>
+#include "testutilclientswi.h"
+
+using namespace Usif;
+
+class CStsTestServer : public CTestServer
+	{
+	public:
+	    //general test framework related stuff
+		static CStsTestServer* NewL();
+		virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+		~CStsTestServer();
+
+		//STS specific functions
+        TStsTransactionId CreateTransactionL(TInt aPos);
+        void OpenTransactionL(TInt aPos, TStsTransactionId aTransactionID);
+        void CloseTransactionL(TInt aPos);
+		void RegisterNewL(TInt aPos, const TDesC& aFileName);
+		void CreateNewL(TInt aPos, const TDesC& aFileName, RFile &aFile, TUint aFileMode);
+		void RemoveL(TInt aPos, const TDesC& aFileName);
+		void RegisterTemporaryL(TInt aPos, const TDesC& aFileName);
+		void CreateTemporaryL(TInt aPos, const TDesC& aFileName, RFile &aFile, TUint aFileMode);
+		void OverwriteL(TInt aPos, const TDesC& aFileName, RFile &aFile, TUint aFileMode);
+		void CommitL(TInt aPos);
+		void RollBackL(TInt aPos);
+	    void RollbackAllPendingL(TInt aPos);
+
+	    TStsTransactionId GetTransactionIDL(TInt aPos);
+
+		RTestUtilSessionSwi& GetTestUtil() {return iTestutil;}
+		
+	private:
+		RStsSession& GetSessionL(TInt aPos);
+		void ConstructL();
+
+	private:
+		static const TInt 							maxNumberOfSessions=10;
+		RStsSession 					            iSessions[maxNumberOfSessions];
+		RTestUtilSessionSwi                            iTestutil; //for file manipulation in protected directories as well
+	};
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/inc/tststestsuiteserverrollbackall.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+ @internalComponent
+*/
+
+#ifndef __TSTSTESTSUITESERVERROLLBACKALL_H__
+#define __TSTSTESTSUITESERVERROLLBACKALL_H__
+#include <test/testexecuteserverbase.h>
+#include <f32file.h>
+
+class CStsTestServerRollbackAll : public CTestServer
+	{
+	public:
+	    //general test framework related stuff
+		static CStsTestServerRollbackAll* NewL();
+		virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+
+	private:
+		void ConstructL();
+	};
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/inc/tststestsuitestep.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,245 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+ @internalComponent
+*/
+#ifndef __TSTSTESTSUITESTEP_H__
+#define __TSTSTESTSUITESTEP_H__
+#include <test/testexecutestepbase.h>
+#include "tststestsuitestepcommon.h"
+#include <scs/oomteststep.h>
+
+class CStsTestServer;
+
+class CStsBaseTestStep : public COomTestStep
+	{
+	public:
+		CStsBaseTestStep(CStsTestServer &aStsTestServer);
+	
+	protected:
+		CStsTestServer& Server();
+		//ini access functions
+		TInt GetIntFromConfigL(const TDesC& aName);
+		TInt GetTransactionSlotFromConfigL();
+		TInt GetTransactionSlotToReuseTransactionIdFromConfigL();
+		TInt GetTransactionIdFromConfigL();
+		TPtrC GetStringFromConfigL(const TDesC& aName);
+		TPtrC GetTargetFilePathFromConfigL();
+		
+		//file handling
+		void WriteToFileL(RFile &aFile, TDesC& aString);
+		TBool FileExistsL(const TDesC &aFileName);
+		void DeleteFileL(const TDesC &aFileName);
+		void CopyFileL(const TDesC& aSourceFile, const TDesC& aDestinationFile);
+		void RmDirL(const TDesC& aFileName);
+		void MkDirAllL(const TDesC& aFileName);
+		void DeleteL(const TDesC& aFileName);
+		HBufC* CreateDataForNewFileCreatedByStsServerLC(const TDesC& aTestStepName, TNewFileType aType);
+		void SetReadOnlyL(const TDesC& aFileName, TInt aSetReadOnly);
+	protected:
+		CStsTestServer &iStsTestServer;
+	};
+
+
+class CCreateTransactionStep : public CStsBaseTestStep
+	{
+	public:
+		CCreateTransactionStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class COpenTransactionStep : public CStsBaseTestStep
+	{
+	public:
+		COpenTransactionStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class CCloseTransactionStep : public CStsBaseTestStep
+	{
+	public:
+		CCloseTransactionStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+	
+class CRegisterNewFileStep : public CStsBaseTestStep
+	{
+	public:
+		CRegisterNewFileStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class CCreateNewFileStep : public CStsBaseTestStep
+	{
+	public:
+		CCreateNewFileStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class CRemoveStep : public CStsBaseTestStep
+	{
+	public:
+		CRemoveStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class CRegisterTemporaryStep : public CStsBaseTestStep
+	{
+	public:
+		CRegisterTemporaryStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class CCreateTemporaryStep : public CStsBaseTestStep
+	{
+	public:
+		CCreateTemporaryStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class COverwriteStep : public CStsBaseTestStep
+	{
+	public:
+		COverwriteStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class CCommitStep : public CStsBaseTestStep
+	{
+	public:
+		CCommitStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class CRollbackStep : public CStsBaseTestStep
+	{
+	public:
+		CRollbackStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class CRollbackAllPendingStep : public CStsBaseTestStep
+	{
+	public:
+		CRollbackAllPendingStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+class CCheckFilesStep : public CStsBaseTestStep
+	{
+	public:
+		CCheckFilesStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	private:
+		void GetFileNamesForCheckL(RArray<TPtrC>& aFileNumExist,RArray<TPtrC>& aFileNumNonExist);
+		void ExtractFileNameL(TInt aEntries, const TDesC& aEntryBase, RArray<TPtrC>& aFileArray);
+		void CheckIfFilesExistL(const RArray<TPtrC>& aFileArray);
+		void CheckIfFilesNotExistL(const RArray<TPtrC>& aFileArray);
+	};
+
+class CheckFileModeChangeStep : public CStsBaseTestStep
+	{
+	public:
+		CheckFileModeChangeStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+
+class CFileOperationsStep : public CStsBaseTestStep
+	{
+	public:
+		CFileOperationsStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	private:
+		void ProcessFileOperationsL();
+		TPtrC GetNextCommandLineParameterL(const TDesC& aLine, TInt& aNextAvailablePos);
+	};
+
+class CFileModeTestStep : public CStsBaseTestStep
+	{
+	public:
+		CFileModeTestStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	private:
+		void TestCase1L();
+		void TestCase2L();
+		void TestCase3L();
+	};
+
+class CCreateLongFileNameTestStep : public CStsBaseTestStep
+	{
+	public:
+		CCreateLongFileNameTestStep(CStsTestServer &aStsTestServer);
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/inc/tststestsuitestepcommon.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,222 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+ @internalComponent
+*/
+
+#ifndef __TSTSTESTSUITESTEPCOMMON_H__
+#define __TSTSTESTSUITESTEPCOMMON_H__
+#include <e32cmn.h>
+#include <e32def.h>
+#include <f32file.h>
+
+//ini item names
+/**
+ Name of the item that defines which transaction slot is to be used in CStsTestServer
+ Value can range from 0 to CStsTestServer::maxNumberOfTransactions-1
+ Usage: <KTransactionSlot>=<slot>   e.g: TrSlot=0 or TrSlot=1 etc...
+ */
+_LIT(KTransactionSlot,	"trslot");
+
+/**
+ Name of the item that defines the fully qualified name of the target file
+ Usage: <KTargetFile>=<path>   e.g: target=c:\sys\bin\sts\server\config.ini
+ Can be used with the all commands that require a file path as input. 
+ */
+_LIT(KTargetFile,	"target");
+
+/**
+ This item has the followin role:
+ a) Name of the item that defines which transaction id is to be reused (from which slot) when issuing an open transaction command
+    Usage: <KTransactionSlotID>=<slot>   e.g: TrSlotID=0 or TrSlot=1 etc...
+ 
+ Usage:
+    [testopentransactionsection]
+    TrSlot=1
+    TrSlotID=0  ==> reuses transaction ID of transaction in slot 0            
+
+ Important note: a section that is intended to be used with open transaction command should contain either 
+                 KTransactionSlotID or KTransactionID out of which KTransactionSlotID is searched for first.
+                 (That's if an ini section conatins both then KTransactionID is simply ignored)
+ */
+_LIT(KTransactionSlotID,	"trslotid");
+
+/**
+ An arbitrary transaction ID (4byte) can be defined in the ini file that is used when opening a transaction. 
+
+ Usage:
+    [testopentransactionsection]
+    trslot=1
+    trid=0xABCDEF  ==> this vvalue is used when openeing a transaction
+ Important note: a section that is intended to be used with open transaction command should contain either 
+                 KTransactionSlotID or KTransactionID out of which KTransactionSlotID is searched for first.
+                 (That's if an ini section conatins both then KTransactionID is simply ignored)
+ */
+_LIT(KTransactionID,	"trid");
+
+/**
+ This item is for CheckFilesStep.
+ It's used to show how many subsequent file name/path items in the ini file are to be extracted 
+ for checking wheter the corresponding files exist or not.
+ Usage:
+   numexist=xx eg: numexist=2
+*/
+_LIT(KNumExist, "numexist"); 
+
+/**
+ This item is for CheckFilesStep.
+ It's used to define a particular file's name/path that is to be checked for.
+ Usage:
+   exist<x>=<path> where x starts from 0. eg: exist0=d:\myfolder\mysubfolder\myfile.txt
+*/
+_LIT(KExistBase, "exist"); // + number (0-based) = file to check for
+
+/**
+ This item is for CheckFilesStep.
+ It's used to show how many subsequent file name/path items in the ini file are to be extracted 
+ for checking wheter the corresponding files don't exist.
+ Usage:
+   numnonexist=xx eg: numnonexist=2
+*/
+_LIT(KNumNonExist, "numnonexist"); // this specifies how many files to check for
+
+/**
+ This item is for CheckFilesStep.
+ It's used to define a particular file's name/path that is to be checked for.
+ Usage:
+   nonexist<x>=<path> where x starts from 0. eg: nonexist0=d:\myfolder\mysubfolder\myfile.txt
+*/
+_LIT(KNonExistBase, "nonexist"); // + number (0-based) = file to check for
+
+/**
+ This item is for FileOperationsStep.
+ It's used to specify the number of subsequent file operations in the ini file.
+ Usage:
+   operations=xx eg: operations=2
+*/
+_LIT(KNumOfOperations, "operations"); // this specifies how many fileoperations are to be executed
+
+_LIT(KOpNameBase, 	   "operation"); 
+
+/**
+ This item is for CreateLargeFileNameStep.
+ It's used to specify the base directory.
+ Usage:
+   basedir=xx 
+*/
+_LIT(KBaseDir, 	   "basedir");
+
+/**
+ This item is for CreateLargeFileNameStep.
+ It's used to specify the base directory 
+ buffer size.
+*/
+const TInt KBufSize = 30; 
+
+/**
+ Thess items are for FileOperationsStep.
+ They denote file commands accepted by FileOperationsStep.
+ Usage:
+   operationxx=<command> <switch> <source> <destination>
+ eg: 
+   operation0=mkdirall -i c:\sys\bin\dummydir\    //-i suppresses all errors during the operation
+   operation1=copy z:\sys\bin\dummydir\dummyfile.txt z:\sys\bin\dummydir\dummyfileoncdrive.txt
+*/
+_LIT(KMkDirAllOp, 	   "mkdirall"); 
+_LIT(KRmDirOp, 	   	   "rmdir"); 
+_LIT(KCopyOp, 	   	   "copy"); 
+_LIT(KDeleteOp,	   	   "delete"); 
+_LIT(KAttribOp,		   "attrib"); 
+_LIT(KIgnoreErrorsSwitch, "-i"); 
+
+//test step names
+_LIT(KCreateTransactionStep,	"CreateTransactionStep");
+_LIT(KOpenTransactionStep,		"OpenTransactionStep");
+_LIT(KCloseTransactionStep,		"CloseTransactionStep");
+_LIT(KRegisterNewFileStep,		"RegisterNewFileStep");
+_LIT(KCreateNewFileStep,		"CreateNewFileStep");
+_LIT(KRemoveStep,				"RemoveStep");
+_LIT(KRegisterTemporaryStep,	"RegisterTemporaryStep");
+_LIT(KCreateTemporaryStep,		"CreateTemporaryStep");
+_LIT(KOverwriteStep,			"OverwriteStep");
+_LIT(KCommitStep,				"CommitStep");
+_LIT(KRollbackStep,				"RollbackStep");
+_LIT(KRollbackAllPendingStep,	"RollbackAllPendingStep");
+_LIT(KCheckFilesStep,			"CheckFilesStep");
+_LIT(KNegativeTestsStep,		"NegativeTestsStep");
+_LIT(KCheckFileModeChangeStep,	"CheckFileModeChangeStep");
+_LIT(KJournalFileUnitTest,	    "JournalFileUnitTest");
+_LIT(KJournalFileUnitTestAdd,  	"JournalFileUnitTestAdd");
+_LIT(KJournalFileUnitTestTemp,  	"JournalFileUnitTestTemp");
+_LIT(KJournalFileUnitTestRemove, "JournalFileUnitTestRemove");
+_LIT(KJournalFileUnitTestRead,  	"JournalFileUnitTestRead");
+_LIT(KJournalFileUnitTestEvent,  "JournalFileUnitTestEvent");
+_LIT(KJournalUnitTest,	    		"JournalUnitTest");
+_LIT(KJournalUnitTestInstall,	"JournalUnitTestInstall");
+_LIT(KJournalUnitTestRollback,	"JournalUnitTestRollback");
+_LIT(KIntegrityservicesUnitTestInstall,	"IntegrityservicesUnitTestInstall");
+_LIT(KIntegrityservicesUnitTestRollback,	"IntegrityservicesUnitTestRollback");
+_LIT(KFileOperationsStep,					"FileOperationsStep");
+_LIT(KFileModeTestStep,					"FileModeTestStep");
+_LIT(KCreateLongFileNameTestStep,			"CreateLongFileNameTestStep");
+
+//test step names for legacy integrityservices testcode (see ../tintegrityservices/source/tintegrityservicesstep.cpp)
+_LIT(KInstall, 					"Install");
+_LIT(KRecover, 					"Recover");
+_LIT(KCleanup, 					"Cleanup");
+_LIT(KCheck, 					"Check");
+
+
+const TInt KDefaultFileCreationMode = EFileShareExclusive|EFileWrite;
+
+enum TNewFileType
+	{
+	ENewTemporaryFile,
+	ENewPermanentFile
+	};
+	
+//predefined elements used to create file content when creating new files	
+_LIT(KFileData1, "This ");
+_LIT(KFileData2, "temporary ");
+_LIT(KFileData3, "permanent ");
+_LIT(KFileData4, "unknown type ");
+_LIT(KFileData5, "file was created by ");
+_LIT(KFileData6, " command");
+_LIT(KFileData7, "the STS server when instructed by ");
+_LIT(KFileData8, " @ ");
+_LIT(KTimeFormatString, "%H%:%T%:%S%.%C  %D%/%M%/%Y");
+
+
+//script and ini file item used by legacy integrityservices testcode (see ../tintegrityservices/source/tintegrityservicesstep.cpp)
+_LIT(KRemoveFile,	 	"removefile");
+_LIT(KTempFile, 		"temporaryfile");
+_LIT(KAddFile, 			"addfile");
+_LIT(KFailType, 		"failtype");
+_LIT(KFailPosition, 	"failposition");
+_LIT(KFailFileName, 	"failfilename");
+_LIT(KPresent, 			"present");
+_LIT(KAbsent, 			"absent");
+_LIT(KCleanupFile, 		"cleanupfile");
+_LIT(KCleanupDirectory, "cleanupdirectory");
+_LIT(KArbitraryOpFile, 	"arbitraryopfile");
+_LIT(KOperation, 		"operation");
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/inc/tststestsuitesteprollbackall.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,41 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+ @internalComponent
+*/
+#ifndef __TSTSTESTSUITESTEPROLLBACKALL_H__
+#define __TSTSTESTSUITESTEPROLLBACKALL_H__
+#include <test/testexecutestepbase.h>
+#include "tststestsuitestepcommon.h"
+#include <scs/oomteststep.h>
+
+class CRollbackAllPendingStep : public COomTestStep
+	{
+	public:
+		CRollbackAllPendingStep();
+	protected:
+		virtual void ImplTestStepPreambleL();
+		virtual void ImplTestStepPostambleL();
+		virtual void ImplTestStepL();
+	};
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/batchfiles/tsts_bootuptimerecovery.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,102 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+@ECHO ON
+attrib -R \epoc32\data\z\tusif\tsts\data\*.* /S
+
+if exist \epoc32\winscw\c\sys\install\integrityservices rd \epoc32\winscw\c\sys\install\integrityservices /s /q
+if exist \epoc32\drive_e\sys\install\integrityservices rd \epoc32\drive_e\sys\install\integrityservices /s /q
+md \epoc32\winscw\c\sys\install\integrityservices
+md \epoc32\drive_e\sys\install\integrityservices
+
+if exist \epoc32\winscw\c\sts_test_dir rd \epoc32\winscw\c\sts_test_dir /s /q
+if exist \epoc32\drive_e\sts_test_dir rd \epoc32\drive_e\sts_test_dir /s /q
+md \epoc32\winscw\c\sts_test_dir
+md \epoc32\drive_e\sts_test_dir
+
+
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase1\c_drive \epoc32\winscw\c\sys\install\integrityservices /y /e
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase2\c_drive \epoc32\winscw\c\sys\install\integrityservices /y /e
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase3\c_drive \epoc32\winscw\c\sys\install\integrityservices /y /e
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase4\c_drive \epoc32\winscw\c\sys\install\integrityservices /y /e
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase5\c_drive \epoc32\winscw\c\sys\install\integrityservices /y /e
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase6\c_drive \epoc32\winscw\c\sys\install\integrityservices /y /e
+
+
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase1\e_drive \epoc32\drive_e\sys\install\integrityservices /y /e
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase2\e_drive \epoc32\drive_e\sys\install\integrityservices /y /e
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase3\e_drive \epoc32\drive_e\sys\install\integrityservices /y /e
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase4\e_drive \epoc32\drive_e\sys\install\integrityservices /y /e
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase5\e_drive \epoc32\drive_e\sys\install\integrityservices /y /e
+xcopy \epoc32\data\z\tusif\tsts\data\rollbackall\testcase6\e_drive \epoc32\drive_e\sys\install\integrityservices /y /e
+
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase1_register_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase1_create_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase1_register_temp_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase1_create_temp_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase1_overwrite_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase1_register_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase1_create_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase1_register_temp_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase1_create_temp_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase1_overwrite_file_drive2.txt
+
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase2_register_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase2_create_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase2_register_temp_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase2_create_temp_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase2_overwrite_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase2_register_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase2_create_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase2_register_temp_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase2_create_temp_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase2_overwrite_file_drive2.txt
+
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase3_register_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase3_create_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase3_register_temp_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase3_create_temp_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase3_overwrite_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase3_register_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase3_create_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase3_register_temp_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase3_create_temp_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase3_overwrite_file_drive2.txt
+
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase4_register_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase4_create_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase4_register_temp_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase4_create_temp_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase4_overwrite_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase4_register_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase4_create_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase4_register_temp_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase4_create_temp_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase4_overwrite_file_drive2.txt
+
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase5_register_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase5_create_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase5_overwrite_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase5_register_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase5_create_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase5_overwrite_file_drive2.txt
+
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase6_register_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase6_create_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\winscw\c\sts_test_dir\RollbackAllTestCase6_overwrite_file_drive1.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase6_register_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase6_create_file_drive2.txt
+copy \epoc32\data\z\tusif\tsts\data\tstsdummy.txt \epoc32\drive_e\sts_test_dir\RollbackAllTestCase6_overwrite_file_drive2.txt
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/sec-sts-rollbackall-0002/b6da9d45.drv has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/sec-sts-rollbackall-0002/b6da9d45.log has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8.drv has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8.log has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8/0.bak	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is an exported dummy textfile used for STS testing.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/c_drive/61f7bbf8/1.bak	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is an exported dummy textfile used for STS testing.
\ No newline at end of file
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/e_drive/61f7bbf8.log has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/e_drive/61f7bbf8/0.bak	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is an exported dummy textfile used for STS testing.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase1/e_drive/61f7bbf8/1.bak	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is an exported dummy textfile used for STS testing.
\ No newline at end of file
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3.drv has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3.log has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3/0.bak	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is an exported dummy textfile used for STS testing.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/c_drive/b06c42f3/1.bak	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is an exported dummy textfile used for STS testing.
\ No newline at end of file
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/e_drive/b06c42f3.log has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/e_drive/b06c42f3/0.bak	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is an exported dummy textfile used for STS testing.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase2/e_drive/b06c42f3/1.bak	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is an exported dummy textfile used for STS testing.
\ No newline at end of file
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase3/c_drive/bd596810.drv has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase3/c_drive/bd596810.log has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase3/e_drive/bd596810.log has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase4/c_drive/cb94c9f0.drv has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase4/c_drive/cb94c9f0.log has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase4/e_drive/cb94c9f0.log has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase5/c_drive/b630b6f0.drv has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase5/c_drive/b630b6f0.log has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase5/e_drive/b630b6f0.log has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase6/c_drive/be3d42f0.drv has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase6/c_drive/be3d42f0.log has changed
Binary file installationservices/swtransactionservices/test/scripts/data/rollbackall/testcase6/e_drive/be3d42f0.log has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/data/tstsdummy.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+This is an exported dummy textfile used for STS testing.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/tsts.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1542 @@
+[SEC_STS_TestCase001_Commit_pre_commit]
+trslot=0
+target=c:\sts_test_dir\TestCase001_Commit.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase001_Commit.txt
+
+[SEC_STS_TestCase001_Commit_post_commit]
+numexist=1
+exist0=c:\sts_test_dir\TestCase001_Commit.txt
+
+[SEC_STS_TestCase001_Rollback_pre_rollback]
+trslot=0
+target=c:\sts_test_dir\TestCase001_Rollback.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase001_Rollback.txt
+
+[SEC_STS_TestCase001_Rollback_post_rollback]
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase001_Rollback.txt
+
+
+
+[SEC_STS_TestCase002a_Commit_pre_commit]
+trslot=0
+target=c:\sts_test_dir\TestCase002a_Commit.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase002a_Commit.txt
+
+[SEC_STS_TestCase002a_Commit_post_commit]
+numexist=1
+exist0=c:\sts_test_dir\TestCase002a_Commit.txt
+
+[SEC_STS_TestCase002a_Rollback_pre_rollback]
+trslot=0
+target=c:\sts_test_dir\TestCase002a_Rollback.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase002a_Rollback.txt
+
+[SEC_STS_TestCase002a_Rollback_post_rollback]
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase002a_Rollback.txt
+
+
+[SEC_STS_TestCase002b_Commit_pre_commit]
+trslot=0
+target=c:\sts_test_dir\TestCase002b_Commit.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase002b_Commit.txt
+
+[SEC_STS_TestCase002b_Commit_post_commit]
+numexist=1
+exist0=c:\sts_test_dir\TestCase002b_Commit.txt
+
+[SEC_STS_TestCase002b_Rollback_pre_rollback]
+trslot=0
+target=c:\sts_test_dir\TestCase002b_Rollback.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase002b_Rollback.txt
+
+[SEC_STS_TestCase002b_Rollback_post_rollback]
+numexist=1
+exist0=c:\sts_test_dir\TestCase002b_Commit.txt
+
+
+[SEC_STS_TestCase003_Commit_pre_commit]
+trslot=0
+target=c:\sts_test_dir\TestCase003_Commit.txt
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase003_Commit.txt
+
+[SEC_STS_TestCase003_Commit_post_commit]
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase003_Commit.txt
+
+[SEC_STS_TestCase003_Rollback_pre_rollback]
+trslot=0
+target=c:\sts_test_dir\TestCase003_Rollback.txt
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase003_Rollback.txt
+
+[SEC_STS_TestCase003_Rollback_post_rollback]
+numexist=1
+exist0=c:\sts_test_dir\TestCase003_Rollback.txt
+
+[SEC_STS_TestCase004_Commit_pre_commit]
+trslot=0
+target=c:\sts_test_dir\TestCase004_Commit.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase004_Commit.txt
+
+[SEC_STS_TestCase004_Commit_post_commit]
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase004_Commit.txt
+
+[SEC_STS_TestCase004_Rollback_pre_rollback]
+trslot=0
+target=c:\sts_test_dir\TestCase004_Rollback.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase004_Rollback.txt
+
+[SEC_STS_TestCase004_Rollback_post_rollback]
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase004_Rollback.txt
+
+
+[SEC_STS_TestCase005_Commit_pre_commit]
+trslot=0
+target=c:\sts_test_dir\TestCase005_Commit.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase005_Commit.txt
+
+[SEC_STS_TestCase005_Commit_post_commit]
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase005_Commit.txt
+
+[SEC_STS_TestCase005_Rollback_pre_rollback]
+trslot=0
+target=c:\sts_test_dir\TestCase005_Rollback.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase005_Rollback.txt
+
+[SEC_STS_TestCase005_Rollback_post_rollback]
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase005_Rollback.txt
+
+
+[SEC_STS_TestCase006a_Commit_pre_commit]
+trslot=0
+target=c:\sts_test_dir\TestCase006a_Commit.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase006a_Commit.txt
+
+[SEC_STS_TestCase006a_Commit_post_commit]
+numexist=1
+exist0=c:\sts_test_dir\TestCase006a_Commit.txt
+
+[SEC_STS_TestCase006a_Rollback_pre_rollback]
+trslot=0
+target=c:\sts_test_dir\TestCase006a_Rollback.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase006a_Rollback.txt
+
+[SEC_STS_TestCase006a_Rollback_post_rollback]
+numexist=1
+exist0=c:\sts_test_dir\TestCase006a_Rollback.txt
+
+[SEC_STS_TestCase006b_Commit_pre_commit]
+trslot=0
+target=c:\sts_test_dir\TestCase006b_Commit.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase006b_Commit.txt
+
+[SEC_STS_TestCase006b_Commit_post_commit]
+numexist=1
+exist0=c:\sts_test_dir\TestCase006b_Commit.txt
+
+[SEC_STS_TestCase006b_Rollback_pre_rollback]
+trslot=0
+target=c:\sts_test_dir\TestCase006b_Rollback.txt
+numexist=1
+exist0=c:\sts_test_dir\TestCase006b_Rollback.txt
+
+[SEC_STS_TestCase006b_Rollback_post_rollback]
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase006b_Rollback.txt
+
+
+[SEC_STS_TestCase007_Commit_pre_commit]
+trslot=0
+numexist=5
+exist0=c:\sts_test_dir\TestCase007_Commit_register_file.txt
+exist1=c:\sts_test_dir\TestCase007_Commit_create_file.txt
+exist2=c:\sts_test_dir\TestCase007_Commit_register_temp.txt
+exist3=c:\sts_test_dir\TestCase007_Commit_create_temp.txt
+exist4=c:\sts_test_dir\TestCase007_Commit_overwrite_file.txt
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase007_Commit_remove_file.txt
+
+[SEC_STS_TestCase007_Commit_pre_commit_register_file]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Commit_register_file.txt
+
+[SEC_STS_TestCase007_Commit_pre_commit_create_file]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Commit_create_file.txt
+
+[SEC_STS_TestCase007_Commit_pre_commit_remove_file]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Commit_remove_file.txt
+
+[SEC_STS_TestCase007_Commit_pre_commit_register_temp]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Commit_register_temp.txt
+
+[SEC_STS_TestCase007_Commit_pre_commit_create_temp]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Commit_create_temp.txt
+
+[SEC_STS_TestCase007_Commit_pre_commit_overwrite_file]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Commit_overwrite_file.txt
+
+[SEC_STS_TestCase007_Commit_post_commit]
+numexist=3
+exist0=c:\sts_test_dir\TestCase007_Commit_register_file.txt
+exist1=c:\sts_test_dir\TestCase007_Commit_create_file.txt
+exist2=c:\sts_test_dir\TestCase007_Commit_overwrite_file.txt
+numnonexist=3
+nonexist0=c:\sts_test_dir\TestCase007_Commit_remove_file.txt
+nonexist1=c:\sts_test_dir\TestCase007_Commit_register_temp.txt
+nonexist2=c:\sts_test_dir\TestCase007_Commit_create_temp.txt
+
+
+[SEC_STS_TestCase007_Rollback_pre_rollback]
+trslot=0
+numexist=5
+exist0=c:\sts_test_dir\TestCase007_Rollback_register_file.txt
+exist1=c:\sts_test_dir\TestCase007_Rollback_create_file.txt
+exist2=c:\sts_test_dir\TestCase007_Rollback_register_temp.txt
+exist3=c:\sts_test_dir\TestCase007_Rollback_create_temp.txt
+exist4=c:\sts_test_dir\TestCase007_Rollback_overwrite_file.txt
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase007_Rollback_remove_file.txt
+
+[SEC_STS_TestCase007_Rollback_pre_rollback_register_file]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Rollback_register_file.txt
+
+[SEC_STS_TestCase007_Rollback_pre_rollback_create_file]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Rollback_create_file.txt
+
+[SEC_STS_TestCase007_Rollback_pre_rollback_remove_file]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Rollback_remove_file.txt
+
+[SEC_STS_TestCase007_Rollback_pre_rollback_register_temp]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Rollback_register_temp.txt
+
+[SEC_STS_TestCase007_Rollback_pre_rollback_create_temp]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Rollback_create_temp.txt
+
+[SEC_STS_TestCase007_Rollback_pre_rollback_overwrite_file]
+trslot=0
+target=c:\sts_test_dir\TestCase007_Rollback_overwrite_file.txt
+
+[SEC_STS_TestCase007_Rollback_post_rollback]
+numexist=2
+exist0=c:\sts_test_dir\TestCase007_Rollback_overwrite_file.txt
+exist1=c:\sts_test_dir\TestCase007_Rollback_remove_file.txt
+numnonexist=3
+nonexist0=c:\sts_test_dir\TestCase007_Rollback_register_file.txt
+nonexist1=c:\sts_test_dir\TestCase007_Rollback_create_file.txt
+nonexist2=c:\sts_test_dir\TestCase007_Rollback_register_temp.txt
+nonexist3=c:\sts_test_dir\TestCase007_Rollback_create_temp.txt
+
+
+[SEC_STS_TestCase008_tr0]
+trslot=0
+
+[SEC_STS_TestCase008_tr1]
+trslot=1
+trslotid=0
+
+[SEC_STS_TestCase008_Commit_register_file_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase008_Commit_register_file_tr0.txt
+
+[SEC_STS_TestCase008_Commit_remove_file_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase008_Commit_remove_file_tr0.txt
+
+[SEC_STS_TestCase008_Commit_register_temp_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase008_Commit_register_temp_tr0.txt
+
+[SEC_STS_TestCase008_Commit_create_file_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase008_Commit_create_file_tr1.txt
+
+[SEC_STS_TestCase008_Commit_overwrite_file_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase008_Commit_overwrite_file_tr1.txt
+
+[SEC_STS_TestCase008_Commit_create_temp_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase008_Commit_create_temp_tr1.txt
+
+
+[SEC_STS_TestCase008_Commit_pre_commit_check_files]
+numexist=5
+exist0=c:\sts_test_dir\TestCase008_Commit_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase008_Commit_register_temp_tr0.txt
+exist2=c:\sts_test_dir\TestCase008_Commit_create_file_tr1.txt
+exist3=c:\sts_test_dir\TestCase008_Commit_overwrite_file_tr1.txt
+exist4=c:\sts_test_dir\TestCase008_Commit_create_temp_tr1.txt
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase008_Commit_remove_file_tr0.txt
+
+
+[SEC_STS_TestCase008_Commit_post_commit_check_files]
+numexist=3
+exist0=c:\sts_test_dir\TestCase008_Commit_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase008_Commit_create_file_tr1.txt
+exist2=c:\sts_test_dir\TestCase008_Commit_overwrite_file_tr1.txt
+numnonexist=3
+nonexist0=c:\sts_test_dir\TestCase008_Commit_remove_file_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase008_Commit_register_temp_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase008_Commit_create_temp_tr1.txt
+
+[SEC_STS_TestCase008_Rollback_register_file_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase008_Rollback_register_file_tr0.txt
+
+[SEC_STS_TestCase008_Rollback_remove_file_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase008_Rollback_remove_file_tr0.txt
+
+[SEC_STS_TestCase008_Rollback_register_temp_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase008_Rollback_register_temp_tr0.txt
+
+[SEC_STS_TestCase008_Rollback_create_file_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase008_Rollback_create_file_tr1.txt
+
+[SEC_STS_TestCase008_Rollback_overwrite_file_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase008_Rollback_overwrite_file_tr1.txt
+
+[SEC_STS_TestCase008_Rollback_create_temp_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase008_Rollback_create_temp_tr1.txt
+
+
+[SEC_STS_TestCase008_Rollback_pre_rollback_check_files]
+numexist=5
+exist0=c:\sts_test_dir\TestCase008_Rollback_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase008_Rollback_register_temp_tr0.txt
+exist2=c:\sts_test_dir\TestCase008_Rollback_create_file_tr1.txt
+exist3=c:\sts_test_dir\TestCase008_Rollback_overwrite_file_tr1.txt
+exist4=c:\sts_test_dir\TestCase008_Rollback_create_temp_tr1.txt
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase008_Rollback_remove_file_tr0.txt
+
+[SEC_STS_TestCase008_Rollback_post_rollback_check_files]
+numexist=2
+exist0=c:\sts_test_dir\TestCase008_Rollback_remove_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase008_Rollback_overwrite_file_tr1.txt
+numnonexist=4
+nonexist0=c:\sts_test_dir\TestCase008_Rollback_register_file_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase008_Rollback_register_temp_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase008_Rollback_create_file_tr1.txt
+nonexist3=c:\sts_test_dir\TestCase008_Rollback_create_temp_tr1.txt
+
+[SEC_STS_TestCase009_open_by_random_id]
+trslot=0
+trid=123456
+
+
+[SEC_STS_TestCase010_tr0]
+trslot=0
+
+[SEC_STS_TestCase010_tr1]
+trslot=1
+
+[SEC_STS_TestCase010_register_file_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase010_register_file_tr0.txt
+
+[SEC_STS_TestCase010_register_file_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase010_register_file_tr1.txt
+
+[SEC_STS_TestCase010_create_file_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase010_create_file_tr0.txt
+
+[SEC_STS_TestCase010_create_file_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase010_create_file_tr1.txt
+
+[SEC_STS_TestCase010_remove_file_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+
+[SEC_STS_TestCase010_remove_file_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+
+[SEC_STS_TestCase010_register_temp_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+
+[SEC_STS_TestCase010_register_temp_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+
+[SEC_STS_TestCase010_create_temp_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase010_create_temp_tr0.txt
+
+[SEC_STS_TestCase010_create_temp_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase010_create_temp_tr1.txt
+
+[SEC_STS_TestCase010_overwrite_file_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+
+[SEC_STS_TestCase010_overwrite_file_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+
+
+[SEC_STS_TestCase010_before_any_commit_or_rollback]
+numexist=10
+exist0=c:\sts_test_dir\TestCase010_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase010_register_file_tr1.txt
+exist2=c:\sts_test_dir\TestCase010_create_file_tr0.txt
+exist3=c:\sts_test_dir\TestCase010_create_file_tr1.txt
+exist4=c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+exist5=c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+exist6=c:\sts_test_dir\TestCase010_create_temp_tr0.txt
+exist7=c:\sts_test_dir\TestCase010_create_temp_tr1.txt
+exist8=c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+exist9=c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+numnonexist=2
+nonexist0=c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+
+[SEC_STS_TestCase010a_after_tr0_commit_before_tr1_rollback]
+numexist=8
+exist0=c:\sts_test_dir\TestCase010_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase010_register_file_tr1.txt
+exist2=c:\sts_test_dir\TestCase010_create_file_tr0.txt
+exist3=c:\sts_test_dir\TestCase010_create_file_tr1.txt
+exist4=c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+exist5=c:\sts_test_dir\TestCase010_create_temp_tr1.txt
+exist6=c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+exist7=c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+numnonexist=4
+nonexist0=c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase010_create_temp_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+
+
+[SEC_STS_TestCase010a_final]
+numexist=5
+exist0=c:\sts_test_dir\TestCase010_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase010_create_file_tr0.txt
+exist2=c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+exist3=c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+exist4=c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+numnonexist=7
+nonexist0=c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase010_create_temp_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+nonexist4=c:\sts_test_dir\TestCase010_create_temp_tr1.txt
+nonexist5=c:\sts_test_dir\TestCase010_register_file_tr1.txt
+nonexist6=c:\sts_test_dir\TestCase010_create_file_tr1.txt
+
+[SEC_STS_TestCase010b_after_tr0_commit_before_tr1_commit]
+numexist=8
+exist0=c:\sts_test_dir\TestCase010_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase010_register_file_tr1.txt
+exist2=c:\sts_test_dir\TestCase010_create_file_tr0.txt
+exist3=c:\sts_test_dir\TestCase010_create_file_tr1.txt
+exist4=c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+exist5=c:\sts_test_dir\TestCase010_create_temp_tr1.txt
+exist6=c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+exist7=c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+numnonexist=4
+nonexist0=c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase010_create_temp_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+
+[SEC_STS_TestCase010b_final]
+numexist=6
+exist0=c:\sts_test_dir\TestCase010_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase010_create_file_tr0.txt
+exist2=c:\sts_test_dir\TestCase010_register_file_tr1.txt
+exist3=c:\sts_test_dir\TestCase010_create_file_tr1.txt
+exist4=c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+exist5=c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+numnonexist=6
+nonexist0=c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase010_create_temp_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+nonexist4=c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+nonexist5=c:\sts_test_dir\TestCase010_create_temp_tr1.txt
+
+[SEC_STS_TestCase010c_after_tr0_rollback_before_tr1_commit]
+numexist=7
+exist0=c:\sts_test_dir\TestCase010_register_file_tr1.txt
+exist1=c:\sts_test_dir\TestCase010_create_file_tr1.txt
+exist2=c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+exist3=c:\sts_test_dir\TestCase010_create_temp_tr1.txt
+exist4=c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+exist5=c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+exist6=c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+numnonexist=5
+nonexist0=c:\sts_test_dir\TestCase010_register_file_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase010_create_file_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase010_create_temp_tr0.txt
+nonexist4=c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+
+[SEC_STS_TestCase010c_final]
+numexist=5
+exist0=c:\sts_test_dir\TestCase010_register_file_tr1.txt
+exist1=c:\sts_test_dir\TestCase010_create_file_tr1.txt
+exist2=c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+exist3=c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+exist4=c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+numnonexist=7
+nonexist0=c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+nonexist1=c:\sts_test_dir\TestCase010_create_temp_tr1.txt
+nonexist2=c:\sts_test_dir\TestCase010_register_file_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase010_create_file_tr0.txt
+nonexist4=c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+nonexist5=c:\sts_test_dir\TestCase010_create_temp_tr0.txt
+nonexist6=c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+
+[SEC_STS_TestCase010d_after_tr0_rollback_before_tr1_rollback]
+numexist=7
+exist0=c:\sts_test_dir\TestCase010_register_file_tr1.txt
+exist1=c:\sts_test_dir\TestCase010_create_file_tr1.txt
+exist2=c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+exist3=c:\sts_test_dir\TestCase010_create_temp_tr1.txt
+exist4=c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+exist5=c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+exist6=c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+numnonexist=5
+nonexist0=c:\sts_test_dir\TestCase010_register_file_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase010_create_file_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase010_create_temp_tr0.txt
+nonexist4=c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+
+[SEC_STS_TestCase010d_final]
+numexist=4
+exist0=c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+exist2=c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+exist3=c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+numnonexist=8
+nonexist0=c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+nonexist1=c:\sts_test_dir\TestCase010_create_temp_tr1.txt
+nonexist2=c:\sts_test_dir\TestCase010_register_file_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase010_create_file_tr0.txt
+nonexist4=c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+nonexist5=c:\sts_test_dir\TestCase010_create_temp_tr0.txt
+nonexist6=c:\sts_test_dir\TestCase010_register_file_tr1.txt
+nonexist7=c:\sts_test_dir\TestCase010_create_file_tr1.txt
+
+
+[SEC_STS_TestCase011]
+trslot=0
+
+[SEC_STS_TestCase011_register_file_drive1]
+trslot=0
+target=c:\sts_test_dir\TestCase011_register_file_drive1.txt
+
+[SEC_STS_TestCase011_create_file_drive1]
+trslot=0
+target=c:\sts_test_dir\TestCase011_create_file_drive1.txt
+
+[SEC_STS_TestCase011_register_temp_drive1]
+trslot=0
+target=c:\sts_test_dir\TestCase011_register_temp_drive1.txt
+
+[SEC_STS_TestCase011_create_temp_drive1]
+trslot=0
+target=c:\sts_test_dir\TestCase011_create_temp_drive1.txt
+
+[SEC_STS_TestCase011_remove_file_drive1]
+trslot=0
+target=c:\sts_test_dir\TestCase011_remove_file_drive1.txt
+
+[SEC_STS_TestCase011_overwrite_file_drive1]
+trslot=0
+target=c:\sts_test_dir\TestCase011_overwrite_file_drive1.txt
+
+
+[SEC_STS_TestCase011_register_file_drive2]
+trslot=0
+target=e:\sts_test_dir\TestCase011_register_file_drive2.txt
+
+[SEC_STS_TestCase011_create_file_drive2]
+trslot=0
+target=e:\sts_test_dir\TestCase011_create_file_drive2.txt
+
+[SEC_STS_TestCase011_register_temp_drive2]
+trslot=0
+target=e:\sts_test_dir\TestCase011_register_temp_drive2.txt
+
+[SEC_STS_TestCase011_create_temp_drive2]
+trslot=0
+target=e:\sts_test_dir\TestCase011_create_temp_drive2.txt
+
+[SEC_STS_TestCase011_remove_file_drive2]
+trslot=0
+target=e:\sts_test_dir\TestCase011_remove_file_drive2.txt
+
+[SEC_STS_TestCase011_overwrite_file_drive2]
+trslot=0
+target=e:\sts_test_dir\TestCase011_overwrite_file_drive2.txt
+
+[SEC_STS_TestCase011_pre_commit_or_rollback]
+numexist=10
+exist0=c:\sts_test_dir\TestCase011_register_file_drive1.txt
+exist1=c:\sts_test_dir\TestCase011_create_file_drive1.txt
+exist2=c:\sts_test_dir\TestCase011_register_temp_drive1.txt
+exist3=c:\sts_test_dir\TestCase011_create_temp_drive1.txt
+exist4=c:\sts_test_dir\TestCase011_overwrite_file_drive1.txt
+exist5=e:\sts_test_dir\TestCase011_register_file_drive2.txt
+exist6=e:\sts_test_dir\TestCase011_create_file_drive2.txt
+exist7=e:\sts_test_dir\TestCase011_register_temp_drive2.txt
+exist8=e:\sts_test_dir\TestCase011_create_temp_drive2.txt
+exist9=e:\sts_test_dir\TestCase011_overwrite_file_drive2.txt
+numnonexist=2
+nonexist0=c:\sts_test_dir\TestCase011_remove_file_drive1.txt
+nonexist1=e:\sts_test_dir\TestCase011_remove_file_drive2.txt
+
+[SEC_STS_TestCase011_post_commit]
+numexist=6
+exist0=c:\sts_test_dir\TestCase011_register_file_drive1.txt
+exist1=c:\sts_test_dir\TestCase011_create_file_drive1.txt
+exist2=c:\sts_test_dir\TestCase011_overwrite_file_drive1.txt
+exist3=e:\sts_test_dir\TestCase011_register_file_drive2.txt
+exist4=e:\sts_test_dir\TestCase011_create_file_drive2.txt
+exist5=e:\sts_test_dir\TestCase011_overwrite_file_drive2.txt
+numnonexist=6
+nonexist0=c:\sts_test_dir\TestCase011_remove_file_drive1.txt
+nonexist1=e:\sts_test_dir\TestCase011_remove_file_drive2.txt
+nonexist2=c:\sts_test_dir\TestCase011_register_temp_drive1.txt
+nonexist3=c:\sts_test_dir\TestCase011_create_temp_drive1.txt
+nonexist4=e:\sts_test_dir\TestCase011_register_temp_drive2.txt
+nonexist5=e:\sts_test_dir\TestCase011_create_temp_drive2.txt
+
+[SEC_STS_TestCase011_post_rollback]
+numexist=4
+exist0=c:\sts_test_dir\TestCase011_overwrite_file_drive1.txt
+exist1=e:\sts_test_dir\TestCase011_overwrite_file_drive2.txt
+exist2=c:\sts_test_dir\TestCase011_remove_file_drive1.txt
+exist3=e:\sts_test_dir\TestCase011_remove_file_drive2.txt
+numnonexist=8
+nonexist0=c:\sts_test_dir\TestCase011_register_file_drive1.txt
+nonexist1=c:\sts_test_dir\TestCase011_create_file_drive1.txt
+nonexist2=c:\sts_test_dir\TestCase011_register_temp_drive1.txt
+nonexist3=c:\sts_test_dir\TestCase011_create_temp_drive1.txt
+nonexist4=e:\sts_test_dir\TestCase011_register_file_drive2.txt
+nonexist5=e:\sts_test_dir\TestCase011_create_file_drive2.txt
+nonexist6=e:\sts_test_dir\TestCase011_register_temp_drive2.txt
+nonexist7=e:\sts_test_dir\TestCase011_create_temp_drive2.txt
+
+[SEC_STS_TestCase012_tr0]
+trslot=0
+
+[SEC_STS_TestCase012_tr1]
+trslot=1
+
+[SEC_STS_TestCase012_register_file_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase012_register_file_tr0.txt
+
+[SEC_STS_TestCase012_register_file_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase012_register_file_tr1.txt
+
+[SEC_STS_TestCase012_create_file_tr0]
+trslot=0
+target=e:\sts_test_dir\TestCase012_create_file_tr0.txt
+
+[SEC_STS_TestCase012_create_file_tr1]
+trslot=1
+target=e:\sts_test_dir\TestCase012_create_file_tr1.txt
+
+[SEC_STS_TestCase012_remove_file_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+
+[SEC_STS_TestCase012_remove_file_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+
+[SEC_STS_TestCase012_register_temp_tr0]
+trslot=0
+target=e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+
+[SEC_STS_TestCase012_register_temp_tr1]
+trslot=1
+target=e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+
+[SEC_STS_TestCase012_create_temp_tr0]
+trslot=0
+target=c:\sts_test_dir\TestCase012_create_temp_tr0.txt
+
+[SEC_STS_TestCase012_create_temp_tr1]
+trslot=1
+target=c:\sts_test_dir\TestCase012_create_temp_tr1.txt
+
+[SEC_STS_TestCase012_overwrite_file_tr0]
+trslot=0
+target=e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+
+[SEC_STS_TestCase012_overwrite_file_tr1]
+trslot=1
+target=e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+
+
+[SEC_STS_TestCase012_before_any_commit_or_rollback]
+numexist=10
+exist0=c:\sts_test_dir\TestCase012_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase012_register_file_tr1.txt
+exist2=e:\sts_test_dir\TestCase012_create_file_tr0.txt
+exist3=e:\sts_test_dir\TestCase012_create_file_tr1.txt
+exist4=e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+exist5=e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+exist6=c:\sts_test_dir\TestCase012_create_temp_tr0.txt
+exist7=c:\sts_test_dir\TestCase012_create_temp_tr1.txt
+exist8=e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+exist9=e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+numnonexist=2
+nonexist0=c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+
+[SEC_STS_TestCase012a_after_tr0_commit_before_tr1_rollback]
+numexist=8
+exist0=c:\sts_test_dir\TestCase012_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase012_register_file_tr1.txt
+exist2=e:\sts_test_dir\TestCase012_create_file_tr0.txt
+exist3=e:\sts_test_dir\TestCase012_create_file_tr1.txt
+exist4=e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+exist5=c:\sts_test_dir\TestCase012_create_temp_tr1.txt
+exist6=e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+exist7=e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+numnonexist=4
+nonexist0=e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase012_create_temp_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+
+[SEC_STS_TestCase012a_final]
+numexist=5
+exist0=c:\sts_test_dir\TestCase012_register_file_tr0.txt
+exist1=e:\sts_test_dir\TestCase012_create_file_tr0.txt
+exist2=e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+exist3=e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+exist4=c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+numnonexist=7
+nonexist0=e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase012_create_temp_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+nonexist3=e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+nonexist4=c:\sts_test_dir\TestCase012_create_temp_tr1.txt
+nonexist5=c:\sts_test_dir\TestCase012_register_file_tr1.txt
+nonexist6=e:\sts_test_dir\TestCase012_create_file_tr1.txt
+
+[SEC_STS_TestCase012b_after_tr0_commit_before_tr1_commit]
+numexist=8
+exist0=c:\sts_test_dir\TestCase012_register_file_tr0.txt
+exist1=c:\sts_test_dir\TestCase012_register_file_tr1.txt
+exist2=e:\sts_test_dir\TestCase012_create_file_tr0.txt
+exist3=e:\sts_test_dir\TestCase012_create_file_tr1.txt
+exist4=e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+exist5=c:\sts_test_dir\TestCase012_create_temp_tr1.txt
+exist6=e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+exist7=e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+numnonexist=4
+nonexist0=e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase012_create_temp_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+
+[SEC_STS_TestCase012b_final]
+numexist=6
+exist0=c:\sts_test_dir\TestCase012_register_file_tr0.txt
+exist1=e:\sts_test_dir\TestCase012_create_file_tr0.txt
+exist2=c:\sts_test_dir\TestCase012_register_file_tr1.txt
+exist3=e:\sts_test_dir\TestCase012_create_file_tr1.txt
+exist4=e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+exist5=e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+numnonexist=6
+nonexist0=e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+nonexist1=c:\sts_test_dir\TestCase012_create_temp_tr0.txt
+nonexist2=c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+nonexist4=e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+nonexist5=c:\sts_test_dir\TestCase012_create_temp_tr1.txt
+
+[SEC_STS_TestCase012c_after_tr0_rollback_before_tr1_commit]
+numexist=7
+exist0=c:\sts_test_dir\TestCase012_register_file_tr1.txt
+exist1=e:\sts_test_dir\TestCase012_create_file_tr1.txt
+exist2=e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+exist3=c:\sts_test_dir\TestCase012_create_temp_tr1.txt
+exist4=e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+exist5=e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+exist6=c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+numnonexist=5
+nonexist0=c:\sts_test_dir\TestCase012_register_file_tr0.txt
+nonexist1=e:\sts_test_dir\TestCase012_create_file_tr0.txt
+nonexist2=e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase012_create_temp_tr0.txt
+nonexist4=c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+
+[SEC_STS_TestCase012c_final]
+numexist=5
+exist0=c:\sts_test_dir\TestCase012_register_file_tr1.txt
+exist1=e:\sts_test_dir\TestCase012_create_file_tr1.txt
+exist2=e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+exist3=e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+exist4=c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+numnonexist=7
+nonexist0=e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+nonexist1=c:\sts_test_dir\TestCase012_create_temp_tr1.txt
+nonexist2=c:\sts_test_dir\TestCase012_register_file_tr0.txt
+nonexist3=e:\sts_test_dir\TestCase012_create_file_tr0.txt
+nonexist4=e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+nonexist5=c:\sts_test_dir\TestCase012_create_temp_tr0.txt
+nonexist6=c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+
+[SEC_STS_TestCase012d_after_tr0_rollback_before_tr1_rollback]
+numexist=7
+exist0=c:\sts_test_dir\TestCase012_register_file_tr1.txt
+exist1=e:\sts_test_dir\TestCase012_create_file_tr1.txt
+exist2=e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+exist3=c:\sts_test_dir\TestCase012_create_temp_tr1.txt
+exist4=e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+exist5=e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+exist6=c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+numnonexist=5
+nonexist0=c:\sts_test_dir\TestCase012_register_file_tr0.txt
+nonexist1=e:\sts_test_dir\TestCase012_create_file_tr0.txt
+nonexist2=e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+nonexist3=c:\sts_test_dir\TestCase012_create_temp_tr0.txt
+nonexist4=c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+
+[SEC_STS_TestCase012d_final]
+numexist=4
+exist0=e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+exist1=e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+exist2=c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+exist3=c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+numnonexist=8
+nonexist0=e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+nonexist1=c:\sts_test_dir\TestCase012_create_temp_tr1.txt
+nonexist2=c:\sts_test_dir\TestCase012_register_file_tr0.txt
+nonexist3=e:\sts_test_dir\TestCase012_create_file_tr0.txt
+nonexist4=e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+nonexist5=c:\sts_test_dir\TestCase012_create_temp_tr0.txt
+nonexist6=c:\sts_test_dir\TestCase012_register_file_tr1.txt
+nonexist7=e:\sts_test_dir\TestCase012_create_file_tr1.txt
+
+
+
+[SEC_STS_TestCase013]
+trslot=5
+target=c:\sts_test_dir\TestCase013.txt
+
+[SEC_STS_TestCase013_file_not_exist]
+numnonexist=1
+nonexist0=c:\sts_test_dir\TestCase013.txt
+
+[SEC_STS_TestCase013_file_exists]
+numexist=1
+exist0=c:\sts_test_dir\TestCase013.txt
+
+
+
+[SEC_STS_TestCase014]
+trslot=0
+target=c:\sts_test_dir\SEC_STS_TestCase014_dummydir
+
+[SEC_STS_TestCase014_pre_rollback]
+numexist=2
+exist0=c:\sts_test_dir\SEC_STS_TestCase014_dummydir
+exist1=c:\sts_test_dir\SEC_STS_TestCase014_dummydir\SEC_STS_TestCase014.txt
+
+[SEC_STS_TestCase014_post_rollback]
+numnonexist=2
+nonexist0=c:\sts_test_dir\SEC_STS_TestCase014_dummydir
+nonexist1=c:\sts_test_dir\SEC_STS_TestCase014_dummydir\SEC_STS_TestCase014.txt
+
+[SEC_STS_TestCase015]
+trslot=0
+target=c:\sts_test_dir\SEC_STS_TestCase015_dummydir
+
+[SEC_STS_TestCase015_pre_post_commit]
+numexist=2
+exist0=c:\sts_test_dir\SEC_STS_TestCase015_dummydir
+exist1=c:\sts_test_dir\SEC_STS_TestCase015_dummydir\SEC_STS_TestCase015.txt
+
+
+[SEC_STS_TestCase016]
+trslot=0
+
+[SEC_STS_TestCase016_dir]
+trslot=0
+target=c:\sts_test_dir\SEC_STS_TestCase016_dummydir
+
+[SEC_STS_TestCase016_file]
+trslot=0
+target=c:\sts_test_dir\SEC_STS_TestCase016_dummydir\SEC_STS_TestCase016.txt
+
+[SEC_STS_TestCase016_pre_rollback]
+numexist=2
+exist0=c:\sts_test_dir\SEC_STS_TestCase016_dummydir
+exist1=c:\sts_test_dir\SEC_STS_TestCase016_dummydir\SEC_STS_TestCase016.txt
+
+[SEC_STS_TestCase016_post_rollback]
+numnonexist=2
+nonexist0=c:\sts_test_dir\SEC_STS_TestCase016_dummydir
+nonexist1=c:\sts_test_dir\SEC_STS_TestCase016_dummydir\SEC_STS_TestCase016.txt
+
+[SEC_STS_TestCase017]
+trslot=0
+
+[SEC_STS_TestCase017_dir]
+trslot=0
+target=c:\sts_test_dir\SEC_STS_TestCase017_dummydir
+
+[SEC_STS_TestCase017_file]
+trslot=0
+target=c:\sts_test_dir\SEC_STS_TestCase017_dummydir\SEC_STS_TestCase017.txt
+
+[SEC_STS_TestCase017_pre_post_commit]
+numexist=2
+exist0=c:\sts_test_dir\SEC_STS_TestCase017_dummydir
+exist1=c:\sts_test_dir\SEC_STS_TestCase017_dummydir\SEC_STS_TestCase017.txt
+
+
+[SEC_STS_TestCase018]
+trslot=0
+target=c:\sts_test_dir\SEC_STS_TestCase018_dummydir
+
+[SEC_STS_TestCase018_pre_rollback]
+numnonexist=2
+nonexist0=c:\sts_test_dir\SEC_STS_TestCase018_dummydir
+nonexist1=c:\sts_test_dir\SEC_STS_TestCase018_dummydir\SEC_STS_TestCase018.txt
+
+[SEC_STS_TestCase018_post_rollback]
+numexist=2
+exist0=c:\sts_test_dir\SEC_STS_TestCase018_dummydir
+exist1=c:\sts_test_dir\SEC_STS_TestCase018_dummydir\SEC_STS_TestCase018.txt
+
+
+[SEC_STS_TestCase019]
+trslot=0
+target=c:\sts_test_dir\SEC_STS_TestCase019_dummydir
+
+[SEC_STS_TestCase019_pre_post_commmit]
+numnonexist=2
+nonexist0=c:\sts_test_dir\SEC_STS_TestCase019_dummydir
+nonexist1=c:\sts_test_dir\SEC_STS_TestCase019_dummydir\SEC_STS_TestCase019.txt
+
+[SEC_STS_TestCase020]
+trslot=0
+target=c:\sts_test_dir\SEC_STS_TestCase020.txt
+
+[SEC_STS_TestCase021_create_new_or_temp]
+trslot=0
+target=z:\sts_test_dir\SEC_STS_TestCase021.txt
+numnonexist=1
+nonexist0=z:\sts_test_dir\SEC_STS_TestCase021.txt
+
+[SEC_STS_TestCase021_overwrite]
+trslot=0
+target=z:\tusif\tsts\tsts.script
+
+[SEC_STS_TestCase022]
+trslot=0
+target=z:\sts_test_dir\SEC_STS_TestCase022.txt
+
+[SEC_STS_TestCase023]
+trslot=0
+target=test.fil
+
+[SEC_STS_TestCase024]
+trslot=0
+target=c:\test.fil
+
+[SEC_STS_TestCase025_1]
+trslot=0
+target=c:\nonexistent.file
+
+[SEC_STS_TestCase025_2]
+trslot=0
+target=c:\nonexistentdir\nonexistent.file
+
+[SEC_STS_TestCase026]
+trslot=0
+target=c:\sts_test_dir\SEC_STS_TestCase026.txt
+
+[SEC_STS_TestCase027]
+trslot=0
+target=q:\nonexistentdrivedir\nonexistent.file
+
+[SEC_STS_TestCase028_TCB_dir_setup]
+operations=18
+operation0=rmdir -i c:\sys\install\integrityservices\
+operation1=rmdir -i e:\sys\install\integrityservices\
+operation2=mkdirall -i c:\sys\install\integrityservices\
+operation3=mkdirall -i e:\sys\install\integrityservices\
+operation4=copy z:\tusif\tsts\data\rollbackall\testcase1\c_drive c:\sys\install\integrityservices
+operation5=copy z:\tusif\tsts\data\rollbackall\testcase1\e_drive e:\sys\install\integrityservices
+operation6=copy z:\tusif\tsts\data\rollbackall\testcase2\c_drive c:\sys\install\integrityservices
+operation7=copy z:\tusif\tsts\data\rollbackall\testcase2\e_drive e:\sys\install\integrityservices
+operation8=copy z:\tusif\tsts\data\rollbackall\testcase3\c_drive c:\sys\install\integrityservices
+operation9=copy z:\tusif\tsts\data\rollbackall\testcase3\e_drive e:\sys\install\integrityservices
+operation10=copy z:\tusif\tsts\data\rollbackall\testcase4\c_drive c:\sys\install\integrityservices
+operation11=copy z:\tusif\tsts\data\rollbackall\testcase4\e_drive e:\sys\install\integrityservices
+operation12=copy z:\tusif\tsts\data\rollbackall\testcase5\c_drive c:\sys\install\integrityservices
+operation13=copy z:\tusif\tsts\data\rollbackall\testcase5\e_drive e:\sys\install\integrityservices
+operation14=copy z:\tusif\tsts\data\rollbackall\testcase6\c_drive c:\sys\install\integrityservices
+operation15=copy z:\tusif\tsts\data\rollbackall\testcase6\e_drive e:\sys\install\integrityservices
+operation16=attrib r- c:\sys\install\integrityservices\*.*
+operation17=attrib r- e:\sys\install\integrityservices\*.*
+
+[file_system_cleanup]
+operations=8
+operation0=attrib -i r- c:\sys\install\integrityservices\*.*
+operation1=attrib -i r- e:\sys\install\integrityservices\*.*
+operation2=attrib -i r- c:\sts_test_dir\*.*
+operation3=attrib -i r- e:\sts_test_dir\*.*
+operation4=rmdir -i c:\sys\install\integrityservices\
+operation5=rmdir -i e:\sys\install\integrityservices\
+operation6=rmdir -i c:\sts_test_dir\
+operation7=rmdir -i e:\sts_test_dir\
+
+[SEC_STS_TestCase028]
+trslot=0
+
+[SEC_STS_TestCase028_pre_rollbackall]
+numexist=52
+exist0=c:\sts_test_dir\RollbackAllTestCase1_register_file_drive1.txt
+exist1=c:\sts_test_dir\RollbackAllTestCase1_create_file_drive1.txt
+exist2=c:\sts_test_dir\RollbackAllTestCase1_register_temp_drive1.txt
+exist3=c:\sts_test_dir\RollbackAllTestCase1_create_temp_drive1.txt
+exist4=c:\sts_test_dir\RollbackAllTestCase1_overwrite_file_drive1.txt
+exist5=e:\sts_test_dir\RollbackAllTestCase1_register_file_drive2.txt
+exist6=e:\sts_test_dir\RollbackAllTestCase1_create_file_drive2.txt
+exist7=e:\sts_test_dir\RollbackAllTestCase1_register_temp_drive2.txt
+exist8=e:\sts_test_dir\RollbackAllTestCase1_create_temp_drive2.txt
+exist9=e:\sts_test_dir\RollbackAllTestCase1_overwrite_file_drive2.txt
+
+exist10=c:\sts_test_dir\RollbackAllTestCase2_register_file_drive1.txt
+exist11=c:\sts_test_dir\RollbackAllTestCase2_create_file_drive1.txt
+exist12=c:\sts_test_dir\RollbackAllTestCase2_register_temp_drive1.txt
+exist13=c:\sts_test_dir\RollbackAllTestCase2_create_temp_drive1.txt
+exist14=c:\sts_test_dir\RollbackAllTestCase2_overwrite_file_drive1.txt
+exist15=e:\sts_test_dir\RollbackAllTestCase2_register_file_drive2.txt
+exist16=e:\sts_test_dir\RollbackAllTestCase2_create_file_drive2.txt
+exist17=e:\sts_test_dir\RollbackAllTestCase2_register_temp_drive2.txt
+exist18=e:\sts_test_dir\RollbackAllTestCase2_create_temp_drive2.txt
+exist19=e:\sts_test_dir\RollbackAllTestCase2_overwrite_file_drive2.txt
+
+exist20=c:\sts_test_dir\RollbackAllTestCase3_register_file_drive1.txt
+exist21=c:\sts_test_dir\RollbackAllTestCase3_create_file_drive1.txt
+exist22=c:\sts_test_dir\RollbackAllTestCase3_register_temp_drive1.txt
+exist23=c:\sts_test_dir\RollbackAllTestCase3_create_temp_drive1.txt
+exist24=c:\sts_test_dir\RollbackAllTestCase3_overwrite_file_drive1.txt
+exist25=e:\sts_test_dir\RollbackAllTestCase3_register_file_drive2.txt
+exist26=e:\sts_test_dir\RollbackAllTestCase3_create_file_drive2.txt
+exist27=e:\sts_test_dir\RollbackAllTestCase3_register_temp_drive2.txt
+exist28=e:\sts_test_dir\RollbackAllTestCase3_create_temp_drive2.txt
+exist29=e:\sts_test_dir\RollbackAllTestCase3_overwrite_file_drive2.txt
+
+exist30=c:\sts_test_dir\RollbackAllTestCase4_register_file_drive1.txt
+exist31=c:\sts_test_dir\RollbackAllTestCase4_create_file_drive1.txt
+exist32=c:\sts_test_dir\RollbackAllTestCase4_register_temp_drive1.txt
+exist33=c:\sts_test_dir\RollbackAllTestCase4_create_temp_drive1.txt
+exist34=c:\sts_test_dir\RollbackAllTestCase4_overwrite_file_drive1.txt
+exist35=e:\sts_test_dir\RollbackAllTestCase4_register_file_drive2.txt
+exist36=e:\sts_test_dir\RollbackAllTestCase4_create_file_drive2.txt
+exist37=e:\sts_test_dir\RollbackAllTestCase4_register_temp_drive2.txt
+exist38=e:\sts_test_dir\RollbackAllTestCase4_create_temp_drive2.txt
+exist39=e:\sts_test_dir\RollbackAllTestCase4_overwrite_file_drive2.txt
+
+exist40=c:\sts_test_dir\RollbackAllTestCase5_register_file_drive1.txt
+exist41=c:\sts_test_dir\RollbackAllTestCase5_create_file_drive1.txt
+exist42=c:\sts_test_dir\RollbackAllTestCase5_overwrite_file_drive1.txt
+exist43=e:\sts_test_dir\RollbackAllTestCase5_register_file_drive2.txt
+exist44=e:\sts_test_dir\RollbackAllTestCase5_create_file_drive2.txt
+exist45=e:\sts_test_dir\RollbackAllTestCase5_overwrite_file_drive2.txt
+
+exist46=c:\sts_test_dir\RollbackAllTestCase6_register_file_drive1.txt
+exist47=c:\sts_test_dir\RollbackAllTestCase6_create_file_drive1.txt
+exist48=c:\sts_test_dir\RollbackAllTestCase6_overwrite_file_drive1.txt
+exist49=e:\sts_test_dir\RollbackAllTestCase6_register_file_drive2.txt
+exist50=e:\sts_test_dir\RollbackAllTestCase6_create_file_drive2.txt
+exist51=e:\sts_test_dir\RollbackAllTestCase6_overwrite_file_drive2.txt
+
+numnonexist=20
+nonexist0=c:\sts_test_dir\RollbackAllTestCase1_remove_file_drive1.txt
+nonexist1=e:\sts_test_dir\RollbackAllTestCase1_remove_file_drive2.txt
+
+nonexist2=c:\sts_test_dir\RollbackAllTestCase2_remove_file_drive1.txt
+nonexist3=e:\sts_test_dir\RollbackAllTestCase2_remove_file_drive2.txt
+
+nonexist4=c:\sts_test_dir\RollbackAllTestCase3_remove_file_drive1.txt
+nonexist5=e:\sts_test_dir\RollbackAllTestCase3_remove_file_drive2.txt
+
+nonexist6=c:\sts_test_dir\RollbackAllTestCase4_remove_file_drive1.txt
+nonexist7=e:\sts_test_dir\RollbackAllTestCase4_remove_file_drive2.txt
+
+nonexist8=c:\sts_test_dir\RollbackAllTestCase5_remove_file_drive1.txt
+nonexist9=e:\sts_test_dir\RollbackAllTestCase5_remove_file_drive2.txt
+nonexist10=c:\sts_test_dir\RollbackAllTestCase5_register_temp_drive1.txt
+nonexist11=c:\sts_test_dir\RollbackAllTestCase5_create_temp_drive1.txt
+nonexist12=e:\sts_test_dir\RollbackAllTestCase5_register_temp_drive2.txt
+nonexist13=e:\sts_test_dir\RollbackAllTestCase5_create_temp_drive2.txt
+
+nonexist14=c:\sts_test_dir\RollbackAllTestCase6_remove_file_drive1.txt
+nonexist15=e:\sts_test_dir\RollbackAllTestCase6_remove_file_drive2.txt
+nonexist16=c:\sts_test_dir\RollbackAllTestCase6_register_temp_drive1.txt
+nonexist17=c:\sts_test_dir\RollbackAllTestCase6_create_temp_drive1.txt
+nonexist18=e:\sts_test_dir\RollbackAllTestCase6_register_temp_drive2.txt
+nonexist19=e:\sts_test_dir\RollbackAllTestCase6_create_temp_drive2.txt
+
+[SEC_STS_TestCase028_post_rollbackall]
+numexist=34
+exist0=c:\sts_test_dir\RollbackAllTestCase1_overwrite_file_drive1.txt
+exist1=e:\sts_test_dir\RollbackAllTestCase1_overwrite_file_drive2.txt
+exist2=c:\sts_test_dir\RollbackAllTestCase1_remove_file_drive1.txt
+exist3=e:\sts_test_dir\RollbackAllTestCase1_remove_file_drive2.txt
+
+exist4=c:\sts_test_dir\RollbackAllTestCase2_register_file_drive1.txt
+exist5=c:\sts_test_dir\RollbackAllTestCase2_create_file_drive1.txt
+exist6=c:\sts_test_dir\RollbackAllTestCase2_overwrite_file_drive1.txt
+exist7=e:\sts_test_dir\RollbackAllTestCase2_register_file_drive2.txt
+exist8=e:\sts_test_dir\RollbackAllTestCase2_create_file_drive2.txt
+exist9=e:\sts_test_dir\RollbackAllTestCase2_overwrite_file_drive2.txt
+
+exist10=c:\sts_test_dir\RollbackAllTestCase3_register_file_drive1.txt
+exist11=c:\sts_test_dir\RollbackAllTestCase3_create_file_drive1.txt
+exist12=c:\sts_test_dir\RollbackAllTestCase3_overwrite_file_drive1.txt
+exist13=e:\sts_test_dir\RollbackAllTestCase3_register_file_drive2.txt
+exist14=e:\sts_test_dir\RollbackAllTestCase3_create_file_drive2.txt
+exist15=e:\sts_test_dir\RollbackAllTestCase3_overwrite_file_drive2.txt
+
+exist16=c:\sts_test_dir\RollbackAllTestCase4_register_file_drive1.txt
+exist17=c:\sts_test_dir\RollbackAllTestCase4_create_file_drive1.txt
+exist18=c:\sts_test_dir\RollbackAllTestCase4_overwrite_file_drive1.txt
+exist19=e:\sts_test_dir\RollbackAllTestCase4_register_file_drive2.txt
+exist20=e:\sts_test_dir\RollbackAllTestCase4_create_file_drive2.txt
+exist21=e:\sts_test_dir\RollbackAllTestCase4_overwrite_file_drive2.txt
+
+exist22=c:\sts_test_dir\RollbackAllTestCase5_register_file_drive1.txt
+exist23=c:\sts_test_dir\RollbackAllTestCase5_create_file_drive1.txt
+exist24=c:\sts_test_dir\RollbackAllTestCase5_overwrite_file_drive1.txt
+exist25=e:\sts_test_dir\RollbackAllTestCase5_register_file_drive2.txt
+exist26=e:\sts_test_dir\RollbackAllTestCase5_create_file_drive2.txt
+exist27=e:\sts_test_dir\RollbackAllTestCase5_overwrite_file_drive2.txt
+
+exist28=c:\sts_test_dir\RollbackAllTestCase6_register_file_drive1.txt
+exist29=c:\sts_test_dir\RollbackAllTestCase6_create_file_drive1.txt
+exist30=c:\sts_test_dir\RollbackAllTestCase6_overwrite_file_drive1.txt
+exist31=e:\sts_test_dir\RollbackAllTestCase6_register_file_drive2.txt
+exist32=e:\sts_test_dir\RollbackAllTestCase6_create_file_drive2.txt
+exist33=e:\sts_test_dir\RollbackAllTestCase6_overwrite_file_drive2.txt
+
+numnonexist=38
+nonexist0=c:\sts_test_dir\RollbackAllTestCase1_register_file_drive1.txt
+nonexist1=c:\sts_test_dir\RollbackAllTestCase1_create_file_drive1.txt
+nonexist2=c:\sts_test_dir\RollbackAllTestCase1_register_temp_drive1.txt
+nonexist3=c:\sts_test_dir\RollbackAllTestCase1_create_temp_drive1.txt
+nonexist4=e:\sts_test_dir\RollbackAllTestCase1_register_file_drive2.txt
+nonexist5=e:\sts_test_dir\RollbackAllTestCase1_create_file_drive2.txt
+nonexist6=e:\sts_test_dir\RollbackAllTestCase1_register_temp_drive2.txt
+nonexist7=e:\sts_test_dir\RollbackAllTestCase1_create_temp_drive2.txt
+
+nonexist8=c:\sts_test_dir\RollbackAllTestCase2_remove_file_drive1.txt
+nonexist9=e:\sts_test_dir\RollbackAllTestCase2_remove_file_drive2.txt
+nonexist10=c:\sts_test_dir\RollbackAllTestCase2_register_temp_drive1.txt
+nonexist11=c:\sts_test_dir\RollbackAllTestCase2_create_temp_drive1.txt
+nonexist12=e:\sts_test_dir\RollbackAllTestCase2_register_temp_drive2.txt
+nonexist13=e:\sts_test_dir\RollbackAllTestCase2_create_temp_drive2.txt
+
+nonexist14=c:\sts_test_dir\RollbackAllTestCase3_remove_file_drive1.txt
+nonexist15=e:\sts_test_dir\RollbackAllTestCase3_remove_file_drive2.txt
+nonexist16=c:\sts_test_dir\RollbackAllTestCase3_register_temp_drive1.txt
+nonexist17=c:\sts_test_dir\RollbackAllTestCase3_create_temp_drive1.txt
+nonexist18=e:\sts_test_dir\RollbackAllTestCase3_register_temp_drive2.txt
+nonexist19=e:\sts_test_dir\RollbackAllTestCase3_create_temp_drive2.txt
+
+nonexist20=c:\sts_test_dir\RollbackAllTestCase4_remove_file_drive1.txt
+nonexist21=e:\sts_test_dir\RollbackAllTestCase4_remove_file_drive2.txt
+nonexist22=c:\sts_test_dir\RollbackAllTestCase4_register_temp_drive1.txt
+nonexist23=c:\sts_test_dir\RollbackAllTestCase4_create_temp_drive1.txt
+nonexist24=e:\sts_test_dir\RollbackAllTestCase4_register_temp_drive2.txt
+nonexist25=e:\sts_test_dir\RollbackAllTestCase4_create_temp_drive2.txt
+
+nonexist26=c:\sts_test_dir\RollbackAllTestCase5_remove_file_drive1.txt
+nonexist27=e:\sts_test_dir\RollbackAllTestCase5_remove_file_drive2.txt
+nonexist28=c:\sts_test_dir\RollbackAllTestCase5_register_temp_drive1.txt
+nonexist29=c:\sts_test_dir\RollbackAllTestCase5_create_temp_drive1.txt
+nonexist30=e:\sts_test_dir\RollbackAllTestCase5_register_temp_drive2.txt
+nonexist31=e:\sts_test_dir\RollbackAllTestCase5_create_temp_drive2.txt
+
+nonexist32=c:\sts_test_dir\RollbackAllTestCase6_remove_file_drive1.txt
+nonexist33=e:\sts_test_dir\RollbackAllTestCase6_remove_file_drive2.txt
+nonexist34=c:\sts_test_dir\RollbackAllTestCase6_register_temp_drive1.txt
+nonexist35=c:\sts_test_dir\RollbackAllTestCase6_create_temp_drive1.txt
+nonexist36=e:\sts_test_dir\RollbackAllTestCase6_register_temp_drive2.txt
+nonexist37=e:\sts_test_dir\RollbackAllTestCase6_create_temp_drive2.txt
+
+[SEC_STS_TestCase029_post_recovery]
+numexist=34
+exist0=c:\sts_test_dir\RollbackAllTestCase1_overwrite_file_drive1.txt
+exist1=e:\sts_test_dir\RollbackAllTestCase1_overwrite_file_drive2.txt
+exist2=c:\sts_test_dir\RollbackAllTestCase1_remove_file_drive1.txt
+exist3=e:\sts_test_dir\RollbackAllTestCase1_remove_file_drive2.txt
+
+exist4=c:\sts_test_dir\RollbackAllTestCase2_register_file_drive1.txt
+exist5=c:\sts_test_dir\RollbackAllTestCase2_create_file_drive1.txt
+exist6=c:\sts_test_dir\RollbackAllTestCase2_overwrite_file_drive1.txt
+exist7=e:\sts_test_dir\RollbackAllTestCase2_register_file_drive2.txt
+exist8=e:\sts_test_dir\RollbackAllTestCase2_create_file_drive2.txt
+exist9=e:\sts_test_dir\RollbackAllTestCase2_overwrite_file_drive2.txt
+
+exist10=c:\sts_test_dir\RollbackAllTestCase3_register_file_drive1.txt
+exist11=c:\sts_test_dir\RollbackAllTestCase3_create_file_drive1.txt
+exist12=c:\sts_test_dir\RollbackAllTestCase3_overwrite_file_drive1.txt
+exist13=e:\sts_test_dir\RollbackAllTestCase3_register_file_drive2.txt
+exist14=e:\sts_test_dir\RollbackAllTestCase3_create_file_drive2.txt
+exist15=e:\sts_test_dir\RollbackAllTestCase3_overwrite_file_drive2.txt
+
+exist16=c:\sts_test_dir\RollbackAllTestCase4_register_file_drive1.txt
+exist17=c:\sts_test_dir\RollbackAllTestCase4_create_file_drive1.txt
+exist18=c:\sts_test_dir\RollbackAllTestCase4_overwrite_file_drive1.txt
+exist19=e:\sts_test_dir\RollbackAllTestCase4_register_file_drive2.txt
+exist20=e:\sts_test_dir\RollbackAllTestCase4_create_file_drive2.txt
+exist21=e:\sts_test_dir\RollbackAllTestCase4_overwrite_file_drive2.txt
+
+exist22=c:\sts_test_dir\RollbackAllTestCase5_register_file_drive1.txt
+exist23=c:\sts_test_dir\RollbackAllTestCase5_create_file_drive1.txt
+exist24=c:\sts_test_dir\RollbackAllTestCase5_overwrite_file_drive1.txt
+exist25=e:\sts_test_dir\RollbackAllTestCase5_register_file_drive2.txt
+exist26=e:\sts_test_dir\RollbackAllTestCase5_create_file_drive2.txt
+exist27=e:\sts_test_dir\RollbackAllTestCase5_overwrite_file_drive2.txt
+
+exist28=c:\sts_test_dir\RollbackAllTestCase6_register_file_drive1.txt
+exist29=c:\sts_test_dir\RollbackAllTestCase6_create_file_drive1.txt
+exist30=c:\sts_test_dir\RollbackAllTestCase6_overwrite_file_drive1.txt
+exist31=e:\sts_test_dir\RollbackAllTestCase6_register_file_drive2.txt
+exist32=e:\sts_test_dir\RollbackAllTestCase6_create_file_drive2.txt
+exist33=e:\sts_test_dir\RollbackAllTestCase6_overwrite_file_drive2.txt
+
+numnonexist=64
+nonexist0=c:\sts_test_dir\RollbackAllTestCase1_register_file_drive1.txt
+nonexist1=c:\sts_test_dir\RollbackAllTestCase1_create_file_drive1.txt
+nonexist2=c:\sts_test_dir\RollbackAllTestCase1_register_temp_drive1.txt
+nonexist3=c:\sts_test_dir\RollbackAllTestCase1_create_temp_drive1.txt
+nonexist4=e:\sts_test_dir\RollbackAllTestCase1_register_file_drive2.txt
+nonexist5=e:\sts_test_dir\RollbackAllTestCase1_create_file_drive2.txt
+nonexist6=e:\sts_test_dir\RollbackAllTestCase1_register_temp_drive2.txt
+nonexist7=e:\sts_test_dir\RollbackAllTestCase1_create_temp_drive2.txt
+
+nonexist8=c:\sts_test_dir\RollbackAllTestCase2_remove_file_drive1.txt
+nonexist9=e:\sts_test_dir\RollbackAllTestCase2_remove_file_drive2.txt
+nonexist10=c:\sts_test_dir\RollbackAllTestCase2_register_temp_drive1.txt
+nonexist11=c:\sts_test_dir\RollbackAllTestCase2_create_temp_drive1.txt
+nonexist12=e:\sts_test_dir\RollbackAllTestCase2_register_temp_drive2.txt
+nonexist13=e:\sts_test_dir\RollbackAllTestCase2_create_temp_drive2.txt
+
+nonexist14=c:\sts_test_dir\RollbackAllTestCase3_remove_file_drive1.txt
+nonexist15=e:\sts_test_dir\RollbackAllTestCase3_remove_file_drive2.txt
+nonexist16=c:\sts_test_dir\RollbackAllTestCase3_register_temp_drive1.txt
+nonexist17=c:\sts_test_dir\RollbackAllTestCase3_create_temp_drive1.txt
+nonexist18=e:\sts_test_dir\RollbackAllTestCase3_register_temp_drive2.txt
+nonexist19=e:\sts_test_dir\RollbackAllTestCase3_create_temp_drive2.txt
+
+nonexist20=c:\sts_test_dir\RollbackAllTestCase4_remove_file_drive1.txt
+nonexist21=e:\sts_test_dir\RollbackAllTestCase4_remove_file_drive2.txt
+nonexist22=c:\sts_test_dir\RollbackAllTestCase4_register_temp_drive1.txt
+nonexist23=c:\sts_test_dir\RollbackAllTestCase4_create_temp_drive1.txt
+nonexist24=e:\sts_test_dir\RollbackAllTestCase4_register_temp_drive2.txt
+nonexist25=e:\sts_test_dir\RollbackAllTestCase4_create_temp_drive2.txt
+
+nonexist26=c:\sts_test_dir\RollbackAllTestCase5_remove_file_drive1.txt
+nonexist27=e:\sts_test_dir\RollbackAllTestCase5_remove_file_drive2.txt
+nonexist28=c:\sts_test_dir\RollbackAllTestCase5_register_temp_drive1.txt
+nonexist29=c:\sts_test_dir\RollbackAllTestCase5_create_temp_drive1.txt
+nonexist30=e:\sts_test_dir\RollbackAllTestCase5_register_temp_drive2.txt
+nonexist31=e:\sts_test_dir\RollbackAllTestCase5_create_temp_drive2.txt
+
+nonexist32=c:\sts_test_dir\RollbackAllTestCase6_remove_file_drive1.txt
+nonexist33=e:\sts_test_dir\RollbackAllTestCase6_remove_file_drive2.txt
+nonexist34=c:\sts_test_dir\RollbackAllTestCase6_register_temp_drive1.txt
+nonexist35=c:\sts_test_dir\RollbackAllTestCase6_create_temp_drive1.txt
+nonexist36=e:\sts_test_dir\RollbackAllTestCase6_register_temp_drive2.txt
+nonexist37=e:\sts_test_dir\RollbackAllTestCase6_create_temp_drive2.txt
+
+nonexist38=c:\sys\install\integrityservices\61F7BBF8.drv
+nonexist39=c:\sys\install\integrityservices\61F7BBF8.log
+nonexist40=c:\sys\install\integrityservices\61F7BBF8\0.bak
+nonexist41=c:\sys\install\integrityservices\61F7BBF8\1.bak
+nonexist42=e:\sys\install\integrityservices\61F7BBF8.log
+nonexist43=e:\sys\install\integrityservices\61F7BBF8\0.bak
+nonexist44=e:\sys\install\integrityservices\61F7BBF8\1.bak
+
+nonexist45=c:\sys\install\integrityservices\B06C42F3.drv
+nonexist46=c:\sys\install\integrityservices\B06C42F3.log
+nonexist47=c:\sys\install\integrityservices\B06C42F3\0.bak
+nonexist48=c:\sys\install\integrityservices\B06C42F3\1.bak
+nonexist49=e:\sys\install\integrityservices\B06C42F3.log
+nonexist50=e:\sys\install\integrityservices\B06C42F3\0.bak
+nonexist51=e:\sys\install\integrityservices\B06C42F3\1.bak
+
+nonexist52=c:\sys\install\integrityservices\B630B6F0.drv
+nonexist53=c:\sys\install\integrityservices\B630B6F0.log
+nonexist54=e:\sys\install\integrityservices\B630B6F0.log
+
+nonexist55=c:\sys\install\integrityservices\BD596810.drv
+nonexist56=c:\sys\install\integrityservices\BD596810.log
+nonexist57=e:\sys\install\integrityservices\BD596810.log
+
+nonexist58=c:\sys\install\integrityservices\BE3D42F0.drv
+nonexist59=c:\sys\install\integrityservices\BE3D42F0.log
+nonexist60=e:\sys\install\integrityservices\BE3D42F0.log
+
+nonexist61=c:\sys\install\integrityservices\CB94C9F0.drv
+nonexist62=c:\sys\install\integrityservices\CB94C9F0.log
+nonexist63=e:\sys\install\integrityservices\CB94C9F0.log
+
+
+[SEC_STS_TestCase030_threadA_transcation]
+trslot=0
+
+[SEC_STS_TestCase030_threadB_transcation]
+trslot=1
+
+[SEC_STS_TestCase030_threadC_transcation]
+trslot=2
+trslotid=0
+
+[SEC_STS_TestCase030_threadA_registernew]
+trslot=0
+target=c:\sts_test_dir\testcase030_threada_register_new.txt
+
+[SEC_STS_TestCase030_threadB_registernew]
+trslot=1
+target=c:\sts_test_dir\testcase030_threadb_register_new.txt
+
+[SEC_STS_TestCase030_threadC_registernew]
+trslot=2
+target=e:\sts_test_dir\testcase030_threadc_register_new.txt
+
+[SEC_STS_TestCase030_threadA_createnew]
+trslot=0
+target=c:\sts_test_dir\testcase030_threada_create_new.txt
+
+[SEC_STS_TestCase030_threadB_createnew]
+trslot=1
+target=c:\sts_test_dir\testcase030_threadb_create_new.txt
+
+[SEC_STS_TestCase030_threadC_createnew]
+trslot=2
+target=e:\sts_test_dir\testcase030_threadc_create_new.txt
+
+[SEC_STS_TestCase030_threadA_remove]
+trslot=0
+target=c:\sts_test_dir\testcase030_threada_remove.txt
+
+[SEC_STS_TestCase030_threadB_remove]
+trslot=1
+target=c:\sts_test_dir\testcase030_threadb_remove.txt
+
+[SEC_STS_TestCase030_threadC_remove]
+trslot=2
+target=e:\sts_test_dir\testcase030_threadc_remove.txt
+
+[SEC_STS_TestCase030_threadA_registertemp]
+trslot=0
+target=c:\sts_test_dir\testcase030_threada_register_temp.txt
+
+[SEC_STS_TestCase030_threadB_registertemp]
+trslot=1
+target=c:\sts_test_dir\testcase030_threadb_register_temp.txt
+
+[SEC_STS_TestCase030_threadC_registertemp]
+trslot=2
+target=e:\sts_test_dir\testcase030_threadc_register_temp.txt
+
+[SEC_STS_TestCase030_threadA_createtemp]
+trslot=0
+target=c:\sts_test_dir\testcase030_threada_create_temp.txt
+
+[SEC_STS_TestCase030_threadB_createtemp]
+trslot=1
+target=c:\sts_test_dir\testcase030_threadb_create_temp.txt
+
+[SEC_STS_TestCase030_threadC_createtemp]
+trslot=2
+target=e:\sts_test_dir\testcase030_threadc_create_temp.txt
+
+[SEC_STS_TestCase030_threadA_overwrite]
+trslot=0
+target=c:\sts_test_dir\testcase030_threada_overwrite.txt
+
+[SEC_STS_TestCase030_threadB_overwrite]
+trslot=1
+target=c:\sts_test_dir\testcase030_threadb_overwrite.txt
+
+[SEC_STS_TestCase030_threadC_overwrite]
+trslot=2
+target=e:\sts_test_dir\testcase030_threadc_overwrite.txt
+
+[SEC_STS_TestCase030_pre_commit]
+numexist=15
+exist0=c:\sts_test_dir\testcase030_threada_register_new.txt
+exist1=c:\sts_test_dir\testcase030_threadb_register_new.txt
+exist2=e:\sts_test_dir\testcase030_threadc_register_new.txt
+exist3=c:\sts_test_dir\testcase030_threada_create_new.txt
+exist4=c:\sts_test_dir\testcase030_threadb_create_new.txt
+exist5=e:\sts_test_dir\testcase030_threadc_create_new.txt
+exist6=c:\sts_test_dir\testcase030_threada_register_temp.txt
+exist7=c:\sts_test_dir\testcase030_threadb_register_temp.txt
+exist8=e:\sts_test_dir\testcase030_threadc_register_temp.txt
+exist9=c:\sts_test_dir\testcase030_threada_create_temp.txt
+exist10=c:\sts_test_dir\testcase030_threadb_create_temp.txt
+exist11=e:\sts_test_dir\testcase030_threadc_create_temp.txt
+exist12=c:\sts_test_dir\testcase030_threada_overwrite.txt
+exist13=c:\sts_test_dir\testcase030_threadb_overwrite.txt
+exist14=e:\sts_test_dir\testcase030_threadc_overwrite.txt
+
+numnonexist=3
+nonexist0=c:\sts_test_dir\testcase030_threada_remove.txt
+nonexist1=c:\sts_test_dir\testcase030_threadb_remove.txt
+nonexist2=e:\sts_test_dir\testcase030_threadc_remove.txt
+
+[SEC_STS_TestCase030_post_commit]
+numexist=9
+exist0=c:\sts_test_dir\testcase030_threada_register_new.txt
+exist1=c:\sts_test_dir\testcase030_threadb_register_new.txt
+exist2=e:\sts_test_dir\testcase030_threadc_register_new.txt
+exist3=c:\sts_test_dir\testcase030_threada_create_new.txt
+exist4=c:\sts_test_dir\testcase030_threadb_create_new.txt
+exist5=e:\sts_test_dir\testcase030_threadc_create_new.txt
+exist6=c:\sts_test_dir\testcase030_threada_overwrite.txt
+exist7=c:\sts_test_dir\testcase030_threadb_overwrite.txt
+exist8=e:\sts_test_dir\testcase030_threadc_overwrite.txt
+
+numnonexist=9
+nonexist0=c:\sts_test_dir\testcase030_threada_remove.txt
+nonexist1=c:\sts_test_dir\testcase030_threadb_remove.txt
+nonexist2=e:\sts_test_dir\testcase030_threadc_remove.txt
+nonexist3=c:\sts_test_dir\testcase030_threada_register_temp.txt
+nonexist4=c:\sts_test_dir\testcase030_threadb_register_temp.txt
+nonexist5=e:\sts_test_dir\testcase030_threadc_register_temp.txt
+nonexist6=c:\sts_test_dir\testcase030_threada_create_temp.txt
+nonexist7=c:\sts_test_dir\testcase030_threadb_create_temp.txt
+nonexist8=e:\sts_test_dir\testcase030_threadc_create_temp.txt
+
+
+[SEC_STS_TestCase031_pre_rollback]
+numexist=15
+exist0=c:\sts_test_dir\testcase030_threada_register_new.txt
+exist1=c:\sts_test_dir\testcase030_threadb_register_new.txt
+exist2=e:\sts_test_dir\testcase030_threadc_register_new.txt
+exist3=c:\sts_test_dir\testcase030_threada_create_new.txt
+exist4=c:\sts_test_dir\testcase030_threadb_create_new.txt
+exist5=e:\sts_test_dir\testcase030_threadc_create_new.txt
+exist6=c:\sts_test_dir\testcase030_threada_register_temp.txt
+exist7=c:\sts_test_dir\testcase030_threadb_register_temp.txt
+exist8=e:\sts_test_dir\testcase030_threadc_register_temp.txt
+exist9=c:\sts_test_dir\testcase030_threada_create_temp.txt
+exist10=c:\sts_test_dir\testcase030_threadb_create_temp.txt
+exist11=e:\sts_test_dir\testcase030_threadc_create_temp.txt
+exist12=c:\sts_test_dir\testcase030_threada_overwrite.txt
+exist13=c:\sts_test_dir\testcase030_threadb_overwrite.txt
+exist14=e:\sts_test_dir\testcase030_threadc_overwrite.txt
+
+numnonexist=3
+nonexist0=c:\sts_test_dir\testcase030_threada_remove.txt
+nonexist1=c:\sts_test_dir\testcase030_threadb_remove.txt
+nonexist2=e:\sts_test_dir\testcase030_threadc_remove.txt
+
+[SEC_STS_TestCase031_post_rollback]
+numexist=6
+exist0=c:\sts_test_dir\testcase030_threada_remove.txt
+exist1=c:\sts_test_dir\testcase030_threadb_remove.txt
+exist2=e:\sts_test_dir\testcase030_threadc_remove.txt
+exist3=c:\sts_test_dir\testcase030_threada_overwrite.txt
+exist4=c:\sts_test_dir\testcase030_threadb_overwrite.txt
+exist5=e:\sts_test_dir\testcase030_threadc_overwrite.txt
+
+numnonexist=12
+nonexist0=c:\sts_test_dir\testcase030_threada_register_new.txt
+nonexist1=c:\sts_test_dir\testcase030_threadb_register_new.txt
+nonexist2=e:\sts_test_dir\testcase030_threadc_register_new.txt
+nonexist3=c:\sts_test_dir\testcase030_threada_create_new.txt
+nonexist4=c:\sts_test_dir\testcase030_threadb_create_new.txt
+nonexist5=e:\sts_test_dir\testcase030_threadc_create_new.txt
+nonexist6=c:\sts_test_dir\testcase030_threada_register_temp.txt
+nonexist7=c:\sts_test_dir\testcase030_threadb_register_temp.txt
+nonexist8=e:\sts_test_dir\testcase030_threadc_register_temp.txt
+nonexist9=c:\sts_test_dir\testcase030_threada_create_temp.txt
+nonexist10=c:\sts_test_dir\testcase030_threadb_create_temp.txt
+nonexist11=e:\sts_test_dir\testcase030_threadc_create_temp.txt
+
+[SEC_STS_TestCase034_transaction1]
+trslot=0
+
+[SEC_STS_TestCase034_transaction2]
+trslot=1
+trslotid=0
+
+
+[SEC_STS_TestCase035]
+trslot=0
+target=c:\sts_test_dir\TestCase035.txt
+
+[SEC_STS_InvalidLongFileName_TestCase036]
+trslot=2
+target=C:\sts_test_dir\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\abcde\1.txt
+basedir=C:\sts_test_dir\abcde
+
+[SEC-STS-RollbackAll-0002_TCB_dir_setup]
+operations=5
+operation0=rmdir -i c:\sys\install\integrityservices\
+operation1=mkdirall -i c:\sys\install\integrityservices\
+operation2=copy z:\tusif\tsts\data\rollbackall\SEC-STS-RollbackAll-0002\b6da9d45.drv c:\sys\install\integrityservices\b6da9d45.drv
+operation3=copy z:\tusif\tsts\data\rollbackall\SEC-STS-RollbackAll-0002\b6da9d45.log c:\sys\install\integrityservices\b6da9d45.log
+operation4=attrib r- c:\sys\install\integrityservices\*.*
+
+[SEC-STS-RollbackAll-0002]
+trslot=0
+
+[SEC-STS-RollbackAll-0002_post_rollbackall]
+numnonexist=2
+nonexist0=c:\sys\install\integrityservices\b6da9d45.drv
+nonexist1=c:\sys\install\integrityservices\b6da9d45.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/tsts.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1329 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+// tsts.script
+// Software Transaction Services Tests
+
+PRINT Run Software Transaction Services (STS) Tests
+
+// Load Suite
+LOAD_SUITE tststestserver
+
+RUN_UTILS MkDir c:\sts_test_dir\
+RUN_UTILS MkDir e:\sts_test_dir\
+
+//! @SYMTestCaseID		API-SEC-STS-API-0001
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0001 test documented in TMS : Test registering a new file when transaction is either committed or rolled-back
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0001 
+
+// SEC_STS_TestCase001_Commit
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase001_Commit.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase001_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase001_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase001_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase001_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase001_Commit_post_commit
+
+END_TESTCASE API-SEC-STS-API-0001
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0001
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0001 test documented in TMS : Test registering a new file when transaction is either committed or rolled-back
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0001
+
+// SEC_STS_TestCase001_Rollback
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase001_Rollback.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase001_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase001_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase001_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase001_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase001_Rollback_post_rollback
+
+END_TESTCASE API-SEC-STS-API-B-0001
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0002
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0002 test documented in TMS : Test creating a new file when transaction is either committed or rolled-back
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0002
+
+// SEC_STS_TestCase002a_Commit
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase002a_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase002a_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase002a_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase002a_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase002a_Commit_post_commit
+
+END_TESTCASE API-SEC-STS-API-0002
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0002
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0002 test documented in TMS : Test creating a new file when transaction is either committed or rolled-back
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0002
+
+// SEC_STS_TestCase002a_Rollback
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase002a_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase002a_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase002a_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase002a_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase002a_Rollback_post_rollback
+
+END_TESTCASE API-SEC-STS-API-B-0002
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-C-0002
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0002 test documented in TMS : Test creating a new file when transaction is either committed or rolled-back (target exists)
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-C-0002
+
+// SEC_STS_TestCase002b_Commit
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase002b_Commit.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase002b_Commit_pre_commit
+RUN_TEST_STEP_RESULT -11 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase002b_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep               z:\tusif\tsts\tsts.ini SEC_STS_TestCase002b_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CommitStep                   z:\tusif\tsts\tsts.ini SEC_STS_TestCase002b_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep               z:\tusif\tsts\tsts.ini SEC_STS_TestCase002b_Commit_post_commit
+
+END_TESTCASE API-SEC-STS-API-C-0002
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-D-0002
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0002 test documented in TMS : Test creating a new file when transaction is either committed or rolled-back (target exists)
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-D-0002
+
+// SEC_STS_TestCase002b_Rollback
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase002b_Rollback.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase002b_Rollback_pre_rollback
+RUN_TEST_STEP_RESULT -11 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase002b_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep               z:\tusif\tsts\tsts.ini SEC_STS_TestCase002b_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep                 z:\tusif\tsts\tsts.ini SEC_STS_TestCase002b_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep               z:\tusif\tsts\tsts.ini SEC_STS_TestCase002b_Rollback_post_rollback
+
+END_TESTCASE API-SEC-STS-API-D-0002
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0003
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0003 test documented in TMS : Test removing a file when transaction is either committed or rolled-back (target file exists)
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0003
+
+// SEC_STS_TestCase003_Commit
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase003a_Commit.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase003_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase003_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase003_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase003_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase003_Commit_post_commit
+
+END_TESTCASE API-SEC-STS-API-0003
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0003
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0003 test documented in TMS : Test removing a file when transaction is either committed or rolled-back (target file exists)
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0003
+
+// SEC_STS_TestCase003_Rollback
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase003_Rollback.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase003_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase003_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase003_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase003_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase003_Rollback_post_rollback
+
+END_TESTCASE API-SEC-STS-API-B-0003
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0004
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0004 test documented in TMS : Test registering a  temporary file when transaction is either committed or rolled-back
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0004
+
+// SEC_STS_TestCase004_Commit
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase004_Commit.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase004_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase004_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase004_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase004_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase004_Commit_post_commit
+
+END_TESTCASE API-SEC-STS-API-0004
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0004
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0004 test documented in TMS : Test registering a  temporary file when transaction is either committed or rolled-back
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0004
+
+// SEC_STS_TestCase004_Rollback
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase004_Rollback.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase004_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase004_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase004_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase004_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase004_Rollback_post_rollback
+
+END_TESTCASE API-SEC-STS-API-B-0004
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0005
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0005 test documented in TMS : Test creating a  temporary file when transaction is either committed or rolled-back
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0005
+
+// SEC_STS_TestCase005_Commit
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase005_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase005_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase005_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase005_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase005_Commit_post_commit
+
+END_TESTCASE API-SEC-STS-API-0005
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0005
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0005 test documented in TMS : Test creating a  temporary file when transaction is either committed or rolled-back
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0005
+
+// SEC_STS_TestCase005_Rollback
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase005_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase005_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase005_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase005_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase005_Rollback_post_rollback
+
+END_TESTCASE API-SEC-STS-API-B-0005
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0006
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0006 test documented in TMS :Test overwriting a file when transaction is either committed or rolled-back (target exists)
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0006
+
+// SEC_STS_TestCase006a_Commit
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase006a_Commit.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase006a_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase006a_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase006a_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase006a_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase006a_Commit_post_commit
+
+END_TESTCASE API-SEC-STS-API-0006
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0006
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0006 test documented in TMS :Test overwriting a file when transaction is either committed or rolled-back (target exists)
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0006
+
+//SEC_STS_TestCase006a_Rollback
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase006a_Rollback.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase006a_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase006a_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase006a_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase006a_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase006a_Rollback_post_rollback
+
+END_TESTCASE API-SEC-STS-API-B-0006
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-C-0006
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0006 test documented in TMS :Test overwriting a file when transaction is either committed or rolled-back (target doesn't exist)
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-C-0006
+
+// SEC_STS_TestCase006b_Commit
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase006b_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase006b_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase006b_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase006b_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase006b_Commit_post_commit
+
+END_TESTCASE API-SEC-STS-API-C-0006
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-D-0006
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0006 test documented in TMS :Test overwriting a file when transaction is either committed or rolled-back (target doesn't exist)
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-D-0006
+
+// SEC_STS_TestCase006b_Rollback
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase006b_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase006b_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase006b_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase006b_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase006b_Rollback_post_rollback
+
+END_TESTCASE API-SEC-STS-API-D-0006
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0007
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0007 test documented in TMS : Test committing or rolling-back a  transaction that consists  of multiple file operations
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0007
+
+// SEC_STS_TestCase007_Commit
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase007_Commit_register_file.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase007_Commit_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase007_Commit_remove_file.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase007_Commit_overwrite_file.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Commit_pre_commit_register_file
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Commit_pre_commit_create_file
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Commit_pre_commit_remove_file
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Commit_pre_commit_register_temp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Commit_pre_commit_create_temp
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Commit_pre_commit_overwrite_file
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Commit_pre_commit
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Commit_post_commit
+
+END_TESTCASE API-SEC-STS-API-0007
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0007
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0007 test documented in TMS : Test committing or rolling-back a  transaction that consists  of multiple file operations
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0007
+
+// SEC_STS_TestCase007_Rollback
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase007_Rollback_register_file.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase007_Rollback_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase007_Rollback_remove_file.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase007_Rollback_overwrite_file.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Rollback_pre_rollback_register_file
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Rollback_pre_rollback_create_file
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Rollback_pre_rollback_remove_file
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Rollback_pre_rollback_register_temp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Rollback_pre_rollback_create_temp
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Rollback_pre_rollback_overwrite_file
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Rollback_pre_rollback
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase007_Rollback_post_rollback
+
+END_TESTCASE API-SEC-STS-API-B-0007
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0008
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0008 test documented in TMS : Test committing or rolling-back a  transaction that consists  of multiple file operations issued through multiple sessions
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0008
+
+// SEC_STS_TestCase008_Commit
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase008_Commit_register_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase008_Commit_remove_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase008_Commit_register_temp_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase008_Commit_overwrite_file_tr1.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_tr0
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Commit_register_file_tr0
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Commit_remove_file_tr0
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Commit_register_temp_tr0
+RUN_TEST_STEP 100 tststestserver OpenTransactionStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_tr1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Commit_create_file_tr1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Commit_overwrite_file_tr1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Commit_create_temp_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Commit_pre_commit_check_files
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Commit_post_commit_check_files
+RUN_TEST_STEP 100 tststestserver CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_tr0
+RUN_TEST_STEP 100 tststestserver CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_tr1
+
+END_TESTCASE API-SEC-STS-API-0008
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0008
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0008 test documented in TMS : Test committing or rolling-back a  transaction that consists  of multiple file operations issued through multiple sessions
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0008
+
+// SEC_STS_TestCase008_Rollback
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase008_Rollback_register_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase008_Rollback_remove_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase008_Rollback_register_temp_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase008_Rollback_overwrite_file_tr1.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_tr0
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Rollback_register_file_tr0
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Rollback_remove_file_tr0
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Rollback_register_temp_tr0
+RUN_TEST_STEP 100 tststestserver OpenTransactionStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_tr1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Rollback_create_file_tr1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Rollback_overwrite_file_tr1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Rollback_create_temp_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Rollback_pre_rollback_check_files
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_Rollback_post_rollback_check_files
+RUN_TEST_STEP 100 tststestserver CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_tr0
+RUN_TEST_STEP 100 tststestserver CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase008_tr1
+
+END_TESTCASE API-SEC-STS-API-B-0008
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0009
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0009 test documented in TMS : Test opening a non-existing transaction
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0009
+
+// SEC_STS_TestCase009
+RUN_TEST_STEP_RESULT -1 tststestserver OpenTransactionStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase009_open_by_random_id
+RUN_TEST_STEP 100 tststestserver CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase009_open_by_random_id
+
+END_TESTCASE API-SEC-STS-API-0009
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0010
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0010 test documented in TMS : Test committing or rolling back concurrent sessions
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0010
+
+// SEC_STS_TestCase010a
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr0
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr1
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_file_tr0
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_file_tr1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_file_tr0
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_file_tr1
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_remove_file_tr0
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_remove_file_tr1
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_temp_tr0
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_temp_tr1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_temp_tr0
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_temp_tr1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_overwrite_file_tr0
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_overwrite_file_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_before_any_commit_or_rollback
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr0
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010a_after_tr0_commit_before_tr1_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010a_final
+RUN_UTILS DeleteFile c:\sts_test_dir\TestCase010*.txt
+
+END_TESTCASE API-SEC-STS-API-0010
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0010
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0010 test documented in TMS : Test committing or rolling back concurrent sessions
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0010
+
+// SEC_STS_TestCase010b
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr0
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr1
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_file_tr0
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_file_tr1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_file_tr0
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_file_tr1
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_remove_file_tr0
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_remove_file_tr1
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_temp_tr0
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_temp_tr1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_temp_tr0
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_temp_tr1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_overwrite_file_tr0
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_overwrite_file_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_before_any_commit_or_rollback
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr0
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010b_after_tr0_commit_before_tr1_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010b_final
+RUN_UTILS DeleteFile c:\sts_test_dir\TestCase010*.txt
+
+END_TESTCASE API-SEC-STS-API-B-0010
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-C-0010
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0010 test documented in TMS : Test committing or rolling back concurrent sessions
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-C-0010
+
+// SEC_STS_TestCase010c
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr0
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr1
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_file_tr0
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_file_tr1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_file_tr0
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_file_tr1
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_remove_file_tr0
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_remove_file_tr1
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_temp_tr0
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_temp_tr1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_temp_tr0
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_temp_tr1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_overwrite_file_tr0
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_overwrite_file_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_before_any_commit_or_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr0
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010c_after_tr0_rollback_before_tr1_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010c_final
+RUN_UTILS DeleteFile c:\sts_test_dir\TestCase010*.txt
+
+END_TESTCASE API-SEC-STS-API-C-0010
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-D-0010
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0010 test documented in TMS : Test committing or rolling back concurrent sessions
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-D-0010
+
+// SEC_STS_TestCase010d
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_remove_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_remove_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_temp_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_register_temp_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_overwrite_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase010_overwrite_file_tr1.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr0
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr1
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_file_tr0
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_file_tr1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_file_tr0
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_file_tr1
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_remove_file_tr0
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_remove_file_tr1
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_temp_tr0
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_register_temp_tr1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_temp_tr0
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_create_temp_tr1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_overwrite_file_tr0
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_overwrite_file_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_before_any_commit_or_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr0
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010d_after_tr0_rollback_before_tr1_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase010_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase010d_final
+RUN_UTILS DeleteFile c:\sts_test_dir\TestCase010*.txt
+
+END_TESTCASE API-SEC-STS-API-D-0010
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0011
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0011 test documented in TMS : Test committing or rolling back a transaction which affects multiple drives
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0011
+
+// SEC_STS_TestCase011_Commit
+RUN_UTILS MkDir e:\sts_test_dir\
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase011_register_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase011_register_temp_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase011_remove_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase011_overwrite_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase011_register_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase011_register_temp_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase011_remove_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase011_overwrite_file_drive2.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase011
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_register_file_drive1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_create_file_drive1
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_register_temp_drive1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_create_temp_drive1
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_remove_file_drive1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_overwrite_file_drive1
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_register_file_drive2
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_create_file_drive2
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_register_temp_drive2
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_create_temp_drive2
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_remove_file_drive2
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_overwrite_file_drive2
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_pre_commit_or_rollback
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase011
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_post_commit
+RUN_UTILS DeleteFile c:\sts_test_dir\TestCase011*.txt
+RUN_UTILS DeleteFile e:\sts_test_dir\TestCase011*.txt
+
+END_TESTCASE API-SEC-STS-API-0011
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0011
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0011 test documented in TMS : Test committing or rolling back a transaction which affects multiple drives
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0011
+
+// SEC_STS_TestCase011_Rollback
+RUN_UTILS MkDir e:\sts_test_dir\
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase011_register_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase011_register_temp_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase011_remove_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase011_overwrite_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase011_register_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase011_register_temp_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase011_remove_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase011_overwrite_file_drive2.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase011
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_register_file_drive1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_create_file_drive1
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_register_temp_drive1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_create_temp_drive1
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_remove_file_drive1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_overwrite_file_drive1
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_register_file_drive2
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_create_file_drive2
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_register_temp_drive2
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_create_temp_drive2
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_remove_file_drive2
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_overwrite_file_drive2
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_pre_commit_or_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase011
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase011_post_rollback
+RUN_UTILS DeleteFile c:\sts_test_dir\TestCase011*.txt
+RUN_UTILS DeleteFile e:\sts_test_dir\TestCase011*.txt
+
+END_TESTCASE API-SEC-STS-API-B-0011
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0012
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0012 test documented in TMS : Test committing or rolling back concurrent sessions affecting multiple drives
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0012
+
+// SEC_STS_TestCase012a
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_register_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_register_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr0
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr1
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_file_tr0
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_file_tr1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_file_tr0
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_file_tr1
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_remove_file_tr0
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_remove_file_tr1
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_temp_tr0
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_temp_tr1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_temp_tr0
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_temp_tr1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_overwrite_file_tr0
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_overwrite_file_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_before_any_commit_or_rollback
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr0
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012a_after_tr0_commit_before_tr1_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012a_final
+RUN_UTILS DeleteFile c:\sts_test_dir\TestCase012*.txt
+RUN_UTILS DeleteFile e:\sts_test_dir\TestCase012*.txt
+
+END_TESTCASE API-SEC-STS-API-0012
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-B-0012
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0012 test documented in TMS : Test committing or rolling back concurrent sessions affecting multiple drives
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-B-0012
+
+// SEC_STS_TestCase012b
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_register_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_register_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr0
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr1
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_file_tr0
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_file_tr1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_file_tr0
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_file_tr1
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_remove_file_tr0
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_remove_file_tr1
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_temp_tr0
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_temp_tr1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_temp_tr0
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_temp_tr1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_overwrite_file_tr0
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_overwrite_file_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_before_any_commit_or_rollback
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr0
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012b_after_tr0_commit_before_tr1_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012b_final
+RUN_UTILS DeleteFile c:\sts_test_dir\TestCase012*.txt
+RUN_UTILS DeleteFile e:\sts_test_dir\TestCase012*.txt
+
+END_TESTCASE API-SEC-STS-API-B-0012
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-C-0012
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0012 test documented in TMS : Test committing or rolling back concurrent sessions affecting multiple drives
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-C-0012
+
+// SEC_STS_TestCase012c
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_register_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_register_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr0
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr1
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_file_tr0
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_file_tr1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_file_tr0
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_file_tr1
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_remove_file_tr0
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_remove_file_tr1
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_temp_tr0
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_temp_tr1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_temp_tr0
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_temp_tr1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_overwrite_file_tr0
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_overwrite_file_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_before_any_commit_or_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr0
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012c_after_tr0_rollback_before_tr1_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012c_final
+RUN_UTILS DeleteFile c:\sts_test_dir\TestCase012*.txt
+RUN_UTILS DeleteFile e:\sts_test_dir\TestCase012*.txt
+
+END_TESTCASE API-SEC-STS-API-C-0012
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-D-0012
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0012 test documented in TMS : Test committing or rolling back concurrent sessions affecting multiple drives
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-D-0012
+
+// SEC_STS_TestCase012d
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_register_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_register_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_remove_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\TestCase012_remove_file_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_register_temp_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_register_temp_tr1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_overwrite_file_tr0.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\TestCase012_overwrite_file_tr1.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr0
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr1
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_file_tr0
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_file_tr1
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_file_tr0
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_file_tr1
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_remove_file_tr0
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_remove_file_tr1
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_temp_tr0
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_register_temp_tr1
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_temp_tr0
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_create_temp_tr1
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_overwrite_file_tr0
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_overwrite_file_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_before_any_commit_or_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr0
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012d_after_tr0_rollback_before_tr1_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase012_tr1
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase012d_final
+RUN_UTILS DeleteFile c:\sts_test_dir\TestCase012*.txt
+RUN_UTILS DeleteFile e:\sts_test_dir\TestCase012*.txt
+
+END_TESTCASE API-SEC-STS-API-D-0012
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0014
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0014 test documented in TMS : Test directory support of RegisterNewFileL API when transaction is rolled back.
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0014 
+
+// SEC_STS_TestCase014
+RUN_UTILS MkDir c:\sts_test_dir\SEC_STS_TestCase014_dummydir
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\SEC_STS_TestCase014_dummydir\SEC_STS_TestCase014.txt
+RUN_UTILS MakeReadWrite c:\sts_test_dir\SEC_STS_TestCase014_dummydir\SEC_STS_TestCase014.txt
+RUN_TEST_STEP 100 tststestserver    CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase014
+RUN_TEST_STEP 100 tststestserver    RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase014
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase014_pre_rollback
+RUN_TEST_STEP 100 tststestserver    RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase014
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase014_post_rollback
+RUN_TEST_STEP 100 tststestserver    CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase014
+
+END_TESTCASE API-SEC-STS-API-0014
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0015
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0015 test documented in TMS : Test directory support of RegisterNewFileL API when transaction is committed.
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0015
+
+// SEC_STS_TestCase015
+RUN_UTILS MkDir c:\sts_test_dir
+RUN_UTILS MkDir c:\sts_test_dir\SEC_STS_TestCase015_dummydir
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\SEC_STS_TestCase015_dummydir\SEC_STS_TestCase015.txt
+RUN_TEST_STEP 100 tststestserver    CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase015
+RUN_TEST_STEP 100 tststestserver    RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase015
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase015_pre_post_commit
+RUN_TEST_STEP 100 tststestserver    CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase015
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase015_pre_post_commit
+RUN_TEST_STEP 100 tststestserver    CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase015
+
+END_TESTCASE API-SEC-STS-API-0015
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0016
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0016 test documented in TMS : Test directory support of RegisterNewFileL API when transaction is rolled back.
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0016
+
+// SEC_STS_TestCase016
+RUN_UTILS MkDir c:\sts_test_dir\SEC_STS_TestCase016_dummydir
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\SEC_STS_TestCase016_dummydir\SEC_STS_TestCase016.txt
+RUN_UTILS MakeReadWrite c:\sts_test_dir\SEC_STS_TestCase016_dummydir\SEC_STS_TestCase016.txt
+RUN_TEST_STEP 100 tststestserver    CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase016
+RUN_TEST_STEP 100 tststestserver    RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase016_dir
+RUN_TEST_STEP 100 tststestserver    RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase016_file
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase016_pre_rollback
+RUN_TEST_STEP 100 tststestserver    RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase016
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase016_post_rollback
+RUN_TEST_STEP 100 tststestserver    CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase016
+
+END_TESTCASE API-SEC-STS-API-0016
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0017
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0017 test documented in TMS : Test directory support of RegisterNewFileL API when transaction is committed.
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0017
+
+// SEC_STS_TestCase017
+RUN_UTILS MkDir c:\sts_test_dir
+RUN_UTILS MkDir c:\sts_test_dir\SEC_STS_TestCase017_dummydir
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\SEC_STS_TestCase017_dummydir\SEC_STS_TestCase017.txt
+RUN_TEST_STEP 100 tststestserver    CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase017
+RUN_TEST_STEP 100 tststestserver    RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase017_dir
+RUN_TEST_STEP 100 tststestserver    RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase017_file
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase017_pre_post_commit
+RUN_TEST_STEP 100 tststestserver    CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase017
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase017_pre_post_commit
+RUN_TEST_STEP 100 tststestserver    CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase017
+
+END_TESTCASE API-SEC-STS-API-0017
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0018
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0018 test documented in TMS : Test directory support of RemoveL API when transaction is rolled back.
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0018
+
+// SEC_STS_TestCase018
+RUN_UTILS MkDir c:\sts_test_dir
+RUN_UTILS MkDir c:\sts_test_dir\SEC_STS_TestCase018_dummydir
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\SEC_STS_TestCase018_dummydir\SEC_STS_TestCase018.txt
+RUN_TEST_STEP 100 tststestserver    CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase018
+RUN_TEST_STEP 100 tststestserver    RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase018
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase018_pre_rollback
+RUN_TEST_STEP 100 tststestserver    RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase018
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase018_post_rollback
+RUN_TEST_STEP 100 tststestserver    CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase018
+
+END_TESTCASE API-SEC-STS-API-0018
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0019
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0019 test documented in TMS : Test directory support of RemoveL API when transaction is committed.
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0019
+
+// SEC_STS_TestCase019
+RUN_UTILS MkDir c:\sts_test_dir
+RUN_UTILS MkDir c:\sts_test_dir\SEC_STS_TestCase019_dummydir
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\SEC_STS_TestCase019_dummydir\SEC_STS_TestCase019.txt
+RUN_UTILS MakeReadWrite c:\sts_test_dir\SEC_STS_TestCase019_dummydir\SEC_STS_TestCase019.txt
+RUN_TEST_STEP 100 tststestserver    CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase019
+RUN_TEST_STEP 100 tststestserver    RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase019
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase019_pre_post_commmit
+RUN_TEST_STEP 100 tststestserver    CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase019
+RUN_TEST_STEP 100 tststestserver    CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase019_pre_post_commmit
+RUN_TEST_STEP 100 tststestserver    CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase019
+
+END_TESTCASE API-SEC-STS-API-0019
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0021
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0021 test documented in TMS : Test creating files on a non-writable media
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0021
+
+// SEC_STS_TestCase021
+RUN_TEST_STEP        100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase021_create_new_or_temp
+RUN_TEST_STEP_RESULT -21 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase021_create_new_or_temp
+RUN_TEST_STEP        100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase021_create_new_or_temp
+RUN_TEST_STEP_RESULT -21 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase021_create_new_or_temp
+RUN_TEST_STEP        100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase021_create_new_or_temp
+RUN_TEST_STEP_RESULT -21 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase021_overwrite
+RUN_TEST_STEP        100 tststestserver CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase021_create_new_or_temp
+
+END_TESTCASE API-SEC-STS-API-0021
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0022
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0022 test documented in TMS : Test registering files on a non-writable media
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0022
+
+// SEC_STS_TestCase022
+RUN_TEST_STEP        100 tststestserver CreateTransactionStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase022
+RUN_TEST_STEP_RESULT -21 tststestserver RegisterNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase022
+RUN_TEST_STEP_RESULT -21 tststestserver RegisterTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase022
+RUN_TEST_STEP        100 tststestserver CloseTransactionStep    z:\tusif\tsts\tsts.ini SEC_STS_TestCase022
+
+END_TESTCASE API-SEC-STS-API-0022
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0023
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0023 test documented in TMS : Test APIs with non-fully qualified file path
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0023
+
+// SEC_STS_TestCase023
+RUN_TEST_STEP 100 tststestserver    CreateTransactionStep    z:\tusif\tsts\tsts.ini SEC_STS_TestCase023
+RUN_TEST_STEP !Result=-6 100 tststestserver    CreateTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase023
+RUN_TEST_STEP !Result=-6 100 tststestserver    RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase023
+RUN_TEST_STEP 100 tststestserver    RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase023
+RUN_TEST_STEP !Result=-6 100 tststestserver   RegisterNewFileStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase023
+RUN_TEST_STEP !Result=-6 100 tststestserver   CreateNewFileStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase023
+RUN_TEST_STEP 100 tststestserver    CloseTransactionStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase023
+
+END_TESTCASE API-SEC-STS-API-0023
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0024
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0024 test documented in TMS : Test APIs for files in the root directory
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0024
+
+// SEC_STS_TestCase024
+RUN_TEST_STEP 100 tststestserver    CreateTransactionStep    z:\tusif\tsts\tsts.ini SEC_STS_TestCase024
+RUN_TEST_STEP 100 tststestserver    CreateTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase024
+RUN_TEST_STEP 100 tststestserver    RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase024
+RUN_TEST_STEP 100 tststestserver    RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase024
+RUN_TEST_STEP 100 tststestserver   RegisterNewFileStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase024
+RUN_TEST_STEP 100 tststestserver   CreateNewFileStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase024
+RUN_TEST_STEP 100 tststestserver    CloseTransactionStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase024
+
+END_TESTCASE API-SEC-STS-API-0024
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0025
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0025 test documented in TMS : Test Remove for non-existent file
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0025
+
+// SEC_STS_TestCase025
+RUN_TEST_STEP 100 tststestserver    CreateTransactionStep    z:\tusif\tsts\tsts.ini SEC_STS_TestCase025_1
+RUN_TEST_STEP 100 tststestserver    RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase025_1
+RUN_TEST_STEP 100 tststestserver    RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase025_2
+RUN_TEST_STEP 100 tststestserver    CloseTransactionStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase025_1
+
+END_TESTCASE API-SEC-STS-API-0025
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0026
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0026 test documented in TMS : Test CreateTemporaryL for existent file
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0026
+
+// SEC_STS_TestCase026
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\SEC_STS_TestCase026.txt
+RUN_UTILS MakeReadWrite c:\sts_test_dir\SEC_STS_TestCase026.txt
+RUN_TEST_STEP 100 tststestserver          CreateTransactionStep    z:\tusif\tsts\tsts.ini SEC_STS_TestCase026
+RUN_TEST_STEP_RESULT -11 tststestserver   CreateTemporaryStep      z:\tusif\tsts\tsts.ini SEC_STS_TestCase026
+RUN_TEST_STEP 100 tststestserver          CloseTransactionStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase026
+
+END_TESTCASE API-SEC-STS-API-0026
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0027
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0027 test documented in TMS : Test APIs for non-existent drive
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0027
+
+// SEC_STS_TestCase027
+RUN_TEST_STEP 100 tststestserver    CreateTransactionStep    z:\tusif\tsts\tsts.ini SEC_STS_TestCase027
+RUN_TEST_STEP !Result=-18 100 tststestserver    CreateTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase027
+RUN_TEST_STEP !Result=-18 100 tststestserver    RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase027
+RUN_TEST_STEP !Result=-18 100 tststestserver    RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase027
+RUN_TEST_STEP !Result=-18 100 tststestserver   RegisterNewFileStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase027
+RUN_TEST_STEP !Result=-18 100 tststestserver   CreateNewFileStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase027
+RUN_TEST_STEP 100 tststestserver    CloseTransactionStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase027
+
+END_TESTCASE API-SEC-STS-API-0027
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0030
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0030 test documented in TMS : Test concurrent access to STS APIs
+//! @SYMTestPriority		High
+
+START_TESTCASE API-SEC-STS-API-0030
+
+// SEC_STS_TestCase030
+RUN_UTILS DeleteDirectory c:\sts_test_dir\
+RUN_UTILS DeleteDirectory e:\sts_test_dir\
+RUN_UTILS MkDir c:\sts_test_dir\
+RUN_UTILS MkDir e:\sts_test_dir\
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_remove.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_remove.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_remove.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_transcation
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_transcation
+RUN_TEST_STEP 100 tststestserver OpenTransactionStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_transcation
+CONSECUTIVE
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_registernew
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_registernew
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_registernew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_createnew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_createnew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_createnew
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_remove
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_remove
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_remove
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_registertemp
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_registertemp
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_registertemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_createtemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_createtemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_createtemp
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_overwrite
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_overwrite
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_overwrite
+CONSECUTIVE
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_pre_commit
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_transcation
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_transcation
+CONSECUTIVE
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_post_commit
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_transcation
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_post_commit
+
+END_TESTCASE API-SEC-STS-API-0030
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0031
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0031 test documented in TMS : Test concurrent access to STS APIs
+//! @SYMTestPriority		High
+
+START_TESTCASE API-SEC-STS-API-0031
+
+// SEC_STS_TestCase031
+RUN_UTILS DeleteDirectory c:\sts_test_dir\
+RUN_UTILS DeleteDirectory e:\sts_test_dir\
+RUN_UTILS MkDir c:\sts_test_dir\
+RUN_UTILS MkDir e:\sts_test_dir\
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_remove.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_remove.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_remove.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_transcation
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_transcation
+RUN_TEST_STEP 100 tststestserver OpenTransactionStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_transcation
+CONSECUTIVE
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_registernew
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_registernew
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_registernew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_createnew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_createnew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_createnew
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_remove
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_remove
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_remove
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_registertemp
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_registertemp
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_registertemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_createtemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_createtemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_createtemp
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_overwrite
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_overwrite
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_overwrite
+CONSECUTIVE
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase031_pre_rollback
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_transcation
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_transcation
+CONSECUTIVE
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase031_post_rollback
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_transcation
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase031_post_rollback
+
+END_TESTCASE API-SEC-STS-API-0031
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0032
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0032 test documented in TMS : Test concurrent access to STS APIs
+//! @SYMTestPriority		High
+
+START_TESTCASE API-SEC-STS-API-0032
+
+// SEC_STS_TestCase032
+RUN_UTILS DeleteDirectory c:\sts_test_dir\
+RUN_UTILS DeleteDirectory e:\sts_test_dir\
+RUN_UTILS MkDir c:\sts_test_dir\
+RUN_UTILS MkDir e:\sts_test_dir\
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_remove.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_remove.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_remove.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_transcation
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_transcation
+RUN_TEST_STEP 100 tststestserver OpenTransactionStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_transcation
+CONSECUTIVE
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_registernew
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_registernew
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_registernew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_createnew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_createnew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_createnew
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_remove
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_remove
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_remove
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_registertemp
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_registertemp
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_registertemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_createtemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_createtemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_createtemp
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_overwrite
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_overwrite
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_overwrite
+CONSECUTIVE
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_pre_commit
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_transcation
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_transcation
+RUN_TEST_STEP 100 tststestserver CommitStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_transcation
+CONSECUTIVE
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_post_commit
+
+END_TESTCASE API-SEC-STS-API-0032
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0033
+//! @SYMTestCaseDesc		Implementation of SEC-STS-API-0033 test documented in TMS : Test concurrent access to STS APIs
+//! @SYMTestPriority		High
+
+START_TESTCASE API-SEC-STS-API-0033
+
+// SEC_STS_TestCase033
+RUN_UTILS DeleteDirectory c:\sts_test_dir\
+RUN_UTILS DeleteDirectory e:\sts_test_dir\
+RUN_UTILS MkDir c:\sts_test_dir\
+RUN_UTILS MkDir e:\sts_test_dir\
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_register_new.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_register_temp.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_overwrite.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threada_remove.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\testcase030_threadb_remove.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\testcase030_threadc_remove.txt
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_transcation
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_transcation
+RUN_TEST_STEP 100 tststestserver OpenTransactionStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_transcation
+CONSECUTIVE
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_registernew
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_registernew
+RUN_TEST_STEP 100 tststestserver RegisterNewFileStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_registernew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_createnew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_createnew
+RUN_TEST_STEP 100 tststestserver CreateNewFileStep     z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_createnew
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_remove
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_remove
+RUN_TEST_STEP 100 tststestserver RemoveStep            z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_remove
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_registertemp
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_registertemp
+RUN_TEST_STEP 100 tststestserver RegisterTemporaryStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_registertemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_createtemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_createtemp
+RUN_TEST_STEP 100 tststestserver CreateTemporaryStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_createtemp
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_overwrite
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_overwrite
+RUN_TEST_STEP 100 tststestserver OverwriteStep         z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_overwrite
+CONSECUTIVE
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase031_pre_rollback
+CONCURRENT
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadA_transcation
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadB_transcation
+RUN_TEST_STEP 100 tststestserver RollbackStep          z:\tusif\tsts\tsts.ini SEC_STS_TestCase030_threadC_transcation
+CONSECUTIVE
+RUN_TEST_STEP 100 tststestserver CheckFilesStep        z:\tusif\tsts\tsts.ini SEC_STS_TestCase031_post_rollback
+
+END_TESTCASE API-SEC-STS-API-0033
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0034
+//! @SYMTestCaseDesc		Negative testing for duplicate API calls
+
+START_TESTCASE API-SEC-STS-API-0034
+
+// SEC_STS_TestCase034
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase034_transaction1
+RUN_TEST_STEP !Result=-14 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase034_transaction1
+RUN_TEST_STEP 100 tststestserver OpenTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase034_transaction2
+RUN_TEST_STEP !Result=-14 100 tststestserver OpenTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase034_transaction2
+RUN_TEST_STEP 100 tststestserver CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase034_transaction1
+RUN_TEST_STEP 100 tststestserver CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase034_transaction2
+
+END_TESTCASE API-SEC-STS-API-0034
+
+
+//! @SYMTestCaseID		API-SEC-STS-API-0035
+//! @SYMTestCaseDesc		File mode vs. file access
+//! @SYMTestPriority		Medium
+
+START_TESTCASE API-SEC-STS-API-0035
+
+// SEC_STS_TestCase035
+RUN_UTILS DeleteDirectory c:\sts_test_dir\
+RUN_UTILS MkDir c:\sts_test_dir\
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep z:\tusif\tsts\tsts.ini SEC_STS_TestCase035
+RUN_TEST_STEP 100 tststestserver FileModeTestStep      z:\tusif\tsts\tsts.ini SEC_STS_TestCase035
+RUN_TEST_STEP 100 tststestserver CloseTransactionStep  z:\tusif\tsts\tsts.ini SEC_STS_TestCase035
+
+END_TESTCASE API-SEC-STS-API-0035
+
+//! @SYMTestCaseID 		API-SEC_STS_InvalidLongFileName_TestCase-0036
+//! @SYMTestCaseDesc 		This test case checks whether the STS has created any directories partially when there  is an error code returned during file creation (e.g. error due to an invalid long file name being used)
+//! @SYMTestPriority 		Medium
+
+START_TESTCASE API-SEC_STS_InvalidLongFileName_TestCase-0036
+
+RUN_UTILS DeleteDirectory c:\sts_test_dir\
+RUN_UTILS MkDir c:\sts_test_dir\
+RUN_TEST_STEP 100 tststestserver CreateTransactionStep        z:\tusif\tsts\tsts.ini SEC_STS_InvalidLongFileName_TestCase036
+RUN_TEST_STEP 100 tststestserver CreateLongFileNameTestStep      z:\tusif\tsts\tsts.ini SEC_STS_InvalidLongFileName_TestCase036
+
+END_TESTCASE API-SEC_STS_InvalidLongFileName_TestCase-0036
+
+
+RUN_UTILS DeleteDirectory c:\sts_test_dir\
+RUN_UTILS DeleteDirectory e:\sts_test_dir\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/tsts_bootuptimerecovery.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+// tsts_rollbackall.script
+// Software Transaction Services Tests
+
+PRINT Run Software Transaction Services (STS) Tests - RollBackAll interface
+
+//ensure that the boot up time recovery is completed before this script gets run
+DELAY 5000
+
+// Load Suite
+LOAD_SUITE tststestserver
+
+RUN_UTILS MkDir c:\sts_test_dir\
+RUN_UTILS MkDir e:\sts_test_dir\
+
+
+//! @SYMTestCaseID 		API-SEC-STS-API-0029
+//! @SYMTestCaseDesc 		Implementation of SEC-STS-API-0029 test documented in TMS : Test boot up time recovery of interrupted transactions
+//! @SYMTestPriority 		High
+
+START_TESTCASE API-SEC-STS-API-0029
+
+RUN_TEST_STEP 100 tststestserver CheckFilesStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase029_post_recovery
+
+END_TESTCASE API-SEC-STS-API-0029
+
+
+RUN_UTILS DeleteDirectory c:\sts_test_dir\
+RUN_UTILS DeleteDirectory e:\sts_test_dir\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/scripts/tsts_rollbackall.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,118 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+// tsts_rollbackall.script
+// Software Transaction Services Tests
+
+PRINT Run Software Transaction Services (STS) Tests - RollBackAll interface
+
+//ensure that stsserver is not running (by introducing this delay) if this script is being run right after startup (ONB)
+//as sts erver is invoked by the daemon at boot up time we have to wait long enough for that operation to be finished otherwise overlap
+//of the execution of this script and the start up recovery might cause script failures
+DELAY 5000
+
+// Load Suite
+LOAD_SUITE tststestserver
+LOAD_SUITE tststestserverrollbackall
+
+RUN_UTILS MkDir c:\sts_test_dir\
+RUN_UTILS MkDir e:\sts_test_dir\
+
+
+//! @SYMTestCaseID 		API-SEC-STS-API-0028
+//! @SYMTestCaseDesc 		Implementation of SEC-STS-API-0028 test documented in TMS : Test rollback all pending transaction 
+//! @SYMTestPriority 		High
+
+START_TESTCASE API-SEC-STS-API-0028
+
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase1_register_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase1_create_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase1_register_temp_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase1_create_temp_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase1_overwrite_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase1_register_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase1_create_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase1_register_temp_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase1_create_temp_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase1_overwrite_file_drive2.txt
+
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase2_register_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase2_create_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase2_register_temp_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase2_create_temp_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase2_overwrite_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase2_register_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase2_create_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase2_register_temp_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase2_create_temp_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase2_overwrite_file_drive2.txt
+
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase3_register_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase3_create_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase3_register_temp_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase3_create_temp_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase3_overwrite_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase3_register_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase3_create_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase3_register_temp_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase3_create_temp_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase3_overwrite_file_drive2.txt
+
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase4_register_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase4_create_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase4_register_temp_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase4_create_temp_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase4_overwrite_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase4_register_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase4_create_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase4_register_temp_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase4_create_temp_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase4_overwrite_file_drive2.txt
+
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase5_register_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase5_create_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase5_overwrite_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase5_register_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase5_create_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase5_overwrite_file_drive2.txt
+
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase6_register_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase6_create_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt c:\sts_test_dir\RollbackAllTestCase6_overwrite_file_drive1.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase6_register_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase6_create_file_drive2.txt
+RUN_UTILS CopyFile z:\tusif\tsts\data\tstsdummy.txt e:\sts_test_dir\RollbackAllTestCase6_overwrite_file_drive2.txt
+
+RUN_TEST_STEP 100 tststestserver FileOperationsStep                  z:\tusif\tsts\tsts.ini SEC_STS_TestCase028_TCB_dir_setup
+RUN_TEST_STEP 100 tststestserver CheckFilesStep                      z:\tusif\tsts\tsts.ini SEC_STS_TestCase028_pre_rollbackall
+RUN_TEST_STEP 100 tststestserverrollbackall RollbackAllPendingStep   z:\tusif\tsts\tsts.ini SEC_STS_TestCase028
+RUN_TEST_STEP 100 tststestserver CheckFilesStep                      z:\tusif\tsts\tsts.ini SEC_STS_TestCase028_post_rollbackall
+RUN_TEST_STEP 100 tststestserver FileOperationsStep                  z:\tusif\tsts\tsts.ini file_system_cleanup
+
+END_TESTCASE API-SEC-STS-API-0028
+
+
+//! @SYMTestCaseID 	API-SEC-STS-RollbackAll-0002
+//! @SYMTestCaseDesc 	Verify that very big journals can be rolled back successfully
+//! @SYMTestPriority 	High
+
+START_TESTCASE API-SEC-STS-RollbackAll-0002
+
+RUN_TEST_STEP 100 tststestserver FileOperationsStep                  z:\tusif\tsts\tsts.ini SEC-STS-RollbackAll-0002_TCB_dir_setup
+RUN_TEST_STEP 100 tststestserverrollbackall RollbackAllPendingStep   z:\tusif\tsts\tsts.ini SEC-STS-RollbackAll-0002
+RUN_TEST_STEP 100 tststestserver CheckFilesStep                      z:\tusif\tsts\tsts.ini SEC-STS-RollbackAll-0002_post_rollbackall
+RUN_TEST_STEP 100 tststestserver FileOperationsStep                  z:\tusif\tsts\tsts.ini file_system_cleanup
+
+END_TESTCASE API-SEC-STS-RollbackAll-0002
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/source/tststestsuiteserver.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,269 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+ @internalComponent
+*/
+#include "tststestsuitestepcommon.h"
+#include "tststestsuiteserver.h"
+#include "tststestsuitestep.h"
+#include "tintegrityservicesstep.h"
+
+using namespace Usif;
+
+LOCAL_C void MainL()
+	{
+	CActiveScheduler* sched=NULL;
+	sched=new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+	CStsTestServer* server = NULL;
+	// Create the CTestServer derived server
+	TRAPD(err,server = CStsTestServer::NewL());
+	if(!err)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+
+
+TInt E32Main()
+/**
+ @return - Standard Epoc error code on process exit
+ Process entry point. Called by client using RProcess API
+ */
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD(err,MainL());
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return err;
+	}
+
+_LIT(KServerName,"tststestserver");
+
+CStsTestServer* CStsTestServer::NewL()
+/**
+ @return - Instance of the test server
+ Called inside the MainL() function to create and start the
+ CTestServer derived server.
+ */
+	{
+	CStsTestServer * server = new (ELeave) CStsTestServer();
+	CleanupStack::PushL(server);
+	server-> ConstructL();
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+void CStsTestServer::ConstructL()
+	{
+	CTestServer::ConstructL(KServerName);
+	User::LeaveIfError(iTestutil.Connect());
+	iTestutil.ShareAuto();
+	}
+
+CStsTestServer::~CStsTestServer()
+	{
+	for(TInt i=0; i<maxNumberOfSessions; ++i)
+		{
+		iSessions[i].Close(); //close the session in case it is open
+		}
+	iTestutil.Close();
+	}
+
+CTestStep* CStsTestServer::CreateTestStep(const TDesC& aStepName)
+/**
+ @return - A CTestStep derived instance
+ Implementation of CTestServer pure virtual
+ */
+	{
+	CTestStep* testStep = NULL;
+
+	if(aStepName == KCreateTransactionStep)
+		testStep = new CCreateTransactionStep(*this);
+	else if(aStepName == KOpenTransactionStep)
+		testStep = new COpenTransactionStep(*this);
+	else if(aStepName == KCloseTransactionStep)
+		testStep = new CCloseTransactionStep(*this);
+	else if(aStepName == KRegisterNewFileStep)
+		testStep = new CRegisterNewFileStep(*this);
+	else if(aStepName == KCreateNewFileStep)
+		testStep = new CCreateNewFileStep(*this);
+	else if(aStepName == KRemoveStep)
+		testStep = new CRemoveStep(*this);
+	else if(aStepName == KRegisterTemporaryStep)
+		testStep = new CRegisterTemporaryStep(*this);
+	else if(aStepName == KCreateTemporaryStep)
+		testStep = new CCreateTemporaryStep(*this);
+	else if(aStepName == KOverwriteStep)
+		testStep = new COverwriteStep(*this);
+	else if(aStepName == KCommitStep)
+		testStep = new CCommitStep(*this);
+	else if(aStepName == KRollbackStep)
+		testStep = new CRollbackStep(*this);
+	else if(aStepName == KRollbackAllPendingStep)
+		testStep = new CRollbackAllPendingStep(*this);
+	else if(aStepName == KCheckFilesStep)
+		testStep = new CCheckFilesStep(*this);
+	else if(aStepName == KCheckFileModeChangeStep)
+		testStep = new CheckFileModeChangeStep(*this);
+	else if(aStepName == KFileOperationsStep)
+		testStep = new CFileOperationsStep(*this);
+	else if(aStepName == KFileModeTestStep)
+		testStep = new CFileModeTestStep(*this);	
+		
+	//legacy integrity services support
+	else if (aStepName == KInstall)
+		testStep = new CInstallStep(*this);
+	else if (aStepName == KRecover)
+		testStep = new CRecoverStep(*this);
+	else if (aStepName == KCleanup)
+		testStep = new CCleanupStep(*this);
+	else if (aStepName == KCheck)
+		testStep = new CCheckStep(*this);
+
+	//integrity services unit tests
+	else if (aStepName == KJournalFileUnitTest)
+		testStep = new CJournalFileUnitTest(*this);
+	else if (aStepName == KJournalFileUnitTestAdd)
+		testStep = new CJournalFileUnitTestAdd(*this);
+	else if (aStepName == KJournalFileUnitTestTemp)
+		testStep = new CJournalFileUnitTestTemp(*this);
+	else if (aStepName == KJournalFileUnitTestRemove)
+		testStep = new CJournalFileUnitTestRemove(*this);
+	else if (aStepName == KJournalFileUnitTestRead)
+		testStep = new CJournalFileUnitTestRead(*this);
+	else if (aStepName == KJournalFileUnitTestEvent)
+		testStep = new CJournalFileUnitTestEvent(*this);
+	else if (aStepName == KJournalUnitTest)
+		testStep = new CJournalUnitTest(*this);
+	else if (aStepName == KJournalUnitTestInstall)
+		testStep = new CJournalUnitTestInstall(*this);
+	else if (aStepName == KJournalUnitTestRollback)
+		testStep = new CJournalUnitTestRollback(*this);
+	else if (aStepName == KIntegrityservicesUnitTestInstall)
+		testStep = new CIntegrityServicesTestInstall(*this);
+	else if (aStepName == KIntegrityservicesUnitTestRollback)
+		testStep = new CIntegrityServicesTestRollback(*this);	
+	else if (aStepName == KCreateLongFileNameTestStep)
+		testStep = new CCreateLongFileNameTestStep(*this);	
+	return testStep;
+	}
+
+TStsTransactionId CStsTestServer::CreateTransactionL(TInt aPos)
+	{
+	RStsSession& s = GetSessionL(aPos); //leaves if aPos is out of boundaries
+	TStsTransactionId id(0);
+	//see remark below at OpenTransactionL()
+	id = s.CreateTransactionL();
+	s.ShareAuto();
+	return id;
+	}
+
+void CStsTestServer::OpenTransactionL(TInt aPos, TStsTransactionId aTransactionID)
+	{
+	RStsSession& s = GetSessionL(aPos); //leaves if aPos is out of boundaries
+	/*
+	 If OpenTransactionL() leaves for some reasons (eg: in one of the testcases invalid id is supplied
+	 so it is expected to leave with KErrNotFound) s.ShareAuto() is not invoked, that's s is not shared
+	 in the context of the process. As leaving causes the corresponding teststep's thread to be killed the
+	 connection between the client and the server is destroyed by the kernel leaving s's iHandle to point to and invalid object.
+	 As a result any subsequent API call on s causes panic therefore we need to clean up properly in case of leave. 
+	 */
+	TRAPD(err, s.OpenTransactionL(aTransactionID));
+	if(err != KErrNone)
+		{
+		CloseTransactionL(aPos);
+		User::Leave(err);
+		}
+	s.ShareAuto();
+	}
+
+void CStsTestServer::CloseTransactionL(TInt aPos)
+	{
+	GetSessionL(aPos).Close();
+	}
+
+void CStsTestServer::RegisterNewL(TInt aPos, const TDesC& aFileName)
+	{
+	GetSessionL(aPos).RegisterNewL(aFileName);
+	}
+
+void CStsTestServer::CreateNewL(TInt aPos, const TDesC& aFileName, RFile &aFile, TUint aFileMode)
+	{
+	GetSessionL(aPos).CreateNewL(aFileName, aFile, aFileMode);
+	}
+
+void CStsTestServer::RemoveL(TInt aPos, const TDesC& aFileName)
+	{
+	GetSessionL(aPos).RemoveL(aFileName);
+	}
+
+void CStsTestServer::RegisterTemporaryL(TInt aPos, const TDesC& aFileName)
+	{
+	GetSessionL(aPos).RegisterTemporaryL(aFileName);
+	}
+
+void CStsTestServer::CreateTemporaryL(TInt aPos, const TDesC& aFileName, RFile &aFile, TUint aFileMode)
+	{
+	GetSessionL(aPos).CreateTemporaryL(aFileName, aFile, aFileMode);
+	}
+
+void CStsTestServer::OverwriteL(TInt aPos, const TDesC& aFileName, RFile &aFile, TUint aFileMode)
+	{
+	GetSessionL(aPos).OverwriteL(aFileName, aFile, aFileMode);
+	}
+
+void CStsTestServer::CommitL(TInt aPos)
+	{
+	GetSessionL(aPos).CommitL();
+	CloseTransactionL(aPos);
+	}
+
+void CStsTestServer::RollBackL(TInt aPos)
+	{
+	GetSessionL(aPos).RollBackL();
+	CloseTransactionL(aPos);
+	}
+
+RStsSession& CStsTestServer::GetSessionL(TInt aPos)
+	{
+	if(aPos <0 || aPos>=maxNumberOfSessions)
+		{
+		ERR_PRINTF2(_L("Position %d is out of boundaries!"), aPos);
+		User::Leave(KErrArgument);
+		}
+	return iSessions[aPos];
+	}
+
+TStsTransactionId CStsTestServer::GetTransactionIDL(TInt aPos)
+	{
+	return GetSessionL(aPos).TransactionIdL();
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/source/tststestsuiteserverrollbackall.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,96 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+ @internalComponent
+*/
+#include "tststestsuiteserverrollbackall.h"
+#include "tststestsuitesteprollbackall.h"
+
+LOCAL_C void MainL()
+	{
+	CActiveScheduler* sched=NULL;
+	sched=new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+	CStsTestServerRollbackAll* server = NULL;
+	// Create the CTestServer derived server
+	TRAPD(err,server = CStsTestServerRollbackAll::NewL());
+	if(!err)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+
+
+TInt E32Main()
+/**
+ @return - Standard Epoc error code on process exit
+ Process entry point. Called by client using RProcess API
+ */
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD(err,MainL());
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return err;
+	}
+
+_LIT(KServerName,"tststestserverrollbackall");
+
+CStsTestServerRollbackAll* CStsTestServerRollbackAll::NewL()
+/**
+ @return - Instance of the test server
+ Called inside the MainL() function to create and start the
+ CTestServer derived server.
+ */
+	{
+	CStsTestServerRollbackAll * server = new (ELeave) CStsTestServerRollbackAll();
+	CleanupStack::PushL(server);
+	server-> ConstructL();
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+void CStsTestServerRollbackAll::ConstructL()
+	{
+	CTestServer::ConstructL(KServerName);
+	}
+
+CTestStep* CStsTestServerRollbackAll::CreateTestStep(const TDesC& aStepName)
+/**
+ @return - A CTestStep derived instance
+ Implementation of CTestServer pure virtual
+ */
+	{
+	CTestStep* testStep = NULL;
+
+	if(aStepName == KRollbackAllPendingStep)
+		testStep = new CRollbackAllPendingStep();
+	return testStep;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/source/tststestsuitestep.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1654 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* tststestsuitestep.h
+*
+*/
+
+
+/**
+ @file
+ @test
+ @internalComponent
+*/
+#include "tststestsuitestep.h"
+#include "tststestsuiteserver.h"
+#include <s32file.h>
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "stsrecovery.h"
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+
+
+_LIT(KEFileShareExclusive, 				"EFileShareExclusive");
+_LIT(KEFileShareReadersOnly,			"EFileShareReadersOnly");
+_LIT(KEFileShareAny,					"EFileShareAny");
+_LIT(KEFileShareReadersOrWriters, 		"EFileShareReadersOrWriters");
+_LIT(KEFileStream, 						"EFileStream");
+_LIT(KEFileStreamText,					"EFileStreamText");
+_LIT(KEFileRead,						"EFileRead");
+_LIT(KEFileWrite,						"EFileWrite");
+_LIT(KEFileReadAsyncAll,				"EFileReadAsyncAll");
+_LIT(KEFileWriteBuffered,				"EFileWriteBuffered");
+_LIT(KEFileWriteDirectIO,				"EFileWriteDirectIO");
+_LIT(KEFileReadBuffered,				"EFileReadBuffered");
+_LIT(KEFileReadDirectIO,				"EFileReadDirectIO");
+_LIT(KEFileReadAheadOn,					"EFileReadAheadOn");
+_LIT(KEFileReadAheadOff,				"EFileReadAheadOff");
+_LIT(KORSign,							"|");
+
+
+CStsBaseTestStep::CStsBaseTestStep(CStsTestServer &aStsTestServer): iStsTestServer(aStsTestServer)
+	{
+	}
+
+CStsTestServer& CStsBaseTestStep::Server()
+	{
+	return iStsTestServer;
+	}
+
+TInt CStsBaseTestStep::GetIntFromConfigL(const TDesC& aName)
+	{
+	TInt ret(0);
+	if(!GetIntFromConfig(ConfigSection(), aName, ret))
+		{
+		ERR_PRINTF2(_L("%S is not found in config!"), &aName);
+		User::Leave(KErrNotFound);
+		}
+	return ret;
+	}
+
+TInt CStsBaseTestStep::GetTransactionSlotFromConfigL()
+/**
+ Reads the target file's path from the ini file
+ */
+	{
+	return GetIntFromConfigL(KTransactionSlot);
+	}
+
+TInt CStsBaseTestStep::GetTransactionSlotToReuseTransactionIdFromConfigL()
+	{
+	return GetIntFromConfigL(KTransactionSlotID);
+	}
+
+TInt CStsBaseTestStep::GetTransactionIdFromConfigL()
+	{
+	return GetIntFromConfigL(KTransactionID);
+	}
+
+TPtrC CStsBaseTestStep::GetStringFromConfigL(const TDesC& aName)
+	{
+	TPtrC ret;
+	if(!GetStringFromConfig(ConfigSection(), aName, ret))
+		{
+		ERR_PRINTF2(_L("%S is not found in config!"), &aName);
+		User::Leave(KErrNotFound);
+		}
+	return ret;
+	}
+
+TPtrC CStsBaseTestStep::GetTargetFilePathFromConfigL()
+	{
+	return GetStringFromConfigL(KTargetFile);
+	}
+
+void CStsBaseTestStep::WriteToFileL(RFile &aFile, TDesC& aString)
+	{
+	RFileWriteStream stream;
+	CleanupClosePushL(stream);
+	stream.Attach(aFile);
+	TRAPD(err,
+		stream.WriteL(aString);
+		stream.CommitL();
+		); //catch the error so that it can be reported
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF2(_L("CStsBaseTestStep::WriteToFileL() Writing to file failed! Error code: %d"), err);
+		User::Leave(err);
+		}
+	stream.Close();
+	CleanupStack::PopAndDestroy(&stream);
+	}
+
+TBool CStsBaseTestStep::FileExistsL(const TDesC &aFileName)
+	{
+	INFO_PRINTF2(_L("CStsBaseTestStep::FileExistsL() %S"), &aFileName);
+	TBool ret=EFalse;
+	TRAPD(err, ret=Server().GetTestUtil().FileExistsL(aFileName)); //trap leaving fucntion to log error
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF3(_L("CStsBaseTestStep::FileExistsL() File existence check failed for %S Error code: %d"), &aFileName, err);
+		User::Leave(err);
+		}
+	return ret;
+	}
+
+void CStsBaseTestStep::DeleteFileL(const TDesC &aFileName)	
+	{
+	TInt err=Server().GetTestUtil().Delete(aFileName); 
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF3(_L("DeleteFileL() Deletion failed for %S Error code: %d"), &aFileName, err);
+		User::Leave(err);
+		}
+	}
+void CStsBaseTestStep::CopyFileL(const TDesC& aSourceFile, const TDesC& aDestinationFile)
+	{
+	TInt err=Server().GetTestUtil().Copy(aSourceFile, aDestinationFile); 
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF4(_L("CStsBaseTestStep::CopyFileL() Copying %S to %S failed. Error code: %d"), &aSourceFile, &aDestinationFile, err);
+		User::Leave(err);
+		}
+	}
+
+void CStsBaseTestStep::RmDirL(const TDesC& aFileName)
+	{
+	TInt err=Server().GetTestUtil().RmDir(aFileName); 
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF3(_L("CStsBaseTestStep::RmDirL() Deleting dir %S failed. Error code: %d"), &aFileName, err);
+		User::Leave(err);
+		}
+	}
+
+void CStsBaseTestStep::MkDirAllL(const TDesC& aFileName)
+	{
+	TInt err=Server().GetTestUtil().MkDirAll(aFileName); 
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF3(_L("CStsBaseTestStep::MkDirAllL() Creating dir %S failed. Error code: %d"), &aFileName, err);
+		User::Leave(err);
+		}
+	}
+
+void CStsBaseTestStep::DeleteL(const TDesC& aFileName)
+	{
+	TInt err=Server().GetTestUtil().Delete(aFileName); 
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF3(_L("CStsBaseTestStep::DeleteL() Deleting %S failed. Error code: %d"), &aFileName, err);
+		User::Leave(err);
+		}
+	}
+
+void CStsBaseTestStep::SetReadOnlyL(const TDesC& aFileName, TInt aSetReadOnly)
+	{
+	TInt err=Server().GetTestUtil().SetReadOnly(aFileName, aSetReadOnly);
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF4(_L("CStsBaseTestStep::SetReadOnly() Trying to set \"readonly\" flag on %S failed to %d. Error code: %d"), &aFileName, aSetReadOnly, err);
+		User::Leave(err);
+		}
+	}
+
+HBufC* CStsBaseTestStep::CreateDataForNewFileCreatedByStsServerLC(const TDesC& aTestStepName, TNewFileType aType)
+	{
+	HBufC *buf = HBufC::NewLC(200);
+	TPtr bufPtr = buf->Des();
+
+	bufPtr.Append(KFileData1);
+	switch(aType)
+		{
+		case ENewTemporaryFile:
+			bufPtr.Append(KFileData2);
+			break;
+		case ENewPermanentFile:
+			bufPtr.Append(KFileData3);
+			break;
+		default:
+			bufPtr.Append(KFileData4);
+			break;
+		}
+	bufPtr.Append(KFileData5);
+	bufPtr.Append(KFileData7);
+	bufPtr.Append(aTestStepName);
+	bufPtr.Append(KFileData6);
+	return buf;
+	}
+
+//----------------------------------------
+
+CCreateTransactionStep::CCreateTransactionStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KCreateTransactionStep);
+	}
+
+void CCreateTransactionStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateTransactionStep Preamble"));
+	SetTestStepResult(EPass);
+	}
+
+void CCreateTransactionStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateTransactionStep in test step"));
+
+	TInt trSlot = GetTransactionSlotFromConfigL();
+	TInt trID = Server().CreateTransactionL(trSlot);
+	SetTestStepResult(EPass);
+	}
+
+void CCreateTransactionStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateTransactionStep Postamble"));
+	}
+
+//----------------------------------------
+
+COpenTransactionStep::COpenTransactionStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KOpenTransactionStep);
+	}
+
+void COpenTransactionStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("COpenTransactionStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void COpenTransactionStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("COpenTransactionStep in test step"));
+
+	
+	TInt trSlot = GetTransactionSlotFromConfigL(); //get required transaction slot from ini
+	TInt requiredSlotToTakeIdFrom(0);
+	TStsTransactionId trID(0);
+	TRAPD(err, requiredSlotToTakeIdFrom = GetTransactionSlotToReuseTransactionIdFromConfigL()); //get transaction id from ini to reuse its id
+	if(err == KErrNone)
+		{
+		trID = Server().GetTransactionIDL(requiredSlotToTakeIdFrom); //get ID from server from the requested slot
+		}
+	else
+		{
+		if(err == KErrNotFound)
+			{
+			trID =GetTransactionIdFromConfigL();
+			}
+		else
+			{
+			User::Leave(err);
+			}
+		}
+	//open transaction
+	Server().OpenTransactionL(trSlot, trID);
+
+	SetTestStepResult(EPass);
+	
+	}
+
+void COpenTransactionStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("COpenTransactionStep Postamble"));
+	
+	}
+
+
+
+//----------------------------------------
+		
+CCloseTransactionStep::CCloseTransactionStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KCloseTransactionStep);
+	}
+
+void CCloseTransactionStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCloseTransactionStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CCloseTransactionStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCloseTransactionStep in test step"));
+	
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//close transaction
+	Server().CloseTransactionL(trSlot);
+
+	SetTestStepResult(EPass);
+	
+	}
+
+void CCloseTransactionStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCloseTransactionStep Postamble"));
+	
+	}
+
+//----------------------------------------
+
+CRegisterNewFileStep::CRegisterNewFileStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KRegisterNewFileStep);
+	}
+
+void CRegisterNewFileStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRegisterNewFileStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CRegisterNewFileStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRegisterNewFileStep in test step"));
+	
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+
+	Server().RegisterNewL(trSlot, filePathInIni);
+
+	SetTestStepResult(EPass);
+	
+	}
+
+void CRegisterNewFileStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRegisterNewFileStep Postamble"));
+	
+	}
+
+
+//----------------------------------------
+
+CCreateNewFileStep::CCreateNewFileStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KCreateNewFileStep);
+	}
+
+void CCreateNewFileStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateNewFileStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CCreateNewFileStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateNewFileStep in test step"));
+	
+	TFileMode fileMode(static_cast<TFileMode>(EFileShareExclusive|EFileWrite));
+	
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+	
+	//the handle to the newly created file
+	RFile newFile;
+	CleanupClosePushL(newFile);
+	//register newly created file
+	Server().CreateNewL(trSlot, filePathInIni, newFile, fileMode);
+
+	HBufC *bufPtr=CreateDataForNewFileCreatedByStsServerLC(KCreateNewFileStep, ENewPermanentFile);
+	WriteToFileL(newFile, *bufPtr);
+	
+	CleanupStack::PopAndDestroy(2, &newFile);
+
+	SetTestStepResult(EPass);
+	
+	}
+
+void CCreateNewFileStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateNewFileStep Postamble"));
+	
+	}
+
+//----------------------------------------
+
+CRemoveStep::CRemoveStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KRemoveStep);
+	}
+
+void CRemoveStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRemoveStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CRemoveStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRemoveStep in test step"));
+	
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+
+	Server().RemoveL(trSlot, filePathInIni);
+
+	SetTestStepResult(EPass);
+	
+	}
+
+void CRemoveStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRemoveStep Postamble"));
+	
+	}
+
+//----------------------------------------
+	
+CRegisterTemporaryStep::CRegisterTemporaryStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KRegisterTemporaryStep);
+	}
+
+void CRegisterTemporaryStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRegisterTemporaryStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CRegisterTemporaryStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRegisterTemporaryStep in test step"));
+	
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+
+	Server().RegisterTemporaryL(trSlot, filePathInIni);
+
+	SetTestStepResult(EPass);
+	
+	}
+
+void CRegisterTemporaryStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRegisterTemporaryStep Postamble"));
+	
+	}
+
+//----------------------------------------
+	
+CCreateTemporaryStep::CCreateTemporaryStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KCreateTemporaryStep);
+	}
+
+void CCreateTemporaryStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateTemporaryStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CCreateTemporaryStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateTemporaryStep in test step"));
+	
+	TFileMode fileMode(static_cast<TFileMode>(EFileShareExclusive|EFileWrite));
+	
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+	
+	//the handle to the newly created file
+	RFile newTempFile;
+	CleanupClosePushL(newTempFile);
+	//register newly created file
+	Server().CreateTemporaryL(trSlot, filePathInIni, newTempFile, fileMode);
+
+	HBufC* bufPtr=CreateDataForNewFileCreatedByStsServerLC(KCreateTemporaryStep, ENewTemporaryFile);
+	WriteToFileL(newTempFile, *bufPtr);
+
+	
+	CleanupStack::PopAndDestroy(2, &newTempFile);
+
+	SetTestStepResult(EPass);
+	
+	}
+
+void CCreateTemporaryStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateTemporaryStep Postamble"));
+	
+	}
+
+//----------------------------------------
+		
+COverwriteStep::COverwriteStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KOverwriteStep);
+	}
+
+void COverwriteStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("COverwriteStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void COverwriteStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("COverwriteStep in test step"));
+	
+	TFileMode fileMode(static_cast<TFileMode>(EFileShareExclusive|EFileWrite));
+	
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+	
+	//the handle to the newly created file
+	RFile newOverwriteFile;
+	CleanupClosePushL(newOverwriteFile);
+
+	//register newly created file
+	Server().OverwriteL(trSlot, filePathInIni, newOverwriteFile, fileMode);
+
+	HBufC *bufPtr=CreateDataForNewFileCreatedByStsServerLC(KOverwriteStep, ENewPermanentFile);
+	WriteToFileL(newOverwriteFile, *bufPtr);
+	
+	CleanupStack::PopAndDestroy(2, &newOverwriteFile);
+
+	SetTestStepResult(EPass);
+	
+	}
+
+void COverwriteStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("COverwriteStep Postamble"));
+	
+	}
+
+//----------------------------------------
+		
+CCommitStep::CCommitStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KCommitStep);
+	}
+
+void CCommitStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCommitStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CCommitStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCommitStep in test step"));
+	
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//commit transaction
+	Server().CommitL(trSlot);
+
+	SetTestStepResult(EPass);
+	
+	}
+
+void CCommitStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCommitStep Postamble"));
+	
+	}
+
+//----------------------------------------
+		
+CRollbackStep::CRollbackStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KRollbackStep);
+	}
+
+void CRollbackStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRollbackStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CRollbackStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRollbackStep in test step"));
+	
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//roolback transaction
+	Server().RollBackL(trSlot);
+	
+	SetTestStepResult(EPass);
+	
+	}
+
+void CRollbackStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRollbackStep Postamble"));
+	
+	}
+
+//----------------------------------------
+		
+CRollbackAllPendingStep::CRollbackAllPendingStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KRollbackAllPendingStep);
+	}
+
+void CRollbackAllPendingStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRollbackAllPendingStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CRollbackAllPendingStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRollbackAllPendingStep in test step"));
+	
+	RStsRecoverySession session;
+	session.RollbackAllPendingL();
+	session.Close();
+	SetTestStepResult(EPass);
+	
+	}
+
+void CRollbackAllPendingStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRollbackAllPendingStep Postamble"));
+	
+	}
+
+//----------------------------------------
+			
+CCheckFilesStep::CCheckFilesStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KCheckFilesStep);
+	}
+
+void CCheckFilesStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCheckFilesStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CCheckFilesStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCheckFilesStep in test step"));
+	SetTestStepResult(EPass);
+	
+	RArray<TPtrC> fileNumExist;
+	RArray<TPtrC> fileNumNonExist;
+	CleanupClosePushL(fileNumExist);
+	CleanupClosePushL(fileNumNonExist);
+	GetFileNamesForCheckL(fileNumExist, fileNumNonExist);
+	CheckIfFilesExistL(fileNumExist);
+	CheckIfFilesNotExistL(fileNumNonExist);
+	CleanupStack::PopAndDestroy(2, &fileNumExist);
+	}
+
+void CCheckFilesStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCheckFilesStep Postamble"));
+	
+	}
+
+
+void CCheckFilesStep::GetFileNamesForCheckL(RArray<TPtrC>& aFileNumExist,RArray<TPtrC>& aFileNumNonExist)
+	{
+	TInt entriesNumExist=0;
+	TInt entriesNumNonExist=0;
+	
+	GetIntFromConfig(ConfigSection(), KNumExist, entriesNumExist);
+	GetIntFromConfig(ConfigSection(), KNumNonExist, entriesNumNonExist);
+	
+	ExtractFileNameL(entriesNumExist, KExistBase, aFileNumExist);
+	ExtractFileNameL(entriesNumNonExist, KNonExistBase, aFileNumNonExist);
+	}
+		
+void CCheckFilesStep::ExtractFileNameL(TInt aEntries, const TDesC& aEntryBase, RArray<TPtrC>& aFileArray)
+	{
+	TPtrC fname;
+	const TInt KKeyBufSize =64;
+	
+	for(TInt i=0; i<aEntries; i++)
+		{
+		//construct name of the key
+		TBuf<KKeyBufSize> keyBuf(aEntryBase);
+		keyBuf.AppendNum(i);
+		
+		if(!GetStringFromConfig(ConfigSection(),keyBuf,fname))
+			{
+			ERR_PRINTF2(_L("%S is not found in config!"), &keyBuf);
+			User::Leave(KErrNotFound);
+			}
+		aFileArray.Insert(fname, i);
+		}
+	}
+
+void CCheckFilesStep::CheckIfFilesExistL(const RArray<TPtrC>& aFileArray)
+	{
+	TInt nErr =0;
+	TInt fileCount=aFileArray.Count();
+	for(TInt i =0; i< fileCount; i++)
+		{
+		if(!FileExistsL(aFileArray[i]))
+			{
+			ERR_PRINTF2(_L("File missing: %S"), &aFileArray[i]);
+			nErr++;
+			}
+		}
+	if(nErr)
+		{
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CCheckFilesStep::CheckIfFilesNotExistL(const RArray<TPtrC>& aFileArray)
+	{
+	TInt nErr =0;
+	TInt fileCount=aFileArray.Count();
+	
+	for(TInt i =0; i< fileCount; i++)
+		{
+		if(FileExistsL(aFileArray[i]))
+			{
+			ERR_PRINTF2(_L("File exists (but shouldn't): %S"), &aFileArray[i]);
+			nErr++;
+			}
+		}
+	if(nErr)
+		{
+		SetTestStepResult(EFail);
+		}
+	}
+	
+
+//----------------------------------------
+			
+CheckFileModeChangeStep::CheckFileModeChangeStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KCheckFileModeChangeStep);
+	}
+
+void CheckFileModeChangeStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CheckFileModeChangeStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CheckFileModeChangeStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CheckFileModeChangeStep in test step"));
+	SetTestStepResult(EPass);
+	
+	TFileMode fileMode(static_cast<TFileMode>(EFileShareExclusive|EFileWrite));
+	
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+	
+	//the handle to the newly created file
+	RFile newFile;
+	CleanupClosePushL(newFile);
+	//register newly created file
+	Server().CreateNewL(trSlot, filePathInIni, newFile, fileMode);
+
+
+	TFileMode fileModes[] = {
+			EFileShareReadersOnly,
+			EFileShareAny,
+			EFileShareReadersOrWriters,
+			EFileShareExclusive
+			};
+
+	const TDesC* fileModeStrings[] = {
+				&KEFileShareReadersOnly,
+				&KEFileShareAny,
+				&KEFileShareReadersOrWriters,
+				&KEFileShareExclusive
+				};
+	
+	TFileMode fileSubModes[] = {
+			EFileStream,
+			EFileStreamText,
+			EFileRead,
+			EFileWrite,
+			EFileReadAsyncAll,
+			EFileWriteBuffered,
+			EFileWriteDirectIO,
+			EFileReadBuffered,
+			EFileReadDirectIO,
+			EFileReadAheadOn,
+			EFileReadAheadOff
+			};
+
+	const TDesC* fileSubModeStrings[] = {
+			&KEFileStream,
+			&KEFileStreamText,
+			&KEFileRead,
+			&KEFileWrite,
+			&KEFileReadAsyncAll,
+			&KEFileWriteBuffered,
+			&KEFileWriteDirectIO,
+			&KEFileReadBuffered,
+			&KEFileReadDirectIO,
+			&KEFileReadAheadOn,
+			&KEFileReadAheadOff
+			};
+
+	
+	INFO_PRINTF4(_L("CheckFileModeChangeStep::ImplTestStepL() returned file handle mode is: %S%S%S"), &KEFileShareExclusive, &KORSign, &KEFileWrite);
+
+	for(TInt mode=0; mode<sizeof(fileModes)/sizeof(TFileMode); ++mode)
+		{
+		for(TInt submode=0; submode<sizeof(fileSubModes)/sizeof(TFileMode); ++submode)
+			{
+			TInt err=newFile.ChangeMode(static_cast<TFileMode>(fileModes[mode]|fileSubModes[submode]));
+			if(err==KErrNone)
+				{
+				INFO_PRINTF4(_L("<font color=green>CheckFileModeChangeStep::ImplTestStepL() setting file mode to %S%S%S was successful</font>"),fileModeStrings[mode], &KORSign, fileSubModeStrings[submode]);
+				}
+			else if(err==KErrArgument)
+				{
+				ERR_PRINTF4(_L("<font color=red>CheckFileModeChangeStep::ImplTestStepL() setting file mode to %S%S%S was unsuccessful. KErrArgument is returned!</font>"),fileModeStrings[mode], &KORSign, fileSubModeStrings[submode]);
+				}
+			else if(err==KErrAccessDenied)
+				{
+				ERR_PRINTF4(_L("<font color=red>CheckFileModeChangeStep::ImplTestStepL() setting file mode to %S%S%S was unsuccessful. KErrAccessDenied is returned!</font>"),fileModeStrings[mode], &KORSign, fileSubModeStrings[submode]);
+				}
+			else
+				{
+				ERR_PRINTF5(_L("<font color=red>CheckFileModeChangeStep::ImplTestStepL() setting file mode to %S%S%S was unsuccessful. %d is returned!</font>"),fileModeStrings[mode], &KORSign, fileSubModeStrings[submode], err);
+				}
+			}
+		
+		}
+	
+	CleanupStack::PopAndDestroy(&newFile);	
+	}
+
+void CheckFileModeChangeStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CheckFileModeChangeStep Postamble"));
+	
+	}
+
+//----------------------------------------
+			
+CFileOperationsStep::CFileOperationsStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KCheckFilesStep);
+	}
+
+void CFileOperationsStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CFileOperationsStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CFileOperationsStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CFileOperationsStep in test step"));
+	ProcessFileOperationsL();
+	SetTestStepResult(EPass);
+	
+	}
+
+void CFileOperationsStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CFileOperationsStep Postamble"));
+	
+	}
+		
+void CFileOperationsStep::ProcessFileOperationsL()
+	{
+	TInt numOfOps=GetIntFromConfigL(KNumOfOperations);
+	const TInt buffsize(30);
+	
+	for(TInt i=0; i<numOfOps; i++)
+		{
+		//construct name of the action (ie: action0, action1, ...)
+		TBuf<buffsize> opBuf(KOpNameBase);
+		opBuf.AppendNum(i);
+		TBool ignoreErrors=EFalse;
+		TPtrC operationLinePtr=GetStringFromConfigL(opBuf);
+		TInt nextParamStart(0);
+		TInt err=KErrNone;
+		
+		TPtrC command(GetNextCommandLineParameterL(operationLinePtr, nextParamStart));
+		TInt tempNextParamStart=nextParamStart;
+		TPtrC ignoreErrorsSwitch(GetNextCommandLineParameterL(operationLinePtr, nextParamStart));
+		if(ignoreErrorsSwitch == KIgnoreErrorsSwitch)
+			{
+			//"-i" switch is present
+			ignoreErrors=ETrue;
+			}
+		else
+			{
+			//no "-i" switch go back to original position
+			nextParamStart=tempNextParamStart;
+			}
+		if(command == KMkDirAllOp) //mkdirall
+			{
+			TPtrC target(GetNextCommandLineParameterL(operationLinePtr, nextParamStart));
+			TRAP(err, MkDirAllL(target));
+			}
+		else if(command == KRmDirOp) //rmdir
+			{
+			TPtrC target(GetNextCommandLineParameterL(operationLinePtr, nextParamStart));
+			TRAP(err, RmDirL(target));
+			}
+		else if(command == KCopyOp) //copy
+			{
+			TPtrC source(GetNextCommandLineParameterL(operationLinePtr, nextParamStart));
+			TPtrC dest(GetNextCommandLineParameterL(operationLinePtr, nextParamStart));
+			TRAP(err, CopyFileL(source, dest));
+			}
+		else if(command == KDeleteOp) //delete
+			{
+			TPtrC target(GetNextCommandLineParameterL(operationLinePtr, nextParamStart));
+			TRAP(err, DeleteL(target));
+			}
+		else if(command == KAttribOp) //attrib
+			{
+			enum TAttribOperation{
+			Unset=0x00,
+			SetReadOnly=0x01}; //later more operations can be handled
+
+			TPtrC attribSwitch(GetNextCommandLineParameterL(operationLinePtr, nextParamStart));
+			TInt operation=SetReadOnly*(attribSwitch[0] == TChar('r') || attribSwitch[0] == TChar('R'));
+			TInt flag=0;
+			if(attribSwitch[1] == TChar('+'))
+				flag=1;
+			else if(attribSwitch[1] == TChar('-'))
+				flag=-1;
+			if(attribSwitch.Length() == 2 && operation && flag)
+				{
+				TPtrC target(GetNextCommandLineParameterL(operationLinePtr, nextParamStart));
+				switch(operation) //later more operations can be handled
+					{
+					case SetReadOnly:
+						TRAP(err, SetReadOnlyL(target, (flag>0? 1 : 0)));
+						break;
+					default:
+						break;
+					}
+				}
+			else
+				{
+				ERR_PRINTF2(_L("<font color=red>CFileOperationsStep::ProcessFileOperationsL() Unknown command or corrupt command line %S </font>"), &operationLinePtr);
+				User::Leave(KErrArgument);
+				}
+			}
+		else //unknown command or corrupt command line (ie: missing command)
+			{
+			ERR_PRINTF2(_L("<font color=red>CFileOperationsStep::ProcessFileOperationsL() Unknown command or corrupt command line %S </font>"), &operationLinePtr);
+			User::Leave(KErrArgument);
+			}
+		
+		if(!ignoreErrors)
+			{
+			User::LeaveIfError(err);
+			}
+		}
+	}
+
+TPtrC CFileOperationsStep::GetNextCommandLineParameterL(const TDesC& aLine, TInt& aNextAvailablePos)
+	{
+	TInt lineLength=aLine.Length();
+	TInt startpos=0, stoppos=0;
+	TUint spaceChar=' ', tabChar='\t';
+	
+	if(lineLength==0 || aNextAvailablePos>=lineLength) //empty command line or next position is beyond the end of line
+		{
+		User::Leave(KErrArgument);
+		}
+
+	for(startpos=aNextAvailablePos; startpos<lineLength; ++startpos)
+		{
+		if(aLine[startpos]!=spaceChar && aLine[startpos]!=tabChar) //skip initial spaces
+			break;
+		}
+	
+	if(startpos==lineLength) //line contains only spaces
+		{
+		User::Leave(KErrArgument);
+		}
+	
+	for(stoppos=startpos; stoppos<lineLength; ++stoppos)
+		{
+		if(aLine[stoppos]==spaceChar || aLine[startpos]==tabChar) //skip all non space characters (ie: find the end of string)
+			break;
+		}
+	aNextAvailablePos=stoppos;
+	return TPtrC(aLine.Mid(startpos, stoppos-startpos));
+	
+	}
+
+//----------------------------------------
+			
+CFileModeTestStep::CFileModeTestStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	SetTestStepName(KFileModeTestStep);
+	}
+
+void CFileModeTestStep::ImplTestStepPreambleL()
+	{
+	INFO_PRINTF1(_L("CFileModeTestStep Preamble"));
+	SetTestStepResult(EPass);
+	
+	}
+
+void CFileModeTestStep::ImplTestStepL()
+	{
+	INFO_PRINTF1(_L("CFileModeTestStep in test step"));
+	TestCase1L();
+	TestCase2L();
+	TestCase3L();
+	}
+
+void CFileModeTestStep::TestCase1L()
+	{
+	INFO_PRINTF1(_L("CFileModeTestStep test case 1"));
+	
+/*
+ This tescase tests that the file -that's created by the server and whose handle is returned to the client- is writable by the client 
+ */	
+	TFileMode fileModes[] = {
+			EFileShareAny,
+			EFileShareReadersOrWriters,
+			EFileShareExclusive
+			};
+
+	const TDesC* fileModeStrings[] = {
+				&KEFileShareAny,
+				&KEFileShareReadersOrWriters,
+				&KEFileShareExclusive
+				};
+	
+	TFileMode fileSubModes[] = {
+			EFileStream,
+			EFileStreamText,
+			EFileWrite,
+			EFileWriteBuffered,
+			EFileWriteDirectIO,
+			};
+
+	const TDesC* fileSubModeStrings[] = {
+			&KEFileStream,
+			&KEFileStreamText,
+			&KEFileWrite,
+			&KEFileWriteBuffered,
+			&KEFileWriteDirectIO,
+			};
+
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+	TParsePtrC parse(filePathInIni);
+	
+	//the handle to the newly created file
+	RFile newFile;
+	//register newly created file
+	HBufC *bufPtr1=CreateDataForNewFileCreatedByStsServerLC(KCreateNewFileStep, ENewPermanentFile);
+	HBufC *bufPtr2=CreateDataForNewFileCreatedByStsServerLC(KCreateTemporaryStep, ENewTemporaryFile);
+	HBufC *bufPtr3=CreateDataForNewFileCreatedByStsServerLC(KOverwriteStep, ENewPermanentFile);
+	
+	HBufC* targetFileName = HBufC::NewLC(KMaxFileName);
+	TPtr fileNameBasePtr(targetFileName->Des());
+	fileNameBasePtr.Append(parse.DriveAndPath());
+	fileNameBasePtr.Append(parse.Name());
+	TPtr fileNameFullPtr(fileNameBasePtr);
+	
+	TInt counter(0);
+	for(TInt mode=0; mode<sizeof(fileModes)/sizeof(TFileMode); ++mode)
+		{
+		for(TInt submode=0; submode<sizeof(fileSubModes)/sizeof(TFileMode); ++submode, ++counter)
+			{
+			TInt err=KErrNone;
+			CleanupClosePushL(newFile);
+
+			TFileMode fileMode(static_cast<TFileMode>(fileModes[mode]|fileSubModes[submode]));
+			
+			//test RStsSession::CreateNewL()
+			fileNameFullPtr.Set(fileNameBasePtr);
+			fileNameFullPtr.Append(_L("_createnew"));
+			fileNameFullPtr.AppendNum(counter);
+			fileNameFullPtr.Append(parse.Ext());
+			TRAP(err,
+					Server().CreateNewL(trSlot, fileNameFullPtr, newFile, fileMode);
+					WriteToFileL(newFile, *bufPtr1);
+					);
+			newFile.Close();
+			if(err!=KErrNone)
+				{
+				ERR_PRINTF4(_L("The file -created by RStsSession::CreateNewL()- cannot be written into when the creation mode is set to  %S %S %S"), &fileModeStrings[mode], &KORSign, &fileSubModeStrings[submode]);
+				}
+	
+			//test RStsSession::CreateTemporaryL()
+			fileNameFullPtr.Set(fileNameBasePtr);
+			fileNameFullPtr.Append(_L("_createtemp"));
+			fileNameFullPtr.AppendNum(counter);
+			fileNameFullPtr.Append(parse.Ext());
+			TRAP(err,
+					Server().CreateTemporaryL(trSlot, fileNameFullPtr, newFile, fileMode);
+					WriteToFileL(newFile, *bufPtr2);
+					);
+			newFile.Close();
+			if(err!=KErrNone)
+				{
+				ERR_PRINTF4(_L("The file -created by RStsSession::CreateTemporaryL()- cannot be written into when the creation mode is set to  %S %S %S"), &fileModeStrings[mode], &KORSign, &fileSubModeStrings[submode]);
+				}
+			
+			//test RStsSession::OverwriteL()
+			fileNameFullPtr.Set(fileNameBasePtr);
+			fileNameFullPtr.Append(_L("_overwrite"));
+			fileNameFullPtr.AppendNum(counter);
+			fileNameFullPtr.Append(parse.Ext());
+			TRAP(err,
+					Server().OverwriteL(trSlot, fileNameFullPtr, newFile, fileMode);
+					WriteToFileL(newFile, *bufPtr3);
+					);
+			newFile.Close();
+			if(err!=KErrNone)
+				{
+				ERR_PRINTF4(_L("The file -created by RStsSession::OverwriteL()- cannot be written into when the creation mode is set to  %S %S %S"), &fileModeStrings[mode], &KORSign, &fileSubModeStrings[submode]);
+				}
+
+			CleanupStack::PopAndDestroy(); //newFile
+			}//inner for
+		}//outer for
+	CleanupStack::PopAndDestroy(4, bufPtr1); //bufPtr
+	}
+
+void CFileModeTestStep::TestCase2L()
+	{
+	INFO_PRINTF1(_L("CFileModeTestStep test case 2"));
+/*
+ According to the TFileMode documentation a file cannot be opened for writing if using a share mode flag of EFileShareReadersOnly
+ */
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+	
+	
+	TFileMode fileMode(static_cast<TFileMode>(EFileShareReadersOnly|EFileWrite));
+	RFile newFile;
+	TInt err;
+
+	TRAP(err, Server().CreateNewL(trSlot, filePathInIni, newFile, fileMode));
+	newFile.Close();
+	if(err!=KErrArgument )
+		{
+		ERR_PRINTF1(_L("RStsSession::CreateNewL() returned KErrNone when an error condition was set (ie: newFileMode = EFileShareReadersOnly|EFileWrite) and KErrArgument was expected"));
+		SetTestStepResult(EFail);
+		}
+	TRAP(err, Server().CreateTemporaryL(trSlot, filePathInIni, newFile, fileMode));
+	newFile.Close();
+	if(err!=KErrArgument )
+		{
+		ERR_PRINTF1(_L("RStsSession::CreateTemporaryL() returned KErrNone when an error condition was set (ie: newFileMode = EFileShareReadersOnly|EFileWrite) and KErrArgument was expected"));
+		SetTestStepResult(EFail);
+		}
+	TRAP(err, Server().OverwriteL(trSlot, filePathInIni, newFile, fileMode));
+	newFile.Close();
+	if(err!=KErrArgument )
+		{
+		ERR_PRINTF1(_L("RStsSession::OverwriteL() returned KErrNone when an error condition was set (ie: newFileMode = EFileShareReadersOnly|EFileWrite) and KErrArgument was expected"));
+		SetTestStepResult(EFail);
+		}
+	}
+
+void CFileModeTestStep::TestCase3L()
+	{
+	INFO_PRINTF1(_L("CFileModeTestStep test case 3"));
+	
+/*
+ This tescase tests that the file -that's created by the server and whose handle is returned to the client- is writable by others (obviously depending on the share mode) 
+ */	
+	TFileMode fileModes[] = {
+			EFileShareAny,
+			EFileShareReadersOrWriters,
+			EFileShareExclusive
+			};
+
+	const TDesC* fileModeStrings[] = {
+				&KEFileShareAny,
+				&KEFileShareReadersOrWriters,
+				&KEFileShareExclusive
+				};
+	
+	TFileMode fileSubModes[] = {
+			EFileStream,
+			EFileStreamText,
+			EFileWrite,
+			EFileWriteBuffered,
+			EFileWriteDirectIO,
+			};
+
+	const TDesC* fileSubModeStrings[] = {
+			&KEFileStream,
+			&KEFileStreamText,
+			&KEFileWrite,
+			&KEFileWriteBuffered,
+			&KEFileWriteDirectIO,
+			};
+
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+	TParsePtrC parse(filePathInIni);
+	
+	//register newly created file
+	HBufC *bufPtr1=CreateDataForNewFileCreatedByStsServerLC(KCreateNewFileStep, ENewPermanentFile);
+	HBufC *bufPtr2=CreateDataForNewFileCreatedByStsServerLC(KCreateTemporaryStep, ENewTemporaryFile);
+	HBufC *bufPtr3=CreateDataForNewFileCreatedByStsServerLC(KOverwriteStep, ENewPermanentFile);
+	
+	HBufC* targetFileName = HBufC::NewLC(KMaxFileName);
+	
+	RFs fs;
+	User::LeaveIfError(fs.Connect());
+	CleanupClosePushL(fs);
+	
+	TPtr fileNameBasePtr(targetFileName->Des());
+	fileNameBasePtr.Append(parse.DriveAndPath());
+	fileNameBasePtr.Append(parse.Name());
+	TPtr fileNameFullPtr(fileNameBasePtr);
+	
+	TInt counter(100);
+	for(TInt mode=0; mode<sizeof(fileModes)/sizeof(TFileMode); ++mode)
+		{
+		for(TInt submode=0; submode<sizeof(fileSubModes)/sizeof(TFileMode); ++submode, ++counter)
+			{
+			//the handle to the newly created file
+			RFile newFile;
+			CleanupClosePushL(newFile);
+			//handle repsresting some other process/application/etc.. who wants to have access to the file
+			RFile otherFileClient;
+			CleanupClosePushL(otherFileClient);
+
+			TFileMode fileMode(static_cast<TFileMode>(fileModes[mode]|fileSubModes[submode]));
+			TInt otherFileClientError=KErrNone;
+			
+			//create new file interface
+			fileNameFullPtr.Set(fileNameBasePtr);
+			fileNameFullPtr.Append(_L("_createnew"));
+			fileNameFullPtr.AppendNum(counter);
+			fileNameFullPtr.Append(parse.Ext());
+			Server().CreateNewL(trSlot, fileNameFullPtr, newFile, fileMode); //create new file
+			otherFileClientError=otherFileClient.Open(fs, fileNameFullPtr, EFileShareAny|EFileWrite); //test if others can have acces to the file
+			if(otherFileClientError==KErrNone)
+				TRAP(otherFileClientError, WriteToFileL(otherFileClient, *bufPtr1));
+			if(fileModes[mode]!=EFileShareExclusive && otherFileClientError!=KErrNone)
+				{
+				ERR_PRINTF3(_L("File %S created by RStsSession::CreateNewL() cannot be written by other clients using EFileShareAny|EFileWrite filemode. Error code: %d"), &fileNameFullPtr, otherFileClientError);
+				SetTestStepResult(EFail);//original share mode is other than EFileShareExclusive so there should be no error reported when writing to the file by others
+				}
+			else if(fileModes[mode]==EFileShareExclusive && otherFileClientError==KErrNone)
+				{
+				ERR_PRINTF2(_L("File %S -created by RStsSession::CreateNewL() using EFileShareExclusive share mode- can be written by other clients using EFileShareAny|EFileWrite filemode."), &fileNameFullPtr);
+				SetTestStepResult(EFail);//original share mode is EFileShareExclusive so others should not be allowed to have access to it
+				}
+			WriteToFileL(newFile, *bufPtr1);
+			newFile.Close();
+			otherFileClient.Close();
+			
+
+			//create new temp file interface
+			fileNameFullPtr.Set(fileNameBasePtr);
+			fileNameFullPtr.Append(_L("_createtemp"));
+			fileNameFullPtr.AppendNum(counter);
+			fileNameFullPtr.Append(parse.Ext());
+			Server().CreateTemporaryL(trSlot, fileNameFullPtr, newFile, fileMode);
+			otherFileClientError=otherFileClient.Open(fs, fileNameFullPtr, EFileShareAny|EFileWrite); //test if others can have acces to the file
+			if(otherFileClientError==KErrNone)
+				TRAP(otherFileClientError, WriteToFileL(otherFileClient, *bufPtr1));
+			if(fileModes[mode]!=EFileShareExclusive && otherFileClientError!=KErrNone)
+				{
+				ERR_PRINTF3(_L("File %S created by RStsSession::CreateTemporaryL() cannot be written by other clients using EFileShareAny|EFileWrite filemode. Error code: %d"), &fileNameFullPtr, otherFileClientError);
+				SetTestStepResult(EFail);//original share mode is other than EFileShareExclusive so there should be no error reported when writing to the file by others
+				}
+			else if(fileModes[mode]==EFileShareExclusive && otherFileClientError==KErrNone)
+				{
+				ERR_PRINTF2(_L("File %S -created by RStsSession::CreateTemporaryL() using EFileShareExclusive share mode- can be written by other clients using EFileShareAny|EFileWrite filemode."), &fileNameFullPtr);
+				SetTestStepResult(EFail);//original share mode is EFileShareExclusive so others should not be allowed to have access to it
+				}
+			WriteToFileL(newFile, *bufPtr2);
+			newFile.Close();
+			otherFileClient.Close();
+			
+			//overwrite file interface
+			fileNameFullPtr.Set(fileNameBasePtr);
+			fileNameFullPtr.Append(_L("_overwrite"));
+			fileNameFullPtr.AppendNum(counter);
+			fileNameFullPtr.Append(parse.Ext());
+			Server().OverwriteL(trSlot, fileNameFullPtr, newFile, fileMode);
+			otherFileClientError=otherFileClient.Open(fs, fileNameFullPtr, EFileShareAny|EFileWrite); //test if others can have acces to the file
+			if(otherFileClientError==KErrNone)
+				TRAP(otherFileClientError, WriteToFileL(otherFileClient, *bufPtr1));
+			if(fileModes[mode]!=EFileShareExclusive && otherFileClientError!=KErrNone)
+				{
+				ERR_PRINTF3(_L("File %S created by RStsSession::OverwriteL() cannot be written by other clients using EFileShareAny|EFileWrite filemode. Error code: %d"), &fileNameFullPtr, otherFileClientError);
+				SetTestStepResult(EFail);//original share mode is other than EFileShareExclusive so there should be no error reported when writing to the file by others
+				}
+			else if(fileModes[mode]==EFileShareExclusive && otherFileClientError==KErrNone)
+				{
+				ERR_PRINTF2(_L("File %S -created by RStsSession::OverwriteL() using EFileShareExclusive share mode- can be written by other clients using EFileShareAny|EFileWrite filemode."), &fileNameFullPtr);
+				SetTestStepResult(EFail);//original share mode is EFileShareExclusive so others should not be allowed to have access to it
+				}
+			WriteToFileL(newFile, *bufPtr3);
+			newFile.Close();
+			otherFileClient.Close();
+
+			CleanupStack::PopAndDestroy(2, &newFile); //newFile, otherFileClient
+			}//inner for
+		}//outer for
+	CleanupStack::PopAndDestroy(5, bufPtr1); //bufPtr1, bufPtr2, bufPtr3, targetFileName, fs
+	}
+
+void CFileModeTestStep::ImplTestStepPostambleL()
+	{
+	INFO_PRINTF1(_L("CFileModeTestStep Postamble"));
+	
+	}
+//----------------------------------------
+
+//----------------------------------------
+
+CCreateLongFileNameTestStep::CCreateLongFileNameTestStep(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KCreateLongFileNameTestStep);
+	}
+
+void CCreateLongFileNameTestStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateLongFileNameTestStep Preamble"));
+	SetTestStepResult(EPass);
+	}
+
+void CCreateLongFileNameTestStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateLongFileNameTestStep in test step"));
+
+	//get transaction slot from ini
+	TInt trSlot = GetTransactionSlotFromConfigL();
+	
+	//get the target file path from ini
+	TPtrC filePathInIni = GetTargetFilePathFromConfigL();
+	
+	TFileMode fileMode(static_cast<TFileMode>(EFileShareExclusive|EFileWrite));
+	
+	//the handle to the newly created file
+	// The file handle doesn't get actually created as it is too long. Hence
+	// pushing onto the closecleanup stack is not necessary.
+	RFile newFile;
+
+	//register newly created file
+	TRAP_IGNORE(Server().CreateNewL(trSlot, filePathInIni, newFile, fileMode));
+
+	//roolback transaction
+	Server().RollBackL(trSlot);
+	
+	TBuf<KBufSize> opBuf(GetStringFromConfigL(KBaseDir));
+	// checking for the existence of the base directory. If the base directory
+	// is existing then it implies that rollback was not successful. Hence return
+	// failure. Otherwise return success.
+	if (FileExistsL(opBuf))
+		{
+		SetTestStepResult(EFail);
+		}
+	else
+		{
+		SetTestStepResult(EPass);
+		}
+	}
+
+void CCreateLongFileNameTestStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CCreateLongFileNameTestStep Postamble"));
+	}
+
+//----------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/source/tststestsuitesteprollbackall.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,71 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file
+ @test
+ @internalComponent
+*/
+#include "tststestsuitesteprollbackall.h"
+#include <usif/sts/sts.h>
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "stsrecovery.h"
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+
+CRollbackAllPendingStep::CRollbackAllPendingStep()
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KRollbackAllPendingStep);
+	}
+
+void CRollbackAllPendingStep::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRollbackAllPendingStep Preamble"));
+	SetTestStepResult(EPass);
+
+	}
+
+void CRollbackAllPendingStep::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRollbackAllPendingStep in test step"));
+
+	Usif::RStsRecoverySession session;
+	CleanupClosePushL(session);
+	session.RollbackAllPendingL();
+	CleanupStack::PopAndDestroy(&session);
+	SetTestStepResult(EPass);
+
+	}
+
+void CRollbackAllPendingStep::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("CRollbackAllPendingStep Postamble"));
+
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/bwins/tstsintegrityservicesclientu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+EXPORTS
+	?AddL@RIntegrityServicesServerSession@@QAEXABVTDesC16@@@Z @ 1 NONAME ; void RIntegrityServicesServerSession::AddL(class TDesC16 const &)
+	?CommitL@RIntegrityServicesServerSession@@QAEXXZ @ 2 NONAME ; void RIntegrityServicesServerSession::CommitL(void)
+	?Connect@RIntegrityServicesServerSession@@QAEHXZ @ 3 NONAME ; int RIntegrityServicesServerSession::Connect(void)
+	?CreateNewTestFileL@RIntegrityServicesServerSession@@QAEXABVTDesC16@@@Z @ 4 NONAME ; void RIntegrityServicesServerSession::CreateNewTestFileL(class TDesC16 const &)
+	?CreateTempTestFileL@RIntegrityServicesServerSession@@QAEXABVTDesC16@@@Z @ 5 NONAME ; void RIntegrityServicesServerSession::CreateTempTestFileL(class TDesC16 const &)
+	?RemoveL@RIntegrityServicesServerSession@@QAEXABVTDesC16@@@Z @ 6 NONAME ; void RIntegrityServicesServerSession::RemoveL(class TDesC16 const &)
+	?RollBackL@RIntegrityServicesServerSession@@QAEXH@Z @ 7 NONAME ; void RIntegrityServicesServerSession::RollBackL(int)
+	?SetSimulatedFailureL@RIntegrityServicesServerSession@@QAEXVTPtrC16@@00@Z @ 8 NONAME ; void RIntegrityServicesServerSession::SetSimulatedFailure(class TPtrC16, class TPtrC16, class TPtrC16)
+	?TemporaryL@RIntegrityServicesServerSession@@QAEXABVTDesC16@@@Z @ 9 NONAME ; void RIntegrityServicesServerSession::TemporaryL(class TDesC16 const &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/eabi/tstsintegrityservicesclientu.def	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+EXPORTS
+	_ZN31RIntegrityServicesServerSession10TemporaryLERK7TDesC16 @ 1 NONAME
+	_ZN31RIntegrityServicesServerSession18CreateNewTestFileLERK7TDesC16 @ 2 NONAME
+	_ZN31RIntegrityServicesServerSession19CreateTempTestFileLERK7TDesC16 @ 3 NONAME
+	_ZN31RIntegrityServicesServerSession20SetSimulatedFailureLE7TPtrC16S0_S0_ @ 4 NONAME
+	_ZN31RIntegrityServicesServerSession4AddLERK7TDesC16 @ 5 NONAME
+	_ZN31RIntegrityServicesServerSession7CommitLEv @ 6 NONAME
+	_ZN31RIntegrityServicesServerSession7ConnectEv @ 7 NONAME
+	_ZN31RIntegrityServicesServerSession7RemoveLERK7TDesC16 @ 8 NONAME
+	_ZN31RIntegrityServicesServerSession9RollBackLEi @ 9 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/group/tstsintegrityservicesclient.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,52 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Tests  client connection to tintegrityservicesserver
+*
+*/
+
+
+/**
+ @file
+*/
+
+CAPABILITY All
+
+target		tstsintegrityservicesclient.dll
+targettype	dll
+
+UID             0x10285DE6
+VENDORID	0x70000001
+
+//USERINCLUDE .\
+//USERINCLUDE ../../inc
+//USERINCLUDE ../../inc/swi
+//MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+//SOURCEPATH	.\
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+USERINCLUDE ../inc
+
+SOURCEPATH	../source
+
+SOURCE 		tintegrityservicesclientserver.cpp
+
+LIBRARY 	euser.lib 
+LIBRARY 	estor.lib
+LIBRARY 	efsrv.lib 
+LIBRARY		testexecuteutils.lib
+LIBRARY		testexecutelogclient.lib
+//LIBRARY 	stsclient.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/group/tstsintegrityservicesserver.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Act as a proxy to the integrityservices.dll
+*
+*/
+
+
+/**
+ @file
+*/
+
+CAPABILITY All
+
+target		tstsintegrityservicesserver.exe
+targettype	exe
+
+UID			0x10285DE7
+VENDORID	0x70000001
+
+USERINCLUDE ../inc
+USERINCLUDE ../../../inc_private
+USERINCLUDE ../../../../swinstallationfw/common/inc
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH	../source
+SOURCE 		e32main.cpp
+SOURCE 		tintegrityservicesserver.cpp
+
+//we need to build integrityservices code into this server code as integrityservices.dll is not built separately any more
+//so we can't link against integrityservices.lib It's part of STS server
+SOURCEPATH	../../../source/server
+SOURCE 		integrityservices.cpp
+SOURCE 		integritytree.cpp
+SOURCE 		journal.cpp
+SOURCE 		journalfile.cpp
+SOURCE 		operationfunctions.cpp
+
+LIBRARY 	euser.lib 
+LIBRARY 	estor.lib
+LIBRARY 	efsrv.lib
+LIBRARY		sectcbutil.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/inc/tintegrityservicesclientserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Common header for the server and the client.
+*
+*/
+
+
+#ifndef __INTEGRITYSERVICESCLIENTSERVER_H__
+#define __INTEGRITYSERVICESCLIENTSERVER_H__
+
+#include <e32std.h>
+#include "tintegrityservicescommon.h"
+
+/**
+ * @test
+ * @internalTechnology
+ */
+class RIntegrityServicesServerSession : public RSessionBase
+	{
+public:
+	/**
+	 * Connect to the server, attempt to start it if it is not yet running
+	 * @return KErrNone if successful, or an error code
+	 */
+	IMPORT_C TInt Connect();
+	IMPORT_C void AddL(const TDesC& aFileName);
+	IMPORT_C void RemoveL(const TDesC& aFileName);
+	IMPORT_C void TemporaryL(const TDesC& aFileName);
+	IMPORT_C void CommitL();
+	IMPORT_C void RollBackL(TBool aAllTransactions);
+	IMPORT_C void SetSimulatedFailureL(TPtrC aFailType, TPtrC aFailPosition, TPtrC aFileName);
+	IMPORT_C void CreateNewTestFileL(const TDesC& aFileName);
+	IMPORT_C void CreateTempTestFileL(const TDesC& aFileName);
+	};
+#endif // #ifndef __INTEGRITYSERVICESCLIENTSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/inc/tintegrityservicescommon.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* tintegrityservicesserver.h
+*
+*/
+
+
+#ifndef __TINTEGRITYSERVICESCOMMON_H__
+#define __TINTEGRITYSERVICESCOMMON_H__
+
+#include <e32def.h>
+#include <e32cmn.h>
+
+const TInt KIntegrityServicesSimulatedBatteryFailure=-10205;	
+
+
+_LIT(KIntegrityServicesServerName, "!tstsintegrityservicesserver");
+_LIT(KIntegrityServicesServerImage, "tstsintegrityservicesserver");
+_LIT(KIntegrityServicesServer, "Test Integrity Server");
+
+const TUid KIntegrityServicesServerUid3 = { 0x10285DE7 };
+
+/**
+ * @test
+ * @internalTechnology
+ */
+enum TIntegrityServicesServerMessage
+	{ 
+	EAdd,
+	ERemove,
+	ETemporary,
+	ECommit,
+	ERollBack,
+	ESetSimulatedFailure,
+	ECreateNewTestFile,
+	ECreateTempTestFile
+	};
+
+#endif // #ifndef __TINTEGRITYSERVICESSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/inc/tintegrityservicesserver.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Common header for the server and the client.
+*
+*/
+
+
+#ifndef __TINTEGRITYSERVICESSERVER_H__
+#define __TINTEGRITYSERVICESSERVER_H__
+
+#include <e32base.h>
+#include "integrityservices.h"
+#include "tintegrityservicescommon.h"
+
+namespace Usif
+{
+
+enum TIntegrityServicesServerPanic
+	{
+	EPanicIntegrityServicesServerIllegalFunction = 10,
+	};
+
+
+/**
+ * @test
+ * @internalTechnology
+ */
+class CShutdownTimer : public CTimer
+	{
+private:
+	/** Server timeout shutdown delay (approximately 2 seconds) */
+	enum {KShutdownDelay=0x200000};
+public:
+	static CShutdownTimer* NewL();
+	/** Constructs shutdown timer */
+	inline CShutdownTimer();
+	/** Second-phase construction */
+	inline void ConstructL();
+	/** Starts server shutdown when the timer goes off */
+	inline void Start();
+private:
+	void RunL();
+	};
+
+/**
+ * @test
+ * @internalTechnology
+ */
+class CIntegrityServicesServer : public CServer2
+	{
+public:
+	/**
+	 * This function creates a new CServer2 object and leaves it on 
+	 * the cleanup stack.
+	 */
+        static CIntegrityServicesServer* NewLC();
+	
+	/** Increments session count */
+	void AddSession();
+	
+	/** 
+	 * Decrements session count and starts shutdown timer if session count is 0
+	 */
+	void DropSession();
+
+	virtual ~CIntegrityServicesServer();
+
+private:
+	CIntegrityServicesServer();
+
+	/**
+	 * The second-phase constructor.
+	 */
+	void ConstructL();
+
+private:
+	/**
+	 * This function creates a new session object.
+	 */
+	virtual CSession2* NewSessionL(const TVersion& aVersion, 
+				       const RMessage2& aMessage) const;
+
+private:
+	// The number of sessions that are connected to the server. When this 
+	// number reaches 0, the server will initialize its shutdown.
+	TInt iSessionCount;
+	CShutdownTimer* iShutdown;
+	};
+
+
+
+/**
+ * @test
+ * @internalTechnology
+ */
+class CIntegrityServicesSession : public CSession2
+	{
+public:
+ 	static CIntegrityServicesSession* NewL();
+	static CIntegrityServicesSession* NewLC();
+	void CreateL();
+
+private:
+	CIntegrityServicesSession();
+
+	virtual ~CIntegrityServicesSession();
+
+	/**
+	 * The second-phase constructor.
+	 */
+	void ConstructL();
+	
+	/** Returns server reference */
+	CIntegrityServicesServer& Server();
+	
+	virtual void ServiceL(const RMessage2& aMessage);
+
+	virtual void ServiceError(const RMessage2& aMessage, TInt aError);
+
+	CIntegrityServices* iIntegrityServices;
+	};
+
+} // end namespace Usif
+#endif // #ifndef __TINTEGRITYSERVICESSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/inc/tintegrityservicesstep.h	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,318 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+/**
+ @file
+*/
+#ifndef __TINTEGRITYSERVICESSTEP_H__
+#define __TINTEGRITYSERVICESSTEP_H__
+
+#include "tintegrityservicescommon.h"
+#include "tststestsuitestep.h"
+#include "tintegrityservicesclientserver.h"
+#include "journal.h"
+#include "integrityservices.h"
+
+
+// Base class for all steps
+class CIntegrityServicesStepBase : public CStsBaseTestStep
+	{
+public:
+	CIntegrityServicesStepBase(CStsTestServer &aStsTestServer);
+	virtual void ImplTestStepPreambleL();
+	virtual void ImplTestStepPostambleL();
+
+private:
+	void ReadFailureSettingsL();
+
+protected:
+	// Extension of config parser to allow you to get array of descriptors
+	void GetStringArrayFromConfigL(const TDesC& aSectName, const TDesC& aKeyName, RArray<TPtrC>& aArray);
+
+	TBool CheckFilesL();
+	void doInstallL();
+	void doRecoverL();
+	void doCleanupL();
+
+protected:
+	RIntegrityServicesServerSession iIntegritySession;
+	};
+
+// Step which starts installation
+class CInstallStep : public CIntegrityServicesStepBase
+	{
+public:
+	CInstallStep(CStsTestServer &aStsTestServer);
+	virtual void ImplTestStepL();
+	};
+
+// Step which recovers a previous failed installation
+class CRecoverStep : public CIntegrityServicesStepBase
+	{
+public:
+	CRecoverStep(CStsTestServer &aStsTestServer);
+	virtual void ImplTestStepL();
+	};
+
+// Step which cleans up files between test cases
+class CCleanupStep : public CIntegrityServicesStepBase
+	{
+public:
+	CCleanupStep(CStsTestServer &aStsTestServer);
+	virtual void ImplTestStepL();
+	};
+	
+// Step which checks for files
+class CCheckStep : public CIntegrityServicesStepBase
+	{
+public:
+	CCheckStep(CStsTestServer &aStsTestServer);
+	virtual void ImplTestStepL();
+	};
+
+//---------- new unit tests developed as part of the STS framework ----------
+union TIntValue
+	{
+	TInt8  int8;
+	TInt16 int16;
+	TInt32 int32;
+	};
+
+enum TIntMode
+	{
+	Mode8Bit  =1,
+	Mode16Bit =2,
+	Mode32Bit =4
+	};
+
+_LIT(KEmptyString, "");
+_LIT(KDriveLetterC, "c");
+_LIT(KDriveLetterE, "e");
+_LIT(KKournalFileExt, ".log");
+
+class CTestFile : public CBase
+	{
+	public:
+		CTestFile(RFs& aFs);
+		~CTestFile();
+		static CTestFile* NewL(RFs& aFs);
+		void OpenJournalFileL(const TDesC& aFileName, TFileMode aMode);
+		void CloseJournalFile();
+		void CreateJournalFileL(const TDesC& aFileName, TFileMode aMode);
+		void WriteIntToJournalFileL(TIntValue value, TIntMode mode);
+		TIntValue ReadIntFromJournalFileL(TIntMode mode);
+		void SeekInJournalFileL(TSeek aSeekMode, TInt &aPos);
+
+	protected:
+		RFs&          iFs;
+		RFile         journalFile;
+	};
+
+class CJournalFileUnitTest : public CStsBaseTestStep
+	{
+public:
+	CJournalFileUnitTest(CStsTestServer &aStsTestServer);
+	~CJournalFileUnitTest();
+	virtual void ImplTestStepPreambleL();
+	virtual void ImplTestStepPostambleL();
+	virtual void ImplTestStepL();
+	
+protected:
+	void OpenJournalFileL(const TDesC& aFileName, TFileMode aMode);
+	void CloseJournalFile();
+	void CreateJournalFileL(const TDesC& aFileName, TFileMode aMode);
+	void WriteIntToJournalFileL(TIntValue value, TIntMode mode);
+	TIntValue ReadIntFromJournalFileL(TIntMode mode);
+	void SeekInJournalFileL(TSeek aSeekMode, TInt &aPos);
+	
+protected:
+	RFs          		iFs;
+	RLoader      		iLoader;
+	CTestFile*  	testJournalFile;
+	};
+
+class CJournalFileUnitTestScenarioBase : public CStsBaseTestStep
+	{
+public:
+	CJournalFileUnitTestScenarioBase(CStsTestServer &aStsTestServer);
+	~CJournalFileUnitTestScenarioBase();
+	virtual void ImplTestStepPreambleL();
+	virtual void ImplTestStepPostambleL();
+	virtual void ImplTestStepL();
+
+private:
+	static void InTestCleanup(TAny* aObject);
+	virtual void ImplTestCaseScenarioL()=0; //implements the real test scenario executed in OOM test
+
+protected:
+	RFs          		iFs;
+	RLoader      		iLoader;
+	TPtrC               iJournalFileName;
+	HBufC* 				iTargetFileName;
+	HBufC*				iBackupFileName;
+	TDriveUnit          iJournaldrive;
+	TBool				iCleanupNeeded;
+	};
+
+class CJournalFileUnitTestAdd : public CJournalFileUnitTestScenarioBase
+	{
+public:
+	CJournalFileUnitTestAdd(CStsTestServer &aStsTestServer);
+	virtual void ImplTestCaseScenarioL();
+	};
+
+class CJournalFileUnitTestTemp : public CJournalFileUnitTestScenarioBase
+	{
+public:
+	CJournalFileUnitTestTemp(CStsTestServer &aStsTestServer);
+	virtual void ImplTestCaseScenarioL();
+	};
+
+class CJournalFileUnitTestRemove : public CJournalFileUnitTestScenarioBase
+	{
+public:
+	CJournalFileUnitTestRemove(CStsTestServer &aStsTestServer);
+	virtual void ImplTestCaseScenarioL();
+	};
+
+class CJournalFileUnitTestRead : public CJournalFileUnitTestScenarioBase
+	{
+public:
+	CJournalFileUnitTestRead(CStsTestServer &aStsTestServer);
+	virtual void ImplTestCaseScenarioL();
+	};
+
+class CJournalFileUnitTestEvent : public CJournalFileUnitTestScenarioBase
+	{
+public:
+	CJournalFileUnitTestEvent(CStsTestServer &aStsTestServer);
+	virtual void ImplTestCaseScenarioL();
+	};
+
+class CJournalUnitTest : public CStsBaseTestStep
+	{
+public:
+	CJournalUnitTest(CStsTestServer &aStsTestServer);
+	~CJournalUnitTest();
+	virtual void ImplTestStepPreambleL();
+	virtual void ImplTestStepPostambleL();
+	virtual void ImplTestStepL();
+
+private:
+	void TestCase1L();
+	
+protected:
+	RFs          		iFs;
+	RLoader      		iLoader;
+	CTestFile*  	    iTestFileInterface;
+	TInt 				iTrID;
+	TPtrC				iJournalPathInIni;
+	};
+
+
+class CJournalUnitTestScenarioBase : public CStsBaseTestStep
+	{
+public:
+	CJournalUnitTestScenarioBase(CStsTestServer &aStsTestServer);
+	~CJournalUnitTestScenarioBase();
+	virtual void ImplTestStepPreambleL();
+	virtual void ImplTestStepPostambleL();
+	virtual void ImplTestStepL();
+
+protected:
+	virtual void ScenarioEndL(Usif::CJournal* aJournal)=0;
+	static void InTestCleanUp(TAny* aObject);
+	
+protected:
+	RFs          		iFs;
+	RLoader      		iLoader;
+	TInt 				iTrID;
+	TPtrC				iJournalPathInIni;
+	HBufC* 				iTargetFileName;
+	TDriveUnit          iDriveUnitC;	
+	TDriveUnit          iDriveUnitE;
+	HBufC* 				iJournalFileName;
+	HBufC* 				iDrvFileName;
+	HBufC* 				iBackupFileName;
+	};
+
+class CJournalUnitTestInstall : public CJournalUnitTestScenarioBase
+	{
+public:
+	CJournalUnitTestInstall(CStsTestServer &aStsTestServer);
+protected:	
+	virtual void ScenarioEndL(Usif::CJournal* aJournal);
+	};
+
+class CJournalUnitTestRollback : public CJournalUnitTestScenarioBase
+	{
+public:
+	CJournalUnitTestRollback(CStsTestServer &aStsTestServer);
+protected:	
+	virtual void ScenarioEndL(Usif::CJournal* aJournal);
+	};
+
+_LIT(KTransactionPath, "\\sys\\install\\integrityservices\\");
+
+class CIntegrityServicesTestScenarioBase : public CStsBaseTestStep
+	{
+public:
+	CIntegrityServicesTestScenarioBase(CStsTestServer &aStsTestServer);
+	~CIntegrityServicesTestScenarioBase();
+	virtual void ImplTestStepPreambleL();
+	virtual void ImplTestStepPostambleL();
+	virtual void ImplTestStepL();
+
+protected:
+	virtual void ScenarioEndL(Usif::CIntegrityServices* aIntegrServ)=0;
+	static void InTestCleanUp(TAny* aObject);
+	void NormalizeDirectoryName(TDes& aFileName);
+	
+protected:
+	RFs          		iFs;
+	RLoader      		iLoader;
+	TInt 				iTrID;
+	TPtrC				iTargetPathInIni;
+	HBufC* 				iTargetFileName;
+	TDriveUnit          iDriveUnitC;	
+	TDriveUnit          iDriveUnitE;
+	HBufC* 				iBackupFileName;
+	HBufC* 				iTransactionBackupDirectoryPath;
+	HBufC* 				iJournalFileName;
+	HBufC* 				iDrvFileName;
+	};
+
+class CIntegrityServicesTestInstall : public CIntegrityServicesTestScenarioBase
+	{
+public:
+	CIntegrityServicesTestInstall(CStsTestServer &aStsTestServer);
+protected:	
+	virtual void ScenarioEndL(Usif::CIntegrityServices* aIntegrServ);
+	};
+
+class CIntegrityServicesTestRollback : public CIntegrityServicesTestScenarioBase
+	{
+public:
+	CIntegrityServicesTestRollback(CStsTestServer &aStsTestServer);
+protected:	
+	virtual void ScenarioEndL(Usif::CIntegrityServices* aIntegrServ);
+	};
+
+#endif
Binary file installationservices/swtransactionservices/test/tintegrityservices/scripts/data/unittests/testjournal.log has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailAddingNewFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,215 @@
+; these test failure before adding a particular new file during the installation of app version 1 files
+
+[EBeforeAction_c:\DataFileA.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EBeforeAction_e:\DataFileB.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeAction
+failfilename=e:\DataFileB.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EBeforeAction_c:\InstallApp.exe]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EBeforeAction_c:\Shared.dll]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeAction
+failfilename=c:\Shared.dll
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+; these test failure after adding a particular new file during the installation of app version 1 files
+
+[EAfterAction_c:\DataFileA.dat]
+
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=c:\DataFileA.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EAfterAction_e:\DataFileB.dat]
+
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=e:\DataFileB.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EAfterAction_c:\InstallApp.exe]
+
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=c:\DataFileA.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EAfterAction_c:\Shared.dll]
+
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=c:\Shared.dll
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+; these test failure before writing the journal entry for a particular new file during the installation of app version 1 files
+
+[EBeforeJournal_c:\DataFileA.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=c:\DataFileA.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EBeforeJournal_e:\DataFileB.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=e:\DataFileB.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EBeforeJournal_c:\InstallApp.exe]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=c:\DataFileA.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EBeforeJournal_c:\Shared.dll]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=c:\Shared.dll
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+; these test failure after writing the journal entry for a particular new file during the installation of app version 1 files
+
+[EAfterJournal_c:\DataFileA.dat]
+
+failtype=EFailAddingNewFile
+failposition=EAfterJournal
+failfilename=c:\DataFileA.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EAfterJournal_e:\DataFileB.dat]
+
+failtype=EFailAddingNewFile
+failposition=EAfterJournal
+failfilename=e:\DataFileB.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EAfterJournal_c:\InstallApp.exe]
+
+failtype=EFailAddingNewFile
+failposition=EAfterJournal
+failfilename=c:\DataFileA.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EAfterJournal_c:\Shared.dll]
+
+failtype=EFailAddingNewFile
+failposition=EAfterJournal
+failfilename=c:\Shared.dll
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailAddingTempFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,59 @@
+; these test failure before adding a particular temp file during the installation of app version 1 files
+
+[EBeforeAction_c:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EBeforeAction
+failfilename=c:\temp.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+; these test failure after adding a particular temp file during the installation of app version 1 files
+
+[EAfterAction_c:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EAfterAction
+failfilename=c:\temp.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+; these test failure before writing the journal entry for a particular temp file during the installation of app version 1 files
+
+[EBeforeJournal_c:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EBeforeJournal
+failfilename=c:\temp.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+; these test failure after writing the journal entry for a particular temp file during the installation of app version 1 files
+
+[EAfterJournal_c:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EAfterJournal
+failfilename=c:\temp.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailBackupFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,27 @@
+; this tests failure before writing journal entry during installation of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EFailBackupFilesRemoved
+failposition=EBeforeJournal
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+; this tests failure after removing writing journal entry during installation of app version 1 files
+
+[EAfterJournal]
+
+failtype=EFailBackupFilesRemoved
+failposition=EAfterJournal
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailDeletingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+; these test failure before deleting a particular file during the installation of app version 1 files
+
+[EBeforeAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=c:\temp.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+; these test failure before deleting a particular file during the installation of app version 1 files
+
+[EAfterAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EAfterAction
+failfilename=c:\temp.dat
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailInstallComplete.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,25 @@
+; these test failure during the installation of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EFailInstallComplete
+failposition=EBeforeJournal
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+[EAfterJournal]
+
+failtype=EFailInstallComplete
+failposition=EAfterJournal
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailNone.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,22 @@
+; successful installation of app version 1 files
+
+[EFailNone]
+
+failtype=EFailNone
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+present-01=c:\DataFileA.dat
+present-02=e:\DataFileB.dat
+present-03=c:\InstallApp.exe
+present-04=c:\Shared.dll
+
+absent-01=c:\temp.dat
+absent-02=c:\IntegrityServices\0.drv
+absent-03=c:\IntegrityServices\0.log
+absent-04=e:\IntegrityServices\0.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v1/EFailTempFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,27 @@
+; these test failure before writing the commit during the installation of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+; these test failure after writing the commit during the installation of app version 1 files
+
+[EAfterJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailAddingNewFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,215 @@
+; these test failure before adding a particular new file during the installation of app version 2 files
+
+[EBeforeAction_e:\DataFileB.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EBeforeAction_e:\DataFileC.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeAction
+failfilename=e:\DataFileB.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EBeforeAction_c:\InstallApp.exe]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EBeforeAction_c:\Shared.dll]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeAction
+failfilename=c:\Shared.dll
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+; these test failure after adding a particular new file during the installation of app version 2 files
+
+[EAfterAction_e:\DataFileB.dat]
+
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=c:\DataFileA.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterAction_e:\DataFileC.dat]
+
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=e:\DataFileB.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterAction_c:\InstallApp.exe]
+
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=c:\DataFileA.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterAction_c:\Shared.dll]
+
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=c:\Shared.dll
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+; these test failure before writing the journal entry for a particular new file during the installation of app version 2 files
+
+[EBeforeJournal_e:\DataFileB.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=c:\DataFileA.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EBeforeJournal_e:\DataFileC.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=e:\DataFileB.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EBeforeJournal_c:\InstallApp.exe]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=c:\DataFileA.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EBeforeJournal_c:\Shared.dll]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=c:\Shared.dll
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+; these test failure after writing the journal entry for a particular new file during the installation of app version 2 files
+
+[EAfterJournal_e:\DataFileB.dat]
+
+failtype=EFailAddingNewFile
+failposition=EAfterJournal
+failfilename=c:\DataFileA.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterJournal_e:\DataFileC.dat]
+
+failtype=EFailAddingNewFile
+failposition=EAfterJournal
+failfilename=e:\DataFileB.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterJournal_c:\InstallApp.exe]
+
+failtype=EFailAddingNewFile
+failposition=EAfterJournal
+failfilename=c:\DataFileA.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterJournal_c:\Shared.dll]
+
+failtype=EFailAddingNewFile
+failposition=EAfterJournal
+failfilename=c:\Shared.dll
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailAddingTempFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,59 @@
+; these test failure before adding a particular temp file during the installation of app version 2 files
+
+[EBeforeAction_e:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EBeforeAction
+failfilename=e:\temp.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+; these test failure after adding a particular temp file during the installation of app version 2 files
+
+[EAfterAction_e:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EAfterAction
+failfilename=e:\temp.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+; these test failure before writing the journal entry for a particular temp file during the installation of app version 2 files
+
+[EBeforeJournal_e:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EBeforeJournal
+failfilename=e:\temp.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+; these test failure after writing the journal entry for a particular temp file during the installation of app version 2 files
+
+[EAfterJournal_e:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EAfterJournal
+failfilename=e:\temp.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailBackupFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,27 @@
+; this tests failure before writing journal entry during installation of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EFailBackupFilesRemoved
+failposition=EBeforeJournal
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+; this tests failure after removing writing journal entry during installation of app version 2 files
+
+[EAfterJournal]
+
+failtype=EFailBackupFilesRemoved
+failposition=EAfterJournal
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailDeletingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,29 @@
+; these test failure before deleting a particular file during the installation of app version 2 files
+
+[EBeforeAction_e:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=e:\temp.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+; these test failure before deleting a particular file during the installation of app version 2 files
+
+[EAfterAction_e:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EAfterAction
+failfilename=e:\temp.dat
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailInstallComplete.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,25 @@
+; these test failure during the installation of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EFailInstallComplete
+failposition=EBeforeJournal
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterJournal]
+
+failtype=EFailInstallComplete
+failposition=EAfterJournal
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailNone.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,22 @@
+; successful installation of app version 2 files
+
+[EFailNone]
+
+failtype=EFailNone
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+present-01=e:\DataFileB.dat
+present-02=e:\DataFileC.dat
+present-03=c:\InstallApp.exe
+present-04=c:\Shared.dll
+
+absent-01=e:\temp.dat
+absent-02=c:\IntegrityServices\0.drv
+absent-03=c:\IntegrityServices\0.log
+absent-04=e:\IntegrityServices\0.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/install_v2/EFailTempFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,27 @@
+; these test failure before writing the commit during the installation of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
+
+; these test failure after writing the commit during the installation of app version 2 files
+
+[EAfterJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+addfile-01=e:\DataFileB.dat
+addfile-02=e:\DataFileC.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/oom.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,37 @@
+; tests oom conditions during installation of app version 1 files
+
+[Install_V1]
+
+failtype=EFailNone
+
+addfile-01=c:\DataFileA.dat
+addfile-02=e:\DataFileB.dat
+addfile-03=c:\InstallApp.exe
+addfile-04=c:\Shared.dll
+
+temporaryfile-01=c:\temp.dat
+
+present-01=c:\DataFileA.dat
+present-02=e:\DataFileB.dat
+present-03=c:\InstallApp.exe
+present-04=c:\Shared.dll
+
+absent-01=c:\temp.dat
+absent-02=c:\IntegrityServices\0.drv
+absent-03=c:\IntegrityServices\0.log
+absent-04=e:\IntegrityServices\0.log
+
+; cleans up files between test cases
+
+cleanupfile-01=c:\DataFileA.dat
+cleanupfile-02=e:\DataFileB.dat
+cleanupfile-03=e:\DataFileC.dat
+cleanupfile-04=c:\InstallApp.exe
+cleanupfile-05=c:\shared.dll
+cleanupfile-06=c:\temp.dat
+cleanupfile-07=e:\temp.dat
+
+; cleans up directories (recursively deleting files and directories) between test cases
+
+cleanupdirectory-01=c:\IntegrityServices\
+cleanupdirectory-02=e:\IntegrityServices\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v1/EFailDeletingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,13 @@
+; these test failure during rollback of failed installation of app version 1 files
+
+[EBeforeAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=c:\temp.dat
+
+[EAfterAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EAfterAction
+failfilename=c:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v1/EFailNewFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed installation of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EFailNewFilesRemoved
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EFailNewFilesRemoved
+failposition=EAfterJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v1/EFailNone.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,12 @@
+; these test successful rollback of failed installation of app version 1 files
+
+[EFailNone]
+
+absent-01=c:\DataFileA.dat
+absent-02=e:\DataFileB.dat
+absent-03=c:\InstallApp.exe
+absent-04=c:\Shared.dll
+absent-05=c:\temp.dat
+absent-06=c:\IntegrityServices\0.drv
+absent-07=c:\IntegrityServices\0.log
+absent-08=e:\IntegrityServices\0.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v1/EFailOldFilesRestored.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed installation of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EOldFilesRestored
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EOldFilesRestored
+failposition=EAfterJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v1/EFailTempFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed installation of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v2/EFailDeletingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,13 @@
+; these test failure during rollback of failed installation of app version 2 files
+
+[EBeforeAction_e:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=e:\temp.dat
+
+[EAfterAction_e:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EAfterAction
+failfilename=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v2/EFailNewFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed installation of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EFailNewFilesRemoved
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EFailNewFilesRemoved
+failposition=EAfterJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v2/EFailNone.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,12 @@
+; these test successful rollback of failed installation of app version 2 files
+
+[EFailNone]
+
+absent-01=e:\DataFileB.dat
+absent-02=e:\DataFileC.dat
+absent-03=c:\InstallApp.exe
+absent-04=c:\Shared.dll
+absent-05=e:\temp.dat
+absent-06=c:\IntegrityServices\0.drv
+absent-07=c:\IntegrityServices\0.log
+absent-08=e:\IntegrityServices\0.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v2/EFailOldFilesRestored.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed installation of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EOldFilesRestored
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EOldFilesRestored
+failposition=EAfterJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_install_v2/EFailTempFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed installation of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailDeletingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,13 @@
+; these test failure during rollback of failed uninstallation of app version 1 files
+
+[EBeforeAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=c:\temp.dat
+
+[EAfterAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EAfterAction
+failfilename=c:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailNewFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed uninstallation of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EFailNewFilesRemoved
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EFailNewFilesRemoved
+failposition=EAfterJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailNone.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,12 @@
+; these test successful rollback of failed uninstallation of app version 1 files
+
+[EFailNone]
+
+present-01=c:\DataFileA.dat
+present-02=e:\DataFileB.dat
+present-03=c:\InstallApp.exe
+present-04=c:\Shared.dll
+
+absent-01=c:\IntegrityServices\0.drv
+absent-02=c:\IntegrityServices\0.log
+absent-03=e:\IntegrityServices\0.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailOldFilesRestored.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed uninstallation of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EOldFilesRestored
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EOldFilesRestored
+failposition=EAfterJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailRestoringFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+; these test failure during rollback of failed uninstallation of app version 1 files
+
+[EBeforeAction_c:\DataFileA.dat]
+
+failtype=EFailRestoringFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+[EBeforeAction_e:\DataFileB.dat]
+
+failtype=EFailRestoringFile
+failposition=EBeforeAction
+failfilename=e:\DataFileB.dat
+
+[EBeforeAction_c:\InstallApp.exe]
+
+failtype=EFailRestoringFile
+failposition=EBeforeAction
+failfilename=c:\InstallApp.exe
+
+[EBeforeAction_c:\Shared.dll]
+
+failtype=EFailRestoringFile
+failposition=EBeforeAction
+failfilename=c:\shared.dll
+
+[EAfterAction_c:\DataFileA.dat]
+
+failtype=EFailRestoringFile
+failposition=EAfterAction
+failfilename=e:\DataFileA.dat
+
+[EAfterAction_e:\DataFileB.dat]
+
+failtype=EFailRestoringFile
+failposition=EAfterAction
+failfilename=e:\DataFileB.dat
+
+[EAfterAction_c:\InstallApp.exe]
+
+failtype=EFailRestoringFile
+failposition=EAfterAction
+failfilename=c:\InstallApp.exe
+
+[EAfterAction_c:\Shared.dll]
+
+failtype=EFailRestoringFile
+failposition=EAfterAction
+failfilename=c:\shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v1/EFailTempFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed uninstallation of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailDeletingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,13 @@
+; these test failure during rollback of failed uninstallation of app version 2 files
+
+[EBeforeAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=c:\temp.dat
+
+[EAfterAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EAfterAction
+failfilename=c:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailNewFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed uninstallation of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EFailNewFilesRemoved
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EFailNewFilesRemoved
+failposition=EAfterJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailNone.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,12 @@
+; these test successful rollback of failed uninstallation of app version 2 files
+
+[EFailNone]
+
+present-01=e:\DataFileB.dat
+present-02=e:\DataFileC.dat
+present-03=c:\InstallApp.exe
+present-04=c:\Shared.dll
+
+absent-01=c:\IntegrityServices\0.drv
+absent-02=c:\IntegrityServices\0.log
+absent-03=e:\IntegrityServices\0.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailOldFilesRestored.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed uninstallation of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EOldFilesRestored
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EOldFilesRestored
+failposition=EAfterJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailRestoringFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+; these test failure during rollback of failed uninstallation of app version 2 files
+
+[EBeforeAction_e:\DataFileB.dat]
+
+failtype=EFailRestoringFile
+failposition=EBeforeAction
+failfilename=e:\DataFileB.dat
+
+[EBeforeAction_e:\DataFileC.dat]
+
+failtype=EFailRestoringFile
+failposition=EBeforeAction
+failfilename=e:\DataFileC.dat
+
+[EBeforeAction_c:\InstallApp.exe]
+
+failtype=EFailRestoringFile
+failposition=EBeforeAction
+failfilename=c:\InstallApp.exe
+
+[EBeforeAction_c:\Shared.dll]
+
+failtype=EFailRestoringFile
+failposition=EBeforeAction
+failfilename=c:\shared.dll
+
+[EAfterAction_e:\DataFileB.dat]
+
+failtype=EFailRestoringFile
+failposition=EAfterAction
+failfilename=e:\DataFileB.dat
+
+[EAfterAction_e:\DataFileC.dat]
+
+failtype=EFailRestoringFile
+failposition=EAfterAction
+failfilename=e:\DataFileC.dat
+
+[EAfterAction_c:\InstallApp.exe]
+
+failtype=EFailRestoringFile
+failposition=EAfterAction
+failfilename=c:\InstallApp.exe
+
+[EAfterAction_c:\Shared.dll]
+
+failtype=EFailRestoringFile
+failposition=EAfterAction
+failfilename=c:\shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_uninstall_v2/EFailTempFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed uninstallation of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailDeletingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,13 @@
+; these test failure during rollback of failed upgrade of app from version 1 to version 2
+
+[EBeforeAction_e:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=e:\temp.dat
+
+[EAfterAction_e:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EAfterAction
+failfilename=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailNewFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed upgrade of app from version 1 to version 2
+
+[EBeforeJournal]
+
+failtype=EFailNewFilesRemoved
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EFailNewFilesRemoved
+failposition=EAfterJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailNone.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,13 @@
+; these test successful rollback of failed upgrade of app from version 1 to version 2
+
+[EFailNone]
+
+present-01=c:\DataFileA.dat
+present-02=e:\DataFileB.dat
+present-03=c:\InstallApp.exe
+present-04=c:\Shared.dll
+
+absent-01=e:\temp.dat
+absent-02=c:\IntegrityServices\0.drv
+absent-03=c:\IntegrityServices\0.log
+absent-04=e:\IntegrityServices\0.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailOldFilesRestored.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed upgrade of app from version 1 to version 2
+
+[EBeforeJournal]
+
+failtype=EOldFilesRestored
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EOldFilesRestored
+failposition=EAfterJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailRestoringFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,13 @@
+; these test failure during rollback of failed upgrade of app from version 1 to version 2
+
+[EBeforeAction_c:\DataFileA.dat]
+
+failtype=EFailRestoringFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+[EAfterAction_c:\DataFileA.dat]
+
+failtype=EFailRestoringFile
+failposition=EAfterAction
+failfilename=c:\DataFileA.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/rollback_upgrade_v1-v2/EFailTempFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,11 @@
+; these test failure during rollback of failed upgrade of app from version 1 to version 2
+
+[EBeforeJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+[EAfterJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/tintegrityservices.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,239 @@
+[Cleanup]
+
+; cleans up files between test cases
+
+cleanupfile-01=c:\DataFileA.dat
+cleanupfile-02=e:\DataFileB.dat
+cleanupfile-03=e:\DataFileC.dat
+cleanupfile-04=c:\InstallApp.exe
+cleanupfile-05=c:\shared.dll
+cleanupfile-06=c:\temp.dat
+cleanupfile-07=e:\temp.dat
+
+; cleans up both default and custom journal paths (recursively deleting files and directories)
+
+cleanupdirectory-01=c:\IntegrityServices\
+cleanupdirectory-02=e:\IntegrityServices\
+cleanupdirectory-03=c:\dummyDir\
+
+
+[failafteraddandremove]
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=c:\DataFileC.dat
+
+arbitraryopfile-01=c:\DataFileA.dat
+operation-01=addfile
+arbitraryopfile-02=c:\DataFileA.dat
+operation-02=removefile
+arbitraryopfile-03=c:\DataFileB.dat
+operation-03=removefile
+arbitraryopfile-04=c:\DataFileC.dat
+operation-04=addfile
+
+absent-01=c:\DataFileA.dat
+absent-02=c:\DataFileB.dat
+present-01=c:\DataFileC.dat
+
+[recoverafterfailedaddandremove]
+absent-01=c:\DataFileA.dat
+absent-02=c:\DataFileC.dat
+present-01=c:\DataFileB.dat
+
+[fail_before_journal_remove_dir]
+failtype=EFailRemovingFile
+failposition=EBeforeJournal
+failfilename=c:\dummyDir\
+
+arbitraryopfile-01=c:\dummyDir\
+operation-01=removefile
+
+present-01=c:\dummyDir\
+present-02=c:\dummyDir\DataFileA.dat
+present-03=c:\dummyDir\DataFileB.dat
+
+[directory_present]
+present-01=c:\dummyDir\DataFileA.dat
+present-02=c:\dummyDir\DataFileB.dat
+present-03=c:\dummyDir\
+
+[directory_absent]
+absent-01=c:\dummyDir\DataFileA.dat
+absent-02=c:\dummyDir\DataFileB.dat
+absent-03=c:\dummyDir\
+
+[fail_after_journal_remove_dir]
+failtype=EFailRemovingFile
+failposition=EAfterJournal
+failfilename=c:\dummyDir\
+
+arbitraryopfile-01=c:\dummyDir\
+operation-01=removefile
+
+present-01=c:\dummyDir\
+present-02=c:\dummyDir\DataFileA.dat
+present-03=c:\dummyDir\DataFileB.dat
+
+[fail_before_action_remove_dir]
+failtype=EFailRemovingFile
+failposition=EBeforeAction
+failfilename=c:\dummyDir\
+
+arbitraryopfile-01=c:\dummyDir\
+operation-01=removefile
+
+present-01=c:\dummyDir\
+present-02=c:\dummyDir\DataFileA.dat
+present-03=c:\dummyDir\DataFileB.dat
+
+[fail_none]
+failtype=EFailNone
+failposition=EAfterAction
+failfilename=c:\dummyDir\
+
+arbitraryopfile-01=c:\dummyDir\
+operation-01=removefile
+
+absent-01=c:\dummyDir\
+absent-02=c:\dummyDir\DataFileA.dat
+absent-03=c:\dummyDir\DataFileB.dat
+
+[fail_after_action_remove_dir]
+failtype=EFailRemovingFile
+failposition=EAfterAction
+failfilename=c:\dummyDir\
+
+arbitraryopfile-01=c:\dummyDir\
+operation-01=removefile
+
+absent-01=c:\dummyDir\
+absent-02=c:\dummyDir\DataFileA.dat
+absent-03=c:\dummyDir\DataFileB.dat
+
+[add_and_remove_dir]
+failtype=EFailNone
+failposition=EBeforeAction
+failfilename=c:\dummyDir\
+
+arbitraryopfile-01=c:\dummyDir\
+operation-01=addfile
+arbitraryopfile-02=c:\dummyDir\DataFileA.dat
+operation-02=addfile
+arbitraryopfile-03=c:\dummyDir\
+operation-03=removefile
+
+absent-01=c:\dummyDir\
+absent-02=c:\dummyDir\DataFileA.dat
+
+[add_and_remove_dir_fail_before_remove]
+failtype=EFailRemovingFile
+failposition=EBeforeAction
+failfilename=c:\dummyDir\
+
+arbitraryopfile-01=c:\dummyDir\
+operation-01=addfile
+arbitraryopfile-02=c:\dummyDir\DataFileA.dat
+operation-02=addfile
+arbitraryopfile-03=c:\dummyDir\
+operation-03=removefile
+
+present-01=c:\dummyDir\
+present-02=c:\dummyDir\DataFileA.dat
+
+
+[failonlasttemp]
+failtype=EFailAddingTempFile
+failposition=EAfterAction
+failfilename=e:\temp.dat
+temporaryfile-01=c:\DataFileA.dat
+temporaryfile-02=e:\DataFileB.dat
+temporaryfile-03=e:\DataFileC.dat
+temporaryfile-04=c:\InstallApp.exe
+temporaryfile-05=c:\shared.dll
+temporaryfile-06=c:\temp.dat
+temporaryfile-07=e:\temp.dat
+
+[rollbackfailondeletetemp]
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=DataFileA.dat
+present-01=c:\DataFileA.dat
+present-02=e:\DataFileB.dat
+present-03=e:\DataFileC.dat
+present-04=c:\InstallApp.exe
+present-05=c:\shared.dll
+present-06=c:\temp.dat
+present-07=e:\temp.dat
+
+[rollbacksuccess]
+absent-01=c:\DataFileA.dat
+absent-02=e:\DataFileB.dat
+absent-03=e:\DataFileC.dat
+absent-04=c:\InstallApp.exe
+absent-05=c:\shared.dll
+absent-06=c:\temp.dat
+absent-07=e:\temp.dat
+
+[registryrollback]
+absent-01=c:\sys\install\sisregistry\80000001\00000000.reg
+absent-02=c:\sys\install\sisregistry\80000001\00000000_0000.ctl
+absent-03=c:\sys\install\IntegrityServices\0.drv
+absent-04=c:\sys\install\IntegrityServices\0.log
+
+[registryrollforward]
+absent-01=c:\sys\install\IntegrityServices\0.drv
+absent-02=c:\sys\install\IntegrityServices\0.log
+present-01=c:\sys\install\sisregistry\80000002\00000000.reg
+present-02=c:\sys\install\sisregistry\80000002\00000000_0000.ctl
+
+[removablemedia]
+absent-01=c:\file1.txt
+absent-02=e:\file2.txt
+absent-03=c:\sys\install\IntegrityServices\2.drv
+absent-04=c:\sys\install\IntegrityServices\2.log
+absent-05=e:\sys\install\IntegrityServices\2.log
+
+[uninstallrollforward]
+absent-01=c:\sys\install\IntegrityServices\3.drv
+absent-02=c:\sys\install\IntegrityServices\3.log
+present-01=c:\sys\install\sisregistry\1000000f\00000000.reg
+present-02=c:\sys\install\sisregistry\1000000f\00000000_0000.ctl
+
+[package_present]
+uid-01=1000000f
+
+[package_not_installed]
+uid-01=80000001
+
+[package_installed]
+uid-01=80000002
+
+[uninstall_package]
+uid=80000002
+script=z:\tswi\tuiscriptadaptors\scripts\uninstall.xml          
+
+[remove_package]
+uid=1000000f
+script=z:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
+
+[JournalFile_unit_tests]
+target=c:\sts_test_dir\myjournal.log
+
+[JournalFile_unit_tests_oom]
+target=c:\sts_test_dir\myjournal.log
+OOMTest=true
+
+[Journal_unit_tests]
+target=\sts_test_dir\
+trid=123456
+
+[Journal_unit_tests_oom]
+OOMTest=true
+target=\sts_test_dir\
+trid=123456
+
+[Integrityservices_unit_tests_OOM]
+OOMTest=false
+target=\sts_test_dir\
+trid=654321
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/tintegrityservices.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,427 @@
+//
+// 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 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".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+PRINT IntegrityServices tests...
+//
+//LOAD_SUITE tintegrityservices
+LOAD_SUITE tststestserver
+//
+#
+z:\tusif\tsts\tintegrityservices\scripts\
+
+//! @file
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0001
+//! @SYMTestCaseDesc		Simulates successful install of version 1 followed by sucessful uninstall
+//! @SYMTestPriority		Low
+//! @SYMTestExpectedResults	The test completes with KErrNone completion code.  All files are cleaned-up.
+//! @SYMREQ			REQ2681.5
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0001
+
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\install_v1\EFailNone.ini EFailNone
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailNone.ini EFailNone
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0001
+
+
+//! @file
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0002
+//! @SYMTestCaseDesc		Simulates successful install of version 1, then upgrade to version 2 followed by sucessful uninstall
+//! @SYMTestPriority		Low
+//! @SYMTestExpectedResults	The test completes with KErrNone completion code.  All files are cleaned-up.
+//! @SYMREQ			REQ2681.5
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0002
+
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\install_v1\EFailNone.ini EFailNone
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailNone.ini EFailNone
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailNone.ini EFailNone
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0002
+
+
+//! @file
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0003
+//! @SYMTestCaseDesc		Simulates successful install of version 2 followed by sucessful uninstall
+//! @SYMTestPriority		Low
+//! @SYMTestExpectedResults	The test completes with KErrNone completion code.  All files are cleaned-up.
+//! @SYMREQ			REQ2681.5
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0003
+
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\install_v2\EFailNone.ini EFailNone
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\uninstall_v2\EFailNone.ini EFailNone
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0003
+
+
+//! @file
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0004
+//! @SYMTestCaseDesc		Simulates failure during installation of version 1 before adding the file c:\DataFileA.dat followed by sucessful rollback.
+//! @SYMTestPriority		Low
+//! @SYMTestExpectedResults	The test completes with KErrNone completion code.  All files are cleaned-up.
+//! @SYMREQ			REQ2681.5
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0004
+
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\install_v1\EFailAddingNewFile.ini EBeforeAction_c:\DataFileA.dat
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailNone.ini EFailNone
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0004
+
+
+//! @file
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0005
+//! @SYMTestCaseDesc		Simulates failure during installation of version 1 after logging that the installation completed. Recovery rolls-forward the installation to completion. It is then uninstalled successfully.
+//! @SYMTestPriority		Low
+//! @SYMTestExpectedResults	The test completes with KErrNone completion code.  All files are cleaned-up.
+//! @SYMREQ			REQ2681.5
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0005
+
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\install_v1\EFailInstallComplete.ini EAfterJournal
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\install_v1\EFailNone.ini EFailNone
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailNone.ini EFailNone
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0005
+
+
+//! @file
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0006
+//! @SYMTestCaseDesc		Simulates failure during installation of version 1 and again during the recovery before finally recovering successfully.
+//! @SYMTestPriority		Low
+//! @SYMTestExpectedResults	The test completes with KErrNone completion code.  All files are cleaned-up.
+//! @SYMREQ			REQ2681.5
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0006
+
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\install_v1\EFailAddingNewFile.ini EBeforeAction_c:\DataFileA.dat
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailOldFilesRestored.ini EFailBeforeJournal
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\rollback_install_v1\EFailNone.ini EFailNone
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0006
+
+
+//! @file
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0007
+//! @SYMTestCaseDesc		Simulates installation of version 1 followed by failure during upgrade to version 2. A sucessful recovery is followed by sucessfull uninstall.
+//! @SYMTestPriority		Low
+//! @SYMTestExpectedResults	The test completes with KErrNone completion code.  All files are cleaned-up.
+//! @SYMREQ			REQ2681.5
+//! @SYMTestType		UT
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0007
+
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\install_v1\EFailNone.ini EFailNone
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\upgrade_v1-v2\EFailAddingNewFile.ini EBeforeAction_e:\DataFileC.dat
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\rollback_upgrade_v1-v2\EFailNone.ini EFailNone
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\uninstall_v1\EFailNone.ini EFailNone
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0007
+
+
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0009
+//! @SYMTestCaseDesc		Test that rollback after adding then removing a file will not leave the file in place.
+//! @SYMTestPriority		Medium
+//! @SYMTestExpectedResults	The test completes with all files cleaned-up.
+//! @SYMDEF 			DEF088970
+//! @SYMDevelopedForRelease 	Argus
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0009
+
+// Preliminary cleanup
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+
+// Copy file into place to be removed during the rollback.
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\datafileb.dat
+RUN_UTILS MakeReadWrite c:\datafileb.dat
+
+// Run test step that removes c:\datafileb.dat, adds then removes c:\DataFileA, then fails after adding another file.
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini failafteraddandremove
+
+// Roll back from previous failure, ensure that files added in the previous step are deleted and the one deleted during the
+// previous step is recovered.
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini recoverafterfailedaddandremove
+
+// Delete test file
+RUN_UTILS DeleteFile c:\datafileb.dat
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0009
+
+
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0010
+//! @SYMTestCaseDesc		Test that transient rollback failure while deleting temp files will not block future rollbacks.
+//! @SYMTestPriority		Medium
+//! @SYMTestActions 		Journal addition of multiple temp files without commit, fail rollback while deleting temp files, check
+//! 				that subsequent rollback succeeds.
+//! @SYMTestExpectedResults	Last rollback succeeds, all temp files removed.
+//! @SYMDEF 			DEF088011
+//! @SYMDevelopedForRelease 	Argus
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0010
+
+// Run test step that adds a number of temporary files, failing after the last one so it doesn't commit
+RUN_TEST_STEP 10 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini failonlasttemp
+
+// Run a recovery step which fails deleting one of the temp files
+RUN_TEST_STEP 10 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini rollbackfailondeletetemp
+
+// Make sure that rollback can succeed on another attempt. 
+RUN_TEST_STEP 10 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini rollbacksuccess
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0010
+
+
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0011
+//! @SYMTestCaseDesc		Test that failure before adding a journal entry for removal is handled gracefully
+//! @SYMTestPriority		Medium
+//! @SYMTestExpectedResults	The test completes with all files present.
+//! @SYMDEF 			DEF101378
+//! @SYMDevelopedForRelease 	Argus
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0011
+
+// Preliminary cleanup
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+
+RUN_UTILS MkDir c:\dummyDir
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\dummyDir\datafileb.dat
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\dummyDir\datafilea.dat
+RUN_UTILS MakeReadWrite c:\dummyDir\datafileb.dat
+RUN_UTILS MakeReadWrite c:\dummyDir\datafilea.dat
+
+// Run test step that fails before adding to the journal entry that dummyDir is to be removed
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini fail_before_journal_remove_dir
+
+// Roll back from previous failure, ensure that the files are still there 
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini directory_present
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0011
+
+
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0012
+//! @SYMTestCaseDesc		Test that failure after adding a journal entry for removal is handled gracefully
+//! @SYMTestPriority		Medium
+//! @SYMTestExpectedResults	The test completes with all files present.
+//! @SYMDEF 			DEF101378
+//! @SYMDevelopedForRelease 	Argus
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0012
+
+// Preliminary cleanup
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+
+RUN_UTILS MkDir c:\dummyDir
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\dummyDir\datafileb.dat
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\dummyDir\datafilea.dat
+RUN_UTILS MakeReadWrite c:\dummyDir\datafileb.dat
+RUN_UTILS MakeReadWrite c:\dummyDir\datafilea.dat
+
+// Run test step that fails after adding to the journal entry that dummyDir is to be removed
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini fail_after_journal_remove_dir
+
+// Roll back from previous failure, ensure the files are still there
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini directory_present
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0012
+
+
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0013
+//! @SYMTestCaseDesc		Test that failure before removing a directory is handled gracefully
+//! @SYMTestPriority		Medium
+//! @SYMTestExpectedResults	The test completes with all files present.
+//! @SYMDEF 			DEF101378
+//! @SYMDevelopedForRelease 	Argus
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0013
+
+// Preliminary cleanup
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+
+RUN_UTILS MkDir c:\dummyDir
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\dummyDir\datafileb.dat
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\dummyDir\datafilea.dat
+RUN_UTILS MakeReadWrite c:\dummyDir\datafileb.dat
+RUN_UTILS MakeReadWrite c:\dummyDir\datafilea.dat
+
+// Run test step that fails before removing dummyDir 
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini fail_before_action_remove_dir
+
+// Roll back from previous failure, ensure the files are still there
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini directory_present
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0013
+
+
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0014
+//! @SYMTestCaseDesc		Test that failure after removing a directory is handled gracefully
+//! @SYMTestPriority		Medium
+//! @SYMTestExpectedResults	The test completes with all files present.
+//! @SYMDEF 			DEF101378
+//! @SYMDevelopedForRelease 	Argus
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0014
+// Preliminary cleanup
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+
+RUN_UTILS MkDir c:\dummyDir
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\dummyDir\datafileb.dat
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\dummyDir\datafilea.dat
+RUN_UTILS MakeReadWrite c:\dummyDir\datafileb.dat
+RUN_UTILS MakeReadWrite c:\dummyDir\datafilea.dat
+
+// Run test step that fails after removing dummyDir
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini fail_after_action_remove_dir
+
+// Roll back from previous failure, ensure the files are still there
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini directory_present
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0014
+
+
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0015
+//! @SYMTestCaseDesc		Test that roll forward of directory uninstallation works correctly
+//! @SYMTestPriority		Medium
+//! @SYMTestExpectedResults	The test completes with all files deleted.
+//! @SYMDEF 			DEF101378
+//! @SYMDevelopedForRelease 	Argus
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0015
+
+// Preliminary cleanup
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+
+RUN_UTILS MkDir c:\dummyDir
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\dummyDir\datafileb.dat
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini c:\dummyDir\datafilea.dat
+RUN_UTILS MakeReadWrite c:\dummyDir\datafileb.dat
+RUN_UTILS MakeReadWrite c:\dummyDir\datafilea.dat
+
+// Run test step that fails after removing dummyDir
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini fail_before_action_remove_dir
+
+// Roll forward - check that files will get deleted
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini fail_none
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0015
+
+
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0016
+//! @SYMTestCaseDesc		Test that adding and removing a directory in the same transaction will remove it
+//! @SYMTestPriority		Medium
+//! @SYMTestExpectedResults	The test completes with all files cleaned-up.
+//! @SYMDEF 			DEF101378
+//! @SYMDevelopedForRelease 	Argus
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0016
+
+// Preliminary cleanup
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+
+// Run test step that creates c:\dummyDir with a test file, and then removes it in the same transaction.
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini add_and_remove_dir
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0016
+
+
+//! @SYMTestCaseID		API-SEC-INTEGRITYSERVICES-B-0017
+//! @SYMTestCaseDesc		Test that adding and removing a directory in the same transaction with failure before removal will rollback correctly
+//! @SYMTestPriority		Medium
+//! @SYMTestExpectedResults	The test completes with all files cleaned-up.
+//! @SYMDEF 			DEF101378
+//! @SYMDevelopedForRelease 	Argus
+
+START_TESTCASE API-SEC-INTEGRITYSERVICES-B-0017
+
+// Preliminary cleanup
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+
+// Run test step that creates c:\dummyDir with a test file, and then removes it in the same transaction while failing before removal.
+RUN_TEST_STEP 100 tststestserver Install z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini add_and_remove_dir_fail_before_remove
+
+// Roll back from previous failure, ensure that no files are present
+RUN_TEST_STEP 100 tststestserver Recover z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini directory_absent
+
+END_TESTCASE API-SEC-INTEGRITYSERVICES-B-0017
+
+
+RUN_TEST_STEP 100 tststestserver Cleanup z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Cleanup
+
+
+//! @SYMTestCaseID		API-SEC-Journalfile_unit_tests-0001
+//! @SYMTestStatus		3. Released
+
+START_TESTCASE API-SEC-Journalfile_unit_tests-0001
+
+RUN_TEST_STEP 100 tststestserver JournalFileUnitTest z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini JournalFile_unit_tests
+
+END_TESTCASE API-SEC-Journalfile_unit_tests-0001
+
+
+//! @SYMTestCaseID		API-SEC-Journalfile_unit_tests_OOM-0001
+//! @SYMTestStatus		3. Released
+
+START_TESTCASE API-SEC-Journalfile_unit_tests_OOM-0001
+
+RUN_TEST_STEP 100 tststestserver JournalFileUnitTestAdd     z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini JournalFile_unit_tests_oom
+RUN_TEST_STEP 100 tststestserver JournalFileUnitTestTemp    z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini JournalFile_unit_tests_oom
+RUN_TEST_STEP 100 tststestserver JournalFileUnitTestRemove  z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini JournalFile_unit_tests_oom
+RUN_UTILS CopyFile z:\tusif\tsts\tintegrityservices\scripts\data\unittests\myjournal.log  c:\sts_test_dir\myjournal.log
+RUN_TEST_STEP 100 tststestserver JournalFileUnitTestRead    z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini JournalFile_unit_tests_oom
+RUN_UTILS DeleteFile c:\sts_test_dir\myjournal.log
+RUN_TEST_STEP 100 tststestserver JournalFileUnitTestEvent   z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini JournalFile_unit_tests_oom
+
+END_TESTCASE API-SEC-Journalfile_unit_tests_OOM-0001
+
+
+//! @SYMTestCaseID		API-SEC-Journal_unit_tests-0001
+//! @SYMTestStatus		3. Released
+
+START_TESTCASE API-SEC-Journal_unit_tests-0001
+
+RUN_TEST_STEP 100 tststestserver JournalUnitTest z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Journal_unit_tests
+
+END_TESTCASE API-SEC-Journal_unit_tests-0001
+
+
+//! @SYMTestCaseID		API-SEC-Journal_unit_tests_OOM-0001
+//! @SYMTestStatus		3. Released
+
+START_TESTCASE API-SEC-Journal_unit_tests_OOM-0001
+
+RUN_TEST_STEP 100 tststestserver JournalUnitTestInstall z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Journal_unit_tests_oom
+RUN_TEST_STEP 100 tststestserver JournalUnitTestRollback z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Journal_unit_tests_oom
+
+END_TESTCASE API-SEC-Journal_unit_tests_OOM-0001
+
+
+//START_TESTCASE Integrityservices_unit_tests_OOM
+//RUN_TEST_STEP 100 tststestserver IntegrityservicesUnitTestInstall z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Integrityservices_unit_tests_OOM
+//RUN_TEST_STEP 100 tststestserver IntegrityservicesUnitTestRollback z:\tusif\tsts\tintegrityservices\scripts\tintegrityservices.ini Integrityservices_unit_tests_OOM
+//END_TESTCASE Integrityservices_unit_tests_OOM
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailBackupFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,21 @@
+; these test failure during uninstall of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EFailBackupFilesRemoved
+failposition=EBeforeJournal
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterJournal]
+
+failtype=EFailBackupFilesRemoved
+failposition=EAfterJournal
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailDeletingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,23 @@
+; these test failure during uninstall of app version 1 files
+
+[EBeforeAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=c:\temp.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EAfterAction
+failfilename=c:\temp.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailInstallComplete.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,21 @@
+; these test failure during uninstall of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EFailInstallComplete
+failposition=EBeforeJournal
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterJournal]
+
+failtype=EFailInstallComplete
+failposition=EAfterJournal
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailNone.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,16 @@
+; these test successful uninstall of app version 1 files
+
+[EFailNone]
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+absent-01=c:\DataFileA.dat
+absent-02=e:\DataFileB.dat
+absent-03=c:\InstallApp.exe
+absent-04=c:\Shared.dll
+absent-05=c:\IntegrityServices\0.drv
+absent-06=c:\IntegrityServices\0.log
+absent-07=e:\IntegrityServices\0.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailRemovingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,176 @@
+; these test failure during uninstall of app version 2 files
+
+[EBeforeAction_c:\DataFileA.dat]
+
+failtype=EFailRemovingFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EBeforeAction_e:\DataFileB.dat]
+
+failtype=EFailRemovingFile
+failposition=EBeforeAction
+failfilename=e:\DataFileB.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EBeforeAction_c:\InstallApp.exe]
+
+failtype=EFailRemovingFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EBeforeAction_c:\Shared.dll]
+
+failtype=EFailRemovingFile
+failposition=EBeforeAction
+failfilename=c:\Shared.dll
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterAction_c:\DataFileA.dat]
+
+failtype=EFailRemovingFile
+failposition=EAfterAction
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterAction_e:\DataFileB.dat]
+
+failtype=EFailRemovingFile
+failposition=EAfterAction
+failfilename=e:\DataFileB.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterAction_c:\InstallApp.exe]
+
+failtype=EFailRemovingFile
+failposition=EAfterAction
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterAction_c:\Shared.dll]
+
+failtype=EFailRemovingFile
+failposition=EAfterAction
+failfilename=c:\Shared.dll
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EBeforeJournal_c:\DataFileA.dat]
+
+failtype=EFailRemovingFile
+failposition=EBeforeJournal
+failfilename=c:\DataFileA.dat
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EBeforeJournal_e:\DataFileB.dat]
+
+failtype=EFailRemovingFile
+failposition=EBeforeJournal
+failfilename=e:\DataFileB.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EBeforeJournal_c:\InstallApp.exe]
+
+failtype=EFailRemovingFile
+failposition=EBeforeJournal
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EBeforeJournal_c:\Shared.dll]
+
+failtype=EFailRemovingFile
+failposition=EBeforeJournal
+failfilename=c:\Shared.dll
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterJournal_c:\DataFileA.dat]
+
+failtype=EFailRemovingFile
+failposition=EAfterJournal
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterJournal_e:\DataFileB.dat]
+
+failtype=EFailRemovingFile
+failposition=EAfterJournal
+failfilename=e:\DataFileB.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterJournal_c:\InstallApp.exe]
+
+failtype=EFailRemovingFile
+failposition=EAfterJournal
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterJournal_c:\Shared.dll]
+
+failtype=EFailRemovingFile
+failposition=EAfterJournal
+failfilename=c:\Shared.dll
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v1/EFailTempFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,21 @@
+; these test failure during uninstall of app version 1 files
+
+[EBeforeJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+removefile-01=c:\DataFileA.dat
+removefile-02=e:\DataFileB.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailBackupFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,21 @@
+; these test failure during uninstall of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EFailBackupFilesRemoved
+failposition=EBeforeJournal
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterJournal]
+
+failtype=EFailBackupFilesRemoved
+failposition=EAfterJournal
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailDeletingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,23 @@
+; these test failure during uninstall of app version 2 files
+
+[EBeforeAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=c:\temp.dat
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterAction_c:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EAfterAction
+failfilename=c:\temp.dat
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailInstallComplete.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,21 @@
+; these test failure during uninstall of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EFailInstallComplete
+failposition=EBeforeJournal
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterJournal]
+
+failtype=EFailInstallComplete
+failposition=EAfterJournal
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailNone.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,16 @@
+; these successful uninstall of app version 2 files
+
+[EFailNone]
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+absent-01=e:\DataFileB.dat
+absent-02=e:\DataFileC.dat
+absent-03=c:\InstallApp.exe
+absent-04=c:\Shared.dll
+absent-05=c:\IntegrityServices\0.drv
+absent-06=c:\IntegrityServices\0.log
+absent-07=e:\IntegrityServices\0.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailRemovingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,89 @@
+; these test failure during uninstall of app version 2 files
+
+[EBeforeAction_e:\DataFileB.dat]
+
+failtype=EFailRemovingFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EBeforeAction_e:\DataFileC.dat]
+
+failtype=EFailRemovingFile
+failposition=EBeforeAction
+failfilename=e:\DataFileB.dat
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EBeforeAction_c:\InstallApp.exe]
+
+failtype=EFailRemovingFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EBeforeAction_c:\Shared.dll]
+
+failtype=EFailRemovingFile
+failposition=EBeforeAction
+failfilename=c:\Shared.dll
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterAction_e:\DataFileB.dat]
+
+failtype=EFailRemovingFile
+failposition=EAfterAction
+failfilename=c:\DataFileA.dat
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterAction_e:\DataFileC.dat]
+
+failtype=EFailRemovingFile
+failposition=EAfterAction
+failfilename=e:\DataFileB.dat
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterAction_c:\InstallApp.exe]
+
+failtype=EFailRemovingFile
+failposition=EAfterAction
+failfilename=c:\DataFileA.dat
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterAction_c:\Shared.dll]
+
+failtype=EFailRemovingFile
+failposition=EAfterAction
+failfilename=c:\Shared.dll
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/uninstall_v2/EFailTempFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,21 @@
+; these test failure during uninstall of app version 2 files
+
+[EBeforeJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
+
+[EAfterJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+removefile-01=e:\DataFileB.dat
+removefile-02=e:\DataFileC.dat
+removefile-03=c:\InstallApp.exe
+removefile-04=c:\Shared.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailAddingNewFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+; these test failure during upgrade of app from version 1 to version 2
+
+[EBeforeAction_e:\DataFileC.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeAction
+failfilename=e:\DataFileC.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterAction_e:\DataFileC.dat]
+
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=e:\DataFileC.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EBeforeJournal_e:\DataFileC.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=e:\DataFileC.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterJournal_e:\DataFileC.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=e:\DataFileC.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailAddingTempFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+; these test failure during upgrade of app from version 1 to version 2
+
+[EBeforeAction_e:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EBeforeAction
+failfilename=e:\temp.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterAction_e:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EAfterAction
+failfilename=e:\temp.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EBeforeJournal_e:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EBeforeJournal
+failfilename=e:\temp.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterJournal_e:\temp.dat]
+
+failtype=EFailAddingTempFile
+failposition=EAfterJournal
+failfilename=e:\temp.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailBackupFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,23 @@
+; these test failure during upgrade of app from version 1 to version 2
+
+[EBeforeJournal]
+
+failtype=EFailBackupFilesRemoved
+failposition=EBeforeJournal
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterJournal]
+
+failtype=EFailBackupFilesRemoved
+failposition=EAfterJournal
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailDeletingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,25 @@
+; these test failure during upgrade of app from version 1 to version 2
+
+[EBeforeAction_e:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EBeforeAction
+failfilename=e:\temp.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterAction_e:\temp.dat]
+
+failtype=EFailDeletingFile
+failposition=EAfterAction
+failfilename=c:\temp.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailInstallComplete.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,23 @@
+; these test failure during upgrade of app from version 1 to version 2
+
+[EBeforeJournal]
+
+failtype=EFailInstallComplete
+failposition=EBeforeJournal
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterJournal]
+
+failtype=EFailInstallComplete
+failposition=EAfterJournal
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailNone.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,19 @@
+; these successful upgrade of app from version 1 to version 2
+
+[EFailNone]
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+present-01=e:\DataFileB.dat
+present-02=e:\DataFileC.dat
+present-03=c:\InstallApp.exe
+present-04=c:\Shared.dll
+
+absent-01=e:\temp.dat
+absent-02=c:\IntegrityServices\0.drv
+absent-03=c:\IntegrityServices\0.log
+absent-04=e:\IntegrityServices\0.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailRemovingFile.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+; these test failure during upgrade of app from version 1 to version 2
+
+[EBeforeAction_c:\DataFileA.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeAction
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterAction_c:\DataFileA.dat]
+
+failtype=EFailAddingNewFile
+failposition=EAfterAction
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EBeforeJournal_c:\DataFileA.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterJournal_c:\DataFileA.dat]
+
+failtype=EFailAddingNewFile
+failposition=EBeforeJournal
+failfilename=c:\DataFileA.dat
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/scripts/upgrade_v1-v2/EFailTempFilesRemoved.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,23 @@
+; these test failure during upgrade of app from version 1 to version 2
+
+[EBeforeJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
+
+[EAfterJournal]
+
+failtype=EFailTempFilesRemoved
+failposition=EBeforeJournal
+
+removefile-01=c:\DataFileA.dat
+
+addfile-01=e:\DataFileC.dat
+
+temporaryfile-01=e:\temp.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/source/e32main.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* E32MAIN
+* Entry point for Test TIntegrityServices Server
+*
+*/
+
+
+#include <e32std.h>
+#include <e32base.h>
+#include "tintegrityservicesserver.h"
+
+// Perform server initialisation, in particular creation of the scheduler and 
+// server and then run the scheduler
+static void RunServerL()
+	{
+	// Naming the server thread after the server helps to debug panics
+	User::LeaveIfError(RThread().RenameMe(KIntegrityServicesServer));
+	// Create and install the active scheduler we need
+	CActiveScheduler* s= new(ELeave) CActiveScheduler;
+	CleanupStack::PushL(s);
+	CActiveScheduler::Install(s);
+	// Create the server and leave it on the cleanup stack
+	Usif::CIntegrityServicesServer::NewLC();
+	// Init complete, signal the client
+	RProcess::Rendezvous(KErrNone);
+	// Ready to run
+	CActiveScheduler::Start();
+	// Cleanup server and scheduler
+	CleanupStack::PopAndDestroy(2);
+	}
+
+//
+// Server process entry point
+//
+
+TInt E32Main()
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup=CTrapCleanup::New();
+	TInt err=KErrNoMemory;
+	if (cleanup)
+		{
+		TRAP(err, RunServerL());
+		delete cleanup;
+		}
+	__UHEAP_MARKEND;
+	return err;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/source/tintegrityservicesclientserver.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include <e32uid.h>
+#include "tintegrityservicesclientserver.h"
+#include "tintegrityservicescommon.h"
+
+//
+// Starts the IntegrityServices Server in a new process
+//
+static TInt StartIntegrityServicesServer()
+	{
+	const TUidType serverUid(KExecutableImageUid, KNullUid, KIntegrityServicesServerUid3);
+	RProcess server;
+	TInt err = server.Create(KIntegrityServicesServerImage, KNullDesC);
+
+	if (err != KErrNone)
+		{
+		return err;
+		}
+
+	TRequestStatus stat;
+	server.Rendezvous(stat);
+
+	if (stat != KRequestPending)
+		{
+		server.Kill(0); // abort startup
+		}
+	else
+		{
+		server.Resume(); // logon OK, start the server
+		}
+
+	User::WaitForRequest(stat); // wait for start or death
+	// We can't use the 'exit reason' if the server panicked as this is the
+	// panic 'reason' and may be 0 which cannot be distinguished from KErrNone.
+	err = (server.ExitType() == EExitPanic) ? KErrGeneral : stat.Int();
+	server.Close();
+	return err;
+	}
+
+EXPORT_C TInt RIntegrityServicesServerSession::Connect()
+	{
+	TInt retry = 2;
+	for(;;)
+		{
+		TInt err = CreateSession(KIntegrityServicesServerName, TVersion(0,0,0), 1);
+		if (err != KErrNotFound && err != KErrServerTerminated)
+			{
+			return err;
+			}
+
+		if (--retry == 0)
+			{
+			return err;
+			}
+
+		err = StartIntegrityServicesServer();
+		if (err != KErrNone && err != KErrAlreadyExists)
+			{
+			return err;
+			}
+		}
+	}
+
+EXPORT_C void RIntegrityServicesServerSession::AddL(const TDesC& aFileName)
+	{
+	User::LeaveIfError(SendReceive(EAdd, TIpcArgs(&aFileName)));
+	}
+
+EXPORT_C void RIntegrityServicesServerSession::RemoveL(const TDesC& aFileName)
+	{
+	User::LeaveIfError(SendReceive(ERemove, TIpcArgs(&aFileName)));
+	}
+	
+EXPORT_C void RIntegrityServicesServerSession::TemporaryL(const TDesC& aFileName)
+	{
+	User::LeaveIfError(SendReceive(ETemporary, TIpcArgs(&aFileName)));
+	}
+	
+EXPORT_C void RIntegrityServicesServerSession::CommitL()
+	{
+	User::LeaveIfError(SendReceive(ECommit));
+	}
+	
+EXPORT_C void RIntegrityServicesServerSession::RollBackL(TBool aAllTransactions)
+	{
+	TPckg<TBool> all(aAllTransactions);
+	User::LeaveIfError(SendReceive(ERollBack, TIpcArgs(&all)));
+	}
+	
+EXPORT_C void RIntegrityServicesServerSession::SetSimulatedFailureL(TPtrC aFailType, TPtrC aFailPosition, TPtrC aFileName)
+	{
+	User::LeaveIfError(SendReceive(ESetSimulatedFailure, TIpcArgs(&aFailType, &aFailPosition, &aFileName)));
+	}
+	
+EXPORT_C void RIntegrityServicesServerSession::CreateNewTestFileL(const TDesC& aFileName)
+	{
+	User::LeaveIfError(SendReceive(ECreateNewTestFile, TIpcArgs(&aFileName)));
+	}
+	
+EXPORT_C void RIntegrityServicesServerSession::CreateTempTestFileL(const TDesC& aFileName)
+	{
+	User::LeaveIfError(SendReceive(ECreateTempTestFile, TIpcArgs(&aFileName)));
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/source/tintegrityservicesserver.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,427 @@
+/*
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "tintegrityservicesserver.h"
+#include "tintegrityservicescommon.h"
+#include "integrityservices.h"
+#include <e32debug.h>
+
+_LIT(KFailAddingNewFile, "EFailAddingNewFile");
+_LIT(KFailRemovingFile, "EFailRemovingFile");
+_LIT(KFailAddingTempFile, "EFailAddingTempFile");
+_LIT(KFailRestoringFile, "EFailRestoringFile");
+_LIT(KFailDeletingFile, "EFailDeletingFile");
+_LIT(KFailInstallComplete, "EFailInstallComplete");
+_LIT(KFailNewFilesRemoved, "EFailNewFilesRemoved");
+_LIT(KFailOldFilesRestored, "EFailOldFilesRestored");
+_LIT(KFailTempFilesRemoved, "EFailTempFilesRemoved");
+_LIT(KFailBackupFilesRemoved, "EFailBackupFilesRemoved");
+
+_LIT(KFailBeforeJournal, "EBeforeJournal");
+_LIT(KFailAfterJournal, "EAfterJournal");
+_LIT(KFailBeforeAction, "EBeforeAction");
+_LIT(KFailAfterAction, "EAfterAction");
+
+using namespace Usif;
+
+static void PanicClient(const RMessagePtr2& aMessage, 
+						TIntegrityServicesServerPanic aPanic)
+	{
+	aMessage.Panic(KIntegrityServicesServerName, aPanic);
+	}
+
+/////
+///// CIntegrityServicesServer
+/////
+
+CIntegrityServicesServer* CIntegrityServicesServer::NewLC()
+	{
+	CIntegrityServicesServer* self = new(ELeave) CIntegrityServicesServer();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+	
+void CIntegrityServicesServer::AddSession()
+	{
+	++iSessionCount;
+	iShutdown->Cancel();
+	}
+	
+void CIntegrityServicesServer::DropSession()
+	{
+	if (--iSessionCount==0)
+		{
+		iShutdown->Start();
+		RDebug::Print(_L("Server shutting down"));
+		}
+	}
+
+CIntegrityServicesServer::~CIntegrityServicesServer()
+	{
+	delete iShutdown;
+	RDebug::Print(_L("Server destructor"));
+	}
+
+CIntegrityServicesServer::CIntegrityServicesServer() : CServer2(EPriorityNormal, ESharableSessions)
+	{
+	}
+
+void CIntegrityServicesServer::ConstructL()
+	{
+	StartL(KIntegrityServicesServerName);
+	
+	iShutdown = CShutdownTimer::NewL();
+	
+	// Ensure that the server still exits even if the 1st client fails to
+	// connect
+	iShutdown->Start();
+	}
+
+CSession2* CIntegrityServicesServer::NewSessionL(const TVersion& /*aVersion*/, 
+						 const RMessage2& /*aMessage*/) const
+	{
+	  return CIntegrityServicesSession::NewL();
+	}
+
+CIntegrityServicesSession* CIntegrityServicesSession::NewL()
+	{
+	CIntegrityServicesSession* self = CIntegrityServicesSession::NewLC();
+	CleanupStack::Pop(self);
+	return self;
+	}
+	
+	
+CIntegrityServicesSession* CIntegrityServicesSession::NewLC()
+	{
+	CIntegrityServicesSession* self = new(ELeave) CIntegrityServicesSession();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+
+CIntegrityServicesSession::CIntegrityServicesSession() : CSession2()
+	{
+	}
+	
+void CIntegrityServicesSession::ConstructL()
+	{
+	iIntegrityServices = CIntegrityServices::NewL(0);
+	}
+	
+void CIntegrityServicesSession::CreateL()
+	{
+	RDebug::Print(_L("Session CreateL"));
+	Server().AddSession();
+	}
+
+
+
+CIntegrityServicesSession::~CIntegrityServicesSession()
+	{
+	delete iIntegrityServices;
+	Server().DropSession();
+	}
+
+CIntegrityServicesServer& CIntegrityServicesSession::Server()
+	{
+	return *static_cast<CIntegrityServicesServer*>(
+		const_cast<CServer2*>(CSession2::Server()));
+	}
+
+/////
+///// CIntegrityServicesSession		
+/////
+
+void CreateTempTestFileL(TDesC& aFileName)
+	{
+	RFs fs;
+	User::LeaveIfError(fs.Connect());
+	CleanupClosePushL(fs);
+	RFile tempFile;
+	CleanupClosePushL(tempFile);
+	CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailAddingTempFile, CIntegrityServices::EBeforeAction, aFileName);
+	User::LeaveIfError(tempFile.Create(fs, aFileName, EFileWrite));
+	CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailAddingTempFile, CIntegrityServices::EAfterAction, aFileName);
+	CleanupStack::PopAndDestroy(2, &fs);
+	}
+
+void CreateNewTestFileL(TDesC& aFileName)
+	{
+	RFs fs;
+	User::LeaveIfError(fs.Connect());
+	CleanupClosePushL(fs);	
+	if (aFileName.Length() > 0 && aFileName[aFileName.Length() - 1] == KPathDelimiter)
+		{  // A new test directory is created
+		User::LeaveIfError(fs.MkDir(aFileName));
+		}
+	else
+		{  // A new test file is created
+		RFile newFile;
+		CleanupClosePushL(newFile);
+		CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailAddingNewFile, CIntegrityServices::EBeforeAction, aFileName);
+		User::LeaveIfError(newFile.Create(fs, aFileName, EFileWrite));
+		CIntegrityServices::SimulatePowerFailureL(CIntegrityServices::EFailAddingNewFile, CIntegrityServices::EAfterAction, aFileName);
+		CleanupStack::PopAndDestroy(&newFile);		
+		}
+	CleanupStack::PopAndDestroy(&fs);	
+	}
+
+void SetSimulatedFailureL(TPtrC16 aFailType, TPtrC16 aFailPosition, TPtrC16 aFailFileName)
+	{
+	if(aFailType.CompareF(KFailAddingNewFile) == 0)
+		{
+		CIntegrityServices::iFailType = CIntegrityServices::EFailAddingNewFile;
+		}
+	else if(aFailType.CompareF(KFailRemovingFile) == 0)
+		{
+		CIntegrityServices::iFailType = CIntegrityServices::EFailRemovingFile;
+		}
+	else if(aFailType.CompareF(KFailAddingTempFile) == 0)
+		{
+		CIntegrityServices::iFailType = CIntegrityServices::EFailAddingTempFile;
+		}
+	else if(aFailType.CompareF(KFailRestoringFile) == 0)
+		{
+		CIntegrityServices::iFailType = CIntegrityServices::EFailRestoringFile;
+		}
+	else if(aFailType.CompareF(KFailDeletingFile) == 0)
+		{
+		CIntegrityServices::iFailType = CIntegrityServices::EFailDeletingFile;
+		}
+	else if(aFailType.CompareF(KFailInstallComplete) == 0)
+		{
+		CIntegrityServices::iFailType = CIntegrityServices::EFailInstallComplete;
+		}
+	else if(aFailType.CompareF(KFailNewFilesRemoved) == 0)
+		{
+		CIntegrityServices::iFailType = CIntegrityServices::EFailNewFilesRemoved;
+		}
+	else if(aFailType.CompareF(KFailOldFilesRestored) == 0)
+		{
+		CIntegrityServices::iFailType = CIntegrityServices::EFailOldFilesRestored;
+		}
+	else if(aFailType.CompareF(KFailTempFilesRemoved) == 0)
+		{
+		CIntegrityServices::iFailType = CIntegrityServices::EFailTempFilesRemoved;
+		}
+	else if(aFailType.CompareF(KFailBackupFilesRemoved) == 0)
+		{
+		CIntegrityServices::iFailType = CIntegrityServices::EFailBackupFilesRemoved;
+		}
+	else
+		{
+		// default to EFailNone
+		CIntegrityServices::iFailType = CIntegrityServices::EFailNone;
+		}
+	
+	if(aFailPosition.CompareF(KFailBeforeJournal) == 0)
+		{
+		CIntegrityServices::iFailPosition = CIntegrityServices::EBeforeJournal;
+		}
+	else if(aFailPosition.CompareF(KFailAfterJournal) == 0)
+		{
+		CIntegrityServices::iFailPosition = CIntegrityServices::EAfterJournal;
+		}
+	else if(aFailPosition.CompareF(KFailBeforeAction) == 0)
+		{
+		CIntegrityServices::iFailPosition = CIntegrityServices::EBeforeAction;
+		}
+	else if(aFailPosition.CompareF(KFailAfterAction) == 0)
+		{
+		CIntegrityServices::iFailPosition = CIntegrityServices::EAfterAction;
+		}
+	else
+		{
+		if(CIntegrityServices::iFailType != CIntegrityServices::EFailNone)
+			{
+			// scripting error, FailType specified without FailPosition
+			User::Leave(KErrCorrupt);
+			}
+		}
+		
+	CIntegrityServices::iFailFileName = aFailFileName;
+	CIntegrityServices::iIsFailureTestingEnabled = CIntegrityServices::iFailType != CIntegrityServices::EFailNone;
+	}
+
+void CIntegrityServicesSession::ServiceL(const RMessage2& aMessage)
+	{
+	switch (aMessage.Function())
+		{
+		case EAdd:
+			{
+			RDebug::Print(_L("ServiceL EAdd"));
+			HBufC16* fileName = HBufC16::NewLC(aMessage.GetDesLength(0));
+		  	TPtr16 ptr(fileName->Des());
+		  	aMessage.Read(0, ptr);
+
+		  	TRAPD(err, iIntegrityServices->RegisterNewL(*fileName));
+
+			aMessage.Complete(err);
+			CleanupStack::PopAndDestroy(fileName);	
+			break;
+			}
+		case ERemove:
+			{
+			RDebug::Print(_L("ServiceL ERemove"));
+			HBufC16* fileName = HBufC16::NewLC(aMessage.GetDesLength(0));
+		  	TPtr16 ptr(fileName->Des());
+		  	aMessage.Read(0, ptr);
+
+		  	TRAPD(err, iIntegrityServices->RemoveL(*fileName));
+
+			aMessage.Complete(err);
+			CleanupStack::PopAndDestroy(fileName);	
+			
+			break;
+			}
+		case ETemporary:
+			{
+			RDebug::Print(_L("ServiceL ETemporary"));
+			HBufC16* fileName = HBufC16::NewLC(aMessage.GetDesLength(0));
+		  	TPtr16 ptr(fileName->Des());
+		  	aMessage.Read(0, ptr);
+
+		  	TRAPD(err, iIntegrityServices->RegisterTemporaryL(*fileName));
+
+			aMessage.Complete(err);
+			CleanupStack::PopAndDestroy(fileName);	
+			break;
+			}
+		case ECommit:
+			{
+			RDebug::Print(_L("ServiceL ECommit"));
+			TRAPD(err, iIntegrityServices->CommitL());
+			aMessage.Complete(err);
+			break;
+			}
+		case ERollBack:
+			{
+			RDebug::Print(_L("ServiceL ERollBack"));
+			TBool all;
+			TPckg<TBool> allTransactions(all);
+			aMessage.ReadL(0, allTransactions);
+			TInt error=KErrNone;
+			
+			if(all)
+				{
+				CIntegrityServices::RollbackAllL();
+				}
+			else
+				{
+				TRAPD(err, iIntegrityServices->RollBackL());
+				error=err;
+				}
+			aMessage.Complete(error);
+			
+			break;
+			}
+			
+		case ESetSimulatedFailure:
+			{
+			HBufC16* aFailType = HBufC16::NewLC(256);
+			HBufC16* aPosition = HBufC16::NewLC(256);
+			HBufC16* aFailFileName = HBufC16::NewLC(256);
+			TPtr16 failType(aFailType->Des());
+			TPtr16 position(aPosition->Des());
+			TPtr16 failFileName(aFailFileName->Des());
+			
+			aMessage.ReadL(0, failType);
+			aMessage.ReadL(1, position);
+			aMessage.ReadL(2, failFileName);
+			RDebug::Print(_L("ServiceL ESetSimulatedFailure %S %S %S"), &aFailType, &aPosition, &aFailFileName);
+			TRAPD(err, SetSimulatedFailureL(failType, position, failFileName));
+			aMessage.Complete(err);
+			CleanupStack::PopAndDestroy(3, aFailType);
+			break;
+			}
+		case ECreateNewTestFile:
+			{
+			RDebug::Print(_L("ServiceL ECreateNewTestFile"));
+			HBufC16* fileName = HBufC16::NewLC(aMessage.GetDesLength(0));
+		  	TPtr16 ptr(fileName->Des());
+		  	aMessage.Read(0, ptr);
+
+		  	TRAPD(err, CreateNewTestFileL(*fileName));
+
+			aMessage.Complete(err);
+			CleanupStack::PopAndDestroy(fileName);	
+			break;
+			}
+		case ECreateTempTestFile:
+			{
+			RDebug::Print(_L("ServiceL ECreateTempTestFile"));
+			HBufC16* fileName = HBufC16::NewLC(aMessage.GetDesLength(0));
+		  	TPtr16 ptr(fileName->Des());
+		  	aMessage.Read(0, ptr);
+
+		  	TRAPD(err, CreateTempTestFileL(*fileName));
+
+			aMessage.Complete(err);
+			CleanupStack::PopAndDestroy(fileName);	
+			break;
+			}
+	default:
+		{
+		PanicClient(aMessage, EPanicIntegrityServicesServerIllegalFunction);
+		break;
+		}
+		}
+	}
+
+void CIntegrityServicesSession::ServiceError(const RMessage2& aMessage, TInt aError)
+	{
+	if (aError==KErrBadDescriptor)
+		{
+		PanicClient(aMessage, EPanicIntegrityServicesServerIllegalFunction);
+		}
+	CSession2::ServiceError(aMessage, aError);
+	}
+
+/////
+///// CShutdownTimer
+/////
+inline CShutdownTimer::CShutdownTimer() : CTimer(-1)
+	{
+	CActiveScheduler::Add(this);
+	}
+
+inline void CShutdownTimer::ConstructL()
+	{
+	CTimer::ConstructL();
+	}
+
+inline void CShutdownTimer::Start()
+	{
+	After(KShutdownDelay);
+	}
+
+CShutdownTimer* CShutdownTimer::NewL()
+	{
+	CShutdownTimer* self = new(ELeave) CShutdownTimer();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+// Initiate server exit when the timer expires
+void CShutdownTimer::RunL()
+	{
+	CActiveScheduler::Stop();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swtransactionservices/test/tintegrityservices/source/tintegrityservicesstep.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1487 @@
+/*
+* 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 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file 
+ @test
+ @internalTechnology
+*/
+ 
+#include "tintegrityservicesstep.h"
+#include <s32file.h>
+#include "journal.h"
+#include "journalfile.h"
+
+
+/////////////////////////////////////////////////////////////////////
+// CIntegrityServicesStep
+/////////////////////////////////////////////////////////////////////
+CIntegrityServicesStepBase::CIntegrityServicesStepBase(CStsTestServer &aStsTestServer):CStsBaseTestStep(aStsTestServer)
+	{
+	}
+void CIntegrityServicesStepBase::ImplTestStepPreambleL()
+	{
+	INFO_PRINTF1(_L("CIntegrityServicesStepBase::ImplTestStepPreambleL()"));
+	__UHEAP_MARK;
+
+	// Install an active scheduler
+	CActiveScheduler* s = new (ELeave) CActiveScheduler;
+	s->Install(s);
+	
+	User::LeaveIfError(iIntegritySession.Connect());
+
+	ReadFailureSettingsL();	
+	}
+
+void CIntegrityServicesStepBase::ImplTestStepPostambleL()
+	{
+	INFO_PRINTF1(_L("CIntegrityServicesStepBase::ImplTestStepPostambleL()"));
+	// Remove the installed active scheduler
+	CActiveScheduler* s = CActiveScheduler::Current();
+	s->Install(NULL);
+	delete s;
+
+	iIntegritySession.Close();
+
+__UHEAP_MARKEND;
+
+	
+	}
+
+void CIntegrityServicesStepBase::GetStringArrayFromConfigL(const TDesC& aSectName, const TDesC& aKeyName, RArray<TPtrC>& aArray)
+	{
+	INFO_PRINTF1(_L("CIntegrityServicesStepBase::GetStringArrayFromConfigL()"));
+	_LIT(KKeyFormat, "-%02d");
+	HBufC* buf = HBufC::NewLC(aKeyName.Length() + KKeyFormat().Length());
+	TPtr ptr(buf->Des());
+	INFO_PRINTF2(_L("Parsing attribute: %S"), &aKeyName);
+
+	TInt i = 0;
+	TBool cont = ETrue;
+	do
+		{
+		++i;
+		ptr = aKeyName;
+		ptr.AppendFormat(KKeyFormat(), i);
+		TPtrC val;
+
+		cont = GetStringFromConfig(aSectName, ptr, val);
+		if (cont)
+			{
+			User::LeaveIfError(aArray.Append(val));
+			}
+		} while (cont);
+
+	INFO_PRINTF2(_L("Element count: %d"), i-1);
+	CleanupStack::PopAndDestroy(buf);
+	}
+
+TBool CIntegrityServicesStepBase::CheckFilesL()
+	{
+	INFO_PRINTF1(_L("CIntegrityServicesStepBase::CheckFilesL()"));
+	TInt result = ETrue;
+	RArray<TPtrC> fileArray;
+	CleanupClosePushL(fileArray);
+	
+	GetStringArrayFromConfigL(ConfigSection(), KPresent, fileArray);
+	for (TInt file = 0; file < fileArray.Count();file++)
+		{
+		if(FileExistsL(fileArray[file]))
+			{
+			INFO_PRINTF2(_L("%S was found"), &fileArray[file]);
+			}
+		else
+			{
+			ERR_PRINTF2(_L("%S was not found"), &fileArray[file]);
+			result = EFalse;
+			}
+		}
+	fileArray.Reset();
+	
+	GetStringArrayFromConfigL(ConfigSection(), KAbsent, fileArray);
+	for (TInt file = 0; file < fileArray.Count();file++)
+		{
+		if(FileExistsL(fileArray[file]))
+			{
+			ERR_PRINTF2(_L("%S was found"), &fileArray[file]);
+			result = EFalse;
+			}
+		else
+			{
+			INFO_PRINTF2(_L("%S was not found"), &fileArray[file]);
+			}
+		}
+	fileArray.Reset();
+	CleanupStack::PopAndDestroy(&fileArray);
+	return result;
+	}
+
+void CIntegrityServicesStepBase::ReadFailureSettingsL()
+	{		
+	INFO_PRINTF1(_L("CIntegrityServicesStepBase::ReadFailureSettings()"));
+	TPtrC failType;
+	if(!GetStringFromConfig(ConfigSection(), KFailType, failType))
+		{
+		failType.Set(KNullDesC);
+		}
+		
+	TPtrC failPosition;
+	if(!GetStringFromConfig(ConfigSection(), KFailPosition, failPosition))
+		{
+		failPosition.Set(KNullDesC);
+		}
+		
+	TPtrC failFileName;
+	if(!GetStringFromConfig(ConfigSection(), KFailFileName, failFileName))
+		{
+		failFileName.Set(KNullDesC);
+		}
+	
+	iIntegritySession.SetSimulatedFailureL(failType, failPosition, failFileName);
+	}
+	
+void CIntegrityServicesStepBase::doInstallL()
+	{
+	INFO_PRINTF1(_L("CIntegrityServicesStepBase::doInstallL()"));
+	RArray<TPtrC> fileArray;
+	CleanupClosePushL(fileArray);
+	
+	GetStringArrayFromConfigL(ConfigSection(), KRemoveFile, fileArray);
+	for (TInt file = 0; file < fileArray.Count();file++)
+		{
+		INFO_PRINTF2(_L("RemovingFile: %S"), &fileArray[file]);
+		
+		iIntegritySession.RemoveL(fileArray[file]);
+		}
+	fileArray.Reset();
+	
+	
+	GetStringArrayFromConfigL(ConfigSection(), KAddFile, fileArray);
+	for (TInt file = 0; file < fileArray.Count();file++)
+		{
+		INFO_PRINTF2(_L("AddingFile: %S"), &fileArray[file]);
+		iIntegritySession.AddL(fileArray[file]);
+		iIntegritySession.CreateNewTestFileL(fileArray[file]);
+		}
+	fileArray.Reset();
+
+	GetStringArrayFromConfigL(ConfigSection(), KTempFile, fileArray);
+	for (TInt file = 0; file < fileArray.Count();file++)
+		{
+		INFO_PRINTF2(_L("TemporaryFile: %S"), &fileArray[file]);
+		iIntegritySession.TemporaryL(fileArray[file]);
+		iIntegritySession.CreateTempTestFileL(fileArray[file]);
+		}
+	fileArray.Reset();
+
+	RArray<TPtrC> operationArray;
+	CleanupClosePushL(operationArray);
+	
+	GetStringArrayFromConfigL(ConfigSection(), KArbitraryOpFile, fileArray);
+	GetStringArrayFromConfigL(ConfigSection(), KOperation, operationArray);
+	TInt fileCount = fileArray.Count();
+	
+	if (fileCount != operationArray.Count())
+		{
+		ERR_PRINTF3(_L("Number of files (%d) does not match number of operations (%d)"), fileCount, operationArray.Count());
+		SetTestStepResult(EFail);
+		}
+	else
+		{
+		for (TInt file = 0; file < fileCount;file++)
+			{
+			if (operationArray[file].CompareF(KAddFile) == 0)
+				{
+				INFO_PRINTF2(_L("AddingFile: %S"), &fileArray[file]);
+				iIntegritySession.AddL(fileArray[file]);
+				iIntegritySession.CreateNewTestFileL(fileArray[file]);
+				}
+			else if (operationArray[file].CompareF(KRemoveFile) == 0)
+				{
+				INFO_PRINTF2(_L("RemovingFile: %S"), &fileArray[file]);
+				iIntegritySession.RemoveL(fileArray[file]);
+				}
+			else if (operationArray[file].CompareF(KTempFile) == 0)
+				{
+				INFO_PRINTF2(_L("TemporaryFile: %S"), &fileArray[file]);
+				iIntegritySession.TemporaryL(fileArray[file]);
+				iIntegritySession.CreateTempTestFileL(fileArray[file]);
+				}
+			else
+				{
+				ERR_PRINTF3(_L("Operation %S not understood, skipping file %S"), &operationArray[file], &fileArray[file]);
+				}
+			}
+		}
+	CleanupStack::PopAndDestroy(2, &fileArray);
+	
+	iIntegritySession.CommitL();
+	}
+
+void CIntegrityServicesStepBase::doRecoverL()
+	{
+	INFO_PRINTF1(_L("CIntegrityServicesStepBase::doRecoverL()"));
+	iIntegritySession.RollBackL(EFalse);
+	}
+
+void CIntegrityServicesStepBase::doCleanupL()
+	{
+	
+	INFO_PRINTF1(_L("CIntegrityServicesStepBase::doCleanupL()"));
+	RArray<TPtrC> fileArray;
+	CleanupClosePushL(fileArray);
+	
+	GetStringArrayFromConfigL(ConfigSection(), KCleanupFile, fileArray);
+	for (TInt file = 0; file < fileArray.Count();file++)
+		{
+		TRAPD(err, DeleteFileL(fileArray[file]));
+		if(err != KErrNone && err != KErrPathNotFound && err != KErrNotFound)
+			{
+			User::Leave(err);
+			}
+		}
+	fileArray.Reset();
+	GetStringArrayFromConfigL(ConfigSection(), KCleanupDirectory, fileArray);
+	for (TInt file = 0; file < fileArray.Count();file++)
+		{
+		TRAPD(err, DeleteFileL(fileArray[file]));
+		if(err != KErrNone && err != KErrPathNotFound && err != KErrNotFound)
+			{
+			User::Leave(err);
+			}
+		}
+	fileArray.Reset();
+	CleanupStack::PopAndDestroy(&fileArray);
+	}
+
+/////////////////////////////////////////////////////////////////////
+// CInstallStep
+/////////////////////////////////////////////////////////////////////
+CInstallStep::CInstallStep(CStsTestServer &aStsTestServer):CIntegrityServicesStepBase(aStsTestServer)
+	{
+	SetTestStepName(KInstall);
+	}
+
+void CInstallStep::ImplTestStepL()
+	{
+	INFO_PRINTF1(_L("CInstallStep::ImplTestStepL()"));
+	TRAPD(err, doInstallL());
+	
+	if(err == KErrNone || err == KIntegrityServicesSimulatedBatteryFailure)
+		{
+		if(CheckFilesL())
+			{
+			SetTestStepResult(EPass);
+			}
+		else
+			{
+			SetTestStepResult(EFail);
+			}
+		}
+	else
+		{
+		User::Leave(err);
+		}
+	
+	}
+
+/////////////////////////////////////////////////////////////////////
+// CRecoverStep
+/////////////////////////////////////////////////////////////////////
+CRecoverStep::CRecoverStep(CStsTestServer &aStsTestServer):CIntegrityServicesStepBase(aStsTestServer)
+	{
+	SetTestStepName(KRecover);
+	}
+
+void CRecoverStep::ImplTestStepL()
+	{
+	INFO_PRINTF1(_L("CRecoverStep::ImplTestStepL()"));
+	// begin recovery
+	TRAPD(err, doRecoverL());
+	
+	if(err == KErrNone || err == KIntegrityServicesSimulatedBatteryFailure)
+		{
+		if(CheckFilesL())
+			{
+			SetTestStepResult(EPass);
+			}
+		else
+			{
+			SetTestStepResult(EFail);
+			}
+		}
+	else
+		{
+		User::Leave(err);
+		}
+
+	
+	}
+
+/////////////////////////////////////////////////////////////////////
+// CCleanupStep
+/////////////////////////////////////////////////////////////////////
+CCleanupStep::CCleanupStep(CStsTestServer &aStsTestServer):CIntegrityServicesStepBase(aStsTestServer)
+	{
+	SetTestStepName(KCleanup);
+	}
+
+void CCleanupStep::ImplTestStepL()
+	{
+	INFO_PRINTF1(_L("CCleanupStep::ImplTestStepL()"));
+	doCleanupL();
+	
+	SetTestStepResult(EPass);
+	
+	}
+
+/////////////////////////////////////////////////////////////////////
+// CRecoverStep
+/////////////////////////////////////////////////////////////////////
+CCheckStep::CCheckStep(CStsTestServer &aStsTestServer):CIntegrityServicesStepBase(aStsTestServer)
+	{
+	SetTestStepName(KCheck);
+	}
+
+void CCheckStep::ImplTestStepL()
+	{
+	INFO_PRINTF1(_L("CCheckStep::ImplTestStepL()"));
+	// Just check for files
+	if(CheckFilesL())
+		{
+		SetTestStepResult(EPass);
+		}
+	else
+		{
+		SetTestStepResult(EFail);
+		}
+		
+	
+	}
+
+
+//---------- new unit tests developed as part of the STS framework ----------
+using namespace Usif;
+
+//define event names for logging purposes (used in journal file unit tests and journal unit tests	
+_LIT(KENone, "ENone");
+_LIT(KERemovedFile,"ERemovedFile");
+_LIT(KEBackupFile,"EBackupFile");
+_LIT(KETempFile,"ETempFile");
+_LIT(KEAddedFile,"EAddedFile");
+_LIT(KECommitted,"ECommitted");
+_LIT(KEBackupFilesRemoved,"EBackupFilesRemoved");
+_LIT(KEAddedFilesRemoved,"EAddedFilesRemoved");
+_LIT(KERemovedFilesRestored,"ERemovedFilesRestored");
+_LIT(KETempFilesRemoved, "ETempFilesRemoved");
+	
+
+const TDesC* eventNames[] = {
+				&KENone,
+				&KERemovedFile,
+				&KEBackupFile,
+				&KETempFile,
+				&KEAddedFile,
+				&KECommitted,
+				&KEBackupFilesRemoved,
+				&KEAddedFilesRemoved,
+				&KERemovedFilesRestored,
+				&KETempFilesRemoved
+				};
+
+
+const TFileMode defaultJournalFileMode = TFileMode (TFileMode(EFileWrite) | TFileMode(EFileShareAny));
+
+CJournalFileUnitTest::CJournalFileUnitTest(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KJournalFileUnitTest);
+	}
+
+CJournalFileUnitTest::~CJournalFileUnitTest()
+	{
+	delete testJournalFile;
+	iFs.Close();
+	iLoader.Close();
+	}
+
+
+void CJournalFileUnitTest::ImplTestStepPreambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("JournalFileUnitTest Preamble"));
+	User::LeaveIfError(iFs.Connect());
+	User::LeaveIfError(iLoader.Connect());
+	testJournalFile = CTestFile::NewL(iFs);
+	SetTestStepResult(EPass);
+	
+	}
+
+void CJournalFileUnitTest::ImplTestStepL()
+/**
+ @return - void code
+ Override of base class pure virtual
+ */
+	{
+	INFO_PRINTF1(_L("JournalFileUnitTest in test step"));
+	SetTestStepResult(EPass);
+	
+	TPtrC journalFilePathInIni = GetTargetFilePathFromConfigL();
+	TParsePtrC journalFilePathParse(journalFilePathInIni);
+	TDriveUnit journaldrive(journalFilePathParse.Drive());
+	HBufC* targetFileName = HBufC::NewLC(KMaxFileName);
+	HBufC* backupFileName = HBufC::NewLC(KMaxFileName);
+	
+	CJournalFile* journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+
+	//feed incorrect file to the journalfile (ie: file's on other drive)
+	TPtr targetFileNameBasePtr(targetFileName->Des());
+	targetFileNameBasePtr.Append(TDriveUnit(journaldrive+1).Name());
+	targetFileNameBasePtr.Append(journalFilePathParse.Path());
+
+	TPtr targetFileNamePtr(targetFileNameBasePtr);
+	targetFileNamePtr.Append(_L("dummyadd.txt"));
+
+	TPtr targetBackupFileNamePtr(backupFileName->Des());
+
+	TInt err(0);
+	
+	TInt seekPosition(0);
+	TInt seekToEndPosition(0);
+	TIntValue intValue = {0};
+	TIntValue extraByte = {0xFF};
+
+	TRAP(err, journalFile->AddL(targetFileNamePtr));
+	if(err!=KErrBadName)
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournalFile::AddL() returned incorrect error code. KErrBadName is expected %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+	targetFileNamePtr.Set(targetFileNameBasePtr);
+	targetFileNamePtr.Append(_L("dummytemp.txt"));
+	TRAP(err, journalFile->TemporaryL(targetFileNamePtr));
+	if(err!=KErrBadName)
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournalFile::RemoveL() returned incorrect error code. KErrBadName is expected %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+
+	targetFileNamePtr.Set(targetFileNameBasePtr);
+	targetFileNamePtr.Append(_L("dummyremove.txt"));
+	TRAP(err, journalFile->RemoveL(targetFileNamePtr, targetBackupFileNamePtr));
+	if(err!=KErrBadName)
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournalFile::RemoveL() returned incorrect error code. KErrBadName is expected %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+
+	*targetFileName = KEmptyString;
+	targetFileNameBasePtr.Set(targetFileName->Des());
+	targetFileNameBasePtr.Append(journalFilePathParse.DriveAndPath());
+
+	CleanupStack::PopAndDestroy(journalFile);
+	DeleteFileL(journalFilePathInIni);	
+//-------------------------------------------------------------------------------------	
+//Steps: 
+//	1.) create a CJournalFile object
+//	2.) set last event by invoking CJournalFile::EventL() (this sets the iLastEvent as well as writes the event value to the journal file on disk)
+//	3.) destroy object 
+//	4.) corrupt information by overwriting the event value in the file to requested invalid value
+//	5.) recreate CjournalFile object -> this will trigger CJournalFile::ReadEntryL
+//  note: the purpose of this testcase to excersise the main switch-case in CJournalFile::ReadEntryL		
+//-------------------------------------------------------------------------------------
+	
+	TIntegrityServicesEvent eventsToSet[] = {ERemovedFile, 
+											 EBackupFile, 
+											 ETempFile,
+											 EAddedFile,
+											 ECommitted,
+											 EBackupFilesRemoved,
+											 EAddedFilesRemoved,
+											 //ETempFilesRemoved,
+											 ERemovedFilesRestored,
+											 };
+	TInt numOfInvalidEvents[] = {6, //number of invalid events for ERemovedFile
+								 1, //number of invalid events for EBackupFile
+								 6, //number of invalid events for ETempFile
+								 6, //number of invalid events for EAddedFile
+								 7, //number of invalid events for ECommitted
+								 9, //number of invalid events for EBackupFilesRemoved
+								 6, //number of invalid events for EAddedFilesRemoved
+								 //ETempFilesRemoved
+								 9 //number of invalid events for ERemovedFilesRestored
+	                             };
+	TIntegrityServicesEvent invalidEvents[][10] = {{EBackupFile, ECommitted, EBackupFilesRemoved, EAddedFilesRemoved, ERemovedFilesRestored, ETempFilesRemoved}, //invalid events for ERemovedFile
+			                                        {EBackupFile}, //invalid events for EBackupFile, this is not really invalid value for EBackupFile, actually EBackupFile itself is invalid on its own in the file
+													{EBackupFile, ECommitted, EBackupFilesRemoved, EAddedFilesRemoved, ERemovedFilesRestored, ETempFilesRemoved}, //invalid events for ETempFile
+													{EBackupFile, ECommitted, EBackupFilesRemoved, EAddedFilesRemoved, ERemovedFilesRestored, ETempFilesRemoved}, //invalid events for EAddedFile
+													{ENone, EBackupFile, ECommitted, EBackupFilesRemoved, EAddedFilesRemoved, ERemovedFilesRestored, ETempFilesRemoved}, //invalid events for ECommitted
+													{ENone, ERemovedFile, EBackupFile, ETempFile, EAddedFile, EBackupFilesRemoved, EAddedFilesRemoved, ERemovedFilesRestored, ETempFilesRemoved}, //invalid events for EBackupFilesRemoved
+													{ENone, EBackupFile, EBackupFilesRemoved, EAddedFilesRemoved, ERemovedFilesRestored, ETempFilesRemoved}, //invalid events for EAddedFilesRemoved
+													//{}, //invalid events for ETempFilesRemoved
+													{ENone, ERemovedFile, EBackupFile, ETempFile, EAddedFile, ECommitted, EBackupFilesRemoved, ETempFilesRemoved, ERemovedFilesRestored} //invalid events for ERemovedFilesRestored
+	                                               };
+	
+	ASSERT(sizeof(eventsToSet)/sizeof(TIntegrityServicesEvent) == sizeof(numOfInvalidEvents)/sizeof(TInt) == sizeof(invalidEvents)/(sizeof(TIntegrityServicesEvent)*10));
+	for (TInt i=0; i<sizeof(eventsToSet)/sizeof(TIntegrityServicesEvent); ++i)
+	{
+	for(TInt j=0; j<numOfInvalidEvents[i]; ++j)
+		{
+		journalFile=0;
+		journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+		journalFile->EventL(invalidEvents[i][j]); //set last event to any of the requested invalid events (also writes it to jounral file)
+		CleanupStack::PopAndDestroy(journalFile);
+		intValue.int32 = static_cast<TInt32>(eventsToSet[i]);
+		seekPosition=0;
+		OpenJournalFileL(journalFilePathInIni, defaultJournalFileMode);
+		SeekInJournalFileL(ESeekStart, seekPosition);
+		WriteIntToJournalFileL(intValue, Mode32Bit); //write the requested event to journal file (overwrites last event set by EventL())
+		seekToEndPosition=0;
+		SeekInJournalFileL(ESeekEnd, seekToEndPosition);
+		WriteIntToJournalFileL(extraByte, Mode8Bit);
+		CloseJournalFile();
+		//force a Sync and catch the error that should be KErrCorrupt
+		journalFile=0;
+		TRAPD(err, 
+				journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+				CleanupStack::PopAndDestroy(journalFile);
+				);
+		if(err!=KErrCorrupt)
+			{
+			ERR_PRINTF4(_L("<font color=red>CJournalFile::SynchL() returned incorrect error code. KErrCorrupt is expected and %d is returned! Conditions: last event set via EventL(): %S  Event written into journal file: %S</font>"), err, eventNames[invalidEvents[i][j]], eventNames[eventsToSet[i]]);
+			SetTestStepResult(EFail);
+			}
+		DeleteFileL(journalFilePathInIni);
+		}
+	}	
+//-------------------------------------------------------------------------------------	
+//Steps: 
+//	1.) create a journal file using CJournalFile::NewLC
+//  2.) add an item via AddL() or TemporaryL()	
+//	2.) corrupt disk information in the filename written into the file
+//	3.) try to recreate journal object using CJournalFile::NewLC
+//	4.) expect KErrCorrupt
+//-------------------------------------------------------------------------------------
+
+	targetFileNamePtr.Set(targetFileNameBasePtr);
+	targetFileNamePtr.Append(_L("dummyadd_or_temp.txt"));
+	for(TInt i=0; i<2; i++)
+		{
+		//create a journal file and add an item via AddL() or TemporaryL()
+		journalFile=0;
+		journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+		if(i==0)
+			{
+			journalFile->AddL(targetFileNamePtr);
+			}
+		else if(i==1)
+			{
+			journalFile->TemporaryL(targetFileNamePtr);
+			}
+		CleanupStack::PopAndDestroy(journalFile);
+		//open journal file and corrupt it by overwriting the drive letter in the file's path
+		seekPosition=sizeof(TInt32)+1;
+		OpenJournalFileL(journalFilePathInIni, defaultJournalFileMode);
+		SeekInJournalFileL(ESeekStart, seekPosition);
+		intValue = ReadIntFromJournalFileL(Mode8Bit);
+		intValue.int8++; //corrupt drive letter (ie: 'c' ==> 'd')
+		SeekInJournalFileL(ESeekStart, seekPosition);
+		WriteIntToJournalFileL(intValue, Mode8Bit);
+		CloseJournalFile();
+		//check that CJournalFile recognizes corruption
+		journalFile=0;
+		TRAP(err, 
+				  journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+		          CleanupStack::PopAndDestroy(journalFile);
+			 );
+		if(err!=KErrCorrupt)
+			{
+			ERR_PRINTF2(_L("<font color=red>CJournalFile::NewL() returned incorrect error code. KErrCorrupt is expected and %d is returned!</font>"), err);
+			SetTestStepResult(EFail);
+			}
+		DeleteFileL(journalFilePathInIni);
+		}
+//-------------------------------------------------------------------------------------	
+//Steps: 
+//	1.) create a journal file using CJournalFile::NewLC
+//  2.) add an item via RemoveyL()	
+//	2.) corrupt disk information in various ways in the file
+//	3.) try to recreate journal object using CJournalFile::NewL
+//	4.) expect KErrCorrupt
+//-------------------------------------------------------------------------------------
+
+	journalFile=0;
+	journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+	targetFileNamePtr.Set(targetFileNameBasePtr);
+	targetFileNamePtr.Append(_L("dummyremove.txt"));
+	journalFile->RemoveL(targetFileNamePtr, targetBackupFileNamePtr);
+	CleanupStack::PopAndDestroy(journalFile);
+
+	OpenJournalFileL(journalFilePathInIni, defaultJournalFileMode);
+	seekPosition=sizeof(TInt32)+1+targetFileNamePtr.Length();
+	SeekInJournalFileL(ESeekStart, seekPosition);
+	intValue.int32 = static_cast<TInt32>(EAddedFile); //corrupt operation: originally EBackupFile is recorded here
+	WriteIntToJournalFileL(intValue, Mode32Bit);
+	
+	//check that CJournalFile recognizes corruption
+	journalFile=0;
+	TRAP(err, 
+			journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+    		CleanupStack::PopAndDestroy(journalFile);
+		);
+	if(err!=KErrCorrupt)
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournalFile::NewL() returned incorrect error code. KErrCorrupt is expected and %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+
+	SeekInJournalFileL(ESeekStart, seekPosition);
+	intValue.int32 = static_cast<TInt32>(EBackupFile); //restore original record
+	WriteIntToJournalFileL(intValue, Mode32Bit);
+
+	//check that journal file is not corrupted
+	journalFile=0;
+	TRAP(err, 
+			journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+    		CleanupStack::PopAndDestroy(journalFile);
+		);
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournalFile::NewL() returned incorrect error code. KErrNone is expected and %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+
+	seekPosition=sizeof(TInt32)+1;
+	SeekInJournalFileL(ESeekStart, seekPosition);
+	intValue = ReadIntFromJournalFileL(Mode8Bit); //read first file's drive letter
+	intValue.int8++; //corrupt drive letter (ie: 'c' ==> 'd')
+	SeekInJournalFileL(ESeekStart, seekPosition);
+	WriteIntToJournalFileL(intValue, Mode8Bit); //write corrupt drive letter to file
+
+	//check that CJournalFile recognizes corruption
+	journalFile=0;
+	TRAP(err, 
+			journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+    		CleanupStack::PopAndDestroy(journalFile);
+		);
+	if(err!=KErrCorrupt)
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournalFile::NewL() returned incorrect error code. KErrCorrupt is expected and %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+
+	intValue.int8--; //restore original drive letter
+	SeekInJournalFileL(ESeekStart, seekPosition);
+	WriteIntToJournalFileL(intValue, Mode8Bit); //write original drive letter to file
+
+		
+	//check that journal file is not corrupted
+	journalFile=0;
+	TRAP(err, 
+			journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+    		CleanupStack::PopAndDestroy(journalFile);
+		);
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournalFile::NewL() returned incorrect error code. KErrNone is expected and %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+
+	seekPosition=sizeof(TInt32)+1+targetFileNamePtr.Length()+sizeof(TInt32)+1;
+	SeekInJournalFileL(ESeekStart, seekPosition);
+	intValue = ReadIntFromJournalFileL(Mode8Bit); //read second file's drive letter (backup file name)
+	intValue.int8++; //corrupt drive letter (ie: 'c' ==> 'd')
+	SeekInJournalFileL(ESeekStart, seekPosition);
+	WriteIntToJournalFileL(intValue, Mode8Bit); //write corrupt drive letter to file
+
+	
+	//check that CJournalFile recognizes corruption
+	journalFile=0;
+	TRAP(err, 
+			journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+    		CleanupStack::PopAndDestroy(journalFile);
+		);
+	if(err!=KErrCorrupt)
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournalFile::NewL() returned incorrect error code. KErrCorrupt is expected and %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+	
+	intValue.int8--; //restore original drive letter
+	SeekInJournalFileL(ESeekStart, seekPosition);
+	WriteIntToJournalFileL(intValue, Mode8Bit); //write original drive letter to file
+
+	//check that journal file is not corrupted
+	journalFile=0;
+	TRAP(err, 
+			journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+    		CleanupStack::PopAndDestroy(journalFile);
+		);
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournalFile::NewL() returned incorrect error code. KErrNone is expected and %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+	CloseJournalFile();
+	INFO_PRINTF1(_L("Deleting journal file - Line 769"));
+	DeleteFileL(journalFilePathInIni);
+
+	
+	CreateJournalFileL(journalFilePathInIni, TFileMode(TFileMode(EFileWrite) | TFileMode(EFileShareExclusive)));
+	journalFile=0;
+	TRAP(err, 
+			journalFile = CJournalFile::NewLC(iFs, iLoader, journalFilePathInIni, journaldrive);
+    		CleanupStack::PopAndDestroy(journalFile);
+		);
+	if(err!=KErrInUse )
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournalFile::NewL() returned incorrect error code. KErrInUse is expected and %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+	CloseJournalFile();
+	INFO_PRINTF1(_L("Deleting journal file - Line 783"));
+	DeleteFileL(journalFilePathInIni);
+
+	CleanupStack::PopAndDestroy(2, targetFileName);
+	}
+
+void CJournalFileUnitTest::ImplTestStepPostambleL()
+/**
+ @return - void code
+ Override of base class virtual
+ */
+	{
+	INFO_PRINTF1(_L("JournalFileUnitTest Postamble"));
+	delete testJournalFile;
+	testJournalFile=0;
+	iFs.Close();
+	iLoader.Close();
+	}
+
+void CJournalFileUnitTest::OpenJournalFileL(const TDesC& aFileName, TFileMode aMode)
+	{
+	testJournalFile->OpenJournalFileL(aFileName, aMode);
+	}
+
+void CJournalFileUnitTest::CreateJournalFileL(const TDesC& aFileName, TFileMode aMode)
+	{
+	testJournalFile->CreateJournalFileL(aFileName, aMode);
+	}
+
+void CJournalFileUnitTest::SeekInJournalFileL(TSeek aSeekMode, TInt &aPos)
+	{
+	testJournalFile->SeekInJournalFileL(aSeekMode, aPos);
+	}
+
+TIntValue CJournalFileUnitTest::ReadIntFromJournalFileL(TIntMode mode)
+	{
+	return testJournalFile->ReadIntFromJournalFileL(mode);
+	}
+
+void CJournalFileUnitTest::CloseJournalFile()
+	{
+	testJournalFile->CloseJournalFile();
+	}
+
+void CJournalFileUnitTest::WriteIntToJournalFileL(TIntValue value, TIntMode mode)
+	{
+	testJournalFile->WriteIntToJournalFileL(value, mode);
+	}
+
+
+
+/*static*/ CTestFile* CTestFile::NewL(RFs& aFs)
+	{
+	CTestFile* self = new(ELeave) CTestFile(aFs);
+	return self;
+	}
+
+CTestFile::CTestFile(RFs& aFs): iFs(aFs)
+	{
+	
+	}
+
+CTestFile::~CTestFile()
+	{
+	CloseJournalFile();
+	}
+
+void CTestFile::OpenJournalFileL(const TDesC& aFileName, TFileMode aMode)
+	{
+	TInt err = journalFile.Open(iFs, aFileName, aMode);
+	User::LeaveIfError(err);
+	}
+
+void CTestFile::CreateJournalFileL(const TDesC& aFileName, TFileMode aMode)
+	{
+	TInt err = iFs.MkDirAll(aFileName);
+	if(err != KErrNone && err != KErrAlreadyExists)
+		{
+		User::Leave(err);
+		}
+	err = journalFile.Create(iFs, aFileName, aMode);
+	User::LeaveIfError(err);
+	}
+
+void CTestFile::CloseJournalFile()
+	{
+	journalFile.Close();
+	}
+
+void CTestFile::WriteIntToJournalFileL(TIntValue value, TIntMode mode)
+	{
+	HBufC8* fileIOBuffer = HBufC8::NewLC(10);
+	TPtr8  fileIOBufferPtr(fileIOBuffer->Des());
+	TPckgC<TInt32> pckg(value.int32);
+	
+	switch(mode)
+		{
+		case Mode8Bit:
+		case Mode16Bit:
+		case Mode32Bit:
+			fileIOBufferPtr.Append(pckg);
+			User::LeaveIfError(journalFile.Write(fileIOBufferPtr, static_cast<TInt>(mode)));
+			break;
+		default:
+			User::Leave(KErrArgument);
+			break;
+		}
+	
+	CleanupStack::PopAndDestroy(fileIOBuffer);
+	}
+
+TIntValue CTestFile::ReadIntFromJournalFileL(TIntMode mode)
+	{
+	HBufC8* fileIOBuffer = HBufC8::NewLC(10);
+	TPtr8  fileIOBufferPtr(fileIOBuffer->Des());
+	User::LeaveIfError(journalFile.Read(fileIOBufferPtr, static_cast<TInt>(mode)));
+	TIntValue ret = {0};
+	
+	switch(mode)
+		{
+		case Mode8Bit: 
+		case Mode16Bit:
+		case Mode32Bit:
+			{
+			for(TInt i=0; i<static_cast<TInt>(mode); ++i)
+				{
+				ret.int32 |=  TInt32((*fileIOBuffer)[i]) << (8*i);
+				}
+			break;
+			}
+		default:
+			User::Leave(KErrArgument);
+			break;
+		}
+	CleanupStack::PopAndDestroy(fileIOBuffer);
+	return ret;
+	}
+	
+void CTestFile::SeekInJournalFileL(TSeek aSeekMode, TInt &aPos)
+	{
+	User::LeaveIfError(journalFile.Seek(aSeekMode, aPos));
+	}
+
+
+
+//------------------------------------------------------------------------------------------------------------
+
+CJournalFileUnitTestScenarioBase::CJournalFileUnitTestScenarioBase(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer), iCleanupNeeded(ETrue)
+	{
+	}
+
+CJournalFileUnitTestScenarioBase::~CJournalFileUnitTestScenarioBase()
+	{
+	iFs.Close();
+	iLoader.Close();
+	delete iTargetFileName;
+	delete iBackupFileName;
+	}
+
+
+void CJournalFileUnitTestScenarioBase::ImplTestStepPreambleL()
+	{
+	INFO_PRINTF1(_L("CJournalFileUnitTestScenarioBase Preamble"));
+	iJournalFileName.Set(GetTargetFilePathFromConfigL());
+	User::LeaveIfError(iFs.Connect());
+	User::LeaveIfError(iLoader.Connect());
+	iTargetFileName = HBufC::NewL(KMaxFileName);
+	iBackupFileName = HBufC::NewL(KMaxFileName);
+	TParsePtrC journalFilePathParse(iJournalFileName);
+	TPtr ptr(iTargetFileName->Des());
+	ptr.Append(journalFilePathParse.DriveAndPath());
+	ptr.Append(_L("journalfile_oom_test_dummyfile.txt"));
+	iJournaldrive = journalFilePathParse.Drive();
+	SetTestStepResult(EPass);
+	
+	}
+
+void CJournalFileUnitTestScenarioBase::ImplTestStepL()
+	{
+	CleanupStack::PushL(TCleanupItem(&CJournalFileUnitTestScenarioBase::InTestCleanup, this));
+	ImplTestCaseScenarioL();
+	CleanupStack::PopAndDestroy(this);
+	}
+
+void CJournalFileUnitTestScenarioBase::ImplTestStepPostambleL()
+	{
+	INFO_PRINTF1(_L("CJournalFileUnitTestScenarioBase Postamble"));
+	
+	delete iTargetFileName; 
+	iTargetFileName=0;
+	delete iBackupFileName; 
+	iBackupFileName=0;
+	iFs.Close();
+	iLoader.Close();
+	TRAP_IGNORE(DeleteFileL(iJournalFileName));
+	}
+
+/*static*/void CJournalFileUnitTestScenarioBase::InTestCleanup(TAny* aObject)
+	{
+	CJournalFileUnitTestScenarioBase* object=static_cast<CJournalFileUnitTestScenarioBase*>(aObject);
+	object->INFO_PRINTF1(_L("CJournalFileUnitTestScenarioBase::InTestCleanup()"));
+	if(object->iCleanupNeeded)
+		{
+		TRAP_IGNORE(object->DeleteFileL(object->iJournalFileName));
+		}
+	}
+
+//------------------------------------------------------------------------------------------------------------
+CJournalFileUnitTestAdd::CJournalFileUnitTestAdd(CStsTestServer &aStsTestServer): CJournalFileUnitTestScenarioBase(aStsTestServer)
+	{
+	SetTestStepName(KJournalFileUnitTestAdd);
+	}
+void CJournalFileUnitTestAdd::ImplTestCaseScenarioL()
+	{
+	INFO_PRINTF1(_L("CJournalFileUnitTestAdd in test step"));
+	CJournalFile* journalFile = CJournalFile::NewLC(iFs, iLoader, iJournalFileName, iJournaldrive);
+	journalFile->AddL(*iTargetFileName);
+	CleanupStack::PopAndDestroy(journalFile);
+	}
+//------------------------------------------------------------------------------------------------------------
+CJournalFileUnitTestTemp::CJournalFileUnitTestTemp(CStsTestServer &aStsTestServer): CJournalFileUnitTestScenarioBase(aStsTestServer)
+	{
+	SetTestStepName(KJournalFileUnitTestTemp);
+	}
+
+void CJournalFileUnitTestTemp::ImplTestCaseScenarioL()
+	{
+	INFO_PRINTF1(_L("CJournalFileUnitTestTemp in test step"));
+	CJournalFile* journalFile = CJournalFile::NewLC(iFs, iLoader, iJournalFileName, iJournaldrive);
+	journalFile->TemporaryL(*iTargetFileName);
+	CleanupStack::PopAndDestroy(journalFile);
+	}
+
+//------------------------------------------------------------------------------------------------------------
+CJournalFileUnitTestRemove::CJournalFileUnitTestRemove(CStsTestServer &aStsTestServer): CJournalFileUnitTestScenarioBase(aStsTestServer)
+	{
+	SetTestStepName(KJournalFileUnitTestRemove);
+	}
+
+void CJournalFileUnitTestRemove::ImplTestCaseScenarioL()
+	{
+	INFO_PRINTF1(_L("CJournalFileUnitTestRemove in test step"));
+	TPtr backupFileNamePtr(iBackupFileName->Des());
+	CJournalFile* journalFile = CJournalFile::NewLC(iFs, iLoader, iJournalFileName, iJournaldrive);
+	journalFile->RemoveL(*iTargetFileName, backupFileNamePtr);
+	CleanupStack::PopAndDestroy(journalFile);
+	}
+//------------------------------------------------------------------------------------------------------------
+CJournalFileUnitTestRead::CJournalFileUnitTestRead(CStsTestServer &aStsTestServer): CJournalFileUnitTestScenarioBase(aStsTestServer)
+	{
+	iCleanupNeeded=EFalse;
+	SetTestStepName(KJournalFileUnitTestRead);
+	}
+
+void CJournalFileUnitTestRead::ImplTestCaseScenarioL()
+	{
+	INFO_PRINTF1(_L("CJournalFileUnitTestRead in test step"));
+	CJournalFile* journalFile = CJournalFile::NewLC(iFs, iLoader, iJournalFileName, iJournaldrive);
+	CleanupStack::PopAndDestroy(journalFile);
+	}
+//------------------------------------------------------------------------------------------------------------
+CJournalFileUnitTestEvent::CJournalFileUnitTestEvent(CStsTestServer &aStsTestServer): CJournalFileUnitTestScenarioBase(aStsTestServer)
+	{
+	}
+
+void CJournalFileUnitTestEvent::ImplTestCaseScenarioL()
+	{
+	INFO_PRINTF1(_L("CJournalFileUnitTestEvent in test step"));
+	CJournalFile* journalFile = CJournalFile::NewLC(iFs, iLoader, iJournalFileName, iJournaldrive);
+	journalFile->EventL(ECommitted);
+	CleanupStack::PopAndDestroy(journalFile);
+	}
+//------------------------------------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------------------------------------
+CJournalUnitTest::CJournalUnitTest(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KJournalUnitTest);
+	}
+
+CJournalUnitTest::~CJournalUnitTest()
+	{
+	delete iTestFileInterface;
+	iFs.Close();
+	iLoader.Close();
+	}
+
+void CJournalUnitTest::ImplTestStepPreambleL()
+	{
+	INFO_PRINTF1(_L("JournalFileUnitTest Preamble"));
+	iJournalPathInIni.Set(GetTargetFilePathFromConfigL());
+	iTrID = GetTransactionIdFromConfigL();
+	User::LeaveIfError(iFs.Connect());
+	User::LeaveIfError(iLoader.Connect());
+	iTestFileInterface = CTestFile::NewL(iFs);
+	SetTestStepResult(EPass);
+	
+	}
+
+void CJournalUnitTest::ImplTestStepL()
+	{
+	INFO_PRINTF1(_L("JournalUnitTest in test step"));
+	SetTestStepResult(EPass);
+	TestCase1L();
+	}
+
+void CJournalUnitTest::ImplTestStepPostambleL()
+	{
+	INFO_PRINTF1(_L("JournalFileUnitTest Postamble"));
+	delete iTestFileInterface;
+	iTestFileInterface=0;
+	iFs.Close();
+	iLoader.Close();
+	}
+
+void CJournalUnitTest::TestCase1L()
+	{
+	INFO_PRINTF1(_L("JournalFileUnitTest Test Case1"));
+
+//-------------------------------------------------------------------------------------	
+//Steps: 
+//	1.) create a corrupt journal file on C drive (by writing invalid event into the file /eg: with a value of EAddedFile+1000/) 
+//	2.) Create a journal
+//	3.) Add a file to the journal on C drive by invoking CJounral::AddL() 
+//	4.) this will create a new journal file object representing journal activity on drive C, however due to the corrupt file being already on the C drive CJournalFile::NewLC will throw KErrCorrupt
+//  5.) expect KErrCorrupt	
+//  note: the purpose of this testcase to excersise the conditional branches in CJournal::PrepareToWriteL		
+//-------------------------------------------------------------------------------------
+	
+	TInt err=0;
+	TDriveUnit driveUnitC(KDriveLetterC);
+	TDriveUnit driveUnitE(KDriveLetterE);
+	
+	
+	HBufC* journalFileName = HBufC::NewLC(KMaxFileName);
+	HBufC* targetFileName = HBufC::NewLC(KMaxFileName);
+	
+	TPtr journalFileNamePtr(journalFileName->Des());
+	journalFileNamePtr.Append(driveUnitC.Name());
+	CJournal::CreateJournalFileNameL(iTrID, iJournalPathInIni, journalFileNamePtr); 
+	
+	//create file path base (eg: drive:\path\)
+	TPtr targetFileNameBasePtr(targetFileName->Des());
+	targetFileNameBasePtr.Append(driveUnitC.Name());
+	targetFileNameBasePtr.Append(iJournalPathInIni);
+	
+	//open up the file via the test file interface (for writing corrupt data)
+	iTestFileInterface->CreateJournalFileL(journalFileNamePtr, defaultJournalFileMode);
+	TInt seekPosition=0;
+	TIntValue intValue = {0};
+	intValue.int32=static_cast<TInt32>(EAddedFile)+1000; //corrupt data in file (eg: write operation value to an invalid value)
+	//corrupt data in journal file
+	iTestFileInterface->SeekInJournalFileL(ESeekStart, seekPosition);
+	iTestFileInterface->WriteIntToJournalFileL(intValue, Mode32Bit);
+	iTestFileInterface->CloseJournalFile();
+
+	TPtr targetFileNamePtr(targetFileNameBasePtr);
+	targetFileNamePtr.Append(_L("dummyadd.txt"));
+	
+	//create a journal and add a file on C drive: that will force CJournalFile to read in and process the  
+	//previously created corrupt file. As the file contains corrupt information CJournalFile construction is expected to fail with KErrCorrupt 
+	CJournal* journal = CJournal::NewLC(iFs, iLoader, iTrID, iJournalPathInIni);
+	TRAP(err, journal->AddL(targetFileNamePtr));
+	if(err!=KErrCorrupt)
+		{
+		ERR_PRINTF2(_L("<font color=red>CJournal::AddL() returned incorrect error code. KErrCorrupt is expected and %d is returned!</font>"), err);
+		SetTestStepResult(EFail);
+		}
+	CleanupStack::PopAndDestroy(journal); journal=0;
+
+	//clean up: delete created journal file and drive file (.drv)
+	DeleteFileL(*journalFileName);
+	//reuse targetFileName buffer to create .drv filename to delete that file
+	*targetFileName=KEmptyString;
+	targetFileNamePtr.Set(targetFileName->Des());
+	CJournal::CreateDrvFileNameL(iTrID, iJournalPathInIni, targetFileNamePtr);
+	TRAP_IGNORE(DeleteFileL(targetFileNamePtr)); //clean up .drv file in case it's been created but avoid causing leave in case it hasn't 
+	
+	CleanupStack::PopAndDestroy(targetFileName);
+	CleanupStack::PopAndDestroy(journalFileName);
+	}
+
+//------------------------------------------------------------------------------------------------------------
+
+
+CJournalUnitTestScenarioBase::CJournalUnitTestScenarioBase(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer) 
+	{
+	iDriveUnitC = _L("c"); 
+	iDriveUnitE = _L("e");
+	}
+
+CJournalUnitTestScenarioBase::~CJournalUnitTestScenarioBase()
+	{
+	iFs.Close();
+	iLoader.Close();
+	delete iTargetFileName;
+	delete iJournalFileName;
+	delete iDrvFileName;
+	delete iBackupFileName;
+	}
+
+void CJournalUnitTestScenarioBase::ImplTestStepPreambleL()
+	{
+	INFO_PRINTF1(_L("CJournalUnitTestScenarioBase::ImplTestStepPreambleL()"));
+	iJournalPathInIni.Set(GetTargetFilePathFromConfigL());
+	iTrID = GetTransactionIdFromConfigL();
+	User::LeaveIfError(iFs.Connect());
+	User::LeaveIfError(iLoader.Connect());
+	iTargetFileName = HBufC::NewL(KMaxFileName);
+	iJournalFileName = HBufC::NewL(KMaxFileName);
+	iDrvFileName = HBufC::NewL(KMaxFileName);
+	iBackupFileName = HBufC::NewL(KMaxFileName);
+
+	TPtr ptr(iJournalFileName->Des());
+	ptr.Append(iDriveUnitC.Name());
+	ptr.Append(iJournalPathInIni);
+	ptr.AppendNumUC(iTrID, EHex);
+	ptr.Append(KKournalFileExt);
+	
+	ptr.Set(iTargetFileName->Des());
+	ptr.Append(iDriveUnitC.Name());
+	ptr.Append(iJournalPathInIni);
+
+	ptr.Set(iDrvFileName->Des());
+	CJournal::CreateDrvFileNameL(iTrID, iJournalPathInIni, ptr);
+
+	SetTestStepResult(EPass);
+	}
+
+void CJournalUnitTestScenarioBase::ImplTestStepL()
+	{
+	INFO_PRINTF1(_L("CJournalUnitTestScenarioBase::ImplTestStepL()"));
+
+	TPtr basePathPtr(iTargetFileName->Des());
+	TPtr fileNamePtr(basePathPtr);
+	TCleanupItem inTestCleanupItem(&CJournalUnitTestScenarioBase::InTestCleanUp, this);
+	CleanupStack::PushL(inTestCleanupItem);
+
+	CJournal* journal = CJournal::NewLC(iFs, iLoader, iTrID, iJournalPathInIni);
+	
+	*iBackupFileName=KEmptyString;
+	TPtr backupFileNamePtr(iBackupFileName->Des());
+	fileNamePtr.Set(basePathPtr);
+	fileNamePtr.Append(_L("journal_oom_test_dummyremovefile.txt"));
+	basePathPtr.Replace(0, 2, iDriveUnitC.Name());
+	journal->RemoveL(fileNamePtr, backupFileNamePtr);
+	*iBackupFileName=KEmptyString;
+	backupFileNamePtr.Set(iBackupFileName->Des());
+	basePathPtr.Replace(0, 2, iDriveUnitE.Name());
+	journal->RemoveL(fileNamePtr, backupFileNamePtr);
+	
+	  
+	fileNamePtr.Set(basePathPtr);
+	fileNamePtr.Append(_L("journal_oom_test_dummytempfile.txt"));
+	basePathPtr.Replace(0, 2, iDriveUnitC.Name());
+	journal->TemporaryL(fileNamePtr);
+	basePathPtr.Replace(0, 2, iDriveUnitE.Name());
+	journal->TemporaryL(fileNamePtr);
+	
+	
+	fileNamePtr.Set(basePathPtr);
+	fileNamePtr.Append(_L("journal_oom_test_dummyaddfile.txt"));
+	basePathPtr.Replace(0, 2, iDriveUnitC.Name());
+	journal->AddL(fileNamePtr);
+	basePathPtr.Replace(0, 2, iDriveUnitE.Name());
+	journal->AddL(fileNamePtr);
+	  
+	ScenarioEndL(journal);
+	CleanupStack::PopAndDestroy(journal);
+	CleanupStack::PopAndDestroy(this);
+	}
+
+void CJournalUnitTestScenarioBase::ImplTestStepPostambleL()
+	{
+	INFO_PRINTF1(_L("CJournalUnitTestScenarioBase::ImplTestStepPostambleL()"));
+	delete iTargetFileName;
+	iTargetFileName=0;
+	delete iJournalFileName;
+	iJournalFileName=0;
+	delete iDrvFileName;
+	iDrvFileName=0;
+	delete iBackupFileName;
+	iBackupFileName=0;
+	iFs.Close();
+	iLoader.Close();
+	}
+
+/*static*/ void CJournalUnitTestScenarioBase::InTestCleanUp(TAny* aObject)
+	{
+	CJournalUnitTestScenarioBase* object=static_cast<CJournalUnitTestScenarioBase*>(aObject);
+	object->INFO_PRINTF1(_L("CJournalUnitTestScenarioBase::InTestCleanUp()"));
+
+	TPtr ptr(object->iJournalFileName->Des());
+	ptr.Replace(0, 2, object->iDriveUnitC.Name());
+	TRAP_IGNORE(object->DeleteFileL(ptr)); //delete journal file on C drive
+	ptr.Replace(0, 2, object->iDriveUnitE.Name());
+	TRAP_IGNORE(object->DeleteFileL(ptr)); //delete journal file on E drive
+	TRAP_IGNORE(object->DeleteFileL(*(object->iDrvFileName))); //delete drv file on system drive
+	}
+
+//------------------------------------------------------------------------------------------------------------
+
+CJournalUnitTestInstall::CJournalUnitTestInstall(CStsTestServer &aStsTestServer): CJournalUnitTestScenarioBase(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KJournalUnitTestInstall);
+	}
+
+void CJournalUnitTestInstall::ScenarioEndL(CJournal* aJournal)
+	{
+	aJournal->CommitL();
+	}
+
+//------------------------------------------------------------------------------------------------------------
+
+CJournalUnitTestRollback::CJournalUnitTestRollback(CStsTestServer &aStsTestServer): CJournalUnitTestScenarioBase(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KJournalUnitTestRollback);
+	}
+
+void CJournalUnitTestRollback::ScenarioEndL(CJournal* aJournal)
+	{
+	aJournal->RollBackL();
+	}
+
+//------------------------------------------------------------------------------------------------------------
+
+
+CIntegrityServicesTestScenarioBase::CIntegrityServicesTestScenarioBase(CStsTestServer &aStsTestServer): CStsBaseTestStep(aStsTestServer) 
+	{
+	iDriveUnitC = _L("c"); 
+	iDriveUnitE = _L("e");
+	}
+
+CIntegrityServicesTestScenarioBase::~CIntegrityServicesTestScenarioBase()
+	{
+	iFs.Close();
+	iLoader.Close();
+	delete iTargetFileName;
+	delete iJournalFileName;
+	delete iDrvFileName;
+	delete iBackupFileName;
+	delete iTransactionBackupDirectoryPath;
+	}
+
+void CIntegrityServicesTestScenarioBase::ImplTestStepPreambleL()
+	{
+	INFO_PRINTF1(_L("IntegrityServicesTestOOM Preamble"));
+	iTargetPathInIni.Set(GetTargetFilePathFromConfigL());
+	iTrID = GetTransactionIdFromConfigL();
+	User::LeaveIfError(iFs.Connect());
+	User::LeaveIfError(iLoader.Connect());
+	iTargetFileName = HBufC::NewL(KMaxFileName);
+	iJournalFileName = HBufC::NewL(KMaxFileName);
+	iDrvFileName = HBufC::NewL(KMaxFileName);
+	iBackupFileName = HBufC::NewL(KMaxFileName);
+	iTransactionBackupDirectoryPath = HBufC::NewL(KMaxFileName);
+
+	TPtr ptr(iJournalFileName->Des());
+	ptr.Append(iDriveUnitC.Name());
+	CJournal::CreateJournalFileNameL(iTrID, KTransactionPath, ptr);
+
+	ptr.Set(iDrvFileName->Des());
+	CJournal::CreateDrvFileNameL(iTrID, KTransactionPath, ptr);
+	
+	TParsePtrC parse(*iDrvFileName);
+	ptr.Set(iTransactionBackupDirectoryPath->Des()); //this is the directory that holds the backup files for the transaction
+	ptr.Append(parse.DriveAndPath());
+	ptr.Append(parse.Name());
+	
+	ptr.Set(iTargetFileName->Des());
+	ptr.Append(iDriveUnitC.Name());
+	ptr.Append(iTargetPathInIni);
+	NormalizeDirectoryName(ptr); //removes trailing slash
+
+	SetTestStepResult(EPass);
+	}
+
+void CIntegrityServicesTestScenarioBase::ImplTestStepL()
+	{
+	TPtr basePathPtr(iTargetFileName->Des());
+	TPtr fileNamePtr(basePathPtr);
+	RFile newFile;
+	TUint fileMode(EFileShareExclusive | EFileWrite);
+	
+	TCleanupItem inTestCleanupItem(&CIntegrityServicesTestScenarioBase::InTestCleanUp, this);
+	CleanupStack::PushL(inTestCleanupItem);
+
+	CIntegrityServices* integrityServices = CIntegrityServices::NewLC(iTrID);
+	
+	fileNamePtr.Set(basePathPtr);
+	fileNamePtr.Append(_L("\\integrityservices_oom_test_dummyremovefile.txt"));
+	basePathPtr.Replace(0, 2, iDriveUnitC.Name());
+	integrityServices->RemoveL(fileNamePtr);
+	basePathPtr.Replace(0, 2, iDriveUnitE.Name());
+	integrityServices->RemoveL(fileNamePtr);
+	  
+	fileNamePtr.Set(basePathPtr);
+	fileNamePtr.Append(_L("\\integrityservices_oom_test_dummyregistertempfile.txt"));
+	basePathPtr.Replace(0, 2, iDriveUnitC.Name());
+	integrityServices->RegisterTemporaryL(fileNamePtr);
+	basePathPtr.Replace(0, 2, iDriveUnitE.Name());
+	integrityServices->RegisterTemporaryL(fileNamePtr);
+	
+	fileNamePtr.Set(basePathPtr);
+	fileNamePtr.Append(_L("\\integrityservices_oom_test_dummycreatetempfile.txt"));
+	basePathPtr.Replace(0, 2, iDriveUnitC.Name());
+	CleanupClosePushL(newFile);
+	integrityServices->CreateTemporaryL(fileNamePtr, newFile, fileMode);
+	CleanupStack::PopAndDestroy(&newFile);
+	basePathPtr.Replace(0, 2, iDriveUnitE.Name());
+	CleanupClosePushL(newFile);
+	integrityServices->CreateTemporaryL(fileNamePtr, newFile, fileMode);
+	CleanupStack::PopAndDestroy(&newFile);
+	
+	fileNamePtr.Set(basePathPtr);
+	fileNamePtr.Append(_L("\\integrityservices_oom_test_dummyaddfile.txt"));
+	basePathPtr.Replace(0, 2, iDriveUnitC.Name());
+	integrityServices->RegisterNewL(fileNamePtr);
+	basePathPtr.Replace(0, 2, iDriveUnitE.Name());
+	integrityServices->RegisterNewL(fileNamePtr);
+	 
+	fileNamePtr.Set(basePathPtr);
+	fileNamePtr.Append(_L("\\integrityservices_oom_test_dummycreatenewfile.txt"));
+	basePathPtr.Replace(0, 2, iDriveUnitC.Name());
+	CleanupClosePushL(newFile);
+	integrityServices->CreateNewL(fileNamePtr, newFile, fileMode);
+	CleanupStack::PopAndDestroy(&newFile);
+	basePathPtr.Replace(0, 2, iDriveUnitE.Name());
+	CleanupClosePushL(newFile);
+	integrityServices->CreateNewL(fileNamePtr, newFile, fileMode);
+	CleanupStack::PopAndDestroy(&newFile);
+	
+	fileNamePtr.Set(basePathPtr);
+	fileNamePtr.Append(_L("\\integrityservices_oom_test_dummyoverwritefile.txt"));
+	basePathPtr.Replace(0, 2, iDriveUnitC.Name());
+	CleanupClosePushL(newFile);
+	integrityServices->OverwriteL(fileNamePtr, newFile, fileMode);
+	CleanupStack::PopAndDestroy(&newFile);
+	basePathPtr.Replace(0, 2, iDriveUnitE.Name());
+	CleanupClosePushL(newFile);
+	integrityServices->OverwriteL(fileNamePtr, newFile, fileMode);
+	CleanupStack::PopAndDestroy(&newFile);
+	  
+	ScenarioEndL(integrityServices);
+	CleanupStack::PopAndDestroy(integrityServices);
+	CleanupStack::PopAndDestroy(this);
+	}
+
+void CIntegrityServicesTestScenarioBase::ImplTestStepPostambleL()
+	{
+	INFO_PRINTF1(_L("IntegrityServicesTestOOM Postamble"));
+	delete iTargetFileName;
+	iTargetFileName=0;
+	delete iJournalFileName;
+	iJournalFileName=0;
+	delete iDrvFileName;
+	iDrvFileName=0;
+	delete iBackupFileName;
+	iBackupFileName=0;
+	delete iTransactionBackupDirectoryPath;
+	iTransactionBackupDirectoryPath=0;
+	iFs.Close();
+	iLoader.Close();
+	}
+
+/*static*/void CIntegrityServicesTestScenarioBase::InTestCleanUp(TAny* aObject)
+	{
+	CIntegrityServicesTestScenarioBase* object=static_cast<CIntegrityServicesTestScenarioBase*>(aObject);
+	//first clean up transaction related files
+	TPtr ptr(object->iJournalFileName->Des());
+	ptr.Replace(0, 2, object->iDriveUnitC.Name());
+	TRAP_IGNORE(object->DeleteFileL(ptr)); //delete journal file on C drive
+	ptr.Replace(0, 2, object->iDriveUnitE.Name());
+	TRAP_IGNORE(object->DeleteFileL(ptr)); //delete journal file on E drive
+	TRAP_IGNORE(object->DeleteFileL(*(object->iDrvFileName))); //delete drv file on system drive
+	ptr.Set(object->iTransactionBackupDirectoryPath->Des());
+	ptr.Replace(0, 2, object->iDriveUnitC.Name());
+	TRAP_IGNORE(object->DeleteFileL(ptr)); //delete backup directory on C drive
+	ptr.Replace(0, 2, object->iDriveUnitE.Name());
+	TRAP_IGNORE(object->DeleteFileL(ptr)); //delete backup directory on E drive
+	
+	//then clean up all the added/created/etc... files
+	ptr.Set(object->iTargetFileName->Des());
+	ptr.Replace(0, 2, object->iDriveUnitC.Name());
+	TRAP_IGNORE(object->DeleteFileL(ptr)); //delete target dir on C drive
+	ptr.Replace(0, 2, object->iDriveUnitE.Name());
+	TRAP_IGNORE(object->DeleteFileL(ptr)); //delete target dir on E drive
+	
+	}
+
+void CIntegrityServicesTestScenarioBase::NormalizeDirectoryName(TDes& aFileName)
+{
+	TInt lastCharPos = aFileName.Length() - 1;
+	if ( lastCharPos >= 0 && aFileName[lastCharPos] == KPathDelimiter &&
+		 aFileName.Locate(KPathDelimiter) != lastCharPos) // Take care not to remove slash from "c:\" and the like
+		{
+		aFileName.Delete(lastCharPos, 1);
+		}			
+}
+
+//------------------------------------------------------------------------------------------------------------
+
+CIntegrityServicesTestInstall::CIntegrityServicesTestInstall(CStsTestServer &aStsTestServer): CIntegrityServicesTestScenarioBase(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KIntegrityservicesUnitTestInstall);
+	}
+
+void CIntegrityServicesTestInstall::ScenarioEndL(Usif::CIntegrityServices* aIntegrServ)
+	{
+	aIntegrServ->CommitL();
+	}
+
+//------------------------------------------------------------------------------------------------------------
+
+CIntegrityServicesTestRollback::CIntegrityServicesTestRollback(CStsTestServer &aStsTestServer): CIntegrityServicesTestScenarioBase(aStsTestServer)
+	{
+	// Call base class method to set up the human readable name for logging
+	SetTestStepName(KIntegrityservicesUnitTestRollback);
+	}
+
+void CIntegrityServicesTestRollback::ScenarioEndL(Usif::CIntegrityServices* aIntegrServ)
+	{
+	aIntegrServ->RollBackL();
+	}
--- a/ncdengine/engine/accesspointmanager/inc/catalogsaccesspointmanagerimpl.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/accesspointmanager/inc/catalogsaccesspointmanagerimpl.h	Fri Mar 19 09:33:35 2010 +0200
@@ -20,7 +20,13 @@
 #define C_CATALOGSACCESSPOINTMANAGERIMPL_H
 
 #include <e32def.h>
+
+#ifdef _0
 #include <ApAccessPointItem.h>
+#endif
+
+#include <e32cmn.h>
+
 #include "catalogsaccesspointmanager.h"
 #include "catalogsaccesspointobserver.h"
 
@@ -190,10 +196,11 @@
      */
     void RemoveAccessPointsL();
         
-    
+#ifdef _0
     HBufC16* ReadText16L( CApAccessPointItem* aItem, const TApMember& aApMember );
 
     HBufC8* ReadText8L( CApAccessPointItem* aItem, const TApMember& aApMember );
+#endif 
     
     TBool MatchInCommsDbL( const CCatalogsAccessPointSettings& aSettings, TUint32& aId );
 
@@ -206,7 +213,9 @@
     void SaveToStorageL();
     
         
+#ifdef _0
     TBool MatchingSettingsL(const CCatalogsAccessPointSettings& aSettings, CApAccessPointItem& aItem);
+#endif
     
     void SetApDetailL( CCatalogsAccessPoint& aAp, const TDesC& aKey, const TDesC& aValue );
 
--- a/ncdengine/engine/accesspointmanager/inc/catalogsaccesspointmap.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/accesspointmanager/inc/catalogsaccesspointmap.h	Fri Mar 19 09:33:35 2010 +0200
@@ -17,6 +17,13 @@
 
 
 #include <e32base.h>
+
+#ifdef _0
+#include "catalogsaccesspointmanagerimpl.h"
+#endif
+
+#include <s32strm.h>
+
 #include "catalogsaccesspointmanagerimpl.h"
 
 class CCatalogsAccessPointMap : public CBase
--- a/ncdengine/engine/accesspointmanager/inc/catalogsaccesspointsettings.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/accesspointmanager/inc/catalogsaccesspointsettings.h	Fri Mar 19 09:33:35 2010 +0200
@@ -20,7 +20,14 @@
 #define C_CATALOGSACCESSPOINTSETTINGS_H
 
 #include <e32base.h>
+
+#ifdef _0
 #include <ApAccessPointItem.h>
+#endif
+
+#include <s32strm.h>
+
+
 #include <badesca.h>
 
 
@@ -32,6 +39,7 @@
     
     virtual ~CCatalogsAccessPointSettings();
     
+#ifdef _0
     void SetLongTextParameterL(const TApMember& aKey, const TDesC16& aValue);
     void SetText16ParameterL(const TApMember& aKey, const TDesC16& aValue);
     void SetText8ParameterL(const TApMember& aKey, const TDesC8& aValue);
@@ -54,6 +62,7 @@
         TInt aIndex, TApMember& aKey, TUint32& aValue) const;
     void BoolParameter(
         TInt aIndex, TApMember& aKey, TBool& aValue) const;
+#endif
     
 protected:
     CCatalogsAccessPointSettings();
@@ -62,11 +71,13 @@
     void InternalizeL(RReadStream& aStream);
 
 private:
+#ifdef _0
     RArray<TApMember> iLongTextMembers;
     RArray<TApMember> iText16Members;
     RArray<TApMember> iText8Members;
     RArray<TApMember> iUintMembers;
     RArray<TApMember> iBoolMembers;
+#endif
     
     CDesC16ArrayFlat* iLongTextData;
     CDesC16ArrayFlat* iText16Data;
--- a/ncdengine/engine/accesspointmanager/src/catalogsaccesspointmanagerimpl.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/accesspointmanager/src/catalogsaccesspointmanagerimpl.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -18,9 +18,12 @@
 
 #include "catalogsaccesspointmanagerimpl.h"
 
+#ifdef _0
 #include <ApUtils.h>
 #include <ApSelect.h> 
 #include <ApDataHandler.h>
+#endif
+
 #include <badesca.h>
 
 #include "catalogsaccesspoint.h"
@@ -61,6 +64,7 @@
 _LIT(KBrowseAccessPoint, "browsingAccessPoint");
 _LIT(KPurchaseAccessPoint, "purchasingAccessPoint");
 
+#ifdef _0
 // literals used for access point settings in client configuration protocol (in alphabetical order)
 _LIT(KApName, "name");
 
@@ -152,7 +156,7 @@
 
 _LIT(KWapWspOptionConnectionless, "EWapWspOptionConnectionless");
 _LIT(KWapWspOptionConnectionOriented, "EWapWspOptionConnectionOriented");
-
+#endif
 
 CCatalogsAccessPointManager::CCatalogsAccessPointManager(
     CNcdGeneralManager& aGeneralManager ) :
@@ -565,6 +569,7 @@
     TUint32& aAccessPointId) 
     {
     DLTRACEIN((_L("Namespace: %S, CatalogId: %S, Action: %d, clientUid: %d"), &aNameSpace, &aCatalogId, aAction, aClientUid.iUid));
+    
     CCatalogsAccessPoint* accessPoint( NULL );
     CCatalogsClientAccessPointData* apData( NULL );
     TInt err = GetAccessPoint( accessPoint, apData );
@@ -593,7 +598,7 @@
     DLTRACEIN((_L("Namespace: %S, NodeId: %S, Action: %d, clientUid: %d"),
                &aNodeIdentifier.NodeNameSpace(), &aNodeIdentifier.NodeId(), aAction,
                aClientUid.iUid));
-
+    
     CCatalogsAccessPoint* accessPoint( NULL );
     CCatalogsClientAccessPointData* apData( NULL );
     TInt err = GetAccessPoint( accessPoint, apData );
@@ -714,11 +719,14 @@
 TBool CCatalogsAccessPointManager::ValidateAccessPointL( CCatalogsAccessPoint* aAccessPoint )
     {
     DLTRACEIN((""));
+    
 #ifdef __WINS__
     // Comms database is not accessible in emulator.
     return EFalse;
 #endif
-    CCommsDatabase *commdb = CCommsDatabase::NewL( /*EDatabaseTypeIAP*/ );
+
+#ifdef _0
+    CCommsDatabase *commdb = CCommsDatabase::NewL( /* EDatabaseTypeIAP */);
     CleanupStack::PushL( commdb );
     CApSelect*  select;
     select = CApSelect::NewLC(
@@ -765,18 +773,22 @@
             
     // Someone has altered the access point settings.
     CleanupStack::PopAndDestroy(4);
+#endif
+    
     return EFalse;
     }
 
 TBool CCatalogsAccessPointManager::MatchInCommsDbL( const CCatalogsAccessPointSettings& aSettings, TUint32& aId )
     {
     DLTRACEIN(_L("Checking comms DB for matching access point"));
+    
 #ifdef __WINS__
     // Comms database is not accessible in emulator.
     return EFalse;
 #endif
     
-    CCommsDatabase *commdb = CCommsDatabase::NewL( /*EDatabaseTypeIAP*/ );
+#ifdef _0
+    CCommsDatabase *commdb = CCommsDatabase::NewL( /* EDatabaseTypeIAP */ );
     CleanupStack::PushL( commdb );
     CApSelect*  select;
     select = CApSelect::NewLC(
@@ -816,17 +828,22 @@
         
     CleanupStack::PopAndDestroy( 4, commdb ); // util, handler, select, commdb
     DLTRACEOUT(("Matching AP not found"));
+#endif
+    
     return EFalse;
     }
 
 void CCatalogsAccessPointManager::CreateApToCommsDBL( const CCatalogsAccessPoint& aSettings, TUint32& aId )
     {
     DLTRACEIN(_L("Creating AP to comms DB"));
+    
 #ifdef __WINS__
     // Comms database is not accessible in emulator.
     return;
 #endif
-    CCommsDatabase *commdb = CCommsDatabase::NewL( /*EDatabaseTypeIAP*/ );
+
+#ifdef _0
+    CCommsDatabase *commdb = CCommsDatabase::NewL( /*EDatabaseTypeIAP */);
     CleanupStack::PushL( commdb );
     
     CApDataHandler*     handler = CApDataHandler::NewLC( *commdb );        
@@ -896,9 +913,12 @@
     CApUtils* util = CApUtils::NewLC( *commdb );
     aId = util->IapIdFromWapIdL( wapId );
     CleanupStack::PopAndDestroy( 4, commdb ); // commDb, handler, newAp, util
+    
+#endif
     DLTRACEOUT(("Access point created to comms DB"));
     }
 
+#ifdef _0
 HBufC16* CCatalogsAccessPointManager::ReadText16L( CApAccessPointItem* aItem, const TApMember& aApMember )
     {
     TInt length = aItem->ReadTextLengthL( aApMember );
@@ -926,7 +946,7 @@
     CleanupStack::Pop(); // buffer
     return buffer;
     }
-
+#endif
 
 void CCatalogsAccessPointManager::RemoveAccessPointsFromCommsDbL(
     TBool aAddShutdownOperation )
@@ -982,7 +1002,8 @@
 
 void CCatalogsAccessPointManager::RemoveApFromCommsDatabaseL( const TUint32& aId )
     {
-    DLTRACEIN(("aId: %u", aId ));
+    
+#ifdef _0
     CCommsDatabase *commdb = CCommsDatabase::NewL( EDatabaseTypeIAP );
     CleanupStack::PushL( commdb );
     CApDataHandler* dataHandler = CApDataHandler::NewLC( *commdb );
@@ -991,6 +1012,7 @@
     dataHandler->RemoveAPL( wapId );
     
     CleanupStack::PopAndDestroy( 3, commdb ); // util, dataHandler, commdb
+#endif
     }
 
     
@@ -1056,7 +1078,7 @@
     item->SaveL();    
     }
 
-    
+#ifdef _0   
 TBool CCatalogsAccessPointManager::MatchingSettingsL(
     const CCatalogsAccessPointSettings& aSettings, CApAccessPointItem& aItem) 
     {
@@ -1188,11 +1210,13 @@
     DLTRACEOUT(("Matching settings"));
     return ETrue;
     }
-    
+#endif   
     
 void CCatalogsAccessPointManager::SetApDetailL(
     CCatalogsAccessPoint& aAp, const TDesC& aKey, const TDesC& aValue ) 
     {
+    
+#ifdef _0
     DLTRACEIN((""));
     TBool value = EFalse;
     
@@ -1583,6 +1607,7 @@
         {
         DLWARNING(( _L("Unknown access point detail: %S"), &aKey));
         }
+#endif
     }
     
 
--- a/ncdengine/engine/accesspointmanager/src/catalogsaccesspointsettings.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/accesspointmanager/src/catalogsaccesspointsettings.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -52,15 +52,19 @@
     delete iLongTextData;
     delete iText16Data;
     delete iText8Data;
+
+#ifdef _0
     iLongTextMembers.Close();
     iText16Members.Close();
     iText8Members.Close();
     iUintMembers.Close();
     iBoolMembers.Close();
     iUintData.Close();
-    iBoolData.Close();    
+    iBoolData.Close(); 
+#endif  
     }
     
+#ifdef _0
 void CCatalogsAccessPointSettings::SetLongTextParameterL(
     const TApMember& aKey, const TDesC& aValue) 
     {
@@ -214,11 +218,13 @@
     aKey = iBoolMembers[aIndex];
     aValue = iBoolData[aIndex];
     }
-        
+#endif
+
 void CCatalogsAccessPointSettings::ExternalizeL(RWriteStream& aStream) 
     {
     DLTRACEIN((""));
     
+#ifdef _0
     // write long text parameters
     TInt longTextCount = LongTextParameterCount();
     aStream.WriteInt32L(longTextCount);
@@ -263,12 +269,15 @@
         aStream.WriteInt32L(iBoolMembers[i]);
         aStream.WriteInt8L(iBoolData[i]);
         }
-    
+
+#endif
     DLTRACEOUT((""));        
     }
     
 void CCatalogsAccessPointSettings::InternalizeL(RReadStream& aStream) 
     {
+    
+#ifdef _0
     // read long text parameters
     TInt longTextCount = aStream.ReadInt32L();
     iLongTextMembers.ReserveL(longTextCount);
@@ -327,4 +336,6 @@
         iBoolMembers.AppendL((TApMember)aStream.ReadInt32L());
         iBoolData.AppendL(aStream.ReadInt8L());
         }
+       
+#endif
     }
--- a/ncdengine/engine/group/catalogsdebug.mmp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/group/catalogsdebug.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -56,7 +56,7 @@
 
 // System include paths
 #ifndef __SERIES60_30__
-APP_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
 #else
 SYSTEMINCLUDE /Epoc32/include
 #endif
--- a/ncdengine/engine/group/catalogsengine.mmp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/group/catalogsengine.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -49,7 +49,7 @@
 
 // System include paths
 #ifndef __SERIES60_30__
-APP_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
 #else
 SYSTEMINCLUDE /Epoc32/include
 #endif
--- a/ncdengine/engine/group/catalogsproxy.mmp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/group/catalogsproxy.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -170,7 +170,7 @@
 
 // System include paths
 #ifndef __SERIES60_30__
-APP_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
 #else
 SYSTEMINCLUDE /epoc32/include
 #endif
--- a/ncdengine/engine/group/catalogsundertaker.mmp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/group/catalogsundertaker.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -49,7 +49,7 @@
 
 // System include paths
 #ifndef __SERIES60_30__
-APP_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
 #else
 SYSTEMINCLUDE   /epoc32/include
 #endif
--- a/ncdengine/engine/group/ncddevicemgmt.mmp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/group/ncddevicemgmt.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -61,7 +61,7 @@
 
 // System include paths
 #ifndef __SERIES60_30__
-APP_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
 #else
 SYSTEMINCLUDE /Epoc32/include
 #endif
@@ -94,11 +94,12 @@
 LIBRARY         swinstcli.lib           // Silent install
 LIBRARY         widgetregistryclient.lib // Widget Registry
 
-#if defined( __SERIES60_30__ ) || defined( __SERIES60_31__ ) || defined( __S60_32__ )
-LIBRARY         javaregistry.lib        // Java Registry
-#else
-LIBRARY         javaregistryclient.lib
-#endif
+// HLa - temporary java remove
+//#if defined( __SERIES60_30__ ) || defined( __SERIES60_31__ ) || defined( __S60_32__ )
+//LIBRARY         javaregistry.lib        // Java Registry
+//#else
+//LIBRARY         javaregistryclient.lib
+//#endif
 
 #ifndef __SERIES60_31__
 LIBRARY         sysversioninfo.lib      // SysVersionInfo
--- a/ncdengine/engine/group/ncdutils.mmp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/group/ncdutils.mmp	Fri Mar 19 09:33:35 2010 +0200
@@ -62,7 +62,7 @@
 
 // System include paths
 #ifndef __SERIES60_30__
-APP_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
 #else
 SYSTEMINCLUDE /Epoc32/include
 #endif
--- a/ncdengine/engine/transport/inc/catalogshttpdownload.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/transport/inc/catalogshttpdownload.h	Fri Mar 19 09:33:35 2010 +0200
@@ -19,7 +19,7 @@
 #ifndef C_CATALOGSHTTPDOWNLOAD_H
 #define C_CATALOGSHTTPDOWNLOAD_H
 
-#include <downloadmgrclient.h>
+#include <DownloadMgrClient.h>
 
 #include <s32file.h>
 
--- a/ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h	Fri Mar 19 09:33:35 2010 +0200
@@ -19,7 +19,7 @@
 #ifndef C_CATALOGSHTTPDOWNLOADMANAGER_H
 #define C_CATALOGSHTTPDOWNLOADMANAGER_H
 
-#include <downloadmgrclient.h>
+#include <DownloadMgrClient.h>
 
 #include "catalogstransportoperationid.h"
 #include "catalogshttpsession.h"    // RCatalogsHttpOperationArray
--- a/ncdengine/engine/transport/inc/catalogshttptypes.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/transport/inc/catalogshttptypes.h	Fri Mar 19 09:33:35 2010 +0200
@@ -19,7 +19,7 @@
 #ifndef T_CATALOGSHTTPTYPES_H
 #define T_CATALOGSHTTPTYPES_H
 
-#include <httpdownloadmgrcommon.h>
+#include <HttpDownloadMgrCommon.h>
 
 class MCatalogsHttpOperation;
 
--- a/ncdengine/engine/transport/src/catalogshttpstack.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/engine/transport/src/catalogshttpstack.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -36,7 +36,7 @@
 #include <deflatefilterinterface.h>
 #include <httpfiltercommonstringsext.h>
 #include <httpfilterproxyinterface.h>
-#include <CookieFilterInterface.h>
+#include <cookiefilterinterface.h>
     
 #include "catalogs_device_config.h"
 #include "catalogshttptypes.h"
--- a/ncdengine/provider/deviceinteraction/inc/ncdinstallationserviceimpl.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/provider/deviceinteraction/inc/ncdinstallationserviceimpl.h	Fri Mar 19 09:33:35 2010 +0200
@@ -40,6 +40,8 @@
  * from 5.0 onwards because it seems that some 3.2 devices don't support
  * it entirely
  */
+ 
+ /*  HLa - temporary java remove
 #if defined( __SERIES60_30__ ) || defined( __SERIES60_31__ ) || defined ( __S60_32__ )
     #define USE_OLD_JAVA_API
     class MJavaRegistrySuiteEntry;
@@ -50,7 +52,7 @@
         class CJavaRegistry;
         }
 #endif
-
+*/
 
 class CDocumentHandler;
 
@@ -374,11 +376,14 @@
      * @param aJavaRegistry Java registry
      * @return Midlet UID
      */
+     
+     /* HLa - temporary java remove
 #ifdef USE_OLD_JAVA_API
     TUid LatestMidletUidL( MJavaRegistry& aJavaRegistry ) const;
 #else    
     TUid LatestMidletUidL( Java::CJavaRegistry& aJavaRegistry ) const;
 #endif
+    */
     
     static TBool MatchJava( const TDesC& aMime );
     
--- a/ncdengine/provider/deviceinteraction/src/ncddeviceserviceimpl.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/provider/deviceinteraction/src/ncddeviceserviceimpl.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -38,7 +38,7 @@
 #endif
 
 #ifdef GET_DEVICE_ID_FROM_USERAGENT
-    #include <cuseragent.h>
+    #include <CUserAgent.h>
 #endif
 
 #include "catalogs_device_config.h"
--- a/ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -32,6 +32,7 @@
 #include <e32property.h>
 #include <sacls.h>
 
+/*  HLa - temporary java remove
 #ifdef USE_OLD_JAVA_API
     #include <mjavaregistry.h>
     #include <swi/minstalledappsregistry.h>
@@ -41,7 +42,7 @@
 
     using namespace Java;
 #endif
-
+*/
 #include "ncdinstallationserviceobserver.h"
 #include "ncdactiveoperationobserver.h"
 #include "ncdsilentinstallactiveobserver.h"
@@ -55,6 +56,7 @@
 
 const TUint KFileOpenFlags = EFileShareReadersOrWriters;
 
+/*  HLa - temporary java remove
 #ifdef __SERIES60_31__
 
     const TInt32 KPSUidJavaLatestInstallation = KUidJmiLatestInstallation;
@@ -67,6 +69,7 @@
     #include <javadomainpskeys.h>
 
 #endif
+*/
 
 // length taken from WidgetRegistryData.h
 const TInt KWidgetBundleIdLength = KWidgetRegistryVal + 1;    
@@ -133,10 +136,14 @@
     delete iInstallationCompleteCallback;
     delete iJadFileName;
     delete iRecognizedMime;
+    
+     /*  HLa - temporary java remove
 #ifdef USE_OLD_JAVA_API    
     iMIDletUids.Close();
 #endif    
     iApaLs.Close();
+    */
+    
     if( iThemes )
         {
         iThemes->ResetAndDestroy();
@@ -493,11 +500,14 @@
 //
 // ---------------------------------------------------------------------------
 //
+
 #ifdef USE_OLD_JAVA_API
 
 TBool CNcdInstallationService::JavaAppExistsL( 
     const TUid& aUid )
     {
+    	
+    /*  HLa - temporary java remove
     DLTRACEIN((""));
 
     MJavaRegistry* javaRegistry = MJavaRegistry::CreateL();
@@ -515,6 +525,8 @@
     
     CleanupStack::PopAndDestroy( javaRegistry );
     return err == KErrNone;
+    */
+    
     }
 
 #else
@@ -523,6 +535,7 @@
     const TUid& aUid )
     {
     DLTRACEIN((""));
+    /*  HLa - temporary java remove
 
     CJavaRegistry* javaRegistry = CJavaRegistry::NewLC();    
 
@@ -530,10 +543,13 @@
     
     CleanupStack::PopAndDestroy( javaRegistry );
     return exists;
+    */
+    
     }
 
 #endif
-    
+
+  
 // ---------------------------------------------------------------------------
 // Checks the application status
 // ---------------------------------------------------------------------------
@@ -1449,11 +1465,13 @@
 #ifdef USE_OLD_JAVA_API
     // Store installed java app uids before installation to see
     // which one is a new java app later.
+    /*  HLa - temporary java remove
     MJavaRegistry* javaRegistry = MJavaRegistry::CreateL();
     CleanupReleasePushL( *javaRegistry );
     iMIDletUids.Reset();
     javaRegistry->InstalledMIDletUidsL( iMIDletUids );
     CleanupStack::PopAndDestroy( javaRegistry );
+    */
 #endif
     
     // In platform security systems JAR and JAD has to be in same folder
@@ -1828,21 +1846,25 @@
 
 void CNcdInstallationService::MidletUidsL( RArray<TUid>& aUids )
     {
+    	 /*  HLa - temporary java remove
     DLTRACEIN((""));
     MJavaRegistry* javaRegistry = MJavaRegistry::CreateL();
     CleanupReleasePushL( *javaRegistry );
     javaRegistry->InstalledMIDletUidsL( aUids );
-    CleanupStack::PopAndDestroy( javaRegistry );    
+    CleanupStack::PopAndDestroy( javaRegistry ); 
+    */   
     }
 
 #else
 
 void CNcdInstallationService::MidletUidsL( RArray<TUid>& aUids )
     {
+    /*  HLa - temporary java remove
     DLTRACEIN((""));
     CJavaRegistry* javaRegistry = CJavaRegistry::NewLC();
     javaRegistry->GetRegistryEntryUidsL( aUids );          
-    CleanupStack::PopAndDestroy( javaRegistry );    
+    CleanupStack::PopAndDestroy( javaRegistry );   
+    */ 
     }
 
 #endif
@@ -1864,6 +1886,8 @@
 // been installed since the last device restart
 // ---------------------------------------------------------------------------
 //
+
+/*  HLa - temporary java remove
 #ifdef USE_OLD_JAVA_API
 
 TUid CNcdInstallationService::LatestMidletUidL( 
@@ -1973,6 +1997,7 @@
 
 
 #endif
+*/
 
 // ---------------------------------------------------------------------------
 // Returns true if the MIME type matches a Java application or descriptor
@@ -1988,8 +2013,11 @@
 
 #ifdef USE_OLD_JAVA_API
 
+
 TUid CNcdInstallationService::InstalledMidletUidL()
     {
+    	
+    /* HLa - temporary java remove
     DLTRACEIN((""));
     RArray<TUid> MIDletUids;
     CleanupClosePushL( MIDletUids );
@@ -2024,17 +2052,21 @@
 
     iMIDletUids.Reset();
     return MIDletUid;
+    */
+    
     }
 
 #else // USE_OLD_JAVA_API
 
 TUid CNcdInstallationService::InstalledMidletUidL()
     {
+    /* HLa - temporary java remove
     DLTRACEIN((""));
     CJavaRegistry* registry = CJavaRegistry::NewLC();
     TUid midletUid = LatestMidletUidL( *registry );
     CleanupStack::PopAndDestroy( registry );
     return midletUid;
+    */
     }
 
 #endif // USE_OLD_JAVA_API
--- a/ncdengine/provider/server/src/ncdloadnodeoperationimpl.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/provider/server/src/ncdloadnodeoperationimpl.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -961,11 +961,7 @@
                 }
             }
         }
-    else if ( parentIdentifier )
-        {
-        CleanupStack::PopAndDestroy( parentIdentifier );
-        }
-
+    
     // Delete data because ownership has been transferred.
     CleanupStack::PopAndDestroy( aData );
     
@@ -1262,10 +1258,6 @@
                 }
             }
         }
-    else if ( parentIdentifier )
-        {
-        CleanupStack::PopAndDestroy( parentIdentifier );
-        }
         
     // Delete data because ownership has been transferred.
     CleanupStack::PopAndDestroy( aData );
--- a/ncdengine/provider/server/src/ncdloadrootnodeoperationimpl.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/provider/server/src/ncdloadrootnodeoperationimpl.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -1018,6 +1018,11 @@
     // Create folder for catalog bundle.
     DASSERT( bundleId );
     
+    if (!bundleId)
+        {
+        User::Leave(KErrNotFound);
+        }
+    
     CNcdNodeIdentifier* metaDataId = CNcdNodeIdentifier::NewLC(
         aDetail.Value(), *bundleId, iPendingMessage->Session().Context().FamilyId() );
     DLINFO((_L("Bundle metaid ns: %S, id: %S"), 
--- a/ncdengine/provider/server/src/ncdsearchoperationimpl.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/ncdengine/provider/server/src/ncdsearchoperationimpl.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -724,53 +724,48 @@
         delete metaIdentifier;
         metaIdentifier = NULL;
         }
-    if( addMetaData )
+
+    // set iParentIdentifier as parent if not set otherwise, this would be the case of a
+    // normal top-level node from a content source
+    if ( ! parentIdentifier ) 
         {
-        // set iParentIdentifier as parent if not set otherwise, this would be the case of a
-        // normal top-level node from a content source
-        if ( ! parentIdentifier ) 
-            {
-            parentIdentifier = CNcdNodeIdentifier::NewLC( *iParentIdentifier );
-            }
-        
-        // Get the node reference from the data handler.
-        // The node has the given parent and its metadata
-        // will be internalized with the given data.
-        CNcdNode& node =
-            iNodeManager->DataHandlerL( *parentIdentifier, *aData, iClientUid );
-            
-        CleanupStack::PopAndDestroy( parentIdentifier );
+        parentIdentifier = CNcdNodeIdentifier::NewLC( *iParentIdentifier );
+        }
+    
+    // Get the node reference from the data handler.
+    // The node has the given parent and its metadata
+    // will be internalized with the given data.
+    CNcdNode& node =
+    iNodeManager->DataHandlerL( *parentIdentifier, *aData, iClientUid );
+    
+    CleanupStack::PopAndDestroy( parentIdentifier );
 
-        // Notice that the loaded nodes should contain the actual node identifier
-        // instead of metadata identifier, because the identifiers are returned to
-        // the proxy side after operation completes.
-        CNcdNodeIdentifier* loadedNodeId = 
-            CNcdNodeIdentifier::NewLC( node.Identifier() );
-        iLoadedNodes.AppendL( loadedNodeId );
-        CleanupStack::Pop( loadedNodeId );        
+    // Notice that the loaded nodes should contain the actual node identifier
+    // instead of metadata identifier, because the identifiers are returned to
+    // the proxy side after operation completes.
+    CNcdNodeIdentifier* loadedNodeId = 
+        CNcdNodeIdentifier::NewLC( node.Identifier() );
+    iLoadedNodes.AppendL( loadedNodeId );
+    CleanupStack::Pop( loadedNodeId );        
 
-        // If the data contains icon id and datablock id, they are stored until
-        // the datablock arrives later.
-        const MNcdPreminetProtocolIcon* icon = aData->Icon();
-        if ( icon != NULL ) 
+    // If the data contains icon id and datablock id, they are stored until
+    // the datablock arrives later.
+    const MNcdPreminetProtocolIcon* icon = aData->Icon();
+    if ( icon != NULL ) 
+        {
+        const TDesC& iconId = icon->Id();
+        const TDesC& dataBlockId = icon->DataBlock();
+        if ( iconId != KNullDesC && dataBlockId != KNullDesC ) 
             {
-            const TDesC& iconId = icon->Id();
-            const TDesC& dataBlockId = icon->DataBlock();
-            if ( iconId != KNullDesC && dataBlockId != KNullDesC ) 
-                {
-                // The node metadata was created by using the DataHandlerL
-                // and inserted for the node.
-                // So, the metadata can be asked from the node now.
-                MapIconIdForDataBlockL(iconId, dataBlockId, 
-                                       node.NodeMetaDataL().Identifier() );
-                node.NodeMetaDataL().IconL().SetIconDataReady( EFalse );
-                }
+            // The node metadata was created by using the DataHandlerL
+            // and inserted for the node.
+            // So, the metadata can be asked from the node now.
+            MapIconIdForDataBlockL(iconId, dataBlockId, 
+                                   node.NodeMetaDataL().Identifier() );
+            node.NodeMetaDataL().IconL().SetIconDataReady( EFalse );
             }
         }
-    else if ( parentIdentifier )
-        {
-        CleanupStack::PopAndDestroy( parentIdentifier );
-        }
+    
     DLTRACEOUT((""));
     }
     
--- a/secureswitools/swisistools/group/bld.inf	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/group/bld.inf	Fri Mar 19 09:33:35 2010 +0200
@@ -814,6 +814,7 @@
 ../test/tinterpretsisinteg/data/interpretsism.dll /epoc32/winscw/c/tswi/tinterpretsisinteg/data/interpretsism.dll
 ../test/tinterpretsisinteg/data/802730a9_0.sis /epoc32/winscw/c/tswi/tinterpretsisinteg/data/802730a9_0.sis
 ../test/tinterpretsisinteg/data/test_stub.sis /epoc32/data/z/system/install/test_stub.sis
+../test/tinterpretsisinteg/data/int_nr_option_01_stub.sis /epoc32/winscw/c/tswi/tinterpretsisinteg/data/int_nr_option_01_stub.sis
 
 ../test/tinterpretsisinteg/parameters_file/parameters.ini /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/parameters.ini
 ../test/tinterpretsisinteg/parameters_file/int001-006.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/int001-006.txt
@@ -1441,6 +1442,9 @@
 ../test/tinterpretsisinteg/parameters_file/testdata_pkgversion_d005file.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/testdata_pkgversion_d005file.txt
 ../test/tinterpretsisinteg/parameters_file/testdata_pkgversion_d006file.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/testdata_pkgversion_d006file.txt
 ../test/tinterpretsisinteg/parameters_file/testdata_pkgversion_d007file.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/testdata_pkgversion_d007file.txt
+../test/tinterpretsisinteg/parameters_file/int_nr_option_02.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/int_nr_option_02.txt
+../test/tinterpretsisinteg/parameters_file/int_nr_option_04.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/int_nr_option_04.txt
+../test/tinterpretsisinteg/parameters_file/int_nr_option_38.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/int_nr_option_38.txt
 
 //script files for PREQ2525 installing equivalent language
 
@@ -1463,8 +1467,86 @@
 ../test/tinterpretsisinteg/api-inst-preq2525-interpretsis-17.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/api-inst-preq2525-interpretsis-17.bat
 ../test/tinterpretsisinteg/api-inst-preq2525-interpretsis-18.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/api-inst-preq2525-interpretsis-18.bat
 ../test/tinterpretsisinteg/api-inst-preq2525-interpretsis-19.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/api-inst-preq2525-interpretsis-19.bat
+../test/tinterpretsisinteg/int_nr_option-01.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-01.bat
+../test/tinterpretsisinteg/int_nr_option-02.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-02.bat
+../test/tinterpretsisinteg/int_nr_option-03.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-03.bat
+../test/tinterpretsisinteg/int_nr_option-04.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-04.bat
+../test/tinterpretsisinteg/int_nr_option-05.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-05.bat
+../test/tinterpretsisinteg/int_nr_option-06.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-06.bat
+../test/tinterpretsisinteg/int_nr_option-07.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-07.bat
+../test/tinterpretsisinteg/int_nr_option-08.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-08.bat
+../test/tinterpretsisinteg/int_nr_option-09.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-09.bat
+../test/tinterpretsisinteg/int_nr_option-10.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-10.bat
+../test/tinterpretsisinteg/int_nr_option-11.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-11.bat
+../test/tinterpretsisinteg/int_nr_option-12.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-12.bat
+../test/tinterpretsisinteg/int_nr_option-13.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-13.bat
+../test/tinterpretsisinteg/int_nr_option-14.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-14.bat
+../test/tinterpretsisinteg/int_nr_option-15.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-15.bat
+../test/tinterpretsisinteg/int_nr_option-16.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-16.bat
+../test/tinterpretsisinteg/int_nr_option-17.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-17.bat
+../test/tinterpretsisinteg/int_nr_option-18.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-18.bat
+../test/tinterpretsisinteg/int_nr_option-19.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-19.bat
+../test/tinterpretsisinteg/int_nr_option-20.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-20.bat
+../test/tinterpretsisinteg/int_nr_option-21.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-21.bat
+../test/tinterpretsisinteg/int_nr_option-22.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-22.bat
+../test/tinterpretsisinteg/int_nr_option-23.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-23.bat
+../test/tinterpretsisinteg/int_nr_option-24.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-24.bat
+../test/tinterpretsisinteg/int_nr_option-25.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-25.bat
+../test/tinterpretsisinteg/int_nr_option-26.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-26.bat
+../test/tinterpretsisinteg/int_nr_option-27.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-27.bat
+../test/tinterpretsisinteg/int_nr_option-28.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-28.bat
+../test/tinterpretsisinteg/int_nr_option-29.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-29.bat
+../test/tinterpretsisinteg/int_nr_option-30.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-30.bat
+../test/tinterpretsisinteg/int_nr_option-31.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-31.bat
+../test/tinterpretsisinteg/int_nr_option-32.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-32.bat
+../test/tinterpretsisinteg/int_nr_option-33.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-33.bat
+../test/tinterpretsisinteg/int_nr_option-34.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-34.bat
+../test/tinterpretsisinteg/int_nr_option-35.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-35.bat
+../test/tinterpretsisinteg/int_nr_option-36.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-36.bat
+../test/tinterpretsisinteg/int_nr_option-37.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-37.bat
+../test/tinterpretsisinteg/int_nr_option-38.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-38.bat
+../test/tinterpretsisinteg/int_nr_option-39.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-39.bat
 
 ../test/tinterpretsisinteg/scripts/api-inst-preq2525-interpretsis-18.script /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/api-inst-preq2525-interpretsis-18.script
+../test/tinterpretsisinteg/scripts/int_nr_option-01.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-01.script
+../test/tinterpretsisinteg/scripts/int_nr_option-02.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-02.script
+../test/tinterpretsisinteg/scripts/int_nr_option-03.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-03.script
+../test/tinterpretsisinteg/scripts/int_nr_option-05.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-05.script
+../test/tinterpretsisinteg/scripts/int_nr_option-06.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-06.script
+../test/tinterpretsisinteg/scripts/int_nr_option-07.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-07.script
+../test/tinterpretsisinteg/scripts/int_nr_option-08.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-08.script
+../test/tinterpretsisinteg/scripts/int_nr_option-09.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-09.script
+../test/tinterpretsisinteg/scripts/int_nr_option-10.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-10.script
+../test/tinterpretsisinteg/scripts/int_nr_option-11.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-11.script
+../test/tinterpretsisinteg/scripts/int_nr_option-12.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-12.script
+../test/tinterpretsisinteg/scripts/int_nr_option-13.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-13.script
+../test/tinterpretsisinteg/scripts/int_nr_option-14.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-14.script
+../test/tinterpretsisinteg/scripts/int_nr_option-15.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-15.script
+../test/tinterpretsisinteg/scripts/int_nr_option-16.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-16.script
+../test/tinterpretsisinteg/scripts/int_nr_option-17.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-17.script
+../test/tinterpretsisinteg/scripts/int_nr_option-18.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-18.script
+../test/tinterpretsisinteg/scripts/int_nr_option-19.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-19.script
+../test/tinterpretsisinteg/scripts/int_nr_option-20.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-20.script
+../test/tinterpretsisinteg/scripts/int_nr_option-21.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-21.script
+../test/tinterpretsisinteg/scripts/int_nr_option-22.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-22.script
+../test/tinterpretsisinteg/scripts/int_nr_option-23.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-23.script
+../test/tinterpretsisinteg/scripts/int_nr_option-24.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-24.script
+../test/tinterpretsisinteg/scripts/int_nr_option-25.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-25.script
+../test/tinterpretsisinteg/scripts/int_nr_option-26.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-26.script
+../test/tinterpretsisinteg/scripts/int_nr_option-27.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-27.script
+../test/tinterpretsisinteg/scripts/int_nr_option-28.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-28.script
+../test/tinterpretsisinteg/scripts/int_nr_option-29.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-29.script
+../test/tinterpretsisinteg/scripts/int_nr_option-30.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-30.script
+../test/tinterpretsisinteg/scripts/int_nr_option-31.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-31.script
+../test/tinterpretsisinteg/scripts/int_nr_option-32.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-32.script
+../test/tinterpretsisinteg/scripts/int_nr_option-33.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-33.script
+../test/tinterpretsisinteg/scripts/int_nr_option-34.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-34.script
+../test/tinterpretsisinteg/scripts/int_nr_option-35.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-35.script
+../test/tinterpretsisinteg/scripts/int_nr_option-36.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-36.script
+../test/tinterpretsisinteg/scripts/int_nr_option-37.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-37.script
+../test/tinterpretsisinteg/scripts/int_nr_option-38.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-38.script
+../test/tinterpretsisinteg/scripts/int_nr_option-39.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-39.script
+
 ../test/tinterpretsisinteg/preq2525-interpretsis-01/argumentfile.ini  /epoc32/winscw/c/tswi/tinterpretsisinteg/preq2525-interpretsis-01/argumentfile.ini
 ../test/tinterpretsisinteg/preq2525-interpretsis-02/argumentfile.ini  /epoc32/winscw/c/tswi/tinterpretsisinteg/preq2525-interpretsis-02/argumentfile.ini
 ../test/tinterpretsisinteg/preq2525-interpretsis-03/argumentfile.ini  /epoc32/winscw/c/tswi/tinterpretsisinteg/preq2525-interpretsis-03/argumentfile.ini
@@ -1737,8 +1819,49 @@
 ../test/tinterpretsisinteg/makesisv001_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/makesisv001_db.bat 
 ../test/tinterpretsisinteg/makesisw001_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/makesisw001_db.bat 
 
+../test/tinterpretsisinteg/int_nr_option-01_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-01_db.bat
+../test/tinterpretsisinteg/int_nr_option-02_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-02_db.bat
+../test/tinterpretsisinteg/int_nr_option-03_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-03_db.bat
+../test/tinterpretsisinteg/int_nr_option-04_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-04_db.bat
+../test/tinterpretsisinteg/int_nr_option-05_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-05_db.bat
+../test/tinterpretsisinteg/int_nr_option-06_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-06_db.bat
+../test/tinterpretsisinteg/int_nr_option-07_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-07_db.bat
+../test/tinterpretsisinteg/int_nr_option-08_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-08_db.bat
+../test/tinterpretsisinteg/int_nr_option-09_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-09_db.bat
+../test/tinterpretsisinteg/int_nr_option-10_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-10_db.bat
+../test/tinterpretsisinteg/int_nr_option-11_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-11_db.bat
+../test/tinterpretsisinteg/int_nr_option-12_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-12_db.bat
+../test/tinterpretsisinteg/int_nr_option-13_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-13_db.bat
+../test/tinterpretsisinteg/int_nr_option-14_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-14_db.bat
+../test/tinterpretsisinteg/int_nr_option-15_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-15_db.bat
+../test/tinterpretsisinteg/int_nr_option-16_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-16_db.bat
+../test/tinterpretsisinteg/int_nr_option-17_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-17_db.bat
+../test/tinterpretsisinteg/int_nr_option-18_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-18_db.bat
+../test/tinterpretsisinteg/int_nr_option-19_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-19_db.bat
+../test/tinterpretsisinteg/int_nr_option-20_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-20_db.bat
+../test/tinterpretsisinteg/int_nr_option-21_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-21_db.bat
+../test/tinterpretsisinteg/int_nr_option-22_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-22_db.bat
+../test/tinterpretsisinteg/int_nr_option-23_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-23_db.bat
+../test/tinterpretsisinteg/int_nr_option-24_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-24_db.bat
+../test/tinterpretsisinteg/int_nr_option-25_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-25_db.bat
+../test/tinterpretsisinteg/int_nr_option-26_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-26_db.bat
+../test/tinterpretsisinteg/int_nr_option-27_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-27_db.bat
+../test/tinterpretsisinteg/int_nr_option-28_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-28_db.bat
+../test/tinterpretsisinteg/int_nr_option-29_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-29_db.bat
+../test/tinterpretsisinteg/int_nr_option-30_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-30_db.bat
+../test/tinterpretsisinteg/int_nr_option-31_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-31_db.bat
+../test/tinterpretsisinteg/int_nr_option-32_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-32_db.bat
+../test/tinterpretsisinteg/int_nr_option-33_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-33_db.bat
+../test/tinterpretsisinteg/int_nr_option-34_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-34_db.bat
+../test/tinterpretsisinteg/int_nr_option-35_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-35_db.bat
+../test/tinterpretsisinteg/int_nr_option-36_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-36_db.bat
+../test/tinterpretsisinteg/int_nr_option-37_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-37_db.bat
+../test/tinterpretsisinteg/int_nr_option-38_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-38_db.bat
+../test/tinterpretsisinteg/int_nr_option-39_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-39_db.bat
+
 ../test/tinterpretsisinteg/parameters_file/testcasef009file_db.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/testcasef009file_db.txt
 ../test/tinterpretsisinteg/parameters_file/testcasei003file_db.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/testcasei003file_db.txt
+../test/tinterpretsisinteg/parameters_file/int_nr_option_02_db.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/int_nr_option_02_db.txt
 
 ../test/tinterpretsisinteg/scripts/swi003-001_db.script /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/swi003-001_db.script
 
--- a/secureswitools/swisistools/source/interpretsis/commandparser.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/source/interpretsis/commandparser.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -161,6 +161,7 @@
 		<< "\tdrive\t\tThe drive letter on the device\n"
 		<< "\tmcard\t\tOption to generate the stub SIS file for the installing package\n"
 		<< "\tmcardnr\t\tOption to generate the non-removable stub SIS file for the installing package\n"
+		<< "\tnonremovablepkg\tOption to generate the non-removable SIS file for the installing package\n\n"
 		<< "\tmcardalone\tOption to just create a pre-installed package to the media card\n"
 		<< "\tmcardalonenr\tOption to generate the non-removable stub SIS file for the installing" << std::endl
 		<< "\t\t\tpackage without generating the SISregistry entry\n"
@@ -169,7 +170,7 @@
 
 void CCommandParser::DisplayVersion()
 	{
-	std::cout << "\nINTERPRETSIS  " << " Version  2.1.2 ." << std::endl;
+	std::cout << "\nINTERPRETSIS  " << " Version  2.1.3 ." << std::endl;
 	std::cout << "Copyright (c) 2009 Symbian Software Ltd. All rights reserved.\n " << std::endl;
 	}
  
@@ -543,7 +544,7 @@
 			else if (versionStr == "+MCARDNR")
 				{
 				sisFileName.iGenerateStub = true;
-				sisFileName.iNonRemovable = true;
+				sisFileName.iReadOnly = true;
 				}
 			else if (versionStr == "+MCARDALONE")
 				{
@@ -554,12 +555,16 @@
 				{
 				sisFileName.iGenerateStub = true;
 				sisFileName.iNotRegister = true;
-				sisFileName.iNonRemovable = true;
+				sisFileName.iReadOnly = true;
 				}
 			else if (versionStr == "+SUCERT")
 				{
 				sisFileName.iSUFlag = true;
 				}
+			else if (versionStr == "+NONREMOVABLEPKG")
+				{
+				sisFileName.iNonRemovable = true;
+				}
 			else
 				throw CCommandParser::ECmdLineInvalidSISFileAttribute;
 			}
--- a/secureswitools/swisistools/source/interpretsislib/installer.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/source/interpretsislib/installer.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -128,7 +128,7 @@
 				{
 					InstallSISFile sisFileName(shortName + KDirectorySeparator + *currStr, 
 												curr->iTargetDrive, curr->iGenerateStub, 
-												curr->iNonRemovable, curr->iNotRegister, curr->iSUFlag);
+												curr->iNonRemovable, curr->iReadOnly, curr->iNotRegister, curr->iSUFlag);
 
 					sisFiles.push_back(sisFileName);
 				}
@@ -143,7 +143,7 @@
 				|| (shortName.find(L".sis",0) != std::wstring::npos))
 		{
 			InstallSISFile sisFileName(shortName, curr->iTargetDrive, curr->iGenerateStub, 
-										curr->iNonRemovable, curr->iNotRegister, curr->iSUFlag);
+										curr->iNonRemovable, curr->iReadOnly, curr->iNotRegister, curr->iSUFlag);
 
 			sisFiles.push_back(sisFileName);
 		}
@@ -275,7 +275,7 @@
 		return MISSING_DEPENDENCY;
 	}
 
-	if (!IsValidUpgrade(file, aInstallSISFile.iSUFlag))
+	if (!IsValidUpgrade(file, aInstallSISFile.iSUFlag, aInstallSISFile.iNonRemovable))
 	{
 		return INVALID_UPGRADE;
 	}
@@ -482,10 +482,19 @@
 	}
 
 
-bool Installer::IsValidUpgrade(const SisFile& aFile, bool aSUFlag)
+bool Installer::IsValidUpgrade(const SisFile& aFile, bool aSUFlag, bool aNonRemovable)
 {
 	TUint32 pkg = aFile.GetPackageUid();
 	TUint32 installFlags = aFile.GetInstallFlags();
+
+	if(aNonRemovable)
+	{
+		TUint8 iFlag = 0;
+		iFlag |= CSISInfo::EInstFlagNonRemovable;
+		aFile.AddInstallFlags(iFlag);
+		installFlags = aFile.GetInstallFlags();
+	}
+	
 	bool RUFlag = ((installFlags & CSISInfo::EInstFlagROMUpgrade) &&  CSISInfo::EInstFlagROMUpgrade);
 
 	if(iParamList.RegistryVersionExists())
@@ -510,7 +519,7 @@
 
 	if (iRegistry.IsInstalled(pkg))
 		{
-		ValidateRegistry(aFile,pkg,installFlags,RUFlag);	
+		ValidateRegistry(aFile,pkg,installFlags,RUFlag,aNonRemovable);	
 		}
 	else if (installType == CSISInfo::EInstAugmentation || installType == CSISInfo::EInstPartialUpgrade)
 		{
@@ -525,7 +534,7 @@
 	return true;
 	}
 
-void Installer::ValidateRegistry(const SisFile& aFile, TUint32 aPckgUid, TUint32 aInstallFlags, bool aRUFlag)
+void Installer::ValidateRegistry(const SisFile& aFile, TUint32 aPckgUid, TUint32 aInstallFlags, bool aRUFlag, bool aNonRemovable)
 	{
 	bool isSisNonRemovable = aInstallFlags & CSISInfo::EInstFlagNonRemovable;
 	bool isBaseRemovable = false;
@@ -589,10 +598,13 @@
 		// The only exception is a ROM stub which is upgradable and non-removable by definition.
 		if ((isBaseRemovable == isSisNonRemovable) && !inRom )
 			{
-			std::stringstream err;
-			err << "Cannot install PU (0x" << std::hex << aPckgUid << ") to a base package with a different removable flag type";
+				if(!aNonRemovable)
+				{
+				std::stringstream err;
+				err << "Cannot install PU (0x" << std::hex << aPckgUid << ") to a base package with a different removable flag type";
 
-			throw InterpretSisError(err.str(), INVALID_UPGRADE);
+				throw InterpretSisError(err.str(), INVALID_UPGRADE);
+				}
 			}
 		}
 	else if (installType == CSISInfo::EInstPreInstalledApp)
@@ -1552,7 +1564,7 @@
 
 	aSis.MakeSISStub(ctrl);
 	// If the NR flag is set, change the file attribute to RO
-	if (aInstallSISFile.iNonRemovable)
+	if (aInstallSISFile.iReadOnly)
 	{
 		_wchmod(ctrl.c_str(),_S_IREAD);
 	}
--- a/secureswitools/swisistools/source/interpretsislib/installer.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/source/interpretsislib/installer.h	Fri Mar 19 09:33:35 2010 +0200
@@ -72,9 +72,9 @@
 	bool DependenciesOk(const SisFile& aFile);			// Check to see if the sis file
 														// meets it's dependencies
 
-	bool IsValidUpgrade(const SisFile& aFile, bool aSUFlag);	// Check to see if this is a valid upgrade
+	bool IsValidUpgrade(const SisFile& aFile, bool aSUFlag, bool aNonRemovable);	// Check to see if this is a valid upgrade
 																	// to the existing packages
-	void ValidateRegistry(const SisFile& aFile, TUint32 aPckgUid, TUint32 aInstallFlags, bool aRUFlag);
+	void ValidateRegistry(const SisFile& aFile, TUint32 aPckgUid, TUint32 aInstallFlags, bool aRUFlag, bool aNonRemovable);
 	void InitializeRegistryDetails	( const TUint32 aPckgUid, bool& aIsBaseRemovable, bool& aInRom, bool& aIsPreInstalled, TUint32& aUid, std::wstring& aPackageName );
 
 
--- a/secureswitools/swisistools/source/interpretsislib/parameterlist.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/source/interpretsislib/parameterlist.h	Fri Mar 19 09:33:35 2010 +0200
@@ -45,28 +45,29 @@
 	 * Default constructor. 
 	 */
 	InstallSISFile() : iFileName(L""), iTargetDrive(L'$'), iGenerateStub(false),
-						iNonRemovable(false), iNotRegister(false), iSUFlag(false) {}
+						iNonRemovable(false),iReadOnly(false), iNotRegister(false), iSUFlag(false) {}
 
 	/**
 	 * Constructor
 	 */
 	InstallSISFile(std::wstring aName, int aDrive, bool aSUFlag)
 		: iFileName(aName), iTargetDrive(aDrive), iGenerateStub(false), 
-			iNonRemovable(false), iNotRegister(false), iSUFlag(aSUFlag) {}
+			iNonRemovable(false),iReadOnly(false), iNotRegister(false), iSUFlag(aSUFlag) {}
 
 	/**
 	 * Constructor
 	 */
 	InstallSISFile(std::wstring aName, int aDrive, bool aGenerateStub, bool aNonRemovable,
-					bool aNotRegister, bool aSUFlag)
+					bool aReadOnly, bool aNotRegister, bool aSUFlag)
 		: iFileName(aName), iTargetDrive(aDrive), iGenerateStub(aGenerateStub), 
-			iNonRemovable(aNonRemovable), iNotRegister(aNotRegister), iSUFlag(aSUFlag) {}
+			iNonRemovable(aNonRemovable), iReadOnly(aReadOnly), iNotRegister(aNotRegister), iSUFlag(aSUFlag) {}
 
 public:
 	std::wstring iFileName; // SIS file name
 	int iTargetDrive;		// Target drive
 	bool iGenerateStub;		// Whether to generate stub sis file for this sis or not.
 	bool iNonRemovable;		// Whether this is a non-removable SIS or not.
+	bool iReadOnly;		    // Whether this is a Readonly SIS or not.
 	bool iNotRegister;		// Whether to register the sis or not.
 	bool iSUFlag;			// Whether SU flag is set for this or not.
 	};
--- a/secureswitools/swisistools/source/interpretsislib/sisfile.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/source/interpretsislib/sisfile.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -301,6 +301,11 @@
 	return iContents.Controller().SISInfo().InstallationFlag();
 	}
 
+void SisFile::AddInstallFlags(const TUint8 aFlag) const
+	{
+	iContents.Controller().AddInstallFlag(aFlag);
+	}
+
 TUint32 SisFile::GetLanguage() const
 	{
 	return iContents.Controller().Language(0);
--- a/secureswitools/swisistools/source/interpretsislib/sisfile.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/source/interpretsislib/sisfile.h	Fri Mar 19 09:33:35 2010 +0200
@@ -77,6 +77,7 @@
 	TUint32 GetSigned() const;
 	TUint32 GetInstallType() const;
 	TUint32 GetInstallFlags() const;
+	void AddInstallFlags(const TUint8 aFlag) const;
 
 	TUint32 GetLanguage() const;
 
--- a/secureswitools/swisistools/source/interpretsislib/sisregistry.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/source/interpretsislib/sisregistry.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -774,7 +774,7 @@
 	TUint32 pkg = aSis.GetPackageUid();
 
 	SisRegistryObject* obj = GetRegistryObjectPtr(pkg);
-	obj->UpgradeEntry(aSis, aFiles, aInstallSISFile.iTargetDrive, aInstallSISFile.iSUFlag, iConfigManager);
+	obj->UpgradeEntry(aSis, aFiles, aInstallSISFile.iTargetDrive, aInstallSISFile.iSUFlag, aInstallSISFile.iNonRemovable, iConfigManager);
 
  	// Update/Create the .reg and .ctl files
 	GenerateRegistryEntry(*obj, aSis);
--- a/secureswitools/swisistools/source/interpretsislib/sisregistryobject.cpp	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/source/interpretsislib/sisregistryobject.cpp	Fri Mar 19 09:33:35 2010 +0200
@@ -604,7 +604,7 @@
 	return 0;
 }
 
-void SisRegistryObject::UpgradeEntry(const SisFile& aSis, const InstallableFiles& aFiles, TInt aInstallDrive, const bool aSUFlag, ConfigManager& aConfigManager)
+void SisRegistryObject::UpgradeEntry(const SisFile& aSis, const InstallableFiles& aFiles, TInt aInstallDrive, const bool aSUFlag, const bool aIsRemovable, ConfigManager& aConfigManager)
 {
 	// Version
 	iVersion = aSis.GetVersion();
@@ -621,6 +621,8 @@
 
 	iSignedBySuCert = aSUFlag;
 
+	if(aIsRemovable)
+		iIsRemovable = false;
 	iTrust = KSisPackageCertificateChainValidatedToTrustAnchor;
 
 	iTrustTimeStamp = 0;
--- a/secureswitools/swisistools/source/interpretsislib/sisregistryobject.h	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/source/interpretsislib/sisregistryobject.h	Fri Mar 19 09:33:35 2010 +0200
@@ -201,7 +201,7 @@
 
 	// Update the entry for a PU installation
 	void UpgradeEntry(const SisFile& aSis, const InstallableFiles& aFiles, 
-					TInt aInstallDrive, const bool aSUFlag, ConfigManager& aConfigManager);
+					TInt aInstallDrive, const bool aSUFlag, const bool aIsRemovable, ConfigManager& aConfigManager);
 					
 	#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 	void SetValidationStatus(bool aOriginVerificationStatus);
Binary file secureswitools/swisistools/test/tinterpretsisinteg/data/int_nr_option_01_stub.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-01.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,48 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_01
+REM int_nr_option_01 - Install a SIS file with NR CLI option set. This is a positive testcase. Expected Result : SIS file is Installed.
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-01_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,52 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_01
+REM int_nr_option_01 - Install a SIS file with NR CLI option set. This is a positive testcase. Expected Result : SIS file is Installed.
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-02.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,48 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_02
+REM int_nr_option_02 - Install a SIS file with NR CLI option set in parameter file. This is a positive testcase. Expected Result : SIS file is Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000087\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000087\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000087\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000087\*.ctl > NUL
+
+call interpretsis -p \epoc32\winscw\c\tswi\tinterpretsisinteg\parameters_file\int_nr_option_02.txt
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-02_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,52 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_02
+REM int_nr_option_02 - Install a SIS file with NR CLI option set in parameter file. This is a positive testcase. Expected Result : SIS file is Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000087\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000087\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000087\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000087\*.ctl > NUL
+
+call interpretsis -p \epoc32\winscw\c\tswi\tinterpretsisinteg\parameters_file\int_nr_option_02_db.txt
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-03.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_03
+REM int_nr_option_03 - Install a SIS file (SA) without NR CLI option set. then install PU for the same SIS file with NR CLI option set. This is a positive testcase. Expected Result : SIS files (SA and PU) are Installed.
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-03_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_03
+REM int_nr_option_03 - Install a SIS file (SA) without NR CLI option set. then install PU for the same SIS file with NR CLI option set. This is a positive testcase. Expected Result : SIS files (SA and PU) are Installed.
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-04.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_04
+REM int_nr_option_04 - Install a SIS file (SA) without NR CLI option set. then install SP for the same SIS file with NR CLI option set. This is a negative testcase. Expected Result : SP is not installed.
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-04_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_04
+REM int_nr_option_04 - Install a SIS file (SA) without NR CLI option set. then install SP for the same SIS file with NR CLI option set. This is a negative testcase. Expected Result : SP is not installed.
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-05.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_05
+REM int_nr_option_05 - Install a SIS file without NR CLI option set (SA over SA). This is a positive testcase. Expected Result : SIS file is Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-05_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_05
+REM int_nr_option_05 - Install a SIS file without NR CLI option set (SA over SA). This is a positive testcase. Expected Result : SIS file is Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-06.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_06
+REM int_nr_option_06 -  SA over SA(NR). This is a positive testcase. Expected Result : SIS file is Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-06_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_06
+REM int_nr_option_06 -  SA over SA(NR). This is a positive testcase. Expected Result : SIS file is Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-07.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_07
+REM int_nr_option_07 -  SA(NR) over SA(NR). This is a positive testcase. Expected Result : SIS file is Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-07_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_07
+REM int_nr_option_07 -  SA(NR) over SA(NR). This is a positive testcase. Expected Result : SIS file is Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-08.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_08
+REM int_nr_option_08 -  SP over SA. This is a positive testcase. Expected Result : SIS file is Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-08_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_08
+REM int_nr_option_08 -  SP over SA. This is a positive testcase. Expected Result : SIS file is Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-09.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_09
+REM int_nr_option_09 -  SP over SA(NR). This is a positive testcase. Expected Result : SIS file (SP and SA) are Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-09_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_09
+REM int_nr_option_09 -  SP over SA(NR). This is a positive testcase. Expected Result : SIS file (SP and SA) are Installed. 
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-10.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_10
+REM int_nr_option_10 -  SP(NR) over SA(NR). This is a positive testcase. SIS file (SP and SA) are Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-10_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_10
+REM int_nr_option_10 -  SP(NR) over SA(NR). This is a positive testcase. SIS file (SP and SA) are Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-11.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_11
+REM int_nr_option_11 -  PU over SA. This is a positive testcase. SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-11_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_11
+REM int_nr_option_11 -  PU over SA. This is a positive testcase. SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-12.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_12
+REM int_nr_option_12 -  PU over SA(NR). This is a positive testcase. SIS file is not Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-12_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_12
+REM int_nr_option_12 -  PU over SA(NR). This is a positive testcase. SIS file is not Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-13.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,49 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_13
+REM int_nr_option_13 -  PU(NR) over SA(NR). This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-13_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,53 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_13
+REM int_nr_option_13 -  PU(NR) over SA(NR). This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-14.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_14
+REM int_nr_option_14 -  SA over SA+SP. This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-14_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_14
+REM int_nr_option_14 -  SA over SA+SP. This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-15.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_15
+REM int_nr_option_15 -  SA (NR) over SA+SP. This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-15_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_15
+REM int_nr_option_15 -  SA (NR) over SA+SP. This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-16.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_16
+REM int_nr_option_16 -  SA over SA(NR) + SP. This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-16_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_16
+REM int_nr_option_16 -  SA over SA(NR) + SP. This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-17.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_17
+REM int_nr_option_17 -  SA(NR) over SA(NR) + SP. This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-17_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_17
+REM int_nr_option_17 -  SA(NR) over SA(NR) + SP. This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-18.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_18
+REM int_nr_option_18 -  SA over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-18_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_18
+REM int_nr_option_18 -  SA over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-19.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_19
+REM int_nr_option_19 -  SA(NR) over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-19_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_19
+REM int_nr_option_19 -  SA(NR) over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-20.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_20
+REM int_nr_option_20 -  SP over SA + SP. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-20_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_20
+REM int_nr_option_20 -  SP over SA + SP. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-21.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_21
+REM int_nr_option_21 -  SP over SA(NR) + SP. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-21_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_21
+REM int_nr_option_21 -  SP over SA(NR) + SP. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-22.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_22
+REM int_nr_option_22 -  SP over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-22_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_22
+REM int_nr_option_22 -  SP over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-23.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_23
+REM int_nr_option_23 -  SP(NR) over SA + SP. This is a positive testcase. Expected result : SIS file is not Installed.    
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis  -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-23_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_23
+REM int_nr_option_23 -  SP(NR) over SA + SP. This is a positive testcase. Expected result : SIS file is not Installed.    
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis  -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-24.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_24
+REM int_nr_option_24 -  SP(NR) over SA(NR) + SP. This is a positive testcase. Expected result : SIS file is Installed.    
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-24_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_24
+REM int_nr_option_24 -  SP(NR) over SA(NR) + SP. This is a positive testcase. Expected result : SIS file is Installed.    
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-25.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_25
+REM int_nr_option_25 -  SP(NR) over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-25_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_25
+REM int_nr_option_25 -  SP(NR) over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-26.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_26
+REM int_nr_option_26 -  PU over SA + SP. This is a positive testcase. Expected result : SIS file is Installed.    
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-26_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_26
+REM int_nr_option_26 -  PU over SA + SP. This is a positive testcase. Expected result : SIS file is Installed.    
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-27.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_27
+REM int_nr_option_27 -  PU over SA(NR) + SP. This is a positive testcase. Expected result : SIS file is not Installed.    
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-27_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_27
+REM int_nr_option_27 -  PU over SA(NR) + SP. This is a positive testcase. Expected result : SIS file is not Installed.    
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-28.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_28
+REM int_nr_option_28 -  PU over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is not Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-28_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_28
+REM int_nr_option_28 -  PU over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is not Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-29.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_29
+REM int_nr_option_29 -  PU(NR) over SA + SP. This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-29_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_29
+REM int_nr_option_29 -  PU(NR) over SA + SP. This is a positive testcase. SIS file is Installed.   
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-30.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_30
+REM int_nr_option_30 -  PU(NR) over SA(NR) + SP. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-30_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_30
+REM int_nr_option_30 -  PU(NR) over SA(NR) + SP. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-31.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,50 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_31
+REM int_nr_option_31 -  PU(NR) over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-31_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_31
+REM int_nr_option_31 -  PU(NR) over SA(NR) + SP(NR). This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-32.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_32
+REM int_nr_option_32 -  SA over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_03.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-32_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,55 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_32
+REM int_nr_option_32 -  SA over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_03.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-33.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_33
+REM int_nr_option_33 -  SA(NR) over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_03.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-33_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,55 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_33
+REM int_nr_option_33 -  SA(NR) over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_03.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-34.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_34
+REM int_nr_option_34 -  SP over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-34_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,55 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_34
+REM int_nr_option_34 -  SP over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-35.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_35
+REM int_nr_option_35 -  SP(NR) over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-35_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,55 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_35
+REM int_nr_option_35 -  SP(NR) over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-36.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_36
+REM int_nr_option_36 -  PU over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-36_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,55 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_36
+REM int_nr_option_36 -  PU over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-37.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,51 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_36
+REM int_nr_option_36 -  PU(NR) over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-37_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,55 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_36
+REM int_nr_option_36 -  PU(NR) over Rom Stub. This is a positive testcase. Expected result : SIS file is Installed.  
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\int_nr_option_01_stub.sis .\romdrive\system\install\int_nr_option_01_stub.sis /Y > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +nonremovablepkg -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist .\romdrive\system\install\int_nr_option_01_stub.sis del .\romdrive\system\install\int_nr_option_01_stub.sis > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-38.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,54 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_38
+REM int_nr_option_38 - Install a SIS file with NR CLI option and +mcard option set. This is a positive testcase. Expected Result : SIS file is Installed.
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+if not exist \epoc32\winscw\e mkdir \epoc32\winscw\e
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+if exist  \epoc32\winscw\e\Documents\abc*.txt  del \epoc32\winscw\e\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis  +e +mcard +nonremovablepkg -w info -i \epoc32\winscw\c\tswi\tinterpretsisinteg\parameters_file\int_nr_option_38.txt -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\backup.lst del \epoc32\winscw\e\sys\install\sisregistry\backup.lst > NUL
+if not exist  \epoc32\winscw\e\Documents\abc1.txt  GOTO LAST
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-38_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,58 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_38
+REM int_nr_option_38 - Install a SIS file with NR CLI option and +mcard option set. This is a positive testcase. Expected Result : SIS file is Installed.
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+if not exist \epoc32\winscw\e mkdir \epoc32\winscw\e
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist  \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+if exist  \epoc32\winscw\e\Documents\abc*.txt  del \epoc32\winscw\e\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis  +e +mcard +nonremovablepkg -w info -i \epoc32\winscw\c\tswi\tinterpretsisinteg\parameters_file\int_nr_option_38.txt -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\backup.lst del \epoc32\winscw\e\sys\install\sisregistry\backup.lst > NUL
+if not exist  \epoc32\winscw\e\Documents\abc1.txt  GOTO LAST
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-39.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,71 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_39
+REM int_nr_option_39 - Install a SIS file with NR CLI option and +mcardalone option set. This is a positive testcase. Expected Result : SIS file is Installed.
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+if not exist \epoc32\winscw\e mkdir \epoc32\winscw\e
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000087\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000087\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000087\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000087\*.ctl > NUL
+if exist  \epoc32\winscw\e\Documents\abc*.txt  del \epoc32\winscw\e\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl > NUL
+
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis  +e +mcardalone +nonremovablepkg -w info -i \epoc32\winscw\c\tswi\tinterpretsisinteg\parameters_file\int_nr_option_38.txt -l /epoc32/winscw/c/interpretsis_test_harness.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\backup.lst del \epoc32\winscw\e\sys\install\sisregistry\backup.lst > NUL
+if not exist  \epoc32\winscw\e\Documents\abc1.txt  GOTO LAST
+@rem Cleaning all residue file
+if exist  \epoc32\winscw\e\Documents\abc*.txt  del \epoc32\winscw\e\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086 rmdir \epoc32\winscw\c\sys\install\sisregistry\80000086 > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000087 rmdir \epoc32\winscw\c\sys\install\sisregistry\80000087 > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086 rmdir \epoc32\winscw\e\sys\install\sisregistry\80000086 > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry rmdir \epoc32\winscw\e\sys\install\sisregistry > NUL
+if exist \epoc32\winscw\e\sys\install rmdir \epoc32\winscw\e\sys\install > NUL
+if exist \epoc32\winscw\e\sys rmdir \epoc32\winscw\e\sys > NUL
+if exist \epoc32\winscw\e\private\10202dce\*.sis del \epoc32\winscw\e\private\10202dce\*.sis > NUL
+if exist \epoc32\winscw\e\private\10202dce rmdir \epoc32\winscw\e\private\10202dce > NUL
+if exist \epoc32\winscw\e\private rmdir \epoc32\winscw\e\private > NUL
+if exist \epoc32\winscw\e\Documents rmdir \epoc32\winscw\e\Documents > NUL
+if exist \epoc32\winscw\e rmdir \epoc32\winscw\e > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_nr_option-39_db.bat	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,76 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM int_nr_option_39
+REM int_nr_option_39 - Install a SIS file with NR CLI option and +mcardalone option set. This is a positive testcase. Expected Result : SIS file is Installed.
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\cdrive\Documents mkdir .\cdrive\Documents > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+if not exist .\romdrive\system\ mkdir .\romdrive\system\ > NUL
+if not exist .\romdrive\system\install\ mkdir .\romdrive\system\install\ > NUL
+if not exist \epoc32\winscw\e mkdir \epoc32\winscw\e
+REM Remove installation files from any previous tests
+if exist  .\cdrive\Documents\InstTest\Equivalent*.txt  del .\cdrive\Documents\InstTest\Equivalent*.txt  > NUL
+
+xcopy /E /Y backup\cdrive cdrive > NUL
+xcopy /E /Y backup\romdrive romdrive > NUL
+
+REM Remove installation files from any previous tests
+if exist \epoc32\winscw\c\Documents\abc*.txt  del \epoc32\winscw\c\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000086\*.ctl > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000087\*.reg del \epoc32\winscw\c\sys\install\sisregistry\80000087\*.reg > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000087\*.ctl del \epoc32\winscw\c\sys\install\sisregistry\80000087\*.ctl > NUL
+if exist  \epoc32\winscw\e\Documents\abc*.txt  del \epoc32\winscw\e\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl > NUL
+
+
+call interpretsis -z .\romdrive -c .\cdrive  -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis  +e +mcardalone +nonremovablepkg -w info -i \epoc32\winscw\c\tswi\tinterpretsisinteg\parameters_file\int_nr_option_38.txt -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+if not %errorlevel%==0 GOTO LAST
+if not exist \epoc32\winscw\c\Documents mkdir \epoc32\winscw\c\Documents
+call xcopy .\cdrive\Documents \epoc32\winscw\c\Documents /S /Y > NUL
+REM call xcopy .\cdrive\sys\install\sisregistry \epoc32\winscw\c\sys\install\sisregistry /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\scr\scr.db del \epoc32\winscw\c\sys\install\scr\scr.db > NUL
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\backup.lst del \epoc32\winscw\e\sys\install\sisregistry\backup.lst > NUL
+if not exist  \epoc32\winscw\e\Documents\abc1.txt  GOTO LAST
+@rem Cleaning all residue file
+if exist  \epoc32\winscw\e\Documents\abc*.txt  del \epoc32\winscw\e\Documents\abc*.txt  > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.reg > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl del \epoc32\winscw\e\sys\install\sisregistry\80000086\*.ctl > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000086 rmdir \epoc32\winscw\c\sys\install\sisregistry\80000086 > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\80000087 rmdir \epoc32\winscw\c\sys\install\sisregistry\80000087 > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry\80000086 rmdir \epoc32\winscw\e\sys\install\sisregistry\80000086 > NUL
+if exist \epoc32\winscw\e\sys\install\sisregistry rmdir \epoc32\winscw\e\sys\install\sisregistry > NUL
+if exist \epoc32\winscw\e\sys\install rmdir \epoc32\winscw\e\sys\install > NUL
+if exist \epoc32\winscw\e\sys rmdir \epoc32\winscw\e\sys > NUL
+if exist \epoc32\winscw\e\private\10202dce\*.sis del \epoc32\winscw\e\private\10202dce\*.sis > NUL
+if exist \epoc32\winscw\e\private\10202dce rmdir \epoc32\winscw\e\private\10202dce > NUL
+if exist \epoc32\winscw\e\private rmdir \epoc32\winscw\e\private > NUL
+if exist \epoc32\winscw\e\Documents rmdir \epoc32\winscw\e\Documents > NUL
+if exist \epoc32\winscw\e rmdir \epoc32\winscw\e > NUL
+
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/parameters_file/int_nr_option_02.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,5 @@
+-z ./romdrive 
+-c ./cdrive  
+-s /epoc32/winscw/c/tswi/tsis/data/int_nr_option_02.sis +nonremovablepkg 
+-w info 
+-l /epoc32/winscw/c/interpretsis_test_harness.txt
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/parameters_file/int_nr_option_02_db.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,5 @@
+-z ./romdrive 
+-c ./cdrive  
+-s /epoc32/winscw/c/tswi/tsis/data/int_nr_option_02.sis +nonremovablepkg 
+-w info 
+-l /epoc32/winscw/c/interpretsis_test_harness_db.txt
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/parameters_file/int_nr_option_04.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+appcap2.txt
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/parameters_file/int_nr_option_38.txt	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,1 @@
+DRIVE = \epoc32\winscw\e e ext
\ No newline at end of file
--- a/secureswitools/swisistools/test/tinterpretsisinteg/scripts/ini.ini	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/ini.ini	Fri Mar 19 09:33:35 2010 +0200
@@ -432,6 +432,48 @@
 exist1=c:\Documents\InstTest\upgrade2.txt
 exist2=c:\Documents\InstTest\upgrade3.txt
 
+[NR-OPTION-01_checkfiles]
+numexist=1
+exist0=c:\Documents\abc1.txt
+
+[NR-OPTION-02_checkfiles]
+numexist=1
+exist0=c:\Documents\abc2.txt
+
+[NR-OPTION-03_checkfiles]
+numexist=3
+exist0=c:\Documents\abc1.txt
+exist1=c:\Documents\abc2.txt
+exist2=c:\Documents\abc3.txt
+
+[NR-OPTION-04_checkfiles]
+numexist=2
+exist0=c:\Documents\abc1.txt
+exist1=c:\Documents\abc2.txt
+
+[NR-OPTION-05_checkfiles]
+numexist=2
+exist0=c:\Documents\abc1.txt
+exist1=c:\Documents\abc3.txt
+
+[NR-OPTION-06_checkfiles]
+numexist=1
+exist0=c:\Documents\abc3.txt
+
+[NR-OPTION-01]
+uid=80000086
+script=c:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
+[NR-OPTION-02]
+uid=80000087
+script=c:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
+[NR-OPTION-03]
+uid=80000086
+vendorName=Nokia
+packageName=Interpretsis_NR_option_SP
+script=c:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
 [uSWI002-004-SP]
 uid=811111FD
 vendorName=Vendor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-01.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-01
+//! @SYMTestCaseDesc 	Install a SIS file with NR CLI option set. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned as SIS file is NR.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-01
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-01
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-02.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-02
+//! @SYMTestCaseDesc 	Install a SIS file with NR CLI option set in parameter file. This is a positive testcase
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned as SIS file is NR.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-02
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-02_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-02
+
+END_TESTCASE INT_NR_Option-02
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-03.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-03
+//! @SYMTestCaseDesc 	Install a SIS file (SA) without NR CLI option set. then install PU for the same SIS file with NR CLI option set. This is a positive testcase
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned as SIS file is NR.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-03
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-04_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-03
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-05.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-05
+//! @SYMTestCaseDesc 	Install a SIS file without NR CLI option set. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is uninstalled.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-05
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-05
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-06.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-06
+//! @SYMTestCaseDesc 	SA over SA(NR) This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is uninstalled.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-06
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-06
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-07.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-07
+//! @SYMTestCaseDesc 	SA(NR) over SA(NR) This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is uninstalled.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-07
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-07
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-08.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-08
+//! @SYMTestCaseDesc 	SP over SA This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SP SIS file
+//! @SYMTestExpectedResults 	SP SIS file is uninstalled.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-08
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-05_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-08
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-09.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-09
+//! @SYMTestCaseDesc 	SP over SA(NR) This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SP SIS file
+//! @SYMTestExpectedResults 	SP SIS file is uninstalled.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-09
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-05_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallAugStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-03
+
+END_TESTCASE INT_NR_Option-09
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-10.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-10
+//! @SYMTestCaseDesc 	SP (NR) over SA(NR) This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SP SIS file
+//! @SYMTestExpectedResults 	error code -5 returned.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-10
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-05_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallAugStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-03
+
+END_TESTCASE INT_NR_Option-10
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-11.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-11
+//! @SYMTestCaseDesc 	PU over SA. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is uninstalled
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-11
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-04_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-11
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-12.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,35 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-12
+//! @SYMTestCaseDesc 	PU over SA(NR). This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is never installed
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-12
+
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-13.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-13
+//! @SYMTestCaseDesc 	PU(NR) over SA(NR). This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-13
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-04_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-13
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-14.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-14
+//! @SYMTestCaseDesc 	SA over SA+SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is uninstalled
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-14
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-14
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-15.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-15
+//! @SYMTestCaseDesc 	SA (NR) over SA+SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-15
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-15
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-16.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-16
+//! @SYMTestCaseDesc 	SA over SA(NR) + SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file uninstalled
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-16
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-16
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-17.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-17
+//! @SYMTestCaseDesc 	SA(NR) over SA(NR) + SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-17
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-17
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-18.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-18
+//! @SYMTestCaseDesc 	SA over SA(NR) + SP(NR). This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is uninstalled
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-18
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-18
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-19.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-19
+//! @SYMTestCaseDesc 	SA(NR) over SA(NR) + SP(NR). This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-19
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-19
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-20.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-20
+//! @SYMTestCaseDesc 	SP over SA + SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SP in uninstalled
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-20
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-05_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallAugStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-03
+
+END_TESTCASE INT_NR_Option-20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-21.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-21
+//! @SYMTestCaseDesc 	SP over SA(NR) + SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SP in uninstalled
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-21
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-05_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallAugStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-03
+
+END_TESTCASE INT_NR_Option-21
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-22.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-22
+//! @SYMTestCaseDesc 	SP over SA(NR) + SP(NR). This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SP in uninstalled
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-22
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-05_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallAugStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-03
+
+END_TESTCASE INT_NR_Option-22
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-23.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,35 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-23
+//! @SYMTestCaseDesc 	SP(NR) over SA + SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SP(NR) is not installed
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-23
+
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallAugStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-03
+
+END_TESTCASE INT_NR_Option-23
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-24.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-24
+//! @SYMTestCaseDesc 	SP(NR) over SA(NR) + SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-24
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-05_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallAugStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-03
+
+END_TESTCASE INT_NR_Option-24
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-25.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-25
+//! @SYMTestCaseDesc 	SP(NR) over SA(NR) + SP(NR). This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-25
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-05_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallAugStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-03
+
+END_TESTCASE INT_NR_Option-25
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-26.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-26
+//! @SYMTestCaseDesc 	PU over SA + SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file uninstalled
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-26
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-03_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-26
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-27.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,35 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-27
+//! @SYMTestCaseDesc 	PU over SA(NR) + SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is not installed
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-27
+
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-27
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-28.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,35 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-28
+//! @SYMTestCaseDesc 	PU over SA(NR) + SP(NR). This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is not installed
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-28
+
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-28
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-29.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-29
+//! @SYMTestCaseDesc 	PU(NR) over SA + SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is not installed
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-29
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-03_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-29
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-30.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-30
+//! @SYMTestCaseDesc 	PU(NR) over SA(NR) + SP. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is not installed
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-30
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-03_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-30
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-31.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-31
+//! @SYMTestCaseDesc 	PU(NR) over SA(NR) + SP(NR). This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-31
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-03_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-31
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-32.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-32
+//! @SYMTestCaseDesc 	SA over Rom Stub. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is uninstalled
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-32
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-32
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-33.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-33
+//! @SYMTestCaseDesc 	SA(NR) over Rom Stub. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-33
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-01_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-33
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-34.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-34
+//! @SYMTestCaseDesc 	SP over Rom Stub. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	SIS file is installed
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-34
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-06_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallAugStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-03
+
+END_TESTCASE INT_NR_Option-34
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-35.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-35
+//! @SYMTestCaseDesc 	SP(NR) over Rom Stub. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-35
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-06_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallAugStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-03
+
+END_TESTCASE INT_NR_Option-35
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-36.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-36
+//! @SYMTestCaseDesc 	PU over Rom Stub. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-36
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-02_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-36
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-37.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,36 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-37
+//! @SYMTestCaseDesc 	PU(NR) over Rom Stub. This is a positive testcase 
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-37
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini NR-OPTION-02_checkfiles
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-37
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-38.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,35 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-38
+//! @SYMTestCaseDesc 	Install a SIS file with NR CLI option and +mcard option set.
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned as SIS file is NR.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-38
+
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-38
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_nr_option-39.script	Fri Mar 19 09:33:35 2010 +0200
@@ -0,0 +1,35 @@
+// 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 the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT_NR_Option-39
+//! @SYMTestCaseDesc 	Install a SIS file with NR CLI option and +mcardalone option set.
+//! @SYMPREQ  			405-4255
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Uninstall the installed SIS file
+//! @SYMTestExpectedResults 	error code -5 returned as SIS file is NR.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+START_TESTCASE INT_NR_Option-39
+
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT_NR_Option-39
--- a/secureswitools/swisistools/test/tinterpretsisinteg/scripts/tintsisi003.script	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/tintsisi003.script	Fri Mar 19 09:33:35 2010 +0200
@@ -41,20 +41,23 @@
 //! @SYMTestType		CIT
 //////////////////////////////////////////////////////////////////////////////////////////////
 
+//Backup code in SWI is modified to return error for NR packages. So restore is also not possible.
+
+
 START_TESTCASE API-SEC-SWI-INTERPRETSIS-I003-0001
 
 RUN_TEST_STEP	100	tbackuprestore	PRESENT	c:\tswi\tinterpretsisinteg\scripts\ini.ini	I003A
 
-RUN_TEST_STEP	100	tbackuprestore	BACKUP	c:\tswi\tinterpretsisinteg\scripts\ini.ini	I003A
+RUN_TEST_STEP_RESULT -5	100	tbackuprestore	BACKUP	c:\tswi\tinterpretsisinteg\scripts\ini.ini	I003A
 RUN_TEST_STEP	100	tbackuprestore	PRESENT	c:\tswi\tinterpretsisinteg\scripts\ini.ini	I003A
 
-RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove   c:\tswi\tinterpretsisinteg\scripts\ini.ini I003removeregistrysisfile
+//RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove   c:\tswi\tinterpretsisinteg\scripts\ini.ini I003removeregistrysisfile
 //DELAY is given so that the backup.ctl file will be created in this time
-DELAY 5000
-RUN_TEST_STEP	100	tbackuprestore	ABSENT	c:\tswi\tinterpretsisinteg\scripts\ini.ini	I003A
+//DELAY 5000
+//RUN_TEST_STEP	100	tbackuprestore	ABSENT	c:\tswi\tinterpretsisinteg\scripts\ini.ini	I003A
 
-RUN_TEST_STEP	100	tbackuprestore	RESTORE	c:\tswi\tinterpretsisinteg\scripts\ini.ini	I003A
-RUN_TEST_STEP	100	tbackuprestore	PRESENT	c:\tswi\tinterpretsisinteg\scripts\ini.ini	I003A
+//RUN_TEST_STEP	100	tbackuprestore	RESTORE	c:\tswi\tinterpretsisinteg\scripts\ini.ini	I003A
+//RUN_TEST_STEP	100	tbackuprestore	PRESENT	c:\tswi\tinterpretsisinteg\scripts\ini.ini	I003A
 
 //RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove   c:\tswi\tinterpretsisinteg\scripts\ini.ini I003removeregistrysisfile
 //DELAY 5000
Binary file secureswitools/swisistools/test/tinterpretsisinteg/testdataf006/privatefolderdef.pkg has changed
Binary file secureswitools/swisistools/test/tinterpretsisinteg/testdatainc124436/inc124436.pkg has changed
--- a/secureswitools/swisistools/test/tinterpretsisinteg/testlist.xml	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/testlist.xml	Fri Mar 19 09:33:35 2010 +0200
@@ -1625,5 +1625,238 @@
 	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\check.pl">API-INST-PREQ2525-InterpretSIS-19 preq2525-interpretsis-19.txt 1 "positive" "none"</check>
 	</test>
 
+<test id="INT_NR_Option-01" type="nativeonly">
+	<title>INT_NR_Option-01</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-01.bat  INT_NR_Option-01</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-01  INT_NR_Option-01 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-01.script" "int_nr_option-01.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-02" type="nativeonly">
+	<title>INT_NR_Option-02</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-02.bat  INT_NR_Option-02</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-02  INT_NR_Option-02 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-02.script" "int_nr_option-02.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-03" type="nativeonly">
+	<title>INT_NR_Option-03</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-03.bat  INT_NR_Option-01</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-03  INT_NR_Option-03 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-03.script" "int_nr_option-03.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-04" type="nativeonly">
+	<title>INT_NR_Option-04</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-04.bat INT_NR_Option-04</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\check.pl">INT_NR_Option-04 int_nr_option_04.txt 1 "negative" "none"</check>
+	</test>
+	
+<test id="INT_NR_Option-05" type="nativeonly">
+	<title>INT_NR_Option-05</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-05.bat  INT_NR_Option-05</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-05  INT_NR_Option-05 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-05.script" "int_nr_option-05.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-06" type="nativeonly">
+	<title>INT_NR_Option-06</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-06.bat  INT_NR_Option-06</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-06  INT_NR_Option-06 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-06.script" "int_nr_option-06.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-07" type="nativeonly">
+	<title>INT_NR_Option-07</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-07.bat  INT_NR_Option-07</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-07  INT_NR_Option-07 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-07.script" "int_nr_option-07.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
 
+<test id="INT_NR_Option-08" type="nativeonly">
+	<title>INT_NR_Option-08</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-08.bat  INT_NR_Option-08</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-08  INT_NR_Option-08 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-08.script" "int_nr_option-08.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-09" type="nativeonly">
+	<title>INT_NR_Option-09</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-09.bat  INT_NR_Option-09</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-09  INT_NR_Option-09 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-09.script" "int_nr_option-09.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-10" type="nativeonly">
+	<title>INT_NR_Option-10</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-10.bat  INT_NR_Option-10</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-10  INT_NR_Option-10 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-10.script" "int_nr_option-10.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-11" type="nativeonly">
+	<title>INT_NR_Option-11</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-11.bat  INT_NR_Option-11</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-11  INT_NR_Option-11 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-11.script" "int_nr_option-11.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-12" type="nativeonly">
+	<title>INT_NR_Option-12</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-12.bat  INT_NR_Option-12</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-12  INT_NR_Option-12 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-12.script" "int_nr_option-12.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-13" type="nativeonly">
+	<title>INT_NR_Option-13</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-13.bat  INT_NR_Option-13</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-13  INT_NR_Option-13 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-13.script" "int_nr_option-13.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-14" type="nativeonly">
+	<title>INT_NR_Option-14</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-14.bat  INT_NR_Option-14</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-14  INT_NR_Option-14 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-14.script" "int_nr_option-14.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-15" type="nativeonly">
+	<title>INT_NR_Option-15</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-15.bat  INT_NR_Option-15</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-15  INT_NR_Option-15 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-15.script" "int_nr_option-15.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-16" type="nativeonly">
+	<title>INT_NR_Option-16</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-16.bat  INT_NR_Option-16</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-16  INT_NR_Option-16 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-16.script" "int_nr_option-16.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-17" type="nativeonly">
+	<title>INT_NR_Option-17</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-17.bat  INT_NR_Option-17</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-17  INT_NR_Option-17 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-17.script" "int_nr_option-17.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-18" type="nativeonly">
+	<title>INT_NR_Option-18</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-18.bat  INT_NR_Option-18</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-18  INT_NR_Option-18 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-18.script" "int_nr_option-18.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-19" type="nativeonly">
+	<title>INT_NR_Option-19</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-19.bat  INT_NR_Option-19</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-19  INT_NR_Option-19 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-19.script" "int_nr_option-19.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-20" type="nativeonly">
+	<title>INT_NR_Option-20</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-20.bat  INT_NR_Option-20</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-20  INT_NR_Option-20 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-20.script" "int_nr_option-20.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-21" type="nativeonly">
+	<title>INT_NR_Option-21</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-21.bat  INT_NR_Option-21</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-21  INT_NR_Option-21 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-21.script" "int_nr_option-21.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-22" type="nativeonly">
+	<title>INT_NR_Option-22</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-22.bat  INT_NR_Option-22</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-22  INT_NR_Option-22 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-22.script" "int_nr_option-22.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-23" type="nativeonly">
+	<title>INT_NR_Option-23</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-23.bat  INT_NR_Option-23</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-23  INT_NR_Option-23 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-23.script" "int_nr_option-23.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-24" type="nativeonly">
+	<title>INT_NR_Option-24</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-24.bat  INT_NR_Option-24</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-24  INT_NR_Option-24 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-24.script" "int_nr_option-24.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-25" type="nativeonly">
+	<title>INT_NR_Option-25</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-25.bat  INT_NR_Option-25</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-25  INT_NR_Option-25 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-25.script" "int_nr_option-25.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-26" type="nativeonly">
+	<title>INT_NR_Option-26</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-26.bat  INT_NR_Option-26</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-26  INT_NR_Option-26 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-26.script" "int_nr_option-26.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-27" type="nativeonly">
+	<title>INT_NR_Option-27</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-27.bat  INT_NR_Option-27</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-27  INT_NR_Option-27 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-27.script" "int_nr_option-27.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-28" type="nativeonly">
+	<title>INT_NR_Option-28</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-28.bat  INT_NR_Option-28</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-28  INT_NR_Option-28 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-28.script" "int_nr_option-28.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-29" type="nativeonly">
+	<title>INT_NR_Option-29</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-29.bat  INT_NR_Option-29</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-29  INT_NR_Option-29 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-29.script" "int_nr_option-29.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-30" type="nativeonly">
+	<title>INT_NR_Option-30</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-30.bat  INT_NR_Option-30</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-30  INT_NR_Option-30 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-30.script" "int_nr_option-30.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-31" type="nativeonly">
+	<title>INT_NR_Option-31</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-31.bat  INT_NR_Option-31</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-31  INT_NR_Option-31 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-31.script" "int_nr_option-31.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-32" type="nativeonly">
+	<title>INT_NR_Option-32</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-32.bat  INT_NR_Option-32</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-32  INT_NR_Option-32 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-32.script" "int_nr_option-32.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-33" type="nativeonly">
+	<title>INT_NR_Option-33</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-33.bat  INT_NR_Option-33</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-33  INT_NR_Option-33 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-33.script" "int_nr_option-33.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-34" type="nativeonly">
+	<title>INT_NR_Option-34</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-34.bat  INT_NR_Option-34</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-34  INT_NR_Option-34 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-34.script" "int_nr_option-34.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-35" type="nativeonly">
+	<title>INT_NR_Option-35</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-35.bat  INT_NR_Option-35</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-35  INT_NR_Option-35 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-35.script" "int_nr_option-35.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-36" type="nativeonly">
+	<title>INT_NR_Option-36</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-36.bat  INT_NR_Option-36</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-36  INT_NR_Option-36 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-36.script" "int_nr_option-36.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-37" type="nativeonly">
+	<title>INT_NR_Option-37</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-37.bat  INT_NR_Option-37</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-37  INT_NR_Option-37 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-37.script" "int_nr_option-37.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+
+<test id="INT_NR_Option-38" type="nativeonly">
+	<title>INT_NR_Option-38</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-38.bat  INT_NR_Option-38</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-38  INT_NR_Option-38 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-38.script" "int_nr_option-38.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-39" type="nativeonly">
+	<title>INT_NR_Option-39</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-39.bat  INT_NR_Option-39</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-39  INT_NR_Option-39 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-39.script" "int_nr_option-39.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
 </testlist>
--- a/secureswitools/swisistools/test/tinterpretsisinteg/testlistdb.xml	Tue Feb 02 00:20:15 2010 +0200
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/testlistdb.xml	Fri Mar 19 09:33:35 2010 +0200
@@ -1649,10 +1649,244 @@
 	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">api-inst-preq2525-interpretsis-18  API-INST-PREQ2525-InterpretSIS-18 3  "positive"  "both" "nouid" "nobatchfile" "API-INST-PREQ2525-InterpretSIS-18.script" "api-inst-preq2525-interpretsis-18.htm" "FAIL = 0" "FAIL = 0" </check>
 	</test>
 
-	<test id="API-INST-PREQ2525-InterpretSIS-19">
+<test id="API-INST-PREQ2525-InterpretSIS-19">
 	<title>API-INST-PREQ2525-InterpretSIS-19 Install sis having negative language id in supported_language block</title>
 	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\api-inst-preq2525-interpretsis-19_db.bat API-INST-PREQ2525-InterpretSIS-19</command>
 	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\check.pl">API-INST-PREQ2525-InterpretSIS-19 preq2525-interpretsis-19.txt 1 "positive" "none"</check>
 	</test>
 
+<test id="INT_NR_Option-01">
+	<title>INT_NR_Option-01</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-01_db.bat  INT_NR_Option-01</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-01  INT_NR_Option-01 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-01.script" "int_nr_option-01.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-02">
+	<title>INT_NR_Option-02</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-02_db.bat  INT_NR_Option-02</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-02  INT_NR_Option-02 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-02.script" "int_nr_option-02.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-03">
+	<title>INT_NR_Option-03</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-03_db.bat  INT_NR_Option-01</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-03  INT_NR_Option-03 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-03.script" "int_nr_option-03.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-04">
+	<title>INT_NR_Option-04</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-04_db.bat INT_NR_Option-04</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\check.pl">INT_NR_Option-04 int_nr_option_04.txt 1 "negative" "none"</check>
+	</test>
+	
+<test id="INT_NR_Option-05">
+	<title>INT_NR_Option-05</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-05_db.bat  INT_NR_Option-05</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-05  INT_NR_Option-05 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-05.script" "int_nr_option-05.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-06">
+	<title>INT_NR_Option-06</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-06_db.bat  INT_NR_Option-06</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-06  INT_NR_Option-06 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-06.script" "int_nr_option-06.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-07">
+	<title>INT_NR_Option-07</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-07_db.bat  INT_NR_Option-07</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-07  INT_NR_Option-07 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-07.script" "int_nr_option-07.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+
+<test id="INT_NR_Option-08">
+	<title>INT_NR_Option-08</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-08_db.bat  INT_NR_Option-08</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-08  INT_NR_Option-08 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-08.script" "int_nr_option-08.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-09">
+	<title>INT_NR_Option-09</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-09_db.bat  INT_NR_Option-09</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-09  INT_NR_Option-09 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-09.script" "int_nr_option-09.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-10">
+	<title>INT_NR_Option-10</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-10_db.bat  INT_NR_Option-10</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-10  INT_NR_Option-10 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-10.script" "int_nr_option-10.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-11">
+	<title>INT_NR_Option-11</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-11_db.bat  INT_NR_Option-11</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-11  INT_NR_Option-11 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-11.script" "int_nr_option-11.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-12">
+	<title>INT_NR_Option-12</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-12_db.bat  INT_NR_Option-12</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-12  INT_NR_Option-12 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-12.script" "int_nr_option-12.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-13">
+	<title>INT_NR_Option-13</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-13_db.bat  INT_NR_Option-13</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-13  INT_NR_Option-13 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-13.script" "int_nr_option-13.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-14">
+	<title>INT_NR_Option-14</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-14_db.bat  INT_NR_Option-14</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-14  INT_NR_Option-14 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-14.script" "int_nr_option-14.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-15">
+	<title>INT_NR_Option-15</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-15_db.bat  INT_NR_Option-15</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-15  INT_NR_Option-15 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-15.script" "int_nr_option-15.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-16">
+	<title>INT_NR_Option-16</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-16_db.bat  INT_NR_Option-16</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-16  INT_NR_Option-16 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-16.script" "int_nr_option-16.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-17">
+	<title>INT_NR_Option-17</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-17_db.bat  INT_NR_Option-17</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-17  INT_NR_Option-17 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-17.script" "int_nr_option-17.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-18">
+	<title>INT_NR_Option-18</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-18_db.bat  INT_NR_Option-18</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-18  INT_NR_Option-18 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-18.script" "int_nr_option-18.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-19">
+	<title>INT_NR_Option-19</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-19_db.bat  INT_NR_Option-19</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-19  INT_NR_Option-19 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-19.script" "int_nr_option-19.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-20">
+	<title>INT_NR_Option-20</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-20_db.bat  INT_NR_Option-20</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-20  INT_NR_Option-20 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-20.script" "int_nr_option-20.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-21">
+	<title>INT_NR_Option-21</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-21_db.bat  INT_NR_Option-21</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-21  INT_NR_Option-21 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-21.script" "int_nr_option-21.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-22">
+	<title>INT_NR_Option-22</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-22_db.bat  INT_NR_Option-22</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-22  INT_NR_Option-22 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-22.script" "int_nr_option-22.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-23">
+	<title>INT_NR_Option-23</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-23_db.bat  INT_NR_Option-23</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-23  INT_NR_Option-23 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-23.script" "int_nr_option-23.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-24">
+	<title>INT_NR_Option-24</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-24_db.bat  INT_NR_Option-24</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-24  INT_NR_Option-24 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-24.script" "int_nr_option-24.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-25">
+	<title>INT_NR_Option-25</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-25_db.bat  INT_NR_Option-25</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-25  INT_NR_Option-25 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-25.script" "int_nr_option-25.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-26">
+	<title>INT_NR_Option-26</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-26_db.bat  INT_NR_Option-26</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-26  INT_NR_Option-26 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-26.script" "int_nr_option-26.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-27">
+	<title>INT_NR_Option-27</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-27_db.bat  INT_NR_Option-27</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-27  INT_NR_Option-27 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-27.script" "int_nr_option-27.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-28">
+	<title>INT_NR_Option-28</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-28_db.bat  INT_NR_Option-28</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-28  INT_NR_Option-28 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-28.script" "int_nr_option-28.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-29">
+	<title>INT_NR_Option-29</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-29_db.bat  INT_NR_Option-29</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-29  INT_NR_Option-29 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-29.script" "int_nr_option-29.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-30">
+	<title>INT_NR_Option-30</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-30_db.bat  INT_NR_Option-30</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-30  INT_NR_Option-30 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-30.script" "int_nr_option-30.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-31">
+	<title>INT_NR_Option-31</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-31_db.bat  INT_NR_Option-31</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-31  INT_NR_Option-31 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-31.script" "int_nr_option-31.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-32">
+	<title>INT_NR_Option-32</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-32_db.bat  INT_NR_Option-32</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-32  INT_NR_Option-32 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-32.script" "int_nr_option-32.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-33">
+	<title>INT_NR_Option-33</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-33_db.bat  INT_NR_Option-33</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-33  INT_NR_Option-33 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-33.script" "int_nr_option-33.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-34">
+	<title>INT_NR_Option-34</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-34_db.bat  INT_NR_Option-34</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-34  INT_NR_Option-34 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-34.script" "int_nr_option-34.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-35">
+	<title>INT_NR_Option-35</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-35_db.bat  INT_NR_Option-35</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-35  INT_NR_Option-35 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-35.script" "int_nr_option-35.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-36">
+	<title>INT_NR_Option-36</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-36_db.bat  INT_NR_Option-36</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-36  INT_NR_Option-36 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-36.script" "int_nr_option-36.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-37">
+	<title>INT_NR_Option-37</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-37_db.bat  INT_NR_Option-37</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-37  INT_NR_Option-37 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-37.script" "int_nr_option-37.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+
+<test id="INT_NR_Option-38">
+	<title>INT_NR_Option-38</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-38_db.bat  INT_NR_Option-38</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-38  INT_NR_Option-38 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-38.script" "int_nr_option-38.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
+<test id="INT_NR_Option-39">
+	<title>INT_NR_Option-39</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_nr_option-39_db.bat  INT_NR_Option-39</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-39  INT_NR_Option-39 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-39.script" "int_nr_option-39.htm" "FAIL = 0" "FAIL = 0" </check>
+	</test>
+	
 </testlist>