fuchsia.component.decl

Added: 7

STRUCTS

CapabilityRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to a capability declared in this component.

FieldTypeDescriptionDefault
name string[100] No default

ChildRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to one of the component's child instances.

FieldTypeDescriptionDefault
name child_name

The name assigned to the child by its parent. If collection is set, name is scoped to collection and the child is a dynamic instance. Required.

No default
collection name

The collection name belongs to. If omitted, name references a static instance. This field must be omitted if the ChildRef is being used in a component declaration. Optional.

No default

CollectionRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to one of the component's collections.

FieldTypeDescriptionDefault
name name No default

ConfigType

Defined in fuchsia.component.decl/config.fidl

FieldTypeDescriptionDefault
layout ConfigTypeLayout No default
parameters vector<LayoutParameter>? No default
constraints vector<LayoutConstraint> No default

DebugRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to the environment's debug capabilities.

<EMPTY>

FrameworkRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to the component framework itself.

<EMPTY>

NameMapping

Defined in fuchsia.component.decl/offer.fidl

Type used to create a mapping between 2 names. Used to rename service or component instances in FIDL declarations.

FieldTypeDescriptionDefault
source_name name

Name used in the source instance.

No default
target_name name

Name used in the target instance.

No default

ParentRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to a component's parent instance.

<EMPTY>

SelfRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to the component itself.

<EMPTY>

VoidRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to an intentionally missing offer source.

<EMPTY>

ENUMS

AllowedOffers strict

Type: uint32

Defined in fuchsia.component.decl/collection.fidl

The kinds of offers that can target the children in a collection.

NameValueDescription
1

Only static offers may target components in the collection. "Static offers" are the offers in the ComponentDecl that target the collection itself.

This is the default behavior.

2

Both static offers and dynamic offers may target components in the collection. "Static offers" are the offers in the ComponentDecl that target the collection itself. "Dynamic offers" are additional offers that are passed to CreateChild at runtime.

Availability strict

Type: uint32

Defined in fuchsia.component.decl/offer.fidl

Describes the expected availability of the capability.

NameValueDescription
1
2
3
4
Added: 9

ConfigTypeLayout flexible

Type: uint32

Defined in fuchsia.component.decl/config.fidl

NameValueDescription
1
2
3
4
5
6
7
8
9
10
11

DependencyType strict

Type: uint32

Defined in fuchsia.component.decl/offer.fidl

Describes the type of dependency implied by the capability.

NameValueDescription
1

A strong dependency which may be required by components that use it.

2

A weak dependency which is allowed to form a cycle. Components that use a weak dependency must support the dependency being unavailable at arbitrary times.

3

A weak dependency specifically used to mark cyclic dependencies from migrated v1 components.

Durability strict

Type: uint32

Defined in fuchsia.component.decl/collection.fidl

The durability of component instances created in a collection.

NameValueDescription
2

An instance exists until either its parent instance is stopped or it is explicitly destroyed.

3

An instance is started upon creation and is immediately destroyed when it stops.

EnvironmentExtends strict

Type: uint32

Defined in fuchsia.component.decl/environment.fidl

Specifies how a declared environment's initial set of properties are assigned.

NameValueDescription
0

The environment has no initial set of properties.

1

The environment's initial set of properties are inherited from its realm. Inherited properties include any fields defined in EnvironmentDecl.

OnTerminate strict

Type: uint32

Defined in fuchsia.component.decl/child.fidl

Describes the action to take if this component instance terminates unexpectedly.

NameValueDescription
0

No action, the default

1

Trigger a graceful system reboot if the component terminates for any reason. This is a specialized feature gated by Component Framework security policy.

StartupMode strict

Type: uint32

Defined in fuchsia.component.decl/child.fidl

Describes under what conditions the component may be started.

NameValueDescription
0

Start component instance only when another instance binds to it.

1

Start component instance as soon as parent starts. This mode is only supported for statically declared children -- a dynamic instance may only be started by binding to it.

StorageId strict

Type: uint32

Defined in fuchsia.component.decl/capability.fidl

Declares which identifier to use to key a component's isolated storage directory.

NameValueDescription
1

Isolated storage directories are keyed using a component's instance ID specified in the component ID index. Components which are not listed in the index cannot use or open this storage capability.

2

