Revision: 201015 RCL_3 PDK_3.0.i
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 17:41:29 +0300
branchRCL_3
changeset 10 f6533aee8b2b
parent 9 1a297fa72b1e
child 16 d895b6d953c9
Revision: 201015 Kit: 201017
usbclasses/usbphoneasmodem/classcontroller/conf/usbmanager_mscfile_2000fda8.crml
usbclasses/usbphoneasmodem/classcontroller/conf/usbphoneasmodem_mscfile_classcontroller.confml
usbclasses/usbphoneasmodem/classcontroller/data/usbmscfileresource.rss
usbclasses/usbphoneasmodem/classcontroller/group/bld.inf
usbclasses/usbphoneasmodem/classcontroller/group/usbmscfileclasscontroller.mmp
usbclasses/usbphoneasmodem/classcontroller/inc/usbmscfileclasscontroller.rh
usbclasses/usbphoneasmodem/classcontroller/inc/usbmscfileclasscontroller_crkeys.h
usbclasses/usbphoneasmodem/classcontroller/rom/usbmscfileclasscontroller.iby
usbclasses/usbphoneasmodem/classcontroller/src/usbmscfileclasscontroller.cpp
usbclasses/usbphoneasmodem/classimplementation/mscfileserver/rom/phone_as_modem.iso
usbclasses/usbphoneasmodem/classimplementation/mscfileserver/src/mscfilesession.cpp
usbengines/usblocodplugin/tsrc/USBLocodPluginTest/conf/USBLocodPluginTest.cfg
usbengines/usblocodplugin/tsrc/USBLocodPluginTest/init/USBLocodPluginTest_ats.ini
usbengines/usblocodplugin/tsrc/USBLocodPluginTest/init/USBLocodPluginTest_phone.ini
usbengines/usbotgwatcher/src/cusbstatehostabase.cpp
usbengines/usbotgwatcher/src/cusbstatehostainitiate.cpp
usbengines/usbotgwatcher/src/cusbstatehosthandledropping.cpp
usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp
usbengines/usbremotepersonality/tsrc/USBRemotePersonalityTest/conf/USBRemotePersonalityTest.cfg
usbengines/usbremotepersonality/tsrc/USBRemotePersonalityTest/init/USBRemotePersonalityTest_ats.ini
usbengines/usbremotepersonality/tsrc/USBRemotePersonalityTest/init/USBRemotePersonalityTest_phone.ini
usbengines/usbwatcher/src/cusbactivepersonalityhandler.cpp
Binary file usbclasses/usbphoneasmodem/classcontroller/conf/usbmanager_mscfile_2000fda8.crml has changed
Binary file usbclasses/usbphoneasmodem/classcontroller/conf/usbphoneasmodem_mscfile_classcontroller.confml has changed
--- a/usbclasses/usbphoneasmodem/classcontroller/data/usbmscfileresource.rss	Wed Apr 14 17:02:32 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// 
-// 
-
-//  RESOURCE IDENTIFIER
-NAME    UMSC
-
-#include <eikon.rh>
-#include "usbmscfileclasscontroller.rh"
-
-//  CONSTANTS
-
-//  MACROS  
-
-//  RESOURCE DEFINITIONS 
-
-//-----------------------------------------------------------------------------
-//   
-//    -
-//    Resource signature
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE {}
-
-//-----------------------------------------------------------------------------
-//   
-//    -
-//    Resource filename
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE TBUF
-    { 
-    buf = "usbmscfileresource"; 
-    }
-
-RESOURCE ARRAY r_usbmscfile_image_paths
-    {
-    items =
-        {
-        USBMSCFILE_FILESYSTEM_IMAGE
-            {
-            lun = 0;
-            path = "phone_as_modem.iso";
-            }
-        };
-    }
--- a/usbclasses/usbphoneasmodem/classcontroller/group/bld.inf	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbclasses/usbphoneasmodem/classcontroller/group/bld.inf	Tue Apr 27 17:41:29 2010 +0300
@@ -27,3 +27,5 @@
 PRJ_EXPORTS
 ../rom/usbmscfileclasscontroller.iby     CORE_MW_LAYER_IBY_EXPORT_PATH(usbmscfileclasscontroller.iby)
 
