videocollection/mpxmyvideoscollection/src/vcxmyvideostimer.cpp
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     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 the License "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:    General purpose timer*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include "vcxmyvideostimer.h"
       
    23 
       
    24 // ========================= MEMBER FUNCTIONS ==================================
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // CVcxMyVideosTimer::NewL()
       
    28 // Two-phased constructor.
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 CVcxMyVideosTimer* CVcxMyVideosTimer::NewL(const TInt aPriority,
       
    32                                       MVcxMyVideosTimerObserver& aTimerObserver)
       
    33     {
       
    34     CVcxMyVideosTimer* self = CVcxMyVideosTimer::NewLC(aPriority, aTimerObserver );
       
    35     CleanupStack::Pop( self );
       
    36     return self;
       
    37     }
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // CVcxMyVideosTimer::NewLC()
       
    41 // Two-phased constructor.
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 CVcxMyVideosTimer* CVcxMyVideosTimer::NewLC(const TInt aPriority,
       
    45                                        MVcxMyVideosTimerObserver& aTimerObserver)
       
    46     {
       
    47     CVcxMyVideosTimer* self = new ( ELeave ) CVcxMyVideosTimer(aPriority, aTimerObserver);
       
    48     CleanupStack::PushL( self );
       
    49     self->ConstructL();
       
    50     return self;
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // CVcxMyVideosTimer::CVcxMyVideosTimer()
       
    55 // C++ default constructor can NOT contain any code, that might leave.
       
    56 // -----------------------------------------------------------------------------
       
    57 //
       
    58 CVcxMyVideosTimer::CVcxMyVideosTimer(const TInt aPriority,
       
    59                                 MVcxMyVideosTimerObserver& aTimerObserver)
       
    60 : CTimer( aPriority ), iObserver( aTimerObserver )
       
    61     {
       
    62     // No implementation required
       
    63     }
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // CVcxMyVideosTimer::ConstructL()
       
    67 // Symbian 2nd phase constructor can leave.
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 void CVcxMyVideosTimer::ConstructL()
       
    71     {
       
    72     CTimer::ConstructL();
       
    73     CActiveScheduler::Add( this );
       
    74     }
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 // CVcxMyVideosTimer::~CVcxMyVideosTimer()
       
    78 // Destructor.
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 CVcxMyVideosTimer::~CVcxMyVideosTimer()
       
    82     {
       
    83     // No implementation required
       
    84     }
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // CVcxMyVideosTimer::RunL()
       
    88 // Called when operation completes.
       
    89 // -----------------------------------------------------------------------------
       
    90 //
       
    91 void CVcxMyVideosTimer::RunL()
       
    92     {
       
    93     // Timer request has completed, so notify the timer's owner
       
    94     if ( iStatus == KErrNone )
       
    95         {
       
    96         iObserver.TimerExpired( this );
       
    97         }
       
    98     }
       
    99 
       
   100 // End of File