|
1 // Copyright (c) 2004-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Class declaration for CUsbMassStorageController. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 */ |
|
22 |
|
23 #ifndef __CUSBMASSSTORAGECONTROLLER_H__ |
|
24 #define __CUSBMASSSTORAGECONTROLLER_H__ |
|
25 |
|
26 #include <e32base.h> |
|
27 #include "t_gml_tur_protocol.h" |
|
28 #include "usbmsshared.h" |
|
29 |
|
30 /** |
|
31 Stub drive manager for bulk-only transport testing. |
|
32 */ |
|
33 class CDriveManager |
|
34 { |
|
35 public: |
|
36 TInt Connect(TUint aLun); |
|
37 TInt Disconnect(TUint aLun); |
|
38 }; |
|
39 |
|
40 /** |
|
41 Mass Storage Controller class. |
|
42 Encapsulates the drive manager, transport and protocol for USB Mass Storage. |
|
43 Its main purpose is to instantiate and initialize these objects. |
|
44 */ |
|
45 class CUsbMassStorageController : public CActive |
|
46 { |
|
47 public: |
|
48 CUsbMassStorageController(); |
|
49 ~CUsbMassStorageController(); |
|
50 void CreateL(TUint aMaxDrives); |
|
51 TInt Start(TMassStorageConfig& aConfig); |
|
52 TInt Stop(); |
|
53 void Reset(); |
|
54 TBool IsReset(); |
|
55 void RunL(); |
|
56 void DoCancel(); |
|
57 CDriveManager& DriveManager(); |
|
58 void GetTransport(MTransportBase* &aTransport); |
|
59 void SetTransport(MTransportBase* aTransport); |
|
60 enum TTransportldd {EUsbc = 1, EUsbcsc}; |
|
61 |
|
62 private: |
|
63 TBool iReset; |
|
64 CDriveManager iStubDriveManager; |
|
65 MTransportBase* iTransport; |
|
66 }; |
|
67 |
|
68 #endif //__CUSBMASSSTORAGECONTROLLER_H__ |