|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Provides api for changing security settings. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef __CSECUISECURITYSETTINGS_H |
|
22 #define __CSECUISECURITYSETTINGS_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <etelmm.h> |
|
26 #include <rmmcustomapi.h> |
|
27 #include <aknnotedialog.h> |
|
28 |
|
29 |
|
30 class CWait; |
|
31 class CSecurityHandler; |
|
32 |
|
33 // CLASS DEFINITIONS |
|
34 class CSecuritySettings : public CBase |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Creates instance of the CSecuritySettings class. |
|
39 * |
|
40 * @return Returns the instance just created. |
|
41 */ |
|
42 IMPORT_C static CSecuritySettings* NewL(); |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 IMPORT_C ~CSecuritySettings(); |
|
47 /** |
|
48 * C++ default constructor. |
|
49 */ |
|
50 IMPORT_C CSecuritySettings(); |
|
51 /** |
|
52 * Symbian OS constructor. |
|
53 */ |
|
54 IMPORT_C void ConstructL(); |
|
55 public: |
|
56 /** |
|
57 * Launches dialogs for changing pin code |
|
58 */ |
|
59 IMPORT_C void ChangePinL(); |
|
60 /** |
|
61 * Launches dialogs for changing upin code |
|
62 */ |
|
63 IMPORT_C void ChangeUPinL(); |
|
64 /** |
|
65 * Launches dialogs for changing pin2 code |
|
66 */ |
|
67 IMPORT_C void ChangePin2L(); |
|
68 /** |
|
69 * Launches dialogs for changing security code |
|
70 */ |
|
71 IMPORT_C void ChangeSecCodeL(); |
|
72 /** |
|
73 * Launches dialogs for changing autolock period |
|
74 * |
|
75 * @param aPeriod TInt (old autolock value) |
|
76 * @return TInt (new autolock value) |
|
77 */ |
|
78 IMPORT_C TInt ChangeAutoLockPeriodL(TInt aPeriod); |
|
79 /** |
|
80 * Launches dialogs for changing sim change security setting |
|
81 * |
|
82 * @return ETrue: successful |
|
83 * EFalse: user cancelled |
|
84 */ |
|
85 IMPORT_C TBool ChangeSimSecurityL(); |
|
86 /** |
|
87 * Launches dialogs for changing pin request setting |
|
88 * |
|
89 * @return ETrue: successful |
|
90 * EFalse: user cancelled |
|
91 */ |
|
92 IMPORT_C TBool ChangePinRequestL(); |
|
93 /** |
|
94 * Launches dialogs for changing upin request setting |
|
95 * |
|
96 * @return ETrue: successful |
|
97 * EFalse: user cancelled |
|
98 */ |
|
99 IMPORT_C TBool ChangeUPinRequestL(); |
|
100 /** |
|
101 * Launches dialogs for changing code in use setting |
|
102 * |
|
103 * @return ETrue: successful |
|
104 * EFalse: user cancelled |
|
105 */ |
|
106 IMPORT_C TBool SwitchPinCodesL(); |
|
107 /** |
|
108 * Is aLockType lock on or off |
|
109 * |
|
110 * @param aLockType RAdvGsmPhone::TLockType |
|
111 * @return ETrue: lock is on |
|
112 * EFalse: lock is off |
|
113 */ |
|
114 IMPORT_C TBool IsLockEnabledL(RMobilePhone::TMobilePhoneLock aLockType); |
|
115 /** |
|
116 * Launches dialogs for fixed dialing settings |
|
117 */ |
|
118 IMPORT_C void SetFdnModeL(); |
|
119 /** |
|
120 * Gets current fixed dialing mode |
|
121 * |
|
122 * @param aFdnMode RMobilePhone::TMobilePhoneFdnStatus& (fixed dialing mode) |
|
123 * @return TInt: KErrNone (succesful) |
|
124 */ |
|
125 IMPORT_C TInt GetFdnMode(RMobilePhone::TMobilePhoneFdnStatus& aFdnMode); |
|
126 /** |
|
127 * Asks and verifies the security code. |
|
128 * |
|
129 * @return ETrue: code was accepted |
|
130 * EFalse: user canceled the code query |
|
131 */ |
|
132 IMPORT_C TBool AskSecCodeL(); |
|
133 /** |
|
134 * Asks and verifies the pin2 code. |
|
135 * |
|
136 * @return ETrue: code was accepted |
|
137 * EFalse: user canceled the code query |
|
138 */ |
|
139 IMPORT_C TBool AskPin2L(); |
|
140 /** |
|
141 * Checks whether UPIN code is supported. |
|
142 * |
|
143 * @return ETrue: UPIN code is supported. |
|
144 * EFalse: UPIN code is not supported. |
|
145 */ |
|
146 IMPORT_C TBool IsUpinSupportedL(); |
|
147 /** |
|
148 * Checks whether a code is blocked. |
|
149 * |
|
150 * @return ETrue: code is blocked. |
|
151 * EFalse: code is not blocked. |
|
152 */ |
|
153 IMPORT_C TBool IsUpinBlocked(); |
|
154 /** |
|
155 * Checks whether a code is blocked. |
|
156 * |
|
157 * @return ETrue: Upin is active. |
|
158 * EFalse: Upin is not active. |
|
159 */ |
|
160 IMPORT_C TBool IsUpinActive(); |
|
161 /** |
|
162 * Shows error note |
|
163 * |
|
164 * @return Void |
|
165 */ |
|
166 static void ShowErrorNoteL(TInt aError); |
|
167 /** |
|
168 * Shows error note |
|
169 * |
|
170 * @return Void |
|
171 */ |
|
172 static void ShowResultNoteL(TInt aResourceID, CAknNoteDialog::TTone aTone); |
|
173 |
|
174 IMPORT_C TInt ChangeRemoteLockStatusL( TBool& aRemoteLockStatus, TDes& aRemoteLockCode, TInt aAutoLockPeriod ); |
|
175 |
|
176 TInt RemoteLockCodeQueryL( TDes& aRemoteLockCode ); |
|
177 |
|
178 private: |
|
179 |
|
180 TInt RemoteLockSetLockSettingL( TBool aLockSetting ); |
|
181 |
|
182 private: // DATA |
|
183 TBool iPuk1; |
|
184 TBool iPuk2; |
|
185 |
|
186 /***************************************************** |
|
187 * Series 60 Customer / ETel |
|
188 * Series 60 ETel API |
|
189 *****************************************************/ |
|
190 RTelServer iServer; |
|
191 RMobilePhone iPhone; |
|
192 RMmCustomAPI iCustomPhone; |
|
193 CWait* iWait; |
|
194 CSecurityHandler* iSecurityHandler; |
|
195 }; |
|
196 |
|
197 |
|
198 #endif |
|
199 |
|
200 // End of file |