Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
capsule.hpp
Go to the documentation of this file.
1#pragma once
2
9
19
20#include <filesystem>
21#include <optional>
22#include <string>
23#include <vector>
24
26
36
46 const ProfileRegistry& registry,
47 const AdmissionOptions& options);
48
54 const ProfileRegistry& registry,
55 const StagingArea& staging,
56 const ExtractionProgress& progress = {});
57
62struct ExportItem {
64 std::vector<std::uint8_t> bytes;
65};
66
69 std::vector<ExportItem> items;
70};
71
95export_capsule(ExportRequest request, const std::filesystem::path& destination,
96 const CapsuleLimits& limits = kCapsuleLimitsV1);
97
98} // namespace pulp::authoring_capsule
Bounded, deterministic capsule archive access.
A reader over an admitted archive.
Definition archive.hpp:37
Definition profile_registry.hpp:68
A private directory that is removed when it goes out of scope unless it was published.
Definition staging.hpp:29
Result<T, E> — either holds a T or an E, never both.
Definition result.hpp:76
Archive and path budgets.
The capsule envelope: the only authority for what a capsule is.
Definition archive.hpp:24
constexpr CapsuleLimits kCapsuleLimitsV1
The frozen v1 budgets.
Definition limits.hpp:35
runtime::Result< CapsulePreview, CapsuleError > preview_capsule(const CapsuleArchive &archive, const ProfileRegistry &registry, const AdmissionOptions &options)
Steps 1-4 of the import state machine: bounded manifest read, structural and closure validation,...
runtime::Result< std::uint64_t, CapsuleError > export_capsule(ExportRequest request, const std::filesystem::path &destination, const CapsuleLimits &limits=kCapsuleLimitsV1)
Fill in the closure — sorted files, digests, sizes, and revision_id — and write one deterministic arc...
@ preview
Definition component.hpp:21
std::function< bool(std::size_t member_index, std::size_t member_count)> ExtractionProgress
Progress and cancellation.
Definition staging.hpp:54
runtime::Result< void, CapsuleError > admit_to_staging(const CapsuleArchive &archive, const CapsulePreview &preview, const ProfileRegistry &registry, const StagingArea &staging, const ExtractionProgress &progress={})
Steps 6-7: extract only declared members into staging, verifying digests, then run the profile's sema...
The result of inspecting a capsule without running any of it.
Consumers register what a payload means.
Result<T, E> — success / failure union for fallible operations.
Trust is an adapter, not a dependency.
Extract privately, publish atomically, never replace.
Admission failure vocabulary for authoring capsules.
CapsuleLimits limits
Definition capsule.hpp:28
const SignatureVerifier * verifier
Optional; when absent, a signed capsule is admitted as unsigned rather than trusted.
Definition capsule.hpp:31
std::string product
Product identifier of the caller, used to distinguish "not for thisproduct" from "not supported anywh...
Definition capsule.hpp:34
One member of an export inventory.
Definition capsule.hpp:62
FileEntry entry
Definition capsule.hpp:63
std::vector< std::uint8_t > bytes
Definition capsule.hpp:64
std::vector< ExportItem > items
Definition capsule.hpp:69
Manifest manifest
Definition capsule.hpp:68
One row of the archive closure.
Definition component.hpp:110
Definition manifest.hpp:47