Isolated storage directories are keyed using a component's instance ID if one is specified in the component ID index. Otherwise, a component's relative moniker from the storage capability is used to key its isolated storage directory.

TABLES

Child

Defined in fuchsia.component.decl/child.fidl

Statically declares a child component instance.

OrdinalFieldTypeDescription
name child_name

The name assigned to the child by its parent.

Must be non-empty, unique among all siblings, and contain only the following characters: [a-z0-9-_.].

url fuchsia.url/Url

The child component's URL.

Must be non-empty and a well-formed URL.

startup StartupMode

The startup mode for the component instance.

environment name

The environment assigned to this child.

Must reference an environment defined in the ComponentDecl. Contains only the following characters: [a-z0-9-_.].

on_terminate OnTerminate

The action to take if this component instance terminates unexpectedly.

May be unset, in which case defaults to NONE.

Collection

Defined in fuchsia.component.decl/collection.fidl

Statically declares a component instance collection.

OrdinalFieldTypeDescription
name name

The name of the collection. Instances created in the collection are scoped to this name.

durability Durability

The durability of instances in the collection.

environment name

The environment assigned to child instances in this collection.

Must be non-empty, reference an environment defined in the containing ComponentDecl, and contain only the following characters: [a-z0-9-_.].

allowed_offers AllowedOffers

The kinds of offers that can target the child instances in this collection. The default value is STATIC_ONLY.

Only components using the dynamic_offers restricted feature may set this field.

allow_long_names bool

Whether child instances in this collection can have names longer than the default length limit of 100.

Only components using the allow_long_names restricted feature may set this field.

persistent_storage bool

Whether the data in isolated storage used by dynamic child instances and their descendants will persist after the instances are destroyed. New dynamic instances inherit the previous instances' data stores.

This setting can be overridden by a lower-level collection that is a descendant of a collection that enables/disables this setting.

This setting applies to all storage capabilities consumed by the collection components and their descendants.

The default is the value inherited from an ancestral collection if set, otherwise false.

Component

Defined in fuchsia.component.decl/component.fidl

A component declaration.

This information is typically encoded in the component manifest (.cm file) if it has one or may be generated at runtime by a component resolver for those that don't.

OrdinalFieldTypeDescription
program Program

Information about the program to run when the component is executed. Omitted for non-executable components.

uses vector<Use>

List of capabilities used by the component. These consist of capabilities offered to the component that are installed in its incoming namespace.

The used capabilities must be unique and non-overlapping.

exposes vector<Expose>

List of capabilities exposed by the component. These consist of capabilities that are made visible to the parent. The parent may offer these capabilities to its children, but not use them.

The exposed capabilities must be unique and non-overlapping.

offers vector<Offer>

List of capabilities offered to the component's children. These consist of capabilities that the given children may use, which may come from a child, the parent, or the component's own outgoing namespace.

The offered capabilities must be unique and non-overlapping.

capabilities vector<Capability>

List of capabilities defined by the component.

children vector<Child>

The component's statically instantiated children. The children must have unique names.

collections vector<Collection>

The component's collections. The collections must have unique names.

environments vector<Environment>

List of environments created by this component. Environments are assigned to children and control aspects of a child component's runtime.

facets fuchsia.data/Dictionary

Additional metadata about the component.

config ConfigSchema

The schema of the component's configuration interface.

ConfigField

Defined in fuchsia.component.decl/config.fidl

Declares a single config field (key + type)

OrdinalFieldTypeDescription
key ConfigKey

The identifier for this config field. This key will be used to match overrides.

type ConfigType

The type of config values. Config values are verified against this layout at build time and run time.

ConfigSchema

Defined in fuchsia.component.decl/config.fidl

The schema of a component's configuration interface.

OrdinalFieldTypeDescription
fields vector<ConfigField>

Ordered fields of the component's configuration interface.

checksum ConfigChecksum

Checksum over the config declaration.

value_source ConfigValueSource

Strategy used to resolve config values.

DebugProtocolRegistration

Defined in fuchsia.component.decl/environment.fidl

Registers a protocol in the environment as a debug capability. This makes it available to any component in the environment that uses it with source == debug.

To learn more about protocols, see: https://fuchsia.dev/fuchsia-src/glossary#protocol

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be parent, self, or child.

source_name name

