From: Art Cancro Date: Tue, 20 Feb 2024 15:15:57 +0000 (-0500) Subject: Skeleton code for filters. X-Git-Tag: v999~43 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=6f4c0c2ce695e96011b2a61815e25d16ebbffa85 Skeleton code for filters. All of the filters specified in RFC4971 9.7.1 through 9.7.5 will be handled in this loop: comp-filter, prop-filter, param-filter, is-not-defined, text-match, and probably others as we complete the spec. Also, in all of the .c files I unwrapped the license declaration onto a single line, since the whole thing fits inside 132 characters, and 132 characters is our official line length now. --- diff --git a/webcit-ng/server/admin_functions.c b/webcit-ng/server/admin_functions.c index 62843f26e..9d5ddb002 100644 --- a/webcit-ng/server/admin_functions.c +++ b/webcit-ng/server/admin_functions.c @@ -2,8 +2,7 @@ // // Copyright (c) 1996-2023 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/caldav_reports.c b/webcit-ng/server/caldav_reports.c index 21dbdb74e..514885766 100644 --- a/webcit-ng/server/caldav_reports.c +++ b/webcit-ng/server/caldav_reports.c @@ -280,6 +280,28 @@ int caldav_apply_one_filter(void *cal, char *filter) { ++num_tokens; } + // Handle the individual filters defined in RFC4791 9.7.1 through 9.7.5 + + if (!strcasecmp(t[0], "comp-filter")) { // RFC4791 9.7.1 - filter by component + syslog(LOG_DEBUG, "component filter FIXME not implemented yet"); + } + + else if (!strcasecmp(t[0], "prop-filter")) { // RFC4791 9.7.2 - filter by property + syslog(LOG_DEBUG, "property filter FIXME not implemented yet"); + } + + else if (!strcasecmp(t[0], "param-filter")) { // RFC4791 9.7.3 - filter by parameter + syslog(LOG_DEBUG, "parameter filter FIXME not implemented yet"); + } + + else if (!strcasecmp(t[0], "is-not-defined")) { // RFC4791 9.7.4 + syslog(LOG_DEBUG, "is-not-defined filter FIXME not implemented yet"); + } + + else if (!strcasecmp(t[0], "text-match")) { // RFC4791 9.7.5 + syslog(LOG_DEBUG, "text match filter FIXME not implemented yet"); + } + return(1); } diff --git a/webcit-ng/server/ctdl_commands.c b/webcit-ng/server/ctdl_commands.c index 61b067303..2f3f7b1bb 100644 --- a/webcit-ng/server/ctdl_commands.c +++ b/webcit-ng/server/ctdl_commands.c @@ -1,7 +1,6 @@ // Copyright (c) 1996-2022 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/ctdlclient.c b/webcit-ng/server/ctdlclient.c index f7d03615c..1d0dacb01 100644 --- a/webcit-ng/server/ctdlclient.c +++ b/webcit-ng/server/ctdlclient.c @@ -2,8 +2,7 @@ // // Copyright (c) 1987-2022 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/ctdlfunctions.c b/webcit-ng/server/ctdlfunctions.c index d6798d2ab..407d15340 100644 --- a/webcit-ng/server/ctdlfunctions.c +++ b/webcit-ng/server/ctdlfunctions.c @@ -2,8 +2,7 @@ // // Copyright (c) 2016-2022 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/floor_functions.c b/webcit-ng/server/floor_functions.c index accd6dda0..5574d5ec5 100644 --- a/webcit-ng/server/floor_functions.c +++ b/webcit-ng/server/floor_functions.c @@ -2,8 +2,7 @@ // // Copyright (c) 1996-2022 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/forum_view.c b/webcit-ng/server/forum_view.c index 188f2e8cc..89303256a 100644 --- a/webcit-ng/server/forum_view.c +++ b/webcit-ng/server/forum_view.c @@ -3,8 +3,7 @@ // // Copyright (c) 1996-2023 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/html2html.c b/webcit-ng/server/html2html.c index 5a76bc2fc..d99877c89 100644 --- a/webcit-ng/server/html2html.c +++ b/webcit-ng/server/html2html.c @@ -3,8 +3,7 @@ // // Copyright (c) 2005-2022 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/http.c b/webcit-ng/server/http.c index 77c158fe4..c770cd30e 100644 --- a/webcit-ng/server/http.c +++ b/webcit-ng/server/http.c @@ -2,8 +2,7 @@ // // Copyright (c) 1996-2023 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/main.c b/webcit-ng/server/main.c index 941667941..e06d70693 100644 --- a/webcit-ng/server/main.c +++ b/webcit-ng/server/main.c @@ -2,8 +2,7 @@ // // Copyright (c) 1996-2024 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" // All other headers are included from this header. diff --git a/webcit-ng/server/messages.c b/webcit-ng/server/messages.c index e9cb5a458..841580405 100644 --- a/webcit-ng/server/messages.c +++ b/webcit-ng/server/messages.c @@ -2,8 +2,7 @@ // // Copyright (c) 1996-2023 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/request.c b/webcit-ng/server/request.c index c0fa86b2c..bd1b32538 100644 --- a/webcit-ng/server/request.c +++ b/webcit-ng/server/request.c @@ -6,8 +6,7 @@ // // Copyright (c) 1996-2023 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/room_functions.c b/webcit-ng/server/room_functions.c index 3ab2f5dc1..09e7bac39 100644 --- a/webcit-ng/server/room_functions.c +++ b/webcit-ng/server/room_functions.c @@ -2,8 +2,7 @@ // // Copyright (c) 1996-2024 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/static.c b/webcit-ng/server/static.c index 0599e899f..060ff1f4f 100644 --- a/webcit-ng/server/static.c +++ b/webcit-ng/server/static.c @@ -2,8 +2,7 @@ // // Copyright (c) 1996-2022 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/tcp_sockets.c b/webcit-ng/server/tcp_sockets.c index 82206fdc3..6c5701266 100644 --- a/webcit-ng/server/tcp_sockets.c +++ b/webcit-ng/server/tcp_sockets.c @@ -2,8 +2,7 @@ // // Copyright (c) 1987-2022 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/text2html.c b/webcit-ng/server/text2html.c index 5c7eba6e2..b4ecd4b2f 100644 --- a/webcit-ng/server/text2html.c +++ b/webcit-ng/server/text2html.c @@ -2,8 +2,7 @@ // // Copyright (c) 2017-2022 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/tls.c b/webcit-ng/server/tls.c index e0a9e137f..76db181dc 100644 --- a/webcit-ng/server/tls.c +++ b/webcit-ng/server/tls.c @@ -3,8 +3,7 @@ // // Copyright (c) 1996-2022 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/upload.c b/webcit-ng/server/upload.c index dcad84bc5..fd7a77b25 100644 --- a/webcit-ng/server/upload.c +++ b/webcit-ng/server/upload.c @@ -2,8 +2,7 @@ // // Copyright (c) 1996-2023 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/user_functions.c b/webcit-ng/server/user_functions.c index d4db7571f..64fc9b558 100644 --- a/webcit-ng/server/user_functions.c +++ b/webcit-ng/server/user_functions.c @@ -2,8 +2,7 @@ // // Copyright (c) 1996-2023 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" diff --git a/webcit-ng/server/webserver.c b/webcit-ng/server/webserver.c index 1a4545fa9..446625d9c 100644 --- a/webcit-ng/server/webserver.c +++ b/webcit-ng/server/webserver.c @@ -6,8 +6,7 @@ // // Copyright (c) 1996-2022 by the citadel.org team // -// This program is open source software. Use, duplication, or -// disclosure is subject to the GNU General Public License v3. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. #include "webcit.h" // All other headers are included from this header.