0
|
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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// scsiblockcommands.inl
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalTechnology
|
|
21 |
|
|
22 |
Constructor for SCSI MODE SENSE (6) request.
|
|
23 |
|
|
24 |
@param aPageControl SCSI PAGE CONTROL field
|
|
25 |
@param aPageCode SCSI PAGE CODE field
|
|
26 |
@param aSubPageCode SCSI SUB PAGE CODE field
|
|
27 |
*/
|
|
28 |
inline TScsiClientModeSense6Req::TScsiClientModeSense6Req(TPageControl aPageControl,
|
|
29 |
TUint aPageCode,
|
|
30 |
TUint aSubPageCode)
|
|
31 |
:
|
|
32 |
TScsiClientReq(EModeSense6),
|
|
33 |
iPageControl(aPageControl),
|
|
34 |
iPageCode(aPageCode),
|
|
35 |
iSubPageCode(aSubPageCode),
|
|
36 |
iAllocationLength(KResponseLength)
|
|
37 |
{
|
|
38 |
}
|
|
39 |
|
|
40 |
|
|
41 |
inline TInt TScsiClientModeSense6Req::EncodeRequestL(TDes8& aBuffer) const
|
|
42 |
{
|
|
43 |
__SCSIPRINT(_L("<-- SCSI MODE SENSE (6)"));
|
|
44 |
TInt length = TScsiClientReq::EncodeRequestL(aBuffer);
|
|
45 |
|
|
46 |
// PC
|
|
47 |
aBuffer[2] = iPageCode;
|
|
48 |
aBuffer[2] |= iPageControl << 6;
|
|
49 |
aBuffer[3] = iSubPageCode;
|
|
50 |
|
|
51 |
aBuffer[4] = iAllocationLength;
|
|
52 |
return length;
|
|
53 |
}
|
|
54 |
|
|
55 |
|
|
56 |
/**
|
|
57 |
Constructor for SCSI READ (10) and SCSI WRITE (10) base class
|
|
58 |
|
|
59 |
@param aOperationCode SCSI OPERATION CODE
|
|
60 |
*/
|
|
61 |
inline TScsiClientRdWr10Req::TScsiClientRdWr10Req(TOperationCode aOperationCode)
|
|
62 |
:
|
|
63 |
TScsiClientReq(aOperationCode),
|
|
64 |
iLogicalBlockAddress(0),
|
|
65 |
iBlockTransferLength(0),
|
|
66 |
iProtect(0)
|
|
67 |
{
|
|
68 |
__MSFNSLOG
|
|
69 |
}
|
|
70 |
|
|
71 |
|
|
72 |
/** Constructor for SCSI READ (10) request */
|
|
73 |
inline TScsiClientRead10Req::TScsiClientRead10Req()
|
|
74 |
:
|
|
75 |
TScsiClientRdWr10Req(ERead10)
|
|
76 |
{
|
|
77 |
__MSFNSLOG
|
|
78 |
}
|
|
79 |
|
|
80 |
|
|
81 |
/** Constructor for SCSI READ CAPACITY (10) request */
|
|
82 |
inline TScsiClientReadCapacity10Req::TScsiClientReadCapacity10Req()
|
|
83 |
: TScsiClientReq(EReadCapacity10),
|
|
84 |
iLba(0)
|
|
85 |
{
|
|
86 |
__MSFNSLOG
|
|
87 |
}
|
|
88 |
|
|
89 |
|
|
90 |
/**
|
|
91 |
Constructor for SCSI READ CAPACITY (10) request.
|
|
92 |
|
|
93 |
@param aLba The SCSI LOGICAL BLOCK ADDRESS for this request
|
|
94 |
*/
|
|
95 |
inline TScsiClientReadCapacity10Req::TScsiClientReadCapacity10Req(TLba aLba)
|
|
96 |
: TScsiClientReq(EReadCapacity10),
|
|
97 |
iLba(aLba)
|
|
98 |
{
|
|
99 |
__MSFNSLOG
|
|
100 |
}
|
|
101 |
|
|
102 |
|
|
103 |
/** Constructor for SCSI WRITE (10) request */
|
|
104 |
inline TScsiClientWrite10Req::TScsiClientWrite10Req()
|
|
105 |
:
|
|
106 |
TScsiClientRdWr10Req(EWrite10)
|
|
107 |
{
|
|
108 |
__MSFNSLOG
|
|
109 |
}
|
|
110 |
|
|
111 |
|
|
112 |
/** Constructor for SCSI START STOP UNIT request */
|
|
113 |
inline TScsiClientStartStopUnitReq::TScsiClientStartStopUnitReq()
|
|
114 |
:
|
|
115 |
TScsiClientReq(EStartStopUnit),
|
|
116 |
iImmed(EFalse),
|
|
117 |
iStart(EFalse),
|
|
118 |
iLoej(EFalse)
|
|
119 |
{
|
|
120 |
__MSFNSLOG
|
|
121 |
}
|
|
122 |
|