1 /* |
|
2 * Copyright (c) 2002-2005 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: Monitor of SIM card removal |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSATSIMREMOVALMONITOR_H |
|
20 #define CSATSIMREMOVALMONITOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "MSatSystemStateObserver.h" |
|
24 #include "CSatEventMonitorHandler.h" |
|
25 |
|
26 // FORWARD DECLARATION |
|
27 class MSatSystemStateChangeNotifier; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Monitors SIM removal state and informs SAT Engine if SIM gets removed. |
|
33 * |
|
34 * @lib EventMonitors.lib |
|
35 * @since Series 60 3.0 |
|
36 */ |
|
37 class CSatSimRemovalMonitor : public CSatEventMonitorHandler, |
|
38 public MSatSystemStateObserver |
|
39 { |
|
40 public: // Constructor and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @param aUtils Interface for Event monitor utils |
|
45 */ |
|
46 static CSatSimRemovalMonitor* NewL( |
|
47 MSatEventMonitorUtils& aUtils ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CSatSimRemovalMonitor(); |
|
53 |
|
54 public: // From base class |
|
55 |
|
56 /** |
|
57 * From CSatEventMonitorHandler Cancels event monitoring |
|
58 */ |
|
59 void DoCancelMonitor(); |
|
60 |
|
61 /** |
|
62 * From MSatSystemStateObserver Notifies that system state changed. |
|
63 */ |
|
64 void StateChanged(); |
|
65 |
|
66 protected: // New functions |
|
67 |
|
68 /** |
|
69 * From CSatEventMonitorHandler Starts event monitoring |
|
70 * @return Error code indicating the status of starting the monitor |
|
71 */ |
|
72 TInt StartMonitor(); |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * C++ default constructor. |
|
78 * @param aUtils Interface for Event monitor utils |
|
79 */ |
|
80 CSatSimRemovalMonitor( MSatEventMonitorUtils& aUtils ); |
|
81 |
|
82 /** |
|
83 * By default Symbian 2nd phase constructor is private. |
|
84 */ |
|
85 void ConstructL(); |
|
86 |
|
87 private: // Data |
|
88 |
|
89 // P&S change notifier |
|
90 MSatSystemStateChangeNotifier* iPSNotifier; |
|
91 |
|
92 }; |
|
93 |
|
94 #endif // CSATSIMREMOVALMONITOR_H |
|
95 |
|
96 // End of File |
|