* use SmashStrBuf where apropriate
[citadel.git] / webcit / calendar.h
1
2 #ifndef __CALENDAR_H__
3 #define __CALENDAR_H__
4 /*
5  * calview contains data passed back and forth between the message fetching loop
6  * and the calendar view renderer.
7  */
8 enum {
9         calview_month,
10         calview_day,
11         calview_week,
12         calview_brief,
13         calview_summary
14 };
15
16 typedef struct _calview {
17         int view;
18         int year;
19         int month;
20         int day;
21         time_t lower_bound;
22         time_t upper_bound;
23 }calview;
24
25 typedef void (*IcalCallbackFunc)(icalcomponent *, long, char*, int, calview *);
26
27 void display_individual_cal(icalcomponent *cal, long msgnum, char *from, int unread, calview *calv);
28 void load_ical_object(long msgnum, int unread,
29                       icalcomponent_kind which_kind,
30                       IcalCallbackFunc CallBack,
31                       calview *calv,
32                       int RenderAsync
33         );
34
35 int calendar_LoadMsgFromServer(SharedMessageStatus *Stat, 
36                                void **ViewSpecific, 
37                                message_summary* Msg, 
38                                int is_new, 
39                                int i);
40 int calendar_RenderView_or_Tail(SharedMessageStatus *Stat, 
41                                 void **ViewSpecific, 
42                                 long oper);
43
44 int calendar_GetParamsGetServerCall(SharedMessageStatus *Stat, 
45                                     void **ViewSpecific, 
46                                     long oper, 
47                                     char *cmd, 
48                                     long len);
49
50 int calendar_Cleanup(void **ViewSpecific);
51
52 void render_calendar_view(calview *c);
53 void display_edit_individual_event(icalcomponent *supplied_vtodo, long msgnum, char *from,
54         int unread, calview *calv);
55 void save_individual_event(icalcomponent *supplied_vtodo, long msgnum, char *from,
56         int unread, calview *calv);
57 void ical_dezonify(icalcomponent *cal);
58
59 int tasks_LoadMsgFromServer(SharedMessageStatus *Stat, 
60                             void **ViewSpecific, 
61                             message_summary* Msg, 
62                             int is_new, 
63                             int i);
64 #endif