X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=blobdiff_plain;f=src%2Frsensor.h;h=3178e3fcc1774591f2838a59a5282619a2ab87f3;hp=82694797355e5449f8adc78627bce6cec9c000c3;hb=bd7036af56a4b61b2b473dccbeac5e26f78b57da;hpb=48da1ac5531838d157762882ee455cec4da05728 diff --git a/src/rsensor.h b/src/rsensor.h index 8269479..3178e3f 100644 --- a/src/rsensor.h +++ b/src/rsensor.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,14 +19,27 @@ #ifndef _PSENSOR_RSENSOR_H_ #define _PSENSOR_RSENSOR_H_ -#include "psensor.h" +#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; } -void rsensor_init(); -void rsensor_cleanup(); +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