29typedef enum : uint32_t {
84 void* directory_workspace,
85 uint32_t directory_workspace_bytes);
122 const char* state_path,
@ k_fw_fs_path_cap
Largest portable path including its NUL.
ra8_err_t mdl_library_workspace_init(mdl_library_workspace_t *workspace, void *directory_workspace, uint32_t directory_workspace_bytes)
Bind caller-owned directory storage to a reusable library workspace.
ra8_err_t mdl_library_for_each(mdl_storage_t *storage, const char *out_dir, mdl_state_t *state_scratch, mdl_library_workspace_t *workspace, const mdl_library_policy_t *policy, mdl_library_fn callback, void *callback_ctx)
Visit every authenticated tracked series under a library root.
mdl_library_policy_t mdl_library_policy_default(void)
Return the production library traversal policy.
mdl_library_limit_t
Hard ceilings accepted by the portable library algorithms.
@ k_mdl_library_entry_limit
Maximum discovered entries.
@ k_mdl_library_operation_limit
Maximum namespace calls.
@ k_mdl_library_depth_limit
Maximum child-dir nesting.
ra8_err_t mdl_library_remove_tree(mdl_storage_t *storage, const char *dir, const mdl_library_policy_t *policy, mdl_library_workspace_t *workspace)
Remove one canonical directory tree through portable namespace calls.
ra8_err_t(* mdl_library_fn)(const char *series_dir, const char *state_path, const mdl_state_t *state, void *ctx, bool *out_continue)
Per-series visitor callback for mdl_library_for_each.
Persistent per-series library state for the media downloader.
Injected portable storage resources for downloader domain code.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Caller-selected limits within the compile-time hard ceilings.
uint32_t max_operations
Namespace calls permitted for removal.
uint32_t max_entries
Entries accepted before fail-closed stop.
uint16_t max_depth
Child-directory nesting below the root.
Caller-owned directory cursor storage and iterative traversal stack.
uint32_t required_entries
Entries observed through cap+1.
uint16_t depth
Current stack depth, root is zero.
char paths[(size_t) k_mdl_library_depth_limit+1U][k_fw_fs_path_cap]
DFS path stack, one canonical path at each permitted depth.
void * directory_workspace
Backend cursor workspace.
uint32_t entry_limit
Active explicit traversal limit.
uint32_t entries
Entries accepted by the traversal.
uint32_t operations
Namespace calls attempted.
uint32_t directory_workspace_bytes
Cursor workspace extent.
One series' complete persistent state (declare at file scope).
One non-reentrant downloader filesystem dependency bundle.