|
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: View plugin base class of ECE's CCA-application |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CVIMPSTDETAILSVIEWPLUGIN_H |
|
20 #define CVIMPSTDETAILSVIEWPLUGIN_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include <ccappviewpluginbase.h> |
|
25 #include "mvimpstdetailsviewcontactobserver.h" |
|
26 #include "mvimpstdetailspresencehandler.h" |
|
27 |
|
28 // Forward declaration |
|
29 class CVIMPSTDetailsViewMenuHandler; |
|
30 class CVIMPSTDetailsViewBrandHandler; |
|
31 class MVIMPSTDetailsPresenceObserver; |
|
32 class MVIMPSTDetailsViewContactObserver; |
|
33 class MVIMPSTDetailsPresenceHandler; |
|
34 class CVIMPSTDetailsContactHandler; |
|
35 |
|
36 class MVPbkStoreContact; |
|
37 class MCCAParameter; |
|
38 class CAknIcon; |
|
39 |
|
40 |
|
41 /** |
|
42 * Class implementing CCCAppViewPluginBase interface. This is |
|
43 * the main class and controlling the other classes of the plugin. |
|
44 * |
|
45 * @lib vimpstdetailsviewplugin.dll |
|
46 * @since S60 v5.0 |
|
47 */ |
|
48 |
|
49 class CVIMPSTDetailsViewPlugin : public CCCAppViewPluginBase, |
|
50 public MVIMPSTDetailsPresenceObserver, |
|
51 public MVIMPSTDetailsViewContactObserver |
|
52 { |
|
53 public: |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 */ |
|
58 static CVIMPSTDetailsViewPlugin* NewL(TInt aServiceId); |
|
59 |
|
60 /** |
|
61 * Destructor. |
|
62 */ |
|
63 ~CVIMPSTDetailsViewPlugin(); |
|
64 |
|
65 private: |
|
66 |
|
67 // from base class CCCAppViewPluginBase |
|
68 |
|
69 /** |
|
70 * From CCCAppViewPluginBase |
|
71 * (see details from header) |
|
72 * @param aPluginParameter, reference to plugin parameter |
|
73 * @since S60 v5.0 |
|
74 */ |
|
75 void PreparePluginViewL(MCCAppPluginParameter& aPluginParameter); |
|
76 |
|
77 /** |
|
78 * From CCCAppViewPluginBase |
|
79 * (see details from header) |
|
80 * |
|
81 * Note: This will be removed. |
|
82 * @since S60 v5.0 |
|
83 */ |
|
84 TUid ImplementationUid(); |
|
85 |
|
86 /** |
|
87 * From CCCAppViewPluginBase |
|
88 * (see details from header) |
|
89 * @param aIconType, reference to icon type |
|
90 * @param aBitmap, reference to bitmap pointer |
|
91 * @param aBitmapMask, reference to mask pointer |
|
92 * @since S60 v5.0 |
|
93 */ |
|
94 void ProvideBitmapLC(TCCAppIconType aIconType, CFbsBitmap*& aBitmap, |
|
95 CFbsBitmap*& aBitmapMask); |
|
96 |
|
97 /** |
|
98 * From CCCAppViewPluginBase |
|
99 * NEW API |
|
100 * @param aIconType, reference to icon type |
|
101 * @param aIcon, reference to icon |
|
102 */ |
|
103 void ProvideBitmapL(TCCAppIconType aIconType, CAknIcon& aIcon); |
|
104 |
|
105 /** |
|
106 * From CCCAppViewPluginBase |
|
107 * (see details from header) |
|
108 * create the container class |
|
109 * @since S60 v5.0 |
|
110 */ |
|
111 void NewContainerL(); |
|
112 |
|
113 /** |
|
114 * From CCCAppViewPluginBase |
|
115 * (see details from header) |
|
116 * @param aResourceId, a resource id |
|
117 * @param aMenuPane, reference to menu pane |
|
118 * @since S60 v5.0 |
|
119 */ |
|
120 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
121 |
|
122 /** |
|
123 * From CCCAppViewPluginBase |
|
124 * (see details from header) |
|
125 * @param aCommand, a command id to handle |
|
126 * @since S60 v5.0 |
|
127 */ |
|
128 void HandleCommandL(TInt aCommand); |
|
129 |
|
130 /** |
|
131 * From CCCAppViewPluginBase |
|
132 * (see details from header) |
|
133 * @return the plugin uid |
|
134 * @since S60 v5.0 |
|
135 */ |
|
136 TUid Id() const; |
|
137 |
|
138 /** |
|
139 * From CCCAppViewPluginBase |
|
140 * @param aPrevViewId, previous view id |
|
141 * @param aCustomMessageId, a custom message id |
|
142 * @param aCustomMessage, a custom message |
|
143 */ |
|
144 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
145 TUid aCustomMessageId, |
|
146 const TDesC8& aCustomMessage ); |
|
147 |
|
148 /** |
|
149 * From CCCAppViewPluginBase |
|
150 */ |
|
151 void DoDeactivate(); |
|
152 |
|
153 public: // new |
|
154 |
|
155 /** |
|
156 * Helper function for get the reference |
|
157 * to container data. |
|
158 * |
|
159 * @since S60 v5.0 |
|
160 * return container |
|
161 */ |
|
162 inline const CCCAppViewPluginAknContainer& GetContainer() |
|
163 { |
|
164 return *iContainer; |
|
165 } |
|
166 /** |
|
167 * Helper function for get contact handler |
|
168 * |
|
169 * @since S60 v5.0 |
|
170 * return iContactHandler |
|
171 */ |
|
172 CVIMPSTDetailsContactHandler* GetContactHandler(); |
|
173 |
|
174 public : // from MVIMPSTDetailsPresenceObserver |
|
175 |
|
176 /** from MVIMPSTDetailsPresenceObserver |
|
177 * notification call back from presence handler about presence change |
|
178 * @since s60 v5.0 |
|
179 */ |
|
180 void HandlePresenceChangedL() ; |
|
181 |
|
182 public : // MVIMPSTDetailsViewContactObserver |
|
183 |
|
184 /** |
|
185 * From MVIMPSTDetailsViewContactObserver |
|
186 * call back from contact manager |
|
187 * @param aContact, a contact fetched from store |
|
188 */ |
|
189 void HandleContactReadyL( MVPbkStoreContact& aContact ) ; |
|
190 |
|
191 /** |
|
192 * From MVIMPSTDetailsViewContactObserver |
|
193 * call back from contact manager |
|
194 * @param aContact, a contact fetched from store |
|
195 */ |
|
196 void HandleContactUnavailableL() ; |
|
197 |
|
198 private: // new |
|
199 |
|
200 /** |
|
201 * Helper function for reading and |
|
202 * loading resources needed by plugin. |
|
203 * |
|
204 * @since S60 v5.0 |
|
205 */ |
|
206 void PrepareViewResourcesL(); |
|
207 |
|
208 /** |
|
209 * default constructor |
|
210 * @since S60 v5.0 |
|
211 */ |
|
212 CVIMPSTDetailsViewPlugin(TInt aServiceId); |
|
213 |
|
214 /** |
|
215 * providing the two phase construction |
|
216 * @since S60 v5.0 |
|
217 */ |
|
218 void ConstructL(); |
|
219 |
|
220 /** |
|
221 * Helper function for reading |
|
222 * contact data from passed link . |
|
223 * @since S60 v5.0 |
|
224 */ |
|
225 void GetContactDataL(); |
|
226 |
|
227 |
|
228 /** |
|
229 * set title text |
|
230 * @since S60 v5.0 |
|
231 */ |
|
232 void SetTitleL(); |
|
233 |
|
234 |
|
235 private: // data |
|
236 |
|
237 /** |
|
238 * owns : pointer to commlauncher's menuhandler |
|
239 */ |
|
240 CVIMPSTDetailsViewMenuHandler* iMenuHandler; |
|
241 |
|
242 /** |
|
243 * not Owns : Pointer to launch parameter |
|
244 */ |
|
245 MCCAParameter* iLaunchParameter; |
|
246 |
|
247 /** |
|
248 * Owns : focus field index in the display list |
|
249 */ |
|
250 TInt iFocusedListIndex; |
|
251 |
|
252 /** |
|
253 * Owns : service id to use |
|
254 */ |
|
255 TInt iServiceId; |
|
256 /** |
|
257 * Owns : pointer to brand data handler |
|
258 */ |
|
259 CVIMPSTDetailsViewBrandHandler* iBrandHandler; |
|
260 |
|
261 /** |
|
262 * owned : pointer to presence handler |
|
263 */ |
|
264 MVIMPSTDetailsPresenceHandler* iPresenceHandler; |
|
265 |
|
266 /** |
|
267 * Owns : pointer to contact handling from virtual phonebook |
|
268 */ |
|
269 CVIMPSTDetailsContactHandler* iContactHandler; |
|
270 |
|
271 }; |
|
272 |
|
273 #endif // CVIMPSTDETAILSVIEWPLUGIN_H |
|
274 |
|
275 // End of File |