Pharos
0.7.23
Modern Web Framework & Web App Hosting Service.
Toggle main menu visibility
Loading...
Searching...
No Matches
native_dynamic_business_logic.h
Go to the documentation of this file.
1
/**
2
* @file
3
* @brief Shared declarative action, workflow, and effect helpers for dynamic-app business-logic scaffolding.
4
*/
5
6
#ifndef PHAROS_NATIVE_DYNAMIC_BUSINESS_LOGIC_H
7
#define PHAROS_NATIVE_DYNAMIC_BUSINESS_LOGIC_H
8
9
#include "
native_runtime_types.h
"
10
#include "
native_connection.h
"
11
#include "
native_http_request.h
"
12
#include "
native_yyjson_helpers.h
"
13
14
/**
15
* @brief Executes one declarative dynamic-app action contract against JSON state.
16
*
17
* The shared runtime uses this helper for framework-owned action contracts that
18
* express typed inputs, mutation primitives, workflow bindings, effect hooks,
19
* and explanation reporting declaratively in app fixtures.
20
*
21
* @param connection Connection that receives any error or redirect response.
22
* @param app Finalized app runtime metadata.
23
* @param request Parsed HTTP request.
24
* @param action_id Action identifier from the matched route.
25
* @return HTTP status code when the helper handled the action, or 0 when no
26
* matching declarative contract exists for the app/action pair.
27
*/
28
int
native_dynamic_execute_declarative_action
(
29
NativeConnection
*connection,
30
const
AppRuntime
*app,
31
const
HttpRequest
*request,
32
const
char
*action_id
33
);
34
35
/**
36
* @brief Loads declarative presentation overrides for one action contract.
37
*
38
* @param app Finalized app runtime metadata.
39
* @param action_id Action identifier to inspect.
40
* @param submit_label_out Optional duplicated submit label.
41
* @param summary_out Optional duplicated summary text.
42
* @return 1 when the action contract was found, otherwise 0.
43
*/
44
int
native_dynamic_action_presentation_dup
(
45
const
AppRuntime
*app,
46
const
char
*action_id,
47
char
**submit_label_out,
48
char
**summary_out
49
);
50
51
#endif
native_connection.h
Declares the native connection abstraction and transport metadata helpers.
native_dynamic_execute_declarative_action
int native_dynamic_execute_declarative_action(NativeConnection *connection, const AppRuntime *app, const HttpRequest *request, const char *action_id)
Executes one declarative dynamic-app action contract against JSON state.
Definition
native_dynamic_business_logic.c:3047
native_dynamic_action_presentation_dup
int native_dynamic_action_presentation_dup(const AppRuntime *app, const char *action_id, char **submit_label_out, char **summary_out)
Loads declarative presentation overrides for one action contract.
Definition
native_dynamic_business_logic.c:3027
native_http_request.h
Declares the parsed HTTP request record and request parsing helpers.
native_runtime_types.h
Defines shared native runtime data structures used across the Pharos C runtime.
native_yyjson_helpers.h
Declares shared helper wrappers around vendored yyjson parsing and serialization APIs.
AppRuntime
Loaded runtime metadata for one Pharos app artifact.
Definition
native_runtime_types.h:37
HttpRequest
Parsed HTTP request fields extracted from a native connection.
Definition
native_http_request.h:16
NativeConnection
Accepted client connection and its resolved transport metadata.
Definition
native_connection.h:24
src
native_runtime
c
native_dynamic_business_logic.h
Generated by
1.17.0