173 { |
173 { |
174 TRACER("CGlxCommandHandlerAiwShowMapHardKey::Deactivate"); |
174 TRACER("CGlxCommandHandlerAiwShowMapHardKey::Deactivate"); |
175 |
175 |
176 } |
176 } |
177 |
177 |
178 // The below code is commented out as this implementation is for Future commandhandler |
|
179 // To check map service providers |
|
180 // To navigate to the location |
|
181 |
|
182 /* |
|
183 // ----------------------------------------------------------------------------- |
|
184 // CGlxCommandHandlerAiwShowMapHardKey::NavigateToPlaceL |
|
185 // It will navigate to location |
|
186 // ----------------------------------------------------------------------------- |
|
187 void CGlxCommandHandlerAiwShowMapHardKey::NavigateToPlaceL( const TCoordinate& aCoordinate ) |
|
188 { |
|
189 CPosLandmark* lmk = CPosLandmark::NewLC(); |
|
190 TLocality locality; |
|
191 HBufC8* lmBuf; |
|
192 |
|
193 //set location |
|
194 locality.SetCoordinate( aCoordinate.Latitude(), aCoordinate.Longitude(), aCoordinate.Altitude() ); |
|
195 lmk->SetPositionL(locality); |
|
196 |
|
197 //set in parameters |
|
198 iInList->Reset(); |
|
199 lmBuf =PosLandmarkSerialization::PackL( *lmk ); |
|
200 CleanupStack::PushL( lmBuf ); |
|
201 TAiwGenericParam param( EGenericParamLandmark, TAiwVariant( *lmBuf ) ); |
|
202 iInList->AppendL( param ); |
|
203 TMnAiwCommonOptionsParam options; |
|
204 options.iRunChained = EFalse; |
|
205 TPckg<TMnAiwCommonOptionsParam> optionsPack( options ); |
|
206 TAiwGenericParam optParam( EGenericParamMnCommonOptions, TAiwVariant( optionsPack ) ); |
|
207 iInList->AppendL( optParam ); |
|
208 |
|
209 //navigate to location |
|
210 // iAiwServiceHandler->AttachL( R_EVTMGMTUI_AIW_INTEREST_NAVIGATETO ); |
|
211 iAiwServiceHandler->ExecuteServiceCmdL( KAiwCmdMnNavigateTo, *iInList, *iOutList, 0, this ); |
|
212 |
|
213 CleanupStack::PopAndDestroy( 2 ); //lmbuf, lmk |
|
214 } |
|
215 |
|
216 |
|
217 // ----------------------------------------------------------------------------- |
|
218 // CGlxCommandHandlerAiwShowMapHardKey::MapServiceProvidersL |
|
219 // It will return total map service providers. |
|
220 // @ret total number of map service providers |
|
221 // ----------------------------------------------------------------------------- |
|
222 // |
|
223 TInt CGlxCommandHandlerAiwShowMapHardKey::MapServiceProvidersL() |
|
224 { |
|
225 #if 0 |
|
226 RPointerArray<CMnProvider> providers; |
|
227 // get all providers |
|
228 MnProviderFinder::FindProvidersL( providers ); |
|
229 TInt total = providers.Count(); |
|
230 providers.ResetAndDestroy(); |
|
231 providers.Close(); |
|
232 // Debug(_L("Total map service providers = %d"), total); |
|
233 return total; |
|
234 #endif |
|
235 return 0; |
|
236 } |
|
237 */ |
|
238 // ----------------------------------------------------------------------------- |
|
239 // CGlxCommandHandlerAiwShowMapHardKey::HandleNotifyL |
|
240 // Derived from MAiwNotifyCallback |
|
241 // ----------------------------------------------------------------------------- |
|
242 //TInt CGlxCommandHandlerAiwShowMapHardKey::HandleNotifyL( TInt aCmdId, |
|
243 // TInt aEventId, |
|
244 // CAiwGenericParamList& aEventParamList, |
|
245 // const CAiwGenericParamList& aInParamList ) |
|
246 // { |
|
247 // if ( iOutList->Count() ) //if location is selected on map |
|
248 // { |
|
249 // const TAiwGenericParam& param = ( *iOutList )[0]; |
|
250 // if ( EGenericParamLandmark == param.SemanticId() ) |
|
251 // { |
|
252 // TPtrC8 landmarkData( param.Value().AsData() ); |
|
253 // CPosLandmark* lm = PosLandmarkSerialization::UnpackL( landmarkData ); |
|
254 // CleanupStack::PushL( lm ); |
|
255 // |
|
256 // SetPlaceFromLandmarkL( *lm ); |
|
257 // CleanupStack::PopAndDestroy( lm ); |
|
258 // iOutList->Reset(); |
|
259 // iObserver->HandleMapAndNavigationResponseL( KErrNone, *iPlace, iTriggerLocation ); |
|
260 // } |
|
261 // else |
|
262 // { |
|
263 // iOutList->Reset(); |
|
264 // iObserver->HandleMapAndNavigationResponseL( KErrCancel, *iPlace, iTriggerLocation ); |
|
265 // } |
|
266 // } |
|
267 // else //if map application is cancelled |
|
268 // iObserver->HandleMapAndNavigationResponseL( KErrCancel, *iPlace, iTriggerLocation ); |
|
269 // return KErrNone; |
|
270 // } |
|
271 |
|
272 // End of file |
178 // End of file |
273 |
179 |