1 /* -*- Mode: C -*-
2   ======================================================================
3   FILE: icaltimezoneimpl.h
4   CREATOR: glenn 07 March 2010
5 
6   $Id: icalparameterimpl.h,v 1.4 2008-01-15 23:17:40 dothebart Exp $
7   $Locker:  $
8 
9 
10  (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
11      http://www.softwarestudio.org
12 
13  This program is free software; you can redistribute it and/or modify
14  it under the terms of either:
15 
16     The LGPL as published by the Free Software Foundation, version
17     2.1, available at: http://www.fsf.org/copyleft/lesser.html
18 
19   Or:
20 
21     The Mozilla Public License Version 1.0. You may obtain a copy of
22     the License at http://www.mozilla.org/MPL/
23 
24   Contributions from:
25 
26  ======================================================================*/
27 #ifdef HAVE_CONFIG_H
28 #include <config.h>
29 #endif
30 
31 #ifndef ICALTIMEZONE_IMPL
32 #define ICALTIMEZONE_IMPL
33 
34 #include "icaltimezone.h"
35 #include "icalcomponent.h"
36 #include "icalarray.h"
37 
38 struct _icaltimezone {
39     char		*tzid;
40     /**< The unique ID of this timezone,
41        e.g. "/citadel.org/Olson_20010601_1/Africa/Banjul".
42        This should only be used to identify a VTIMEZONE. It is not
43        meant to be displayed to the user in any form. */
44 
45     char		*location;
46     /**< The location for the timezone, e.g. "Africa/Accra" for the
47        Olson database. We look for this in the "LOCATION" or
48        "X-LIC-LOCATION" properties of the VTIMEZONE component. It
49        isn't a standard property yet. This will be NULL if no location
50        is found in the VTIMEZONE. */
51 
52     char		*tznames;
53     /**< This will be set to a combination of the TZNAME properties
54        from the last STANDARD and DAYLIGHT components in the
55        VTIMEZONE, e.g. "EST/EDT".  If they both use the same TZNAME,
56        or only one type of component is found, then only one TZNAME
57        will appear, e.g. "AZOT". If no TZNAME is found this will be
58        NULL. */
59 
60     double		 latitude;
61     double		 longitude;
62     /**< The coordinates of the city, in degrees. */
63 
64     icalcomponent	*component;
65     /**< The toplevel VTIMEZONE component loaded from the .ics file for this
66          timezone. If we need to regenerate the changes data we need this. */
67 
68     icaltimezone	*builtin_timezone;
69     /**< If this is not NULL it points to the builtin icaltimezone
70        that the above TZID refers to. This icaltimezone should be used
71        instead when accessing the timezone changes data, so that the
72        expanded timezone changes data is shared between calendar
73        components. */
74 
75     int			 end_year;
76     /**< This is the last year for which we have expanded the data to.
77        If we need to calculate a date past this we need to expand the
78        timezone component data from scratch. */
79 
80     icalarray		*changes;
81     /**< A dynamically-allocated array of time zone changes, sorted by the
82        time of the change in local time. So we can do fast binary-searches
83        to convert from local time to UTC. */
84 };
85 
86 
87 
88 #endif /*ICALTIMEZONE_IMPL*/
89