diff options
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; }; |