Name identifying the protocol being offered.

target_name name

The name by which the capability is being offered.

Directory

Defined in fuchsia.component.decl/capability.fidl

Declares a directory capability backed by this component.

To learn more about directories, see: https://fuchsia.dev/fuchsia-src/glossary#directory

OrdinalFieldTypeDescription
name name

The name of this directory.

source_path string[1024]

The path to the directory in the component's outgoing directory.

rights fuchsia.io/Rights

The maximum rights that can be set by a component using this directory.

Environment

Defined in fuchsia.component.decl/environment.fidl

Declares an environment which configures a realm.

OrdinalFieldTypeDescription
name name

The name of this environment.

extends EnvironmentExtends

Specifies how the initial state of this environment is constructed.

runners vector<RunnerRegistration>

List of runners available in this environment.

This list determines the total set of runners that are available for any component in the environment to use.

resolvers vector<ResolverRegistration>

List of component resolvers and the URL schemes they are registered to resolve. These registrations determine how components are resolved in the realm. If the component URL scheme does not match any of these resolvers, URL resolution is delegated to the parent environment, if this environment extends from REALM.

debug_capabilities vector<DebugRegistration>

Expose capabilties to debug section when component manager allows it.

These capabilities are accessible to any component in the environment with a use declaration with source == debug. Only capabilities intended to support development should be declared here, and they are only allowed if explicitly included in the component manager allowlist.

stop_timeout_ms uint32

The duration in milliseconds that the component will have to stop before it is killed.

Event

Defined in fuchsia.component.decl/capability.fidl

Declares an event capability which component instances may subscribe to. This type cannot be used in fuchsia.component.decl.Component. It is only used for the framework's built-in capabilities declared in internal.Config.

OrdinalFieldTypeDescription
name name

The name of this event. Must be non-empty, unique among built-in capabilities.

EventStream

Defined in fuchsia.component.decl/capability.fidl

Declares an event_stream capability This type cannot be used in fuchsia.component.decl.Component. It is only used for the framework's built-in capabilities declared in internal.Config.

Added: 8

OrdinalFieldTypeDescription
name name

The name of this event stream. Must be non-empty, unique among built-in capabilities.

EventSubscription

Defined in fuchsia.component.decl/events.fidl

Indicates the event name to subscribe to with a given event mode.

OrdinalFieldTypeDescription
event_name name

ExposeDirectory

Defined in fuchsia.component.decl/expose.fidl

Declares a directory exposed to a component's containing realm, such as a directory exposed by the component or one of its children at runtime.

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be self or child.

source_name name

Name identifying the directory, by which it was presented to this component.

target Ref

The destination to which the directory is exposed: either the component's realm or the framework.

target_name name

The name by which the capability is being exposed.

rights fuchsia.io/Rights

The maximum rights that can be set by a component using this directory, required iff source == self.

subdir string[1024]

The subdirectory of this directory to expose instead of the root. Optional.

ExposeEventStream

Defined in fuchsia.component.decl/expose.fidl

Declares an event stream exposed to a component's containing realm, such as an event stream exposed by the component or one of its children at runtime.

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be child, or framework.

source_name name

The name of the event stream

scope vector<Ref>

When an event is exposed from framework, the scope is required and allows one to define the child (or array of children) which the event is about.

target Ref

The destination to which the event stream is exposed.

target_name name

The name by which the capability is being exposed.

ExposeProtocol

Defined in fuchsia.component.decl/expose.fidl

Declares a protocol exposed to a component's containing realm, such as a protocol exposed by the component or one of its children at runtime.

To learn more about protocols, see: https://fuchsia.dev/fuchsia-src/glossary#protocol

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be self or child.

source_name name

Name identifying the protocol, by which it was presented to this component.

target Ref

The destination to which the protocol is exposed: either the component's realm or the framework.

target_name name

The name by which the capability is being exposed.

ExposeResolver

Defined in fuchsia.component.decl/expose.fidl

Declares a resolver exposed to a component's containing realm, such as a resolver exposed by the component or one of its children at runtime.

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be self or child.

source_name name

The name of the resolver, by which it was presented to this component.

target Ref

The destination to which the resolver is exposed

target_name name

The name by which the capability is being exposed.

ExposeRunner

Defined in fuchsia.component.decl/expose.fidl

