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