deviceencryption/DevEncUi/src/DevEncUiTimer.cpp
branchRCL_3
changeset 20 491b3ed49290
parent 19 95243422089a
child 21 65326cf895ed
equal deleted inserted replaced
19:95243422089a 20:491b3ed49290
     1 /*
       
     2 * Copyright (c) 2005 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 #include "DevEncUiTimer.h"
       
    19 #include "DevEncLog.h"
       
    20 
       
    21 // ================= MEMBER FUNCTIONS =======================
       
    22 //
       
    23 // ----------------------------------------------------------
       
    24 // CDevEncUiTimer::NewL
       
    25 // Instancies CDevEncUiTimer object
       
    26 // ----------------------------------------------------------
       
    27 //
       
    28 CDevEncUiTimer* CDevEncUiTimer::NewL( MDevEncUiTimerCallback* aCallback )
       
    29     {
       
    30     CDevEncUiTimer* self = new ( ELeave ) CDevEncUiTimer( aCallback );
       
    31     CleanupStack::PushL ( self );
       
    32     self->ConstructL();
       
    33     CleanupStack::Pop();
       
    34     return self;
       
    35     }
       
    36 
       
    37 // ----------------------------------------------------------
       
    38 // CDevEncUiTimer::ConstructL()
       
    39 // Initializes data objects
       
    40 // ----------------------------------------------------------
       
    41 //
       
    42 void CDevEncUiTimer::ConstructL()
       
    43     {
       
    44     CTimer::ConstructL();
       
    45     }
       
    46 
       
    47 // ----------------------------------------------------------
       
    48 // CDevEncUiTimer::CDevEncUiTimer()
       
    49 // Constructor
       
    50 // ----------------------------------------------------------
       
    51 //
       
    52 CDevEncUiTimer::CDevEncUiTimer( MDevEncUiTimerCallback* aCallback )
       
    53     : CTimer( EPriorityStandard ),
       
    54       iCallback( aCallback )
       
    55     {
       
    56     CActiveScheduler::Add( this );
       
    57     }
       
    58 
       
    59 // ----------------------------------------------------------
       
    60 // CDevEncUiTimer::CDevEncUiTimer()
       
    61 // Destructor
       
    62 // ----------------------------------------------------------
       
    63 //
       
    64 CDevEncUiTimer::~CDevEncUiTimer()
       
    65     {
       
    66     Cancel();
       
    67     }
       
    68 
       
    69 // ----------------------------------------------------------
       
    70 // CDevEncUiTimer::RunError()
       
    71 // CActive Object method
       
    72 // ----------------------------------------------------------
       
    73 //
       
    74 TInt CDevEncUiTimer::RunError( TInt aError )
       
    75     {
       
    76     return aError;
       
    77     }
       
    78 
       
    79 // ----------------------------------------------------------
       
    80 // CDevEncUiTimer::RunL()
       
    81 // CActive Object method
       
    82 // ----------------------------------------------------------
       
    83 //
       
    84 void CDevEncUiTimer::RunL()
       
    85     {
       
    86     DFLOG2( "CDevEncUiTimer::RunL, status %d", iStatus.Int()  );
       
    87     if ( iStatus == KErrNone )
       
    88         {
       
    89         iCallback->Timeout();
       
    90         }
       
    91     }
       
    92 
       
    93 // ----------------------------------------------------------
       
    94 // CDevEncUiTimer::DoCancel()
       
    95 // CActive Object method
       
    96 // ----------------------------------------------------------
       
    97 //
       
    98 void CDevEncUiTimer::DoCancel()
       
    99     {
       
   100     }
       
   101 
       
   102 // End of file