|
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: Class implementing ccappdetailsviewplugin menu functionality |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CCAPPDETAILSVIEWMENUHANDLER_H |
|
20 #define C_CCAPPDETAILSVIEWMENUHANDLER_H |
|
21 |
|
22 #include <mccappengine.h> |
|
23 |
|
24 class CCCAppDetailsViewPlugin; |
|
25 class CAiwServiceHandler; |
|
26 class CPbk2CommandHandler; |
|
27 class CMnProvider; |
|
28 |
|
29 /** |
|
30 * Class implementing ccappdetailsviewplugin menu functionality |
|
31 * |
|
32 * @code |
|
33 * ?good_class_usage_example(s) |
|
34 * @endcode |
|
35 * |
|
36 * @lib ccappdetailsviewplugin.dll |
|
37 */ |
|
38 class CCCAppDetailsViewMenuHandler : |
|
39 public CBase, |
|
40 public MAiwNotifyCallback |
|
41 { |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 static CCCAppDetailsViewMenuHandler* NewL(CCCAppDetailsViewPlugin& aPlugin); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 ~CCCAppDetailsViewMenuHandler(); |
|
53 |
|
54 public: // From CCCAppViewPluginBase |
|
55 |
|
56 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
57 |
|
58 void HandleCommandL(TInt aCommand); |
|
59 |
|
60 public: // From MAiwNotifyCallback |
|
61 |
|
62 TInt HandleNotifyL( |
|
63 TInt aCmdId, |
|
64 TInt aEventId, |
|
65 CAiwGenericParamList& aEventParamList, |
|
66 const CAiwGenericParamList& aInParamList); |
|
67 |
|
68 public: |
|
69 |
|
70 MCCAppEngine& AppEngine() |
|
71 { |
|
72 return *iAppEngine; |
|
73 } |
|
74 |
|
75 void SetAppEngine(MCCAppEngine* aAppEngine) |
|
76 { |
|
77 iAppEngine = aAppEngine; |
|
78 } |
|
79 |
|
80 /** |
|
81 * Resets the state in case of details view deactivation |
|
82 */ |
|
83 void Reset(); |
|
84 |
|
85 /** |
|
86 * Activates the state in case of details view activation |
|
87 */ |
|
88 void Activate(); |
|
89 |
|
90 private: // new |
|
91 |
|
92 /** |
|
93 * |
|
94 */ |
|
95 TBool IsFocusedFieldTypeL(TInt aSelectorResId); |
|
96 |
|
97 /** |
|
98 * |
|
99 */ |
|
100 TBool HasContactFieldTypeL(TInt aSelectorResId); |
|
101 |
|
102 /** |
|
103 * |
|
104 */ |
|
105 void PrepareAiwMenusL(); |
|
106 |
|
107 private: // Commands for Options-menu items |
|
108 |
|
109 void DoEditCmdL(); |
|
110 void DoViewImageCmdL(); |
|
111 void DoSendBusinessCardCmdL(); |
|
112 void DoTopContactCmdL(); |
|
113 void DoDeleteCmdL(); |
|
114 void DoCopyCmdL(); |
|
115 void DoCopyDetailCmdL(); |
|
116 void DoAssignSpeeddialCmdL(); |
|
117 void DoUnassignSpeeddialCmdL(); |
|
118 void DoSetDefaultCmdL(); |
|
119 void DoPrependCmdL(); |
|
120 void DoCopyAddressCmdL(); |
|
121 void DoCopyNumberCmdL(); |
|
122 void DoShowOnMapCmdL(); |
|
123 TBool HasAddressFieldL(); |
|
124 TBool IsAddressValidatedL(); |
|
125 |
|
126 /** |
|
127 * Handlers for Aiw-based commands |
|
128 * |
|
129 */ |
|
130 //void DoAiwCommandL( TInt aCmdId, TInt aServiceId ); |
|
131 |
|
132 private: // constructors |
|
133 |
|
134 CCCAppDetailsViewMenuHandler(CCCAppDetailsViewPlugin& aPlugin); |
|
135 |
|
136 void ConstructL(); |
|
137 |
|
138 private: // data |
|
139 |
|
140 /** |
|
141 * Pointer to class handling the view |
|
142 * Not own. |
|
143 */ |
|
144 CCCAppDetailsViewPlugin& iPlugin; |
|
145 |
|
146 /** |
|
147 * Pointer to AIW service handler |
|
148 * Own. |
|
149 */ |
|
150 CAiwServiceHandler* iAiwServiceHandler; |
|
151 |
|
152 /** |
|
153 * Pointer to Pbk2 command handler. |
|
154 * Own. |
|
155 */ |
|
156 CPbk2CommandHandler* iCommandHandler; |
|
157 |
|
158 /** |
|
159 * |
|
160 */ |
|
161 MCCAppEngine* iAppEngine; |
|
162 |
|
163 /** |
|
164 * Map View Provider |
|
165 * Own. |
|
166 */ |
|
167 CMnProvider* iMapViewProvider; |
|
168 |
|
169 }; |
|
170 |
|
171 #endif // C_CCAPPDETAILSVIEWMENUHANDLER_H |
|
172 |
|
173 // End of File |