Imported Upstream version 1.1.1
[psensor-pkg-ubuntu.git] / src / cfg.h
index a63bcb0..aac38de 100644 (file)
--- a/src/cfg.h
+++ b/src/cfg.h
 #ifndef _PSENSOR_CONFIG_H_
 #define _PSENSOR_CONFIG_H_
 
-#include <gconf/gconf-client.h>
-
-#include "bool.h"
-#include "color.h"
+#include <bool.h>
+#include <color.h>
 
 enum temperature_unit {
        CELSIUS,
@@ -44,9 +42,7 @@ struct config {
 
        bool alpha_channel_enabled;
 
-       /*
-        * Position of the sensors list table
-        */
+       /* Position of the sensors list table */
        enum sensorlist_position sensorlist_position;
 
        bool window_decoration_enabled;
@@ -79,9 +75,7 @@ struct config {
        int slog_interval;
 };
 
-/*
-  Loads config from GConf
-*/
+/* Loads psensor configuration */
 struct config *config_load();
 
 void config_save(const struct config *);
@@ -100,8 +94,8 @@ void config_set_sensor_alarm_low_threshold(const char *, int);
 bool config_get_sensor_alarm_enabled(const char *);
 void config_set_sensor_alarm_enabled(const char *, bool);
 
-bool config_is_sensor_enabled(const char *);
-void config_set_sensor_enabled(const char *, bool);
+bool config_is_sensor_graph_enabled(const char *);
+void config_set_sensor_graph_enabled(const char *, bool);
 
 char *config_get_sensor_name(const char *);
 void config_set_sensor_name(const char *, const char *);
@@ -112,8 +106,8 @@ void config_set_appindicator_enabled(const char *, bool);
 bool config_is_appindicator_label_enabled(const char *);
 void config_set_appindicator_label_enabled(const char *, bool);
 
-void config_slog_enabled_notify_add(GConfClientNotifyFunc cbk, void *data);
 bool is_slog_enabled();
+void config_set_slog_enabled_changed_cbk(void (*)(void *), void *);
 
 int config_get_slog_interval();
 
@@ -122,4 +116,19 @@ void config_set_sensor_position(const char *, int);
 
 char *config_get_notif_script();
 void config_set_notif_script(const char *);
+
+bool config_is_sensor_enabled(const char *sid);
+void config_set_sensor_enabled(const char *sid, bool enabled);
+
+/*
+ * Returns the user directory containing psensor data (configuration
+ * and log).
+ * Corresponds to $HOME/.psensor/
+ * Creates the directory if it does not exist;
+ * Returns NULL if it cannot be determined.
+ */
+const char *get_psensor_user_dir();
+
+void config_sync();
+
 #endif