69#include "libical_ical_export.h"
77typedef enum icalrecurrencetype_frequency
82 ICAL_SECONDLY_RECURRENCE = 0,
83 ICAL_MINUTELY_RECURRENCE = 1,
84 ICAL_HOURLY_RECURRENCE = 2,
85 ICAL_DAILY_RECURRENCE = 3,
86 ICAL_WEEKLY_RECURRENCE = 4,
87 ICAL_MONTHLY_RECURRENCE = 5,
88 ICAL_YEARLY_RECURRENCE = 6,
89 ICAL_NO_RECURRENCE = 7
90} icalrecurrencetype_frequency;
92typedef enum icalrecurrencetype_weekday
98 ICAL_WEDNESDAY_WEEKDAY,
99 ICAL_THURSDAY_WEEKDAY,
101 ICAL_SATURDAY_WEEKDAY
102} icalrecurrencetype_weekday;
104typedef enum icalrecurrencetype_skip
106 ICAL_SKIP_BACKWARD = 0,
110} icalrecurrencetype_skip;
112enum icalrecurrence_array_max_values
114 ICAL_RECURRENCE_ARRAY_MAX = 0x7f7f,
115 ICAL_RECURRENCE_ARRAY_MAX_BYTE = 0x7f
122LIBICAL_ICAL_EXPORT icalrecurrencetype_frequency icalrecur_string_to_freq(
const char *str);
123LIBICAL_ICAL_EXPORT
const char *icalrecur_freq_to_string(icalrecurrencetype_frequency kind);
125LIBICAL_ICAL_EXPORT icalrecurrencetype_skip icalrecur_string_to_skip(
const char *str);
126LIBICAL_ICAL_EXPORT
const char *icalrecur_skip_to_string(icalrecurrencetype_skip kind);
128LIBICAL_ICAL_EXPORT
const char *icalrecur_weekday_to_string(icalrecurrencetype_weekday kind);
129LIBICAL_ICAL_EXPORT icalrecurrencetype_weekday icalrecur_string_to_weekday(
const char *str);
140#define ICAL_BY_SECOND_SIZE 62
141#define ICAL_BY_MINUTE_SIZE 61
142#define ICAL_BY_HOUR_SIZE 25
143#define ICAL_BY_MONTH_SIZE 14
144#define ICAL_BY_MONTHDAY_SIZE 32
145#define ICAL_BY_WEEKNO_SIZE 56
146#define ICAL_BY_YEARDAY_SIZE 386
147#define ICAL_BY_SETPOS_SIZE ICAL_BY_YEARDAY_SIZE
148#define ICAL_BY_DAY_SIZE 7*(ICAL_BY_WEEKNO_SIZE-1)+1
153 icalrecurrencetype_frequency freq;
161 icalrecurrencetype_weekday week_start;
173 short by_minute[ICAL_BY_MINUTE_SIZE];
174 short by_hour[ICAL_BY_HOUR_SIZE];
185 short by_month_day[ICAL_BY_MONTHDAY_SIZE];
186 short by_year_day[ICAL_BY_YEARDAY_SIZE];
187 short by_week_no[ICAL_BY_WEEKNO_SIZE];
196 short by_set_pos[ICAL_BY_SETPOS_SIZE];
200 icalrecurrencetype_skip skip;
203#define ICALRECURRENCETYPE_INITIALIZER { \
204 ICAL_NO_RECURRENCE, \
205 ICALTIMETYPE_INITIALIZER, \
208 ICAL_MONDAY_WEEKDAY, \
209 { ICAL_RECURRENCE_ARRAY_MAX_BYTE }, \
210 { ICAL_RECURRENCE_ARRAY_MAX_BYTE }, \
211 { ICAL_RECURRENCE_ARRAY_MAX_BYTE }, \
212 { ICAL_RECURRENCE_ARRAY_MAX_BYTE }, \
213 { ICAL_RECURRENCE_ARRAY_MAX_BYTE }, \
214 { ICAL_RECURRENCE_ARRAY_MAX_BYTE }, \
215 { ICAL_RECURRENCE_ARRAY_MAX_BYTE }, \
216 { ICAL_RECURRENCE_ARRAY_MAX_BYTE }, \
217 { ICAL_RECURRENCE_ARRAY_MAX_BYTE }, \
222LIBICAL_ICAL_EXPORT
int icalrecurrencetype_rscale_is_supported(
void);
224LIBICAL_ICAL_EXPORT
icalarray *icalrecurrencetype_rscale_supported_calendars(
void);
259LIBICAL_ICAL_EXPORT
int icalrecurrencetype_month_is_leap(
short month);
261LIBICAL_ICAL_EXPORT
int icalrecurrencetype_month_month(
short month);
270LIBICAL_ICAL_EXPORT
char *icalrecurrencetype_as_string(
struct icalrecurrencetype *recur);
272LIBICAL_ICAL_EXPORT
char *icalrecurrencetype_as_string_r(
struct icalrecurrencetype *recur);
311 int count, time_t *array);
An array of arbitrarily-sized elements which grows dynamically as elements are added.
int icalrecur_expand_recurrence(const char *rule, time_t start, int count, time_t *array)
Fills an array with the 'count' number of occurrences generated by the rrule.
Definition icalrecur.c:3244
struct icalrecurrencetype icalrecurrencetype_from_string(const char *str)
Definition icalrecur.c:555
void icalrecur_iterator_free(icalrecur_iterator *)
Definition icalrecur.c:2065
struct icaltimetype icalrecur_iterator_next(icalrecur_iterator *)
Definition icalrecur.c:2933
icalrecur_iterator * icalrecur_iterator_new(struct icalrecurrencetype rule, struct icaltimetype dtstart)
Definition icalrecur.c:1952
enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day)
Decodes a day to a weekday.
Definition icalrecur.c:3210
int icalrecurrencetype_day_position(short day)
Decodes a day to a position of the weekday.
Definition icalrecur.c:3215
int icalrecur_iterator_set_start(icalrecur_iterator *impl, struct icaltimetype start)
Definition icalrecur.c:3168
#define ICAL_BY_SECOND_SIZE
Definition icalrecur.h:140
struct icaltimetype is a pseudo-object that abstracts time handling.
Definition icalarray.h:36
Definition icalrecur.c:925
Definition icalrecur.h:152
short by_day[7 *(56 -1)+1]
Encoded value.
Definition icalrecur.h:175
short by_month[14]
Encoded value.
Definition icalrecur.h:188
Definition icaltime.h:105
int month
Definition icaltime.h:107