Revision: 201020 RCL_3 PDK_3.0.1
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 21 Jun 2010 16:36:59 +0300
branchRCL_3
changeset 15 f85613f12947
parent 13 81da3301b632
child 17 dbd1c5e08735
Revision: 201020 Kit: 2010125
backupandrestore/backupengine/group/sbeclient.mmp
backupandrestore/backupengine/group/sbencrypt.mmp
backupandrestore/backupengine/group/sbengine.mmp
backupandrestore/backupengine/group/sbenginenojava.mmp
backupandrestore/backupengine/inc/sbepanic.h
backupandrestore/backupengine/src/abserver.cpp
backupandrestore/backupengine/src/absession.cpp
backupandrestore/backupengine/src/absessionmap.cpp
backupandrestore/backupengine/src/sbebufferhandler.cpp
backupandrestore/backupengine/src/sbeclient.cpp
backupandrestore/backupengine/src/sbeclientsession.cpp
backupandrestore/backupengine/src/sbeconfig.cpp
backupandrestore/backupengine/src/sbedataowner.cpp
backupandrestore/backupengine/src/sbepanic.cpp
backupandrestore/backupengine/src/sbeserver.cpp
backupandrestore/backupengine/src/sbesession.cpp
backupandrestore/backupengine/src/sbheapwrapper.cpp
backupandrestore/backupengine/src/sbtypes.cpp
backupandrestore/backuptest/ABTester/data/backup_public_files_registration.xml
backupandrestore/backuptest/ABTester/data/base_active_backup_registration.xml
backupandrestore/backuptest/ABTester/data/base_active_backup_registration2.xml
backupandrestore/backuptest/ABTester/data/base_active_backup_registration3.xml
backupandrestore/backuptest/ABTester/data/incremental_active_backup_registration.xml
backupandrestore/backuptest/ABTester/data/passive_backup_registration.xml
backupandrestore/backuptest/ABTester/data/proxy_active_backup_registration.xml
backupandrestore/backuptest/burtestserver/testscripts/backup_registration.xml
backupandrestore/backuptest/burtestserver/testscripts/import_backup_registration.xml
backupandrestore/backuptest/burtestserver/testscripts/increamenttest.xml
backupandrestore/backuptest/burtestserver/testscripts/invalidproxymgr.xml
backupandrestore/backuptest/burtestserver/testscripts/private_file1.dat
backupandrestore/backuptest/burtestserver/testscripts/public_file1.dat
backupandrestore/backuptest/burtestserver/testscripts/public_file2.dat
backupandrestore/backuptest/burtestserver/testscripts/sbeconfig.xml
backupandrestore/backuptest/burtestserver/testscripts/test.ini
backupandrestore/backuptest/burtestserver/testscripts/test_activebackuprestore.script
backupandrestore/backuptest/burtestserver/testscripts/test_backupinvalid.script
backupandrestore/backuptest/burtestserver/testscripts/test_backuppackage.script
backupandrestore/backuptest/burtestserver/testscripts/test_backuprestore.script
backupandrestore/backuptest/burtestserver/testscripts/test_backuprestoreasync.script
backupandrestore/backuptest/burtestserver/testscripts/test_increament.script
backupandrestore/backuptest/burtestserver/testscripts/test_registration.xml
backupandrestore/backuptest/burtestserver/testscripts/test_restorepackage.script
backupandrestore/backuptest/burtestserver/testscripts/testbigfile.dat
backupandrestore/backuptest/testdata/armv5/bigexeforbackup.sis
backupandrestore/backuptest/testdata/armv5/test_dll_nopublic.sis
backupandrestore/backuptest/testdata/winscw/bigexeforbackup.sis
backupandrestore/backuptest/testdata/winscw/test_dll_nopublic.SIS
mtpdataproviders/mtpfileandfolderdp/src/cmtpfiledpexclusionmgr.cpp
mtpdataproviders/mtpimagedp/inc/cmtpimagedpobjectpropertymgr.h
mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp
mtpdataproviders/mtpimagedp/src/cmtpimagedpcopyobject.cpp
mtpdataproviders/mtpimagedp/src/cmtpimagedpdeleteobject.cpp
mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectproplist.cpp
mtpdataproviders/mtpimagedp/src/cmtpimagedpmoveobject.cpp
mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp
mtpdataproviders/mtpimagedp/src/cmtpimagedpsendobjectinfo.cpp
mtpdataproviders/mtppictbridgedp/src/cmtppictbridgedpsendobjectinfo.cpp
mtpfws/mtpfw/conf/mtpframework.confml
mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedatastore.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedpconfigmgr.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdeviceinfo.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdevicepropdesc.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdevicepropvalue.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetobjecthandles.cpp
mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp
mtpfws/mtpfw/dataproviders/dputility/src/cmtpfsenumerator.cpp
mtpfws/mtpfw/dataproviders/dputility/src/cmtpknowledgehandler.cpp
mtpfws/mtpfw/dataproviders/dputility/src/cmtpmoveobject.cpp
mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectprotection.cpp
mtpfws/mtpfw/dataproviders/proxydp/src/cmtpcopyobject.cpp
mtpfws/mtpfw/dataproviders/proxydp/src/cmtpdeleteobjectproplist.cpp
mtpfws/mtpfw/dataproviders/proxydp/src/cmtpmoveobject.cpp
mtpfws/mtpfw/dataproviders/proxydp/src/cmtpsendobjectinfo.cpp
mtpfws/mtpfw/dataproviders/proxydp/src/cmtpsendobjectproplist.cpp
mtpfws/mtpfw/datatypes/interface/cmtptypefile.h
mtpfws/mtpfw/datatypes/src/cmtptypefile.cpp
mtpfws/mtpfw/group/10282FCC_ARMV5.cre
mtpfws/mtpfw/group/10282FCC_ARMV5.txt
mtpfws/mtpfw/group/10282FCC_WINSCW.cre
mtpfws/mtpfw/group/10282FCC_WINSCW.txt
mtpfws/mtpfw/src/cmtpdataprovidercontroller.cpp
mtpfws/mtpfw/src/cmtpframeworkconfig.cpp
mtpfws/mtpfw/src/cmtpreferencemgr.cpp
mtpfws/mtpfw/src/cmtpserviceconfig.cpp
mtpfws/mtpfw/src/ruidmapper.cpp
mtptransports/mtpusbtransport/usbsic_imp/inc/cmtpusbepbase.h
mtptransports/mtpusbtransport/usbsic_imp/src/cmtpusbconnection.cpp
mtptransports/mtpusbtransport/usbsic_imp/src/cmtpusbepbase.cpp
--- a/backupandrestore/backupengine/group/sbeclient.mmp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/group/sbeclient.mmp	Mon Jun 21 16:36:59 2010 +0300
@@ -25,9 +25,7 @@
 
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN
 
-USERINCLUDE ../../../../../os/ossrv/genericservices/activebackupclient/inc
-SOURCEPATH ../../../../../os/ossrv/genericservices/activebackupclient/src
-SOURCE panic.cpp
+
 
 
 USERINCLUDE . ../inc
@@ -35,7 +33,8 @@
 SOURCE sbheapwrapper.cpp
 SOURCE sbeclient.cpp
 SOURCE sbeclientsession.cpp
-SOURCE sbtypes.cpp
+SOURCE sbtypes.cpp 
+SOURCE sbepanic.cpp
 
 LIBRARY euser.lib estor.lib apgrfx.lib apmime.lib 
 
--- a/backupandrestore/backupengine/group/sbencrypt.mmp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/group/sbencrypt.mmp	Mon Jun 21 16:36:59 2010 +0300
@@ -25,15 +25,14 @@
 USERINCLUDE .
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN
 
-USERINCLUDE ../../../../../os/ossrv/genericservices/activebackupclient/inc
-SOURCEPATH ../../../../../os/ossrv/genericservices/activebackupclient/src
-SOURCE panic.cpp
+
 
 
 USERINCLUDE . ../inc
 SOURCEPATH ../src
 SOURCE	sbencrypt.cpp
-SOURCE	sbencryptimpl.cpp
+SOURCE	sbencryptimpl.cpp 
+SOURCE  sbepanic.cpp
 
 LIBRARY euser.lib
 
--- a/backupandrestore/backupengine/group/sbengine.mmp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/group/sbengine.mmp	Mon Jun 21 16:36:59 2010 +0300
@@ -29,9 +29,8 @@
 UID  0 0x10202D56	// Assigned UID
 VENDORID 0x70000001
 
-USERINCLUDE ../../../../../os/ossrv/genericservices/activebackupclient/inc
-SOURCEPATH ../../../../../os/ossrv/genericservices/activebackupclient/src
-SOURCE panic.cpp
+
+
 
 SOURCEPATH ../src
 SOURCE	sbtypes.cpp
@@ -51,6 +50,7 @@
 SOURCE  sbecompressionandencryption.cpp
 SOURCE  sbeconfig.cpp
 SOURCE	sbeparserproxy.cpp
+SOURCE  sbepanic.cpp
 
 USERINCLUDE . ../inc
 
@@ -66,12 +66,12 @@
 #ifdef __SBE_DISABLE_RELEASE_LOGGING
 
     // Flogger will not be linked do this binary in UREL builds
-    DEBUGLIBRARY flogger.lib
+DEBUGLIBRARY flogger.lib
 
 #else
 
     // Flogger always statically linked to this binary.
-    LIBRARY flogger.lib
+LIBRARY flogger.lib
 
 #endif
 
--- a/backupandrestore/backupengine/group/sbenginenojava.mmp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/group/sbenginenojava.mmp	Mon Jun 21 16:36:59 2010 +0300
@@ -30,9 +30,8 @@
 
 MACRO SBENGINE_EXCLUDE_JAVA
 
-USERINCLUDE ../../../../../os/ossrv/genericservices/activebackupclient/inc
-SOURCEPATH ../../../../../os/ossrv/genericservices/activebackupclient/src
-SOURCE panic.cpp
+
+
 
 SOURCEPATH ../src
 SOURCE	sbtypes.cpp
@@ -52,6 +51,7 @@
 SOURCE  sbecompressionandencryption.cpp
 SOURCE  sbeconfig.cpp
 SOURCE	sbeparserproxy.cpp
+SOURCE  sbepanic.cpp
 
 USERINCLUDE . ../inc
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backupengine/inc/sbepanic.h	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Declaration of Panic(). Customises a panic raised in SBE
+* 
+*
+*/
+
+
+
+/**
+ @file
+*/
+
+#ifndef __SBPANIC_H__
+#define __SBPANIC_H__
+
+namespace conn
+	{
+	 
+	/** @{ */
+    
+	void Panic(TInt aPanicCode);
+
+    /** @} */
+	}
+	
+#endif	//__SBPANIC_H__
--- a/backupandrestore/backupengine/src/abserver.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/abserver.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -26,7 +26,7 @@
 #include "absession.h"
 #include "absessionmap.h"
 #include "sbedataownermanager.h"
-#include <connect/panic.h>
+#include "sbepanic.h"
 #include "sblog.h"
 
 namespace conn
--- a/backupandrestore/backupengine/src/absession.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/absession.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -26,7 +26,7 @@
 #include "sbedataownermanager.h"
 #include "sbedataowner.h"
 #include <connect/sbtypes.h>
-#include <connect/panic.h>
+#include "sbepanic.h"
 #include "sblog.h"
 
 namespace conn
--- a/backupandrestore/backupengine/src/absessionmap.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/absessionmap.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -22,7 +22,7 @@
 #include "absession.h"
 #include "absessionmap.h"
 #include "sbedataowner.h"
