[libgweather/ebassi/gtk4: 20/28] Clean up the header files




commit 382cacf9f86a11fa79132795ce65f203ac33092e
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Oct 11 12:40:04 2021 +0100

    Clean up the header files
    
    - Use a consistent coding style
    - Use #pragma once for the inclusion guard
    - Use SPDX license and copyright fields

 libgweather/gweather-enum-types.h.tmpl |   5 +-
 libgweather/gweather-enums.h           |  59 ++++----
 libgweather/gweather-location-entry.h  |  46 +++----
 libgweather/gweather-location.c        |  33 -----
 libgweather/gweather-location.h        | 195 +++++++++++++-------------
 libgweather/gweather-private.h         |  26 +---
 libgweather/gweather-timezone-menu.h   |  37 ++---
 libgweather/gweather-timezone.h        |  41 ++----
 libgweather/gweather-version.h.in      |  22 +--
 libgweather/gweather-weather.h         | 242 +++++++++++++++++----------------
 libgweather/gweather.h                 |  22 +--
 11 files changed, 310 insertions(+), 418 deletions(-)
---
diff --git a/libgweather/gweather-enum-types.h.tmpl b/libgweather/gweather-enum-types.h.tmpl
index 3624f0a2..49e77752 100644
--- a/libgweather/gweather-enum-types.h.tmpl
+++ b/libgweather/gweather-enum-types.h.tmpl
@@ -1,6 +1,5 @@
 /*** BEGIN file-header ***/
-#ifndef __GWEATHER_ENUM_TYPES_H__
-#define __GWEATHER_ENUM_TYPES_H__
+#pragma once
 
 #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION))
 #error "gweather-enum-types.h must not be included individually, include gweather.h instead"
@@ -24,6 +23,4 @@ GType @enum_name@_get_type (void) G_GNUC_CONST;
 
 /*** BEGIN file-tail ***/
 G_END_DECLS
-
-#endif /* __GWEATHER_ENUM_TYPES_H__ */
 /*** END file-tail ***/
diff --git a/libgweather/gweather-enums.h b/libgweather/gweather-enums.h
index 90614776..288037c6 100644
--- a/libgweather/gweather-enums.h
+++ b/libgweather/gweather-enums.h
@@ -1,30 +1,19 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
 /* gweather-enums.h: enumerations for GWeather settings
  *
- * Copyright: 2011 Giovanni Campagna <scampa giovanni 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 2 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
- * <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2011 Giovanni Campagna <scampa giovanni gmail com>
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef __GWEATHER_ENUMS_H_
-#define __GWEATHER_ENUMS_H_
+#pragma once
 
 #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION))
 #error "gweather-enums.h must not be included individually, include gweather.h instead"
 #endif
 
+#include <glib.h>
+
+G_BEGIN_DECLS
+
 /**
  * GWeatherTemperatureUnit:
  * @GWEATHER_TEMP_UNIT_INVALID: invalid unit
@@ -60,11 +49,11 @@ typedef enum { /*< underscore_name=gweather_temperature_unit >*/
 typedef enum { /*< underscore_name=gweather_speed_unit >*/
     GWEATHER_SPEED_UNIT_INVALID = 0,
     GWEATHER_SPEED_UNIT_DEFAULT,
-    GWEATHER_SPEED_UNIT_MS,    /* metres per second */
-    GWEATHER_SPEED_UNIT_KPH,   /* kilometres per hour */
-    GWEATHER_SPEED_UNIT_MPH,   /* miles per hour */
-    GWEATHER_SPEED_UNIT_KNOTS, /* Knots */
-    GWEATHER_SPEED_UNIT_BFT    /* Beaufort scale */
+    GWEATHER_SPEED_UNIT_MS,
+    GWEATHER_SPEED_UNIT_KPH,
+    GWEATHER_SPEED_UNIT_MPH,
+    GWEATHER_SPEED_UNIT_KNOTS,
+    GWEATHER_SPEED_UNIT_BFT
 } GWeatherSpeedUnit;
 
 /**
@@ -73,7 +62,7 @@ typedef enum { /*< underscore_name=gweather_speed_unit >*/
  * @GWEATHER_PRESSURE_UNIT_DEFAULT: the user preferred pressure unit
  * @GWEATHER_PRESSURE_UNIT_KPA: kiloPascal (* 10^3 Pa)
  * @GWEATHER_PRESSURE_UNIT_HPA: hectoPascal (* 10^2 Pa); also known
- *                              as millibars, but formatted differently
+ *   as millibars, but formatted differently
  * @GWEATHER_PRESSURE_UNIT_MB: millibars; same as %GWEATHER_PRESSURE_UNIT_HPA
  * @GWEATHER_PRESSURE_UNIT_MM_HG: millimeters of mercury
  * @GWEATHER_PRESSURE_UNIT_INCH_HG: inches of mercury
