os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/protocol/include/tscsiclientreq.h
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.
21 #ifndef TSCSICLIENTREQ_H
22 #define TSCSICLIENTREQ_H
25 Data type for GROUP CODE
29 typedef TUint8 TGroupCode;
32 Data type for ALLOCATION LENGTH
36 typedef TUint TAllocationLength; // 1 Byte
39 Base class to decode SCSI RESPONSE
41 class TScsiClientResp: public MClientCommandServiceResp
49 Base class to encode a SCSI REQUEST which implements the SCSI header encoding
51 class TScsiClientReq: public MClientCommandServiceReq
54 /** SCSI OPERATION CODE */
57 ETestUnitReady = 0x00,
61 EStartStopUnit = 0x1B,
62 EPreventMediaRemoval = 0x1E,
63 EReadFormatCapacities = 0x23,
64 EReadCapacity10 = 0x25,
69 EUndefinedCommand = 0xFF
72 TScsiClientReq(TOperationCode aOperationCode);
74 virtual TInt EncodeRequestL(TDes8& aBuffer) const;
77 TUint8 GetControlByte() const;
78 TGroupCode GetGroupCode() const;
80 TBool IsDataDirectionOut() const;
81 TUint32 DataLength() const;
84 /** SCSI OPERATION CODE of CDB byte, SAM-2 5.2.2 */
85 const TOperationCode iOperationCode;
86 /** SCSI NACA field of CDB CONTROL Byte. SAM-2 5.2.3 */
88 /** SCSI LINK field of CDB CONTROL Byte. SAM-2 5.2.3 */
92 #include "tscsiclientreq.inl"
94 #endif // TSCSICLIENTREQ_H