/**
- * @brief Gets the battery charge percentage.
+ * @brief Gets the current device's battery charge percentage as an interger value.
* @details It returns an integer value from @c 0 to @c 100 that indicates remaining battery charge
* as a percentage of the maximum level.
* @since_tizen 2.3
+ * @remarks Ensure that the provided @a percent pointer is valid and has enough memory allocated.
* @param[out] percent The remaining battery charge percentage (@c 0 ~ @c 100)
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success, otherwise a negative error value
* @retval #DEVICE_ERROR_NONE Successful
* @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied
* @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
* @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
+ * @code
+ * #include <device/battery.h>
+ * ...
+ * int percent = 0;
+ * int ret = 0;
+ * ...
+ * ret = device_battery_get_info(&percent);
+ * ...
+ * @endcode
*/
int device_battery_get_percent(int *percent);
/**
- * @brief Gets the charging state.
+ * @brief Gets the current device's charging state which the battery is charging.
+ * @details Checks whether the battery is currently being charged or not.
* @since_tizen 2.3
+ * @remarks Ensure that the provided @a charging pointer is valid and has enough memory allocated.
* @param[out] charging The battery charging state
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success, otherwise a negative error value
* @retval #DEVICE_ERROR_NONE Successful
* @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
* @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
+ * @code
+ * #include <device/battery.h>
+ * ...
+ * bool is_charging = false;
+ * int ret = 0;
+ * ...
+ * ret = device_battery_is_charging(&is_charging);
+ * ...
+ * @endcode
* @see device_add_callback
* @see device_remove_callback
* @see #DEVICE_CALLBACK_BATTERY_CHARGING
/**
- * @brief Gets the battery level status.
+ * @brief Gets the current device's battery level status as a @a device_battery_level_e.
+ * @details Retrieves the current battery level status based on remaining battery capacity.
* @since_tizen 2.3
+ * @remarks Ensure that the provided @a status pointer is valid and has enough memory allocated.
* @param[out] status The battery level status
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success, otherwise a negative error value
* @retval #DEVICE_ERROR_NONE Successful
* @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
* @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
+ * @code
+ * #include <device/battery.h>
+ * ...
+ * device_battery_level_e batt_lev_status = DEVICE_BATTERY_LEVEL_EMPTY;
+ * int ret = 0;
+ * ...
+ * ret = device_battery_get_level_status(&batt_lev_status);
+ * ...
+ * @endcode
* @see device_battery_level_e
* @see device_add_callback
* @see device_remove_callback
/**
- * @brief Gets the battery health information.
+ * @brief Gets the current device's battery health information as a @a device_battery_health_e.
+ * @details Retrieves the current battery health status information (e.g., good, overheat, dead, etc).
* @since_tizen 3.0
+ * @remarks Ensure that the provided @a health pointer is valid and has enough memory allocated.
* @param[out] health The battery health information
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success, otherwise a negative error value
* @retval #DEVICE_ERROR_NONE Successful
* @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
* @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
+ * @code
+ * #include <device/battery.h>
+ * ...
+ * device_battery_health_e batt_health = DEVICE_BATTERY_HEALTH_GOOD;
+ * int ret = 0;
+ * ...
+ * ret = device_battery_get_health(&batt_health);
+ * ...
+ * @endcode
+ * @see device_battery_health_e
*/
int device_battery_get_health(device_battery_health_e *health);
/**
- * @brief Gets the battery power source information.
+ * @brief Gets the current device's power source information from the battery.
+ * @details Retrieves the current battery power source information (e.g., ac, usb, etc).
* @since_tizen 3.0
+ * @remarks Ensure that the provided @a source pointer is valid and has enough memory allocated.
* @param[out] source The battery power source information
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success, otherwise a negative error value
* @retval #DEVICE_ERROR_NONE Successful
* @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
* @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
+ * @code
+ * #include <device/battery.h>
+ * ...
+ * device_battery_power_source_e batt_power_src = DEVICE_BATTERY_POWER_SOURCE_NONE;
+ * int ret = 0;
+ * ...
+ * ret = device_battery_get_power_source(&batt_power_src);
+ * ...
+ * @endcode
+ * @see device_battery_power_source_e
*/
int device_battery_get_power_source(device_battery_power_source_e *source);
/**
- * @brief Gets the battery properties.
+ * @brief Gets the current device's specified battery property as an interger value.
+ * @details Retrieves the current battery property information (e.g., capacity, current_average, temperature, etc).
* @since_tizen 3.0
+ * @remarks Ensure that the provided @a value pointer is valid and has enough memory allocated.
* @param[in] property The property type
* @param[out] value The battery information for the property given
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success, otherwise a negative error value
* @retval #DEVICE_ERROR_NONE Successful
* @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
* @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
+ * @code
+ * #include <device/battery.h>
+ * ...
+ * int value = 0;
+ * int ret = 0;
+ * ...
+ * ret = device_battery_get_property(DEVICE_BATTERY_PROPERTY_CAPACITY, &value);
+ * ...
+ * @endcode
+ * @see device_battery_property_e
*/
int device_battery_get_property(device_battery_property_e property, int *value);
/**
- * @brief Gets the battery status information.
+ * @brief Gets the current device's battery status according to the degree of charge.
+ * @details Retrieves the current battery status information (e.g., charging, discharging, full, etc).
* @since_tizen 3.0
+ * @remarks Ensure that the provided @a status pointer is valid and has enough memory allocated.
* @param[out] status The battery status information
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success, otherwise a negative error value
* @retval #DEVICE_ERROR_NONE Successful
* @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
* @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
+ * @code
+ * #include <device/battery.h>
+ * ...
+ * device_battery_status_e batt_status = DEVICE_BATTERY_STATUS_CHARGING;
+ * int ret = 0;
+ * ...
+ * ret = device_battery_get_property(&batt_status);
+ * ...
+ * @endcode
+ * @see device_battery_status_e
*/
int device_battery_get_status(device_battery_status_e *status);