|
1 /* |
|
2 * Copyright (c) 2001-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 the License "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 MsChapv2Notif Dialog Plugins |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 11.1.7 % |
|
20 */ |
|
21 |
|
22 #ifndef __MSCHAPV2NOTIFDLGPLUGIN_H__ |
|
23 #define __MSCHAPV2NOTIFDLGPLUGIN_H__ |
|
24 |
|
25 |
|
26 // INCLUDES |
|
27 #include <eikdialg.h> |
|
28 #include <e32std.h> |
|
29 #include <e32base.h> |
|
30 #include <cdblen.h> |
|
31 #include <eiknotapi.h> |
|
32 #include <AknForm.h> |
|
33 #include <AknQueryDialog.h> |
|
34 #include <aknPopup.h> |
|
35 |
|
36 |
|
37 // CONSTANTS |
|
38 |
|
39 // UIDs for dialogs |
|
40 |
|
41 // ID of MsChapv2 username & password dialog |
|
42 const TUid KUidMsChapv2Dialog = { 0x101f8e69 }; |
|
43 |
|
44 // Channel used for screen |
|
45 const TUid KScreenOutputChannel = { 0x00000123 }; |
|
46 |
|
47 // Number of dialogs in this plugin |
|
48 const TInt KPluginGranularity = 1; |
|
49 |
|
50 // ROM folder |
|
51 _LIT( KDriveZ, "z:" ); |
|
52 |
|
53 // RSC file name. |
|
54 _LIT( KResourceFileName, "MsChapv2NotifDlgUi.rsc" ); |
|
55 |
|
56 |
|
57 // GLOBAL FUNCTIONS |
|
58 |
|
59 /** |
|
60 * Array of connection dialog plugins. |
|
61 * @return A CArray of MEikSrvNotifierBase2 based classes. |
|
62 */ |
|
63 IMPORT_C CArrayPtr< MEikSrvNotifierBase2 >* NotifierArray(); |
|
64 |
|
65 |
|
66 // CLASS DECLARATION |
|
67 |
|
68 struct TEapMsChapv2UsernamePasswordInfo |
|
69 { |
|
70 TBool iIsIdentityQuery; |
|
71 TBool iPasswordPromptEnabled; |
|
72 TBuf16<256> iUsername; |
|
73 TBuf16<256> iPassword; |
|
74 TBuf16<256> iOldPassword; |
|
75 }; |
|
76 |
|
77 class CMsChapv2Dialog; |
|
78 |
|
79 /** |
|
80 * MsChapv2 dialog plugin class |
|
81 */ |
|
82 class CMsChapv2DialogPlugin : public CBase, |
|
83 public MEikSrvNotifierBase2 |
|
84 { |
|
85 public: |
|
86 static CMsChapv2DialogPlugin* NewL(); |
|
87 |
|
88 ~CMsChapv2DialogPlugin(); |
|
89 |
|
90 TNotifierInfo RegisterL(); |
|
91 TNotifierInfo Info() const; |
|
92 |
|
93 TPtrC8 StartL( const TDesC8& aBuffer ); |
|
94 void StartL( const TDesC8& aBuffer, TInt aReplySlot, |
|
95 const RMessagePtr2& aMessage ); |
|
96 |
|
97 TPtrC8 UpdateL( const TDesC8& aBuffer ); |
|
98 void Cancel(); |
|
99 void CompleteL( TInt aStatus ); |
|
100 void Release(); |
|
101 |
|
102 inline TDes& GetUsername(); |
|
103 inline TDes& GetPassword(); |
|
104 inline void SetOldPassword( const TDesC& aOldPwd ); |
|
105 |
|
106 protected: |
|
107 CMsChapv2DialogPlugin(); |
|
108 |
|
109 void ConstructL(); |
|
110 |
|
111 protected: |
|
112 TNotifierInfo iInfo; // Notifier info |
|
113 RMessagePtr2 iMessage; // Message |
|
114 TInt iReplySlot; // Reply slot |
|
115 TBool iCancelled; // ETrue if dialog cancelled |
|
116 |
|
117 private: |
|
118 CMsChapv2Dialog* iMSCHAPV2Dialog; |
|
119 TEapMsChapv2UsernamePasswordInfo* iDataPtr; |
|
120 TPckg<TEapMsChapv2UsernamePasswordInfo>* iDataPckgPtr; |
|
121 TInt iResource; // Resource |
|
122 }; |
|
123 |
|
124 // Include inline functions |
|
125 #include "MsChapv2NotifDlgPlugin.inl" |
|
126 |
|
127 |
|
128 #endif // __MSCHAPV2NOTIFDLGPLUGIN_H__ |
|
129 |
|
130 // End of File |