![]() |
![]() |
![]() |
libical-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <i-cal-array> #include <i-cal-component> #include <i-cal-timetype> #define I_CAL_TIMEZONE_TYPE ICalTimezone; struct ICalTimezoneClass; ICalTimezone * i_cal_timezone_new_full (icaltimezone *native
,GObject *owner
,gboolean is_global_memory
); ICalTimezone * i_cal_timezone_new (void
); void i_cal_timezone_destroy (icaltimezone *zone
); ICalTimezone * i_cal_timezone_copy (const ICalTimezone *zone
); void i_cal_timezone_free (ICalTimezone *zone
,gint free_struct
); void i_cal_timezone_set_tzid_prefix (const gchar *new_prefix
); void i_cal_timezone_free_builtin_timezones (void
); ICalTimezone * i_cal_timezone_get_builtin_timezone (const gchar *location
); ICalTimezone * i_cal_timezone_get_builtin_timezone_from_offset (gint offset
,const gchar *tzname
); ICalTimezone * i_cal_timezone_get_builtin_timezone_from_tzid (const gchar *tzid
); ICalArray * i_cal_timezone_get_builtin_timezones (void
); ICalTimezone * i_cal_timezone_get_utc_timezone (void
); const gchar * i_cal_timezone_get_tzid (const ICalTimezone *zone
); const gchar * i_cal_timezone_get_location (const ICalTimezone *zone
); const gchar * i_cal_timezone_get_tznames (const ICalTimezone *zone
); gdouble i_cal_timezone_get_latitude (const ICalTimezone *zone
); gdouble i_cal_timezone_get_longitude (const ICalTimezone *zone
); ICalComponent * i_cal_timezone_get_component (const ICalTimezone *zone
); gint i_cal_timezone_set_component (ICalTimezone *zone
,ICalComponent *comp
); const gchar * i_cal_timezone_get_display_name (const ICalTimezone *zone
); void i_cal_timezone_convert_time (ICalTimetype *tt
,ICalTimezone *from_zone
,ICalTimezone *to_zone
); void i_cal_timezone_get_utc_offset (ICalTimezone *zone
,ICalTimetype *tt
,gint *is_daylight
); void i_cal_timezone_get_utc_offset_of_utc_time (ICalTimezone *zone
,ICalTimetype *tt
,gint *is_daylight
); ICalArray * i_cal_timezone_array_new (void
); void i_cal_timezone_array_append_from_vtimezone (ICalArray *timezones
,ICalComponent *child
); void i_cal_timezone_array_free (ICalArray *timezones
); void i_cal_timezone_set_zone_directory (gchar *path
); void i_cal_timezone_free_zone_directory (void
); void i_cal_timezone_release_zone_tab (void
); gint i_cal_timezone_dump_changes (ICalTimezone *zone
,gint max_year
,FILE *fp
); ICalTimezone * i_cal_timezone_array_element_at (ICalArray *timezones
,guint index
);
ICalTimezone * i_cal_timezone_new_full (icaltimezone *native
,GObject *owner
,gboolean is_global_memory
);
Create a new libical-glib object from the native libical object and the owner.
|
The native libical object. |
|
The parent. |
|
Whether it is allocated in the global memory. |
Returns : |
The newly create libical-glib object. [transfer full] |
Since 1.0
ICalTimezone * i_cal_timezone_new (void
);
The constructor of the type ICalTimezone
Returns : |
The newly created object of the type ICalTimezone. [transfer full][allow-none] |
Since 1.0
void i_cal_timezone_destroy (icaltimezone *zone
);
The destructor of the type ICalTimezone to fully destroy the object by providing 1 as the second argument of i_cal_time_zone_free. The method is used as a default destructor for introspection.
|
The ICalTimezone to be freed |
Since 1.0
ICalTimezone * i_cal_timezone_copy (const ICalTimezone *zone
);
The clone method for ICalTimezone
|
The ICalTimezone needs to be cloned. |
Returns : |
The newly created ICalTimezone with the same values as zone . [transfer none]
|
Since 1.0
void i_cal_timezone_free (ICalTimezone *zone
,gint free_struct
);
The destructor of ICalTimezone
|
The ICalTimezone to be freed |
|
Whether to free it or reset it. 1 to free and 0 to reset |
Since 1.0
void i_cal_timezone_set_tzid_prefix (const gchar *new_prefix
);
Sets the prefix to be used for tzid's generated from system tzdata. Must be globally unique (such as a domain name owned by the developer of the calling application), and begin and end with forward slashes. Do not change or de-allocate the string buffer after calling this.
|
The ICalTimezone to be set |
Since 1.0
void i_cal_timezone_free_builtin_timezones
(void
);
Free any builtin timezone information
Since 1.0
ICalTimezone * i_cal_timezone_get_builtin_timezone (const gchar *location
);
Returns a single builtin timezone, given its Olson city name.
|
The location representing the timezone. |
Returns : |
The builtin ICalTimezone with the name of location . [transfer full]
|
Since 1.0
ICalTimezone * i_cal_timezone_get_builtin_timezone_from_offset (gint offset
,const gchar *tzname
);
Returns a single builtin timezone, given its offset.
|
The offset used to get the ICalTimezone |
|
The reference ICalTimezone name |
Returns : |
(transfer full) |
Since 1.0
ICalTimezone * i_cal_timezone_get_builtin_timezone_from_tzid
(const gchar *tzid
);
Returns a single builtin timezone, given its TZID.
|
The tzid name |
Returns : |
(transfer full) |
Since 1.0
ICalArray * i_cal_timezone_get_builtin_timezones
(void
);
Returns a list of builtin timezone.
Returns : |
The builtin ICalTimezone. [transfer full] |
Since 1.0
ICalTimezone * i_cal_timezone_get_utc_timezone (void
);
Returns the UTC timezone.
Returns : |
The utc ICalTimezone. [transfer full] |
Since 1.0
const gchar * i_cal_timezone_get_tzid (const ICalTimezone *zone
);
Returns the TZID of a timezone.
|
The ICalTimezone to be queried |
Returns : |
The timezone id |
Since 1.0
const gchar * i_cal_timezone_get_location (const ICalTimezone *zone
);
Returns the city name of a timezone.
|
The ICalTimezone to be queried |
Returns : |
The location of the ICalTimezone |
Since 1.0
const gchar * i_cal_timezone_get_tznames (const ICalTimezone *zone
);
Returns the TZNAME properties used in the latest STANDARD and DAYLIGHT components. If they are the same it will return just one, e.g. "LMT". If they are different it will format them like "EST/EDT". Note that this may also return NULL.
|
The ICalTimezone to be queried |
Returns : |
The timezone name |
Since 1.0
gdouble i_cal_timezone_get_latitude (const ICalTimezone *zone
);
Returns the latitude of a builtin timezone.
|
The ICalTimezone to be queried |
Returns : |
The latitude of the ICalTimezone |
Since 1.0
gdouble i_cal_timezone_get_longitude (const ICalTimezone *zone
);
Returns the longitude of a builtin timezone.
|
The ICalTimezone to be queried |
Returns : |
The longitude of the ICalTimezone. |
Since 1.0
ICalComponent * i_cal_timezone_get_component (const ICalTimezone *zone
);
Returns the VTIMEZONE component of a timezone.
|
The ICalTimezone to be queried |
Returns : |
the VTIMEZONE component of the zone . [transfer full]
|
Since 1.0
gint i_cal_timezone_set_component (ICalTimezone *zone
,ICalComponent *comp
);
Sets the VTIMEZONE component of ICalTimezone, initializing the tzid, location and tzname fields. It returns 1 on success or 0 on failure, i.e. no TZID was found.
|
The ICalTimezone to be set |
|
The VTIMEZONE component of an ICalTimezone, initializing the tzid, location and tzname fields. |
Returns : |
Whether the action is successful. 1 for success, 0 for failure. |
Since 1.0
const gchar * i_cal_timezone_get_display_name (const ICalTimezone *zone
);
Get the display name of the zone
.
|
The ICalTimezone to be queried |
Returns : |
The display name of zone
|
Since 1.0
void i_cal_timezone_convert_time (ICalTimetype *tt
,ICalTimezone *from_zone
,ICalTimezone *to_zone
);
Convert time from one timezone to another.
|
The time to be converted |
|
from timezone |
|
to timezone |
Since 1.0
void i_cal_timezone_get_utc_offset (ICalTimezone *zone
,ICalTimetype *tt
,gint *is_daylight
);
Calculates the UTC offset of a given local time in the given timezone. It is the number of seconds to add to UTC to get local time. The is_daylight flag is set to 1 if the time is in daylight-savings time.
|
The given ICalTimezone. |
|
The local time. |
|
whether it is day light. |
Since 1.0
void i_cal_timezone_get_utc_offset_of_utc_time (ICalTimezone *zone
,ICalTimetype *tt
,gint *is_daylight
);
Calculates the UTC offset of a given UTC time in the given timezone. It is the number of seconds to add to UTC to get local time. The is_daylight flag is set to 1 if the time is in daylight-savings time.
|
The given ICalTimezone. |
|
The local time. |
|
whether it is day light. |
Since 1.0
ICalArray * i_cal_timezone_array_new (void
);
Create a new array of timezones.
Returns : |
Create a new array. [transfer full] |
Since 1.0
void i_cal_timezone_array_append_from_vtimezone (ICalArray *timezones
,ICalComponent *child
);
Populate the array of timezones with component.
|
The timezones to be populated |
|
The component to be appended to timezones . |
Since 1.0
void i_cal_timezone_array_free (ICalArray *timezones
);
Free an array of timezones.
|
Free an array. |
Since 1.0
void i_cal_timezone_set_zone_directory (gchar *path
);
Set the directory to look for the zonefiles
|
The path to look for the zonefiles |
Since 1.0
void i_cal_timezone_free_zone_directory (void
);
Free memory dedicated to the zonefile directory
Since 1.0
void i_cal_timezone_release_zone_tab (void
);
Free memory dedicated to the zonefile directory
Since 1.0
gint i_cal_timezone_dump_changes (ICalTimezone *zone
,gint max_year
,FILE *fp
);
This outputs a list of timezone changes for the given timezone to the given file, up to the maximum year given.
|
The timezone to be queried. |
|
max year |
|
The file handle. |
Returns : |
1 if success. |
Since 1.0
ICalTimezone * i_cal_timezone_array_element_at (ICalArray *timezones
,guint index
);
Get the ICalTimezone at specified position in array.
|
The array to be visited. |
|
The index |
Returns : |
The ICalTimezone at the position index in timezones . [transfer full]
|
Since 1.0