fuchsia.component.sandbox

Added: 20

PROTOCOLS

Dictionary

Defined in fuchsia.component.sandbox/sandbox.fidl

Added: 20

Clone

Creates a new connection to the same underlying dictionary.

Use Copy to a new dictionary with clones of all the exiting entries.

Added: HEAD

Request

<EMPTY>

Response

NameType
payload Dictionary_Clone_Result

Copy

Create a new dictionary that contains a clone of all the entries in this dictionary.

For example, if this dictionary contains nested dictionaries, the newly created dictionary will contain references to those same nested dictionaries because the entries are cloned rather than copied.

Added: HEAD

Request

<EMPTY>

Response

NameType
payload Dictionary_Copy_Result

Drain

Removes all the entries in this dictionary.

If contents is not provided, all the items are discarded without enumerating them.

Added: HEAD

Request

NameType
iterator server_end<DictionaryItemIterator>?

Enumerate

Enumerates the items in this dictionary.

Creates a clone of each item during enumeration.

Added: HEAD

Request

NameType
iterator server_end<DictionaryItemIterator>

Get

Get a clone of a capability from this dictionary.

  • error DictionaryError.NOT_FOUND if the dictionary does not contain the key.
Added: HEAD

Request

NameType
key DictionaryKey

Response

NameType
payload Dictionary_Get_Result

Insert

Inserts a key-value pair into the dictionary.

  • error DictionaryError.ALREADY_EXISTS if the dictionary already contains an item with the same key.
Added: HEAD

Request

NameType
key DictionaryKey
value Capability

Response

NameType
payload Dictionary_Insert_Result

Keys

Enumerates the keys in this dictionary.

Added: HEAD

Request

NameType
iterator server_end<DictionaryKeyIterator>

Remove

Removes a key from the dictionary, returning the Capability value.

  • error DictionaryError.NOT_FOUND if the dictionary does not contain the key.
Added: HEAD

Request

NameType
key DictionaryKey

Response

NameType
payload Dictionary_Remove_Result

DictionaryItemIterator

Defined in fuchsia.component.sandbox/sandbox.fidl

Added: HEAD

GetNext

Request

<EMPTY>

Response

NameType
payload DictionaryItemIterator_GetNext_Result

DictionaryKeyIterator

Defined in fuchsia.component.sandbox/sandbox.fidl

Added: HEAD

GetNext

Request

<EMPTY>

Response

NameType
payload DictionaryKeyIterator_GetNext_Result

Factory

Defined in fuchsia.component.sandbox/sandbox.fidl

The Factory protocol handles:

  • Instantiation of sandbox types.
  • Controlling sandbox objects given tokens.
Added: HEAD

CreateConnector

Creates a Connector from a client served Receiver.

Request

NameType
receiver Receiver

Response

NameType
payload Factory_CreateConnector_Result

CreateDictionary

Creates a new empty Dictionary.

Request

<EMPTY>

Response

NameType
payload Factory_CreateDictionary_Result

CreateOneShotHandle

Creates a OneShotHandle from the provided handle.

Request

NameType
handle handle<handle>

Response

NameType
payload Factory_CreateOneShotHandle_Result

OpenConnector

Open a connection from the provided [Connector] capability.

If there is an error, it will be reported as a zx.Status epitaph on server_end. Errors:

  • INVALID_ARGS: capability is not a recognized [Connector].

Request

NameType
capability Connector
server_end handle<channel>

TakeHandle

Extract the handle owned by the underlying capability, if it wasn't taken already.

Errors:

  • INVALID_ARGS: capability does not contain a recognized [OneShotHandle] token.
  • UNAVAILABLE: The underlying handle was already taken.h

Request

NameType
capability OneShotHandle

Response

NameType
payload Factory_TakeHandle_Result

Receiver

Defined in fuchsia.component.sandbox/sandbox.fidl

A receiver is served by clients and allows them to receive channels from the framework.

Added: HEAD

Receive

Sends a channel to this receiver.

Request

NameType
channel handle<channel>

Router

Defined in fuchsia.component.sandbox/sandbox.fidl

A router allows a client to request a capability.

Added: HEAD

Route

Request

NameType
payload RouteRequest

Response

NameType
payload Router_Route_Result

STRUCTS

ComponentToken resource

Defined in fuchsia.component.sandbox/sandbox.fidl

This represents a component within the framework.

Added: HEAD

FieldTypeDescriptionDefault
token Token No default

Connector resource

Defined in fuchsia.component.sandbox/sandbox.fidl

Added: HEAD

FieldTypeDescriptionDefault
token Token No default

DictionaryItem resource

Defined in fuchsia.component.sandbox/sandbox.fidl

A key-value pair in a Dictionary.

Added: HEAD

FieldTypeDescriptionDefault
key DictionaryKey No default
value Capability No default

DictionaryItemIterator_GetNext_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
items vector<DictionaryItem>[128] No default

DictionaryKeyIterator_GetNext_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
keys vector<string>[128] No default

Dictionary_Clone_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
dictionary Dictionary No default

Dictionary_Copy_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
dictionary Dictionary No default

Dictionary_Get_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
capability Capability No default

Dictionary_Insert_Response

Defined in fuchsia.component.sandbox/sandbox.fidl

<EMPTY>

Dictionary_Remove_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
capability Capability No default

Factory_CreateConnector_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
capability Connector No default

Factory_CreateDictionary_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
dictionary Dictionary No default

Factory_CreateOneShotHandle_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
capability OneShotHandle No default

Factory_TakeHandle_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
handle handle<handle> No default

OneShotHandle resource

Defined in fuchsia.component.sandbox/sandbox.fidl