@@ -85,12 +74,12 @@ typedef enum { /*< underscore_name=gweather_speed_unit >*/
 typedef enum { /*< underscore_name=gweather_pressure_unit >*/
     GWEATHER_PRESSURE_UNIT_INVALID = 0,
     GWEATHER_PRESSURE_UNIT_DEFAULT,
-    GWEATHER_PRESSURE_UNIT_KPA,    /* kiloPascal */
-    GWEATHER_PRESSURE_UNIT_HPA,    /* hectoPascal */
-    GWEATHER_PRESSURE_UNIT_MB,     /* 1 millibars = 1 hectoPascal */
-    GWEATHER_PRESSURE_UNIT_MM_HG,  /* millimeters of mercury */
-    GWEATHER_PRESSURE_UNIT_INCH_HG, /* inches of mercury */
-    GWEATHER_PRESSURE_UNIT_ATM     /* atmosphere */
+    GWEATHER_PRESSURE_UNIT_KPA,
+    GWEATHER_PRESSURE_UNIT_HPA,
+    GWEATHER_PRESSURE_UNIT_MB,
+    GWEATHER_PRESSURE_UNIT_MM_HG,
+    GWEATHER_PRESSURE_UNIT_INCH_HG,
+    GWEATHER_PRESSURE_UNIT_ATM
 } GWeatherPressureUnit;
 
 /**
@@ -116,12 +105,12 @@ typedef enum { /*< underscore_name=gweather_distance_unit >*/
  * GWeatherFormatOptions:
  * @GWEATHER_FORMAT_OPTION_DEFAULT: The default string format
  * @GWEATHER_FORMAT_OPTION_SENTENCE_CAPITALIZATION: Capitalize as if the string
- *                                                  was starting a sentence
+ *   was starting a sentence
  * @GWEATHER_FORMAT_OPTION_NO_CAPITALIZATION: Capitalize as if the string was
- *                                            appearing within a sentence
+ *   appearing within a sentence
  *
- * Format options to influence the returned string of the
- * gweather_*_to_string_full() functions.
+ * Format options to influence the text returned by the
+ * `gweather_*_to_string_full()` functions.
  */
 typedef enum { /*< underscore_name=gweather_format_options >*/
     GWEATHER_FORMAT_OPTION_DEFAULT                 = 0,
@@ -129,4 +118,4 @@ typedef enum { /*< underscore_name=gweather_format_options >*/
     GWEATHER_FORMAT_OPTION_NO_CAPITALIZATION       = 1 << 1
 } GWeatherFormatOptions;
 
-#endif /* __GWEATHER_ENUMS_H_ */
+G_END_DECLS
diff --git a/libgweather/gweather-location-entry.h b/libgweather/gweather-location-entry.h
index 5d7ab63d..873986e8 100644
--- a/libgweather/gweather-location-entry.h
+++ b/libgweather/gweather-location-entry.h
@@ -1,25 +1,10 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* location-entry.h - Location-selecting text entry
+/* gweather-location-entry.h - Location-selecting text entry
  *
- * Copyright 2008, Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see
- * <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2008, Red Hat, Inc.
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef GWEATHER_LOCATION_ENTRY_H
-#define GWEATHER_LOCATION_ENTRY_H 1
+#pragma once
 
 #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION))
 #error "gweather-location-entry.h must not be included individually, include gweather.h instead"
@@ -28,6 +13,8 @@
 #include <gtk/gtk.h>
 #include <libgweather/gweather-location.h>
 
+G_BEGIN_DECLS
+
 typedef struct _GWeatherLocationEntry GWeatherLocationEntry;
 typedef struct _GWeatherLocationEntryClass GWeatherLocationEntryClass;
 typedef struct _GWeatherLocationEntryPrivate GWeatherLocationEntryPrivate;
@@ -50,14 +37,15 @@ struct _GWeatherLocationEntryClass {
     GtkSearchEntryClass parent_class;
 };
 
-GType             gweather_location_entry_get_type     (void);
-GtkWidget        *gweather_location_entry_new          (GWeatherLocation      *top);
-void              gweather_location_entry_set_location (GWeatherLocationEntry *entry,
-                                                       GWeatherLocation      *loc);
-GWeatherLocation *gweather_location_entry_get_location (GWeatherLocationEntry *entry);
-gboolean          gweather_location_entry_has_custom_text (GWeatherLocationEntry *entry);
-gboolean          gweather_location_entry_set_city     (GWeatherLocationEntry *entry,
-                                                       const char            *city_name,
-                                                       const char            *code);
+GType                   gweather_location_entry_get_type        (void);
 
-#endif
+GtkWidget *             gweather_location_entry_new             (GWeatherLocation *top);
+void                    gweather_location_entry_set_location    (GWeatherLocationEntry *entry,
+                                                                 GWeatherLocation *loc);
+GWeatherLocation *      gweather_location_entry_get_location    (GWeatherLocationEntry *entry);
+gboolean                gweather_location_entry_has_custom_text (GWeatherLocationEntry *entry);
+gboolean                gweather_location_entry_set_city        (GWeatherLocationEntry *entry,
+                                                                 const char *city_name,
+                                                                 const char *code);
+
+G_END_DECLS
diff --git a/libgweather/gweather-location.c b/libgweather/gweather-location.c
index bbdb0049..b4df218e 100644
--- a/libgweather/gweather-location.c
+++ b/libgweather/gweather-location.c
@@ -60,39 +60,6 @@ _iter_up(GWeatherLocation *loc)
  * hierarchy of locations works.
  */
 
-/**
- * GWeatherLocationLevel:
- * @GWEATHER_LOCATION_WORLD: A location representing the entire world.
- * @GWEATHER_LOCATION_REGION: A location representing a continent or
- * other top-level region.
- * @GWEATHER_LOCATION_COUNTRY: A location representing a "country" (or
- * other geographic unit that has an ISO-3166 country code)
- * @GWEATHER_LOCATION_ADM1: A location representing a "first-level
- * administrative division"; ie, a state, province, or similar
- * division.
- * @GWEATHER_LOCATION_CITY: A location representing a city
- * @GWEATHER_LOCATION_WEATHER_STATION: A location representing a
- * weather station.
- * @GWEATHER_LOCATION_DETACHED: A location that is detached from the
- * database, for example because it was loaded from external storage
- * and could not be fully recovered. The parent of this location is
- * the nearest weather station.
- * @GWEATHER_LOCATION_NAMED_TIMEZONE: A location representing a named
- * or special timezone in the world, such as UTC
- *
- * The size/scope of a particular #GWeatherLocation.
- *
- * Locations form a hierarchy, with a %GWEATHER_LOCATION_WORLD
- * location at the top, divided into regions or countries, and so on.
- * Countries may or may not be divided into "adm1"s, and "adm1"s may
- * or may not be divided into "adm2"s. A city will have at least one,
- * and possibly several, weather stations inside it. Weather stations
- * will never appear outside of cities.
- *
- * Building a database with gweather_location_get_world() will never
- * create detached instances, but deserializing might.
- **/
-
 static GWeatherLocation *
 location_new (GWeatherLocationLevel level)
 {
diff --git a/libgweather/gweather-location.h b/libgweather/gweather-location.h
index c44d7c13..ceee199e 100644
--- a/libgweather/gweather-location.h
+++ b/libgweather/gweather-location.h
@@ -1,44 +1,60 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
 /* gweather-location.h - Location-handling code
  *
- * Copyright 2008, Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see
- * <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2008, Red Hat, Inc.
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef __GWEATHER_LOCATIONS_H__
-#define __GWEATHER_LOCATIONS_H__
+#pragma once
 
 #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION))
 #error "gweather-location.h must not be included individually, include gweather.h instead"
 #endif
 
-#include <glib.h>
-#include <libgweather/gweather-timezone.h>
 #include <gio/gio.h>
+#include <libgweather/gweather-timezone.h>
 
 G_BEGIN_DECLS
 
 typedef struct _GWeatherLocation GWeatherLocation;
+
 typedef gboolean (* GWeatherFilterFunc) (GWeatherLocation* location, gpointer user_data);
 
+/**
+ * GWeatherLocationLevel:
+ * @GWEATHER_LOCATION_WORLD: A location representing the entire world
+ * @GWEATHER_LOCATION_REGION: A location representing a continent or other
+ *   top-level region
+ * @GWEATHER_LOCATION_COUNTRY: A location representing a "country" (or other
+ *   geographic unit that has an ISO-3166 country code)
+ * @GWEATHER_LOCATION_ADM1: A location representing a "first-level
+ *   administrative division"; ie, a state, province, or similar division
+ * @GWEATHER_LOCATION_CITY: A location representing a city
+ * @GWEATHER_LOCATION_WEATHER_STATION: A location representing a weather
+ *   station
+ * @GWEATHER_LOCATION_DETACHED: A location that is detached from the database,
+ *   for example because it was loaded from external storage and could not be
+ *   fully recovered. The parent of this location is the nearest weather
+ *   station
+ * @GWEATHER_LOCATION_NAMED_TIMEZONE: A location representing a named or
+ *   special timezone in the world, such as UTC
+ *
+ * The size/scope of a particular #GWeatherLocation.
+ *
+ * Locations form a hierarchy, with a %GWEATHER_LOCATION_WORLD
+ * location at the top, divided into regions or countries, and so on.
+ *
+ * Countries may or may not be divided into "adm1"s, and "adm1"s may
+ * or may not be divided into "adm2"s. A city will have at least one,
+ * and possibly several, weather stations inside it. Weather stations
+ * will never appear outside of cities.
+ *
+ * Building a database with gweather_location_get_world() will never
+ * create detached instances, but deserializing might.
+ */
 typedef enum { /*< underscore_name=gweather_location_level >*/
     GWEATHER_LOCATION_WORLD,
     GWEATHER_LOCATION_REGION,
     GWEATHER_LOCATION_COUNTRY,
-    /* ADM1 = first-order administrative division = state/province, etc */
     GWEATHER_LOCATION_ADM1,
     GWEATHER_LOCATION_CITY,
     GWEATHER_LOCATION_WEATHER_STATION,
@@ -46,82 +62,79 @@ typedef enum { /*< underscore_name=gweather_location_level >*/
     GWEATHER_LOCATION_NAMED_TIMEZONE
 } GWeatherLocationLevel;
 
-GType gweather_location_get_type (void);
 #define GWEATHER_TYPE_LOCATION (gweather_location_get_type ())
+GType gweather_location_get_type (void);
 
-GWeatherLocation      *gweather_location_get_world      (void);
-GWeatherLocation      *gweather_location_ref            (GWeatherLocation  *loc);
-void                   gweather_location_unref          (GWeatherLocation  *loc);
+GWeatherLocation *      gweather_location_get_world             (void);
+GWeatherLocation *      gweather_location_ref                   (GWeatherLocation  *loc);
+void                    gweather_location_unref                 (GWeatherLocation  *loc);
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (GWeatherLocation, gweather_location_unref);
 
-const char            *gweather_location_get_name       (GWeatherLocation  *loc);
-const char            *gweather_location_get_sort_name  (GWeatherLocation  *loc);
-const char            *gweather_location_get_english_name (GWeatherLocation  *loc);
-const char            *gweather_location_get_english_sort_name (GWeatherLocation  *loc);
-GWeatherLocationLevel  gweather_location_get_level      (GWeatherLocation  *loc);
-GWeatherLocation      *gweather_location_get_parent     (GWeatherLocation  *loc);
+const char *            gweather_location_get_name              (GWeatherLocation  *loc);
+const char *            gweather_location_get_sort_name         (GWeatherLocation  *loc);
+const char *            gweather_location_get_english_name      (GWeatherLocation  *loc);
+const char *            gweather_location_get_english_sort_name (GWeatherLocation  *loc);
+GWeatherLocationLevel   gweather_location_get_level             (GWeatherLocation  *loc);
+GWeatherLocation *      gweather_location_get_parent            (GWeatherLocation  *loc);
+GWeatherLocation *      gweather_location_next_child            (GWeatherLocation  *loc,
+                                                                 GWeatherLocation  *child);
 
-GWeatherLocation      *gweather_location_next_child     (GWeatherLocation  *loc, GWeatherLocation  *child);
 G_DEPRECATED_FOR(gweather_location_next_child)
-GWeatherLocation     **gweather_location_get_children   (GWeatherLocation  *loc);
-
-gboolean               gweather_location_has_coords     (GWeatherLocation  *loc);
-void                   gweather_location_get_coords     (GWeatherLocation  *loc,
-                                                        double            *latitude,
-                                                        double            *longitude);
-double                 gweather_location_get_distance   (GWeatherLocation  *loc,
-                                                        GWeatherLocation  *loc2);
-GWeatherLocation      *gweather_location_find_nearest_city (GWeatherLocation *loc,
-                                                           double            lat,
-                                                           double            lon);
-
-GWeatherLocation      *gweather_location_find_nearest_city_full (GWeatherLocation  *loc,
-                                                                double             lat,
-                                                                double             lon,
-                                                                GWeatherFilterFunc func,
-                                                                gpointer           user_data,
-                                                                GDestroyNotify     destroy);
-
-void                  gweather_location_detect_nearest_city (GWeatherLocation   *loc,
-                                                            double              lat,
-                                                            double              lon,
-                                                            GCancellable       *cancellable,
-                                                            GAsyncReadyCallback callback,
-                                                            gpointer            user_data);
-GWeatherLocation      *gweather_location_detect_nearest_city_finish (GAsyncResult *result, GError **error);
-
-const char            *gweather_location_get_country    (GWeatherLocation  *loc);
-
-GWeatherTimezone      *gweather_location_get_timezone   (GWeatherLocation  *loc);
-const char            *gweather_location_get_timezone_str (GWeatherLocation *loc);
-GWeatherTimezone     **gweather_location_get_timezones  (GWeatherLocation  *loc);
-void                   gweather_location_free_timezones (GWeatherLocation  *loc,
-                                                        GWeatherTimezone **zones);
-
-const char            *gweather_location_get_code       (GWeatherLocation  *loc);
-char                  *gweather_location_get_city_name  (GWeatherLocation  *loc);
-char                  *gweather_location_get_country_name (GWeatherLocation  *loc);
-
-GWeatherLocation      *gweather_location_find_by_station_code (GWeatherLocation *world,
-                                                              const gchar      *station_code);
-GWeatherLocation      *gweather_location_find_by_country_code (GWeatherLocation *world,
-                                                              const gchar      *country_code);
-
-gboolean               gweather_location_equal          (GWeatherLocation  *one,
-                                                        GWeatherLocation  *two);
-
-GVariant              *gweather_location_serialize      (GWeatherLocation  *loc);
-GWeatherLocation      *gweather_location_deserialize    (GWeatherLocation  *world,
-                                                        GVariant          *serialized);
-
-GWeatherLocation      *gweather_location_new_detached   (const char        *name,
-                                                        const char        *icao,
-                                                        gdouble            latitude,
-                                                        gdouble            longitude);
-
-const char            *gweather_location_level_to_string (GWeatherLocationLevel level);
+GWeatherLocation **     gweather_location_get_children          (GWeatherLocation  *loc);
+
+gboolean                gweather_location_has_coords            (GWeatherLocation  *loc);
+void                    gweather_location_get_coords            (GWeatherLocation  *loc,
+                                                                 double            *latitude,
+                                                                 double            *longitude);
+double                  gweather_location_get_distance          (GWeatherLocation  *loc,
+                                                                 GWeatherLocation  *loc2);
+GWeatherLocation *      gweather_location_find_nearest_city     (GWeatherLocation  *loc,
+                                                                 double             lat,
+                                                                 double             lon);
+
+GWeatherLocation *      gweather_location_find_nearest_city_full        (GWeatherLocation   *loc,
+                                                                         double              lat,
+                                                                         double              lon,
+                                                                         GWeatherFilterFunc  func,
+                                                                         gpointer            user_data,
+                                                                         GDestroyNotify      destroy);
+void                    gweather_location_detect_nearest_city           (GWeatherLocation   *loc,
+                                                                         double              lat,
+                                                                         double              lon,
+                                                                         GCancellable       *cancellable,
+                                                                         GAsyncReadyCallback callback,
+                                                                         gpointer            user_data);
+GWeatherLocation *      gweather_location_detect_nearest_city_finish    (GAsyncResult       *result,
+                                                                         GError            **error);
+
+const char *            gweather_location_get_country           (GWeatherLocation  *loc);
+GWeatherTimezone *      gweather_location_get_timezone          (GWeatherLocation  *loc);
+const char *            gweather_location_get_timezone_str      (GWeatherLocation  *loc);
+GWeatherTimezone **     gweather_location_get_timezones         (GWeatherLocation  *loc);
+void                    gweather_location_free_timezones        (GWeatherLocation  *loc,
+                                                                 GWeatherTimezone **zones);
+const char *            gweather_location_get_code              (GWeatherLocation  *loc);
+char *                  gweather_location_get_city_name         (GWeatherLocation  *loc);
+char *                  gweather_location_get_country_name      (GWeatherLocation  *loc);
+
+GWeatherLocation *      gweather_location_find_by_station_code  (GWeatherLocation  *world,
+                                                                 const char        *station_code);
+GWeatherLocation *      gweather_location_find_by_country_code  (GWeatherLocation  *world,
+                                                                 const char        *country_code);
+
+gboolean                gweather_location_equal                 (GWeatherLocation  *one,
+                                                                 GWeatherLocation  *two);
+
+GVariant *              gweather_location_serialize             (GWeatherLocation  *loc);
+GWeatherLocation *      gweather_location_deserialize           (GWeatherLocation  *world,
+                                                                 GVariant          *serialized);
+
+GWeatherLocation *      gweather_location_new_detached          (const char        *name,
+                                                                 const char        *icao,
+                                                                 double             latitude,
+                                                                 double             longitude);
+
+const char *            gweather_location_level_to_string       (GWeatherLocationLevel level);
 
 G_END_DECLS
-
-#endif /* __GWEATHER_LOCATIONS_H__ */
diff --git a/libgweather/gweather-private.h b/libgweather/gweather-private.h
index 8155e217..607b60f9 100644
--- a/libgweather/gweather-private.h
+++ b/libgweather/gweather-private.h
@@ -1,23 +1,10 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* weather-priv.h - Private header for weather server functions.
+/* gweather-private.h - Private header for weather server functions
  *
- * 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 2 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
- * <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: The GWeather authors
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef __WEATHER_PRIV_H_
-#define __WEATHER_PRIV_H_
+#pragma once
 
 #include "config.h"
 
@@ -36,6 +23,8 @@
 #define IDX_VALID(idx) ((idx) < 0xffff)
 #define EMPTY_TO_NULL(s) ((s)[0] == '\0' ? NULL : (s))
 
+G_BEGIN_DECLS
+
 void        _gweather_gettext_init (void);
 
 
@@ -236,5 +225,4 @@ void                free_forecast_list        (GWeatherInfo *info);
 
 GWeatherInfo   *_gweather_info_new_clone  (GWeatherInfo *original);
 
-#endif /* __WEATHER_PRIV_H_ */
-
+G_END_DECLS
diff --git a/libgweather/gweather-timezone-menu.h b/libgweather/gweather-timezone-menu.h
index b5c4cc55..ddc5d21e 100644
--- a/libgweather/gweather-timezone-menu.h
+++ b/libgweather/gweather-timezone-menu.h
@@ -1,25 +1,10 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* timezone-menu.h - Timezone-selecting menu
+/* gweather-timezone-menu.h - Timezone-selecting menu
  *
- * Copyright 2008, Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see
- * <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2008, Red Hat, Inc.
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef GWEATHER_TIMEZONE_MENU_H
-#define GWEATHER_TIMEZONE_MENU_H 1
+#pragma once
 
 #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION))
 #error "gweather-timezone-menu.h must not be included individually, include gweather.h instead"
@@ -28,6 +13,8 @@
 #include <gtk/gtk.h>
 #include <libgweather/gweather-location.h>
 
+G_BEGIN_DECLS
+
 typedef struct _GWeatherTimezoneMenu GWeatherTimezoneMenu;
 typedef struct _GWeatherTimezoneMenuClass GWeatherTimezoneMenuClass;
 
@@ -50,10 +37,10 @@ struct _GWeatherTimezoneMenuClass {
 
 };
 
-GType       gweather_timezone_menu_get_type         (void);
-GtkWidget  *gweather_timezone_menu_new              (GWeatherLocation     *top);
-void        gweather_timezone_menu_set_tzid         (GWeatherTimezoneMenu *menu,
-                                                    const char           *tzid);
-const char *gweather_timezone_menu_get_tzid         (GWeatherTimezoneMenu *menu);
+GType           gweather_timezone_menu_get_type         (void);
+GtkWidget *     gweather_timezone_menu_new              (GWeatherLocation *top);
+void            gweather_timezone_menu_set_tzid         (GWeatherTimezoneMenu *menu,
+                                                        const char *tzid);
+const char *    gweather_timezone_menu_get_tzid         (GWeatherTimezoneMenu *menu);
 
-#endif
+G_END_DECLS
diff --git a/libgweather/gweather-timezone.h b/libgweather/gweather-timezone.h
index 7ee95b8c..e5353406 100644
--- a/libgweather/gweather-timezone.h
+++ b/libgweather/gweather-timezone.h
@@ -1,25 +1,10 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
 /* gweather-timezone.c - Timezone handling
  *
- * Copyright 2008, Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see
- * <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2008, Red Hat, Inc.
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef __GWEATHER_TIMEZONE_H__
-#define __GWEATHER_TIMEZONE_H__
+#pragma once
 
 #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION))
 #error "gweather-timezone.h must not be included individually, include gweather.h instead"
@@ -34,20 +19,18 @@ typedef struct _GWeatherTimezone GWeatherTimezone;
 GType gweather_timezone_get_type (void);
 #define GWEATHER_TYPE_TIMEZONE (gweather_timezone_get_type ())
 
-const char       *gweather_timezone_get_name       (GWeatherTimezone *zone);
-const char       *gweather_timezone_get_tzid       (GWeatherTimezone *zone);
-int               gweather_timezone_get_offset     (GWeatherTimezone *zone);
-gboolean          gweather_timezone_has_dst        (GWeatherTimezone *zone);
-int               gweather_timezone_get_dst_offset (GWeatherTimezone *zone);
+const char *            gweather_timezone_get_name              (GWeatherTimezone *zone);
+const char *            gweather_timezone_get_tzid              (GWeatherTimezone *zone);
+int                     gweather_timezone_get_offset            (GWeatherTimezone *zone);
+gboolean                gweather_timezone_has_dst               (GWeatherTimezone *zone);
+int                     gweather_timezone_get_dst_offset        (GWeatherTimezone *zone);
 
-GWeatherTimezone *gweather_timezone_ref            (GWeatherTimezone *zone);
-void              gweather_timezone_unref          (GWeatherTimezone *zone);
+GWeatherTimezone *      gweather_timezone_ref                   (GWeatherTimezone *zone);
+void                    gweather_timezone_unref                 (GWeatherTimezone *zone);
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (GWeatherTimezone, gweather_timezone_unref);
 
-GWeatherTimezone *gweather_timezone_get_utc        (void);
-GWeatherTimezone *gweather_timezone_get_by_tzid    (const char *tzid);
+GWeatherTimezone *      gweather_timezone_get_utc               (void);
+GWeatherTimezone *      gweather_timezone_get_by_tzid           (const char       *tzid);
 
 G_END_DECLS
-
-#endif /* __GWEATHER_TIMEZONE_H__ */
diff --git a/libgweather/gweather-version.h.in b/libgweather/gweather-version.h.in
index c5bc44cc..ffa73d5a 100644
--- a/libgweather/gweather-version.h.in
+++ b/libgweather/gweather-version.h.in
@@ -1,28 +1,14 @@
 /* gweather-version.h - libgweather versioning information
  *
- * This file is part of libgweather
- * Copyright (C) 2014  Javier Jardón <jjardon gnome org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2014  Javier Jardón <jjardon gnome org>
+ * SPDX-License-Identifier: LGPL-2.0-or-later
  *
  * Based on json-version from json-glib
  * Authored by Emmanuele Bassi <ebassi gnome org>
  * Adapted for libgweather by Javier Jardón <jjardon gnome org>
  */
 
-#ifndef __GWEATHER_VERSION_H__
-#define __GWEATHER_VERSION_H__
+#pragma once
 
 #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION))
 #error "gweather-version.h must not be included individually, include gweather.h instead"
@@ -102,5 +88,3 @@
          (GWEATHER_MAJOR_VERSION == (major) && GWEATHER_MINOR_VERSION > (minor)) || \
          (GWEATHER_MAJOR_VERSION == (major) && GWEATHER_MINOR_VERSION == (minor) && \
           GWEATHER_MICRO_VERSION >= (micro)))
-
-#endif /* __GWEATHER_VERSION_H__ */
diff --git a/libgweather/gweather-weather.h b/libgweather/gweather-weather.h
index 3df30de2..8c5f93f6 100644
--- a/libgweather/gweather-weather.h
+++ b/libgweather/gweather-weather.h
@@ -1,23 +1,10 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* weather.h - Public header for weather server functions.
+/* gweather-weather.h - Public header for weather server functions
  *
- * 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 2 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
- * <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: The GWeather authors
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef __WEATHER_H_
-#define __WEATHER_H_
+#pragma once
 
 #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION))
 #error "gweather-weather.h must not be included individually, include gweather.h instead"
@@ -50,59 +37,60 @@ typedef enum { /*< flags, underscore_name=gweather_provider >*/
 } GWeatherProvider;
 
 #define GWEATHER_TYPE_INFO (gweather_info_get_type ())
-G_DECLARE_FINAL_TYPE(GWeatherInfo, gweather_info, GWEATHER, INFO, GObject)
-
-GWeatherInfo *           gweather_info_new                 (GWeatherLocation *location);
-void                     gweather_info_update              (GWeatherInfo *info);
-void                    gweather_info_abort               (GWeatherInfo *info);
-void                     gweather_info_store_cache         (void);
-
-GWeatherProvider         gweather_info_get_enabled_providers (GWeatherInfo        *info);
-void                     gweather_info_set_enabled_providers (GWeatherInfo        *info,
-                                                             GWeatherProvider     providers);
-
-const char             * gweather_info_get_application_id  (GWeatherInfo *info);
-void                     gweather_info_set_application_id  (GWeatherInfo *info,
-                                                           const char   *application_id);
-
-const char             * gweather_info_get_contact_info    (GWeatherInfo *info);
-void                     gweather_info_set_contact_info    (GWeatherInfo *info,
-                                                           const char   *contact_info);
-
-gboolean                gweather_info_is_valid            (GWeatherInfo *info);
-gboolean                gweather_info_network_error       (GWeatherInfo *info);
-
-const GWeatherLocation * gweather_info_get_location       (GWeatherInfo *info);
-void                     gweather_info_set_location        (GWeatherInfo *info,
-                                                           GWeatherLocation *location);
-gchar *                         gweather_info_get_location_name   (GWeatherInfo *info);
-gchar *                 gweather_info_get_update          (GWeatherInfo *info);
-gchar *                 gweather_info_get_sky             (GWeatherInfo *info);
-gchar *                         gweather_info_get_conditions      (GWeatherInfo *info);
-
-gchar *                 gweather_info_get_temp            (GWeatherInfo *info);
-gchar *                 gweather_info_get_temp_min        (GWeatherInfo *info);
-gchar *                 gweather_info_get_temp_max        (GWeatherInfo *info);
-gchar *                 gweather_info_get_dew             (GWeatherInfo *info);
-gchar *                 gweather_info_get_humidity        (GWeatherInfo *info);
-gchar *                 gweather_info_get_wind            (GWeatherInfo *info);
-gchar *                 gweather_info_get_pressure        (GWeatherInfo *info);
-gchar *                 gweather_info_get_visibility      (GWeatherInfo *info);
-gchar *                 gweather_info_get_apparent        (GWeatherInfo *info);
-gchar *                 gweather_info_get_sunrise         (GWeatherInfo *info);
-gchar *                 gweather_info_get_sunset          (GWeatherInfo *info);
-GSList *                gweather_info_get_forecast_list   (GWeatherInfo *info);
-GdkPixbufAnimation *    gweather_info_get_radar           (GWeatherInfo *info);
-const gchar             *gweather_info_get_attribution     (GWeatherInfo *info);
-
-gchar *                 gweather_info_get_temp_summary    (GWeatherInfo *info);
-gchar *                         gweather_info_get_weather_summary (GWeatherInfo *info);
-
-const gchar *           gweather_info_get_icon_name       (GWeatherInfo *info);
-const gchar *           gweather_info_get_symbolic_icon_name      (GWeatherInfo *info);
-gint                    gweather_info_next_sun_event      (GWeatherInfo *info);
-
-gboolean                 gweather_info_is_daytime          (GWeatherInfo *info);
+G_DECLARE_FINAL_TYPE (GWeatherInfo, gweather_info, GWEATHER, INFO, GObject)
+
+void                            gweather_info_store_cache               (void);
+
+GWeatherInfo *                  gweather_info_new                       (GWeatherLocation *location);
+void                            gweather_info_update                    (GWeatherInfo *info);
+void                            gweather_info_abort                     (GWeatherInfo *info);
+
+GWeatherProvider                gweather_info_get_enabled_providers     (GWeatherInfo *info);
+void                            gweather_info_set_enabled_providers     (GWeatherInfo  *info,
+                                                                         GWeatherProvider providers);
+
+const char *                    gweather_info_get_application_id        (GWeatherInfo *info);
+void                            gweather_info_set_application_id        (GWeatherInfo *info,
+                                                                         const char *application_id);
+
+const char *                    gweather_info_get_contact_info          (GWeatherInfo *info);
+void                            gweather_info_set_contact_info          (GWeatherInfo *info,
+                                                                         const char *contact_info);
+
+gboolean                        gweather_info_is_valid                  (GWeatherInfo *info);
+gboolean                        gweather_info_network_error             (GWeatherInfo *info);
+
+const GWeatherLocation *        gweather_info_get_location              (GWeatherInfo *info);
+void                            gweather_info_set_location              (GWeatherInfo *info,
+                                                                         GWeatherLocation *location);
+char *                          gweather_info_get_location_name         (GWeatherInfo *info);
+char *                          gweather_info_get_update                (GWeatherInfo *info);
+char *                          gweather_info_get_sky                   (GWeatherInfo *info);
+char *                          gweather_info_get_conditions            (GWeatherInfo *info);
+
+char *                          gweather_info_get_temp                  (GWeatherInfo *info);
+char *                          gweather_info_get_temp_min              (GWeatherInfo *info);
+char *                          gweather_info_get_temp_max              (GWeatherInfo *info);
+char *                          gweather_info_get_dew                   (GWeatherInfo *info);
+char *                          gweather_info_get_humidity              (GWeatherInfo *info);
+char *                          gweather_info_get_wind                  (GWeatherInfo *info);
+char *                          gweather_info_get_pressure              (GWeatherInfo *info);
+char *                          gweather_info_get_visibility            (GWeatherInfo *info);
+char *                          gweather_info_get_apparent              (GWeatherInfo *info);
+char *                          gweather_info_get_sunrise               (GWeatherInfo *info);
+char *                          gweather_info_get_sunset                (GWeatherInfo *info);
+GSList *                        gweather_info_get_forecast_list         (GWeatherInfo *info);
+GdkPixbufAnimation *            gweather_info_get_radar                 (GWeatherInfo *info);
+const char *                    gweather_info_get_attribution           (GWeatherInfo *info);
+
+char *                          gweather_info_get_temp_summary          (GWeatherInfo *info);
+char *                          gweather_info_get_weather_summary       (GWeatherInfo *info);
+
+const char *                    gweather_info_get_icon_name             (GWeatherInfo *info);
+const char *                    gweather_info_get_symbolic_icon_name    (GWeatherInfo *info);
+
+int                             gweather_info_next_sun_event            (GWeatherInfo *info);
+gboolean                        gweather_info_is_daytime                (GWeatherInfo *info);
 
 /* values retrieving functions */
 
@@ -154,9 +142,9 @@ typedef enum { /*< underscore_name=gweather_wind_direction >*/
     GWEATHER_WIND_LAST
 } GWeatherWindDirection;
 
-const gchar * gweather_wind_direction_to_string (GWeatherWindDirection wind);
-const gchar * gweather_wind_direction_to_string_full (GWeatherWindDirection wind,
-                                                      GWeatherFormatOptions options);
+const char *    gweather_wind_direction_to_string       (GWeatherWindDirection wind);
+const char *    gweather_wind_direction_to_string_full  (GWeatherWindDirection wind,
+                                                         GWeatherFormatOptions options);
 
 /**
  * GWeatherSky:
@@ -183,9 +171,9 @@ typedef enum { /*< underscore_name=gweather_sky >*/
     GWEATHER_SKY_LAST
 } GWeatherSky;
 
-const gchar * gweather_sky_to_string (GWeatherSky sky);
-const gchar * gweather_sky_to_string_full (GWeatherSky        sky,
-                                           GWeatherFormatOptions options);
+const char *    gweather_sky_to_string          (GWeatherSky sky);
+const char *    gweather_sky_to_string_full     (GWeatherSky sky,
+                                                 GWeatherFormatOptions options);
 
 /**
  * GWeatherConditionPhenomenon:
@@ -232,32 +220,32 @@ typedef enum { /*< underscore_name=gweather_phenomenon >*/
  * GWeatherConditionQualifier:
  * @GWEATHER_QUALIFIER_INVALID: value not available
  * @GWEATHER_QUALIFIER_NONE: no qualifier for the phenomenon
- * @GWEATHER_QUALIFIER_VICINITY: phenomenon happening in the proximity
- *                               of the location, not in the actual location
+ * @GWEATHER_QUALIFIER_VICINITY: phenomenon happening in the proximity of the
+ *   location, not in the actual location
  * @GWEATHER_QUALIFIER_LIGHT: phenomenon is light or predicted to be light
  * @GWEATHER_QUALIFIER_MODERATE: phenomenon is moderate or predicted to be
- *                               moderate
+ *   moderate
  * @GWEATHER_QUALIFIER_HEAVY: phenomenon is heavy or predicted to be heavy
  * @GWEATHER_QUALIFIER_SHALLOW: shallow fog (only valid with
- *                              %GWEATHER_PHENOMENON_FOG)
+ *   %GWEATHER_PHENOMENON_FOG)
  * @GWEATHER_QUALIFIER_PATCHES: patches of fog (only valid with
- *                              %GWEATHER_PHENOMENON_FOG)
+ *   %GWEATHER_PHENOMENON_FOG)
  * @GWEATHER_QUALIFIER_PARTIAL: partial fog (only valid with
- *                             %GWEATHER_PHENOMENON_FOG)
- * @GWEATHER_QUALIFIER_THUNDERSTORM: phenomenon will be a thunderstorm
- *                                   and/or will include lightning
+ *   %GWEATHER_PHENOMENON_FOG)
+ * @GWEATHER_QUALIFIER_THUNDERSTORM: phenomenon will be a thunderstorm and/or
+ *   will include lightning
  * @GWEATHER_QUALIFIER_BLOWING: phenomenon is blowing (valid with
- *                              %GWEATHER_PHENOMENON_SNOW, %GWEATHER_PHENOMENON_SAND,
- *                              %GWEATHER_PHENOMENON_SPRAY, %GWEATHER_PHENOMENON_DUST)
+ *   %GWEATHER_PHENOMENON_SNOW, %GWEATHER_PHENOMENON_SAND,
+ *   %GWEATHER_PHENOMENON_SPRAY, %GWEATHER_PHENOMENON_DUST)
  * @GWEATHER_QUALIFIER_SHOWERS: phenomenon is heavy and involves showers
