|
Libical API Documentation 4.0 UNRELEASED Go to the stable 3.0 documentation
|
Defines the data structure for iCalendar components. More...
Go to the source code of this file.
Functions | |
| icalcomponent * | icalcompiter_deref (icalcompiter *i) |
| bool | icalcompiter_is_valid (const icalcompiter *i) |
| icalcomponent * | icalcompiter_next (icalcompiter *i) |
| icalcomponent * | icalcompiter_prior (icalcompiter *i) |
| void | icalcomponent_add_component (icalcomponent *parent, icalcomponent *child) |
| void | icalcomponent_add_property (icalcomponent *component, icalproperty *property) |
| char * | icalcomponent_as_ical_string (const icalcomponent *component) |
| char * | icalcomponent_as_ical_string_r (const icalcomponent *component) |
| icalcompiter | icalcomponent_begin_component (icalcomponent *component, icalcomponent_kind kind) |
| icalpropiter | icalcomponent_begin_property (icalcomponent *component, icalproperty_kind kind) |
| bool | icalcomponent_check_restrictions (icalcomponent *comp) |
| icalcomponent * | icalcomponent_clone (const icalcomponent *old) |
| void | icalcomponent_convert_errors (icalcomponent *component) |
| int | icalcomponent_count_components (icalcomponent *component, icalcomponent_kind kind) |
| int | icalcomponent_count_errors (icalcomponent *component) |
| int | icalcomponent_count_properties (icalcomponent *component, icalproperty_kind kind) |
| icalcompiter | icalcomponent_end_component (icalcomponent *component, icalcomponent_kind kind) |
| void | icalcomponent_foreach_recurrence (icalcomponent *comp, struct icaltimetype start, struct icaltimetype end, void(*callback)(icalcomponent *comp, const struct icaltime_span *span, void *data), void *callback_data) |
| void | icalcomponent_foreach_tzid (icalcomponent *comp, void(*callback)(icalparameter *param, void *data), void *callback_data) |
| void | icalcomponent_free (icalcomponent *component) |
| const char * | icalcomponent_get_comment (icalcomponent *comp) |
| const char * | icalcomponent_get_component_name (const icalcomponent *comp) |
| char * | icalcomponent_get_component_name_r (const icalcomponent *comp) |
| icalcomponent * | icalcomponent_get_current_component (icalcomponent *component) |
| icalproperty * | icalcomponent_get_current_property (icalcomponent *component) |
| const char * | icalcomponent_get_description (icalcomponent *comp) |
| struct icaltimetype | icalcomponent_get_dtend (icalcomponent *comp) |
| struct icaltimetype | icalcomponent_get_dtstamp (icalcomponent *comp) |
| struct icaltimetype | icalcomponent_get_dtstart (icalcomponent *comp) |
| struct icaltimetype | icalcomponent_get_due (icalcomponent *comp) |
| struct icaldurationtype | icalcomponent_get_duration (icalcomponent *comp) |
| icalcomponent * | icalcomponent_get_first_component (icalcomponent *component, icalcomponent_kind kind) |
| icalproperty * | icalcomponent_get_first_property (icalcomponent *component, icalproperty_kind kind) |
| icalcomponent * | icalcomponent_get_first_real_component (const icalcomponent *c) |
| const char * | icalcomponent_get_iana_name (const icalcomponent *comp) |
| icalcomponent * | icalcomponent_get_inner (icalcomponent *comp) |
| const char * | icalcomponent_get_location (icalcomponent *comp) |
| icalproperty_method | icalcomponent_get_method (icalcomponent *comp) |
| icalcomponent * | icalcomponent_get_next_component (icalcomponent *component, icalcomponent_kind kind) |
| icalproperty * | icalcomponent_get_next_property (icalcomponent *component, icalproperty_kind kind) |
| struct icaltimetype | icalcomponent_get_recurrenceid (icalcomponent *comp) |
| const char * | icalcomponent_get_relcalid (icalcomponent *comp) |
| int | icalcomponent_get_sequence (icalcomponent *comp) |
| struct icaltime_span | icalcomponent_get_span (icalcomponent *comp) |
| enum icalproperty_status | icalcomponent_get_status (icalcomponent *comp) |
| const char * | icalcomponent_get_summary (icalcomponent *comp) |
| icaltimezone * | icalcomponent_get_timezone (icalcomponent *comp, const char *tzid) |
| const char * | icalcomponent_get_uid (icalcomponent *comp) |
| const char * | icalcomponent_get_x_name (const icalcomponent *comp) |
| bool | icalcomponent_is_valid (const icalcomponent *component) |
| icalcomponent_kind | icalcomponent_isa (const icalcomponent *component) |
| bool | icalcomponent_isa_component (const void *component) |
| bool | icalcomponent_kind_is_valid (const icalcomponent_kind kind) |
| const char * | icalcomponent_kind_to_string (icalcomponent_kind kind) |
| void | icalcomponent_merge_component (icalcomponent *comp, icalcomponent *comp_to_merge) |
| icalcomponent * | icalcomponent_new (icalcomponent_kind kind) |
| icalcomponent * | icalcomponent_new_from_string (const char *str) |
| icalcomponent * | icalcomponent_new_iana (const char *iana_name) |
| icalcomponent * | icalcomponent_new_participant (void) |
| icalcomponent * | icalcomponent_new_vagenda (void) |
| icalcomponent * | icalcomponent_new_valarm (void) |
| icalcomponent * | icalcomponent_new_vavailability (void) |
| icalcomponent * | icalcomponent_new_vcalendar (void) |
| icalcomponent * | icalcomponent_new_vevent (void) |
| icalcomponent * | icalcomponent_new_vfreebusy (void) |
| icalcomponent * | icalcomponent_new_vjournal (void) |
| icalcomponent * | icalcomponent_new_vlocation (void) |
| icalcomponent * | icalcomponent_new_vpatch (void) |
| icalcomponent * | icalcomponent_new_vpoll (void) |
| icalcomponent * | icalcomponent_new_vquery (void) |
| icalcomponent * | icalcomponent_new_vreply (void) |
| icalcomponent * | icalcomponent_new_vresource (void) |
| icalcomponent * | icalcomponent_new_vtimezone (void) |
| icalcomponent * | icalcomponent_new_vtodo (void) |
| icalcomponent * | icalcomponent_new_vvoter (void) |
| icalcomponent * | icalcomponent_new_x (const char *x_name) |
| icalcomponent * | icalcomponent_new_xavailable (void) |
| icalcomponent * | icalcomponent_new_xdaylight (void) |
| icalcomponent * | icalcomponent_new_xpatch (void) |
| icalcomponent * | icalcomponent_new_xstandard (void) |
| icalcomponent * | icalcomponent_new_xvote (void) |
| void | icalcomponent_normalize (icalcomponent *comp) |
| void | icalcomponent_remove_component (icalcomponent *parent, icalcomponent *child) |
| void | icalcomponent_remove_property (icalcomponent *component, icalproperty *property) |
| void | icalcomponent_remove_property_by_kind (icalcomponent *component, icalproperty_kind kind) |
| void | icalcomponent_set_comment (icalcomponent *comp, const char *v) |
| void | icalcomponent_set_description (icalcomponent *comp, const char *v) |
| void | icalcomponent_set_dtend (icalcomponent *comp, struct icaltimetype v) |
| void | icalcomponent_set_dtstamp (icalcomponent *comp, struct icaltimetype v) |
| void | icalcomponent_set_dtstart (icalcomponent *comp, struct icaltimetype v) |
| void | icalcomponent_set_due (icalcomponent *comp, struct icaltimetype v) |
| void | icalcomponent_set_duration (icalcomponent *comp, struct icaldurationtype v) |
| void | icalcomponent_set_iana_name (icalcomponent *comp, const char *name) |
| void | icalcomponent_set_location (icalcomponent *comp, const char *v) |
| void | icalcomponent_set_method (icalcomponent *comp, icalproperty_method method) |
| void | icalcomponent_set_recurrenceid (icalcomponent *comp, struct icaltimetype v) |
| void | icalcomponent_set_relcalid (icalcomponent *comp, const char *v) |
| void | icalcomponent_set_sequence (icalcomponent *comp, int v) |
| void | icalcomponent_set_status (icalcomponent *comp, enum icalproperty_status v) |
| void | icalcomponent_set_summary (icalcomponent *comp, const char *v) |
| void | icalcomponent_set_uid (icalcomponent *comp, const char *v) |
| void | icalcomponent_set_x_name (icalcomponent *comp, const char *name) |
| icalcomponent_kind | icalcomponent_string_to_kind (const char *string) |
| void | icalcomponent_strip_errors (icalcomponent *component) |
| icalcomponent * | icalcomponent_vanew (icalcomponent_kind kind,...) |
| struct icaltimetype | icalproperty_get_datetime_with_component (icalproperty *prop, icalcomponent *comp) |
| icalcomponent * | icalproperty_get_parent (const icalproperty *property) |
| bool | icalproperty_recurrence_is_excluded (icalcomponent *comp, struct icaltimetype *dtstart, struct icaltimetype *recurtime) |
| Decides if a recurrence is acceptable. | |
| void | icalproperty_set_parent (icalproperty *property, icalcomponent *component) |
| icalproperty * | icalpropiter_deref (icalpropiter *i) |
| bool | icalpropiter_is_valid (const icalpropiter *i) |
| icalproperty * | icalpropiter_next (icalpropiter *i) |
Defines the data structure for iCalendar components.
Definition in file icalcomponent.h.
| icalcomponent * icalcompiter_deref | ( | icalcompiter * | i | ) |
Gets the current icalcomponent referenced by the specified icalcompiter.
| i | a pointer to a valid icalcompiter |
i or NULL if i is invalid. Definition at line 1484 of file icalcomponent.c.
| bool icalcompiter_is_valid | ( | const icalcompiter * | i | ) |
Checks if the specified icalcompiter is valid.
| i | a pointer to a possibly invalid icalcompiter |
i points to a valid icalcompiter; false otherwise.Definition at line 1392 of file icalcomponent.c.
| icalcomponent * icalcompiter_next | ( | icalcompiter * | i | ) |
Gets the next icalcomponent referenced by the specified icalcompiter with a matching icalcomponent_kind.
| i | a pointer to a valid icalcomponent |
i. NULL is returned if is invalid or if there are no matches found. Definition at line 1446 of file icalcomponent.c.
| icalcomponent * icalcompiter_prior | ( | icalcompiter * | i | ) |
Gets the previous icalcomponent referenced by the specified icalcompiter with a matching icalcomponent_kind.
| i | a pointer to a valid icalcomponent |
i. NULL is returned if is invalid or if there are no matches found. Definition at line 1465 of file icalcomponent.c.
| void icalcomponent_add_component | ( | icalcomponent * | parent, |
| icalcomponent * | child ) |
Attaches a child icalcomponent to a parent icalcomponent
| parent | a pointer to a valid parent icalcomponent |
| child | a pointer to a valid child icalcomponent |
Definition at line 552 of file icalcomponent.c.
| void icalcomponent_add_property | ( | icalcomponent * | component, |
| icalproperty * | property ) |
Adds an icalproperty to the specified icalcomponent.
No error checking is performed by this function, although it will assert if the specified icalproperty has already been added.
| component | a pointer to a valid icalcomponent |
| property | a pointer to a presumably valid icalproperty |
Definition at line 428 of file icalcomponent.c.
| char * icalcomponent_as_ical_string | ( | const icalcomponent * | component | ) |
Creates a character string representation of an icalcomponent.
| component | a pointer to a icalcomponent |
component string representation; NULL if a memory allocation failure is encountered.Definition at line 234 of file icalcomponent.c.
| char * icalcomponent_as_ical_string_r | ( | const icalcomponent * | component | ) |
Creates a character string representation of an icalcomponent.
| component | a pointer to a icalcomponent |
component string representation; NULL if a memory allocation failure is encountered.Definition at line 245 of file icalcomponent.c.
| icalcompiter icalcomponent_begin_component | ( | icalcomponent * | component, |
| icalcomponent_kind | kind ) |
Gets an icalcompiter associated to the first icalcomponent with icalcomponent_kind attached to the specified icalcomponent.
| component | a pointer to a valid icalcomponent |
| kind | the icalcomponent_kind to use for the search |
kind; Use icalcompiter_is_valid() to determine if the return value is valid. Definition at line 1401 of file icalcomponent.c.
| icalpropiter icalcomponent_begin_property | ( | icalcomponent * | component, |
| icalproperty_kind | kind ) |
Gets an icalpropiter associated to the first icalproperty with icalproperty_kind attached to the specified icalcomponent.
| component | a pointer to a valid icalcomponent |
| kind | the ical_property_kind to use for the search |
kind; Use icalpropiter_is_valid() to determine if the return value is valid. Definition at line 1495 of file icalcomponent.c.
| bool icalcomponent_check_restrictions | ( | icalcomponent * | comp | ) |
Checks restrictions on the specified icalcomponent
| comp | a pointer to a valid icalcomponent |
comp is a VCALENDAR component and it has restrictions; other false is returned. If a non-VCALENDER component is encountered the internal library icalerrno is set to ICAL_BADARG_ERROR. Definition at line 1160 of file icalcomponent.c.
| icalcomponent * icalcomponent_clone | ( | const icalcomponent * | old | ) |
Deeply clones an icalcomponent.
Free the allocated memory with icalcomponent_free.
| old | a pointer to a valid icalcomponent |
Definition at line 137 of file icalcomponent.c.
| void icalcomponent_convert_errors | ( | icalcomponent * | component | ) |
Converts X-LIC-ERROR into RETURN-STATUS properties in an icalcomponent.
| component | a pointer to a valid icalcomponent |
Definition at line 1211 of file icalcomponent.c.
| int icalcomponent_count_components | ( | icalcomponent * | component, |
| icalcomponent_kind | kind ) |
Gets the number of components of an icalcomponent_kind in an icalcomponent.
| component | a pointer to a valid icalcomponent |
| kind | the icalcomponent_kind to use for the search |
kind component types attached to component. Definition at line 626 of file icalcomponent.c.
| int icalcomponent_count_errors | ( | icalcomponent * | component | ) |
Gets the number of errors encountered parsing the data.
| component | a pointer to a valid icalcomponent |
Definition at line 1166 of file icalcomponent.c.
| int icalcomponent_count_properties | ( | icalcomponent * | component, |
| icalproperty_kind | kind ) |
Gets the number of properties of an icalproperty_kind in an icalcomponent.
| component | a pointer to a valid icalcomponent |
| kind | the ical_property_kind to use for the search |
kind property types attached to component. Definition at line 490 of file icalcomponent.c.
| icalcompiter icalcomponent_end_component | ( | icalcomponent * | component, |
| icalcomponent_kind | kind ) |
Gets an icalcompiter associated to the last icalcomponent with icalcomponent_kind attached to the specified icalcomponent.
| component | a pointer to a valid icalcomponent |
| kind | the icalcomponent_kind to use for the search |
kind; if no matches are found ::icalcompiter_null is returned. Definition at line 1424 of file icalcomponent.c.
| void icalcomponent_foreach_recurrence | ( | icalcomponent * | comp, |
| struct icaltimetype | start, | ||
| struct icaltimetype | end, | ||
| void(* | callback )(icalcomponent *comp, const struct icaltime_span *span, void *data), | ||
| void * | callback_data ) |
Iterates through all recurrences of an event.
| comp | a pointer to a VEVENT icalcomponent |
| start | Ignore timespans before this |
| end | Ignore timespans after this |
| callback | Function called for each timespan within the range |
| callback_data | Pointer passed back to the callback function |
This function will call the specified callback function for once for the base value of DTSTART, and foreach recurring date/time value.
It will filter out events that are specified as an EXDATE or an EXRULE.
Definition at line 970 of file icalcomponent.c.
| void icalcomponent_foreach_tzid | ( | icalcomponent * | comp, |
| void(* | callback )(icalparameter *param, void *data), | ||
| void * | callback_data ) |
Calls the given function for each TZID parameter found in the component, as well as any subcomponents.
| comp | a pointer to a valid icalcomponent |
| callback | a pointer to a function to call for each TZID parameter |
| callback_data | a pointer to data associated with the callback function |
Definition at line 2457 of file icalcomponent.c.
| void icalcomponent_free | ( | icalcomponent * | component | ) |
Destruct the specified icalcomponent.
Frees the memory alloced for the specified icalcomponent.
| component | a pointer to a valid icalcompent |
Definition at line 191 of file icalcomponent.c.
| const char * icalcomponent_get_comment | ( | icalcomponent * | comp | ) |
Gets the COMMENT property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp. If there is no such property then a value of NULL is returned. If comp is invalid then a value of NULL is returned and the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR. Definition at line 1845 of file icalcomponent.c.
| const char * icalcomponent_get_component_name | ( | const icalcomponent * | comp | ) |
Gets the name of the specified icalcomponent.
The icalcomponent's name is its type name converted to a string, or the value of _get_x_name if is an X- component type.
| comp | a pointer to a valid icalcomponent |
Definition at line 386 of file icalcomponent.c.
| char * icalcomponent_get_component_name_r | ( | const icalcomponent * | comp | ) |
Gets the name of the specified icalcomponent.
The icalcomponent's name is its type name converted to a string, or the value of _get_x_name if is an X- component type.
| comp | a pointer to a valid icalcomponent |
Definition at line 395 of file icalcomponent.c.
| icalcomponent * icalcomponent_get_current_component | ( | icalcomponent * | component | ) |
Gets the icalcomponent associated to the current icalcompiter of the specified icalcomponent.
| component | a pointer to a valid icalcomponent |
Definition at line 643 of file icalcomponent.c.
| icalproperty * icalcomponent_get_current_property | ( | icalcomponent * | component | ) |
Gets the icalproperty associated to the current icalpropiter of the specified icalcomponent.
| component | a pointer to a valid icalcomponent |
Definition at line 506 of file icalcomponent.c.
| const char * icalcomponent_get_description | ( | icalcomponent * | comp | ) |
Gets the DESCRIPTION property of the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp. If there is no such property then a value of NULL is returned. If comp is invalid then a value of NULL is returned and the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR. Definition at line 1961 of file icalcomponent.c.
| struct icaltimetype icalcomponent_get_dtend | ( | icalcomponent * | comp | ) |
Gets the DTEND property of an icalcomponent.
If a DTEND property is not present but a DURATION is, we use that to determine the proper end.
If DTSTART is a DATE-TIME with a timezone parameter and a corresponding VTIMEZONE is present in the component, the returned component will already be in the correct timezone; otherwise the caller is responsible for converting it.
For the icalcomponent routines only, dtend and duration are tied together. If you call the get routine for one and the other exists, the routine will calculate the return value. That is, if there is a DTEND and you call get_duration, the routine will return the difference between DTEND and DTSTART.
When DURATION and DTEND are both missing, for VEVENT an implicit DTEND is calculated based of DTSTART; for AVAILABLE, VAVAILABILITY, and VFREEBUSY null-time is returned.
| comp | a pointer to a valid icalcomponent |
FIXME this is useless until we can flag the failure
Definition at line 1630 of file icalcomponent.c.
| struct icaltimetype icalcomponent_get_dtstamp | ( | icalcomponent * | comp | ) |
Gets the DTSTAMP property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp. If there is no such property then a value of icaltime_null_time() is returned. If comp is invalid then a value of icaltime_null_time() is returned and the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR. Definition at line 1786 of file icalcomponent.c.
| struct icaltimetype icalcomponent_get_dtstart | ( | icalcomponent * | comp | ) |
Gets the DTSTART property of an icalcomponent.
If DTSTART is a DATE-TIME with a timezone parameter and a corresponding VTIMEZONE is present in the component, the returned component will already be in the correct timezone; otherwise the caller is responsible for converting it.
| comp | a pointer to a valid icalcomponent |
FIXME this is useless until we can flag the failure
Definition at line 1617 of file icalcomponent.c.
| struct icaltimetype icalcomponent_get_due | ( | icalcomponent * | comp | ) |
Gets the DUE property of a VTODO icalcomponent.
| comp | a pointer to a valid VTODO icalcomponent |
Uses the DUE property if it exists, otherwise we calculate the DUE value by adding the task's duration to the DTSTART time.
Definition at line 2662 of file icalcomponent.c.
| struct icaldurationtype icalcomponent_get_duration | ( | icalcomponent * | comp | ) |
Gets the DURATION property of an icalcomponent.
For the icalcomponent routines only, DTEND and DURATION are tied together. If you call the get routine for one and the other exists, the routine will calculate the return value. That is, if there is a DTEND and you call get_duration, the routine will return the difference between DTEND and DTSTART in AVAILABLE, VEVENT, or VAVAILABILITY; and the difference between DUE and DTSTART in VTODO. When both DURATION and DTEND are missing from VEVENT an implicit duration is returned, based on the value-type of DTSTART. Otherwise null-duration is returned.
| comp | a pointer to a valid icalcomponent |
Definition at line 1728 of file icalcomponent.c.
| icalcomponent * icalcomponent_get_first_component | ( | icalcomponent * | component, |
| icalcomponent_kind | kind ) |
From the head position, iterates the icalcomponent list attached to the specified icalcomponent until the first icalcomponent_kind is found.
| component | a pointer to a valid icalcomponent |
| kind | an icalcomponent_kind to use for the search |
kind; NULL if no matches are found. Definition at line 654 of file icalcomponent.c.
| icalproperty * icalcomponent_get_first_property | ( | icalcomponent * | component, |
| icalproperty_kind | kind ) |
From the head position, iterates the icalproperty list attached to the specified icalcomponent until the first icalproperty_kind is found.
| component | a pointer to a valid icalcomponent |
| kind | an icalproperty_kind to use for the search |
kind; NULL if no matches are found. Definition at line 517 of file icalcomponent.c.
| icalcomponent * icalcomponent_get_first_real_component | ( | const icalcomponent * | c | ) |
Get a reference to the first VEVENT, VTODO or VJOURNAL in an icalcomponent.
| c | a pointer to a valid icalcomponent |
Definition at line 690 of file icalcomponent.c.
| const char * icalcomponent_get_iana_name | ( | const icalcomponent * | comp | ) |
Gets the IANA name of the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp IANA name; will be NULL if the name has yet to be specified. Definition at line 378 of file icalcomponent.c.
| icalcomponent * icalcomponent_get_inner | ( | icalcomponent * | comp | ) |
Gets a pointer to the first VEVENT, VTODO or VJOURNAL sub-component located in the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp itself returned if it is found to be a VEVENT, VTODO or VJOURNAL. NULL is returned if the search failed. Definition at line 1552 of file icalcomponent.c.
| const char * icalcomponent_get_location | ( | icalcomponent * | comp | ) |
Gets the LOCATION property of the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp. If there is no such property then a value of NULL is returned. If comp is invalid then a value of NULL is returned and the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR. Definition at line 1996 of file icalcomponent.c.
| icalproperty_method icalcomponent_get_method | ( | icalcomponent * | comp | ) |
Gets the METHOD property of an icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp. If there is no such property then a value of ICAL_METHOD_NONE is returned. If comp is invalid then a value of ICAL_METHOD_NONE is returned and the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR. Definition at line 1573 of file icalcomponent.c.
| icalcomponent * icalcomponent_get_next_component | ( | icalcomponent * | component, |
| icalcomponent_kind | kind ) |
From the current position, iterates the icalcomponent list attached to the specified icalcomponent until the next icalcomponent_kind is found.
| component | a pointer to a valid icalcomponent |
| kind | an icalcomponent_kind to use for the search |
kind; NULL if no matches are found. Definition at line 670 of file icalcomponent.c.
| icalproperty * icalcomponent_get_next_property | ( | icalcomponent * | component, |
| icalproperty_kind | kind ) |
From the current position, iterates the icalproperty list attached to the specified icalcomponent until the next icalproperty_kind is found.
| component | a pointer to a valid icalcomponent |
| kind | an icalproperty_kind to use for the search |
kind; NULL if no matches are found. Definition at line 532 of file icalcomponent.c.
| struct icaltimetype icalcomponent_get_recurrenceid | ( | icalcomponent * | comp | ) |
Gets the RECURRENCEID property of the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp. If there is no such property then a value of icaltime_null_time() is returned. If comp is invalid then a value of icaltime_null_time() is returned and the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR. Definition at line 1923 of file icalcomponent.c.
| const char * icalcomponent_get_relcalid | ( | icalcomponent * | comp | ) |
Gets the RELCALID property of an icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp is invalid then a value of NULL is returned and the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR. Definition at line 2640 of file icalcomponent.c.
| int icalcomponent_get_sequence | ( | icalcomponent * | comp | ) |
Gets the SEQUENCE property of the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp. If there is no such property then a value of zero is returned. If comp is invalid then a value of zero is returned and the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR. Definition at line 2031 of file icalcomponent.c.
| struct icaltime_span icalcomponent_get_span | ( | icalcomponent * | comp | ) |
Gets the timespan covered by the specified icalcomponent, in UTC.
See icalcomponent_foreach_recurrence() for a better way to extract spans from a component.
This method can be called on either a VCALENDAR or any real component. If the VCALENDAR contains no real component, but contains a VTIMEZONE, we return that span instead. This might not be a desirable behavior; we keep it for now for backward compatibility, but it might be deprecated at a future time.
| comp | a pointer to a valid icalcomponent |
FIXME this API needs to be clarified. DTEND is defined as the first available time after the end of this event, so the span should actually end 1 second before DTEND.
Definition at line 713 of file icalcomponent.c.
| enum icalproperty_status icalcomponent_get_status | ( | icalcomponent * | comp | ) |
Gets the status property of the icalcomponent.
| comp | a pointer to a valid icalcomponent |
Definition at line 2066 of file icalcomponent.c.
| const char * icalcomponent_get_summary | ( | icalcomponent * | comp | ) |
Gets the SUMMARY property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp. If there is no such property then a value of NULL is returned. If comp is invalid then a value of NULL is returned and the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR. Definition at line 1810 of file icalcomponent.c.
| icaltimezone * icalcomponent_get_timezone | ( | icalcomponent * | comp, |
| const char * | tzid ) |
Return the icaltimezone in the component corresponding to the specified TZID, or NULL if a one cannot be found.
| comp | a pointer to a valid icalcomponent |
| tzid | a pointer to a char string containing the TZID |
Definition at line 2493 of file icalcomponent.c.
| const char * icalcomponent_get_uid | ( | icalcomponent * | comp | ) |
Gets the UID property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp. If there is no such property then a value of NULL is returned. If comp is invalid then a value of NULL is returned and the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR. Definition at line 1880 of file icalcomponent.c.
| const char * icalcomponent_get_x_name | ( | const icalcomponent * | comp | ) |
Gets the X-NAME property of an icalcomponent.
| comp | a pointer to a valid icalcomponent |
comp. Definition at line 357 of file icalcomponent.c.
| bool icalcomponent_is_valid | ( | const icalcomponent * | component | ) |
Determines if the specified icalcomponent is valid.
| component | a pointer to possibly invalid icalcomponent |
component is valid; false otherwise. Definition at line 314 of file icalcomponent.c.
| icalcomponent_kind icalcomponent_isa | ( | const icalcomponent * | component | ) |
Determines the icalcomponent_kind of the specified icalcomponent.
| component | a pointer to valid icalcomponent. |
component. Definition at line 324 of file icalcomponent.c.
| bool icalcomponent_isa_component | ( | const void * | component | ) |
Determines if the specified pointer is an icalcomponent pointer.
Just looks if the ::id member strncmps to "comp".
| component | a pointer, presumably to an icalcomponent. |
Definition at line 331 of file icalcomponent.c.
| bool icalcomponent_kind_is_valid | ( | const icalcomponent_kind | kind | ) |
Check the validity of the specified icalcomponent_kind.
| kind | is the icalcomponent_kind to use |
Definition at line 1341 of file icalcomponent.c.
| const char * icalcomponent_kind_to_string | ( | icalcomponent_kind | kind | ) |
Converts an icalcomponent_kind to its string representation.
| kind | is the icalcomponent_kind to use |
Definition at line 1354 of file icalcomponent.c.
| void icalcomponent_merge_component | ( | icalcomponent * | comp, |
| icalcomponent * | comp_to_merge ) |
Merges two VCALENDAR components.
This takes 2 VCALENDAR components and merges the second one into the first, resolving any problems with conflicting TZIDs. comp_to_merge will no longer exist after calling this function.
| comp | a pointer to a valid icalcomponent |
| comp_to_merge | a pointer to a valid icalcompent to merge into comp |
Definition at line 2203 of file icalcomponent.c.
| icalcomponent * icalcomponent_new | ( | icalcomponent_kind | kind | ) |
Constructs a new icalcomponent of a specified kind.
The data structure contains all null values and is essentially invalid. Free the allocated memory with icalcomponent_free.
| kind | is the icalcompent_kind to construct |
Definition at line 108 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_from_string | ( | const char * | str | ) |
Construct a new icalcomponent from a character string.
Free the allocated memory with icalcomponent_free.
| str | a char string containing a properly formatted ICS calendar. |
Definition at line 132 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_iana | ( | const char * | iana_name | ) |
Construct a new icalcomponent with an IANA component name.
| iana_name | a pointer to a char string containing the IANA name. |
Definition at line 180 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_participant | ( | void | ) |
Constructs a new ICAL_PARTICIPANT_COMPONENT icalcomponent.
Definition at line 2184 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vagenda | ( | void | ) |
Constructs a new ICAL_VAGENDA_COMPONENT icalcomponent.
Definition at line 2134 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_valarm | ( | void | ) |
Constructs a new ICAL_VALARM_COMPONENT icalcomponent.
Definition at line 2109 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vavailability | ( | void | ) |
Constructs a new ICAL_VAVAILABILITY_COMPONENT icalcomponent.
Definition at line 2149 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vcalendar | ( | void | ) |
Constructs a new ICAL_VCALENDAR_COMPONENT icalcomponent.
Definition at line 2089 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vevent | ( | void | ) |
Constructs a new ICAL_VEVENT_COMPONENT icalcomponent.
Definition at line 2094 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vfreebusy | ( | void | ) |
Constructs a new ICAL_VFREEBUSY_COMPONENT icalcomponent.
Definition at line 2114 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vjournal | ( | void | ) |
Constructs a new ICAL_VJOURNAL_COMPONENT icalcomponent.
Definition at line 2104 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vlocation | ( | void | ) |
Constructs a new ICAL_VLOCATION_COMPONENT icalcomponent.
Definition at line 2189 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vpatch | ( | void | ) |
Constructs a new ICAL_VPATCH_COMPONENT icalcomponent.
Definition at line 2174 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vpoll | ( | void | ) |
Constructs a new ICAL_VPOLL_COMPONENT icalcomponent.
Definition at line 2159 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vquery | ( | void | ) |
Constructs a new ICAL_VQUERY_COMPONENT icalcomponent.
Definition at line 2139 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vreply | ( | void | ) |
Constructs a new ICAL_VREPLY_COMPONENT icalcomponent.
Definition at line 2144 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vresource | ( | void | ) |
Constructs a new ICAL_VRESOURCE_COMPONENT icalcomponent.
Definition at line 2194 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vtimezone | ( | void | ) |
Constructs a new ICAL_VTIMEZONE_COMPONENT icalcomponent.
Definition at line 2119 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vtodo | ( | void | ) |
Constructs a new ICAL_VTODO_COMPONENT icalcomponent.
Definition at line 2099 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_vvoter | ( | void | ) |
Constructs a new ICAL_VVOTER_COMPONENT icalcomponent.
Definition at line 2164 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_x | ( | const char * | x_name | ) |
Construct a new X-NAME icalcomponent.
Free the allocated memory with icalcomponent_free.
| x_name | a pointer to a char string containing the value for the "X-NAME" |
Definition at line 169 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_xavailable | ( | void | ) |
Constructs a new ICAL_XAVAILABLE_COMPONENT icalcomponent.
Definition at line 2154 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_xdaylight | ( | void | ) |
Constructs a new ICAL_XDAYLIGHT_COMPONENT icalcomponent.
Definition at line 2129 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_xpatch | ( | void | ) |
Constructs a new ICAL_XPATCH_COMPONENT icalcomponent.
Definition at line 2179 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_xstandard | ( | void | ) |
Constructs a new ICAL_XSTANDARD_COMPONENT icalcomponent.
Definition at line 2124 of file icalcomponent.c.
| icalcomponent * icalcomponent_new_xvote | ( | void | ) |
Constructs a new ICAL_XVOTE_COMPONENT icalcomponent.
Definition at line 2169 of file icalcomponent.c.
| void icalcomponent_normalize | ( | icalcomponent * | comp | ) |
Normalizes (reorders and sorts the properties) the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
Definition at line 2882 of file icalcomponent.c.
| void icalcomponent_remove_component | ( | icalcomponent * | parent, |
| icalcomponent * | child ) |
Detaches a child icalcomponent from a parent icalcomponent
| parent | a pointer to a valid parent icalcomponent |
| child | a pointer to a valid child icalcomponent |
Definition at line 586 of file icalcomponent.c.
| void icalcomponent_remove_property | ( | icalcomponent * | component, |
| icalproperty * | property ) |
Removes an icalproperty from the specified icalcomponent.
| component | a pointer to a valid icalcomponent |
| property | a pointer to the icalproperty to remove |
Definition at line 443 of file icalcomponent.c.
| void icalcomponent_remove_property_by_kind | ( | icalcomponent * | component, |
| icalproperty_kind | kind ) |
Removes all icalproperty's of an icalproperty_kind from the specified icalcomponent.
| component | a pointer to a valid icalcomponent |
| kind | is the icalproperty_kind to use |
Definition at line 468 of file icalcomponent.c.
| void icalcomponent_set_comment | ( | icalcomponent * | comp, |
| const char * | v ) |
Sets the COMMENT property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| v | a pointer to a char string with the COMMENT to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1833 of file icalcomponent.c.
| void icalcomponent_set_description | ( | icalcomponent * | comp, |
| const char * | v ) |
Sets the DESCRIPTION property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| v | a pointer to a char string with the DESCRIPTION to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1949 of file icalcomponent.c.
| void icalcomponent_set_dtend | ( | icalcomponent * | comp, |
| struct icaltimetype | v ) |
Sets the DTEND property for the specified icalcomponent.
This method respects the icaltime type (DATE vs DATE-TIME) and timezone (or lack thereof).
This also checks that a DURATION property isn't already there, and returns an error if it is. It's the caller's responsibility to remove it.
For the icalcomponent routines only, DTEND and DURATION are tied together. If you call this routine and DURATION exists, no action will be taken and icalerrno will be set to ICAL_MALFORMEDDATA_ERROR. If neither exists, the routine will create the appropriate property.
| comp | a pointer to a valid icalcomponent |
| v | is the icaltimetype to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1686 of file icalcomponent.c.
| void icalcomponent_set_dtstamp | ( | icalcomponent * | comp, |
| struct icaltimetype | v ) |
Sets the DTSTAMP property of an icalcomponent.
| comp | a pointer to a valid icalcomponent |
| v | is the icaltimetype to use as the DTSTAMP property |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1774 of file icalcomponent.c.
| void icalcomponent_set_dtstart | ( | icalcomponent * | comp, |
| struct icaltimetype | v ) |
Sets the DTSTART property for the specified icalcomponent.
This method respects the icaltime type (DATE vs DATE-TIME) and timezone (or lack thereof).
| comp | a pointer to a valid icalcomponent |
| v | is the icaltimetype to use as the DSTART property |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1597 of file icalcomponent.c.
| void icalcomponent_set_due | ( | icalcomponent * | comp, |
| struct icaltimetype | v ) |
Sets the due date of a VTODO task.
| comp | a pointer to a valid VTODO icalcomponent |
| v | a valid due date time. |
The DUE and DURATION properties are tied together:
v.If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 2683 of file icalcomponent.c.
| void icalcomponent_set_duration | ( | icalcomponent * | comp, |
| struct icaldurationtype | v ) |
Sets the DURATION property for the specified icalcomponent.
This method respects the icaltime type (DATE vs DATE-TIME) and timezone (or lack thereof).
This also checks that a DTEND property isn't already there, and returns an error if it is. It's the caller's responsibility to remove it.
For the icalcomponent routines only, DTEND and DURATION are tied together. If you call this routine and DTEND exists, no action will be taken and icalerrno will be set to ICAL_MALFORMEDDATA_ERROR. If neither exists, the routine will create the appropriate property.
| comp | a pointer to a valid icalcomponent |
| v | is the icalduration type DURATION to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1711 of file icalcomponent.c.
| void icalcomponent_set_iana_name | ( | icalcomponent * | comp, |
| const char * | name ) |
Sets the IANA name for an icalcomponent.
| comp | a pointer to a valid icalcomponent |
| name | a pointer to char string containing the IANA name. |
Definition at line 364 of file icalcomponent.c.
| void icalcomponent_set_location | ( | icalcomponent * | comp, |
| const char * | v ) |
Sets the LOCATION property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| v | a pointer to char string with the LOCATION to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1984 of file icalcomponent.c.
| void icalcomponent_set_method | ( | icalcomponent * | comp, |
| icalproperty_method | method ) |
Sets the METHOD property of the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| method | is the icalproperty_method METHOD property to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1561 of file icalcomponent.c.
| void icalcomponent_set_recurrenceid | ( | icalcomponent * | comp, |
| struct icaltimetype | v ) |
Sets the RECURRENCEID property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| v | is the icaltimetype RECURRENCEID to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1903 of file icalcomponent.c.
| void icalcomponent_set_relcalid | ( | icalcomponent * | comp, |
| const char * | v ) |
Sets the RELCALID property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| v | a pointer to a char string with the RELCALID to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 2628 of file icalcomponent.c.
| void icalcomponent_set_sequence | ( | icalcomponent * | comp, |
| int | v ) |
Sets the SEQUENCE property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| v | is the integer SEQUENCE to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 2019 of file icalcomponent.c.
| void icalcomponent_set_status | ( | icalcomponent * | comp, |
| enum icalproperty_status | v ) |
Sets the STATUS for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| v | is the icalproperty_status to use as the STATUS property |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 2054 of file icalcomponent.c.
| void icalcomponent_set_summary | ( | icalcomponent * | comp, |
| const char * | v ) |
Sets the SUMMARY property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| v | a pointer to a char string with the SUMMARY to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1798 of file icalcomponent.c.
| void icalcomponent_set_uid | ( | icalcomponent * | comp, |
| const char * | v ) |
Sets the UID property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| v | a pointer to a char string with the UID to use |
If comp is invalid then the internal library icalerrno is set to ICAL_MALFORMEDDATA_ERROR.
Definition at line 1868 of file icalcomponent.c.
| void icalcomponent_set_x_name | ( | icalcomponent * | comp, |
| const char * | name ) |
Sets the X-NAME property for the specified icalcomponent.
| comp | a pointer to a valid icalcomponent |
| name | a non-NULL pointer to a char string containing the X-NAME to use. |
Definition at line 344 of file icalcomponent.c.
| icalcomponent_kind icalcomponent_string_to_kind | ( | const char * | string | ) |
Converts a char string into an icalcomponent_kind.
| string | a pointer to a char string containing the character representation of an icalcomponent_kind |
string. ICAL_NO_COMPONENT is returned if string is invalid. Definition at line 1367 of file icalcomponent.c.
| void icalcomponent_strip_errors | ( | icalcomponent * | component | ) |
Removes all X-LIC-ERROR properties in an icalcomponent.
| component | a pointer to a valid icalcomponent |
Definition at line 1188 of file icalcomponent.c.
| icalcomponent * icalcomponent_vanew | ( | icalcomponent_kind | kind, |
| ... ) |
Construct a new icalcomponent from a list of icalproperties of icalcomponents.
Free the allocated memory with icalcomponent_free. Make sure to pass NULL (not 0) as the final argument!
| kind | the icalcomponent_kind of icalcomponent to use |
Definition at line 113 of file icalcomponent.c.
| struct icaltimetype icalproperty_get_datetime_with_component | ( | icalproperty * | prop, |
| icalcomponent * | comp ) |
Computes the datetime corresponding to the specified icalproperty and icalcomponent. If the property is a DATE-TIME with a TZID parameter and a corresponding VTIMEZONE is present in the component, the returned component will already be in the correct timezone; otherwise the caller is responsible for converting it.
Call icaltime_is_null_time() on the returned value to detect failures.
| prop | a pointer to a valid icalproperty |
| comp | a pointer to a valid icalcomponent |
Definition at line 1072 of file icalproperty.c.
| icalcomponent * icalproperty_get_parent | ( | const icalproperty * | property | ) |
Gets the parent icalcomponent for the specified icalproperty.
| property | a pointer to a valid icalproperty |
Definition at line 939 of file icalproperty.c.
| bool icalproperty_recurrence_is_excluded | ( | icalcomponent * | comp, |
| struct icaltimetype * | dtstart, | ||
| struct icaltimetype * | recurtime ) |
Decides if a recurrence is acceptable.
| comp | a pointer to a valid icalcomponent |
| dtstart | the base dtstart value for this component. |
| recurtime | the time to test against. |
This function decides if a specific recurrence value is excluded by EXRULE or EXDATE properties.
It's not the most efficient code. You might get better performance if you assume that recurtime is always increasing for each call. Then you could:
In this case though you don't need to worry how you call this function. It will always return the correct result.
first test against the exdate values
MATCHED
Now test against the EXRULEs
MATCH
exrule_time > recurtime
Definition at line 781 of file icalcomponent.c.
| void icalproperty_set_parent | ( | icalproperty * | property, |
| icalcomponent * | component ) |
Sets the parent icalcomponent for the specified icalproperty.
| property | a pointer to a valid icalproperty |
| component | a pointer to a valid icalcomponent to use as the parent |
Definition at line 932 of file icalproperty.c.
| icalproperty * icalpropiter_deref | ( | icalpropiter * | i | ) |
Gets the current icalproperty referenced by the specified icalpropiter.
| i | a pointer to a valid icalpropiter |
i or NULL if i is invalid. Definition at line 1541 of file icalcomponent.c.
| bool icalpropiter_is_valid | ( | const icalpropiter * | i | ) |
Checks if the specified icalpropiter is valid.
| i | a pointer to a possibly invalid icalpropiter |
i points to a valid icalpropiter; false otherwise.Definition at line 1513 of file icalcomponent.c.
| icalproperty * icalpropiter_next | ( | icalpropiter * | i | ) |
Gets the next icalproperty referenced by the specified icalpropiter with a matching icalproperty_kind.
| i | a pointer to a valid icalpropiter |
i. NULL is returned if is invalid or if there are no matches found. Definition at line 1522 of file icalcomponent.c.