-#include <connect/panic.h>
+#include "sbepanic.h"
 
 namespace conn
 	{
--- a/backupandrestore/backupengine/src/sbebufferhandler.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/sbebufferhandler.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -22,7 +22,7 @@
 
 #include "sbebufferhandler.h"
 #include "sblog.h"
-#include <connect/panic.h>
+#include "sbepanic.h"
 
 namespace conn
 	{
--- a/backupandrestore/backupengine/src/sbeclient.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/sbeclient.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -22,7 +22,7 @@
 
 #include "sbeclient.h"
 #include "sbeclientsession.h"
-#include <connect/panic.h>
+#include "sbepanic.h"
 
 namespace conn
 	{
--- a/backupandrestore/backupengine/src/sbeclientsession.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/sbeclientsession.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -22,7 +22,7 @@
 #include "sbeclientsession.h"
 #include "sbeclientserver.h"
 #include <connect/sbtypes.h>
-#include <connect/panic.h>
+#include "sbepanic.h"
 
 namespace conn
 	{
--- a/backupandrestore/backupengine/src/sbeconfig.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/sbeconfig.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -19,7 +19,7 @@
  @file
 */
 #include <e32std.h>
-#include <connect/panic.h>
+#include "sbepanic.h"
 #include "sbeconfig.h"
 #include "sblog.h"
 #include <xml/parser.h>
--- a/backupandrestore/backupengine/src/sbedataowner.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/sbedataowner.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -25,7 +25,7 @@
 #include "sbtypes.h"
 #include "sblog.h"
 #include "sbeparserdefs.h"
-#include <connect/panic.h>
+#include "sbepanic.h"
 
 namespace conn
 	{	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backupengine/src/sbepanic.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,40 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Server Panic methods
+// 
+//
+
+/**
+ @file
+*/
+
+#include <e32std.h>
+#include "sbepanic.h"
+
+namespace conn
+	{	
+	void Panic(TInt aPanicCode)
+	/**
+    @internalComponent
+    
+	Calls User::Panic with reason "SB: <panic code>"
+
+	@param aPanicCode The panic code as defined in panic.h
+	@panic aPanicCode The panic code passed in
+	*/	
+		{
+		_LIT(KPanicString,"SBE:");
+		User::Panic(KPanicString,aPanicCode);
+		}
+	}
--- a/backupandrestore/backupengine/src/sbeserver.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/sbeserver.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -24,7 +24,7 @@
 #include "sbeclientserver.h"
 #include "sbeserver.h"
 #include "sbesession.h"
-#include <connect/panic.h>
+#include "sbepanic.h"
 #include "sbedataownermanager.h"
 #include "sblog.h"
 //#include <stdlib.h>
--- a/backupandrestore/backupengine/src/sbesession.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/sbesession.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -24,7 +24,7 @@
 #include "sbeserver.h"
 #include "sbesession.h"
 #include "sbeclientserver.h"
-#include <connect/panic.h>
+#include "sbepanic.h"
 #include "sbedataownermanager.h"
 #include <connect/sbtypes.h>
 #include "sblog.h"
--- a/backupandrestore/backupengine/src/sbheapwrapper.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/sbheapwrapper.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -21,7 +21,7 @@
 */
 
 #include "sbheapwrapper.h"
-#include <connect/panic.h>
+#include "sbepanic.h"
 
 namespace conn
 	{
--- a/backupandrestore/backupengine/src/sbtypes.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/backupandrestore/backupengine/src/sbtypes.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -19,7 +19,7 @@
  @file
 */
 #include <e32std.h>
-#include <connect/panic.h>
+#include "sbepanic.h"
 #include "sbtypes.h"
 #include <s32mem.h>
 #include <apgcli.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/ABTester/data/backup_public_files_registration.xml	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,14 @@
+<?xml version="1.0" standalone="yes"?>
+
+
+<backup_registration>
+    <passive_backup>
+        <include_directory name = "\"/>
+    </passive_backup>
+    
+    <public_backup>
+      <include_directory name = "c:\public\0FA00001\"/>
+    </public_backup>
+    
+    <restore requires_reboot = "no"/>
+</backup_registration>
\ No newline at end of file
Binary file backupandrestore/backuptest/ABTester/data/base_active_backup_registration.xml has changed
Binary file backupandrestore/backuptest/ABTester/data/base_active_backup_registration2.xml has changed
Binary file backupandrestore/backuptest/ABTester/data/base_active_backup_registration3.xml has changed
Binary file backupandrestore/backuptest/ABTester/data/incremental_active_backup_registration.xml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/ABTester/data/passive_backup_registration.xml	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,94 @@
+<?xml version="1.0" standalone="yes"?>
+
+
+<backup_registration>
+   <passive_backup supports_selective="no" delete_before_restore="no" base_backup_only="yes">
+      <include_file name = "privatedata.txt"/>
+      
+      <include_file name = "sbetest1.txt"/>
+      <include_file name = "sbetest2.txt"/>
+      <include_file name = "\sbetest3.txt"/>
+      <include_file name = "sys\install\log.txt"/>
+      <include_file name = "b:\system\System.ini"/>
+      <include_file name = "z:\resource\locales.txt"/>
+      <include_file name = "\resource2\locales.txt"/>
+      <include_file name = "!:\resource2\locales.txt"/>
+      <include_file name = "?:\resource2\locales.txt"/>
+      <include_file name = "*:\resource2\locales.txt"/>
+      <include_directory name="\" />
+      <include_directory name="c:\private\0AB7E58C" />
+      <include_directory name="c:\private\0AB7E58C\" />
+      <include_directory name="z:\private\0AB7E58C" />
+      <include_directory name="z:\private\0AB7E58C\" />
+      <include_directory name2="\" />
+      <include_directory name="" />
+      <include_directory name2="" />
+      
+      <include_directory name="c:\" />
+      <include_directory name="!:\mydatabases\"/>
+      <exclude name = "sbetest1.txt"/>
+      <exclude name = "sbetest2.txt"/>
+      <exclude name = "\sbetest3.txt"/>
+      <exclude name = "sys\install\log.txt"/>
+      <exclude name = "a:\sbetest3_ex.txt"/>
+      <exclude name = "\:\sbetest1_ex.txt"/>
+      <exclude name = "sbetest2_ex.txt"/>
+      <exclude name = "\sys\install\log_ex.txt"/>
+      <exclude name = "\system\System_ex.ini"/>
+      <exclude name = "\resource\locales_ex.txt"/>
+      <exclude name = "\resource2\locales_ex.txt"/>
+      <exclude name = "!:\resource2\locales_ex.txt"/>
+      <exclude name = "?:\resource2\locales_ex.txt"/>
+      <exclude name = "*:\resource2\locales_ex.txt"/>
+      <exclude name="\a_ex" />
+      <exclude name="?:\b_ex" />
+      <exclude name="!:\mydatabases_ex\"/>
+    </passive_backup>
+    <public_backup delete_before_restore="yes">
+      <include_file name = "c:\sbetest1.txt"/>
+      <include_file name = "c:\sbetest2.txt"/>
+      <include_file name = "\sbetest3.txt"/>
+      <include_file name = "c:\sys\install\log.txt"/>
+      <include_file name = "c:\system\System.ini"/>
+      <include_file name = "c:\resource\locales.txt"/>
+      <include_file name = "\resource2\locales.txt"/>
+      <include_file name = "!:\resource2\locales.txt"/>
+      <include_file name = "?:\resource2\locales.txt"/>
+      <include_file name = "*:\resource2\locales.txt"/>
+      <include_directory name="\" />
+      <include_directory name="c:\private\0AB7E58C" />
+      <include_directory name="c:\private\0AB7E58C\" />
+      <include_directory name="z:\private\0AB7E58C" />
+      <include_directory name="z:\private\0AB7E58C\" />
+      <include_directory name2="\" />
+      <include_directory name="" />
+      <include_directory name2="" />
+      
+      <include_directory name="c:\" />
+      <include_directory name="!:\mydatabases\"/>
+      <exclude name = "c:\sbetest3_ex.txt"/>
+      <exclude name = "c:\sbetest1_ex.txt"/>
+      <exclude name = "c:\sbetest2_ex.txt"/>
+      <exclude name = "\sbetest3.txt"/>
+      <exclude name = "c:\sys\install\log_ex.txt"/>
+      <exclude name = "c:\system\System_ex.ini"/>
+      <exclude name = "c:\resource\locales_ex.txt"/>
+      <exclude name = "\resource2\locales_ex.txt"/>
+      <exclude name = "!:\resource2\locales_ex.txt"/>
+      <exclude name = "?:\resource2\locales_ex.txt"/>
+      <exclude name = "*:\resource2\locales_ex.txt"/>
+      <exclude name="\a_ex" />
+      <exclude name="c:\b_ex" />
+      <exclude name="!:\mydatabases_ex\"/>
+      
+   </public_backup>
+   <dbms_backup policy="AABBCCDDsdfsdafsdfsdafqw2332"/>
+   <dbms_backup policy=""/>
+   <dbms_backup/>
+   <dbms_backup policy="0x0AB7E58C"/>
+   <dbms_backup database="0x0AB7E58C"/>
+   <dbms_backup test1="0x0AB7E58C"/>
+   <system_backup />
+   <proxy_data_manager test2="0x10202BE9" />
+   <restore requires_reboot = "no"/>
+</backup_registration>
Binary file backupandrestore/backuptest/ABTester/data/proxy_active_backup_registration.xml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/backup_registration.xml	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="yes"?>
+
+<backup_registration>
+   <passive_backup base_backup_only="yes">
+      <include_directory name = "preserve"/>
+   </passive_backup>
+</backup_registration>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/import_backup_registration.xml	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="yes"?>
+
+<backup_registration>
+    <public_backup>
+      <include_directory name = "C:\public\81113002\"/>
+	  <include_directory name = "!:\public\test\"/>
+	  <exclude name = "c:\nkern.txt"/>
+    </public_backup>    
+   
+    <!-- Increase condition coverage -->
+    <exclude name = "c:\resource\81113002\nkern.txt"/>
+
+    <!--test proxy parse function. --> 
+    <proxy_data_manager sid= "0x10202BE9" />
+
+    <system_backup/>
+    <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/increamenttest.xml	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,11 @@
+<?xml version="1.0" standalone="yes"?>
+
+<backup_registration>
+   <passive_backup base_backup_only="no">
+      <include_file name="needbackup.xml"/>
+   </passive_backup>
+   <public_backup>
+      <include_file name="c:\publicbackup.xml"/>
+   </public_backup>
+</backup_registration>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/invalidproxymgr.xml	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+    <proxy_data_manager SID="0x00000000" />
+    <dbms_backup policy="AABBCCDD" /> 
+</backup_registration>
Binary file backupandrestore/backuptest/burtestserver/testscripts/private_file1.dat has changed
Binary file backupandrestore/backuptest/burtestserver/testscripts/public_file1.dat has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/public_file2.dat	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,1 @@
+test data
\ No newline at end of file
Binary file backupandrestore/backuptest/burtestserver/testscripts/sbeconfig.xml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/test.ini	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,223 @@
+[BACKUP_RESTORE_0010]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=10005399
+
+[BACKUP_RESTORE_0020]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=0
+DriveList=c
+IDs=10005399
+
+[BACKUP_RESTORE_0030]
+BackupDir=c:\BackupArchive\
+IsPartial=0
+BaseOnly=1
+DriveList=c
+
+[BACKUP_RESTORE_0040]
+BackupDir=c:\BackupArchive\
+IsPartial=0
+BaseOnly=0
+DriveList=c
+
+[BACKUP_RESTORE_0050]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=00000000
+
+[BACKUP_RESTORE_0060]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=o
+IDs=0AB7E57C
+ExpectStatus=-1
+
+[BACKUP_RESTORE_0070]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=12345678
+
+[BACKUP_RESTORE_0075]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=0AB7E58F
+
+[BACKUP_RESTORE_0077]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=0AB7E58F
+ExpectStatus=-21
+
+[BACKUP_RESTORE_0080]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=0
+DriveList=c
+IDs=0AB7E58F
+
+[BACKUP_RESTORE_0090]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=0
+DriveList=c
+IDs=0AB7E58F
+
+[BACKUP_RESTORE_0100]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=0
+DriveList=c
+IDs=0AB7E58C
+
+[BACKUP_RESTORE_0110]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=0
+DriveList=A,c,$,#,@,!,1,^,&,*
+IDs=0AB7E58C
+ExpectStatus=-1
+
+[BACKUP_RESTORE_0120]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=0
+DriveList=c
+IDs=0AB7E58C
+ExpectStatus=-21
+
+[INC_BACKUP_RESTORE_0010]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+IDs=0AB7E57C,0AB7E57E,0AB7E58A
+BaseOnly=1
+DriveList=c
+
+[INC_BACKUP_RESTORE_0020]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+IDs=0AB7E57C,0AB7E57E,0AB7E58A
+BaseOnly=0
+DriveList=c
+
+[PACKAGE_0010]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=8111300b
+
+[PACKAGE_0020]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=8111300b
+ExpectStatus=-11
+ExpectStatus2=-12
+
+[PACKAGE_0030]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=81113002
+
+[PACKAGE_0040]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=81113002
+ExpectStatus=-11
+ExpectStatus2=-12
+
+[PUBLIC_FILE_0010]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=0FA00001
+ExpectPublicFiles=c:\public\0FA00001\public_file1.dat,c:\public\0FA00001\public_file2.dat
+
+[PUBLIC_FILE_0020]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=0FA00001
+ExpectPrivateFiles=C:\private\0FA00001\private_file1.dat
+ExpectPrivateFileSizes=68841
+
+[ACTIVE_BACKUP_0010]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+IDs=0AB7E57C,0AB7E57E,0AB7E58A
+BaseOnly=1
+DriveList=c
+
+[ACTIVE_BACKUP_0020]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+IDs=0AB7E57D
+BaseOnly=1
+DriveList=c
+ExpectStatus=-1
+
+[ACTIVE_BACKUP_0030]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+IDs=0AB7E57C
+BaseOnly=0
+DriveList=c
+
+[ACTIVE_BACKUP_0040]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+IDs=0AB7E58B
+BaseOnly=0
+DriveList=c
+ExpectStatus=5
+
+[ACTIVE_RESTORE_0010]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+IDs=0AB7E57C,0AB7E57E,0AB7E58A
+BaseOnly=1
+DriveList=c
+
+[ACTIVE_RESTORE_0020]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+IDs=0AB7E57D
+BaseOnly=1
+DriveList=c
+ExpectStatus=-1
+ExpectStatus2=-18
+
+[ACTIVE_RESTORE_0030]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+IDs=0AB7E57C
+BaseOnly=0
+DriveList=c
+
+[ACTIVE_RESTORE_0040]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+IDs=0AB7E58B
+BaseOnly=0
+DriveList=c
+ExpectStatus=5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/test_activebackuprestore.script	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,230 @@
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+//////////////////////////////////////////////////////////////////////////////////////
+//
+// test_activebackup.script
+//
+////////////////////////////////////////////////////////////////////////////////////
+LOAD_SUITE BURTestServer
+
+PRINT ----------------------------------------------
+PRINT  Test Active Backup
+PRINT ----------------------------------------------
+RUN_UTILS DeleteDirectory C:\BackupArchive\
+START_TESTCASE MTP-SBE-ACTIVEBACKUP-0010
+//! @SYMTestCaseID MTP-SBE-ACTIVEBACKUP-0010
+//! @SYMTestCaseDesc Do BaseOnly active-backup for three data owners
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do BaseOnly active-backup for three data owners 
+//! @SYMTestExpectedResults Backup succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini ACTIVE_BACKUP_0010
+END_TESTCASE MTP-SBE-ACTIVEBACKUP-0010
+
+START_TESTCASE MTP-SBE-ACTIVEBACKUP-0020
+//! @SYMTestCaseID MTP-SBE-ACTIVEBACKUP-0020
+//! @SYMTestCaseDesc Do Proxy active-backup for specified data owner
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do Proxy active-backup for specified data owner
+//! @SYMTestExpectedResults Backup succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini ACTIVE_BACKUP_0020
+END_TESTCASE MTP-SBE-ACTIVEBACKUP-0020
+
+START_TESTCASE MTP-SBE-ACTIVEBACKUP-0030
+//! @SYMTestCaseID MTP-SBE-ACTIVEBACKUP-0030
+//! @SYMTestCaseDesc Do Incremental active-backup for specified data owner
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do Incremental active-backup for specified data owner
+//! @SYMTestExpectedResults Backup succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini ACTIVE_BACKUP_0030
+END_TESTCASE MTP-SBE-ACTIVEBACKUP-0030
+
+START_TESTCASE MTP-SBE-ACTIVEBACKUP-0040
+//! @SYMTestCaseID MTP-SBE-ACTIVEBACKUP-0040
+//! @SYMTestCaseDesc Do active-backup for a data owner whose executable file is missing
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do active-backup for a data owner whose executable file is missing
+//! @SYMTestExpectedResults Backup fails with error code 5
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini ACTIVE_BACKUP_0040
+END_TESTCASE MTP-SBE-ACTIVEBACKUP-0040
+
+PRINT ----------------------------------------------
+PRINT  Test Active Restore
+PRINT ----------------------------------------------
+
+START_TESTCASE MTP-SBE-ACTIVERESTORE-0010
+//! @SYMTestCaseID MTP-SBE-ACTIVERESTORE-0010
+//! @SYMTestCaseDesc Do BaseOnly active-restore for three data owners
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do BaseOnly active-restore for three data owners  
+//! @SYMTestExpectedResults Restore succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini ACTIVE_RESTORE_0010
+END_TESTCASE MTP-SBE-ACTIVERESTORE-0010
+
+START_TESTCASE MTP-SBE-ACTIVERESTORE-0020
+//! @SYMTestCaseID MTP-SBE-ACTIVERESTORE-0020
+//! @SYMTestCaseDesc Do Proxy active-restore for specified data owner
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do Proxy active-restore for specified data owner  
+//! @SYMTestExpectedResults Restore succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini ACTIVE_RESTORE_0020
+END_TESTCASE MTP-SBE-ACTIVERESTORE-0020
+
+START_TESTCASE MTP-SBE-ACTIVERESTORE-0030
+//! @SYMTestCaseID MTP-SBE-ACTIVERESTORE-0030
+//! @SYMTestCaseDesc Do Incremental active-restore for specified data owner
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do Incremental active-restore for specified data owner  
+//! @SYMTestExpectedResults Restore succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini ACTIVE_RESTORE_0030
+END_TESTCASE MTP-SBE-ACTIVERESTORE-0030
+
+START_TESTCASE MTP-SBE-ACTIVERESTORE-0040
+//! @SYMTestCaseID MTP-SBE-ACTIVERESTORE-0040
+//! @SYMTestCaseDesc Do active-restore for a data owner whose executable file is missing
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do active-restore for a data owner whose executable file is missing 
+//! @SYMTestExpectedResults Restore fails with error code 5
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini ACTIVE_RESTORE_0040
+END_TESTCASE MTP-SBE-ACTIVERESTORE-0040
+
+PRINT ----------------------------------------------
+PRINT  Test Active Backup Async
+PRINT ----------------------------------------------
+RUN_UTILS DeleteDirectory C:\BackupArchive\
+START_TESTCASE MTP-SBE-ACTIVEBACKUP-ASYNC-0010
+//! @SYMTestCaseID MTP-SBE-ACTIVEBACKUP-ASYNC-0010
+//! @SYMTestCaseDesc Do BaseOnly active-backup for three data owners asynchronously
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do BaseOnly active-backup for three data owners asynchronously
+//! @SYMTestExpectedResults Backup succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackupAsync z:\testdata\scripts\sbetestdata\test.ini ACTIVE_BACKUP_0010
+END_TESTCASE MTP-SBE-ACTIVEBACKUP-ASYNC-0010
+
+START_TESTCASE MTP-SBE-ACTIVEBACKUP-ASYNC-0020
+//! @SYMTestCaseID MTP-SBE-ACTIVEBACKUP-ASYNC-0020
+//! @SYMTestCaseDesc Do Proxy active-backup for specified data owner asynchronously
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do Proxy active-backup for specified data owner asynchronously
+//! @SYMTestExpectedResults Backup succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackupAsync z:\testdata\scripts\sbetestdata\test.ini ACTIVE_BACKUP_0020
+END_TESTCASE MTP-SBE-ACTIVEBACKUP-ASYNC-0020
+
+START_TESTCASE MTP-SBE-ACTIVEBACKUP-ASYNC-0030
+//! @SYMTestCaseID MTP-SBE-ACTIVEBACKUP-ASYNC-0030
+//! @SYMTestCaseDesc Do Incremental active-backup for specified data owner asynchronously
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do Incremental active-backup for specified data owner asynchronously 
+//! @SYMTestExpectedResults Backup succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackupAsync z:\testdata\scripts\sbetestdata\test.ini ACTIVE_BACKUP_0030
+END_TESTCASE MTP-SBE-ACTIVEBACKUP-ASYNC-0030
+
+START_TESTCASE MTP-SBE-ACTIVEBACKUP-ASYNC-0040
+//! @SYMTestCaseID MTP-SBE-ACTIVEBACKUP-ASYNC-0040
+//! @SYMTestCaseDesc Do active-backup asynchronously for a data owner whose executable file is missing
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do active-backup asynchronously for a data owner whose executable file is missing  
+//! @SYMTestExpectedResults Backup fails with error code 5
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackupAsync z:\testdata\scripts\sbetestdata\test.ini ACTIVE_BACKUP_0040
+END_TESTCASE MTP-SBE-ACTIVEBACKUP-ASYNC-0040
+
+PRINT ----------------------------------------------
+PRINT  Test Active Restore Async
+PRINT ----------------------------------------------
+
+START_TESTCASE MTP-SBE-ACTIVERESTORE-ASYNC-0010
+//! @SYMTestCaseID MTP-SBE-ACTIVERESTORE-ASYNC-0010
+//! @SYMTestCaseDesc Do BaseOnly active-restore for three data owners asynchronously
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do BaseOnly active-restore for three data owners asynchronously
+//! @SYMTestExpectedResults Restore succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestoreAsync z:\testdata\scripts\sbetestdata\test.ini ACTIVE_RESTORE_0010
+END_TESTCASE MTP-SBE-ACTIVERESTORE-ASYNC-0010
+
+START_TESTCASE MTP-SBE-ACTIVERESTORE-ASYNC-0020
+//! @SYMTestCaseID MTP-SBE-ACTIVERESTORE-ASYNC-0020
+//! @SYMTestCaseDesc Do Proxy active-restore for specified data owner asynchronously
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do Proxy active-restore for specified data owner asynchronously
+//! @SYMTestExpectedResults Restore succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestoreAsync z:\testdata\scripts\sbetestdata\test.ini ACTIVE_RESTORE_0020
+END_TESTCASE MTP-SBE-ACTIVERESTORE-ASYNC-0020
+
+START_TESTCASE MTP-SBE-ACTIVERESTORE-ASYNC-0030
+//! @SYMTestCaseID MTP-SBE-ACTIVERESTORE-ASYNC-0030
+//! @SYMTestCaseDesc Do Incremental active-restore for specified data owner asynchronously
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do Incremental active-restore for specified data owner asynchronously 
+//! @SYMTestExpectedResults Restore succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestoreAsync z:\testdata\scripts\sbetestdata\test.ini ACTIVE_RESTORE_0030
+END_TESTCASE MTP-SBE-ACTIVERESTORE-ASYNC-0030
+
+START_TESTCASE MTP-SBE-ACTIVERESTORE-ASYNC-0040
+//! @SYMTestCaseID MTP-SBE-ACTIVERESTORE-ASYNC-0040
+//! @SYMTestCaseDesc Do active-restore asynchronously for a data owner whose executable file is missing
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority normal
+//! @SYMTestActions Do active-restore asynchronously for a data owner whose executable file is missing 
+//! @SYMTestExpectedResults Restore fails with error code 5
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestoreAsync z:\testdata\scripts\sbetestdata\test.ini ACTIVE_RESTORE_0040
+END_TESTCASE MTP-SBE-ACTIVERESTORE-ASYNC-0040
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/test_backupinvalid.script	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,111 @@
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+//////////////////////////////////////////////////////////////////////////////////////
+//
+// test.script
+//
+////////////////////////////////////////////////////////////////////////////////////
+LOAD_SUITE BURTestServer
+
+PRINT ----------------------------------------------
+PRINT  Test Backup Invalid
+PRINT ----------------------------------------------
+RUN_UTILS DeleteDirectory C:\BackupArchive\
+START_TESTCASE MTP-SBE-BACKUPINVALIDIDS-0000
+//! @SYMTestCaseID MTP-SBE-BACKUPINVALIDIDS-0000
+//! @SYMTestCaseDesc Invalid data owner ID test
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify an invlid id and try backup it.
+//! @SYMTestExpectedResults SBE can't found and do nothing
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0050
+END_TESTCASE MTP-SBE-BACKUPINVALIDIDS-0000
+
+START_TESTCASE MTP-SBE-BACKUPINVALIDDRIVE-0001
+//! @SYMTestCaseID MTP-SBE-BACKUPINVALIDDRIVE-0001
+//! @SYMTestCaseDesc Invalid drive test
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify an invalid drive for a data owner to backup
+//! @SYMTestExpectedResults SBE backup operation return -1
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0060
+END_TESTCASE MTP-SBE-BACKUPINVALIDDRIVE-0001
+
+RUN_UTILS MkDir c:\private\12345678\
+RUN_UTILS CopyFile z:\testdata\scripts\sbetestdata\backup_registration.xml c:\private\12345678\backup_registration.xml
+START_TESTCASE MTP-SBE-BACKUPINVALIDDIR-0002
+//! @SYMTestCaseID MTP-SBE-BACKUPINVALIDDIR-0002
+//! @SYMTestCaseDesc Invalid directory test
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify an invalid directory for a data owner to backup
+//! @SYMTestExpectedResults SBE can't found and do nothing
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0070
+END_TESTCASE MTP-SBE-BACKUPINVALIDDIR-0002
+
+RUN_UTILS DeleteDirectory c:\private\12345678\
+RUN_UTILS DeleteDirectory c:\BackupArchive\
+RUN_UTILS DeleteDirectory c:\private\0AB7E58F\
+RUN_UTILS MkDir c:\private\0AB7E58F\
+RUN_UTILS CopyFile  z:\testdata\scripts\sbetestdata\invalidproxymgr.xml c:\private\0AB7E58F\backup_registration.xml
+RUN_UTILS MakeReadWrite c:\private\0AB7E58F\backup_registration.xml
+START_TESTCASE MTP-SBE-BACKUPINVALIDPROXY-0003
+//! @SYMTestCaseID MTP-SBE-BACKUPINVALIDPROXY-0003
+//! @SYMTestCaseDesc Invalid proxy manager test
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify an invalid proxy manager in register file for a data owner to backup
+//! @SYMTestExpectedResults SBE can't found and do nothing
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0075
+END_TESTCASE MTP-SBE-BACKUPINVALIDPROXY-0003
+
+RUN_UTILS DeleteDirectory c:\private\0AB7E58F\
+RUN_UTILS DeleteDirectory c:\BackupArchive\
+RUN_UTILS MkDir c:\private\0AB7E58F\
+RUN_UTILS CopyFile  z:\testdata\scripts\sbetestdata\increamenttest.xml c:\private\0AB7E58F\backup_registration.xml
+RUN_UTILS CopyFile  z:\sys\bin\esock.dll c:\private\0AB7E58F\needbackup.xml
+START_TESTCASE MTP-SBE-BACKUPREADONLY-0004
+//! @SYMTestCaseID MTP-SBE-BACKUPREADONLY-0004
+//! @SYMTestCaseDesc Test readonly file backup. This case only valid on hardware, on winscw, all file is readable.
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Backup a read only file
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0075
+END_TESTCASE MTP-SBE-BACKUPREADONLY-0004
+
+START_TESTCASE MTP-SBE-RESTOREREADONLY-0005
+//! @SYMTestCaseID MTP-SBE-RESTOREREADONLY-0005
+//! @SYMTestCaseDesc Test readonly file restore
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Restore a readonly file, but the origin file exist
+//! @SYMTestExpectedResults -21
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0077
+END_TESTCASE MTP-SBE-RESTOREREADONLY-0005
+RUN_UTILS DeleteDirectory c:\private\0AB7E58F\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/test_backuppackage.script	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,109 @@
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+//////////////////////////////////////////////////////////////////////////////////////
+//
+// test_backuppackage.script
+// for testing backup datas of installed applications 
+//
+////////////////////////////////////////////////////////////////////////////////////
+LOAD_SUITE BURTestServer
+
+PRINT ----------------------------------------------
+PRINT  Test Backup and Restore package applications
+PRINT ----------------------------------------------
+RUN_PROGRAM 1000 swiconsole /i Z:\testdata\scripts\sbetestdata\bigexeforbackup.sis /optimal
+RUN_PROGRAM 1000 swiconsole /i Z:\testdata\scripts\sbetestdata\test_dll_nopublic.SIS /optimal
+RUN_UTILS DeleteDirectory C:\BackupArchive\
+RUN_UTILS DeleteDirectory C:\system\temp\
+RUN_UTILS CopyFile  Z:\testdata\scripts\sbetestdata\private_file1.dat C:\private\81000014\private_file1.dat
+RUN_UTILS MakeReadWrite C:\private\81000014\private_file1.dat
+
+RUN_UTILS DeleteDirectory C:\public\
+RUN_UTILS MkDir C:\public\
+RUN_UTILS MkDir C:\public\81113002\
+RUN_UTILS MkDir C:\public\test\
+RUN_UTILS CopyFile  Z:\testdata\scripts\sbetestdata\public_file1.dat  C:\public\81113002\public_file1.dat
+RUN_UTILS CopyFile  Z:\testdata\scripts\sbetestdata\public_file2.dat  C:\public\81113002\public_file2.dat
+RUN_UTILS CopyFile  Z:\testdata\scripts\sbetestdata\private_file1.dat C:\public\test\private_file1.dat
+RUN_UTILS MakeReadWrite C:\public\81113002\public_file1.dat
+RUN_UTILS MakeReadWrite C:\public\81113002\public_file2.dat
+RUN_UTILS MakeReadWrite C:\public\test\private_file1.dat
+
+START_TESTCASE MTP-SBE-BACKUPPACKAGE-0000
+//! @SYMTestCaseID MTP-SBE-BACKUPPACKAGE-0000
+//! @SYMTestCaseDesc	        Backup big data which owner is install application
+//! @SYMPREQ                    PREQ2492      
+//! @SYMTestStatus              Released
+//! @SYMTestPriority            High 
+//! @SYMTestActions             Backup executable files and private data of install application
+//! @SYMTestExpectedResults     1. The success message displayed in the console.
+//!                             2. No any error or warning message displayed in the console.
+//! @SYMTestType                CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini PACKAGE_0010
+END_TESTCASE MTP-SBE-BACKUPPACKAGE-0000
+RUN_UTILS DeleteFile C:\private\81000014\private_file1.dat
+
+START_TESTCASE MTP-SBE-RESTOREBACKUPPACKAGE-0001
+//! @SYMTestCaseID MTP-SBE-RESTOREBACKUPPACKAGE-0001
+//! @SYMTestCaseDesc            Restore big data which owner is install application
+//! @SYMPREQ                    PREQ2492    
+//! @SYMTestStatus              Released  
+//! @SYMTestPriority            High
+//! @SYMTestActions             Restore executable files and private datas of install application from bakcup file.
+//! @SYMTestExpectedResults     1. The failure message of restore displayed in the console
+//!                             2. The executable files are not be restored.
+//!                             3. The private files are not be restored.
+//! @SYMTestType                CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini PACKAGE_0020
+END_TESTCASE MTP-SBE-RESTOREBACKUPPACKAGE-0001
+RUN_UTILS DeleteFile C:\private\81000014\private_file1.dat
+
+START_TESTCASE MTP-SBE-BACKUPPACKAGE-0002
+//! @SYMTestCaseID MTP-SBE-BACKUPPACKAGE-0002
+//! @SYMTestCaseDesc            Backup DLLs data which are installed as part of package
+//! @SYMPREQ                    PREQ2492
+//! @SYMTestStatus              Released  
+//! @SYMTestPriority            High
+//! @SYMTestActions             Backup executable files and private data of install DLL
+//! @SYMTestExpectedResults     1. The success message displayed in the console.
+//!                             2. No any error or warning message displayed in the console.
+//! @SYMTestType                CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini PACKAGE_0030
+END_TESTCASE MTP-SBE-BACKUPPACKAGE-0002
+
+START_TESTCASE MTP-SBE-RESTOREBACKUPPACKAGE-0003
+//! @SYMTestCaseID MTP-SBE-RESTOREBACKUPPACKAGE-0003
+//! @SYMTestCaseDesc            Backup DLLs data which are installed as part of package
+//! @SYMPREQ                    PREQ2492
+//! @SYMTestStatus              Released
+//! @SYMTestPriority            High
+//! @SYMTestActions             Restore executable files and private datas of install DLL from bakcup file.
+//! @SYMTestExpectedResults     1. The failure message of restore displayed in the console
+//!                             2. The executable files are not be restored.
+//!                             3. The private files are not be restored.
+//! @SYMTestType                CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini PACKAGE_0040
+END_TESTCASE MTP-SBE-RESTOREBACKUPPACKAGE-0003
+
+RUN_UTILS DeleteFile C:\public\81113002\public_file1.dat
+RUN_UTILS DeleteFile C:\public\81113002\public_file2.dat
+RUN_UTILS DeleteFile C:\public\test\private_file1.dat
+RUN_UTILS DeleteDirectory C:\public\81113002\
+RUN_UTILS DeleteDirectory C:\public\test\
+RUN_UTILS DeleteDirectory C:\public\
+RUN_PROGRAM 900 swiconsole /u /uid 0x8111300b /pkg "big exe for backup" /vendor "Unique Vendor Name" /optimal
+RUN_PROGRAM 1000 swiconsole /u /uid 0x81113002 /pkg "tswinocapability" /vendor "Symbian" /optimal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/test_backuprestore.script	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,165 @@
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+//////////////////////////////////////////////////////////////////////////////////////
+//
+// test.script
+//
+////////////////////////////////////////////////////////////////////////////////////
+LOAD_SUITE BURTestServer
+
+DELAY 120000
+
+PRINT ----------------------------------------------
+PRINT  Test Backup Restore
+PRINT ----------------------------------------------
+RUN_UTILS DeleteDirectory C:\BackupArchive\
+START_TESTCASE MTP-SBE-BACKUPPARTIALBASE-0000
+//! @SYMTestCaseID MTP-SBE-BACKUPPARTIALBASE-0000
+//! @SYMTestCaseDesc Backup with partial and base
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for base and partial backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0010
+END_TESTCASE MTP-SBE-BACKUPPARTIALBASE-0000
+
+START_TESTCASE MTP-SBE-RESTOREPARTIALBASE-0001
+//! @SYMTestCaseID MTP-SBE-RESTOREPARTIALBASE-0001
+//! @SYMTestCaseDesc restore with partial and base
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for base and partial restore
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0010
+END_TESTCASE MTP-SBE-RESTOREPARTIALBASE-0001
+
+START_TESTCASE MTP-SBE-BACKUPPARTIAL-0002
+//! @SYMTestCaseID MTP-SBE-BACKUPPARTIAL-0002
+//! @SYMTestCaseDesc Backup with partial and increament
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for increament and partial backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0020
+END_TESTCASE MTP-SBE-BACKUPPARTIAL-0002
+
+START_TESTCASE MTP-SBE-RESTOREPARTIAL-0003
+//! @SYMTestCaseID MTP-SBE-RESTOREPARTIAL-0003
+//! @SYMTestCaseDesc Restore with partial and increament
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for increament and partial restore
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0020
+END_TESTCASE MTP-SBE-RESTOREPARTIAL-0003
+
+START_TESTCASE MTP-SBE-BACKUPFULLBASE-0004
+//! @SYMTestCaseID MTP-SBE-BACKUPFULLBASE-0004
+//! @SYMTestCaseDesc Backup with full and base
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for full and base backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0030
+END_TESTCASE MTP-SBE-BACKUPFULLBASE-0004
+
+START_TESTCASE MTP-SBE-RESTOREFULLBASE-0005
+//! @SYMTestCaseID MTP-SBE-RESTOREFULLBASE-0005
+//! @SYMTestCaseDesc Restore with full and base
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for full and base restore
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0030
+END_TESTCASE MTP-SBE-RESTOREFULLBASE-0005
+
+START_TESTCASE MTP-SBE-BACKUPFULL-0006
+//! @SYMTestCaseID MTP-SBE-BACKUPFULL-0006
+//! @SYMTestCaseDesc Backup with full and increament
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for full and increament backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0040
+END_TESTCASE MTP-SBE-BACKUPFULL-0006
+
+START_TESTCASE MTP-SBE-RESTOREFULL-0007
+//! @SYMTestCaseID MTP-SBE-RESTOREFULL-0007
+//! @SYMTestCaseDesc Restore with full and increament
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for full and increament restore
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0040
+END_TESTCASE MTP-SBE-RESTOREFULL-0007
+
+RUN_UTILS DeleteFile c:\sbetest1.txt
+RUN_UTILS DeleteFile c:\sbetest2.txt
+RUN_UTILS CopyFile  z:\testdata\scripts\sbetestdata\increamenttest.xml c:\sbetest1.txt
+RUN_UTILS CopyFile  z:\testdata\scripts\sbetestdata\increamenttest.xml c:\sbetest2.txt
+RUN_UTILS MakeReadWrite c:\sbetest1.txt
+RUN_UTILS MakeReadWrite c:\sbetest2.txt
+START_TESTCASE MTP-SBE-BACKUPPARTIALBASE-0008
+//! @SYMTestCaseID MTP-SBE-BACKUPPARTIALBASE-0008
+//! @SYMTestCaseDesc Do passive backup for a data owner which has a very complex backup registration file 
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority high
+//! @SYMTestActions Do passive backup for a data owner which has a very complex backup registration file  
+//! @SYMTestExpectedResults Backup succeeds
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0100
+END_TESTCASE MTP-SBE-BACKUPPARTIALBASE-0008
+
+START_TESTCASE MTP-SBE-BACKUPPARTIALBASE-0010
+//! @SYMTestCaseID MTP-SBE-BACKUPPARTIALBASE-0010
+//! @SYMTestCaseDesc Do passive backup for a data owner with a invalid drive list
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority high
+//! @SYMTestActions Do passive backup for a data owner with a invalid drive list  
+//! @SYMTestExpectedResults Backup fails with error code -1
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0110
+END_TESTCASE MTP-SBE-BACKUPPARTIALBASE-0010
+
+START_TESTCASE MTP-SBE-BACKUPPARTIALBASE-0012
+//! @SYMTestCaseID MTP-SBE-BACKUPPARTIALBASE-0012
+//! @SYMTestCaseDesc Do passive backup with abnormal operation sequence
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority high
+//! @SYMTestActions Do passive backup with abnormal operation sequence   
+//! @SYMTestExpectedResults Backup fails with error code -21
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestBackup2 z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0120
+END_TESTCASE MTP-SBE-BACKUPPARTIALBASE-0012
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/test_backuprestoreasync.script	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,124 @@
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+//////////////////////////////////////////////////////////////////////////////////////
+//
+// test.script
+//
+////////////////////////////////////////////////////////////////////////////////////
+LOAD_SUITE BURTestServer
+
+DELAY 120000
+
+PRINT ----------------------------------------------
+PRINT  Test Backup Restore Async
+PRINT ----------------------------------------------
+RUN_UTILS DeleteDirectory C:\BackupArchive\
+START_TESTCASE MTP-SBE-BACKUPPARTIALBASEASYNC-0000
+//! @SYMTestCaseID MTP-SBE-BACKUPPARTIALBASEASYNC-0000
+//! @SYMTestCaseDesc Backup with partial and base
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for base and partial backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackupAsync z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0010
+END_TESTCASE MTP-SBE-BACKUPPARTIALBASEASYNC-0000
+
+START_TESTCASE MTP-SBE-RESTOREPARTIALBASEASYNC-0001
+//! @SYMTestCaseID MTP-SBE-RESTOREPARTIALBASEASYNC-0001
+//! @SYMTestCaseDesc restore with partial and base
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for base and partial restore
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestoreAsync z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0010
+END_TESTCASE MTP-SBE-RESTOREPARTIALBASEASYNC-0001
+
+START_TESTCASE MTP-SBE-BACKUPPARTIALASYNC-0002
+//! @SYMTestCaseID MTP-SBE-BACKUPPARTIALASYNC-0002
+//! @SYMTestCaseDesc Backup with partial and increament
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for increament and partial backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackupAsync z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0020
+END_TESTCASE MTP-SBE-BACKUPPARTIALASYNC-0002
+
+START_TESTCASE MTP-SBE-RESTOREPARTIALASYNC-0003
+//! @SYMTestCaseID MTP-SBE-RESTOREPARTIALASYNC-0003
+//! @SYMTestCaseDesc Restore with partial and increament
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for increament and partial restore
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestRestoreAsync z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0020
+END_TESTCASE MTP-SBE-RESTOREPARTIALASYNC-0003
+
+START_TESTCASE MTP-SBE-BACKUPFULLBASEASYNC-0004
+//! @SYMTestCaseID MTP-SBE-BACKUPFULLBASEASYNC-0004
+//! @SYMTestCaseDesc Backup with full and base
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for full and base backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestBackupAsync z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0030
+END_TESTCASE MTP-SBE-BACKUPFULLBASEASYNC-0004
+
+START_TESTCASE MTP-SBE-RESTOREFULLBASEASYNC-0005
+//! @SYMTestCaseID MTP-SBE-RESTOREFULLBASEASYNC-0005
+//! @SYMTestCaseDesc Restore with full and base
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for full and base restore
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestRestoreAsync z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0030
+END_TESTCASE MTP-SBE-RESTOREFULLBASEASYNC-0005
+
+START_TESTCASE MTP-SBE-BACKUPFULLASYNC-0006
+//! @SYMTestCaseID MTP-SBE-BACKUPFULLASYNC-0006
+//! @SYMTestCaseDesc Backup with full and increament
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for full and increament backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestBackupAsync z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0040
+END_TESTCASE MTP-SBE-BACKUPFULLASYNC-0006
+
+START_TESTCASE MTP-SBE-RESTOREFULLASYNC-0007
+//! @SYMTestCaseID MTP-SBE-RESTOREFULLASYNC-0007
+//! @SYMTestCaseDesc Restore with full and increament
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify ini file for full and increament restore
+//! @SYMTestExpectedResults no error 
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestRestoreAsync z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0040
+END_TESTCASE MTP-SBE-RESTOREFULLASYNC-0007
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/test_increament.script	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,135 @@
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+//////////////////////////////////////////////////////////////////////////////////////
+//
+// test.script
+//
+////////////////////////////////////////////////////////////////////////////////////
+LOAD_SUITE BURTestServer
+
+PRINT ----------------------------------------------
+PRINT  Test Increament
+PRINT ----------------------------------------------
+RUN_UTILS DeleteDirectory c:\BackupArchive\
+RUN_UTILS DeleteDirectory c:\private\0AB7E58F\
+RUN_UTILS DeleteFile c:\publicbackup.xml
+RUN_UTILS MkDir c:\private\0AB7E58F\
+RUN_UTILS CopyFile  z:\testdata\scripts\sbetestdata\increamenttest.xml c:\private\0AB7E58F\backup_registration.xml
+RUN_UTILS MakeReadWrite c:\private\0AB7E58F\backup_registration.xml
+RUN_UTILS CopyFile  c:\private\0AB7E58F\backup_registration.xml c:\private\0AB7E58F\needbackup.xml
+START_TESTCASE MTP-SBE-BACKUPBASE-0000
+//! @SYMTestCaseID MTP-SBE-BACKUPBASE-0000
+//! @SYMTestCaseDesc Backup 0AB7E58F
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify 0AB7E58F need be backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0080
+END_TESTCASE MTP-SBE-BACKUPBASE-0000
+
+RUN_UTILS DeleteFile c:\private\0AB7E58F\needbackup.xml
+RUN_UTILS CopyFile  z:\testdata\scripts\sbetestdata\testbigfile.dat c:\private\0AB7E58F\needbackup.xml
+RUN_UTILS MakeReadWrite c:\private\0AB7E58F\needbackup.xml
+RUN_UTILS CopyFile  c:\private\0AB7E58F\backup_registration.xml c:\publicbackup.xml
+START_TESTCASE MTP-SBE-BACKUPINCREAMENT-0010
+//! @SYMTestCaseID MTP-SBE-BACKUPINCREAMENT-0010
+//! @SYMTestCaseDesc Increament backup 0AB7E58F after some files changed
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify 0AB7E58F need be backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0090
+END_TESTCASE MTP-SBE-BACKUPINCREAMENT-0010
+
+RUN_UTILS DeleteFile c:\publicbackup.xml
+RUN_UTILS DeleteFile c:\private\0AB7E58F\needbackup.xml
+START_TESTCASE MTP-SBE-RESTOREINCREAMENT-0020
+//! @SYMTestCaseID MTP-SBE-RESTOREINCREAMENT-0020
+//! @SYMTestCaseDesc Increament restore
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify 0AB7E58F need be increament restore
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0090
+END_TESTCASE MTP-SBE-RESTOREINCREAMENT-0020
+
+RUN_UTILS DeleteFile c:\private\0AB7E58F\needbackup.xml
+RUN_UTILS DeleteFile c:\BackupArchive\AB7E58F\C\Passive\Base\data.bkp
+START_TESTCASE MTP-SBE-INVALIDDATARESTORE-0030
+//! @SYMTestCaseID MTP-SBE-INVALIDDATARESTORE-0030
+//! @SYMTestCaseDesc Increament restore with invalid data store
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Delete some data store data and try restore
+//! @SYMTestExpectedResults no error and SBE do nothing
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini BACKUP_RESTORE_0090
+END_TESTCASE MTP-SBE-INVALIDDATARESTORE-0030
+
+RUN_UTILS DeleteDirectory c:\private\0AB7E58F\
+START_TESTCASE MTP-SBE-ACTIVEBASEBACKUP-0040
+//! @SYMTestCaseID MTP-SBE-ACTIVEBASEBACKUP-0040
+//! @SYMTestCaseDesc Backup an active data owner
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify active data owner need be backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini INC_BACKUP_RESTORE_0010
+END_TESTCASE MTP-SBE-ACTIVEBASEBACKUP-0040
+
+START_TESTCASE MTP-SBE-ACTIVEINCBACKUP-0050
+//! @SYMTestCaseID MTP-SBE-ACTIVEINCBACKUP-0050
+//! @SYMTestCaseDesc Increament backup an active data owner
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify active data owner need be backup
+//! @SYMTestExpectedResults no error
+//! @SYMTestType CIT
+RUN_TEST_STEP 100 BURTestServer TestBackup z:\testdata\scripts\sbetestdata\test.ini INC_BACKUP_RESTORE_0020
+END_TESTCASE MTP-SBE-ACTIVEINCBACKUP-0050
+
+START_TESTCASE MTP-SBE-ACTIVEBASERESTORE-0060
+//! @SYMTestCaseID MTP-SBE-ACTIVEBASERESTORE-0060
+//! @SYMTestCaseDesc Base restore
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify the active data owner need be base restore 
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini INC_BACKUP_RESTORE_0010
+END_TESTCASE MTP-SBE-ACTIVEBASERESTORE-0060
+
+START_TESTCASE MTP-SBE-ACTIVEINCRESTORE-0070
+//! @SYMTestCaseID MTP-SBE-ACTIVEINCRESTORE-0070
+//! @SYMTestCaseDesc Increament restore
+//! @SYMPREQ 2492
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions   Specify the active data owner need be increament restore  
+//! @SYMTestType CIT
+RUN_TEST_STEP 500 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini INC_BACKUP_RESTORE_0020
+END_TESTCASE MTP-SBE-ACTIVEINCRESTORE-0070
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/test_registration.xml	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,15 @@
+<?xml version="1.0" standalone="yes"?>
+
+<backup_registration>
+    <public_backup>
+	  <include_directory name = "\logs"/>
+	  <include_directory name = "C:\public\81113002\"/>
+	  <include_file name = "C:\public\81113002\public_file1.dat"/>
+	  <include_directory name = "I:\"/>
+	  <exclude name = "c:\nkern.txt"/>
+	  <exclude name = "C:\public\81113002\public_file1.dat"/>
+    </public_backup>
+
+    <system_backup/>
+    <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backupandrestore/backuptest/burtestserver/testscripts/test_restorepackage.script	Mon Jun 21 16:36:59 2010 +0300
@@ -0,0 +1,58 @@
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+//////////////////////////////////////////////////////////////////////////////////////
+//
+// test_backuppackage.script
+// for testing backup datas of installed applications 
+//
+////////////////////////////////////////////////////////////////////////////////////
+LOAD_SUITE BURTestServer
+
+PRINT ----------------------------------------------
+PRINT  Test Restore
+PRINT ----------------------------------------------
+RUN_UTILS DeleteDirectory C:\system\temp\
+
+START_TESTCASE MTP-SBE-RESTOREBACKUPPACKAGE-0000
+//! @SYMTestCaseID MTP-SBE-RESTOREBACKUPPACKAGE-0000
+//! @SYMTestCaseDesc            Restore big data which owner is install application
+//! @SYMPREQ                    PREQ2492
+//! @SYMTestStatus              Released  
+//! @SYMTestPriority            High
+//! @SYMTestActions             Restore executable files and private datas of install application from bakcup file.
+//! @SYMTestExpectedResults     1. The executable files are same like after installing application
+//!                             2. The name and size of private files are same like after installing application.
+//!                             3. The public files don't be restored.  
+//! @SYMTestType                CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini PACKAGE_0020
+END_TESTCASE MTP-SBE-RESTOREBACKUPPACKAGE-0000
+
+START_TESTCASE MTP-SBE-RESTOREBACKUPPACKAGE-0001
+//! @SYMTestCaseID MTP-SBE-RESTOREBACKUPPACKAGE-0001
+//! @SYMTestCaseDesc            Backup DLLs data which are installed as part of package
+//! @SYMPREQ                    PREQ2492
+//! @SYMTestStatus              Released
+//! @SYMTestPriority            High
+//! @SYMTestActions             Restore executable files and private datas of install DLL from bakcup file.
+//! @SYMTestExpectedResults     1. The dll files are same like after installing application
+//!                             2. The name and size of DLLs are same like after installing application.
+//!                             3. The public files don't be restored. 
+//! @SYMTestType                CIT
+RUN_TEST_STEP 100 BURTestServer TestRestore z:\testdata\scripts\sbetestdata\test.ini PACKAGE_0040
+END_TESTCASE MTP-SBE-RESTOREBACKUPPACKAGE-0001
+
+RUN_PROGRAM 900 swiconsole /u /uid 0x8111300b /pkg "big exe for backup" /vendor "Unique Vendor Name" /optimal
+RUN_PROGRAM 1000 swiconsole /u /uid 0x81113002 /pkg "tswinocapability" /vendor "Symbian" /optimal
Binary file backupandrestore/backuptest/burtestserver/testscripts/testbigfile.dat has changed
Binary file backupandrestore/backuptest/testdata/armv5/bigexeforbackup.sis has changed
Binary file backupandrestore/backuptest/testdata/armv5/test_dll_nopublic.sis has changed
Binary file backupandrestore/backuptest/testdata/winscw/bigexeforbackup.sis has changed
Binary file backupandrestore/backuptest/testdata/winscw/test_dll_nopublic.SIS has changed
--- a/mtpdataproviders/mtpfileandfolderdp/src/cmtpfiledpexclusionmgr.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpdataproviders/mtpfileandfolderdp/src/cmtpfiledpexclusionmgr.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -96,7 +96,7 @@
                 formatcode = playbackFormatExclusionList[index];
                 if(KErrNotFound == capFormatExclusionList.FindInOrder(formatcode))
                     {
-                    capFormatExclusionList.InsertInOrder(formatcode);
+                    capFormatExclusionList.InsertInOrderL(formatcode);
                     }
                 }
 
--- a/mtpdataproviders/mtpimagedp/inc/cmtpimagedpobjectpropertymgr.h	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedpobjectpropertymgr.h	Mon Jun 21 16:36:59 2010 +0300
@@ -25,6 +25,7 @@
 #include <e32base.h>
 #include <f32file.h>
 #include <e32std.h>
+#include <e32hashtab.h> 
 
 #include <mdesession.h>
 #include <mtp/mtpprotocolconstants.h>
@@ -74,7 +75,8 @@
     void GetPropertyL(TMTPObjectPropertyCode aProperty, CMTPTypeArray& aValue, TBool alwaysCreate = ETrue);
     
     //clear the cache
-    void ClearCacheL();
+    void ClearAllCache();
+    void ClearCache(TUint aHandle);
     void ConvertMTPTimeStr2TTimeL(const TDesC& aTimeString, TTime& aModifiedTime) const;
     
     void StoreThunmnail(TUint aHandle, HBufC8* aData);
@@ -108,6 +110,9 @@
     void OpenMdeObjectL();
     void ClearThumnailCache();
     
+    TBool FindPropertiesCache(TUint aObjectHandle);
+    void  DestroyPropertiesCahce(TUint aObjectHandle);
+    
 private:
     
     //define property cache object
@@ -123,7 +128,6 @@
             EImagePixHeight       = 1,
             EImageBitDepth        = 2,
             EDateCreated          = 3,
-            
             /**
             The number of elements.        
             */
@@ -138,11 +142,9 @@
         
         const TDesC& DesC(TUint aId) const;
         TUint Uint(TUint aId) const;
-        TUint ObjectHandle() const;
         
         void SetDesCL(TUint aId, const TDesC& aValue);
-        void SetUint(TUint aId, TUint aValue);  
-        void SetObjectHandle(TUint aObjectHandle);
+        void SetUint(TUint aId, TUint aValue);
         
     private:
         
@@ -178,11 +180,6 @@
         */
         RArray<TUint>                   iElementsUint;
         
-        /**
-        The object handle of owner
-        */
-        TUint                           iObjectHandle;
-        
         static const TElementMetaData   KElements[];        
     };
     
@@ -211,7 +208,6 @@
     MMTPObjectMgr&              iObjectMgr;
     CMTPObjectMetaData*         iObjectInfo;  //not owned
     TBool                       iCacheHit;//flag to indicate cache is available
-    TBool                       iNeedParse;//flag to indicate whether we need to parse image file by our self
 	
     /*
      * Cache thumbnail, thumbnail size is inconsistent in winlogo test
@@ -222,7 +218,8 @@
      * Cache the latest image properties which PC send to device,
      * it can optimize synce/reverse-sync performance due to reduction of object properties generation
      */
-    CMTPImagePropertiesCache*     iPropertiesCache; 
+    CMTPImagePropertiesCache*                     iCurrentPropertiesCache;
+    RHashMap<TUint, CMTPImagePropertiesCache*>    iPropretiesCacheMap;
     };
    
 #endif // CMTPIMAGEDPOBJECTPROPERTYMGR_H
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -586,7 +586,7 @@
     /**
      * We clear property manager cache when receiving session close notification from framework every times
      */
-    iPropertyMgr->ClearCacheL();
+    iPropertyMgr->ClearAllCache();
     
     __FLOG(_L8("<< SessionClosedL"));
     }
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpcopyobject.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpcopyobject.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -190,7 +190,7 @@
     
     GetPreviousPropertiesL(aOldFileName);
     User::LeaveIfError(iFileMan->Copy(aOldFileName, *iDest));
-    iRollbackActionL.Append(RollBackFromFsL);
+    iRollbackActionL.AppendL(RollBackFromFsL);
     SetPreviousPropertiesL(aNewFileName);
     
     iFramework.ObjectMgr().InsertObjectL(*iTargetObjectInfo);
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpdeleteobject.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpdeleteobject.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -205,7 +205,7 @@
         iFramework.ObjectMgr().GetObjectHandlesL( params, context, handles );
         for ( TInt i = 0; i < handles.Count(); i++)
             {
-            iObjectsToDelete.Append( handles[i] );
+            iObjectsToDelete.AppendL( handles[i] );
             }
         }
     while ( !context.QueryComplete() );
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectproplist.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectproplist.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -207,7 +207,7 @@
         }
     else
         {
-        iHandles.Append( handle );
+        iHandles.AppendL( handle );
         }
     
     __FLOG(_L8("<< CMTPImageDpGetObjectPropList::GetObjectHandlesL"));
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpmoveobject.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpmoveobject.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -45,7 +45,7 @@
 const TMTPRequestElementInfo KMTPMoveObjectPolicy[] = 
     {
         {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeStorageId, EMTPElementAttrWrite, 0, 0, 0},
-        {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir | EMTPElementAttrWrite, 1, 0, 0}
+        {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir, 1, 0, 0}
     };
 
 /**
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -51,6 +51,9 @@
 // Class constants.
 __FLOG_STMT(_LIT8(KComponent,"MTPImageDpPropertyMgr");)
 
+// Indicate how many cache can be stored
+const TUint KCacheThreshold = 16;
+
 /**
 The properties cache table content.
 */
