X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Frsensor.h;h=afb9d6516114efa22e40b57d30840072ec758871;hb=0acbbfd3bee0ebad1faae5b8314aea10a9cc123e;hp=e770fcd9c8684d3b170efcb441860f425d0ecaed;hpb=0a4fb4ef66f8282a7c7a08377d993a06f6c5d518;p=psensor.git diff --git a/src/rsensor.h b/src/rsensor.h index e770fcd..afb9d65 100644 --- a/src/rsensor.h +++ b/src/rsensor.h @@ -21,12 +21,25 @@ #include -struct psensor **get_remote_sensors(const char *server_url, - int values_max_length); +#if defined(HAVE_REMOTE_SUPPORT) && HAVE_REMOTE_SUPPORT -void remote_psensor_list_update(struct psensor **sensors); +static inline bool rsensor_is_supported(void) { return true; } +struct psensor **get_remote_sensors(const char *, int); +void remote_psensor_list_update(struct psensor **); void rsensor_init(void); void rsensor_cleanup(void); +#else + +static inline bool rsensor_is_supported(void) { return false; } + +static inline struct psensor ** +get_remote_sensors(const char *url, int n) { return NULL; } +static inline void remote_psensor_list_update(struct psensor **s) {} +static inline void rsensor_init(void) {} +static inline void rsensor_cleanup(void) {} + +#endif + #endif