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 /config.c | |
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 'config.c')
-rw-r--r-- | config.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3,11 +3,15 @@ cWeatherforecastConfig::cWeatherforecastConfig() { //number of hours to wait till next update from forecast.io is fetched hoursToUpdate = 20; + //if own API Key is set, user can configure its own udate frequence + userHoursToUpdate = 0; //city to display in menus city = ""; //latitude and longitude of location for forecast.io query lat = 0.0; lon = 0.0; + //User can configure individual API Key + userApiKey = ""; } cWeatherforecastConfig::~cWeatherforecastConfig() { @@ -17,6 +21,8 @@ bool cWeatherforecastConfig::SetupParse(const char *Name, const char *Value) { if (!strcasecmp(Name, "city")) city = Value; else if (!strcasecmp(Name, "lat")) lat = atod(Value); else if (!strcasecmp(Name, "lon")) lon = atod(Value); + else if (!strcasecmp(Name, "userapikey")) userApiKey = Value; + else if (!strcasecmp(Name, "updatefreq")) userHoursToUpdate = atoi(Value); else return false; return true; } |