From 3ddecda78a842d669c632d42cc81d987f031d882 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 24 Jan 2024 17:19:23 -0500 Subject: [PATCH] Noodling on calendar query commands. The server command 'ICAL report' is now 'ICAL query' with the intent that it will handle CalDAV 'calendar-query' REPORTs, but not other REPORTs. Likewise, functions with names including the string 'calendar_report' have been changed to 'calendar_query'. --- citadel/server/modules/calendar/calendar_report.c | 10 +++++----- citadel/server/modules/calendar/serv_calendar.c | 4 ++-- citadel/server/modules/calendar/serv_calendar.h | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/citadel/server/modules/calendar/calendar_report.c b/citadel/server/modules/calendar/calendar_report.c index c9d7eb199..f547967dc 100644 --- a/citadel/server/modules/calendar/calendar_report.c +++ b/citadel/server/modules/calendar/calendar_report.c @@ -17,12 +17,12 @@ #include "serv_calendar.h" -// CtdlForEachMessage callback for calendar_report() -void calendar_report_backend(long msgnum, void *data) { +// CtdlForEachMessage callback for calendar_query() +void calendar_query_backend(long msgnum, void *data) { struct CtdlMessage *msg = NULL; struct ical_respond_data ird; - syslog(LOG_DEBUG, "calendar_report: calendar_report_backend(%ld)", msgnum); + syslog(LOG_DEBUG, "calendar_query: calendar_query_backend(%ld)", msgnum); // Look for the calendar event... msg = CtdlFetchMessage(msgnum, 1); @@ -59,7 +59,7 @@ void calendar_report_backend(long msgnum, void *data) { // Go through a calendar room and output calendar objects after applying caller specified filters. // It is intended as a data source for WebCit (both the UI and CalDAV) -void calendar_report(void) { +void calendar_query(void) { void *filter_rules; // Don't know yet what form this will take // Only allow this operation if we're in a room containing a calendar or tasks view @@ -76,7 +76,7 @@ void calendar_report(void) { CtdlForEachMessage(MSGS_ALL, 0, NULL, NULL, NULL, - calendar_report_backend, + calendar_query_backend, (void *) filter_rules ); diff --git a/citadel/server/modules/calendar/serv_calendar.c b/citadel/server/modules/calendar/serv_calendar.c index b8eaaa6ca..39b62880a 100644 --- a/citadel/server/modules/calendar/serv_calendar.c +++ b/citadel/server/modules/calendar/serv_calendar.c @@ -2347,8 +2347,8 @@ void cmd_ical(char *argbuf) { // All other commands require a user to be logged in. if (CtdlAccessCheck(ac_logged_in)) return; - if (!strcasecmp(subcmd, "report")) { - calendar_report(); + if (!strcasecmp(subcmd, "query")) { + calendar_query(); return; } diff --git a/citadel/server/modules/calendar/serv_calendar.h b/citadel/server/modules/calendar/serv_calendar.h index 784c10b7a..7bb827c45 100644 --- a/citadel/server/modules/calendar/serv_calendar.h +++ b/citadel/server/modules/calendar/serv_calendar.h @@ -33,9 +33,9 @@ struct ical_respond_data { // Everything below was generated by `cproto *.c 2>/dev/null` -// calendar_report.c -void calendar_report_backend(long msgnum, void *data); -void calendar_report(void); +// calendar_query.c +void calendar_query_backend(long msgnum, void *data); +void calendar_query(void); // serv_calendar.c icalcomponent *icalcomponent_new_citadel_vcalendar(void); -- 2.30.2