|
1 /* |
|
2 * Copyright (c) 2008 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: Declaration of VPN dialog classes. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef VPNDIALOGSHOWER_H |
|
21 #define VPNDIALOGSHOWER_H |
|
22 |
|
23 #include <AknQueryDialog.h> |
|
24 #include <aknnotewrappers.h> |
|
25 #include <avkon.rsg> |
|
26 #include <avkon.mbg> |
|
27 #include <AknWaitDialog.h> |
|
28 |
|
29 #include "vpnnotifierdefs.h" |
|
30 |
|
31 |
|
32 const TInt KMaxAcuInputLength = 50; |
|
33 const TInt KMaxAuthenticationInputLength = 32; |
|
34 |
|
35 class CVpnDialog; |
|
36 class CEikColumnListBox; |
|
37 class MVpnNotifierCallback; |
|
38 class CVpnMultiLineDialog; |
|
39 class CVpnWaitDialog; |
|
40 class CVpnInfoDialog; |
|
41 |
|
42 class CVpnDialogShower : public CBase, public MProgressDialogCallback |
|
43 { |
|
44 public: |
|
45 CVpnDialog* GetServerAddressDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
46 CVpnDialog* GetServerIdentityDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
47 CVpnMultiLineDialog* GetLegacyAuthenticationDlgL(MVpnNotifierCallback* aNotifier); |
|
48 CVpnMultiLineDialog* GetLegacyAuthenticationDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
49 CVpnDialog* GetUserIdentityDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
50 CVpnDialog* GetPolicyUpdateConfirmationDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
51 |
|
52 CVpnDialog* GetPolicyImportConfirmationDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
53 CVpnWaitDialog* GetPolicyImportProgressDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
54 CVpnWaitDialog* GetGenericProgressDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
55 CVpnDialog* GetPKCS12PasswordDlgL(MVpnNotifierCallback* aNotifier); |
|
56 CVpnDialog* GetDevLockConfirmationDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
57 CVpnInfoDialog* ShowNoteDialogL(MVpnNotifierCallback* aNotifier, TInt aTextId); |
|
58 CVpnMultiLineDialog* GetUserPwdDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
59 CVpnMultiLineDialog* GetSecurIdDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
60 CVpnMultiLineDialog* GetSecurIdNextDlgL(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
61 |
|
62 private: |
|
63 void DialogDismissedL(TInt /* aButtonId */) |
|
64 { |
|
65 }; |
|
66 TBuf<KMaxAcuInputLength> iValue1; |
|
67 TBuf<KMaxAcuInputLength> iValue2; |
|
68 }; |
|
69 |
|
70 class CVpnDialog : public CAknQueryDialog, public MVpnDialog |
|
71 { |
|
72 public: |
|
73 CVpnDialog(MVpnNotifierCallback* aNotifier); |
|
74 |
|
75 public: // From MVpnDialog |
|
76 void CancelL(); |
|
77 |
|
78 protected: |
|
79 virtual TBool AllowCancel(); |
|
80 virtual void GetOutputL(TVpnDialogOutput& aOutput, TInt aButtonId); |
|
81 |
|
82 private: |
|
83 TBool OkToExitL(TInt aButtonId); |
|
84 |
|
85 protected: |
|
86 MVpnNotifierCallback* iNotifier; |
|
87 }; |
|
88 |
|
89 class CVpnWaitDialog : public CAknWaitDialog, public MVpnDialog |
|
90 { |
|
91 public: |
|
92 CVpnWaitDialog(MVpnNotifierCallback* aNotifier); |
|
93 CVpnWaitDialog(); |
|
94 |
|
95 public: // From MVpnDialog |
|
96 void CancelL(); |
|
97 |
|
98 protected: |
|
99 virtual TBool AllowCancel(); |
|
100 virtual void GetOutputL(TVpnDialogOutput& aOutput, TInt aButtonId); |
|
101 |
|
102 private: |
|
103 TBool OkToExitL(TInt aButtonId); |
|
104 |
|
105 protected: |
|
106 MVpnNotifierCallback* iNotifier; |
|
107 }; |
|
108 |
|
109 // CVpnMultiLineDialog |
|
110 |
|
111 class CVpnMultiLineDialog : public CAknMultiLineDataQueryDialog, public MVpnDialog |
|
112 { |
|
113 public: |
|
114 // Two-phased constructor. |
|
115 static CVpnMultiLineDialog* NewL(MVpnNotifierCallback* aNotifier, TDes& aText1, TDes& aText2, TTone aTone = ENoTone); |
|
116 |
|
117 protected: |
|
118 //Construction and destruction |
|
119 //use NewL |
|
120 CVpnMultiLineDialog(MVpnNotifierCallback* aNotifier, const TTone& aTone); |
|
121 |
|
122 public: // From MVpnDialog |
|
123 void CancelL(); |
|
124 |
|
125 protected: |
|
126 virtual TBool AllowCancel(); |
|
127 virtual void GetOutputL(TVpnDialogOutput& aOutput, TInt aButtonId); |
|
128 |
|
129 private: |
|
130 TBool OkToExitL(TInt aButtonId); |
|
131 |
|
132 protected: |
|
133 MVpnNotifierCallback* iNotifier; |
|
134 }; |
|
135 |
|
136 // CVpnInfoDialog |
|
137 |
|
138 class CVpnInfoDialog : public CAknInformationNote, public MVpnDialog |
|
139 { |
|
140 public: |
|
141 CVpnInfoDialog(MVpnNotifierCallback* aNotifier); |
|
142 |
|
143 ~CVpnInfoDialog(); |
|
144 public: // From MVpnDialog |
|
145 void CancelL(); |
|
146 |
|
147 protected: |
|
148 virtual TBool AllowCancel(); |
|
149 virtual void GetOutputL(TVpnDialogOutput& aOutput, TInt aButtonId); |
|
150 |
|
151 private: |
|
152 TBool OkToExitL(TInt aButtonId); |
|
153 |
|
154 protected: |
|
155 MVpnNotifierCallback* iNotifier; |
|
156 }; |
|
157 |
|
158 |
|
159 class CPKCS12PasswordDlg: public CVpnDialog |
|
160 { |
|
161 public: |
|
162 CPKCS12PasswordDlg(MVpnNotifierCallback* aNotifier); |
|
163 private: |
|
164 void GetOutputL(TVpnDialogOutput& aOutput, TInt aButtonId); |
|
165 }; |
|
166 |
|
167 |
|
168 /** |
|
169 * A dialog for asking the user identity for a certificate (request). |
|
170 * Currently used only by the extended VPN Manager in T3. Located here |
|
171 * at least for now. |
|
172 */ |
|
173 class CVpnUserIdentityDlg : public CVpnDialog |
|
174 { |
|
175 public: |
|
176 CVpnUserIdentityDlg(MVpnNotifierCallback* aNotifier, const TDesC8& aInput); |
|
177 void PreLayoutDynInitL(); |
|
178 private: |
|
179 void GetOutputL(TVpnDialogOutput& aOutput, TInt aButtonId); |
|
180 private: |
|
181 TPtrC8 iInput; |
|
182 }; |
|
183 |
|
184 class CKmdDlg : public CVpnMultiLineDialog |
|
185 { |
|
186 public: |
|
187 // NewL |
|
188 static CKmdDlg* NewL(MVpnNotifierCallback* aNotifier, TDes& aText1, TDes& aText2, TTone aTone = ENoTone); |
|
189 static CKmdDlg* NewL(MVpnNotifierCallback* aNotifier, TDes& aText1, TDes& aText2, const TDesC8& aInput, TTone aTone = ENoTone); |
|
190 protected: |
|
191 //Construction and destruction |
|
192 CKmdDlg(MVpnNotifierCallback* aNotifier, const TTone& aTone); |
|
193 CKmdDlg(MVpnNotifierCallback* aNotifier, const TDesC8& aInput, const TTone& aTone); |
|
194 private: |
|
195 |
|
196 void PreLayoutDynInitL(); |
|
197 void SetInitialCurrentLine(); |
|
198 // From CVpnMultiLineDialog |
|
199 void GetOutputL(TVpnDialogOutput& aOutput, TInt aButtonId); |
|
200 |
|
201 private: // Data |
|
202 TPtrC8 iInput; |
|
203 }; |
|
204 |
|
205 |
|
206 #endif // VPNDIALOGSHOWER_H |