diff options
Diffstat (limited to 'src/hardware/dmidecode.h')
-rw-r--r-- | src/hardware/dmidecode.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/hardware/dmidecode.h b/src/hardware/dmidecode.h index 34bfd47..a29d90d 100644 --- a/src/hardware/dmidecode.h +++ b/src/hardware/dmidecode.h @@ -141,6 +141,19 @@ typedef struct _DmiPointingDevice { unsigned buttons; /* Number of buttons */ } DmiPointingDevice; +/* Battery from dmidecode. */ +typedef struct _DmiBattery { + char *name; /* Battery name */ + char *chemistry; /* Battery chemistry */ + unsigned design_capacity; /* Design capacity */ + unsigned design_voltage; /* Design voltage */ + char *manufacturer; /* Manufacturer */ + char *serial_number; /* Serial number */ + char *version; /* Version */ + char *manufacture_date; /* Manufacture date */ + char *location; /* Battery location */ +} DmiBattery; + /* * Get array of processors according to the dmidecode program. * @param cpu array of cpus, this function will allocate necessary memory, @@ -263,5 +276,21 @@ short dmi_get_pointing_devices(DmiPointingDevice **devices, unsigned *devices_nb */ void dmi_free_pointing_devices(DmiPointingDevice **devices, unsigned *devices_nb); +/* + * Get array of batteries according to the dmidecode program. + * @param batteries array of batteries, this function will allocate necessary memory, + * but caller is responsible for freeing it + * @param batteries_nb number of batteries + * @return 0 if success, negative value otherwise + */ +short dmi_get_batteries(DmiBattery **batteries, unsigned *batteries_nb); + +/* + * Free array of batteries structures. + * @param batteries array of batteries + * @param batteries_nb number of batteries + */ +void dmi_free_batteries(DmiBattery **batteries, unsigned *batteries_nb); + #endif /* DMIDECODE_H_ */ |