browserutilities/favouritesengine/ClientServer/srvsrc/Timeout.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 17 Dec 2009 09:20:16 +0200
changeset 25 0ed94ceaa377
parent 0 dd21522fd290
permissions -rw-r--r--
Revision: 200948 Kit: 200951

/*
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "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: 
*      Implementation of class CTimeout
*      
*
*/


// INCLUDE FILES

#include "Timeout.h"
#include "FavouritesLogger.h"
#include "FavouritesPanic.h"

// ================= MEMBER FUNCTIONS =======================

// ---------------------------------------------------------
// CTimeout::NewL()
// ---------------------------------------------------------
//
CTimeout* CTimeout::NewL( TInt aPriority, TCallBack aCallBack )
    {
    CTimeout* timeout = new (ELeave) CTimeout( aPriority, aCallBack );
    CleanupStack::PushL( timeout );
    timeout->ConstructL();
    CleanupStack::Pop( timeout );
    return timeout;
    }

// ---------------------------------------------------------
// CTimeout::~CTimeout()
// ---------------------------------------------------------
//
CTimeout::~CTimeout()
    {
    Cancel();
    }

// ---------------------------------------------------------
// CTimeout::RunL()
// ---------------------------------------------------------
//
void CTimeout::RunL()
    {
    FLOG(( _L("CTimeout::RunL iStatus(%d)"), iStatus.Int() ));
#ifdef _DEBUG
    TBool again =
#endif /* def _DEBUG */
    iCallBack.CallBack();
    // Assert that this is a "once-only" callback.
    __ASSERT_DEBUG( !again, FavouritesPanic( EFavouritesInternal ) );
    }

// ---------------------------------------------------------
// CTimeout::CTimeout()
// ---------------------------------------------------------
//
CTimeout::CTimeout( TInt aPriority, TCallBack aCallBack )
: CTimer( aPriority ), iCallBack( aCallBack )
    {
    CActiveScheduler::Add( this );
    }

//  End of File