C++17 API¶
The C++ wrapper is header-only and owns values copied from the C ABI.
-
namespace postproject¶
Typedefs
-
using RevisionEventPayload = std::variant<AssetImportedEvent, RepresentationAddedEvent, ResourceAddedEvent, RepresentationResourceAddedEvent, LocatorAddedEvent, LocatorRetiredEvent, MediaRootAddedEvent, MediaRootEnabledChangedEvent, MediaRootRemovedEvent, ExternalIdentifierAddedEvent, ExternalIdentifierRemovedEvent, MetadataAddedOrReplacedEvent, MetadataRemovedEvent, ActivityCreatedEvent, ActivityInputAddedEvent, ActivityOutputAddedEvent>¶
Enums
-
enum class ErrorCode : std::uint32_t¶
Values:
-
enumerator ok¶
-
enumerator invalid_argument¶
-
enumerator not_found¶
-
enumerator already_exists¶
-
enumerator io¶
-
enumerator storage¶
-
enumerator migration¶
-
enumerator conflict¶
-
enumerator ambiguous_resolution¶
-
enumerator fingerprint¶
-
enumerator unsupported¶
-
enumerator internal¶
-
enumerator ok¶
-
enum class ObjectKind : std::uint32_t¶
Values:
-
enumerator production¶
-
enumerator asset¶
-
enumerator representation¶
-
enumerator resource¶
-
enumerator activity¶
-
enumerator production¶
-
enum class RepresentationKind : std::uint32_t¶
Values:
-
enumerator original¶
-
enumerator proxy¶
-
enumerator optimized¶
-
enumerator derived¶
-
enumerator original¶
-
enum class ContentStructureKind : std::uint32_t¶
Values:
-
enumerator single_resource¶
-
enumerator image_sequence¶
-
enumerator ordered_parts¶
-
enumerator package¶
-
enumerator single_resource¶
-
enum class LocatorAvailability : std::uint32_t¶
Values:
-
enumerator unknown¶
-
enumerator online¶
-
enumerator offline¶
-
enumerator unknown¶
-
enum class RepresentationAvailability : std::uint32_t¶
Values:
-
enumerator online¶
-
enumerator partial¶
-
enumerator offline¶
-
enumerator ambiguous¶
-
enumerator error¶
-
enumerator online¶
-
enum class ResourceResolutionState : std::uint32_t¶
Values:
-
enumerator online_at_known_locator¶
-
enumerator resolved_exact¶
-
enumerator resolved_probable¶
-
enumerator offline¶
-
enumerator ambiguous¶
-
enumerator error¶
-
enumerator online_at_known_locator¶
-
enum class AvailabilityIssueKind : std::uint32_t¶
Values:
-
enumerator offline_resource¶
-
enumerator ambiguous_resource¶
-
enumerator resource_error¶
-
enumerator missing_frames¶
-
enumerator offline_resource¶
-
enum class EvidenceKind : std::uint32_t¶
Values:
-
enumerator known_locator_available¶
-
enumerator exact_fingerprint_match¶
-
enumerator full_hash_match¶
-
enumerator partial_fingerprint_match¶
-
enumerator file_size_match¶
-
enumerator file_name_match¶
-
enumerator relative_path_similarity¶
-
enumerator media_root_relation¶
-
enumerator conflicting_candidate¶
-
enumerator discovery_error¶
-
enumerator media_root_unmapped¶
-
enumerator known_locator_available¶
Functions
-
inline std::uint32_t abi_version() noexcept¶
-
struct Activity¶
- #include <postproject.hpp>
Public Members
-
std::string kind¶
-
std::optional<std::int64_t> started_at_unix_micros¶
-
std::optional<std::int64_t> finished_at_unix_micros¶
-
std::optional<ToolIdentity> tool¶
-
std::optional<AgentIdentity> agent¶
-
std::vector<ActivityEdge> inputs¶
-
std::vector<ActivityEdge> outputs¶
-
std::string kind¶
-
struct ActivityCreatedEvent¶
- #include <postproject.hpp>
-
struct ActivityEdge¶
- #include <postproject.hpp>
-
struct ActivityInputAddedEvent¶
- #include <postproject.hpp>
-
struct ActivityOutputAddedEvent¶
- #include <postproject.hpp>
-
struct ActivitySpec¶
- #include <postproject.hpp>
Public Members
-
std::string kind¶
-
std::optional<std::int64_t> started_at_unix_micros¶
-
std::optional<std::int64_t> finished_at_unix_micros¶
-
std::optional<ToolIdentity> tool¶
-
std::optional<AgentIdentity> agent¶
-
std::vector<ActivityEdge> inputs¶
-
std::vector<ActivityEdge> outputs¶
-
std::string kind¶
-
struct AgentIdentity¶
- #include <postproject.hpp>
-
struct Asset¶
- #include <postproject.hpp>
-
struct AssetImportedEvent¶
- #include <postproject.hpp>
-
struct AvailabilityIssue¶
- #include <postproject.hpp>
-
class Error : public std::runtime_error¶
- #include <postproject.hpp>
Public Functions
-
struct Evidence¶
- #include <postproject.hpp>
-
struct ExternalIdentifier¶
- #include <postproject.hpp>
-
struct ExternalIdentifierAddedEvent¶
- #include <postproject.hpp>
-
struct ExternalIdentifierRemovedEvent¶
- #include <postproject.hpp>
-
struct FileResourceInput¶
- #include <postproject.hpp>
-
struct Fingerprint¶
- #include <postproject.hpp>
-
struct HostObjectBinding¶
- #include <postproject.hpp>
Public Functions
-
inline std::string toString() const¶
Public Static Functions
-
static inline HostObjectBinding fromString(std::string_view value)¶
Friends
-
inline friend constexpr bool operator==(const HostObjectBinding &left, const HostObjectBinding &right) noexcept¶
-
inline std::string toString() const¶
-
struct ImageSequenceDescriptor¶
- #include <postproject.hpp>
-
struct ImageSequenceInput¶
- #include <postproject.hpp>
-
struct Locator¶
- #include <postproject.hpp>
-
struct LocatorAddedEvent¶
- #include <postproject.hpp>
-
struct LocatorRetiredEvent¶
- #include <postproject.hpp>
-
struct MediaRoot¶
- #include <postproject.hpp>
-
struct MediaRootAddedEvent¶
- #include <postproject.hpp>
-
struct MediaRootEnabledChangedEvent¶
- #include <postproject.hpp>
-
struct MediaRootMapping¶
- #include <postproject.hpp>
-
struct MediaRootRemovedEvent¶
- #include <postproject.hpp>
-
struct MetadataAddedOrReplacedEvent¶
- #include <postproject.hpp>
-
struct MetadataFieldInput¶
- #include <postproject.hpp>
-
class MetadataInput¶
- #include <postproject.hpp>
Public Functions
-
MetadataInput(const MetadataInput&) = delete¶
-
MetadataInput &operator=(const MetadataInput&) = delete¶
-
inline MetadataInput(MetadataInput &&other) noexcept¶
-
inline MetadataInput &operator=(MetadataInput &&other) noexcept¶
-
inline ~MetadataInput()¶
Public Static Functions
-
static inline MetadataInput plainString(std::string_view value)¶
-
static inline MetadataInput languageString(std::string_view value, std::string_view language)¶
-
static inline MetadataInput signedInteger(std::int64_t value)¶
-
static inline MetadataInput unsignedInteger(std::uint64_t value)¶
-
static inline MetadataInput decimal(std::string_view coefficient, std::uint32_t scale)¶
-
static inline MetadataInput boolean(bool value)¶
-
static inline MetadataInput timestamp(std::int64_t unix_micros)¶
-
static inline MetadataInput uri(std::string_view value)¶
-
static inline MetadataInput bytes(const std::vector<std::uint8_t> &value)¶
-
static inline MetadataInput rational(std::int64_t numerator, std::uint64_t denominator)¶
-
static inline MetadataInput reference(const ObjectRef &target)¶
-
static inline MetadataInput list(const std::vector<MetadataInput> &items)¶
-
static inline MetadataInput structure(const std::vector<MetadataFieldInput> &fields)¶
Private Functions
-
inline explicit MetadataInput(pp_metadata_input_t *input) noexcept¶
Private Members
-
pp_metadata_input_t *input_¶
Private Static Functions
-
static inline MetadataInput checked(pp_error_code_t status, pp_metadata_input_t *input, pp_error_t *error)¶
Friends
- friend class Transaction
-
MetadataInput(const MetadataInput&) = delete¶
-
struct MetadataRemovedEvent¶
- #include <postproject.hpp>
-
struct ObjectRef¶
- #include <postproject.hpp>
-
struct OriginIdentity¶
- #include <postproject.hpp>
-
class Production¶
- #include <postproject.hpp>
Public Functions
-
Production(const Production&) = delete¶
-
Production &operator=(const Production&) = delete¶
-
inline Production(Production &&other) noexcept¶
-
inline Production &operator=(Production &&other) noexcept¶
-
inline ~Production()¶
-
inline std::vector<Representation> representations(const Uuid &asset_id) const¶
-
inline std::vector<ExternalIdentifier> externalIdentifiers(const ObjectRef &target) const¶
-
inline std::vector<ObjectRef> findByExternalIdentifier(std::string_view scheme, std::string_view value) const¶
-
inline std::vector<RepresentationResolution> resolveAsset(const Uuid &asset_id, const std::vector<MediaRootMapping> &root_mappings = {}) const¶
-
inline std::vector<RevisionEvent> revisionEvents(const Uuid &revision_id) const¶
-
inline Transaction beginTransaction()¶
-
inline explicit operator bool() const noexcept¶
Public Static Functions
-
static inline Production create(std::string_view path)¶
-
static inline Production create(std::string_view path, std::string_view display_name)¶
-
static inline Production open(std::string_view path)¶
Private Types
-
using ActivityQuery = pp_error_code_t (*)(const pp_production_t*, const pp_uuid_t*, pp_activity_set_t**, pp_error_t**)¶
-
using ProvenanceQuery = pp_error_code_t (*)(const pp_production_t*, const pp_uuid_t*, pp_object_ref_set_t**, pp_error_t**)¶
Private Functions
-
inline explicit Production(pp_production_t *production) noexcept¶
-
inline std::vector<Activity> activities_for_representation(const Uuid &representation_id, ActivityQuery query) const¶
-
inline std::vector<Uuid> provenance_relatives(const Uuid &representation_id, ProvenanceQuery query) const¶
Private Members
-
pp_production_t *production_ = nullptr¶
Private Static Functions
-
static inline Production create_impl(std::string_view path, const char *display_name)¶
-
Production(const Production&) = delete¶
-
struct Representation¶
- #include <postproject.hpp>
Public Members
-
RepresentationKind kind¶
-
ContentStructureKind structure_kind¶
-
std::vector<RepresentationMember> members¶
-
std::optional<ImageSequenceDescriptor> image_sequence¶
-
std::vector<Fingerprint> fingerprints¶
-
RepresentationKind kind¶
-
struct RepresentationAddedEvent¶
- #include <postproject.hpp>
-
struct RepresentationMember¶
- #include <postproject.hpp>
-
struct RepresentationResolution¶
- #include <postproject.hpp>
Public Members
-
RepresentationAvailability availability¶
-
std::vector<ResourceResolution> resources¶
-
std::vector<AvailabilityIssue> issues¶
-
RepresentationAvailability availability¶
-
struct RepresentationResourceAddedEvent¶
- #include <postproject.hpp>
-
struct ResolutionCandidate¶
- #include <postproject.hpp>
-
struct Resource¶
- #include <postproject.hpp>
-
struct ResourceAddedEvent¶
- #include <postproject.hpp>
-
struct ResourceResolution¶
- #include <postproject.hpp>
-
struct Revision¶
- #include <postproject.hpp>
-
struct RevisionContext¶
- #include <postproject.hpp>
-
struct RevisionEvent¶
- #include <postproject.hpp>
-
struct ToolIdentity¶
- #include <postproject.hpp>
-
class Transaction¶
- #include <postproject.hpp>
Public Functions
-
inline void setRevisionContext(const RevisionContext &context)¶
-
inline Uuid addSingleFileRepresentation(const Uuid &asset_id, RepresentationKind kind, std::string_view path)¶
-
inline Uuid addImageSequenceRepresentation(const Uuid &asset_id, RepresentationKind kind, const ImageSequenceInput &input)¶
-
inline Uuid addOrderedPartsRepresentation(const Uuid &asset_id, RepresentationKind kind, const std::vector<FileResourceInput> &members)¶
-
inline Uuid addPackageRepresentation(const Uuid &asset_id, RepresentationKind kind, const std::vector<FileResourceInput> &members)¶
-
inline void addExternalIdentifier(const ObjectRef &target, const ExternalIdentifier &identifier)¶
-
inline void removeExternalIdentifier(const ObjectRef &target, const ExternalIdentifier &identifier)¶
-
inline void addMetadataValue(const ObjectRef &target, std::string_view vocabulary, std::string_view property, const MetadataInput &input)¶
-
inline Uuid createActivity(const ActivitySpec &spec)¶
-
inline void commit()¶
-
inline void rollback()¶
-
Transaction(const Transaction&) = delete¶
-
Transaction &operator=(const Transaction&) = delete¶
-
inline Transaction(Transaction &&other) noexcept¶
-
inline Transaction &operator=(Transaction &&other) noexcept¶
-
inline ~Transaction()¶
-
inline explicit operator bool() const noexcept¶
Private Functions
-
inline explicit Transaction(pp_transaction_t *transaction) noexcept¶
-
inline Uuid add_file_collection_representation(const Uuid &asset_id, RepresentationKind kind, const std::vector<FileResourceInput> &members, bool package)¶
-
inline void mutate_external_identifier(bool remove, const ObjectRef &target, const ExternalIdentifier &identifier)¶
Private Members
-
pp_transaction_t *transaction_ = nullptr¶
Private Static Functions
-
static inline std::string checked_origin_name(const OriginIdentity &origin)¶
Friends
- friend class Production
-
inline void setRevisionContext(const RevisionContext &context)¶
-
class Uuid¶
- #include <postproject.hpp>
Public Types
-
using Bytes = std::array<std::uint8_t, 16>¶
Public Functions
-
using Bytes = std::array<std::uint8_t, 16>¶
-
namespace detail¶
Typedefs
-
using ErrorHandle = std::unique_ptr<pp_error_t, ErrorDeleter>¶
-
using AssetSetHandle = std::unique_ptr<pp_asset_set_t, AssetSetDeleter>¶
-
using MediaRootSetHandle = std::unique_ptr<pp_media_root_set_t, MediaRootSetDeleter>¶
-
using ResolutionSetHandle = std::unique_ptr<pp_resolution_set_t, ResolutionSetDeleter>¶
-
using RepresentationSetHandle = std::unique_ptr<pp_representation_set_t, RepresentationSetDeleter>¶
-
using ExternalIdentifierSetHandle = std::unique_ptr<pp_external_identifier_set_t, ExternalIdentifierSetDeleter>¶
-
using ObjectRefSetHandle = std::unique_ptr<pp_object_ref_set_t, ObjectRefSetDeleter>¶
-
using ActivitySetHandle = std::unique_ptr<pp_activity_set_t, ActivitySetDeleter>¶
-
using RevisionSetHandle = std::unique_ptr<pp_revision_set_t, RevisionSetDeleter>¶
-
using RevisionEventSetHandle = std::unique_ptr<pp_revision_event_set_t, RevisionEventSetDeleter>¶
-
using HostBindingHandle = std::unique_ptr<char, HostBindingDeleter>¶
Functions
-
inline void throw_if_error(pp_error_code_t status, pp_error_t *raw_error)¶
-
inline std::string checked_string(std::string_view value, std::string_view label)¶
-
inline std::optional<std::string> optional_string(const char *value)¶
-
inline std::optional<std::string> checked_optional_string(const std::optional<std::string> &value, std::string_view label)¶
-
inline Fingerprint representation_fingerprint(const pp_representation_set_t *representations, std::uint64_t representation_index, std::uint64_t fingerprint_index)¶
-
inline Fingerprint resource_fingerprint(const pp_representation_set_t *representations, std::uint64_t representation_index, std::uint64_t resource_index, std::uint64_t fingerprint_index)¶
-
inline Representation representation(const pp_representation_set_t *representations, std::uint64_t index)¶
-
inline std::string required_event_string(const char *value, std::string_view label)¶
-
inline RevisionEvent revision_event(const pp_revision_event_set_t *events, std::uint64_t index)¶
-
struct ActivitySetDeleter¶
- #include <postproject.hpp>
Public Functions
-
inline void operator()(pp_activity_set_t *activities) const noexcept¶
-
inline void operator()(pp_activity_set_t *activities) const noexcept¶
-
struct AssetSetDeleter¶
- #include <postproject.hpp>
Public Functions
-
inline void operator()(pp_asset_set_t *assets) const noexcept¶
-
inline void operator()(pp_asset_set_t *assets) const noexcept¶
-
struct ErrorDeleter¶
- #include <postproject.hpp>
Public Functions
-
inline void operator()(pp_error_t *error) const noexcept¶
-
inline void operator()(pp_error_t *error) const noexcept¶
-
struct ExternalIdentifierSetDeleter¶
- #include <postproject.hpp>
Public Functions
-
inline void operator()(pp_external_identifier_set_t *identifiers) const noexcept¶
-
inline void operator()(pp_external_identifier_set_t *identifiers) const noexcept¶
-
struct HostBindingDeleter¶
- #include <postproject.hpp>
Public Functions
-
inline void operator()(char *binding) const noexcept¶
-
inline void operator()(char *binding) const noexcept¶
-
struct MediaRootSetDeleter¶
- #include <postproject.hpp>
Public Functions
-
inline void operator()(pp_media_root_set_t *roots) const noexcept¶
-
inline void operator()(pp_media_root_set_t *roots) const noexcept¶
-
struct ObjectRefSetDeleter¶
- #include <postproject.hpp>
Public Functions
-
inline void operator()(pp_object_ref_set_t *objects) const noexcept¶
-
inline void operator()(pp_object_ref_set_t *objects) const noexcept¶
-
struct RepresentationSetDeleter¶
- #include <postproject.hpp>
Public Functions
-
inline void operator()(pp_representation_set_t *representations) const noexcept¶
-
inline void operator()(pp_representation_set_t *representations) const noexcept¶
-
struct ResolutionSetDeleter¶
- #include <postproject.hpp>
Public Functions
-
inline void operator()(pp_resolution_set_t *resolutions) const noexcept¶
-
inline void operator()(pp_resolution_set_t *resolutions) const noexcept¶
-
using ErrorHandle = std::unique_ptr<pp_error_t, ErrorDeleter>¶
-
using RevisionEventPayload = std::variant<AssetImportedEvent, RepresentationAddedEvent, ResourceAddedEvent, RepresentationResourceAddedEvent, LocatorAddedEvent, LocatorRetiredEvent, MediaRootAddedEvent, MediaRootEnabledChangedEvent, MediaRootRemovedEvent, ExternalIdentifierAddedEvent, ExternalIdentifierRemovedEvent, MetadataAddedOrReplacedEvent, MetadataRemovedEvent, ActivityCreatedEvent, ActivityInputAddedEvent, ActivityOutputAddedEvent>¶