201027_01
authorhgs
Thu, 08 Jul 2010 20:28:00 +0300
changeset 50 c6e8afe0ba85
parent 46 bb1748e0dd9b
child 55 ac7f90a6ff4c
201027_01
appinstaller/AppinstUi/sisxsifplugin/src/sisxsifplugininstallparams.cpp
iaupdate/IAD/backgroundchecker/inc/iaupdatebgconst.h
iaupdate/IAD/backgroundchecker/inc/iaupdatebginternalfilehandler.h
iaupdate/IAD/backgroundchecker/inc/iaupdatebgrefreshtimer.h
iaupdate/IAD/backgroundchecker/src/iaupdatebginternalfilehandler.cpp
iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp
installationservices/swcomponentregistry/test/tscr/inc/appmanagersteps.h
installationservices/swcomponentregistry/test/tscr/inc/tscrdefs.h
installationservices/swcomponentregistry/test/tscr/source/appmanagersteps.cpp
installationservices/swcomponentregistry/test/tscr/source/tscrserver.cpp
installationservices/swi/bwins/sisregistryclient_v2U.def
installationservices/swi/eabi/sisregistryclient_v2U.def
installationservices/swi/group/bld.inf
installationservices/swi/group/sisregistryserver.mmp
installationservices/swi/inc/swi/sisregistrysession.h
installationservices/swi/source/sislauncher/common/sislauncherclientserver.h
installationservices/swi/source/sislauncher/server/sislauncherserver.cpp
installationservices/swi/source/sislauncher/server/sislauncherserver.h
installationservices/swi/source/sislauncher/server/sislaunchersession.cpp
installationservices/swi/source/sisregistry/client/sisregistrysession.cpp
installationservices/swi/source/sisregistry/common/sisregistryclientserver.h
installationservices/swi/source/sisregistry/server/sisregistryserver.cpp
installationservices/swi/source/sisregistry/server/sisregistryserver.h
installationservices/swi/source/sisregistry/server/sisregistryserverconst.h
installationservices/swi/source/sisregistry/server/sisregistryserversession.cpp
installationservices/swi/source/sisregistry/server/sisregistryserversession.h
installationservices/swi/source/sisregistry/server/sisregistryutil.cpp
installationservices/swi/source/sisregistry/server/sisregistryutil.h
installationservices/swi/test/swicaptests/registrycaptest.cpp
installationservices/swi/test/swicaptests/registrycaptest.h
installationservices/swi/test/swicaptests/swicaptests.cpp
installationservices/swi/test/swicaptests/swilaunchercaptest.cpp
installationservices/swi/test/swicaptests/swilaunchercaptest.h
installationservices/swi/test/tdaemon/scripts/batchfiles/setupforemmcformat_post.bat
installationservices/swi/test/tdaemon/scripts/batchfiles/setupforemmcformat_pre.bat
installationservices/swi/test/tdaemon/scripts/tdaemon.ini
installationservices/swi/test/tdaemon/scripts/tdaemon_winscw.script
installationservices/swi/test/tdaemon/steps/daemonstep.cpp
installationservices/swi/test/tdaemon/steps/daemonstep.h
installationservices/swi/test/tdaemon/tdaemon.cpp
installationservices/swi/test/testexes/packages/eclipsingdllupgradepu_on_c_and_emmc.pkg
installationservices/swi/test/testexes/packages/eclipsingdllupgradesa_on_c_and_emmc.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_distributed.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_distributed_NR.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_on_c_and_t.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_on_c_and_t_NR.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_on_c_drive.pkg
installationservices/swi/test/testexes/packages/emmc_format_base_on_emmc.pkg
installationservices/swi/test/testexes/packages/emmc_format_pu_on_emmc.pkg
installationservices/swi/test/testexes/packages/emmc_format_sp_distributed.pkg
installationservices/swi/test/testexes/packages/emmc_format_sp_emmc.pkg
installationservices/swi/test/testexes/packages/emmc_format_sp_on_c.pkg
installationservices/swi/test/testexes/prepareexes.pl
installationservices/swi/test/testexes/tswiappregintegration/fotaupdateUDA1_reg.rss
installationservices/swi/test/testexes/tswiappregintegration/fotaupdateUDA2_reg.rss
installationservices/swi/test/testexes/tswiappregintegration/tswiappregintegration01.mmp
installationservices/swi/test/tsisregistrytest/Scripts/tsisregistrytest.ini
installationservices/swi/test/tsisregistrytest/Scripts/tsisregistrytest.script
installationservices/swi/test/tsisregistrytest/sessionstep.cpp
installationservices/swi/test/tsisregistrytest/sessionstep.h
installationservices/swi/test/tsisregistrytest/tsisregistrytest.cpp
installationservices/swi/test/tsisregistrytest/tsisregistryteststep.h
installationservices/swi/test/tuiscriptadaptors/scripts/batchfiles/testfotaupdate1_post.bat
installationservices/swi/test/tuiscriptadaptors/scripts/batchfiles/testfotaupdate1_pre.bat
installationservices/swi/test/tuiscriptadaptors/scripts/testfotaupdate.ini
installationservices/swi/test/tuiscriptadaptors/scripts/testfotaupdate1.script
installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_client.cpp
installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_client.h
installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_common.h
installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_server_session.cpp
installationservices/swinstallationfw/bwins/sifnotificationu.def
installationservices/swinstallationfw/eabi/sifnotificationu.def
installationservices/swinstallationfw/group/sifserver.mmp
installationservices/swinstallationfw/inc/sifnotification.h
installationservices/swinstallationfw/source/sifnotifierdata.cpp
installationservices/swinstallationfw/test/tusif/scripts/tnotifier.ini
installationservices/swinstallationfw/test/tusif/source/tsifcommonunitteststep.cpp
installationservices/swinstallationfw/test/tusif/source/tsifnotifierteststep.cpp
installationservices/switestfw/test/autotesting/test_spec_apr_9.5.txt
ncdengine/engine/accesspointmanager/inc/catalogsaccesspointmanagerimpl.h
ncdengine/engine/group/ncddevicemgmt.mmp
ncdengine/engine/transport/inc/catalogshttpdownload.h
ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h
ncdengine/engine/transport/inc/catalogshttptypes.h
ncdengine/engine/transport/src/catalogshttpdownload.cpp
ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp
secureswitools/swianalysistoolkit/group/apply_tools2_variants.xml
secureswitools/swianalysistoolkit/group/bld.inf
secureswitools/swianalysistoolkit/group/dumpchainvaliditytool.mmp
secureswitools/swianalysistoolkit/group/dumpinstallfilestatustool.mmp
secureswitools/swianalysistoolkit/group/dumpswicertstoretool.mmp
secureswitools/swianalysistoolkit/source/common/utf8_wrapper.h
secureswitools/swisistools/group/bld.inf
secureswitools/swisistools/group/dbmanager.mmp
secureswitools/swisistools/group/dumpsislib.mmp
secureswitools/swisistools/group/interpretsis.mmp
secureswitools/swisistools/group/interpretsislib.mmp
secureswitools/swisistools/group/scrtool.mmp
secureswitools/swisistools/source/common/util.cpp
secureswitools/swisistools/source/dbmanager/dblayer.cpp
secureswitools/swisistools/source/dbmanager/dblayer.h
secureswitools/swisistools/source/dbmanager/dbprocessor.cpp
secureswitools/swisistools/source/dbmanager/dbprocessor.h
secureswitools/swisistools/source/dumpsis/main.cpp
secureswitools/swisistools/source/dumpsis/options.cpp
secureswitools/swisistools/source/dumpsis/options.h
secureswitools/swisistools/source/dumpsislib/dumpsis.cpp
secureswitools/swisistools/source/interpretsis/commandparser.cpp
secureswitools/swisistools/source/interpretsis/main.cpp
secureswitools/swisistools/source/interpretsislib/adornedutilities.cpp
secureswitools/swisistools/source/interpretsislib/adornedutilities.h
secureswitools/swisistools/source/interpretsislib/configmanager.cpp
secureswitools/swisistools/source/interpretsislib/dbhelper.cpp
secureswitools/swisistools/source/interpretsislib/deserialiser.h
secureswitools/swisistools/source/interpretsislib/errors.h
secureswitools/swisistools/source/interpretsislib/expressionevaluator.cpp
secureswitools/swisistools/source/interpretsislib/installablefile.cpp
secureswitools/swisistools/source/interpretsislib/installer.cpp
secureswitools/swisistools/source/interpretsislib/installer.h
secureswitools/swisistools/source/interpretsislib/is_utils.cpp
secureswitools/swisistools/source/interpretsislib/is_utils.h
secureswitools/swisistools/source/interpretsislib/rommanager.cpp
secureswitools/swisistools/source/interpretsislib/serialiser.h
secureswitools/swisistools/source/interpretsislib/sisfile.cpp
secureswitools/swisistools/source/interpretsislib/sisregistry.cpp
secureswitools/swisistools/source/interpretsislib/sisregistry.h
secureswitools/swisistools/source/interpretsislib/sisregistryobject.cpp
secureswitools/swisistools/source/interpretsislib/stringutils.cpp
secureswitools/swisistools/source/interpretsislib/stringutils.h
secureswitools/swisistools/source/interpretsislib/utils_posix.cpp
secureswitools/swisistools/source/interpretsislib/utils_win32.cpp
secureswitools/swisistools/source/interpretsislib/xmlgenerator.cpp
secureswitools/swisistools/source/interpretsislib/xmlgenerator.h
secureswitools/swisistools/source/rscparser/aplappinforeader.cpp
secureswitools/swisistools/source/rscparser/aplapplistitem.cpp
secureswitools/swisistools/source/rscparser/apsecutils.cpp
secureswitools/swisistools/source/rscparser/apsecutils.h
secureswitools/swisistools/source/rscparser/dirparse.cpp
secureswitools/swisistools/source/rscparser/parse.cpp
secureswitools/swisistools/source/scrtool/main.cpp
secureswitools/swisistools/source/signsis/parameter.cpp
secureswitools/swisistools/source/signsislib/sissignature.cpp
secureswitools/swisistools/source/sisxlibrary/siscapabilities.cpp
secureswitools/swisistools/source/sisxlibrary/sisexpression.cpp
secureswitools/swisistools/source/sisxlibrary/sisstring.cpp
secureswitools/swisistools/source/sisxlibrary/sisstring.h
secureswitools/swisistools/source/sisxlibrary/utility.cpp
secureswitools/swisistools/source/sisxlibrary/utility.h
secureswitools/swisistools/source/sisxlibrary/utility_interface.h
secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp
secureswitools/swisistools/source/sisxlibrary/utility_windows.cpp
secureswitools/swisistools/source/sisxlibrary/utils.cpp
secureswitools/swisistools/source/xmlparser/xmlparser.cpp
secureswitools/swisistools/source/xmlparser/xmlparser.h
secureswitools/swisistools/test/tinterpretsisinteg/check.pl
secureswitools/swisistools/test/tinterpretsisinteg/testinterpretsis.bat
--- a/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifplugininstallparams.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifplugininstallparams.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -308,9 +308,8 @@
 void CSisxSifPluginInstallParams::GetStringParamL( const COpaqueNamedParams& aParams,
         const TDesC& aParamName, HBufC*& aBuf )
     {
-    TPtr value( NULL, 0 );
-    TRAPD( err, value = aParams.StringByNameL( aParamName ) );
-    if( !err && value.Length() )
+    TPtrC value( aParams.StringByNameL( aParamName ) );
+    if( value.Length() )
         {
         if( aBuf )
             {
--- a/iaupdate/IAD/backgroundchecker/inc/iaupdatebgconst.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebgconst.h	Thu Jul 08 20:28:00 2010 +0300
@@ -30,14 +30,11 @@
 const TInt KUpdateAvailableReminderInterval = 1; //60*24*7; //one week in minutes
 const TInt KFirstTimeDialogDelay = 1; //60*24*2; //two days in minutes
 const TInt KFirstTimeDialogReminderInterval = 4; //60*24*7*4; //four weeks in minutes
-const TInt KRefreshTimerReminderTimerGap = 1; // 1min, if the refresh timer is about to expire in 1 mins, then we don't show redminer timer anymore
 const TInt HalfHourInMinuts = 5;//30;
 const TInt KFirstSecondRetryInterval = 1; //30mins
 const TInt KThirdFourthRetryInterval = 2; //one day in minutes
 #else
 
-const TInt KRefreshTimerReminderTimerGap = 60*24; //one day.If the refresh timer is about to expire in one day, then we don't show reminder timer anymore
-                                               // this is to avoid the soft notifications coming too close to eachother.
 const TInt KDelayForUserToAcceptDisclaimer = 10; //10 minutes
 const TInt HalfHourInMinuts = 30;
 const TInt KFirstSecondRetryInterval = 30; //30mins
@@ -45,7 +42,6 @@
 #endif //_DEMO
 
 const TInt StartNow = 0;
-const TInt KSoftNotificationPriority = 1000; //minimum soft notifier priority
 const TInt KMaxRetry = 4; //Max times of retry when refresh fails for some reason
 const TInt StartAfterOneMin = 1; //1mins
 
--- a/iaupdate/IAD/backgroundchecker/inc/iaupdatebginternalfilehandler.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebginternalfilehandler.h	Thu Jul 08 20:28:00 2010 +0300
@@ -71,7 +71,11 @@
     TInt RetryTimes();
     
     void SetRetryTimes( TInt aRetry );
-
+    
+    TInt NrOfIndicatorEntries();
+    
+    void  SetNrOfIndicatorEntries( TInt aEntries );
+    
 protected:
 
     CIAUpdateBGInternalFileHandler();
@@ -111,7 +115,9 @@
     TInt iSNID;
     
     TInt iRetryTimes;
-     
+    
+    TInt iNrOfIndicatiorEntries;
+    
     };
         
 #endif // IAUPDATEBGINTERNAL_FILE_HANDLER
--- a/iaupdate/IAD/backgroundchecker/inc/iaupdatebgrefreshtimer.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebgrefreshtimer.h	Thu Jul 08 20:28:00 2010 +0300
@@ -135,6 +135,10 @@
 
         TInt SetModeL( TIAUpdateBGMode aMode );
         
+        TInt NrOfIndicatorEntries();
+
+        TInt SetNrOfIndicatorEntriesL( TInt aEntries );
+        
         TInt RetryTimesL();
 
         TInt SetRetryTimesL( TInt aRetry );
--- a/iaupdate/IAD/backgroundchecker/src/iaupdatebginternalfilehandler.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebginternalfilehandler.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -222,7 +222,6 @@
     iMode = aMode;
     }
 
-
 // -----------------------------------------------------------------------------
 // CIAUpdateBGInternalFileHandler::Mode
 //
@@ -233,7 +232,6 @@
     return iMode;
     }
 
-
 // -----------------------------------------------------------------------------
 // CIAUpdateBGInternalFileHandler::FwVersion
 //
@@ -244,7 +242,6 @@
     return iFwVersion;
     }
 
-
 // ----------------------------------------------------------
 // CIAUpdateBGInternalFileHandler::SetFwVersionL()
 // ----------------------------------------------------------
@@ -306,6 +303,26 @@
     }
 
 // -----------------------------------------------------------------------------
+// CIAUpdateBGInternalFileHandler::NrOfIndicatorEntries
+//
+// -----------------------------------------------------------------------------
+//
+TInt CIAUpdateBGInternalFileHandler::NrOfIndicatorEntries()
+    {
+    return iNrOfIndicatiorEntries;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CIAUpdateBGInternalFileHandler::SetNrOfIndicatorEntries
+//
+// -----------------------------------------------------------------------------
+//
+void CIAUpdateBGInternalFileHandler::SetNrOfIndicatorEntries( TInt aEntries )
+    {
+    iNrOfIndicatiorEntries = aEntries;
+    }
+// -----------------------------------------------------------------------------
 // CIAUpdateBGInternalFileHandler::InternalizeL
 //
 // -----------------------------------------------------------------------------
@@ -323,16 +340,6 @@
     // Static casting is safe to do here because enum and TInt are the same.
     SetUserRejectNewFeatureDialog( static_cast< TBool >( userDecision ) );
     
-    /*
-    TInt64 nextRemindTime( 0 );
-    aStream >> nextRemindTime;
-    SetNextRemindTime( nextRemindTime );
-    
-    TInt remindOn( aStream.ReadUint8L() );
-    // Static casting is safe to do here because enum and TInt are the same.
-    SetReminder( static_cast< TBool >( remindOn ) );
-    */
-    
     TInt mode( aStream.ReadUint8L() );
     SetMode( static_cast<TIAUpdateBGMode> (mode) );
     
@@ -348,6 +355,10 @@
     
     TInt retry ( aStream.ReadUint8L() );
     SetRetryTimes( retry );
+    
+    TInt entries ( aStream.ReadUint8L() );
+    SetNrOfIndicatorEntries( entries );
+    
     }
 
 
@@ -367,14 +378,6 @@
     TInt userDecision ( UserRejectNewFeatureDialog() );
     aStream.WriteUint8L( userDecision );
     
-    /*
-    TInt64 nextRemindTime( NextRemindTime().Int64() ); 
-    aStream << nextRemindTime;
-    
-    TInt remindOn ( ReminderOn() );
-    aStream.WriteUint8L( remindOn );
-    */
-    
     TInt mode( Mode() );
     aStream.WriteUint8L( mode );
     
@@ -388,6 +391,10 @@
     
     TInt retry ( RetryTimes() );
     aStream.WriteUint8L( retry ); 
+    
+    TInt entries ( NrOfIndicatorEntries() );
+    aStream.WriteUint8L( entries ); 
+    
     }
 
 //EOF
--- a/iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -43,7 +43,6 @@
 //MACROS
 _LIT8( KRefreshFromNetworkDenied, "1" );
 _LIT(KIAUpdateLauncherExe, "iaupdatelauncher.exe" );
-_LIT8( KFirstTimeCase, "0" );
 
 //CONSTANTS
 const TUint KIADUpdateLauncherUid( 0x2001FE2F );
@@ -255,10 +254,16 @@
         case ERetryMode:
             {
             
-            // Check if indicator should be shown
-            
+            // Should indicator be shown ?
+            TInt entries = NrOfIndicatorEntries();
+            if  ( entries )
+                {
+                iSoftNotification->SetNrOfUpdates( entries );
+                iSoftNotification->ShowIndicatorL();
+                }
             
             StartUpdatesCheckingL();
+            
             break;
             }
         
@@ -445,7 +450,6 @@
     return err;
     }
 
-
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::ModeL()
 // ----------------------------------------------------------
@@ -466,6 +470,25 @@
     return err;
     }
 
+// ----------------------------------------------------------
+// CIAUpdateBGTimer::NrOfIndicatorEntries()
+// ----------------------------------------------------------
+TInt CIAUpdateBGTimer::NrOfIndicatorEntries()
+    {
+    iInternalFile->ReadControllerDataL();
+    return iInternalFile->NrOfIndicatorEntries();
+    }
+
+
+// ----------------------------------------------------------
+// CIAUpdateBGTimer::SetNrOfIndicatorEntriesL()
+// ----------------------------------------------------------
+TInt CIAUpdateBGTimer::SetNrOfIndicatorEntriesL( TInt aEntries )
+    {
+    iInternalFile->SetNrOfIndicatorEntries( aEntries );
+    TRAPD( err,iInternalFile->WriteControllerDataL() );
+    return err;
+    }
 
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::RetryTimesL()
@@ -1222,7 +1245,9 @@
                   }
               else
                   {
-                  //accepted, launch iad
+                  //accepted, clear indicator entries
+                  SetNrOfIndicatorEntriesL( 0 );
+                  // start IAD
                   StartIaupdateL();
                   }
               break;
@@ -1386,9 +1411,10 @@
     // CleanupStack::PopAndDestroy( titleText );
     // CleanupStack::PopAndDestroy( titleText );
     
-    // Set number of updates
+    // Set number of updates for dialog and internal file
     iSoftNotification->SetNrOfUpdates( aNrOfUpdates );
-   
+    SetNrOfIndicatorEntriesL( aNrOfUpdates );
+    
     iSoftNotification->ShowNotificationL();
     FLOG("[bgchecker] LaunchNotificationL 1");
     
--- a/installationservices/swcomponentregistry/test/tscr/inc/appmanagersteps.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swcomponentregistry/test/tscr/inc/appmanagersteps.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -34,6 +34,8 @@
 _LIT(KScrCompareVersions, "SCRCompareVersions");
 _LIT(KScrIsComponentOnReadOnlyDrive, "SCRIsComponentOnReadOnlyDrive");
 _LIT(KScrComponentPresence, "ScrComponentPresence");
+_LIT(KScrComponentOnEMMC, "ScrComponentOnEMMC");
+_LIT(KScrComponentPresentForNameVendor, "ScrComponentPresentForNameVendor");
 
 class CScrIsMediaPresentStep : public CScrTestStep
 /**
@@ -110,4 +112,33 @@
 	void ImplTestStepPostambleL();		
 	};
 
+class CScrEMMCComponentStep : public CScrTestStep
+/**
+    TEF test step which checks if any components are present on EMMC
+ */
+    {
+public:
+    CScrEMMCComponentStep(CScrTestServer& aParent);
+    
+protected:
+    // From CScrTestStep
+    void ImplTestStepPreambleL();
+    void ImplTestStepL();
+    void ImplTestStepPostambleL();      
+    };
+
+class CScrComponentPresentForNameVendorStep : public CScrTestStep
+/**
+    TEF test step which checks if any components are present with the given name and vendor
+ */
+    {
+public:
+    CScrComponentPresentForNameVendorStep(CScrTestServer& aParent);
+    
+protected:
+    // From CScrTestStep
+    void ImplTestStepPreambleL();
+    void ImplTestStepL();
+    void ImplTestStepPostambleL();      
+    };
 #endif /* APPMANAGERSTEPS_H */
--- a/installationservices/swcomponentregistry/test/tscr/inc/tscrdefs.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swcomponentregistry/test/tscr/inc/tscrdefs.h	Thu Jul 08 20:28:00 2010 +0300
@@ -85,6 +85,8 @@
 _LIT(KServiceOpaqueDataInfoCount, "ServiceOpaqueDataInfoCount");
 _LIT(KServiceDataTypeCount,"ServiceDataTypeCount");
 _LIT(KAppUid, "AppUid");
+_LIT(KNoOfComponents, "NoOfComponents");
+_LIT(KFormatDrive, "FormatDrive");
 
 // File related attribute names
 _LIT(KSetSizeName, "SetSize");
--- a/installationservices/swcomponentregistry/test/tscr/source/appmanagersteps.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swcomponentregistry/test/tscr/source/appmanagersteps.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -202,3 +202,95 @@
 	{
 	CScrTestStep::ImplTestStepPostambleL();
 	}
+
+// -----------CScrEMMCComponentStep-----------------
+
+CScrEMMCComponentStep::CScrEMMCComponentStep(CScrTestServer& aParent)   : CScrTestStep(aParent)
+    {
+    }
+
+void CScrEMMCComponentStep::ImplTestStepPreambleL()
+    {
+    CScrTestStep::ImplTestStepPreambleL();
+    }
+
+void CScrEMMCComponentStep::ImplTestStepL()
+    {
+    TInt noOfComponents(0);
+    GetIntFromConfig(ConfigSection(), KNoOfComponents, noOfComponents);
+    
+    TPtrC formatDrive;
+    GetStringFromConfig(ConfigSection(), KFormatDrive, formatDrive);
+    TInt drive;
+    RFs fs;
+    User::LeaveIfError(fs.Connect());
+    User::LeaveIfError(fs.CharToDrive(formatDrive[0], drive));
+    fs.Close();
+    TDriveList filterFormatDrive;
+    filterFormatDrive.FillZ(KMaxDrives);
+    filterFormatDrive[drive] = 1;
+        
+    CComponentFilter* componentFilter = CComponentFilter::NewLC();
+    componentFilter->SetInstalledDrivesL(filterFormatDrive);
+            
+    RArray<TComponentId> foundComponentIds;
+    CleanupClosePushL(foundComponentIds);
+        
+    iScrSession.GetComponentIdsL(foundComponentIds, componentFilter);
+    
+    if (foundComponentIds.Count() != noOfComponents)
+        {
+        ERR_PRINTF1(_L("Mismatch for number of components found."));
+        SetTestStepResult(EFail);
+        }
+    CleanupStack::PopAndDestroy(2);
+    }
+
+void CScrEMMCComponentStep::ImplTestStepPostambleL()
+    {
+    CScrTestStep::ImplTestStepPostambleL();
+    }
+
+// -----------CScrComponentPresentForNameVendorStep-----------------
+
+CScrComponentPresentForNameVendorStep::CScrComponentPresentForNameVendorStep(CScrTestServer& aParent)   : CScrTestStep(aParent)
+    {
+    }
+
+void CScrComponentPresentForNameVendorStep::ImplTestStepPreambleL()
+    {
+    CScrTestStep::ImplTestStepPreambleL();
+    }
+
+void CScrComponentPresentForNameVendorStep::ImplTestStepL()
+    {
+    TPtrC name;
+    GetStringFromConfig(ConfigSection(), KComponentName, name);
+    
+    TPtrC vendor;
+    GetStringFromConfig(ConfigSection(), KVendorName, vendor);
+    
+    CComponentFilter* componentFilter = CComponentFilter::NewLC();
+    componentFilter->SetNameL(name);
+    componentFilter->SetVendorL(vendor);
+    
+    RArray<TComponentId> foundComponentIds;
+    CleanupClosePushL(foundComponentIds);
+        
+    iScrSession.GetComponentIdsL(foundComponentIds, componentFilter);
+    
+    TInt noOfComponents(0);
+    GetIntFromConfig(ConfigSection(), KNoOfComponents, noOfComponents);
+        
+    if (foundComponentIds.Count() != noOfComponents)
+        {
+        ERR_PRINTF1(_L("Mismatch for number of components found."));
+        SetTestStepResult(EFail);
+        }
+    CleanupStack::PopAndDestroy(2);
+    }
+
+void CScrComponentPresentForNameVendorStep::ImplTestStepPostambleL()
+    {
+    CScrTestStep::ImplTestStepPostambleL();
+    }
--- a/installationservices/swcomponentregistry/test/tscr/source/tscrserver.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swcomponentregistry/test/tscr/source/tscrserver.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -254,7 +254,10 @@
         testStep = new CScrAddConcurrentApplicationEntryStep(*this);	
     else if (strippedStepName == KScrGetAppInfoStep)
         testStep = new CScrGetAppInfoStep(*this);
-  	
+    else if (strippedStepName == KScrComponentOnEMMC)
+           testStep = new CScrEMMCComponentStep(*this);
+    else if (strippedStepName == KScrComponentPresentForNameVendor)
+         testStep = new CScrComponentPresentForNameVendorStep(*this);
 	if(performanceStep)
 		{
 		CScrTestStep *scrTestStep = dynamic_cast<CScrTestStep*>(testStep);
--- a/installationservices/swi/bwins/sisregistryclient_v2U.def	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/bwins/sisregistryclient_v2U.def	Thu Jul 08 20:28:00 2010 +0300
@@ -198,4 +198,6 @@
 	?GetComponentIdForPackageL@RSisRegistrySession@Swi@@QBEHABVTDesC16@@0@Z @ 197 NONAME ; int Swi::RSisRegistrySession::GetComponentIdForPackageL(class TDesC16 const &, class TDesC16 const &) const
 	?AddEntryL@RSisRegistryWritableSession@Swi@@QAEXABVCApplicationRegistrationData@Usif@@ABVCSisRegistryPackage@2@@Z @ 198 NONAME ; void Swi::RSisRegistryWritableSession::AddEntryL(class Usif::CApplicationRegistrationData const &, class Swi::CSisRegistryPackage const &)
 	?SetComponentPresenceL@RSisRegistryWritableSession@Swi@@QAEXHH@Z @ 199 NONAME ; void Swi::RSisRegistryWritableSession::SetComponentPresenceL(int, int)
+	?RemoveAppRegInfoL@RSisRegistrySession@Swi@@QAEXABVTDesC16@@@Z @ 200 NONAME ; void Swi::RSisRegistrySession::RemoveAppRegInfoL(class TDesC16 const &)
+	?AddAppRegInfoL@RSisRegistrySession@Swi@@QAEXABVTDesC16@@@Z @ 201 NONAME ; void Swi::RSisRegistrySession::AddAppRegInfoL(class TDesC16 const &)
 
--- a/installationservices/swi/eabi/sisregistryclient_v2U.def	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/eabi/sisregistryclient_v2U.def	Thu Jul 08 20:28:00 2010 +0300
@@ -221,4 +221,6 @@
 	_ZN3Swi27RSisRegistryWritableSession9AddEntryLERKN4Usif28CApplicationRegistrationDataERKNS_19CSisRegistryPackageE @ 220 NONAME
 	_ZNK3Swi19RSisRegistrySession25GetComponentIdForPackageLERK7TDesC16S3_ @ 221 NONAME
 	_ZN3Swi27RSisRegistryWritableSession21SetComponentPresenceLEii @ 222 NONAME
+	_ZN3Swi19RSisRegistrySession14AddAppRegInfoLERK7TDesC16 @ 223 NONAME
+	_ZN3Swi19RSisRegistrySession17RemoveAppRegInfoLERK7TDesC16 @ 224 NONAME
 
--- a/installationservices/swi/group/bld.inf	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/group/bld.inf	Thu Jul 08 20:28:00 2010 +0300
@@ -227,6 +227,7 @@
 ../test/tsishelper/data/test1.data /epoc32/winscw/c/tswi/tsishelper/data/test1.data
 
 ../test/tdaemon/scripts/tdaemon.script /epoc32/winscw/c/tswi/tdaemon/scripts/tdaemon.script
+../test/tdaemon/scripts/tdaemon_winscw.script /epoc32/winscw/c/tswi/tdaemon/scripts/tdaemon_winscw.script
 ../test/tdaemon/scripts/tdaemon.ini /epoc32/winscw/c/tswi/tdaemon/scripts/tdaemon.ini
 
 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
@@ -1078,4 +1079,6 @@
 ../test/tuiscriptadaptors/scripts/testpreinstalled_sucert_edrive.sis /epoc32/winscw/c/tswi/tuiscriptadaptors/scripts/testpreinstalled_sucert_edrive.sis
 ../test/tuiscriptadaptors/scripts/testpreinstalled_sucert_edrive.pkg /epoc32/winscw/c/tswi/tuiscriptadaptors/scripts/testpreinstalled_sucert_edrive.pkg
 ../test/tuiscriptadaptors/scripts/testnoaiacert.sis /epoc32/winscw/c/tswi/tuiscriptadaptors/scripts/testnoaiacert.sis
+../test/tdaemon/scripts/batchfiles/setupforemmcformat_pre.bat /epoc32/winscw/c/tswi/tdaemon/scripts/setupforemmcformat_pre.bat
+../test/tdaemon/scripts/batchfiles/setupforemmcformat_post.bat /epoc32/winscw/c/tswi/tdaemon/scripts/setupforemmcformat_post.bat
 // End of file
--- a/installationservices/swi/group/sisregistryserver.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/group/sisregistryserver.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -41,6 +41,7 @@
 USERINCLUDE ../source/plan
 USERINCLUDE ../inc/swi 
 USERINCLUDE ../inc
+USERINCLUDE ../source/swis/server
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 USERINCLUDE ../../swtransactionservices/inc
 USERINCLUDE ../../swcomponentregistry/inc
--- a/installationservices/swi/inc/swi/sisregistrysession.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/inc/swi/sisregistrysession.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -214,6 +214,25 @@
      * @param aComponentIds array of component id's associated with the package uid
      */
 	IMPORT_C void GetComponentIdsForUidL(TUid& aPackageUid, RArray<Usif::TComponentId>& aComponentIds);
+	
+	/**
+    * Adds application registration information to the Software Component Registry
+    * Note that if the SCR already contains registration information for the given app this will be replaced
+    *
+    * @param aAppRegFile application's registration resource file name(with full path)
+    * @capability Tcb
+    */
+    IMPORT_C void AddAppRegInfoL(const TDesC& aAppRegFile);
+	    
+    /**
+     *  Removes application registration information from the Software Component Registry.
+     *  Note that this API should be called before the file is actually deleted
+    
+     *  @param aAppRegFile application's registration resource file name(with full path)
+     *  @capability Tcb
+     */
+    IMPORT_C void RemoveAppRegInfoL(const TDesC& aAppRegFile);
+
 		
 #endif
 
--- a/installationservices/swi/source/sislauncher/common/sislauncherclientserver.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sislauncher/common/sislauncherclientserver.h	Thu Jul 08 20:28:00 2010 +0300
@@ -47,14 +47,18 @@
 	EQueueStartByMimeByHandle,
 	EExecuteQueue,
 	EKillQueue,
-	EParseSwTypeRegFile,
+	#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
+	//Function Id's to be accessed by Installserver
+	EParseSwTypeRegFile = 30,
 	ERegisterSifLauncherMimeTypes,
-	EUnregisterSifLauncherMimeTypes,
-	#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
-    EAsyncParseResourceFileSize,     //Parse registration resource file, Async Function
-    EAsyncParseResourceFileData,	 //Return parsed resource data
-    ENotifyNewAppsData,              //Notify Apparc about application data
-    ENotifyApparcForApps,          //Notify Apparc about updated applications
+	ENotifyNewAppsData,                                                     //Notify Apparc about application data
+	//Function Id's to be accessed by SisRegistryServer
+	EUnregisterSifLauncherMimeTypes = 60,
+	//Function Id's to be accessed by Installserver and SisRegistryServer
+	ENotifyApparcForApps = 90,                                              //Notify Apparc about updated applications
+	//Function Id's to be accessed by all clients
+    EAsyncParseResourceFileSize = 120,                                      //Parse registration resource file, Async Function
+    EAsyncParseResourceFileData,                                            //Return parsed resource data
     #endif
 	ESeparatorEndAll	
    
--- a/installationservices/swi/source/sislauncher/server/sislauncherserver.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sislauncher/server/sislauncherserver.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -153,15 +153,14 @@
         } 
     }
 
-    // All functions require TCB capability
 const TInt CSisLauncherServer::iRanges[iRangeCount] = 
     {
     0, // All connect attempts
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
-    // Range of utility services for Post manufacture management of Layered Execution Environemnts
-    EParseSwTypeRegFile,
-    EUnregisterSifLauncherMimeTypes,
-    EAsyncParseResourceFileSize,
+    EParseSwTypeRegFile,                                // accessible by Installserver 
+    EUnregisterSifLauncherMimeTypes,                    // accessible by SisRegistryServer
+    ENotifyApparcForApps,                               // accessible by Installserver and SisRegistry
+    EAsyncParseResourceFileSize,                        // accessible by all clients
 #endif
     ESeparatorEndAll,
     };
@@ -172,10 +171,12 @@
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
     1, // Utility services used by InstallServer
     2, // Utility services used by SisRegistryServer
+    CPolicyServer::ECustomCheck,
     CPolicyServer::EAlwaysPass,
 #endif  
     CPolicyServer::ENotSupported,
     };
+
 const CPolicyServer::TPolicyElement CSisLauncherServer::iPolicyElements[] = 
     {
     {_INIT_SECURITY_POLICY_C1(ECapabilityTCB), CPolicyServer::EFailClient},
@@ -327,6 +328,22 @@
     CleanupStack::PopAndDestroy(threadMonitor);
     }
 
+#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
+CPolicyServer::TCustomResult CSisLauncherServer::CustomSecurityCheckL(const RMessage2& aMsg, 
+    TInt& /*aAction*/, TSecurityInfo& /*aMissing*/)
+    {
+    TUint32 secureId = aMsg.SecureId().iId;
+    if (secureId == KInstallServerUid || secureId == KSisRegistryServerUid)
+        {
+        return CPolicyServer::EPass;
+        }
+    else
+        {
+        //client accessing the function is neither Install Server nor Sis Registry
+        return CPolicyServer::EFail;
+        }
+    }
+#endif
 
 #ifndef SWI_TEXTSHELL_ROM
 void CSisLauncherServer::StartDocumentL(RFile& aFile, TBool aWait)
@@ -565,6 +582,7 @@
     apaSession.ForceRegistration(aApplicationRegistrationData);
     CleanupStack::PopAndDestroy();
     }
+
 #endif
 #endif
 
--- a/installationservices/swi/source/sislauncher/server/sislauncherserver.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sislauncher/server/sislauncherserver.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -108,11 +108,13 @@
 	void LongServerShutdown();
 	void ShortServerShutdown();
 	void CancelShutdown();
-		
+    #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
+	virtual TCustomResult CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing);
+    #endif	
 	// Server Policies
 	// separate the policies into handled and not handled
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
-	static const TUint iRangeCount=5;
+	static const TUint iRangeCount=6;
 #else
 	static const TUint iRangeCount=2;
 #endif
--- a/installationservices/swi/source/sislauncher/server/sislaunchersession.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sislauncher/server/sislaunchersession.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -360,31 +360,25 @@
             aMessage.Complete(KErrNone);
             break;
             }
+#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
         case EParseSwTypeRegFile:
             #ifndef SWI_TEXTSHELL_ROM
-            #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
             ParseSwTypeRegFileL(aMessage);
             #endif
-            #endif
             aMessage.Complete(KErrNone);
             break;
         case ERegisterSifLauncherMimeTypes:
             #ifndef SWI_TEXTSHELL_ROM
-            #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
             RegisterSifLauncherMimeTypesL(aMessage);
             #endif
-            #endif
             aMessage.Complete(KErrNone);
             break;
         case EUnregisterSifLauncherMimeTypes:
-            #ifndef SWI_TEXTSHELL_ROM
-            #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
+            #ifndef SWI_TEXTSHELL_ROM            
             UnregisterSifLauncherMimeTypesL(aMessage);
             #endif
-            #endif
             aMessage.Complete(KErrNone);
             break;
-#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
         case EAsyncParseResourceFileSize:
             {
             TRAPD(err,err = AsyncParseResourceFileSizeL(aMessage));            
--- a/installationservices/swi/source/sisregistry/client/sisregistrysession.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sisregistry/client/sisregistrysession.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -482,6 +482,17 @@
     CleanupStack::PopAndDestroy(2, buffer);           
     }
 
+EXPORT_C void RSisRegistrySession::AddAppRegInfoL(const TDesC& aAppRegFile)
+    {
+    TInt returnCode = SendReceive(EAddAppRegInfo, TIpcArgs(&aAppRegFile));
+    User::LeaveIfError(returnCode);
+    }
+
+EXPORT_C void RSisRegistrySession::RemoveAppRegInfoL(const TDesC& aAppRegFile)
+    {
+    TInt returnCode = SendReceive(ERemoveAppRegInfo, TIpcArgs(&aAppRegFile));
+    User::LeaveIfError(returnCode);
+    }
 
 #endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 
--- a/installationservices/swi/source/sisregistry/common/sisregistryclientserver.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sisregistry/common/sisregistryclientserver.h	Thu Jul 08 20:28:00 2010 +0300
@@ -173,7 +173,9 @@
 	EComponentIdForPackage,
 	EAppUidsForComponent,  
 	EComponentIdsForPackageUid,
-	ESetComponentState, //SIF only
+	ESetComponentState = 300, //SIF only
+	EAddAppRegInfo = 320,    //requires TCB
+	ERemoveAppRegInfo,       //requires TCB 
 #endif
 	ESeparatorEndAll
 	
--- a/installationservices/swi/source/sisregistry/server/sisregistryserver.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/sisregistryserver.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -48,6 +48,7 @@
 	ESeparatorMinimumTCB, 			// accessible by TCB clients only
 	ESeparatorMinimumReadUserData2, 	// accessible by ReadUserData clients only
 	ESetComponentState,             // requests coming from SIF
+	EAddAppRegInfo,                 // TCB only
 	ESeparatorEndAll,     			// not supported from there on
 	};
 
@@ -64,6 +65,7 @@
 	2,	// Used by SWIS only, so TCB is needed - check on cap and SID.
 	1,  // ReadUserData clients only
 	5,   // requests coming from SIF
+	6,  // all clients having TCB
 	CPolicyServer::ENotSupported,  
 	};
 
@@ -75,6 +77,7 @@
 	{_INIT_SECURITY_POLICY_S0(KDaemonSecureId), CPolicyServer::EFailClient}, 
 	{_INIT_SECURITY_POLICY_C2(ECapabilityWriteUserData, ECapabilityNetworkServices), CPolicyServer::EFailClient},
 	{_INIT_SECURITY_POLICY_S0(KSifServerSecureId), CPolicyServer::EFailClient},
+	{_INIT_SECURITY_POLICY_C1(ECapabilityTCB), CPolicyServer::EFailClient},
 	};
 
 const CPolicyServer::TPolicy CSisRegistryServer::iPolicy =
--- a/installationservices/swi/source/sisregistry/server/sisregistryserver.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/sisregistryserver.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -36,8 +36,8 @@
 _LIT_SECURE_ID(KSwisSecureId, 0x101F7295);	
 _LIT_SECURE_ID(KSifServerSecureId, 0x10285BCB);	
 
-const TInt KPolicyRanges= 12;
-const TInt KPolicyElements = 6;
+const TInt KPolicyRanges= 13;
+const TInt KPolicyElements = 7;
 
 class CSisRegistrySession;
 
--- a/installationservices/swi/source/sisregistry/server/sisregistryserverconst.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/sisregistryserverconst.h	Thu Jul 08 20:28:00 2010 +0300
@@ -51,6 +51,11 @@
 //Location of application registration resource files
 _LIT(KApparcRegFilePath, "\\private\\10003a3f\\apps\\*.rsc");
 _LIT(KApparcRegFileImportPath, "\\private\\10003a3f\\import\\apps\\*.rsc");
+
+//Registration resource file uid 
+const TUid KUidAppRegistrationFile = {0x101F8021};
+_LIT(KApparcRegDir, "\\private\\10003a3f\\import\\apps\\");
+
 }
 
 #endif // __SISREGISTRYSERVERCONST_H__
--- a/installationservices/swi/source/sisregistry/server/sisregistryserversession.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/sisregistryserversession.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -65,6 +65,7 @@
 #include "sisinstallblock.h"
 #include "sisregistryfiledescription.h"
 #include "sisregistrywritablesession.h"  
+#include "securitycheckutil.h"
 
 using namespace Swi;
 using namespace Usif;
@@ -99,7 +100,7 @@
 	if (KAppArcSID.iId == iClientSid.iId)
 	    {
         DEBUG_PRINTF(_L8("SIS Registry Server: Init for a connection from AppArc"));
-        ProcessRomApplicationsL();
+        ProcessApplicationsL();
 	    }
 	else
 	    {
@@ -186,7 +187,7 @@
     DEBUG_PRINTF(_L8("SIS Registry Server - Completed processing of ROM Stub sis files"));
     }
 
-void CSisRegistrySession::ProcessRomApplicationsL()
+void CSisRegistrySession::ProcessApplicationsL()
     {
     TComponentId compId = 0;
     DEBUG_PRINTF(_L8("SIS Registry Server - Deleteing all existing ROM applications."));
@@ -194,17 +195,36 @@
     
     //Register all apps found in \private\10003a3f\apps
     TDriveUnit romDrive(SisRegistryUtil::SystemRomDrive());
-    RBuf romApparcRegFilePath;
-    romApparcRegFilePath.CreateL(romDrive.Name(), KMaxPath);
-    CleanupClosePushL(romApparcRegFilePath);
-    romApparcRegFilePath.Append(KApparcRegFilePath);
-    RegisterAllInRomAppL(romApparcRegFilePath);
+    RBuf apparcRegFilePath;
+    apparcRegFilePath.CreateL(romDrive.Name(), KMaxPath);
+    CleanupClosePushL(apparcRegFilePath);
+    apparcRegFilePath.Append(KApparcRegFilePath);
+    
+	//Create a single transaction to register all in rom apps
+	iScrSession.CreateTransactionL();
+	RegisterAllAppL(apparcRegFilePath);
 
     //Register all apps found in \private\10003a3f\import\apps
-    romApparcRegFilePath = romDrive.Name();
-    romApparcRegFilePath.Append(KApparcRegFileImportPath);
-    RegisterAllInRomAppL(romApparcRegFilePath);
-    CleanupStack::PopAndDestroy(&romApparcRegFilePath);
+    apparcRegFilePath = romDrive.Name();
+    apparcRegFilePath.Append(KApparcRegFileImportPath);
+    RegisterAllAppL(apparcRegFilePath);
+    
+	//Register all apps found in UDA
+	TDriveUnit systemDrive(iSystemDrive);
+
+	//Register all apps found in <systemdrive>\private\10003a3f\apps
+	apparcRegFilePath = systemDrive.Name();	
+	apparcRegFilePath.Append(KApparcRegFilePath);
+	RegisterAllAppL(apparcRegFilePath);
+
+	//Register all apps found in <systemdrive>\private\10003a3f\import\apps
+    apparcRegFilePath = systemDrive.Name();
+    apparcRegFilePath.Append(KApparcRegFileImportPath);
+    RegisterAllAppL(apparcRegFilePath);
+	
+	iScrSession.CommitTransactionL();    
+	
+	CleanupStack::PopAndDestroy(&apparcRegFilePath);
     
     DEBUG_PRINTF(_L8("SIS Registry Server - Completed processing of all existing ROM applications."));
     }
@@ -217,7 +237,7 @@
 	// Add the ROM installed stub details to SCR
 	// Create an SCR transaction, so that entries won't be added to the SCR if the function leaves
     TInt value(EIdlePhase1NOK);
-    RProperty::Get(KPSUidStartup, KPSIdlePhase1Ok, value);
+    TInt ret = RProperty::Get(KPSUidStartup, KPSIdlePhase1Ok, value);
 	
     TBool isFromSWIDaemon = EFalse;
     _LIT_SECURE_ID(KSWIDaemonSID, 0x10202DCE);
@@ -225,6 +245,17 @@
         { 
         isFromSWIDaemon = ETrue;
         }
+	
+	//If the image is NCP 'KPSUidStartup' property is not set, hence settig it explicitly for processing stubs
+	if(ret == KErrNotFound)
+		{
+		DEBUG_PRINTF(_L8("SIS Registry Server - 'KPSUidStartup' property is not set"));
+		value = EIdlePhase1Ok;
+		}
+	else
+		{
+		DEBUG_PRINTF(_L8("SIS Registry Server - 'KPSUidStartup' property is set"));
+		}
 	if ((value == EIdlePhase1Ok || isFromSWIDaemon) && iIsFirstInit)
 	    {
         ProcessRomStubsL();
@@ -242,7 +273,7 @@
         iFs.Delete(fileName);
         CleanupStack::PopAndDestroy(&fileName);
 
-        ProcessRomApplicationsL();
+        ProcessApplicationsL();
 	    }
 	}
 
@@ -501,7 +532,13 @@
         break;
 	case EComponentIdsForPackageUid:	    
         GetComponentIdsForUidL(aMessage);        
-        break;	    
+        break;
+	case EAddAppRegInfo:
+	    AddAppRegInfoL(aMessage);
+	    break;
+	case ERemoveAppRegInfo:
+	    RemoveAppRegInfoL(aMessage);
+	    break;
 	default:
 		PanicClient(aMessage,EPanicIllegalFunction);
 		break;
@@ -879,33 +916,40 @@
 	TInt64 transactionID;
 	TPckg<TInt64> pkgTransactionID(transactionID);
 	aMessage.ReadL(EIpcArgument2, pkgTransactionID);
-	
-	// create a integrity service object
-	Usif::RStsSession stssession;
-	stssession.OpenTransactionL(transactionID);
-	CleanupClosePushL(stssession);
+		
+	DeleteEntryL(*object, transactionID, ETrue);
 	
-	RemoveEntryL(*object);
-	RemoveCleanupInfrastructureL(*object, stssession);
-
-	// If removal is for ROM upgrade type, after removing the existing registry entry set,
-	// regenerate the Registry Entry Cache. 
-	// If any of the ROM based stub doesn't have its registry set 
-	// in appropriate path, it will create them (SCR entry & . ctl) 
-	// from the ROM based stub sis file.	
-	if ((object->InstallType() == Sis::EInstInstallation || 
-		 object->InstallType() == Sis::EInstPartialUpgrade) &&	
-		SisRegistryUtil::RomBasedPackageL(object->Uid()))
-		{	
-		// Re-add the ROM installed stub details to SCR (only those missing will be added)
-		ProcessRomDriveL();
-		}
-	
- 	CleanupStack::PopAndDestroy(2, object);// STS 
+ 	CleanupStack::PopAndDestroy(object);
 	
 	aMessage.Complete(KErrNone);
 	}
 
+void CSisRegistrySession::DeleteEntryL(const CSisRegistryObject& aObject, TInt64 aTransactionId, TBool aCleanupRequired/*=ETrue*/)
+    {
+    // create a integrity service object
+    Usif::RStsSession stssession;
+    stssession.OpenTransactionL(aTransactionId);
+    CleanupClosePushL(stssession);
+        
+    RemoveEntryL(aObject);
+    RemoveCleanupInfrastructureL(aObject, stssession);
+    
+    // If removal is for ROM upgrade type, after removing the existing registry entry set,
+    // regenerate the Registry Entry Cache. 
+    // If any of the ROM based stub doesn't have its registry set 
+    // in appropriate path, it will create them (SCR entry & . ctl) 
+    // from the ROM based stub sis file.    
+    if ((aObject.InstallType() == Sis::EInstInstallation || 
+            aObject.InstallType() == Sis::EInstPartialUpgrade) &&  
+                SisRegistryUtil::RomBasedPackageL(aObject.Uid()) && 
+                    aCleanupRequired)
+        {   
+        // Re-add the ROM installed stub details to SCR (only those missing will be added)
+        ProcessRomDriveL();
+        }    
+    CleanupStack::PopAndDestroy(&stssession);
+    }
+
 void CSisRegistrySession::OpenRegistryUidEntryL(const RMessage2& aMessage)
 	{
 	// expects a UID as an arg 0
@@ -1225,15 +1269,82 @@
 
 void CSisRegistrySession::AddDriveL(const RMessage2& aMessage)
 	{
-	TInt drive;
-	TPckg<TInt> pkgDrive(drive);
+	TInt addedDrive;
+	TPckg<TInt> pkgDrive(addedDrive);
 	aMessage.ReadL(EIpcArgument0, pkgDrive);
 
-	DEBUG_PRINTF2(_L8("Sis Registry Server - Removable drive %d added."), drive);
+	DEBUG_PRINTF2(_L8("Sis Registry Server - Removable drive %d added."), addedDrive);
+	    
+	// Get the drive character.
+	TChar drive;
+	User::LeaveIfError(iFs.DriveToChar(addedDrive, drive));
+	TUint driveChar(drive);
+	    
+	// Retrieve drive info.
+	TDriveInfo driveInfo;
+	User::LeaveIfError(iFs.Drive(driveInfo, addedDrive));
+#ifndef __WINSCW__	   
+	if(driveInfo.iDriveAtt & KDriveAttLogicallyRemovable)
+#endif	    
+	    {
+	    /*
+	    In case a logically removable drive is added,
+	    Look for the presence of the first boot marker file corresponding to it in the sisregistry private
+	    folder in C drive. If absent, assume first boot and create the marker file. 
+	    Also added a marker file in the <drive>\sys\install directory which would be used to detect a format. 
+	         
+	    Subsequent boots would look for the drive format marker to check if a format has occured and delete
+	    the registry entries.
+	    */
+	    
+	    // Create first boot marker path.
+	    _LIT(KFirstBootMarkerFilePath, "%c:%SfirstBootMarkerFileFor%c");
+	    RBuf privatePath;
+		privatePath.CreateL(KMaxPath);
+	    CleanupClosePushL(privatePath);
+	    User::LeaveIfError(iFs.PrivatePath(privatePath));
+
+	    RBuf firstBootMarkerFilePath;
+		firstBootMarkerFilePath.CreateL(KMaxPath);
+	    CleanupClosePushL(firstBootMarkerFilePath);
 
+	    TChar systemDrive = RFs::GetSystemDriveChar();
+	    firstBootMarkerFilePath.Format(KFirstBootMarkerFilePath, static_cast<TUint>(systemDrive), &privatePath, driveChar); 
+	        
+	    // Create drive format marker path.
+	    _LIT(KFormatMarkerPath, "%c:\\sys\\install\\formatMarkerFile");
+	    
+		RBuf formatMarkerPath;
+		formatMarkerPath.CreateL(KMaxPath);
+	    CleanupClosePushL(formatMarkerPath);
+		formatMarkerPath.Format(KFormatMarkerPath, driveChar); 
+	       
+		// The drive marker files are marked hidden and read-only.
+        TUint fileAttributes = KEntryAttReadOnly | KEntryAttHidden;
+
+	    if(!SisRegistryUtil::FileExistsL(iFs, firstBootMarkerFilePath))
+	        {
+	        // First boot detected. Add the first boot marker file as well as the format marker on the drive.
+	        SisRegistryUtil::CreateFileWithAttributesL(iFs, firstBootMarkerFilePath);
+	        SisRegistryUtil::CreateFileWithAttributesL(iFs, formatMarkerPath, fileAttributes);
+	        }
+	    else
+	        {
+	        // Subsequent boot. Check for the presence of a marker file <drive>\sys\install directory.
+	        // If absent, assume format.
+	        if(!SisRegistryUtil::FileExistsL(iFs, formatMarkerPath))
+	            {
+	            DriveFormatDetectedL(TDriveUnit(addedDrive));
+	            //Add missing format marker file
+	            SisRegistryUtil::CreateFileWithAttributesL(iFs, formatMarkerPath, fileAttributes);
+	            }           
+	        }
+		CleanupStack::PopAndDestroy(3, &privatePath);
+	    }
+	    
 	// Find flagging controllers for non-preinstalled packages on
 	// this drive and do cleanup if necessary
-	ProcessRemovableDriveL(drive);
+	ProcessRemovableDriveL(addedDrive);
 
 	aMessage.Complete(KErrNone);
 	}
@@ -2991,11 +3102,11 @@
     CleanupStack::PopAndDestroy(2, compFilter);    
     }
 
-void CSisRegistrySession::RegisterAllInRomAppL(RBuf& aRomApparcRegFilePath)
+void CSisRegistrySession::RegisterAllAppL(RBuf& aApparcRegFilePath)
     {
 	CDir* dir;
-	TInt err = iFs.GetDir(aRomApparcRegFilePath, KEntryAttMatchExclude | KEntryAttDir, ESortNone, dir);	
-	DEBUG_PRINTF2(_L8("Sis Registry Server - Reading ROM apparc registration file directory returned %d."), err);
+	TInt err = iFs.GetDir(aApparcRegFilePath, KEntryAttMatchExclude | KEntryAttDir, ESortNone, dir);	
+	DEBUG_PRINTF3(_L("Sis Registry Server - Reading apparc registration file directory(%S) returned %d."), &aApparcRegFilePath, err);
 	
 	if (err == KErrNone)
 		{
@@ -3017,7 +3128,7 @@
 		appLanguages.AppendL(User::Language());
 		for (TInt index = 0; index < count; ++index)
 			{
-			appRegFileName = TParsePtrC(aRomApparcRegFilePath).DriveAndPath();
+			appRegFileName = TParsePtrC(aApparcRegFilePath).DriveAndPath();
 			appRegFileName.Append((*dir)[index].iName);
 			RFile file;
 			CleanupClosePushL(file);
@@ -3050,3 +3161,246 @@
 		User::Leave(err);
 		}
     }
+
+void CSisRegistrySession::DriveFormatDetectedL(TDriveUnit aDrive)
+    {
+    DEBUG_PRINTF2(_L("Sis Registry Server - Drive format detected for drive %d"), static_cast<TInt>(aDrive));
+    
+    Usif::RStsSession stsSession;
+    TInt64 transactionId = stsSession.CreateTransactionL();
+    CleanupClosePushL(stsSession);
+    
+	//Create SCR Transaction
+    iScrSession.CreateTransactionL();
+    
+    RArray<TComponentId> foundComponentIds;
+    CleanupClosePushL(foundComponentIds);
+        
+    TDriveList filterFormatDrive;
+    filterFormatDrive.FillZ(KMaxDrives);
+    filterFormatDrive[static_cast<TInt>(aDrive)] = 1;
+    
+    CComponentFilter* componentFilter = CComponentFilter::NewLC();
+    componentFilter->SetInstalledDrivesL(filterFormatDrive);
+        
+    iScrSession.GetComponentIdsL(foundComponentIds, componentFilter);
+    
+    TBool processRomDrive = EFalse;
+    for(TInt i=0; i < foundComponentIds.Count(); ++i)
+        {
+        CSisRegistryObject* object = CSisRegistryObject::NewLC();
+        ScrHelperUtil::GetComponentL(iScrSession, foundComponentIds[i], *object);
+        TUint installedDrives = object->Drives();
+            
+        if(installedDrives & (1 << aDrive))
+            {
+            if (!processRomDrive && 
+                    (object->InstallType() == Sis::EInstInstallation || object->InstallType() == Sis::EInstPartialUpgrade) &&
+                        SisRegistryUtil::RomBasedPackageL(object->Uid()))
+                {   
+                processRomDrive = ETrue;                   
+                }  
+                    
+            // Retrieve all the associated files.
+            RPointerArray<CSisRegistryFileDescription>& fileDescriptions = object->FileDescriptions();
+            _LIT(KHashPathFormat, "%c:\\sys\\hash\\%S");
+            for(TInt j=0; j<fileDescriptions.Count(); ++j)
+                {
+                const TDesC& targetPath = fileDescriptions[j]->Target();
+                        
+                // Get the drive on which the file is present.
+                TInt drive; 
+                User::LeaveIfError(RFs::CharToDrive(targetPath[0], drive));
+                        
+                // If the file is a binary ( present in \sys\bin), delete the corresponding hash present in 
+                // C:\sys\hash
+                        
+                if(KErrNotFound != targetPath.FindF(KBinPath))
+                    {
+                    // Retrieve the filename from the target path.
+                    TParsePtrC parser(targetPath);
+					HBufC* fileName = parser.NameAndExt().AllocLC();
+                    
+                    TChar systemDrive = RFs::GetSystemDriveChar();
+                    
+					// Create the hash file path.
+                    RBuf hashFilePath;
+                    hashFilePath.CreateL(KMaxPath);
+                    CleanupClosePushL(hashFilePath);
+                    hashFilePath.Format(KHashPathFormat, static_cast<TUint>(systemDrive), fileName);
+                            
+                    // Delete hash file.
+                    SisRegistryUtil::DeleteFile(iFs, hashFilePath); //Ignore return code.
+                    
+					CleanupStack::PopAndDestroy(2, fileName);
+					}
+                        
+                if(aDrive == TDriveUnit(drive))
+                    {
+                    // File does not exist on disk as the drive is assumed to have been formatted.
+                    continue;
+                    }
+                SisRegistryUtil::DeleteFile(iFs, targetPath); //Ignore return code.           
+                }
+                    
+            DeleteEntryL(*object, transactionId, EFalse);
+            CleanupStack::PopAndDestroy(object);
+            }
+        }
+
+    if(processRomDrive)
+        {
+        // Re-add the ROM installed stub details to SCR (only those missing will be added)
+        ProcessRomDriveL();
+        }
+    
+    //Commit the changes.
+    stsSession.CommitL();
+    iScrSession.CommitTransactionL();
+
+    CleanupStack::PopAndDestroy(3, &stsSession);
+    }
+
+
+void CSisRegistrySession::AddAppRegInfoL(const RMessage2& aMessage)
+{   
+    TUint regFileNameLen = aMessage.GetDesLengthL(EIpcArgument0);
+    HBufC* regFileName = HBufC::NewLC(regFileNameLen);
+    TPtr namePtr = regFileName->Des();
+    aMessage.ReadL(EIpcArgument0, namePtr);
+    
+    Usif::CApplicationRegistrationData* appRegData = NULL;
+    //Check if the file name passed is valid reg file or not , if valid then parse
+    TInt result = ValidateAndParseAppRegFileL(*regFileName, appRegData);
+    
+    if (result == KErrNone)
+        {
+        CleanupStack::PushL(appRegData);
+        TComponentId compId = 0; 
+        TUid appUid = appRegData->AppUid();
+        //Check if component exists for the appUid, if then append the app reg info to the same compId(base)        
+        TRAP_IGNORE(compId = iScrSession.GetComponentIdForAppL(appUid));
+        TRAPD(res, ScrHelperUtil::AddApplicationEntryL(iScrSession, compId, *appRegData));
+        if (res != KErrNone && res != KErrAlreadyExists )
+            {
+            DEBUG_PRINTF2(_L("Sis Registry Server - Failed to add app registration data of in the SCR . Error code %d."), res);
+            CleanupStack::PopAndDestroy(2, regFileName); //appRegData
+            aMessage.Complete(res);
+            return;
+            }        
+        else if (res == KErrAlreadyExists)
+            {   
+            // Delete the existing application entry, which is not associated with any package 
+            ScrHelperUtil::DeleteApplicationEntryL(iScrSession, appUid);            
+            ScrHelperUtil::AddApplicationEntryL(iScrSession, compId, *appRegData);
+            }
+        
+        //Notify Apparc of the new app
+        RSisLauncherSession launcher;
+        CleanupClosePushL(launcher);
+        User::LeaveIfError(launcher.Connect());
+        TAppUpdateInfo newAppInfo;
+        RArray<TAppUpdateInfo> affectedApps;    
+        CleanupClosePushL(affectedApps);
+        newAppInfo = TAppUpdateInfo(appUid, EAppInstalled);
+        affectedApps.AppendL(newAppInfo);
+        launcher.NotifyNewAppsL(affectedApps);
+        CleanupStack::PopAndDestroy(3, appRegData); // affectedApps, launcher
+        }
+    else
+        {
+        DEBUG_PRINTF2(_L8("Sis Registry Server - Parsing application registration info. Error code %d."), result);
+        }
+    
+    CleanupStack::PopAndDestroy(regFileName);
+    aMessage.Complete(result);
+}
+
+void CSisRegistrySession::RemoveAppRegInfoL(const RMessage2& aMessage)
+    {
+    TUint regFileNameLen = aMessage.GetDesLengthL(EIpcArgument0);
+    HBufC* regFileName = HBufC::NewLC(regFileNameLen);
+    TPtr namePtr = regFileName->Des();
+    aMessage.ReadL(EIpcArgument0, namePtr);
+    
+    Usif::CApplicationRegistrationData* appRegData = NULL;
+    //Check if the file name passed is valid reg file or not , if valid then parse
+    TInt result = ValidateAndParseAppRegFileL(*regFileName, appRegData);
+    
+    if(result == KErrNone)
+        {
+        CleanupStack::PushL(appRegData);
+        TUid appUid = appRegData->AppUid();
+        RArray<TAppUpdateInfo> affectedApps;    
+        CleanupClosePushL(affectedApps);
+    
+        ScrHelperUtil::DeleteApplicationEntryL(iScrSession, appUid);
+        
+        //Notify Apparc of the new app
+        RSisLauncherSession launcher;
+        CleanupClosePushL(launcher);
+        User::LeaveIfError(launcher.Connect());
+        TAppUpdateInfo newAppInfo;
+        newAppInfo = TAppUpdateInfo(appUid, EAppUninstalled);
+        affectedApps.AppendL(newAppInfo);
+        launcher.NotifyNewAppsL(affectedApps);
+        CleanupStack::PopAndDestroy(3, appRegData); // launcher, affectedApps
+        }
+    else
+        {
+        DEBUG_PRINTF2(_L8("Sis Registry Server - Parsing application registration info. Error code %d."), result);
+        }
+    CleanupStack::PopAndDestroy(regFileName);
+    aMessage.Complete(result);
+    }
+
+TInt CSisRegistrySession::ValidateAndParseAppRegFileL(const TDesC& aRegFileName, Usif::CApplicationRegistrationData*& aAppRegData)
+    {
+    //check if the destination of the reg resource file is apparc's pvt directory, if not return with 
+    TParsePtrC filename(aRegFileName);
+    if (filename.Path().Left(KApparcRegDir().Length()).CompareF(KApparcRegDir) != 0)
+        {
+        return KErrNotSupported;
+        }
+    
+    RFs fs;
+    CleanupClosePushL(fs);
+    User::LeaveIfError(fs.Connect());
+    User::LeaveIfError(fs.ShareProtected());
+    RFile file;
+    CleanupClosePushL(file);
+    User::LeaveIfError(file.Open(fs, aRegFileName, EFileRead));
+    
+    // Reading the TUidType information fron the reg rsc file header
+    TBuf8<sizeof(TCheckedUid)> uidBuf;
+    TInt err = file.Read(0, uidBuf, sizeof(TCheckedUid));
+    if (err != KErrNone)
+        {
+        CleanupStack::PopAndDestroy(2, &fs);  //file
+        return KErrNotSupported;
+        }
+    if(uidBuf.Size() != sizeof(TCheckedUid))
+        {
+        DEBUG_PRINTF(_L("The file is not a valid registration resource file"));
+        CleanupStack::PopAndDestroy(2, &fs);  // file
+        return KErrNotSupported;
+        }
+    TCheckedUid uid(uidBuf);
+    
+    //check the uid of the reg file to be parsed 
+    if(!(uid.UidType()[1] == KUidAppRegistrationFile))
+        {
+        CleanupStack::PopAndDestroy(2, &fs);  //file
+        return KErrNotSupported;
+        }
+    
+    RSisLauncherSession launcher;
+    CleanupClosePushL(launcher);
+    User::LeaveIfError(launcher.Connect());
+    RArray<TLanguage> appLanguages;
+    CleanupClosePushL(appLanguages);
+    appLanguages.AppendL(User::Language());         
+    TRAPD(result, aAppRegData = launcher.SyncParseResourceFileL(file, appLanguages)); 
+    CleanupStack::PopAndDestroy(4, &fs);  //appLanguages, launcher, file
+    return result;
+    }
--- a/installationservices/swi/source/sisregistry/server/sisregistryserversession.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/sisregistryserversession.h	Thu Jul 08 20:28:00 2010 +0300
@@ -118,7 +118,10 @@
 	void RequestRegistryEntryL(const RMessage2& aMessage);
 	void IsFileRegisteredL(const RMessage2& aMessage);
 	void GetComponentIdForUidL(const RMessage2& aMessage);
-    
+    void AddAppRegInfoL(const RMessage2& aMessage);
+    void RemoveAppRegInfoL(const RMessage2& aMessage);
+	TInt ValidateAndParseAppRegFileL(const TDesC& aRegFileName, Usif::CApplicationRegistrationData*& aAppRegData);
+	
 	// Subsession handling
 	void OpenRegistryUidEntryL(const RMessage2& aMessage);
 	void OpenRegistryPackageEntryL(const RMessage2& aMessage);
@@ -139,13 +142,14 @@
 	void AppRegInfoEntryL(const RMessage2& aMessage);
 
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
-	void RegisterAllInRomAppL(RBuf& aRomApparcRegFilePath);
+	void RegisterAllAppL(RBuf& aApparcRegFolder);
     void GetComponentIdForPackageL(const RMessage2& aMessage);
     void GetAppUidsForComponentL(const RMessage2& aMessage);
     void GetComponentIdsForUidL(const RMessage2& aMessage);
 #endif
 
 	void DeleteEntryL(const RMessage2& aMessage);
+	void DeleteEntryL(const CSisRegistryObject& aObject, TInt64 aTransactionId, TBool aCleanupRequired = ETrue);
 	void AddSoftwareTypeL(const RMessage2& aMessage);
 	void AddDriveL(const RMessage2& aMessage);
 
@@ -200,12 +204,13 @@
 	void UnregisterSoftwareTypesL(Usif::TComponentId aComponentId);
 	
 	void ProcessRomStubsL();
-	void ProcessRomApplicationsL();
+	void ProcessApplicationsL();
 	TBool IsFirmwareUpdatedL();	 
 	void  UpdateRecentFWVersionL(); 
 	TInt GetStubFileInfoL(TUid aUid, TStubExtractionMode aMode, TInt aStartingFileNo, TInt& aFileCount, RPointerArray<HBufC>& aFileNames);
 	TInt GetStubFilesL(const TDesC& aFileName, RPointerArray<HBufC>& aFileNames);
-
+	void DriveFormatDetectedL(TDriveUnit aDrive);
+	
 private:
     friend class CSisRevocationManager;
 
--- a/installationservices/swi/source/sisregistry/server/sisregistryutil.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/sisregistryutil.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -101,6 +101,38 @@
 		}
 	}
 
+void SisRegistryUtil::CreateFileWithAttributesL(RFs& aFs, const TDesC& aPath, const TUint aAttributesMask/*= 0*/)
+    {
+    // Creates the folder structure by ignoring the filename at the end.
+    EnsureDirExistsL(aFs, aPath);
+
+    RFile file;
+    CleanupClosePushL(file);
+    User::LeaveIfError(file.Create(aFs, aPath, EFileWrite));
+   
+    if(aAttributesMask != 0)
+        {
+        file.SetAtt(aAttributesMask, 0); // Ignoring return value.
+        }
+    CleanupStack::PopAndDestroy(&file);
+    }
+
+TInt SisRegistryUtil::DeleteFile(RFs& aFs, const TDesC& aPath)
+    {
+    TInt err = aFs.Delete(aPath);
+    
+    if(KErrNone != err)
+        {
+        DEBUG_PRINTF2(_L("Failed to delete file %S."), &aPath);
+        }
+    else
+        {
+        DEBUG_PRINTF2(_L("Deleted file %S successfully."), &aPath);
+        }
+    
+    return err;
+    }
+
 // Processes the ROM stub files. Retuns ETrue if the aUid or aName
 // is found in any of the ROM stub files, else returns EFalse.
 TBool SisRegistryUtil::RomBasedPackageL(const TUid& aUid)
--- a/installationservices/swi/source/sisregistry/server/sisregistryutil.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/sisregistryutil.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -46,6 +46,8 @@
  	static HBufC* BuildControllerFileNameLC(TUid aUid, TInt aIndex, TInt aController, TInt aDrive);
 	static HBufC* BuildStubFilesPathLC(TInt aDrive);
 	static void EnsureDirExistsL(RFs& aFs, const TDesC& aPath);
+	static void CreateFileWithAttributesL(RFs& aFs, const TDesC& aPath, const TUint aAttributesMask = 0);
+	static TInt DeleteFile(RFs& aFs, const TDesC& aPath);
 	static TBool RomBasedPackageL(const TUid& aUid);
 	static HBufC* BuildLogFileNameLC();
 	static TUid IdentifyUidFromSisFileL(RFs& aFs, TDesC& aFilename);
--- a/installationservices/swi/test/swicaptests/registrycaptest.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/swicaptests/registrycaptest.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -53,6 +53,7 @@
 _LIT(KRevocationRegistryCapTestName, "Registry revocation interface capability test");
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 _LIT(KSifServerRegistryCapTestName, "Registry SIF interface security test");
+_LIT(KSisRegistryTCBCapTestName, "Sis Registry interface requiring TCB security test");
 #endif
 
 CPublicRegistryCapTest* CPublicRegistryCapTest::NewL()
@@ -607,6 +608,47 @@
 
 	CleanupStack::PopAndDestroy(&session);
 	}
+
+CSisRegistryTCBCapTest* CSisRegistryTCBCapTest::NewL()
+    {
+    CSisRegistryTCBCapTest* self=new(ELeave) CSisRegistryTCBCapTest();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CSisRegistryTCBCapTest::CSisRegistryTCBCapTest()
+    {
+    SetCapabilityRequired(ECapabilityTCB); //API requires TCB capability, so giving it
+    }
+    
+void CSisRegistryTCBCapTest::ConstructL()
+    {
+    SetNameL(KSisRegistryTCBCapTestName);
+    }
+
+void CSisRegistryTCBCapTest::RunTestL()
+    {
+    Swi::RSisRegistrySession registrySession;
+    CleanupClosePushL(registrySession);
+    _LIT(regFileName,"c:\\private\\10003a3f\\import\\apps\\dummy_reg.rsc");
+    TInt err = registrySession.Connect();
+    if (KErrNone != err)
+        {
+        SetFail();
+        CleanupStack::PopAndDestroy(&registrySession);
+        return;
+        }
+
+    TRAP(err, registrySession.AddAppRegInfoL(regFileName));
+    CheckFailL(err, _L("AddAppRegInfoL"));
+    
+    TRAP(err, registrySession.RemoveAppRegInfoL(regFileName));
+    CheckFailL(err, _L("RemoveAppRegInfoL"));
+
+    CleanupStack::PopAndDestroy(&registrySession);
+    }
 #endif
 
 
--- a/installationservices/swi/test/swicaptests/registrycaptest.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/swicaptests/registrycaptest.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -109,4 +109,19 @@
 
 	void ConstructL();
 	};
+
+/** Tests registry interfaces to add reg file data to scr with TCB capability*/
+class CSisRegistryTCBCapTest : public CDefaultCapabilityTest
+    {
+public:
+    static CSisRegistryTCBCapTest* NewL();
+    
+private:
+    CSisRegistryTCBCapTest();
+    
+    void RunTestL();
+
+    void ConstructL();
+    };
+
 #endif
--- a/installationservices/swi/test/swicaptests/swicaptests.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/swicaptests/swicaptests.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -52,6 +52,8 @@
 	factory->AddTestL(CSifServerRegistryCapTest::NewL());
 	factory->AddTestL(CSwiLauncherInstallServerUtilCapTest::NewL());
 	factory->AddTestL(CSwiLauncherSisRegistryServerUtilCapTest::NewL());
+	factory->AddTestL(CSisRegistryTCBCapTest::NewL());
+	factory->AddTestL(CSisLauncherSwiSidTest::NewL());
 #endif
 	return factory;
 	}
--- a/installationservices/swi/test/swicaptests/swilaunchercaptest.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/swicaptests/swilaunchercaptest.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -24,6 +24,7 @@
 #include "sislauncherclient.h"
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 #include "swtypereginfo.h"
+#include "sislauncherclient.h"
 #endif
 #include <e32def.h>
 
@@ -32,7 +33,7 @@
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 _LIT(KSwiLauncherInstallServerUtilCapTestName, "Swi Launcher Utils for InstallServer capability test");
 _LIT(KSwiLauncherSisRegistryServerUtilCapTestName, "Swi Launcher Utils for SisRegistryServer capability test");
-
+_LIT(KSisLauncherSwiSidCapTest, "Sis Launcher API's which require SWI Sid");
 const TUid KInstallServerUid = {0x101F7295};
 const TUid KSisRegistryServerUid = {0x10202DCA};
 #endif
@@ -202,6 +203,8 @@
 	Swi::RSisLauncherSession launcher;
 	CleanupClosePushL(launcher);
 	
+	const RArray<Swi::TAppUpdateInfo> appUpdateInfo;
+	
 	if (launcher.Connect() != KErrNone)
 		{
 		CleanupStack::PopAndDestroy(&launcher);
@@ -215,7 +218,50 @@
 	
 	TRAP(err, launcher.UnregisterSifLauncherMimeTypesL(mimeTypes));
 	CheckFailL(err, _L("UnregisterSifLauncherMimeTypesL"));
+    
+    TRAP(err, launcher.NotifyNewAppsL(appUpdateInfo));
+    CheckFailL(err, _L("NotifyNewAppsL - update apparc"));
 	
 	CleanupStack::PopAndDestroy(2, &launcher); // mimeTypes
 	}
+
+//CSisLauncherSwiSidTest----------------------------------------------------------------------------------------------------------------------------------
+
+CSisLauncherSwiSidTest* CSisLauncherSwiSidTest::NewL()
+    {
+    CSisLauncherSwiSidTest* self = new (ELeave) CSisLauncherSwiSidTest();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CSisLauncherSwiSidTest::CSisLauncherSwiSidTest()
+    {
+    SetCapabilityRequired(ECapabilityTCB);
+    SetSidRequired(KInstallServerUid);
+    }
+    
+void CSisLauncherSwiSidTest::ConstructL()
+    {
+    SetNameL(KSisLauncherSwiSidCapTest);
+    }
+
+void CSisLauncherSwiSidTest::RunTestL()
+    {
+    Swi::RSisLauncherSession launcher;
+    CleanupClosePushL(launcher);
+    const RPointerArray<Usif::CApplicationRegistrationData> appRegData;
+    TInt err = launcher.Connect();
+    if (err != KErrNone)
+        {
+        CleanupStack::PopAndDestroy(&launcher);
+        return;
+        }
+    err=KErrNone;
+    TRAP(err, launcher.NotifyNewAppsL(appRegData));
+    CheckFailL(err, _L("NotifyNewAppsL - force registration"));
+    CleanupStack::PopAndDestroy(&launcher);
+    }
+
 #endif
--- a/installationservices/swi/test/swicaptests/swilaunchercaptest.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/swicaptests/swilaunchercaptest.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -51,15 +51,29 @@
 	};
 
 class CSwiLauncherSisRegistryServerUtilCapTest : public CDefaultCapabilityTest
-	{
+    {
 public:
-	static CSwiLauncherSisRegistryServerUtilCapTest* NewL();
-	
+    static CSwiLauncherSisRegistryServerUtilCapTest* NewL();
+    
 private:
-	CSwiLauncherSisRegistryServerUtilCapTest();
-	
-	void RunTestL();
-	
-	void ConstructL();
-	};
+    CSwiLauncherSisRegistryServerUtilCapTest();
+    
+    void RunTestL();
+    
+    void ConstructL();
+    };
+
+class CSisLauncherSwiSidTest : public CDefaultCapabilityTest
+    {
+public:
+    static CSisLauncherSwiSidTest* NewL();
+    
+private:
+    CSisLauncherSwiSidTest();
+    
+    void RunTestL();
+    
+    void ConstructL();
+    };
+
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/tdaemon/scripts/batchfiles/setupforemmcformat_post.bat	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,29 @@
+@rem
+@rem Copyright (c) 2010 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 FILE=\epoc32\winscw\c\tswi\certstore\swicertstore.dat
+
+echo Installing SWI cert store data file from %FILE%
+
+mkdir \epoc32\release\winscw\udeb\z\resource\
+mkdir \epoc32\release\winscw\urel\z\resource\
+copy /y %FILE% \epoc32\release\winscw\udeb\z\resource\swicertstore.dat
+copy /y %FILE% \epoc32\release\winscw\urel\z\resource\swicertstore.dat
+
+del /s /f /q \epoc32\release\winscw\udeb\z\system\install\eclispingteststub.sis
+del /s /f /q \epoc32\release\winscw\urel\z\system\install\eclispingteststub.sis
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/tdaemon/scripts/batchfiles/setupforemmcformat_pre.bat	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,29 @@
+@rem
+@rem Copyright (c) 2010 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 FILE=\epoc32\winscw\c\tswi\certstore\swicertstore_sucert.dat
+
+echo Installing SWI cert store data file from %FILE%
+
+mkdir \epoc32\release\winscw\udeb\z\resource\
+mkdir \epoc32\release\winscw\urel\z\resource\
+copy /y %FILE% \epoc32\release\winscw\udeb\z\resource\swicertstore.dat
+copy /y %FILE% \epoc32\release\winscw\urel\z\resource\swicertstore.dat
+
+copy /y \epoc32\winscw\c\tswi\teclipsing\data\eclispingteststub.sis \epoc32\release\winscw\urel\z\system\install\eclispingteststub.sis
+copy /y \epoc32\winscw\c\tswi\teclipsing\data\eclispingteststub.sis \epoc32\release\winscw\udeb\z\system\install\eclispingteststub.sis
\ No newline at end of file
--- a/installationservices/swi/test/tdaemon/scripts/tdaemon.ini	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tdaemon/scripts/tdaemon.ini	Thu Jul 08 20:28:00 2010 +0300
@@ -1,3 +1,197 @@
 [DriveWatcher]
 
 [Daemon]
+
+[AddDriveX]
+drive=X
+
+[AddDriveT]
+drive=T
+
+[InstallSA_on_emmc]
+sis=z:\tswi\tsis\data\emmc_format_base_on_emmc.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSA_on_c]
+sis=z:\tswi\tsis\data\emmc_format_base_on_c_drive.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSP_on_c_and_emmc]
+sis=z:\tswi\tsis\data\emmc_format_sp_distributed.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSP_on_emmc]
+sis=z:\tswi\tsis\data\emmc_format_sp_emmc.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallPU_on_emmc]
+sis=z:\tswi\tsis\data\emmc_format_pu_on_emmc.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSP_on_c]
+sis=z:\tswi\tsis\data\emmc_format_sp_on_c.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSA_on_c_and_T]
+sis=z:\tswi\tsis\data\emmc_format_base_on_c_and_t.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSA_on_distributed_drives]
+sis=z:\tswi\tsis\data\emmc_format_base_distributed.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSANR_on_distributed_drives]
+sis=z:\tswi\tsis\data\emmc_format_base_distributed_NR_sucert.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallSANR_on_c_and_T]
+sis=z:\tswi\tsis\data\emmc_format_base_on_c_and_t_NR_sucert.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallEclipsingSA_on_c_and_emmc]
+sis=z:\tswi\tsis\data\eclipsingdllupgradesa_on_c_and_emmc_root5.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[InstallEclipsingPU_on_c_and_emmc]
+sis=z:\tswi\tsis\data\eclipsingdllupgradepu_on_c_and_emmc_root5.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+
+[u_Eclipsing]
+uid =802730A1
+script=z:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
+
+[u_Install]
+uid =8000887D
+script=z:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+
+[CheckX]
+NoOfComponents=0
+FormatDrive=X
+
+[CheckT]
+NoOfComponents=0
+FormatDrive=T
+
+[Check_component_exists_for_SA_after_emmc_format_case1]
+ComponentName=emmc_format_base_on_emmc
+VendorName=Vendor
+NoOfComponents=0
+
+[Check_files_exists_for_SA_after_emmc_format]
+numnonexist = 6
+nonexist0 = c:\sys\bin\runtestexe_app.exe
+nonexist1 = c:\sys\bin\console_app.exe
+nonexist2 = x:\dummy.txt
+nonexist3 = C:\sys\install\sisregistry\8000887d\00000000_0000.ctl
+nonexist4 = C:\sys\hash\runtestexe_app.exe
+nonexist5 = C:\sys\hash\console_app.exe
+
+[Check_files_exists_for_SA_after_T_dive_format]
+numexist = 6
+exist0 = c:\sys\bin\runtestexe_app.exe
+exist1 = c:\sys\bin\console_app.exe
+exist2 = x:\dummy.txt
+exist3 = C:\sys\install\sisregistry\8000887d\00000000_0000.ctl
+exist4 = C:\sys\hash\runtestexe_app.exe
+exist5 = C:\sys\hash\console_app.exe
+
+[Check_component_exists_for_SP_after_emmc_format_case2]
+ComponentName=emmc_format_base_on_c_drive
+VendorName=Vendor
+NoOfComponents=1
+
+[Check_component_exists_for_SP_after_emmc_format_case3]
+ComponentName=emmc_format_base_on_c_drive
+VendorName=Vendor
+NoOfComponents=0
+
+[Check_component_exists_for_SA_after_emmc_format_3]
+ComponentName=emmc_format_base_on_emmc
+VendorName=Vendor
+NoOfComponents=1
+
+[Check_files_exists_for_SP_after_emmc_format]
+numnonexist=4
+nonexist0 = c:\sys\bin\console_app2.exe
+nonexist1 = x:\dummy.txt
+nonexist2 = C:\sys\install\sisregistry\8000887d\00000001_0000.ctl
+nonexist3 = C:\sys\hash\console_app2.exe
+
+[Check_files_exists_for_Two_SP_after_emmc_format]
+numnonexist = 5
+nonexist0 = c:\sys\bin\console_app2.exe
+nonexist1 = x:\dummy.txt
+nonexist2 = x:\dummy1.txt
+nonexist3 = C:\sys\install\sisregistry\8000887d\00000001_0000.ctl
+nonexist4 = C:\sys\hash\console_app2.exe
+
+[Check_marker_files]
+numnonexist = 2
+nonexist0 = c:\private\102020DCE\firstbootmarkernonexistforx
+nonexist1 = x:\sys\install\formatmarker
+
+
+[Check_component_exists_for_SASP_after_emmc_format]
+ComponentName=emmc_format_sp_on_c
+VendorName=Vendor
+NoOfComponents=1
+
+[Check_files_exists_for_SASP_after_emmc_format]
+numnonexist = 9
+nonexist0 = c:\sys\bin\runtestexe_app.exe
+nonexist1 = c:\sys\bin\console_app.exe
+nonexist2 = x:\dummy.txt
+nonexist3 = C:\sys\install\sisregistry\8000887d\00000000_0000.ctl
+nonexist4 = C:\sys\hash\runtestexe_app.exe
+nonexist5 = C:\sys\hash\console_app.exe
+nonexist6 = c:\sys\bin\console_app2.exe
+nonexist7 = C:\sys\install\sisregistry\8000887d\00000001_0000.ctl
+nonexist8 = C:\sys\hash\console_app2.exe
+
+//case7
+[Check_component_exists_for_SA_on_C_and_T_after_emmc_format]
+ComponentName=emmc_format_base_on_c_and_t
+VendorName=Vendor
+NoOfComponents=1
+
+//case8
+[Check_component_exists_for_SA_on_C_E_and_T_after_emmc_format]
+ComponentName=emmc_format_base_distributed
+VendorName=Vendor
+NoOfComponents=0
+
+//case9
+[Check_component_exists_for_SA_on_C_E_and_T_after_emmc_format_case9]
+ComponentName=emmc_format_base_distributed
+VendorName=Vendor
+NoOfComponents=0
+
+[Check_component_exists_for_SA_on_C_E_and_T_after_emmc_format]
+ComponentName=emmc_format_base_distributed
+VendorName=Vendor
+NoOfComponents=0
+
+[Check_component_exists_for_SA_on_C_and_T_after_emmc_format??]
+ComponentName=emmc_format_base_on_c_and_t_NR
+VendorName=Vendor
+NoOfComponents=1
+
+[Check_files_exists_for_SA_on_C_and_T_after_emmc_format]
+numexist = 6
+exist0 = c:\sys\bin\runtestexe_app.exe
+exist1 = c:\sys\bin\console_app.exe
+exist2 = T:\dummy1.txt
+exist3 = C:\sys\install\sisregistry\8000887d\00000000_0000.ctl
+exist4 = C:\sys\hash\runtestexe_app.exe
+exist5 = C:\sys\hash\console_app.exe
+
+[Check_files_exists_for_SA_on_C_E_and_T_after_emmc_format]
+numnonexist = 7
+nonexist0 = c:\sys\bin\runtestexe_app.exe
+nonexist1 = c:\sys\bin\console_app.exe
+nonexist2 = x:\dummy.txt
+nonexist3 = C:\sys\install\sisregistry\8000887d\00000000_0000.ctl
+nonexist4 = C:\sys\hash\runtestexe_app.exe
+nonexist5 = C:\sys\hash\console_app.exe
+nonexist6 = T:\dummy1.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/tdaemon/scripts/tdaemon_winscw.script	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,262 @@
+//
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE tdaemon
+LOAD_SUITE tuiscriptadaptors
+LOAD_SUITE tscr -SharedData
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0001
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file(files distributed across C drive and emmc i.e 'X' Drive) and  Format EMMC.
+//! @SYMTestExpectedResults	Registry entries for the package gets cleaned
+
+START_TESTCASE API-SEC-CR_405-5166-0001
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP 100 tscr ScrComponentPresentForNameVendor z:\tswi\tdaemon\scripts\tdaemon.ini Check_component_exists_for_SA_after_emmc_format_case1
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_after_emmc_format
+END_TESTCASE API-SEC-CR_405-5166-0001
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0002
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c drive and then upgrade it with SP(files distributed across C drive and emmc i.e 'X' Drive) and  Format EMMC.
+//! @SYMTestExpectedResults	Registry entries for the SP package gets cleaned
+
+START_TESTCASE API-SEC-CR_405-5166-0002
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_c
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSP_on_c_and_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP 100 tscr ScrComponentPresentForNameVendor z:\tswi\tdaemon\scripts\tdaemon.ini Check_component_exists_for_SP_after_emmc_format_case2
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SP_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0002
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0003
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c drive and then upgrade it with PU on emmc and  Format EMMC.
+//! @SYMTestExpectedResults	Registry entries for the complete package gets cleaned
+
+START_TESTCASE API-SEC-CR_405-5166-0003
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_c
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallPU_on_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP 100 tscr ScrComponentPresentForNameVendor z:\tswi\tdaemon\scripts\tdaemon.ini Check_component_exists_for_SP_after_emmc_format_case3
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_after_emmc_format
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0003
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0004
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c drive and then upgrade it with two SP's both on emmc and format emmc.
+//! @SYMTestExpectedResults	Registry entries for bothe the sp's gets cleaned
+
+START_TESTCASE API-SEC-CR_405-5166-0004
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_c
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSP_on_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSP_on_c_and_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP 100 tscr ScrComponentPresentForNameVendor z:\tswi\tdaemon\scripts\tdaemon.ini Check_component_exists_for_SP_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_Two_SP_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0004
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0005
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Unmount and mount emmc
+//! @SYMTestExpectedResults	No change in registry entries.
+
+START_TESTCASE API-SEC-CR_405-5166-0005
+RUN_TEST_STEP 100 tuiscriptadaptors MmcUnMountStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tuiscriptadaptors MmcMountStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+END_TESTCASE API-SEC-CR_405-5166-0005
+
+
+RUN_UTILS DeleteFile c:\private\102020DCA\firstbootmarkerfileforx
+RUN_UTILS DeleteFile x:\sys\install\formatmarker
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0006
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		After first boot of the device , marker files gets created on system drive(one for each emmc) and emmc
+//! @SYMTestExpectedResults	Marker files gets created on system drive(one for each emmc) and emmc successfuly
+
+START_TESTCASE API-SEC-CR_405-5166-0006
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_marker_files
+END_TESTCASE API-SEC-CR_405-5166-0006
+
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0007
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c drive and t drive and format emmc.
+//! @SYMTestExpectedResults	No impact on the package 
+
+START_TESTCASE API-SEC-CR_405-5166-0007
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_c_and_T
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP 100 tscr ScrComponentPresentForNameVendor z:\tswi\tdaemon\scripts\tdaemon.ini Check_component_exists_for_SA_on_C_and_T_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_and_T_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0007
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0008
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c , x and t drive  then unmount T drive, format emmc and again mount x drive.
+//! @SYMTestExpectedResults	Remove complete SA
+
+START_TESTCASE API-SEC-CR_405-5166-0008
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_distributed_drives
+RUN_TEST_STEP 100 tuiscriptadaptors MmcUnMountStep z:\tswi\tuiscriptadaptors\scripts\drives.ini T
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tuiscriptadaptors MmcMountStep z:\tswi\tuiscriptadaptors\scripts\drives.ini T
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveT
+DELAY 2000
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP 100 tscr ScrComponentPresentForNameVendor z:\tswi\tdaemon\scripts\tdaemon.ini Check_component_exists_for_SA_on_C_E_and_T_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_E_and_T_after_emmc_format
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0008
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0009
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c , x and t drive  then  format emmc drive.
+//! @SYMTestExpectedResults	Remove complete SA
+
+START_TESTCASE API-SEC-CR_405-5166-0009
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_distributed_drives
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP 100 tscr ScrComponentPresentForNameVendor z:\tswi\tdaemon\scripts\tdaemon.ini Check_component_exists_for_SA_on_C_E_and_T_after_emmc_format_case9
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_E_and_T_after_emmc_format
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0009
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0010
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA on c , x and format T drive.
+//! @SYMTestExpectedResults	Remove complete SA
+
+START_TESTCASE API-SEC-CR_405-5166-0010
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSA_on_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini T
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveT
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckT
+RUN_TEST_STEP 100 tscr ScrComponentPresentForNameVendor z:\tswi\tdaemon\scripts\tdaemon.ini Check_component_exists_for_SA_after_emmc_format_3
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_after_T_dive_format
+RUN_TEST_STEP tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0010
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0011
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA(NR) on c , x and t drive  then format emmc drive.
+//! @SYMTestExpectedResults	Remove complete SA
+
+START_TESTCASE API-SEC-CR_405-5166-0011
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSANR_on_distributed_drives
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP 100 tscr ScrComponentPresentForNameVendor z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_E_and_T_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_E_and_T_after_emmc_format
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0011
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0012
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install sis file SA(NR) on c drive and t drive and format emmc.
+//! @SYMTestExpectedResults	No impact on the package 
+
+START_TESTCASE API-SEC-CR_405-5166-0012
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallSANR_on_c_and_T
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP 100 tscr ScrComponentPresentForNameVendor z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_and_T_after_emmc_format
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tdaemon\scripts\tdaemon.ini Check_files_exists_for_SA_on_C_and_T_after_emmc_format
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini T
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveT
+DELAY 2000
+RUN_TEST_STEP_RESULT -1 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Install
+END_TESTCASE API-SEC-CR_405-5166-0012
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0013
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install a sis file SP(eclipsing) on c drive and x drive and format emmc.
+//! @SYMTestExpectedResults	SP should be removed amd we will revert back to stubs 
+
+START_TESTCASE API-SEC-CR_405-5166-0013
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallEclipsingSA_on_c_and_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Eclipsing
+END_TESTCASE API-SEC-CR_405-5166-0013
+
+//! @SYMTestCaseID 		API-SEC-CR_405-5166-0014
+//! @SYMTestCaseDesc		CR_405-5166: SIS Registry: Cleans the registry entries for the packages installed on emmc i.e 'X' Drive
+//! @SYMDEF			CR_405-5166
+//! @SYMTestActions		Install a sis file SP(eclipsing) on c drive and x drive and format emmc.
+//! @SYMTestExpectedResults	SP should be removed amd we will revert back to stubs 
+
+START_TESTCASE API-SEC-CR_405-5166-0014
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tdaemon\scripts\tdaemon.ini InstallEclipsingPU_on_c_and_emmc
+RUN_TEST_STEP 100 tuiscriptadaptors MmcFormatStep z:\tswi\tuiscriptadaptors\scripts\drives.ini X
+RUN_TEST_STEP 100 tdaemon AddDriveStep z:\tswi\tdaemon\scripts\tdaemon.ini AddDriveX
+DELAY 2000
+RUN_TEST_STEP 100 tscr ScrComponentOnEMMC z:\tswi\tdaemon\scripts\tdaemon.ini CheckX
+RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep  z:\tswi\tdaemon\scripts\tdaemon.ini u_Eclipsing
+END_TESTCASE API-SEC-CR_405-5166-0014
+
--- a/installationservices/swi/test/tdaemon/steps/daemonstep.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tdaemon/steps/daemonstep.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -21,6 +21,7 @@
 */
 
 #include "daemonstep.h"
+#include "sisregistrywritablesession.h"
 
 namespace Swi
 {
@@ -115,6 +116,43 @@
 	return EPass;
 	}
 
+//CAddDriveStep
+CAddDriveStep::CAddDriveStep()
+    {
+    }
+
+CAddDriveStep::~CAddDriveStep()
+    {
+    }
+
+TVerdict CAddDriveStep::runTestStepL(TBool /*aOomTest*/)
+    {
+    TPtrC str;
+    TInt drive(0);
+    if (!GetStringFromConfig(ConfigSection(), _L("drive"), str))
+        {
+        ERR_PRINTF1(_L("Missing drive setting"));
+        SetTestStepResult(EFail);
+        }
+    else
+        {
+        RFs fs;
+        fs.Connect();
+        
+        User::LeaveIfError(fs.CharToDrive(str[0], drive));
+        //iDriveChar = str[0];
+        fs.Close();
+        }
+    RSisRegistryWritableSession registrySession;
+            
+    User::LeaveIfError(registrySession.Connect());
+    CleanupClosePushL(registrySession);
+    registrySession.AddDriveL(drive);
+
+    CleanupStack::PopAndDestroy(&registrySession);    
+
+    return EPass;
+    }
 } // namespace Swi::Test
 
 } //namespace Swi
--- a/installationservices/swi/test/tdaemon/steps/daemonstep.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tdaemon/steps/daemonstep.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -37,6 +37,7 @@
 namespace Test
 {
 _LIT(KDaemonStep,"DaemonStep");
+_LIT(KAddDriveStep,"AddDriveStep");
 
 class CDaemonStep : public CDaemonTestStep, public MDaemonBehaviour
 	{
@@ -55,6 +56,16 @@
 	CDaemon* iDaemon;
 	};
 
+class CAddDriveStep : public CDaemonTestStep
+    {
+public:
+    CAddDriveStep();
+    ~CAddDriveStep();
+
+    virtual TVerdict runTestStepL(TBool aOomTest);
+    
+    };
+
 } // namespace Swi::Test
 
 } //namespace Swi
--- a/installationservices/swi/test/tdaemon/tdaemon.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tdaemon/tdaemon.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -62,7 +62,8 @@
 		return new CWatcherStep();
 	else if (aStepName == KDaemonStep)
 		return new CDaemonStep();
-	
+	else if (aStepName == KAddDriveStep)
+	    return new CAddDriveStep();
 	
 	return NULL;
 	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/eclipsingdllupgradepu_on_c_and_emmc.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,25 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+&EN
+
+#{"Dll Upgrade PU"},(0x802730A1), 1,2,4, TYPE=PU,RU
+
+%{"Crypto Services"}
+:"Crypto Services"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\eclipsetest2.dll"-"c:\sys\bin\eclipsetest.dll"
+"packages\simpletextfile.txt"-"x:\mimehandler.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/eclipsingdllupgradesa_on_c_and_emmc.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,25 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+&EN
+
+#{"Dll Upgrade PU"},(0x802730A1), 1,2,4, TYPE=SA,RU
+
+%{"Crypto Services"}
+:"Crypto Services"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\eclipsetest2.dll"-"c:\sys\bin\eclipsetest.dll"
+"packages\simpletextfile.txt"-"x:\mimehandler.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_distributed.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,29 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies 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
+#{"emmc_format_base_distributed"}, (0x8000887D), 1, 2, 3,TYPE=SA
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+"packages\simpletextfile.txt"-"X:\dummy.txt"
+"packages\simpletextfile.txt"-"T:\dummy1.txt"  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_distributed_NR.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,29 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies 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
+#{"emmc_format_base_distributed"}, (0x8000887D), 1, 2, 3,TYPE=SA,RU,NR
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+"packages\simpletextfile.txt"-"X:\dummy.txt"
+"packages\simpletextfile.txt"-"T:\dummy1.txt"  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_on_c_and_t.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies 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
+#{"emmc_format_base_on_c_and_t"}, (0x8000887D), 1, 2, 3,TYPE=SA
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+"packages\simpletextfile.txt"-"T:\dummy1.txt"  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_on_c_and_t_NR.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies 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
+#{"emmc_format_base_on_c_and_t_NR"}, (0x8000887D), 1, 2, 3,TYPE=SA,RU,NR
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+"packages\simpletextfile.txt"-"T:\dummy1.txt"  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_on_c_drive.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies 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
+#{"emmc_format_base_on_c_drive"}, (0x8000887D), 1, 2, 3,TYPE=SA
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_base_on_emmc.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies 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
+#{"emmc_format_base_on_emmc"}, (0x8000887D), 1, 2, 3,TYPE=SA
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\runtestexe_forpackage.exe"-"c:\sys\bin\runtestexe_app.exe"
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_forpackage.exe"-"c:\sys\bin\console_app.exe" 
+"packages\simpletextfile.txt"-"X:\dummy.txt" 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_pu_on_emmc.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,26 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies 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
+#{"emmc_format_pu_on_emmc"}, (0x8000887D), 1, 2, 3,TYPE=PU
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"packages\simpletextfile.txt"-"X:\dummy.txt"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_sp_distributed.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,27 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies 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
+#{"emmc_format_sp_distributed"}, (0x8000887D), 1, 2, 3,TYPE=SP
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_longrun_forpackage.exe"-"c:\sys\bin\console_app2.exe"
+"packages\simpletextfile.txt"-"X:\dummy.txt"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_sp_emmc.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,26 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies 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
+#{"emmc_format_sp_on_emmc"}, (0x8000887D), 1, 2, 3,TYPE=SP
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"packages\simpletextfile.txt"-"X:\dummy1.txt"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages/emmc_format_sp_on_c.pkg	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,26 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies 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
+#{"emmc_format_sp_on_c"}, (0x8000887D), 1, 2, 3,TYPE=SP
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\console_app_longrun_forpackage.exe"-"c:\sys\bin\console_app2.exe"
\ No newline at end of file
--- a/installationservices/swi/test/testexes/prepareexes.pl	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/testexes/prepareexes.pl	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -715,6 +715,8 @@
 SignFile("hiddensa.sis", "hiddensa_root5.sis", "root5ca", \*iby);
 
 SignFile("smlsyncagent.sis", "smlsyncagent_root5.sis", "root5ca", \*iby);
+SignFile("eclipsingdllupgradepu_on_c_and_emmc.sis", "eclipsingdllupgradepu_on_c_and_emmc_root5.sis", "root5ca", \*iby);
+SignFile("eclipsingdllupgradesa_on_c_and_emmc.sis", "eclipsingdllupgradesa_on_c_and_emmc_root5.sis", "root5ca", \*iby);
 
 #Swi Support for RFS
 SignFile("swi_rfs_test_SA.sis", "swi_rfs_test_SA_root5.sis", "root5ca", \*iby);
@@ -784,6 +786,8 @@
 SignFileWithSpecifiedCert("rusaruupgrade_purunr.sis", "rusaruupgrade_purunr_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
 SignFileWithSpecifiedCert("rusastubupgrade_punrru.sis", "rusastubupgrade_punrru_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
 SignFileWithSpecifiedCert("ruromupgraderucertsa_protectedsid.sis", "ruromupgraderucertsa_protectedsid_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
+SignFileWithSpecifiedCert("emmc_format_base_distributed_NR.sis", "emmc_format_base_distributed_NR_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
+SignFileWithSpecifiedCert("emmc_format_base_on_c_and_t_NR.sis", "emmc_format_base_on_c_and_t_NR_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
 
 # new tests for media propagation of packages signed by SU.
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/tswiappregintegration/fotaupdateUDA1_reg.rss	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,31 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+/**
+ @file fotaupdateUDA1_reg.rss
+ @internalComponent - Internal Symbian test code
+*/
+
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+
+UID3 0xA000F16C	// App UID
+
+RESOURCE APP_REGISTRATION_INFO
+	{	
+	app_file = "UDA1";
+	group_name = "UDA1_Group";
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/tswiappregintegration/fotaupdateUDA2_reg.rss	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,31 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+/**
+ @file fotaupdateUDA2_reg.rss
+ @internalComponent - Internal Symbian test code
+*/
+
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+
+UID3 0xA000F26C	// App UID
+
+RESOURCE APP_REGISTRATION_INFO
+	{	
+	app_file = "UDA2";
+	group_name = "UDA2_Group";
+	}
--- a/installationservices/swi/test/testexes/tswiappregintegration/tswiappregintegration01.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/testexes/tswiappregintegration/tswiappregintegration01.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -25,7 +25,7 @@
 SOURCEPATH		.
 SOURCE			swiappregintegration.cpp
 
-SYSTEMINCLUDE	/epoc32/include
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 START RESOURCE	case01/swiappregintegration01_loc.rss
 HEADER
@@ -62,6 +62,14 @@
 TARGETPATH	tswi/tuiscriptadaptors/data
 END
 
+START RESOURCE 	fotaupdateUDA1_reg.rss
+TARGETPATH	tswi/tuiscriptadaptors/data
+END
+
+START RESOURCE 	fotaupdateUDA2_reg.rss
+TARGETPATH	tswi/tuiscriptadaptors/data
+END
+
 LIBRARY			euser.lib
 SMPSAFE
 
--- a/installationservices/swi/test/tsisregistrytest/Scripts/tsisregistrytest.ini	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tsisregistrytest/Scripts/tsisregistrytest.ini	Thu Jul 08 20:28:00 2010 +0300
@@ -291,3 +291,9 @@
 pkgMajor=1
 pkgMinor=5
 pkgBuild=9
+
+[AddAppRegInfo_apparc_folder]
+regFileName = c:\private\10003a3f\import\apps\swiappregintegration02_reg.rsc
+
+[AddAppRegInfo_nonapparc_folder]
+regFileName = c:\private\10003a5f\import\apps\swiappregintegration02_reg.rsc
--- a/installationservices/swi/test/tsisregistrytest/Scripts/tsisregistrytest.script	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tsisregistrytest/Scripts/tsisregistrytest.script	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of the License "Eclipse Public License v1.0"
@@ -434,3 +434,118 @@
 RUN_TEST_STEP 100 tSisRegistryTest SisRegistryPropertyStep
 
 END_TESTCASE API-SEC-SISREGISTRY-0018
+
+RUN_UTILS MkDir c:\private\10003a3f\import
+RUN_UTILS MkDir c:\private\10003a3f\import\apps
+RUN_UTILS CopyFile  z:\tswi\tuiscriptadaptors\data\swiappregintegration02\swiappregintegration02_reg.rsc c:\private\10003a3f\import\apps\swiappregintegration02_reg.rsc
+//! @file
+//! @SYMTestCaseID		API-SEC-SISREGISTRY_TCB-0001
+//! @SYMTestCaseDesc		Add the Application Registration info into SCR from _reg.rsc
+//! @SYMTestPriority		
+//! @SYMTestActions		Parse then _reg.rsc file placed in apparc's pvt folder and populate the db and then remove the app data
+//! @SYMTestExpectedResults	The test completes with KErrNone completion code.
+
+
+START_TESTCASE API-SEC-SISREGISTRY_TCB-0001
+RUN_TEST_STEP 100 tSisRegistryTest AddAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_apparc_folder
+RUN_TEST_STEP 100 tSisRegistryTest RemoveAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_apparc_folder
+END_TESTCASE API-SEC-SISREGISTRY_TCB-0001
+RUN_UTILS DeleteFile  c:\private\10003a3f\import\apps\swiappregintegration02_reg.rsc
+
+//! @file
+//! @SYMTestCaseID		API-SEC-SISREGISTRY_TCB-0002
+//! @SYMTestCaseDesc		Add the Application Registration info into SCR from _reg.rsc
+//! @SYMTestPriority		Low
+//! @SYMTestActions		Parse then _reg.rsc file placed in non apparc's pvt folder and populate the db
+//! @SYMTestExpectedResults	The test completes with KErrArgument completion code.
+
+START_TESTCASE API-SEC-SISREGISTRY_TCB-0002
+RUN_TEST_STEP_RESULT -5 100 tSisRegistryTest AddAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_nonapparc_folder
+END_TESTCASE API-SEC-SISREGISTRY_TCB-0002
+
+RUN_UTILS CopyFile  z:\tswi\tuiscriptadaptors\data\swiappregintegration02\swiappregintegration02_reg.rsc c:\private\10003a3f\import\apps\swiappregintegration02_reg.rsc
+
+//! @file
+//! @SYMTestCaseID		API-SEC-SISREGISTRY_TCB-0003
+//! @SYMTestCaseDesc		Add the Application Registration info into SCR from _reg.rsc
+//! @SYMTestPriority		
+//! @SYMTestActions		Parse then same _reg.rsc file placed in apparc's pvt folder twice and populate the db and then remove the app data.
+//! @SYMTestExpectedResults	Removes the existing app reg info  and completes with KErrNone completion code
+
+START_TESTCASE API-SEC-SISREGISTRY_TCB-0003
+RUN_TEST_STEP 100 tSisRegistryTest AddAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_apparc_folder
+RUN_TEST_STEP 100 tSisRegistryTest AddAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_apparc_folder
+RUN_TEST_STEP 100 tSisRegistryTest RemoveAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_apparc_folder
+END_TESTCASE API-SEC-SISREGISTRY_TCB-0003
+RUN_UTILS DeleteFile  c:\private\10003a3f\import\apps\swiappregintegration02_reg.rsc
+
+
+//! @file
+//! @SYMTestCaseID		API-SEC-SISREGISTRY_TCB-0004
+//! @SYMTestCaseDesc		Overwrite the existing Application Registration info with a new one into SCR.
+//! @SYMTestPriority		
+//! @SYMTestActions		Install the SA package and its SP upgrade(with app),parse then _reg.rsc file(havig same appuid as of SP) placed in apparc's pvt folder 
+//!				populate the db and then remove tha app data.
+//! @SYMTestExpectedResults	overwrites the existing app reg info assosiated with SP and completes with KErrNone completion code
+
+START_TESTCASE API-SEC-SISREGISTRY_TCB-0004
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tswiappregintegration.ini swiappregintegration_base01
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tswiappregintegration.ini swiappregintegration_base01_sp
+RUN_TEST_STEP 100 tSisRegistryTest AddAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_apparc_folder
+RUN_TEST_STEP 100 tSisRegistryTest RemoveAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_apparc_folder
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tswiappregintegration.ini u_swiappregintegration_base01
+END_TESTCASE API-SEC-SISREGISTRY_TCB-0004
+
+
+//! @file
+//! @SYMTestCaseID		API-SEC-SISREGISTRY_TCB-0005
+//! @SYMTestCaseDesc		Overwrite the existing Application Registration info with a new one into SCR.
+//! @SYMTestPriority		
+//! @SYMTestActions		Install the SA package and its SP upgrade(with app),parse then _reg.rsc file(havig same appuid as of SP) placed in apparc's pvt folder 
+//!				populate the db and then remove tha app data.
+//! @SYMTestExpectedResults	overwrites the existing app reg info assosiated with SP and completes with KErrNone completion code
+
+START_TESTCASE API-SEC-SISREGISTRY_TCB-0005
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tswiappregintegration.ini swiappregintegration_base01
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tswiappregintegration.ini swiappregintegration_base01_sp
+RUN_TEST_STEP 100 tSisRegistryTest RemoveAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_apparc_folder
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tswiappregintegration.ini u_swiappregintegration_base01
+END_TESTCASE API-SEC-SISREGISTRY_TCB-0005
+
+//! @file
+//! @SYMTestCaseID		API-SEC-SISREGISTRY_TCB-0006
+//! @SYMTestCaseDesc		Removal the Application Registration info from SCR fails.
+//! @SYMTestPriority		
+//! @SYMTestActions		Process the path of the app reg filer and if its is non apparc return
+//! @SYMTestExpectedResults	Completes with KErrArgument completion code
+
+START_TESTCASE API-SEC-SISREGISTRY_TCB-0006
+RUN_TEST_STEP_RESULT -5 100 tSisRegistryTest RemoveAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_nonapparc_folder
+END_TESTCASE API-SEC-SISREGISTRY_TCB-0006
+
+RUN_UTILS MkDir c:\private\10003a3f\import
+RUN_UTILS MkDir c:\private\10003a3f\import\apps
+RUN_UTILS CopyFile  z:\systemtest\testdata\dummy.txt c:\private\10003a3f\import\apps\swiappregintegration02_reg.rsc
+//! @file
+//! @SYMTestCaseID		API-SEC-SISREGISTRY_TCB-0007
+//! @SYMTestCaseDesc		Removal the non _reg.rsc file data from SCR.
+//! @SYMTestPriority		
+//! @SYMTestActions		Open the file and check if its a valid _reg.rsc file
+//! @SYMTestExpectedResults	Completes with KErrArgument completion code
+
+START_TESTCASE API-SEC-SISREGISTRY_TCB-0007
+RUN_TEST_STEP_RESULT -5 100 tSisRegistryTest RemoveAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_nonapparc_folder
+END_TESTCASE API-SEC-SISREGISTRY_TCB-0007
+
+//! @file
+//! @SYMTestCaseID		API-SEC-SISREGISTRY_TCB-0008
+//! @SYMTestCaseDesc		Add the non _reg.rsc file data into SCR
+//! @SYMTestPriority		
+//! @SYMTestActions		Open the file and check if its a valid _reg.rsc file
+//! @SYMTestExpectedResults	Completes with KErrArgument completion code
+
+START_TESTCASE API-SEC-SISREGISTRY_TCB-0008
+RUN_TEST_STEP_RESULT -5 100 tSisRegistryTest AddAppRegInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini AddAppRegInfo_apparc_folder
+END_TESTCASE API-SEC-SISREGISTRY_TCB-0008
+RUN_UTILS DeleteFile  c:\private\10003a3f\import\apps\swiappregintegration02_reg.rsc
+
--- a/installationservices/swi/test/tsisregistrytest/sessionstep.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tsisregistrytest/sessionstep.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -46,7 +46,7 @@
 #include "sisregistryproperty.h"
 
 #include <centralrepository.h>
-
+#include "sisregistryaccess_client.h"
 const TInt KDefaultBufferSize		= 2048;
 /////////////////////////////////////////////////////////////////////
 // defs, Constants used by test steps
@@ -243,6 +243,8 @@
 
 TVerdict CModifiableFileStep::doTestStepL()
 	{
+
+    
 	RArray<TPtrC> theFileNames;
 	CleanupClosePushL(theFileNames);
 	GetStringArrayFromConfigL(ConfigSection(), KModFileName, theFileNames);
@@ -2776,3 +2778,70 @@
 	SetTestStepResult(EPass);
 	return TestStepResult();	
 	}
+
+////////////////////////////////////////////////////////////////////////////
+// CAddAppRegInfoStep 
+////////////////////////////////////////////////////////////////////////////
+CAddAppRegInfoStep::CAddAppRegInfoStep()
+    {
+    SetTestStepName(KIsFileRegisteredStep);
+    }
+
+TVerdict CAddAppRegInfoStep::doTestStepL()
+    {
+    TBool expectedResult(EPass);
+    TPtrC regFileName;
+    if(!GetStringFromConfig(ConfigSection(), _L("regFileName"), regFileName))
+        {
+        ERR_PRINTF1(_L("Reg File Name was not found in ini"));
+        User::Leave(KErrNotFound);
+        }
+    
+    RSisRegistryAccessSession sisRegistryAccessSessionSession;
+    User::LeaveIfError(sisRegistryAccessSessionSession.Connect());
+    CleanupClosePushL(sisRegistryAccessSessionSession);
+    
+    TInt res = sisRegistryAccessSessionSession.AddAppRegInfoL(regFileName, iTimeMeasuredExternally );
+   
+    if(res != KErrNone)
+        {
+        ERR_PRINTF2(_L("Application Registration data not added successfuly , error %d"),res);
+        User::Leave(res);
+        }
+    CleanupStack::Pop(&sisRegistryAccessSessionSession);
+    return TestStepResult();
+    }
+
+////////////////////////////////////////////////////////////////////////////
+// CRemoveAppRegInfoStep 
+////////////////////////////////////////////////////////////////////////////
+CRemoveAppRegInfoStep::CRemoveAppRegInfoStep()
+    {
+    SetTestStepName(KIsFileRegisteredStep);
+    }
+
+TVerdict CRemoveAppRegInfoStep::doTestStepL()
+    {
+    TBool expectedResult(EPass);
+    TPtrC regFileName;
+    if(!GetStringFromConfig(ConfigSection(), _L("regFileName"), regFileName))
+        {
+        ERR_PRINTF1(_L("Reg File Name was not found in ini"));
+        User::Leave(KErrNotFound);
+        }
+    
+    RSisRegistryAccessSession sisRegistryAccessSessionSession;
+    User::LeaveIfError(sisRegistryAccessSessionSession.Connect());
+    CleanupClosePushL(sisRegistryAccessSessionSession);
+    
+    TInt res = sisRegistryAccessSessionSession.RemoveAppRegInfoL(regFileName, iTimeMeasuredExternally );
+   
+    if(res != KErrNone)
+        {
+        ERR_PRINTF2(_L("Application Registration data not added successfuly , error %d"),res);
+        User::Leave(res);
+        }
+    CleanupStack::Pop(&sisRegistryAccessSessionSession);
+    return TestStepResult();
+    }
+
--- a/installationservices/swi/test/tsisregistrytest/sessionstep.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tsisregistrytest/sessionstep.h	Thu Jul 08 20:28:00 2010 +0300
@@ -441,6 +441,20 @@
 	CChangeLocaleStep();
 	virtual TVerdict doTestStepL();
 	};
-	
+
+class CAddAppRegInfoStep : public CSisRegistrySessionStep
+    {
+public:
+    CAddAppRegInfoStep();
+    virtual TVerdict doTestStepL();
+    };
+
+class CRemoveAppRegInfoStep : public CSisRegistrySessionStep
+    {
+public:
+    CRemoveAppRegInfoStep();
+    virtual TVerdict doTestStepL();
+    };
+
 #endif
 
--- a/installationservices/swi/test/tsisregistrytest/tsisregistrytest.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tsisregistrytest/tsisregistrytest.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -354,7 +354,15 @@
 		{
 		name = new CChangeLocaleStep;
 		}
-
+	else if (aStepName == KCAddAppRegInfoStep)
+	    {
+        name = new CAddAppRegInfoStep;
+	    }
+	else if (aStepName == KCRemoveAppRegInfoStep)
+        {
+        name = new CRemoveAppRegInfoStep;
+        }
+	
 	if(performanceStep && name)
 		{
 		CSisRegistryTestStepBase *baseTestStep = dynamic_cast<CSisRegistryTestStepBase*>(name);
--- a/installationservices/swi/test/tsisregistrytest/tsisregistryteststep.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tsisregistrytest/tsisregistryteststep.h	Thu Jul 08 20:28:00 2010 +0300
@@ -92,6 +92,8 @@
 _LIT(KDependenciesStep, "Dependencies");
 _LIT(KEmbeddedPackagesStep, "EmbeddedPackages");
 _LIT(KChangeLocale, "ChangeLocale");
+_LIT(KCAddAppRegInfoStep,"AddAppRegInfo");
+_LIT(KCRemoveAppRegInfoStep,"RemoveAppRegInfo");
 
 // Base class for all steps
 class CSisRegistryTestStepBase : public CTestStep
--- a/installationservices/swi/test/tuiscriptadaptors/scripts/batchfiles/testfotaupdate1_post.bat	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/scripts/batchfiles/testfotaupdate1_post.bat	Thu Jul 08 20:28:00 2010 +0300
@@ -25,4 +25,8 @@
 del /s /f /q \epoc32\release\winscw\urel\z\private\10003a3f\apps\fotaupdatestubapp1_reg.rsc
 
 del /s /f /q \epoc32\release\winscw\udeb\z\private\10003a3f\apps\fotaupdateapp1_reg.rsc
-del /s /f /q \epoc32\release\winscw\urel\z\private\10003a3f\apps\fotaupdateapp1_reg.rsc
\ No newline at end of file
+del /s /f /q \epoc32\release\winscw\urel\z\private\10003a3f\apps\fotaupdateapp1_reg.rsc
+
+del /s /f /q \epoc32\winscw\c\private\10003a3f\apps\fotaupdateUDA1_reg.rsc
+
+del /s /f /q \epoc32\winscw\c\private\10003a3f\import\apps\fotaupdateUDA2_reg.rsc
--- a/installationservices/swi/test/tuiscriptadaptors/scripts/batchfiles/testfotaupdate1_pre.bat	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/scripts/batchfiles/testfotaupdate1_pre.bat	Thu Jul 08 20:28:00 2010 +0300
@@ -27,5 +27,10 @@
 xcopy /Q /Y \epoc32\winscw\c\tswi\tuiscriptadaptors\scripts\fotaupdatestubapp1.sis \epoc32\release\winscw\udeb\z\system\install\
 xcopy /Q /Y \epoc32\winscw\c\tswi\tuiscriptadaptors\scripts\fotaupdatestubapp1.sis \epoc32\release\winscw\urel\z\system\install\
 
+xcopy /Q /Y \epoc32\release\winscw\udeb\z\tswi\tuiscriptadaptors\data\fotaupdateUDA1_reg.rsc \epoc32\winscw\c\private\10003a3f\apps\
+
+md \epoc32\winscw\c\private\10003a3f\import\apps
+xcopy /Q /Y \epoc32\release\winscw\udeb\z\tswi\tuiscriptadaptors\data\fotaupdateUDA2_reg.rsc \epoc32\winscw\c\private\10003a3f\import\apps
+
 rem cleanup anything from previous tests.
 del /s /f /q \epoc32\winscw\c\sys\install\sisregistry\
--- a/installationservices/swi/test/tuiscriptadaptors/scripts/testfotaupdate.ini	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/scripts/testfotaupdate.ini	Thu Jul 08 20:28:00 2010 +0300
@@ -116,4 +116,58 @@
 OwnedFileCount=0
 ServiceInfoCount=0
 LocalizableAppInfoCount=0
+PropertiesCount=0
+
+
+
+[app_info_fota_UDA1]
+Locale  = 01
+NoOfEntries=1
+AppRegAppUidCount=1
+AppRegAppUid0 = A000F16C
+AppRegEntriesConfigCount=1
+configsection0 = app_info_fota_UDA1_data
+
+[app_info_fota_UDA1_data]
+AppUid=A000F16C
+AppFile=C:\sys\bin\UDA1.exe
+Attributes=0
+Hidden=0
+Embeddability=0
+NewFile=0
+Launch=0
+GroupName=UDA1_Group
+DefaultScreenNumber=0
+AppOpaqueDataInfoCount=0
+
+OwnedFileCount=0
+ServiceInfoCount=0
+LocalizableAppInfoCount=0
+PropertiesCount=0
+
+
+
+[app_info_fota_UDA2]
+Locale  = 01
+NoOfEntries=1
+AppRegAppUidCount=1
+AppRegAppUid0 = A000F26C
+AppRegEntriesConfigCount=1
+configsection0 = app_info_fota_UDA2_data
+
+[app_info_fota_UDA2_data]
+AppUid=A000F26C
+AppFile=C:\sys\bin\UDA2.exe
+Attributes=0
+Hidden=0
+Embeddability=0
+NewFile=0
+Launch=0
+GroupName=UDA2_Group
+DefaultScreenNumber=0
+AppOpaqueDataInfoCount=0
+
+OwnedFileCount=0
+ServiceInfoCount=0
+LocalizableAppInfoCount=0
 PropertiesCount=0
\ No newline at end of file
--- a/installationservices/swi/test/tuiscriptadaptors/scripts/testfotaupdate1.script	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/scripts/testfotaupdate1.script	Thu Jul 08 20:28:00 2010 +0300
@@ -50,4 +50,25 @@
 START_TESTCASE FotaTest4
 RUN_TEST_STEP 100 tSisRegistryTest IsPackageInstalled z:\tswi\tuiscriptadaptors\scripts\testfotaupdate.ini stubapp_info_fota_v1
 RUN_TEST_STEP 100 tscrapparc ScrGetApplicationRegistrationView z:\tswi\tuiscriptadaptors\scripts\testfotaupdate.ini stubapp_scr_info_fota_v1
-END_TESTCASE FotaTest4
\ No newline at end of file
+END_TESTCASE FotaTest4
+
+
+//! @SYMTestCaseID INST-REG-FOTA-0005
+//! @SYMTestCaseDesc Tests F/W update scenario for application registration resource files present in <systemdrive>\private\10003a3f\apps
+//! @SYMREQ PREQ1835
+//! @SYMTestPriority High
+//! @SYMTestActions Tests F/W update scenario for application registration resource files present in <systemdrive>\private\10003a3f\apps
+//! @SYMTestExpectedResults Scr db is updated with latest app info
+START_TESTCASE FotaTest5
+RUN_TEST_STEP 100 tscrapparc ScrGetApplicationRegistrationView z:\tswi\tuiscriptadaptors\scripts\testfotaupdate.ini app_info_fota_UDA1
+END_TESTCASE FotaTest5
+
+//! @SYMTestCaseID INST-REG-FOTA-0006
+//! @SYMTestCaseDesc Tests F/W update scenario for application registration resource files present in <systemdrive>\private\10003a3f\import\apps
+//! @SYMREQ PREQ1835
+//! @SYMTestPriority High
+//! @SYMTestActions Tests F/W update scenario for application registration resource files present in <systemdrive>\private\10003a3f\import\apps
+//! @SYMTestExpectedResults Scr db is updated with latest app info
+START_TESTCASE FotaTest6
+RUN_TEST_STEP 100 tscrapparc ScrGetApplicationRegistrationView z:\tswi\tuiscriptadaptors\scripts\testfotaupdate.ini app_info_fota_UDA2
+END_TESTCASE FotaTest6
\ No newline at end of file
--- a/installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_client.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_client.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -99,3 +99,14 @@
 	return SendReceive(EDeleteEntry, TIpcArgs(index, &packageUid, &time));
 	}
 
+TInt RSisRegistryAccessSession::AddAppRegInfoL(const TDesC& aAppRegFile, TInt& aSpentTimeInMillisecond)
+    {
+    TPckg<TInt> time(aSpentTimeInMillisecond);
+    return SendReceive(EAddAppRegInfo, TIpcArgs(&aAppRegFile, &time));
+    }
+
+TInt RSisRegistryAccessSession::RemoveAppRegInfoL(const TDesC& aAppRegFile, TInt& aSpentTimeInMillisecond)
+    {
+    TPckg<TInt> time(aSpentTimeInMillisecond);
+    return SendReceive(ERemoveAppRegInfo, TIpcArgs(&aAppRegFile, &time));
+    }
--- a/installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_client.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_client.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -55,6 +55,15 @@
 	 */
 	TInt DeleteEntryL(Swi::CSisRegistryPackage& aPackage, TInt& aSpentTimeInMillisecond);
 
+	/**
+	 * Adds the Application Registration Info from *_reg.rsc
+	 */
+	TInt AddAppRegInfoL(const TDesC& aAppRegFile, TInt& aSpentTimeInMillisecond);
+	
+	/**
+     * Removes the Application Registration Info
+     */
+    TInt RemoveAppRegInfoL(const TDesC& aAppRegFile, TInt& aSpentTimeInMillisecond);
 	};
 
 #endif	// __SISREGISTRYACCESSCLIENT_H__
--- a/installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_common.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_common.h	Thu Jul 08 20:28:00 2010 +0300
@@ -34,4 +34,6 @@
 	EAddEntry,
 	EUpdateEntry,
 	EDeleteEntry,
+	EAddAppRegInfo,
+	ERemoveAppRegInfo,
 	};
--- a/installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_server_session.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/sisregistryaccess_server_session.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -32,6 +32,7 @@
 #include "siscontroller.h"
 #include "application.h"
 #include "userselections.h"
+#include "sislauncherclient.h"
 
 /////////////////////// Utility functions //////////////////////////////
 void StartTimer(TTime& aTimer)
@@ -110,81 +111,107 @@
 
 void CSisRegistryAccessSession::ServiceL(const RMessage2& aMessage)
 	{
-	// create transaction on SCR for mutable operations
-	Server().RegistrySession().CreateTransactionL();
-	// SWI regsitry needs a transaction to cover updates to logs during package add/update/removal
-	Usif::RStsSession stsSession;
-	TInt64 transactionID = stsSession.CreateTransactionL();
-	CleanupClosePushL(stsSession);
-	TInt err(0);
-	
-	TTime timer;
-	StartTimer(timer);
-	
-	TSisRegistryAccessMessages f = static_cast<TSisRegistryAccessMessages>(aMessage.Function());
-	switch (f)
-		{
-		case EAddEntry:
-		case EUpdateEntry:
-			{
-			TInt len = aMessage.GetDesLengthL(0);
-			HBufC8 *controllerData = HBufC8::NewLC(len);
-			TPtr8 ptrControllerData(controllerData->Des());
-			aMessage.ReadL(0, ptrControllerData);
-			
-			// create the controller
-			Swi::CDesDataProvider *desProvider = Swi::CDesDataProvider::NewLC(ptrControllerData);
-			Swi::Sis::CController *controller = Swi::Sis::CController::NewLC(*desProvider, Swi::Sis::EAssumeType);
-			// setup the application
-			Swi::CApplication *app = Swi::CApplication::NewLC();
-			app->SetInstall(*controller);
-			// since the attributes chosen by the user don't have impact on the adding/updating entry tests,
-			// they are set with the constant values.
-			app->UserSelections().SetLanguage(ELangEnglish);
-			app->UserSelections().SetDrive(2);
-			
-			if(EAddEntry == f)
-				{
-				TRAP(err, Server().RegistrySession().AddEntryL(*app, ptrControllerData, transactionID));
-				}
-			else
-				{
-				TRAP(err, Server().RegistrySession().UpdateEntryL(*app, ptrControllerData, transactionID));
-				}
-			CleanupStack::PopAndDestroy(4, controllerData); // controllerData, desProvider, controller, app
-			break;
-			}
-		case EDeleteEntry:
-			{
-			// Get Uid and index
-			// Augmentation index - argument 0
-			TInt packageIndex = aMessage.Int0();
-
-			// Uid (ipc argument 1)
-			TUid uid;
-			TPckg<TUid> packageUid(uid);
-			aMessage.ReadL(1, packageUid);
-			
-			// Invoke SisRegistry server API using SisRegistryClient
-			Swi::CSisRegistryPackage* package = Swi::CSisRegistryPackage::NewLC(uid, KNullDesC, KNullDesC); // For the delete API, the name and the vendor of the package are irrelevant
-			package->SetIndex(packageIndex);
-			TRAP(err, Server().RegistrySession().DeleteEntryL(*package, transactionID));
-
-			CleanupStack::PopAndDestroy(package);
-			break;
-			}
-		default:
-			{
-			PanicClient(aMessage, EPanicIllegalFunction);
-			break;
-			}
-		}
-	
-	stsSession.CommitL();
-	CleanupStack::PopAndDestroy(&stsSession);
-
-	Server().RegistrySession().CommitTransactionL();
-	
+    TSisRegistryAccessMessages f = static_cast<TSisRegistryAccessMessages>(aMessage.Function());
+    TTime timer;
+    StartTimer(timer);
+    TInt err(0);
+    if(f == EAddAppRegInfo)
+        {
+        TUint regFileNameLen = aMessage.GetDesLengthL(0);
+        HBufC* regFileName = HBufC::NewLC(regFileNameLen);
+        TPtr namePtr = regFileName->Des();
+        aMessage.ReadL(0, namePtr);
+        TUid appUid = TUid::Uid(aMessage.Int1());
+        Swi::RSisRegistrySession sisRegistryWritableSession;
+        CleanupClosePushL(sisRegistryWritableSession);
+        TRAP(err, sisRegistryWritableSession.Connect());
+        TRAP(err, sisRegistryWritableSession.AddAppRegInfoL(*regFileName););
+        CleanupStack::PopAndDestroy(2, regFileName);
+        }
+    else if(f == ERemoveAppRegInfo)
+        {
+        TUint regFileNameLen = aMessage.GetDesLengthL(0);
+        HBufC* regFileName = HBufC::NewLC(regFileNameLen);
+        TPtr namePtr = regFileName->Des();
+        aMessage.ReadL(0, namePtr);
+        TUid appUid = TUid::Uid(aMessage.Int1());
+        Swi::RSisRegistrySession sisRegistryWritableSession;
+        CleanupClosePushL(sisRegistryWritableSession);
+        TRAP(err, sisRegistryWritableSession.Connect());
+        TRAP(err, sisRegistryWritableSession.RemoveAppRegInfoL(*regFileName););
+        CleanupStack::PopAndDestroy(2, regFileName);
+        }
+    else
+        {
+        // create transaction on SCR for mutable operations
+        Server().RegistrySession().CreateTransactionL();
+        // SWI regsitry needs a transaction to cover updates to logs during package add/update/removal
+        Usif::RStsSession stsSession;
+        TInt64 transactionID = stsSession.CreateTransactionL();
+        CleanupClosePushL(stsSession);
+        
+        switch (f)
+            {
+            case EAddEntry:
+            case EUpdateEntry:
+                {
+                TInt len = aMessage.GetDesLengthL(0);
+                HBufC8 *controllerData = HBufC8::NewLC(len);
+                TPtr8 ptrControllerData(controllerData->Des());
+                aMessage.ReadL(0, ptrControllerData);
+                
+                // create the controller
+                Swi::CDesDataProvider *desProvider = Swi::CDesDataProvider::NewLC(ptrControllerData);
+                Swi::Sis::CController *controller = Swi::Sis::CController::NewLC(*desProvider, Swi::Sis::EAssumeType);
+                // setup the application
+                Swi::CApplication *app = Swi::CApplication::NewLC();
+                app->SetInstall(*controller);
+                // since the attributes chosen by the user don't have impact on the adding/updating entry tests,
+                // they are set with the constant values.
+                app->UserSelections().SetLanguage(ELangEnglish);
+                app->UserSelections().SetDrive(2);
+                
+                if(EAddEntry == f)
+                    {
+                    TRAP(err, Server().RegistrySession().AddEntryL(*app, ptrControllerData, transactionID));
+                    }
+                else
+                    {
+                    TRAP(err, Server().RegistrySession().UpdateEntryL(*app, ptrControllerData, transactionID));
+                    }
+                CleanupStack::PopAndDestroy(4, controllerData); // controllerData, desProvider, controller, app
+                break;
+                }
+            case EDeleteEntry:
+                {
+                // Get Uid and index
+                // Augmentation index - argument 0
+                TInt packageIndex = aMessage.Int0();
+    
+                // Uid (ipc argument 1)
+                TUid uid;
+                TPckg<TUid> packageUid(uid);
+                aMessage.ReadL(1, packageUid);
+                
+                // Invoke SisRegistry server API using SisRegistryClient
+                Swi::CSisRegistryPackage* package = Swi::CSisRegistryPackage::NewLC(uid, KNullDesC, KNullDesC); // For the delete API, the name and the vendor of the package are irrelevant
+                package->SetIndex(packageIndex);
+                TRAP(err, Server().RegistrySession().DeleteEntryL(*package, transactionID));
+    
+                CleanupStack::PopAndDestroy(package);
+                break;
+                }
+            default:
+                {
+                PanicClient(aMessage, EPanicIllegalFunction);
+                break;
+                }
+            }
+        
+        stsSession.CommitL();
+        CleanupStack::PopAndDestroy(&stsSession);
+        Server().RegistrySession().CommitTransactionL();
+        }	
 	TPckg<TInt> timePckg(StopTimer(timer));
 	if(EDeleteEntry == f)
 		aMessage.WriteL(2, timePckg);
--- a/installationservices/swinstallationfw/bwins/sifnotificationu.def	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swinstallationfw/bwins/sifnotificationu.def	Thu Jul 08 20:28:00 2010 +0300
@@ -51,4 +51,8 @@
 	??1CSifOperationProgressData@Usif@@UAE@XZ @ 50 NONAME ; Usif::CSifOperationProgressData::~CSifOperationProgressData(void)
 	?NewL@CSifOperationProgressData@Usif@@SAPAV12@ABVTDesC16@@W4TSifOperationPhase@2@W4TSifOperationSubPhase@2@HH@Z @ 51 NONAME ; class Usif::CSifOperationProgressData * Usif::CSifOperationProgressData::NewL(class TDesC16 const &, enum Usif::TSifOperationPhase, enum Usif::TSifOperationSubPhase, int, int)
 	??1CPublishSifOperationInfo@Usif@@UAE@XZ @ 52 NONAME ; Usif::CPublishSifOperationInfo::~CPublishSifOperationInfo(void)
+	?NewL@CSifOperationStartData@Usif@@SAPAV12@ABVTDesC16@@0ABV?$RPointerArray@VHBufC16@@@@1H000W4TSifOperationPhase@2@@Z @ 53 NONAME ; class Usif::CSifOperationStartData * Usif::CSifOperationStartData::NewL(class TDesC16 const &, class TDesC16 const &, class RPointerArray<class HBufC16> const &, class RPointerArray<class HBufC16> const &, int, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, enum Usif::TSifOperationPhase)
+	?NewLC@CSifOperationStartData@Usif@@SAPAV12@ABVTDesC16@@0ABV?$RPointerArray@VHBufC16@@@@1H000W4TSifOperationPhase@2@@Z @ 54 NONAME ; class Usif::CSifOperationStartData * Usif::CSifOperationStartData::NewLC(class TDesC16 const &, class TDesC16 const &, class RPointerArray<class HBufC16> const &, class RPointerArray<class HBufC16> const &, int, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, enum Usif::TSifOperationPhase)
+	?OperationPhase@CSifOperationStartData@Usif@@QBE?AW4TSifOperationPhase@2@XZ @ 55 NONAME ; enum Usif::TSifOperationPhase Usif::CSifOperationStartData::OperationPhase(void) const
+	?CurrentProgress@CSifOperationProgressData@Usif@@QBEHXZ @ 56 NONAME ; int Usif::CSifOperationProgressData::CurrentProgress(void) const
 
--- a/installationservices/swinstallationfw/eabi/sifnotificationu.def	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swinstallationfw/eabi/sifnotificationu.def	Thu Jul 08 20:28:00 2010 +0300
@@ -54,4 +54,8 @@
 	_ZNK4Usif25CSifOperationProgressData8SubPhaseEv @ 53 NONAME
 	_ZTIN4Usif16CSifNotifierBaseE @ 54 NONAME
 	_ZTVN4Usif16CSifNotifierBaseE @ 55 NONAME
+	_ZN4Usif22CSifOperationStartData4NewLERK7TDesC16S3_RK13RPointerArrayI7HBufC16ES8_iS3_S3_S3_NS_18TSifOperationPhaseE @ 56 NONAME
+	_ZN4Usif22CSifOperationStartData5NewLCERK7TDesC16S3_RK13RPointerArrayI7HBufC16ES8_iS3_S3_S3_NS_18TSifOperationPhaseE @ 57 NONAME
+	_ZNK4Usif22CSifOperationStartData14OperationPhaseEv @ 58 NONAME
+	_ZNK4Usif25CSifOperationProgressData15CurrentProgressEv @ 59 NONAME
 
--- a/installationservices/swinstallationfw/group/sifserver.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swinstallationfw/group/sifserver.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -19,6 +19,8 @@
 TARGET				sifserver.exe        
 TARGETTYPE			exe
 
+EPOCSTACKSIZE   		0x4000
+
 CAPABILITY			ProtServ TrustedUI ReadUserData WriteDeviceData
 
 VENDORID			0x70000001
--- a/installationservices/swinstallationfw/inc/sifnotification.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swinstallationfw/inc/sifnotification.h	Thu Jul 08 20:28:00 2010 +0300
@@ -77,6 +77,8 @@
     
     /**
         Creates a CSifOperationStartData object.
+
+		@deprecated  Use the overload with aOperationPhase instead.
         
         @param  aGlobalComponentId  The global component id which uniquely identifies the operation          
         @param  aComponentName		The name of the software component
@@ -90,7 +92,49 @@
         @return A pointer to the newly allocated CSifOperationStartData object, if creation is successful.
      */      
     IMPORT_C static CSifOperationStartData* NewL(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames,
-                                                  const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, const TDesC& aSoftwareType);
+                                                  const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, 
+                                                      const TDesC& aSoftwareType);
+    
+    /**
+        Creates a CSifOperationStartData object.
+        
+        @param  aGlobalComponentId  The global component id which uniquely identifies the operation          
+        @param  aComponentName      The name of the software component
+        @param  aApplicationNames   The list of applications associated with the software component, an empty array in case of no applications
+        @param  aApplicationIcons   The list of corresponding application icon names(without path) for every application, an empty array in case of no applications                 
+        @param  aComponentSize      The total size of the component in bytes
+        @param  aIconPath           The path where all application and component icons are found
+        @param  aComponentIcon      The name of the component icon(without path)
+        @param  aSoftwareType       The software type name of the software component
+        @param  aOperationPhase     The type of SIF operation
+                                                   
+        @return A pointer to the newly allocated CSifOperationStartData object, if creation is successful.
+     */      
+    IMPORT_C static CSifOperationStartData* NewL(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames,
+                                                  const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, 
+                                                      const TDesC& aSoftwareType, TSifOperationPhase aOperationPhase);
+
+    /**
+        Creates a CSifOperationStartData object.
+
+  		@deprecated  Use the overload with aOperationPhase instead.
+        
+        @param  aGlobalComponentId  The global component id which uniquely identifies the operation          
+        @param  aComponentName      The name of the software component
+        @param  aApplicationNames   The list of applications associated with the software component, an empty array in case of no applications
+        @param  aApplicationIcons   The list of corresponding application icon names(without path) for every application, an empty array in case of no applications                 
+        @param  aComponentSize      The total size of the component in bytes
+        @param  aIconPath           The path where all application and component icons are found
+        @param  aComponentIcon      The name of the component icon(without path)
+        @param  aSoftwareType       The software type name of the software component
+                                                           
+        @return A pointer to the newly allocated CSifOperationStartData object, if creation is successful.
+                The pointer is also put onto the cleanup stack. 
+     */     
+    IMPORT_C static CSifOperationStartData* NewLC(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames,
+                                                      const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, 
+                                                          const TDesC& aSoftwareType);
+    
 
     /**
         Creates a CSifOperationStartData object.
@@ -103,12 +147,14 @@
         @param  aIconPath           The path where all application and component icons are found
         @param  aComponentIcon      The name of the component icon(without path)
         @param  aSoftwareType       The software type name of the software component
-                                                   
+        @param  aOperationPhase     The type of SIF operation
+                                                           
         @return A pointer to the newly allocated CSifOperationStartData object, if creation is successful.
                 The pointer is also put onto the cleanup stack. 
      */     
     IMPORT_C static CSifOperationStartData* NewLC(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames,
-                                                  const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, const TDesC& aSoftwareType);
+                                                      const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, 
+                                                          const TDesC& aSoftwareType, TSifOperationPhase aOperationPhase);
     
     /**
      @return The global component Id associated with the operation.
@@ -153,11 +199,17 @@
     IMPORT_C ~CSifOperationStartData();          
 
     IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
+    
+    /**
+     @return The type of SIF operation.
+     */   
+    IMPORT_C TSifOperationPhase OperationPhase() const;
 
 private:
     CSifOperationStartData();
     void ConstructL(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames,  
-          const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, const TDesC& aSoftwareType);
+                        const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, 
+                            const TDesC& aComponentIcon, const TDesC& aSoftwareType, TSifOperationPhase aOperationPhase);
     void InternalizeL(RReadStream& aStream);
 
 private:
@@ -170,6 +222,7 @@
     HBufC* iIconPath;      
     HBufC* iSoftwareType;
     TSifOperation iOperationType;
+    TSifOperationPhase iOperationPhase;
     };
 
 
@@ -316,10 +369,17 @@
     
     /**
      @return The current progress value.
+
+	 @deprecated  Use CurrentProgress() instead.
      */     
     IMPORT_C TInt CurrentProgess() const;
     
     /**
+     @return The current progress value.
+     */     
+    IMPORT_C TInt CurrentProgress() const;
+    
+    /**
      @return The total value to achieve completion of the subphase.
      */     
     IMPORT_C TInt Total() const;  
--- a/installationservices/swinstallationfw/source/sifnotifierdata.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swinstallationfw/source/sifnotifierdata.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -59,24 +59,43 @@
                                         const RPointerArray<HBufC>& aApplicationNames, const RPointerArray<HBufC>& aApplicationIcons, 
                                         TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, const TDesC& aSoftwareType)
     {
+    return CSifOperationStartData::NewL(aGlobalComponentId, aComponentName, 
+                                        aApplicationNames, aApplicationIcons, aComponentSize, aIconPath, aComponentIcon, aSoftwareType, EInstalling);
+    }
+
+EXPORT_C CSifOperationStartData* CSifOperationStartData::NewL(const TDesC& aGlobalComponentId, const TDesC& aComponentName,
+                                        const RPointerArray<HBufC>& aApplicationNames, const RPointerArray<HBufC>& aApplicationIcons, 
+                                        TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, const TDesC& aSoftwareType, 
+                                        TSifOperationPhase aOperationPhase)
+    {
     CSifOperationStartData *self = CSifOperationStartData::NewLC(aGlobalComponentId, aComponentName, 
-                                        aApplicationNames, aApplicationIcons, aComponentSize, aIconPath, aComponentIcon,aSoftwareType);
+                                        aApplicationNames, aApplicationIcons, aComponentSize, aIconPath, aComponentIcon, aSoftwareType, aOperationPhase);
     CleanupStack::Pop(self);
     return self;
     }
 
+
+EXPORT_C CSifOperationStartData* CSifOperationStartData::NewLC(const TDesC& aGlobalComponentId, const TDesC& aComponentName,
+                                        const RPointerArray<HBufC>& aApplicationNames, const RPointerArray<HBufC>& aApplicationIcons, const TInt aComponentSize, 
+                                        const TDesC& aIconPath, const TDesC& aComponentIcon, const TDesC& aSoftwareType)
+    {
+    return CSifOperationStartData::NewLC(aGlobalComponentId, aComponentName, 
+                                        aApplicationNames, aApplicationIcons, aComponentSize, aIconPath, aComponentIcon, aSoftwareType, EInstalling);
+    }
+
 EXPORT_C CSifOperationStartData* CSifOperationStartData::NewLC(const TDesC& aGlobalComponentId, const TDesC& aComponentName,
 										const RPointerArray<HBufC>& aApplicationNames, const RPointerArray<HBufC>& aApplicationIcons, const TInt aComponentSize, 
-                                        const TDesC& aIconPath, const TDesC& aComponentIcon, const TDesC& aSoftwareType)
+                                        const TDesC& aIconPath, const TDesC& aComponentIcon, const TDesC& aSoftwareType, TSifOperationPhase aOperationPhase)
     {
     CSifOperationStartData *self = new(ELeave) CSifOperationStartData();
     CleanupStack::PushL(self);
-    self->ConstructL(aGlobalComponentId, aComponentName, aApplicationNames, aApplicationIcons, aComponentSize, aIconPath, aComponentIcon, aSoftwareType);
+    self->ConstructL(aGlobalComponentId, aComponentName, aApplicationNames, aApplicationIcons, aComponentSize, aIconPath, aComponentIcon, aSoftwareType, aOperationPhase);
     return self;
     }
 
 void CSifOperationStartData::ConstructL(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames,
-                                        const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, const TDesC& aSoftwareType)
+                                        const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, 
+                                        const TDesC& aSoftwareType, TSifOperationPhase aOperationPhase)
     {
 	iGlobalComponentId = aGlobalComponentId.AllocL();
     iComponentName = aComponentName.AllocL();
@@ -99,6 +118,7 @@
     iComponentSize = aComponentSize;
     iIconPath = aIconPath.AllocL();      
     iSoftwareType = aSoftwareType.AllocL();
+    iOperationPhase = aOperationPhase;
     }
 
 EXPORT_C void CSifOperationStartData::ExternalizeL(RWriteStream& aStream) const
@@ -112,6 +132,7 @@
 	aStream << *iIconPath;
 	aStream << *iComponentIcon;
 	aStream << *iSoftwareType;
+	aStream << TCardinality(iOperationPhase);
 	}
 	
 void CSifOperationStartData::InternalizeL(RReadStream& aStream)
@@ -132,6 +153,9 @@
     iComponentIcon = HBufC::NewL(aStream, KMaxTInt);
     DeleteObjectZ(iSoftwareType);
     iSoftwareType = HBufC::NewL(aStream, KMaxTInt);
+    TCardinality c;
+    aStream >> c;
+    iOperationPhase = static_cast<TSifOperationPhase>(static_cast<TInt>(c));
     }
 
 EXPORT_C const HBufC& CSifOperationStartData::GlobalComponentId() const
@@ -175,6 +199,11 @@
     return iComponentSize;
     }
 
+EXPORT_C TSifOperationPhase CSifOperationStartData::OperationPhase() const
+    {
+    return iOperationPhase;
+    }
+
 ////////////////////////
 // CSifOperationEndData
 ////////////////////////
@@ -353,9 +382,14 @@
     return iSubPhase;
     }
 
+EXPORT_C TInt CSifOperationProgressData::CurrentProgress() const
+    {
+    return iCurrentProgress;
+    }
+
 EXPORT_C TInt CSifOperationProgressData::CurrentProgess() const
     {
-    return iCurrentProgress;
+    return CurrentProgress();
     }
 
 EXPORT_C TInt CSifOperationProgressData::Total() const
--- a/installationservices/swinstallationfw/test/tusif/scripts/tnotifier.ini	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swinstallationfw/test/tusif/scripts/tnotifier.ini	Thu Jul 08 20:28:00 2010 +0300
@@ -89,7 +89,7 @@
 ComponentSize=40
 IconPath=iconPath
 SoftwareType=Native
-
+Phase=1
 
 [startabclarge]
 Operation=start
@@ -105,6 +105,7 @@
 ComponentSize=40
 IconPath=LargePathfortheicon
 SoftwareType=Native
+Phase=1
 
 [progressabc1]
 Operation=progress
@@ -219,6 +220,7 @@
 ComponentSize=40
 IconPath=xyziconPath
 SoftwareType=NonNative
+Phase=1
 
 [progressxyz1]
 Operation=progress
--- a/installationservices/swinstallationfw/test/tusif/source/tsifcommonunitteststep.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifcommonunitteststep.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -26,6 +26,7 @@
 #include <usif/sif/sifcommon.h>
 #include <ct/rcpointerarray.h>
 #include <scs/cleanuputils.h>
+#include <s32mem.h> 
 
 using namespace Usif;
 
@@ -544,4 +545,62 @@
 	    }
 
 	CleanupStack::PopAndDestroy(3, &stringArray);
+	
+	//Externalize, internalize tests.
+	COpaqueNamedParams* params5 = COpaqueNamedParams::NewLC();
+	HBufC* testString = _L("TestString").AllocLC();
+	
+	params5->AddStringL(_L("key1"), *testString);
+	params5->AddIntL(_L("key2"), 23);
+	
+	RArray<TInt> intArray2;
+	CleanupClosePushL(intArray2);
+	intArray2.AppendL(100);
+	intArray2.AppendL(200);
+	
+	RPointerArray<HBufC> stringArray2;
+	CleanupResetAndDestroyPushL(stringArray2);
+	stringArray2.Append(_L("TestString1").AllocL());
+    stringArray2.Append(_L("TestString2").AllocL());
+    
+    params5->AddStringArrayL(_L("key3"), stringArray2);
+    params5->AddIntArrayL(_L("key4"), intArray2);
+    
+	CBufFlat* externalizedBuffer = CBufFlat::NewL(150);
+	CleanupStack::PushL(externalizedBuffer);
+	
+	RBufWriteStream writeStream(*externalizedBuffer);
+	CleanupClosePushL(writeStream);
+	
+	params5->ExternalizeL(writeStream);
+	
+	COpaqueNamedParams* params6 = COpaqueNamedParams::NewLC();
+	
+	RBufReadStream readStream(*externalizedBuffer);
+	CleanupClosePushL(readStream);
+	params6->InternalizeL(readStream);
+	
+    if(params6->IntByNameL(_L("key2"))!= 23 || (params6->StringByNameL(_L("key1")) != _L("TestString")))
+        {
+        INFO_PRINTF1(_L("TestOpaqueNamedParamsL: Internalize of int and string failed."));
+        User::Leave(err);
+        } 
+    
+    const RArray<TInt>& internalizedIntArray = params6->IntArrayByNameL(_L("key4"));
+    
+    if(internalizedIntArray[0] != 100 && internalizedIntArray[0] != 200)
+        {
+        INFO_PRINTF1(_L("TestOpaqueNamedParamsL: Internalize of int array failed."));
+        User::Leave(err);
+        }   
+	
+    const RPointerArray<HBufC>& internalizedStringArray = params6->StringArrayByNameL(_L("key3"));
+    
+    if(*internalizedStringArray[0] != _L("TestString1") && *internalizedStringArray[1] != _L("TestString2"))
+        {
+        INFO_PRINTF1(_L("TestOpaqueNamedParamsL: Internalize of string array failed."));
+        User::Leave(err);
+        }  
+    CleanupStack::PopAndDestroy(8, params5);
+	
 	}
--- a/installationservices/swinstallationfw/test/tusif/source/tsifnotifierteststep.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/swinstallationfw/test/tusif/source/tsifnotifierteststep.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -258,7 +258,7 @@
         INFO_PRINTF2(_L("Icon Path : %S"),  &aStartData.IconPath());
         INFO_PRINTF2(_L("Component Icon : %S"),  &aStartData.ComponentIcon());
         INFO_PRINTF2(_L("Software Type: %S"),  &aStartData.SoftwareType());
-        
+        INFO_PRINTF2(_L("Operation Phase : %d"), (TInt)aStartData.OperationPhase());
         
         }
     }
@@ -340,7 +340,7 @@
         INFO_PRINTF2(_L("Global Component Id : %S"),  &aProgressData.GlobalComponentId());
         INFO_PRINTF2(_L("Phase : %d"),  (TInt)aProgressData.Phase());
         INFO_PRINTF2(_L("Sub Phase : %d"),  (TInt)aProgressData.SubPhase());
-        INFO_PRINTF2(_L("Current Progress : %d"),  aProgressData.CurrentProgess());
+        INFO_PRINTF2(_L("Current Progress : %d"),  aProgressData.CurrentProgress());
         INFO_PRINTF2(_L("Total Value : %d"),  aProgressData.Total());
         
         }
@@ -418,6 +418,7 @@
 		TInt appNameCount =0;
 		TInt appIconCount =0;
 		TInt compSize = 0;
+		TInt phase = 0;
 		GetStringFromConfig(*configsection,KGlobalCompId, globalCompId);
 		GetStringFromConfig(*configsection,KComponentName, compName);
 		GetStringFromConfig(*configsection,KComponentIcon, compIcon);
@@ -453,8 +454,10 @@
 		GetIntFromConfig(*configsection, KComponentSize, compSize);
 		GetStringFromConfig(*configsection, KIconPath, iconPath);
 		GetStringFromConfig(*configsection, KSoftwareType, softwareType);
+		GetIntFromConfig(*configsection, KPhase, phase);
 
-        CSifOperationStartData* startdata = CSifOperationStartData::NewLC(globalCompId, compName, appNameArray, appIconArray, compSize, iconPath, compIcon, softwareType);
+		TSifOperationPhase enumPhase = static_cast<TSifOperationPhase>(phase);
+        CSifOperationStartData* startdata = CSifOperationStartData::NewLC(globalCompId, compName, appNameArray, appIconArray, compSize, iconPath, compIcon, softwareType, enumPhase);
         iPublisher->PublishStartL(*startdata);   
         CleanupStack::PopAndDestroy(3, &appNameArray);
         }
--- a/installationservices/switestfw/test/autotesting/test_spec_apr_9.5.txt	Tue Jun 29 16:50:12 2010 +0300
+++ b/installationservices/switestfw/test/autotesting/test_spec_apr_9.5.txt	Thu Jul 08 20:28:00 2010 +0300
@@ -149,6 +149,8 @@
 
 TESTEXECUTE, \logs\testexecute\testnoaiacert_ocspmandatory.htm,, \tswi\tuiscriptadaptors\scripts\testnoaiacert_ocspmandatory.script, 100, UDEB#UREL, \epoc32\winscw\c\tswi\tuiscriptadaptors\scripts\batchfiles\testnoaiacert_ocspmandatory_pre.bat, \epoc32\winscw\c\tswi\tuiscriptadaptors\scripts\batchfiles\testnoaiacert_ocspmandatory_post.bat
 
+TESTEXECUTE, \logs\testexecute\tdaemon_winscw.htm,, \tswi\tdaemon\scripts\tdaemon_winscw.script, 300, UDEB#UREL, \epoc32\winscw\c\tswi\tdaemon\scripts\setupforemmcformat_pre.bat, \epoc32\winscw\c\tswi\tdaemon\scripts\setupforemmcformat_post.bat
+
 TESTEXECUTE, \logs\testexecute\testrun.htm,, \tswi\tuiscriptadaptors\scripts\testrun.script, 300, UDEB#UREL, %SECURITYSOURCEDIR%\installationservices\switestfw\test\autotesting\setupSwiPolicy.bat swipolicy_shortrunwait.ini, %SECURITYSOURCEDIR%\installationservices\switestfw\test\autotesting\setupSwiPolicy.bat swipolicy.ini
 TESTEXECUTE, \logs\testexecute\testrunft.htm,, -Dstartupmode=1 -- \tswi\tuiscriptadaptors\scripts\testrunft.script, 300, UDEB#UREL, %SECURITYSOURCEDIR%\installationservices\switestfw\test\autotesting\setupSwiPolicy.bat swipolicy_shortrunwait.ini,
 
--- a/ncdengine/engine/accesspointmanager/inc/catalogsaccesspointmanagerimpl.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/ncdengine/engine/accesspointmanager/inc/catalogsaccesspointmanagerimpl.h	Thu Jul 08 20:28:00 2010 +0300
@@ -20,6 +20,7 @@
 #define C_CATALOGSACCESSPOINTMANAGERIMPL_H
 
 #include <e32def.h>
+#include <e32base.h> // HLa: DLMgr remove
 
 #ifdef _0
 #include <ApAccessPointItem.h>
--- a/ncdengine/engine/group/ncddevicemgmt.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/ncdengine/engine/group/ncddevicemgmt.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -86,17 +86,10 @@
 LIBRARY         avkon.lib
 LIBRARY         etel3rdparty.lib 
 LIBRARY         apgrfx.lib
-//LIBRARY         swinstcli.lib           // Silent install
+
 LIBRARY         sif.lib // SIF installer
 LIBRARY         scrclient.lib  //Registry client
-//LIBRARY         widgetregistryclient.lib // Widget Registry
 
-// 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/transport/inc/catalogshttpdownload.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/ncdengine/engine/transport/inc/catalogshttpdownload.h	Thu Jul 08 20:28:00 2010 +0300
@@ -19,7 +19,7 @@
 #ifndef C_CATALOGSHTTPDOWNLOAD_H
 #define C_CATALOGSHTTPDOWNLOAD_H
 
-#include <DownloadMgrClient.h>
+// HLA: #include <DownloadMgrClient.h>
 #include <download.h>
 #include <downloadevent.h>
 #include <s32file.h>
@@ -295,8 +295,9 @@
     *
     * @param aEvent Download Manager event
     */
+     /* HLa
     void HandleEventL( THttpDownloadEvent aEvent );
-    
+    */
     
     /**
      * Set file server session
@@ -349,9 +350,10 @@
     /**
     * Handles event progress
     * @param aEvent The event that has progressed
-    */            
+    */
+    /* HLa
     void HandleEventProgressL( const THttpDownloadEvent& aEvent );
-
+    */
     
     /**
     * Updates the target filename from Content-Disposition -header
@@ -527,7 +529,9 @@
     HBufC8* iAddedRequestHeaders;       
     TInt iRefCount;        
     TBool iNormalDelete;
-    TBuf8<KMaxContentTypeLength> iContentType;
+
+    // HLa: TBuf8<KMaxContentTypeLength> iContentType;
+    TBuf8<256> iContentType;
         
     // Transaction for retrieving all of the response headers
     MCatalogsHttpOperation* iTransaction;
--- a/ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h	Thu Jul 08 20:28:00 2010 +0300
@@ -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
@@ -30,6 +30,9 @@
 #include <download.h>
 #include <downloadmanager.h>
 #include <QObject>
+
+#include <f32file.h> //HLa
+
 class MCatalogsHttpConfig;
 class CCatalogsHttpConfig;
 class CCatalogsHttpDownload;
@@ -262,11 +265,12 @@
         * @param aArray Array to search from
         * @param aDownload Download to find
         * @return Index to the download in iDownloads
-        */      
+        */
+        /* HLa
         TInt FindInDownloads( 
             const RCatalogsHttpOperationArray& aArray,
             RHttpDownload* aDownload ) const;
-
+        */
 
         /**
         * Searches for the given download from the given array and returns
@@ -286,6 +290,7 @@
         /**
          * Download events
          */
+        /* HLa
         class TDownloadEvent        
             {
         public:
@@ -298,7 +303,7 @@
 			        {
 			        }
             };
-
+          */
 
         /**
          * Sets this object active if event queue has unhandled events
@@ -309,12 +314,14 @@
          * Removes events from event queue that belong to the same 
          * RHttpDownload as aEvent
          */
+        /*
         void RemoveUnhandledEvents( 
             const TDownloadEvent& aEvent );
 
         void RemoveUnhandledProgressEvents( 
             const TDownloadEvent& aEvent );
-
+        */
+        
         /**
          * Deletes downloads that have not been paused by the user
          */
@@ -343,7 +350,7 @@
         RFs iFs;
         TCatalogsConnectionMethod iCurrentAp;
 
-        RArray<TDownloadEvent> iEventQueue;
+        // RArray<TDownloadEvent> iEventQueue;  //HLa
         TInt iCurrentDlId; // id of the last created download
     };
 
--- a/ncdengine/engine/transport/inc/catalogshttptypes.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/ncdengine/engine/transport/inc/catalogshttptypes.h	Thu Jul 08 20:28:00 2010 +0300
@@ -19,7 +19,7 @@
 #ifndef T_CATALOGSHTTPTYPES_H
 #define T_CATALOGSHTTPTYPES_H
 
-#include <HttpDownloadMgrCommon.h>
+// #include <HttpDownloadMgrCommon.h>  // HLa: DLMgr remove
 
 class MCatalogsHttpOperation;
 
@@ -342,6 +342,7 @@
 /**
 * Maximum length for content types
 */
+const TUint KMaxContentTypeLength = 256; // HLa: DLMgr remove
 const TUint KCatalogsHttpMaxContentTypeLength = KMaxContentTypeLength;
 
 
--- a/ncdengine/engine/transport/src/catalogshttpdownload.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/ncdengine/engine/transport/src/catalogshttpdownload.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -25,6 +25,8 @@
 #include <escapeutils.h>
 #include <downloadmanager.h>
 
+#include <uri8.h> // HLa
+
 
 #include <QtGlobal>
 #include "catalogshttpdownloadmanagerimpl.h"
@@ -811,7 +813,8 @@
     iConfig->InternalizeL( aStream );
     HBufC8* contentType = NULL;
     InternalizeDesL( contentType, aStream );
-    if ( contentType->Length() > KMaxContentTypeLength ) 
+    // HLa if ( contentType->Length() > KMaxContentTypeLength ) 
+    if ( contentType->Length() > 256 )
         {
         DeletePtr( contentType );
         DLERROR(("Content type was too long, leaving with KErrCorrupt"));
@@ -1084,6 +1087,8 @@
 // Handles events from the download manager
 // ---------------------------------------------------------------------------
 //	
+
+/* HLa
 void CCatalogsHttpDownload::HandleEventL( THttpDownloadEvent aEvent )
     {
     DLTRACEIN((""));
@@ -1376,6 +1381,7 @@
         * Download process can be paused again. This event only occurs after
         * EHttpDlNonPausable. 
         */	
+/* HLa
         case EHttpDlPausable:
             {
             DLTRACE(( "Pausable" ));
@@ -1411,13 +1417,14 @@
             }	
         }
     }
-
+*/
 
 
 // ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
 //	
+/*
 void CCatalogsHttpDownload::HandleEventProgressL( const 
     THttpDownloadEvent& aEvent )
     {
@@ -1691,7 +1698,7 @@
 			break;
 		}
     }
-    
+ */   
 
 
 // ---------------------------------------------------------------------------
@@ -1797,7 +1804,8 @@
         DLTRACE(("Updating the content type"));
         QString contentType;
         contentType= iDownload->attribute(WRT::ContentType).toString();
-        	TBuf<KMaxContentTypeLength>  ContentType(contentType.utf16());
+        // HLa TBuf<KMaxContentTypeLength>  ContentType(contentType.utf16());
+        TBuf<256>  ContentType(contentType.utf16());
         	iContentType.Copy(ContentType);
    
         }
@@ -1918,6 +1926,7 @@
     // Get the current url of the download
     RBuf8 buf;
     CleanupClosePushL( buf );
+    const TInt KMaxUrlLength = 2048;
     buf.CreateL( KMaxUrlLength );
     QString string;
 	try
@@ -2148,6 +2157,7 @@
 TUint CCatalogsHttpDownload::MatchWithPredefinedRequestHeader( 
     const TDesC8& aHeader ) const
     {
+    /* HLa
     if ( aHeader.CompareF( KHttpRequestAcceptHeader ) == 0 ) 
         {
         return EDlAttrRequestAccept;
@@ -2192,7 +2202,7 @@
         {
         return EDlAttrRequestVary;
         }
-    
+    */
     return 0;
     }
     
@@ -2205,6 +2215,7 @@
 TUint CCatalogsHttpDownload::MatchWithPredefinedGeneralHeader( 
     const TDesC8& aHeader ) const
     {
+    /* HLa
     if ( aHeader.CompareF( KHttpGeneralCacheControlHeader ) == 0 ) 
         {
         return EDlAttrGeneralCacheControl;
@@ -2224,7 +2235,8 @@
     else if ( aHeader.CompareF( KHttpGeneralWarningHeader ) == 0 ) 
         {
         return EDlAttrGeneralWarning;
-        }    
+        }
+        */    
     return 0;
     }
     
@@ -2237,6 +2249,7 @@
 TUint CCatalogsHttpDownload::MatchWithPredefinedEntityHeader( 
     const TDesC8& aHeader ) const
     {
+    /*
     if ( aHeader.CompareF( KHttpEntityAllowHeader ) == 0 ) 
         {
         return EDlAttrEntityAllow;
@@ -2261,6 +2274,7 @@
         {
         return EDlAttrEntityLastModified;
         }
+        */
     return 0;
     }
         
@@ -2300,6 +2314,9 @@
 
     TPtr8 ptr( aTarget->Des() );
     
+    _LIT8( KHttpFieldSeparator, "\n"); // HLa
+    const TInt KColon( ':' ); // HLa
+    
     if( newSize ) 
         {
         DLTRACE( ("Appending to existing headers") );
--- a/ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -77,7 +77,7 @@
     DLTRACEIN( ( "" ) );
 
     Cancel();
-    iEventQueue.Close();
+    // HLa iEventQueue.Close();
 
     // Release downloads
     TInt count = iDownloads.Count() - 1;
@@ -636,6 +636,7 @@
     {
     DLTRACEIN((""));
     
+    const TInt KMaxUrlLength = 2048; // HLa
     TBuf8<KMaxUrlLength> url;
     
     
@@ -692,7 +693,8 @@
 // ---------------------------------------------------------------------------
 // Finds the index for the given download in iDownloads
 // ---------------------------------------------------------------------------
-//            
+//   
+/* HLa
 TInt CCatalogsHttpDownloadManager::FindInDownloads( 
     const RCatalogsHttpOperationArray& aArray,
     RHttpDownload* aDownload ) const
@@ -712,7 +714,7 @@
         }
     return KErrNotFound;
     }
-
+*/
 
 // ---------------------------------------------------------------------------
 // Finds the index for the given download in the given array
@@ -834,6 +836,7 @@
     DLTRACEIN(( "Event queue count: %d", iEventQueue.Count() ));
    
     // Handle the event queue 
+    /* HLa
     while ( iEventQueue.Count() ) 
         {
         
@@ -895,6 +898,7 @@
                 }
             }
         }
+        */
     }
     
     
@@ -920,6 +924,7 @@
 void CCatalogsHttpDownloadManager::ContinueEventHandling()
     {
     DLTRACEIN((""));
+    /* HLa
     if( iEventQueue.Count() && !IsActive() ) 
         {
         DLTRACE(("More events to handle"));
@@ -928,9 +933,11 @@
         TRequestStatus* status = &iStatus;
         User::RequestComplete( status, KErrNone );
         }
+        */
     }
+
     
-    
+    /* HLa
 void CCatalogsHttpDownloadManager::RemoveUnhandledEvents( 
     const TDownloadEvent& aEvent )
     {
@@ -945,8 +952,9 @@
             }        
         }    
     }
+*/
 
-
+/* HLa
 void CCatalogsHttpDownloadManager::RemoveUnhandledProgressEvents( 
     const TDownloadEvent& aEvent )
     {
@@ -963,7 +971,7 @@
             }        
         }    
     }
-
+*/
 
 TInt CCatalogsHttpDownloadManager::NewDownloadId()
     {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swianalysistoolkit/group/apply_tools2_variants.xml	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<build xmlns="http://symbian.com/xml/build"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://symbian.com/xml/build build/2_0.xsd">
+
+  <!-- This variant is used so that we can tell if the APPLY keyword
+       can find variants exported into the epoc32 tree -->
+
+  <var name="tools2_shlwapi">
+	<append name="LINKER_OPTIONS" value="-lshlwapi" />
+  </var>
+</build>
--- a/secureswitools/swianalysistoolkit/group/bld.inf	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swianalysistoolkit/group/bld.inf	Thu Jul 08 20:28:00 2010 +0300
@@ -42,6 +42,9 @@
 #endif
 #endif
 
+PRJ_EXPORTS
+apply_tools2_variants.xml /epoc32/tools/makefile_templates/ossi/
+
 
 PRJ_TESTEXPORTS
 
--- a/secureswitools/swianalysistoolkit/group/dumpchainvaliditytool.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swianalysistoolkit/group/dumpchainvaliditytool.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -48,7 +48,9 @@
 #endif
 
 STATICLIBRARY			eay32 
-STATICLIBRARY			shlwapi 
+
+// Link to mingw libs: shlwapi.a 
+APPLY				tools2_shlwapi
 
 OPTION				GCC -w
 OPTION				GCC -fno-stack-check
--- a/secureswitools/swianalysistoolkit/group/dumpinstallfilestatustool.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swianalysistoolkit/group/dumpinstallfilestatustool.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -49,7 +49,9 @@
 #endif
 
 STATICLIBRARY			eay32 
-STATICLIBRARY			shlwapi 
+
+// Link to mingw libs: shlwapi.a 
+APPLY				tools2_shlwapi
 
 OPTION				GCC -w
 OPTION				GCC -fno-stack-check
--- a/secureswitools/swianalysistoolkit/group/dumpswicertstoretool.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swianalysistoolkit/group/dumpswicertstoretool.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -55,7 +55,9 @@
 #endif
 
 STATICLIBRARY			eay32 
-STATICLIBRARY			shlwapi 
+
+// Link to mingw libs: shlwapi.a 
+APPLY				tools2_shlwapi
 
 OPTION				GCC -w
 OPTION				GCC -fno-stack-check
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swianalysistoolkit/source/common/utf8_wrapper.h	Thu Jul 08 20:28:00 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  A wrapper header to include utf8.h using the header
+*               macro to avoid problems due to multiple inclusions.  
+*				To avoid any possible third-party license issues, 
+*				the third-party header utf8.h is not modified.
+*/
+
+#ifndef UTF8_WRAPPER_H
+#define UTF8_WRAPPER_H
+
+#include "utf8/utf8.h"
+
+#endif /* UTF8_WRAPPER_H */
\ No newline at end of file
--- a/secureswitools/swisistools/group/bld.inf	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/group/bld.inf	Thu Jul 08 20:28:00 2010 +0300
@@ -50,8 +50,18 @@
 ../source/xmlparser/xerces/lib/libxerces_deb.a    /epoc32/release/tools2/deb/libxerces.a
 ../source/xmlparser/xerces/lib/libxerces_rel.a    /epoc32/release/tools2/rel/libxerces.a
 
+../source/xmlparser/xerces/lib/libxerces_linux.a    /epoc32/release/tools2/linux-i386/deb/libxerces.a
+../source/xmlparser/xerces/lib/libxerces_linux.a    /epoc32/release/tools2/linux-i386/rel/libxerces.a
+
+
+#ifdef __TOOLS2_LINUX__
+../source/dbmanager/sqlite/sqlite-3.6.1.so  /epoc32/tools/sqlite-3.6.1.so
+/usr/lib/libdl.a	/epoc32/release/tools2/linux-i386/deb/libdl.a
+/usr/lib/libdl.a	/epoc32/release/tools2/linux-i386/rel/libdl.a
+#else
 ../source/dbmanager/sqlite/sqlite3.dll  /epoc32/tools/sqlite3.dll
 ../source/dbmanager/sqlite/sqlite3.def  /epoc32/tools/sqlite3.def
+#endif // __TOOLS2_LINUX__
 
 #endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 
--- a/secureswitools/swisistools/group/dbmanager.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/group/dbmanager.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -21,9 +21,11 @@
 TARGETTYPE		LIB
 
 USERINCLUDE 	../../swianalysistoolkit/source/common
+USERINCLUDE 	../../swianalysistoolkit/source/common/utf8
 USERINCLUDE 	../source/common
 USERINCLUDE 	../source/dbmanager
 USERINCLUDE 	../source/xmlparser
+USERINCLUDE		../source/sisxlibrary
 
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN
 SYSTEMINCLUDE	../../openssllib/import/inc 
@@ -38,6 +40,9 @@
 SOURCE			logs.cpp
 SOURCE			util.cpp
 
+SOURCEPATH		../source/sisxlibrary
+SOURCE			utility.cpp
+
 #ifndef TOOLS2_LINUX
 MACRO	_UNICODE _CONSOLE _STLP_THREADS _WIN32 UNICODE __GNUG__
 #else
--- a/secureswitools/swisistools/group/dumpsislib.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/group/dumpsislib.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -23,6 +23,7 @@
 USERINCLUDE 	../source/dumpsislib
 USERINCLUDE 	../source/sisxlibrary
 USERINCLUDE 	../../swianalysistoolkit/source/common
+USERINCLUDE 	../../swianalysistoolkit/source/common/utf8
 
 
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN
--- a/secureswitools/swisistools/group/interpretsis.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/group/interpretsis.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -26,6 +26,7 @@
 USERINCLUDE 		../source/sisxlibrary
 USERINCLUDE 		../source/common
 USERINCLUDE 		../../swianalysistoolkit/source/common
+USERINCLUDE 		../../swianalysistoolkit/source/common/utf8
 
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 USERINCLUDE 		../source/rscparser
@@ -55,11 +56,15 @@
 #ifndef TOOLS2_LINUX
 STATICLIBRARY		eay32 zlib seclib
 #else
-STATICLIBRARY		crypto zlib seclib 
+STATICLIBRARY		crypto zlib seclib dl
+LIBRARY c
 #endif
 
 OPTION			GCC -w
 OPTION			GCC -fno-stack-check
 OPTION			GCC -fpermissive
+#ifdef TOOLS2_LINUX
+OPTION			GCC -rdynamic
+#endif // TOOLS2_LINUX
 MACRO			_UNICODE _CONSOLE _STLP_THREADS UNICODE __GNUG__
 
--- a/secureswitools/swisistools/group/interpretsislib.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/group/interpretsislib.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -23,10 +23,11 @@
 USERINCLUDE 	../source/interpretsislib
 USERINCLUDE 	../source/sisxlibrary
 USERINCLUDE 	../../swianalysistoolkit/source/common
+USERINCLUDE 	../../swianalysistoolkit/source/common/utf8
+USERINCLUDE 	../source/common
 
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 USERINCLUDE		../source/xmlparser
-USERINCLUDE 	../source/common
 USERINCLUDE 	../source/dbmanager
 USERINCLUDE 	../source/rscparser
 #endif // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
@@ -74,6 +75,7 @@
 SOURCE			xmlgenerator.cpp
 SOURCE			dbhelper.cpp
 
+
 SOURCEPATH		../source/common
 SOURCE			util.cpp
 
@@ -94,6 +96,8 @@
 SOURCE			apsecutils.cpp
 
 #endif
+SOURCEPATH		../../swianalysistoolkit/source/common/utf8
+SOURCE			utf8.cpp
 
 #ifndef TOOLS2_LINUX
 MACRO	_UNICODE _CONSOLE _STLP_THREADS _WIN32 UNICODE __GNUG__ XML_LIBRARY
--- a/secureswitools/swisistools/group/scrtool.mmp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/group/scrtool.mmp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -27,6 +27,7 @@
 USERINCLUDE 		../source/xmlparser
 USERINCLUDE 		../source/dbmanager
 USERINCLUDE 		../source/dbmanager/sqlite
+USERINCLUDE			../source/sisxlibrary
 
 SYSTEMINCLUDE 		../source/xmlparser/xerces/include
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN
@@ -46,7 +47,14 @@
 SOURCE			logs.cpp exception.cpp util.cpp
 
 
-STATICLIBRARY		eay32 xerces
+STATICLIBRARY		xerces
+STATICLIBRARY		sisx
+#ifndef TOOLS2_LINUX
+STATICLIBRARY		eay32
+#else
+STATICLIBRARY		crypto dl c
+#endif
+
 
 #ifndef TOOLS2_LINUX
 MACRO	_UNICODE _CONSOLE _STLP_THREADS _WIN32 UNICODE __GNUG__ XML_LIBRARY
@@ -60,5 +68,8 @@
 OPTION			GCC -w
 OPTION			GCC -fno-stack-check
 OPTION			GCC -fpermissive
+#ifdef TOOLS2_LINUX
+OPTION			GCC -rdynamic
+#endif 
 //OPTION			GCC -masm=intel
 SMPSAFE
--- a/secureswitools/swisistools/source/common/util.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/common/util.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -24,7 +24,6 @@
 
 #include "util.h"
 #include "symbiantypes.h"
-#include <windows.h>
 #include <fstream.h>
 #include <iostream>
 #include <sstream>
@@ -33,6 +32,13 @@
 #include <openssl/evp.h>
 #include <openssl/buffer.h>
 
+#ifdef _WIN32
+#include <windows.h>
+#endif // _WIN32
+
+
+#include "utf8_wrapper.h"
+
 static const TUint32 CrcTab32[256] =
      {
      0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
@@ -100,18 +106,96 @@
      0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
      0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
      };
+
+namespace Util
+{
+/**
+ * Converts wide char (unicode) string to multibyte string
+ * This interface is provided so that we can have different implementation 
+ * in windows and linux machine.
+ * @param aSource 		string to be converted
+ * @param aSourceLen	Source len. If this is -1 then it will calculate the length of the source.
+ * @param aTarget		target location.
+ * @param aTargetLen	Space in the target location.
+ * @param aCodePage		Code page number (currently supported in windows only)
+ * @return Number of bytes that make up the converted part of multibyte sequence. 
+ * 			If aTarget is NULL then the function will return the size needed to store
+ * 			the complete conversion of the source string.
+ */
+int ConvertWideCharToMultiByte(const wchar_t* aSource, int aSourceLen, char* aTarget, int aTargetLen, TUint32 aCodePage = 0);
+/**
+ * Converts multibyte string to wide char (unicode)
+ * This interface is provided so that we can have different implementation 
+ * in windows and linux machine.
+ * @param aSource 		string to be converted
+ * @param aSourceLen	Source len. If this is -1 then it will calculate the length of the source.
+ * @param aTarget		target location.
+ * @param aTargetLen	Space in the target location.
+ * @param aCodePage		Code page number (currently supported in windows only)
+ * @return Number of bytes that make up the converted part of widechar sequence. 
+ * 			If aTarget is NULL then the function will return the size needed to store
+ * 			the complete conversion of the source string.
+ */
+int ConvertMultiByteToWideChar(const char* aSource, int aSourceLen, wchar_t* aTarget, int aTargetLen, TUint32 aCodePage = 0);
+}; // namespace Util
  
 
+#ifdef __linux__ 
+int Util::ConvertWideCharToMultiByte(const wchar_t* aSource, int /*aSourceLen*/, char* aTarget, int aTargetLen, TUint32 /*aCodePage*/)
+	{
+	int retValue = wcstombs(aTarget, aSource, aTargetLen);
+	if (-1 == retValue)
+		{
+		return 0;
+		}
+	return retValue;
+	}
+
+int Util::ConvertMultiByteToWideChar(const char* aSource, int /*aSourceLen*/, wchar_t* aTarget, int aTargetLen, TUint32 /*aCodePage*/)
+	{
+	int retValue = mbstowcs(aTarget, aSource, aTargetLen);
+	if (-1 == retValue)
+		{
+		return 0;
+		}
+	return retValue;
+	}
+
+#else
+
+int Util::ConvertWideCharToMultiByte(const wchar_t* aSource, int aSourceLen, char* aTarget, int aTargetLen, TUint32 aCodePage)
+	{
+	if(0 == aCodePage)
+		{
+		aCodePage = CP_OEMCP;
+		}
+	return WideCharToMultiByte( aCodePage, 0, aSource, aSourceLen, aTarget, aTargetLen, NULL, NULL);
+	}
+
+int Util::ConvertMultiByteToWideChar(const char* aSource, int aSourceLen, wchar_t* aTarget, int aTargetLen, TUint32 aCodePage)
+	{
+	if(0 == aCodePage)
+		{
+		aCodePage = CP_OEMCP;
+		}
+	return MultiByteToWideChar( aCodePage, 0, aSource, aSourceLen, aTarget, aTargetLen);
+	}
+
+#endif // __linux__
+
+
+#ifndef __linux__
+/*
 DllExport std::string Util::wstring2string (const std::wstring& aWide)
 	{
-	int max = WideCharToMultiByte(CP_OEMCP,0,aWide.c_str(),aWide.length(),0,0,0,0);
+	int max = ConvertWideCharToMultiByte(aWide.c_str(),aWide.length(),0,0);
 	std::string reply;
 	if (max > 0 )
 		{
 		char* buffer = new char [max];
 		try
 			{
-			WideCharToMultiByte(CP_OEMCP,0,aWide.c_str(),aWide.length(),buffer,max,0,0);
+			ConvertWideCharToMultiByte(aWide.c_str(),aWide.length(),buffer,max);
 			reply = std::string (buffer, max);
 			}
 		catch (...)
@@ -124,14 +208,37 @@
 
 std::wstring Util::string2wstring (const std::string& aNarrow)
 	{
-	int max = MultiByteToWideChar(CP_OEMCP,0,aNarrow.c_str(),aNarrow.length(),0,0);
+	int max = ConvertMultiByteToWideChar(aNarrow.c_str(),aNarrow.length(),0,0);
 	std::wstring reply;
 	if (max > 0 )
 		{
 		wchar_t* buffer = new wchar_t [max];
 		try
 			{
-			MultiByteToWideChar(CP_OEMCP,0,aNarrow.c_str(),aNarrow.length(),buffer,max);
+			ConvertMultiByteToWideChar(aNarrow.c_str(),aNarrow.length(),buffer,max);
+			reply = std::wstring (buffer, max);
+			}
+		catch (...)
+			{
+			}
+		delete [] buffer;
+		}
+	return reply;
+	}
+*/
+#endif
+
+std::wstring Util::string2wstring (const char* aNarrow)
+	{
+	std::string narrowStr(aNarrow);
+	int max = ConvertMultiByteToWideChar(aNarrow, strlen(aNarrow),0,0);
+	std::wstring reply;
+	if (max > 0 )
+		{
+		wchar_t* buffer = new wchar_t [max];
+		try
+			{
+			ConvertMultiByteToWideChar(aNarrow, strlen(aNarrow),buffer,max);
 			reply = std::wstring (buffer, max);
 			}
 		catch (...)
@@ -142,26 +249,6 @@
 	return reply;
 	}
 
-std::wstring Util::string2wstring (const char* aNarrow)
-	{
-	std::string narrowStr(aNarrow);
-	int max = MultiByteToWideChar(CP_OEMCP,0,narrowStr.c_str(),narrowStr.length(),0,0);
-	std::wstring reply;
-	if (max > 0 )
-		{
-		wchar_t* buffer = new wchar_t [max];
-		try
-			{
-			MultiByteToWideChar(CP_OEMCP,0,narrowStr.c_str(),narrowStr.length(),buffer,max);
-			reply = std::wstring (buffer, max);
-			}
-		catch (...)
-			{
-			}
-		delete [] buffer;
-		}
-	return reply;
-	}
 
 DllExport int Util::WideCharToInteger(const wchar_t* aWideChar)
 	{
@@ -173,9 +260,10 @@
 
 TInt64 Util::WideCharToInt64(const wchar_t* aWideChar)
 	{
-	__int64 i64 = 0;
-	swscanf(aWideChar, L"%I64d", &i64);
-	return i64;
+	TInt64 value=0;
+	std::wstringstream str(aWideChar);
+	str >> value;
+	return value;
 	}
 
 DllExport const std::wstring Util::IntegerToWideString(int aInt)
@@ -230,4 +318,7 @@
 	 crc = (crc >> 8) ^ CrcTab32[(crc ^ *p++) & 0xff];
 	return crc;
 	}
-	
\ No newline at end of file
+
+
+
+
--- a/secureswitools/swisistools/source/dbmanager/dblayer.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/dbmanager/dblayer.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -21,6 +21,7 @@
 #include "logs.h"
 #include "util.h"
 #include "symbiantypes.h"
+#include "../sisxlibrary/utility.h"
 
 #include <string>
 #include <vector>
@@ -54,6 +55,60 @@
 typedef std::vector<XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppProperty>::const_iterator ApplicationPropertyIterator;
 
 
+#ifdef __LINUX__
+
+/*
+* Platform specific feature
+*
+* In WINDOWS : sizeof(wchar_t) = 2
+* In LINUX   : sizeof(wchar_t) = 4
+*/
+
+static utf16WString utf32WString2utf16WString(std::wstring aParameter)
+{
+	int strLen = aParameter.length();
+	const wchar_t * source = aParameter.c_str();
+	unsigned short int* buffer = new unsigned short int[strLen + 1];
+
+	// Using a temp variable in place of buffer as ConvertUTF32toUTF16 modifies the source pointer passed.
+	unsigned short int* temp = buffer;
+
+	ConvertUTF32toUTF16(&source, source + strLen, &temp,  temp + strLen, lenientConversion);
+
+	// Appending NUL to the converted buffer.
+	*temp = 0;
+
+	utf16WString utf16Ws;
+	utf16Ws.resize(strLen);
+
+	// The built-in basic_string template class copy operation
+	// truncates when a NUL is encountered when a c_str() is
+	// used to construct the required string.
+	// So, if aParameter is any hashable string having the
+	// syntax : swtypeName + L'\0' + someId then, we will end
+	// up returning only part of the converted UTF-16 string.
+	// Hence, we resort to the explicit copy operation with
+	// two bytes at a time.
+	while( strLen-- )
+	{
+		utf16Ws[ strLen ] = buffer[ strLen ];
+	}
+
+	delete[] buffer;
+
+	return utf16Ws;
+}
+
+#else
+
+// We need not do anything for WINDOWS, since the windows wstring
+// will already be in UTF-16 encoding.
+#define utf32WString2utf16WString(aParameter) (aParameter)
+
+#endif
+
+
+
 const int KMaxDrives=26;
 
 CDbLayer::CDbLayer(const std::string& aDllPath, const std::string& aSqlDbName)
@@ -140,7 +195,11 @@
 
 	for(ScrEnvIterator aScrEnvIterator = aScrEnvDetails.begin(); aScrEnvIterator != aScrEnvDetails.end(); ++aScrEnvIterator)
 		{
-		unsigned int swTypeId = Util::Crc32(aScrEnvIterator->iUniqueSoftwareTypeName.c_str(),aScrEnvIterator->iUniqueSoftwareTypeName.length()*2);
+		// To maintain the consistency of CRC value across the platforms(WINDOWS and LINUX), we are
+		// using UTF-16 string in CRC generation.
+		utf16WString utf16Ws = utf32WString2utf16WString(aScrEnvIterator->iUniqueSoftwareTypeName);
+		unsigned int swTypeId = Util::Crc32(utf16Ws.c_str(),aScrEnvIterator->iUniqueSoftwareTypeName.length()*2);
+
 		if (!aScrEnvIterator->iLauncherExecutable.empty())
 		{
 		stmtSwType->BindInt(1, swTypeId);
@@ -217,14 +276,19 @@
 	std::string insertComponents;
 	XmlDetails::TScrPreProvisionDetail::TComponentDetails 
 		componentDetail = aComponent.iComponentDetails;
-
 	if (aComponent.iComponentDetails.iIsRomApplication)
 		{
 		LOGINFO("Is rom app");
 		return true;
 		}
 	LOGINFO("Not rom app");
-	unsigned int swTypeId = Util::Crc32(aSoftwareTypeName.c_str(),aSoftwareTypeName.length()*2);
+
+	// To maintain the consistency of CRC value across the platforms(WINDOWS and LINUX), we are
+	// using UTF-16 string in CRC generation.
+    utf16WString utf16Ws = utf32WString2utf16WString(aSoftwareTypeName);
+	unsigned int swTypeId = Util::Crc32(utf16Ws.c_str(),aSoftwareTypeName.length()*2);
+
+
 	std::wstring strGlobalId = componentDetail.iGlobalId;
 	
 	if(!strGlobalId.empty())
@@ -262,7 +326,12 @@
 	if(!strGlobalId.empty())
 		{
 		std::wstring concatGlobalId = aSoftwareTypeName + L'\0' + strGlobalId;
-		unsigned int globalIdHash = Util::Crc32(concatGlobalId.c_str(),concatGlobalId.length()*2);
+
+		// To maintain the consistency of CRC value across the platforms(WINDOWS and LINUX), we are
+		// using UTF-16 string in CRC generation.
+		utf16WString utf16Ws = utf32WString2utf16WString(concatGlobalId);
+		unsigned int globalIdHash = Util::Crc32(utf16Ws.c_str(),concatGlobalId.length()*2);
+
 		stmtComponents->BindInt(9, globalIdHash);
 		stmtComponents->BindStr(10, concatGlobalId);
 		stmtComponents->BindStr(11, version);
@@ -376,7 +445,7 @@
 			{
 			if(compPropIter->iIsStr8Bit)
 				{
-				std::string str = Util::wstring2string(compPropIter->iValue);
+				std::string str = wstring2string(compPropIter->iValue);
 				std::string decodedString = Util::Base64Decode(str);
 				stmtComponentProperty->BindBinary(4, str);
 				}
@@ -429,11 +498,19 @@
 	for(compDepIter = aComponentDependencyDetails.begin() ; compDepIter != aComponentDependencyDetails.end() ; ++compDepIter)
 		{
 		std::wstring concatGlobalId = dependantGlobalId + compDepIter->iSupplierId;
-				
-		unsigned int globalIdHash = Util::Crc32(concatGlobalId.c_str(),concatGlobalId.length()*2);
-		unsigned int dependantIdHash = Util::Crc32(dependantGlobalId.c_str(),dependantGlobalId.length()*2);
-		unsigned int supplierIdHash = Util::Crc32(compDepIter->iSupplierId.c_str(),compDepIter->iSupplierId.length()*2);
-		
+
+		// To maintain the consistency of CRC value across the platforms(WINDOWS and LINUX), we are
+		// using UTF-16 string in CRC generation.
+		utf16WString utf16Ws = utf32WString2utf16WString(concatGlobalId);
+		unsigned int globalIdHash = Util::Crc32(utf16Ws.c_str(),concatGlobalId.length()*2);
+
+		utf16Ws = utf32WString2utf16WString(dependantGlobalId);
+		unsigned int dependantIdHash = Util::Crc32(utf16Ws.c_str(),dependantGlobalId.length()*2);
+
+		utf16Ws = utf32WString2utf16WString(compDepIter->iSupplierId);
+		unsigned int supplierIdHash = Util::Crc32(utf16Ws.c_str(),compDepIter->iSupplierId.length()*2);
+
+
 		std::string insertComponentDeps("INSERT INTO ComponentDependencies(GlobalIdHash,DependantGlobalIdHash, SupplierGlobalIdHash, DependantGlobalId,SupplierGlobalId,VersionFrom,VersionTo) VALUES(?,?,?,?,?,?,?);");
 		std::auto_ptr<CStatement> stmtComponentDeps(iScrDbHandler->PrepareStatement(insertComponentDeps));
 		
@@ -460,14 +537,40 @@
 	
 	stmtComponentFileDetails->BindInt(1,aComponentId);
 	
-	// size does not return the actual binary size of the object
 	int length = aLocation.length()*2 ;
+
 	// generate hash for location
 	std::wstring location = aLocation;
 	std::transform(	location.begin(), location.end(), location.begin(), tolower);
 
-	unsigned int hash = Util::Crc32(location.c_str(),length);
-	
+	#ifdef __TOOLS2_LINUX__
+
+	// To maintain the consistency of the LocationHash value(essentially the CRC of
+	// Location string) across the WINDOWS and LINUX platforms, we reconstruct the
+	// location to have WINDOWS specific path.
+
+    std::wstring::size_type idx = 0;
+     while( (idx = location.find(L"//", idx)) != std::wstring::npos)
+     {
+    	 location.replace( idx, 2, L"\\\\" );
+     }
+
+     idx = 0;
+
+     while( (idx = location.find(L"/", idx)) != std::wstring::npos)
+     {
+    	 location.replace( idx, 1, L"\\" );
+     }
+
+	#endif
+
+
+	// To maintain the consistency of CRC value across the platforms(WINDOWS and LINUX), we are
+	// using UTF-16 string in CRC generation.
+
+	utf16WString utf16Ws = utf32WString2utf16WString(location);
+	unsigned int hash = Util::Crc32(utf16Ws.c_str(),length);
+
 	stmtComponentFileDetails->BindInt(2,hash);
 	stmtComponentFileDetails->BindStr(3,aLocation);
 	stmtComponentFileDetails->ExecuteStatement();
@@ -504,7 +607,7 @@
 			}
 		else
 			{
-			std::string str = Util::wstring2string(filePropIter->iValue);
+			std::string str = wstring2string(filePropIter->iValue);
 			std::string decodedString = Util::Base64Decode(str);
 			stmtFileProperty->BindBinary(3, str);
 			stmtFileProperty->BindInt(4, 1);
@@ -703,7 +806,11 @@
 			
 			stmtDataType->BindInt64(1, serviceId);
 			stmtDataType->BindInt64(2, dataTypeIter->iPriority);
+			#ifdef __TOOLS2_LINUX__
+			stmtDataType->BindStr(3, dataTypeIter->iType, avoidSlashConversion);
+			#else
 			stmtDataType->BindStr(3, dataTypeIter->iType);
+			#endif
 				
 			stmtDataType->ExecuteStatement();
 			stmtDataType->Reset();
--- a/secureswitools/swisistools/source/dbmanager/dblayer.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/dbmanager/dblayer.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -38,6 +38,19 @@
 
 #include <string>
 
+#ifdef __TOOLS2_LINUX__
+
+// utf16WString represents the UTF-16 data(WINDOWS wstring).
+typedef std::basic_string<unsigned short int> utf16WString;
+
+#else
+
+// Under WINDOWS, wstring will be in UTF-16 format itself.
+typedef std::wstring utf16WString;
+
+#endif
+
+
 class CDbLayer
 	{
 	public:
--- a/secureswitools/swisistools/source/dbmanager/dbprocessor.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/dbmanager/dbprocessor.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -30,10 +30,130 @@
 #include "logs.h"
 #include "util.h"
 #include "symbiantypes.h"
-
+#include "utf8_wrapper.h"
+#include "../sisxlibrary/utility.h"
 #include <string>
 #include <cassert>
 
+#ifdef __linux__
+#include <dlfcn.h>
+
+
+void* GetProcAddress(HINSTANCE aHandle, const char* aSymbol)
+	{
+	return dlsym(aHandle, aSymbol);
+	}
+
+HINSTANCE LoadLibraryA(const char* aLibraryName)
+	{
+	HINSTANCE handleUsingDefaultSearchPath = dlopen(aLibraryName, RTLD_LAZY);
+
+	if( handleUsingDefaultSearchPath == NULL )
+	{
+		// Once the dlopen() fails by not finding the aLibraryName in the default
+		// path specified by LD_LIBRARY_PATH, we will look in the epoc32/tools 
+		// path as the second option.
+
+		const char* epocRoot = getenv("EPOCROOT");		
+		if(NULL == epocRoot)
+			{
+			throw CException("EPOCROOT environment variable not specified.", ExceptionCodes::EEnvNotSpecified);
+			}
+		std::string epocRootStr(epocRoot); 
+
+		std::string absPathToLibrary = epocRootStr + std::string("epoc32/tools/") + std::string(aLibraryName);
+		HINSTANCE handleUsingAbsSearchPath = dlopen(absPathToLibrary.c_str(), RTLD_LAZY);
+
+		return handleUsingAbsSearchPath;
+	}
+
+	return handleUsingDefaultSearchPath;
+	}
+
+int FreeLibrary(HINSTANCE aHandle)
+	{
+	// FreeLibrary returns non-zero value on success whereas
+	// dlcose returns zero on success.
+	return (dlclose(aHandle) == 0)? true: false;
+	}
+
+std::string GetErrorMessage()
+	{
+	return dlerror();
+	}
+
+static utf16WString utf32WString2utf16WString(std::wstring& aParameter)
+{
+	int strLen = aParameter.length();
+	const wchar_t * source = aParameter.c_str();
+	unsigned short int* buffer = new unsigned short int[(strLen + 1) * 2];
+
+	// Using a temp variable in place of buffer as ConvertUTF32toUTF16 modifies the source pointer passed.
+	unsigned short int* temp = buffer;
+
+	ConvertUTF32toUTF16(&source, source + strLen, &temp,  temp + strLen, lenientConversion);
+
+	// Appending NUL to the converted buffer.
+	*temp = 0;
+
+	utf16WString utf16Ws;
+	utf16Ws.resize(strLen);
+
+	// The built-in basic_string template class copy operation
+	// truncates when a NUL is encountered when a c_str() is
+	// used to construct the required string.
+	// So, if aParameter is any hashable string having the
+	// syntax : swtypeName + L'\0' + someId then, we will end
+	// up returning only part of the converted UTF-16 string.
+	// Hence, we resort to the explicit copy operation with
+	// two bytes at a time.
+	while( strLen-- )
+	{
+		utf16Ws[ strLen ] = buffer[ strLen ];
+	}
+
+	delete[] buffer;
+
+	return utf16Ws;
+}
+
+static std::wstring utf16WString2utf32WString(utf16WString& aParameter)
+{	
+	int strLen = aParameter.length();
+	const unsigned short int* source = aParameter.c_str();
+	wchar_t* buffer = new wchar_t[ strLen + 1 ];
+
+	// Using a temp variable in place of buffer as ConvertUTF16toUCS4 modifies the source pointer passed.
+	wchar_t* temp = buffer;
+
+	ConvertUTF16toUCS4(&source, source + strLen, &temp, temp + strLen);
+
+	// Appending NUL to the converted buffer.
+	*temp = 0;
+
+	std::wstring utf32Ws(buffer);
+
+	delete[] buffer;
+
+	return utf32Ws;
+}
+
+#else
+std::string GetErrorMessage()
+	{
+	LPCVOID lpMsgBuf;
+		
+	DWORD err = GetLastError();
+	FormatMessage	(	FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
+						FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err,
+						MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf,
+						0, NULL 
+					);
+	std::wstring wErrMsg((wchar_t*)lpMsgBuf);
+	return wstring2string(wErrMsg);
+	}
+#endif // __linux__
+
 TDbLibrary* iLibraryHandler = NULL;
 
 TDbLibrary::TDbLibrary(const std::string& aDllPath)
@@ -55,18 +175,7 @@
 	int retCode = FreeLibrary(sqLiteHndl);
 	if(retCode == 0)
 		{
-		LPCVOID lpMsgBuf;
-		
-		DWORD err = GetLastError();
-		FormatMessage	(	FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
-							FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err,
-							MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf,
-							0, NULL 
-						);
-		std::wstring wErrMsg((wchar_t*)lpMsgBuf);
-		std::string errMsg = Util::wstring2string(wErrMsg);
-		//LOGERROR(errMsg);
-		
+		//LOGERROR(GetErrorMessage());
 		}
 	}
 
@@ -167,16 +276,7 @@
 	if(aFnPtr != NULL)
 		return;
 
-	LPCVOID lpMsgBuf;
-		
-	DWORD err = GetLastError();
-	FormatMessage	(	FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
-						FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err,
-						MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf,
-						0, NULL 
-					);
-	std::wstring wErrMsg((wchar_t*)lpMsgBuf);
-	std::string errMsg = Util::wstring2string(wErrMsg);
+	std::string errMsg = GetErrorMessage();
 	//LOGERROR(errMsg);
 	throw CException(errMsg,ExceptionCodes::ELibraryLoadError);
 	}
@@ -362,9 +462,46 @@
 	CheckSqlErrCode(err);
 	}
 
+
+#ifdef __TOOLS2_LINUX__
+void CStatement::BindStr(TInt aParameterIndex, const std::wstring &aParameterStr, int aConvertSlash=allowSlashConversion)
+#else
 void CStatement::BindStr(TInt aParameterIndex, const std::wstring &aParameterStr)
+#endif
 	{
+	/*
+	 * Under LINUX : Because of the UTF-32 format of wstring, we can't directly use the sqlite3_bind_text16() which
+	 * requires UTF-16 format. So, we convert the UTF-32 data into UTF-16 before using it.
+	 *
+	 * Under WINDOWS : No conversion required since wstring will be in UTF-16 format itself.
+	 */
+
+    #ifdef __LINUX__
+	// Make sure that the wstring passed to this function is not having any trailing
+	// explicit NUL( Preferably, pass c_str() part of wstring ).
+    //
+	// Only case in which you shouldn't pass c_str() is that the wstring has NUL as
+	// part of its actual string content(like swtypename + L'\0' + someID etc).
+
+	// In order to maintain the consistency of DB contents across the WINDOWS and LINUX platforms, before interacting
+	// with the DB we convert the local paths into WINDOWS specific paths.
+    //
+	// If aParameterStr is not a PATH but contains a forward slash, we should restrain 
+	// from the slash conversion. One such instance is MimeType.
+	//
+	std::wstring temp = aParameterStr;
+	if( aConvertSlash == allowSlashConversion )
+	{
+	    ConvertToWindowsSpecificPaths(temp);
+	}
+
+    utf16WString utf16s = utf32WString2utf16WString(temp);
+
+	TInt err = iLibraryHandler.sqlite3_bind_text16(iStmtHandle, aParameterIndex, utf16s.c_str(), aParameterStr.size()*2, SQLITE_TRANSIENT);
+
+    #else
 	TInt err = iLibraryHandler.sqlite3_bind_text16(iStmtHandle, aParameterIndex, aParameterStr.c_str(), aParameterStr.size()*2, SQLITE_TRANSIENT);
+	#endif
 	// The fifth argument has the value SQLITE_TRANSIENT, it means that SQLite makes its own private copy of the data immediately
 	CheckSqlErrCode(err);
 	}
@@ -378,7 +515,19 @@
 
 void CStatement::BindBinary(TInt aParameterIndex, const std::wstring &aParameterStr)
 	{
+	#ifdef __LINUX__
+	// To maintain consistency of the binary equivalent of the wstring
+	// being binded, we convert the wstring with UTF-32 encoding under LINUX
+	// to UTF-16 encoding which is same as that of wstring under WINDOWS.
+	
+	std::wstring temp = aParameterStr;
+	utf16WString utf16s = utf32WString2utf16WString(temp);
+
+	TInt err = iLibraryHandler.sqlite3_bind_blob(iStmtHandle, aParameterIndex, utf16s.c_str(), aParameterStr.size()*2, SQLITE_TRANSIENT);
+	#else
 	TInt err = iLibraryHandler.sqlite3_bind_blob(iStmtHandle, aParameterIndex, aParameterStr.c_str(), aParameterStr.size()*2, SQLITE_TRANSIENT);
+	#endif
+
 	// The fifth argument has the value SQLITE_TRANSIENT, it means that SQLite makes its own private copy of the data immediately
 	CheckSqlErrCode(err);
 	}
@@ -411,8 +560,28 @@
 
 std::wstring CStatement::StrColumn(int aColumnId ) const
 	{
-	std::wstring columnValue(static_cast<const wchar_t*>(iLibraryHandler.sqlite3_column_text16(iStmtHandle, aColumnId)));
-	return columnValue;
+	/*
+	 * Under LINUX : While writing onto DB, we bind the wstring after converting it into UTF-16 from
+	 * UTF-32 format. So, now while reading we need to convert the UTF-16 data back to UTF-32
+	 * format so that we can return the required UTF-32 wstring.
+	 *
+	 * Under WINDOWS : No conversion required since wstring will be in UTF-16 format itself.
+	 */
+	#ifdef __LINUX__
+
+	utf16WString utf16S = iLibraryHandler.sqlite3_column_text16(iStmtHandle, aColumnId);
+	std::wstring utf32S = utf16WString2utf32WString(utf16S);
+
+	// The DB will have WINDOWS specific paths to maintain the consistency of DB contents across WINDOWS and LINUX platforms.
+	// So, after reading under LINUX we will convert them into local paths.
+
+    ConvertToLinuxSpecificPaths(utf32S);
+
+	#else
+	std::wstring utf32S(static_cast<const wchar_t*>(iLibraryHandler.sqlite3_column_text16(iStmtHandle, aColumnId)));
+	#endif
+
+	return utf32S;
 	}
 
 TInt64 CStatement::Int64Column(int aColumnId ) const
--- a/secureswitools/swisistools/source/dbmanager/dbprocessor.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/dbmanager/dbprocessor.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -32,7 +32,12 @@
 #include "./sqlite/sqlite3.h"
 #include "symbiantypes.h"
 #include <string>
+
+#ifdef __linux__
+typedef void* HINSTANCE;
+#else
 #include <windows.h>
+#endif // __linux__
 
 // Forward declarations
 class CStatement;
@@ -107,6 +112,50 @@
 	};
 
 
+#ifdef __TOOLS2_LINUX__
+typedef enum {
+	allowSlashConversion = 0,
+	avoidSlashConversion
+} SlashConversionFlags;
+
+// utf16WString represents the UTF-16 data(WINDOWS wstring).
+typedef std::basic_string<unsigned short int> utf16WString;
+
+
+inline void ConvertToWindowsSpecificPaths(std::wstring& aPath)
+{
+		std::wstring::size_type idx = 0;
+		while( (idx = aPath.find(L"//", idx)) != std::wstring::npos)
+		{
+			aPath.replace( idx, 2, L"\\\\" );
+		}
+
+		idx = 0;
+
+		while( (idx = aPath.find(L"/", idx)) != std::wstring::npos)
+		{
+			aPath.replace( idx, 1, L"\\" );
+		}
+}
+
+inline void ConvertToLinuxSpecificPaths(std::wstring& aPath)
+{
+	 std::wstring::size_type idx = 0;
+     while( (idx = aPath.find(L"\\\\", idx)) != std::wstring::npos)
+     {
+             aPath.replace( idx, 2, L"//" );
+     }
+
+     idx = 0;
+
+     while( (idx = aPath.find(L"\\", idx)) != std::wstring::npos)
+     {
+             aPath.replace( idx, 1, L"/" );
+     }
+}
+
+#endif
+
 /**
 	An instance of this class is used to execute all types of SQL statements with or without
 	parameters. 
@@ -183,8 +232,16 @@
 			@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.
+			@param aConvertSlash The integer value which is used only under LINUX platform specifies whether
+								 to convert any LINUX specific paths to WINDOWS specific paths in aParameterStr.
+								 This helps in avoiding the wrong interpretation of the DataType strings
+								 having the syntax (DataType/Format) as PATHs.
 		 */
-		void BindStr(int aParameterIndex, const std::wstring& aParameterStr);
+		#ifdef __TOOLS2_LINUX__
+		void BindStr(TInt aParameterIndex, const std::wstring &aParameterStr, int aConvertSlash=allowSlashConversion);
+		#else
+		void BindStr(TInt aParameterIndex, const std::wstring &aParameterStr);
+		#endif
 		
 		void BindBinary(int aParameterIndex, const std::string &aParameterStr);
 
@@ -265,4 +322,4 @@
 		TDbLibrary iLibraryHandler;
 		};
 
-#endif // DBPROCESSOR_H
\ No newline at end of file
+#endif // DBPROCESSOR_H
--- a/secureswitools/swisistools/source/dumpsis/main.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/dumpsis/main.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -64,7 +64,7 @@
 			}
 		else
 			{
-			std::wcout << L":" << str;
+			std::wcout << L":" << str.c_str();
 			std::vector<std::wstring> capList;
 			fdesc->GetCapabilityList(capList);
 			std::wcout << std::endl;
--- a/secureswitools/swisistools/source/dumpsis/options.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/dumpsis/options.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -84,7 +84,7 @@
 {
 	std::cout << "\nDUMPSIS  Version  " << MajorVersion << '.' << MinorVersion << std::endl;
 	std::cout << "A utility for decompiling Software Installation (SIS) files" << std::endl;
-	std::cout <<"Copyright (c) Symbian Software Limited 2004-2008. All rights reserved.\n\n" << std::flush;
+	std::cout <<"Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.\n\n" << std::flush;
 }
 
 Options::Options (int argc, wchar_t** argv)
@@ -99,7 +99,21 @@
 	while (--argc)
 		{
 		argv++;
-		if ((**argv == '-') || (**argv == '/'))
+		// WINDOWS ENVIRONMENT : If the underlying platform is WINDOWS then, 
+		// cope up with multiple arguments following the '-' or '/'. 
+		//
+		// LINUX ENVIRONMENT : If the underlying platform is LINUX then, cope 
+		// up with multiple arguments following only the '-'. This restriction 
+		// of not dealing with arguments following '/' is due to the fact that, 
+		// the absolute paths in case of LINUX start with a '/'. So, this could 
+		// be mistaken as an option if we treat anything prefixed by a '/' as 
+		// an option. Hence, this facility is being removed once for all and 
+		// only '-' can(should) be used for specifying an option.
+					if (	   (**argv == '-')   
+#ifndef __TOOLS2_LINUX__
+							|| (**argv == '/')
+#endif
+					   )
 			{
 			const wchar_t* optPtr = *argv;
 
--- a/secureswitools/swisistools/source/dumpsis/options.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/dumpsis/options.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -30,7 +30,7 @@
 using std::ostream;
 
 int const MajorVersion=1;
-int const MinorVersion=2;
+int const MinorVersion=3;
 int const BuildVersion=0;
 /**
 Exceptions raised while processing the command line
--- a/secureswitools/swisistools/source/dumpsislib/dumpsis.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/dumpsislib/dumpsis.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -28,10 +28,10 @@
 #include <functional>
 #include <set>
 
-
 #include "dumpsis.h"
 #include "siscontroller.h"
 #include "exception.h"
+#include "utf8_wrapper.h"
 
 CDumpSis::CDumpSis(const std::wstring& aSISFileName, bool aVerbose)
 		: 	iController(NULL),
@@ -68,6 +68,7 @@
 	std::wostream outStream (inStream.rdbuf ());
 
 	outStream << wchar_t(0xfeff);
+
 	if(iIsStub)
 		{
 		iController->AddPackageEntry (outStream, iVerbose);
@@ -78,7 +79,27 @@
 		}
 	
 	std::wstring str = inStream.str();
+#ifndef __TOOLS2_LINUX__
 	WriteToFile(aPkgFileName, reinterpret_cast<const TUint8*>(str.c_str()), str.length()*2);
+#else
+	TUint32 size = str.size();
+	const wchar_t * source = str.c_str();
+
+	unsigned short int* buffer = new unsigned short int[size*2];
+
+	// Using a temp variable in place of buffer as ConvertUTF32toUTF16 modifies the source pointer passed.
+	unsigned short int* temp = buffer;
+
+	//Converting to UTF-16 because makesis do not support UTF-32.	
+	ConvertUTF32toUTF16(&source, source + size, &temp,  temp + (size*2), lenientConversion);
+
+	TUint32 buflen = temp-buffer;
+	// Appending NULL to the converted buffer.
+	*temp = NULL;
+
+	WriteToFile(aPkgFileName, reinterpret_cast<const TUint8*>(buffer), buflen*2);
+	delete[] buffer;
+#endif
 	}
 
 void CDumpSis::CreatePackage(const CSISController& aSisController, const std::wstring& aPkgFileName)
@@ -89,7 +110,27 @@
 	outStream << wchar_t(0xfeff);
 	aSisController.AddPackageEntry (outStream, iVerbose);
 	std::wstring str = inStream.str();
+#ifndef __TOOLS2_LINUX__
 	WriteToFile(aPkgFileName, reinterpret_cast<const TUint8*>(str.c_str()), str.length()*2);
+#else
+	TUint32 size = str.size();
+	const wchar_t * source = str.c_str();
+	
+	unsigned short int* buffer = new unsigned short int[size*2];
+	
+	// Using a temp variable in place of buffer as ConvertUTF32toUTF16 modifies the source pointer passed.
+	unsigned short int* temp = buffer;
+	
+	//Converting to UTF-16 because makesis do not support UTF-32.	
+	ConvertUTF32toUTF16(&source, source + size, &temp,	temp + (size*2), lenientConversion);
+	
+	TUint32 buflen = temp-buffer;
+	// Appending NULL to the converted buffer.
+	*temp = NULL;
+	
+	WriteToFile(aPkgFileName, reinterpret_cast<const TUint8*>(buffer), buflen*2);
+	delete[] buffer;
+#endif
 	}
 
 void CDumpSis::ExtractFiles(const std::wstring& aTargetDir, TExtractionLevel aLevel)
--- a/secureswitools/swisistools/source/interpretsis/commandparser.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsis/commandparser.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -403,7 +403,7 @@
 				}
 			default:
 				{
-				LERROR(Utf8ToUcs2(std::string(optPtr)));
+				LERROR(string2wstring(std::string(optPtr)));
 				throw CCommandParser::ECmdLineUnknownOption;
 				}
 			}
@@ -464,8 +464,7 @@
 	while (currentPos != end)
 	    {
 		currentPos = std::find(it, end, ',');
-		std::wstring x;
-		Utf8ToUcs2(std::string(it,(currentPos-it)), x);
+		std::wstring x = string2wstring(std::string(it,(currentPos-it)));
 		//aOptionsList.push_back(x);
 		(aParamList.*aFilePtr)(x);
 
@@ -492,8 +491,7 @@
 	while (currentPos != end)
 	    {
 		currentPos = std::find(it, end, ',');
-		std::wstring x;
-		Utf8ToUcs2(std::string(it,(currentPos-it)), x);
+		std::wstring x = string2wstring(std::string(it,(currentPos-it)));
 
 		InstallSISFile sisFileName(x, '$', false);
 		aParamList.AddSISFile(sisFileName);
@@ -511,8 +509,7 @@
 	// As the sisfile attributes are predetermined input, therefore we can just
 	// parse according to the predetermined inputs.
 
-	std::wstring fileName;
-	Utf8ToUcs2(sisFileOption, fileName);
+	std::wstring fileName = string2wstring(sisFileOption);
 
 	InstallSISFile sisFileName(fileName, '$', false);
 		
--- a/secureswitools/swisistools/source/interpretsis/main.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsis/main.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -32,6 +32,22 @@
 #include "dirparse.h"
 #endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 
+
+#ifndef _WIN32
+#include <ctype.h>
+
+//__ctype_b was removed from glibc. This is a workaround to fix the linking problem
+extern "C"
+    {
+    const unsigned short int** __ctype_b()
+        {
+        return __ctype_b_loc();
+        }
+    }
+
+#endif // _WIN32
+
+
 int main(int argc, const char* argv[])
 	{
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK	
@@ -54,7 +70,7 @@
 
 		if (options.LogFile().size() > 0)
 			{
-			logFile = new std::wofstream(Ucs2ToUtf8(options.LogFile()).c_str(), std::ios::app);
+			logFile = new std::wofstream(wstring2string(options.LogFile()).c_str(), std::ios::app);
 			Logger::SetStream(*logFile);
 			}
 		else
@@ -131,7 +147,7 @@
     	}
 	catch  (InterpretSisError& e)
 		{
-		LERROR(L"\t" << Utf8ToUcs2(e.what()));
+		LERROR(L"\t" << string2wstring(e.what()));
 		result =  e.GetErrorCode();
 		}
 	catch (CSISException e)
@@ -150,7 +166,7 @@
 #endif
 	catch (std::exception &err)
 		{
-		std::wstring emessage = Utf8ToUcs2( err.what() );
+		std::wstring emessage = string2wstring( err.what() );
 		LERROR( L"Error: " << emessage);
 		result = STD_EXCEPTION;
 		}
@@ -167,7 +183,11 @@
 		BackupDb.append("_backup");
 		if (FileExists(string2wstring(BackupDb)))
 		{	
-			std::string command = "move " + BackupDb + " " + dbpath;
+			#ifdef __TOOLS2_LINUX__
+				std::string command = "mv " + BackupDb + " " + dbpath;
+			#else
+				std::string command = "move " + BackupDb + " " + dbpath;
+			#endif
 			int err = system(command.c_str());
 			if (err != 0)
 				LERROR(L"Failed to Restore src.db ");
--- a/secureswitools/swisistools/source/interpretsislib/adornedutilities.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/adornedutilities.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -56,7 +56,11 @@
 	}
 }
 
+#ifndef __TOOLS2_LINUX__
 bool IsAdornedVariationOf(const std::wstring& aFileName1, const std::wstring& aFileName2)
+#else
+bool IsAdornedVariationOf(const std::wstring& aFileName1, const std::wstring& aFileName2, const std::wstring& aDrivePath)
+#endif
 {
 	std::wstring unadornedFileName1;
 	GetUnadornedFileName(aFileName1,unadornedFileName1);
@@ -64,6 +68,11 @@
 	std::wstring unadornedFileName2;
 	GetUnadornedFileName(aFileName2,unadornedFileName2);
 
+	#ifdef __TOOLS2_LINUX__
+	ConvertToLocalPath( unadornedFileName1, aDrivePath );
+	ConvertToLocalPath( unadornedFileName2, aDrivePath );
+	#endif
+
   	// Check whether filename2 is a variant of filename1
   	// e.g: d:\sys\bin\DummyDll{000A0001}.dll is considered a variant of c:\sys\bin\DummyDll.dll 
   	// because they both break down to \sys\bin\DummyDll.dll
@@ -73,7 +82,7 @@
 	std::wstring fileName2Path(StringUtils::Path(unadornedFileName2));
 	std::wstring fileName2NameAndExt(StringUtils::NameAndExt(unadornedFileName2));
 
-	return ((fileName1Path == fileName2Path) && (fileName1NameAndExt == fileName2NameAndExt));
+	return ( !wcscmp(fileName1Path.c_str(), fileName2Path.c_str()) && !wcscmp(fileName1NameAndExt.c_str(), fileName2NameAndExt.c_str()) );
 }
 	
 void FindAllAdornedVariants(const std::wstring& aSearchNameWild, const std::wstring& aSearchPath, std::list<std::wstring>& aAdornedFileNamesFound, const DrivesMap& aDriveMap)
--- a/secureswitools/swisistools/source/interpretsislib/adornedutilities.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/adornedutilities.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -45,7 +45,11 @@
 @param aFileName1 first name to compare (full path and name)
 @param aFileName2 second name to compare (full path and name)
 */
+#ifndef __TOOLS2_LINUX__
 bool IsAdornedVariationOf(const std::wstring& aFileName1, const std::wstring& aFileName2);
+#else
+bool IsAdornedVariationOf(const std::wstring& aFileName1, const std::wstring& aFileName2, const std::wstring& aDrivePath);
+#endif
 	
 /** Searches through the file system looking for all variants of searchNameWild
 @param aSearchNameWild represents the filename pattern that is to be searched for (i.e: afile{????????}.ext)
--- a/secureswitools/swisistools/source/interpretsislib/configmanager.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/configmanager.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -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 the License "Eclipse Public License v1.0"
@@ -123,7 +123,7 @@
     if ( FileExists( fileName ) )
         {
     	std::string fName;
-        fName = Ucs2ToUtf8( fileName );
+        fName = wstring2string( fileName );
         //
         std::ifstream stream;
 	    stream.open( fName.c_str(), std::ios::binary );
@@ -382,7 +382,7 @@
 		std::ostringstream stream;
     	stream << "Unsupported keyword at line " << aLineNumber << " of ini file [" << aKey << " = " << aValue << "] ";
     	stream << std::endl;
-    	std::wstring finalMessage = Utf8ToUcs2( stream.str() );
+    	std::wstring finalMessage = string2wstring( stream.str() );
 		LWARN( finalMessage );
 		}
     }
@@ -398,7 +398,7 @@
 		if  ( KConfigAttributes[i].iId == aId )
 			{
 			std::wstring entry( KConfigAttributes[i].iName );
-            ret = Ucs2ToUtf8( entry );
+            ret = wstring2string( entry );
 			}
 		}
     //
@@ -411,7 +411,7 @@
 	std::string upperCased( aName );
     upperCased = StringUtils::ToUpper( upperCased );
     std::wstring searchFor;
-    searchFor = Utf8ToUcs2( upperCased );
+    searchFor = string2wstring( upperCased );
     //
     const int attributeCount = sizeof( KConfigAttributes ) / sizeof( ConfigAttribute );
     const ConfigAttribute* ret = NULL;
@@ -512,7 +512,7 @@
 			}
 
 		// Set the drive representation location
-		Utf8ToUcs2(std::string(it, (currentPos-it)), aDrive->iDir);
+		aDrive->iDir = string2wstring(std::string(it, (currentPos-it)));
 			
 		temp =  StringUtils::TrimWhiteSpace( std::string(currentPos, end) );
 
@@ -614,7 +614,7 @@
 		char drive = aDrive;
 	 	std::stringstream warn;
 		warn << "Redefining drive: " << drive;
-		std::wstring finalMessage = Utf8ToUcs2( warn.str() );
+		std::wstring finalMessage = string2wstring( warn.str() );
 		LWARN( finalMessage + L" to " + aDir);
 
 		delete it->second;
@@ -687,7 +687,7 @@
 			stream << "\'" << iValue << "\'" << " directory is not found";
 			break;
 		case ETypeDriveError:
-			LERROR( Utf8ToUcs2( iValue ) );
+			LERROR( string2wstring( iValue ) );
 			return;
 
 		default:
@@ -696,7 +696,7 @@
 		}
     //
     stream << std::endl;
-    std::wstring finalMessage = Utf8ToUcs2( stream.str() );
+    std::wstring finalMessage = string2wstring( stream.str() );
     //
 	LERROR( finalMessage );
     }
--- a/secureswitools/swisistools/source/interpretsislib/dbhelper.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/dbhelper.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -38,13 +38,26 @@
 
 DbHelper::DbHelper( const std::wstring& aDrivePath, bool aIsSystemDrive)
 	{
-	std::string dllName = "sqlite3.dll";
+
+  #ifdef __LINUX__
+  std::string dllName = "sqlite-3.6.1.so"; 	  	  	 
+  #else 	  	  	 
+  std::string dllName = "sqlite3.dll"; 
+  #endif		
 	std::string dbName; 
 	
 	if (aIsSystemDrive)
+	#ifdef __TOOLS2_LINUX__
+		dbName = wstring2string(aDrivePath) + "/sys/install/scr/scr.db";
+	#else
 		dbName = wstring2string(aDrivePath) + "\\sys\\install\\scr\\scr.db";
+	#endif
 	else 
+	#ifdef __TOOLS2_LINUX__
+		dbName = wstring2string(aDrivePath) + "/sys/install/scr/provisioned/scr.db";
+	#else
 		dbName = wstring2string(aDrivePath) + "\\sys\\install\\scr\\provisioned\\scr.db";
+	#endif
 
 	std::wstring wdbname(string2wstring(dbName));
 	//Create the SCR DB if not present in the System Drive
@@ -60,14 +73,18 @@
 		std::string epocRootStr(epocRoot); 
 
 		#ifndef __TOOLS2_LINUX__
-		std::wstring swEnvInfo = string2wstring(epocRootStr) + L"epoc32\\tools\\create_db.xml";
+			std::wstring swEnvInfo = string2wstring(epocRootStr) + L"epoc32\\tools\\create_db.xml";
 		#else
-		std::wstring swEnvInfo = string2wstring(epocRootStr) + L"epoc32/tools/create_db.xml";
+			std::wstring swEnvInfo = string2wstring(epocRootStr) + L"epoc32/tools/create_db.xml";
 		#endif
 
 		if(FileExists(swEnvInfo))
 			{
-			std::string executable = "scrtool.exe";
+			#ifdef __TOOLS2_LINUX__
+				std::string executable = "scrtool";
+			#else
+				std::string executable = "scrtool.exe";
+			#endif
 			std::string command;
 			
 			command = executable + " -c " + dbName + " -f " + wstring2string(swEnvInfo);
@@ -97,7 +114,7 @@
 	catch(CException& aException)
 		{
 		int returnCode = aException.GetCode();
-		std::wstring emessage = Utf8ToUcs2( aException.GetMessageA() );
+		std::wstring emessage = string2wstring( aException.GetMessageA() );
 
 		returnCode = (returnCode == ExceptionCodes::ELibraryLoadError) ? LIBRARYLOAD_ERROR : returnCode;
 		throw InterpretSisError(emessage,returnCode);		
@@ -268,7 +285,7 @@
 	std::string selCompId("SELECT ComponentId FROM ComponentsFiles WHERE Location=?;");
 	std::auto_ptr<CStatement> stmtCompId(iScrDbHandler->PrepareStatement(selCompId));
 		
-	stmtCompId->BindStr(1, aFileName);
+	stmtCompId->BindStr(1, aFileName.c_str());
 	
 	TInt32 componentId = 0;
 	if(stmtCompId->ProcessNextRow())
@@ -280,7 +297,7 @@
 	std::string selCompPropsId("SELECT ComponentId FROM ComponentProperties WHERE StrValue=? and Name like 'WCFile%';");
 	std::auto_ptr<CStatement> stmtCompPropsId(iScrDbHandler->PrepareStatement(selCompPropsId));
 		
-	stmtCompPropsId->BindStr(1, aFileName);
+	stmtCompPropsId->BindStr(1, aFileName.c_str());
 	
 	if(stmtCompPropsId->ProcessNextRow())
 		{
--- a/secureswitools/swisistools/source/interpretsislib/deserialiser.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/deserialiser.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -26,6 +26,8 @@
 #include "serialisable.h"
 #include "cardinality.h"
 #include "ucmp.h"
+#include "utf8_wrapper.h"
+#include "is_utils.h"
 
 #pragma warning (disable: 4800)
 
@@ -137,6 +139,50 @@
 	return *this;
 	}
 
+#ifdef __TOOLS2_LINUX__
+
+	Deserialiser& operator>>(std::wstring& val)
+	{
+		Cardinality card;
+		*this >> card;
+		TUint32 size = card;
+
+		TUint32 sizebackup = size;
+
+		unsigned short int* buff = 0;
+	
+		if (size & 0x01)
+		{
+			throw std::runtime_error("Decoding 8bit text into std::wstring");
+		}
+		else
+		{
+			size = size >> 1;
+			buff = new unsigned short int[(int)size];
+			TUnicodeExpander exp;
+			TMemoryUnicodeSink sink((TUint16*)buff);
+			exp.ExpandL(sink, *this ,size);
+			unsigned short int* source = buff;
+			wchar_t buffer[size];
+			// Using a temp variable in place of buffer as ConvertUTF16toUTF32 modifies the source pointer passed.
+			wchar_t* temp = buffer;
+	
+			ConvertUTF16toUTF32(&source, source + sizebackup, &temp,  temp + size, lenientConversion);
+	
+			// Appending NUL to the converted buffer.
+			*temp = 0;
+			val.assign(buffer, size);
+
+		}
+
+		ConvertToForwardSlash(val);
+
+		delete buff;
+		return *this;
+	}
+
+#else
+
 	Deserialiser& operator>>(std::wstring& val)
 	{
 
@@ -161,6 +207,7 @@
 	delete buff;
 	return *this;
 	}
+#endif
 
 	void read(TUint8* aDst, TUint32 aCount)
 	{
--- a/secureswitools/swisistools/source/interpretsislib/errors.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/errors.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -88,7 +88,7 @@
         }
 
 	inline InterpretSisError( const std::wstring& aError, ErrorCodes aCode )
-        : std::runtime_error( Ucs2ToUtf8(aError) ), iCode( aCode )
+        : std::runtime_error( wstring2string(aError) ), iCode( aCode )
         {
         }
 
--- a/secureswitools/swisistools/source/interpretsislib/expressionevaluator.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/expressionevaluator.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -32,7 +32,6 @@
 #include "sisregistryobject.h"
 #include "logger.h"
 #include "version.h"
-#include "is_utils.h"
 
 // ExpressionResult
 using namespace Utils;
@@ -108,9 +107,9 @@
 	    {
 		iExpressionDepth=0;
 		std::string error = "SIS File expression too complex\n";
-		std::string x;
+		std::string x = wstring2string(iExpEnv.GetPackageName());
         //
-		throw InvalidSis(Ucs2ToUtf8(iExpEnv.GetPackageName(),x), error, SIS_NOT_SUPPORTED);
+		throw InvalidSis(x, error, SIS_NOT_SUPPORTED);
 	    }
 
 	switch (aExpression.Operator())
@@ -248,9 +247,9 @@
 		{
 		iExpressionDepth=0;
 		std::string error = "SIS File contains user options\n";
-		std::string x;
+		std::string x = wstring2string(iExpEnv.GetPackageName());
         //
-		throw InvalidSis(Ucs2ToUtf8(iExpEnv.GetPackageName(),x), error, SIS_NOT_SUPPORTED);
+		throw InvalidSis(x, error, SIS_NOT_SUPPORTED);
 		}
 
 	case CSISExpression::EPrimTypeNumber:
@@ -261,9 +260,9 @@
 		{
 		iExpressionDepth=0;
 		std::string error = "SIS File contains unknown expression\n";
-		std::string x;
+		std::string x = wstring2string(iExpEnv.GetPackageName());
         //
-		throw InvalidSis(Ucs2ToUtf8(iExpEnv.GetPackageName(),x), error, SIS_NOT_SUPPORTED);
+		throw InvalidSis(x, error, SIS_NOT_SUPPORTED);
 		}
     	}
 
@@ -316,8 +315,7 @@
         }
 
     // Require for invalid file exception (also helps with debugging)
-    std::string narrowFileName;
-    narrowFileName = Ucs2ToUtf8( fileName, narrowFileName );
+	    std::string narrowFileName = wstring2string( fileName );
 
     // Now continue with file, assuming we've fixed up the path or then
     // have enough characters to process
@@ -345,8 +343,7 @@
             ConvertToLocalPath( fileName, iCDrive );
 
             // For debugging
-            narrowFileName = Ucs2ToUtf8( fileName, narrowFileName );
-
+			narrowFileName = wstring2string( fileName );
             fileExists = FileExists( fileName );
             break;
             }
@@ -363,7 +360,7 @@
 		std::ostringstream stream;
 		stream << "\tIF EXISTS(\'" << narrowFileName << "\') => " << fileExists;
 		std::string msg = stream.str();
-		std::wstring finalMessage = Utf8ToUcs2( msg );
+    std::wstring finalMessage = string2wstring( msg );
 		LINFO( finalMessage );
 		}
     //
@@ -428,7 +425,7 @@
 					std::ostringstream stream;
 					stream << "Input language " << result << " is not supported by SIS file. Using first language " <<firstLanguage;
 					std::string msg = stream.str();
-					std::wstring finalMessage = Utf8ToUcs2( msg );
+				std::wstring finalMessage = string2wstring( msg );
 					LWARN( finalMessage );	
 					}
 				result = firstLanguage;
@@ -439,7 +436,7 @@
 			std::ostringstream stream;
 			stream << "\tIF " << attributeName << " ... where [" << attributeName << " = " << result << "]";
 			std::string msg = stream.str();
-			std::wstring finalMessage = Utf8ToUcs2( msg );
+        std::wstring finalMessage = string2wstring( msg );
 			LINFO( finalMessage );
 			}
         }
@@ -453,8 +450,7 @@
     	}
     else
         {
-        std::string packageName;
-        packageName = Ucs2ToUtf8( GetPackageName(), packageName );
+        std::string packageName = wstring2string( GetPackageName() );
         //
 		std::string error = "SIS File contains HAL attributes\n";
 		throw InvalidSis( packageName, error, SIS_NOT_SUPPORTED );
--- a/secureswitools/swisistools/source/interpretsislib/installablefile.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/installablefile.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -44,12 +44,17 @@
   iTargetFile(aFdes.Target().GetString()),
   iLocalTargetFile(aFdes.Target().GetString())
 {
+	// Transforming the file path into lower case to maintain consistency
+	// between Windows and Linux as Linux path is case-sensitive.
+	std::transform(iTargetFile.begin(), iTargetFile.end(), iTargetFile.begin(), tolower);
+	std::transform(iLocalTargetFile.begin(), iLocalTargetFile.end(), iLocalTargetFile.begin(), tolower);
+
 	// Update the installing file with the actual target drive letter
 	ChangeTargetDrive(aDrivePath, aInstallingDrive);
 
 	// warn the user if they are using a winscw emulator binary
 	if (aFdata->IsEmulatorExecutable())
-			LWARN(iTargetFile << L" is an emulator binary!");
+			LWARN(iTargetFile.c_str() << L" is an emulator binary!");
 }
 
 // PA SIS files		
@@ -64,6 +69,11 @@
   iTargetFile(aFdes.Target().GetString()),
   iLocalTargetFile(aFdes.Target().GetString())
   {
+	// Transforming the file path into lower case to maintain consistency
+	// between Windows and Linux as Linux path is case-sensitive.
+	std::transform(iTargetFile.begin(), iTargetFile.end(), iTargetFile.begin(), tolower);
+	std::transform(iLocalTargetFile.begin(), iLocalTargetFile.end(), iLocalTargetFile.begin(), tolower);
+
 	// Update the installing file with the actual target drive letter
 	ChangeTargetDrive(aDrivePath, aInstallingDrive);
 
@@ -86,7 +96,7 @@
 				iSid = info.iSecureId;
 				
 				if(fileType & EFileEmulatorExe)
-					LWARN(iTargetFile << L" is an emulator binary!");
+					LWARN(iTargetFile.c_str() << L" is an emulator binary!");
 				}
 			else if (fileType & EFileDll)
 				{
@@ -111,6 +121,9 @@
 {
 	// get the local path
 	ConvertToLocalPath(iLocalTargetFile,aDrivePath);
+#ifdef __TOOLS2_LINUX__
+	ConvertToForwardSlash(iTargetFile);
+#endif
 
 	// change the drive letter
 	if (StringUtils::StartsWithDrive(iTargetFile))
--- a/secureswitools/swisistools/source/interpretsislib/installer.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/installer.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -57,7 +57,11 @@
 // Constants
 const char KRomDriveLetter = 'z';
 const TUint32 KSwiDaemonUid = 0x10202DCE;
+#ifndef __TOOLS2_LINUX__
 const std::wstring KSysBinPath = L"\\sys\\bin\\";
+#else
+const std::wstring KSysBinPath = L"/sys/bin/";
+#endif
 
 TInt CheckWildCard(TInt aVal, TInt aReplace)
 {
@@ -114,7 +118,11 @@
 
 		// Ensure formatting is correct
 		if ( StringUtils::IsLastCharacter( shortName, KDirectorySeparator[ 0 ] ) ||
+			 #ifndef __TOOLS2_LINUX__
              StringUtils::IsLastCharacter( shortName, L'/' ) )
+             #else
+			 StringUtils::IsLastCharacter( shortName, L'\\' ) )
+			 #endif
 		{
 			shortName.erase(shortName.length()-1,1);
 		}
@@ -201,7 +209,7 @@
 			catch  (InterpretSisError& e)
 				{
 				LERROR(L"Failed installing " << (curr->iFileName));
-				LERROR(L"\t" << Utf8ToUcs2(e.what()));
+				LERROR(L"\t" << string2wstring(e.what()));
 				curr = sisFiles.erase(curr);
 				
 				if (result == 0)
@@ -362,7 +370,7 @@
 	{
 		RestoreAll(file, installable, iBackupFlag);
 
-		LERROR(L"\t" << Utf8ToUcs2(e.what()));
+		LERROR(L"\t" << string2wstring(e.what()));
 		int result =  e.GetErrorCode();
 		return result;
 	
@@ -498,7 +506,7 @@
 	if (installType == CSISInfo::EInstAugmentation)
 	{
 		// Clean up the installed files from the specified SP package and the SisRegistry Entry
-		iRegistry.RemoveEntry(uid, aSis.GetPackageName(), aSis.GetVendorName());
+		iRegistry.RemoveEntry(uid, aSis.GetPackageName().c_str(), aSis.GetVendorName().c_str());
 	}
 
 	// Regenerate the ROM stub registry entries for eclipsing check later.
@@ -530,7 +538,7 @@
 			BackupDb.append("_backup");
 
 		 	err=FileCopyA(DbPath.c_str(),BackupDb.c_str(),0);
-			if (err == 0)
+			if (err != 0)
 				LERROR(L"Failed to Backup Database scr.db ");
 		}
 
@@ -543,9 +551,19 @@
 			if (FileExists(itargetLocalFile))
 			{
 				std::wstring itargetBackupFile = (*filedesIter)->GetLocalTarget();
-				itargetBackupFile.append(L"_backup");
+				std::wstring temp = itargetBackupFile.c_str();
+				temp.append(L"_backup");
+				itargetBackupFile = temp;
+
+
 				int pos =0;
-				if((pos = itargetBackupFile.find(L"\\sys\\bin\\", 0)) != std::wstring::npos)
+				#ifdef __LINUX__
+				std::wstring sysBin = L"/sys/bin/";
+				#else
+				std::wstring sysBin = L"\\sys\\bin\\";
+				#endif
+
+				if((pos = itargetBackupFile.find(sysBin, 0)) != std::wstring::npos)
 				{
 					BackupHashForFile(itargetLocalFile, iParamList.SystemDriveLetter(), iParamList.SystemDrivePath());
 				}
@@ -554,7 +572,7 @@
 				std::string iBackupFile = wstring2string(itargetBackupFile);
 
 				err=FileCopyA(iLocalFile.c_str(),iBackupFile.c_str(),0);
-				if (err == 0)
+				if (err != 0)
 					LERROR(L"Failed to Backup installable file ");
 			}
 		}
@@ -592,7 +610,9 @@
 		{
 		    itargetLocalFile = (*filedesIter)->GetLocalTarget();
 			itargetBackupFile = (*filedesIter)->GetLocalTarget();
-			itargetBackupFile.append(L"_backup");
+			std::wstring temp = itargetBackupFile.c_str();
+			temp.append(L"_backup");
+			itargetBackupFile = temp;
 			
 			if (FileExists(itargetBackupFile))
 			{
@@ -627,7 +647,13 @@
 			if (FileExists(itargetBackupFile))
 			{
 				int pos =0;
-				if((pos = itargetBackupFile.find(L"\\sys\\bin\\", 0)) != std::wstring::npos)
+				#ifdef __LINUX__
+				std::wstring sysBin = L"/sys/bin/";
+				#else
+				std::wstring sysBin = L"\\sys\\bin\\";
+				#endif
+
+				if((pos = itargetBackupFile.find(sysBin, 0)) != std::wstring::npos)
 				{
 					RestoreHashForFile(itargetLocalFile, iParamList.SystemDriveLetter(), iParamList.SystemDrivePath());
 				}
@@ -636,8 +662,7 @@
 				std::string iBackupFile = wstring2string(itargetBackupFile);
 				
 				int err = FileMoveA(iBackupFile.c_str(),iLocalFile.c_str());
-
-				if (err == 0)
+				if (err != 0)
 					LERROR(L"Failed to Restore file ");
 			}
 		}
@@ -923,8 +948,8 @@
         else
             {
 			// Unicode characters can not be displayed on DOS prompt
- 			std::string temporary = Ucs2ToUtf8(target);
-			std::wstring targetDisplay = Utf8ToUcs2( temporary );
+ 			std::string temporary = wstring2string(target);
+			std::wstring targetDisplay = string2wstring( temporary );
 		    LINFO(L"Installing file: " << targetDisplay);
 
             std::wstring targetDirectory = localTarget.substr( 0, localTarget.rfind( KDirectorySeparator ) );    		
@@ -975,8 +1000,15 @@
 			{
 				// register the hash
 				std::wstring basename = localTarget.substr( localTarget.rfind( KDirectorySeparator ) + 1 );
-				std::wstring hashdir = iSystemDrivePath + L"\\sys\\hash\\";
+				#ifndef __TOOLS2_LINUX__
+				// Remove the null character at the end and.
+				std::wstring tempStr = iSystemDrivePath.c_str();
+				std::wstring hashdir =  tempStr + L"\\sys\\hash\\";				
 				std::wstring reghashdir = L"$:\\sys\\hash\\";
+				#else
+				std::wstring hashdir = iSystemDrivePath + L"/sys/hash/";
+				std::wstring reghashdir = L"$:/sys/hash/";
+				#endif
 
 				if ( !MakeDir( hashdir ) )
 				{
@@ -987,8 +1019,7 @@
 				// hash file is always created on the system drive
 				reghashdir[0] = iSystemDrive;
 
-				LINFO(L"\tCreating hash: " << reghashdir << basename);
-
+				LINFO(L"\tCreating hash: " << reghashdir << basename);				
 				std::wstring hash = hashdir + basename;
 				HANDLE hFile = MakeSISOpenFile(hash.c_str(), GENERIC_WRITE, CREATE_ALWAYS);		
 				if( INVALID_HANDLE_VALUE == hFile )
@@ -1062,7 +1093,11 @@
 	// find all adorned variants in the ROM/ROFS logs
 	if (iParamList.IsFlagSet(CParameterList::EFlagsRomRofsLogFilesSet))
 	{
+	#ifndef __TOOLS2_LINUX__
 		std::wstring romSearchNameWild = L"z:\\sys\\bin\\";
+	#else
+		std::wstring romSearchNameWild = L"z:/sys/bin/";
+	#endif
 		romSearchNameWild.append(searchNameWild);
 		iRomManager.FindAllAdornedVariants(romSearchNameWild, aAdornedFileNamesFound);
 	}
@@ -1175,7 +1210,11 @@
 		{
 			// we are eclipsing a ROM file, check if this is authorised:
 			// see implementation of IsEclipsable()
+			#ifndef __TOOLS2_LINUX__
 			if (!IsEclipsable(searchNameUnadorned, aSUFlag))
+			#else
+			if (!IsEclipsable(searchNameUnadorned, aSUFlag, localDir))
+			#endif
 			{
 				result = false;
 				break;
@@ -1190,7 +1229,7 @@
 		// this drive should be added to iEclipsableOverwriteFiles.
 		if (processEclipsingSuspectsFoundOnThisDrive && unadornedFound)
 		{
-			iEclipsableOverwriteFiles.push_back(searchNameUnadorned);
+			iEclipsableOverwriteFiles.push_back(searchNameUnadorned.c_str());
 		}
 
 		if (processEclipsingSuspectsFoundOnThisDrive && adornedFound)
@@ -1206,7 +1245,7 @@
 				int drive = tolower(adornedFile[0]);
 				if (drive == disk)
 				{
-					iEclipsableOverwriteFiles.push_back(adornedFile);
+					iEclipsableOverwriteFiles.push_back(adornedFile.c_str());
 				}
 			}
 		}
@@ -1279,7 +1318,11 @@
  @param aRomFile fully qualified filename in ROM that is to be checked for eclipising (i.e: z:\sys\bin\some.dll)
  @param aSUFlag specifies if the installing SIS file has been signed by a SU certificate
 */
+#ifndef __TOOLS2_LINUX__
 bool Installer::IsEclipsable(std::wstring& aRomFile, bool aSUFlag)
+#else
+bool Installer::IsEclipsable(std::wstring& aRomFile, bool aSUFlag, const std::wstring& aDrivePath)
+#endif
 {
 	// SA/SP/PU sis + RU flag + signed by SU root cert is allowed
 	if (aSUFlag)
@@ -1303,7 +1346,11 @@
 		}
 		else if (goesToSysBin) // case 2
 		{
+			#ifndef __TOOLS2_LINUX__
 			if (IsAdornedVariationOf(eclipsableRomFile,aRomFile))
+			#else
+			if (IsAdornedVariationOf(eclipsableRomFile,aRomFile,aDrivePath))
+			#endif
 			{
 				isEclipsable = true;
 				break;
@@ -1337,8 +1384,8 @@
 		// do not display a warning if the installing file is a PA. The user
 		// needs to copy the installing files to the installing directory
 		// prior to installing the SIS file.
-		std::string tempTarget = Ucs2ToUtf8(aTarget);
-  	  	std::wstring targetDisplay = Utf8ToUcs2( tempTarget );
+		std::string tempTarget = wstring2string(aTarget);
+  	  	std::wstring targetDisplay = string2wstring( tempTarget );
 		if (aFile.GetInstallType() == CSISInfo::EInstPreInstalledApp)
 		{
 			LINFO(targetDisplay << L" found for PA installation");
@@ -1354,7 +1401,7 @@
 		if (isSp)
 		{
 			std::wostringstream os;
-			os << aTarget << L" overwrites file from base package 0x" << std::hex << owningUid << L" \"" << owningObj->GetPackageName() << L"\"" << std::endl;
+			os << aTarget.c_str() << L" overwrites file from base package 0x" << std::hex << owningUid << L" \"" << owningObj->GetPackageName() << L"\"" << std::endl;
 			iProblemFiles.append(os.str());
 			iError = ECLIPSING_VIOLATION;
 		}
@@ -1367,13 +1414,13 @@
 		if (isSp || (!aSUFlag && (isPu || isSa)))
 		{
 			std::wostringstream os;
-			os << aTarget << L" overwrites file from base package 0x" << std::hex << owningUid << L" \"" << owningObj->GetPackageName() << L"\"" << std::endl;
+			os << aTarget.c_str() << L" overwrites file from base package 0x" << std::hex << owningUid << L" \"" << owningObj->GetPackageName() << L"\"" << std::endl;
 			iProblemFiles.append(os.str());
 			iError = ECLIPSING_VIOLATION;
 		}
 		else
 		{
-			LWARN(aTarget << L" overwrites file from base package 0x" << std::hex << owningUid << L" \"" << owningObj->GetPackageName() << L"\"");
+		    LWARN(aTarget.c_str() << L" overwrites file from base package 0x" << std::hex << owningUid << L" \"" << owningObj->GetPackageName() << L"\"");
 		}
 	}
 }
@@ -1393,19 +1440,19 @@
 			std::wstring eclipseFile(*curr);
 
 			TUint32 owningUid = 0;
-			const SisRegistryObject* owningObj = iRegistry.OwningPackage(eclipseFile, owningUid);
+			const SisRegistryObject* owningObj = iRegistry.OwningPackage(eclipseFile.c_str(), owningUid);
 			
 			// always allow orphaned file overwriting
 			if (owningUid == 0)
 			{
-				LWARN(eclipseFile << L" eclipses orphaned file.");
+			    LWARN(eclipseFile.c_str() << L" eclipses orphaned file.");
 			}
 			else
 			{
 				// SP/PU can not overwrite a file belonging to a different base pkg or
 				// SP/PU can not eclipse a base package which is not in the ROM.
 				std::wostringstream os;
-				os << eclipseFile << L" eclipses file from package 0x" << std::hex << owningUid << L" \"" << owningObj->GetPackageName() << L"\"" << std::endl;
+				os << eclipseFile.c_str() << L" eclipses file from package 0x"  << std::hex << owningUid << L" \"" << owningObj->GetPackageName().c_str() << L"\""<< std::endl;
 				iProblemFiles.append(os.str());
 				iError = ECLIPSING_VIOLATION;
 				continue;
@@ -1427,10 +1474,17 @@
 	Sids sids;
 	GetSidsFromInstallable(aFiles, sids);
 
+	#ifndef __TOOLS2_LINUX__
 	const std::wstring privatePath = L":\\private\\";
 	const std::wstring sysPath = L":\\sys\\";
 	const std::wstring sysBinPath = L":\\sys\\bin\\";
 	const std::wstring resourcePath = L":\\resource\\";
+	#else
+	const std::wstring privatePath = L":/private/";
+	const std::wstring sysPath = L":/sys/";
+	const std::wstring sysBinPath = L":/sys/bin/";
+	const std::wstring resourcePath = L":/resource/";
+	#endif
 	const std::wstring exeType = L".exe";
 
     int num_of_files = aFiles.size();
@@ -1457,7 +1511,7 @@
         const CSISFileDescription* sisDescription = file->FileDescription();
 
 		// file to be installed
-		std::wstring target( file->GetTarget() );
+		std::wstring target( file->GetTarget().c_str() );
 
 		if (sisDescription->Operation() == CSISFileDescription::EOpText)
 			break;
@@ -1468,7 +1522,7 @@
 				{
 				// eclipsing problem
 				std::wostringstream os;
-				os << L"FN file \"" << target << L"\" can not remove a file from \\sys or \\resource" << std::endl;
+				os << L"FN file \"" << target.c_str() << L"\" can not remove a file from \\sys or \\resource" << std::endl;
 				iProblemFiles.append(os.str());
 				iError = DATA_CAGE_VIOLATION;
 				continue;
@@ -1476,7 +1530,7 @@
 			}
         else 
             {
-			std::wstring realTarget(file->GetLocalTarget());
+			std::wstring realTarget(file->GetLocalTarget().c_str());
 
 		    std::wstring romTarget(target);
 			romTarget[0] = KRomDriveLetter;
@@ -1488,8 +1542,9 @@
 				{
 					// eclipsing problem
 					std::wostringstream os;
-					os << target << L" eclipses file from ROM" << std::endl;
+					os << target.c_str() << L" eclipses file from ROM" << std::endl;
 					iProblemFiles.append(os.str());
+
 					iError = ECLIPSING_VIOLATION;
 					continue;
 				}
@@ -1540,14 +1595,17 @@
 
 						const int KUidStringLength = 8;
 						std::wstring importPath = privatePath;
-
+						#ifndef __TOOLS2_LINUX__
 						importPath.append( uidStr.str() + L"\\import" );
+						#else
+						importPath.append( uidStr.str() + L"/import" );
+						#endif
 
 						if ((target.find(importPath,0) == std::wstring::npos) && !suFlag)
 						{
 							// only SA with RU + SU and PU with RU + SU flag can override other private directory
 							std::wostringstream os;
-							os << target << L" cannot be written to a private directory which "
+							os << target.c_str() << L" cannot be written to a private directory which "
 								<< L"does not belong to any exe in this package" << std::endl;
 							iProblemFiles.append(os.str());
 							iError = DATA_CAGE_VIOLATION;
@@ -1617,8 +1675,8 @@
 					{
 						std::wostringstream os;
 										
-						os << L"The existing file " << owningSidFile << L" already has the SID 0x" << std::hex << sid
-						   << std::dec << L", cannot install " << target << std::endl;
+						os << L"The existing file " << owningSidFile.c_str() << L" already has the SID 0x" << std::hex << sid
+						   << std::dec << L", cannot install " << target.c_str() << std::endl;
 						iProblemFiles.append(os.str());
 						iError = DUPLICATE_SID;
 						continue;
@@ -1642,7 +1700,7 @@
 							{
 								const CSISFileDescription* fD = *iter;
 
-								std::wstring romStubTarget(fD->Target().GetString());
+								std::wstring romStubTarget(fD->Target().GetString().c_str());
 
 								if (StringUtils::WildcardCompare(romStubTarget,romFileWithDuplicateSid))
 								{
@@ -1663,7 +1721,7 @@
 						std::wostringstream os;
 											
 						os << L"A ROM file already has the SID 0x" << std::hex << file->Sid()
-						   << std::dec << L", cannot install " << target << std::endl;
+						   << std::dec << L", cannot install " << target.c_str() << std::endl;
 						iProblemFiles.append(os.str());
 						iError = DUPLICATE_SID;
 						continue;
@@ -1673,7 +1731,7 @@
 		    else if (realTarget.find(sysBinPath) != std::wstring::npos)
 		    {
 				std::wostringstream os;
-				os << target << L" cannot be installed to a data caged area" << std::endl;
+				os << target.c_str() << L" cannot be installed to a data caged area" << std::endl;
 				iProblemFiles.append(os.str());
 				iError = DATA_CAGE_VIOLATION;
 				continue;
@@ -1689,8 +1747,8 @@
 
 	if (!iProblemFiles.empty())
 	{
-		std::string x;
-		throw InvalidSis("", Ucs2ToUtf8(iProblemFiles,x), iError);
+		std::string x = wstring2string(iProblemFiles);
+		throw InvalidSis("", x, iError);
 	}
 }
 
@@ -1728,8 +1786,11 @@
 {
 	int targetDrive = aInstallSISFile.iTargetDrive;
 	std::wstring drivePath = iConfigManager.GetLocalDrivePath(targetDrive);
-	
+	#ifndef __TOOLS2_LINUX__
 	drivePath.append(L"\\private\\");
+	#else
+	drivePath.append(L"/private/");
+	#endif
 
 	// build SwiDaemon Pathname
 	std::wstring ctrl = StringUtils::MakePathFromSID(drivePath, KSwiDaemonUid);
@@ -1744,7 +1805,6 @@
 
 	ctrl.append(s.str());
 
-
 	switch(aSis.GetInstallType())
     {
 	case CSISInfo::EInstInstallation:
--- a/secureswitools/swisistools/source/interpretsislib/installer.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/installer.h	Thu Jul 08 20:28:00 2010 +0300
@@ -116,7 +116,11 @@
 	bool IsValidEclipsingUpgrade(const SisFile& aSis, const SisRegistryObject& registryEntry);
 	bool ValidEclipse(const SisFile& aFile, const std::wstring& target, const InstallableFile& aInstallableFile, bool aSUFlag);
 	void HandleFileOverwriting(const SisFile& aFile, const std::wstring& target, bool aSUFlag);
+	#ifndef __TOOLS2_LINUX__
 	bool IsEclipsable(std::wstring& aRomFile, bool aSUFlag);
+	#else
+	bool IsEclipsable(std::wstring& aRomFile, bool aSUFlag, const std::wstring& aDrivePath);
+	#endif
 	void FilterNonBlockingFilesOfFilename(const SisFile& aFile, const std::wstring& target);
 	void WarnEclipseOverWrite(const SisFile& aFile);
 
--- a/secureswitools/swisistools/source/interpretsislib/is_utils.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/is_utils.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -75,20 +75,71 @@
 }
 
 
+void ConvertToPlatformSpecificPath( TUint16* aIn, TUint32 len )
+{
+    while( len-- > 0 )
+    {
+	#ifdef __TOOLS2_LINUX__
+    	if( *aIn == '\\' )
+    	{
+    		*aIn = '/';
+    	}
+	#else
+    	if( *aIn == '/' )
+    	{
+    		*aIn = '\\';
+    	}
+	#endif
+		
+    	aIn++;
+    }
+}
+
+#ifdef __TOOLS2_LINUX__
+void ConvertToForwardSlash( std::wstring& aIn)
+{
+	std::wstring::size_type idx = 0;
+	
+	while( (idx = aIn.find(L"\\", idx)) != std::wstring::npos)
+		{
+		aIn.replace( idx, 1, KDirectorySeparator );
+		}
+}
+#endif
+
+
 void ConvertToLocalPath( std::wstring& aIn, const std::wstring& aDrivePath )
 {
 	std::wstring::size_type idx = 0;
-	while( (idx = aIn.find(L"\\\\", idx)) != std::wstring::npos)
+
+	#ifndef __TOOLS2_LINUX__
+	while( (idx = aIn.find(L"//", idx)) != std::wstring::npos)
         {
-		aIn.replace( idx, 4, KDirectorySeparator );
+		aIn.replace( idx, 2, KDoubleSlashPathPrefix );
         }
-	//
+
     idx = 0;
+
 	while( (idx = aIn.find(L"/", idx)) != std::wstring::npos)
         {
 		aIn.replace( idx, 1, KDirectorySeparator );
         }
-    
+    #else
+
+	idx = 0;
+
+	while( (idx = aIn.find(L"\\\\", idx)) != std::wstring::npos)
+        {
+		aIn.replace( idx, 2, KDoubleSlashPathPrefix );
+        }
+
+	idx = 0;
+
+	while( (idx = aIn.find(L"\\", idx)) != std::wstring::npos)
+        {
+		aIn.replace( idx, 1, KDirectorySeparator );
+        }
+	#endif
     // If the first two characters represent a drive specification
     // then replace them entirely with the value from the 
     // PC's path ('aDrivePath').
@@ -98,15 +149,14 @@
     const bool startsWithDrive = StringUtils::StartsWithDrive( aIn );
     if ( startsWithDrive )
     {
-	    aIn.replace(aIn.begin(), aIn.begin()+2, aDrivePath);
+	    aIn.replace(aIn.begin(), aIn.begin()+2, aDrivePath.c_str());
     }
     else
     {
-        aIn.insert( 0, aDrivePath );
+        aIn.insert( 0, aDrivePath.c_str() );
     }
 }
 
-
 struct TPair {
 	TUint16 first; 
 	TUint16 second;
@@ -1008,10 +1058,22 @@
 }
 int FoldedCompare(const std::wstring& aLeft, const std::wstring& aRight)
 {
-	std::wstring::const_iterator l  = aLeft.begin();
-	std::wstring::const_iterator r  = aRight.begin();
-	std::wstring::const_iterator le = aLeft.end();
-	std::wstring::const_iterator re = aRight.end();
+	std::wstring iLeft=aLeft.c_str();
+	std::wstring iRight=aRight.c_str();
+
+#ifdef __TOOLS2_LINUX__
+	std::wstring::size_type idx = 0;
+
+	while( (idx = iLeft.find(L"\\", idx)) != std::wstring::npos)
+        {
+		iLeft.replace( idx, 1, KDirectorySeparator );
+        }
+#endif
+
+	std::wstring::const_iterator l  = iLeft.begin();
+	std::wstring::const_iterator r  = iRight.begin();
+	std::wstring::const_iterator le = iLeft.end();
+	std::wstring::const_iterator re = iRight.end();
 
 	while (l != le && r != re)
 	{
@@ -1025,7 +1087,7 @@
 		++r;
 	}
 
-	return aLeft.size() - aRight.size();
+	return iLeft.size() - iRight.size();
 }
 
 int ReadSecurityInfo( SBinarySecurityInfo& aInfo, const std::wstring aFileName )
@@ -1045,7 +1107,12 @@
         throw "Failed in redirection operation";
 	}
 
+#ifndef __LINUX__
     nulStdErr = fopen("NUL:" , "w");
+#else
+    nulStdErr = fopen("/dev/null", "w");
+#endif
+
     if  (!nulStdErr)
 	{
         throw "Failed in redirection operation";
@@ -1087,3 +1154,25 @@
 		} // end for i
 	}
 
+const std::wstring Utils::IntegerToWideString(int aInt)
+	{
+	std::wstringstream wstream;
+	wstream << aInt;
+	return wstream.str();
+	}
+
+std::wstring Utils::Int64ToWideString(TInt64 aInt)
+	{
+	std::wstringstream strInt64;
+	strInt64 << aInt;
+	return strInt64.str();
+	}
+
+int Utils::WideStringToInteger(const std::wstring& aWideString)
+	{
+	unsigned long int value=0;
+	std::wstringstream str(aWideString);
+	str >> value;
+	return value;
+	}
+
--- a/secureswitools/swisistools/source/interpretsislib/is_utils.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/is_utils.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -75,6 +75,10 @@
 
 	int GetStat(const std::wstring& aFile, struct stat*);
 
+	void ConvertToPlatformSpecificPath( TUint16* aIn, TUint32 len );
+	#ifdef __TOOLS2_LINUX__
+	void ConvertToForwardSlash( std::wstring& aIn);
+	#endif
 	void ConvertToLocalPath(
 		std::wstring& aIn,
 		const std::wstring& aDrivePath);
@@ -140,9 +144,6 @@
 			dp38,  dp39,  dp40,  dp41,  dp42,  dp43,  dp44,  dp45};
 	 
 	void GetEquivalentLanguageList(CSISLanguage::TLanguage aLang, TLanguagePath& aEquivalents); 
-	std::string wstring2string (const std::wstring& aWide);
-
-	std::wstring string2wstring (const std::string& aNarrow);
 
 	const std::wstring IntegerToWideString(int aInt);
 
--- a/secureswitools/swisistools/source/interpretsislib/rommanager.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/rommanager.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -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 the License "Eclipse Public License v1.0"
@@ -29,8 +29,13 @@
 #include "is_utils.h"
 
 // String constants
+#ifndef __TOOLS2_LINUX__
 const std::wstring KRomManagerSysBinPath 			= L"z:\\sys\\bin\\";
 const std::string KRomManagerRomDrive               = "Z:\\";
+#else
+const std::wstring KRomManagerSysBinPath 			= L"z:/sys/bin/";
+const std::string KRomManagerRomDrive               = "Z:/";
+#endif
 const std::string KRomManagerRomLogProcessingFile   = "Processing file ";
 const std::string KRomManagerRomLogReadingResource  = "Reading resource ";
 const std::string KRomManagerRomLogReadingResource2 = " to rom linear address";
@@ -146,7 +151,7 @@
     {
     for( std::list<std::wstring>::const_iterator it = aLogFileNames.begin() ; it != aLogFileNames.end(); it++ )
         {
-    	std::string narrowLogFileName = Ucs2ToUtf8( *it );
+    	std::string narrowLogFileName = wstring2string( *it );
     	std::string narrowUpperCaseLogFileName = StringUtils::ToUpper( narrowLogFileName );
 
         // Get the base name
@@ -188,7 +193,7 @@
 
     // Get filename & convert it to uppercase, since our map key is
     // also in upper case form.
-    std::string narrowFileName = Ucs2ToUtf8( aFileName );
+    std::string narrowFileName = wstring2string( aFileName );
     narrowFileName = StringUtils::ToUpper( narrowFileName );
 
     // Do we have a corresponding entry?
@@ -210,7 +215,7 @@
 
 	for ( ; curr != end ; ++curr)
 		{
-		std::wstring romFile = Utf8ToUcs2(curr->first);
+		std::wstring romFile = string2wstring(curr->first);
 		if (StringUtils::WildcardCompare(searchNameWild,romFile))
 			{
 			aAdornedFileNamesFound.push_back(romFile);
@@ -233,7 +238,7 @@
 				TUint32 romSid = romEntry->SecurityInfo().iSecureId;
 				if (romSid != 0 && romSid == aSid)
 					{
-					aFile = Utf8ToUcs2(romEntry->RomFileName());
+					aFile = string2wstring(romEntry->RomFileName());
 					return true;
 					}
 				}
@@ -248,7 +253,7 @@
 
     // Get filename & convert it to uppercase, since our map key is
     // also in upper case form.
-    std::string narrowFileName = Ucs2ToUtf8( aFileName );
+    std::string narrowFileName = wstring2string( aFileName );
     narrowFileName = StringUtils::ToUpper( narrowFileName );
 
     // Do we have a corresponding entry?
@@ -269,7 +274,7 @@
 
 void RomManagerLogFiles::ReadObyFile( const std::string& aFileName )
     {
-	std::wstring fileName = Utf8ToUcs2( aFileName );
+	std::wstring fileName = string2wstring( aFileName );
     if ( FileExists( fileName ) )
         {
     	std::ifstream stream;
@@ -570,7 +575,7 @@
 	}
     //
     stream << std::endl;
-    std::wstring finalMessage = Utf8ToUcs2( stream.str() );
+    std::wstring finalMessage = string2wstring( stream.str() );
     //
 	LERROR( finalMessage );
     }
--- a/secureswitools/swisistools/source/interpretsislib/serialiser.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/serialiser.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -26,6 +26,7 @@
 #include "serialisable.h"
 #include "ucmp.h"
 #include "cardinality.h"
+#include "utf8_wrapper.h"
 
 /**
 * @file SERIALISER.H
@@ -81,15 +82,49 @@
 
 	Serialiser& operator<<(std::wstring& val)
 	{
+
+	std::wstring tempval = val.c_str();
+	
+#ifdef __TOOLS2_LINUX__
+	std::wstring::size_type idx = 0;
+	while( (idx = tempval.find(L"/", idx)) != std::wstring::npos)
+        {
+		tempval.replace( idx, 1, L"\\" );
+        }
+#endif
+
 	Cardinality card;
-	TUint32 size = val.size() << 1;
+	TUint32 size = tempval.size() << 1;
+
+#ifdef __TOOLS2_LINUX__
+	const wchar_t * source = tempval.c_str();
+	unsigned short int* buffer = new unsigned short int[size];
+
+	// Using a temp variable in place of buffer as ConvertUTF32toUTF16 modifies the source pointer passed.
+	unsigned short int* temp = buffer;
+
+	ConvertUTF32toUTF16(&source, tempval.c_str() + tempval.size(), &temp,  temp + size, lenientConversion);
+
+	// Appending NULL to the converted buffer.
+	*temp = NULL;
+#endif
+	
 	card.SetSize(size);
 	*this << card;
 
 	TUnicodeCompressor comp;
-	TMemoryUnicodeSource src((TUint16*)val.c_str());
+
+#ifdef __TOOLS2_LINUX__
+	TMemoryUnicodeSource src((TUint16*)buffer);
+#else
+	TMemoryUnicodeSource src((TUint16*)tempval.c_str());
+#endif
+
 	//The compressed unicode output could end up larger than the input, thus restricting the output to KMaxTInt.
-	comp.CompressL(*this, src, KMaxTInt, val.size());
+	comp.CompressL(*this, src, KMaxTInt, tempval.size());
+#ifdef __TOOLS2_LINUX__
+	delete[] buffer;
+#endif
 	return *this;
 	}
 
--- a/secureswitools/swisistools/source/interpretsislib/sisfile.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/sisfile.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -204,10 +204,10 @@
 
 	if (failed)
 		{
-		std::string x;
-		throw InvalidSis(Ucs2ToUtf8(this->GetPackageName(),x),
-			error, SIS_NOT_SUPPORTED);
+		std::string x = wstring2string(this->GetPackageName());
+		throw InvalidSis(x, error, SIS_NOT_SUPPORTED);
 		}
+
 	}
 
 bool SisFile::ProcessInstallOptionsWarning(const CSISInstallBlock& aInstallBlock, std::string& aError)
@@ -219,7 +219,7 @@
 		{
 		const CSISFileDescription& fD = aInstallBlock.FileDescription(i);
         const CSISFileDescription::TSISFileOperation operation = fD.Operation();
-		std::wstring target(fD.Target().GetString());
+		std::wstring target(fD.Target().GetString().c_str());
         //
         switch( operation )
             {
@@ -263,6 +263,7 @@
             success = true;
             break;
         case CSISFileDescription::EOpNull:
+		case CSISFileDescription::EOpNone:
             success = true;
             break;
         default:
@@ -276,6 +277,7 @@
 			break;
 	    	}
 		}
+		return success;
 	}
 
 
--- a/secureswitools/swisistools/source/interpretsislib/sisregistry.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/sisregistry.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -23,7 +23,6 @@
 #include "dbhelper.h"
 #include "dblayer.h"
 #include "dbconstants.h"
-#include "is_utils.h"
 #include "xmlgenerator.h"
 #include "xmlparser.h"
 #include "util.h"
@@ -53,6 +52,7 @@
 // SisX Library Includes
 #include "sisfiledescription.h"
 #include "sisstring.h"
+#include "utility.h"
 
 // User Includes
 #include "sisregistry.h"
@@ -66,9 +66,15 @@
 #include "configmanager.h"
 
 // Constants
+#ifndef __TOOLS2_LINUX__
 const std::wstring SisRegistry::KPathToRegistry(L"\\sys\\install\\sisregistry/");
 const std::wstring SisRegistry::KPathToRomStubs(L"\\system\\install\\");
 const std::wstring SisRegistry::KPathToRegistryVersionMarker(L"\\system\\data\\");
+#else
+const std::wstring SisRegistry::KPathToRegistry(L"/sys/install/sisregistry/");
+const std::wstring SisRegistry::KPathToRomStubs(L"/system/install/");
+const std::wstring SisRegistry::KPathToRegistryVersionMarker(L"/system/data/");
+#endif
 const std::wstring KRegistryEntry(L"00000000.reg");
 const std::wstring KControllerEntry(L"00000000_0000.ctl");
 const std::wstring KBackupLst(L"backup.lst");
@@ -83,9 +89,13 @@
 const std::wstring SisRegistry::KRegistryV52(L"sisregistry_5.2.txt");
 const std::wstring SisRegistry::KRegistryV53(L"sisregistry_5.3.txt");
 const std::wstring SisRegistry::KRegistryV54(L"sisregistry_5.4.txt");
+#ifndef __TOOLS2_LINUX__
 const std::wstring SisRegistry::KRomStubDir(L"z:\\system\\install\\");
 const std::wstring SisRegistry::KRomRegistryVersionMarker(L"z:\\system\\data\\");
-
+#else
+const std::wstring SisRegistry::KRomStubDir(L"z:/system/install/");
+const std::wstring SisRegistry::KRomRegistryVersionMarker(L"z:/system/data/");
+#endif
 const std::string SisRegistry::KRegistryV40string("4.0");
 const std::string SisRegistry::KRegistryV50string("5.0");
 const std::string SisRegistry::KRegistryV51string("5.1");
@@ -547,9 +557,7 @@
 	
 	while(it != iEntries.end())
 	    {
-		if (aUid == it->first &&
-			aPackageName == it->second->GetPackageName() &&
-			aVendorName == it->second->GetVendorName())
+		if (aUid == it->first && !wcscmp(aPackageName.c_str(), it->second->GetPackageName().c_str()) && aVendorName == it->second->GetVendorName() )
 			{
 			LINFO(L"Removing package \"" << it->second->GetPackageName() 
 					<< L"\" prior to re-installation");
@@ -950,7 +958,11 @@
 	{
 	return (aFileName.find(L'?') != std::wstring::npos || 
 			aFileName.find(L'*') != std::wstring::npos || 
+			#ifndef __TOOLS2_LINUX__
 			aFileName[aFileName.length() - 1] == L'\\');
+			#else
+			aFileName[aFileName.length() - 1] == L'/');
+			#endif
 	}
 
 
@@ -1032,7 +1044,11 @@
 			continue;
 		
 		std::fstream input;
+		#ifndef __TOOLS2_LINUX__
 		std::wstring filename(aPath + L"\\" + *c);
+		#else
+		std::wstring filename(aPath + L"/" + *c);
+		#endif
 		
 		OpenFile(filename.c_str(), input, std::fstream::in | std::fstream::binary);
 		
@@ -1043,7 +1059,7 @@
 					
 		if (!obj)
 			{
-			throw std::runtime_error("Cannot create SisRegistryObject for " + Ucs2ToUtf8(filename));
+			throw std::runtime_error("Cannot create SisRegistryObject for " + wstring2string(filename));
 			}
 		Deserialiser des(input);
 		
@@ -1243,7 +1259,7 @@
 				
 				msg.append(L" does not have any SisRegistry file");
 				
-				throw std::runtime_error( Ucs2ToUtf8(msg) );
+				throw std::runtime_error( wstring2string(msg) );
 				}
 
 			aObj.SetIndex( index );
@@ -1255,7 +1271,7 @@
 				
 				msg.append(L" directory NOT found");
 
-				throw std::runtime_error( Ucs2ToUtf8(msg) );
+				throw std::runtime_error( wstring2string(msg) );
 				}
 			}    
 		}
@@ -1278,7 +1294,7 @@
 				
 				msg.append(L" directory NOT found");
 
-				throw std::runtime_error( Ucs2ToUtf8(msg) );
+				throw std::runtime_error( wstring2string(msg) );
 				}
 			}    
 		}
@@ -1331,7 +1347,7 @@
 		
 			msg.append(L" does not have any Sis Controller file");
 
-			throw std::runtime_error( Ucs2ToUtf8(msg) );
+			throw std::runtime_error( wstring2string(msg) );
 			}
 		}
 
@@ -1450,13 +1466,18 @@
 void SisRegistry::UpdateInstallationInformation(XmlDetails::TScrPreProvisionDetail aScrPreProvisionDetail)
 	{
 	CXmlGenerator xmlGenerator;
-	char* tmpFileName = tmpnam(NULL);
+	char* tmpFileName = tmpnam(NULL);	
 	std::wstring filename(string2wstring(tmpFileName));
 
 	int isRomApplication = 0;
 	xmlGenerator.WritePreProvisionDetails(filename , aScrPreProvisionDetail, isRomApplication);
-						
+
+	#ifdef __LINUX__
+	std::string executable = "scrtool";
+	#else
 	std::string executable = "scrtool.exe";
+	#endif
+
 	std::string command;
 	command = executable + " -d " + GetDbPath() + " -p " + tmpFileName;
 
@@ -1481,16 +1502,23 @@
 		iParamList.IsFlagSet(CParameterList::EFlagsDisableZDriveChecksSet) 
 		)
 		{
+		#ifndef __TOOLS2_LINUX__
 		return wstring2string(iParamList.SystemDrivePath()) + "\\sys\\install\\scr\\scr.db";
+		#else
+		return wstring2string(iParamList.SystemDrivePath()) + "/sys/install/scr/scr.db";
+		#endif
 		}
-
+	#ifndef __TOOLS2_LINUX__
 	return wstring2string(iParamList.RomDrivePath()) + "\\sys\\install\\scr\\provisioned\\scr.db";
+	#else
+	    return wstring2string(iParamList.RomDrivePath()) + "/sys/install/scr/provisioned/scr.db";
+	#endif
 	
 	}
 
 std::string SisRegistry::GetEpocRoot()
 	{
-	const char* epocRoot = getenv("EPOCROOT");
+	const char* epocRoot = getenv("EPOCROOT");	
 	if(NULL == epocRoot)
 		{
 		std::string err = "EPOCROOT environment variable not specified. Please specify it as part of your environment variable." \
@@ -1513,7 +1541,8 @@
 #else		
 		swprintf(textGlobalId,20,L"%08x",aUid);
 #endif
-	
+		
+
 	std::wstring globalId = textGlobalId;
 	
 	if( aInstallType == CSISInfo::EInstAugmentation || aInstallType == CSISInfo::EInstPreInstalledPatch )
@@ -1646,7 +1675,7 @@
 			ibackupfile.append("_backup");
 
 			int err=FileCopyA(ifile.c_str(),ibackupfile.c_str(),0);
-			if (err == 0)
+			if (err != 0)
 				LERROR(L"Failed to Backup .ctl ");
 		}
 		++currFile;
@@ -1676,7 +1705,7 @@
 
 					RemoveFile(path + *currFile);
 				 	int err = FileMoveA(ibackupfile.c_str(),ifile.c_str());
-					if (err == 0)
+					if (err != 0)
 						LERROR(L"Failed to Restore .ctl ");
 				}
 			}
@@ -1914,8 +1943,8 @@
 	// The property is a concatenation of the algorithm id and the hash data
 	const std::string hashData = aHashContainer.GetData();
 		
-	std::string encodedHashData = Util::Base64Encode(hashData);
-	std::wstring wideHashData = Utils::string2wstring(encodedHashData);
+	std::string encodedHashData = Util::Base64Encode(hashData);	
+	std::wstring wideHashData = string2wstring(encodedHashData);
 	AddComponentProperty( aComponent, DbConstants::CompControllerHashData, wideHashData, aCount, true);
 
 	}
@@ -2075,7 +2104,7 @@
 	for(filedesIter = aFileDescription.begin() ; filedesIter != aFileDescription.end(); ++filedesIter)
 	{
 		// if it has wild card characters then donot process. Continue.
-		if( IsFileWideCard((*filedesIter)->GetLocalFile()) ) 
+		if( IsFileWideCard((*filedesIter)->GetLocalFile()) )
 		{
 			continue;
 		}
@@ -2101,7 +2130,13 @@
 			continue;
 
 		std::string folder;
-		found=RegistrationFileName.find("private\\10003a3f\\");
+		#ifdef __LINUX__
+		const char *privateFolder = "private/10003a3f/";
+		#else
+		const char *privateFolder = "private\\10003a3f\\";
+		#endif
+
+		found=RegistrationFileName.find(privateFolder);
 
 		if( found != string::npos ) 
 			folder = RegistrationFileName.substr(0,found); 
@@ -2184,7 +2219,7 @@
 	if(!aFileDescription->GetHash().GetData().empty())
 		{
 		std::string binHashData = Util::Base64Encode(aFileDescription->GetHash().GetData());
-		std::wstring hashData = Utils::string2wstring(binHashData);
+		std::wstring hashData = string2wstring(binHashData);
 		AddFileProperty( aComponentFile, DbConstants::FileHashData, hashData, true);
 		}
 	}
--- a/secureswitools/swisistools/source/interpretsislib/sisregistry.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/sisregistry.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -95,6 +95,7 @@
 	static const std::string KRegistryV52string;
 	static const std::string KRegistryV53string;
 	static const std::string KRegistryV54string;
+	typedef std::multimap<TUint32, SisRegistryObject*> EntryMap;
 
 private: // Internal methods
     void ReadStubs( const std::wstring& aDirectory );
@@ -129,9 +130,6 @@
 private: // Friends
 	friend struct Contains;
 
-private: // Type definitions
-	typedef std::multimap<TUint32, SisRegistryObject*> EntryMap;
-
 private: // Constants
 	static const std::wstring KPathToRegistry;
 	static const std::wstring KPathToRomStubs;
--- a/secureswitools/swisistools/source/interpretsislib/sisregistryobject.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/sisregistryobject.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -150,7 +150,7 @@
 		iProperties.push_back(p);
 		}
 
-	const const CSISArray<CSISDependency, CSISFieldRoot::ESISDependency>& deps =
+	const CSISArray<CSISDependency, CSISFieldRoot::ESISDependency>& deps =
 		aSis.GetDependencies()->DependencyList();
 
 	for(i = 0; i < deps.size(); ++i)
@@ -408,9 +408,9 @@
 		}
 	else
 	{
-		std::string x;
 		std::string error = "can not retrieve localized vendor name";
-		throw InvalidSis(Ucs2ToUtf8((std::wstring)packageName,x), error, INVALID_SIS);
+		std::string x = wstring2string((std::wstring)packageName);
+		throw InvalidSis(x, error, INVALID_SIS);
 	}
 
 	// Signed by SU cert
--- a/secureswitools/swisistools/source/interpretsislib/stringutils.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/stringutils.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -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 the License "Eclipse Public License v1.0"
@@ -30,6 +30,7 @@
 #include "is_utils.h"
 #include "logger.h"
 #include "utility_interface.h"
+#include "util.h"
 
 // Constants
 const int KInterpretSISExpectedSIDLength = 8;
@@ -51,14 +52,29 @@
 	// then the function will return 0
 	int ret = 0; 
 	int pos = 0;
-	if((pos = aPath.find(L"/", aIndex)) != std::wstring::npos)
+	#ifndef __TOOLS2_LINUX__
+	if((pos = aPath.find(L"//", aIndex)) != std::wstring::npos)
+		{
+		ret = 2;
+		}
+	#else
+	if((pos = aPath.find(L"\\\\", aIndex)) != std::wstring::npos)
+		{
+		ret = 2;
+		}
+	#endif
+
+	#ifndef __TOOLS2_LINUX__
+	else if((pos = aPath.find(L"/", aIndex)) != std::wstring::npos)
 		{
 		ret = 1;
 		}
-	else if((pos = aPath.find(L"\\\\", aIndex)) != std::wstring::npos)
+	#else
+		else if((pos = aPath.find(L"\\", aIndex)) != std::wstring::npos)
 		{
-		ret = 2;
+		ret = 1;
 		}
+	#endif
 	aIndex = pos;
 	return ret;
 	}
@@ -73,7 +89,9 @@
 	int len = ConvertMultiByteToWideChar(src, -1, NULL, 0);
 	buf = new wchar_t[len+1];
 	len = ConvertMultiByteToWideChar(src, -1, buf, len);
-	ret = std::wstring( buf );
+
+	ret = std::wstring( buf ,len);
+
 	delete[] buf;
 	//
     std::wstring::size_type idx = 0;
@@ -82,7 +100,7 @@
 		ret.replace(idx, len, KDirectorySeparator);
         }
     //
-    return ret;
+    return ret.c_str();
     }
 
 
@@ -144,6 +162,14 @@
     return ret;
     }
 
+std::wstring StringUtils::ToLower( const std::wstring& aString )
+    {
+	std::wstring ret( aString );
+	std::transform( ret.begin(), ret.end(), ret.begin(), tolower );
+
+    return ret;
+    }
+
 bool StringUtils::IsLastCharacter( const std::wstring& aString, wchar_t aChar )
     {
     bool isLast = false;
@@ -164,13 +190,17 @@
     //
     if ( aText.length() >= 3 )
         {
-        const std::string prefix = ToUpper( Ucs2ToUtf8( aText.substr( 0, 3 ) ) );
+        const std::string prefix = ToUpper( wstring2string( aText.substr( 0, 3 ) ) );
         //
         const char drive = prefix[ 0 ];
         const char colon = prefix[ 1 ];
         const char backslash = prefix[ 2 ];
         //
+        #ifndef __TOOLS2_LINUX__
         if  ( colon == ':' && backslash == '\\' )
+		#else
+		if  ( colon == ':' && (backslash == '/' || backslash == '\\'))
+		#endif
             {
             startsWithDrive = ( drive >= 'A' && drive <= 'Z' ) || (drive == '!') ;
             }
@@ -270,6 +300,29 @@
  */
 bool StringUtils::WildcardCompare(const std::wstring& aWildCardFileName, const std::wstring& aFileName)
 {
+	#ifdef __TOOLS2_LINUX__
+	// In case the incoming data is a DB entry then it will be having windows
+	// specific paths due to the consistency of DB contents across WINDOWS
+	// and LINUX. So, we need to convert them to LINUX paths and then compare.
+
+	std::wstring::size_type idx = 0;
+
+	while( (idx = aWildCardFileName.find(L"\\", idx)) != std::wstring::npos)
+        {
+		aWildCardFileName.replace( idx, 1, L"/" );
+        }
+
+	idx = 0;
+
+	while( (idx = aFileName.find(L"\\", idx)) != std::wstring::npos)
+        {
+		aFileName.replace( idx, 1, L"/" );
+        }
+	#endif
+
+	aWildCardFileName = StringUtils::ToLower(aWildCardFileName);
+	aFileName = StringUtils::ToLower(aFileName);
+
 	std::wstring::const_iterator wildCurr = aWildCardFileName.begin();
 	std::wstring::const_iterator wildEnd = aWildCardFileName.end();
 
@@ -357,7 +410,19 @@
 */
 std::wstring StringUtils::NameAndExt( const std::wstring& aFile )
 {
+#ifndef __TOOLS2_LINUX__
 	int pos = aFile.find_last_of(L"\\");
+#else
+	// We should also check for backward slash since the caller could be
+	// passing a string containing a windows-specific paths within LINUX.
+	//
+	//    One instance being - an SCR database entry under LINUX, which has
+	//    the windows specific paths of the installed files to maintain
+	//    consistency across WINDOWS and LINUX platforms.
+
+	int pos = aFile.find_last_of(L"/");
+	pos = pos == std::wstring::npos ? aFile.find_last_of(L"\\") : pos;
+#endif
 	if (pos == std::wstring::npos)
 	{
 		return L"";
@@ -382,7 +447,11 @@
 */
 std::wstring StringUtils::DriveAndPath( const std::wstring& aFile )
 {
-	int pos = aFile.find_last_of(L"\\");
+#ifndef __TOOLS2_LINUX__
+		int pos = aFile.find_last_of(L"\\");
+#else
+		int pos = aFile.find_last_of(L"/");
+#endif
 	if (pos == std::wstring::npos)
 	{
 		return L"";
@@ -405,8 +474,13 @@
 */
 std::wstring StringUtils::Path( const std::wstring& aFile )
 {
-	int firstPos = aFile.find_first_of(L"\\");
-	int lastPos = aFile.find_last_of(L"\\");
+#ifndef __TOOLS2_LINUX__
+		int firstPos = aFile.find_first_of(L"\\");
+		int lastPos = aFile.find_last_of(L"\\");
+#else
+		int firstPos = aFile.find_first_of(L"/");
+		int lastPos = aFile.find_last_of(L"/");
+#endif
 	
 	if (lastPos >= firstPos)
 	{
@@ -428,7 +502,12 @@
 */
 std::wstring StringUtils::Name( const std::wstring& aFile )
 {
+#ifndef __TOOLS2_LINUX__
 	int startPos = aFile.find_last_of(L"\\");
+#else
+	int startPos = aFile.find_last_of(L"/");
+#endif
+	
 	int endPos = aFile.find_last_of(L".");
 
 	if (endPos > startPos)
--- a/secureswitools/swisistools/source/interpretsislib/stringutils.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/stringutils.h	Thu Jul 08 20:28:00 2010 +0300
@@ -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 the License "Eclipse Public License v1.0"
@@ -35,7 +35,17 @@
 #include "symbiantypes.h"
 
 // Constants
+#ifndef __TOOLS2_LINUX__
 const std::wstring KDirectorySeparator( L"\\" );
+const std::wstring KDoubleSlashPathPrefix( L"\\\\" );
+const std::string KDirectorySeparatorString( "\\" );
+const std::string KDoubleSlashPathPrefixString( "\\\\" );
+#else
+const std::wstring KDirectorySeparator( L"/" );
+const std::wstring KDoubleSlashPathPrefix( L"//" );
+const std::string KDirectorySeparatorString( "/" );
+const std::string KDoubleSlashPathPrefixString( "//" );
+#endif
 
 class StringUtils
 	{
@@ -47,6 +57,7 @@
     static std::string ToUpper( const std::string& aString );
 	static std::wstring ToUpper( const std::wstring& aString );
 	static std::string ToLower( const std::string& aString );
+	static std::wstring ToLower( const std::wstring& aString );
     static bool IsLastCharacter( const std::wstring& aString, wchar_t aChar );
     static bool StartsWithDrive( const std::wstring& aText );
     static std::wstring MakePathFromSID( const std::wstring& aBasePath, TUint32 aSID );
--- a/secureswitools/swisistools/source/interpretsislib/utils_posix.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/utils_posix.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -22,14 +22,17 @@
 #include<sstream>
 
 #include"utility_interface.h"
+#include"util.h"
 
 bool FileExists(const std::wstring& aFile)
 {
-	return true;
+	struct stat x;
+	int err = GetStat(aFile,&x );
+	return err == 0; 
 }
 bool RemoveFile(const std::wstring& aFile)
 {
-	return true;
+	return _wunlink(aFile.c_str()) == 0;
 }
 bool CreateFile(const std::wstring& aFile)
 {
@@ -38,16 +41,16 @@
 
 int GetStat(const std::wstring& aFile, struct stat* s)
 {
-	std::string str;
- 	return stat(Ucs2ToUtf8(aFile, str).c_str(), s);
+	std::string str = wstring2string(aFile);
+ 	return stat(str.c_str(), s);
 }
 
 void GetDirContents(const std::wstring& path, 
 					std::list<std::wstring>& contents)
 {
 
-	std::string utfString;
-	DIR* currDir =  opendir(Ucs2ToUtf8(path, utfString).c_str());
+	std::string utfString = wstring2string(path);
+	DIR* currDir =  opendir(utfString.c_str());
 	
 	while (currDir)
 	{
@@ -59,8 +62,8 @@
 		}
 		else
 		{
-			std::wstring ucsString;
-			contents.push_back(Utf8ToUcs2(currElem->d_name, ucsString));
+			std::wstring ucsString = string2wstring(currElem->d_name);
+			contents.push_back(ucsString);
 		}
 	}
 }
@@ -111,14 +114,22 @@
     	}
     else
     	{// Skip creation of root directory
+    	#ifndef __TOOLS2_LINUX__
     	index = aDir.find(L'\\', index);
+		#else
+		index = aDir.find(L'/', index);
+		#endif
     	}
 	do
 		{
     	index += 1;
 		// Try to make each directory in the path. If ERR_ALREADY_EXISTS is returned
   	  	// then this is okay. Other errors are fatal.
+		#ifndef __TOOLS2_LINUX__
 		index = aDir.find(L'\\', index);
+		#else
+		index = aDir.find(L'/', index);
+		#endif
 		std::wstring dir = aDir.substr( 0, index );
 		if(dir == L".")
 			{
@@ -140,8 +151,8 @@
 bool OpenFile(const std::wstring& aFile, std::fstream& aStream,
 			  std::ios_base::open_mode aMode)
 {
-	std::string s;
-	aStream.open(Ucs2ToUtf8(aFile, s).c_str(), aMode);
+	std::string s = wstring2string(aFile);
+	aStream.open(s.c_str(), aMode);
 	return aStream.good();
 }
 
@@ -176,15 +187,27 @@
 
 void RemoveHashForFile(const std::wstring& aFile, const int aDriveLetter, const std::wstring& aPath)
 {
+   	#ifndef __TOOLS2_LINUX__
 	std::wstring hashdir = L"$:\\sys\\hash\\";
+	#else
+	std::wstring hashdir = L"$:/sys/hash/";
+	#endif
 	std::wstring basename = aFile.substr( aFile.rfind( KDirectorySeparator ) + 1) ;
 	if (basename.size() == 0)
 	{
+    	#ifndef __TOOLS2_LINUX__
 		basename = aFile.substr(aFile.rfind(L"\\"));
+		#else
+		basename = aFile.substr(aFile.rfind(L"/"));
+		#endif
 	}
 
 	hashdir[0] = aDriveLetter;
+   	#ifndef __TOOLS2_LINUX__
 	std::wstring hashFile = aPath + L"\\sys\\hash\\" + basename;
+	#else
+	std::wstring hashFile = aPath + L"/sys/hash/" + basename;
+	#endif
 	if (FileExists(hashFile))
 	{
 		RemoveFile(hashFile);
--- a/secureswitools/swisistools/source/interpretsislib/utils_win32.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/utils_win32.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -273,7 +273,9 @@
 
 	return 0;
 }
-std::string Utils::wstring2string (const std::wstring& aWide)
+/*
+//std::string Utils::wstring2string (const std::wstring& aWide)
+std::string wstring2string (const std::wstring& aWide)
 	{
 	int max = WideCharToMultiByte(CP_OEMCP,0,aWide.c_str(),aWide.length(),0,0,0,0);
 	std::string reply;
@@ -293,7 +295,8 @@
 	return reply;
 	}
 
-std::wstring Utils::string2wstring (const std::string& aNarrow)
+//std::wstring Utils::string2wstring (const std::string& aNarrow)
+std::wstring string2wstring (const std::string& aNarrow)
 	{
 	int max = MultiByteToWideChar(CP_OEMCP,0,aNarrow.c_str(),aNarrow.length(),0,0);
 	std::wstring reply;
@@ -312,32 +315,4 @@
 		}
 	return reply;
 	}
-
-const std::wstring Utils::IntegerToWideString(int aInt)
-	{
-	std::wstringstream wstream;
-	wstream << aInt;
-	return wstream.str();
-	}
-
-std::wstring Utils::Int64ToWideString(TInt64 aInt)
-	{
-	wchar_t wint[20];
-	
-#ifdef _MSC_VER
-	swprintf(wint, L"%I64u", aInt);
-#else
-	swprintf(wint, 20, L"%I64u", aInt);
-#endif // _MSC_VER
-	
-	std::wstring strInt64(wint);
-	return strInt64;
-	}
-
-int Utils::WideStringToInteger(const std::wstring& aWideString)
-	{
-	unsigned long int value=0;
-	std::wstringstream str(aWideString);
-	str >> value;
-	return value;
-	}
+*/
--- a/secureswitools/swisistools/source/interpretsislib/xmlgenerator.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/xmlgenerator.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -26,6 +26,8 @@
 #include "xmlgenerator.h"
 #include "../common/exception.h"
 #include "is_utils.h"
+#include "../common/util.h"
+#include "utf8_wrapper.h"
 
 #include <xercesc/dom/DOM.hpp>
 #include <xercesc/util/XMLString.hpp>
@@ -55,9 +57,134 @@
 typedef void (*xmlPlatform) ();
 typedef void (*releaseXmlChPtr) (XMLCh** buf);
 
-// constants used for writing to the xml file
-std::wstring	PreProvisionInformation(L"PreProvisionInformation");
-std::wstring	SoftwareTypeName(L"SoftwareTypeName");
+
+//------------------------------------- Literals ------------------------------------------
+// Xerces literals are of type XMLCh*. For gcc XMLCh is defined as unsigned short (UCS16). 
+// In windows wchar_t has the same size as XMLCh therefor literals defined as L"This is a 
+// literal" will work. But in linux size of wchar_t is 4 (UCS32) bytes and hence L cannot 
+// be used for defining literals. To avoid string conversion and dynamic memory allocation 
+// following method is used to represent unsigned short literal. Current compiler has the 
+// limitation to represent such literals.
+//-----------------------------------------------------------------------------------------
+const XMLCh* KPreProvisionInformation = (const XMLCh*)    "P\0r\0e\0P\0r\0o\0v\0i\0s\0i\0o\0n\0I\0n\0f\0o\0r\0m\0a\0t\0i\0o\0n\0\0\0";
+const XMLCh* KSoftwareTypeName = (const XMLCh*)           "S\0o\0f\0t\0w\0a\0r\0e\0T\0y\0p\0e\0N\0a\0m\0e\0\0\0";
+const XMLCh* KUTF16 = (const XMLCh*)                      "U\0T\0F\0-\0001\0006\0\0\0";
+const XMLCh* KComponent = (const XMLCh*)                  "C\0o\0m\0p\0o\0n\0e\0n\0t\0\0\0";
+const XMLCh* KDependentId = (const XMLCh*)                "D\0e\0p\0e\0n\0d\0e\0n\0t\0I\0d\0\0\0"; 
+const XMLCh* KToVersion = (const XMLCh*)                  "T\0o\0V\0e\0r\0s\0i\0o\0n\0\0\0";
+const XMLCh* KFromVersion = (const XMLCh*)                "F\0r\0o\0m\0V\0e\0r\0s\0i\0o\0n\0\0\0";
+const XMLCh* KSupplierId = (const XMLCh*)                 "S\0u\0p\0p\0l\0i\0e\0r\0I\0d\0\0\0";
+const XMLCh* KName = (const XMLCh*)                       "N\0a\0m\0e\0\0\0";
+const XMLCh* KFileProperty_StrValue = (const XMLCh*)      "F\0i\0l\0e\0P\0r\0o\0p\0e\0r\0t\0y\0_\0S\0t\0r\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KFileProperty_IntValue = (const XMLCh*)      "F\0i\0l\0e\0P\0r\0o\0p\0e\0r\0t\0y\0_\0I\0n\0t\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KLocation = (const XMLCh*)                   "L\0o\0c\0a\0t\0i\0o\0n\0\0\0";
+const XMLCh* KComponentProperty_IsBinary = (const XMLCh*) "C\0o\0m\0p\0o\0n\0e\0n\0t\0P\0r\0o\0p\0e\0r\0t\0y\0_\0I\0s\0B\0i\0n\0a\0r\0y\0\0\0";
+const XMLCh* KComponentProperty_StrValue = (const XMLCh*) "C\0o\0m\0p\0o\0n\0e\0n\0t\0P\0r\0o\0p\0e\0r\0t\0y\0_\0S\0t\0r\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KComponentProperty_IntValue = (const XMLCh*) "C\0o\0m\0p\0o\0n\0e\0n\0t\0P\0r\0o\0p\0e\0r\0t\0y\0_\0I\0n\0t\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KComponentProperty_Locale = (const XMLCh*)   "C\0o\0m\0p\0o\0n\0e\0n\0t\0P\0r\0o\0p\0e\0r\0t\0y\0_\0L\0o\0c\0a\0l\0e\0\0\0";
+const XMLCh* KComponentLocalizable_Vendor=(const XMLCh*)  "C\0o\0m\0p\0o\0n\0e\0n\0t\0L\0o\0c\0a\0l\0i\0z\0a\0b\0l\0e\0_\0V\0e\0n\0d\0o\0r\0\0\0";
+const XMLCh* KComponentLocalizable_Name = (const XMLCh*)  "C\0o\0m\0p\0o\0n\0e\0n\0t\0L\0o\0c\0a\0l\0i\0z\0a\0b\0l\0e\0_\0N\0a\0m\0e\0\0\0";
+const XMLCh* KComponentLocalizable_Locale=(const XMLCh*)  "C\0o\0m\0p\0o\0n\0e\0n\0t\0L\0o\0c\0a\0l\0i\0z\0a\0b\0l\0e\0_\0L\0o\0c\0a\0l\0e\0\0\0";
+const XMLCh* KBuild = (const XMLCh*)                      "B\0u\0i\0l\0d\0\0\0";
+const XMLCh* KMinor = (const XMLCh*)                      "M\0i\0n\0o\0r\0\0\0";
+const XMLCh* KMajor = (const XMLCh*)                      "M\0a\0j\0o\0r\0\0\0";
+const XMLCh* KVersion = (const XMLCh*)                    "V\0e\0r\0s\0i\0o\0n\0\0\0"; 
+const XMLCh* KHidden = (const XMLCh*)                     "H\0i\0d\0d\0e\0n\0\0\0";
+const XMLCh* KOriginVerified = (const XMLCh*)             "O\0r\0i\0g\0i\0n\0V\0e\0r\0i\0f\0i\0e\0d\0\0\0";
+const XMLCh* KGlobalId = (const XMLCh*)                   "G\0l\0o\0b\0a\0l\0I\0d\0\0\0";
+const XMLCh* KScomoState = (const XMLCh*)                 "S\0c\0o\0m\0o\0S\0t\0a\0t\0e\0\0\0";
+const XMLCh* KSize = (const XMLCh*)                       "S\0i\0z\0e\0\0\0";
+const XMLCh* KRemovable = (const XMLCh*)                  "R\0e\0m\0o\0v\0a\0b\0l\0e\0\0\0";
+const XMLCh* KComponentLocalizable = (const XMLCh*)       "C\0o\0m\0p\0o\0n\0e\0n\0t\0L\0o\0c\0a\0l\0i\0z\0a\0b\0l\0e\0\0\0";
+const XMLCh* KComponentProperty = (const XMLCh*)          "C\0o\0m\0p\0o\0n\0e\0n\0t\0P\0r\0o\0p\0e\0r\0t\0y\0\0\0";
+const XMLCh* KComponentProperty_Value = (const XMLCh*)    "C\0o\0m\0p\0o\0n\0e\0n\0t\0P\0r\0o\0p\0e\0r\0t\0y\0_\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KComponentFile = (const XMLCh*)              "C\0o\0m\0p\0o\0n\0e\0n\0t\0F\0i\0l\0e\0\0\0";
+const XMLCh* KFileProperty = (const XMLCh*)               "F\0i\0l\0e\0P\0r\0o\0p\0e\0r\0t\0y\0\0\0";
+const XMLCh* KFileProperty_Value = (const XMLCh*)         "F\0i\0l\0e\0P\0r\0o\0p\0e\0r\0t\0y\0_\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KComponentDependency = (const XMLCh*)        "C\0o\0m\0p\0o\0n\0e\0n\0t\0D\0e\0p\0e\0n\0d\0e\0n\0c\0y\0\0\0"; 	
+const XMLCh* KDependencyList = (const XMLCh*)             "D\0e\0p\0e\0n\0d\0e\0n\0c\0y\0L\0i\0s\0t\0\0\0";
+const XMLCh* KRomApplication = (const XMLCh*)             "R\0o\0m\0A\0p\0p\0l\0i\0c\0a\0t\0i\0o\0n\0\0\0";
+const XMLCh* KApplicationRegistrationInfo = (const XMLCh*) "A\0p\0p\0l\0i\0c\0a\0t\0i\0o\0n\0R\0e\0g\0i\0s\0t\0r\0a\0t\0i\0o\0n\0I\0n\0f\0o\0\0\0";
+const XMLCh* KOpaqueData = (const XMLCh*) 				  "O\0p\0a\0q\0u\0e\0D\0a\0t\0a\0\0\0";
+const XMLCh* KData = (const XMLCh*)						  "D\0a\0t\0a\0\0\0";
+const XMLCh* KOpaqueLocale = (const XMLCh*)				  "O\0p\0a\0q\0u\0e\0L\0o\0c\0a\0l\0e\0\0\0";
+const XMLCh* KFileOwnershipinfo = (const XMLCh*)		  "F\0i\0l\0e\0O\0w\0n\0e\0r\0s\0h\0i\0p\0i\0n\0f\0o\0\0\0";
+const XMLCh* KFileName = (const XMLCh*) 				  "F\0i\0l\0e\0N\0a\0m\0e\0\0\0";
+const XMLCh* KApplicationLocalizableInfo = (const XMLCh*) "A\0p\0p\0l\0i\0c\0a\0t\0i\0o\0n\0L\0o\0c\0a\0l\0i\0z\0a\0b\0l\0e\0I\0n\0f\0o\0\0\0";
+const XMLCh* KLocalizableAttribute = (const XMLCh*)       "L\0o\0c\0a\0l\0i\0z\0a\0b\0l\0e\0A\0t\0t\0r\0i\0b\0u\0t\0e\0\0\0";
+const XMLCh* KLocalizableAttribute_Value = (const XMLCh*) "L\0o\0c\0a\0l\0i\0z\0a\0b\0l\0e\0A\0t\0t\0r\0i\0b\0u\0t\0e\0_\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KLocalizableAttribute_IntValue = (const XMLCh*) "L\0o\0c\0a\0l\0i\0z\0a\0b\0l\0e\0A\0t\0t\0r\0i\0b\0u\0t\0e\0_\0I\0n\0t\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KLocalizableAttribute_StrValue = (const XMLCh*) "L\0o\0c\0a\0l\0i\0z\0a\0b\0l\0e\0A\0t\0t\0r\0i\0b\0u\0t\0e\0_\0S\0t\0r\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KViewData = (const XMLCh*) "V\0i\0e\0w\0D\0a\0t\0a\0\0\0";
+const XMLCh* KViewDataAttribute = (const XMLCh*) "V\0i\0e\0w\0D\0a\0t\0a\0A\0t\0t\0r\0i\0b\0u\0t\0e\0\0\0";
+const XMLCh* KApplicationDataType = (const XMLCh*) "A\0p\0p\0l\0i\0c\0a\0t\0i\0o\0n\0D\0a\0t\0a\0T\0y\0p\0e\0\0\0";
+const XMLCh* KPriority = (const XMLCh*) "P\0r\0i\0o\0r\0i\0t\0y\0\0\0";
+const XMLCh* KType = (const XMLCh*) "T\0y\0p\0e\0\0\0";
+const XMLCh* KViewData_Value = (const XMLCh*) "V\0i\0e\0w\0D\0a\0t\0a\0_\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KViewData_IntValue = (const XMLCh*) "V\0i\0e\0w\0D\0a\0t\0a\0_\0I\0n\0t\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KViewData_StrValue = (const XMLCh*) "V\0i\0e\0w\0D\0a\0t\0a\0_\0S\0t\0r\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KApplicationServiceInfo = (const XMLCh*) "A\0p\0p\0l\0i\0c\0a\0t\0i\0o\0n\0S\0e\0r\0v\0i\0c\0e\0I\0n\0f\0o\0\0\0";
+const XMLCh* KUid = (const XMLCh*) "U\0i\0d\0\0\0";
+const XMLCh* KServiceOpaqueData = (const XMLCh*) "S\0e\0r\0v\0i\0c\0e\0O\0p\0a\0q\0u\0e\0D\0a\0t\0a\0\0\0";
+const XMLCh* KServiceData = (const XMLCh*) "S\0e\0r\0v\0i\0c\0e\0D\0a\0t\0a\0\0\0";
+const XMLCh* KServiceOpaqueLocale = (const XMLCh*) "S\0e\0r\0v\0i\0c\0e\0O\0p\0a\0q\0u\0e\0L\0o\0c\0a\0l\0e\0\0\0";
+const XMLCh* KApplicationProperty = (const XMLCh*) "A\0p\0p\0l\0i\0c\0a\0t\0i\0o\0n\0P\0r\0o\0p\0e\0r\0t\0y\0\0\0";
+const XMLCh* KLocale = (const XMLCh*) "L\0o\0c\0a\0l\0e\0\0\0";
+const XMLCh* KServiceUid = (const XMLCh*) "S\0e\0r\0v\0i\0c\0e\0U\0i\0d\0\0\0";
+const XMLCh* KIntValue = (const XMLCh*) "I\0n\0t\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KStrValue = (const XMLCh*) "S\0t\0r\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KIsStr8Bit = (const XMLCh*) "I\0s\0S\0t\0r\08\0B\0i\0t\0\0\0";
+const XMLCh* KApplicationAttribute = (const XMLCh*) "A\0p\0p\0l\0i\0c\0a\0t\0i\0o\0n\0A\0t\0t\0r\0i\0b\0u\0t\0e\0\0\0";
+const XMLCh* KApplicationAttribute_Value = (const XMLCh*) "A\0p\0p\0l\0i\0c\0a\0t\0i\0o\0n\0A\0t\0t\0r\0i\0b\0u\0t\0e\0_\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KApplicationAttribute_IntValue = (const XMLCh*) "A\0p\0p\0l\0i\0c\0a\0t\0i\0o\0n\0A\0t\0t\0r\0i\0b\0u\0t\0e\0_\0I\0n\0t\0V\0a\0l\0u\0e\0\0\0";
+const XMLCh* KApplicationAttribute_StrValue = (const XMLCh*) "A\0p\0p\0l\0i\0c\0a\0t\0i\0o\0n\0A\0t\0t\0r\0i\0b\0u\0t\0e\0_\0S\0t\0r\0V\0a\0l\0u\0e\0\0\0";
+
+
+
+
+//-----------------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------------------------------------------------------
+//											UTILITY FUNCTIONS
+//------------------------------------------------------------------------------------------------------------------------------
+
+XercesString ConvertToXercesString(const char* aString, int aLength)
+	{
+	XMLCh* buffer = new UTF16[aLength + 1];
+	XMLCh* temp = buffer; // save as buffer gets modified..
+	ConvertUTF8toUTF16(&aString, aString + aLength, &temp, buffer + aLength, lenientConversion);
+	
+	// Appending NUL to the converted buffer.
+	*temp = 0;
+
+	XercesString result;
+
+	result.append(buffer);
+	delete[] buffer;
+
+	return result;
+	}
+
+XercesString IntegerToXercesString(int aValue)
+	{
+	std::stringstream str;
+	str << aValue;
+
+	return ConvertToXercesString(str.str().c_str(), str.str().length());
+	}
+
+
+XercesString Int64ToXercesString(TInt64 aInt)
+	{
+	char str[50];
+	
+	sprintf(str, "%I64u", aInt);
+
+	return ConvertToXercesString(str, strlen(str));
+	}
+	
+
+//------------------------------------------------------------------------------------------------------------------------------
 
 
 CXmlGenerator::CXmlGenerator()
@@ -86,9 +213,14 @@
 		std::auto_ptr < SchemaDomErrorHandler > errHandler(new SchemaDomErrorHandler());
 		domWriter->setErrorHandler(errHandler.get());
 
+#ifdef _WIN32
+		// XMLString::trascode() function should be used for conversion.
 		std::auto_ptr < XMLFormatTarget > outputFile( new LocalFileFormatTarget( aXmlFileName.c_str() ) );	
-		
-		const char* epocRoot = getenv("EPOCROOT");
+#else
+        std::string fileName = wstring2string(aXmlFileName);
+		std::auto_ptr < XMLFormatTarget > outputFile( new LocalFileFormatTarget( fileName.c_str() ) );
+#endif // _WIN32		
+		const char* epocRoot = getenv("EPOCROOT");		
 		if(NULL == epocRoot)
 			{
 			throw std::runtime_error("EPOCROOT environment variable not specified.");
@@ -96,31 +228,33 @@
 		
 		std::string epocRootStr(epocRoot); 
 
-		std::string dtdFilePath = epocRootStr + "epoc32\\tools\\preprovision.dtd";
+		#ifdef __LINUX__ 
+		std::string dtdFilePath = epocRootStr + "epoc32/tools/preprovision.dtd";
+		#else 	  	  	 
+		std::string dtdFilePath = epocRootStr + "epoc32\\tools\\preprovision.dtd"; 	
+		#endif
 		
 		fn_auto_ptr<releaseXmlChPtr, XMLCh> dtdPath( &XMLString::release, XMLString::transcode(dtdFilePath.c_str()) );
-		DOMDocumentType* documentType = domImpl->createDocumentType(L"PreProvisionInformation",NULL, dtdPath.get());
+		DOMDocumentType* documentType = domImpl->createDocumentType(KPreProvisionInformation,NULL, dtdPath.get());
 		
 		
-		mem_fn_auto_ptr< releaseDOMDoc, DOMDocument* > domDocument( &XERCES_CPP_NAMESPACE::DOMDocument::release, domImpl->createDocument(	0, PreProvisionInformation.c_str(), documentType) );
+		mem_fn_auto_ptr< releaseDOMDoc, DOMDocument* > domDocument( &XERCES_CPP_NAMESPACE::DOMDocument::release, domImpl->createDocument(	0, KPreProvisionInformation, documentType) );
 
 		DOMElement* rootElement = domDocument->getDocumentElement();
 		
 		// SoftwareTypeName
-		AddChildElement(rootElement, domDocument.get(), SoftwareTypeName.c_str(), aPreProvisionDetail.iSoftwareTypeName.c_str() );
+		AddChildElement(rootElement, domDocument.get(), KSoftwareTypeName, aPreProvisionDetail.SoftwareTypeName().c_str() );
 
 		std::vector<XmlDetails::TScrPreProvisionDetail::TComponent>::const_iterator compIter;
 		for(compIter = aPreProvisionDetail.iComponents.begin(); compIter != aPreProvisionDetail.iComponents.end() ; ++compIter)
 			{
-			DOMElement*  component = domDocument->createElement(L"Component");
+			DOMElement*  component = domDocument->createElement(KComponent);
 			rootElement->appendChild(component);
 
 			WriteComponent(component,domDocument.get(), *compIter, aRomApplication);
 			}
-		
 		// do the serialization through DOMWriter::writeNode();
-		domWriter->writeNode(outputFile.get(), *domDocument.get());
-		
+		domWriter->writeNode(outputFile.get(), *domDocument.get()); 	  			
 		}
         catch (const XMLException& toCatch) 
 			{
@@ -144,7 +278,7 @@
 
 	if (aDomWriter->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true))
 		 aDomWriter->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
-	
+
 	if (aDomWriter->canSetFeature(XMLUni::fgDOMWRTNormalizeCharacters, false))
 		aDomWriter->setFeature(XMLUni::fgDOMWRTNormalizeCharacters, false);
 
@@ -163,7 +297,7 @@
 	if (aDomWriter->canSetFeature(XMLUni::fgDOMXMLDeclaration, true))
 		 aDomWriter->setFeature(XMLUni::fgDOMXMLDeclaration, true);
 	
-	aDomWriter->setEncoding(L"UTF-16");
+	aDomWriter->setEncoding(KUTF16);
 	}
 
 void CXmlGenerator::WriteComponent( DOMElement* aRootElement, DOMDocument* aDocument, 
@@ -175,28 +309,29 @@
 	if (aRomApplication) 
 	{
 		int isRomApplication = 1;
-		std::wstring isRomApp = Utils::IntegerToWideString(isRomApplication);
-		AddChildElement(aRootElement, aDocument, L"RomApplication", isRomApp.c_str());
+		XercesString isRomApp = IntegerToXercesString(isRomApplication);
+		AddChildElement(aRootElement, aDocument, KRomApplication, isRomApp.c_str());
 	}
 	
-	std::wstring isRemovable = Utils::IntegerToWideString(aComponent.iComponentDetails.iIsRemovable);
-	AddChildElement(aRootElement, aDocument, L"Removable", isRemovable.c_str() );
+	XercesString isRemovable = IntegerToXercesString(aComponent.iComponentDetails.iIsRemovable);
+	AddChildElement(aRootElement, aDocument, KRemovable, isRemovable.c_str() );
+
 	
-	std::wstring size = Utils::Int64ToWideString(aComponent.iComponentDetails.iSize);
-	AddChildElement(aRootElement, aDocument, L"Size", size.c_str() );
+	XercesString size = Int64ToXercesString(aComponent.iComponentDetails.iSize);
+	AddChildElement(aRootElement, aDocument, KSize, size.c_str() );
 	
-	std::wstring scomoState = Utils::IntegerToWideString(aComponent.iComponentDetails.iScomoState);
-	AddChildElement(aRootElement, aDocument, L"ScomoState", scomoState.c_str() );
+	XercesString scomoState = IntegerToXercesString(aComponent.iComponentDetails.iScomoState);
+	AddChildElement(aRootElement, aDocument, KScomoState, scomoState.c_str() );
 
-	AddChildElement(aRootElement, aDocument, L"GlobalId", aComponent.iComponentDetails.iGlobalId.c_str() );
+	AddChildElement(aRootElement, aDocument, KGlobalId, aComponent.iComponentDetails.GlobalId().c_str() );
 
 	WriteComponentVersion(aRootElement, aDocument, aComponent.iComponentDetails.iVersion);
 	
-	std::wstring isOriginVerified = Utils::IntegerToWideString(aComponent.iComponentDetails.iOriginVerified);
-	AddChildElement(aRootElement, aDocument, L"OriginVerified", isOriginVerified.c_str() );
+	XercesString isOriginVerified = Int64ToXercesString(aComponent.iComponentDetails.iOriginVerified);
+	AddChildElement(aRootElement, aDocument, KOriginVerified, isOriginVerified.c_str() );
 
-	std::wstring isHidden = Utils::IntegerToWideString(aComponent.iComponentDetails.iIsHidden);
-	AddChildElement(aRootElement, aDocument, L"Hidden", isHidden.c_str() );
+	XercesString isHidden = IntegerToXercesString(aComponent.iComponentDetails.iIsHidden);
+	AddChildElement(aRootElement, aDocument, KHidden, isHidden.c_str() );
 
 	WriteComponentLocalizables(aRootElement, aDocument, aComponent.iComponentLocalizables);
 
@@ -217,11 +352,11 @@
 				XmlDetails::TScrPreProvisionDetail::TComponentDetails::TVersion aVersion
 				)
 	{
-	DOMElement*  version = aDocument->createElement(L"Version");
+	DOMElement*  version = aDocument->createElement(KVersion);
 	aRootElement->appendChild(version);
-	version->setAttribute( L"Major", aVersion.iMajor.c_str() );
-	version->setAttribute( L"Minor", aVersion.iMinor.c_str() );
-	version->setAttribute( L"Build", aVersion.iBuild.c_str() );
+	version->setAttribute( KMajor, aVersion.MajorVersion().c_str() );
+	version->setAttribute( KMinor, aVersion.MinorVersion().c_str() );
+	version->setAttribute( KBuild, aVersion.BuildVersion().c_str() );
 	}
 
 void CXmlGenerator::WriteComponentLocalizables
@@ -233,11 +368,13 @@
 	std::vector<ComponentLocalizable>::const_iterator compLocIter;
 	for( compLocIter = aComponentLocalizable.begin() ; compLocIter != aComponentLocalizable.end() ; ++compLocIter)
 		{
-		DOMElement* newRoot = AddTag(aRootElement, aDocument, L"ComponentLocalizable");
-		std::wstring locale = Utils::IntegerToWideString(compLocIter->iLocale);
-		AddChildElement(newRoot,aDocument, L"ComponentLocalizable_Locale", locale.c_str());
-		AddChildElement(newRoot,aDocument, L"ComponentLocalizable_Name", compLocIter->iName.c_str());
-		AddChildElement(newRoot,aDocument, L"ComponentLocalizable_Vendor", compLocIter->iVendor.c_str());
+		DOMElement* newRoot = AddTag(aRootElement, aDocument, KComponentLocalizable);
+		XercesString locale = IntegerToXercesString(compLocIter->iLocale);
+
+
+		AddChildElement(newRoot,aDocument, KComponentLocalizable_Locale, locale.c_str());
+		AddChildElement(newRoot,aDocument, KComponentLocalizable_Name, compLocIter->Name().c_str());
+		AddChildElement(newRoot,aDocument, KComponentLocalizable_Vendor, compLocIter->Vendor().c_str());
 		}
 	}
 
@@ -251,28 +388,28 @@
 	for( compPropIter = aComponentProperties.begin() ; compPropIter != aComponentProperties.end() ; ++compPropIter)
 		{
 		
-		DOMElement* compPropRoot = AddTag(aRootElement, aDocument, L"ComponentProperty");
+		DOMElement* compPropRoot = AddTag(aRootElement, aDocument, KComponentProperty);
 		
-		std::wstring locale = Utils::IntegerToWideString(compPropIter->iLocale);
-		AddChildElement(compPropRoot,aDocument, L"ComponentProperty_Locale", locale.c_str());
+		XercesString locale = IntegerToXercesString(compPropIter->iLocale);
+		AddChildElement(compPropRoot,aDocument, KComponentProperty_Locale, locale.c_str());
 		
-		DOMElement* compPropValueRoot = AddTag(compPropRoot, aDocument, L"ComponentProperty_Value");
+		DOMElement* compPropValueRoot = AddTag(compPropRoot, aDocument, KComponentProperty_Value);
 		
-		std::wstring isBinary = Utils::IntegerToWideString(compPropIter->iIsStr8Bit);
+		XercesString isBinary = IntegerToXercesString(compPropIter->iIsStr8Bit);
 
 		if(compPropIter->iIsIntValue)
 			{
-			AddChildElement(compPropValueRoot,aDocument, L"ComponentProperty_IntValue", compPropIter->iValue.c_str());
+			AddChildElement(compPropValueRoot,aDocument, KComponentProperty_IntValue, compPropIter->Value().c_str());
 			}
 		else
 			{
-			AddChildElement(compPropValueRoot,aDocument, L"ComponentProperty_StrValue", compPropIter->iValue.c_str());
+			AddChildElement(compPropValueRoot,aDocument, KComponentProperty_StrValue, compPropIter->Value().c_str());
 			}
 		
 		
-		AddChildElement(compPropRoot,aDocument, L"ComponentProperty_IsBinary", isBinary.c_str());
+		AddChildElement(compPropRoot,aDocument, KComponentProperty_IsBinary, isBinary.c_str());
 
-		compPropRoot->setAttribute(L"Name", compPropIter->iName.c_str());
+		compPropRoot->setAttribute(KName, compPropIter->Name().c_str());
 		
 		}
 	}
@@ -291,7 +428,7 @@
 	std::vector<AppRegistrationInfo>::const_iterator compFileIter;
 	for( compFileIter = aAppRegInfo.begin() ; compFileIter != aAppRegInfo.end() ; ++compFileIter)
 	{
-		DOMElement* compFileRoot = AddTag(aRootElement, aDocument, L"ApplicationRegistrationInfo");
+		DOMElement* compFileRoot = AddTag(aRootElement, aDocument, KApplicationRegistrationInfo);
 
 		WriteAppAttributes(compFileRoot, aDocument, compFileIter->iApplicationAttribute);
 
@@ -302,18 +439,20 @@
 		{
 			if(0 == fileAppOpaqueDataType->iServiceUid)
 			{
-				DOMElement* filePropValueRoot = AddTag(compFileRoot, aDocument, L"OpaqueData");
-				AddChildElement(filePropValueRoot,aDocument, L"Data", fileAppOpaqueDataType->iOpaqueData.c_str());
-				std::wstring iLocale = Utils::IntegerToWideString(fileAppOpaqueDataType->iLocale);
-				AddChildElement(filePropValueRoot,aDocument, L"OpaqueLocale", iLocale.c_str());
+				DOMElement* filePropValueRoot = AddTag(compFileRoot, aDocument, KOpaqueData);
+				XercesString opaqueData = WStringToXercesString(fileAppOpaqueDataType->iOpaqueData);
+				AddChildElement(filePropValueRoot,aDocument, KData, opaqueData.c_str());
+				XercesString locale = IntegerToXercesString(fileAppOpaqueDataType->iLocale);
+				AddChildElement(filePropValueRoot,aDocument, KOpaqueLocale, locale.c_str());
 			}
 		}
 
 		for(vector<std::wstring>::iterator mimeiter = compFileIter->iFileOwnershipInfo.begin() ; mimeiter != compFileIter->iFileOwnershipInfo.end() ; ++mimeiter )
 		{
-			DOMElement* filePropRoot = AddTag(compFileRoot, aDocument, L"FileOwnershipinfo");
+			DOMElement* filePropRoot = AddTag(compFileRoot, aDocument, KFileOwnershipinfo);
 
-			AddChildElement(filePropRoot,aDocument, L"FileName",  mimeiter->c_str());
+			XercesString temp = WStringToXercesString(*mimeiter);
+			AddChildElement(filePropRoot,aDocument, KFileName,  temp.c_str());
 		}
 
 		WriteAppServiceInfo(compFileRoot, aDocument, compFileIter->iApplicationServiceInfo, compFileIter->iOpaqueDataType);
@@ -334,7 +473,7 @@
 	std::vector<AppLocalizableInfo>::const_iterator filePropIter;
 	for( filePropIter = aAppLocalizableInfo.begin() ; filePropIter != aAppLocalizableInfo.end() ; ++filePropIter)
 	{
-		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, L"ApplicationLocalizableInfo");
+		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, KApplicationLocalizableInfo);
 
 		WriteAppLocalizableAttribute(filePropRoot, aDocument, filePropIter->iLocalizableAttribute);
 		WriteAppLocalizableViewData(filePropRoot, aDocument, filePropIter->iViewData);
@@ -354,18 +493,20 @@
 	std::vector<AppLocalizableAttribute>::const_iterator filePropIter;
 	for( filePropIter = aAppLocalizableAttribute.begin() ; filePropIter != aAppLocalizableAttribute.end() ; ++filePropIter)
 	{
-		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, L"LocalizableAttribute");
-		DOMElement* filePropValueRoot = AddTag(filePropRoot, aDocument, L"LocalizableAttribute_Value");
+		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, KLocalizableAttribute);
+		DOMElement* filePropValueRoot = AddTag(filePropRoot, aDocument, KLocalizableAttribute_Value);
 
+		XercesString value = WStringToXercesString(filePropIter->iValue);
 		if(filePropIter->iIsIntValue)
 		{
-			AddChildElement(filePropValueRoot, aDocument, L"LocalizableAttribute_IntValue", filePropIter->iValue.c_str());
+			AddChildElement(filePropValueRoot, aDocument, KLocalizableAttribute_IntValue, value.c_str());
 		}
 		else
 		{
-			AddChildElement(filePropValueRoot, aDocument, L"LocalizableAttribute_StrValue", filePropIter->iValue.c_str());
+			AddChildElement(filePropValueRoot, aDocument, KLocalizableAttribute_StrValue, value.c_str());
 		}
-		filePropRoot->setAttribute(L"Name", filePropIter->iName.c_str());
+		XercesString name = WStringToXercesString(filePropIter->iName);
+		filePropRoot->setAttribute(KName, name.c_str());
 	}
 }
 
@@ -382,7 +523,7 @@
 	 std::vector<AppViewData>::const_iterator filePropIter;
 	 for( filePropIter = aAppViewData.begin() ; filePropIter != aAppViewData.end() ; ++filePropIter)
 	 {
-		 DOMElement* filePropRoot = AddTag(aRootElement, aDocument, L"ViewData");
+		 DOMElement* filePropRoot = AddTag(aRootElement, aDocument, KViewData);
 		 WriteAppLocalizableViewDataAttributes(filePropRoot, aDocument, filePropIter->iViewDataAttributes);
 	 }
  }
@@ -396,18 +537,23 @@
 	 std::vector<AppViewDataAttributes>::const_iterator filePropIter;
 	 for( filePropIter = aAppViewDataAttributes.begin() ; filePropIter != aAppViewDataAttributes.end() ; ++filePropIter)
 	 {
-		 DOMElement* filePropRoot = AddTag(aRootElement, aDocument, L"ViewDataAttribute");
-		 DOMElement* filePropValueRoot = AddTag(filePropRoot, aDocument, L"ViewData_Value");
+		 DOMElement* filePropRoot = AddTag(aRootElement, aDocument, KViewDataAttribute);
+		 DOMElement* filePropValueRoot = AddTag(filePropRoot, aDocument, KViewData_Value);
  
+		 XercesString value = WStringToXercesString(filePropIter->iValue);
 		 if(filePropIter->iIsIntValue)
 		 {
-			 AddChildElement(filePropValueRoot, aDocument, L"ViewData_IntValue", filePropIter->iValue.c_str());
+			 AddChildElement(filePropValueRoot, aDocument, KViewData_IntValue, value.c_str());
+
 		 }
 		 else
 		 {
-			 AddChildElement(filePropValueRoot, aDocument, L"ViewData_StrValue", filePropIter->iValue.c_str());
+			 AddChildElement(filePropValueRoot, aDocument, KViewData_StrValue, value.c_str());
+
 		 }
-		 filePropRoot->setAttribute(L"Name", filePropIter->iName.c_str());
+
+		 XercesString name = WStringToXercesString(filePropIter->iName);
+		 filePropRoot->setAttribute(KName, name.c_str());
 	 }
  }
 
@@ -426,10 +572,11 @@
 	std::vector<AppOpaqueDataType>::const_iterator fileAppPropIter;
 	for( filePropIter = aAppServiceInfo.begin() ; filePropIter != aAppServiceInfo.end() ; ++filePropIter)
 	{
-		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, L"ApplicationServiceInfo");
+		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, KApplicationServiceInfo);
 	
-		std::wstring iUid = Utils::IntegerToWideString(filePropIter->iUid);
-		AddChildElement(filePropRoot,aDocument, L"Uid", iUid.c_str());
+		XercesString uid = IntegerToXercesString(filePropIter->iUid);
+		AddChildElement(filePropRoot,aDocument, KUid, uid.c_str());
+
 
 		for( fileAppPropIter = aAppOpaqueData.begin() ; fileAppPropIter != aAppOpaqueData.end() ; ++fileAppPropIter)
 		{
@@ -437,10 +584,13 @@
 			{
 				if(!fileAppPropIter->iOpaqueData.empty())
 				{
-					DOMElement* filePropValueRoot = AddTag(filePropRoot, aDocument, L"ServiceOpaqueData");
-					AddChildElement(filePropValueRoot,aDocument, L"ServiceData", fileAppPropIter->iOpaqueData.c_str());
-					std::wstring iLocale = Utils::IntegerToWideString(fileAppPropIter->iLocale);
-					AddChildElement(filePropValueRoot,aDocument, L"ServiceOpaqueLocale", iLocale.c_str());
+					DOMElement* filePropValueRoot = AddTag(filePropRoot, aDocument, KServiceOpaqueData);
+
+					XercesString opaqueData = WStringToXercesString(fileAppPropIter->iOpaqueData);
+					AddChildElement(filePropValueRoot,aDocument, KServiceData, opaqueData.c_str());
+
+					XercesString locale = IntegerToXercesString(fileAppPropIter->iLocale);
+					AddChildElement(filePropValueRoot,aDocument, KServiceOpaqueLocale, locale.c_str());
 				}
 			}
 		}
@@ -462,11 +612,13 @@
 	std::vector<AppDataType>::const_iterator filePropIter;
 	for( filePropIter = aAppDataType.begin() ; filePropIter != aAppDataType.end() ; ++filePropIter)
 	{
-		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, L"ApplicationDataType");
+		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, KApplicationDataType);
 
-		std::wstring iPriority = Utils::IntegerToWideString(filePropIter->iPriority);
-		AddChildElement(filePropRoot,aDocument, L"Priority", iPriority.c_str());
-		AddChildElement(filePropRoot, aDocument, L"Type", filePropIter->iType.c_str());
+		XercesString priority = IntegerToXercesString(filePropIter->iPriority);
+		AddChildElement(filePropRoot,aDocument, KPriority, priority.c_str());
+
+		XercesString type = WStringToXercesString(filePropIter->iType);
+		AddChildElement(filePropRoot, aDocument, KType, type.c_str());
 	}
 }
 
@@ -483,18 +635,22 @@
 	std::vector<ApplicationAttribute>::const_iterator filePropIter;
 	for( filePropIter = aAppAttributes.begin() ; filePropIter != aAppAttributes.end() ; ++filePropIter)
 	{
-		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, L"ApplicationAttribute");
-		DOMElement* filePropValueRoot = AddTag(filePropRoot, aDocument, L"ApplicationAttribute_Value");
+		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, KApplicationAttribute);
 
+		DOMElement* filePropValueRoot = AddTag(filePropRoot, aDocument, KApplicationAttribute_Value);
+
+		XercesString value = WStringToXercesString(filePropIter->iValue);
 		if(filePropIter->iIsIntValue)
 		{
-			AddChildElement(filePropValueRoot, aDocument, L"ApplicationAttribute_IntValue", filePropIter->iValue.c_str());
+			AddChildElement(filePropValueRoot, aDocument, KApplicationAttribute_IntValue, value.c_str());
 		}
 		else
 		{
-			AddChildElement(filePropValueRoot, aDocument, L"ApplicationAttribute_StrValue", filePropIter->iValue.c_str());
+			AddChildElement(filePropValueRoot, aDocument, KApplicationAttribute_StrValue, value.c_str());
 		}
-		filePropRoot->setAttribute(L"Name", filePropIter->iName.c_str());
+
+		XercesString name = WStringToXercesString(filePropIter->iName);
+		filePropRoot->setAttribute(KName, name.c_str());
 	}
 }
 
@@ -510,25 +666,25 @@
 	std::vector<AppProperty>::const_iterator filePropIter;
 	for( filePropIter = aAppProperty.begin() ; filePropIter != aAppProperty.end() ; ++filePropIter)
 	{
-		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, L"ApplicationProperty");
-
+		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, KApplicationProperty);
 
-		std::wstring iLocale = Utils::IntegerToWideString(filePropIter->iLocale);
-		AddChildElement(filePropRoot,aDocument, L"Locale", iLocale.c_str());
+		XercesString locale = IntegerToXercesString(filePropIter->iLocale);
+		AddChildElement(filePropRoot,aDocument, KLocale, locale.c_str());
 
-		AddChildElement(filePropRoot,aDocument, L"Name", filePropIter->iName.c_str());
+		XercesString name = WStringToXercesString(filePropIter->iName);
+		AddChildElement(filePropRoot,aDocument, KName, name.c_str());
 
-		std::wstring iServiceUid = Utils::IntegerToWideString(filePropIter->iServiceUid);
-		AddChildElement(filePropRoot,aDocument, L"ServiceUid", iServiceUid.c_str());
+		XercesString serviceUid = IntegerToXercesString(filePropIter->iServiceUid);
+		AddChildElement(filePropRoot,aDocument, KServiceUid, serviceUid.c_str());
 
-		std::wstring iIntValue = Utils::IntegerToWideString(filePropIter->iIntValue);
-		AddChildElement(filePropRoot,aDocument, L"IntValue", iIntValue.c_str());
+		XercesString intValue = IntegerToXercesString(filePropIter->iIntValue);
+		AddChildElement(filePropRoot,aDocument, KIntValue, intValue.c_str());
 
-		AddChildElement(filePropRoot, aDocument, L"StrValue", filePropIter->iStrValue.c_str());
+		XercesString strValue = WStringToXercesString(filePropIter->iStrValue);
+		AddChildElement(filePropRoot, aDocument, KStrValue, strValue.c_str());
 
-		std::wstring iIsStr8Bit = Utils::IntegerToWideString(filePropIter->iIsStr8Bit);
-		AddChildElement(filePropRoot,aDocument, L"IsStr8Bit", iIsStr8Bit.c_str());
-
+		XercesString isStr8Bit = IntegerToXercesString(filePropIter->iIsStr8Bit);
+		AddChildElement(filePropRoot,aDocument, KIsStr8Bit, isStr8Bit.c_str());
 	}
 }
 
@@ -541,11 +697,11 @@
 	std::vector<ComponentFile>::const_iterator compFileIter;
 	for( compFileIter = aComponentFiles.begin() ; compFileIter != aComponentFiles.end() ; ++compFileIter)
 		{
-		DOMElement* compFileRoot = AddTag(aRootElement, aDocument, L"ComponentFile");
+		DOMElement* compFileRoot = AddTag(aRootElement, aDocument, KComponentFile);
 
 		WriteFileProperties(compFileRoot, aDocument, compFileIter->iFileProperties);
 		
-		compFileRoot->setAttribute(L"Location", compFileIter->iLocation.c_str());
+		compFileRoot->setAttribute(KLocation, compFileIter->Location().c_str());
 		}
 	}
 
@@ -558,18 +714,18 @@
 	std::vector<FileProperty>::const_iterator filePropIter;
 	for( filePropIter = aFileProperties.begin() ; filePropIter != aFileProperties.end() ; ++filePropIter)
 		{
-		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, L"FileProperty");
-		DOMElement* filePropValueRoot = AddTag(filePropRoot, aDocument, L"FileProperty_Value");
+		DOMElement* filePropRoot = AddTag(aRootElement, aDocument, KFileProperty);
+		DOMElement* filePropValueRoot = AddTag(filePropRoot, aDocument, KFileProperty_Value);
 
 		if(filePropIter->iIsIntValue)
 			{
-			AddChildElement(filePropValueRoot, aDocument, L"FileProperty_IntValue", filePropIter->iValue.c_str());
+			AddChildElement(filePropValueRoot, aDocument, KFileProperty_IntValue, filePropIter->Value().c_str());
 			}
 		else
 			{
-			AddChildElement(filePropValueRoot, aDocument, L"FileProperty_StrValue", filePropIter->iValue.c_str());
+			AddChildElement(filePropValueRoot, aDocument, KFileProperty_StrValue, filePropIter->Value().c_str());
 			}
-		filePropRoot->setAttribute(L"Name", filePropIter->iName.c_str());
+		filePropRoot->setAttribute(KName, filePropIter->Name().c_str());
 		}
 	}
 
@@ -587,20 +743,20 @@
 	std::vector<ComponentDependencyDetail> componentDependencyList = aComponentDependency.iComponentDependencyList;
 	std::vector<ComponentDependencyDetail>::const_iterator compDepIter;
 
-	DOMElement* compDepRoot = AddTag(aRootElement, aDocument, L"ComponentDependency");
+	DOMElement* compDepRoot = AddTag(aRootElement, aDocument, KComponentDependency);
 
 	for( compDepIter = componentDependencyList.begin() ; compDepIter != componentDependencyList.end() ; ++compDepIter)
 		{
-		DOMElement* compDepListRoot = AddTag( compDepRoot, aDocument, L"DependencyList" );
-		AddChildElement( compDepListRoot, aDocument, L"SupplierId", compDepIter->iSupplierId.c_str() );
-		AddChildElement( compDepListRoot, aDocument, L"FromVersion", compDepIter->iFromVersion.c_str() );
-		AddChildElement( compDepListRoot, aDocument, L"ToVersion", compDepIter->iToVersion.c_str() );
+		DOMElement* compDepListRoot = AddTag( compDepRoot, aDocument, KDependencyList );
+		AddChildElement( compDepListRoot, aDocument, KSupplierId, compDepIter->SupplierId().c_str() );
+		AddChildElement( compDepListRoot, aDocument, KFromVersion, compDepIter->FromVersion().c_str() );
+		AddChildElement( compDepListRoot, aDocument, KToVersion, compDepIter->ToVersion().c_str() );
 		}
-	compDepRoot->setAttribute(L"DependentId", aComponentDependency.iDependentId.c_str());
+	compDepRoot->setAttribute(KDependentId, aComponentDependency.DependentId().c_str());
 	}
 
 
-void CXmlGenerator::AddChildElement( DOMElement* aRootElement, DOMDocument* aDocument, const wchar_t* aElementName, const wchar_t* aTextValue )
+void CXmlGenerator::AddChildElement( DOMElement* aRootElement, DOMDocument* aDocument, const XMLCh* aElementName, const XMLCh* aTextValue )
 	{
 	DOMElement*  element = aDocument->createElement(aElementName);
 	aRootElement->appendChild(element);
@@ -609,7 +765,7 @@
 	element->appendChild(textValue);
 	}
 
-DOMElement* CXmlGenerator::AddTag( DOMElement* aRootElement, DOMDocument* aDocument, const wchar_t* aTagName)
+DOMElement* CXmlGenerator::AddTag( DOMElement* aRootElement, DOMDocument* aDocument, const XMLCh* aTagName)
 	{
 	DOMElement*  tagName = aDocument->createElement(aTagName);
 	aRootElement->appendChild(tagName);
@@ -623,6 +779,8 @@
  */
 bool SchemaDomErrorHandler::handleError(const DOMError& domError)
 	{
-	const XMLCh* message = domError.getMessage();
+	const XMLCh* message = domError.getMessage();	
 	return false;
 	}
+
+
--- a/secureswitools/swisistools/source/interpretsislib/xmlgenerator.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/xmlgenerator.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -201,19 +201,18 @@
 		void AddChildElement(	
 								XERCES_CPP_NAMESPACE::DOMElement* aRootElement, 
 								XERCES_CPP_NAMESPACE::DOMDocument* aDocument, 
-								const wchar_t* aElementName, 
-								const wchar_t* aTextValue 
+								const XMLCh* aElementName, 
+								const XMLCh* aTextValue 
 							);
 
 		XERCES_CPP_NAMESPACE::DOMElement* AddTag	
 							(	
 								XERCES_CPP_NAMESPACE::DOMElement* aRootElement, 
 								XERCES_CPP_NAMESPACE::DOMDocument* aDocument, 
-								const wchar_t* aTagName
+								const XMLCh* aTagName
 							);
 
 		void SetWriterFeatures(XERCES_CPP_NAMESPACE::DOMWriter* aDomWriter);
-
 	};
 
 
--- a/secureswitools/swisistools/source/rscparser/aplappinforeader.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/rscparser/aplappinforeader.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -42,7 +42,11 @@
 
 const TUint KResourceOffsetMask = 0xFFFFF000;
 
+#ifdef __LINUX__
+std::string KAppBinaryPathAndExtension("/sys/bin/.exe");
+#else
 std::string KAppBinaryPathAndExtension("\\sys\\bin\\.exe");
+#endif
 
 const TInt KAppRegistrationInfoResourceId = 1;
 
@@ -54,7 +58,11 @@
 */
 std::string KAppResourceFileExtension(".rsc");
 
+#ifdef __LINUX__
+std::string KLitPathForUntrustedRegistrationResourceFiles("/private/10003a3f/import/apps/");
+#else
 std::string KLitPathForUntrustedRegistrationResourceFiles("\\private\\10003a3f\\import\\apps\\");
+#endif
 
 //
 // CAppInfoReader
@@ -198,6 +206,7 @@
 {
 	Ptr16* iconFileName = iIconFileName;
 	iIconFileName = NULL; // ownership transferred to caller
+	ConvertToPlatformSpecificPath(iconFileName->GetPtr(), iconFileName->GetLength());
 	return iconFileName;
 }
 
@@ -442,11 +451,22 @@
 		size_t found;
 		std::string iLocalPath(iDrivePath);
 
-	  	found=localizeFileName.find_last_of("/\\");
+		#ifdef __LINUX__
+	  	found=localizeFileName.find_last_of("//");
+		#else
+		found=localizeFileName.find_last_of("/\\");
+		#endif
+
 	  	if(found)
 	  		folder = localizeFileName.substr(0,found);
 	  	else
-	  		folder.assign("\\");
+		{
+			#ifdef __LINUX__
+			folder.assign("/");	  		
+			#else
+			folder.assign("\\");
+			#endif
+		}
 	  	
 	  	file = localizeFileName.substr(found+1);
 		file.append(".");
@@ -455,8 +475,13 @@
 				
 		std::wstring iFilePath = string2wstring(iLocalPath);
 		std::wstring iFileName = string2wstring(file);
+
+		#ifdef __LINUX__
+		iLocalPath.append("/");
+		#else
 		iLocalPath.append("\\");
-
+		#endif
+		
 		std::list<std::wstring> locDirs;
 		GetDirContents( iFilePath, locDirs );
 
@@ -468,7 +493,7 @@
 			    std::string fName;
 				std::string sAbsolutePath;
 				sAbsolutePath.assign(iLocalPath);
-			 	fName = Ucs2ToUtf8( *curr );
+			 	fName = wstring2string( *curr );
 
 			   	sAbsolutePath.append(fName);
 				//cout << sAbsolutePath<<endl;
@@ -537,12 +562,15 @@
 
 	// read LTEXT app_file
 	PtrC16* appFile = aResourceReader.ReadTPtrCL();
+
 	if(NULL==appFile)
 	{
-		std::string errMsg= "Failed : Invalid Resource File Name. Application File Name is Mendatory.";
+		std::string errMsg= "Failed : Invalid Resource File Name. Application File Name is Mandatory.";
 		throw CResourceFileException(errMsg);
 	}
 
+	ConvertToPlatformSpecificPath(appFile->iPtr, appFile->iMaxLength);
+
 	TInt err=0;
 	// this object gets used for 2 purposes: first to check that a ParsePtrC can be created over "appFile" without it panicking, and second to construct iAppBinaryFullName
 	err = FindWild(appFile); // do this before creating a TParsePtrC, since TParsePtrC's constructor panics if it fails (which would provide an easy way for malware to kill the Apparc server)
@@ -653,6 +681,7 @@
 	filename = new Ptr16(aIconFileName->iMaxLength);
 	if(NULL==filename || NULL == filename->GetPtr())
 	{
+		parsePtr.SetToNull();
 		std::string errMsg= "Failed : Error in Reading File. Memory Allocation Failed";
 		throw CResourceFileException(errMsg);
 	}
@@ -763,8 +792,10 @@
 	// read LTEXT icon_file
 	iIconFileName = NULL;
 	PtrC16* iconFile = resourceReader.ReadTPtrCL();
+
 	if(NULL != iconFile)
 	{
+		ConvertToPlatformSpecificPath(iconFile->iPtr, iconFile->iMaxLength);
 		Ptr16*	iconFileName = CreateFullIconFileNameL(iconFile);
 		
 		if (iconFileName)
@@ -845,11 +876,22 @@
 				size_t find;
 				std::string iLocalPath(iDrivePath);
 		
+				#ifdef __LINUX__
+				found=localizeFileName.find_last_of("//");
+				#else
 				found=localizeFileName.find_last_of("/\\");
+				#endif
+
 				if(found)
 					folder = localizeFileName.substr(0,found);
 				else
+				{
+					#ifdef __LINUX__
+					folder.assign("/");
+					#else
 					folder.assign("\\");
+					#endif					
+				}
 			
 				file = localizeFileName.substr(found+1);
 				file.append(".");
@@ -858,7 +900,12 @@
 					
 				std::wstring iFilePath = string2wstring(iLocalPath);
 				std::wstring iFileName = string2wstring(file);
+				#ifdef __LINUX__
+				iLocalPath.append("/");
+				#else
 				iLocalPath.append("\\");
+				#endif
+
 		
 				std::list<std::wstring> locDirs;
 				GetDirContents( iFilePath, locDirs );
@@ -872,7 +919,7 @@
 						std::string sAbsolutePath;
 						std::string Locale;
 						sAbsolutePath.assign(iLocalPath);
-						fName = Ucs2ToUtf8( *curr );
+						fName = wstring2string( *curr );
 
 						find=fName.rfind("backup");
 						if(find != string::npos)
@@ -1065,12 +1112,14 @@
 {
 	// read LTEXT localisable_resource_file
 	PtrC16*	localisableResourceFileName = aResourceReader.ReadTPtrCL();
+
 	if(NULL == localisableResourceFileName)
 	{
 		iLocalisableResourceFileName = NULL;
 	}
 	else
 	{
+		ConvertToPlatformSpecificPath(localisableResourceFileName->iPtr, localisableResourceFileName->iMaxLength);
 		if (localisableResourceFileName->iMaxLength > 0 )
 		{
 			ParsePtrC parsePtr(localisableResourceFileName);
@@ -1078,6 +1127,7 @@
 			if(parsePtr.IsValidName())
 			{
 				iLocalisableResourceFileName = NULL;
+				parsePtr.SetToNull();	//To Avoid double Delete in destructor.
 				std::string errMsg= "Failed : Invalid localisable Resource File Name";
 				throw CResourceFileException(errMsg);
 			}
@@ -1090,10 +1140,12 @@
 
 			TInt err=0;
 			std::string sTemp = parsePtr.StrName();
+
 			err = FindWild(registrationFileDrive, KAppResourceFileExtension, sTemp);
 			if(err==1)
 			{
 				std::string errMsg= "Failed : Invalid drive for Registration File";
+				parsePtr.SetToNull();	//To Avoid double Delete in destructor.
 				throw CResourceFileException(errMsg);
 			}
 
@@ -1101,6 +1153,7 @@
 			if(NULL==iLocalisableResourceFileName || NULL==iLocalisableResourceFileName->GetPtr())
 			{
 				std::string errMsg= "Failed : Error in Reading File. Memory Allocation Failed";
+				parsePtr.SetToNull();	//To Avoid double Delete in destructor.
 				throw CResourceFileException(errMsg);
 			}
 
@@ -1119,6 +1172,7 @@
 	iCapability.iLaunchInBackground = aResourceReader.ReadInt8L();
 
 	PtrC16* iTemp = aResourceReader.ReadTPtrCL();
+
 	if(NULL==iTemp || NULL==iTemp->iPtr)
 		iCapability.iGroupName = NULL;
 	else 
@@ -1198,8 +1252,10 @@
 	for (TInt i=0; i < fileOwnershipArraySize; i++)
 	{
 		PtrC16* fileNamePtr_temp = aResourceReader.ReadTPtrCL();
+
 		if(NULL != fileNamePtr_temp)
 		{
+			ConvertToPlatformSpecificPath(fileNamePtr_temp->iPtr, fileNamePtr_temp->iMaxLength);
 			Ptr16* fileNamePtr = new Ptr16(fileNamePtr_temp->iMaxLength);
 			if(NULL==fileNamePtr || NULL==fileNamePtr->GetPtr())
 			{
@@ -1208,6 +1264,7 @@
 			}
 			fileNamePtr->UpdateLength(fileNamePtr_temp->iMaxLength);			  
 			BufCpy(fileNamePtr->GetPtr(),fileNamePtr_temp->iPtr,fileNamePtr_temp->iMaxLength);
+
 			iOwnedFileArray->push_back(fileNamePtr);
 		}
 		else
@@ -1297,6 +1354,7 @@
 	    }
 
 		PtrC8* dataTypePtr  = aResourceReader.ReadTPtrC8L();
+
 		if(NULL != dataTypePtr)
 		{
 			TDataType* dataType = new TDataType(dataTypePtr);
--- a/secureswitools/swisistools/source/rscparser/aplapplistitem.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/rscparser/aplapplistitem.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -226,6 +226,7 @@
 
 		// read LTEXT caption
 		PtrC16* viewCaption = aResourceReader.ReadTPtrCL();
+
 		if(NULL != viewCaption)
 		{
 			viewData->SetCaptionL(viewCaption);
@@ -239,9 +240,10 @@
 
 		// read LTEXT icon_file
 		PtrC16* viewIconFile = aResourceReader.ReadTPtrCL();
+
 		if(NULL != viewIconFile)
 		{
-
+			ConvertToPlatformSpecificPath(viewIconFile->iPtr, viewIconFile->iMaxLength);
 			Ptr16*	fullViewIconFileName = ViewDataIconFileNameL(viewIconFile);
 			if (fullViewIconFileName)
 			{
@@ -287,12 +289,17 @@
 	 * aIconFileName will be returned since it is a valid string. 
 	 */	
 	ParsePtrC parsePtr(aIconFileName);
-	if (parsePtr.IsWild() || !parsePtr.PathPresent() || !parsePtr.NamePresent())
+
+	if ( parsePtr.IsWild() || !parsePtr.PathPresent() || !parsePtr.NamePresent() )
+	{
+		parsePtr.SetToNull();
 		return NULL;
+	}
 
 	filename = new Ptr16(aIconFileName->iMaxLength);
 	if(NULL==filename || NULL == filename->GetPtr())
 	{
+		parsePtr.SetToNull();
 		std::string errMsg= "Failed : Error in Reading File. Memory Allocation Failed";
 		throw CResourceFileException(errMsg);
 	}
--- a/secureswitools/swisistools/source/rscparser/apsecutils.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/rscparser/apsecutils.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -114,7 +114,12 @@
 
 	std::string Filename = Ptr16ToString(&aAppFilename);
 	std::string Path(aDerivedPath);
+	#ifdef __LINUX__
+	Path.append("/sys/bin/");
+	#else
 	Path.append("\\sys\\bin\\");
+	#endif
+
 	Path.append(Filename);
 	Path.append(".exe");
 	
--- a/secureswitools/swisistools/source/rscparser/apsecutils.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/rscparser/apsecutils.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
--- a/secureswitools/swisistools/source/rscparser/dirparse.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/rscparser/dirparse.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -310,9 +310,17 @@
 
 	componentData.iLocale = aLocale;
 	componentData.iServiceUid = aServUid;
-	componentData.iOpaqueData = aStrValue;
 
-	aAppOpaqueData.iOpaqueDataType.push_back(componentData);
+	/* 
+	 * Under LINUX : The OpaqueData which is read from the resource file will be in UTF-16 format contained
+	 *               in a std::wstring. So, we need to convert it back to UTF-32 format which is the format
+	 *               of LINUX specific std::wstring.
+     * 
+	 * Under WINDOWS : Nothing needs to be done and this is taken care of by XercesStringToWString()
+	 *				   which is platform specific.	
+	 */
+	 componentData.iOpaqueData = XercesStringToWString(reinterpret_cast<const XMLCh*>(aStrValue.c_str()));
+	 aAppOpaqueData.iOpaqueDataType.push_back(componentData);
 }
 
 /**
@@ -326,10 +334,18 @@
 		aParamList->IsFlagSet(CParameterList::EFlagsDisableZDriveChecksSet) 
 		)
 		{
+			#ifdef __LINUX__
+			return wstring2string(aParamList->SystemDrivePath()) + "/sys/install/scr/scr.db";
+			#else
 			return wstring2string(aParamList->SystemDrivePath()) + "\\sys\\install\\scr\\scr.db";
+			#endif
 		}
 
+	#ifdef __LINUX__
+	return wstring2string(aParamList->RomDrivePath()) + "/sys/install/scr/provisioned/scr.db";
+	#else
 	return wstring2string(aParamList->RomDrivePath()) + "\\sys\\install\\scr\\provisioned\\scr.db";
+	#endif
 }
 
 /**
@@ -346,7 +362,12 @@
 	int isRomApplication = 1;
 	xmlGenerator.WritePreProvisionDetails(filename , aScrPreProvisionDetail, isRomApplication);						
 
+	#ifdef __LINUX__
+	std::string executable = "scrtool";
+	#else 
 	std::string executable = "scrtool.exe";
+	#endif
+
 	std::string command;
 
 	command = executable + " -d " + GetDbPath(aParamList) + " -p " + tmpFileName;
@@ -517,13 +538,21 @@
 	{
 		size_t found;
 		std::string folder;
+		#ifdef __LINUX__
+		found=aFileName.find("private/10003a3f/");
+		#else
 		found=aFileName.find("private\\10003a3f\\");
+		#endif
 
 		if( found != string::npos )
 			folder = aFileName.substr(0,found);
 		else
 		{
+				#ifdef __LINUX__
+				std::string errMsg= "Failed : Resource File Path should contain /private/10003a3f/";
+				#else
 				std::string errMsg= "Failed : Resource File Path should contain \\private\\10003a3f\\";
+				#endif
 				throw CResourceFileException(errMsg);
 		}
 
@@ -606,7 +635,11 @@
 	else
 	{
 		 aFilePath = aParamList->RomDrivePath();
+		 #ifdef __LINUX__
+		 aFilePath.append(L"/private/10003a3f/apps");
+		 #else
 		 aFilePath.append(L"\\private\\10003a3f\\apps");
+		 #endif
 	}
 
 	int iCount = 0;
@@ -625,9 +658,14 @@
 			{
 				iCount++;
 			    std::string fName;
-		        fName = Ucs2ToUtf8( *curr );
+		        fName = wstring2string( *curr );
 				std::string FilePath = wstring2string(aFilePath);
+				#ifdef __LINUX__				
+				FilePath.append("/");
+				#else
 				FilePath.append("\\");
+				#endif
+
 				FilePath.append(fName);
 				std::cout<<"Parsing - "<<fName<<" ";
 				ReadApplicationInformationFromResourceFilesL(scrPreProvisionDetail,FilePath,aParamList,aInterpretSis,iNewFileFlag);
@@ -645,7 +683,7 @@
 		UpdateInstallationInformation_xml(aParamList,scrPreProvisionDetail);
 	
 	if(!iCount)
-		LERROR(L"Failed : No Resource File in the Directory Specified - ");
+		LINFO(L"No Resource File in the Directory Specified - ");
 }
 
 /**
@@ -653,15 +691,28 @@
  */
 void BackupHashForFile(const std::wstring& aFile, const int aDriveLetter, const std::wstring& aPath)
 {
+	#ifdef __LINUX__
+	std::wstring hashdir = L"$:/sys/hash/";
+	#else
 	std::wstring hashdir = L"$:\\sys\\hash\\";
+	#endif
+
 	std::wstring basename = aFile.substr( aFile.rfind( KDirectorySeparator ) + 1) ;
 	if (basename.size() == 0)
 	{
+		#ifdef __LINUX__
+		basename = aFile.substr(aFile.rfind(L"/"));
+		#else
 		basename = aFile.substr(aFile.rfind(L"\\"));
+		#endif
 	}
 
 	hashdir[0] = aDriveLetter;
+	#ifdef __LINUX__
+	std::wstring hashFile = aPath + L"/sys/hash/" + basename;
+	#else
 	std::wstring hashFile = aPath + L"\\sys\\hash\\" + basename;
+	#endif
 
 	if (FileExists(hashFile))
 	{
@@ -670,7 +721,7 @@
 		iBackupFile.append("_backup");
 
 		int err=FileCopyA(iLocalFile.c_str(),iBackupFile.c_str(),0);
-		if (err == 0)
+		if (err != 0)
 			LERROR(L"Failed to Backup hash file ");
 	}
 }
@@ -680,15 +731,27 @@
  */
 void RestoreHashForFile(const std::wstring& aFile, const int aDriveLetter, const std::wstring& aPath)
 {
+	#ifdef __LINUX__
+	std::wstring hashdir = L"$:/sys/hash/";
+	#else
 	std::wstring hashdir = L"$:\\sys\\hash\\";
+	#endif
 	std::wstring basename = aFile.substr( aFile.rfind( KDirectorySeparator ) + 1) ;
 	if (basename.size() == 0)
 	{
+		#ifdef __LINUX__
+		basename = aFile.substr(aFile.rfind(L"/"));
+		#else
 		basename = aFile.substr(aFile.rfind(L"\\"));
+		#endif
 	}
 
 	hashdir[0] = aDriveLetter;
+	#ifdef __LINUX__
+	std::wstring hashFile = aPath + L"/sys/hash/" + basename;
+	#else
 	std::wstring hashFile = aPath + L"\\sys\\hash\\" + basename;
+	#endif	
 	std::wstring LocalFile(hashFile);
 	hashFile.append(L"_backup");
 
@@ -698,9 +761,8 @@
 		std::string iBackupFile = wstring2string(hashFile);
 
 		int err = FileMoveA(iBackupFile.c_str(),iLocalFile.c_str());
-
-		if (err == 0)
-			LERROR(L"Failed to Restore hash file ");
+		if (err != 0)
+		    LERROR(L"Failed to Restore hash file ");
 	}
 }
 
@@ -715,7 +777,12 @@
  */ 
 
 // Constants
+#ifdef __LINUX__
+const std::wstring KSisDirectorySeparatortap( L"/" );
+#else
 const std::wstring KSisDirectorySeparatortap( L"\\" );
+#endif
+
 
 int FirstInvalidDirSeparatorSizetap(std::wstring& aPath, std::wstring::size_type& aIndex)
 	{
@@ -723,11 +790,19 @@
 	// then the function will return 0
 	int ret = 0; 
 	int pos = 0;
+	#ifdef __LINUX__
+	if((pos = aPath.find(L"\\\\", aIndex)) != std::wstring::npos)
+	#else
 	if((pos = aPath.find(L"//", aIndex)) != std::wstring::npos)
+	#endif
 		{
 		ret = 2;
 		}
+	#ifdef __LINUX__
+	else if((pos = aPath.find(L"\\", aIndex)) != std::wstring::npos)
+	#else
 	else if((pos = aPath.find(L"/", aIndex)) != std::wstring::npos)
+	#endif
 		{
 		ret = 1;
 		}
--- a/secureswitools/swisistools/source/rscparser/parse.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/rscparser/parse.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -205,7 +205,12 @@
 {
   string iName;
 
+  #ifdef __LINUX__
+  TInt i = Buf->rfind("/");
+  #else
   TInt i = Buf->rfind("\\");
+  #endif
+
   if(i!=string::npos)
      iName.assign(*Buf, i, Buf->size()-4);
   else
@@ -223,7 +228,12 @@
 {
   string iName;
 
+  #ifdef __LINUX__
+  TInt i = Buf->rfind("/");
+  #else
   TInt i = Buf->rfind("\\");
+  #endif
+  
   if(i!=string::npos)
      iName.assign(*Buf, i, Buf->size());
 
@@ -234,7 +244,12 @@
 {
   string iName;
 
+  #ifdef __LINUX__
+  TInt i = Buf->rfind("/");
+  #else
   TInt i = Buf->rfind("\\");
+  #endif
+  
   if(i!=string::npos)
      iName.assign(*Buf, 0, i);
 
@@ -245,8 +260,14 @@
 {
   string iName;
 
+  #ifdef __LINUX__
+  TInt j = Buf->rfind("/");
+  TInt i = Buf->find("/");
+  #else
   TInt j = Buf->rfind("\\");
   TInt i = Buf->find("\\");
+  #endif
+
   if(i!=string::npos)
      iName.assign(*Buf, i, Buf->size()-j);
 
@@ -277,7 +298,12 @@
 
 TInt ParsePtrC::NamePresent()
 {
+	#ifdef __LINUX__
+	TInt i = Buf->rfind("/");
+    #else
 	TInt i = Buf->rfind("\\");
+    #endif
+
 	if(i!=string::npos)
 		iNamePresent = 1;
 	else
@@ -292,7 +318,12 @@
 
 TInt ParsePtrC::PathPresent()
 {
+	#ifdef __LINUX__
+	TInt i = Buf->find("/");
+	#else
 	TInt i = Buf->find("\\");
+	#endif
+
 	if(i!=string::npos)
 		iPathPresent = 1;
 	else
@@ -330,7 +361,12 @@
 
 TInt ParsePtrC::IsValidName()
 {
-	string::size_type index = Buf->find_last_of("*?< > : \" / |");
+	#ifdef __LINUX__
+	    string::size_type index = Buf->find_last_of("*?< > : \" \\ |");
+	#else
+	    string::size_type index = Buf->find_last_of("*?< > : \" |");
+	#endif
+
 	if( index != string::npos )
 		return 1;
 	return 0;
--- a/secureswitools/swisistools/source/scrtool/main.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/scrtool/main.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -37,7 +37,7 @@
 
 	try
 		{
-		const char* epocRoot = getenv("EPOCROOT");
+		const char* epocRoot = getenv("EPOCROOT");		
 		if(NULL == epocRoot)
 			{
 			throw CException("EPOCROOT environment variable not specified.", ExceptionCodes::EEnvNotSpecified);
@@ -49,13 +49,23 @@
 		std::string logFileName(options.GetLogFileName());
 		std::auto_ptr<CLogger> logger(new CLogger(logFileName, options.GetLogLevel()));
 		
-		std::string dllPath = "sqlite3.dll";
+   #ifdef __LINUX__
+  	  	 std::string dllPath = "sqlite-3.6.1.so";
+   #else
+ 	       std::string dllPath = "sqlite3.dll";
+   #endif
+  	  	 	 
 		std::auto_ptr<CDbLayer> db( new CDbLayer(dllPath, options.GetDbFileName()));
 		std::auto_ptr<CScrXmlParser> xmlParser( new CScrXmlParser());
 
 		if(options.IsDbAbsent())
 			{
+		  #ifdef __LINUX__ 		  
+			std::string dbFileName = epocRootStr + "epoc32/tools/create_db.xml";
+			#else
 			std::string dbFileName = epocRootStr + "epoc32\\tools\\create_db.xml";
+			#endif
+			
 			std::auto_ptr<SchemaDetails> schema(xmlParser->ParseDbSchema(dbFileName));
 			db->CreateScrDatabase(*schema);
 			}
--- a/secureswitools/swisistools/source/signsis/parameter.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/signsis/parameter.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -58,10 +58,22 @@
 
 	for (int index = 1; index < argc; index++)
 		{
-		if (	(argv [index][0] == '-') ||
-				(argv [index][0] == '/'))
+ 			// WINDOWS ENVIRONMENT : If the underlying platform is WINDOWS then, 
+ 			// cope up with multiple arguments following the '-' or '/'. 
+ 			//
+ 			// LINUX ENVIRONMENT : If the underlying platform is LINUX then, cope 
+ 			// up with multiple arguments following only the '-'. This restriction 
+ 			// of not dealing with arguments following '/' is due to the fact that, 
+ 			// the absolute paths in case of LINUX start with a '/'. So, this could 
+ 			// be mistaken as an option if we treat anything prefixed by a '/' as 
+ 			// an option. Hence, this facility is being removed once for all and 
+ 			// only '-' can(should) be used for specifying an option.
+		    if (	   (argv [index][0] == '-')   
+#ifndef __LINUX__			
+				    || (argv [index][0] == '/')
+#endif
+			   )
 			{
- 			// cope with multiple arguments following the '-' or '/'
  			int wCharacter = 1;
  			while (argv[index][wCharacter] !='\0')
 				{
@@ -379,7 +391,7 @@
 	{
 	std::cout << std::endl << "SIGNSIS  " << " Version  5.1" << std::endl;
 	std::cout << "A utility for signing Software Installation (SIS) files." << std::endl;
-	std::cout << "Copyright (c) 2007 Symbian Software Ltd. All rights reserved. " << std::endl;
+	std::cout << "Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved." << std::endl;
 #ifdef _DEBUG
 	std::cout << std::endl << "Development Version" << std::endl;
 #endif
--- a/secureswitools/swisistools/source/signsislib/sissignature.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/signsislib/sissignature.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -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 the License "Eclipse Public License v1.0"
@@ -427,6 +427,7 @@
 					std::cout << ERR_error_string (ERR_get_error (), NULL);
 					}
 				BIO_free(mem);
+				mem = NULL;
 				RSA_free (rsa);
 				}
 			else
@@ -451,6 +452,7 @@
 				{
 				std::cout << ERR_error_string (ERR_get_error (), NULL);
 				BIO_free(mem);
+				mem = NULL;
 				DSA_free (dsa);
 				}
 			else
--- a/secureswitools/swisistools/source/sisxlibrary/siscapabilities.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/siscapabilities.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -78,11 +78,12 @@
 	CSISException::ThrowIf(oldStderr == -1, CSISException::EFileProblem, "Failed in redirection operation");
 
 	#ifdef __TOOLS2_LINUX__
-	nulStderr = fopen("NULL", "w");
+	nulStderr = fopen("/dev/null", "w");
 	#else
 	nulStderr = fopen("NUL:", "w");
 	#endif
 
+
 	CSISException::ThrowIf(nulStderr == NULL, CSISException::EFileProblem, "Failed in redirection operation");
 
 	CSISException::ThrowIf(_dup2(_fileno(nulStderr), 2) == -1, CSISException::EFileProblem, "Failed in redirection operation");
--- a/secureswitools/swisistools/source/sisxlibrary/sisexpression.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/sisexpression.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -584,7 +584,7 @@
 		return false;
 		}
 
-	std::wistringstream wStrStream(aString);
+	std::wistringstream wStrStream(aString.c_str());
 
 	if((wStrStream >> std::dec >> aDecimalValue) && wStrStream.eof())
 		{
--- a/secureswitools/swisistools/source/sisxlibrary/sisstring.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/sisstring.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -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 the License "Eclipse Public License v1.0"
@@ -29,7 +29,7 @@
 #include "utility.h"
 #include "exception.h"
 #include "utils.h"
-#include "utf8.h"
+#include "utf8_wrapper.h"
 
 // we cannot write or read a string directly from a file, because we don't know what format the
 // MS implementation of STL will use for the std::string. So we need to go via an intemediate buffer.
--- a/secureswitools/swisistools/source/sisxlibrary/sisstring.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/sisstring.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -261,7 +261,7 @@
 		{
 		return true;
 		}
-	return iData.compare (aString) != 0;
+	return wcscmp(iData.c_str(), aString) != 0;
 	}
 
 
@@ -278,7 +278,7 @@
 inline void CSISString::AddPackageEntry(std::wostream& aStream, bool aVerbose) const
 	{
 	(void)aVerbose;
-	aStream << iData;
+	aStream << iData.c_str();
 	}
 
 #endif // __SISSTRING_H__
--- a/secureswitools/swisistools/source/sisxlibrary/utility.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/utility.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -48,7 +48,7 @@
 	}
 
 
-std::string wstring2string (const std::wstring& aWide)
+DllExport std::string wstring2string (const std::wstring& aWide)
 	{
 	int max = ConvertWideCharToMultiByte(aWide.c_str(),aWide.length(),0,0);
 	std::string reply;
@@ -84,8 +84,8 @@
 			{
 			}
 		delete [] buffer;
-		}
-	return reply;
+		}	
+	return reply.c_str();
 	}
 
 void EnsureExtended (std::wstring& aName, const std::wstring& aDefaultExtension)
@@ -382,7 +382,7 @@
         {
 		ret.replace( idx, len, KSisDirectorySeparator );
         }
-    return ret;
+    return ret.c_str();
     }
 
 int GetFileType(std::wstring& aFileName)
--- a/secureswitools/swisistools/source/sisxlibrary/utility.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/utility.h	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -32,6 +32,7 @@
 #include <string>
 #include "basetype.h"
 #include "fieldroot.h"
+#include "../common/toolsconf.h"
 
 #define FreeMemory(x) {if((x) != NULL) {free(x); (x)=NULL;}}
 
@@ -62,7 +63,7 @@
 
 int SearchSortedUCTable (const SIdentifierTable aTable [], const std::wstring& aIdentifier);
 TUint32 IdentifyUCKeyword (const SKeyword aKeyword [], std::wstring aIdentifier, const std::wstring& aContext);
-std::string wstring2string (const std::wstring& aWide);
+DllExport std::string wstring2string (const std::wstring& aWide);
 std::wstring string2wstring (const std::string& aNarrow);
 bool ValidateFileName (std::wstring& aName, const bool aMustExist);
 bool ValidateFileName (std::wstring& aName, const bool aMustExist, const std::wstring& aDefaultExtension);
--- a/secureswitools/swisistools/source/sisxlibrary/utility_interface.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/utility_interface.h	Thu Jul 08 20:28:00 2010 +0300
@@ -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 the License "Eclipse Public License v1.0"
@@ -38,6 +38,8 @@
 
 // common interface for Windows and Linux
 
+const int commandLength = 512;
+
 wchar_t** CommandLineArgs(int &argc , char *argv[]);
 
 void cleanup(int argc, wchar_t **argv);
@@ -100,31 +102,33 @@
 int ConvertMultiByteToWideChar(const char* aSource, int aSourceLen, wchar_t* aTarget, int aTargetLen, TUint32 aCodePage = 0);
 
 /*
-Copies an existing file to a new file.
-@Parameters : The name of an existing file. 
-If lpExistingFileName does not exist, CopyFile fails, and GetLastError returns ERROR_FILE_NOT_FOUND.
-
-@Parameters : The name of the new file. 
+ * Copies an existing file to a new file. 
+ *
+ * @Parameters aSrc					The name of an existing file.  
+ * @Parameters aDest				The name of the new file. 
+ * @Parameters aFailIfExistsFlag    If this parameter is TRUE and the new file specified by aDest already exists, 
+ *									the function fails. If this parameter is FALSE and the new file already exists, 
+ *									the function overwrites the existing file and succeeds.
+ * @return 
+ *									If the function succeeds, the return value is zero.
+ *									If the function fails, the return value is non-zero.
+ */
 
-@Parameters : If this parameter is TRUE and the new file specified by lpNewFileName already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds.
-
-Return Value
-If the function succeeds, the return value is nonzero.
-If the function fails, the return value is zero.
-*/
-
-int FileCopyA(const char* aSrc, const char* aDest, size_t aFlag);
+int FileCopyA(const char* aSrc, const char* aDest, bool aFailIfExistsFlag);
 
 
 /*
-Moves an existing file or a directory, including its children
-@Parameters : The current name of the file or directory on the local computer. 
-@Parameters : The new name for the file or directory. The new name must not already exist. A new file may be on a different file system or drive. A new directory must be on the same drive. 
-
-Return Value
-If the function succeeds, the return value is nonzero.
-If the function fails, the return value is zero.
-*/
+ * Moves an existing file or a directory, including its children.
+ *
+ * @Parameters aSrc					The current name of the file or directory on the local computer. 
+ * @Parameters aDest				The new name for the file or directory. The new name must not already exist. 
+ *									A new file may be on a different file system or drive. A new directory must be 
+ *									on the same drive. 
+ *
+ * @return
+ *									If the function succeeds, the return value is zero.
+ *									If the function fails, the return value is non-zero.
+ */
 
 int FileMoveA(const char* aSrc, const char* aDest);
 
--- a/secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -175,18 +175,24 @@
 int _wunlink(const wchar_t* wc)
 	{
 	  int ret = 0;
-	  int len = wcstombs(0,wc,-1);
-	  char *tmp = new char[len];
+	  const int len = wcstombs(0,wc,-1);
+	  
+	  char* tmp = new char[len+1];
 	  ret = wcstombs(tmp, wc, len);
+
 	  if(ret == -1) {
 		printf("wunlink: wcstombs error\n");
-		delete[] tmp;
+		delete [] tmp;
 		return ret;
 		}
+
 	  tmp[ret] = '\0';
 	  ret = unlink(tmp);
+
 	  if(ret != 0)
 		printf("wunlink: %s: %s\n", tmp, strerror(ret));
+
+	  delete [] tmp;
 	  return ret;
 	}
 
@@ -621,14 +627,41 @@
 	}
 
 
-int FileCopyA(const char* aSrc, const char* aDest, size_t aFlag)
+int FileCopyA(const char* aSrc, const char* aDest, bool aFailIfExistsFlag)
 	{
 		int err= 0;
+
+		char cmd[ commandLength ] = "";
+		if( aFailIfExistsFlag )
+		{
+			strcpy(cmd, "cp ");
+		}
+		else
+		{
+			strcpy(cmd, "cp -f ");
+		}
+		strcat(cmd, aSrc);
+		strcat(cmd, " ");
+		strcat(cmd, aDest);
+		strcat(cmd, " 2> /dev/null");
+
+        err = system(cmd);
+
 		return err;
 	}
 int FileMoveA(const char* aSrc, const char* aDest)
 	{
 		int err= 0;
+
+		// Overwrites the orphaned file(if any).
+		char cmd[ commandLength ] = "mv -f ";
+		strcat(cmd, aSrc);
+		strcat(cmd, " ");
+		strcat(cmd, aDest);
+		strcat(cmd, " 2> /dev/null");
+
+		err = system(cmd);
+
 		return err;
 	}
 
--- a/secureswitools/swisistools/source/sisxlibrary/utility_windows.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/utility_windows.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -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 the License "Eclipse Public License v1.0"
@@ -185,15 +185,21 @@
 	return ::GetLastError();
 	}
 
-int FileCopyA(const char* aSrc, const char* aDest, size_t aFlag)
+int FileCopyA(const char* aSrc, const char* aDest, bool aFailIfExistsFlag)
 {
-	int err=CopyFileA(aSrc,aDest,aFlag);
-	return err;
+	// CopyFileA() returns zero on failure and non-zero otherwise.
+	int err=CopyFileA(aSrc,aDest,aFailIfExistsFlag);
+	// To maintain consistency with the LINUX wrapper API FileCopyA() which uses cp 
+	// command with system(), we return 0 on success and 1 on failure.
+	return !err;
 }
 
 int FileMoveA(const char* aSrc, const char* aDest)
 {
+	// MoveFileA() returns zero on failure and non-zero otherwise.
 	int err=MoveFileA(aSrc,aDest);
-	return err;
+	// To maintain consistency with the LINUX wrapper API FileMoveA() which uses mv
+	// command with system(), we return 0 on success and 1 on failure.
+	return !err;
 }
 
--- a/secureswitools/swisistools/source/sisxlibrary/utils.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/utils.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -28,7 +28,7 @@
 
 #include "utils.h"
 #include <wchar.h>
-#include "utf8.h"
+#include "utf8_wrapper.h"
 #include "utility_interface.h"
 
 #define TMP_FILE_STUB	L"~si"
--- a/secureswitools/swisistools/source/xmlparser/xmlparser.cpp	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/xmlparser/xmlparser.cpp	Thu Jul 08 20:28:00 2010 +0300
@@ -27,6 +27,7 @@
 #include "xmlparser.h"
 #include "logs.h"
 #include "exception.h"
+#include "utf8_wrapper.h"
 #include "util.h"
 
 #include <xercesc/sax2/XMLReaderFactory.hpp>
@@ -42,13 +43,65 @@
 #include <memory>
 #include <cstdio>
 
+#ifndef _WIN32
+#include <ctype.h>
+
+//__ctype_b was removed from glibc. This is a workaround to fix the linking problem
+extern "C"
+    {
+    const unsigned short int** __ctype_b()
+        {
+        return __ctype_b_loc();
+        }
+    }
+
+#endif // _WIN32
+
 XERCES_CPP_NAMESPACE_USE
 
+
+//------------------------------------------------------------------------------------------------------------------------------
+//											UTILITY FUNCTIONS
+//------------------------------------------------------------------------------------------------------------------------------
+int XercesStringToInteger(const XercesString& aWideStr)
+	{
+	int strLen = aWideStr.length();
+	const XMLCh* source = aWideStr.c_str();	
+  char* buffer = new char[strLen << 2];
+  
+	// Using a temp variable in place of buffer as ConvertUTF16toUTF8 modifies the source pointer passed.
+	char* temp = buffer;	
+	
+	ConvertUTF16toUTF8(&source, aWideStr.c_str() + strLen, &temp,  temp + (strLen << 2));
+	
+	// Appending NUL to the converted buffer.
+	*temp = 0;
+
+	int value = 0;
+	sscanf(buffer, "%d", &value);
+
+	delete[] buffer;
+	return value;
+	}
+
+
 // these function pointers are used to call appropriate release methods of XMLString
 // present in the xerces library. 
 typedef void (*releaseXmlChPtr) (XMLCh** buf);
 typedef void (*releaseChPtr) (char** buf);
 
+#ifdef _WIN32
+
+// We need not do anything for WINDOWS, since XMLCh string(XercesString)
+// and WString both are same and will be in UTF-16 encoding format.
+#define XMLChToWString(aParameter) (aParameter)
+
+#else
+inline std::wstring XMLChToWString(const XercesString& aXercesString)
+	{
+	return XercesStringToWString (aXercesString);
+	}
+#endif // _WIN32
 
 
 DllExport CScrXmlParser::CScrXmlParser()
@@ -259,7 +312,7 @@
 	
 	DOMNodeList* uniqueSwTypeName = swTypeNamesNode->getElementsByTagName(tagUniqueSoftwareTypeName.get());
 	const XMLCh* textContent = uniqueSwTypeName->item(0)->getTextContent();
-	scrEnvDetails.iUniqueSoftwareTypeName = std::wstring(textContent);
+	scrEnvDetails.iUniqueSoftwareTypeName = XMLChToWString(textContent);
 	
 	DOMNodeList* localizableSwTypeNames = swTypeNamesNode->getElementsByTagName(tagLocalizableSwTypeName.get());
 	const  XMLSize_t localizableSwTypeNamesCount = localizableSwTypeNames->getLength();
@@ -284,7 +337,7 @@
 		textContent = launcherExecutable->item(0)->getTextContent();
 		fn_auto_ptr<releaseXmlChPtr, XMLCh> launcherExecutableText( &XMLString::release,textContent );
 		const XMLCh* launcherExecutableValue = launcherExecutableText.get();
-		scrEnvDetails.iLauncherExecutable = launcherExecutableValue;
+		scrEnvDetails.iLauncherExecutable = XMLChToWString(launcherExecutableValue);
 		}
     DOMNodeList* customAcessList = aEnvironment->getElementsByTagName(tagCustomAcess.get());
 	const  XMLSize_t customAcessDataCount = customAcessList->getLength();
@@ -304,7 +357,8 @@
 	for( XMLSize_t count=0 ; count<mimeCount ; ++count )
 		{
 		const XMLCh* textContent = mimes->item(count)->getTextContent();
-		scrEnvDetails.iMIMEDetails.push_back(textContent);
+		std::wstring textString = XMLChToWString(textContent);
+		scrEnvDetails.iMIMEDetails.push_back(textString);
 		}
 			
 	LOGEXIT("CScrXmlParser::GetEnvironmentData()");
@@ -349,7 +403,7 @@
 	
 		DOMNodeList* softwaretype = elementRoot->getElementsByTagName(tagSoftwareTypeName.get());
 		const XMLCh* textContent = softwaretype->item(0)->getTextContent();
-		preProvisionDetail.iSoftwareTypeName = std::wstring(textContent);
+		preProvisionDetail.iSoftwareTypeName = XMLChToWString(textContent);
 	
 		// Retrieve the nodes for Component.
 		DOMNodeList* componentNodes = elementRoot->getElementsByTagName(tagComponent.get());
@@ -455,16 +509,16 @@
 	if(locale->getLength() != 0)
 		{
 		const XMLCh* textLocale = locale->item(0)->getTextContent();
-		componentLocalizable.iLocale = Util::WideCharToInteger(textLocale);
+		componentLocalizable.iLocale = XercesStringToInteger(textLocale);
 		}
 	
 	const XMLCh* textName = name->item(0)->getTextContent();
-	componentLocalizable.iName = textName;
+	componentLocalizable.iName = XMLChToWString(textName);
 
 	if(vendor->getLength() != 0)
 		{
 		const XMLCh* textVendor = vendor->item(0)->getTextContent();
-		componentLocalizable.iVendor = textVendor;
+		componentLocalizable.iVendor = XMLChToWString(textVendor);
 		}
 	LOGEXIT("CScrXmlParser::GetComponentLocalizable()");
 	return componentLocalizable;
@@ -495,12 +549,12 @@
 	XmlDetails::TScrPreProvisionDetail::TComponentProperty componentProperty;
 	
 	const XMLCh* textName = name->getTextContent();
-	componentProperty.iName	= textName;
+	componentProperty.iName	= XMLChToWString(textName);
 	
 	if(locale->getLength() != 0)
 		{
 		const XMLCh* textLocale = locale->item(0)->getTextContent();
-		componentProperty.iLocale = Util::WideCharToInteger(textLocale);
+		componentProperty.iLocale = XercesStringToInteger(textLocale);
 		}
 
 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
@@ -512,13 +566,13 @@
 		if( XMLString::equals(currentElement->getTagName(), tagComponentPropertyIntValue.get()))
 			{
 			componentProperty.iIsIntValue = true;
-			componentProperty.iValue = currentElement->getTextContent();
+			componentProperty.iValue = XMLChToWString(currentElement->getTextContent());
 			break;
 			}
 		else if( XMLString::equals(currentElement->getTagName(), tagComponentPropertyStrValue.get()))
 			{
 			componentProperty.iIsIntValue = false;
-			componentProperty.iValue = currentElement->getTextContent();
+			componentProperty.iValue = XMLChToWString(currentElement->getTextContent());
 			break;
 			}
 		}
@@ -526,7 +580,7 @@
 	if(isBinary->getLength() != 0)
 		{
 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
-		componentProperty.iIsStr8Bit = Util::WideCharToInteger(textIsBinary);		
+		componentProperty.iIsStr8Bit = XercesStringToInteger(textIsBinary);		
 		}
 	LOGEXIT("CScrXmlParser::GetComponentProperty()");
 	return componentProperty;
@@ -556,7 +610,7 @@
 	// attribute - location
 	DOMNamedNodeMap* attributes = aDOMElement->getAttributes();
 	DOMNode* location = attributes->getNamedItem(tagLocation.get());
-	componentFile.iLocation = location->getTextContent();
+	componentFile.iLocation = XMLChToWString(location->getTextContent());
 	LOGEXIT("CScrXmlParser::GetComponentFile()");
 	return componentFile;
 	}
@@ -583,15 +637,15 @@
 		
 		DOMNodeList* supplierId = currentDepDetail->getElementsByTagName(tagSupplierId.get());
 		const XMLCh* textSupplierId = supplierId->item(0)->getTextContent();
-		componentDependencyDetail.iSupplierId = std::wstring(textSupplierId);
+		componentDependencyDetail.iSupplierId = XMLChToWString(textSupplierId);
 		
 		DOMNodeList* fromVersion = currentDepDetail->getElementsByTagName(tagFromVersion.get());
 		const XMLCh* textFromVersion = fromVersion->item(0)->getTextContent();
-		componentDependencyDetail.iFromVersion = std::wstring(textFromVersion);
+		componentDependencyDetail.iFromVersion = XMLChToWString(textFromVersion);
 
 		DOMNodeList* toVersion = currentDepDetail->getElementsByTagName(tagToVersion.get());
 		const XMLCh* textToVersion = toVersion->item(0)->getTextContent();
-		componentDependencyDetail.iToVersion = std::wstring(textToVersion);
+		componentDependencyDetail.iToVersion = XMLChToWString(textToVersion);
 
 		componentDependency.iComponentDependencyList.push_back(componentDependencyDetail);
 		
@@ -600,7 +654,7 @@
 	// attribute - location
 	DOMNamedNodeMap* attributes = aDOMElement->getAttributes();
 	DOMNode* dependentId = attributes->getNamedItem(tagDependentId.get());
-	componentDependency.iDependentId = dependentId->getTextContent();
+	componentDependency.iDependentId = XMLChToWString(dependentId->getTextContent());
 	LOGEXIT("CScrXmlParser::GetComponentDependency()");
 	return componentDependency;
 	}
@@ -628,7 +682,7 @@
 	DOMNodeList* isBinary = aDOMElement->getElementsByTagName(tagFilePropertyIsBinary.get());
 	
 	const XMLCh* textName = name->getTextContent();
-	fileProperty.iName	= textName;
+	fileProperty.iName	= XMLChToWString(textName);
 		
 	int valueLength = value->getLength();
 	if(valueLength != 0)
@@ -644,12 +698,12 @@
 				if( XMLString::equals(valueElement->getTagName(), tagFilePropertyIntValue.get()))
 					{
 					fileProperty.iIsIntValue = true;
-					fileProperty.iValue = currentElement->getTextContent();
+					fileProperty.iValue = XMLChToWString(currentElement->getTextContent());
 					}
 				else if( XMLString::equals(valueElement->getTagName(), tagFilePropertyStrValue.get()))
 					{
 					fileProperty.iIsIntValue = false;
-					fileProperty.iValue = currentElement->getTextContent();
+					fileProperty.iValue = XMLChToWString(currentElement->getTextContent());
 					}
 				}
 			}
@@ -687,31 +741,31 @@
 		{
 		LOGINFO("CScrXmlParser::GetComponentDetails()- rom app");
 		const XMLCh* textRomApplication = romApplication->item(0)->getTextContent();
-		componentDetails.iIsRomApplication = Util::WideCharToInteger(textRomApplication);
+		componentDetails.iIsRomApplication = XercesStringToInteger(textRomApplication);
 		}
 
 	if( removable->getLength() != 0)
 		{
 		const XMLCh* textRemovable = removable->item(0)->getTextContent();
-		componentDetails.iIsRemovable = Util::WideCharToInteger(textRemovable);
+		componentDetails.iIsRemovable = XercesStringToInteger(textRemovable);
 		}
 	
 	if( size->getLength() != 0)
 		{
 		const XMLCh* textSize = size->item(0)->getTextContent();
-		componentDetails.iSize = Util::WideCharToInteger(textSize);
+		componentDetails.iSize = XercesStringToInteger(textSize);
 		}
 	
 	if( scomoState->getLength() != 0)
 		{
 		const XMLCh* textScomoState = scomoState->item(0)->getTextContent();
-		componentDetails.iScomoState = Util::WideCharToInteger(textScomoState);
+		componentDetails.iScomoState = XercesStringToInteger(textScomoState);
 		}
 	
 	if( globalId->getLength() != 0)
 		{
 		const XMLCh* textGlobalId = globalId->item(0)->getTextContent();
-		componentDetails.iGlobalId = textGlobalId;
+		componentDetails.iGlobalId = XMLChToWString(textGlobalId);
 		}
 
 	if( versionDetail->getLength() != 0)
@@ -727,21 +781,21 @@
 		DOMNode* minor = attributes->getNamedItem(tagMinor.get());
 		DOMNode* build = attributes->getNamedItem(tagBuild.get());
 
-		componentDetails.iVersion.iMajor = major->getTextContent();
-		componentDetails.iVersion.iMinor = minor->getTextContent();
-		componentDetails.iVersion.iBuild = build->getTextContent();
+		componentDetails.iVersion.iMajor = XMLChToWString(major->getTextContent());
+		componentDetails.iVersion.iMinor = XMLChToWString(minor->getTextContent());
+		componentDetails.iVersion.iBuild = XMLChToWString(build->getTextContent());
 		}
 	
 	if( originVerified->getLength() != 0)
 		{
 		const XMLCh* textOriginVerified = originVerified->item(0)->getTextContent();
-		componentDetails.iOriginVerified = Util::WideCharToInteger(textOriginVerified);
+		componentDetails.iOriginVerified = XercesStringToInteger(textOriginVerified);
 		}
 	
 	if( hidden->getLength() != 0)
 		{
 		const XMLCh* textHidden = hidden->item(0)->getTextContent();
-		componentDetails.iIsHidden = Util::WideCharToInteger(textHidden);
+		componentDetails.iIsHidden = XercesStringToInteger(textHidden);
 		}
 	LOGEXIT("CScrXmlParser::GetComponentDetails()");
 	return componentDetails;
@@ -761,10 +815,10 @@
 	XmlDetails::TScrEnvironmentDetails::TLocalizedSoftwareTypeName localizedSwTypeName;
 
 	const XMLCh* textLocale = locale->getTextContent();
-	localizedSwTypeName.iLocale = Util::WideCharToInteger(textLocale);
+	localizedSwTypeName.iLocale = XercesStringToInteger(textLocale);
 	
 	const XMLCh* textName = name->getTextContent();
-	localizedSwTypeName.iName = textName;
+	localizedSwTypeName.iName =  XMLChToWString(textName);
 	LOGEXIT("CScrXmlParser::GetLocalizedSoftwareTypeName()");
 	return localizedSwTypeName;
 	}
@@ -788,7 +842,7 @@
 	customAcessList.iSecureId = secureIdVal;
 	
 	const XMLCh* textAccessMode = accessMode->getTextContent();
-	customAcessList.iAccessMode = Util::WideCharToInteger(textAccessMode);
+	customAcessList.iAccessMode = XercesStringToInteger(textAccessMode);
 	LOGEXIT("CScrXmlParser::GetCustomAcessList()");
 	return customAcessList;
 	}
@@ -910,7 +964,7 @@
 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppAttribute appAttribute;
 	
 	const XMLCh* textName = name->getTextContent();
-	appAttribute.iName	= textName;
+	appAttribute.iName	= XMLChToWString(textName);
 	
 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
 	const XMLSize_t nodeCount = childNodes->getLength();
@@ -921,13 +975,13 @@
 		if( XMLString::equals(currentElement->getTagName(), tagApplicationAttributeIntValue.get()))
 			{
 			appAttribute.iIsIntValue = true;
-			appAttribute.iValue = currentElement->getTextContent();
+			appAttribute.iValue = XMLChToWString(currentElement->getTextContent());
 			break;
 			}
 		else if( XMLString::equals(currentElement->getTagName(), tagApplicationAttributeStrValue.get()))
 			{
 			appAttribute.iIsIntValue = false;
-			appAttribute.iValue = currentElement->getTextContent();
+			appAttribute.iValue = XMLChToWString(currentElement->getTextContent());
 			break;
 			}
 		}
@@ -935,7 +989,7 @@
 	if(isBinary->getLength() != 0)
 		{
 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
-		appAttribute.iIsStr8Bit = Util::WideCharToInteger(textIsBinary);		
+		appAttribute.iIsStr8Bit = XercesStringToInteger(textIsBinary);
 		}
 	LOGEXIT("CScrXmlParser::GetAppAttribute()");
 	return appAttribute;
@@ -954,7 +1008,7 @@
 	if( fileName->getLength() != 0)
 		{
 		const XMLCh* fil = fileName->item(0)->getTextContent();
-		file = fil;
+		file = XMLChToWString(fil);
 		}
 
 	LOGEXIT("CScrXmlParser::GetFileOwnershipInfo()");
@@ -977,13 +1031,13 @@
 	if( priority->getLength() != 0)
 		{
 		const XMLCh* pri = priority->item(0)->getTextContent();
-		dataType.iPriority = Util::WideCharToInteger(pri);
+		dataType.iPriority = XercesStringToInteger(pri);
 		}
 
 	if( type->getLength() != 0)
 		{
 		const XMLCh* typ = type->item(0)->getTextContent();
-		dataType.iType = typ;
+		dataType.iType = XMLChToWString(typ);
 		}
 	LOGEXIT("CScrXmlParser::GetDataType()");
 	return dataType;
@@ -1005,13 +1059,13 @@
 	if( OpaqueLocale->getLength() != 0)
 		{
 		const XMLCh* pri = OpaqueLocale->item(0)->getTextContent();
-		opaqueDataType.iLocale = Util::WideCharToInteger(pri);
+		opaqueDataType.iLocale = XercesStringToInteger(pri);
 		}
 
 	if( Data->getLength() != 0)
 		{
 		const XMLCh* typ = Data->item(0)->getTextContent();
-		opaqueDataType.iOpaqueData = typ;
+		opaqueDataType.iOpaqueData = XMLChToWString(typ);
 		}
 	LOGEXIT("CScrXmlParser::GetOpaqueDataType()");
 	return opaqueDataType;
@@ -1033,13 +1087,13 @@
 	if( ServiceOpaqueLocale->getLength() != 0)
 		{
 		const XMLCh* pri = ServiceOpaqueLocale->item(0)->getTextContent();
-		opaqueDataType.iLocale = Util::WideCharToInteger(pri);
+		opaqueDataType.iLocale = XercesStringToInteger(pri);
 		}
 
 	if( ServiceData->getLength() != 0)
 		{
 		const XMLCh* typ = ServiceData->item(0)->getTextContent();
-		opaqueDataType.iOpaqueData = typ;
+		opaqueDataType.iOpaqueData = XMLChToWString(typ);
 		}
 	LOGEXIT("CScrXmlParser::GetServiceOpaqueDataType()");
 	return opaqueDataType;
@@ -1067,7 +1121,7 @@
 	if( uid->getLength() != 0)
 		{
 		const XMLCh* priority = uid->item(0)->getTextContent();
-		appServiceInfo.iUid = Util::WideCharToInteger(priority);
+		appServiceInfo.iUid = XercesStringToInteger(priority);
 		}
 
 	// for each OpaqueData retrieve all tags
@@ -1166,7 +1220,7 @@
 	
 	LOGINFO("name->getTextContent");
 	const XMLCh* textName = name->getTextContent();
-	appLocalizableAttribute.iName = textName;
+	appLocalizableAttribute.iName = XMLChToWString(textName);
 	
 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
 	const XMLSize_t nodeCount = childNodes->getLength();
@@ -1177,13 +1231,13 @@
 		if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableInfoAttributeIntValue.get()))
 			{
 			appLocalizableAttribute.iIsIntValue = true;
-			appLocalizableAttribute.iValue = currentElement->getTextContent();
+			appLocalizableAttribute.iValue = XMLChToWString(currentElement->getTextContent());
 			break;
 			}
 		else if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableInfoAttributeStrValue.get()))
 			{
 			appLocalizableAttribute.iIsIntValue = false;
-			appLocalizableAttribute.iValue = currentElement->getTextContent();
+			appLocalizableAttribute.iValue = XMLChToWString(currentElement->getTextContent());
 			break;
 			}
 		}
@@ -1191,7 +1245,7 @@
 	if(isBinary->getLength() != 0)
 		{
 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
-		appLocalizableAttribute.iIsStr8Bit = Util::WideCharToInteger(textIsBinary);		
+		appLocalizableAttribute.iIsStr8Bit = XercesStringToInteger(textIsBinary);
 		}
 
 	LOGEXIT("CScrXmlParser::GetAppLocalizableAttribute()");
@@ -1247,7 +1301,7 @@
 	LOGINFO("name->getTextContent");
 	const XMLCh* textName = name->getTextContent();
 	LOGINFO("assign name");
-	appLocalizableViewDataAttribute.iName = textName;
+	appLocalizableViewDataAttribute.iName = XMLChToWString(textName);
 
 	LOGINFO("getChildNodes()");
 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
@@ -1261,14 +1315,14 @@
 			{
 			LOGINFO("int value");
 			appLocalizableViewDataAttribute.iIsIntValue = true;
-			appLocalizableViewDataAttribute.iValue = currentElement->getTextContent();
+			appLocalizableViewDataAttribute.iValue = XMLChToWString(currentElement->getTextContent());
 			break;
 			}
 		else if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableViewDataStrValue.get()))
 			{
 			LOGINFO("str value");
 			appLocalizableViewDataAttribute.iIsIntValue = false;
-			appLocalizableViewDataAttribute.iValue = currentElement->getTextContent();
+			appLocalizableViewDataAttribute.iValue = XMLChToWString(currentElement->getTextContent());
 			break;
 			}
 		}
@@ -1277,7 +1331,7 @@
 		{
 		LOGINFO("bin value");
 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
-		appLocalizableViewDataAttribute.iIsStr8Bit = Util::WideCharToInteger(textIsBinary);		
+		appLocalizableViewDataAttribute.iIsStr8Bit = XercesStringToInteger(textIsBinary);
 		}
 	LOGEXIT("CScrXmlParser::GetAppLocalizableViewDataAttributes()");
 	return appLocalizableViewDataAttribute;
@@ -1304,25 +1358,25 @@
 	if( locale->getLength() != 0)
 		{
 		const XMLCh* loc = locale->item(0)->getTextContent();
-		appProperty.iLocale = Util::WideCharToInteger(loc);
+		appProperty.iLocale = XercesStringToInteger(loc);
 		}
 
 	if( name->getLength() != 0)
 		{
 		const XMLCh* nam = name->item(0)->getTextContent();
-		appProperty.iName = nam;
+		appProperty.iName = XMLChToWString(nam);
 		}
 	
 	if( intvalue->getLength() != 0)
 		{
 		const XMLCh* intval = intvalue->item(0)->getTextContent();
-		appProperty.iIntValue = Util::WideCharToInteger(intval);
+		appProperty.iIntValue = XercesStringToInteger(intval);
 		}
 
 	if( strvalue->getLength() != 0)
 		{
 		const XMLCh* strval = strvalue->item(0)->getTextContent();
-		appProperty.iStrValue = strval;
+		appProperty.iStrValue = XMLChToWString(strval);
 		}
 	LOGEXIT("CScrXmlParser::GetAppProperty()");
 	return appProperty;
@@ -1374,3 +1428,5 @@
 	std::string msg( "Resetting error handler object" );
 	LOGINFO(msg);
 	}
+
+
--- a/secureswitools/swisistools/source/xmlparser/xmlparser.h	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/source/xmlparser/xmlparser.h	Thu Jul 08 20:28:00 2010 +0300
@@ -37,6 +37,14 @@
 #include <xercesc/dom/DOM.hpp>
 
 #include "toolsconf.h"
+#include "symbiantypes.h"
+#include "utf8_wrapper.h"
+
+// Xerces library uses XMLCh (UTF16 format) as its default character type.
+// We can store the UTF16 returned form the xerces library in the following
+// template class.
+typedef std::basic_string<XMLCh> XercesString;
+
 
 /**
 * This template is used to cleanup memory by calling a function as pointed 
@@ -144,7 +152,7 @@
             std::wstring iLauncherExecutable;
 			std::vector<TCustomAcessList> iCustomAcessList;
 			std::vector<std::wstring> iMIMEDetails;
-			};
+			}; // struct TScrEnvironmentDetails
 
 		
 	class TScrPreProvisionDetail
@@ -160,11 +168,16 @@
 			TComponentLocalizable()
 			:iLocale(0)
 			{}
-			
+
+		public: // public Functions
+			inline XercesString Name();
+			inline XercesString Vendor();
+		
+		public: // Member variables	
 			int iLocale;
 			std::wstring iName;
 			std::wstring iVendor;
-			};
+			}; // class TComponentLocalizable
 		
 		class TComponentProperty
 			{
@@ -176,29 +189,41 @@
 			iIsStr8Bit(false)
 			{}
 
-		public:
+		public: // Member Functions
+			inline XercesString Name();
+			inline XercesString Value();
+
+		public: // Member variables
 			std::wstring iName;
 			int iLocale;
 			std::wstring iValue;
 			bool iIsIntValue;
 			int iIsStr8Bit;
-			};
+			}; // class TComponentProperty
 
 		class TComponentDependency
 			{
 		public:
 			class TComponentDependencyDetail
 				{
-				public:
+				public: // Member Functions
+					inline XercesString SupplierId();
+					inline XercesString FromVersion();
+					inline XercesString ToVersion();
+
+				public: // Member Variables
 					std::wstring iSupplierId;
 					std::wstring iFromVersion;
 					std::wstring iToVersion;
-				};
+				}; // class TComponentDependencyDetail
 
-			public:
+			public: // Member Functions
+				inline XercesString DependentId();
+
+			public: // Member Variables
 				std::wstring iDependentId;
 				std::vector<TComponentDependencyDetail>	iComponentDependencyList;
-			};
+			}; // class TComponentDependency
 
 		class TComponentFile
 			{
@@ -212,15 +237,24 @@
 				TFileProperty()
 				:iIsIntValue(false)
 				{}
+			public: // Member Functions
+				inline XercesString Name();
+				inline XercesString Value();
+	
+			public: // Member Variables
 				std::wstring iName;
 				std::wstring iValue;
 				bool iIsIntValue;
-				};
+				}; // struct TFileProperty
 
+			public: // Member Functions
+			inline XercesString Location();
+			
+			public: // Member Variables
 			std::wstring iLocation;
 			std::vector<TFileProperty> iFileProperties;
 			
-			};
+			}; // class TComponentFile
 		
 		class TComponentDetails
 			{
@@ -241,16 +275,23 @@
 
 				TVersion()
 				{}
+			public:
+				inline XercesString MajorVersion();
+				inline XercesString MinorVersion();
+				inline XercesString BuildVersion();
 
 			public:
 				std::wstring iMajor;
 				std::wstring iMinor;
 				std::wstring iBuild;
-				};
+				}; // class TVersion
+
+			public: // Member Functions
+			inline XercesString GlobalId();
 
 			int iIsRomApplication;
 			int iIsRemovable;
-			__int64 iSize;
+			TInt64 iSize;
 			int iScomoState;
 			std::wstring iGlobalId;
 			TVersion iVersion;
@@ -387,12 +428,14 @@
 			TComponentDependency iComponentDependency;
 			std::vector<TApplicationRegistrationInfo> iApplicationRegistrationInfo;
 			TComponentDetails iComponentDetails;
-			};
+			}; // class TComponent
+
+		inline XercesString SoftwareTypeName();
 
 		std::wstring iSoftwareTypeName;
 		std::vector<TComponent> iComponents;
 		
-		};
+		}; // class TScrPreProvisionDetail
 }
 
 class CScrXmlParser
@@ -512,4 +555,228 @@
 
 XERCES_CPP_NAMESPACE_END
 
+// inline function definitions
+
+#ifndef _WIN32
+inline XercesString WStringToXercesString(const std::wstring& aString)
+	{
+	XMLCh* buffer = new XMLCh[ (aString.length() + 1) * 2 ];
+	XMLCh* temp = buffer;
+	const wchar_t* source = aString.c_str();
+
+	ConvertUCS4toUTF16(&source, source + aString.length(), &temp, buffer + aString.length());
+
+	// Appending NUL to the converted buffer.
+	*temp = 0;
+
+	XercesString result(buffer);
+	delete[] buffer;
+
+	return result; 
+	}
+
+#else
+
+// We need not do anything for WINDOWS, since XercesString
+// and WString both are same and will be in UTF-16 encoding format.
+#define WStringToXercesString(aWString) (aWString)
+
+#endif // _WIN32
+
+
+//------------------------------------------------------------------------------------------------------------------------------
+//											UTILITY FUNCTIONS
+//------------------------------------------------------------------------------------------------------------------------------
+#ifndef _WIN32
+
+inline std::wstring XercesStringToWString(const XercesString& aString)
+	{
+	wchar_t* buffer = new wchar_t[aString.length() + 1];
+	const XMLCh* source = aString.c_str();
+
+	// Using a temp variable in place of buffer as ConvertUTF16toUTF8 modifies the source pointer passed.
+	wchar_t* temp = buffer;
+
+	ConvertUTF16toUCS4(&source, source + aString.length(), &temp, temp + aString.length());
+
+	// Appending NUL to the converted buffer.
+	*temp = 0;
+
+	std::wstring result(buffer);
+	delete[] buffer;
+	return result;
+	}
+#else
+
+// We need not do anything for WINDOWS, since XercesString
+// and WString both are same and will be in UTF-16 encoding format.
+#define XercesStringToWString(aXercesString) (aXercesString)
+
+#endif // _WIN32
+
+
+//------------------------------------------------------------------------------------------------------------------------------
+
+
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentDetails::TVersion::MajorVersion()
+{
+#ifdef _WIN32
+	return iMajor;
+#else
+	return WStringToXercesString(iMajor);
+#endif // _WIN32
+}
+
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentDetails::TVersion::MinorVersion()
+{
+#ifdef _WIN32
+	return iMinor;
+#else
+	return WStringToXercesString(iMinor);
+#endif // _WIN32
+}
+
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentDetails::TVersion::BuildVersion()
+{
+#ifdef _WIN32
+	return iBuild;
+#else
+	return WStringToXercesString(iBuild);
+#endif // _WIN32
+}
+
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentDetails::GlobalId()
+{
+#ifdef _WIN32
+	return iGlobalId;
+#else  
+	return WStringToXercesString(iGlobalId);
+#endif // _WIN32
+}
+
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::SoftwareTypeName()
+	{
+#ifdef _WIN32
+	return iSoftwareTypeName;
+#else
+	return WStringToXercesString(iSoftwareTypeName);
+#endif // _WIN32
+	}
+
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentLocalizable::Name()
+	{
+#ifdef _WIN32
+	return iName;
+#else
+	return WStringToXercesString(iName);
+#endif // _WIN32
+	}
+
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentLocalizable::Vendor()
+	{
+#ifdef _WIN32
+	return iVendor;
+#else
+	return WStringToXercesString(iVendor);
+#endif // _WIN32
+	}
+
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentProperty::Name()
+	{
+#ifdef _WIN32
+	return iName;
+#else
+	return WStringToXercesString(iName);
+#endif // _WIN32
+	}
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentProperty::Value()
+	{
+#ifdef _WIN32
+	return iValue;
+#else
+	return WStringToXercesString(iValue);
+#endif // _WIN32
+	}
+
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentFile::Location()
+	{
+#ifdef _WIN32
+	return iLocation;
+#else
+	return WStringToXercesString(iLocation);
+#endif // _WIN32
+	}
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentFile::TFileProperty::Name()
+	{
+#ifdef _WIN32
+	return iName;
+#else
+	return WStringToXercesString(iName);
+#endif // _WIN32
+	}
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentFile::TFileProperty::Value()
+	{
+#ifdef _WIN32
+	return iValue;
+#else
+	return WStringToXercesString(iValue);
+#endif // _WIN32
+	}
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentDependency::DependentId()
+	{
+#ifdef _WIN32
+	return iDependentId;
+#else
+	return WStringToXercesString(iDependentId);
+#endif // _WIN32
+	}
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentDependency::TComponentDependencyDetail::SupplierId()
+	{
+#ifdef _WIN32
+	return iSupplierId;
+#else
+	return WStringToXercesString(iSupplierId);
+#endif // _WIN32
+	}
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentDependency::TComponentDependencyDetail::FromVersion()
+	{
+#ifdef _WIN32
+	return iFromVersion;
+#else
+	return WStringToXercesString(iFromVersion);
+#endif // _WIN32
+	}
+
+inline XercesString XmlDetails::TScrPreProvisionDetail::TComponentDependency::TComponentDependencyDetail::ToVersion()
+	{
+#ifdef _WIN32
+	return iToVersion;
+#else
+	return WStringToXercesString(iToVersion);
+#endif // _WIN32
+	}
+
+
+
+
+
+
+
+
+
 #endif // _XMLPARSER_H
--- a/secureswitools/swisistools/test/tinterpretsisinteg/check.pl	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/check.pl	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -172,7 +172,7 @@
 		$searchresult = 0;
 		$filenotexist = 0;
 	
-		$filename = trim($temp);
+		$filename = lc trim($temp);
 		if($filename eq "")
 		{
 			# Blank line found - no file to check
--- a/secureswitools/swisistools/test/tinterpretsisinteg/testinterpretsis.bat	Tue Jun 29 16:50:12 2010 +0300
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/testinterpretsis.bat	Thu Jul 08 20:28:00 2010 +0300
@@ -1,5 +1,5 @@
 @rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem Copyright (c) 2009-2010 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"
@@ -1890,7 +1890,7 @@
 call copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\version_5_3.txt .\romdrive\system\data\sisregistry_5.3.txt > NUL
 call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tinterpretsisinteg\data\simple.sis -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
 if not %errorlevel%==0 GOTO LAST
-call fc .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_53\00000000.reg | find "FC: no differences encountered" > NUL
+call fc /c  .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_53\00000000.reg | find "FC: no differences encountered" > NUL
 if not %errorlevel%==0 GOTO LAST
 ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
 GOTO PASS_CLEAN
@@ -1904,7 +1904,7 @@
 call copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\version_5_1.txt .\romdrive\system\data\sisregistry_5.1.txt > NUL
 call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tinterpretsisinteg\data\simple.sis -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
 if not %errorlevel%==0 GOTO LAST
-call fc .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_51\00000000.reg | find "FC: no differences encountered" > NUL
+call fc /c  .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_51\00000000.reg | find "FC: no differences encountered" > NUL
 if not %errorlevel%==0 GOTO LAST
 ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
 GOTO PASS_CLEAN
@@ -1918,7 +1918,7 @@
 call copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\version_4_1.txt .\romdrive\system\data\sisregistry_4.0.txt > NUL
 call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tinterpretsisinteg\data\simple.sis -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
 if not %errorlevel%==0 GOTO LAST
-call fc .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_40\00000000.reg | find "FC: no differences encountered" > NUL
+call fc /c  .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_40\00000000.reg | find "FC: no differences encountered" > NUL
 if not %errorlevel%==0 GOTO LAST
 ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
 GOTO PASS_CLEAN
@@ -1928,7 +1928,7 @@
 if not exist .\romdrive\system\install mkdir .\romdrive\system\install > NUL
 call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tinterpretsisinteg\data\simple.sis -k 5.3 -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
 if not %errorlevel%==0 GOTO LAST
-call fc .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_53\00000000.reg | find "FC: no differences encountered" > NUL
+call fc /c  .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_53\00000000.reg | find "FC: no differences encountered" > NUL
 if not %errorlevel%==0 GOTO LAST
 ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
 GOTO PASS_CLEAN
@@ -1940,7 +1940,7 @@
 call copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\version_4_1.txt .\romdrive\system\data\sisregistry_4.0.txt > NUL
 call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tinterpretsisinteg\data\simple.sis -k 5.3 -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
 if not %errorlevel%==0 GOTO LAST
-call fc .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_53\00000000.reg | find "FC: no differences encountered" > NUL
+call fc /c  .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_53\00000000.reg | find "FC: no differences encountered" > NUL
 if not %errorlevel%==0 GOTO LAST
 ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
 GOTO PASS_CLEAN
@@ -1952,7 +1952,7 @@
 call copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\version_5_3.txt .\romdrive\system\data\sisregistry_5.3.txt > NUL
 call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tinterpretsisinteg\data\simple.sis -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
 if not %errorlevel%==0 GOTO LAST
-call fc .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_53\00000000.reg | find "FC: no differences encountered" > NUL
+call fc /c  .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_53\00000000.reg | find "FC: no differences encountered" > NUL
 if not %errorlevel%==0 GOTO LAST
 ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
 GOTO PASS_CLEAN
@@ -1964,7 +1964,7 @@
 call copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\version_5_1.txt .\romdrive\system\data\sisregistry_5.1.txt > NUL
 call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tinterpretsisinteg\data\simple.sis -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
 if not %errorlevel%==0 GOTO LAST
-call fc .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_51\00000000.reg | find "FC: no differences encountered" > NUL
+call fc /c  .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_51\00000000.reg | find "FC: no differences encountered" > NUL
 if not %errorlevel%==0 GOTO LAST
 ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
 GOTO PASS_CLEAN
@@ -1976,7 +1976,7 @@
 call copy \epoc32\winscw\c\tswi\tinterpretsisinteg\data\version_5_3.txt .\romdrive\system\data\sisregistry_5.3.txt > NUL
 call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tinterpretsisinteg\data\simple.sis -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
 if not %errorlevel%==0 GOTO LAST
-call fc .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_53\00000000.reg | find "FC: no differences encountered" > NUL
+call fc /c  .\cdrive\sys\install\sisregistry\80000001\00000000.reg \epoc32\winscw\c\tswi\tinterpretsisinteg\data\80000001_53\00000000.reg | find "FC: no differences encountered" > NUL
 if not %errorlevel%==0 GOTO LAST
 ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
 GOTO PASS_CLEAN
@@ -2503,7 +2503,7 @@
 if not %errorlevel%==0 GOTO LAST
 set exist_file=.\edrive\private\10202dce\802730A9_0.sis
 if not exist %exist_file% GOTO FAIL_NOT_FOUND
-call fc .\edrive\private\10202dce\802730A9_0.sis \epoc32\winscw\c\tswi\tinterpretsisinteg\data\802730A9_0.sis | find "FC: no differences encountered" > NUL
+call fc /c  .\edrive\private\10202dce\802730A9_0.sis \epoc32\winscw\c\tswi\tinterpretsisinteg\data\802730A9_0.sis | find "FC: no differences encountered" > NUL
 if not %errorlevel%==0 GOTO LAST
 ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
 GOTO PASS_CLEAN