btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSProgresstimer.h
changeset 32 19bd632b5100
equal deleted inserted replaced
31:a0ea99b6fa53 32:19bd632b5100
       
     1 /*
       
     2 * Copyright (c) 2002 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 
       
    19 #ifndef BTSPROGRESSTIMER_H
       
    20 #define BTSPROGRESSTIMER_H
       
    21 
       
    22 
       
    23 #include    <e32base.h>
       
    24 
       
    25 class MBTServiceObserver;
       
    26 
       
    27 // CLASS DECLARATION
       
    28 /**
       
    29 *  A timer class for updating progress dialog.
       
    30 */
       
    31 NONSHARABLE_CLASS( CBTSProgressTimer ) : public CTimer
       
    32     {
       
    33     public: // Constructors and destructor
       
    34 
       
    35         /**
       
    36         * Two-phased constructor.
       
    37         */                           
       
    38         static CBTSProgressTimer* NewL( MBTServiceObserver* aProgressObserverPtr );
       
    39         
       
    40         /**
       
    41         * Destructor.
       
    42         */
       
    43         virtual ~CBTSProgressTimer();
       
    44      
       
    45     public: // New functions
       
    46 
       
    47         /**
       
    48         * Sets the timeout of the timer.
       
    49         * @param aTimeout The timeout in microseconds.
       
    50         * @return None.
       
    51         */
       
    52         void SetTimeout( TTimeIntervalMicroSeconds32 aTimeout );
       
    53 
       
    54         /**
       
    55         * Restarts the timer.
       
    56         * @return None.
       
    57         */
       
    58         void Tickle();
       
    59 
       
    60     private: // Functions from base classes
       
    61 
       
    62         /**
       
    63         * From CTimer Get's called when the timer expires.        
       
    64         * @return None.
       
    65         */
       
    66         void RunL();
       
    67         
       
    68         TInt RunError( TInt aError );
       
    69 
       
    70     private:
       
    71 
       
    72         /**
       
    73         * C++ default constructor.
       
    74         */
       
    75         CBTSProgressTimer( MBTServiceObserver* aProgressObserverPtr );
       
    76         
       
    77         /**
       
    78         * By default Symbian OS constructor is private.
       
    79         */      
       
    80         void ConstructL();
       
    81 
       
    82     private: // Data
       
    83         TTimeIntervalMicroSeconds32 iTimeout;
       
    84         MBTServiceObserver* iProgressObserverPtr;
       
    85     };
       
    86 
       
    87 #endif      // BTSPROGRESSTIMER_H
       
    88             
       
    89 // End of File