#ifndef _PSENSOR_CONFIG_H_
#define _PSENSOR_CONFIG_H_
+#include "bool.h"
#include "color.h"
enum temperature_unit {
double graph_bg_alpha;
- int alpha_channel_enabled;
+ bool alpha_channel_enabled;
/*
- Position of the sensors list table
+ * Position of the sensors list table
*/
enum sensorlist_position sensorlist_position;
- int window_decoration_enabled;
- int window_keep_below_enabled;
- int window_restore_enabled;
+ bool window_decoration_enabled;
+ bool window_keep_below_enabled;
+ bool window_restore_enabled;
/* Last saved position of the window. */
int window_x;
int window_y;
int sensor_values_max_length;
int sensor_update_interval;
- int menu_bar_disabled;
+ bool menu_bar_disabled;
- int unity_launcher_count_disabled;
+ bool unity_launcher_count_disabled;
int hide_on_startup;
enum temperature_unit temperature_unit;
+
+ bool slog_enabled;
};
/*
*/
struct config *config_load();
-void config_save(struct config *);
+void config_save(const struct config *);
void config_cleanup();
-struct color *config_get_sensor_color(char *, struct color *);
-void config_set_sensor_color(char *, struct color *);
+struct color *config_get_sensor_color(const char *sid, const struct color *);
+void config_set_sensor_color(const char *sid, const struct color *);
+
+int config_get_sensor_alarm_high_threshold(const char *);
+void config_set_sensor_alarm_high_threshold(const char *, int);
+
+int config_get_sensor_alarm_low_threshold(const char *);
+void config_set_sensor_alarm_low_threshold(const char *, int);
-int config_get_sensor_alarm_limit(char *, int);
-void config_set_sensor_alarm_limit(char *, int);
+bool config_get_sensor_alarm_enabled(const char *);
+void config_set_sensor_alarm_enabled(const char *, bool);
-int config_get_sensor_alarm_enabled(char *);
-void config_set_sensor_alarm_enabled(char *, int);
+bool config_is_sensor_enabled(const char *);
+void config_set_sensor_enabled(const char *, bool);
-int config_is_sensor_enabled(char *);
-void config_set_sensor_enabled(char *, int);
+char *config_get_sensor_name(const char *);
+void config_set_sensor_name(const char *, const char *);
-char *config_get_sensor_name(char *);
-void config_set_sensor_name(char *, const char *);
+bool config_is_appindicator_enabled(const char *);
+void config_set_appindicator_enabled(const char *, bool);
#endif