170a2347bf5c7120f3216b445467e0757eafccd8
[citadel.git] / citadel / serv_ical.c
1 /* 
2  * $Id$ 
3  *
4  * This module implements iCalendar object processing and the My Calendar>
5  * room on a Citadel/UX server.  It handles iCalendar objects using the
6  * iTIP protocol.  See RFCs 2445 and 2446.
7  *
8  */
9
10 #include <unistd.h>
11 #include <sys/types.h>
12 #include <limits.h>
13 #include <stdio.h>
14 #include "sysdep.h"
15 #include "serv_ical.h"
16 #include "citadel.h"
17 #include "server.h"
18 #include "citserver.h"
19 #include "sysdep_decls.h"
20 #include "support.h"
21 #include "config.h"
22 #include "dynloader.h"
23
24
25 /* Tell clients what level of support to expect */
26 void cmd_ical(char *argbuf)
27 {
28         /* argbuf is not used */
29         if (!(CC->logged_in)) {
30                 cprintf("%d Not logged in.\n", ERROR+NOT_LOGGED_IN);
31                 return;
32         }
33
34         cprintf("%d I (will) support|ICAL,ITIP\n", OK);
35         return;
36 }
37
38
39 int ical_obj_beforesave(struct CtdlMessage *msg)
40 {
41         return 0;
42 }
43
44
45 int ical_obj_aftersave(struct CtdlMessage *msg)
46 {
47         return 0;
48 }
49
50
51 /* Register this module with the Citadel server. */
52 char *Dynamic_Module_Init(void)
53 {
54         CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE);
55         CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE);
56         CtdlRegisterProtoHook(cmd_ical, "ICAL", "Register iCalendar support");
57         return "$Id$";
58 }