os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/protocol/include/tscsiblockcmds.inl
First public contribution.
1 // Copyright (c) 2008-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 // scsiblockcommands.inl
22 Constructor for SCSI MODE SENSE (6) request.
24 @param aPageControl SCSI PAGE CONTROL field
25 @param aPageCode SCSI PAGE CODE field
26 @param aSubPageCode SCSI SUB PAGE CODE field
28 inline TScsiClientModeSense6Req::TScsiClientModeSense6Req(TPageControl aPageControl,
32 TScsiClientReq(EModeSense6),
33 iPageControl(aPageControl),
35 iSubPageCode(aSubPageCode),
36 iAllocationLength(KResponseLength)
41 inline TInt TScsiClientModeSense6Req::EncodeRequestL(TDes8& aBuffer) const
43 __SCSIPRINT(_L("<-- SCSI MODE SENSE (6)"));
44 TInt length = TScsiClientReq::EncodeRequestL(aBuffer);
47 aBuffer[2] = iPageCode;
48 aBuffer[2] |= iPageControl << 6;
49 aBuffer[3] = iSubPageCode;
51 aBuffer[4] = iAllocationLength;
57 Constructor for SCSI READ (10) and SCSI WRITE (10) base class
59 @param aOperationCode SCSI OPERATION CODE
61 inline TScsiClientRdWr10Req::TScsiClientRdWr10Req(TOperationCode aOperationCode)
63 TScsiClientReq(aOperationCode),
64 iLogicalBlockAddress(0),
65 iBlockTransferLength(0),
72 /** Constructor for SCSI READ (10) request */
73 inline TScsiClientRead10Req::TScsiClientRead10Req()
75 TScsiClientRdWr10Req(ERead10)
81 /** Constructor for SCSI READ CAPACITY (10) request */
82 inline TScsiClientReadCapacity10Req::TScsiClientReadCapacity10Req()
83 : TScsiClientReq(EReadCapacity10),
91 Constructor for SCSI READ CAPACITY (10) request.
93 @param aLba The SCSI LOGICAL BLOCK ADDRESS for this request
95 inline TScsiClientReadCapacity10Req::TScsiClientReadCapacity10Req(TLba aLba)
96 : TScsiClientReq(EReadCapacity10),
103 /** Constructor for SCSI WRITE (10) request */
104 inline TScsiClientWrite10Req::TScsiClientWrite10Req()
106 TScsiClientRdWr10Req(EWrite10)
112 /** Constructor for SCSI START STOP UNIT request */
113 inline TScsiClientStartStopUnitReq::TScsiClientStartStopUnitReq()
115 TScsiClientReq(EStartStopUnit),