From 4d8d1cc629ce5db3862aac75baafa0d1dae69b21 Mon Sep 17 00:00:00 2001 From: louis Date: Tue, 13 Jan 2015 09:01:11 +0100 Subject: [PATCH] introduced weather service interface --- displaychannel.c | 1 + dtd/displaychannel.dtd | 7 +++- libtemplate/templateview.c | 9 +++++ libtemplate/templateviewelement.h | 1 + services/weatherforecast.h | 45 ++++++++++++++++++++++ skins/metrixhd/xmlfiles/displaychannel.xml | 36 ++++++++++++++++- skinskeleton/xmlfiles/displaychannel.xml | 21 ++++++++++ views/displaychannelview.c | 13 +++++++ views/displaychannelview.h | 1 + views/viewhelpers.c | 28 ++++++++++++++ views/viewhelpers.h | 1 + 11 files changed, 160 insertions(+), 3 deletions(-) create mode 100644 services/weatherforecast.h diff --git a/displaychannel.c b/displaychannel.c index 941e2fa..6d5d40c 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -169,6 +169,7 @@ void cSDDisplayChannel::Flush(void) { return; if (initial) { + channelView->DrawCurrentWeather(); channelView->DrawCustomTokens(); } diff --git a/dtd/displaychannel.dtd b/dtd/displaychannel.dtd index f9664b0..c3d3761 100644 --- a/dtd/displaychannel.dtd +++ b/dtd/displaychannel.dtd @@ -4,7 +4,7 @@ + + + + +class cServiceCurrentWeather { +public: + cServiceCurrentWeather(void) { + timeStamp = ""; + temperature = ""; + apparentTemperature = ""; + summary = ""; + icon = ""; + precipitationIntensity = ""; + precipitationProbability = 0; + precipitationType = ""; + humidity = 0; + windSpeed = ""; + windBearing = 0; + windBearingString = ""; + visibility = ""; + cloudCover = 0; + pressure = ""; + ozone = ""; + }; + std::string timeStamp; + std::string temperature; + std::string apparentTemperature; + std::string summary; + std::string icon; + std::string precipitationIntensity; + int precipitationProbability; + std::string precipitationType; + int humidity; + std::string windSpeed; + int windBearing; + std::string windBearingString; + std::string visibility; + int cloudCover; + std::string pressure; + std::string ozone; +}; + +#endif //__WEATHERFORECASTSERVICES_H + diff --git a/skins/metrixhd/xmlfiles/displaychannel.xml b/skins/metrixhd/xmlfiles/displaychannel.xml index 4effefb..fdf2aea 100644 --- a/skins/metrixhd/xmlfiles/displaychannel.xml +++ b/skins/metrixhd/xmlfiles/displaychannel.xml @@ -12,6 +12,11 @@ + + + + + @@ -192,10 +197,10 @@ {devices[source]} source of the currently tuned channel --> - + - + @@ -209,6 +214,33 @@ + + + + + + + + + + + + +