summaryrefslogtreecommitdiff
path: root/src/web.h
diff options
context:
space:
mode:
authorJesper Jensen <jesper@jnsn.dev>2026-02-21 19:55:14 +0100
committerJesper Jensen <jesper@jnsn.dev>2026-02-21 19:55:14 +0100
commit0f3cbe7c7a562d65e16b704a038e8e6868436170 (patch)
treee551ba9e5a57983a91332f501ebc6f1be087dbbd /src/web.h
parentcd59f14f9de567f2e84f88b3e70d4652ab1e5ea8 (diff)
Introduce new chain style handler processing
Diffstat (limited to 'src/web.h')
-rw-r--r--src/web.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/web.h b/src/web.h
index d957427..a918010 100644
--- a/src/web.h
+++ b/src/web.h
@@ -38,6 +38,21 @@ struct Request {
struct PostCollector pp;
struct MHD_PostProcessor *post_proc; // NULL when using PostCollector
struct FormData form;
+ const char *url;
+ const char *method;
const char *host;
const char *proto;
};
+
+enum HandlerStatus {
+ HANDLER_DECLINE,
+ HANDLER_ACCEPTED,
+ HANDLER_ERROR
+};
+
+struct MHD_Connection;
+
+typedef enum HandlerStatus (*RouteHandler)(
+ struct MHD_Connection *connection,
+ struct Request *request
+);