locationmanager/locationtrail/src/cpositioninfo.cpp
branchRCL_3
changeset 6 646a02f170b9
parent 3 6752808b2036
child 7 3cebc1a84278
--- a/locationmanager/locationtrail/src/cpositioninfo.cpp	Fri Feb 19 23:14:48 2010 +0200
+++ b/locationmanager/locationtrail/src/cpositioninfo.cpp	Fri Mar 12 15:44:28 2010 +0200
@@ -52,7 +52,7 @@
     // Set update interval.
     iUpdateOptions.SetUpdateInterval( TTimeIntervalMicroSeconds(KFirstInterval) );
     // Set time out level. 
-    iUpdateOptions.SetUpdateTimeOut( TTimeIntervalMicroSeconds(KUpdateTimeOut) );
+    iUpdateOptions.SetUpdateTimeOut( TTimeIntervalMicroSeconds(KFirstTimeOut) );
     // Positions which have time stamp below KMaxAge can be reused
     iUpdateOptions.SetMaxUpdateAge( TTimeIntervalMicroSeconds(KMaxAge) );
     // Disables location framework to send partial position data
@@ -72,7 +72,7 @@
 // CPositionInfo::~CPositionInfo
 // --------------------------------------------------------------------------
 //    
-CPositionInfo::~CPositionInfo()
+EXPORT_C CPositionInfo::~CPositionInfo()
     {
     Cancel();
     iPositioner.Close();
@@ -98,6 +98,8 @@
 
     iTrailCaptureSetting = aCaptureSetting;
     iUpdateInterval = aUpdateInterval;
+    iFirstInterval = ETrue;
+    iPositionInfo = TPositionSatelliteInfo();
     
     if ( aCaptureSetting == RLocationTrail::ECaptureAll ) 
     	{
@@ -150,7 +152,7 @@
     Cancel();
     
     iFirstInterval = ETrue;
-    iUpdateOptions.SetUpdateInterval( TTimeIntervalMicroSeconds(KFirstInterval) );
+    iUpdateOptions.SetUpdateInterval( TTimeIntervalMicroSeconds( KFirstInterval ) );
     
     iPositioner.Close();
     iPosServer.Close();
@@ -166,6 +168,7 @@
     if ( iFirstInterval && iTrailCaptureSetting == RLocationTrail::ECaptureAll )
     	{
     	iUpdateOptions.SetUpdateInterval( TTimeIntervalMicroSeconds( iUpdateInterval ) );
+    	iUpdateOptions.SetUpdateTimeOut( TTimeIntervalMicroSeconds( KUpdateTimeOut ) );
     	User::LeaveIfError( iPositioner.SetUpdateOptions( iUpdateOptions ) );
     	iFirstInterval = EFalse;
     	}