|
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: Declares dialog |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __EAPPLUGINCONFIGURATIONDLG_H__ |
|
21 #define __EAPPLUGINCONFIGURATIONDLG_H__ |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <aknselectionlist.h> |
|
26 #include <commdb.h> |
|
27 |
|
28 #include "EAPPluginList.h" |
|
29 |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CAknTitlePane; |
|
33 class CEAPPluginConfigurationModel; |
|
34 |
|
35 |
|
36 // CONSTANTS |
|
37 /** |
|
38 * Maximum length of a SSID in BYTES |
|
39 */ |
|
40 const TUint8 KMaxSSIDLength = 32; |
|
41 |
|
42 |
|
43 // CLASS DECLARATION |
|
44 /** |
|
45 * CEAPPluginConfigurationDlg dialog class |
|
46 */ |
|
47 class CEAPPluginConfigurationDlg : public CAknSelectionListDialog |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Constructor. |
|
53 * @param aButtonId Button used to close the dialog |
|
54 * @param aModel UI model. |
|
55 */ |
|
56 CEAPPluginConfigurationDlg( TInt& aButtonId, |
|
57 CEAPPluginConfigurationModel& aModel, |
|
58 const TUint32 iIapId ); |
|
59 /** |
|
60 * Create and launch dialog. |
|
61 * @param aPlugins Plugin list |
|
62 * @param aTitle Title of the dialog |
|
63 * @return The ID of the button that closed the dialog |
|
64 */ |
|
65 TInt ConstructAndRunLD( const REAPPluginList& aPlugins, |
|
66 const TDesC& aTitle ); |
|
67 |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 ~CEAPPluginConfigurationDlg(); |
|
73 |
|
74 /** |
|
75 * Handles list box events. |
|
76 * @param aListBox The originating list box. |
|
77 * @param aEventType A code for the event. |
|
78 */ |
|
79 void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); |
|
80 |
|
81 |
|
82 private: |
|
83 |
|
84 /** |
|
85 * This function is called by the dialog framework before the dialog is |
|
86 * sized and laid out. |
|
87 */ |
|
88 virtual void PreLayoutDynInitL(); |
|
89 |
|
90 |
|
91 /** |
|
92 * Handles a dialog button press for the specified button |
|
93 * @param aButtonId The ID of the button that was activated. |
|
94 * @return ETrue to validate and exit the dialog, |
|
95 * EFalse to keep the dialog active |
|
96 */ |
|
97 TBool OkToExitL( TInt aButtonId ); |
|
98 |
|
99 |
|
100 /** |
|
101 * Processes user commands. |
|
102 * @param aCommandId ID of the command to respond to. |
|
103 */ |
|
104 virtual void ProcessCommandL( TInt aCommandId ); |
|
105 |
|
106 |
|
107 /** |
|
108 * Get help context. |
|
109 * @param aContext Help context is returned here. |
|
110 */ |
|
111 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
112 |
|
113 |
|
114 /** |
|
115 * Initialize menu pane. |
|
116 * @param aResourceId Menu pane resource id. |
|
117 * @param aMenuPane Menu pane. |
|
118 */ |
|
119 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
120 |
|
121 |
|
122 /** |
|
123 * Catch offered key events. |
|
124 * @param aKeyEvent Key event |
|
125 * @param aModifiers Modifiers |
|
126 * @return EKeyWasConsumed or EKeyWasNotConsumed, appropriately. |
|
127 */ |
|
128 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
129 TEventCode aModifiers ); |
|
130 |
|
131 void SetIconsL(); |
|
132 void HandleResourceChange( TInt aType ); |
|
133 |
|
134 /** |
|
135 * @see CEikDialog |
|
136 */ |
|
137 void HandleDialogPageEventL( TInt aEventID ); |
|
138 |
|
139 void ConfigureL( TBool aQuick ); |
|
140 |
|
141 private: //data |
|
142 |
|
143 // Stores the name of the connection, to be showed as the title. |
|
144 TBuf<KMaxSSIDLength> iConnectionName; |
|
145 |
|
146 // Title pane. Not owned. |
|
147 CAknTitlePane* iTitlePane; |
|
148 |
|
149 // Pointer to the old title. Owned. |
|
150 HBufC* iOldTitleText; |
|
151 |
|
152 REAPPluginList iPlugins; |
|
153 |
|
154 TInt* iButtonId; |
|
155 |
|
156 // For base class, unused. |
|
157 TInt iDummy; |
|
158 |
|
159 // UI model. Not owned. |
|
160 CEAPPluginConfigurationModel* iModel; |
|
161 |
|
162 TUint32 iIapId; |
|
163 |
|
164 // For exiting dialog |
|
165 TBool iExiting; |
|
166 |
|
167 }; |
|
168 |
|
169 |
|
170 #endif // __EAPPLUGINCONFIGURATIONDLG_H__ |
|
171 |
|
172 // End of File |