|
1 /* |
|
2 * Copyright (c) 2007-2007 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: Class implementing ccappcommlauncherplugin menu functionality |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CCAPPCOMMLAUNCHERMENUHANDLER_H |
|
20 #define C_CCAPPCOMMLAUNCHERMENUHANDLER_H |
|
21 |
|
22 #include <akninputblock.h> |
|
23 |
|
24 class CCCAppCommLauncherPlugin; |
|
25 class CAiwGenericParamList; |
|
26 class CAiwServiceHandler; |
|
27 class CCCAppCommLauncherPbkCmd; |
|
28 |
|
29 /** |
|
30 * Class implementing ccappcommlauncherplugin menu functionality |
|
31 * |
|
32 * @code |
|
33 * ?good_class_usage_example(s) |
|
34 * @endcode |
|
35 * |
|
36 * @lib ccappcommlauncherplugin.dll |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 class CCCAppCommLauncherMenuHandler: |
|
40 public CBase, |
|
41 public MAknInputBlockCancelHandler, |
|
42 public MAiwNotifyCallback |
|
43 { |
|
44 #ifdef __COMMLAUNCHERPLUGINUNITTESTMODE |
|
45 friend class T_CCCAppCommLauncherMenuHandler; |
|
46 #endif// __COMMLAUNCHERPLUGINUNITTESTMODE |
|
47 |
|
48 public: |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 */ |
|
53 static CCCAppCommLauncherMenuHandler* NewL( |
|
54 CCCAppCommLauncherPlugin& aPlugin ); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CCCAppCommLauncherMenuHandler(); |
|
60 |
|
61 public: // from base classes |
|
62 |
|
63 /** |
|
64 * From CCCAppViewPluginBase |
|
65 */ |
|
66 void DynInitMenuPaneL( |
|
67 TInt aResourceId, |
|
68 CEikMenuPane* aMenuPane ); |
|
69 |
|
70 /** |
|
71 * From CCCAppViewPluginBase |
|
72 */ |
|
73 void HandleCommandL( |
|
74 TInt aCommand ); |
|
75 |
|
76 /** |
|
77 * From MAiwNotifyCallback |
|
78 */ |
|
79 TInt HandleNotifyL( |
|
80 TInt aCmdId, |
|
81 TInt aEventId, |
|
82 CAiwGenericParamList& aEventParamList, |
|
83 const CAiwGenericParamList& aInParamList); |
|
84 /** |
|
85 * From MAknInputBlockCancelHandler |
|
86 */ |
|
87 void AknInputBlockCancel(); |
|
88 |
|
89 public: // new |
|
90 |
|
91 /** |
|
92 * Set the store from which the contact is from |
|
93 * |
|
94 * @since S60 v5.0 |
|
95 * @param aStore |
|
96 */ |
|
97 void SetContactStore( const TCmsContactStore& aStore ); |
|
98 |
|
99 private: |
|
100 |
|
101 /** |
|
102 * Prepares plugin for AIW-menu usage |
|
103 * |
|
104 * @since S60 v5.0 |
|
105 */ |
|
106 void PrepareAiwMenusL(); |
|
107 |
|
108 /** |
|
109 * Avkon-like DynInitMenuPaneL for switching appropriate |
|
110 * menu-options based on contact store type. |
|
111 * |
|
112 * @since S60 v5.0 |
|
113 * @param aMenuPane as menupane structure |
|
114 */ |
|
115 void SelectDynInitMenuPaneL( CEikMenuPane* aMenuPane ); |
|
116 |
|
117 /** |
|
118 * Avkon-like DynInitMenuPaneL for cases when contact is |
|
119 * found from local contact db |
|
120 * |
|
121 * @since S60 v5.0 |
|
122 * @param aMenuPane as menupane structure |
|
123 */ |
|
124 void PbkContactDynInitMenuPaneL( CEikMenuPane* aMenuPane ); |
|
125 |
|
126 /** |
|
127 * Avkon-like DynInitMenuPaneL for cases when contact is |
|
128 * found from SIM |
|
129 * |
|
130 * @since S60 v5.0 |
|
131 * @param aMenuPane as menupane structure |
|
132 */ |
|
133 void SimContactDynInitMenuPaneL( CEikMenuPane* aMenuPane ); |
|
134 |
|
135 /** |
|
136 * Avkon-like DynInitMenuPaneL for cases when contact is SDN contact |
|
137 * |
|
138 * @since S60 v5.0 |
|
139 * @param aMenuPane as menupane structure |
|
140 */ |
|
141 void SdnContactDynInitMenuPaneL( CEikMenuPane* aMenuPane ); |
|
142 |
|
143 /** |
|
144 * DynInit for "Select"-menu item |
|
145 * |
|
146 * @since S60 v5.0 |
|
147 * @param aMenuPane as menupane structure |
|
148 */ |
|
149 void DynInitSelectMenuItemL( CEikMenuPane* aMenuPane ); |
|
150 |
|
151 /** |
|
152 * DynInit for "Select other"-menu item |
|
153 * |
|
154 * @since S60 v5.0 |
|
155 * @param aMenuPane as menupane structure |
|
156 */ |
|
157 void DynInitSelectOtherMenuItemL( CEikMenuPane* aMenuPane ); |
|
158 |
|
159 /** |
|
160 * Commands for Options-menu items |
|
161 * |
|
162 * @since S60 v5.0 |
|
163 */ |
|
164 void DoSelectCmdL( TBool aUseDefaultAddress ); |
|
165 void DoEditCmdL(); |
|
166 void DoSetDefaultCmdL(); |
|
167 void DoShowOnMapCmdL(); |
|
168 void DoDeleteCmdL(); |
|
169 |
|
170 /** |
|
171 * Handlers for Aiw-based commands |
|
172 * |
|
173 * @since S60 v5.0 |
|
174 */ |
|
175 void DoAiwCommandL( TInt aCmdId, TInt aServiceId ); |
|
176 TInt PackedContactLinkArrayToInParamListLC( |
|
177 CAiwGenericParamList& aInParamList ); |
|
178 |
|
179 /** |
|
180 * Opens resource files and instanciates CPbk2ApplicationServices |
|
181 */ |
|
182 void PreparePbk2ApplicationServicesL(); |
|
183 |
|
184 /** |
|
185 * Avkon-like DynInitMenuPaneL for cases when contact is |
|
186 * found from xsp contact db |
|
187 * |
|
188 * @since S60 v5.0 |
|
189 * @param aMenuPane as menupane structure |
|
190 */ |
|
191 void XspContactDynInitMenuPaneL( CEikMenuPane* aMenuPane ); |
|
192 |
|
193 /** |
|
194 * Cancel Input Block if it exists |
|
195 * |
|
196 * @since S60 v5.0 |
|
197 */ |
|
198 void StopInputBlock(); |
|
199 private: // constructors |
|
200 |
|
201 CCCAppCommLauncherMenuHandler( CCCAppCommLauncherPlugin& aPlugin ); |
|
202 void ConstructL(); |
|
203 |
|
204 private:// data |
|
205 |
|
206 /** |
|
207 * Pointer to class handling the view |
|
208 * Not own. |
|
209 */ |
|
210 CCCAppCommLauncherPlugin& iPlugin; |
|
211 |
|
212 /** |
|
213 * Pointer to AIW service handler |
|
214 * Own. |
|
215 */ |
|
216 CAiwServiceHandler* iAiwServiceHandler; |
|
217 |
|
218 /** |
|
219 * A store where this contact is stored to |
|
220 */ |
|
221 TCmsContactStore iContactStore; |
|
222 |
|
223 /// Own: CCCAppCommLauncherPbkCmd |
|
224 CCCAppCommLauncherPbkCmd* iPbkCmd; |
|
225 /// Own: CAknInputBlock |
|
226 CAknInputBlock *iInputBlock; |
|
227 }; |
|
228 |
|
229 #endif // C_CCAPPCOMMLAUNCHERMENUHANDLER_H |