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