Added: HEAD

FieldTypeDescriptionDefault
token Token No default

ProtocolPayload resource

Defined in fuchsia.component.sandbox/sandbox.fidl

Contains a protocol open request.

Added: HEAD

FieldTypeDescriptionDefault
channel handle<channel> No default

Router_Route_Response resource

Defined in fuchsia.component.sandbox/sandbox.fidl

FieldTypeDescriptionDefault
capability Capability No default

Unit

Defined in fuchsia.component.sandbox/sandbox.fidl

<EMPTY>

ENUMS

Availability strict

Type: uint32

Defined in fuchsia.component.sandbox/availability.fidl

Describes the expected availability of the capability.

Some capabilities may not be present on all system configurations. In those cases, the availability will be declared as OPTIONAL along the chains of exposes/offers/uses, and the capability would be routed from void on system configurations where it does not make sense to route or provide a particular capability (e.g. graphical capabilities on a headless system).

Added: HEAD

NameValueDescription
1

The capability must be available. Failure to route the capability is an error.

2

Inside a use declaration: the component can function if it fails to obtain the capability.

Inside an offer/expose declaration: the capability may not be available in some system configurations. As a corollary, the target component must not have a required dependency on the capability.

3

If the target of the corresponding offer or expose declaration requires the capability, then the behavior is equivalent to required. If the target has an optional dependency on the capability, then the behavior is equivalent to optional. This is useful for container components that would like to change their routing availability based on ones inside.

This value is not allowed inside a use declaration.

4

The source may omit the route completely without even having to route from void.

TRANSITIONAL is used for soft transitions that introduce new capabilities.

DictionaryError flexible

Type: uint32

Defined in fuchsia.component.sandbox/sandbox.fidl

Error returned from methods in Dictionary.

Added: HEAD

NameValueDescription
1

The Dictionary does not contain an item with the given key.

2

The Dictionary already contains an item with the given key.

3

The Capability is invalid.

Capabilities must be created by sandbox, via fuchsia.component.sandbox.Factory or returned from other Component Framework APIs.

4

The key is invalid. The constraints for valid keys are documented at https://fuchsia.dev/reference/cml#names.

FactoryError flexible

Type: uint32

Defined in fuchsia.component.sandbox/sandbox.fidl

Added: HEAD

NameValueDescription
1

An invalid argument was passed.

2

The requested resource was unavailable.

RouterError flexible

Type: uint32

Defined in fuchsia.component.sandbox/sandbox.fidl

Added: HEAD

NameValueDescription
1

The router failed to find the capability.

2

The arguments provided to the function are invalid.

TABLES

RouteRequest resource

Defined in fuchsia.component.sandbox/sandbox.fidl

A request for a route.

Added: HEAD

OrdinalFieldTypeDescription
availability Availability

The requested availability for this capability.

requesting ComponentToken

The component that is requesting the capability.

UNIONS

Capability flexible resource

Defined in fuchsia.component.sandbox/sandbox.fidl

Added: HEAD
OrdinalVariantTypeDescription
unit Unit
handle OneShotHandle
data Data
dictionary Dictionary
connector Connector
directory fuchsia.io/Directory
router Router

Data flexible

Defined in fuchsia.component.sandbox/sandbox.fidl

Added: HEAD
OrdinalVariantTypeDescription
bytes vector<uint8>[8192]
string string[8192]
int64 int64
uint64 uint64

DictionaryItemIterator_GetNext_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response DictionaryItemIterator_GetNext_Response
framework_err internal

DictionaryKeyIterator_GetNext_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response DictionaryKeyIterator_GetNext_Response
framework_err internal

Dictionary_Clone_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response Dictionary_Clone_Response
framework_err internal

Dictionary_Copy_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response Dictionary_Copy_Response
framework_err internal

Dictionary_Get_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response Dictionary_Get_Response
err DictionaryError
framework_err internal

Dictionary_Insert_Result strict

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response Dictionary_Insert_Response
err DictionaryError
framework_err internal

Dictionary_Remove_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response Dictionary_Remove_Response
err DictionaryError
framework_err internal

Factory_CreateConnector_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response Factory_CreateConnector_Response
framework_err internal

Factory_CreateDictionary_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response Factory_CreateDictionary_Response
framework_err internal

Factory_CreateOneShotHandle_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response Factory_CreateOneShotHandle_Response
framework_err internal

Factory_TakeHandle_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response Factory_TakeHandle_Response
err FactoryError
framework_err internal

Router_Route_Result strict resource

Defined in fuchsia.component.sandbox/sandbox.fidl

OrdinalVariantTypeDescription
response Router_Route_Response
err RouterError
framework_err internal

CONSTANTS

NameValueTypeDescription
MAX_DATA_LENGTH 8192 uint32

Maximum number of bytes in a [Data].

MAX_DICTIONARY_ITEMS_CHUNK 128 uint32

Maximum number of items returned by [DictionaryItemIterator].

MAX_DICTIONARY_KEYS_CHUNK 128 uint32

Maximum number of items returned by [DictionaryKeyIterator].

MAX_NAME_LENGTH fuchsia.io/MAX_NAME_LENGTH uint64

The maximum length of a dictionary key. This should coincide with fuchsia.component.MAX_NAME_LENGTH.

Added: HEAD

ALIASES

NameValueDescription
DictionaryKey string[MAX_NAME_LENGTH]

The key of a DictionaryItem. The constraints for valid keys are documented at https://fuchsia.dev/reference/cml#names.

Added: HEAD
Token zx/Handle

A token represents a bedrock object. Tokens are reference counted, dropping all counts of the token removes the object.