+../conf/usbphoneasmodem_mscfile_classcontroller.confml MW_LAYER_CONFML(usbphoneasmodem_mscfile_classcontroller.confml)
+../conf/usbmanager_mscfile_2000fda8.crml MW_LAYER_CRML(usbmanager_mscfile_2000fda8.crml)
\ No newline at end of file
--- a/usbclasses/usbphoneasmodem/classcontroller/group/usbmscfileclasscontroller.mmp	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbclasses/usbphoneasmodem/classcontroller/group/usbmscfileclasscontroller.mmp	Tue Apr 27 17:41:29 2010 +0300
@@ -42,13 +42,9 @@
 TARGET          usbmscfileclasscontroller.rsc
 END
 
-START RESOURCE usbmscfileresource.rss
-HEADER
-TARGETPATH      APP_RESOURCE_DIR
-END
-
 LIBRARY         euser.lib
 LIBRARY         usbclasscontroller.lib
 LIBRARY         efsrv.lib
 LIBRARY         bafl.lib
+LIBRARY         centralrepository.lib
 DEBUGLIBRARY	flogger.lib
--- a/usbclasses/usbphoneasmodem/classcontroller/inc/usbmscfileclasscontroller.rh	Wed Apr 14 17:02:32 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// 
-// 
-
-
-#include <badef.rh>
-
-STRUCT USBMSCFILE_FILESYSTEM_IMAGE
-    {
-    WORD protocol = 0; // protocol not used
-    WORD lun;          // only LUN 0 supported currently
-    LTEXT path;        // full path to file system image file
-    }
-
-// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usbclasses/usbphoneasmodem/classcontroller/inc/usbmscfileclasscontroller_crkeys.h	Tue Apr 27 17:41:29 2010 +0300
@@ -0,0 +1,42 @@
+// 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: Adheres to the UsbMan USB Class API and talks to mass storage file system
+// 
+// 
+#ifndef USBMSCFILECLASSCONTROLLER_CRKEYS_H
+#define USBMSCFILECLASSCONTROLLER_CRKEYS_H
+
+// CONSTANTS
+const TUid KCRUidUsbPhoneAsModemMscFileClassController = { 0x2000FDA8 };
+
+/*
+the least significant four bits is used for columns(unit file attributes: unit number, full name), 
+the remains bit is used for rows(which unit file).
+
+for example, if two units is used, the following can be added for the second unit keys.
+
+const TUint32 KCRIdMscFileLogicalUnitNumber2 = 0x00000010;
+const TUint32 KCRIdMscFileImageFullName2     = 0x00000011;
+
+refer to central repository how-to document section 5, Structured Data in the Central Repository
+
+*/
+const TUint32 KCRIdMscFileLogicalUnitNumber1 	= 0x00000000;
+const TUint32 KCRIdMscFileImageFullName1     	= 0x00000001;
+
+const TUint32 KCRMscFileLogicalUnitNumberColumn = 0x00000000;
+const TUint32 KCRMscFileImageFullNameColumn 	= 0x00000001;
+
+const TUint32 KCRMscFileColumnMask 				= 0x0000000F;
+const TUint32 KCRMscFileRowMask 				= 0xFFFFFFF0;
+#endif      // USBMSCFILECLASSCONTROLLER_CRKEYS_H
--- a/usbclasses/usbphoneasmodem/classcontroller/rom/usbmscfileclasscontroller.iby	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbclasses/usbphoneasmodem/classcontroller/rom/usbmscfileclasscontroller.iby	Tue Apr 27 17:41:29 2010 +0300
@@ -23,7 +23,6 @@
 #ifdef FF_USB_MODEM
 
 ECOM_PLUGIN(usbmscfileclasscontroller.dll, usbmscfileclasscontroller.rsc)
-S60_APP_RESOURCE(usbmscfileresource)
 
 #endif
 
--- a/usbclasses/usbphoneasmodem/classcontroller/src/usbmscfileclasscontroller.cpp	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbclasses/usbphoneasmodem/classcontroller/src/usbmscfileclasscontroller.cpp	Tue Apr 27 17:41:29 2010 +0300
@@ -18,11 +18,12 @@
 #include <barsread.h>
 #include <usb_std.h>
 #include <cusbclasscontrollerplugin.h>
+#include <centralrepository.h>
 #include <usbms.rsg>
-#include <usbmscfileresource.rsg>
 #include <data_caging_path_literals.hrh> 
 #include "usbmscfileclasscontroller.h"
 #include "usbmscfile.h"
+#include "usbmscfileclasscontroller_crkeys.h"
 #include "debug.h"
  
 // Panic category 
@@ -30,7 +31,6 @@
 _LIT( KMsCcPanicCategory, "UsbMscFileCc" );
 #endif
 
