class BufferCollectionInfo

Defined at line 9777 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

Information about a buffer collection and its buffers.

When adding fields to this table, see also

fuchsia.sysmem2/Allocator.GetVmoInfo, redacted_buffer_collection_info, and

RedactBufferCollectionInfo. Consider whether a client with only

ZX_RIGHT_TRANSFER right on a sysmem vmo handle, calling GetVmoInfo, should

be given the information in the new field, or whether it should be un-set

during redaction. GetVmoInfo is analogous to zx_object_get_info with topic

ZX_INFO_VMO, which doesn't require the VMO handle to have any rights - just

needs to be a handle to a VMO. Fields that are necessary to correctly use a

single sysmem VMO in isolation are generally ok (but still think about it

field by field). Fields that are not necessary to correctly use a single

sysmem VMO in isolation should probably be redacted for GetVmoInfo

redacted_buffer_collection_info.

Public Methods

void BufferCollectionInfo ()

Defined at line 9779 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

void BufferCollectionInfo (const BufferCollectionInfo & other)

Defined at line 9780 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

bool HasUnknownData ()

Returns whether the table references unknown fields.

void _CloseHandles ()
::fidl::WireTableBuilder< ::fuchsia_sysmem2::wire::BufferCollectionInfo> Builder (::fidl::AnyArena & arena)

Return a builder that by defaults allocates of an arena.

::fidl::WireTableExternalBuilder< ::fuchsia_sysmem2::wire::BufferCollectionInfo> ExternalBuilder (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_sysmem2::wire::BufferCollectionInfo>> frame)

Return a builder that relies on explicitly allocating |fidl::ObjectView|s.

uint64_t & buffer_collection_id ()

This number is unique among all logical buffer collections per boot.

This ID number will be the same for all BufferCollectionToken(s),

BufferCollection(s), and BufferCollectionTokenGroup(s) associated with

the same logical buffer collection (derived from the same root token

created with fuchsia.sysmem2.Allocator.CreateSharedCollection, or with

CreateNonSharedCollection).

The same ID can be retrieved from a BufferCollectionToken,

BufferCollection, or BufferCollectionTokenGroup using

GetBufferCollectionId (at the cost of a round-trip to sysmem and back).

This field will always be set by sysmem.

bool has_buffer_collection_id ()
BufferCollectionInfo & operator= (const BufferCollectionInfo & other)

Defined at line 9781 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

void BufferCollectionInfo (BufferCollectionInfo && other)

Defined at line 9782 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

bool IsEmpty ()

Returns whether no field is set.

BufferCollectionInfo & operator= (BufferCollectionInfo && other)

Defined at line 9783 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

::fuchsia_sysmem2::wire::SingleBufferSettings & settings ()

These settings apply to all the buffers in the initial buffer

allocation.

This field will always be set by sysmem.

bool has_settings ()
::fidl::VectorView< ::fuchsia_sysmem2::wire::VmoBuffer> & buffers ()

VMO handles (and vmo_usable_start offset) for each buffer in the

collection.

The size of this vector is the buffer_count (buffer_count is not sent

separately).

All buffer VMO handles have identical size and access rights. The size

is in settings.buffer_settings.size_bytes.

The VMO access rights are determined based on the usages which the

client specified when allocating the buffer collection. For example, a

client which expressed a read-only usage will receive VMOs without write

rights. In addition, the rights can be attenuated by the parameter to

BufferCollectionToken.Duplicate() calls.

This field will always have VmoBuffer(s) in it, even if the participant

specifies usage whieh does not require VMO handles. This permits such a

participant to know the vmo_usable_start values, in case that's of any

use to the participant.

This field will always be set by sysmem, even if the participant doesn't

specify any buffer usage (but the [`fuchsia.sysmem2/VmoBuffer.vmo`]

sub-field within this field won't be set in that case).

In the response from `[fuchsia.sysmem2/Allocator.GetVmoInfo]`, in the

redacted_buffer_collection_info, this field is un-set.

bool has_buffers ()
BufferCollectionInfo & set_settings (::fidl::ObjectView< ::fuchsia_sysmem2::wire::SingleBufferSettings> elem)
BufferCollectionInfo & set_settings (std::nullptr_t )
BufferCollectionInfo & clear_settings ()
BufferCollectionInfo & set_buffers (::fidl::ObjectView< ::fidl::VectorView< ::fuchsia_sysmem2::wire::VmoBuffer>> elem)
BufferCollectionInfo & set_buffers (std::nullptr_t )
BufferCollectionInfo & clear_buffers ()
BufferCollectionInfo & set_buffer_collection_id (::fidl::ObjectView<uint64_t> elem)
BufferCollectionInfo & set_buffer_collection_id (std::nullptr_t )
BufferCollectionInfo & clear_buffer_collection_id ()
void BufferCollectionInfo (::fidl::AnyArena & allocator)
void BufferCollectionInfo (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_sysmem2::wire::BufferCollectionInfo>> && frame)

This constructor allows a user controlled allocation (not using a Arena).

It should only be used when performance is key.

As soon as the frame is given to the table, it must not be used directly or for another table.

void Allocate (::fidl::AnyArena & allocator)
void Init (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_sysmem2::wire::BufferCollectionInfo>> && frame_ptr)
void ~BufferCollectionInfo ()

Defined at line 9785 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

Friends

class WireTableBaseBuilder
class WireTableBaseBuilder