os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/src/MVSViewTicker.cpp
Update contrib.
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
15 // Part of the MVS Application for TechView
23 #include "MVSViewTicker.h"
30 //NewL(...) *** This method can LEAVE ***
32 // Factory constructor, sets up the ticker for the Set Position dialog
34 CMVSViewTicker* CMVSViewTicker::NewL(CMVSAppUi* aAppUi)
36 CMVSViewTicker* self = new(ELeave) CMVSViewTicker(aAppUi);
37 CleanupStack::PushL(self);
39 CleanupStack::Pop(self);
48 // Initialises the ticker with an interval and the dialog. This is where the
49 // ticker interval is set.
51 CMVSViewTicker::CMVSViewTicker(CMVSAppUi* aAppUi)
53 iTickInterval = 200000;
64 CMVSViewTicker::~CMVSViewTicker()
78 // Second-phase constructor, initialises the periodic member, and starts it
81 void CMVSViewTicker::ConstructL()
83 iPeriodic = CPeriodic::NewL(0);
84 iPeriodic->Start(iTickInterval,iTickInterval,TCallBack(Tick, this));
92 // The callback function, which is called upon a periodic timer event. This
93 // method calls the UpdatePositionViewL() in the AppUi
95 TInt CMVSViewTicker::Tick(TAny* aObject)
97 TRAPD(err,((CMVSViewTicker*)aObject)->iAppUi->UpdatePositionViewL());