-_LIT( KResourceFileName, "usbmscfileresource.rsc" );
 _LIT( KUsbMsResource, "\\private\\101fe1db\\usbms.rsc" );
 
 /**
@@ -397,38 +397,32 @@
     
     LEAVE_IF_ERROR( mscFile.Connect() );
     CleanupClosePushL( mscFile );
-    LEAVE_IF_ERROR( fs.Connect() );
-    CleanupClosePushL( fs );
+    CRepository* repository = CRepository::NewLC(KCRUidUsbPhoneAsModemMscFileClassController);
+    
+	RArray<TUint32> lunKeys;
+	CleanupClosePushL(lunKeys);
+	
+	repository->FindL(KCRMscFileLogicalUnitNumberColumn, KCRMscFileColumnMask, lunKeys);
 
-    TFileName fileName;
-    const TDriveNumber KStoreDrive = EDriveZ;
-    TDriveUnit driveUnit( KStoreDrive );
-    TDriveName drive = driveUnit.Name();
-    fileName.Insert( 0, drive );
-
-    fileName += KDC_APP_RESOURCE_DIR; // From data_caging_path_literals.hrh
-    fileName += KResourceFileName;
-
-    RResourceFile resourceFile;
-    CleanupClosePushL( resourceFile );
-    resourceFile.OpenL( fs, fileName );
-    resourceFile.ConfirmSignatureL();
+	
+	TInt count = lunKeys.Count();
+	for (TInt i=0; i<count; i++)
+		{
+		TUint32 lunKey = lunKeys[i];
+		TUint32 fullNameKey = ((lunKey&KCRMscFileRowMask)|KCRMscFileImageFullNameColumn);
+		TRACE_INFO( (_L( "lunKey=%d,fullNameKey=%d" ), lunKey, fullNameKey) )
 
-    HBufC8* buf8 = resourceFile.AllocReadLC( R_USBMSCFILE_IMAGE_PATHS );
-    
-    TResourceReader reader;
-    reader.SetBuffer( buf8 );
-    
-    TInt count = reader.ReadInt16(); 
-
-    while ( count-- )
-        {
-        TInt protocol = reader.ReadUint16();
-        TInt lun =      reader.ReadUint16();
-        HBufC* path =   reader.ReadHBufCL();
-        CleanupStack::PushL( path );
-        LEAVE_IF_ERROR( mscFile.SetupLogicalUnit( *path, protocol, lun ) );
-        CleanupStack::PopAndDestroy( path );
-        }
-    CleanupStack::PopAndDestroy( 4 ); // mscFile, fs, resourceFile, buf8
+		TInt lun = 0;
+		LEAVE_IF_ERROR(repository->Get(lunKey, lun));
+		
+		TFileName fullName;
+		LEAVE_IF_ERROR(repository->Get(fullNameKey, fullName));	
+		
+		TRACE_INFO( (_L("lun=%d, fullName=%S"), lun, &fullName) );
+	
+		TInt protocol = 0; // It is not used. Bulk Transport(0x50), SCSI transparent command Set(0x06), PDT CD/DVD device(0x05) is supported only.
+		
+		LEAVE_IF_ERROR(mscFile.SetupLogicalUnit( fullName, protocol, lun ));
+		}
+    CleanupStack::PopAndDestroy( 3 ); // mscFile, repository, lunKeys
     }
Binary file usbclasses/usbphoneasmodem/classimplementation/mscfileserver/rom/phone_as_modem.iso has changed
--- a/usbclasses/usbphoneasmodem/classimplementation/mscfileserver/src/mscfilesession.cpp	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbclasses/usbphoneasmodem/classimplementation/mscfileserver/src/mscfilesession.cpp	Tue Apr 27 17:41:29 2010 +0300
@@ -118,33 +118,16 @@
     TRACE_FUNC_ENTRY
     TInt protocol;
     TInt lun;
-    RBuf buf;
+    RBuf fullImageFileName;
     TInt len = aMessage.GetDesLength( 0 );
-    buf.CreateL( len );
-    buf.CleanupClosePushL();
-    aMessage.ReadL( 0, buf );
+    fullImageFileName.CreateL( len );
+    fullImageFileName.CleanupClosePushL();
+    aMessage.ReadL( 0, fullImageFileName );
     protocol = aMessage.Int1();
     lun = aMessage.Int2();
-
-    //get the directory and name of image file
-    RFs fs;
-    LEAVE_IF_ERROR(fs.Connect());
-    CleanupClosePushL(fs);
     
-    TFileName fileName;
-    const TDriveNumber KResourceDrive = EDriveZ;
-    TDriveUnit driveUnit( KResourceDrive );
-    TDriveName drive = driveUnit.Name();
-    fileName.Insert( 0, drive );
-    // append private path
-    TPath privatePath;
-    fs.PrivatePath(privatePath);
-    fileName.Append(privatePath);      
-    CleanupStack::PopAndDestroy(&fs);   
-
-    fileName.Append(buf);
-    iMscFileServer.Controller().SetupLogicalUnitL( fileName, protocol, lun );
-    CleanupStack::PopAndDestroy( &buf );
+    iMscFileServer.Controller().SetupLogicalUnitL( fullImageFileName, protocol, lun );
+    CleanupStack::PopAndDestroy( &fullImageFileName );
     TRACE_FUNC_EXIT
     }
 /**
--- a/usbengines/usblocodplugin/tsrc/USBLocodPluginTest/conf/USBLocodPluginTest.cfg	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usblocodplugin/tsrc/USBLocodPluginTest/conf/USBLocodPluginTest.cfg	Tue Apr 27 17:41:29 2010 +0300
@@ -1,3 +1,20 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or 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:   
+*
+*/
+
 // USBLocodPluginTest Module - total 8 tc
 
 // USBLocodPluginTest Api Tests (4 tc)
