/*
- * Copyright (C) 2010-2012 jeanfi@gmail.com
+ * Copyright (C) 2010-2014 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
#ifndef _PSENSOR_LMSENSOR_H_
#define _PSENSOR_LMSENSOR_H_
-#include <sensors/sensors.h>
+#include <bool.h>
+#include <psensor.h>
-void lmsensor_psensor_list_update(struct psensor **sensors);
+#if defined(HAVE_LIBSENSORS) && HAVE_LIBSENSORS
-/*
- Adds sensors to a given list of sensors.
+static inline bool lmsensor_is_supported(void) { return true; }
- Returns the new allocated list of sensors if sensors have been added
- otherwise returns 'sensors'. The list is 'NULL' terminated.
- */
-struct psensor **lmsensor_psensor_list_add(struct psensor **sensors,
- int values_max_length);
+void lmsensor_psensor_list_update(struct psensor **);
+void lmsensor_psensor_list_append(struct psensor ***, int);
+void lmsensor_cleanup(void);
+
+#else
-void lmsensor_init();
-void lmsensor_cleanup();
+static inline bool lmsensor_is_supported(void) { return false; }
+
+static inline void lmsensor_psensor_list_update(struct psensor **s) {}
+static inline void lmsensor_psensor_list_append(struct psensor ***s, int n) {}
+static inline void lmsensor_cleanup(void) {}
+
+#endif
#endif