os/kernelhwsrv/kerneltest/f32test/smassstorage/src/t_cusbmassstoragecontroller.cpp
First public contribution.
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // CUsbMassStorageController implementation.
24 #include "t_cusbmassstoragecontroller.h"
25 #include "massstoragedebug.h"
26 #include "mstestdatadef.h"
28 GLDEF_D RTest test(_L("t_msunittest"));
30 CUsbMassStorageController* CUsbMassStorageController::NewL()
32 __PRINT(_L("CUsbMassStorageController::CUsbMassStorageController\n"));
33 return new (ELeave) CUsbMassStorageController;
39 CUsbMassStorageController::~CUsbMassStorageController()
41 __PRINT(_L("CUsbMassStorageController::~CUsbMassStorageController\n"));
46 Starts the transport and initializes the protocol.
47 @param aConfig Reference to Mass Storage configuration data
49 TInt CUsbMassStorageController::Start(TMassStorageConfig& aConfig)
51 __PRINT(_L("CUsbMassStorageController::Start\n"));
52 test.Printf(_L("VendorId: %S\n"), &aConfig.iVendorId);
53 test.Printf(_L("ProudcdId: %S\n"), &aConfig.iProductId);
54 test.Printf(_L("ProudcdRev: %S\n"), &aConfig.iProductRev);
56 TBuf<8> vendorId(_L("vendor"));
57 TBuf<16> productId(_L("product"));
58 TBuf<4> productRev(_L("Rev"));
60 test(aConfig.iVendorId.Compare(t_vendorId) == 0
61 && aConfig.iProductId.Compare(t_productId) == 0
62 && aConfig.iProductRev.Compare(t_productRev) == 0);
64 return KErrNone; // return value not used
70 TInt CUsbMassStorageController::Stop()
72 __PRINT(_L("CUsbMassStorageController::Stop\n"));
75 return KErrNone; // return value not used