summaryrefslogtreecommitdiff
path: root/libforecastio/forecasts.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2016-01-26 18:38:37 +0100
committerlouis <louis.braun@gmx.de>2016-01-26 18:38:37 +0100
commit842b086b65a7116a7aa5a2142097a2b2220f4c3c (patch)
treecf5655fc2c23a6a87fe4a4e6ba06b3fbc69cd1d0 /libforecastio/forecasts.c
parent36f7ac94dc3c6a6801b98d285a41851a0c61adf9 (diff)
downloadvdr-plugin-weatherforecast-master.tar.gz
vdr-plugin-weatherforecast-master.tar.bz2
adaptions skindesigner 0.8.0HEAD0.2.0master
Diffstat (limited to 'libforecastio/forecasts.c')
-rw-r--r--libforecastio/forecasts.c20
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;