summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2015-01-15 13:12:47 +0100
committerlouis <louis.braun@gmx.de>2015-01-15 13:12:47 +0100
commitc7f71f3f2b580714bd9e5a5c773bc2179c0e8567 (patch)
treea39d3efd5494b60964152e559eaead76c7897af5 /config.c
downloadvdr-plugin-weatherforecast-0.0.1.tar.gz
vdr-plugin-weatherforecast-0.0.1.tar.bz2
Initial commit0.0.1
Diffstat (limited to 'config.c')
-rw-r--r--config.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/config.c b/config.c
new file mode 100644
index 0000000..e7b2293
--- /dev/null
+++ b/config.c
@@ -0,0 +1,22 @@
+#include "config.h"
+
+cWeatherforecastConfig::cWeatherforecastConfig() {
+ //number of hours to wait till next update from forecast.io is fetched
+ hoursToUpdate = 20;
+ //city to display in menus
+ city = "";
+ //latitude and longitude of location for forecast.io query
+ lat = 0.0;
+ lon = 0.0;
+}
+
+cWeatherforecastConfig::~cWeatherforecastConfig() {
+}
+
+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 return false;
+ return true;
+}