diff -r 000000000000 -r 9cfd9a3ee49c locationmgmt/agpslocationmgr/inc/lbsautoclockadjust.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/agpslocationmgr/inc/lbsautoclockadjust.h Tue Feb 02 01:50:39 2010 +0200 @@ -0,0 +1,67 @@ +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +/** + @file + @internalTechnology +*/ +#ifndef LBS_AUTO_CLOCK_ADJUST_H +#define LBS_AUTO_CLOCK_ADJUST_H + +// System +#include +#include + +// Lbs +#include +#include +#include +#include + + +class CAutoClockAdjust : public CBase, public MLbsAdminObserver + { +public: + static CAutoClockAdjust* NewL(); + ~CAutoClockAdjust(); + + void LocationUpdate(TInt aStatus, TPositionSatelliteInfo& aPosInfo); + +protected: + CAutoClockAdjust(); + void ConstructL(); + + void ReadAdminSettingsL(); + void ReadLocalSettingsL(); + void WriteLastAutoAdjustTime(); + TInt CalculateTimeCorrection(const TPositionSatelliteInfo &aSatInfo, TTimeIntervalMicroSeconds &aTimeCorr); + +private: + // From MLbsAdminApiObserver + virtual void OnSettingUpdateEvent(TInt aError, const TLbsAdminSetting& aSetting); + + CLbsAdmin::TClockAdjust iClockAdjustSetting; + TLbsSetClockModuleId iSetClockModuleId; + TLbsTimeIntervalMilliSeconds iAdjustInterval; + TLbsTimeIntervalMilliSeconds iAdjustThreshold; + + TTime iLastAdjustment; + + CLbsAdmin* iAdmin; + CRepository* iCenRep; + CGPSSetClockBase* iSetClockImpl; + }; + +#endif // LBS_AUTO_CLOCK_ADJUST_H