photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowonmaphardkey.cpp
branchRCL_3
changeset 15 191387a8b767
parent 12 ce1c7ad1f18b
equal deleted inserted replaced
14:2dac0fdba72b 15:191387a8b767
   108 // DoExecuteL
   108 // DoExecuteL
   109 // ----------------------------------------------------------------------------
   109 // ----------------------------------------------------------------------------
   110 TBool CGlxCommandHandlerAiwShowMapHardKey::DoExecuteL (TInt /*aCommandId*/, MGlxMediaList& aList)
   110 TBool CGlxCommandHandlerAiwShowMapHardKey::DoExecuteL (TInt /*aCommandId*/, MGlxMediaList& aList)
   111     {
   111     {
   112     TRACER("CGlxCommandHandlerAiwShowMapHardKey::DoExecuteL");
   112     TRACER("CGlxCommandHandlerAiwShowMapHardKey::DoExecuteL");
   113     TBool handled = EFalse;
   113     
   114     TCoordinate coordinate; 
   114     // Show on Map Hard key is not there in 9.2.
   115     TInt focusIndex = aList.FocusIndex();
   115     // if need arises this can be readded from synergy: v7 of this file and older.   
   116     const TGlxMedia& item = aList.Item(focusIndex);
   116     return EFalse;
   117 
       
   118     if(item.GetCoordinate(coordinate))
       
   119         {
       
   120         CPosLandmark* lmk = CPosLandmark::NewLC();
       
   121         TLocality locality;
       
   122         HBufC8* lmBuf;
       
   123         
       
   124         //set location
       
   125         locality.SetCoordinate( coordinate.Latitude(), coordinate.Longitude(), 
       
   126                 coordinate.Altitude() );
       
   127      
       
   128         lmk->SetPositionL(locality);
       
   129         
       
   130         //set  in parameters
       
   131         iInList->Reset();
       
   132         lmBuf =PosLandmarkSerialization::PackL( *lmk );
       
   133         CleanupStack::PushL( lmBuf );
       
   134         TAiwGenericParam param( EGenericParamLandmark, TAiwVariant( *lmBuf ) );     
       
   135         iInList->AppendL( param );       
       
   136         TMnAiwCommonOptionsParam options;
       
   137         options.iRunChained = EFalse;
       
   138         TPckg<TMnAiwCommonOptionsParam> optionsPack( options );
       
   139         TAiwGenericParam optParam( EGenericParamMnCommonOptions, TAiwVariant( optionsPack ) );
       
   140         iInList->AppendL( optParam );
       
   141                 
       
   142         iAiwServiceHandler->ExecuteServiceCmdL( KAiwCmdMnShowMap, *iInList, *iOutList, 0); 
       
   143         
       
   144         CleanupStack::PopAndDestroy( lmBuf);
       
   145         CleanupStack::PopAndDestroy( lmk); 
       
   146         handled = ETrue;
       
   147         }
       
   148     else
       
   149         {
       
   150         // if location info not present then display note to put on camera settings
       
   151         HBufC* popupText = StringLoader::LoadLC(
       
   152                 R_GLX_POPUP_NO_LOCATION_INFO);                  
       
   153         GlxGeneralUiUtilities::ShowInfoNoteL( popupText->Des(), EFalse ); 
       
   154         CleanupStack::PopAndDestroy( popupText ); 
       
   155         }
       
   156     return handled;
       
   157     }
   117     }
   158 
   118 
   159 // ----------------------------------------------------------------------------
   119 // ----------------------------------------------------------------------------
   160 // DoActivateL
   120 // DoActivateL
   161 // ----------------------------------------------------------------------------
   121 // ----------------------------------------------------------------------------