|
1 /* |
|
2 * Copyright (c) 2007-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: Declarition of CAcpQueryContainer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef ACPQUERYCONTAINER_H |
|
20 #define ACPQUERYCONTAINER_H |
|
21 |
|
22 #include <coecntrl.h> |
|
23 |
|
24 #include "accountcreationpluginconstants.h" |
|
25 |
|
26 class CAcpController; |
|
27 class CAknSettingStyleListBox; |
|
28 |
|
29 /** |
|
30 * CAcpQueryContainer class |
|
31 * Declarition of CAcpQueryContainer. |
|
32 * |
|
33 * @lib accountcreationplugin.lib |
|
34 * @since S60 v3.2 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CAcpQueryContainer ) : public CCoeControl |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 * |
|
43 * @param aRect Rectangle. |
|
44 */ |
|
45 static CAcpQueryContainer* NewL( const TRect& aRect ); |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * |
|
50 * @param aRect Rectangle. |
|
51 */ |
|
52 static CAcpQueryContainer* NewLC( const TRect& aRect ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CAcpQueryContainer(); |
|
58 |
|
59 /** |
|
60 * Returns handle to the listbox. |
|
61 * |
|
62 * @since S60 v3.2 |
|
63 * @return Handle to the listbox. |
|
64 */ |
|
65 CAknSettingStyleListBox* ListBox(); |
|
66 |
|
67 /** |
|
68 * Returns index of selected listbox item. |
|
69 * |
|
70 * @since S60 v3.2 |
|
71 * @return Index of selected listbox item. |
|
72 */ |
|
73 TInt CurrentItemIndex() const; |
|
74 |
|
75 /** |
|
76 * Shows username setting page. |
|
77 * |
|
78 * @since S60 v3.2 |
|
79 */ |
|
80 void ShowUsernameSettingPageL(); |
|
81 |
|
82 /** |
|
83 * Shows password setting page. |
|
84 * |
|
85 * @since S60 v3.2 |
|
86 */ |
|
87 void ShowPwordSettingPageL(); |
|
88 |
|
89 /** |
|
90 * Returns container data. |
|
91 * |
|
92 * @since S60 v3.2 |
|
93 * @param aUsername for username |
|
94 * @param aPassword for password |
|
95 */ |
|
96 void GetContainerDataL( TDes& aUsername, TDes& aPassword ); |
|
97 |
|
98 // from base class CCoeControl |
|
99 |
|
100 /** |
|
101 * From CCoeControl. |
|
102 * Offers a key event. |
|
103 * |
|
104 * @since S60 v3.2 |
|
105 * @param aKeyEvent Key event to be offered. |
|
106 * @param aType Type of the key event. |
|
107 * @return Key response. |
|
108 */ |
|
109 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
110 TEventCode aType ); |
|
111 |
|
112 /** |
|
113 * From CCoeControl. |
|
114 * Returns component control. |
|
115 * |
|
116 * @since S60 v3.2 |
|
117 * @param aIndex Index of the component control to be returned. |
|
118 * @return Component control. |
|
119 */ |
|
120 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
121 |
|
122 private: |
|
123 |
|
124 CAcpQueryContainer(); |
|
125 void ConstructL( const TRect& aRect ); |
|
126 |
|
127 /** |
|
128 * Creates listbox item for provider list items. |
|
129 * |
|
130 * @since S60 v3.2 |
|
131 */ |
|
132 void ConstructListBoxL(); |
|
133 |
|
134 /** |
|
135 * Fills listbox with items. |
|
136 * |
|
137 * @since S60 v3.2 |
|
138 */ |
|
139 void FillListboxWithItemsL(); |
|
140 |
|
141 /** |
|
142 * Updates listbox list item. |
|
143 * |
|
144 * @since S60 v3.2 |
|
145 * @param aIndex for index item to be updated |
|
146 */ |
|
147 void UpdateListboxItemL( const TInt aIndex ); |
|
148 |
|
149 /** |
|
150 * Fills selected listbox item with member data. |
|
151 * |
|
152 * @since S60 v3.2 |
|
153 * @param aIndex Index of listbox item to be updated. |
|
154 * @param aFirstLine Item caption text. |
|
155 * @param aSecondLine Item member data text. |
|
156 */ |
|
157 void FillListboxItemDataL( const TInt aIndex, |
|
158 TDes& aFirstLine, TDes& aSecondLine ); |
|
159 |
|
160 // from base class CCoeControl |
|
161 |
|
162 /** |
|
163 * From CCoeControl. |
|
164 * Returns number of component controls. |
|
165 * |
|
166 * @since S60 v3.2 |
|
167 * @return Number of component controls. |
|
168 */ |
|
169 virtual TInt CountComponentControls() const; |
|
170 |
|
171 /** |
|
172 * From CCoeControl. |
|
173 * Informs that size has been changed. |
|
174 * |
|
175 * @since S60 v3.2 |
|
176 */ |
|
177 virtual void SizeChanged(); |
|
178 |
|
179 /** |
|
180 * From CoeControl. |
|
181 * Informs that focus has been changed. |
|
182 * |
|
183 * @param aDrawNow Tells if the window must be redrawn. |
|
184 * @since S60 v3.2 |
|
185 */ |
|
186 virtual void FocusChanged( TDrawNow aDrawNow ); |
|
187 |
|
188 /** |
|
189 * From CoeControl. |
|
190 * Called by framework when the view layout is changed. |
|
191 * |
|
192 * @since S60 v3.2 |
|
193 * @param aType Type of resource change. |
|
194 */ |
|
195 virtual void HandleResourceChange( TInt aType ); |
|
196 |
|
197 private: // data |
|
198 |
|
199 /** |
|
200 * Listbox for main view setting page items. |
|
201 * Own. |
|
202 */ |
|
203 CAknSettingStyleListBox* iListBox; |
|
204 |
|
205 /** |
|
206 * Localized "none" text from resources. |
|
207 * Own. |
|
208 */ |
|
209 HBufC* iNone; |
|
210 |
|
211 /** |
|
212 * Setting item: Server username. |
|
213 */ |
|
214 TBuf<KAcpSipUsername> iUsername; |
|
215 |
|
216 /** |
|
217 * Setting item: Server password. |
|
218 */ |
|
219 TBuf<KAcpSipPassword> iPassword; |
|
220 |
|
221 }; |
|
222 |
|
223 #endif // ACPQUERYCONTAINER_H |
|
224 |
|
225 // End of file. |