validate_recipients() now strips out duplicate recipients ... probably some 15 years...
[citadel] / webcit / calendar.h
1 /*
2  * Copyright (c) 1996-2013 by the citadel.org team
3  *
4  * This program is open source software.  You can redistribute it and/or
5  * modify it under the terms of the GNU General Public License, version 3.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  */
12
13 #ifndef __CALENDAR_H__
14 #define __CALENDAR_H__
15 /*
16  * calview contains data passed back and forth between the message fetching loop
17  * and the calendar view renderer.
18  */
19 enum {
20         calview_month,
21         calview_day,
22         calview_week,
23         calview_brief,
24         calview_summary
25 };
26
27 typedef struct _calview {
28         int view;
29         int year;
30         int month;
31         int day;
32         time_t lower_bound;
33         time_t upper_bound;
34 }calview;
35
36 typedef void (*IcalCallbackFunc)(icalcomponent *, long, char*, int, calview *);
37
38 void display_individual_cal(icalcomponent *cal, long msgnum, char *from, int unread, calview *calv);
39 void load_ical_object(long msgnum, int unread,
40                       icalcomponent_kind which_kind,
41                       IcalCallbackFunc CallBack,
42                       calview *calv,
43                       int RenderAsync
44         );
45
46 int calendar_LoadMsgFromServer(SharedMessageStatus *Stat, 
47                                void **ViewSpecific, 
48                                message_summary* Msg, 
49                                int is_new, 
50                                int i);
51 int calendar_RenderView_or_Tail(SharedMessageStatus *Stat, 
52                                 void **ViewSpecific, 
53                                 long oper);
54
55 int calendar_GetParamsGetServerCall(SharedMessageStatus *Stat, 
56                                     void **ViewSpecific, 
57                                     long oper, 
58                                     char *cmd, 
59                                     long len,
60                                     char *filter,
61                                     long flen);
62
63 int calendar_Cleanup(void **ViewSpecific);
64 int __calendar_Cleanup(void **ViewSpecific);
65
66 void render_calendar_view(calview *c);
67 void display_edit_individual_event(icalcomponent *supplied_vtodo, long msgnum, char *from,
68         int unread, calview *calv);
69 void save_individual_event(icalcomponent *supplied_vtodo, long msgnum, char *from,
70         int unread, calview *calv);
71 void ical_dezonify(icalcomponent *cal);
72
73 int tasks_LoadMsgFromServer(SharedMessageStatus *Stat, 
74                             void **ViewSpecific, 
75                             message_summary* Msg, 
76                             int is_new, 
77                             int i);
78
79 void display_edit_task(void);
80 void display_edit_event(void);
81
82 icaltimezone *get_default_icaltimezone(void);
83 void display_icaltimetype_as_webform(struct icaltimetype *, char *, int);
84 void icaltime_from_webform(struct icaltimetype *result, char *prefix);
85 void icaltime_from_webform_dateonly(struct icaltimetype *result, char *prefix);
86 void partstat_as_string(char *buf, icalproperty *attendee);
87 icalcomponent *ical_encapsulate_subcomponent(icalcomponent *subcomp);
88 void check_attendee_availability(icalcomponent *supplied_vevent);
89 int ical_ctdl_is_overlap(
90                         struct icaltimetype t1start,
91                         struct icaltimetype t1end,
92                         struct icaltimetype t2start,
93                         struct icaltimetype t2end
94 );
95
96
97 #endif