os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/controller/include/cusbhostmsdevicethread.h
Update contrib.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
18 Implements a thread per device functionality
25 #ifndef CUSBMASSSTORAGEDEVICETHREAD_H
26 #define CUSBMASSSTORAGEDEVICETHREAD_H
32 TDeviceHandler(CUsbHostMsDevice& aDevice);
33 void HandleMessageL(const RMessage2& aMessage);
36 CUsbHostMsDevice& iDevice;
40 class TLogicalUnitHandler
43 TLogicalUnitHandler(CUsbHostMsLogicalUnit& aLu);
44 void HandleMessageL(const RMessage2& aMessage);
47 CUsbHostMsLogicalUnit& iLu;
50 class CUsbHostMsSession;
52 class CUsbHostMsDeviceThread : public CActive
55 static const TInt KMaxNumMessage = 32;
57 static CUsbHostMsDeviceThread* NewL(CUsbHostMsSession& aUsbHostMsSession, TUint aToken);
58 ~CUsbHostMsDeviceThread();
61 CUsbHostMsDeviceThread(CUsbHostMsSession& aUsbHostMsSession, TUint aToken);
64 static TInt Entry(TAny* aPtr);
65 TInt QueueMsg(const RMessage2& aMsg);
75 TInt RunError(TInt aError);
77 void HandleMessage(const RMessage2& aMessage);
79 void UnRegisterInterfaceL(const RMessage2& aMessage);
82 static void DoStartServerL(TAny* aPtr);
84 void RegisterInterfaceL(const RMessage2& aMessage);
85 void InitialiseInterfaceL(const RMessage2& aMessage);
86 void GetNumLunL(const RMessage2& aMessage);
87 void RegisterLogicalUnitL(const RMessage2& aMessage);
91 CUsbHostMsSession& iUsbHostMsSession;
93 CUsbHostMsDevice* iUsbHostMsDevice;
95 RMessage2 iRMessage2[KMaxNumMessage];
104 inline void CUsbHostMsDeviceThread::Lock()
110 inline void CUsbHostMsDeviceThread::Unlock()
116 #endif // CUSBMASSSTORAGEDEVICETHREAD_H