From 1b03afbe16dbcff1b62a3e600e72f5fe7c1082ad Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 22 Dec 2023 11:24:19 -0500 Subject: [PATCH] calendar_functions.c: added skeleton --- webcit-ng/server/calendar_functions.c | 15 +++++++++++++++ webcit-ng/server/room_functions.c | 6 ++++++ webcit-ng/server/webcit.h | 1 + 3 files changed, 22 insertions(+) create mode 100644 webcit-ng/server/calendar_functions.c diff --git a/webcit-ng/server/calendar_functions.c b/webcit-ng/server/calendar_functions.c new file mode 100644 index 000000000..1c9e19645 --- /dev/null +++ b/webcit-ng/server/calendar_functions.c @@ -0,0 +1,15 @@ +// Calendar functions +// +// Copyright (c) 1996-2023 by the citadel.org team +// +// This program is open source software. Use, duplication, or +// disclosure are subject to the GNU General Public License v3. + +#include "webcit.h" + + +// Client is requesting a message list +void json_msglist(struct http_transaction *h, struct ctdlsession *c, char *range) { + + do_404(h); +} diff --git a/webcit-ng/server/room_functions.c b/webcit-ng/server/room_functions.c index 9153319c6..24195e773 100644 --- a/webcit-ng/server/room_functions.c +++ b/webcit-ng/server/room_functions.c @@ -226,6 +226,12 @@ void object_in_room(struct http_transaction *h, struct ctdlsession *c) { return; } + if (!strncasecmp(buf, "calendar.", 9)) { // Client is requesting a calendar range + unescape_input(&buf[9]); + calendar_msglist(h, c, &buf[9]); + return; + } + if (!strcasecmp(buf, "info.txt")) { // Client is requesting the room info banner read_room_info_banner(h, c); return; diff --git a/webcit-ng/server/webcit.h b/webcit-ng/server/webcit.h index 956e24863..11681a596 100644 --- a/webcit-ng/server/webcit.h +++ b/webcit-ng/server/webcit.h @@ -180,3 +180,4 @@ void UrlizeText(StrBuf* Target, StrBuf *Source, StrBuf *WrkBuf); void json_render_one_message(struct http_transaction *h, struct ctdlsession *c, long msgnum); void upload_files(struct http_transaction *h, struct ctdlsession *c); struct uploaded_file pop_upload(char *id); +void json_msglist(struct http_transaction *h, struct ctdlsession *c, char *range); -- 2.30.2