Retrieve the current the battery information.
#include <bps/battery.h>
BPS_API int battery_get_info(battery_info_t **info)
BlackBerry 10.0.0
If this function successfully completes, this pointer is populated with the battery information. The caller must call the battery_free_info() function when finished with using the info value. If the function does not complete successfully, the pointer is set to NULL.
The battery_get_info() function gets the current battery information. Details about the battery can be extracted using the battery_info_get_*() functions. battery_free_info() must be used on the battery information structure when your application is finished using it.
BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.