use bool def from stdbool.h or define it if it does not exist
[psensor.git] / src / lib / psensor.h
index b04ca41..012bd12 100644 (file)
 #ifndef _PSENSOR_PSENSOR_H_
 #define _PSENSOR_PSENSOR_H_
 
-#include "config.h"
 #include <sensors/sensors.h>
 
+#include "config.h"
 #ifdef HAVE_ATASMART
 #include <atasmart.h>
 #endif
 
+#include "bool.h"
 #include "color.h"
 #include "log.h"
 #include "measure.h"
@@ -72,8 +73,8 @@ struct psensor {
        /* Color of the sensor used for the graph */
        struct color *color;
 
-       /* Whether the sensor is displayed in the graph */
-       int enabled;
+       /* Whether the graph sensor is displayed. */
+       bool enabled;
 
        /* see psensor_type */
        unsigned int type;
@@ -85,13 +86,13 @@ struct psensor {
        double min;
 
        /* Whether alarm alert is enabled for this sensor */
-       unsigned int alarm_enabled;
+       bool alarm_enabled;
 
-       int alarm_high_thresold;
-       int alarm_low_thresold;
+       int alarm_high_threshold;
+       int alarm_low_threshold;
 
-       /* Whether the current value is bigger than 'alarm_high_thresold'. */
-       int alarm_raised;
+       /* Whether an alarm is raised for this sensor */
+       unsigned int alarm_raised;
 
        void (*cb_alarm_raised) (struct psensor *, void *);
        void *cb_alarm_raised_data;
@@ -109,6 +110,8 @@ struct psensor {
 #endif
 
        char *url;
+
+       bool appindicator_enabled;
 };
 
 struct psensor *psensor_create(char *id,