- * @GWEATHER_QUALIFIER_DRIFTING: phenomenon is moving across (valid
- *                               with %GWEATHER_PHENOMENON_SAND and
- *                               %GWEATHER_PHENOMENON_DUST)
+ * @GWEATHER_QUALIFIER_DRIFTING: phenomenon is moving across (valid with
+ *   %GWEATHER_PHENOMENON_SAND and %GWEATHER_PHENOMENON_DUST)
  * @GWEATHER_QUALIFIER_FREEZING: phenomenon is freezing and involves ice
- * @GWEATHER_QUALIFIER_LAST: maximum value of the enumeration.
+ * @GWEATHER_QUALIFIER_LAST: maximum value of the enumeration
  *
  * An additional modifier applied to a #GWeatherConditionPhenomenon to
  * describe the current or forecasted weather conditions.
+ *
  * The exact meaning of each qualifier is described at
  * http://www.weather.com/glossary/ and
  * http://www.crh.noaa.gov/arx/wx.tbl.php
@@ -290,30 +278,56 @@ typedef enum { /*< underscore_name=gweather_qualifier >*/
  * The current phase of the moon, represented as degrees,
  * where 0 is the new moon, 90 is the first quarter, etc.
  */
-typedef gdouble GWeatherMoonPhase;
+typedef double GWeatherMoonPhase;
 
 /**
  * GWeatherMoonLatitude:
  *
  * The moon declension, in degrees.
  */
-typedef gdouble GWeatherMoonLatitude;
-
-gboolean gweather_info_get_value_update                (GWeatherInfo *info, time_t *value);
-gboolean gweather_info_get_value_sky           (GWeatherInfo *info, GWeatherSky *sky);
-gboolean gweather_info_get_value_conditions    (GWeatherInfo *info, GWeatherConditionPhenomenon *phenomenon, 
GWeatherConditionQualifier *qualifier);
-gboolean gweather_info_get_value_temp          (GWeatherInfo *info, GWeatherTemperatureUnit unit, gdouble 
*value);
-gboolean gweather_info_get_value_temp_min      (GWeatherInfo *info, GWeatherTemperatureUnit unit, gdouble 
*value);
-gboolean gweather_info_get_value_temp_max      (GWeatherInfo *info, GWeatherTemperatureUnit unit, gdouble 
*value);
-gboolean gweather_info_get_value_dew           (GWeatherInfo *info, GWeatherTemperatureUnit unit, gdouble 
*value);
-gboolean gweather_info_get_value_apparent      (GWeatherInfo *info, GWeatherTemperatureUnit unit, gdouble 
*value);
-gboolean gweather_info_get_value_wind          (GWeatherInfo *info, GWeatherSpeedUnit unit, gdouble *speed, 
GWeatherWindDirection *direction);
-gboolean gweather_info_get_value_pressure      (GWeatherInfo *info, GWeatherPressureUnit unit, gdouble 
*value);
-gboolean gweather_info_get_value_visibility    (GWeatherInfo *info, GWeatherDistanceUnit unit, gdouble 
*value);
-gboolean gweather_info_get_value_sunrise       (GWeatherInfo *info, time_t *value);
-gboolean gweather_info_get_value_sunset        (GWeatherInfo *info, time_t *value);
-gboolean gweather_info_get_value_moonphase      (GWeatherInfo *info, GWeatherMoonPhase *value, 
GWeatherMoonLatitude *lat);
-gboolean gweather_info_get_upcoming_moonphases  (GWeatherInfo *info, time_t *phases);
+typedef double GWeatherMoonLatitude;
+
+gboolean        gweather_info_get_value_update          (GWeatherInfo *info,
+                                                         time_t *value);
+gboolean        gweather_info_get_value_sky             (GWeatherInfo *info,
+                                                         GWeatherSky *sky);
+gboolean        gweather_info_get_value_conditions      (GWeatherInfo *info,
+                                                         GWeatherConditionPhenomenon *phenomenon,
+                                                         GWeatherConditionQualifier *qualifier);
+gboolean        gweather_info_get_value_temp            (GWeatherInfo *info,
+                                                         GWeatherTemperatureUnit unit,
+                                                         double *value);
+gboolean        gweather_info_get_value_temp_min        (GWeatherInfo *info,
+                                                         GWeatherTemperatureUnit unit,
+                                                         double *value);
+gboolean        gweather_info_get_value_temp_max        (GWeatherInfo *info,
+                                                         GWeatherTemperatureUnit unit,
+                                                         double *value);
+gboolean        gweather_info_get_value_dew             (GWeatherInfo *info,
+                                                         GWeatherTemperatureUnit unit,
+                                                         double *value);
+gboolean        gweather_info_get_value_apparent        (GWeatherInfo *info,
+                                                         GWeatherTemperatureUnit unit,
+                                                         double *value);
+gboolean        gweather_info_get_value_wind            (GWeatherInfo *info,
+                                                         GWeatherSpeedUnit unit,
+                                                         double *speed,
+                                                         GWeatherWindDirection *direction);
+gboolean        gweather_info_get_value_pressure        (GWeatherInfo *info,
+                                                         GWeatherPressureUnit unit,
+                                                         double *value);
+gboolean        gweather_info_get_value_visibility      (GWeatherInfo *info,
+                                                         GWeatherDistanceUnit unit,
+                                                         double *value);
+gboolean        gweather_info_get_value_sunrise        (GWeatherInfo *info,
+                                                         time_t *value);
+gboolean        gweather_info_get_value_sunset          (GWeatherInfo *info,
+                                                         time_t *value);
+gboolean        gweather_info_get_value_moonphase       (GWeatherInfo *info,
+                                                         GWeatherMoonPhase *value,
+                                                         GWeatherMoonLatitude *lat);
+gboolean        gweather_info_get_upcoming_moonphases   (GWeatherInfo *info,
+                                                         time_t *phases);
 
 typedef struct _GWeatherConditions GWeatherConditions;
 
@@ -339,14 +353,12 @@ struct _GWeatherConditions {
     GWeatherConditionQualifier qualifier;
 };
 
-const gchar * gweather_conditions_to_string (GWeatherConditions *conditions);
-const gchar * gweather_conditions_to_string_full (GWeatherConditions *conditions,
-                                                  GWeatherFormatOptions options);
+const char *    gweather_conditions_to_string           (GWeatherConditions *conditions);
+const char *    gweather_conditions_to_string_full      (GWeatherConditions *conditions,
+                                                         GWeatherFormatOptions options);
 
-GWeatherTemperatureUnit gweather_temperature_unit_to_real (GWeatherTemperatureUnit unit);
+GWeatherTemperatureUnit gweather_temperature_unit_to_real       (GWeatherTemperatureUnit unit);
 
-const gchar * gweather_speed_unit_to_string (GWeatherSpeedUnit unit);
+const char *    gweather_speed_unit_to_string   (GWeatherSpeedUnit unit);
 
 G_END_DECLS
-
-#endif /* __WEATHER_H_ */
diff --git a/libgweather/gweather.h b/libgweather/gweather.h
index ef454802..8bf5fde2 100644
--- a/libgweather/gweather.h
+++ b/libgweather/gweather.h
@@ -1,25 +1,11 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
 /* gweather.h
  *
- * Copyright 2008, Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see
- * <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2008, Red Hat, Inc.
+ * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#ifndef __GWEATHER_H__
-#define __GWEATHER_H__
+#pragma once
 
 #if !(defined(GWEATHER_COMPILATION) || defined(GWEATHER_I_KNOW_THIS_IS_UNSTABLE))
 #error "libgweather should only be used if you understand that it's subject to change, and is not supported 
as a fixed API/ABI or as part of the platform"
@@ -37,5 +23,3 @@
 #include <libgweather/gweather-timezone-menu.h>
 
 #undef IN_GWEATHER_H
-
-#endif /* __GWEATHER_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]