cOMS/module/WebApp.h
Dennis Eichhorn 2059cc6e77
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (autobuild, c-cpp) (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
update
2025-06-14 19:10:16 +00:00

44 lines
1.2 KiB
C

#ifndef COMS_MODULE_WEB_APP_H
#define COMS_MODULE_WEB_APP_H
#include "../system/Library.cpp"
#include "../log/DebugContainer.h"
#include "../http/HttpRequest.h"
#include "../http/HttpResponse.h"
#include "../network/SocketConnection.h"
struct ApplicationData;
typedef void dll_app_load(DebugContainer*);
// INFO: Requires pointer to pointer since we may want to resize the request or response object
// The response object is intuitive but even the response object might need this if we are parsing a file upload
typedef void dll_app_handle_request(void*, SocketConnection*, HttpRequest**, HttpResponse**);
struct WebApp {
dll_app_load* app_load;
dll_app_handle_request* app_handle_request;
// @todo It's a little bit nasty, that we have this thing here
// Remember lib is now back referencing to *codetable
// It would probably better to have a library manager that holds all libs
Library lib;
};
// null || '' = must not be set
// * any
// actual name
struct WebAppMatchPattern {
char subdomain[16];
char domain[24];
char path[24];
int32 app_id;
};
const char* web_app_function_name_table[] = {
"app_load",
"app_handle_request",
};
#endif