diff options
author | louis <louis.braun@gmx.de> | 2016-01-26 18:38:37 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2016-01-26 18:38:37 +0100 |
commit | 842b086b65a7116a7aa5a2142097a2b2220f4c3c (patch) | |
tree | cf5655fc2c23a6a87fe4a4e6ba06b3fbc69cd1d0 /libforecastio/forecasts.c | |
parent | 36f7ac94dc3c6a6801b98d285a41851a0c61adf9 (diff) | |
download | vdr-plugin-weatherforecast-master.tar.gz vdr-plugin-weatherforecast-master.tar.bz2 |
Diffstat (limited to 'libforecastio/forecasts.c')
-rw-r--r-- | libforecastio/forecasts.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libforecastio/forecasts.c b/libforecastio/forecasts.c index d7cb908..623a2d6 100644 --- a/libforecastio/forecasts.c +++ b/libforecastio/forecasts.c @@ -48,6 +48,26 @@ void cForecasts::SetForecast(json_t *forecast) { } } +int cForecasts::NumHourly(void) { + int num = 0; + cForecast *f = GetFirstHourly(); + while (f) { + num++; + f = GetNext(); + } + return num; +} + +int cForecasts::NumDaily(void) { + int num = 0; + cForecast *f = GetFirstDaily(); + while (f) { + num++; + f = GetNext(); + } + return num; +} + cForecast *cForecasts::GetForecast(int dataPoint) { if (!dataPoints) return NULL; |