hotspotfw/internetconnectivitytestservice/src/ictspollingintervaltimer.cpp
changeset 0 56b72877c1cb
equal deleted inserted replaced
-1:000000000000 0:56b72877c1cb
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   Timer for polling interval
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "ictspollingintervaltimer.h"
       
    21 #include "ictspollingintervalobserver.h"
       
    22 #include "am_debug.h"
       
    23 
       
    24 
       
    25 // ======== MEMBER FUNCTIONS ========
       
    26 
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 // CIctsPollingIntervalTimer::CIctsPollingIntervalTimer
       
    30 // C++ default constructor can NOT contain any code, that
       
    31 // might leave.
       
    32 // ---------------------------------------------------------------------------
       
    33 //
       
    34 CIctsPollingIntervalTimer::CIctsPollingIntervalTimer( MIctsPollingIntervalObserver& aObserver )
       
    35 : CTimer( EPriorityStandard ), iObserver( aObserver )
       
    36     {
       
    37     
       
    38     }
       
    39 
       
    40 // ---------------------------------------------------------------------------
       
    41 // CIctsPollingIntervalTimer::ConstructL
       
    42 // ---------------------------------------------------------------------------
       
    43 //
       
    44 void CIctsPollingIntervalTimer::ConstructL()
       
    45     {
       
    46     DEBUG("CIctsPollingIntervalTimer::ConstructL()");
       
    47     CTimer::ConstructL();
       
    48     CActiveScheduler::Add(this);
       
    49     }
       
    50 
       
    51 
       
    52 // ---------------------------------------------------------------------------
       
    53 // CIctsPollingIntervalTimer::NewL
       
    54 // ---------------------------------------------------------------------------
       
    55 //
       
    56 CIctsPollingIntervalTimer* CIctsPollingIntervalTimer::NewL( MIctsPollingIntervalObserver& aObserver )
       
    57     {
       
    58     CIctsPollingIntervalTimer* self = new( ELeave ) CIctsPollingIntervalTimer( aObserver );
       
    59     CleanupStack::PushL( self );
       
    60     self->ConstructL();
       
    61     CleanupStack::Pop( self );
       
    62 
       
    63     return self;
       
    64     }
       
    65 
       
    66 
       
    67 // ---------------------------------------------------------------------------
       
    68 // CIctsPollingIntervalTimer::~CIctsPollingIntervalTimer
       
    69 // ---------------------------------------------------------------------------
       
    70 //
       
    71 CIctsPollingIntervalTimer::~CIctsPollingIntervalTimer()
       
    72     {
       
    73     CTimer::Cancel();
       
    74     }
       
    75 
       
    76 // ---------------------------------------------------------------------------
       
    77 // CIctsPollingIntervalTimer::RunL
       
    78 // ---------------------------------------------------------------------------
       
    79 //  
       
    80 void CIctsPollingIntervalTimer::RunL()
       
    81 	{
       
    82 	DEBUG("CIctsPollingIntervalTimer::RunL()");
       
    83     iObserver.PollingIntervalTimeout();
       
    84 	}    
       
    85 	
       
    86 //  End of File