fuchsia.session

Added: 7

PROTOCOLS

Launcher

Defined in fuchsia.session/launcher.fidl

A protocol used to launch sessions.

Launch

Launches the session detailed in configuration.

If a session is currently running, the component associated with the running session will be destroyed.

  • configuration describes the session to launch.
  • error LaunchError.INVALID_ARGS if configuration.session_url is not set.
  • error LaunchError.NOT_FOUND if configuration.session_url could not be resolved.
  • error LaunchError.DESTROY_COMPONENT_FAILED if an existing session component could not be destroyed. The existing session remains running at this point.
  • error LaunchError.CREATE_COMPONENT_FAILED if the session component could not be started. No session will be running at this point.

Request

NameType
configuration LaunchConfiguration

Response

NameType
payload Launcher_Launch_Result

Lifecycle

Defined in fuchsia.session/lifecycle.fidl

A protocol used to control the session's lifecycle.

Added: 13

Restart

Restarts the session.

This stops the existing session and starts a new session with the same session URL as the previous one.

Returns once the new session component has been created and started.

  • error LifecycleError.NOT_FOUND if there is no existing session.
  • error LifecycleError.RESOLVE_COMPONENT_FAILED if the session URL could not be resolved to a component.
  • error LifecycleError.DESTROY_COMPONENT_FAILED if the session component could not be destroyed. The previous session will continue to exist at this point and the component may be running.
  • error LifecycleError.CREATE_COMPONENT_FAILED if the session component could not be started. No session will be running at this point.

Request

<EMPTY>

Response

NameType
payload Lifecycle_Restart_Result

Start

Starts the session.

Returns after the session component has been created and started.

  • error LifecycleError.NOT_FOUND if session_url has not been provided and there is no configured default session URL.
  • error LifecycleError.ALREADY_STARTED if a session has already been started.
  • error LifecycleError.RESOLVE_COMPONENT_FAILED if session_url could not be resolved to a component.
  • error LifecycleError.DESTROY_COMPONENT_FAILED if an existing session component could not be destroyed. The existing session remains running at this point.
  • error LifecycleError.CREATE_COMPONENT_FAILED if the session component could not be started. No session will be running at this point.

Request

NameType
payload LifecycleStartRequest

Response

NameType
payload Lifecycle_Start_Result

Stop

Stops the session.

Returns after the session component has been destroyed.

  • error LifecycleError.NOT_FOUND if the session has not been started.
  • error LifecycleError.DESTROY_COMPONENT_FAILED if the session component could not be destroyed. The previous session will continue to exist at this point and the component may be running.

Request

<EMPTY>

Response

NameType
payload Lifecycle_Stop_Result

Restarter

Defined in fuchsia.session/restarter.fidl

A protocol used to restart the currently running session.

Restart

Restarts the session.

  • error RestartError.NOT_RUNNING if there is no currently running session to restart.
  • error RestartError.DESTROY_COMPONENT_FAILED if an existing session component could not be destroyed. The existing session remains running at this point.
  • error RestartError.CREATE_COMPONENT_FAILED if the session component could not be started. No session will be running at this point.

Request

<EMPTY>

Response

NameType
payload Restarter_Restart_Result

STRUCTS

Launcher_Launch_Response

Defined in fuchsia.session/launcher.fidl

<EMPTY>

Lifecycle_Restart_Response

Defined in fuchsia.session/lifecycle.fidl

<EMPTY>

Lifecycle_Start_Response

Defined in fuchsia.session/lifecycle.fidl

<EMPTY>

Lifecycle_Stop_Response

Defined in fuchsia.session/lifecycle.fidl

<EMPTY>

Restarter_Restart_Response

Defined in fuchsia.session/restarter.fidl

<EMPTY>

ENUMS

LaunchError flexible

Type: uint32

Defined in fuchsia.session/launcher.fidl

An error that occurs when launching a session.

NameValueDescription
1

The session's LaunchConfiguration is malformed.

2

There was an error resolving the session's component URL.

3

The session component could not be destroyed.

4

The session component could not be created.

LifecycleError flexible

Type: uint32

Defined in fuchsia.session/lifecycle.fidl

An error that occurs when updating the lifecycle a session.

Added: 13

NameValueDescription
1

The session has not been started or there is no default session URL configured.

2

The session has already been started.

3

The session component could not be resolved.

4

The session component could not be created.

5

The session component could not be destroyed.

RestartError flexible

Type: uint32

Defined in fuchsia.session/restarter.fidl

An error that occurs when restarting a session.

NameValueDescription
1

There is no currently running session to restart.

2

There was an error resolving the session's component URL.

3

The session component could not be destroyed.

4

The session component could not be created.

TABLES

LaunchConfiguration

Defined in fuchsia.session/launcher.fidl

Describes a session to launch.

OrdinalFieldTypeDescription
session_url string:4096

The component URL of the session.

config_capabilities vector<fuchsia.component.decl/Configuration>

Configuration capabilities that will be offered to the session.

In the intended use case, the session component would use a particular configuration capability with transitional availability. When such a transitional capability is not offered to the session, the config value from the package will be used. When it is offered using config_capabilities, then the config value specified here will be used. As such, one may override config values of the session component that are set up following this pattern.

Added: HEAD

LifecycleStartRequest

Defined in fuchsia.session/lifecycle.fidl

OrdinalFieldTypeDescription
session_url string:4096

The component URL of the session.

Optional. If omitted, uses the default configured session URL, if available.

UNIONS

Launcher_Launch_Result strict

Defined in fuchsia.session/launcher.fidl

OrdinalVariantTypeDescription
response Launcher_Launch_Response
err LaunchError

Lifecycle_Restart_Result strict

Defined in fuchsia.session/lifecycle.fidl

OrdinalVariantTypeDescription
response Lifecycle_Restart_Response
err LifecycleError
framework_err internal

Lifecycle_Start_Result strict

Defined in fuchsia.session/lifecycle.fidl

OrdinalVariantTypeDescription
response Lifecycle_Start_Response
err LifecycleError
framework_err internal

Lifecycle_Stop_Result strict

Defined in fuchsia.session/lifecycle.fidl

OrdinalVariantTypeDescription
response Lifecycle_Stop_Response
err LifecycleError
framework_err internal

Restarter_Restart_Result strict

Defined in fuchsia.session/restarter.fidl

OrdinalVariantTypeDescription
response Restarter_Restart_Response
err RestartError