50
|
1 |
/*
|
|
2 |
* ============================================================================
|
|
3 |
* Name : SimLockUIAppUI.h
|
|
4 |
* Part of : Sim Lock UI Application
|
|
5 |
* Description : SimLock UI Application UI Header
|
|
6 |
* Version :
|
|
7 |
*
|
|
8 |
* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
9 |
* All rights reserved.
|
|
10 |
* This component and the accompanying materials are made available
|
|
11 |
* under the terms of "Eclipse Public License v1.0"
|
|
12 |
* which accompanies this distribution, and is available
|
|
13 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
14 |
*
|
|
15 |
* Initial Contributors:
|
|
16 |
* Nokia Corporation - initial contribution.
|
|
17 |
*
|
|
18 |
* Contributors:
|
|
19 |
*
|
|
20 |
* Description: Build info file for Ado domain appinstall
|
|
21 |
* ============================================================================
|
|
22 |
*/
|
|
23 |
|
|
24 |
#ifndef __SIMLOCKUI_APPUI_H__
|
|
25 |
#define __SIMLOCKUI_APPUI_H__
|
|
26 |
|
|
27 |
// System includes
|
|
28 |
#include <aknappui.h>
|
|
29 |
#include <aknnotedialog.h> // CAknNoteDialog::TTone
|
|
30 |
#include <e32property.h> // RProperty.
|
|
31 |
|
|
32 |
|
|
33 |
// FORWARD DECLARATIONS
|
|
34 |
class RProperty;
|
|
35 |
// User includes
|
|
36 |
#include "simlockuibackgroundcontrol.h" // CSimLockUIBackgroundControl::TBackgroundText
|
|
37 |
|
|
38 |
// Forward reference
|
|
39 |
class CSimLockUIBackgroundControl;
|
|
40 |
class CSimLockDataHandlingDelegate;
|
|
41 |
class CAknInformationNote;
|
|
42 |
class CSimLockTelephonyProxy;
|
|
43 |
|
|
44 |
//const TUid KSimLockProperty={0x2000B0FC};
|
|
45 |
/**
|
|
46 |
* CSimLockUIAppUi
|
|
47 |
*
|
|
48 |
* An instance of class CSimLockUIAppUi is the UserInterface part of the AVKON
|
|
49 |
* application framework for the SimLockUI example application
|
|
50 |
*
|
|
51 |
* @lib avkon.lib
|
|
52 |
* @lib eikcore.lib
|
|
53 |
* @lib eiksrv.lib
|
|
54 |
*/
|
|
55 |
class CSimLockUIAppUi : public CAknAppUi
|
|
56 |
{
|
|
57 |
public: // Constructor/Destructor
|
|
58 |
|
|
59 |
/**
|
|
60 |
* CSimLockUIAppUi
|
|
61 |
* Perform the first phase of two phase construction.
|
|
62 |
* This needs to be public due to the way the framework constructs the AppUi
|
|
63 |
*
|
|
64 |
* @param aSimLockDelegate Sim Lock UI Delegate (ownership not transferred)
|
|
65 |
*/
|
|
66 |
CSimLockUIAppUi( CSimLockDataHandlingDelegate& aSimLockDelegate );
|
|
67 |
|
|
68 |
/**
|
|
69 |
* ConstructL
|
|
70 |
* Perform the second phase construction of a CSimLockUIAppUi object
|
|
71 |
* this needs to be public due to the way the framework constructs the AppUi
|
|
72 |
*/
|
|
73 |
void ConstructL();
|
|
74 |
|
|
75 |
/**
|
|
76 |
* ~CSimLockUIAppUi
|
|
77 |
* Destroy the object and release all memory objects
|
|
78 |
*/
|
|
79 |
virtual ~CSimLockUIAppUi();
|
|
80 |
|
|
81 |
private: // Private Data Type(s)
|
|
82 |
|
|
83 |
/**
|
|
84 |
* Indicate which background text to use
|
|
85 |
*/
|
|
86 |
enum TBackgroundText
|
|
87 |
{
|
|
88 |
EBackgroundTextEmpty,
|
|
89 |
EBackgroundTextMain,
|
|
90 |
EBackgroundTextUnlockComplete,
|
|
91 |
EBackgroundTextUnlockFailed,
|
|
92 |
EBackgroundTextUnlockIncorrect
|
|
93 |
};
|
|
94 |
|
|
95 |
private: // from CAknAppUi
|
|
96 |
/**
|
|
97 |
* @see CAknAppUi::HandleCommandL
|
|
98 |
*/
|
|
99 |
virtual void HandleCommandL( TInt aCommand );
|
|
100 |
|
|
101 |
/**
|
|
102 |
* @see CAknAppUi::HandleForegroundEventL
|
|
103 |
*/
|
|
104 |
virtual void HandleForegroundEventL( TBool aForeground );
|
|
105 |
|
|
106 |
private: // Private Function Declarations
|
|
107 |
|
|
108 |
/**
|
|
109 |
* ProcessSimUnlockDialogsL
|
|
110 |
* Process the series of dialogs that control the Sim Unlock process
|
|
111 |
*
|
|
112 |
* @return Indicates whether or not application flow should continue
|
|
113 |
*/
|
|
114 |
TBool ProcessSimUnlockDialogsL();
|
|
115 |
|
|
116 |
/**
|
|
117 |
* CreateBackgroundControlL
|
|
118 |
* Create the background control for SimLock UI. Background contains the default
|
|
119 |
* background image for the current skin and text indicating to the user the
|
|
120 |
* current stage in the unlock process.
|
|
121 |
*
|
|
122 |
*/
|
|
123 |
void CreateBackgroundControlL();
|
|
124 |
|
|
125 |
/**
|
|
126 |
* CheckLockStateL
|
|
127 |
* Check the state of the lock and display a dialog if it is either
|
|
128 |
* unlocked or there are no lock attempts remaining.
|
|
129 |
*
|
|
130 |
* @return Indicates whether or not application flow should continue
|
|
131 |
*/
|
|
132 |
TBool CheckLockStateL() const;
|
|
133 |
|
|
134 |
/**
|
|
135 |
* DisplayIntroductionDialogL
|
|
136 |
* Display introduction dialog
|
|
137 |
*
|
|
138 |
* @return Indicates whether or not application flow should continue
|
|
139 |
*/
|
|
140 |
TBool DisplayIntroductionDialogL();
|
|
141 |
|
|
142 |
/**
|
|
143 |
* PromptForPasswordL
|
|
144 |
* Handle scenario where unlock attempt failed. Prompt user about whether or
|
|
145 |
* not to continue
|
|
146 |
*
|
|
147 |
* @param aPassword Descriptor to receive password
|
|
148 |
* @return Indicates whether or not application flow should continue
|
|
149 |
*/
|
|
150 |
TBool PromptForPasswordL( TDes& aPassword );
|
|
151 |
|
|
152 |
/**
|
|
153 |
* CompletePromptForPasswordL
|
|
154 |
* Ask for second password and check for call in progress
|
|
155 |
*
|
|
156 |
* @param aPassword original password entered
|
|
157 |
* @param aNewPassword Descriptor where 2nd password is to be inserted
|
|
158 |
* @return Indicates whether or not application flow should continue
|
|
159 |
*/
|
|
160 |
TBool CompletePromptForPasswordL( const TDesC& aPassword, TDes& aNewPassword );
|
|
161 |
|
|
162 |
/**
|
|
163 |
* AttemptToUnlockSimL
|
|
164 |
* Ask for second password and check for call in progress
|
|
165 |
*
|
|
166 |
* @param aPassword the Sim Lock password
|
|
167 |
* @return Indicates whether or not application flow should continue
|
|
168 |
*/
|
|
169 |
TBool AttemptToUnlockSimL( const TDesC& aPassword );
|
|
170 |
|
|
171 |
/**
|
|
172 |
* HandleUnlockFailedL
|
|
173 |
* Handle scenario where unlock attempt failed. Prompt user about whether or
|
|
174 |
* not to continue
|
|
175 |
*
|
|
176 |
* @return Indicates whether or not application flow should continue
|
|
177 |
*/
|
|
178 |
TBool HandleUnlockFailedL();
|
|
179 |
|
|
180 |
/**
|
|
181 |
/**
|
|
182 |
* ShowInformationNoteL
|
|
183 |
* Show an information note
|
|
184 |
*
|
|
185 |
* @param aResourceId indicates what resource is displayed
|
|
186 |
* @return Indicates whether or not application flow should continue
|
|
187 |
*/
|
|
188 |
TInt ShowInformationNoteL( TInt aResourceId ) const;
|
|
189 |
|
|
190 |
/**
|
|
191 |
* SetBackgroundText
|
|
192 |
* Change text in background control
|
|
193 |
*
|
|
194 |
* @param aText indicates type of text
|
|
195 |
*/
|
|
196 |
void SetBackgroundTextL( TBackgroundText aText );
|
|
197 |
|
|
198 |
private: // Private Member Data
|
|
199 |
|
|
200 |
/**
|
|
201 |
* Control that contains SimLock UI background
|
|
202 |
* owns
|
|
203 |
*/
|
|
204 |
CSimLockUIBackgroundControl* iBackgroundControl;
|
|
205 |
|
|
206 |
/**
|
|
207 |
* Pointer to "delegate" class that is responsible for non-UI functions related
|
|
208 |
* to the phone and SimLock.
|
|
209 |
*/
|
|
210 |
CSimLockDataHandlingDelegate& iSimLockDelegate;
|
|
211 |
|
|
212 |
/**
|
|
213 |
* For foreground event handling, indicate first time run
|
|
214 |
*/
|
|
215 |
TBool iFirstRun;
|
|
216 |
|
|
217 |
/**
|
|
218 |
* Proxy used to talk to CTelephony in a synchronous fashion
|
|
219 |
* owns
|
|
220 |
*/
|
|
221 |
CSimLockTelephonyProxy* iTelephonyProxy;
|
|
222 |
|
|
223 |
//RProperty for publish key
|
|
224 |
RProperty iProperty;
|
|
225 |
|
|
226 |
};
|
|
227 |
|
|
228 |
|
|
229 |
#endif // __SIMLOCKUI_APPUI_H__
|
|
230 |
|
|
231 |
// End of file.
|