Declares a runner exposed to a component's containing realm, such as a runner exposed by the component or one of its children at runtime.

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be self or child.

source_name name

The name of the runner, by which it was presented to this component.

target Ref

The destination to which the runner is exposed: either the component's realm or the framework.

target_name name

The name by which the capability is being exposed.

ExposeService

Defined in fuchsia.component.decl/expose.fidl

Declares a service exposed to a component's containing realm, such as a service exposed by the component or one of its children at runtime.

To learn more about services, see: https://fuchsia.dev/fuchsia-src/glossary#service

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be self or child.

source_name name

Name identifying the service, by which it was presented to this component.

target Ref

The destination to which the service is exposed: either the component's realm or the framework.

target_name name

The name by which the capability is being exposed.

OfferDirectory

Defined in fuchsia.component.decl/offer.fidl

Declares a directory offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be parent, self, child, framework, or void. If set to void, then the target must offer or use the capability with optional availability.

source_name name

Name identifying the directory being offered.

target Ref

Reference to the target of the capability. Must be child or collection.

target_name name

The name by which the capability is being offered.

rights fuchsia.io/Rights

The maximum rights that can be set by a component using this directory, required iff source == self.

subdir string[1024]

The subdirectory of this directory to offer instead of the root. Optional.

dependency_type DependencyType

The dependency type this offer represents. A component which receives a weak offer must support the offered capability being unavailable at any point.

availability Availability

The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

OfferEvent

Defined in fuchsia.component.decl/offer.fidl

Declares an event offered by a component.

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be parent or void. If set to void, then the target must offer or use the capability with optional availability.

source_name name

Name of the event being offered.

target Ref

Reference to the target of the event. Must be child or collection.

target_name name

Name under which the event is being offered.

filter fuchsia.data/Dictionary

Filter for the event. The structure of the filter depends on the event type. May be absent for some events.

availability Availability

The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

OfferEventStream

Defined in fuchsia.component.decl/offer.fidl

Declares an event stream offered by a component.

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be parent, framework, child, or void. If set to void, then the target must offer or use the capability with optional availability.

source_name name

Name of the event being offered.

scope vector<Ref>

When an event is offered from framework, the scope is required and allows one to define the child (or array of children) which the event is about. When the event is offered from parent, the scope can be used to downscope the event to a certain child scope, otherwise the event will carry the scope coming from the parent.

target Ref

The destination to which the event stream is offered.

target_name name

Name under which the event stream is being offered.

filter fuchsia.data/Dictionary

Filter for the event stream. Only present for DirectoryReady events and CapabilityRequested events

availability Availability

The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

OfferProtocol

Defined in fuchsia.component.decl/offer.fidl

Declares a protocol offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

To learn more about protocols, see: https://fuchsia.dev/fuchsia-src/glossary#protocol

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be parent, self, child, framework, or void. If set to void, then the target must offer or use the capability with optional availability.

source_name name

Name identifying the protocol being offered.

target Ref

Reference to the target. Must be child or collection.

target_name name

The name by which the capability is being offered.

dependency_type DependencyType

The dependency type this offer represents. A component which receives a weak offer must support the offered capability being unavailable at any point.

availability Availability

The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

OfferResolver

Defined in fuchsia.component.decl/offer.fidl

Declares a resolver capability offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be parent, self, or child.

source_name name

Name of the resolver being offered.

target Ref

Reference to the target of the capability. Must be child or collection.

target_name name

Name under which the capability is being offered.

OfferRunner

Defined in fuchsia.component.decl/offer.fidl

Declares a runner offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be parent, self, or child.

source_name name

Name of the runner being offered.

target Ref

Reference to the target of the capability. Must be child or collection.

target_name name

Name under which the capability is being offered.

OfferService

Defined in fuchsia.component.decl/offer.fidl

Declares a service offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

To learn more about services, see: https://fuchsia.dev/fuchsia-src/glossary#service

OrdinalFieldTypeDescription
source Ref

The provider of the capability relative to the component itself. Must be parent, self, child, or void. If set to void, then the target must offer or use the capability with optional availability.

source_name name

Name identifying the service being offered.

target Ref

Reference to the target. Must be child or collection.

target_name name

The name under which the capability is being offered.

source_instance_filter vector<string>

