#pragma once #include "app.h" #include #include struct MHD_PostProcessor; struct Server { struct App *app; char *page; }; int web_begin(struct Server *server, int port, const char *admin_user, const char *admin_pass); int web_join(struct Server *server); struct PostCollector { char *data; size_t size; size_t capacity; }; struct FormData { char name[CLIENT_NAME_MAX]; int name_set; int64_t client_id; // For delete operations int client_id_set; char username[32]; int username_set; char password[64]; int password_set; }; struct Request { struct Server *server; struct PostCollector pp; struct MHD_PostProcessor *post_proc; // NULL when using PostCollector struct FormData form; const char *host; };