class ValidateBufferCollectionToken
Defined at line 176 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/markers.h
Checks whether a [`fuchsia.sysmem2/BufferCollectionToken`] is known to
the sysmem server.
With this call, the client can determine whether an incoming token is a
real sysmem token that is known to the sysmem server, without any risk
of getting stuck waiting forever on a potentially fake token to complete
[`fuchsia.sysmem2/BufferCollectionToken.DuplicateSync`] or
[`fuchsia.sysmem2/BufferCollectionToken.Sync`] (or any other two-way
FIDL message). In cases where the client trusts the source of the token
to provide a real token, this call is not typically needed outside of
debugging.
If the validate fails sometimes but succeeds other times, the source of
the token may itself not be calling
[`fuchsia.sysmem2/BufferCollectionToken.Sync`] or
[`fuchsia.sysmem2/BufferCollection.Sync`] after creating/duplicating the
token but before sending the token to the current client. It may be more
convenient for the source to use
[`fuchsia.sysmem2/BufferCollectionToken.DuplicateSync`] to duplicate
token(s), since that call has the sync step built in. Or, the buffer
collection may be failing before this call is processed by the sysmem
server, as buffer collection failure cleans up sysmem's tracking of
associated tokens.
This call has no effect on any token.
+ request `token_server_koid` The koid of the server end of a channel
that might be a BufferCollectionToken channel. This can be obtained
via `zx_object_get_info` `ZX_INFO_HANDLE_BASIC` `related_koid`.
- response `is_known` true means sysmem knew of the token at the time
sysmem processed the request, but doesn't guarantee that the token is
still valid by the time the client receives the reply. What it does
guarantee is that the token at least was a real token, so a two-way
call to the token won't stall forever (will fail or succeed fairly
quickly, not stall). This can already be known implicitly if the
source of the token can be trusted to provide a real token. A false
value means the token wasn't known to sysmem at the time sysmem
processed this call, but the token may have previously been valid, or
may yet become valid. Or if the sender of the token isn't trusted to
provide a real token, the token may be fake. It's the responsibility
of the sender to sync with sysmem to ensure that previously
created/duplicated token(s) are known to sysmem, before sending the
token(s) to other participants.
Public Members
static const bool kHasClientToServer
static const bool kHasClientToServerBody
static const bool kHasServerToClient
static const bool kHasServerToClientBody
static const bool kHasNonEmptyUserFacingResponse
static const bool kHasDomainError
static const bool kHasFrameworkError
static const uint64_t kOrdinal