os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/controller/include/cusbhostmsdevice.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 CUSBHOSTMSDEVICE_H
22 #define CUSBHOSTMSDEVICE_H
24 #include "tlogicalunitlist.h"
27 class CUsbMsIfaceSuspendResume;
28 class TLogicalUnitList;
30 class CUsbHostMsDevice : public CBase
34 static CUsbHostMsDevice* NewL(THostMassStorageConfig& aConfig);
36 void InitialiseL(const RMessage2& aMessage);
39 TInt AddLunL(TLun aLun);
40 void RemoveLunL(TLun aLun);
41 TLun GetAndSetLunL(const RMessage2& aMessage);
42 CUsbHostMsLogicalUnit& GetLuL(TInt aLunNum) const;
44 void SetLunL(TLun aLun);
45 void SetMaxLun(TLun aMaxLun);
46 TLun GetMaxLun() const;
48 TBool IsReady() const;
49 TBool IsSuspended() const;
51 void InitLunL(TLun aLun);
53 void SuspendLunL(TLun aLun);
54 void Resume(TRequestStatus& aStatus);
55 void ResumeLogicalUnitsL();
56 void ResumeCompletedL();
58 void DoHandleRemoteWakeupL();
59 void DoLunReadyCheckEventL();
60 void DoResumeLogicalUnitsL();
64 CUsbHostMsDevice(THostMassStorageConfig& aConfig);
65 MTransport* InitialiseTransportL(TTransportType aTransportId);
68 static TInt TimerCallback(TAny* obj);
77 MTransport* iTransport;
79 TLogicalUnitList iLuList;
80 THostMassStorageConfig iConfig;
81 CUsbMsIfaceSuspendResume* iDeviceSuspendResume;
83 /** The polling interval time as set by the MM - passed as part of THostMassStorageConfig */
84 TUint8 iStatusPollingInterval;
85 /** An active object which triggers periodic check. */
87 /** The Timer status */
92 inline TLun CUsbHostMsDevice::GetMaxLun() const
98 inline TBool CUsbHostMsDevice::IsReady() const
100 return (iState == EReady)? ETrue : EFalse;
104 inline TBool CUsbHostMsDevice::IsSuspended() const
106 return (iState == ESuspended)? ETrue : EFalse;
109 #endif // CUSBHOSTMSDEVICE_H