fuchsia.component.runtime

Added: HEAD

PROTOCOLS

Capabilities

Defined in fuchsia.component.runtime/capabilities.fidl

An API for creating and manipulating references to runtime capabilities in the component framework. These capabilities are all reference counted by component manager, and when accessed with this protocol the references are implemented as event pair handles.

Added: HEAD

CapabilityAssociateHandle

Associates other_handle with the same capability referenced by capability_handle.

Typically if one already has capability_handle the handle can be duplicated to make a new handle that references the same object, but this doesn't work when someone else has provided a handle that should be associated with an existing object.

Request

NameType
capability_handle handle<eventpair>
other_handle handle<eventpair>

Response

NameType
payload Capabilities_CapabilityAssociateHandle_Result

ConnectorCreate

Creates a reference to a new connector capability. When the connector is opened, the channel given to the open call will be sent over receiver_client_end.

Make sure this method returns before passing the handle's peer to other methods in this API. The creation may not be complete before then.

Request

NameType
connector handle<eventpair>
receiver_client_end client_end:Receiver

Response

NameType
payload Capabilities_ConnectorCreate_Result

ConnectorOpen

Uses the provided connector to open a new connection by delivering this channel to whoever created the connector.

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

If the connector event pair handle is not correlated with a handle given to ConnectorCreate, this connection will be closed.

Request

NameType
connector handle<eventpair>
channel handle<channel>

Response

NameType
payload Capabilities_ConnectorOpen_Result

ConnectorRouterCreate

Creates a reference to a new router capability that will return a connector capability when used.

Make sure this method returns before passing the handle's peer to other methods in this API. The creation may not be complete before then.

Request

NameType
router handle<eventpair>
router_client_end client_end:ConnectorRouter

Response

NameType
payload Capabilities_ConnectorRouterCreate_Result

ConnectorRouterRoute

Attempts to produce a Connector capability from this ConnectorRouter.

request contains context for this route, and instance_token references the component that the routing operation is being performed for.

This will return:

  • SUCCESS if connector has been associated with a connector.
  • UNAVAILABLE if the capability is unavailable, in which case connector will be closed.
  • An error, if the operation failed.

Request

NameType
router handle<eventpair>
request RouteRequest
instance_token handle<eventpair>
connector handle<eventpair>

Response

NameType
payload Capabilities_ConnectorRouterRoute_Result

DataCreate

Creates a reference to a new data capability with the given value.

Make sure this method returns before passing the handle's peer to other methods in this API. The creation may not be complete before then.

Request

NameType
data_handle handle<eventpair>
data Data

Response

NameType
payload Capabilities_DataCreate_Result

DataGet

Returns the Data value that was provided to the DataCreate call used with data_handle.

Request

NameType
data_handle handle<eventpair>

Response

NameType
payload Capabilities_DataGet_Result

DataRouterCreate

Creates a reference to a new router capability that will return a data value when used.

Make sure this method returns before passing the handle's peer to other methods in this API. The creation may not be complete before then.

Request

NameType
router handle<eventpair>
router_client_end client_end:DataRouter

Response

NameType
payload Capabilities_DataRouterCreate_Result

DataRouterRoute

Attempts to produce a Data capability from this DataRouter.

request contains context for this route, and instance_token references the component that the routing operation is being performed for.

This will return:

  • SUCCESS if data has been associated with a connector.
  • UNAVAILABLE if the capability is unavailable, in which case data will be closed.
  • An error, if the operation failed.

Request

NameType
router handle<eventpair>
request RouteRequest
instance_token handle<eventpair>
data handle<eventpair>

Response

NameType
payload Capabilities_DataRouterRoute_Result

DictionaryCreate

Creates a reference to a new dictionary capability.

Make sure this method returns before passing the handle's peer to other methods in this API. The creation may not be complete before then.

Request

NameType
dictionary handle<eventpair>

Response

NameType
payload Capabilities_DictionaryCreate_Result

DictionaryGet

Creates a new reference to the capability named key in this dictionary, if that capability exists. That capability will remain in the dictionary. To take a capability out of the dictionary, use DictionaryRemove.

If key does not exist, value will not reference any capability and the NO_SUCH_CAPABILITY error value will be returned.

Make sure this method returns before passing the handle's peer to other methods in this API. The creation may not be complete before then.

Request

NameType
dictionary handle<eventpair>
key fuchsia.component.decl/name
value handle<eventpair>

Response

NameType
payload Capabilities_DictionaryGet_Result

DictionaryInsert

Inserts a new capability into this Dictionary under the name key. Overwrites any existing entry.

Request

NameType
dictionary handle<eventpair>
key fuchsia.component.decl/name
value handle<eventpair>

Response

NameType
payload Capabilities_DictionaryInsert_Result

DictionaryIterateKeys

Opens an iterator which can be used to iterate over the keys of this dictionary.

Request

NameType
dictionary handle<eventpair>
key_iterator server_end:DictionaryKeyIterator

Response

NameType
payload Capabilities_DictionaryIterateKeys_Result

DictionaryRemove

Removes the capability named key from this dictionary and returns a reference to it, if that capability exists.

dictionary and key are required. capability is optional, and when set will become associated with the capability that was removed from the dictionary.

If key does not exist, value will not reference any capability and the NO_SUCH_CAPABILITY error value will be returned.

Make sure this method returns before passing the peer of capability to other methods in this API. The creation may not be complete before then.

Request

NameType
payload CapabilitiesDictionaryRemoveRequest

Response

NameType
payload Capabilities_DictionaryRemove_Result

DictionaryRouterCreate

Creates a reference to a new router capability that will return a dictionary capability when used.

Make sure this method returns before passing the handle's peer to other methods in this API. The creation may not be complete before then.

Request

NameType
router handle<eventpair>
router_client_end client_end:DictionaryRouter

Response

NameType
payload Capabilities_DictionaryRouterCreate_Result

DictionaryRouterRoute

Attempts to produce a Dictionary capability from this DictionaryRouter.

request contains context for this route, and instance_token references the component that the routing operation is being performed for.

This will return:

  • SUCCESS if dictionary has been associated with a connector.
  • UNAVAILABLE if the capability is unavailable, in which case dictionary will be closed.
  • An error, if the operation failed.

Request

NameType
router handle<eventpair>
request RouteRequest
instance_token handle<eventpair>
dictionary handle<eventpair>

Response

NameType
payload Capabilities_DictionaryRouterRoute_Result

DirConnectorCreate

Creates a reference to a new directory connector capability. When the directory connector is opened, the channel given to the open call will be sent over receiver_client_end.

Make sure this method returns before passing the handle's peer to other methods in this API. The creation may not be complete before then.

Request

NameType
dir_connector handle<eventpair>
receiver_client_end client_end:DirReceiver

Response

NameType
payload Capabilities_DirConnectorCreate_Result

DirConnectorOpen

Uses the provided dir_connector to open a new directory connection by delivering this channel to whoever created the directory connector.

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

If the dir_connector event pair handle is not correlated with a handle given to DirConnectorCreate, this connection will be closed.

dir_connector and channel are both required. flags and path may be omitted.

Request

NameType
payload CapabilitiesDirConnectorOpenRequest

Response

NameType
payload Capabilities_DirConnectorOpen_Result

DirConnectorRouterCreate

Creates a reference to a new router capability that will return a directory connector capability when used.

Make sure this method returns before passing the handle's peer to other methods in this API. The creation may not be complete before then.

Request

NameType
router handle<eventpair>
router_client_end client_end:DirConnectorRouter

Response

NameType
payload Capabilities_DirConnectorRouterCreate_Result

DirConnectorRouterRoute

Attempts to produce a DirConnector capability from this DirConnectorRouter.

request contains context for this route, and instance_token references the component that the routing operation is being performed for.

