Pharos
0.7.23
Modern Web Framework & Web App Hosting Service.
Toggle main menu visibility
Loading...
Searching...
No Matches
native_spawn_argv.h
Go to the documentation of this file.
1
/**
2
* @file
3
* @brief Declares argv construction helpers for spawned app requests.
4
*/
5
6
#ifndef PHAROS_NATIVE_SPAWN_ARGV_H
7
#define PHAROS_NATIVE_SPAWN_ARGV_H
8
9
#include "
native_runtime_types.h
"
10
11
#include <stddef.h>
12
13
#define PHAROS_APP_REQUEST_ARGV_CAPACITY 32
14
15
/**
16
* @brief Builds the argv vector used to execute one compiled app request.
17
* @param app Finalized app runtime that will handle the request.
18
* @param request_method HTTP request method.
19
* @param request_target HTTP request target.
20
* @param request_cookie Cookie header value.
21
* @param request_headers Normalized request headers.
22
* @param request_content_type Request content type.
23
* @param request_body Request body text when passed inline.
24
* @param request_is_multipart Non-zero when the request uses multipart form data.
25
* @param temp_body_path Optional temporary body file path for multipart requests.
26
* @param argv_list Destination argv array to populate.
27
* @param argv_capacity Capacity of argv_list in entries.
28
* @param argc_out Destination for the populated argv length.
29
* @return 0 on success, or a non-zero status code when the argv cannot be constructed.
30
*/
31
int
build_native_app_request_argv
(
32
const
AppRuntime
*app,
33
const
char
*request_method,
34
const
char
*request_target,
35
const
char
*request_cookie,
36
const
char
*request_headers,
37
const
char
*request_content_type,
38
const
char
*request_body,
39
int
request_is_multipart,
40
const
char
*temp_body_path,
41
char
*argv_list[],
42
size_t
argv_capacity,
43
size_t
*argc_out
44
);
45
46
#endif
native_runtime_types.h
Defines shared native runtime data structures used across the Pharos C runtime.
build_native_app_request_argv
int build_native_app_request_argv(const AppRuntime *app, const char *request_method, const char *request_target, const char *request_cookie, const char *request_headers, const char *request_content_type, const char *request_body, int request_is_multipart, const char *temp_body_path, char *argv_list[], size_t argv_capacity, size_t *argc_out)
Builds the argv vector used to execute one compiled app request.
Definition
native_spawn_argv.c:22
AppRuntime
Loaded runtime metadata for one Pharos app artifact.
Definition
native_runtime_types.h:37
src
native_runtime
c
native_spawn_argv.h
Generated by
1.17.0