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