equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Monitors Usb insertions and removals.* |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef __MMCUSBAO_H__ |
|
19 #define __MMCUSBAO_H__ |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <f32file.h> |
|
23 #include <e32property.h> |
|
24 |
|
25 #include "mmcmonitorao.h" |
|
26 |
|
27 class CMMCUsbAO : public CActive |
|
28 { |
|
29 public: |
|
30 |
|
31 static CMMCUsbAO* NewL(); |
|
32 virtual ~CMMCUsbAO(); |
|
33 |
|
34 TBool StartMonitoring( MMMCMonitorObserver& aObserver ); |
|
35 TBool StopMonitoring(); |
|
36 TBool Resume(); |
|
37 TBool Pause(); |
|
38 |
|
39 void RunL(); |
|
40 TInt RunError( TInt aError ); |
|
41 void DoCancel(); |
|
42 |
|
43 private: |
|
44 |
|
45 CMMCUsbAO(); |
|
46 void ConstructL(); |
|
47 |
|
48 void StartNotify(); |
|
49 TUint32 MediaID( TInt aDrive ); |
|
50 |
|
51 #ifdef _DEBUG |
|
52 void PrintDriveStatus( TInt aStatus ); |
|
53 #endif |
|
54 |
|
55 private: |
|
56 |
|
57 MMMCMonitorObserver* iObserver; |
|
58 RFs iFs; |
|
59 RProperty iDriveState; |
|
60 TInt iDrive; |
|
61 TBool iMassStorageMode; |
|
62 }; |
|
63 |
|
64 #endif // __MMCUSBAO_H__ |