userlibandfileserver/fileserver/smassstorage/inc/scsiprot.h
branchRCL_3
changeset 80 597aaf25e343
parent 0 a41df078684a
child 286 48e57fb1237e
equal deleted inserted replaced
62:4a8fed1c0ef6 80:597aaf25e343
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2004-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".
   133 	{
   133 	{
   134 	return (iSenseCode == ENoSense);
   134 	return (iSenseCode == ENoSense);
   135 	}
   135 	}
   136 
   136 
   137 
   137 
   138 const TUint KModeSenseCommandLength = 4;
   138 const TUint KModeSense6CommandLength = 4;
       
   139 const TUint KModeSense10CommandLength = 8;
   139 const TUint KReadCapacityCommandLength = 8;
   140 const TUint KReadCapacityCommandLength = 8;
   140 const TUint KReadFormatCapacitiesCommandLength = 12;
   141 const TUint KReadFormatCapacitiesCommandLength = 12;
   141 const TUint KRequestSenseCommandLength = 18;
   142 const TUint KRequestSenseCommandLength = 18;
   142 const TUint KInquiryCommandLength = 36;
   143 const TUint KInquiryCommandLength = 36;
   143 
   144 
   154 	enum TCommand
   155 	enum TCommand
   155 	{
   156 	{
   156 	ETestUnitReady			= 0x00,
   157 	ETestUnitReady			= 0x00,
   157 	ERequestSense			= 0x03,
   158 	ERequestSense			= 0x03,
   158 	EInquiry 				= 0x12,
   159 	EInquiry 				= 0x12,
   159 	EModeSense				= 0x1A,
   160 	EModeSense6				= 0x1A,
   160 	EStartStopUnit			= 0x1B,
   161 	EStartStopUnit			= 0x1B,
   161 	EPreventMediaRemoval	= 0x1E,
   162 	EPreventMediaRemoval	= 0x1E,
   162 	EReadFormatCapacities	= 0x23,
   163 	EReadFormatCapacities	= 0x23,
   163 	EReadCapacity			= 0x25,
   164 	EReadCapacity			= 0x25,
   164 	ERead10 				= 0x28,
   165 	ERead10 				= 0x28,
   165 	EWrite10				= 0x2A,
   166 	EWrite10				= 0x2A,
   166 	EVerify10				= 0x2f,
   167 	EVerify10				= 0x2f,
       
   168     EModeSense10			= 0x5A,
   167 	EUndefinedCommand		= 0xFF
   169 	EUndefinedCommand		= 0xFF
   168 	};
   170 	};
   169 
   171 
   170 
   172 
   171 public:
   173 public:
   195 	TBool HandlePreventMediaRemoval(TPtrC8& aData, TUint aLun);
   197 	TBool HandlePreventMediaRemoval(TPtrC8& aData, TUint aLun);
   196 	TBool HandleReadCapacity(TPtrC8& aData, TUint aLun);
   198 	TBool HandleReadCapacity(TPtrC8& aData, TUint aLun);
   197 	TBool HandleRead10(TPtrC8& aData, TUint aLun);
   199 	TBool HandleRead10(TPtrC8& aData, TUint aLun);
   198 	TBool HandleWrite10(TPtrC8& aData, TUint aLun);
   200 	TBool HandleWrite10(TPtrC8& aData, TUint aLun);
   199 	TBool HandleVerify10(TPtrC8& aData, TUint aLun);
   201 	TBool HandleVerify10(TPtrC8& aData, TUint aLun);
   200 	TBool HandleModeSense(TPtrC8& aData, TUint aLun);
   202 	TBool HandleModeSense6(TPtrC8& aData, TUint aLun);
       
   203     TBool HandleModeSense10(TPtrC8& aData, TUint aLun);
   201 	TBool HandleReadFormatCapacities(TUint aLun);
   204 	TBool HandleReadFormatCapacities(TUint aLun);
   202 
   205 
   203 private:
   206 private:
   204 	/** Configuration data for INQUIRY command*/
   207 	/** Configuration data for INQUIRY command*/
   205 	TMassStorageConfig iConfig;
   208 	TMassStorageConfig iConfig;