Refactroring headers

* Add include guards
* include glib.h in headers
This commit is contained in:
Shun Terabayashi 2020-10-04 14:41:35 +09:00
parent fa17e94b30
commit 3ada99c203
6 changed files with 40 additions and 0 deletions

View file

@ -1 +1,6 @@
#ifndef __ZENMONITOR_GUI_H__
#define __ZENMONITOR_GUI_H__
int start_gui();
#endif /* __ZENMONITOR_GUI_H__ */

View file

@ -1,4 +1,11 @@
#ifndef __ZENMONITOR_MSR_H__
#define __ZENMONITOR_MSR_H__
#include <glib.h>
gboolean msr_init();
void msr_update();
void msr_clear_minmax();
GSList* msr_get_sensors();
#endif /* __ZENMONITOR_MSR_H__ */

View file

@ -1,4 +1,11 @@
#ifndef __ZENMONITOR_OS_H__
#define __ZENMONITOR_OS_H__
#include <glib.h>
gboolean os_init(void);
void os_update(void);
void os_clear_minmax(void);
GSList* os_get_sensors(void);
#endif /* __ZENMONITOR_OS_H__ */

View file

@ -1,3 +1,8 @@
#ifndef __ZENMONITOR_SYSFS_H__
#define __ZENMONITOR_SYSFS_H__
#include <glib.h>
#define SYSFS_DIR_CPUS "/sys/devices/system/cpu"
struct cpudev {
@ -6,3 +11,5 @@ struct cpudev {
};
struct cpudev * get_cpu_dev_ids(void);
#endif /* __ZENMONITOR_SYSFS_H__ */

View file

@ -1,3 +1,8 @@
#ifndef __ZENMONITOR_ZENMONITOR_H__
#define __ZENMONITOR_ZENMONITOR_H__
#include <glib.h>
#define ERROR_VALUE -999.0
#define VERSION "1.4.2"
@ -28,3 +33,5 @@ gboolean check_zen();
gchar *cpu_model();
guint get_core_count();
extern gboolean display_coreid;
#endif /* __ZENMONITOR_ZENMONITOR_H__ */

View file

@ -1,4 +1,11 @@
#ifndef __ZENMONITOR_ZENPOWER_H__
#define __ZENMONITOR_ZENPOWER_H__
#include <glib.h>
gboolean zenpower_init();
GSList* zenpower_get_sensors();
void zenpower_update();
void zenpower_clear_minmax();
#endif /* __ZENMONITOR_ZENPOWER_H__ */