diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-74ACD63A-F45B-4F64-963B-0DCF0842A13B.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-74ACD63A-F45B-4F64-963B-0DCF0842A13B.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,34 @@ + + + + + +Creating +an instance +

Create a new instance of Extended Light API is using NewL() or NewLC() method. +If the instance require the status feedback from the lights, derive the instance +of the API from the MHWRMExtendedLight.

The following +code demonstrates how to create an instance of Extended Light API:

#include HWRMExtendedLight.h //Link against HWRMExtendedLightClient.lib. +class CNewApp : public CBase, + public MHWRMExtendedLightObserver + { + public: + CNewApp(); + ~CNewApp(); + void ConstructL(); + static CNewApp* NewL(); + // from MHWRMExtendedLightObserver + virtual void LightStatusChanged( TInt aTarget, + CHWRMExtendedLight::TLightStatus aStatus ); + private: + CHWRMExtendedLight* iLight; + }; +

Without a notification, the instance can be derived from CBase and +created using NewL() or NewLC().

CHWRMExtendedLight* light = CHWRMExtendedLight::NewLC(); // No callbacks
+
\ No newline at end of file