clock2/clockui/uimodel/inc/clkuiidleobserver.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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 header file for CClkUiIdleObserver class.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CLKUI_IDLE_OBSERVER_H__
       
    19 #define __CLKUI_IDLE_OBSERVER_H__
       
    20 
       
    21 // System includes
       
    22 
       
    23 // User includes
       
    24 #include "clkuiintermediateobserver.h"
       
    25 
       
    26 // Forward declarations
       
    27 
       
    28 // Class declaration
       
    29 /**
       
    30 * @class CClkUiIdleObserver
       
    31 * @brief The idle observer class.
       
    32 * @dll clkuimodel
       
    33 */
       
    34 class CClkUiIdleObserver : public CClkUiMdlIntermediateObserver
       
    35     {
       
    36     public:         // Constructor and destructor.
       
    37     
       
    38         /**
       
    39         * @brief C++ default constructor.
       
    40         */
       
    41         IMPORT_C CClkUiIdleObserver();
       
    42 
       
    43         /**
       
    44         * @brief Destructor.
       
    45         */
       
    46         IMPORT_C ~CClkUiIdleObserver();
       
    47 
       
    48         /**
       
    49         * @brief The symbian OS 2nd phase constructor, can leave.
       
    50         * @param aObserver Observer of type MClkUiMdlObserver.
       
    51         * @param aPriority The priority.
       
    52         */
       
    53         IMPORT_C void ConstructL( MClkModelObserver* aObserver, TInt aPriority );
       
    54 
       
    55     public:         // Functions from base classes.
       
    56 
       
    57         /**
       
    58         * @brief From MClkUiMdlObserver. Called when the model is changed.
       
    59         * @param aReason The reason for notification.
       
    60         */
       
    61         IMPORT_C virtual void HandleUpdateL( TInt aReason );
       
    62         
       
    63     public:         // New functions
       
    64 
       
    65         /**
       
    66         * @brief Cancel any outstanding requests with the CIdle.
       
    67         */
       
    68         void CancelIdleRefresh();
       
    69 
       
    70     protected:      // New functions
       
    71 
       
    72         /**
       
    73         * @brief Cancel any outstanding requests with CIdle.
       
    74         */
       
    75         IMPORT_C virtual void DoIdleCancel();
       
    76 
       
    77         /**
       
    78         * @brief Notify the idle observer of the change.
       
    79         */
       
    80         IMPORT_C virtual void DoIdleNotifyL();
       
    81 
       
    82     private:        // New functions
       
    83 
       
    84         /**
       
    85         * @brief Starts the idle notification service.
       
    86         */
       
    87         void StartIdleRefresh();
       
    88 
       
    89         /**
       
    90         * @brief Callback from CIdle about any change.
       
    91         * @param aPtr Will be this object.
       
    92         * @return TInt
       
    93         */
       
    94         static TInt IdleCallBackL( TAny* aPtr );
       
    95 
       
    96     private:        // Data
       
    97 
       
    98         /**
       
    99         * @var iReason
       
   100         * @brief The reason for notification.
       
   101         */
       
   102         TInt            iReason;
       
   103         
       
   104         /**
       
   105         * @var iIdle
       
   106         * @brief The idle object, owned.
       
   107         */
       
   108         CIdle*          iIdle;
       
   109     };
       
   110 
       
   111 #endif      // __CLKUI_IDLE_OBSERVER_H__
       
   112 
       
   113 // End of file