diff options
author | louis <louis.braun@gmx.de> | 2015-01-15 13:12:47 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-01-15 13:12:47 +0100 |
commit | c7f71f3f2b580714bd9e5a5c773bc2179c0e8567 (patch) | |
tree | a39d3efd5494b60964152e559eaead76c7897af5 /libforecastio/forecastio.h | |
download | vdr-plugin-weatherforecast-0.0.1.tar.gz vdr-plugin-weatherforecast-0.0.1.tar.bz2 |
Initial commit0.0.1
Diffstat (limited to 'libforecastio/forecastio.h')
-rw-r--r-- | libforecastio/forecastio.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libforecastio/forecastio.h b/libforecastio/forecastio.h new file mode 100644 index 0000000..c016fb2 --- /dev/null +++ b/libforecastio/forecastio.h @@ -0,0 +1,39 @@ +#ifndef __FORECASTIO_H +#define __FORECASTIO_H + +#include <string> +#include "forecasts.h" +#include "forecast.h" +#include "../services.h" + +using namespace std; + +class cForecastIO : public cThread { +private: + bool ok; + string cacheDir; + int cacheDuration; + string apiKey; + string language; + string unit; + string baseURL; + double latitude; + double longitude; + cForecast *current; + cForecasts *hourly; + cForecasts *daily; + string FetchOnlineForecast(void); + bool ParseForecast(string &jsonForecast); + void Action(void); + bool ReadForecast(void); +public: + cForecastIO(string cacheDir); + virtual ~cForecastIO(void); + cForecast *GetCurrentForecast(void); + cForecasts *GetHourlyForecast(void) { return hourly; }; + cForecasts *GetDailyForecast(void) { return daily; }; + bool SetCurrentWeather(cServiceCurrentWeather *call); +}; + + +#endif //__FORECASTIO_H
\ No newline at end of file |