1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Eclipse Public License v1.0" |
4 // under the terms of the License "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
22 |
22 |
23 /** Constructor for TEST UNIT READY request */ |
23 /** Constructor for TEST UNIT READY request */ |
24 inline TScsiClientTestUnitReadyReq::TScsiClientTestUnitReadyReq() |
24 inline TScsiClientTestUnitReadyReq::TScsiClientTestUnitReadyReq() |
25 : TScsiClientReq(ETestUnitReady) |
25 : TScsiClientReq(ETestUnitReady) |
26 { |
26 { |
27 __MSFNSLOG |
|
28 } |
27 } |
29 |
28 |
30 |
29 |
31 /** constructor for SCSI REQUEST SENSE request */ |
30 /** constructor for SCSI REQUEST SENSE request */ |
32 inline TScsiClientRequestSenseReq::TScsiClientRequestSenseReq() |
31 inline TScsiClientRequestSenseReq::TScsiClientRequestSenseReq() |
33 : TScsiClientReq(ERequestSense), |
32 : TScsiClientReq(ERequestSense), |
34 iAllocationLength(KResponseLength) |
33 iAllocationLength(KResponseLength) |
35 { |
34 { |
36 __MSFNSLOG |
|
37 } |
35 } |
38 |
36 |
39 |
37 |
40 /** |
38 /** |
41 Set SCSI ALLOCATION LENGTH value. |
39 Set SCSI ALLOCATION LENGTH value. |
42 |
40 |
43 @param aAllocationLength |
41 @param aAllocationLength |
44 */ |
42 */ |
45 inline void TScsiClientRequestSenseReq::SetAllocationLength(TAllocationLength aAllocationLength) |
43 inline void TScsiClientRequestSenseReq::SetAllocationLength(TAllocationLength aAllocationLength) |
46 { |
44 { |
47 __MSFNSLOG |
|
48 iAllocationLength = aAllocationLength; |
45 iAllocationLength = aAllocationLength; |
49 } |
46 } |
50 |
47 |
51 |
48 |
52 inline TInt TScsiClientRequestSenseReq::EncodeRequestL(TDes8& aBuffer) const |
49 inline TInt TScsiClientRequestSenseReq::EncodeRequestL(TDes8& aBuffer) const |
53 { |
50 { |
54 __MSFNSLOG |
|
55 __SCSIPRINT(_L("<-- SCSI REQUEST SENSE")); |
|
56 TInt length = TScsiClientReq::EncodeRequestL(aBuffer); |
51 TInt length = TScsiClientReq::EncodeRequestL(aBuffer); |
57 |
52 |
58 aBuffer[4] = iAllocationLength; |
53 aBuffer[4] = iAllocationLength; |
59 return length; |
54 return length; |
60 } |
55 } |
65 : TScsiClientReq(EInquiry), |
60 : TScsiClientReq(EInquiry), |
66 iCmdDt(EFalse), |
61 iCmdDt(EFalse), |
67 iEvpd(EFalse), |
62 iEvpd(EFalse), |
68 iAllocationLength(KResponseLength) |
63 iAllocationLength(KResponseLength) |
69 { |
64 { |
70 __MSFNSLOG |
|
71 } |
65 } |
72 |
66 |
73 |
67 |
74 /** |
68 /** |
75 Set SCSI ALLOCATION LENGTH value. |
69 Set SCSI ALLOCATION LENGTH value. |
76 |
70 |
77 @param aAllocationLength |
71 @param aAllocationLength |
78 */ |
72 */ |
79 inline void TScsiClientInquiryReq::SetAllocationLength(TAllocationLength aAllocationLength) |
73 inline void TScsiClientInquiryReq::SetAllocationLength(TAllocationLength aAllocationLength) |
80 { |
74 { |
81 __MSFNSLOG |
|
82 iAllocationLength = aAllocationLength; |
75 iAllocationLength = aAllocationLength; |
83 } |
76 } |
84 |
77 |
85 |
78 |
86 /** |
79 /** |
101 |
93 |
102 @param aOperationCode SCSI OPERATION CODE value |
94 @param aOperationCode SCSI OPERATION CODE value |
103 */ |
95 */ |
104 inline void TScsiClientInquiryReq::SetCmdDt(TUint8 aOperationCode) |
96 inline void TScsiClientInquiryReq::SetCmdDt(TUint8 aOperationCode) |
105 { |
97 { |
106 __MSFNSLOG |
|
107 iCmdDt = ETrue; |
98 iCmdDt = ETrue; |
108 iPage = aOperationCode; |
99 iPage = aOperationCode; |
109 } |
100 } |
110 |
101 |
111 |
102 |
112 inline TInt TScsiClientInquiryReq::EncodeRequestL(TDes8& aBuffer) const |
103 inline TInt TScsiClientInquiryReq::EncodeRequestL(TDes8& aBuffer) const |
113 { |
104 { |
114 __MSFNSLOG |
|
115 __SCSIPRINT(_L("<-- SCSI INQUIRY")); |
|
116 TInt length = TScsiClientReq::EncodeRequestL(aBuffer); |
105 TInt length = TScsiClientReq::EncodeRequestL(aBuffer); |
117 |
106 |
118 if (iEvpd) |
107 if (iEvpd) |
119 { |
108 { |
120 aBuffer[1] |= 0x01; |
109 aBuffer[1] |= 0x01; |