X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=blobdiff_plain;f=src%2Flib%2Flmsensor.h;h=90d58f3f304d74a5c53c79088806aba5730a68f3;hp=d9e5787549694c0c5e9db68d9fbc65901b4fe727;hb=3361fda8735c65887a859c9faf287cb105ae6bc8;hpb=ee0b7212d29624b6321a0eda9c7ba1e17817ba25 diff --git a/src/lib/lmsensor.h b/src/lib/lmsensor.h index d9e5787..90d58f3 100644 --- a/src/lib/lmsensor.h +++ b/src/lib/lmsensor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013 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 @@ -19,20 +19,25 @@ #ifndef _PSENSOR_LMSENSOR_H_ #define _PSENSOR_LMSENSOR_H_ -#include +#include +#include -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