|
1 /* |
|
2 * Copyright (c) 2002-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: View handling for Call Divert. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CFVIEW_H |
|
20 #define CFVIEW_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "CallDivertPlugin.hrh" |
|
24 |
|
25 #include <aknlists.h> |
|
26 #include <gsbaseview.h> |
|
27 #include <gspubsubslistener.h> |
|
28 #include <mgssettingpsobserver.h> |
|
29 #include <PsetCSP.h> |
|
30 #include <eikmenup.h> |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CGSCallDivertPluginContainer; |
|
34 class CGSCallDivertView; |
|
35 class CPsetCustomerServiceProfile; |
|
36 class CGSCallDivertModel; |
|
37 |
|
38 // CONSTANTS |
|
39 _LIT( KGSCallDivertPluginIconDirAndName, "z:GSCallDivertPlugin.mbm"); |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 /** |
|
44 * CGSCallDivertPlugin view class |
|
45 */ |
|
46 class CGSCallDivertPlugin : public CGSBaseView, |
|
47 public MGSSettingPSObserver |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /* Symbian OS default constructor */ |
|
52 void ConstructL(); |
|
53 |
|
54 /* Destructor */ |
|
55 ~CGSCallDivertPlugin(); |
|
56 |
|
57 |
|
58 /* Symbian OS two-phase Constructor |
|
59 * |
|
60 * @return pointer to CGSCallDivertPlugin object |
|
61 */ |
|
62 static CGSCallDivertPlugin* NewLC(); |
|
63 |
|
64 /* C++ Constructor */ |
|
65 CGSCallDivertPlugin(); |
|
66 |
|
67 /** |
|
68 * Symbian OS two-phased constructor |
|
69 * @return GS connection view. |
|
70 */ |
|
71 static CGSCallDivertPlugin* NewL( TAny* aInitParams ); |
|
72 |
|
73 |
|
74 public: // functions from base class CAknView |
|
75 |
|
76 /** |
|
77 * From CAknView, gives the id of the view. |
|
78 * |
|
79 * @return Returns the TUid of the view. |
|
80 */ |
|
81 TUid Id() const; |
|
82 |
|
83 /** |
|
84 * From MEikCommandObserver, handles the commands. |
|
85 * |
|
86 * @param aCommand identifies the command given. |
|
87 */ |
|
88 void HandleCommandL( TInt aCommand ); |
|
89 |
|
90 public: // From CGSPluginInterface |
|
91 |
|
92 /** |
|
93 * @see CGSPluginInterface header file. |
|
94 */ |
|
95 void GetCaptionL( TDes& aCaption ) const; |
|
96 |
|
97 /** |
|
98 * See base class. |
|
99 */ |
|
100 CGulIcon* CreateIconL( const TUid aIconType ); |
|
101 |
|
102 /** |
|
103 * @see CGSPluginInterface header file. |
|
104 */ |
|
105 TInt PluginProviderCategory() const; |
|
106 |
|
107 /** |
|
108 * @see CGSPluginInterface header file. |
|
109 */ |
|
110 TBool Visible() const; |
|
111 |
|
112 protected: // From MEikMenuObserver |
|
113 |
|
114 /** |
|
115 * |
|
116 */ |
|
117 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
118 |
|
119 |
|
120 public: //new |
|
121 |
|
122 /** |
|
123 * Updates listbox's item's value. |
|
124 * @param aItemId An item which is updated. |
|
125 * |
|
126 */ |
|
127 void UpdateListBox( TInt aItemId ); |
|
128 |
|
129 void SetCSPActiveL( TBool aValue ); |
|
130 |
|
131 private: // from base class CGSBaseView |
|
132 |
|
133 /* From CAknView, activates the view. */ |
|
134 void DoActivateL( |
|
135 const TVwsViewId& /*aPrevViewId*/, |
|
136 TUid /*aCustomMessageId*/, |
|
137 const TDesC8& /*aCustomMessage*/ ); |
|
138 |
|
139 /* From CAknView, deactivates the view. */ |
|
140 void DoDeactivate(); |
|
141 |
|
142 void NewContainerL(); |
|
143 |
|
144 private: // from CGSBaseView |
|
145 |
|
146 void HandleListBoxSelectionL(); |
|
147 |
|
148 //Retrieves container pointer. |
|
149 CGSCallDivertPluginContainer* Container(); |
|
150 |
|
151 private: // From MGSSettingPSObserver |
|
152 /** |
|
153 * Callback from MGSSettingPSObserver |
|
154 */ |
|
155 void HandleNotifyPSL( const TUid aUid, const TInt& aKey, |
|
156 const TRequestStatus& aStatus ); |
|
157 |
|
158 private: |
|
159 |
|
160 // Local view of call diverts. |
|
161 CGSCallDivertView* iCallDivertView; |
|
162 // PubSub object for BT SAP state. |
|
163 CGSPubSubsListener* iBtSapListener; |
|
164 // Check if CSP is active. |
|
165 CPsetCustomerServiceProfile* iCSP; |
|
166 |
|
167 // Model for call diverts. |
|
168 CGSCallDivertModel* iCallDivertModel; |
|
169 }; |
|
170 |
|
171 #endif |
|
172 // End of File |