1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
4 * Harish Krishnaswamy <kharish@novell.com>
6 * Copyright 2005, Novell, Inc.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU Lesser General Public
10 * License as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
23 #ifndef E_GW_RECUR_UTILS_H
24 #define E_GW_RECUR_UTILS_H
27 #define E_GW_ITEM_RECURRENCE_FREQUENCY_DAILY "Daily"
28 #define E_GW_ITEM_RECURRENCE_FREQUENCY_WEEKLY "Weekly"
29 #define E_GW_ITEM_RECURRENCE_FREQUENCY_MONTHLY "Monthly"
30 #define E_GW_ITEM_RECURRENCE_FREQUENCY_YEARLY "Yearly"
33 #define E_GW_ITEM_RECUR_OCCURRENCE_TYPE_FIRST "First"
34 #define E_GW_ITEM_RECUR_OCCURRENCE_TYPE_SECOND "Second"
35 #define E_GW_ITEM_RECUR_OCCURRENCE_TYPE_THIRD "Third"
36 #define E_GW_ITEM_RECUR_OCCURRENCE_TYPE_FOURTH "Fourth"
37 #define E_GW_ITEM_RECUR_OCCURRENCE_TYPE_FIFTH "Fifth"
38 #define E_GW_ITEM_RECUR_OCCURRENCE_TYPE_LAST "Last"
40 /* XXX - an array would probably be better */
41 #define E_GW_ITEM_RECUR_WEEKDAY_SUNDAY "Sunday"
42 #define E_GW_ITEM_RECUR_WEEKDAY_MONDAY "Monday"
43 #define E_GW_ITEM_RECUR_WEEKDAY_TUESDAY "Tuesday"
44 #define E_GW_ITEM_RECUR_WEEKDAY_WEDNESDAY "Wednesday"
45 #define E_GW_ITEM_RECUR_WEEKDAY_THURSDAY "Thursday"
46 #define E_GW_ITEM_RECUR_WEEKDAY_FRIDAY "Friday"
47 #define E_GW_ITEM_RECUR_WEEKDAY_SATURDAY "Saturday"
49 #define E_GW_ITEM_BY_DAY_SIZE 364 /* 7 days * 52 weeks */
50 #define E_GW_ITEM_BY_MONTHDAY_SIZE 32
51 #define E_GW_ITEM_BY_YEARDAY_SIZE 367
52 #define E_GW_ITEM_BY_MONTH_SIZE 13
59 short by_day[E_GW_ITEM_BY_DAY_SIZE];
60 short by_month_day[E_GW_ITEM_BY_MONTHDAY_SIZE];
61 short by_year_day[E_GW_ITEM_BY_YEARDAY_SIZE];
62 short by_month[E_GW_ITEM_BY_MONTH_SIZE];
63 } EGwItemRecurrenceRule;
66 #define E_GW_ITEM_RECUR_END_MARKER 0x7f7f
70 const char *e_gw_recur_get_day_of_week (short day);