1 /* |
|
2 * Copyright (c) 2005 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: View for Device & SIM security plug-in. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GSSIMSECPLUGIN_H |
|
20 #define GSSIMSECPLUGIN_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "GSSimSecPluginContainer.h" |
|
24 #include "GSSimSecPluginModel.h" |
|
25 #include "MGSSettingPSObserver.h" |
|
26 #include "GSPubSubsListener.h" |
|
27 |
|
28 #include <aknsettingpage.h> |
|
29 #include <ConeResLoader.h> |
|
30 #include <gsplugininterface.h> |
|
31 #include <gsfwviewuids.h> |
|
32 #include <gsbaseview.h> |
|
33 #include <secuisecuritysettings.h> |
|
34 #include <RSSSettings.h> |
|
35 |
|
36 // CONSTANTS |
|
37 const TInt KMaxStringLength = 80; |
|
38 const TUid KGSSimSecPluginUid = { 0x10207438 }; |
|
39 |
|
40 // MACROS |
|
41 |
|
42 // DATA TYPES |
|
43 |
|
44 // FUNCTION PROTOTYPES |
|
45 |
|
46 // FORWARD DECLARATIONS |
|
47 class CAknViewAppUi; |
|
48 class CGSSimSecPluginContainer; |
|
49 |
|
50 |
|
51 // CLASS DECLARATION |
|
52 |
|
53 /** |
|
54 * CGSSimSecPlugin view class |
|
55 * |
|
56 * View class for Sim Security sub-folder |
|
57 */ |
|
58 class CGSSimSecPlugin : public CGSBaseView, |
|
59 private MGSSettingPSObserver |
|
60 { |
|
61 public: // Constructors and destructor |
|
62 |
|
63 /** |
|
64 * Symbian OS two-phased constructor |
|
65 * @return GS sim & device security view. |
|
66 */ |
|
67 static CGSSimSecPlugin* NewL( TAny* aInitParams ); |
|
68 |
|
69 /** |
|
70 * C++ default constructor. |
|
71 */ |
|
72 CGSSimSecPlugin(); |
|
73 |
|
74 /** |
|
75 * Symbian OS default constructor. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 /** |
|
80 * Destructor. |
|
81 */ |
|
82 ~CGSSimSecPlugin(); |
|
83 |
|
84 public: // Functions from base classes |
|
85 |
|
86 /** |
|
87 * Returns view id. |
|
88 * @return TUid. |
|
89 */ |
|
90 TUid Id() const; |
|
91 |
|
92 /** |
|
93 * Handles commands. |
|
94 * @param aCommand Command to be handled. |
|
95 * |
|
96 */ |
|
97 void HandleCommandL( TInt aCommand ); |
|
98 |
|
99 public: //new |
|
100 |
|
101 /** |
|
102 * Updates listbox's item's value. |
|
103 * @param aItemId An item which is updated. |
|
104 * |
|
105 */ |
|
106 void UpdateListBoxL( TInt aItemId ); |
|
107 |
|
108 //From CGSBaseView |
|
109 void HandleResourceChangeL( TInt aType ); |
|
110 |
|
111 public: // From CGSPluginInterface |
|
112 |
|
113 /** |
|
114 * @see CGSPluginInterface header file. |
|
115 */ |
|
116 void GetCaptionL( TDes& aCaption ) const; |
|
117 |
|
118 /** |
|
119 * @see CGSPluginInterface header file. |
|
120 */ |
|
121 TInt PluginProviderCategory() const; |
|
122 |
|
123 /** |
|
124 * @see CGSPluginInterface header file. |
|
125 */ |
|
126 TBool Visible() const; |
|
127 |
|
128 protected: // From MEikMenuObserver |
|
129 |
|
130 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
131 |
|
132 private: // from CAknView |
|
133 /** |
|
134 * Activates the view. |
|
135 * @param aPrevViewId ID of previous view |
|
136 * @param aCustomMessageId customized message ID |
|
137 * @param aCustomMessage sutomized message payload |
|
138 */ |
|
139 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
140 TUid aCustomMessageId, |
|
141 const TDesC8& aCustomMessage ); |
|
142 |
|
143 private: // from CGSBaseView |
|
144 |
|
145 void NewContainerL(); |
|
146 |
|
147 /** |
|
148 * From CGSBaseView, handles list box selections. |
|
149 * |
|
150 */ |
|
151 void HandleListBoxSelectionL(); |
|
152 |
|
153 private: |
|
154 /** |
|
155 * Callback from MGSSettingPSObserver |
|
156 */ |
|
157 void HandleNotifyPSL( const TUid aUid, const TInt& aKey, |
|
158 const TRequestStatus& aStatus ); |
|
159 |
|
160 private: //new |
|
161 |
|
162 /** |
|
163 * Sets Autolock period |
|
164 * |
|
165 */ |
|
166 void SetAutolockTimeL( TInt aPeriod ); |
|
167 |
|
168 /** |
|
169 * Set sat operations value (on/off). |
|
170 * |
|
171 */ |
|
172 |
|
173 void SetSatOperationsL(); |
|
174 |
|
175 /** |
|
176 * Set sat operations value with setting page(on/off). |
|
177 * |
|
178 */ |
|
179 void SetSatWithSettingPageL(); |
|
180 |
|
181 /** |
|
182 * Shows closed user group index query |
|
183 * @param aCugIndex Current Cug index |
|
184 * @param aCugDefault Default CUG index |
|
185 * @return TInt (query result) |
|
186 */ |
|
187 TInt CugIndexQueryL( TInt& aCugIndex, TInt& aCugDefault ); |
|
188 |
|
189 /** |
|
190 * Set closed user group setting |
|
191 * |
|
192 */ |
|
193 void CugModeL(); |
|
194 |
|
195 /** |
|
196 * Get CGSSimSecPlugin's ccontainer. |
|
197 */ |
|
198 CGSSimSecPluginContainer* Container(); |
|
199 |
|
200 |
|
201 TInt SetRemoteLockStatusL( TInt aAutoLockPeriod ); |
|
202 |
|
203 private: // Data |
|
204 //for CUG settings |
|
205 RSSSettings iCugSettings; |
|
206 //to launch SecUI |
|
207 CSecuritySettings* iSecurity; |
|
208 //plugin model. |
|
209 CGSSimSecPluginModel* iModel; |
|
210 //resource loader |
|
211 RConeResourceLoader iResourceLoader; |
|
212 //PubSub object for BT SAP state |
|
213 CGSPubSubsListener* iBtSapListener; |
|
214 |
|
215 }; |
|
216 |
|
217 #endif //GSSIMSECPLUGIN_H |
|
218 |
|
219 // End of File |
|