@@ -112,13 +115,10 @@
             break;
             }         
         }
-    
-    iObjectHandle = KMTPHandleNone;   
     }
 
 void CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::ResetL()
     {
-    iObjectHandle = KMTPHandleNone;
     SetUint(EImagePixWidth, 0);
     SetUint(EImagePixHeight, 0);
     SetUint(EImageBitDepth, 0);
@@ -137,11 +137,6 @@
     return iElementsUint[iElements[aId].iOffset];
     }
 
-TUint CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::ObjectHandle() const
-    {
-    return iObjectHandle;
-    }
-
 void CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::SetDesCL(TUint aId, const TDesC& aValue)
     {
     const TElementMetaData& KElement(iElements[aId]);
@@ -157,11 +152,6 @@
     iElementsUint[iElements[aId].iOffset] = aValue;
     }
 
-void CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::SetObjectHandle(TUint aObjectHandle)
-    {
-    iObjectHandle = aObjectHandle;
-    }
-
 CMTPImageDpObjectPropertyMgr* CMTPImageDpObjectPropertyMgr::NewL(MMTPDataProviderFramework& aFramework, CMTPImageDataProvider& aDataProvider)
     {
     CMTPImageDpObjectPropertyMgr* self = new (ELeave) CMTPImageDpObjectPropertyMgr(aFramework, aDataProvider);
@@ -175,7 +165,7 @@
     iFramework(aFramework),
     iDataProvider(aDataProvider),
     iFs(aFramework.Fs()),
-    iObjectMgr(aFramework.ObjectMgr())
+    iObjectMgr(aFramework.ObjectMgr())    
     {
     __FLOG_OPEN(KMTPSubsystem, KComponent);
     }
@@ -183,7 +173,6 @@
 void CMTPImageDpObjectPropertyMgr::ConstructL(MMTPDataProviderFramework& /*aFramework*/)
     {
     __FLOG(_L8("CMTPImageDpObjectPropertyMgr::ConstructL - Entry"));
-    iPropertiesCache = CMTPImagePropertiesCache::NewL();    
     iMetaDataSession = CMdESession::NewL(*this);
     __FLOG(_L8("CMTPImageDpObjectPropertyMgr::ConstructL - Exit"));
     }
@@ -191,10 +180,13 @@
 CMTPImageDpObjectPropertyMgr::~CMTPImageDpObjectPropertyMgr()
     {
     __FLOG(_L8("CMTPImageDpObjectPropertyMgr::~CMTPImageDpObjectPropertyMgr - Entry"));
-    delete iPropertiesCache;
     delete iObject;
     delete iMetaDataSession;
     delete iThumbnailCache.iThumbnailData;
+    
+    //Clear propreties cache map
+    ClearAllCache();
+    iPropretiesCacheMap.Close();
     __FLOG(_L8("CMTPImageDpObjectPropertyMgr::~CMTPImageDpObjectPropertyMgr - Exit"));
     __FLOG_CLOSE;
     }
@@ -212,26 +204,12 @@
         /**
          * determine whether the cache hit is occured
          */
-        if (iPropertiesCache->ObjectHandle() == iObjectInfo->Uint(CMTPObjectMetaData::EHandle))
+        iCacheHit = FindPropertiesCache(iObjectInfo->Uint(CMTPObjectMetaData::EHandle));
+        if (!iCacheHit)
             {
-            iCacheHit = ETrue;
-            }
-        else
-            {            
-            iCacheHit = EFalse;
-
-            /**
-             * if cache miss, we should clear the cache content
-             */
-            ClearCacheL();
-            
-			//need parse image file by our self if fail to get properties from MdS
-            iNeedParse = ETrue;
-
-			//clear previous Mde object
             delete iObject;
-            iObject = NULL;            
-            }        
+            iObject = NULL; 
+            }          
         }    
     else
         {        
@@ -241,13 +219,27 @@
          * other operations will not use cache, such as setobjectvalue/setobjectproplist
          */
         if (aSaveToCache)
-            {
+            {            
             TUint objectHandle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle);
-            if (iPropertiesCache->ObjectHandle() != objectHandle)
+            if (FindPropertiesCache(objectHandle))
+                {
+                __FLOG_VA((_L16("SetCurrentObjectL - find object in cache:%u"), objectHandle));
+                iCurrentPropertiesCache->ResetL();
+                }
+            else
                 {
-                iPropertiesCache->ResetL();
+                if (iPropretiesCacheMap.Count() > KCacheThreshold)
+                    {
+                    // Find the first object handle from cache map and then destory it
+                    RHashMap<TUint, CMTPImagePropertiesCache*>::TIter iter(iPropretiesCacheMap);
+                    DestroyPropertiesCahce(*iter.NextKey());
+                    __FLOG_VA((_L16("SetCurrentObjectL - destory object:%u"), objectHandle));
+                    }                
+                
+                iCurrentPropertiesCache = CMTPImagePropertiesCache::NewL();
+                iPropretiesCacheMap.Insert(objectHandle, iCurrentPropertiesCache);
+                __FLOG_VA((_L16("SetCurrentObjectL - create new object:%u"), objectHandle));
                 }
-            iPropertiesCache->SetObjectHandle(objectHandle);            
             }
         }
     