--- a/usbengines/usblocodplugin/tsrc/USBLocodPluginTest/init/USBLocodPluginTest_ats.ini	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usblocodplugin/tsrc/USBLocodPluginTest/init/USBLocodPluginTest_ats.ini	Tue Apr 27 17:41:29 2010 +0300
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:   
+#
+
 #
 # This is STIF initialization file
 # Comment lines start with '#'-character.
--- a/usbengines/usblocodplugin/tsrc/USBLocodPluginTest/init/USBLocodPluginTest_phone.ini	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usblocodplugin/tsrc/USBLocodPluginTest/init/USBLocodPluginTest_phone.ini	Tue Apr 27 17:41:29 2010 +0300
@@ -1,3 +1,18 @@
+#
+# Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:  
+#
 #
 # This is STIF initialization file
 # Comment lines start with '#'-character.
--- a/usbengines/usbotgwatcher/src/cusbstatehostabase.cpp	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usbotgwatcher/src/cusbstatehostabase.cpp	Tue Apr 27 17:41:29 2010 +0300
@@ -189,7 +189,7 @@
         case KErrUsbBadDevice: // = -6656
         case KErrUsbBadHub:
         case KErrUsbEventOverflow:
-        case KErrUsbBadDeviceAttached:
+        
 
             // hosterrors.h
         case KErrUsbUnsupportedDevice:
--- a/usbengines/usbotgwatcher/src/cusbstatehostainitiate.cpp	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usbotgwatcher/src/cusbstatehostainitiate.cpp	Tue Apr 27 17:41:29 2010 +0300
@@ -245,9 +245,10 @@
             }
         case KErrUsbDeviceDetachedDuringDriverLoading:
             {
-            //do not show error, due to device is already detached
-            // Device Detachment will not come after this (it was not attached yet)
-            // therefore emulate detachment
+            LOG( "KErrUsbDeviceDetachedDuringDriverLoading" );
+            // do not show error, due to device is already detached
+            // Device Detachment will not come after this (it was not 
+            // normally attached yet), therefore emulate detachment 
             // content of aTdi is not important, due to detachment anyway
             DeviceDetachedL(aTdi);
             break;
--- a/usbengines/usbotgwatcher/src/cusbstatehosthandledropping.cpp	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usbotgwatcher/src/cusbstatehosthandledropping.cpp	Tue Apr 27 17:41:29 2010 +0300
@@ -17,6 +17,7 @@
 
 #include <usbuinotif.h>
 #include <d32usbdi_errors.h>
+#include <d32otgdi_errors.h>
 
 #include "cusbotgwatcher.h"
 #include "cusbstatehosthandledropping.h"
@@ -385,8 +386,8 @@
 
     switch (aMessage)
         {
-        // USBDI
-        case KEventUsbBadDeviceDetached:
+        // OTGDI
+        case KEventUsbOtgBadDeviceDetached:
             {
             LOG("BadDeviceDetached" );
             ChangeHostStateL( EUsbStateHostUndefined);
--- a/usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp	Tue Apr 27 17:41:29 2010 +0300
@@ -15,6 +15,7 @@
  *
  */
 
+#include <d32otgdi_errors.h>
 #include "cusbotgwatcher.h"
 #include "cusbstatehostundefined.h"
 
@@ -168,7 +169,8 @@
 // 
 // ---------------------------------------------------------------------------
 //
-void CUsbStateHostUndefined::DriverLoadPartialSuccessL(TDeviceEventInformation)
+void CUsbStateHostUndefined::DriverLoadPartialSuccessL(
+        TDeviceEventInformation)
     {
     LOG_FUNC
     }
@@ -208,7 +210,25 @@
 void CUsbStateHostUndefined::MessageNotificationReceivedL(TInt aMessage)
     {
     LOG_FUNC
-    LOG1( "Unhandled message aMessage = %d" , aMessage);
+    LOG1( "aMessage = %d" , aMessage);
+
+    switch (aMessage)
+        {
+        // OTGDI
+        case KErrUsbOtgBadDeviceAttached:
+            {
+            LOG( "BadDeviceAttached" );
+            HandleL(EUsbWatcherErrUnsupportedDevice,
+                    EUsbStateHostHandleDropping);
+            break;
+            }
+        default:
+            {
+            LOG1( "Unhandled message = %d" , aMessage);
+            break;
+            }
+
+        }
     }
 
 // ---------------------------------------------------------------------------
--- a/usbengines/usbremotepersonality/tsrc/USBRemotePersonalityTest/conf/USBRemotePersonalityTest.cfg	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usbremotepersonality/tsrc/USBRemotePersonalityTest/conf/USBRemotePersonalityTest.cfg	Tue Apr 27 17:41:29 2010 +0300
@@ -1,3 +1,20 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or 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: 
+*
+*/
+
 [StifSettings]
 CapsModifier= USBRemotePersonalityTest.exe
 [EndStifSettings]
--- a/usbengines/usbremotepersonality/tsrc/USBRemotePersonalityTest/init/USBRemotePersonalityTest_ats.ini	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usbremotepersonality/tsrc/USBRemotePersonalityTest/init/USBRemotePersonalityTest_ats.ini	Tue Apr 27 17:41:29 2010 +0300
@@ -1,3 +1,20 @@
+#
+# Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+
 #
 # This is STIF initialization file
 # Comment lines start with '#'-character.
--- a/usbengines/usbremotepersonality/tsrc/USBRemotePersonalityTest/init/USBRemotePersonalityTest_phone.ini	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usbremotepersonality/tsrc/USBRemotePersonalityTest/init/USBRemotePersonalityTest_phone.ini	Tue Apr 27 17:41:29 2010 +0300
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
 #
 # This is STIF initialization file
 # Comment lines start with '#'-character.
--- a/usbengines/usbwatcher/src/cusbactivepersonalityhandler.cpp	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usbwatcher/src/cusbactivepersonalityhandler.cpp	Tue Apr 27 17:41:29 2010 +0300
@@ -29,8 +29,7 @@
 #include <usbuinotif.h>
 
 // CONSTANTS
-// const TInt KSerialNumberLength = 12;
-const TInt KContainerIdLength = 16;
+const TInt KSerialNumberLength = 12;
 
 const TUid KUsbmanSvrUid = {0x101fe1db};
 
@@ -124,23 +123,19 @@
     TLex lex( iPhoneInfo.iSerialNumber );
     TInt length = iPhoneInfo.iSerialNumber.Length();
 
-    // currently the serial number is used for the USB container ID
-    // the container ID length must be at least 16 bytes
-    // also, even when serial number is not used for the container id
-    // it must be at least 12, see below
-    if( length < KContainerIdLength )
+    if( length < KSerialNumberLength )
         {
-        // In GSM, the complete IMEI can used as USB serial number. But in
-        // CDMA, the ESN is too short for a valid Mass Storage serial number
-        // (Mass-Storage and Bulk Only Transport specs both require minimum
-        // 12 byte number), so it is extended with leading zeroes. When
-        // doing this, make sure not to write anything over descriptor's
-        // max length
-        if( iPhoneInfo.iSerialNumber.MaxLength() < KContainerIdLength )
+        // In GSM, the complete IMEI can be used as USB serial
+        // number. But in CDMA, the ESN is too short for a valid Mass
+        // Storage serial number (Mass-Storage and Bulk Only Transport
+        // specs both require minimum 12 byte number), so it is
+        // extended with trailing zeroes. When doing this, make sure
+        // not to write anything over descriptor's max length
+        if( iPhoneInfo.iSerialNumber.MaxLength() < KSerialNumberLength )
             {
-            iPhoneInfo.iSerialNumber.SetLength( KContainerIdLength );
+            iPhoneInfo.iSerialNumber.SetLength( KSerialNumberLength );
             }
-        while( length < KContainerIdLength )
+        while( length < KSerialNumberLength )
             {
             iPhoneInfo.iSerialNumber.Append( '0' );
             ++length;