sl@0: // Copyright (c) 2008-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: // scsiblockcommands.inl sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: sl@0: Constructor for SCSI MODE SENSE (6) request. sl@0: sl@0: @param aPageControl SCSI PAGE CONTROL field sl@0: @param aPageCode SCSI PAGE CODE field sl@0: @param aSubPageCode SCSI SUB PAGE CODE field sl@0: */ sl@0: inline TScsiClientModeSense6Req::TScsiClientModeSense6Req(TPageControl aPageControl, sl@0: TUint aPageCode, sl@0: TUint aSubPageCode) sl@0: : sl@0: TScsiClientReq(EModeSense6), sl@0: iPageControl(aPageControl), sl@0: iPageCode(aPageCode), sl@0: iSubPageCode(aSubPageCode), sl@0: iAllocationLength(KResponseLength) sl@0: { sl@0: } sl@0: sl@0: sl@0: inline TInt TScsiClientModeSense6Req::EncodeRequestL(TDes8& aBuffer) const sl@0: { sl@0: __SCSIPRINT(_L("<-- SCSI MODE SENSE (6)")); sl@0: TInt length = TScsiClientReq::EncodeRequestL(aBuffer); sl@0: sl@0: // PC sl@0: aBuffer[2] = iPageCode; sl@0: aBuffer[2] |= iPageControl << 6; sl@0: aBuffer[3] = iSubPageCode; sl@0: sl@0: aBuffer[4] = iAllocationLength; sl@0: return length; sl@0: } sl@0: sl@0: sl@0: /** sl@0: Constructor for SCSI READ (10) and SCSI WRITE (10) base class sl@0: sl@0: @param aOperationCode SCSI OPERATION CODE sl@0: */ sl@0: inline TScsiClientRdWr10Req::TScsiClientRdWr10Req(TOperationCode aOperationCode) sl@0: : sl@0: TScsiClientReq(aOperationCode), sl@0: iLogicalBlockAddress(0), sl@0: iBlockTransferLength(0), sl@0: iProtect(0) sl@0: { sl@0: __MSFNSLOG sl@0: } sl@0: sl@0: sl@0: /** Constructor for SCSI READ (10) request */ sl@0: inline TScsiClientRead10Req::TScsiClientRead10Req() sl@0: : sl@0: TScsiClientRdWr10Req(ERead10) sl@0: { sl@0: __MSFNSLOG sl@0: } sl@0: sl@0: sl@0: /** Constructor for SCSI READ CAPACITY (10) request */ sl@0: inline TScsiClientReadCapacity10Req::TScsiClientReadCapacity10Req() sl@0: : TScsiClientReq(EReadCapacity10), sl@0: iLba(0) sl@0: { sl@0: __MSFNSLOG sl@0: } sl@0: sl@0: sl@0: /** sl@0: Constructor for SCSI READ CAPACITY (10) request. sl@0: sl@0: @param aLba The SCSI LOGICAL BLOCK ADDRESS for this request sl@0: */ sl@0: inline TScsiClientReadCapacity10Req::TScsiClientReadCapacity10Req(TLba aLba) sl@0: : TScsiClientReq(EReadCapacity10), sl@0: iLba(aLba) sl@0: { sl@0: __MSFNSLOG sl@0: } sl@0: sl@0: sl@0: /** Constructor for SCSI WRITE (10) request */ sl@0: inline TScsiClientWrite10Req::TScsiClientWrite10Req() sl@0: : sl@0: TScsiClientRdWr10Req(EWrite10) sl@0: { sl@0: __MSFNSLOG sl@0: } sl@0: sl@0: sl@0: /** Constructor for SCSI START STOP UNIT request */ sl@0: inline TScsiClientStartStopUnitReq::TScsiClientStartStopUnitReq() sl@0: : sl@0: TScsiClientReq(EStartStopUnit), sl@0: iImmed(EFalse), sl@0: iStart(EFalse), sl@0: iLoej(EFalse) sl@0: { sl@0: __MSFNSLOG sl@0: } sl@0: