Back to index

webcit  8.12-dfsg
calendar.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1996-2012 by the citadel.org team
00003  *
00004  * This program is open source software.  You can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License, version 3.
00006  * 
00007  * 
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * 
00015  * 
00016  * 
00017  */
00018 
00019 #ifndef __CALENDAR_H__
00020 #define __CALENDAR_H__
00021 /*
00022  * calview contains data passed back and forth between the message fetching loop
00023  * and the calendar view renderer.
00024  */
00025 enum {
00026        calview_month,
00027        calview_day,
00028        calview_week,
00029        calview_brief,
00030        calview_summary
00031 };
00032 
00033 typedef struct _calview {
00034        int view;
00035        int year;
00036        int month;
00037        int day;
00038        time_t lower_bound;
00039        time_t upper_bound;
00040 }calview;
00041 
00042 typedef void (*IcalCallbackFunc)(icalcomponent *, long, char*, int, calview *);
00043 
00044 void display_individual_cal(icalcomponent *cal, long msgnum, char *from, int unread, calview *calv);
00045 void load_ical_object(long msgnum, int unread,
00046                     icalcomponent_kind which_kind,
00047                     IcalCallbackFunc CallBack,
00048                     calview *calv,
00049                     int RenderAsync
00050        );
00051 
00052 int calendar_LoadMsgFromServer(SharedMessageStatus *Stat, 
00053                             void **ViewSpecific, 
00054                             message_summary* Msg, 
00055                             int is_new, 
00056                             int i);
00057 int calendar_RenderView_or_Tail(SharedMessageStatus *Stat, 
00058                             void **ViewSpecific, 
00059                             long oper);
00060 
00061 int calendar_GetParamsGetServerCall(SharedMessageStatus *Stat, 
00062                                 void **ViewSpecific, 
00063                                 long oper, 
00064                                 char *cmd, 
00065                                 long len,
00066                                 char *filter,
00067                                 long flen);
00068 
00069 int calendar_Cleanup(void **ViewSpecific);
00070 int __calendar_Cleanup(void **ViewSpecific);
00071 
00072 void render_calendar_view(calview *c);
00073 void display_edit_individual_event(icalcomponent *supplied_vtodo, long msgnum, char *from,
00074        int unread, calview *calv);
00075 void save_individual_event(icalcomponent *supplied_vtodo, long msgnum, char *from,
00076        int unread, calview *calv);
00077 void ical_dezonify(icalcomponent *cal);
00078 
00079 int tasks_LoadMsgFromServer(SharedMessageStatus *Stat, 
00080                          void **ViewSpecific, 
00081                          message_summary* Msg, 
00082                          int is_new, 
00083                          int i);
00084 
00085 void display_edit_task(void);
00086 void display_edit_event(void);
00087 
00088 icaltimezone *get_default_icaltimezone(void);
00089 void display_icaltimetype_as_webform(struct icaltimetype *, char *, int);
00090 void icaltime_from_webform(struct icaltimetype *result, char *prefix);
00091 void icaltime_from_webform_dateonly(struct icaltimetype *result, char *prefix);
00092 void partstat_as_string(char *buf, icalproperty *attendee);
00093 icalcomponent *ical_encapsulate_subcomponent(icalcomponent *subcomp);
00094 void check_attendee_availability(icalcomponent *supplied_vevent);
00095 int ical_ctdl_is_overlap(
00096                         struct icaltimetype t1start,
00097                         struct icaltimetype t1end,
00098                         struct icaltimetype t2start,
00099                         struct icaltimetype t2end
00100 );
00101 
00102 
00103 #endif