Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / servers / groupwise / e-gw-recur-utils.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* 
3  * Authors :
4  *      Harish Krishnaswamy <kharish@novell.com>
5  *   
6  * Copyright 2005, Novell, Inc.
7  *
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.
11  *
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.
16  *
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
20  * USA
21  */
22
23 #ifndef E_GW_RECUR_UTILS_H
24 #define E_GW_RECUR_UTILS_H
25
26
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"
31
32
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"
39
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"
48
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
53
54 typedef struct {
55         char *frequency;
56         char *until;
57         int count;
58         int interval;
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;
64
65
66 #define E_GW_ITEM_RECUR_END_MARKER  0x7f7f
67
68
69
70 const char *e_gw_recur_get_day_of_week (short day);
71  
72 #endif