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