javaextensions/location/position/inc/cdelaystatechangetimer.h
changeset 21 2a9601315dfc
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     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:
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CDELAYSTATECHANGETIMER_H
       
    20 #define CDELAYSTATECHANGETIMER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 namespace java
       
    26 {
       
    27 namespace location
       
    28 {
       
    29 
       
    30 //  FORWARD DECLARATIONS
       
    31 class CLocationProvider;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36  *  Timer used to delay state changes.
       
    37  */
       
    38 class CDelayStateChangeTimer: public CTimer
       
    39 {
       
    40 public:
       
    41     // Constructors and destructor
       
    42 
       
    43     /**
       
    44      * Two-phased constructor.
       
    45      */
       
    46     static CDelayStateChangeTimer* NewL(CLocationProvider* aLocationProvider);
       
    47 
       
    48     /**
       
    49      * Destructor.
       
    50      */
       
    51     ~CDelayStateChangeTimer();
       
    52 
       
    53 public:
       
    54     // New functions
       
    55 
       
    56     void ChangeStateAfter(const TTimeIntervalMicroSeconds32& aInterval,
       
    57                           TInt aNewState);
       
    58 
       
    59 protected:
       
    60     // Functions from base classes
       
    61 
       
    62     /**
       
    63      * From CActive
       
    64      */
       
    65     void RunL();
       
    66 
       
    67 private:
       
    68 
       
    69     /**
       
    70      * C++ default constructor.
       
    71      */
       
    72     CDelayStateChangeTimer(CLocationProvider* aLocationProvider);
       
    73 
       
    74     // Prohibit copy constructor if not deriving from CBase.
       
    75     // ?classname( const ?classname& );
       
    76     // Prohibit assigment operator if not deriving from CBase.
       
    77     // ?classname& operator=( const ?classname& );
       
    78 
       
    79 private:
       
    80     // Data
       
    81     CLocationProvider* iLocationProvider;
       
    82     TInt iNewState;
       
    83 };
       
    84 
       
    85 }
       
    86 }
       
    87 #endif // CDELAYSTATECHANGETIMER_H
       
    88 // End of File