battery_get_info()

Retrieve the current the battery information.

Synopsis:

#include <bps/battery.h>
 
BPS_API int battery_get_info(battery_info_t **info)

Since:

BlackBerry 10.0.0

Arguments:

info

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.

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

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.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.