|
1 /* |
|
2 * Copyright (c) 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: Block view declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CVIMPSTUIBLOCKVIEW_H |
|
20 #define CVIMPSTUIBLOCKVIEW_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> // CBase |
|
25 |
|
26 #include "CxSPBaseView.h" |
|
27 #include "mvimpstcmdobserver.h" |
|
28 #include "mvimpstengineblockedlistfetcheventobserver.h" |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CVIMPSTUiBlockViewControl; |
|
32 class CVIMPSTUIExtensionService; |
|
33 class MVIMPSTEngine; |
|
34 class CAknNavigationDecorator; |
|
35 class MVIMPSTEnginePresenceSubService; |
|
36 class MVIMPSTCmdHandler; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 /** |
|
40 * Search view implementation |
|
41 * @lib vimpstui.lib |
|
42 * @since S60 v5.0 |
|
43 */ |
|
44 // codescanner warnings can be ignored as CxSPBaseView derived from CBsse |
|
45 |
|
46 class CVIMPSTUiBlockView :public CxSPBaseView, |
|
47 public MVIMPSTCmdObserver, |
|
48 public MVIMPSTEngineBlockedListFetchEventObserver |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 |
|
52 |
|
53 /** |
|
54 * Creates a new CVIMPSTUiSearchView. |
|
55 * |
|
56 * @param aMapper Reference to view mapper object |
|
57 * @param aContactManager Reference to contact manager object |
|
58 * @param aBlockViewId Block view id |
|
59 * @param aView Reference to Phonebook2-created view instance |
|
60 * @param aServiceData Reference to ui extension service |
|
61 * @param aEngine Reference to engine object |
|
62 * @return New instance of this class |
|
63 */ |
|
64 static CVIMPSTUiBlockView* NewL( MxSPViewMapper& aMapper, |
|
65 MxSPContactManager& aContactManager, |
|
66 TUint aBlockViewId, |
|
67 CPbk2UIExtensionView& aView, |
|
68 CVIMPSTUIExtensionService& aServiceData, |
|
69 MVIMPSTEngine& aEngine, |
|
70 MVIMPSTCmdHandler& aCommandHandler ); |
|
71 |
|
72 |
|
73 |
|
74 public: // From MPbk2UIExtensionView through CxSPBaseView |
|
75 |
|
76 /** |
|
77 * @see MPbk2UIExtensionView |
|
78 */ |
|
79 void DoDeactivate(); |
|
80 |
|
81 /** |
|
82 * @see MPbk2UIExtensionView |
|
83 */ |
|
84 void HandleCommandL( TInt aCommand ); |
|
85 /** |
|
86 * @see MPbk2UIExtensionView |
|
87 */ |
|
88 void DynInitMenuPaneL( TInt aResourceId, |
|
89 CEikMenuPane* aMenuPane ); |
|
90 |
|
91 /** |
|
92 * @see MPbk2UIExtensionView |
|
93 */ |
|
94 void HandleStatusPaneSizeChange(); |
|
95 |
|
96 //From MVIMPSTCmdObserver |
|
97 |
|
98 /** |
|
99 *@see MVIMPSTCmdObserver |
|
100 */ |
|
101 void CommandFinishedL( const MVIMPSTCmd& aCommand ); |
|
102 |
|
103 /** |
|
104 *@see MVIMPSTCmdObserver |
|
105 */ |
|
106 void HandleCommandEventL( TVIMPSTEnums::TVIMPSTRegistrationState aState, |
|
107 TInt aServiceError) ; |
|
108 |
|
109 //from MVIMPSTEngineBlockedListFetchEventObserver. |
|
110 /** |
|
111 *@see MVIMPSTEngineBlockedListFetchEventObserver |
|
112 */ |
|
113 void HandleBlockedListFetchCompleteL() ; |
|
114 private: // From CxSPBaseView |
|
115 |
|
116 /** |
|
117 * @see CxSPBaseView |
|
118 */ |
|
119 void DoActivateViewL( const TVwsViewId& aPrevViewId, |
|
120 TUid aCustomMessageId, |
|
121 const TDesC8& aCustomMessage ); |
|
122 |
|
123 |
|
124 /** |
|
125 * This function updates text to navi pane |
|
126 */ |
|
127 void UpdateNaviPaneTextL( ); |
|
128 |
|
129 void FetchBlockedListFromServerL(); |
|
130 |
|
131 private: |
|
132 |
|
133 /** |
|
134 * Standard C++ constructor |
|
135 * @param aMapper Reference to view mapper object |
|
136 * @param aContactManager Reference to contact manager object |
|
137 * @param aBlockViewId Block view id |
|
138 * @param aView Reference to Phonebook2-created view instance |
|
139 * @param aServiceData Reference to ui extension service |
|
140 * @param aEngine Reference to engine object |
|
141 */ |
|
142 CVIMPSTUiBlockView( MxSPViewMapper& aMapper, |
|
143 MxSPContactManager& aContactManager, |
|
144 TUint aBlockViewId, |
|
145 CPbk2UIExtensionView& aView, |
|
146 CVIMPSTUIExtensionService& aServiceData , |
|
147 MVIMPSTEngine& aEngine, |
|
148 MVIMPSTCmdHandler& aCommandHandler ); |
|
149 |
|
150 /** |
|
151 * Performs the 2nd phase of construction. |
|
152 */ |
|
153 void ConstructL(); |
|
154 |
|
155 /** |
|
156 * Standard C++ destructor. |
|
157 */ |
|
158 ~CVIMPSTUiBlockView(); |
|
159 |
|
160 private: // Data |
|
161 |
|
162 // Own: This view's control container |
|
163 CVIMPSTUiBlockViewControl* iContainer; |
|
164 |
|
165 // Stores view id |
|
166 TUint iBlockViewId; |
|
167 |
|
168 //Doesnt own - reference to engine for this service |
|
169 MVIMPSTEngine& iEngine; |
|
170 |
|
171 // Own: Used for navigation pane text |
|
172 CAknNavigationDecorator* iNaviDecorator; |
|
173 |
|
174 //doesnt own, refernec to extension service |
|
175 CVIMPSTUIExtensionService& iExtensionService; |
|
176 |
|
177 //Not owned; pointer to instance of prsece sub service |
|
178 MVIMPSTEnginePresenceSubService* iPresenceSubService; |
|
179 |
|
180 //Not owned; blocked list array pointer |
|
181 RPointerArray<HBufC>* iBlockedList; |
|
182 |
|
183 //Doesnt own - reference to Command handler for this service |
|
184 MVIMPSTCmdHandler& iCommandHandler; |
|
185 }; |
|
186 |
|
187 #endif // CVIMPSTUIBLOCKVIEW_H |
|
188 |
|
189 // End of File |