|
1 /* |
|
2 * Copyright (c) 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: Response dialog's custom control implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMRSYSTEMNOTIFIER_H |
|
20 #define CMRSYSTEMNOTIFIER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class CEnvironmentChangeNotifier; |
|
25 class CESMRFieldEventQueue; |
|
26 |
|
27 /** |
|
28 * CMRSystemNotifier listen system events and sends MRUI events. |
|
29 */ |
|
30 NONSHARABLE_CLASS( CMRSystemNotifier ) : public CBase |
|
31 { |
|
32 public: // Contstruction and destruction |
|
33 /** |
|
34 * Creates and initialzes new CMRSystemNotifier object. |
|
35 * Ownership is transferred to caller. |
|
36 * @param aEventQueue Reference to event queue |
|
37 */ |
|
38 static CMRSystemNotifier* NewL( |
|
39 CESMRFieldEventQueue& aEventQueue ); |
|
40 |
|
41 /** |
|
42 * C++ destructor |
|
43 */ |
|
44 ~CMRSystemNotifier(); |
|
45 |
|
46 /** |
|
47 * Starts system notifier |
|
48 */ |
|
49 void StartL(); |
|
50 |
|
51 /** |
|
52 * Stops system notifier |
|
53 */ |
|
54 void Stop(); |
|
55 |
|
56 private: // Implementation |
|
57 CMRSystemNotifier( CESMRFieldEventQueue& aEventQueue ); |
|
58 void ConstructL(); |
|
59 static TInt EnvChangeCallbackL( TAny* aThisPtr ); |
|
60 void DoEnvChangeL(); |
|
61 |
|
62 private: // Data |
|
63 /// Own: System notifier |
|
64 CEnvironmentChangeNotifier* iSystemNotifier; |
|
65 /// Ref: Reference to event queue |
|
66 CESMRFieldEventQueue& iEventQueue; |
|
67 }; |
|
68 |
|
69 #endif // CMRSYSTEMNOTIFIER_H |