keepalive/flextimer/server/engine/src/flextimeritem.cpp
changeset 32 5c4486441ae6
equal deleted inserted replaced
31:c16e04725da3 32:5c4486441ae6
       
     1 /*
       
     2  * Copyright (c) 2010 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  * Description:
       
    13  * This class contains implementation of CFlexTimerItem.
       
    14  *
       
    15  */
       
    16 
       
    17 // System include files
       
    18 // None
       
    19 
       
    20 // User include files go here:
       
    21 #include "flextimeritem.h"
       
    22 #include "OstTraceDefinitions.h"
       
    23 #ifdef OST_TRACE_COMPILER_IN_USE
       
    24 #include "flextimeritemTraces.h"
       
    25 #endif
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 // constructor
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 CFlexTimerItem::CFlexTimerItem( const TTime& aAbsoluteMinTime,
       
    32     const TTime& aAbsoluteMaxTime,
       
    33     TBool aCancelAtSystemTimeChange,
       
    34     const MFlexTimerServiceCB* aFlexTimerServiceCB ) :
       
    35         iAbortAtSystemTimeChange( aCancelAtSystemTimeChange ),
       
    36         iAbsoluteMinTime( aAbsoluteMinTime ),
       
    37         iAbsoluteMaxTime( aAbsoluteMaxTime ),
       
    38         iMFlexTimerServiceCB( aFlexTimerServiceCB )
       
    39     {
       
    40     OstTraceExt5( TRACE_INTERNAL,
       
    41         CFLEXTIMERITEM_CFLEXTIMERITEM,
       
    42         "CFlexTimerItem::CFlexTimerItem;this=%x;aAbsoluteMinTime=%Ld;"
       
    43         "aAbsoluteMaxTime=%Ld;aCancelAtSystemTimeChange=%d;"
       
    44         "aFlexTimerServiceCB=%x",
       
    45         ( TUint )this,
       
    46         aAbsoluteMinTime.Int64(),
       
    47         aAbsoluteMaxTime.Int64(),
       
    48         aCancelAtSystemTimeChange,
       
    49         ( TUint )aFlexTimerServiceCB );
       
    50 
       
    51     // Nothing to do - Coverity warning of uninitialize iLink.Next suppressed,
       
    52     // because this should be initialized by TSglQueLink constructor.
       
    53     // coverity[uninit_member]
       
    54     }
       
    55 // ---------------------------------------------------------------------------
       
    56 // NewL
       
    57 // ---------------------------------------------------------------------------
       
    58 //
       
    59 CFlexTimerItem* CFlexTimerItem::NewL( const TTime& aAbsoluteMinTime,
       
    60     const TTime& aAbsoluteMaxTime,
       
    61     TBool aCancelAtSystemTimeChange,
       
    62     const MFlexTimerServiceCB* aFlexTimerServiceCB )
       
    63     {
       
    64     CFlexTimerItem* self = new (ELeave) CFlexTimerItem( aAbsoluteMinTime,
       
    65         aAbsoluteMaxTime,
       
    66         aCancelAtSystemTimeChange,
       
    67         aFlexTimerServiceCB );
       
    68 
       
    69     return self;
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // destructor, nothing to destruct
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 CFlexTimerItem::~CFlexTimerItem()
       
    77     {
       
    78         OstTraceExt2( TRACE_INTERNAL,
       
    79             DUP1_CFLEXTIMERITEM_CFLEXTIMERITEM,
       
    80             "CFlexTimerItem::~CFlexTimerItem;this=%x;iMFlexTimerServiceCB=%x",
       
    81             ( TUint )this,
       
    82             ( TUint )iMFlexTimerServiceCB );
       
    83     //Nothing to do here
       
    84     }
       
    85 // ---------------------------------------------------------------------------
       
    86 // GetCB
       
    87 // ---------------------------------------------------------------------------
       
    88 //
       
    89 const MFlexTimerServiceCB* CFlexTimerItem::GetCB()
       
    90     {
       
    91     return iMFlexTimerServiceCB;
       
    92     }