calendar_functions.c: added skeleton
authorArt Cancro <ajc@citadel.org>
Fri, 22 Dec 2023 16:24:19 +0000 (11:24 -0500)
committerArt Cancro <ajc@citadel.org>
Fri, 22 Dec 2023 16:24:19 +0000 (11:24 -0500)
webcit-ng/server/calendar_functions.c [new file with mode: 0644]
webcit-ng/server/room_functions.c
webcit-ng/server/webcit.h

diff --git a/webcit-ng/server/calendar_functions.c b/webcit-ng/server/calendar_functions.c
new file mode 100644 (file)
index 0000000..1c9e196
--- /dev/null
@@ -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);
+}
index 9153319c64d51beac9542ec3f535368de8763f4c..24195e7733b3e3fd83e6cd0ef3e60517fe0939b5 100644 (file)
@@ -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;
index 956e248639a60d2dc03e7aade05e536e590e19aa..11681a5969f6056f0e100412cded5c6383cfce19 100644 (file)
@@ -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);