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