00001 /* 00002 * ============================================================================== 00003 * Name : HWRMLight.h 00004 * Part of : HW Resource Manager / HWResourceManager 00005 * Interface : SDK 00006 * Description : This file contains the header of the 00007 * CHWRMLight class. 00008 * Version : %version: 6 % 00009 * 00010 * Copyright © 2002-2006 Nokia. All rights reserved. 00011 * This material, including documentation and any related 00012 * computer programs, is protected by copyright controlled by 00013 * Nokia. All rights are reserved. Copying, including 00014 * reproducing, storing, adapting or translating, any 00015 * or all of this material requires the prior written consent of 00016 * Nokia. This material also contains confidential 00017 * information which may not be disclosed to others without the 00018 * prior written consent of Nokia. 00019 * ============================================================================== 00020 */ 00021 00022 #ifndef HWRMLIGHT_H 00023 #define HWRMLIGHT_H 00024 00025 // INCLUDES 00026 #include <e32base.h> 00027 00028 // CONSTANTS 00029 00033 const TInt KHWRMLightMinIntensity = 1; 00034 00038 const TInt KHWRMLightMaxIntensity = 100; 00039 00043 const TInt KHWRMDefaultIntensity = 0; 00044 00048 const TInt KHWRMLightMaxDuration = (KMaxTInt / 1000) - 1; 00049 00053 const TInt KHWRMInfiniteDuration = 0; 00054 00058 const TInt KHWRMDefaultCycleTime = 0; 00059 00060 00061 // FORWARD DECLARATIONS 00062 class MHWRMLightObserver; 00063 00064 // CLASS DECLARATIONS 00065 00104 class CHWRMLight : public CBase 00105 { 00106 public: 00107 00111 enum TLightStatus 00112 { 00113 ELightStatusUnknown = 0, 00114 ELightOn, 00115 ELightOff, 00116 ELightBlink 00117 }; 00118 00129 enum TLightTarget 00130 { 00131 ENoTarget = 0x0, 00132 00133 00134 EPrimaryDisplay = 0x1, 00135 EPrimaryKeyboard = 0x2, 00136 EPrimaryDisplayAndKeyboard = 0x3, 00137 00138 00139 ESecondaryDisplay = 0x4, 00140 ESecondaryKeyboard = 0x8, 00141 ESecondaryDisplayAndKeyboard = 0xC, 00142 00143 00144 ECustomTarget1 = 0x10, 00145 ECustomTarget2 = 0x20, 00146 ECustomTarget3 = 0x40, 00147 ECustomTarget4 = 0x80 00148 00149 }; 00150 00151 public: // Constructors 00152 00161 IMPORT_C static CHWRMLight* NewL(); 00162 00172 IMPORT_C static CHWRMLight* NewLC(); 00173 00184 IMPORT_C static CHWRMLight* NewL(MHWRMLightObserver* aCallback); 00185 00197 IMPORT_C static CHWRMLight* NewLC(MHWRMLightObserver* aCallback); 00198 00199 public: // New functions 00200 00201 00226 virtual void ReserveLightL(TInt aTarget)=0; 00227 00272 virtual void ReserveLightL(TInt aTarget, TBool aRestoreState, TBool aForceNoCCoeEnv)=0; 00273 00287 virtual void ReleaseLight(TInt aTarget)=0; 00288 00289 00310 virtual void LightOnL(TInt aTarget) = 0; 00311 00342 virtual void LightOnL(TInt aTarget, 00343 TInt aDuration) = 0; 00344 00379 virtual void LightOnL(TInt aTarget, 00380 TInt aDuration, 00381 TInt aIntensity, 00382 TBool aFadeIn) = 0; 00383 00405 virtual void LightBlinkL(TInt aTarget) = 0; 00406 00438 virtual void LightBlinkL(TInt aTarget, 00439 TInt aDuration) = 0; 00440 00488 virtual void LightBlinkL(TInt aTarget, 00489 TInt aDuration, 00490 TInt aOnDuration, 00491 TInt aOffDuration, 00492 TInt aIntensity) = 0; 00493 00514 virtual void LightOffL(TInt aTarget) = 0; 00515 00545 virtual void LightOffL(TInt aTarget, 00546 TInt aDuration) = 0; 00547 00578 virtual void LightOffL(TInt aTarget, 00579 TInt aDuration, 00580 TBool aFadeOut) = 0; 00581 00594 virtual TLightStatus LightStatus(TInt aTarget) const = 0; 00595 00605 virtual TInt SupportedTargets() const = 0; 00606 }; 00607 00672 class MHWRMLightObserver 00673 { 00674 public: 00675 00688 virtual void LightStatusChanged(TInt aTarget, 00689 CHWRMLight::TLightStatus aStatus) = 0; 00690 }; 00691 00692 00693 // HWRMLIGHT_H 00694 #endif 00695 00696 // End of File