The list of allow listed instances to be offered. Instances of the service not in this list will not be accessible by the target component. If this is not set that means all instances from the source service are offered.

renamed_instances vector<NameMapping>

List of renamed service instances.

availability Availability

The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

OfferStorage

Defined in fuchsia.component.decl/offer.fidl

Declares a storage capability offered by a component to one of its children, such as meta storage offered by the component's containing realm or cache storage offered by the component itself.

OrdinalFieldTypeDescription
source_name name

The name of the storage capability being offered

source Ref

The provider of the capability relative to the component itself. Must be parent, storage, or void. If set to void, then the target must offer or use the capability with optional availability.

target Ref

Reference to the target of the capability. Must be child or collection.

target_name name

The name the storage capability is being offered as

availability Availability

The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

Program

Defined in fuchsia.component.decl/program.fidl

A program declaration.

This declaration is set by executable components to designate the runner to use and pass runner-specific program information to it.

To learn more about runners, see: https://fuchsia.dev/fuchsia-src/glossary#runner

OrdinalFieldTypeDescription
runner name

The name of the runner to use to run the component. Must match a RunnerRegistration in the component's environment.

info fuchsia.data/Dictionary

Information about the program to run when the component is executed. The component manager provides the contents of this dictionary to the runner when executing this program.

For instance, this might contain a path to the program's executable image, or program arguments.

  • The keys represent namespaced properties, delimited by ".".
  • Properties may be nested in values, but only in the case of an object vector.

Protocol

Defined in fuchsia.component.decl/capability.fidl

Declares a protocol capability backed by this component.

To learn more about protocols, see: https://fuchsia.dev/fuchsia-src/glossary#protocol

OrdinalFieldTypeDescription
name name

The name of this protocol.

source_path string[1024]

The path to the protocol in the component's outgoing directory.

Resolver

Defined in fuchsia.component.decl/capability.fidl

Declares a resolver which is responsible for resolving component URLs to actual components. See fuchsia.component.resolution.Resolver for the protocol resolvers are expected to implement.

OrdinalFieldTypeDescription
name name

The name of this resolver. Must be non-empty, unique among resolvers declared in the same ComponentDecl.

source_path string[1024]

The path to the resolver protocol in the component's outgoing directory

ResolverRegistration

Defined in fuchsia.component.decl/environment.fidl

A mapping of URL scheme to resolver name.

OrdinalFieldTypeDescription
resolver name

The name of the resolver.

source Ref

The provider of the capability relative to the component itself. Must be parent, self, or child.

scheme url_scheme

The URL scheme the resolver is registered to handle. Only one resolver may be registered to a particular URL scheme. The URL scheme must start with a lowercase ASCII letter (a-z), and may contain lowercase ASCII letters, digits, +, -, and ..

Runner

Defined in fuchsia.component.decl/capability.fidl

Declares a runner capability backed by a service.

OrdinalFieldTypeDescription
name name

The name of this runner. Must be non-empty, unique among runners declared in the same ComponentDecl.

source_path string[1024]

The path to the runner protocol in the component's outgoing directory.

RunnerRegistration

Defined in fuchsia.component.decl/environment.fidl

A repository of the runners available in an environment.

OrdinalFieldTypeDescription
source_name name

The name of the runner capability as it's exposed to, offered, or defined by this component.

source Ref

The provider of the capability relative to the component itself. Must be parent, self, or child.

target_name name

The name by which the runner is made available in this environment.

Service

Defined in fuchsia.component.decl/capability.fidl

Declares a service capability backed by this component.

To learn more about services, see: https://fuchsia.dev/fuchsia-src/glossary#service

OrdinalFieldTypeDescription
name name

The name of this service.

source_path string[1024]

The path to the service in the component's outgoing directory.

Storage

Defined in fuchsia.component.decl/capability.fidl

Declares a storage capability backed by a directory from which data, cache, or meta storage can be offered.

OrdinalFieldTypeDescription
name name

The name of this storage

source Ref

The provider of the backing directory capability relative to the component itself. Must be parent, self, or child.

backing_dir name

The name of the directory capability from source that backs the storage.

subdir string[1024]

The subdirectory of the source directory that will back the storage

storage_id StorageId

This enum determines how to key a component's isolated storage directory. Each option corresponds to a different key'ing strategy. This field is required.

