Initial weather service.

This commit introduces two new classes:

 1. GCalWeatherService
 2. GCalWeatherInfo

GcalWeatherservice picks-up the current location and periodically
fetches weather reports represented by GcalWeatherInfo.

The weather part is not complete yet.
This commit is contained in:
Florian Brosch
2017-12-11 21:23:19 -02:00
committed by Georges Basile Stavracas Neto
parent fcd9fa1c31
commit 83bec27ad5
7 changed files with 1225 additions and 1 deletions
+47
View File
@@ -0,0 +1,47 @@
/* gcal-weather-service.h
*
* Copyright (C) 2017 - Florian Brosch <flo.brosch@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GCAL_WEATHER_SERVICE_H
#define GCAL_WEATHER_SERVICE_H
#include <glib-object.h>
#include <glib.h>
G_BEGIN_DECLS
#define GCAL_TYPE_WEATHER_SERVICE (gcal_weather_service_get_type())
G_DECLARE_FINAL_TYPE (GcalWeatherService, gcal_weather_service, GCAL, WEATHER_SERVICE, GObject)
GcalWeatherService* gcal_weather_service_new (guint max_days,
guint check_interval);
void gcal_weather_service_run (GcalWeatherService *self);
void gcal_weather_service_stop (GcalWeatherService *self);
guint gcal_weather_service_get_max_days (GcalWeatherService *self);
guint gcal_weather_service_get_check_interval (GcalWeatherService *self);
G_END_DECLS
#endif /* GCAL_WEATHER_SERVICE_H */