23#ifndef ICALCOMPONENT_H
24#define ICALCOMPONENT_H
26#include "libical_ical_export.h"
37 icalcomponent_kind kind;
66LIBICAL_ICAL_EXPORT
void icalcomponent_free(icalcomponent *component);
68LIBICAL_ICAL_EXPORT
char *icalcomponent_as_ical_string(icalcomponent *component);
70LIBICAL_ICAL_EXPORT
char *icalcomponent_as_ical_string_r(icalcomponent *component);
72LIBICAL_ICAL_EXPORT
int icalcomponent_is_valid(icalcomponent *component);
74LIBICAL_ICAL_EXPORT icalcomponent_kind icalcomponent_isa(
const icalcomponent *component);
76LIBICAL_ICAL_EXPORT
int icalcomponent_isa_component(
void *component);
82LIBICAL_ICAL_EXPORT
void icalcomponent_add_property(icalcomponent *component,
83 icalproperty *property);
85LIBICAL_ICAL_EXPORT
void icalcomponent_remove_property(icalcomponent *component,
86 icalproperty *property);
88LIBICAL_ICAL_EXPORT
int icalcomponent_count_properties(icalcomponent *component,
89 icalproperty_kind kind);
96 icalcomponent *component);
104LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_current_property(icalcomponent *component);
106LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_first_property(icalcomponent *component,
107 icalproperty_kind kind);
108LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_next_property(icalcomponent *component,
109 icalproperty_kind kind);
119LIBICAL_ICAL_EXPORT
void icalcomponent_add_component(icalcomponent *parent, icalcomponent *child);
121LIBICAL_ICAL_EXPORT
void icalcomponent_remove_component(icalcomponent *parent,
122 icalcomponent *child);
124LIBICAL_ICAL_EXPORT
int icalcomponent_count_components(icalcomponent *component,
125 icalcomponent_kind kind);
133 icalcomponent *comp_to_merge);
141LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_current_component(icalcomponent *component);
143LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_first_component(icalcomponent *component,
144 icalcomponent_kind kind);
145LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_next_component(icalcomponent *component,
146 icalcomponent_kind kind);
149LIBICAL_ICAL_EXPORT
icalcompiter icalcomponent_begin_component(icalcomponent *component,
150 icalcomponent_kind kind);
152LIBICAL_ICAL_EXPORT
icalcompiter icalcomponent_end_component(icalcomponent *component,
153 icalcomponent_kind kind);
155LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_next(
icalcompiter * i);
157LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_prior(
icalcompiter * i);
159LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_deref(
icalcompiter * i);
165LIBICAL_ICAL_EXPORT
int icalcomponent_check_restrictions(icalcomponent *comp);
181LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_parent(icalcomponent *component);
183LIBICAL_ICAL_EXPORT
void icalcomponent_set_parent(icalcomponent *component,
184 icalcomponent *parent);
188LIBICAL_ICAL_EXPORT
int icalcomponent_kind_is_valid(
const icalcomponent_kind kind);
190LIBICAL_ICAL_EXPORT icalcomponent_kind icalcomponent_string_to_kind(
const char *
string);
192LIBICAL_ICAL_EXPORT
const char *icalcomponent_kind_to_string(icalcomponent_kind kind);
221LIBICAL_ICAL_EXPORT
struct icaltime_span icalcomponent_get_span(icalcomponent *comp);
241LIBICAL_ICAL_EXPORT
struct icaltimetype icalcomponent_get_dtstart(icalcomponent *comp);
277LIBICAL_ICAL_EXPORT
struct icaltimetype icalcomponent_get_dtend(icalcomponent *comp);
303LIBICAL_ICAL_EXPORT
struct icaltimetype icalcomponent_get_due(icalcomponent *comp);
348LIBICAL_ICAL_EXPORT
struct icaldurationtype icalcomponent_get_duration(icalcomponent *comp);
358LIBICAL_ICAL_EXPORT
struct icaltimetype icalcomponent_get_dtstamp(icalcomponent *comp);
360LIBICAL_ICAL_EXPORT
void icalcomponent_set_dtstamp(icalcomponent *comp,
struct icaltimetype v);
362LIBICAL_ICAL_EXPORT
void icalcomponent_set_summary(icalcomponent *comp,
const char *v);
364LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_summary(icalcomponent *comp);
366LIBICAL_ICAL_EXPORT
void icalcomponent_set_comment(icalcomponent *comp,
const char *v);
368LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_comment(icalcomponent *comp);
370LIBICAL_ICAL_EXPORT
void icalcomponent_set_uid(icalcomponent *comp,
const char *v);
372LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_uid(icalcomponent *comp);
378LIBICAL_ICAL_EXPORT
void icalcomponent_set_recurrenceid(icalcomponent *comp,
381LIBICAL_ICAL_EXPORT
struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent *comp);
383LIBICAL_ICAL_EXPORT
void icalcomponent_set_description(icalcomponent *comp,
const char *v);
385LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_description(icalcomponent *comp);
387LIBICAL_ICAL_EXPORT
void icalcomponent_set_location(icalcomponent *comp,
const char *v);
389LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_location(icalcomponent *comp);
391LIBICAL_ICAL_EXPORT
void icalcomponent_set_sequence(icalcomponent *comp,
int v);
393LIBICAL_ICAL_EXPORT
int icalcomponent_get_sequence(icalcomponent *comp);
395LIBICAL_ICAL_EXPORT
void icalcomponent_set_status(icalcomponent *comp,
enum icalproperty_status v);
397LIBICAL_ICAL_EXPORT
enum icalproperty_status icalcomponent_get_status(icalcomponent *comp);
403 void (*callback) (icalparameter *param,
405 void *callback_data);
460 void (*callback) (icalcomponent *comp,
463 void *callback_data);
483 icalcomponent *comp);
486LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vcalendar(
void);
488LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vevent(
void);
490LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vtodo(
void);
492LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vjournal(
void);
494LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_valarm(
void);
496LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vfreebusy(
void);
498LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vtimezone(
void);
500LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xstandard(
void);
502LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xdaylight(
void);
504LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vagenda(
void);
506LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vquery(
void);
508LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vavailability(
void);
510LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xavailable(
void);
512LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vpoll(
void);
514LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vvoter(
void);
516LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xvote(
void);
518LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vpatch(
void);
520LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xpatch(
void);
void icalcomponent_convert_errors(icalcomponent *component)
Converts some X-LIC-ERROR properties into RETURN-STATUS properties.
Definition icalcomponent.c:1036
void icalcomponent_set_relcalid(icalcomponent *comp, const char *v)
Sets the RELCALID property of a component.
Definition icalcomponent.c:2348
icalcomponent * icalcomponent_new_clone(icalcomponent *component)
Constructor.
Definition icalcomponent.c:140
icalproperty_method icalcomponent_get_method(icalcomponent *comp)
Returns the METHOD property.
Definition icalcomponent.c:1322
void icalcomponent_foreach_recurrence(icalcomponent *comp, struct icaltimetype start, struct icaltimetype end, void(*callback)(icalcomponent *comp, struct icaltime_span *span, void *data), void *callback_data)
Cycles through all recurrences of an event.
Definition icalcomponent.c:802
icalcomponent * icalproperty_get_parent(const icalproperty *property)
Returns the parent icalcomponent for the specified property.
Definition icalproperty.c:915
void icalcomponent_set_dtstart(icalcomponent *comp, struct icaltimetype v)
Sets the DTSTART property to the given icaltime,.
Definition icalcomponent.c:1344
void icalcomponent_strip_errors(icalcomponent *component)
Removes all X-LIC-ERROR properties.
Definition icalcomponent.c:1010
void icalcomponent_normalize(icalcomponent *comp)
Normalizes (reorders and sorts the properties) the specified icalcomponent comp.
Definition icalcomponent.c:2607
struct icaltimetype icalproperty_get_datetime_with_component(icalproperty *prop, icalcomponent *comp)
Gets a DATE or DATE-TIME property as an icaltime.
Definition icalproperty.c:1052
icalcomponent * icalcomponent_vanew(icalcomponent_kind kind,...)
Constructor.
Definition icalcomponent.c:116
void icalcomponent_set_method(icalcomponent *comp, icalproperty_method method)
Sets the METHOD property to the given method.
Definition icalcomponent.c:1310
icalcomponent * icalcomponent_new(icalcomponent_kind kind)
Constructor.
Definition icalcomponent.c:111
icalcomponent * icalcomponent_get_inner(icalcomponent *comp)
Definition icalcomponent.c:1301
void icalproperty_set_parent(icalproperty *property, icalcomponent *component)
Sets the parent icalcomponent for the specified icalproperty property.
Definition icalproperty.c:908
icalcomponent * icalcomponent_get_first_real_component(icalcomponent *c)
Returns a reference to the first VEVENT, VTODO or VJOURNAL in the component.
Definition icalcomponent.c:581
const char * icalcomponent_get_relcalid(icalcomponent *comp)
Gets the RELCALID property of a component.
Definition icalcomponent.c:2366
void icalcomponent_merge_component(icalcomponent *comp, icalcomponent *comp_to_merge)
Definition icalcomponent.c:1938
int icalcomponent_count_errors(icalcomponent *component)
Returns the number of errors encountered parsing the data.
Definition icalcomponent.c:984
int icalproperty_recurrence_is_excluded(icalcomponent *comp, struct icaltimetype *dtstart, struct icaltimetype *recurtime)
Decides if a recurrence is acceptable.
Definition icalcomponent.c:672
icaltimezone * icalcomponent_get_timezone(icalcomponent *comp, const char *tzid)
Returns the icaltimezone in the component corresponding to the TZID, or NULL if it can't be found.
Definition icalcomponent.c:2220
void icalcomponent_set_dtend(icalcomponent *comp, struct icaltimetype v)
Sets the DTEND property to given icaltime.
Definition icalcomponent.c:1434
icalcomponent * icalcomponent_new_x(const char *x_name)
Constructor.
Definition icalcomponent.c:168
void icalcomponent_set_duration(icalcomponent *comp, struct icaldurationtype v)
Sets the DURATION property to given icalduration.
Definition icalcomponent.c:1459
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, and any subcomponents.
Definition icalcomponent.c:2183
void icalcomponent_set_due(icalcomponent *comp, struct icaltimetype v)
Sets the due date of a VTODO task.
Definition icalcomponent.c:2410
icalcomponent * icalcomponent_new_from_string(const char *str)
Constructor.
Definition icalcomponent.c:135
struct _icaltimezone icaltimezone
An opaque struct representing a timezone. We declare this here to avoid a circular dependency.
Definition icaltime.h:91
Definition icalcomponent.h:36
Definition icalcomponent.c:36
A struct representing a duration.
Definition icalduration.h:37
Definition icaltime.h:105