fixed type 'thresold' instead of 'threshold'
[psensor.git] / src / cfg.h
index 8b09a67..9c2a785 100644 (file)
--- a/src/cfg.h
+++ b/src/cfg.h
@@ -1,27 +1,31 @@
 /*
-    Copyright (C) 2010-2011 jeanfi@gmail.com
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301 USA
-*/
-
+ * Copyright (C) 2010-2012 jeanfi@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
 #ifndef _PSENSOR_CONFIG_H_
 #define _PSENSOR_CONFIG_H_
 
 #include "color.h"
 
+enum temperature_unit {
+       CELCIUS,
+       FAHRENHEIT
+};
+
 enum sensorlist_position {
        SENSORLIST_POSITION_RIGHT,
        SENSORLIST_POSITION_LEFT,
@@ -38,7 +42,7 @@ struct config {
        int alpha_channel_enabled;
 
        /*
-          Position of the sensors list table
+        * Position of the sensors list table
         */
        enum sensorlist_position sensorlist_position;
 
@@ -65,6 +69,8 @@ struct config {
        int unity_launcher_count_disabled;
 
        int hide_on_startup;
+
+       enum temperature_unit temperature_unit;
 };
 
 /*
@@ -72,25 +78,26 @@ struct config {
 */
 struct config *config_load();
 
-void config_save(struct config *);
-
-void config_init();
+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_limit(char *, int);
-void config_set_sensor_alarm_limit(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_enabled(char *);
-void config_set_sensor_alarm_enabled(char *, int);
+int config_get_sensor_alarm_enabled(const char *);
+void config_set_sensor_alarm_enabled(const char *, int);
 
-int config_is_sensor_enabled(char *);
-void config_set_sensor_enabled(char *, int);
+int config_is_sensor_enabled(const char *);
+void config_set_sensor_enabled(const char *, int);
 
-char *config_get_sensor_name(char *);
-void config_set_sensor_name(char *, const char *);
+char *config_get_sensor_name(const char *);
+void config_set_sensor_name(const char *, const char *);
 
 #endif