1 /* |
|
2 * ============================================================================ |
|
3 * Name : SimLockDataHandlingDelegate.h |
|
4 * Part of : Sim Lock UI Application |
|
5 * Description : Handles reading and writing of Sim Lock data including |
|
6 unlocking the Sim Lock. |
|
7 * Version : |
|
8 * |
|
9 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
10 * All rights reserved. |
|
11 * This component and the accompanying materials are made available |
|
12 * under the terms of "Eclipse Public License v1.0" |
|
13 * which accompanies this distribution, and is available |
|
14 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
15 * |
|
16 * Initial Contributors: |
|
17 * Nokia Corporation - initial contribution. |
|
18 * |
|
19 * Contributors: |
|
20 * |
|
21 * Description: Build info file for Ado domain appinstall |
|
22 * ============================================================================ |
|
23 */ |
|
24 |
|
25 #ifndef SIMLOCKDATAHANDLINGDELEGATE_H |
|
26 #define SIMLOCKDATAHANDLINGDELEGATE_H |
|
27 |
|
28 // System Includes |
|
29 #include <e32base.h> |
|
30 |
|
31 // Forward Declarations |
|
32 class RMmCustomAPI; |
|
33 struct TSimPathStr; |
|
34 struct TSimLockHeadStr; |
|
35 class CActiveSchedulerWait; |
|
36 class TIsiReceiveC; |
|
37 class CPeriodic; |
|
38 |
|
39 /** |
|
40 * CSimLockDataHandlingDelegate |
|
41 * |
|
42 * Delegate class to handle communication with lower layers of S60 and Symbian, |
|
43 * and also the native( ISA ) layer. |
|
44 * |
|
45 * @lib euser.lib |
|
46 * @lib iscapi.lib |
|
47 * @lib isimessage.lib |
|
48 * @lib etel.lib |
|
49 * @lib etelmm.lib |
|
50 * @lib customapi.lib |
|
51 */ |
|
52 class CSimLockDataHandlingDelegate : public CActive |
|
53 { |
|
54 public: // Public Constructor / Destructor |
|
55 |
|
56 /** |
|
57 * Two-phased constructor |
|
58 * |
|
59 */ |
|
60 static CSimLockDataHandlingDelegate* NewL( RMmCustomAPI& aCustomAPI ); |
|
61 |
|
62 /** |
|
63 * Destructor |
|
64 * |
|
65 */ |
|
66 virtual ~CSimLockDataHandlingDelegate(); |
|
67 |
|
68 public: // Public API |
|
69 |
|
70 /** |
|
71 * Open the Sim Lock( type 1 ) given a passcode. |
|
72 * |
|
73 * @param aPassword TDesC of the password to open lock |
|
74 * @return Indicates the result of the Sim Lock open attempt |
|
75 */ |
|
76 TInt OpenSimLock( const TDesC& aPassword ); |
|
77 |
|
78 /** |
|
79 * Determine if the Sim Lock is open. |
|
80 * |
|
81 * @return Indicates if Sim Lock is open |
|
82 */ |
|
83 TBool IsSimLockOpen() const; |
|
84 |
|
85 |
|
86 private: // Private Constructors |
|
87 |
|
88 /** |
|
89 * C++ constructor. |
|
90 * |
|
91 * @param aCustomAPI ETel custom API object |
|
92 */ |
|
93 CSimLockDataHandlingDelegate( RMmCustomAPI& aCustomAPI ); |
|
94 |
|
95 /** |
|
96 * Symbian OS default constructor. |
|
97 */ |
|
98 void ConstructL(); |
|
99 |
|
100 |
|
101 private: // From CActive |
|
102 |
|
103 /** |
|
104 * Active object run method |
|
105 * @see CActive |
|
106 */ |
|
107 virtual void RunL(); |
|
108 |
|
109 /** |
|
110 * Active object cancel method |
|
111 * @see CActive |
|
112 */ |
|
113 virtual void DoCancel(); |
|
114 |
|
115 private: // Local Member API |
|
116 |
|
117 /** |
|
118 * CPeriodic Callback function for elapsed timer |
|
119 * |
|
120 * @param aUnused requred for interface |
|
121 * @return required but unused |
|
122 */ |
|
123 static TInt TimerElapsed(TAny* aUnused); |
|
124 |
|
125 /** |
|
126 * Pause execution and allow active scheduler to run until the current outstanding |
|
127 * request complets |
|
128 * |
|
129 */ |
|
130 void CompleteRequestWithTimeout(); |
|
131 |
|
132 private: // Member Data |
|
133 /** |
|
134 * Indicates if the Sim Lock is open per the last read from the Sim Lock |
|
135 * server. |
|
136 */ |
|
137 TBool iLockIsOpen; |
|
138 |
|
139 /** |
|
140 * Handle to ETel MultiMode Custom API server |
|
141 */ |
|
142 RMmCustomAPI& iCustomAPI; |
|
143 |
|
144 /** |
|
145 * Help with asynchronous requests |
|
146 */ |
|
147 CActiveSchedulerWait* iSchedulerWait; |
|
148 |
|
149 /** |
|
150 * Indicates that Sim Lock data has been read |
|
151 */ |
|
152 TBool iDataHasBeenRead; |
|
153 |
|
154 /** |
|
155 * Timeout handling timer |
|
156 * owns |
|
157 */ |
|
158 CPeriodic* iTimer; |
|
159 |
|
160 }; |
|
161 |
|
162 #endif //SIMLOCKDATAHANDLINGDELEGATE_H |
|
163 |
|
164 // End of File |
|
165 |
|