Skip to content
Start free evaluation

pdcomm_gem300_capability_catalog_create

Function

Creates an empty capability catalog with revision 0.

PdcommStatus pdcomm_gem300_capability_catalog_create(const PdcommGem300CapabilityOptions *options, PdcommGem300CapabilityCatalog **out)

Declared in: #include <pdcomm_gem300.h>

The options are copied; the catalog never exposes pointers to its own storage.

Parameters

NameDescription
optionsCatalog limits. struct_size must be at least sizeof(PdcommGem300CapabilityOptions), version must be #PDCOMM_GEM300_CAPABILITY_OPTIONS_VERSION, and reserved must be 0.
outReceives the catalog. Set to NULL before validation, so it is NULL after every failure.

Returns

#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when out or options is NULL, struct_size is too small, or version or reserved is wrong; #PDCOMM_LIMIT_EXCEEDED when a limit is zero or max_capabilities_per_profile is greater than 4; #PDCOMM_LICENSE_REQUIRED when no license grants the gem300 module (checked after the options; no catalog is created); #PDCOMM_INTERNAL_ERROR when a panic was contained.

Notes

  • Ownership: release the catalog with pdcomm_gem300_capability_catalog_destroy().