@@ -304,13 +296,22 @@
         iObjectInfo->SetUint(CMTPObjectMetaData::EParentHandle, aValue);
         break;
     case EMTPObjectPropCodeWidth:
-        iPropertiesCache->SetUint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImagePixWidth, aValue);
+        if (iCurrentPropertiesCache != NULL)
+            {
+            iCurrentPropertiesCache->SetUint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImagePixWidth, aValue);
+            }
         break;
     case EMTPObjectPropCodeHeight:
-        iPropertiesCache->SetUint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImagePixHeight, aValue);
+        if (iCurrentPropertiesCache != NULL)
+            {        
+            iCurrentPropertiesCache->SetUint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImagePixHeight, aValue);
+            }
         break; 
     case EMTPObjectPropCodeImageBitDepth:
-        iPropertiesCache->SetUint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImageBitDepth, aValue);
+        if (iCurrentPropertiesCache != NULL)
+            {        
+            iCurrentPropertiesCache->SetUint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImageBitDepth, aValue);
+            }
         break;          
     default:
         //nothing to do
@@ -363,7 +364,10 @@
         break;
       
     case EMTPObjectPropCodeDateCreated://MdS property
-        iPropertiesCache->SetDesCL(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EDateCreated, aValue);
+        if (iCurrentPropertiesCache != NULL)
+            {
+            iCurrentPropertiesCache->SetDesCL(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EDateCreated, aValue);
+            }
         break;
         
     default:
@@ -640,19 +644,19 @@
         switch (aProperty)
             {
         case EMTPObjectPropCodeDateCreated:
-            (*(static_cast<CMTPTypeString*>(aValue))).SetL(iPropertiesCache->DesC(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EDateCreated));            
+            (*(static_cast<CMTPTypeString*>(aValue))).SetL(iCurrentPropertiesCache->DesC(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EDateCreated));            
             break;
           
         case EMTPObjectPropCodeWidth:
-            *static_cast<TUint32*>(aValue) = iPropertiesCache->Uint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImagePixWidth);            
+            *static_cast<TUint32*>(aValue) = iCurrentPropertiesCache->Uint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImagePixWidth);            
             break;
             
         case EMTPObjectPropCodeHeight:
-            *static_cast<TUint32*>(aValue) = iPropertiesCache->Uint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImagePixHeight);           
+            *static_cast<TUint32*>(aValue) = iCurrentPropertiesCache->Uint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImagePixHeight);           
             break;
             
         case EMTPObjectPropCodeImageBitDepth:
-            *static_cast<TUint32*>(aValue) = iPropertiesCache->Uint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImageBitDepth);            
+            *static_cast<TUint32*>(aValue) = iCurrentPropertiesCache->Uint(CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::EImageBitDepth);            
             break;
             
         default:
@@ -958,9 +962,18 @@
     iMdeSessionError = aError;
     }
 
-void CMTPImageDpObjectPropertyMgr::ClearCacheL()
+void CMTPImageDpObjectPropertyMgr::ClearAllCache()
     {
-    iPropertiesCache->ResetL();
+    while (iPropretiesCacheMap.Count())
+        {
+        RHashMap<TUint, CMTPImagePropertiesCache*>::TIter iter(iPropretiesCacheMap);
+        DestroyPropertiesCahce(*iter.NextKey());
+        };
+    }
+
+void CMTPImageDpObjectPropertyMgr::ClearCache(TUint aHandle)
+    {
+    DestroyPropertiesCahce(aHandle);    
     }
 
 void CMTPImageDpObjectPropertyMgr::OpenMdeObjectL()
@@ -986,3 +999,32 @@
     
     iThumbnailCache.iObjectHandle = KMTPHandleNone;
     }
+
+TBool CMTPImageDpObjectPropertyMgr::FindPropertiesCache(TUint aObjectHandle)
+    {
+    TBool ret = EFalse;
+    CMTPImagePropertiesCache** ppCache = iPropretiesCacheMap.Find(aObjectHandle);
+    if (ppCache)
+        {
+        iCurrentPropertiesCache = *ppCache;
+        ret = (iCurrentPropertiesCache != NULL) ? ETrue : EFalse;
+        }
+    else
+        {
+        iCurrentPropertiesCache = NULL;
+        ret = EFalse;
+        }
+    
+    return ret;
+    }
+
+void CMTPImageDpObjectPropertyMgr::DestroyPropertiesCahce(TUint aObjectHandle)
+    {
+    CMTPImagePropertiesCache** ppCache = iPropretiesCacheMap.Find(aObjectHandle);  
+    if (ppCache)
+        {
+        CMTPImagePropertiesCache* pCache = *ppCache;
+        delete pCache;
+        iPropretiesCacheMap.Remove(aObjectHandle);
+        }    
+    }
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpsendobjectinfo.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpsendobjectinfo.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -514,7 +514,7 @@
          
     iFramework.ObjectMgr().CommitReservedObjectHandleL(*iReceivedObject);
     //prepare for rollback
-    iRollbackList.Append(RemoveObjectFromDb);        
+    iRollbackList.AppendL(RemoveObjectFromDb);        
     
     ReceiveDataL(*iFileReceived);
     
@@ -878,7 +878,7 @@
      */
     TRAP_IGNORE(
             iFramework.ObjectMgr().RemoveObjectL(iReceivedObject->Uint(CMTPObjectMetaData::EHandle));
-            iObjectPropertyMgr.ClearCacheL();            
+            iObjectPropertyMgr.ClearCache(iReceivedObject->Uint(CMTPObjectMetaData::EHandle));            
             );
     }
 
@@ -1195,7 +1195,7 @@
     iFramework.ObjectMgr().ReserveObjectHandleL(*iReceivedObject, iObjectSize);    
     
     // prepare for rollback
-    iRollbackList.Append(UnreserveObject);    
+    iRollbackList.AppendL(UnreserveObject);    
     __FLOG(_L8("CMTPImageDpSendObjectInfo::ReserveObjectL - Exit"));   
     }
 
@@ -1256,7 +1256,7 @@
     delete iFileReceived;
     iFileReceived = NULL;
     //prepare for rollback
-    iRollbackList.Append(RemoveObjectFromFs);
+    iRollbackList.AppendL(RemoveObjectFromFs);
         
     iFileReceived = CMTPTypeFile::NewL(iFramework.Fs(), iFullPath, EFileWrite);
     iFileReceived->SetSizeL(iObjectSize);
--- a/mtpdataproviders/mtppictbridgedp/src/cmtppictbridgedpsendobjectinfo.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpdataproviders/mtppictbridgedp/src/cmtppictbridgedpsendobjectinfo.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -42,7 +42,7 @@
 const TMTPRequestElementInfo KMTPSendObjectInfoPolicy[] = 
     {
     {TMTPTypeRequest::ERequestParameter1, EMTPElementTypeStorageId, EMTPElementAttrWrite, 1, 0, 0},                
-    {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeObjectHandle, EMTPElementAttrWrite, 2, KMTPHandleAll, KMTPHandleNone}
+    {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeObjectHandle, EMTPElementAttrDir, 2, KMTPHandleAll, KMTPHandleNone}
     };
 
 
Binary file mtpfws/mtpfw/conf/mtpframework.confml has changed
--- a/mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -73,6 +73,7 @@
     {
     __FLOG(_L8("~CMTPServer - Entry"));
     delete iShutdown;
+    iShutdown = NULL;
     iFrameworkSingletons.ConnectionMgr().StopTransports();
     iFrameworkSingletons.DpController().UnloadDataProviders();
     iFrameworkSingletons.Close();
@@ -139,12 +140,6 @@
     if (--iSessionCount==0 && iFrameworkSingletons.ConnectionMgr().TransportCount() == 0)
         {
         // No active MTP client API sessions remain, start the shutdown timer.
-        if (!iShutdown)
-            {
-            TRAPD(error, iShutdown = CMTPShutdown::NewL());
-            __FLOG(_L8("CMTPShutdown Loaded- Entry"));
-            UNUSED_VAR(error);    
-            }
         if (iShutdown)
             {
             __FLOG(_L8("Shutdown Started - Entry"));
@@ -193,6 +188,12 @@
     __FLOG(_L8("ConstructL - Entry"));
     StartL(KMTPServerName);
     iFrameworkSingletons.OpenL();
+    if (!iShutdown)
+        {
+        TRAPD(error, iShutdown = CMTPShutdown::NewL());
+        __FLOG(_L8("CMTPShutdown Loaded- Entry"));
+        UNUSED_VAR(error);    
+        }    
     __FLOG(_L8("ConstructL - Exit"));
     }
         
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedatastore.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedatastore.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -513,7 +513,7 @@
         1.  Device friendly name.
     */
     iDeviceFriendlyNameDefault = iSingletons.FrameworkConfig().ValueL(CMTPFrameworkConfig::EDeviceFriendlyName);
-    iDeviceFriendlyName = CMTPTypeString::NewL(*iDeviceFriendlyNameDefault);
+    iDeviceFriendlyName = CMTPTypeString::NewL();
 
     //  2.  Synchronization partner name.
     iSyncPartnerNameDefault = iSingletons.FrameworkConfig().ValueL(CMTPFrameworkConfig::ESynchronizationPartnerName);
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -388,7 +388,7 @@
 
 		if(extnpluginMap )
 			{
-			iExtnPluginMapArray.Append(extnpluginMap);
+			iExtnPluginMapArray.AppendL(extnpluginMap);
 			}
 
 		}
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedpconfigmgr.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedpconfigmgr.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -256,7 +256,7 @@
 			//Ignore the duplicate value.
 			if( aOrderInfoArray.Find(formatInt) == KErrNotFound )
 				{
-				aOrderInfoArray.Append(formatInt);
+				aOrderInfoArray.AppendL(formatInt);
 				}
 			}
 		}
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdeviceinfo.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdeviceinfo.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -287,7 +287,7 @@
 		{
 		supportedCaptureFormats.Remove(index);
 		//insert at insertindex position to make sure that value inserted at begening.
-		supportedCaptureFormats.Insert(orderedFormats[orderedElements], insertIndex);
+		supportedCaptureFormats.InsertL(orderedFormats[orderedElements], insertIndex);
 		insertIndex++;
 		}//else nothing 	  	
 		}
@@ -350,7 +350,7 @@
 			{
 			supportedPlaybackFormats.Remove(index);
 			//insert at insertindex position to make sure that value inserted at begening.
-			supportedPlaybackFormats.Insert(orderedFormats[orderedElements], insertIndex);
+			supportedPlaybackFormats.InsertL(orderedFormats[orderedElements], insertIndex);
 			insertIndex++;
 			}//else nothing 	  	
  		}
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdevicepropdesc.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdevicepropdesc.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -35,6 +35,8 @@
 // Class constants.
 __FLOG_STMT(_LIT8(KComponent,"GetDevicePropDesc");)
 
+_LIT(KSpace, " ");
+
 /**
 Two-phase constructor.
 @param aPlugin The data provider plugin
@@ -273,7 +275,32 @@
     
     CMTPDeviceDataStore& device(iDpSingletons.DeviceDataStore());
     iPropDesc->SetStringL(CMTPTypeDevicePropDesc::EFactoryDefaultValue, device.DeviceFriendlyNameDefault());
-    iPropDesc->SetStringL(CMTPTypeDevicePropDesc::ECurrentValue, device.DeviceFriendlyName());
+    
+    //if device friendly name is blank, which means it is the first time the device get connected,
+    //, so will use "manufacture + model id" firstly; if neither manufacture nor model
+    //id not able to be fetched by API, then use the default device friendly name 
+    if ( device.DeviceFriendlyName().Length()<=0 )
+        {
+        if ( device.Manufacturer().Compare(KMTPDefaultManufacturer) && device.Model().Compare(KMTPDefaultModel) )
+            {
+            HBufC* friendlyName = HBufC::NewLC(device.Manufacturer().Length()+1+ device.Model().Length());
+            TPtr ptrName = friendlyName->Des();
+            ptrName.Copy(device.Manufacturer());
+            ptrName.Append(KSpace);
+            ptrName.Append(device.Model());
+            device.SetDeviceFriendlyNameL(ptrName);
+            iPropDesc->SetStringL(CMTPTypeDevicePropDesc::ECurrentValue, ptrName);
+            CleanupStack::PopAndDestroy(friendlyName);
+            }
+        else
+            {
+            iPropDesc->SetStringL(CMTPTypeDevicePropDesc::ECurrentValue, device.DeviceFriendlyNameDefault());
+            }
+        }
+    else
+        {
+        iPropDesc->SetStringL(CMTPTypeDevicePropDesc::ECurrentValue, device.DeviceFriendlyName());
+        }
     
     SendDataL(*iPropDesc);    
     __FLOG(_L8("ServiceDeviceFriendlyNameL - Exit")); 
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdevicepropvalue.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdevicepropvalue.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -27,6 +27,8 @@
 // Class constants.
 __FLOG_STMT(_LIT8(KComponent,"GetDevicePropValue");)
 
+_LIT(KSpace, " ");
+
 /**
 Two-phase constructor.
 @param aPlugin  The data provider plugin
@@ -96,7 +98,33 @@
 void CMTPGetDevicePropValue::ServiceDeviceFriendlyNameL()
     {
     __FLOG(_L8("ServiceDeviceFriendlyNameL - Entry")); 
-    iString->SetL(iDpSingletons.DeviceDataStore().DeviceFriendlyName());
+    //if device friendly name is blank, which means it is the first time the device get connected,
+    //, so will use "manufacture + model id" firstly; if neither manufacture nor model
+    //id not able to be fetched by API, then use the default device friendly name     if ( iDpSingletons.DeviceDataStore().DeviceFriendlyName().Length()<=0 )
+    if ( iDpSingletons.DeviceDataStore().DeviceFriendlyName().Length()<=0 ) 
+        {
+        if ( iDpSingletons.DeviceDataStore().Manufacturer().Compare(KMTPDefaultManufacturer) && 
+                iDpSingletons.DeviceDataStore().Model().Compare(KMTPDefaultModel) )
+            {
+            HBufC* friendlyName = HBufC::NewLC( iDpSingletons.DeviceDataStore().Manufacturer().Length()+1+  iDpSingletons.DeviceDataStore().Model().Length());
+            TPtr ptrName = friendlyName->Des();
+            ptrName.Copy( iDpSingletons.DeviceDataStore().Manufacturer());
+            ptrName.Append(KSpace);
+            ptrName.Append( iDpSingletons.DeviceDataStore().Model());
+            iDpSingletons.DeviceDataStore().SetDeviceFriendlyNameL(ptrName);
+            iString->SetL(ptrName);
+            CleanupStack::PopAndDestroy(friendlyName);
+            }
+        else
+            {
+            iString->SetL(iDpSingletons.DeviceDataStore().DeviceFriendlyNameDefault());
+            }
+        }
+    else
+        {
+        iString->SetL(iDpSingletons.DeviceDataStore().DeviceFriendlyName());
+        }
+      
     SendDataL(*iString);  
     __FLOG(_L8("ServiceDeviceFriendlyNameL - Exit"));   
     }
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetobjecthandles.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetobjecthandles.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -185,7 +185,7 @@
 	                if ( index != KErrNotFound )
 	                    {
 	                    handles.Remove(index);
-	                    handles.Insert(handle,0);
+	                    handles.InsertL(handle,0);
 	                    }
 	                }   
 	            delete StorageSuid;
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -37,7 +37,7 @@
     {
     	{TMTPTypeRequest::ERequestParameter1, EMTPElementTypeObjectHandle, EMTPElementAttrFileOrDir, 0, 0, 0},   	
         {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeStorageId, EMTPElementAttrWrite, 0, 0, 0},                
-        {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir | EMTPElementAttrWrite, 1, 0, 0}
+        {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir, 1, 0, 0}
     };
 
 /**
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpfsenumerator.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpfsenumerator.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -122,7 +122,7 @@
         const TUint KCount(storages.Count());
         for (TUint i(0); (i < KCount); i++)
             {
-            iStorages.Insert(storages[i]->Uint(CMTPStorageMetaData::EStorageId),0);
+            iStorages.InsertL(storages[i]->Uint(CMTPStorageMetaData::EStorageId),0);
             __FLOG_VA((_L8("FileEnumerator is doing storage id = %x\r\n"), storages[i]->Uint(CMTPStorageMetaData::EStorageId) ));
             }
         CleanupStack::PopAndDestroy(&storages);
@@ -501,7 +501,7 @@
                 ++len;
                 format = EMTPFormatCodeAssociation;
                 AddEntryL(iCurrentPath, handle, format, KMTPDeviceDPID, entry, iStorages[iScanPos], iParentHandle);
-                iDirStack.Append(TStackItem(iCurrentPath, handle));
+                iDirStack.AppendL(TStackItem(iCurrentPath, handle));
                 }
             }
         else
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpknowledgehandler.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpknowledgehandler.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -747,7 +747,7 @@
 		TInt count = sizeof(KMTPFullEnumSyncKnowledgeObjectProperties) / sizeof(KMTPFullEnumSyncKnowledgeObjectProperties[0]);
 		for (TInt i = 0; i < count; i++)
 			{
-			aPropCodes.Append(KMTPFullEnumSyncKnowledgeObjectProperties[i]);
+			aPropCodes.AppendL(KMTPFullEnumSyncKnowledgeObjectProperties[i]);
 			}
 		}
 	else if(2 == aGroupId)
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpmoveobject.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpmoveobject.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -38,7 +38,7 @@
     {
     	{TMTPTypeRequest::ERequestParameter1, EMTPElementTypeObjectHandle, EMTPElementAttrFileOrDir | EMTPElementAttrWrite, 0, 0, 0},   	
         {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeStorageId, EMTPElementAttrWrite, 0, 0, 0},                
-        {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir | EMTPElementAttrWrite, 1, 0, 0}
+        {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir, 1, 0, 0}
     };
 
 /**
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectprotection.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectprotection.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -35,6 +35,7 @@
 */
 const TMTPRequestElementInfo KMTPSetObjectProtectionPolicy[] = 
     {
+        //This policy does not taks effect, see CheckRequestL
         {TMTPTypeRequest::ERequestParameter1, EMTPElementTypeObjectHandle, EMTPElementAttrWrite, 0, 0, 0},      
      };
 
--- a/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpcopyobject.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpcopyobject.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -33,7 +33,7 @@
     {
     	{TMTPTypeRequest::ERequestParameter1, EMTPElementTypeObjectHandle, EMTPElementAttrFileOrDir, 0, 0, 0},   	
         {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeStorageId, EMTPElementAttrWrite, 0, 0, 0},                
-        {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir | EMTPElementAttrWrite, 1, 0, 0}
+        {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir, 1, 0, 0}
     };
 
 
--- a/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpdeleteobjectproplist.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpdeleteobjectproplist.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -148,7 +148,7 @@
         dpid = iSingletons.ObjectMgr().ObjectOwnerId( temp.Uint32(TMTPTypeDataPair::EOwnerHandle) );
         if ( tmpDpid != dpid )
             {
-            iTargetDps.Append(dpid);
+            iTargetDps.AppendL(dpid);
             CMTPTypeDeleteObjectPropList* dataset = CMTPTypeDeleteObjectPropList::NewLC();
             iSubDatasets.AppendL( dataset );
             dataset->AppendL( element);
--- a/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpmoveobject.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpmoveobject.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -36,7 +36,7 @@
     {
     	{TMTPTypeRequest::ERequestParameter1, EMTPElementTypeObjectHandle, EMTPElementAttrFileOrDir | EMTPElementAttrWrite, 0, 0, 0},   	
         {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeStorageId, EMTPElementAttrWrite, 0, 0, 0},                
-        {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir | EMTPElementAttrWrite, 1, 0, 0}
+        {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir, 1, 0, 0}
     };
     
 /**
--- a/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpsendobjectinfo.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpsendobjectinfo.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -35,7 +35,7 @@
 const TMTPRequestElementInfo KMTPSendObjectInfoPolicy[] =
     {
         {TMTPTypeRequest::ERequestParameter1, EMTPElementTypeStorageId, EMTPElementAttrWrite, 1, 0, 0},
-        {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeObjectHandle, EMTPElementAttrDir | EMTPElementAttrWrite, 2, KMTPHandleAll, KMTPHandleNone}
+        {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeObjectHandle, EMTPElementAttrDir, 2, KMTPHandleAll, KMTPHandleNone}
     };
 
 /**
--- a/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpsendobjectproplist.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpsendobjectproplist.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -32,7 +32,7 @@
 const TMTPRequestElementInfo KMTPSendObjectPropListPolicy[] = 
     {
         {TMTPTypeRequest::ERequestParameter1, EMTPElementTypeStorageId, EMTPElementAttrWrite, 1, 0, 0}, 
-        {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeObjectHandle, (EMTPElementAttrDir | EMTPElementAttrWrite), 2, KMTPHandleAll, KMTPHandleNone}
+        {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeObjectHandle, EMTPElementAttrDir, 2, KMTPHandleAll, KMTPHandleNone}
     };
 
 /**
--- a/mtpfws/mtpfw/datatypes/interface/cmtptypefile.h	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/datatypes/interface/cmtptypefile.h	Mon Jun 21 16:36:59 2010 +0300
@@ -25,7 +25,7 @@
 #include <e32base.h>
 #include <f32file.h>
 #include <mtp/mmtptype.h>
-    
+
 /**
 Defines the MTP file object data type. 
 @publishedPartner
@@ -100,7 +100,8 @@
     void ConstructL(const TDesC& aName, TFileMode aMode);
 	void ConstructL(const TDesC& aName, TFileMode aMode, TInt64 aRequiredSize, TInt64 aOffSet);
     void ToggleRdWrBuffer();
-
+    void CreateDoubleBufferL(TInt64 aFileSize);
+    
 protected: // From CActive
     void DoCancel();
 
@@ -110,8 +111,7 @@
     void RunL();
     
 private:
-
-    
+        
     /**
     The read and write data stream states.
     */
--- a/mtpfws/mtpfw/datatypes/src/cmtptypefile.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/datatypes/src/cmtptypefile.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -234,16 +234,8 @@
     
     iRemainingDataSize = (TInt64)aSize;//Current implemenation does not support file size with 2 x64 
 
-    if(iRemainingDataSize> KMTPFileChunkSizeForLargeFile) //512K
-        {
-        iBuffer1.CreateMaxL(KMTPFileChunkSizeForLargeFile);
-        iBuffer2.CreateMaxL(KMTPFileChunkSizeForLargeFile);
-        }
-    else
-        {
-        iBuffer1.CreateMaxL(KMTPFileChunkSizeForSmallFile);
-        iBuffer2.CreateMaxL(KMTPFileChunkSizeForSmallFile);
-        }
+    CreateDoubleBufferL(iRemainingDataSize);
+    
     if(iRemainingDataSize> KMTPFileSetSizeChunk)
         {
         //split the setSize to multiple calling of 512M
@@ -599,16 +591,7 @@
         iRemainingDataSize = size;
 
         //For File reading, NO "SetSizeL()" will be called, therefore, create the buffer here.
-        if (iRemainingDataSize > KMTPFileChunkSizeForLargeFile) //512K
-            {
-            iBuffer1.CreateMaxL(KMTPFileChunkSizeForLargeFile);
-            iBuffer2.CreateMaxL(KMTPFileChunkSizeForLargeFile);
-            }
-        else
-            {
-            iBuffer1.CreateMaxL(KMTPFileChunkSizeForSmallFile);
-            iBuffer2.CreateMaxL(KMTPFileChunkSizeForSmallFile);
-            }
+        CreateDoubleBufferL(iRemainingDataSize);
         }
     }
 
