00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef HWRMLIGHT_H
00023 #define HWRMLIGHT_H
00024
00025
00026 #include <e32base.h>
00027
00028
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
00062 class MHWRMLightObserver;
00063
00064
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
00164 ESystemTarget = 0x80000000
00165 };
00166
00167 public:
00168
00177 IMPORT_C static CHWRMLight* NewL();
00178
00188 IMPORT_C static CHWRMLight* NewLC();
00189
00200 IMPORT_C static CHWRMLight* NewL(MHWRMLightObserver* aCallback);
00201
00213 IMPORT_C static CHWRMLight* NewLC(MHWRMLightObserver* aCallback);
00214
00215 public:
00216
00217
00242 virtual void ReserveLightL(TInt aTarget)=0;
00243
00288 virtual void ReserveLightL(TInt aTarget, TBool aRestoreState, TBool aForceNoCCoeEnv)=0;
00289
00303 virtual void ReleaseLight(TInt aTarget)=0;
00304
00305
00326 virtual void LightOnL(TInt aTarget) = 0;
00327
00358 virtual void LightOnL(TInt aTarget,
00359 TInt aDuration) = 0;
00360
00395 virtual void LightOnL(TInt aTarget,
00396 TInt aDuration,
00397 TInt aIntensity,
00398 TBool aFadeIn) = 0;
00399
00421 virtual void LightBlinkL(TInt aTarget) = 0;
00422
00454 virtual void LightBlinkL(TInt aTarget,
00455 TInt aDuration) = 0;
00456
00504 virtual void LightBlinkL(TInt aTarget,
00505 TInt aDuration,
00506 TInt aOnDuration,
00507 TInt aOffDuration,
00508 TInt aIntensity) = 0;
00509
00530 virtual void LightOffL(TInt aTarget) = 0;
00531
00561 virtual void LightOffL(TInt aTarget,
00562 TInt aDuration) = 0;
00563
00594 virtual void LightOffL(TInt aTarget,
00595 TInt aDuration,
00596 TBool aFadeOut) = 0;
00597
00610 virtual TLightStatus LightStatus(TInt aTarget) const = 0;
00611
00621 virtual TInt SupportedTargets() const = 0;
00622 };
00623
00688 class MHWRMLightObserver
00689 {
00690 public:
00691
00704 virtual void LightStatusChanged(TInt aTarget,
00705 CHWRMLight::TLightStatus aStatus) = 0;
00706 };
00707
00708
00709
00710 #endif
00711
00712