|
1 /* |
|
2 * Copyright (c) 2003-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 "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 the CVpnManagementUiServerContainer class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __VPNMANAGEMENTUISERVERCONTAINER_H__ |
|
19 #define __VPNMANAGEMENTUISERVERCONTAINER_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include "vpnmanagementuiserverview.h" |
|
23 |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 |
|
27 // CLASS DECLARATION |
|
28 |
|
29 /** |
|
30 * CVpnManagementUiServerContainer container control class. |
|
31 * |
|
32 * @lib vpnmanagementui.lib |
|
33 */ |
|
34 class CVpnManagementUiServerContainer : public CCoeControl, |
|
35 public MCoeControlObserver, |
|
36 public MEikListBoxObserver |
|
37 { |
|
38 /** |
|
39 * Policy Container needs to get access to CVpnManagementUiServerView's DoActivateL |
|
40 */ |
|
41 friend void CVpnManagementUiServerView::DoActivateL(const TVwsViewId&, TUid, const TDesC8&); |
|
42 |
|
43 public: // functions |
|
44 |
|
45 /** |
|
46 * Overrided Default constructor |
|
47 */ |
|
48 CVpnManagementUiServerContainer(CVpnManagementUiServerView& aParent, CVpnUiLoader& aLoader); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 ~CVpnManagementUiServerContainer(); |
|
54 |
|
55 /** |
|
56 * Overrided ActivateL function from base class CCoeControl |
|
57 */ |
|
58 virtual void ActivateL(); |
|
59 |
|
60 /** |
|
61 * Change focus |
|
62 */ |
|
63 void FocusChanged(TDrawNow aDrawNow); |
|
64 |
|
65 /** |
|
66 * From CCoeControl |
|
67 */ |
|
68 void HandleResourceChange( TInt aType ); |
|
69 |
|
70 /** |
|
71 * Draws listbox |
|
72 */ |
|
73 void DrawListBoxL(TInt aCurrentPosition, TInt aTopItem); |
|
74 |
|
75 /** |
|
76 * Refresh listbox after VPN policy server deletion. |
|
77 */ |
|
78 void UpdateListBoxL(TInt& aCurrentPosition); |
|
79 |
|
80 /** |
|
81 * Ask confirmation to delete server. |
|
82 * Calls AcuAgent API's DeleteServer and updates listbox and iServerList |
|
83 * Show an information note if server is currently in use and |
|
84 * can't be deleted. |
|
85 */ |
|
86 void DeleteServerL(TInt aIndex); |
|
87 |
|
88 /** |
|
89 * Calls AcuAgent API's SynchroniseServerL |
|
90 */ |
|
91 void SynchroniseServerL(TInt aIndex); |
|
92 |
|
93 // from MAcuApiWrapperCaller |
|
94 void NotifyUpdatePolicyCompleteL(TInt aResult); |
|
95 void NotifySynchroniseServerCompleteL(TInt aResult); |
|
96 void NotifyStepChangedL(TInt aResult); |
|
97 |
|
98 void HandleListBoxEventL (CEikListBox *aListBox, TListBoxEvent aEventType); |
|
99 |
|
100 public: // data |
|
101 |
|
102 /** |
|
103 * To handle listbox |
|
104 */ |
|
105 CEikColumnListBox* iListBox; |
|
106 |
|
107 /** |
|
108 * To get hold of ServerView |
|
109 */ |
|
110 CVpnManagementUiServerView& iParent; |
|
111 |
|
112 /** |
|
113 * To get hold of CVpnUiLoader |
|
114 */ |
|
115 CVpnUiLoader& iLoader; |
|
116 |
|
117 /** |
|
118 * To store the list item count |
|
119 */ |
|
120 TInt iListItemCount; |
|
121 |
|
122 /** |
|
123 * If ETrue, Show Waitnote. |
|
124 */ |
|
125 TBool iShowWaitNote; |
|
126 |
|
127 private: // functions |
|
128 |
|
129 /** |
|
130 * Default constructor |
|
131 */ |
|
132 CVpnManagementUiServerContainer(); |
|
133 |
|
134 /** |
|
135 * Symbian OS default constructor. |
|
136 * @param aRect Frame rectangle for container. |
|
137 */ |
|
138 void ConstructL(const TRect& aRect, TInt& aCurrentPosition, TInt& aTopItem); |
|
139 |
|
140 /** |
|
141 * Creates listbox, sets empty listbox text |
|
142 */ |
|
143 void CreateListBoxL(); |
|
144 |
|
145 /** |
|
146 * From CoeControl,SizeChanged. |
|
147 */ |
|
148 void SizeChanged(); |
|
149 |
|
150 /** |
|
151 * From CoeControl,CountComponentControls. |
|
152 */ |
|
153 TInt CountComponentControls() const; |
|
154 |
|
155 /** |
|
156 * From CCoeControl,ComponentControl. |
|
157 */ |
|
158 CCoeControl* ComponentControl(TInt aIndex) const; |
|
159 |
|
160 /** |
|
161 * Handles control events |
|
162 * |
|
163 * event handling section |
|
164 * e.g Listbox events |
|
165 */ |
|
166 void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
|
167 |
|
168 /** |
|
169 * Handles the key events OK button, arrow keys. |
|
170 */ |
|
171 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
172 |
|
173 void ShowServersL(); |
|
174 |
|
175 |
|
176 #ifdef __SERIES60_HELP |
|
177 /** |
|
178 * This function is called when Help application is launched. |
|
179 * (other items were commented in a header). |
|
180 */ |
|
181 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
182 #endif //__SERIES60_HELP |
|
183 |
|
184 private: //data |
|
185 |
|
186 }; |
|
187 |
|
188 #endif // __VPNMANAGEMENTUISERVERCONTAINER_H__ |
|
189 |
|
190 // End of File |