6#ifndef PHAROS_NATIVE_DYNAMIC_RELATIONAL_H
7#define PHAROS_NATIVE_DYNAMIC_RELATIONAL_H
45 const char *runtime_conf_path,
59 const char *runtime_conf_path,
72 const char *runtime_conf_path
85 const char *runtime_conf_path,
98 const char *runtime_conf_path
110 const char *app_root,
111 const char *runtime_conf_path,
124 const char *app_root,
125 const char *runtime_conf_path,
140 const char *app_root,
141 const char *runtime_conf_path,
143 const char *state_path,
144 const char *expected_audit_count
int native_dynamic_relational_runtime_import_state(const char *app_root, const char *runtime_conf_path, const char *app_id, const char *state_path, const char *expected_audit_count)
Imports canonical runtime state JSON into the configured relational backend.
int native_dynamic_relational_postgresql_runtime_ready(const char *app_root, const char *runtime_conf_path)
Returns whether PostgreSQL runtime prerequisites are satisfied.
char * native_dynamic_relational_file_signature_dup(const char *path)
Computes a stable signature for one file path.
int native_dynamic_relational_postgresql_runtime_prepare(const char *app_root, const char *runtime_conf_path)
Prepares the PostgreSQL schema, seed data, and migration ledger for one dynamic app.
int native_dynamic_relational_sqlite_runtime_prepare(const char *app_root, const char *runtime_conf_path, const char *app_id)
Prepares the sqlite schema, seed data, and migration ledger for one dynamic app.
char * native_dynamic_relational_runtime_audit_count_dup(const char *app_root, const char *runtime_conf_path, const char *app_id)
Returns the current audit-event count from the configured relational backend.
int native_dynamic_relational_sqlite_runtime_ready(const char *app_root, const char *runtime_conf_path, const char *app_id)
Returns whether sqlite runtime prerequisites are satisfied.
void native_dynamic_relational_request_sync_free(NativeDynamicRelationalRequestSync *sync)
Clears heap-owned fields in a request-local relational sync record.
char * native_dynamic_relational_runtime_export_json_dup(const char *app_root, const char *runtime_conf_path, const char *app_id)
Exports canonical runtime state JSON from the configured relational backend.
int native_dynamic_relational_prepare_request_state(const AppRuntime *app, NativeDynamicRelationalRequestSync *sync)
Exports relational state into the app state file before request handling when enabled.
char * native_dynamic_relational_backend_dup(const char *app_root, const char *runtime_conf_path)
Returns the configured relational backend when it is recognized.
int native_dynamic_relational_sync_back_if_changed(const AppRuntime *app, const NativeDynamicRelationalRequestSync *sync)
Imports the app state file back into the relational backend when it changed.
char * native_dynamic_relational_sqlite_path_dup(const char *app_root, const char *runtime_conf_path, const char *app_id)
Returns the effective sqlite database path for a dynamic app.
Defines shared native runtime data structures used across the Pharos C runtime.
Loaded runtime metadata for one Pharos app artifact.
Carries request-local relational bridge state for one native request.