X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=blobdiff_plain;f=src%2Flib%2Fnvidia.h;h=cf7f0746614c277a85fb66ea0f86ac92a9dceaf9;hp=9c1089cdfa240d66532f29aeb86f70770245f746;hb=bd7036af56a4b61b2b473dccbeac5e26f78b57da;hpb=582a4101efc09e95899926f4415960733b72e18e diff --git a/src/lib/nvidia.h b/src/lib/nvidia.h index 9c1089c..cf7f074 100644 --- a/src/lib/nvidia.h +++ b/src/lib/nvidia.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 jeanfi@gmail.com + * Copyright (C) 2010-2016 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,22 +19,26 @@ #ifndef _PSENSOR_NVIDIA_H_ #define _PSENSOR_NVIDIA_H_ -#include "psensor.h" +#include +#include -/* - Updates temperatures of NVidia sensors. -*/ -void nvidia_psensor_list_update(struct psensor **sensors); -/* - Adds NVIDIA sensors to a given list of sensors. +#if defined(HAVE_NVIDIA) && HAVE_NVIDIA - Returns the new allocated list of sensors if sensors have been added - otherwise returns 'sensors'. The list is 'NULL' terminated. - */ -struct psensor **nvidia_psensor_list_add(struct psensor **sensors, - int values_max_length); +static inline bool nvidia_is_supported(void) { return true; } + +void nvidia_psensor_list_update(struct psensor **); +void nvidia_psensor_list_append(struct psensor ***, int); +void nvidia_cleanup(void); -void nvidia_cleanup(); +#else + +static inline bool nvidia_is_supported(void) { return false; } + +static inline void nvidia_psensor_list_update(struct psensor **s) {} +static inline void nvidia_psensor_list_append(struct psensor ***s, int n) {} +static inline void nvidia_cleanup(void) {} + +#endif #endif