Project: /_project.yaml Book: /_book.yaml

fuchsia.sys

PROTOCOLS

ComponentController {:#ComponentController}

Defined in fuchsia.sys/component_controller.fidl

An interface for controlling components.

Closing this interface implicitly kills the controlled component unless the Detach method has been called.

If the component exits, this interface will be closed.

Typically obtained via Launcher.CreateComponent.

Kill {:#Kill}

Terminates the component.

This ComponentController connection is closed when the component has terminated.

Request

Detach {:#Detach}

Decouples the lifetime of the component from this controller.

After calling Detach, the component will not be implicitly killed when this interface is closed.

Request

OnTerminated {:#OnTerminated}

Event that is triggered when the component is terminated.

This event provides the return code of the process and reason for its termination. The return_code is only valid if the termination reason is EXITED. If the termination reason is not EXITED, the return code is guaranteed not to be 0.

Response

OnDirectoryReady {:#OnDirectoryReady}

Event that is triggered when the component's output directory is mounted.

This event will not be triggered for every component, only those that serve a directory over their PA_DIRECTORY_REQUEST handle.

Response

Environment {:#Environment}

Defined in fuchsia.sys/environment.fidl

An interface for managing a set of applications.

Applications run inside environments, which provide ambient services and support for their lifecycle.

CreateNestedEnvironment {:#CreateNestedEnvironment}

Creates a new environment nested inside this environment.

When applications are created inside the nested environment using the environment's Launcher, the environment requests the environment services from host_directory before passing those services to the newly created application in its StartupInfo.

The controller can be used to control the lifecycle of the created environment. Note that by default the environment will be killed automatically when the EnvironmentController's interface is closed. You can use EnvironmentController.Detach to disable this behavior.

label defines the new environment's label/name. It must be unique within the parent environment (though not globally) and is used for isolating separate environments. It can also be used for diagnostic purposes. The label will be truncated if it is longer than kLabelMaxLength.

additional_services, which may be empty, contains a list of services that the environment provides, which are hosted by additional_services.host_directory. If options.inherit_parent_services is false, host_directory must provide a Loader service if it wishes to allow new components to be loaded in the new environment.

options provides additional options, see EnvironmentOptions for details.

Request

GetLauncher {:#GetLauncher}

Gets the Launcher associated with this environment.

Applications created using this application launcher will be given the environment services provided by this environment's host_directory.

Request

GetServices {:#GetServices}

Gets a superset of services provided by this environment's host_directory.

Request

GetDirectory {:#GetDirectory}

Gets a superset of services provided by this environment's host_directory.

Request

EnvironmentController {:#EnvironmentController}

Defined in fuchsia.sys/environment_controller.fidl

An interface for controlling an environment.

Closing this interface implicitly kills the controlled environment unless the Detach method has been called.

If the environment is destroyed, this interface will be closed.

Typically obtained via Environment.CreateNestedEnvironment.

Kill {:#Kill}

Terminates the environment.

When an Environment is terminated, all applications launched in the environment (and in all transitively nested environments) are also killed.

Request

Response

Detach {:#Detach}

Decouples the lifetime of the environment from this controller.

After calling Detach, the environment will not be implicitly killed when this interface is closed.

Request

OnCreated {:#OnCreated}

Event that is triggered when the environment is created.

Response

JobProvider {:#JobProvider}

Defined in fuchsia.sys/job_provider.fidl

An interface for providing a job handle. Instances of this interface are created in the context of an already-identified realm, so there is no need to explicitly identify the realm below.

GetJob {:#GetJob}

Gets the root job associated with the realm.

Request

Response

Launcher {:#Launcher}

Defined in fuchsia.sys/launcher.fidl

An interface for creating component instances.

Typically obtained via Environment.GetLauncher.

CreateComponent {:#CreateComponent}

Creates a new instance of the component described by launch_info.

The component instance is created in the Environment associated with this Launcher. When creating the component, the environment requests the environment services for this component from its EnvironmentHost.

The controller can be used to control the lifecycle of the created component instance. If an ComponentController's interface is requested, the component instance is killed when the interface is closed.

Request

Loader {:#Loader}

Defined in fuchsia.sys/loader.fidl

An interface for loading from packages.

LoadUrl {:#LoadUrl}

LoadUrl a package by url.

Request

Response

Runner {:#Runner}

Defined in fuchsia.sys/runner.fidl

An interface for running components.

Typically exposed by components that provide execution environments for particular classes of programs. For example, the Dart virtual machine exposes this interface to run Dart programs.

StartComponent {:#StartComponent}

Execute the given component.

Upon startup, the component is to be given the information in startup_info, but the mechanism by which the component receives that information is up to the component runner.

The controller interface request typically originates from the Launcher.CreateComponent message that caused this component to be started.

Request

ServiceProvider {:#ServiceProvider}

Defined in fuchsia.sys/service_provider.fidl

An interface through which a client may request services from a host. Instances of this interface are created within the context of an already-identified client and host pair, so there is no need to explicitly identify the client or host in the methods below.

This interface is deprecated. Services should be published as directory entries instead, just like files.

ConnectToService {:#ConnectToService}

Asks the host to provide the service identified by service_name through the channel endpoint supplied by the caller. If the host is not willing or able to provide the requested service, it should close the channel.

Request

ComponentController {:#ComponentController}

Defined in fuchsia.sys/component_controller.fidl

An interface for controlling components.

Closing this interface implicitly kills the controlled component unless the Detach method has been called.

If the component exits, this interface will be closed.

Typically obtained via Launcher.CreateComponent.

Kill {:#Kill}

Terminates the component.

This ComponentController connection is closed when the component has terminated.

Request

Detach {:#Detach}

Decouples the lifetime of the component from this controller.

After calling Detach, the component will not be implicitly killed when this interface is closed.

Request

OnTerminated {:#OnTerminated}

Event that is triggered when the component is terminated.

This event provides the return code of the process and reason for its termination. The return_code is only valid if the termination reason is EXITED. If the termination reason is not EXITED, the return code is guaranteed not to be 0.

Response

OnDirectoryReady {:#OnDirectoryReady}

Event that is triggered when the component's output directory is mounted.

This event will not be triggered for every component, only those that serve a directory over their PA_DIRECTORY_REQUEST handle.

Response

Environment {:#Environment}

Defined in fuchsia.sys/environment.fidl

An interface for managing a set of applications.

Applications run inside environments, which provide ambient services and support for their lifecycle.

CreateNestedEnvironment {:#CreateNestedEnvironment}

Creates a new environment nested inside this environment.

When applications are created inside the nested environment using the environment's Launcher, the environment requests the environment services from host_directory before passing those services to the newly created application in its StartupInfo.

The controller can be used to control the lifecycle of the created environment. Note that by default the environment will be killed automatically when the EnvironmentController's interface is closed. You can use EnvironmentController.Detach to disable this behavior.

label defines the new environment's label/name. It must be unique within the parent environment (though not globally) and is used for isolating separate environments. It can also be used for diagnostic purposes. The label will be truncated if it is longer than kLabelMaxLength.

additional_services, which may be empty, contains a list of services that the environment provides, which are hosted by additional_services.host_directory. If options.inherit_parent_services is false, host_directory must provide a Loader service if it wishes to allow new components to be loaded in the new environment.

options provides additional options, see EnvironmentOptions for details.

Request

GetLauncher {:#GetLauncher}

Gets the Launcher associated with this environment.

Applications created using this application launcher will be given the environment services provided by this environment's host_directory.

Request

GetServices {:#GetServices}

Gets a superset of services provided by this environment's host_directory.

Request

GetDirectory {:#GetDirectory}

Gets a superset of services provided by this environment's host_directory.

Request

EnvironmentController {:#EnvironmentController}

Defined in fuchsia.sys/environment_controller.fidl

An interface for controlling an environment.

Closing this interface implicitly kills the controlled environment unless the Detach method has been called.

If the environment is destroyed, this interface will be closed.

Typically obtained via Environment.CreateNestedEnvironment.

Kill {:#Kill}

Terminates the environment.

When an Environment is terminated, all applications launched in the environment (and in all transitively nested environments) are also killed.

Request

Response

Detach {:#Detach}

Decouples the lifetime of the environment from this controller.

After calling Detach, the environment will not be implicitly killed when this interface is closed.

Request

OnCreated {:#OnCreated}

Event that is triggered when the environment is created.

Response

JobProvider {:#JobProvider}

Defined in fuchsia.sys/job_provider.fidl

An interface for providing a job handle. Instances of this interface are created in the context of an already-identified realm, so there is no need to explicitly identify the realm below.

GetJob {:#GetJob}

Gets the root job associated with the realm.

Request

Response

Launcher {:#Launcher}

Defined in fuchsia.sys/launcher.fidl

An interface for creating component instances.

Typically obtained via Environment.GetLauncher.

CreateComponent {:#CreateComponent}

Creates a new instance of the component described by launch_info.

The component instance is created in the Environment associated with this Launcher. When creating the component, the environment requests the environment services for this component from its EnvironmentHost.

The controller can be used to control the lifecycle of the created component instance. If an ComponentController's interface is requested, the component instance is killed when the interface is closed.

Request

Loader {:#Loader}

Defined in fuchsia.sys/loader.fidl

An interface for loading from packages.

LoadUrl {:#LoadUrl}

LoadUrl a package by url.

Request

Response

Runner {:#Runner}

Defined in fuchsia.sys/runner.fidl

An interface for running components.

Typically exposed by components that provide execution environments for particular classes of programs. For example, the Dart virtual machine exposes this interface to run Dart programs.

StartComponent {:#StartComponent}

Execute the given component.

Upon startup, the component is to be given the information in startup_info, but the mechanism by which the component receives that information is up to the component runner.

The controller interface request typically originates from the Launcher.CreateComponent message that caused this component to be started.

Request

ServiceProvider {:#ServiceProvider}

Defined in fuchsia.sys/service_provider.fidl

An interface through which a client may request services from a host. Instances of this interface are created within the context of an already-identified client and host pair, so there is no need to explicitly identify the client or host in the methods below.

This interface is deprecated. Services should be published as directory entries instead, just like files.

ConnectToService {:#ConnectToService}

Asks the host to provide the service identified by service_name through the channel endpoint supplied by the caller. If the host is not willing or able to provide the requested service, it should close the channel.

Request

STRUCTS

EnvironmentOptions {:#EnvironmentOptions}

Defined in fuchsia.sys/environment.fidl

FlatNamespace {:#FlatNamespace}

Defined in fuchsia.sys/flat_namespace.fidl

For example, [“/pkg”, “/svc”].

FileDescriptor {:#FileDescriptor}

Defined in fuchsia.sys/launcher.fidl

An FDIO file descriptor.

LaunchInfo {:#LaunchInfo}

Defined in fuchsia.sys/launcher.fidl

Information used to create an instance of a component and obtain services from it.

This field will probably be replaced with a stronger notion of identity, such as an unforgeable token. This field is included in this iteration to ease the transition from the previous component interfaces.

If null, the component will use the default stdout for the environment.

If null, the component will use the default stderr for the environment.

ServiceList {:#ServiceList}

Defined in fuchsia.sys/launcher.fidl

StartupInfo {:#StartupInfo}

Defined in fuchsia.sys/runner.fidl

Information given to components at startup.

For ELF binaries, this information is provided in the initialization message given to libc by fuchsia.process.Launcher.

ProgramMetadata {:#ProgramMetadata}

Defined in fuchsia.sys/runner.fidl

Program information about a component.

Package {:#Package}

Defined in fuchsia.sys/runner.fidl

A binary representation of a component.

Typically provided to Runner.StartComponent when starting a component.

EnvironmentOptions {:#EnvironmentOptions}

Defined in fuchsia.sys/environment.fidl

FlatNamespace {:#FlatNamespace}

Defined in fuchsia.sys/flat_namespace.fidl

For example, [“/pkg”, “/svc”].

FileDescriptor {:#FileDescriptor}

Defined in fuchsia.sys/launcher.fidl

An FDIO file descriptor.

LaunchInfo {:#LaunchInfo}

Defined in fuchsia.sys/launcher.fidl

Information used to create an instance of a component and obtain services from it.

This field will probably be replaced with a stronger notion of identity, such as an unforgeable token. This field is included in this iteration to ease the transition from the previous component interfaces.

If null, the component will use the default stdout for the environment.

If null, the component will use the default stderr for the environment.

ServiceList {:#ServiceList}

Defined in fuchsia.sys/launcher.fidl

StartupInfo {:#StartupInfo}

Defined in fuchsia.sys/runner.fidl

Information given to components at startup.

For ELF binaries, this information is provided in the initialization message given to libc by fuchsia.process.Launcher.

ProgramMetadata {:#ProgramMetadata}

Defined in fuchsia.sys/runner.fidl

Program information about a component.

Package {:#Package}

Defined in fuchsia.sys/runner.fidl

A binary representation of a component.

Typically provided to Runner.StartComponent when starting a component.

ENUMS

TerminationReason {:#TerminationReason}

Type: uint32

Defined in fuchsia.sys/component_controller.fidl

TerminationReason {:#TerminationReason}

Type: uint32

Defined in fuchsia.sys/component_controller.fidl

CONSTANTS