This will return:

  • SUCCESS if dir_connector has been associated with a connector.
  • UNAVAILABLE if the capability is unavailable, in which case dir_connector will be closed.
  • An error, if the operation failed.

Request

NameType
router handle<eventpair>
request RouteRequest
instance_token handle<eventpair>
dir_connector handle<eventpair>

Response

NameType
payload Capabilities_DirConnectorRouterRoute_Result

InstanceTokenCreate

Creates a new instance token, which is an opaque identifier associated with a specific component. This instance token will be associated with the component this connection is opened from.

Make sure this method returns before passing the handle's peer to other methods in this API. The creation may not be complete before then.

Request

NameType
instance_token handle<eventpair>

Response

NameType
payload Capabilities_InstanceTokenCreate_Result

ConnectorRouter

Defined in fuchsia.component.runtime/capabilities.fidl

A factory for Connector capabilities.

Added: HEAD

Route

Attempts to produce a Connector capability from this ConnectorRouter.

request contains context for this route, and instance_token references the component that the routing operation is being performed for.

This will return:

  • SUCCESS if handle has been associated with a connector.
  • UNAVAILABLE if the capability is unavailable, in which case handle will be closed.
  • An error, if the operation failed.

Request

NameType
request RouteRequest
instance_token handle<eventpair>
handle handle<eventpair>

Response

NameType
payload ConnectorRouter_Route_Result

DataRouter

Defined in fuchsia.component.runtime/capabilities.fidl

A factory for Data capabilities.

Added: HEAD

Route

Attempts to produce a Data capability from this DataRouter.

request contains context for this route, and instance_token references the component that the routing operation is being performed for.

This will return:

  • SUCCESS if handle has been associated with a connector.
  • UNAVAILABLE if the capability is unavailable, in which case handle will be closed.
  • An error, if the operation failed.

Request

NameType
request RouteRequest
instance_token handle<eventpair>
handle handle<eventpair>

Response

NameType
payload DataRouter_Route_Result

DictionaryKeyIterator

Defined in fuchsia.component.runtime/capabilities.fidl

Added: HEAD

GetNext

Returns the next set of keys in this dictionary. Returns an empty vector when there are no more keys to iterate.

Request

<EMPTY>

Response

NameType
keys vector<fuchsia.component.decl/name>

DictionaryRouter

Defined in fuchsia.component.runtime/capabilities.fidl

A factory for Dictionary capabilities.

Added: HEAD

Route

Attempts to produce a Dictionary capability from this DictionaryRouter.

request contains context for this route, and instance_token references the component that the routing operation is being performed for.

This will return:

  • SUCCESS if handle has been associated with a connector.
  • UNAVAILABLE if the capability is unavailable, in which case handle will be closed.
  • An error, if the operation failed.

Request

NameType
request RouteRequest
instance_token handle<eventpair>
handle handle<eventpair>

Response

NameType
payload DictionaryRouter_Route_Result

DirConnectorRouter

Defined in fuchsia.component.runtime/capabilities.fidl

A factory for DirConnector capabilities.

Added: HEAD

Route

Attempts to produce a DirConnector capability from this DirConnectorRouter.

request contains context for this route, and instance_token references the component that the routing operation is being performed for.

This will return:

  • SUCCESS if handle has been associated with a connector.
  • UNAVAILABLE if the capability is unavailable, in which case handle will be closed.
  • An error, if the operation failed.

Request

NameType
request RouteRequest
instance_token handle<eventpair>
handle handle<eventpair>

Response

NameType
payload DirConnectorRouter_Route_Result

DirReceiver

Defined in fuchsia.component.runtime/capabilities.fidl

A DirReceiver represents the receiving end of a DirConnector.

Added: HEAD

Receive

Receive will be called by component manager whenever a new handle has been given to any DirConnector associated with this DirReceiver.

Request

NameType
channel server_end:fuchsia.io/Directory
path fuchsia.io/Path
rights fuchsia.io/Flags

Receiver

