author | Simon Howkins <simonh@symbian.org> |
Tue, 16 Nov 2010 11:03:59 +0000 | |
branch | RCL_3 |
changeset 52 | efc64fd8bd10 |
parent 49 | 5960d2d03390 |
permissions | -rw-r--r-- |
41 | 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 CVpnManagementUiPolicyContainer class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef __VPNMANAGEMENTUIPOLICYCONTAINER_H__ |
|
19 |
#define __VPNMANAGEMENTUIPOLICYCONTAINER_H__ |
|
20 |
||
21 |
// INCLUDES |
|
22 |
#include "vpnmanagementuipolicyview.h" |
|
23 |
||
24 |
||
25 |
// FORWARD DECLARATIONS |
|
26 |
||
27 |
// CLASS DECLARATION |
|
28 |
||
29 |
/** |
|
30 |
* CVpnManagementUiPolicyContainer container control class. |
|
31 |
* |
|
32 |
* @lib vpnmanagementui.lib |
|
33 |
*/ |
|
34 |
class CVpnManagementUiPolicyContainer : |
|
35 |
public CCoeControl, |
|
36 |
public MCoeControlObserver, |
|
37 |
public MEikListBoxObserver |
|
38 |
{ |
|
39 |
||
40 |
/** |
|
41 |
* Policy Container needs to get access to CVpnManagementUiPolicyView's DoActivateL |
|
42 |
*/ |
|
43 |
friend void CVpnManagementUiPolicyView::DoActivateL( |
|
44 |
const TVwsViewId&, TUid, const TDesC8&); |
|
45 |
||
46 |
public: // functions |
|
47 |
||
48 |
/** |
|
49 |
* Overrided Default constructor |
|
50 |
*/ |
|
51 |
CVpnManagementUiPolicyContainer( |
|
52 |
CVpnManagementUiPolicyView& aParent, CVpnUiLoader& aLoader); |
|
53 |
||
54 |
/** |
|
55 |
* Destructor. |
|
56 |
*/ |
|
57 |
~CVpnManagementUiPolicyContainer(); |
|
58 |
||
59 |
/** |
|
60 |
* Overrided ActivateL function from base class CCoeControl |
|
61 |
*/ |
|
62 |
virtual void ActivateL(); |
|
63 |
||
64 |
/** |
|
65 |
* Change focus |
|
66 |
*/ |
|
67 |
void FocusChanged(TDrawNow aDrawNow); |
|
68 |
||
69 |
/** |
|
70 |
* From CCoeControl |
|
71 |
*/ |
|
72 |
void HandleResourceChange( TInt aType ); |
|
73 |
||
74 |
/** |
|
75 |
* Draws listbox, fetches graphic icons for markable list |
|
76 |
*/ |
|
77 |
void DrawListBoxL(TInt aCurrentPosition, TInt aTopItem); |
|
78 |
||
79 |
/** |
|
80 |
* Updates listbox after deletion, sets No VPN policies text |
|
81 |
* if deleted policy was a last one. |
|
82 |
*/ |
|
83 |
void UpdateListBoxL(TInt& aCurrentPosition); |
|
84 |
||
85 |
/** |
|
86 |
* Handles listbox events |
|
87 |
*/ |
|
88 |
void HandleListBoxEventL( |
|
89 |
CEikListBox* aListBox, TListBoxEvent aEventType); |
|
90 |
||
49
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
91 |
void InstallPoliciesL(); |
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
92 |
|
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
93 |
void SynchroniseServerL(); |
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
94 |
|
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
95 |
void UpdatePolicyL(TVpnPolicyId aPolicyId); |
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
96 |
|
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
97 |
// from MAcuApiWrapperCaller |
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
98 |
void NotifyUpdatePolicyCompleteL(TInt aResult); |
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
99 |
void NotifySynchroniseServerCompleteL(TInt aResult); |
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
100 |
void NotifyStepChangedL(TInt aResult); |
41 | 101 |
|
102 |
||
103 |
public: // data |
|
104 |
||
105 |
/** |
|
106 |
* To handle listbox |
|
107 |
* Cannot be private because CVpnManagementUiPolicyView uses it |
|
108 |
*/ |
|
109 |
CEikColumnListBox* iListBox; |
|
110 |
||
111 |
/** |
|
112 |
* To get hold of PolicyView |
|
113 |
*/ |
|
114 |
CVpnManagementUiPolicyView& iParent; |
|
115 |
||
116 |
/** |
|
117 |
* To get hold of CVpnUiLoader |
|
118 |
*/ |
|
119 |
CVpnUiLoader& iLoader; |
|
120 |
||
121 |
/** |
|
122 |
* To store the list item count |
|
123 |
*/ |
|
124 |
TInt iListItemCount; |
|
125 |
||
126 |
/** |
|
127 |
* If ETrue, Show Waitnote. |
|
128 |
*/ |
|
49
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
129 |
TBool iShowWaitNote; |
41 | 130 |
|
131 |
private: // functions |
|
132 |
||
133 |
/** |
|
134 |
* Default constructor |
|
135 |
*/ |
|
136 |
CVpnManagementUiPolicyContainer(); |
|
137 |
||
138 |
/** |
|
139 |
* Symbian OS default constructor. |
|
140 |
* @param aRect Frame rectangle for container. |
|
141 |
*/ |
|
142 |
void ConstructL( |
|
143 |
const TRect& aRect, TInt& aCurrentPosition, TInt& aTopItem); |
|
144 |
||
145 |
/** |
|
146 |
* Creates listbox, sets empty listbox text |
|
147 |
*/ |
|
148 |
void CreateListBoxL(); |
|
149 |
||
150 |
/** |
|
151 |
* From CoeControl,SizeChanged. |
|
152 |
*/ |
|
153 |
void SizeChanged(); |
|
154 |
||
155 |
/** |
|
156 |
* From CoeControl,CountComponentControls. |
|
157 |
*/ |
|
158 |
TInt CountComponentControls() const; |
|
159 |
||
160 |
/** |
|
161 |
* From CCoeControl,ComponentControl. |
|
162 |
*/ |
|
163 |
CCoeControl* ComponentControl(TInt aIndex) const; |
|
164 |
||
165 |
/** |
|
166 |
* Handles control events |
|
167 |
* |
|
168 |
* event handling section |
|
169 |
* e.g Listbox events |
|
170 |
*/ |
|
171 |
void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
|
172 |
||
173 |
/** |
|
174 |
* Handles the key events OK button, arrow keys, delete key. |
|
175 |
*/ |
|
176 |
TKeyResponse OfferKeyEventL( |
|
177 |
const TKeyEvent& aKeyEvent, TEventCode aType); |
|
178 |
||
179 |
/** |
|
180 |
* Gets list of policies from VpnAPI and displays them in listbox. |
|
181 |
* |
|
182 |
*/ |
|
183 |
void ShowPoliciesL(); |
|
184 |
||
49
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
185 |
void PoliciesListEmptyL(); |
41 | 186 |
|
187 |
||
188 |
||
189 |
#ifdef __SERIES60_HELP |
|
190 |
/** |
|
191 |
* This function is called when Help application is launched. |
|
192 |
* (other items were commented in a header). |
|
193 |
*/ |
|
194 |
void GetHelpContext(TCoeHelpContext& aContext) const; |
|
195 |
#endif //__SERIES60_HELP |
|
196 |
||
49
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
197 |
protected: //data |
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
198 |
|
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
199 |
/** |
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
200 |
* If ETrue, ConstructL calls PoliciesListEmptyL() method. |
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
201 |
*/ |
5960d2d03390
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
41
diff
changeset
|
202 |
TBool iCallPoliciesListEmpty; |
41 | 203 |
|
204 |
private: //data |
|
205 |
||
206 |
}; |
|
207 |
||
208 |
#endif // __VPNMANAGEMENTUIPOLICYCONTAINER_H__ |
|
209 |
||
210 |
// End of File |