Create a power client power session

Create a CHWRMPower object using NewL() or NewLC() with the required parameters. The parameters are pointers to an object that is derived from MHWRMBatteryPowerObserver .

The following code snippet demonstrates how to create an instance with notify handling for creating the power client session.

       
        
       
       Void CPowerApp::ConstructL()
    {
    //Create Power client.
    iPower = CHWRMPower::NewL( this, this );
    }
      

The CHWRMPower::NewL() API creates a power session for client and interacts with the battery.