Defined in fuchsia.component.runtime/capabilities.fidl

A Receiver represents the receiving end of a Connector.

Added: HEAD

Receive

Receive will be called by component manager whenever an new handle has been given to any Connector associated with this Receiver.

Request

NameType
channel handle<channel>

STRUCTS

Capabilities_CapabilityAssociateHandle_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_ConnectorCreate_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_ConnectorOpen_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_ConnectorRouterCreate_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_ConnectorRouterRoute_Response

Defined in fuchsia.component.runtime/capabilities.fidl

FieldTypeDescriptionDefault
response RouterResponse No default

Capabilities_DataCreate_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_DataRouterCreate_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_DataRouterRoute_Response

Defined in fuchsia.component.runtime/capabilities.fidl

FieldTypeDescriptionDefault
response RouterResponse No default

Capabilities_DictionaryCreate_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_DictionaryGet_Response resource

Defined in fuchsia.component.runtime/capabilities.fidl

FieldTypeDescriptionDefault
capability_type CapabilityType No default

Capabilities_DictionaryInsert_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_DictionaryIterateKeys_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_DictionaryRemove_Response resource

Defined in fuchsia.component.runtime/capabilities.fidl

FieldTypeDescriptionDefault
capability_type CapabilityType No default

Capabilities_DictionaryRouterCreate_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_DictionaryRouterRoute_Response

Defined in fuchsia.component.runtime/capabilities.fidl

FieldTypeDescriptionDefault
response RouterResponse No default

Capabilities_DirConnectorCreate_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_DirConnectorOpen_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_DirConnectorRouterCreate_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

Capabilities_DirConnectorRouterRoute_Response

Defined in fuchsia.component.runtime/capabilities.fidl

FieldTypeDescriptionDefault
response RouterResponse No default

Capabilities_InstanceTokenCreate_Response

Defined in fuchsia.component.runtime/capabilities.fidl

<EMPTY>

ConnectorRouter_Route_Response

Defined in fuchsia.component.runtime/capabilities.fidl

FieldTypeDescriptionDefault
response RouterResponse No default

DataRouter_Route_Response

Defined in fuchsia.component.runtime/capabilities.fidl

FieldTypeDescriptionDefault
response RouterResponse No default

DictionaryRouter_Route_Response

Defined in fuchsia.component.runtime/capabilities.fidl

FieldTypeDescriptionDefault
response RouterResponse No default

DirConnectorRouter_Route_Response

Defined in fuchsia.component.runtime/capabilities.fidl

FieldTypeDescriptionDefault
response RouterResponse No default

ENUMS

CapabilitiesError flexible

Type: uint32

Defined in fuchsia.component.runtime/capabilities.fidl

Added: HEAD

NameValueDescription
1
2
3
4
5
6
7
8
9

CapabilityType flexible

Type: uint32

Defined in fuchsia.component.runtime/capabilities.fidl

Added: HEAD

NameValueDescription
1
2
3
4
5
6
7
8
9

RouterError flexible

Type: uint32

Defined in fuchsia.component.runtime/capabilities.fidl

The error values returned when a route operation fails.

Added: HEAD

NameValueDescription
1

The router failed to find the capability.

2

The arguments provided to the function are invalid.

3

The operation is not supported.

4

An internal error occurred.

5

An unknown error occurred.

RouterResponse flexible

Type: uint32

Defined in fuchsia.component.runtime/capabilities.fidl

The error values returned when a route operation succeeds.

Added: HEAD

NameValueDescription
1

The server end has been connected to a valid object.

2

The capability was marked as unavailable.

TABLES

CapabilitiesDictionaryRemoveRequest resource

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalFieldTypeDescription
dictionary handle<eventpair>
key fuchsia.component.decl/name
value handle<eventpair>

CapabilitiesDirConnectorOpenRequest resource

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalFieldTypeDescription
dir_connector handle<eventpair>
channel server_end:fuchsia.io/Directory
flags fuchsia.io/Flags
path fuchsia.io/Path

