1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 2 /* gweather-timezone.c - Timezone handling 3 * 4 * Copyright 2008, Red Hat, Inc. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public License 8 * as published by the Free Software Foundation; either version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, see 18 * <https://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __GWEATHER_TIMEZONE_H__ 22 #define __GWEATHER_TIMEZONE_H__ 23 24 #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION)) 25 #error "gweather-timezone.h must not be included individually, include gweather.h instead" 26 #endif 27 28 #include <glib-object.h> 29 30 G_BEGIN_DECLS 31 32 typedef struct _GWeatherTimezone GWeatherTimezone; 33 34 GType gweather_timezone_get_type (void); 35 #define GWEATHER_TYPE_TIMEZONE (gweather_timezone_get_type ()) 36 37 const char *gweather_timezone_get_name (GWeatherTimezone *zone); 38 const char *gweather_timezone_get_tzid (GWeatherTimezone *zone); 39 int gweather_timezone_get_offset (GWeatherTimezone *zone); 40 gboolean gweather_timezone_has_dst (GWeatherTimezone *zone); 41 int gweather_timezone_get_dst_offset (GWeatherTimezone *zone); 42 43 GWeatherTimezone *gweather_timezone_ref (GWeatherTimezone *zone); 44 void gweather_timezone_unref (GWeatherTimezone *zone); 45 46 G_DEFINE_AUTOPTR_CLEANUP_FUNC (GWeatherTimezone, gweather_timezone_unref); 47 48 GWeatherTimezone *gweather_timezone_get_utc (void); 49 GWeatherTimezone *gweather_timezone_get_by_tzid (const char *tzid); 50 51 G_END_DECLS 52 53 #endif /* __GWEATHER_TIMEZONE_H__ */ 54