1 // This is a handler for calendar "report" operations.
2 // It is expected that CALDAV REPORT operations should be able to use this directly.
4 // Copyright (c) 1987-2024 by the citadel.org team
6 // This program is open source software. Use, duplication, or disclosure
7 // are subject to the terms of the GNU General Public License version 3.
9 #define PRODID "-//Citadel//NONSGML Citadel Calendar//EN"
11 #include "../../ctdl_module.h"
12 #include <libical/ical.h>
13 #include "../../msgbase.h"
14 #include "../../internet_addressing.h"
15 #include "serv_calendar.h"
16 #include "../../room_ops.h"
17 #include "../../euidindex.h"
18 #include "../../default_timezone.h"
19 #include "../../config.h"
22 void calendar_report(void) {
25 // Only allow this operation if we're in a room containing a calendar or tasks view
26 if ( (CC->room.QRdefaultview != VIEW_CALENDAR)
27 && (CC->room.QRdefaultview != VIEW_TASKS)
29 cprintf("%d Not a calendar room\n", ERROR+NOT_HERE);
30 return; // This room does not contain a calendar.
33 cprintf("%d Send query then receive response\n", SEND_THEN_RECV);
34 while(client_getln(buf, sizeof buf) >= 0 && strcmp(buf,"000")) {