13#ifndef ICALCOMPONENT_H
14#define ICALCOMPONENT_H
16#include "libical_sentinel.h"
17#include "libical_ical_export.h"
22typedef struct icalcomponent_impl icalcomponent;
27 icalcomponent_kind kind;
32 icalproperty_kind kind;
55LIBICAL_ICAL_EXPORT LIBICAL_SENTINEL icalcomponent *
icalcomponent_vanew(icalcomponent_kind kind, ...);
73LIBICAL_ICAL_EXPORT
void icalcomponent_free(icalcomponent *component);
75LIBICAL_ICAL_EXPORT
char *icalcomponent_as_ical_string(
const icalcomponent *component);
77LIBICAL_ICAL_EXPORT
char *icalcomponent_as_ical_string_r(
const icalcomponent *component);
79LIBICAL_ICAL_EXPORT
bool icalcomponent_is_valid(
const icalcomponent *component);
81LIBICAL_ICAL_EXPORT icalcomponent_kind icalcomponent_isa(
const icalcomponent *component);
83LIBICAL_ICAL_EXPORT
bool icalcomponent_isa_component(
const void *component);
87LIBICAL_ICAL_EXPORT
void icalcomponent_set_x_name(icalcomponent *comp,
const char *name);
88LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_x_name(
const icalcomponent *comp);
116LIBICAL_ICAL_EXPORT
char *icalcomponent_get_component_name_r(
const icalcomponent *comp);
120LIBICAL_ICAL_EXPORT
void icalcomponent_add_property(icalcomponent *component,
121 icalproperty *property);
123LIBICAL_ICAL_EXPORT
void icalcomponent_remove_property(icalcomponent *component,
124 icalproperty *property);
126LIBICAL_ICAL_EXPORT
void icalcomponent_remove_property_by_kind(icalcomponent *component,
127 icalproperty_kind kind);
129LIBICAL_ICAL_EXPORT
int icalcomponent_count_properties(icalcomponent *component,
130 icalproperty_kind kind);
137 icalcomponent *component);
145LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_current_property(icalcomponent *component);
147LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_first_property(icalcomponent *component,
148 icalproperty_kind kind);
149LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_next_property(icalcomponent *component,
150 icalproperty_kind kind);
158LIBICAL_ICAL_EXPORT
void icalcomponent_add_component(icalcomponent *parent, icalcomponent *child);
160LIBICAL_ICAL_EXPORT
void icalcomponent_remove_component(icalcomponent *parent,
161 icalcomponent *child);
163LIBICAL_ICAL_EXPORT
int icalcomponent_count_components(icalcomponent *component,
164 icalcomponent_kind kind);
172 icalcomponent *comp_to_merge);
180LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_current_component(icalcomponent *component);
182LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_first_component(icalcomponent *component,
183 icalcomponent_kind kind);
184LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_next_component(icalcomponent *component,
185 icalcomponent_kind kind);
188LIBICAL_ICAL_EXPORT
icalcompiter icalcomponent_begin_component(icalcomponent *component,
189 icalcomponent_kind kind);
191LIBICAL_ICAL_EXPORT
icalcompiter icalcomponent_end_component(icalcomponent *component,
192 icalcomponent_kind kind);
194LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_next(
icalcompiter *i);
196LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_prior(
icalcompiter *i);
198LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_deref(
icalcompiter *i);
211LIBICAL_ICAL_EXPORT
icalpropiter icalcomponent_begin_property(icalcomponent *component,
212 icalproperty_kind kind);
214LIBICAL_ICAL_EXPORT icalproperty *icalpropiter_next(
icalpropiter *i);
216LIBICAL_ICAL_EXPORT icalproperty *icalpropiter_deref(
icalpropiter *i);
233LIBICAL_ICAL_EXPORT
bool icalcomponent_check_restrictions(icalcomponent *comp);
249LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_parent(
const icalcomponent *component);
251LIBICAL_ICAL_EXPORT
void icalcomponent_set_parent(icalcomponent *component,
252 icalcomponent *parent);
256LIBICAL_ICAL_EXPORT
bool icalcomponent_kind_is_valid(
const icalcomponent_kind kind);
258LIBICAL_ICAL_EXPORT icalcomponent_kind icalcomponent_string_to_kind(
const char *
string);
260LIBICAL_ICAL_EXPORT
const char *icalcomponent_kind_to_string(icalcomponent_kind kind);
289LIBICAL_ICAL_EXPORT
struct icaltime_span icalcomponent_get_span(icalcomponent *comp);
309LIBICAL_ICAL_EXPORT
struct icaltimetype icalcomponent_get_dtstart(icalcomponent *comp);
345LIBICAL_ICAL_EXPORT
struct icaltimetype icalcomponent_get_dtend(icalcomponent *comp);
371LIBICAL_ICAL_EXPORT
struct icaltimetype icalcomponent_get_due(icalcomponent *comp);
416LIBICAL_ICAL_EXPORT
struct icaldurationtype icalcomponent_get_duration(icalcomponent *comp);
426LIBICAL_ICAL_EXPORT
struct icaltimetype icalcomponent_get_dtstamp(icalcomponent *comp);
428LIBICAL_ICAL_EXPORT
void icalcomponent_set_dtstamp(icalcomponent *comp,
struct icaltimetype v);
430LIBICAL_ICAL_EXPORT
void icalcomponent_set_summary(icalcomponent *comp,
const char *v);
432LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_summary(icalcomponent *comp);
434LIBICAL_ICAL_EXPORT
void icalcomponent_set_comment(icalcomponent *comp,
const char *v);
436LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_comment(icalcomponent *comp);
438LIBICAL_ICAL_EXPORT
void icalcomponent_set_uid(icalcomponent *comp,
const char *v);
440LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_uid(icalcomponent *comp);
446LIBICAL_ICAL_EXPORT
void icalcomponent_set_recurrenceid(icalcomponent *comp,
449LIBICAL_ICAL_EXPORT
struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent *comp);
451LIBICAL_ICAL_EXPORT
void icalcomponent_set_description(icalcomponent *comp,
const char *v);
453LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_description(icalcomponent *comp);
455LIBICAL_ICAL_EXPORT
void icalcomponent_set_location(icalcomponent *comp,
const char *v);
457LIBICAL_ICAL_EXPORT
const char *icalcomponent_get_location(icalcomponent *comp);
459LIBICAL_ICAL_EXPORT
void icalcomponent_set_sequence(icalcomponent *comp,
int v);
461LIBICAL_ICAL_EXPORT
int icalcomponent_get_sequence(icalcomponent *comp);
463LIBICAL_ICAL_EXPORT
void icalcomponent_set_status(icalcomponent *comp,
enum icalproperty_status v);
477 void (*callback)(icalparameter *param,
479 void *callback_data);
531 void (*callback)(icalcomponent *comp,
534 void *callback_data);
554 icalcomponent *comp);
557LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vcalendar(
void);
559LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vevent(
void);
561LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vtodo(
void);
563LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vjournal(
void);
565LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_valarm(
void);
567LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vfreebusy(
void);
569LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vtimezone(
void);
571LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xstandard(
void);
573LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xdaylight(
void);
575LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vagenda(
void);
577LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vquery(
void);
579LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vreply(
void);
581LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vavailability(
void);
583LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xavailable(
void);
585LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vpoll(
void);
587LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vvoter(
void);
589LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xvote(
void);
591LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vpatch(
void);
593LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xpatch(
void);
595LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_participant(
void);
597LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vlocation(
void);
599LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vresource(
void);
void icalcomponent_convert_errors(icalcomponent *component)
Converts some X-LIC-ERROR properties into RETURN-STATUS properties.
Definition icalcomponent.c:1203
void icalcomponent_set_relcalid(icalcomponent *comp, const char *v)
Sets the RELCALID property of a component.
Definition icalcomponent.c:2623
icalproperty_method icalcomponent_get_method(icalcomponent *comp)
Returns the METHOD property.
Definition icalcomponent.c:1563
bool icalcompiter_is_valid(const icalcompiter *i)
Definition icalcomponent.c:1382
icalcomponent * icalproperty_get_parent(const icalproperty *property)
Returns the parent icalcomponent for the specified property.
Definition icalproperty.c:931
void icalcomponent_set_iana_name(icalcomponent *comp, const char *name)
Definition icalcomponent.c:356
void icalcomponent_set_dtstart(icalcomponent *comp, struct icaltimetype v)
Sets the DTSTART property to the given icaltime,.
Definition icalcomponent.c:1585
void icalcomponent_strip_errors(icalcomponent *component)
Removes all X-LIC-ERROR properties.
Definition icalcomponent.c:1180
void icalcomponent_normalize(icalcomponent *comp)
Normalizes (reorders and sorts the properties) the specified icalcomponent comp.
Definition icalcomponent.c:2883
enum icalproperty_status icalcomponent_get_status(icalcomponent *comp)
Definition icalcomponent.c:2054
struct icaltimetype icalproperty_get_datetime_with_component(icalproperty *prop, icalcomponent *comp)
Gets a DATE or DATE-TIME property as an icaltime.
Definition icalproperty.c:1074
icalcomponent * icalcomponent_vanew(icalcomponent_kind kind,...)
Constructor.
Definition icalcomponent.c:105
void icalcomponent_set_method(icalcomponent *comp, icalproperty_method method)
Sets the METHOD property to the given method.
Definition icalcomponent.c:1551
icalcomponent * icalcomponent_new(icalcomponent_kind kind)
Constructor.
Definition icalcomponent.c:100
icalcomponent * icalcomponent_get_inner(icalcomponent *comp)
Definition icalcomponent.c:1542
void icalproperty_set_parent(icalproperty *property, icalcomponent *component)
Sets the parent icalcomponent for the specified icalproperty property.
Definition icalproperty.c:924
const char * icalcomponent_get_relcalid(icalcomponent *comp)
Gets the RELCALID property of a component.
Definition icalcomponent.c:2641
icalcomponent * icalcomponent_get_first_real_component(const icalcomponent *c)
Returns a reference to the first VEVENT, VTODO or VJOURNAL in the component.
Definition icalcomponent.c:682
void icalcomponent_merge_component(icalcomponent *comp, icalcomponent *comp_to_merge)
Definition icalcomponent.c:2191
bool icalpropiter_is_valid(const icalpropiter *i)
Definition icalcomponent.c:1503
bool icalproperty_recurrence_is_excluded(icalcomponent *comp, struct icaltimetype *dtstart, struct icaltimetype *recurtime)
Decides if a recurrence is acceptable.
Definition icalcomponent.c:773
int icalcomponent_count_errors(icalcomponent *component)
Returns the number of errors encountered parsing the data.
Definition icalcomponent.c:1158
icalcomponent * icalcomponent_clone(const icalcomponent *old)
Deeply clones an icalcomponent. Returns a pointer to the memory for the newly cloned icalcomponent.
Definition icalcomponent.c:129
icalcomponent * icalcomponent_new_iana(const char *iana_name)
Definition icalcomponent.c:172
const char * icalcomponent_get_iana_name(const icalcomponent *comp)
Definition icalcomponent.c:370
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:2481
void icalcomponent_set_dtend(icalcomponent *comp, struct icaltimetype v)
Sets the DTEND property to given icaltime.
Definition icalcomponent.c:1674
const char * icalcomponent_get_component_name(const icalcomponent *comp)
Definition icalcomponent.c:378
icalcomponent * icalcomponent_new_x(const char *x_name)
Construct a component with an x-name name.
Definition icalcomponent.c:161
void icalcomponent_set_duration(icalcomponent *comp, struct icaldurationtype v)
Sets the DURATION property to given icalduration.
Definition icalcomponent.c:1699
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:2445
void icalcomponent_set_due(icalcomponent *comp, struct icaltimetype v)
Sets the due date of a VTODO task.
Definition icalcomponent.c:2684
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)
Cycles through all recurrences of an event.
Definition icalcomponent.c:962
icalcomponent * icalcomponent_new_from_string(const char *str)
Constructor.
Definition icalcomponent.c:124
struct _icaltimezone icaltimezone
An opaque struct representing a timezone. We declare this here to avoid a circular dependency.
Definition icaltime.h:84
Definition icalcomponent.h:26
A struct representing a duration.
Definition icalduration.h:30
Definition icalcomponent.h:31