RouteRequest resource

Defined in fuchsia.component.runtime/capabilities.fidl

Contains metadata on how to route a capability, and a token representing the component that started the route.

metadata is a dictionary, which contains data capabilities used by component manager to track things like the type of the route (e.g. protocol, storage, runner, ...), the rights on a directory route, and the scope on an event stream route. Generally an empty dictionary is safe to pass to component manager.

Either both fields must be set, or neither.

Added: HEAD

OrdinalFieldTypeDescription
metadata handle<eventpair>

UNIONS

Capabilities_CapabilityAssociateHandle_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_CapabilityAssociateHandle_Response
err CapabilitiesError
framework_err internal

Capabilities_ConnectorCreate_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_ConnectorCreate_Response
err CapabilitiesError
framework_err internal

Capabilities_ConnectorOpen_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_ConnectorOpen_Response
err CapabilitiesError
framework_err internal

Capabilities_ConnectorRouterCreate_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_ConnectorRouterCreate_Response
err CapabilitiesError
framework_err internal

Capabilities_ConnectorRouterRoute_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_ConnectorRouterRoute_Response
err zx/Status
framework_err internal

Capabilities_DataCreate_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DataCreate_Response
err CapabilitiesError
framework_err internal

Capabilities_DataGet_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Data
err CapabilitiesError
framework_err internal

Capabilities_DataRouterCreate_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DataRouterCreate_Response
err CapabilitiesError
framework_err internal

Capabilities_DataRouterRoute_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DataRouterRoute_Response
err zx/Status
framework_err internal

Capabilities_DictionaryCreate_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DictionaryCreate_Response
err CapabilitiesError
framework_err internal

Capabilities_DictionaryGet_Result strict resource

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DictionaryGet_Response
err CapabilitiesError
framework_err internal

Capabilities_DictionaryInsert_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DictionaryInsert_Response
err CapabilitiesError
framework_err internal

Capabilities_DictionaryIterateKeys_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DictionaryIterateKeys_Response
err CapabilitiesError
framework_err internal

Capabilities_DictionaryRemove_Result strict resource

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DictionaryRemove_Response
err CapabilitiesError
framework_err internal

Capabilities_DictionaryRouterCreate_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DictionaryRouterCreate_Response
err CapabilitiesError
framework_err internal

Capabilities_DictionaryRouterRoute_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DictionaryRouterRoute_Response
err zx/Status
framework_err internal

Capabilities_DirConnectorCreate_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DirConnectorCreate_Response
err CapabilitiesError
framework_err internal

Capabilities_DirConnectorOpen_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DirConnectorOpen_Response
err CapabilitiesError
framework_err internal

Capabilities_DirConnectorRouterCreate_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DirConnectorRouterCreate_Response
err CapabilitiesError
framework_err internal

Capabilities_DirConnectorRouterRoute_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_DirConnectorRouterRoute_Response
err zx/Status
framework_err internal

Capabilities_InstanceTokenCreate_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response Capabilities_InstanceTokenCreate_Response
err CapabilitiesError
framework_err internal

ConnectorRouter_Route_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response ConnectorRouter_Route_Response
err zx/Status
framework_err internal

Data flexible

Defined in fuchsia.component.runtime/capabilities.fidl

Static data which may be put in a dictionary or returned by a router. This is useful for setting values in the metadata of a RouteRequest.

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

DataRouter_Route_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response DataRouter_Route_Response
err zx/Status
framework_err internal

DictionaryRouter_Route_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response DictionaryRouter_Route_Response
err zx/Status
framework_err internal

DirConnectorRouter_Route_Result strict

Defined in fuchsia.component.runtime/capabilities.fidl

OrdinalVariantTypeDescription
response DirConnectorRouter_Route_Response
err zx/Status
framework_err internal

CONSTANTS

NameValueTypeDescription
MAX_DATA_LENGTH 8192 uint32
Added: HEAD