69#include "libical_ical_export.h"
79typedef enum icalrecurrencetype_frequency
84 ICAL_SECONDLY_RECURRENCE = 0,
85 ICAL_MINUTELY_RECURRENCE = 1,
86 ICAL_HOURLY_RECURRENCE = 2,
87 ICAL_DAILY_RECURRENCE = 3,
88 ICAL_WEEKLY_RECURRENCE = 4,
89 ICAL_MONTHLY_RECURRENCE = 5,
90 ICAL_YEARLY_RECURRENCE = 6,
91 ICAL_NO_RECURRENCE = 7
92} icalrecurrencetype_frequency;
94typedef enum icalrecurrencetype_weekday
100 ICAL_WEDNESDAY_WEEKDAY,
101 ICAL_THURSDAY_WEEKDAY,
103 ICAL_SATURDAY_WEEKDAY
104} icalrecurrencetype_weekday;
106typedef enum icalrecurrencetype_skip
108 ICAL_SKIP_BACKWARD = 0,
112} icalrecurrencetype_skip;
114typedef enum icalrecurrencetype_byrule
116 ICAL_BYRULE_NO_CONTRACTION = -1,
119 ICAL_BY_YEAR_DAY = 2,
120 ICAL_BY_MONTH_DAY = 3,
127 ICAL_BY_NUM_PARTS = 9
128} icalrecurrencetype_byrule;
134LIBICAL_ICAL_EXPORT icalrecurrencetype_frequency icalrecur_string_to_freq(
const char *str);
135LIBICAL_ICAL_EXPORT
const char *icalrecur_freq_to_string(icalrecurrencetype_frequency kind);
137LIBICAL_ICAL_EXPORT icalrecurrencetype_skip icalrecur_string_to_skip(
const char *str);
138LIBICAL_ICAL_EXPORT
const char *icalrecur_skip_to_string(icalrecurrencetype_skip kind);
140LIBICAL_ICAL_EXPORT
const char *icalrecur_weekday_to_string(icalrecurrencetype_weekday kind);
141LIBICAL_ICAL_EXPORT icalrecurrencetype_weekday icalrecur_string_to_weekday(
const char *str);
152#define ICAL_BY_SECOND_SIZE 62
153#define ICAL_BY_MINUTE_SIZE 61
154#define ICAL_BY_HOUR_SIZE 25
155#define ICAL_BY_MONTH_SIZE 14
156#define ICAL_BY_MONTHDAY_SIZE 32
157#define ICAL_BY_WEEKNO_SIZE 56
158#define ICAL_BY_YEARDAY_SIZE 386
159#define ICAL_BY_SETPOS_SIZE ICAL_BY_YEARDAY_SIZE
160#define ICAL_BY_DAY_SIZE 7 * (ICAL_BY_WEEKNO_SIZE - 1) + 1
173 icalrecurrencetype_frequency freq;
203 icalrecurrencetype_skip skip;
224LIBICAL_ICAL_EXPORT
bool icalrecurrencetype_rscale_is_supported(
void);
226LIBICAL_ICAL_EXPORT
icalarray *icalrecurrencetype_rscale_supported_calendars(
void);
291LIBICAL_ICAL_EXPORT
int icalrecurrencetype_month_month(
short month);
307LIBICAL_ICAL_EXPORT
char *icalrecurrencetype_as_string(
struct icalrecurrencetype *recur);
309LIBICAL_ICAL_EXPORT
char *icalrecurrencetype_as_string_r(
struct icalrecurrencetype *recur);
365LIBICAL_ICAL_EXPORT
struct icaltimetype icalrecur_iterator_next(icalrecur_iterator *);
371LIBICAL_ICAL_EXPORT
struct icaltimetype icalrecur_iterator_prev(icalrecur_iterator *);
387 int count, icaltime_t *array);
392typedef enum ical_invalid_rrule_handling
394 ICAL_RRULE_TREAT_AS_ERROR = 0,
395 ICAL_RRULE_IGNORE_INVALID = 1
396} ical_invalid_rrule_handling;
398LIBICAL_ICAL_EXPORT ical_invalid_rrule_handling ical_get_invalid_rrule_handling_setting(
void);
400LIBICAL_ICAL_EXPORT
void ical_set_invalid_rrule_handling_setting(
401 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:28
bool icalrecur_iterator_set_start(icalrecur_iterator *impl, struct icaltimetype start)
Definition icalrecur.c:3707
struct icalrecurrencetype * icalrecurrencetype_new_from_string(const char *str)
Definition icalrecur.c:777
void icalrecurrencetype_ref(struct icalrecurrencetype *recur)
Increases the reference counter by 1.
Definition icalrecur.c:691
void icalrecur_iterator_free(icalrecur_iterator *)
Definition icalrecur.c:2258
bool icalrecur_iterator_set_end(icalrecur_iterator *impl, struct icaltimetype end)
Definition icalrecur.c:3732
short icalrecurrencetype_encode_month(int month, bool is_leap)
Definition icalrecur.c:3854
short icalrecurrencetype_encode_day(enum icalrecurrencetype_weekday weekday, int position)
Definition icalrecur.c:3837
bool icalrecurrencetype_month_is_leap(short month)
Definition icalrecur.c:3844
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:310
struct icalrecurrencetype * icalrecurrencetype_new(void)
Allocates and initializes a new instance of icalrecurrencetype. The new instance is returned with a r...
Definition icalrecur.c:654
bool icalrecur_iterator_set_range(icalrecur_iterator *impl, struct icaltimetype from, struct icaltimetype to)
Definition icalrecur.c:3743
enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day)
Decodes a day to a weekday.
Definition icalrecur.c:3821
int icalrecurrencetype_day_position(short day)
Decodes a day to a position of the weekday.
Definition icalrecur.c:3826
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:3859
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:699
icalrecur_iterator * icalrecur_iterator_new(struct icalrecurrencetype *rule, struct icaltimetype dtstart)
Definition icalrecur.c:2140
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:740
struct icaltimetype is a pseudo-object that abstracts time handling.
Definition icalrecur.c:1088
Definition icalrecur.h:163
Definition icalrecur.h:169
icalrecurrencetype_weekday week_start
Encoded value.
Definition icalrecur.h:181