--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/Phonebook2/tsrc/UT_AddFavoritiesVisibility/src/CCallbackTimer.cpp Tue Feb 02 10:12:17 2010 +0200
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2002 - 2007 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: UT_AddFavoritiesVisibility class member functions
+*
+*/
+
+
+#include "CCallbackTimer.h"
+
+
+CCallbackTimer::~CCallbackTimer()
+ {
+ if(iWait.IsStarted())
+ {
+ iWait.AsyncStop();
+ }
+ Cancel();
+ }
+
+
+CCallbackTimer::CCallbackTimer()
+: CTimer(CActive::EPriorityStandard)
+ {
+
+ }
+
+CCallbackTimer* CCallbackTimer::NewL()
+ {
+ CCallbackTimer* self= new(ELeave) CCallbackTimer;
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+
+ return self;
+ }
+
+void CCallbackTimer::ConstructL()
+ {
+ CActiveScheduler::Add(this);
+ CTimer::ConstructL();
+ }
+
+void CCallbackTimer::StartWaitingTillCallbackOrTimeOutL()
+ {
+ After(TTimeIntervalMicroSeconds32(1000000));
+ iWait.Start(); // can fallback to TestCombinationL
+ }
+
+void CCallbackTimer::CallbackReceived()
+ {
+ Cancel();
+ iWait.AsyncStop();
+ }
+
+void CCallbackTimer::RunL()
+ {
+ iWait.AsyncStop(); // can fallback to TestCombinationL
+ }
+
+
+