javaextensions/satsa/pki/src.s60/timeouttimer.cpp
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2008 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "timeouttimer.h"
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 CTimeOutTimer::CTimeOutTimer(const TInt aPriority)
       
    25         : CTimer(aPriority)
       
    26 {
       
    27 }
       
    28 
       
    29 CTimeOutTimer::~CTimeOutTimer()
       
    30 {
       
    31     Cancel();
       
    32 }
       
    33 
       
    34 EXPORT_C CTimeOutTimer* CTimeOutTimer::NewL(const TInt aPriority, MTimeOutNotify& aTimeOutNotify)
       
    35 {
       
    36     CTimeOutTimer *p = new(ELeave) CTimeOutTimer(aPriority);
       
    37     CleanupStack::PushL(p);
       
    38     p->ConstructL(aTimeOutNotify);
       
    39     CleanupStack::Pop();
       
    40     return p;
       
    41 }
       
    42 
       
    43 void CTimeOutTimer::ConstructL(MTimeOutNotify &aTimeOutNotify)
       
    44 {
       
    45     iNotify=&aTimeOutNotify;
       
    46     CTimer::ConstructL();
       
    47     CActiveScheduler::Add(this);
       
    48 }
       
    49 
       
    50 void CTimeOutTimer::RunL()
       
    51 // Timer request has completed, so notify the timer's owner
       
    52 {
       
    53     iNotify->TimerExpired();
       
    54 }
       
    55 
       
    56 
       
    57 //  End of File