iaupdate/IAD/backgroundchecker/inc/iaupdatebgremindertimer.h
branchRCL_3
changeset 26 8b7f4e561641
parent 0 ba25891c3a9e
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
       
     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 "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:   The main header file of background timer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef IAUPDATEBGREMINDERTIMER_H
       
    22 #define IAUPDATEBGREMINDERTIMER_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include "iaupdatebginternalfilehandler.h"
       
    26 
       
    27 
       
    28 // INCLUDE FILES 
       
    29 class MIAUpdateBGReminderTimerCallBack
       
    30     {
       
    31     public:
       
    32         virtual void ReminderTimerCallBack() = 0;
       
    33     };
       
    34 
       
    35 
       
    36 class CIAUpdateBGReminderTimer : public CTimer
       
    37             
       
    38     {
       
    39     public:
       
    40 
       
    41          static CIAUpdateBGReminderTimer* NewL( MIAUpdateBGReminderTimerCallBack* aCallback );  
       
    42         
       
    43          virtual ~CIAUpdateBGReminderTimer();   
       
    44           
       
    45          void StartReminderTimerL( TTimeIntervalMinutes& aTimetoWait );
       
    46          
       
    47          void CancelReminderTimerL();
       
    48          
       
    49     private:
       
    50     
       
    51         CIAUpdateBGReminderTimer( MIAUpdateBGReminderTimerCallBack* aCallback );
       
    52 
       
    53         void ConstructL();  
       
    54         
       
    55         void RunL();
       
    56   
       
    57         void DoCancel();
       
    58 
       
    59         TInt RunError(TInt aError);
       
    60         
       
    61         void StartL( TTimeIntervalMinutes aWaitTime );
       
    62         
       
    63         TTimeIntervalMicroSeconds32 ConvertToMicroseconds( TTimeIntervalMinutes aInterval );
       
    64 
       
    65     private:
       
    66 
       
    67         TTime iNextRemindTime;
       
    68         TInt iRuns;
       
    69         CIAUpdateBGInternalFileHandler* iInternalFile;
       
    70         MIAUpdateBGReminderTimerCallBack* iCallback; 
       
    71     };        
       
    72 
       
    73 #endif //IAUPDATEBGREMINDERTIMER_H