class BufferCollectionInfo

Defined at line 7714 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.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 Members

static const fidl_type_t * FidlType

Public Methods

bool IsEmpty ()

Returns whether no field is set.

void BufferCollectionInfo ()
void BufferCollectionInfo (BufferCollectionInfo && other)
const ::fuchsia::sysmem2::SingleBufferSettings & settings ()

These settings apply to all the buffers in the initial buffer

allocation.

This field will always be set by sysmem.

Defined at line 7724 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_settings ()

Defined at line 7728 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

::fuchsia::sysmem2::SingleBufferSettings * mutable_settings ()

These settings apply to all the buffers in the initial buffer

allocation.

This field will always be set by sysmem.

Defined at line 7736 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_settings ()

Defined at line 7744 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

const ::std::vector< ::fuchsia::sysmem2::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.

Defined at line 7778 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_buffers ()

Defined at line 7782 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

::std::vector< ::fuchsia::sysmem2::VmoBuffer> * mutable_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.

Defined at line 7812 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_buffers ()

Defined at line 7820 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

const 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.

Defined at line 7841 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_buffer_collection_id ()

Defined at line 7845 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

uint64_t * mutable_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.

Defined at line 7862 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_buffer_collection_id ()

Defined at line 7870 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

BufferCollectionInfo & set_settings (::fuchsia::sysmem2::SingleBufferSettings _value)
BufferCollectionInfo & set_buffers (::std::vector< ::fuchsia::sysmem2::VmoBuffer> _value)
BufferCollectionInfo & set_buffer_collection_id (uint64_t _value)
void ~BufferCollectionInfo ()
BufferCollectionInfo & operator= (BufferCollectionInfo && other)
::std::unique_ptr<BufferCollectionInfo> New ()
void Encode (::fidl::Encoder * _encoder, size_t _offset, std::optional< ::fidl::HandleInformation> maybe_handle_info)
void Decode (::fidl::Decoder * _decoder, BufferCollectionInfo * _value, size_t _offset)
zx_status_t Clone (BufferCollectionInfo * _result)