calendarui/views/src/calenpreviewtimer.cpp
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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: Expiration timer for timed calendar events.
       
    15  *             Always set to expire by the next timed calendar event (for today).  
       
    16  *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 //debug
       
    22 #include "calendarui_debug.h"
       
    23 
       
    24 // INCLUDE FILES
       
    25 #include "calenpreviewtimer.h"
       
    26 
       
    27 
       
    28 // ============================ MEMBER FUNCTIONS ===============================
       
    29 
       
    30 void CCalenPreviewTimer::ConstructL(void)
       
    31 {
       
    32     TRACE_ENTRY_POINT;
       
    33     
       
    34     CTimer::ConstructL();
       
    35     CActiveScheduler::Add( this );
       
    36     
       
    37     TRACE_EXIT_POINT;
       
    38 }
       
    39 
       
    40 
       
    41 CCalenPreviewTimer* CCalenPreviewTimer::NewL(TCallBack& aCallBack)
       
    42 {
       
    43     TRACE_ENTRY_POINT;
       
    44     
       
    45     CCalenPreviewTimer* self = new( ELeave )CCalenPreviewTimer( aCallBack );
       
    46     CleanupStack::PushL( self );
       
    47     self->ConstructL();
       
    48     CleanupStack::Pop( self );
       
    49     
       
    50     TRACE_EXIT_POINT;
       
    51     return self;
       
    52 }
       
    53 
       
    54 
       
    55 CCalenPreviewTimer::CCalenPreviewTimer(TCallBack& aCallBack)
       
    56  : CTimer( CActive::EPriorityStandard ),
       
    57    iCallBack( aCallBack )
       
    58 {
       
    59     TRACE_ENTRY_POINT;
       
    60     TRACE_EXIT_POINT;
       
    61 }
       
    62 
       
    63 
       
    64 CCalenPreviewTimer::~CCalenPreviewTimer(void)
       
    65 {
       
    66     TRACE_ENTRY_POINT;
       
    67     
       
    68     Deque();
       
    69     
       
    70     TRACE_EXIT_POINT;
       
    71 }
       
    72 
       
    73 void CCalenPreviewTimer::RunL(void)
       
    74 {
       
    75     TRACE_ENTRY_POINT;
       
    76     
       
    77     iCallBack.CallBack();
       
    78     
       
    79     TRACE_EXIT_POINT;
       
    80 }
       
    81 
       
    82 // End of File