wapstack/wapmessageapi/sws/WapSwsTimeout.cpp
branchRCL_3
changeset 18 50bae5c5c85f
equal deleted inserted replaced
17:3f227a47ad75 18:50bae5c5c85f
       
     1 // Copyright (c) 2001-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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Timeout.cpp
       
    15 // 
       
    16 //
       
    17 
       
    18 #include "WapSwsTimeOut.h"
       
    19 
       
    20 //
       
    21 // CTimeOutTimer: timer for comms time-outs
       
    22 //
       
    23 CTimeOutTimer::CTimeOutTimer(MTimeOutNotify& aTimeOutNotify)
       
    24 : CTimer(EPriorityStandard), iNotify(aTimeOutNotify)
       
    25     {
       
    26     }
       
    27 
       
    28 CTimeOutTimer::~CTimeOutTimer()
       
    29     {
       
    30 	Cancel();
       
    31     }
       
    32 
       
    33 CTimeOutTimer* CTimeOutTimer::NewL(MTimeOutNotify& aTimeOutNotify)
       
    34     {
       
    35     CTimeOutTimer *p = new (ELeave) CTimeOutTimer(aTimeOutNotify);
       
    36     CleanupStack::PushL(p);
       
    37 	p->ConstructL();
       
    38 	CleanupStack::Pop(p);
       
    39     return p;
       
    40     }
       
    41 
       
    42 void CTimeOutTimer::ConstructL()
       
    43     {
       
    44 	CTimer::ConstructL();
       
    45 	CActiveScheduler::Add(this);
       
    46     }
       
    47 
       
    48 void CTimeOutTimer::RunL()
       
    49     {
       
    50 	// Timer request has completed, so notify the timer's owner
       
    51 	iNotify.TimerExpired();
       
    52 	}