I want to query battery information on a Linux system without using /proc or /sys.
I have done some research and found out about power_supply.h. The header seems to contain the required information, but I'm not sure what to do.
How could I query the information in ex. POWER_SUPPLY_PROP_CURRENT_NOW?
EDIT:
I want to avoid using third party libraries like libupower-glib and only use what is available directly in the Linux kernel.