avoid #macro in code
[psensor.git] / src / lib / amd.h
index acb234d..ef77c26 100644 (file)
 #ifndef _PSENSOR_AMD_H_
 #define _PSENSOR_AMD_H_
 
-#include "psensor.h"
+#include <bool.h>
+#include <psensor.h>
 
-/*
-  Updates temperatures of AMD sensors.
-*/
-void amd_psensor_list_update(struct psensor **sensors);
+#if defined(HAVE_LIBATIADL) && HAVE_LIBATIADL
 
-/*
-  Adds AMD sensors to a given list of sensors.
+static inline bool amd_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 **amd_psensor_list_add(struct psensor **sensors,
-                                        int values_max_length);
+void amd_psensor_list_update(struct psensor **s);
+void amd_psensor_list_append(struct psensor ***s, int n);
+void amd_cleanup(void);
+
+#else
 
-void amd_cleanup();
+static inline bool amd_is_supported(void) { return false; }
+
+static inline void amd_psensor_list_update(struct psensor **s) {}
+static inline void amd_psensor_list_append(struct psensor ***s, int n) {}
+static inline void amd_cleanup(void) {}
+
+#endif
 
 #endif