68#include "libical_ical_export.h"
78typedef enum icalrecurrencetype_frequency
83 ICAL_SECONDLY_RECURRENCE = 0,
84 ICAL_MINUTELY_RECURRENCE = 1,
85 ICAL_HOURLY_RECURRENCE = 2,
86 ICAL_DAILY_RECURRENCE = 3,
87 ICAL_WEEKLY_RECURRENCE = 4,
88 ICAL_MONTHLY_RECURRENCE = 5,
89 ICAL_YEARLY_RECURRENCE = 6,
90 ICAL_NO_RECURRENCE = 7
91} icalrecurrencetype_frequency;
93typedef enum icalrecurrencetype_weekday
99 ICAL_WEDNESDAY_WEEKDAY,
100 ICAL_THURSDAY_WEEKDAY,
102 ICAL_SATURDAY_WEEKDAY
103} icalrecurrencetype_weekday;
105typedef enum icalrecurrencetype_skip
107 ICAL_SKIP_BACKWARD = 0,
111} icalrecurrencetype_skip;
113typedef enum icalrecurrencetype_byrule
115 ICAL_BYRULE_NO_CONTRACTION = -1,
118 ICAL_BY_YEAR_DAY = 2,
119 ICAL_BY_MONTH_DAY = 3,
126 ICAL_BY_NUM_PARTS = 9
127} icalrecurrencetype_byrule;
133LIBICAL_ICAL_EXPORT icalrecurrencetype_frequency icalrecur_string_to_freq(
const char *str);
134LIBICAL_ICAL_EXPORT
const char *icalrecur_freq_to_string(icalrecurrencetype_frequency kind);
136LIBICAL_ICAL_EXPORT icalrecurrencetype_skip icalrecur_string_to_skip(
const char *str);
137LIBICAL_ICAL_EXPORT
const char *icalrecur_skip_to_string(icalrecurrencetype_skip kind);
139LIBICAL_ICAL_EXPORT
const char *icalrecur_weekday_to_string(icalrecurrencetype_weekday kind);
140LIBICAL_ICAL_EXPORT icalrecurrencetype_weekday icalrecur_string_to_weekday(
const char *str);
151#define ICAL_BY_SECOND_SIZE 62
152#define ICAL_BY_MINUTE_SIZE 61
153#define ICAL_BY_HOUR_SIZE 25
154#define ICAL_BY_MONTH_SIZE 14
155#define ICAL_BY_MONTHDAY_SIZE 32
156#define ICAL_BY_WEEKNO_SIZE 56
157#define ICAL_BY_YEARDAY_SIZE 386
158#define ICAL_BY_SETPOS_SIZE ICAL_BY_YEARDAY_SIZE
159#define ICAL_BY_DAY_SIZE (7 * (ICAL_BY_WEEKNO_SIZE - 1) + 1)
172 icalrecurrencetype_frequency freq;
202 icalrecurrencetype_skip skip;
223LIBICAL_ICAL_EXPORT
icalarray *icalrecurrencetype_rscale_supported_calendars(
void);
288LIBICAL_ICAL_EXPORT
int icalrecurrencetype_month_month(
short month);
304LIBICAL_ICAL_EXPORT
char *icalrecurrencetype_as_string(
struct icalrecurrencetype *recur);
306LIBICAL_ICAL_EXPORT
char *icalrecurrencetype_as_string_r(
struct icalrecurrencetype *recur);
312typedef struct icalrecur_iterator_impl icalrecur_iterator;
362LIBICAL_ICAL_EXPORT
struct icaltimetype icalrecur_iterator_next(icalrecur_iterator *);
368LIBICAL_ICAL_EXPORT
struct icaltimetype icalrecur_iterator_prev(icalrecur_iterator *);
384 int count, icaltime_t *array);
389typedef enum ical_invalid_rrule_handling
391 ICAL_RRULE_TREAT_AS_ERROR = 0,
392 ICAL_RRULE_IGNORE_INVALID = 1
393} ical_invalid_rrule_handling;
395LIBICAL_ICAL_EXPORT ical_invalid_rrule_handling ical_get_invalid_rrule_handling_setting(
void);
397LIBICAL_ICAL_EXPORT
void ical_set_invalid_rrule_handling_setting(
398 ical_invalid_rrule_handling newSetting);
An array of arbitrarily-sized elements which grows dynamically as elements are added.
struct _icalarray icalarray
A struct representing an icalarray object.
Definition icalarray.h:26
bool icalrecur_iterator_set_start(icalrecur_iterator *impl, struct icaltimetype start)
Definition icalrecur.c:4042
struct icalrecurrencetype * icalrecurrencetype_new_from_string(const char *str)
Definition icalrecur.c:822
void icalrecurrencetype_ref(struct icalrecurrencetype *recur)
Increases the reference counter by 1.
Definition icalrecur.c:735
void icalrecur_iterator_free(icalrecur_iterator *)
Definition icalrecur.c:2390
bool icalrecur_iterator_set_end(icalrecur_iterator *impl, struct icaltimetype end)
Definition icalrecur.c:4067
short icalrecurrencetype_encode_month(int month, bool is_leap)
Definition icalrecur.c:4191
short icalrecurrencetype_encode_day(enum icalrecurrencetype_weekday weekday, int position)
Definition icalrecur.c:4174
bool icalrecurrencetype_month_is_leap(short month)
Definition icalrecur.c:4181
bool icalrecur_resize_by(icalrecurrence_by_data *by, short size)
Resizes the buffer backing the 'by' array to the specified size, if different. Frees the buffer if th...
Definition icalrecur.c:300
struct icalrecurrencetype * icalrecurrencetype_new(void)
Allocates and initializes a new instance of icalrecurrencetype. The new instance is returned with a r...
Definition icalrecur.c:698
bool icalrecur_iterator_set_range(icalrecur_iterator *impl, struct icaltimetype from, struct icaltimetype to)
Definition icalrecur.c:4078
enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day)
Decodes a day to a weekday.
Definition icalrecur.c:4158
int icalrecurrencetype_day_position(short day)
Decodes a day to a position of the weekday.
Definition icalrecur.c:4163
bool icalrecur_expand_recurrence(const char *rule, icaltime_t start, int count, icaltime_t *array)
Fills an array with the 'count' number of occurrences generated by the rrule.
Definition icalrecur.c:4196
void icalrecurrencetype_unref(struct icalrecurrencetype *recur)
Decreases the reference counter by 1. If it goes to 0, the instance and all referenced memory (i....
Definition icalrecur.c:743
icalrecur_iterator * icalrecur_iterator_new(struct icalrecurrencetype *rule, struct icaltimetype dtstart)
Definition icalrecur.c:2264
struct icalrecurrencetype * icalrecurrencetype_clone(struct icalrecurrencetype *r)
Creates a deep copy of the given recurrence rule. The new instance is returned with a refcount of 1.
Definition icalrecur.c:785
struct icaltimetype is a pseudo-object that abstracts time handling.
Definition icalrecur.h:162
Definition icalrecur.h:168
icalrecurrencetype_weekday week_start
Encoded value.
Definition icalrecur.h:180