110 // --------------------------------------------------------------------------- |
111 // --------------------------------------------------------------------------- |
111 // Add the command handlers |
112 // Add the command handlers |
112 // --------------------------------------------------------------------------- |
113 // --------------------------------------------------------------------------- |
113 // |
114 // |
114 EXPORT_C void CGlxGridViewPluginBase::AddCommandHandlersL() |
115 EXPORT_C void CGlxGridViewPluginBase::AddCommandHandlersL() |
115 { |
116 { |
116 TRACER("CGlxGridViewPluginBase::AddCommandHandlersL()"); |
117 TRACER("CGlxGridViewPluginBase::AddCommandHandlersL()"); |
117 #ifdef _DEBUG |
118 #ifdef _DEBUG |
118 TTime startTime; |
119 TTime startTime; |
119 GLX_LOG_INFO("CGlxGridViewPluginBase::AddCommandHandlersL()"); |
120 GLX_LOG_INFO("CGlxGridViewPluginBase::AddCommandHandlersL()"); |
120 startTime.HomeTime(); |
121 startTime.HomeTime(); |
121 #endif |
122 #endif |
122 |
123 TFileName uiutilitiesrscfile; |
123 GLX_LOG_INFO( "Adding CGlxCommandHandlerSlideshow" ); |
124 uiutilitiesrscfile.Append( |
124 iGridView->AddCommandHandlerL( |
125 CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL()); |
125 CGlxCommandHandlerSlideshow::NewL( iGridView, ETrue , EFalse ) ); |
126 |
126 |
127 GLX_LOG_INFO( "Adding CGlxCommandHandlerSlideshow" ); |
127 GLX_LOG_INFO("Adding CGlxCommandHandlerSend"); |
128 iGridView->AddCommandHandlerL(CGlxCommandHandlerSlideshow::NewL(iGridView, |
128 iGridView->AddCommandHandlerL(CGlxCommandHandlerSend::NewL(iGridView, ETrue)); |
129 ETrue, EFalse, uiutilitiesrscfile)); |
129 |
130 |
130 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer-Album"); |
131 GLX_LOG_INFO("Adding CGlxCommandHandlerSend"); |
131 iGridView->AddCommandHandlerL(CGlxCommandHandlerAddToContainer:: |
132 iGridView->AddCommandHandlerL(CGlxCommandHandlerSend::NewL(iGridView, |
132 NewAddToAlbumCommandHandlerL(iGridView, EFalse)); |
133 ETrue, uiutilitiesrscfile)); |
133 |
134 |
134 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer-Album SingleClick"); |
135 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer-Album"); |
135 iGridView->AddCommandHandlerL(CGlxCommandHandlerAddToContainer:: |
136 iGridView->AddCommandHandlerL( |
136 NewAddToAlbumSingleClickCommandHandlerL(iGridView, EFalse)); |
137 CGlxCommandHandlerAddToContainer::NewAddToAlbumCommandHandlerL( |
137 GLX_LOG_INFO("Adding CGlxCommandHandlerDetails"); |
138 iGridView, EFalse, uiutilitiesrscfile)); |
138 iGridView->AddCommandHandlerL(CGlxCommandHandlerDetails:: |
139 |
139 NewL(iGridView)); |
140 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer-Album SingleClick"); |
140 |
141 iGridView->AddCommandHandlerL( |
141 GLX_LOG_INFO("Adding CGlxCommandHandlerOpen"); |
142 CGlxCommandHandlerAddToContainer::NewAddToAlbumSingleClickCommandHandlerL( |
142 iGridView->AddCommandHandlerL(CGlxCommandHandlerOpen:: |
143 iGridView, EFalse, uiutilitiesrscfile)); |
143 NewL(iGridView)); |
144 GLX_LOG_INFO("Adding CGlxCommandHandlerDetails"); |
144 |
145 iGridView->AddCommandHandlerL(CGlxCommandHandlerDetails::NewL(iGridView, |
145 GLX_LOG_INFO("Adding CGlxCommandHandlerDelete"); |
146 uiutilitiesrscfile)); |
146 iGridView->AddCommandHandlerL(CGlxCommandHandlerDelete:: |
147 |
147 NewL(iGridView, EFalse, EFalse)); |
148 GLX_LOG_INFO("Adding CGlxCommandHandlerOpen"); |
148 |
149 iGridView->AddCommandHandlerL(CGlxCommandHandlerOpen::NewL(iGridView)); |
149 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer-Tag"); |
150 |
150 iGridView->AddCommandHandlerL(CGlxCommandHandlerAddToContainer:: |
151 GLX_LOG_INFO("Adding CGlxCommandHandlerDelete"); |
151 NewAddToTagCommandHandlerL(iGridView, EFalse)); |
152 iGridView->AddCommandHandlerL(CGlxCommandHandlerDelete::NewL(iGridView, |
152 |
153 EFalse, EFalse, uiutilitiesrscfile)); |
153 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer-Tag Single Click"); |
154 |
154 iGridView->AddCommandHandlerL(CGlxCommandHandlerAddToContainer:: |
155 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer-Tag"); |
155 NewAddToTagSingleClickCommandHandlerL(iGridView, EFalse)); |
156 iGridView->AddCommandHandlerL( |
156 // The AIW service handlers |
157 CGlxCommandHandlerAddToContainer::NewAddToTagCommandHandlerL( |
157 // ShowMap must be the first one |
158 iGridView, EFalse, uiutilitiesrscfile)); |
158 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwShowMap"); |
159 |
159 iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwShowMap:: |
160 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer-Tag Single Click"); |
160 NewL(iGridView, iResourceIds.iMenuId)); |
161 iGridView->AddCommandHandlerL( |
161 // Assign must be the second one |
162 CGlxCommandHandlerAddToContainer::NewAddToTagSingleClickCommandHandlerL( |
162 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwAssign"); |
163 iGridView, EFalse, uiutilitiesrscfile)); |
163 iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwAssign:: |
164 // The AIW service handlers |
164 NewL(iGridView, iResourceIds.iMenuId)); |
165 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwEdit"); |
165 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwEdit"); |
166 iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwEdit::NewL(iGridView)); |
166 iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwEdit:: |
167 |
167 NewL(iGridView)); |
168 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwEdit-Single Click"); |
168 |
169 iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwEdit::NewL(iGridView, |
169 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwEdit-Single Click"); |
170 ETrue)); |
170 iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwEdit:: |
171 |
171 NewL(iGridView, ETrue)); |
172 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwShareOnOvi"); |
172 |
173 iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwShareOnOvi::NewL( |
173 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwPrintPreview"); |
174 iGridView, iResourceIds.iMenuId, uiutilitiesrscfile)); |
174 iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwPrintPreview:: |
175 // End of AIW service handlers |
175 NewL(iGridView, iResourceIds.iMenuId)); |
176 |
176 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwShareOnOvi"); |
177 GLX_LOG_INFO("Adding CGlxCommandHandlerMarking"); |
177 iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwShareOnOvi:: |
178 iGridView->AddCommandHandlerL(CGlxCommandHandlerMarking::NewL(iGridView, |
178 NewL(iGridView, iResourceIds.iMenuId)); |
179 ETrue)); |
179 // End of AIW service handlers |
180 |
180 |
181 GLX_LOG_INFO("Adding CGlxCommandHandlerBack"); |
181 GLX_LOG_INFO("Adding CGlxCommandHandlerMarking"); |
182 iGridView->AddCommandHandlerL( |
182 iGridView->AddCommandHandlerL( CGlxCommandHandlerMarking::NewL( |
183 CGlxCommandHandlerBack::NewBackCommandHandlerL()); |
183 iGridView, ETrue ) ); |
|
184 |
|
185 GLX_LOG_INFO("Adding CGlxCommandHandlerBack"); |
|
186 iGridView->AddCommandHandlerL( |
|
187 CGlxCommandHandlerBack::NewBackCommandHandlerL()); |
|
188 |
|
189 GLX_LOG_INFO("Adding CGlxCommandHandlerMoreInfo"); |
|
190 iGridView->AddCommandHandlerL(CGlxCommandHandlerMoreInfo:: |
|
191 NewL(iGridView,EFalse)); |
|
192 GLX_LOG_INFO("Adding CGlxCommandHandlerHideUi"); |
|
193 iGridView->AddCommandHandlerL(CGlxCommandHandlerHideUi::NewL()); |
|
194 |
184 |
195 #ifdef GLX_GRID_VIEW_IMAGES_OR_VIDEOS_ONLY_FILTERING |
185 #ifdef GLX_GRID_VIEW_IMAGES_OR_VIDEOS_ONLY_FILTERING |
196 iGridView->AddCommandHandlerL( CGlxCommandHandlerFilterImagesOrVideos::NewL( iGridView ) ); |
186 iGridView->AddCommandHandlerL( CGlxCommandHandlerFilterImagesOrVideos::NewL( iGridView ) ); |
197 #endif |
187 #endif |
198 GLX_LOG_INFO("Adding CGlxCommandHandlerCopyToHomeNetwork"); |
188 |
199 iGridView->AddCommandHandlerL(CGlxCommandHandlerCopyToHomeNetwork::NewL(*iGridView)); |
189 GLX_LOG_INFO("Adding CGlxCommandHandlerUpload"); |
200 |
190 iGridView->AddCommandHandlerL(CGlxCommandHandlerUpload::NewL(iGridView, |
201 GLX_LOG_INFO("Adding CGlxCommandHandlerUpload"); |
191 ETrue)); |
202 iGridView->AddCommandHandlerL(CGlxCommandHandlerUpload::NewL(iGridView, ETrue)); |
192 |
203 |
|
204 //Fix for error ID EVTY-7M87LF |
193 //Fix for error ID EVTY-7M87LF |
205 //@ Registration of Video Playback Command handler has to before UPnP. |
194 //@ Registration of Video Playback Command handler has to before UPnP. |
206 //@ else UPnP will not get play command once video playback command is consumed. |
195 //@ else UPnP will not get play command once video playback command is consumed. |
207 GLX_LOG_INFO("Adding CGlxCommandHandlerVideoPlayback"); |
196 GLX_LOG_INFO("Adding CGlxCommandHandlerVideoPlayback"); |
208 iGridView->AddCommandHandlerL( |
197 iGridView->AddCommandHandlerL(CGlxCommandHandlerVideoPlayback::NewL( |
209 CGlxCommandHandlerVideoPlayback::NewL( iGridView ) ); |
198 iGridView)); |
210 |
|
211 //Fix for error ID EVTY-7M87LF |
|
212 //@ Registration of UPnP Command handler has to be after video play back command |
|
213 //@ priorty of command handling is last registered in first server basis. |
|
214 //@ UPnP will get play command first everytime, where it'll check for UPnP active. |
|
215 //@ if UPnP is active it'll consume the event, else it'll allow other registered command to execute it. |
|
216 GLX_LOG_INFO("Adding CGlxCommandHandlerShowVisUpnp"); |
|
217 iGridView->AddCommandHandlerL(CGlxCommandHandlerShowViaUpnp::NewL(iGridView, ETrue)); |
|
218 |
199 |
219 #ifdef _DEBUG |
200 #ifdef _DEBUG |
220 TTime stopTime; |
201 TTime stopTime; |
221 stopTime.HomeTime(); |
202 stopTime.HomeTime(); |
222 GLX_DEBUG2("CGlxGridViewPluginBase::AddCommandHandlersL() took <%d> us", |
203 GLX_DEBUG2("CGlxGridViewPluginBase::AddCommandHandlersL() took <%d> us", |
223 (TInt)stopTime.MicroSecondsFrom(startTime).Int64()); |
204 (TInt)stopTime.MicroSecondsFrom(startTime).Int64()); |
224 #endif |
205 #endif |
225 } |
206 } |
226 |
207 |
227 // --------------------------------------------------------------------------- |
208 // --------------------------------------------------------------------------- |
228 // GetResourceFilenameL |
209 // GetResourceFilenameL |
229 // --------------------------------------------------------------------------- |
210 // --------------------------------------------------------------------------- |
230 // |
211 // |