mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:55:10 +00:00
[ADD/WIP] Routerwerk!
This commit is contained in:
parent
25ed114d0f
commit
47c98cbbe3
8 changed files with 280 additions and 1 deletions
20
src/include/Routes.h
Normal file
20
src/include/Routes.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef PARSEE_ROUTES_H
|
||||
#define PARSEE_ROUTES_H
|
||||
|
||||
#include <Parsee.h>
|
||||
typedef struct ParseeHttpArg {
|
||||
ParseeData *data;
|
||||
HttpServerContext *ctx;
|
||||
Stream *stream;
|
||||
} ParseeHttpArg;
|
||||
|
||||
/* A list of all routes. */
|
||||
#define ROUTES X_ROUTE("/", RouteRoot)
|
||||
|
||||
#define X_ROUTE(path, name) extern void * name(Array *, void *);
|
||||
ROUTES
|
||||
#undef X_ROUTE
|
||||
|
||||
#define RouteHead(name, pathargs, argp) void * \
|
||||
name(Array * pathargs, void *argp)
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue