int sol_power_supply_get_type(const char *name, enum sol_power_supply_type *type)
Get type of power supply (battery, USB, ...)
Definition: sol-power-supply.h:67
int sol_power_supply_get_voltage(const char *name, int *voltage)
Get current voltage.
Definition: sol-power-supply.h:50
int sol_power_supply_get_capacity(const char *name, int *capacity)
Get power supply capacity percentage.
Definition: sol-power-supply.h:57
Definition: sol-power-supply.h:85
Definition: sol-power-supply.h:86
int sol_power_supply_get_status(const char *name, enum sol_power_supply_status *status)
Get power supply status (charging, discharging, not charging, full).
int sol_power_supply_get_list_by_type(struct sol_ptr_vector *list, enum sol_power_supply_type type)
Retrieves a list of names of all power supplies found that match a specified type.
sol_power_supply_status
Power supply charging status.
Definition: sol-power-supply.h:65
Definition: sol-power-supply.h:69
int sol_power_supply_get_serial_number(const char *name, struct sol_buffer *serial_number_buf)
Get serial number of a given power supply.
int sol_power_supply_get_capacity_level(const char *name, enum sol_power_supply_capacity_level *capacity_level)
Get capacity level, as provided by driver (critical, low, normal, high, full).
Definition: sol-power-supply.h:56
int sol_power_supply_get_model_name(const char *name, struct sol_buffer *model_name_buf)
Get model name of a given power supply.
These are routines that Soletta provides for its buffer implementation.
int sol_power_supply_get_manufacturer(const char *name, struct sol_buffer *manufacturer_buf)
Get manufacturer of a given power supply.
Definition: sol-power-supply.h:54
Definition: sol-power-supply.h:51
Definition: sol-power-supply.h:52
int sol_power_supply_is_online(const char *name, bool *online)
Check if a power supply is online.
Definition: sol-power-supply.h:55
int sol_power_supply_get_max_voltage(const char *name, int *voltage)
Get maximum voltage measured by hardware.
Definition: sol-power-supply.h:53
sol_power_supply_type
Type of power supply.
Definition: sol-power-supply.h:49
int sol_power_supply_free_list(struct sol_ptr_vector *list)
Free a list of power supply names.
int sol_power_supply_is_present(const char *name, bool *present)
Check if a power supply is present.
Definition: sol-power-supply.h:84
Soletta pointer vector is a wrapper around vector with an API more convenient to handle pointers...
Definition: sol-vector.h:310
int sol_power_supply_get_max_voltage_design(const char *name, int *voltage)
Get value of voltage when supply is full as defined by design.
Definition: sol-power-supply.h:83
int sol_power_supply_get_min_voltage(const char *name, int *voltage)
Get minimum voltage measured by hardware.
Definition: sol-power-supply.h:66
Definition: sol-power-supply.h:88
These are routines that Soletta provides for its vector implementation.
A sol_buffer is a dynamic array, that can be resized if needed.
Definition: sol-buffer.h:130
int sol_power_supply_get_min_voltage_design(const char *name, int *voltage)
Get value of voltage when supply is empty as defined by design.
Definition: sol-power-supply.h:68
sol_power_supply_capacity_level
Power supply capacity level.
Definition: sol-power-supply.h:82
Definition: sol-power-supply.h:70
int sol_power_supply_exists(const char *name, bool *exist)
Check if a given power supply can be found.
Definition: sol-power-supply.h:87
int sol_power_supply_get_list(struct sol_ptr_vector *list)
Retrieves a list of names of all power supplies found.