kerneltest/f32test/shostmassstorage/testclient/usbtestmsclient/protocol/tscsiserverreq.cpp
equal
deleted
inserted
replaced
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2009-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 #include "msctypes.h" |
23 #include "msctypes.h" |
24 #include "tscsiserverreq.h" |
24 #include "tscsiserverreq.h" |
25 #include "tscsiservercmds.h" |
25 #include "tscsiservercmds.h" |
26 #include "debug.h" |
26 #include "debug.h" |
27 #include "msdebug.h" |
|
28 |
27 |
29 TScsiServerReq* TScsiServerReq::CreateL(TScsiServerReq::TOperationCode aOperationCode, |
28 TScsiServerReq* TScsiServerReq::CreateL(TScsiServerReq::TOperationCode aOperationCode, |
30 TDesC8& aDes) |
29 TDesC8& aDes) |
31 { |
30 { |
32 __MSFNSLOG |
|
33 TScsiServerReq* req = NULL; |
31 TScsiServerReq* req = NULL; |
34 |
32 |
35 __SCSIPRINT1(_L("SCSI CMD 0x%x"), aOperationCode); |
33 __SCSIPRINT1(_L("SCSI CMD 0x%x"), aOperationCode); |
36 |
34 |
37 switch (aOperationCode) |
35 switch (aOperationCode) |
105 } |
103 } |
106 |
104 |
107 |
105 |
108 void TScsiServerReq::DecodeL(const TDesC8& aPtr) |
106 void TScsiServerReq::DecodeL(const TDesC8& aPtr) |
109 { |
107 { |
110 __MSFNLOG |
|
111 // OPERATION CODE |
108 // OPERATION CODE |
112 iOperationCode = static_cast<TOperationCode>(aPtr[0]); |
109 iOperationCode = static_cast<TOperationCode>(aPtr[0]); |
113 |
110 |
114 // CONTROL byte |
111 // CONTROL byte |
115 TInt length = 0; |
112 TInt length = 0; |
116 switch (GetGroupCode()) |
113 switch (GetGroupCode()) |
117 { |
114 { |