784c10b7acce4595976fb2a18ad101263018d96b
[citadel.git] / citadel / server / modules / calendar / serv_calendar.h
1 // iCalendar implementation for Citadel
2 //
3 // Copyright (c) 1987-2024 by the citadel.org team
4 //
5 // This program is open source software.  Use, duplication, or disclosure
6 // is subject to the terms of the GNU General Public License version 3.
7
8 #define PRODID "-//Citadel//NONSGML Citadel Calendar//EN"
9
10 // "server_generated_invitations" tells the Citadel server that the
11 // client wants invitations to be generated and sent out by the
12 // server.  Set to 1 to enable this functionality.
13
14 // "avoid_sending_invitations" is a server-internal variable.  It is
15 // set internally during certain transactions and cleared
16 // automatically.
17
18 struct cit_ical {
19         int server_generated_invitations;
20         int avoid_sending_invitations;
21 };
22
23 #define CIT_ICAL CC->CIT_ICAL
24 #define MAX_RECUR 1000
25
26
27 // This is a structure to pass data back and forth between callbacks.
28 struct ical_respond_data {
29         char desired_partnum[SIZ];
30         icalcomponent *cal;
31 };
32
33
34 // Everything below was generated by `cproto *.c 2>/dev/null`
35
36 // calendar_report.c
37 void calendar_report_backend(long msgnum, void *data);
38 void calendar_report(void);
39
40 // serv_calendar.c
41 icalcomponent *icalcomponent_new_citadel_vcalendar(void);
42 icalcomponent *ical_encapsulate_subcomponent(icalcomponent *subcomp);
43 void ical_write_to_cal(struct ctdluser *u, icalcomponent *cal);
44 void ical_send_a_reply(icalcomponent *request, char *action);
45 void ical_locate_part(char *name, char *filename, char *partnum, char *disp, void *content, char *cbtype, char *cbcharset, size_t length, char *encoding, char *cbid, void *cbuserdata);
46 void ical_respond(long msgnum, char *partnum, char *action);
47 void ical_learn_uid_of_reply(char *uidbuf, icalcomponent *cal);
48 void ical_hunt_for_event_to_update(long msgnum, void *data);
49 void ical_locate_original_event(char *name, char *filename, char *partnum, char *disp, void *content, char *cbtype, char *cbcharset, size_t length, char *encoding, char *cbid, void *cbuserdata);
50 void ical_merge_attendee_reply(icalcomponent *event, icalcomponent *reply);
51 int ical_update_my_calendar_with_reply(icalcomponent *cal);
52 void ical_handle_rsvp(long msgnum, char *partnum, char *action);
53 icalproperty *ical_ctdl_get_subprop(icalcomponent *cal, icalproperty_kind which_prop);
54 int ical_ctdl_is_overlap(struct icaltimetype t1start, struct icaltimetype t1end, struct icaltimetype t2start, struct icaltimetype t2end);
55 int ical_conflicts_phase6(struct icaltimetype t1start, struct icaltimetype t1end, struct icaltimetype t2start, struct icaltimetype t2end, long existing_msgnum, char *conflict_event_uid, char *conflict_event_summary, char *compare_uid);
56 void ical_conflicts_phase5(struct icaltimetype t1start, struct icaltimetype t1end, icalcomponent *existing_event, long existing_msgnum, char *compare_uid);
57 void ical_conflicts_phase4(icalcomponent *proposed_event, icalcomponent *existing_event, long existing_msgnum);
58 void ical_hunt_for_conflicts_backend(long msgnum, void *data);
59 void ical_hunt_for_conflicts(icalcomponent *cal);
60 void ical_conflicts(long msgnum, char *partnum);
61 void ical_add_to_freebusy(icalcomponent *fb, icalcomponent *top_level_cal);
62 void ical_freebusy_backend(long msgnum, void *data);
63 void ical_freebusy(char *who);
64 void ical_getics_backend(long msgnum, void *data);
65 void ical_getics(void);
66 void ical_putics_grabtzids(icalparameter *param, void *data);
67 void ical_putics(void);
68 void ical_CtdlCreateRoom(void);
69 void ical_send_out_invitations(icalcomponent *top_level_cal, icalcomponent *cal);
70 void ical_saving_vevent(icalcomponent *top_level_cal, icalcomponent *cal);
71 void ical_obj_beforesave_backend(char *name, char *filename, char *partnum, char *disp, void *content, char *cbtype, char *cbcharset, size_t length, char *encoding, char *cbid, void *cbuserdata);
72 int ical_obj_beforesave(struct CtdlMessage *msg, struct recptypes *recp);
73 void ical_obj_aftersave_backend(char *name, char *filename, char *partnum, char *disp, void *content, char *cbtype, char *cbcharset, size_t length, char *encoding, char *cbid, void *cbuserdata);
74 int ical_obj_aftersave(struct CtdlMessage *msg, struct recptypes *recp);
75 void ical_session_startup(void);
76 void ical_session_shutdown(void);
77 void ical_fixed_output_backend(icalcomponent *cal, int recursion_level);
78 void ical_fixed_output(char *ptr, int len);
79 void cmd_ical(char *argbuf);
80 char *ctdl_module_init_calendar(void);