Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
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
10#include "native_connection.h"
11#include "native_http_request.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 */
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 */
45 const AppRuntime *app,
46 const char *action_id,
47 char **submit_label_out,
48 char **summary_out
49);
50
51#endif
Declares the native connection abstraction and transport metadata helpers.
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.
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.
Declares the parsed HTTP request record and request parsing helpers.
Defines shared native runtime data structures used across the Pharos C runtime.
Declares shared helper wrappers around vendored yyjson parsing and serialization APIs.
Loaded runtime metadata for one Pharos app artifact.
Parsed HTTP request fields extracted from a native connection.
Accepted client connection and its resolved transport metadata.