|
1 /* |
|
2 * Copyright (c) 2002-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: Barrings sub-menu in General Settings. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GSCALLBARRINGPLUGIN_H |
|
20 #define GSCALLBARRINGPLUGIN_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <gsbaseview.h> |
|
24 #include <aknview.h> |
|
25 #include <gspubsubslistener.h> |
|
26 #include <mgssettingpsobserver.h> |
|
27 #include <PsetCSP.h> |
|
28 #include <PsetCallBarring.h> |
|
29 #include <etelmm.h> |
|
30 #include <eikclb.h> |
|
31 |
|
32 #include "GSLocalBaseView.h" |
|
33 #include "CallBarringPlugin.hrh" |
|
34 |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class CGSBaseContainer; |
|
38 class CGSCallBarringPluginContainer; |
|
39 class CPsetCustomerServiceProfile; |
|
40 class CAknNavigationDecorator; |
|
41 class CPsetContainer; |
|
42 class CPsuiContainer; |
|
43 class CPsuiBarringObs; |
|
44 class CAknStaticNoteDialog; |
|
45 class CAknNoteDialog; |
|
46 |
|
47 // CONSTANTS |
|
48 _LIT( KGSCallBarringPluginIconDirAndName, "z:GSCallBarringPlugin.mbm"); |
|
49 |
|
50 |
|
51 // CLASS DECLARATION |
|
52 /*************************************************** |
|
53 * CGSCallBarringPlugin class * |
|
54 ****************************************************/ |
|
55 class CGSCallBarringPlugin : public CGSBaseView, |
|
56 public MGSSettingPSObserver |
|
57 { |
|
58 public: // Constructors and destructor |
|
59 |
|
60 /* C++ Constructor */ |
|
61 CGSCallBarringPlugin(); |
|
62 |
|
63 /* Symbian OS two phase constructor - puts self into stack. |
|
64 * |
|
65 * @return CGSCallBarringPlugin object |
|
66 */ |
|
67 static CGSCallBarringPlugin* NewLC(); |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 ~CGSCallBarringPlugin(); |
|
73 |
|
74 /** |
|
75 * Symbian OS two-phased constructor |
|
76 * @return GS call barring view. |
|
77 */ |
|
78 static CGSCallBarringPlugin* NewL( TAny* aInitParams ); |
|
79 |
|
80 /** |
|
81 * |
|
82 */ |
|
83 void HandleClientRectChange(); |
|
84 |
|
85 public: // Functions from base classes |
|
86 |
|
87 /** |
|
88 * From CAknView, returns the views id. |
|
89 * |
|
90 * @return Returns TUid, which is the id of the view. |
|
91 */ |
|
92 TUid Id() const; |
|
93 |
|
94 /** |
|
95 * From MEikCommandObserver, handles the commands given through menu. |
|
96 * |
|
97 * @param aCommand is the given command. |
|
98 */ |
|
99 void HandleCommandL( TInt aCommand ); |
|
100 |
|
101 public: // From CGSPluginInterface |
|
102 |
|
103 /** |
|
104 * @see CGSPluginInterface header file. |
|
105 */ |
|
106 void GetCaptionL( TDes& aCaption ) const; |
|
107 |
|
108 /** |
|
109 * See base class. |
|
110 */ |
|
111 CGulIcon* CreateIconL( const TUid aIconType ); |
|
112 |
|
113 /** |
|
114 * @see CGSPluginInterface header file. |
|
115 */ |
|
116 TInt PluginProviderCategory() const; |
|
117 |
|
118 /** |
|
119 * @see CGSPluginInterface header file. |
|
120 */ |
|
121 TBool Visible() const; |
|
122 |
|
123 public: //new |
|
124 |
|
125 /** |
|
126 * This is a locally owned method used to activate |
|
127 * other local views seen from GSTelPlugin |
|
128 * @param aFeatureId feature ID of the folder |
|
129 */ |
|
130 void ActivateInternalViewL(); |
|
131 |
|
132 /** |
|
133 * This is a locally owned method used to initialize |
|
134 * other local views seen from GSTelPlugin |
|
135 * @param aLocalViewId view ID of local views to this plugin |
|
136 */ |
|
137 void CreateLocalViewL( TUid aLocalViewId ); |
|
138 |
|
139 /** |
|
140 * Removes sub-views owned by this plugin to make sure sub-view UIDs do |
|
141 * not clash. |
|
142 */ |
|
143 void RemoveLocalViews(); |
|
144 |
|
145 /** |
|
146 *Is VoIP feature supported |
|
147 */ |
|
148 TBool VoipSupported() const; |
|
149 |
|
150 protected: // from CAknView |
|
151 |
|
152 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
153 TUid aCustomMessageId, |
|
154 const TDesC8& aCustomMessage ); |
|
155 |
|
156 void DoDeactivate(); |
|
157 |
|
158 private: // from base class |
|
159 |
|
160 /** |
|
161 * Symbian OS default constructor. |
|
162 * |
|
163 */ |
|
164 void ConstructL(); |
|
165 |
|
166 /** |
|
167 * From CGSBaseView, handles selection of list box. |
|
168 */ |
|
169 void HandleListBoxSelectionL(); |
|
170 |
|
171 void NewContainerL(); |
|
172 |
|
173 private: // From MGSSettingPSObserver |
|
174 /** |
|
175 * Callback from MGSSettingPSObserver |
|
176 */ |
|
177 void HandleNotifyPSL( const TUid aUid, const TInt& aKey, |
|
178 const TRequestStatus& aStatus ); |
|
179 |
|
180 private: //new |
|
181 /** |
|
182 * Retrieves container pointer. |
|
183 */ |
|
184 CGSCallBarringPluginContainer* Container(); |
|
185 |
|
186 /** |
|
187 * Customer Service Profile status setting |
|
188 */ |
|
189 void SetCSPActiveL( TBool aValue ); |
|
190 |
|
191 private: // Member variables |
|
192 //Navi pane |
|
193 CAknNavigationDecorator* iNaviPaneContext; |
|
194 //PubSub object for BT SAP state |
|
195 CGSPubSubsListener* iBtSapListener; |
|
196 //check if CSP is active |
|
197 CPsetCustomerServiceProfile* iCSP; |
|
198 // Call barring view. Not owned by this - owned by iAppUi. |
|
199 CGSLocalBaseView* iBarringView; |
|
200 // check if voip supported |
|
201 TBool iVoipSupported; |
|
202 }; |
|
203 |
|
204 #endif //GSCALLBARRINGPLUGIN_H |
|
205 |
|
206 // End of File |