1 /* |
|
2 * Copyright (c) 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: SUPL session UI view |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_LOCSUPLSESSIONVIEW_H |
|
19 #define C_LOCSUPLSESSIONVIEW_H |
|
20 |
|
21 // System Includes |
|
22 #include <data_caging_path_literals.hrh> |
|
23 #include <e32base.h> |
|
24 #include <aknview.h> |
|
25 #include <ConeResLoader.h> |
|
26 |
|
27 // User Includes |
|
28 #include "locsuplsettingsuid.hrh" |
|
29 #include "locsuplsettingseventhandler.h" |
|
30 |
|
31 // Forward Declarations |
|
32 class CLocSUPLSessionContainer; |
|
33 class MLocSUPLSettingsEventHandler; |
|
34 class CLocSUPLSettingsUiEngine; |
|
35 |
|
36 // Constant Declarations |
|
37 const TUid KLocSUPLSessionUiViewId = { KLOCSUPLSESSIONUIUID3 }; |
|
38 |
|
39 // Class Declaration |
|
40 |
|
41 /** |
|
42 * SUPL server UI View. |
|
43 */ |
|
44 class CLocSUPLSessionView : public CAknView |
|
45 { |
|
46 public: |
|
47 /** |
|
48 * Creates new SUPL server UI View. |
|
49 * |
|
50 * @param aEngine Reference to the SUPL Settings |
|
51 * engine |
|
52 * @param aEventHandler Reference to the Event Handler |
|
53 * @return CLocSUPLSessionView* Reference to the application view |
|
54 */ |
|
55 static CLocSUPLSessionView* NewL( |
|
56 CLocSUPLSettingsUiEngine& aEngine, |
|
57 MLocSUPLSettingsEventHandler& aEventHandler ); |
|
58 |
|
59 /** |
|
60 * Creates new SUPL Settings UI View. Leaves the object on the |
|
61 * Clean up stack |
|
62 * |
|
63 * @param aEngine Reference to the SUPL Settings |
|
64 * engine |
|
65 * @param aEventHandler Pointer to the Event Handler |
|
66 * @return CLocSUPLSessionView* Reference to the application view |
|
67 */ |
|
68 static CLocSUPLSessionView* NewLC( |
|
69 CLocSUPLSettingsUiEngine& aEngine, |
|
70 MLocSUPLSettingsEventHandler& aEventHandler ); |
|
71 |
|
72 /** |
|
73 * Destructor |
|
74 */ |
|
75 ~CLocSUPLSessionView (); |
|
76 |
|
77 /** |
|
78 * Handles the Screen Size update |
|
79 */ |
|
80 void HandleScreenSizeChange(); |
|
81 |
|
82 /** |
|
83 * Updates the View |
|
84 */ |
|
85 void UpdateView(); |
|
86 |
|
87 /** |
|
88 * Returns the Selected element. The list box model defines the |
|
89 * enumeration that would determine the current element that has been |
|
90 * selected |
|
91 * |
|
92 * @return TInt Index of the item selected |
|
93 */ |
|
94 TInt SelectedItemIndex(); |
|
95 |
|
96 /** |
|
97 * From CAknView. |
|
98 */ |
|
99 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
100 TUid aCustomMessageId, |
|
101 const TDesC8& aCustomMessage); |
|
102 |
|
103 /** |
|
104 * From CAknView. |
|
105 */ |
|
106 void DoDeactivate(); |
|
107 |
|
108 /** |
|
109 * From CAknView. Returns the View Id. Should be chosen to reflect |
|
110 * the Implementation UID of the Plugin |
|
111 */ |
|
112 TUid Id() const; |
|
113 |
|
114 /** |
|
115 * From CAknView. |
|
116 */ |
|
117 void HandleCommandL( TInt aCommand ); |
|
118 |
|
119 /** |
|
120 * From MEikMenuObserver |
|
121 */ |
|
122 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
123 |
|
124 /** |
|
125 * Sets MSK Button Group |
|
126 */ |
|
127 void ChangeMSKL(); |
|
128 |
|
129 private: |
|
130 /** |
|
131 * C++ Overloaded Constructor |
|
132 */ |
|
133 CLocSUPLSessionView( CLocSUPLSettingsUiEngine& aEngine, |
|
134 MLocSUPLSettingsEventHandler& aEventHandler ); |
|
135 |
|
136 /** |
|
137 * Second Phase Constructor |
|
138 */ |
|
139 void ConstructL(); |
|
140 |
|
141 /** |
|
142 * Shows or dims help option, depending wheather help feature |
|
143 * is supported or not. |
|
144 * @param aMenuPane |
|
145 */ |
|
146 void HandleHelpFeature( CEikMenuPane& aMenuPane ) const; |
|
147 |
|
148 /** |
|
149 * Confirmation query to delete |
|
150 */ |
|
151 TInt DeletionConfirmationQueryL( const TInt aAmount ); |
|
152 |
|
153 /** |
|
154 * Deletes the selected server/s |
|
155 */ |
|
156 void DeleteSessionL(); |
|
157 |
|
158 |
|
159 /** |
|
160 * Gets the ids for selected items |
|
161 */ |
|
162 void GetSelectedItemIdsL( |
|
163 RArray<TInt64>& aSelectedItems, |
|
164 const CArrayFix<TInt>& aSelectedIndexes ) const; |
|
165 |
|
166 private: |
|
167 /** |
|
168 * Reference to the event Handler for handling UI events |
|
169 */ |
|
170 MLocSUPLSettingsEventHandler& iEventHandler; |
|
171 |
|
172 /** |
|
173 * Reference to the SUPL Settings engine |
|
174 */ |
|
175 CLocSUPLSettingsUiEngine& iEngine; |
|
176 |
|
177 /** |
|
178 * Container Object |
|
179 * Owns |
|
180 */ |
|
181 CLocSUPLSessionContainer* iContainer; |
|
182 }; |
|
183 |
|
184 #endif // C_LOCSUPLSESSIONVIEW_H |
|
185 |
|