UseDirectory

Defined in fuchsia.component.decl/use.fidl

Declares a directory used by a component, which was offered to it.

OrdinalFieldTypeDescription
source Ref

The provider of the directory relative to the component itself. Must be parent, framework, or child. If the availability is set to optional, then this must be set to parent.

source_name name

Name identifying the directory, by which it was presented to this component.

target_path string[1024]

The path where the capability should be installed in the component's namespace.

Must be an absolute path starting with /.

rights fuchsia.io/Rights

The rights required by the component to use this directory.

subdir string[1024]

The subdirectory of this directory to use instead of the root. Optional.

dependency_type DependencyType

The dependency type this use represents.

A component which offers a capability to a child from itself and uses a capability from the same child, must mark the dependency as weak. A weak dependency implies that the capability may become unavailable at any point. Taking a strong dependency on a child's capability will cause this the child to shut down before its parent. When using a weak dependency, the parent shuts down before the child.

availability Availability

The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

UseEvent

Defined in fuchsia.component.decl/use.fidl

Declares an event used by a component, which was offered to it.

OrdinalFieldTypeDescription
source Ref

The provider of the event. Must be realm or framework. If the availability is set to optional, then this must be set to parent.

source_name name

Name identifying the event which was presented to this component.

target_name name

The name which the component will use to refer to this event.

filter fuchsia.data/Dictionary

Filter for the event. The structure of the filter depends on the event type. May be absent for some events.

dependency_type DependencyType

The dependency type this use represents.

A component which offers a capability to a child from itself and uses a capability from the same child, must mark the dependency as weak. A weak dependency implies that the capability may become unavailable at any point. Taking a strong dependency on a child's capability will cause this the child to shut down before its parent. When using a weak dependency, the parent shuts down before the child.

availability Availability

The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

UseEventStream

Defined in fuchsia.component.decl/use.fidl

Declares an EventStream used by a component.

OrdinalFieldTypeDescription
source_name name

The names of the event streams.

source Ref

The provider of the event. Must be parent, framework, or child. If the availability is set to optional, then this must be set to parent.

scope vector<Ref>

When an event is used from framework, the scope is required to specify the child (or array of children) which the event will be about. When the event is used from parent, the scope can be used to downscope the event to a certain child scope, otherwise the event will carry the scope coming from the parent.

target_path name

The path where the capability should be installed in the component's namespace. Must be an absolute path starting with /.

availability Availability

The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

filter fuchsia.data/Dictionary

Filter for the event stream. The structure of the filter depends on the event stream type. May be absent for some events.

Added: 9

UseEventStreamDeprecated

Defined in fuchsia.component.decl/use.fidl

Declares a static EventStream used by a component.

OrdinalFieldTypeDescription
name name

The name of the event stream.

subscriptions vector<EventSubscription>[100]

The set of events to which this EventStream is subscribed. Note: This vector must be non-empty.

availability Availability

The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

UseProtocol

Defined in fuchsia.component.decl/use.fidl

Declares a protocol used by a component, which was offered to it.

A protocol is a service with a single instance, provided by a single FIDL protocol.

OrdinalFieldTypeDescription
source Ref

The provider of the protocol relative to the component itself. Must be parent, framework, debug, capability, or child. If the availability is set to optional, then this must be set to parent.

source_name name

Name identifying the protocol, by which it was presented to this component.

target_path string[1024]

The path where the capability should be installed in the component's namespace.

Must be an absolute path starting with /.

dependency_type DependencyType

The dependency type this use represents.

A component which offers a capability to a child from itself and uses a capability from the same child, must mark the dependency as weak. A weak dependency implies that the capability may become unavailable at any point. Taking a strong dependency on a child's capability will cause this the child to shut down before its parent. When using a weak dependency, the parent shuts down before the child.

availability Availability

The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

UseService

Defined in fuchsia.component.decl/use.fidl

Declares a service used by a component, which was offered to it.

To learn more about services, see: https://fuchsia.dev/fuchsia-src/glossary#service

OrdinalFieldTypeDescription
source Ref

The provider of the service relative to the component itself. Must be parent or framework. If the availability is set to optional, then this must be set to parent.

source_name name

Name identifying the service, by which it was presented to this component.

target_path string[1024]

The path where the capability should be installed in the component's namespace.

