|
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 GSSETTLISTBARRINGVIEW_H |
|
20 #define GSSETTLISTBARRINGVIEW_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknview.h> |
|
24 #include <PsetCallBarring.h> |
|
25 #include <etelmm.h> |
|
26 #include <eikclb.h> |
|
27 |
|
28 #include "GSLocalBaseView.h" |
|
29 #include "CallBarringPlugin.hrh" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CGSBaseContainer; |
|
33 class CGSSettListBarringContainer; |
|
34 class CAknNavigationDecorator; |
|
35 class CPsetContainer; |
|
36 class CPsuiContainer; |
|
37 class CPsuiBarringObs; |
|
38 class CAknStaticNoteDialog; |
|
39 class CAknNoteDialog; |
|
40 |
|
41 // CLASS DECLARATION |
|
42 /*************************************************** |
|
43 * CGSSettListBarringView view class * |
|
44 ***************************************************/ |
|
45 class CGSSettListBarringView : public CGSLocalBaseView |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /* C++ Constructor */ |
|
50 CGSSettListBarringView(); |
|
51 |
|
52 /** |
|
53 * Symbian OS two phased constructor. |
|
54 */ |
|
55 static CGSSettListBarringView* NewL(); |
|
56 |
|
57 /* Symbian OS two phase constructor - puts self into stack. |
|
58 * |
|
59 * @return CGSSettListBarringView object |
|
60 */ |
|
61 static CGSSettListBarringView* NewLC(); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 ~CGSSettListBarringView(); |
|
67 |
|
68 public: // Functions from base classes |
|
69 |
|
70 /** |
|
71 * From CAknView, returns the views id. |
|
72 * |
|
73 * @return Returns TUid, which is the id of the view. |
|
74 */ |
|
75 TUid Id() const; |
|
76 |
|
77 /** |
|
78 * From MEikCommandObserver, handles the commands given through menu. |
|
79 * |
|
80 * @param aCommand is the given command. |
|
81 */ |
|
82 void HandleCommandL( TInt aCommand ); |
|
83 /** |
|
84 * From MEikCommandObserver, handles the commands. |
|
85 * |
|
86 * @param aCommand identifies the command given. |
|
87 */ |
|
88 void ProcessCommandL( TInt aCommand ); |
|
89 |
|
90 public: //new |
|
91 |
|
92 /** |
|
93 * Creates the barring password query. |
|
94 * |
|
95 * @param aBarringPassword is user inputed password |
|
96 * @param aTitleID is type of password query |
|
97 * @return softkey pressed in pwd query |
|
98 */ |
|
99 TInt BarringPasswordQueryL( TBarringPassword& aBarringPassword, |
|
100 const TInt& aTitleID ); |
|
101 |
|
102 protected: // from CAknView |
|
103 |
|
104 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
105 TUid aCustomMessageId, |
|
106 const TDesC8& aCustomMessage ); |
|
107 |
|
108 void DoDeactivate(); |
|
109 |
|
110 |
|
111 private: |
|
112 |
|
113 /** |
|
114 * Adds item to a list |
|
115 * @param aList pointer to a list |
|
116 * @param aItem resource ID of the item text |
|
117 */ |
|
118 void AppendItemL( CDesCArrayFlat& aList, const TInt aItem ); |
|
119 |
|
120 /** |
|
121 * Selects barring type |
|
122 * @param aCommand user action |
|
123 * @param aBarringSetting barring type is set into this |
|
124 * @param aType value used for mapping the current type |
|
125 */ |
|
126 void SetBarringType( TInt& aCommand, |
|
127 TCallBarringSetting& aBarringSetting, |
|
128 TGSBarringSetting aType ); |
|
129 |
|
130 /** |
|
131 * Handles barring operation requests |
|
132 * @param aBarringSetting barring settings (e.g. pwd) passed to TSY |
|
133 * @param aBsc basic service groups |
|
134 */ |
|
135 void HandleBarringOperationL( TCallBarringSetting aBarringSetting, |
|
136 TBasicServiceGroups aBsc ); |
|
137 |
|
138 /** |
|
139 * Creates a request to cancel all barrings. |
|
140 * |
|
141 */ |
|
142 void CancelAllBarringsL(); |
|
143 |
|
144 /** |
|
145 * Handles changing of barring password. |
|
146 * |
|
147 */ |
|
148 void ChangeBarringPwdL(); |
|
149 |
|
150 private: // From MEikMenuObserver |
|
151 |
|
152 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
153 |
|
154 private: // from base class |
|
155 |
|
156 /** |
|
157 * Symbian OS default constructor. |
|
158 * |
|
159 */ |
|
160 void ConstructL(); |
|
161 |
|
162 /** |
|
163 * From CGSBaseView, handles selection of list box. |
|
164 */ |
|
165 void HandleListBoxSelectionL(); |
|
166 |
|
167 void NewContainerL(); |
|
168 |
|
169 private: // Member variables |
|
170 //Navi pane |
|
171 CAknNavigationDecorator* iNaviPaneContext; |
|
172 //Pointer to PhoneSetting's barring object |
|
173 CPsetCallBarring* iBarring; |
|
174 //Pointer to PhoneSetting's container |
|
175 CPsetContainer* iSettings; |
|
176 //Pointer to PSUI's container |
|
177 CPsuiContainer* iObsContainer; |
|
178 //Pointer to PSUI's barring object |
|
179 CPsuiBarringObs* iCbObserver; |
|
180 //Has selection key been pressed |
|
181 TBool iRockerPress; |
|
182 //Has context menu initialized |
|
183 TBool iContextMenuInitialized; |
|
184 }; |
|
185 |
|
186 #endif //GSSETTLISTBARRINGVIEW_H |
|
187 |
|
188 // End of File |
|
189 |