|
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 GSAUTOKEYGUARDPLUGIN_H |
|
20 #define GSAUTOKEYGUARDPLUGIN_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "GSAutoKeyguardPluginContainer.h" |
|
24 #include "GSAutoKeyguardPluginModel.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 KGSAutoKeyguardPluginUid = { 0x200110f0 }; |
|
39 |
|
40 // MACROS |
|
41 |
|
42 // DATA TYPES |
|
43 |
|
44 // FUNCTION PROTOTYPES |
|
45 |
|
46 // FORWARD DECLARATIONS |
|
47 class CAknViewAppUi; |
|
48 class CGSAutoKeyguardPluginContainer; |
|
49 |
|
50 |
|
51 // CLASS DECLARATION |
|
52 |
|
53 /** |
|
54 * CGSAutoKeyguardPlugin view class |
|
55 * |
|
56 * View class for Sim Security sub-folder |
|
57 */ |
|
58 class CGSAutoKeyguardPlugin : 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 CGSAutoKeyguardPlugin* NewL( TAny* aInitParams ); |
|
68 |
|
69 /** |
|
70 * C++ default constructor. |
|
71 */ |
|
72 CGSAutoKeyguardPlugin(); |
|
73 |
|
74 /** |
|
75 * Symbian OS default constructor. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 /** |
|
80 * Destructor. |
|
81 */ |
|
82 ~CGSAutoKeyguardPlugin(); |
|
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 * See base class. |
|
119 */ |
|
120 CGulIcon* CreateIconL( const TUid aIconType ); |
|
121 /** |
|
122 * @see CGSPluginInterface header file. |
|
123 */ |
|
124 TInt PluginProviderCategory() const; |
|
125 |
|
126 /** |
|
127 * @see CGSPluginInterface header file. |
|
128 */ |
|
129 TBool Visible() const; |
|
130 |
|
131 protected: // From MEikMenuObserver |
|
132 |
|
133 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
134 |
|
135 private: // from CAknView |
|
136 /** |
|
137 * Activates the view. |
|
138 * @param aPrevViewId ID of previous view |
|
139 * @param aCustomMessageId customized message ID |
|
140 * @param aCustomMessage sutomized message payload |
|
141 */ |
|
142 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
143 TUid aCustomMessageId, |
|
144 const TDesC8& aCustomMessage ); |
|
145 |
|
146 private: // from CGSBaseView |
|
147 |
|
148 void NewContainerL(); |
|
149 |
|
150 /** |
|
151 * From CGSBaseView, handles list box selections. |
|
152 * |
|
153 */ |
|
154 void HandleListBoxSelectionL(); |
|
155 |
|
156 private: |
|
157 /** |
|
158 * Callback from MGSSettingPSObserver |
|
159 */ |
|
160 void HandleNotifyPSL( const TUid aUid, const TInt& aKey, |
|
161 const TRequestStatus& aStatus ); |
|
162 |
|
163 private: //new |
|
164 /** |
|
165 * Sets Autokeyguard period |
|
166 * |
|
167 */ |
|
168 void SetAutoKeyguardTimeL( TInt aPeriod, TInt aMaxPeriod ); |
|
169 |
|
170 /** |
|
171 * Get CGSAutoKeyguardPlugin's ccontainer. |
|
172 */ |
|
173 CGSAutoKeyguardPluginContainer* Container(); |
|
174 |
|
175 private: // Data |
|
176 //plugin model. |
|
177 CGSAutoKeyguardPluginModel* iModel; |
|
178 //resource loader |
|
179 RConeResourceLoader iResourceLoader; |
|
180 //PubSub object for BT SAP state |
|
181 CGSPubSubsListener* iBtSapListener; |
|
182 |
|
183 }; |
|
184 |
|
185 #endif //GSAUTOKEYGUARDPLUGIN_H |
|
186 |
|
187 // End of File |