Must be an absolute path starting with /.

dependency_type DependencyType

The dependency type this use represents.

A component which offers a capability to a child from itself and uses a capability from the same child, must mark the dependency as weak. A weak dependency implies that the capability may become unavailable at any point. Taking a strong dependency on a child's capability will cause this the child to shut down before its parent. When using a weak dependency, the parent shuts down before the child.

availability Availability

The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

UseStorage

Defined in fuchsia.component.decl/use.fidl

Declares storage used by a component, which was offered to it.

OrdinalFieldTypeDescription
source_name name

Name identifying the storage, by which it was presented to this component. If the availability is set to optional, then this must be set to parent.

target_path string[1024]

The path where the capability should be installed in the component's namespace.

Must be an absolute path starting with /.

availability Availability

The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

UNIONS

Capability flexible

Defined in fuchsia.component.decl/capability.fidl

Declares a capability defined by this component.

OrdinalVariantTypeDescription
service Service
protocol Protocol
directory Directory
storage Storage
runner Runner
resolver Resolver
event Event
event_stream EventStream
Added: 8

ConfigChecksum flexible

Defined in fuchsia.component.decl/config.fidl

The checksum produced for a configuration interface. Two configuration interfaces are the same if their checksums are the same.

OrdinalVariantTypeDescription
sha256 uint8[32]

A SHA-256 hash produced over a component's config interface.

ConfigValueSource flexible

Defined in fuchsia.component.decl/config.fidl

Strategies available for resolving configuration values.

OrdinalVariantTypeDescription
package_path string

The path within the component's package at which to find config value files.

DebugRegistration flexible

Defined in fuchsia.component.decl/environment.fidl

Declares a capability registered in the debug section of an environment.

OrdinalVariantTypeDescription
protocol DebugProtocolRegistration

Expose flexible

Defined in fuchsia.component.decl/expose.fidl

Declares a capability exposed to either a component's containing realm or to the framework. For example, a legacy service exposed by the component at runtime.

OrdinalVariantTypeDescription
service ExposeService
protocol ExposeProtocol
directory ExposeDirectory
runner ExposeRunner
resolver ExposeResolver
event_stream ExposeEventStream

LayoutConstraint flexible

Defined in fuchsia.component.decl/config.fidl

OrdinalVariantTypeDescription
max_size uint32

LayoutParameter flexible

Defined in fuchsia.component.decl/config.fidl

OrdinalVariantTypeDescription
nested_type ConfigType

Offer flexible

Defined in fuchsia.component.decl/offer.fidl

Declares a capability offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

OrdinalVariantTypeDescription
service OfferService
protocol OfferProtocol
directory OfferDirectory
storage OfferStorage
runner OfferRunner
resolver OfferResolver
event OfferEvent
event_stream OfferEventStream

Ref flexible

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to a capability source or destination relative to this component.

OrdinalVariantTypeDescription
parent ParentRef
self SelfRef
child ChildRef
collection CollectionRef
framework FrameworkRef
capability CapabilityRef
debug DebugRef
void_type VoidRef

Use flexible

Defined in fuchsia.component.decl/use.fidl

Declares a capability used by a component, which was offered to it.

OrdinalVariantTypeDescription
service UseService
protocol UseProtocol
directory UseDirectory
storage UseStorage
event UseEvent
event_stream_deprecated UseEventStreamDeprecated
event_stream UseEventStream

CONSTANTS

NameValueTypeDescription
CONFIG_KEY_MAX_SIZE 64 uint32

Config keys can only consist of these many bytes

MAX_CHILD_NAME_LENGTH 1024 uint32
MAX_MONIKER_LENGTH 4096 uint32
MAX_NAME_LENGTH 100 uint32
MAX_NUM_EVENT_STREAM_SUBSCRIPTIONS 100 uint64

The maximum number of EventSubscriptions in an EventStream.

MAX_PATH_LENGTH 1024 uint32
MAX_URL_SCHEME_LENGTH 100 uint32

ALIASES

NameValueDescription
ConfigKey string[CONFIG_KEY_MAX_SIZE]

The string identifier for a config field.

child_name string[MAX_CHILD_NAME_LENGTH]
name string[MAX_NAME_LENGTH]
url_scheme string[MAX_URL_SCHEME_LENGTH]