36#ifndef PROTOCORE_SPA_ROUTER_H
37#define PROTOCORE_SPA_ROUTER_H
43#if PC_ENABLE_SPA_ROUTER
46enum class pc_spa_action : uint8_t
51 PC_SPA_SERVE_FALLBACK,
55bool pc_spa_has_extension(
const char *path);
66pc_spa_action pc_spa_route(
const char *path,
const char *api_prefix);
71 const char *api_prefix;
73 bool client_scripting;
85pc_spa_action pc_spa_route_ex(
const char *path,
const pc_spa_ctx *ctx);
92typedef bool (*pc_ui_when_fn)(
void *ctx);
105 const pc_ui_fragment *frags;
119void pc_ui_stream_begin(pc_ui_stream *s,
const pc_ui_fragment *frags,
size_t count,
void *ctx);
129size_t pc_ui_stream_next(pc_ui_stream *s,
char *out,
size_t cap);
132bool pc_ui_stream_done(
const pc_ui_stream *s);
User-facing configuration for ProtoCore.