os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/controller/include/cusbhostmslogicalunit.h
Update contrib.
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 CUSBHOSTMSLOGICALUNIT_H
22 #define CUSBHOSTMSLOGICALUNIT_H
27 class THostMassStorageConfig;
31 This class represents a Logical Unit supporting SCSI Mass Storage Class. The
32 class provides inteface methods to read, write and get the media capacity of the
33 Logical Unit. Each instance is identified by the LUN.
35 class CUsbHostMsLogicalUnit : public CBase
38 static CUsbHostMsLogicalUnit* NewL(TLun aLun);
39 ~CUsbHostMsLogicalUnit();
42 CUsbHostMsLogicalUnit(TLun aLun);
47 void ReadL(const RMessage2& aMessage);
48 void WriteL(const RMessage2& aMessage);
49 void EraseL(const RMessage2& aMessage);
50 void CapsL(const RMessage2& aMessage);
52 void NotifyChange(const RMessage2& aMessage);
53 void ForceCompleteNotifyChangeL();
54 void CancelChangeNotifierL();
56 void ReadyToSuspend();
58 TBool IsReadyToSuspend();
59 void CancelReadyToSuspend();
63 void DoLunReadyCheckL();
65 TInt InitialiseProtocolL(TLun aLun,
66 THostMassStorageConfig& aConfig,
67 MTransport& aTransport);
72 TInt CheckPosition(const TReadWrite& aReadWrite);
74 /** The Protocol interface (Owned by this class) */
78 /** The Size (updated by CapsL) */
81 TBool iSuspendRequest;
92 inline TLun CUsbHostMsLogicalUnit::Lun() const
97 #endif // CUSBHOSTMSLOGICALUNIT_H