|
1 /* |
|
2 * Copyright (c) 2002-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: Sim monitoring class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CNWNETWORKSYSTEMEVENTMONITOR_H |
|
21 #define __CNWNETWORKSYSTEMEVENTMONITOR_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 #include "NetworkHandlingDomainPSKeys.h" |
|
28 #include <PSVariables.h> |
|
29 |
|
30 // CONSTANTS |
|
31 // None. |
|
32 |
|
33 // MACROS |
|
34 // None. |
|
35 |
|
36 // DATA TYPES |
|
37 // None. |
|
38 |
|
39 // FUNCTION PROTOTYPES |
|
40 // None. |
|
41 |
|
42 // FORWARD DECLARATIONS |
|
43 // None. |
|
44 |
|
45 // CLASS DECLARATION |
|
46 class CNWNetworkViagBaseEngine; |
|
47 |
|
48 /** |
|
49 * This class monitors Sim state changes from System Agent. |
|
50 * |
|
51 * @lib ?library |
|
52 * @since ?Series60_version |
|
53 */ |
|
54 class CNWNetworkSystemEventMonitor : public CActive |
|
55 { |
|
56 |
|
57 public: // Constructors and destructor |
|
58 |
|
59 /** |
|
60 * Two-phased constructor. |
|
61 */ |
|
62 static CNWNetworkSystemEventMonitor* NewL( |
|
63 CNWNetworkViagBaseEngine& aBase, |
|
64 TUid aUid, |
|
65 TInt aStatusValue ); |
|
66 |
|
67 |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 virtual ~CNWNetworkSystemEventMonitor(); |
|
73 |
|
74 public: // New functions |
|
75 |
|
76 /** |
|
77 * Starts monitoring |
|
78 * |
|
79 */ |
|
80 void Start( ); |
|
81 |
|
82 private: // Constructors |
|
83 |
|
84 /** |
|
85 * C++ default constructor. |
|
86 */ |
|
87 CNWNetworkSystemEventMonitor( |
|
88 CNWNetworkViagBaseEngine& aBase,TUid aUid, TInt aStatusValue ); |
|
89 /** |
|
90 * By default EPOC constructor is private. |
|
91 */ |
|
92 void ConstructL( ); |
|
93 |
|
94 |
|
95 private: // From CActive |
|
96 /** |
|
97 * Implements cancellation of an outstanding request. |
|
98 */ |
|
99 void DoCancel(); |
|
100 |
|
101 /** |
|
102 * Handles request completion event. |
|
103 */ |
|
104 void RunL(); |
|
105 |
|
106 private: // Data |
|
107 CNWNetworkViagBaseEngine& iBase; |
|
108 |
|
109 // Used in RunL to get Sim state in startup |
|
110 TBool iStartUp; |
|
111 RProperty iProperty; |
|
112 TInt iState; |
|
113 TUid iUid; |
|
114 |
|
115 TInt iStatusValue; |
|
116 }; |
|
117 |
|
118 #endif // __CNWNetworkSystemEventMonitor_H |
|
119 // End of File |
|
120 |