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
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.