MLPowerManagerCallbacks
Module: Power Manager
A structure containing Power Manager callback events. Individual callbacks which are not required by the Power Manager can be NULL. More...
#include <ml_power_manager.h>
Public Attributes
Type | Name |
---|---|
uint32_t | version |
void()(MLPowerManagerPowerState state, void user_data) | on_power_state_changed This callback will be invoked when MLPowerManagerPowerState changes. |
void()(const MLPowerManagerPropertyData properties, void *user_data) | on_properties_changed This callback will be invoked when MLPowerManagerPropertyData of a component changes. Only the properties that have changed will be returned, the component may support additional properties which values were not returned. |
void()(MLPowerManagerError error, void user_data) | on_error_occurred This callback will be invoked when an MLPowerManagerError occurs on one of the components. |
Detailed Description
struct MLPowerManagerCallbacks;
A structure containing Power Manager callback events. Individual callbacks which are not required by the Power Manager can be NULL.
API Level:
- 27
Public Attributes Documentation
version
uint32_t version;
Version of this structure.
on_power_state_changed
void(*)(MLPowerManagerPowerState state, void *user_data) on_power_state_changed;
This callback will be invoked when MLPowerManagerPowerState changes.
Type | Description |
---|---|
void()(MLPowerManagerPowerState state, void user_data) | )(MLPowerManagerPowerState state, void *user_data) |
Parameters
state | MLPowerManagerPowerState representing the new power state. | |
user_data | User data as passed to the MLPowerManagerSetCallbacks. |
on_properties_changed
void(*)(const MLPowerManagerPropertyData *properties, void *user_data) on_properties_changed;
This callback will be invoked when MLPowerManagerPropertyData of a component changes. Only the properties that have changed will be returned, the component may support additional properties which values were not returned.
Type | Description |
---|---|
void()(const MLPowerManagerPropertyData properties, void *user_data) | )(const MLPowerManagerPropertyData properties, void user_data) |
Parameters
properties | MLPowerManagerPropertyData struct encapsulating the properties changed. | |
user_data | User data as passed to the MLPowerManagerSetCallbacks. |
on_error_occurred
void(*)(MLPowerManagerError error, void *user_data) on_error_occurred;
This callback will be invoked when an MLPowerManagerError occurs on one of the components.
Type | Description |
---|---|
void()(MLPowerManagerError error, void user_data) | )(MLPowerManagerError error, void *user_data) |
Parameters
error | The error which has occurred. | |
user_data | User data as passed to the MLPowerManagerSetCallbacks. |