17#ifndef PROTOCORE_FILE_SERVING_H
18#define PROTOCORE_FILE_SERVING_H
22#if PROTOCORE_ENABLE_FILE_SERVING
46} FileServingHttpRfc1123Args;
54} FileServingServeStaticRequestArgs;
63 const char *content_type;
64 const char *content_encoding;
65} FileServingServeFileInternalArgs;
71} FileServingFileSendPumpArgs;
77} FileServingHoldsSlotArgs;
85 const char *content_type;
86} FileServingServeFileArgs;
91 const char *url_prefix;
94} FileServingServeStaticArgs;
131 FileServingHttpRfc1123Args http_rfc1123_args;
132 FileServingServeStaticRequestArgs serve_static_request_args;
133 FileServingServeFileInternalArgs serve_file_internal_args;
134 FileServingFileSendPumpArgs file_send_pump_args;
135 FileServingHoldsSlotArgs holds_slot_args;
136 FileServingServeFileArgs serve_file_args;
137 FileServingServeStaticArgs serve_static_args;
142extern FileServingVars FileServingV;
147 void (*
const http_rfc1123)(uint8_t *work);
148 void (*
const serve_static_request)(uint8_t *work);
149 void (*
const serve_file_internal)(uint8_t *work);
150 void (*
const file_send_pump)(uint8_t *work);
151 void (*
const holds_slot)(uint8_t *work);
152 void (*
const serve_file)(uint8_t *work);
153 void (*
const serve_static)(uint8_t *work);
158void protocore_file_serving_http_rfc1123(uint8_t *work);
159void protocore_file_serving_serve_static_request(uint8_t *work);
160void protocore_file_serving_serve_file_internal(uint8_t *work);
161void protocore_file_serving_file_send_pump(uint8_t *work);
162void protocore_file_serving_holds_slot(uint8_t *work);
163void protocore_file_serving_serve_file(uint8_t *work);
164void protocore_file_serving_serve_static(uint8_t *work);
170static const FileServingNs FileServing __attribute__((unused)) = {
171 .http_rfc1123 = protocore_file_serving_http_rfc1123,
172 .serve_static_request = protocore_file_serving_serve_static_request,
173 .serve_file_internal = protocore_file_serving_serve_file_internal,
174 .file_send_pump = protocore_file_serving_file_send_pump,
175 .holds_slot = protocore_file_serving_holds_slot,
176 .serve_file = protocore_file_serving_serve_file,
177 .serve_static = protocore_file_serving_serve_static,
189uint8_t *protocore_file_serving_span(
void);
The route table: where a request goes.
The mount: which store is behind the filesystem, and the vtable it answers through.
Internal route entry stored in the routing table.
A storage backend. Each open call returns a small handle (>= 0) or -1.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS