multimediacommsengine/mmcesrv/mmceserver/src/mcetimer.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2002-2003 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 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include "CMceTimer.h"
       
    23 
       
    24 // ================= MEMBER FUNCTIONS =======================
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // C++ default constructor can NOT contain any code, that
       
    28 // might leave.
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 CMceTimer::CMceTimer( const TInt aPriority, MTimeOutNotify& aNotify ) 
       
    32     : CTimer( aPriority ),
       
    33     iNotify( &aNotify )
       
    34     {
       
    35     }
       
    36 
       
    37 // ---------------------------------------------------------------------------
       
    38 // Symbian 2nd phase constructor can leave.
       
    39 // ---------------------------------------------------------------------------
       
    40 //
       
    41 void CMceTimer::ConstructL()
       
    42     {
       
    43     CTimer::ConstructL();
       
    44     CActiveScheduler::Add( this );
       
    45     }
       
    46 
       
    47 // ---------------------------------------------------------------------------
       
    48 // Two-phased constructor.
       
    49 // ---------------------------------------------------------------------------
       
    50 //
       
    51 CMceTimer* CMceTimer::NewL( const TInt aPriority, MTimeOutNotify& aNotify )
       
    52     {
       
    53     CMceTimer* self = new ( ELeave ) CMceTimer( aPriority, aNotify );
       
    54     CleanupStack::PushL( self );
       
    55     self->ConstructL();
       
    56     CleanupStack::Pop( self );
       
    57     return self;
       
    58     }
       
    59 
       
    60 // ---------------------------------------------------------------------------
       
    61 // Destructor
       
    62 // ---------------------------------------------------------------------------
       
    63 //
       
    64 CMceTimer::~CMceTimer()
       
    65     {
       
    66     Cancel();
       
    67     }
       
    68 
       
    69 // ---------------------------------------------------------------------------
       
    70 // CMceTimer::RunL()
       
    71 // 
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74 void CMceTimer::RunL()
       
    75     {
       
    76     iNotify->OnExpired( iStatus.Int() );
       
    77     }
       
    78     
       
    79 //  End of File
       
    80