sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // CUsbMassStorageController implementation. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #include sl@0: #include "t_cusbmassstoragecontroller.h" sl@0: #include "massstoragedebug.h" sl@0: #include "mstestdatadef.h" sl@0: sl@0: GLDEF_D RTest test(_L("t_msunittest")); sl@0: sl@0: CUsbMassStorageController* CUsbMassStorageController::NewL() sl@0: { sl@0: __PRINT(_L("CUsbMassStorageController::CUsbMassStorageController\n")); sl@0: return new (ELeave) CUsbMassStorageController; sl@0: } sl@0: sl@0: /** sl@0: Destructor sl@0: */ sl@0: CUsbMassStorageController::~CUsbMassStorageController() sl@0: { sl@0: __PRINT(_L("CUsbMassStorageController::~CUsbMassStorageController\n")); sl@0: test.Close(); sl@0: } sl@0: sl@0: /** sl@0: Starts the transport and initializes the protocol. sl@0: @param aConfig Reference to Mass Storage configuration data sl@0: */ sl@0: TInt CUsbMassStorageController::Start(TMassStorageConfig& aConfig) sl@0: { sl@0: __PRINT(_L("CUsbMassStorageController::Start\n")); sl@0: test.Printf(_L("VendorId: %S\n"), &aConfig.iVendorId); sl@0: test.Printf(_L("ProudcdId: %S\n"), &aConfig.iProductId); sl@0: test.Printf(_L("ProudcdRev: %S\n"), &aConfig.iProductRev); sl@0: /* sl@0: TBuf<8> vendorId(_L("vendor")); sl@0: TBuf<16> productId(_L("product")); sl@0: TBuf<4> productRev(_L("Rev")); sl@0: */ sl@0: test(aConfig.iVendorId.Compare(t_vendorId) == 0 sl@0: && aConfig.iProductId.Compare(t_productId) == 0 sl@0: && aConfig.iProductRev.Compare(t_productRev) == 0); sl@0: sl@0: return KErrNone; // return value not used sl@0: } sl@0: sl@0: /** sl@0: Stops the transport. sl@0: */ sl@0: TInt CUsbMassStorageController::Stop() sl@0: { sl@0: __PRINT(_L("CUsbMassStorageController::Stop\n")); sl@0: test(ETrue); sl@0: sl@0: return KErrNone; // return value not used sl@0: } sl@0: