Kodi Development  20.0
for Binary and Script based Add-Ons
7. Power management events (optional)

Detailed Description

Used to notify the pvr addon for power management events
Used to allow any energy savings.


Power management events in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.

Header parts:

PVR_ERROR
Definition: pvr_general.h:35
virtual PVR_ERROR OnPowerSavingDeactivated()
To notify addon power saving on system is deactivated.
Definition: PVR.h:2287
virtual PVR_ERROR OnPowerSavingActivated()
To notify addon power saving on system is activated.
Definition: PVR.h:2279
virtual PVR_ERROR OnSystemSleep()
To notify addon about system sleep.
Definition: PVR.h:2263
virtual PVR_ERROR OnSystemWake()
To notify addon about system wake up.
Definition: PVR.h:2271

Source parts:

PVR_ERROR CMyInstance::OnSystemSleep()
{
}
PVR_ERROR CMyInstance::OnSystemWake()
{
}
PVR_ERROR CMyInstance::OnPowerSavingActivated()
{
}
PVR_ERROR CMyInstance::OnPowerSavingDeactivated()
{
}
@ PVR_ERROR_NOT_IMPLEMENTED
-2 : The method that Kodi called is not implemented by the add-on.
Definition: pvr_general.h:43

Modules

 Group header include
 
 Group source include
 

Function Documentation

◆ OnSystemSleep()

virtual PVR_ERROR OnSystemSleep ( )
inlinevirtual

To notify addon about system sleep.

Returns
PVR_ERROR_NO_ERROR If successfully done.

◆ OnSystemWake()

virtual PVR_ERROR OnSystemWake ( )
inlinevirtual

To notify addon about system wake up.

Returns
PVR_ERROR_NO_ERROR If successfully done.

◆ OnPowerSavingActivated()

virtual PVR_ERROR OnPowerSavingActivated ( )
inlinevirtual

To notify addon power saving on system is activated.

Returns
PVR_ERROR_NO_ERROR If successfully done.

◆ OnPowerSavingDeactivated()

virtual PVR_ERROR OnPowerSavingDeactivated ( )
inlinevirtual

To notify addon power saving on system is deactivated.

Returns
PVR_ERROR_NO_ERROR If successfully done.