|
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 PAP Notif Dialog Plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __PAPNOTIFDLGPLUGIN_H__ |
|
21 #define __PAPNOTIFDLGPLUGIN_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 #include <EapTtlsPapNotifierStruct.h> |
|
34 |
|
35 |
|
36 // CONSTANTS |
|
37 |
|
38 // UIDs for dialogs |
|
39 |
|
40 // ID of PAP username & password dialog |
|
41 const TUid KUidPapDialog = { 0x200159A9 }; |
|
42 |
|
43 // Channel used for screen |
|
44 const TUid KScreenOutputChannel = { 0x00000123 }; |
|
45 |
|
46 // Number of dialogs in this plugin |
|
47 const TInt KPluginGranularity = 1; |
|
48 |
|
49 // ROM folder |
|
50 _LIT( KDriveZ, "z:" ); |
|
51 |
|
52 // RSC file name. |
|
53 _LIT( KResourceFileName, "papnotifdlgui.rsc" ); |
|
54 |
|
55 |
|
56 // GLOBAL FUNCTIONS |
|
57 |
|
58 /** |
|
59 * Array of connection dialog plugins. |
|
60 * @return A CArray of MEikSrvNotifierBase2 based classes. |
|
61 */ |
|
62 IMPORT_C CArrayPtr< MEikSrvNotifierBase2 >* NotifierArray(); |
|
63 |
|
64 |
|
65 // CLASS DECLARATION |
|
66 |
|
67 class CPapAuthDialog; |
|
68 class CPapChallengeMsgDialog; |
|
69 class CPapChallengeReplyDialog; |
|
70 |
|
71 /** |
|
72 * PAP notifier dialog plugin class |
|
73 */ |
|
74 class CPapNotifDialogPlugin : public CBase, |
|
75 public MEikSrvNotifierBase2 |
|
76 { |
|
77 public: |
|
78 static CPapNotifDialogPlugin* NewL(); |
|
79 |
|
80 ~CPapNotifDialogPlugin(); |
|
81 |
|
82 TNotifierInfo RegisterL(); |
|
83 TNotifierInfo Info() const; |
|
84 |
|
85 TPtrC8 StartL( const TDesC8& aBuffer ); |
|
86 void StartL( const TDesC8& aBuffer, TInt aReplySlot, |
|
87 const RMessagePtr2& aMessage ); |
|
88 |
|
89 TPtrC8 UpdateL( const TDesC8& aBuffer ); |
|
90 void Cancel(); |
|
91 void CompleteL( TInt aStatus ); |
|
92 void Release(); |
|
93 |
|
94 public: // new |
|
95 |
|
96 TDes& Username(); |
|
97 TDes& Password(); |
|
98 |
|
99 void SetAuthDlgDismissed(); |
|
100 void SetChallengeMsgDismissed(); |
|
101 void SetChallengeReplyDismissed(); |
|
102 |
|
103 protected: |
|
104 CPapNotifDialogPlugin(); |
|
105 |
|
106 void ConstructL(); |
|
107 |
|
108 protected: |
|
109 TNotifierInfo iInfo; // Notifier info |
|
110 RMessagePtr2 iMessage; // Message |
|
111 TInt iReplySlot; // Reply slot |
|
112 TBool iCancelled; // ETrue if dialog cancelled |
|
113 |
|
114 private: |
|
115 |
|
116 TInt iResource; // Resource |
|
117 |
|
118 TPapUiNotifierInfo* iDataPtr; |
|
119 TPckg<TPapUiNotifierInfo>* iDataPckgPtr; |
|
120 |
|
121 CPapAuthDialog* iPapAuthDialog; |
|
122 CPapChallengeMsgDialog* iPapChallengeMsgDialog; |
|
123 CPapChallengeReplyDialog*iPapChallengeReplyDialog; |
|
124 |
|
125 TUint iChallengeSize; |
|
126 |
|
127 TBool iAuthDlgDismissed; |
|
128 TBool iChallengeMsgDismissed; |
|
129 TBool iChallengeReplyDismissed; |
|
130 |
|
131 }; |
|
132 |
|
133 |
|
134 #endif // __PAPNOTIFDLGPLUGIN_H__ |
|
135 |
|
136 // End of File |