idlefw/inc/framework/ailightstatusobserver.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Light status observer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AILIGHTSTATUSOBSERVER_H
       
    20 #define C_AILIGHTSTATUSOBSERVER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32property.h>
       
    24 #include <hwrmlight.h>
       
    25 #include "aidevicestatusobserver.h"
       
    26 
       
    27 class MAiStateManager;
       
    28 
       
    29 /**
       
    30  * @ingroup group_aifw
       
    31  * 
       
    32  *  Publish and subscribe key observer
       
    33  * 
       
    34  *  @lib aifw
       
    35  *  @since S60 3.2
       
    36  */
       
    37  
       
    38 NONSHARABLE_CLASS( CAiLightStatusObserver ) : public CBase,
       
    39                                               public MHWRMLightObserver,
       
    40                                               public MAiDeviceStatusObserver
       
    41     {
       
    42 public:
       
    43 
       
    44 // Construction
       
    45 
       
    46     static CAiLightStatusObserver* NewL( MAiStateManager* aStateManager );
       
    47 
       
    48     ~CAiLightStatusObserver();
       
    49 
       
    50 // functions from base class MAiDeviceStatusObserver
       
    51 
       
    52     TAiStateChanges Status();
       
    53 
       
    54 private:
       
    55 
       
    56 // Construction
       
    57     
       
    58     CAiLightStatusObserver();
       
    59     
       
    60     void ConstructL( MAiStateManager* aStateManager );
       
    61     
       
    62 // from MHWRMLightObserver
       
    63 
       
    64     void LightStatusChanged( TInt aTarget, CHWRMLight::TLightStatus aStatus );
       
    65     
       
    66 protected: // Data
       
    67 
       
    68     /**
       
    69      * Light client.
       
    70      * Own.
       
    71      */
       
    72     CHWRMLight* iLight;
       
    73 
       
    74     /**
       
    75      * State manager.
       
    76      * Not own.
       
    77      */
       
    78     MAiStateManager* iStateManager;
       
    79 
       
    80     };
       
    81 
       
    82 #endif // C_AILIGHTSTATUSOBSERVER_H
       
    83 
       
    84 // End of File.