#pragma once /** * @brief parse output of acpid * * @param str input from acpi socket * @param out the parsed version of it * @return 0 on success */ int acpi_parse(char *str, char **out); /** * @brief cleanup the results of acpi_parse * * @param out the pointer to the output from acpi_parse */ void acpi_clean_parse(char *out[4]); /** * @brief create a new acpi socket connection * * @param socket_file path to the socket file * @return the socket fd */ int acpi_create_socket(char *socket_file); /** * @brief close the socket connection * * @param sockfd the sockets fd * @return 0 on success 1 on error */ int acpi_close_socket(int sockfd);