1 /* |
|
2 * Copyright (c) 2007 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: MMC Eject monitor |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_MPXMMCEJECTMONITOR_H |
|
20 #define C_MPXMMCEJECTMONITOR_H |
|
21 |
|
22 #include <mpxpskeyobserver.h> |
|
23 #include "mpxsystemeventobserver.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CMPXPSKeyWatcher; |
|
27 |
|
28 /** |
|
29 * Monitors a SysAp cenrep key for the "eject" mmc menu option |
|
30 * |
|
31 * @lib mpxharvester.exe |
|
32 * @since S60 3.1 |
|
33 */ |
|
34 NONSHARABLE_CLASS( CMPXMMCEjectMonitor ) : public CBase, |
|
35 public MMPXPSKeyObserver |
|
36 { |
|
37 |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Two-phased constructor |
|
42 */ |
|
43 static CMPXMMCEjectMonitor* NewL( MMPXSystemEventObserver& aObserver ); |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 virtual ~CMPXMMCEjectMonitor(); |
|
49 |
|
50 protected: // From Base Class |
|
51 |
|
52 /** |
|
53 * From MMPXPSKeyObserver |
|
54 */ |
|
55 void HandlePSEvent( TUid aUid, TInt aKey ); |
|
56 |
|
57 private: |
|
58 |
|
59 /** |
|
60 * 2nd phase constructor |
|
61 */ |
|
62 void ConstructL(); |
|
63 |
|
64 /** |
|
65 * Private Constructor |
|
66 */ |
|
67 CMPXMMCEjectMonitor( MMPXSystemEventObserver& aObserver ); |
|
68 |
|
69 private: // data |
|
70 |
|
71 CMPXPSKeyWatcher* iPSKeyWatcher; // PS key watcher for USB PS key |
|
72 |
|
73 /* |
|
74 * Observer interface to callback to an observer |
|
75 */ |
|
76 MMPXSystemEventObserver& iObserver; // Not owned |
|
77 }; |
|
78 |
|
79 #endif // C_MPXMMCEJECTMONITOR_H |
|