qtmobility/src/location/qmlbackendao_s60.cpp
branchGCC_SURGE
changeset 17 6745d806c5ff
parent 14 6fbed849b4f4
equal deleted inserted replaced
12:ce961d2c008b 17:6745d806c5ff
   403 // the time interval set is in milli seconds                      //
   403 // the time interval set is in milli seconds                      //
   404 //////////////////////////////////////////////////////////////
   404 //////////////////////////////////////////////////////////////
   405 int CQMLBackendAO::setUpdateInterval(int aMilliSec)
   405 int CQMLBackendAO::setUpdateInterval(int aMilliSec)
   406 {
   406 {
   407     int minimumUpdateInterval = 0;
   407     int minimumUpdateInterval = 0;
   408     TInt64 mUpdateInterval = 0;
   408     TInt64 mUpdateInterval = 0 ;
   409 
   409 
   410     if (mRequester)
   410     if (mRequester)
   411         minimumUpdateInterval = mRequester->minimumUpdateInterval();
   411         minimumUpdateInterval = mRequester->minimumUpdateInterval();
   412     else
   412     else
   413         minimumUpdateInterval = mRequesterSatellite->minimumUpdateInterval();
   413         minimumUpdateInterval = mRequesterSatellite->minimumUpdateInterval();
   442     // will set Either zero, minimum or +ve value
   442     // will set Either zero, minimum or +ve value
   443     // seconds converted to TTimeIntervalMicroSeconds
   443     // seconds converted to TTimeIntervalMicroSeconds
   444     aPosOption.SetUpdateInterval(TTimeIntervalMicroSeconds(mUpdateInterval * 1000));
   444     aPosOption.SetUpdateInterval(TTimeIntervalMicroSeconds(mUpdateInterval * 1000));
   445 
   445 
   446     // set the timeout to the smaller of 150% of interval or update interval + 10 seconds
   446     // set the timeout to the smaller of 150% of interval or update interval + 10 seconds
   447     TInt mUpdateTimeout = (mUpdateInterval * 3) / 2;
   447     TInt64 mUpdateTimeout = (mUpdateInterval * 3) / 2;
   448     if (mUpdateTimeout > mUpdateInterval + 10000)
   448     if (mUpdateTimeout > mUpdateInterval + 10000)
   449         mUpdateTimeout = mUpdateInterval + 10000;
   449         mUpdateTimeout = mUpdateInterval + 10000;
   450 
   450 
   451     if (aMilliSec > 0)
   451     if (aMilliSec > 0)
   452         aPosOption.SetUpdateTimeOut(TTimeIntervalMicroSeconds(mUpdateTimeout * 1000));
   452         aPosOption.SetUpdateTimeOut(TTimeIntervalMicroSeconds(mUpdateTimeout * 1000));