locationmanager/locationtrail/src/cpositioninfo.cpp
branchRCL_3
changeset 8 6752808b2036
parent 0 c53acadfccc6
child 14 646a02f170b9
equal deleted inserted replaced
3:b73a2e62868f 8:6752808b2036
   147 //
   147 //
   148 void CPositionInfo::Stop()
   148 void CPositionInfo::Stop()
   149     {
   149     {
   150     Cancel();
   150     Cancel();
   151     
   151     
   152     // Start shutdown timer...
   152     iFirstInterval = ETrue;
       
   153     iUpdateOptions.SetUpdateInterval( TTimeIntervalMicroSeconds(KFirstInterval) );
       
   154     
   153     iPositioner.Close();
   155     iPositioner.Close();
   154     iPosServer.Close();
   156     iPosServer.Close();
   155     }    
   157     }    
   156         
   158         
   157 // --------------------------------------------------------------------------
   159 // --------------------------------------------------------------------------
   159 // --------------------------------------------------------------------------
   161 // --------------------------------------------------------------------------
   160 //
   162 //
   161 void CPositionInfo::RunL()
   163 void CPositionInfo::RunL()
   162     { 
   164     { 
   163     iTrail->Position( iPositionInfo, iStatus.Int() );
   165     iTrail->Position( iPositionInfo, iStatus.Int() );
   164     if ( iFirstInterval && IsActive() )
   166     if ( iFirstInterval && iTrailCaptureSetting == RLocationTrail::ECaptureAll )
   165     	{
   167     	{
   166     	Cancel();
   168     	iUpdateOptions.SetUpdateInterval( TTimeIntervalMicroSeconds( iUpdateInterval ) );
   167     	iUpdateOptions.SetUpdateInterval( iUpdateInterval );
   169     	User::LeaveIfError( iPositioner.SetUpdateOptions( iUpdateOptions ) );
   168         if ( iTrailCaptureSetting == RLocationTrail::ECaptureAll ) 
       
   169         	{
       
   170         	User::LeaveIfError( iPositioner.SetUpdateOptions( iUpdateOptions ) );
       
   171         	iPositioner.NotifyPositionUpdate( iPositionInfo, iStatus );
       
   172         	}
       
   173     	SetActive();
       
   174     	
       
   175     	iFirstInterval = EFalse;
   170     	iFirstInterval = EFalse;
   176     	}
   171     	}
   177     }    
   172     }    
   178 
   173 
   179 // --------------------------------------------------------------------------
   174 // --------------------------------------------------------------------------