diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2012-04-16 17:16:57 +1000 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2012-04-16 17:16:57 +1000 |
commit | b7cfe33bba183652182e564d8f6898af11facaab (patch) | |
tree | 4974d9c586e268fc49c0f691ffcccaf9df77475f /src | |
parent | 096485dbc80481e5d7a0869b153dddbed653f717 (diff) | |
parent | becd957e209cf59c3bec7dba7e08c3a691419d47 (diff) |
Merge branch 'master' of scm.dev.nokia.troll.no:qtmobility/qtm-location into master-integration
* 'master' of scm.dev.nokia.troll.no:qtmobility/qtm-location:
Removed obsolete files in location (Symbian)
Diffstat (limited to 'src')
-rw-r--r-- | src/location/qmlTimer.cpp | 173 | ||||
-rw-r--r-- | src/location/qmlTimer.h | 130 |
2 files changed, 0 insertions, 303 deletions
diff --git a/src/location/qmlTimer.cpp b/src/location/qmlTimer.cpp deleted file mode 100644 index 0ea2564438..0000000000 --- a/src/location/qmlTimer.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qgeopositioninfosource_s60_p.h" -#include "qmlbackendao_s60_p.h" -#include <QDebug> -#include "qmltimer.h" - -QTM_BEGIN_NAMESPACE - -CQMLTimer::~CQMLTimer() -{ -} - -CQMLTimer::CQMLTimer(): -CTimer(CActive::EPriorityStandard), -mOperatingState(INITIAL) -{ -} - -CQMLTimer* CQMLTimer::NewL(QObject *aRequester) -{ -#if !defined QT_NO_DEBUG - qDebug() << "CQMLTimer::NewL\n" ; -#endif - CQMLTimer* self = CQMLTimer::NewLC(aRequester); - CleanupStack::Pop(); // self; - return self; -} - -CQMLTimer* CQMLTimer::NewLC(QObject *aRequester) -{ -#if !defined QT_NO_DEBUG - qDebug() << "CQMLTimer::NewLC\n" ; -#endif - CQMLTimer* self = new(ELeave) CQMLTimer(); - CleanupStack::PushL(self); - self->ConstructL(aRequester); - return self; -} - -void CQMLTimer::ConstructL(QObject *aRequester) -{ - CTimer::ConstructL(); - CActiveScheduler::Add(this); - mRequester = static_cast<CQGeoPositionInfoSourceS60*>(aRequester); - mIsTimerOn = false; - mTimerStopped = true; -} - -void CQMLTimer::RunL() -{ -#if !defined QT_NO_DEBUG - qDebug() << "CQMLTimer::RunL \n"; -#endif - - if (mIsTimerOn){ - - mTimerStopped = false; - - // states for timer operation - switch (mOperatingState){ - case CQMLTimer::HYBRID_RUNNING: - { - if (!mRequester->isUpdates()){ - CTimer::After(UPDATE_TIMER); - - #if !defined QT_NO_DEBUG - qDebug() << "Backup updates is on \n"; - #endif - } - break; - } - case CQMLTimer::HYBRID_STOPPED: - { - CTimer::After(UPDATE_TIMER); - break; - } - case CQMLTimer::HYBRID_RESTART: - { - mRequester->startBackupUpdate(); - break; - } - case CQMLTimer::INITIAL: - default: - break; - } - }else{ - // timer timesout and automatically stopped and not restarted - mTimerStopped = true; - } -} - -void CQMLTimer::DoCancel() -{ -#if !defined QT_NO_DEBUG - qDebug() << "CQMLTimer::DoCancel \n"; -#endif - // cancel is called during final exit - CTimer::Cancel(); - mOperatingState = CQMLTimer::INITIAL; -} - -bool CQMLTimer::StartTimer() -{ -#if !defined QT_NO_DEBUG - qDebug() << "CQMLTimer::StartTimer \n"; -#endif - CTimer::After(UPDATE_TIMER); - mIsTimerOn = true; - mTimerStopped = false; -} - -void CQMLTimer::StopTimer() -{ - mIsTimerOn = false; -} - -void CQMLTimer::setTrackState(int nTrackState) -{ - // set the state of the timer operation - mOperatingState = nTrackState; -} - -// -TInt CQMLTimer::RunError(TInt aError) -{ -#if !defined QT_NO_DEBUG - qDebug() << "CQMLBackendAO::RunError\n" ; -#endif - return aError; -} - -QTM_END_NAMESPACE - diff --git a/src/location/qmlTimer.h b/src/location/qmlTimer.h deleted file mode 100644 index e78e831e2d..0000000000 --- a/src/location/qmlTimer.h +++ /dev/null @@ -1,130 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QMLTIMER_H -#define QMLTIMER_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// -#include <e32base.h> // For CActive, link against: euser.lib -#include <lbs.h> -#include <lbscommon.h> - -QTM_BEGIN_NAMESPACE - -#define UPDATE_TIMER 5000000 - -class CQGeoPositionInfoSourceS60; - -class CQMLTimer : public CTimer -{ -public: - - enum OPERATING_STATE{ - INITIAL, - HYBRID_RUNNING, - HYBRID_STOPPED, - HYBRID_RESTART - }; - - // Cancel and destroy - ~CQMLTimer(); - - // Two-phased constructor. - static CQMLTimer* NewL(QObject *aRequester); - - // Two-phased constructor. - static CQMLTimer* NewLC(QObject *aRequester); - - bool StartTimer(); - - void StopTimer(); - - bool isTimerStopped(){ - return mTimerStopped; - }; - - void setTrackState(int nTrackState); - - int getTrackState(){ - return mOperatingState; - } - -private: - // From CActive - // Handle completion - void RunL(); - - // How to cancel me - void DoCancel(); - - // Override to handle leaves from RunL(). Default implementation causes - // the active scheduler to panic. - int RunError(int aError); - - -private: - CQMLTimer(); - void ConstructL(QObject *aRequester); - -private: - // Request is a device or a regular - CQGeoPositionInfoSourceS60 *mRequester; - - int mOperatingState; - - bool mIsTimerOn; - - bool mTimerStopped; - -}; - -QTM_END_NAMESPACE - -#endif // QMLTimer_H |