diff options
author | louis <louis.braun@gmx.de> | 2015-01-17 10:23:39 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-01-17 10:23:39 +0100 |
commit | a5aa281e337f148e27b17c287e04d8a023856667 (patch) | |
tree | 6ff69709bfd9815ece9b29a31ae8397653ff8848 /libforecastio/forecastio.h | |
parent | c7f71f3f2b580714bd9e5a5c773bc2179c0e8567 (diff) | |
download | vdr-plugin-weatherforecast-0.0.2.tar.gz vdr-plugin-weatherforecast-0.0.2.tar.bz2 |
added possibility to use own api key0.0.2
Diffstat (limited to 'libforecastio/forecastio.h')
-rw-r--r-- | libforecastio/forecastio.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libforecastio/forecastio.h b/libforecastio/forecastio.h index c016fb2..bc45e2c 100644 --- a/libforecastio/forecastio.h +++ b/libforecastio/forecastio.h @@ -10,9 +10,8 @@ using namespace std; class cForecastIO : public cThread { private: - bool ok; - string cacheDir; - int cacheDuration; + string forecastFile; + int cacheDurationDefault; string apiKey; string language; string unit; @@ -22,13 +21,24 @@ private: cForecast *current; cForecasts *hourly; cForecasts *daily; + bool loopActive; + cCondVar waitCondition; + cMutex waitMutex; + bool CheckUserApiKey(void); + int CalculateCachDuration(void); + bool CacheFileValid(void); string FetchOnlineForecast(void); bool ParseForecast(string &jsonForecast); void Action(void); - bool ReadForecast(void); + void Clear(void); + void ReadForecastInitial(void); + void ReadForecast(void); public: cForecastIO(string cacheDir); virtual ~cForecastIO(void); + void Stop(void); + void LockForecasts(void) { Lock(); }; + void UnlockForecasts(void) { Unlock(); }; cForecast *GetCurrentForecast(void); cForecasts *GetHourlyForecast(void) { return hourly; }; cForecasts *GetDailyForecast(void) { return daily; }; |