mirror of
https://github.com/itsPLK/ps5-payload-manager.git
synced 2026-10-19 02:19:53 -05:00
Split two monolithic files (main.c 1538→233 lines, payload_mgr.c 2355→467 lines) into 8 single-responsibility modules: - http_server.c: MHD request router and all route handlers - repository.c: repo cache, download, install/commit, self-update - sources.c: multi-source repository management - config.c: PldmgrConfig struct, read/write, JSON config handler - log_server.c: ring buffer, SSE streaming, pldmgr_log() - json_helpers.c: JsonListBuilder, JSON parser, file I/O utilities - sha256.c: SHA256 hash implementation - process_mgr.c: process listing and kill Introduces PldmgrConfig struct to replace the 8-out-param read_next_config_values() pattern. Renames extracted functions to match their new modules (e.g. repository_install_download, sources_add, process_kill). No HTTP route changes — frontend is unaffected.
13 lines
434 B
C
13 lines
434 B
C
#ifndef HTTP_SERVER_H
|
|
#define HTTP_SERVER_H
|
|
|
|
#include <microhttpd.h>
|
|
|
|
/* MHD request handler callback — dispatches all routes. */
|
|
enum MHD_Result http_on_request(void *cls, struct MHD_Connection *conn,
|
|
const char *url, const char *method,
|
|
const char *version, const char *upload_data,
|
|
size_t *upload_data_size, void **con_cls);
|
|
|
|
#endif
|