@@ -647,16 +630,7 @@
         iRemainingDataSize = iTargetFileSize;
         
         //For File reading, NO "SetSizeL()" will be called, therefore, create the buffer here.
-        if (iRemainingDataSize > KMTPFileChunkSizeForLargeFile) //512K
-            {
-            iBuffer1.CreateMaxL(KMTPFileChunkSizeForLargeFile);
-            iBuffer2.CreateMaxL(KMTPFileChunkSizeForLargeFile);
-            }
-        else
-            {
-            iBuffer1.CreateMaxL(KMTPFileChunkSizeForSmallFile);
-            iBuffer2.CreateMaxL(KMTPFileChunkSizeForSmallFile);
-            }
+        CreateDoubleBufferL(iRemainingDataSize);
         }
 	}
 
@@ -743,3 +717,46 @@
 
     iBuffer1AvailForWrite = !iBuffer1AvailForWrite;//toggle the flag.
     }
+
+/**
+ * Allocate double buffers to write to/read from file
+ * @param aFileSize: the size of the file to be written to or read from
+ * @return void
+ * leave code: KErrNoMemory if there is insufficient memory
+ */
+void CMTPTypeFile::CreateDoubleBufferL(TInt64 aFileSize)
+    {
+    if(aFileSize > KMTPFileChunkSizeForLargeFile) //512KB
+        {
+        TInt err = iBuffer1.CreateMax(KMTPFileChunkSizeForLargeFile);
+        TInt err2 = iBuffer2.CreateMax(KMTPFileChunkSizeForLargeFile);
+        TInt bufferSize = KMTPFileChunkSizeForLargeFile;
+        
+        //if one of buffer allocation fails, decrease the buffer size by 
+        //a half of it until :
+        //we finally succeed in the allocation Or 
+        //the smallest acceptable buffer size KMTPFileChunkSizeForSmallFile(64KB) reaches.
+        while ((err != KErrNone || err2 != KErrNone) && bufferSize != KMTPFileChunkSizeForSmallFile)
+            {
+            iBuffer1.Close();
+            iBuffer2.Close();
+            
+            bufferSize /= 2;
+            err = iBuffer1.CreateMax(bufferSize);
+            err2 = iBuffer2.CreateMax(bufferSize);
+            }
+        
+        if ( err != KErrNone || err2 != KErrNone)
+            {
+            //We still can not allocate 2*64KB buffer, just leave under this case
+            iBuffer1.Close();
+            iBuffer2.Close();
+            User::Leave(KErrNoMemory);
+            }
+        }
+    else
+        {
+        iBuffer1.CreateMaxL(KMTPFileChunkSizeForSmallFile);
+        iBuffer2.CreateMaxL(KMTPFileChunkSizeForSmallFile);
+        }
+    }
Binary file mtpfws/mtpfw/group/10282FCC_ARMV5.cre has changed
Binary file mtpfws/mtpfw/group/10282FCC_ARMV5.txt has changed
Binary file mtpfws/mtpfw/group/10282FCC_WINSCW.cre has changed
Binary file mtpfws/mtpfw/group/10282FCC_WINSCW.txt has changed
--- a/mtpfws/mtpfw/src/cmtpdataprovidercontroller.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/src/cmtpdataprovidercontroller.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -185,7 +185,7 @@
 	  if ((iDataProviders[index]->DataProviderId() != iDpIdDeviceDp)
 	  	  && (iDataProviders[index]->DataProviderId() != iDpIdProxyDp))
 	    {
-	    iDataProviderIds.Append(iDataProviders[index]->DataProviderId());
+	    iDataProviderIds.AppendL(iDataProviders[index]->DataProviderId());
 	    }
 	  }
 	
@@ -849,29 +849,36 @@
     __FLOG(_L8("EnumerateDataProviderObjectsL - Entry"));
     CMTPDataProvider& dp(DataProviderL(aId));
 
-	if (IsObjectsEnumerationNeededL(dp))
-		{   
-		TBool abnormaldown = ETrue;
-		iSingletons.FrameworkConfig().GetValueL(CMTPFrameworkConfig::EAbnormalDown , abnormaldown);
-		if ( (!abnormaldown) && (dp.DataProviderConfig().BoolValue(MMTPDataProviderConfig::EObjectEnumerationPersistent)))
-			{       
-			// Initialize persistent objects store.
+    if (IsObjectsEnumerationNeededL(dp))
+        {   
+        TBool abnormaldown = ETrue;
+        iSingletons.FrameworkConfig().GetValueL(CMTPFrameworkConfig::EAbnormalDown , abnormaldown);
+        if ( (!abnormaldown) && (dp.DataProviderConfig().BoolValue(MMTPDataProviderConfig::EObjectEnumerationPersistent)))
+            {       
+            // Initialize persistent objects store.
             iSingletons.ObjectMgr().RestorePersistentObjectsL(aId);
-			}
+            }
         else
-        	{
-			// Mark all non-persistent objects.    
-			iSingletons.ObjectMgr().MarkNonPersistentObjectsL(aId,iEnumeratingStorages[0]);
-		    }
-    
-        // Initiate the data provider enumeration sequence.
-        dp.EnumerateObjectsL(iEnumeratingStorages[0]);
-		}
-	else 
-		{
-		//The DP does not need enumeration this time, so just change the state to go on.
-		EnumerationStateChangedL(dp);
-		}
+            {
+            // Mark all non-persistent objects.    
+            iSingletons.ObjectMgr().MarkNonPersistentObjectsL(aId,iEnumeratingStorages[0]);
+            }
+        if ((KMTPStorageAll == iEnumeratingStorages[0]) || (iSingletons.StorageMgr().ValidStorageId(iEnumeratingStorages[0])))
+            {
+            //Only initiate the data provider enumeration sequence for valid storage or all storage
+            dp.EnumerateObjectsL(iEnumeratingStorages[0]);
+            }
+        else
+            {
+            EnumerationStateChangedL(dp);
+            }
+       
+        }
+    else 
+        {
+        //The DP does not need enumeration this time, so just change the state to go on.
+        EnumerationStateChangedL(dp);
+        }
 
     __FLOG(_L8("EnumerateDataProviderObjectsL - Exit"));
     }
--- a/mtpfws/mtpfw/src/cmtpframeworkconfig.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/src/cmtpframeworkconfig.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -180,7 +180,7 @@
 		}
     
     //Save the AbnormalDown state to ETrue
-    User::LeaveIfError(iRepository->Set(EAbnormalDown, KStartupInitValue ));
-
+    //if connect the phone to PC while backup, this will leave.
+    TRAP_IGNORE(iRepository->Set(EAbnormalDown, KStartupInitValue ));
     }
 
--- a/mtpfws/mtpfw/src/cmtpreferencemgr.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/src/cmtpreferencemgr.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -136,7 +136,7 @@
 		for(TInt i = 0; i < count; i++)
 			{
 			TUint32 toHandle =  iObjectStore.HandleL(aToSuids[i]);
-			toHandles.Append(toHandle);
+			toHandles.AppendL(toHandle);
 			}	
 		
 		SetReferencesL(fromHandle, toHandles);	
@@ -336,7 +336,7 @@
 	TInt count = aToHandles.NumElements();
 	for(TInt i = 0; i < count; i++)
 		{
-		tempArray.Append(aToHandles.ElementUint(i));
+		tempArray.AppendL(aToHandles.ElementUint(i));
 		}	
 	SetReferencesL(aFromHandle.Value(), tempArray);
 	CleanupStack::PopAndDestroy(&tempArray);
--- a/mtpfws/mtpfw/src/cmtpserviceconfig.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/src/cmtpserviceconfig.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -237,7 +237,7 @@
     TUint num = reader.ReadInt16();
     while( num-- )
         {
-        aNamespaces.Append( ReadGUID(reader) );
+        aNamespaces.AppendL( ReadGUID(reader) );
         }
     
     CleanupStack::PopAndDestroy(buffer);
--- a/mtpfws/mtpfw/src/ruidmapper.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtpfws/mtpfw/src/ruidmapper.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -50,7 +50,7 @@
 		for (TInt n = 0 ; n < entries; ++n)
 			{
 			TUint transportId(resourceReader.ReadInt32());
-			st.iTransportUidList.Append(transportId);
+			st.iTransportUidList.AppendL(transportId);
 			}
 		InsertToMappingStruct(st);	
 		}
--- a/mtptransports/mtpusbtransport/usbsic_imp/inc/cmtpusbepbase.h	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtptransports/mtpusbtransport/usbsic_imp/inc/cmtpusbepbase.h	Mon Jun 21 16:36:59 2010 +0300
@@ -54,6 +54,7 @@
     void CancelSendL(TInt aReason);
     
     void FlushRxDataL();
+    void FlushBufferedRxDataL();
     
 protected:
 
--- a/mtptransports/mtpusbtransport/usbsic_imp/src/cmtpusbconnection.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtptransports/mtpusbtransport/usbsic_imp/src/cmtpusbconnection.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -508,7 +508,7 @@
                 __FLOG(_L8("cancel event received at completing phase, flush rx data"));
 
                 //flush rx data.
-                static_cast<CMTPUsbEpBulkOut*>(iEndpoints[EMTPUsbEpBulkOut])->FlushRxDataL();
+                iEndpoints[EMTPUsbEpBulkOut]->FlushRxDataL();
                 }
             else
             	{
@@ -518,7 +518,7 @@
             	DataEndpointsStop();
       
                 //flush rx data.
-                static_cast<CMTPUsbEpBulkOut*>(iEndpoints[EMTPUsbEpBulkOut])->FlushRxDataL();
+                iEndpoints[EMTPUsbEpBulkOut]->FlushRxDataL();
                 
             	// initiate bulk request sequence.
             	InitiateBulkRequestSequenceL();   
@@ -1669,7 +1669,6 @@
         SetBulkTransactionState(EUndefined);
         SetConnectionState(EIdle);
         SetSuspendState(ENotSuspended);
-        SetDeviceStatus(EMTPUsbDeviceStatusBusy);
         }
     
     __FLOG(_L8("StopConnection - Exit"));
@@ -1688,6 +1687,9 @@
         {    
         // Stop all data transfer activity.
         DataEndpointsStop();
+        
+        //flush buffered rx data.
+        iEndpoints[EMTPUsbEpBulkOut]->FlushBufferedRxDataL();
         }
     ControlEndpointStop();
 
@@ -1846,12 +1848,24 @@
 	ifc().iClass.iProtocolNum   = KMTPUsbInterfaceProtocolSIC;
     ifc().iTotalEndpointsUsed   = KMTPUsbRequiredNumEndpoints;
     
-    // Allocate 512KB buffer for OUT EndPoint, and 64KB for IN EndPoint
+    // Allocate 512KB*2 buffer for OUT EndPoint, and 64KB for IN EndPoint
     TUint32 bandwidthPriority = EUsbcBandwidthINPlus2 | EUsbcBandwidthOUTMaximum;
         
     // Write the active interface descriptor.
-    User::LeaveIfError(iLdd.SetInterface(KMTPUsbAlternateInterface, ifc, bandwidthPriority));
-        
+    TInt err = iLdd.SetInterface(KMTPUsbAlternateInterface, ifc, bandwidthPriority);
+    
+    if (err == KErrNoMemory)
+        {
+        __FLOG(_L8("NoMem when setinterface, try with lower priority"));
+        // Allocate 64KB*2 buffer for OUT EndPoint, and 64KB for IN EndPoint
+        bandwidthPriority = EUsbcBandwidthINPlus2 | EUsbcBandwidthOUTPlus2;
+        err = iLdd.SetInterface(KMTPUsbAlternateInterface, ifc, bandwidthPriority);
+        __FLOG_1(_L8("setinterface return for lower priority:%d"),err);
+        }
+     
+    __FLOG_1(_L8("setinterface error code:%d"),err);
+    User::LeaveIfError(err);
+    
     __FLOG(_L8("SetInterfaceDescriptorL - Exit"));
     }
 
--- a/mtptransports/mtpusbtransport/usbsic_imp/src/cmtpusbepbase.cpp	Wed Jun 09 10:36:33 2010 +0300
+++ b/mtptransports/mtpusbtransport/usbsic_imp/src/cmtpusbepbase.cpp	Mon Jun 21 16:36:59 2010 +0300
@@ -1085,3 +1085,28 @@
     readBuf.Close();
     __FLOG(_L8("FlushRxDataL - Exit"));    
 }
+
+/*
+ * The difference with FlushRxDataL() is FlushBufferedRxDataL only flush current buffered trash data
+ * if currently no data is buffered in usb driver, just return rather than wait some time like what 
+ * FlushRxDataL() does
+ */
+void CMTPUsbEpBase::FlushBufferedRxDataL()
+    {
+    //flush buffered rx data
+    TInt  nbytes = 0;
+    TInt err = Connection().Ldd().QueryReceiveBuffer(EndpointNumber(), nbytes);
+
+    // has data, read it
+    if( (err == KErrNone) && (nbytes > 0) )
+        {
+        // create the read buff
+        RBuf8 readBuf;
+        readBuf.CreateL(nbytes);
+        // synchronously read the data
+        TRequestStatus status;
+        Connection().Ldd().ReadOneOrMore(status, EndpointNumber(), readBuf);
+        User::WaitForRequest(status);
+        readBuf.Close(); 
+        }
+    }