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

fuchsia.modular

PROTOCOLS

Agent {:#Agent}

Defined in fuchsia.modular/agent.fidl

An agent is a component whose lifecycle is not tied to any Story.

  • An agent is a singleton instance.
  • Components can connect to an Agent using the fuchsia.modular.ComponentContext capability.
  • An agent vends services to components that connect to it over a ServiceProvider.
  • An agent is started when someone wants to connect to it, or when a task it has scheduled has triggered.

This FIDL interface should be implemented by a component that is meant to be run as an Agent.

When an agent application implements the Lifecycle interface, it can receive a signal for when it should stop. An agent may be stopped for the following reasons:

(1) All AgentController connections associated with this agent are closed.

(2) The system wants to optimize for resources.

Once the framework delivers a Lifecycle.Terminate(), the agent application may exit itself, or is killed by framework after a timeout.

For more info see:

  • fuchsia.modular.AgentContext and fuchsia.modular.ComponentContext for capabilities an agent has.
  • fuchsia.modular.Lifecycle for how Components get lifecycle events.

Connect {:#Connect}

Called when some component tries to connect to this agent. requestor_url identifies the requesting client. Different client roles are identified differently: * For Module clients in the general case, requestor_url will be the name provided at Module create time (ie, in calls to StoryPuppetMaster's StoryCommand.AddMod/mod_name) with :‘s escaped (see below for a complete explanation). * For all other clients (Agents and Shells), requestor_url is set to the requesting component’s URL.

services must be connected to an implementation of fuchsia.sys.ServiceProvider offering services specific to the requesting client.

Details on module naming: modules are named hierarchically based on what client created them. This is called a module path. If created by 1) an agent or 2) an existing module, the path is constructed differently.

In the case of (2), the module path is the concatenation of the existing module‘s path with the new module’s name, as provided by the parent module. In the case of (1), the module path is the concatenation of StoryCommand.AddMod/mod_name and StoryCommand.AddMod/surface_relation_parent.

The full path is encoded into requestor_url as escape_colons(module_path).join(‘:’).

Request

RunTask {:#RunTask}

Called when some task identified by task_id is scheduled to run. The task was first posted by this Agent using AgentContext.ScheduleTask(). The return callback is called by this Agent when all work related to this task is completed. Note that the framework may call Lifecycle.Terminate() before RunTask returns.

TODO(alhaad): The current implementation allows the Agent to run a task until its callback returns. If the task takes a long time to finish, the framework has no way to signal a request for termination other than to shut down the entire Agent instance. Instead, we should cap task length with strategies like budgets. Also, the Task should likely have its own connection that allows for more signalling.

Request

Response

AgentContext {:#AgentContext}

Defined in fuchsia.modular/agent_context.fidl

An instance of this service is exposed to agents in their namespace.

GetComponentContext {:#GetComponentContext}

DEPRECATED: ComponentContext is now available in the namespace/environment for Modules.

Request

GetEntityReferenceFactory {:#GetEntityReferenceFactory}

Connects to an EntityReferenceFactory for this Agent. Entity references obtained from this EntityReferenceFactory will be resolved back to this Agent.

Request

GetTokenManager {:#GetTokenManager}

The auth token manager this Agent may use for accessing external services.

Request

AgentController {:#AgentController}

Defined in fuchsia.modular/agent_controller.fidl

This interface is used by the caller of ComponentContext::ConnectToAgent() to tell the framework that it is still interested in keeping this Agent running.

The system counts AgentController connections and terminates this Agent if the count goes to zero.

BaseShell {:#BaseShell}

Defined in fuchsia.modular/base_shell.fidl

This interface is implemented by a base shell. Dependencies are passed to it in Initialize() on startup. The base shell is also expected to implement Lifecycle in order to receive a Terminate() call on teardown.

In one component instance there can only be one BaseShell service instance. The ViewOwner request is sent to the separate ViewProvider service. This way, the base shell may be implemented as a flutter component.

Initialize {:#Initialize}

Request

GetAuthenticationUIContext {:#GetAuthenticationUIContext}

This method may be invoked by the basemgr to request an AuthenticationUIContext. request will then be used to request the base shell to show login screen during a UserProvider.AddUser() or if a token needs to be refreshed.

Request

BaseShellContext {:#BaseShellContext}

Defined in fuchsia.modular/base_shell.fidl

This interface allows the BaseShell to request capabilities from the Basemgr in a way that is more explicit about the services that are offered than a generic ServiceProvider.

GetUserProvider {:#GetUserProvider}

Acquires the user provider service, which is used to add/remove/list and authenticate users.

Request

GetPresentation {:#GetPresentation}

Acquires the presentation service, which is assumed to already be connected to the presenter.

Request

UserProvider {:#UserProvider}

Defined in fuchsia.modular/user_provider.fidl

Given by the Basemgr to the BaseShell at Initialize() so the BaseShell can get information about the users of this device from the Basemgr, and act on the provided information (including extending the user database).

AddUser {:#AddUser}

Adds information of a user that can be used to authenticate her/him to this device. Once successfully added, the user can login to the same device via Login().

identity_provider is the identity provider to use for identification.

device_name is what the user wants to name the device. If null or empty the device's current hostname will be used.

account is NULL if there was an error during identification and error_code is set.

Request

Response

RemoveUser {:#RemoveUser}

Removes information of a user from the local user database.

account_id is received from either AddUser() or PreviousUsers().

Request

Response

Login {:#Login}

Uses the credentials provided in AddUser() to start a user session. This would mean syncing with the user‘s ledger instance and displaying a user shell with all of the user’s stories.

Request

Login2 {:#Login2}

DEPRECATED: For transitional purposes only.

Request

PreviousUsers {:#PreviousUsers}

List of all users who have authenticated to this device in the past.

Request

Response

Clipboard {:#Clipboard}

Defined in fuchsia.modular/clipboard.fidl

An interface that provides clients with the ability to store and retrieve text.

Push {:#Push}

Pushes text onto the clipboard.

Request

Peek {:#Peek}

Peeks at the current topmost item on the clipboard and returns it, or null if no such item exists.

Request

Response

ComponentContext {:#ComponentContext}

Defined in fuchsia.modular/component_context.fidl

Provided to all component instances in their respective initialization information by the framework. For example, a Module gets it from its ModuleContext and an Agent gets it from its AgentContext.

GetLedger {:#GetLedger}

Gets the Ledger associated with this component. This ledger instance is unique to this component (nb. not the component instance) under this user.

Request

ConnectToAgent {:#ConnectToAgent}

Used to start an agent in the user scope if it isn't already running, and connect to it.

Request

ConnectToAgentService {:#ConnectToAgentService}

Connects to an agent that provides the given request.service_name, and then connects the given request.channel to that service. request.agent_controller must be kept alive until the service is no longer required.

If an error is encountered, the request.channel will be closed with a status code, such as:

  • ZX_ERR_NOT_FOUND -- if a request.handler agent URL is not specified, and an agent for the request.service_name is not found
  • ZX_ERR_PEER_CLOSED -- if request.service_name is not available from the agent (either specified or discovered)

Request

GetEntityResolver {:#GetEntityResolver}

Gets the EntityResolver service, which can be used to resolve an entity reference to an Entity interface.

Request

Entity {:#Entity}

Defined in fuchsia.modular/entity.fidl

A multi-typed data entity.

GetTypes {:#GetTypes}

Returns the types associated with this entity. Each entry in types references a well-known content type.

Request

Response

GetData {:#GetData}

Given one of the types returned from GetTypes() above, returns associated short-form data, or null if the type is absent from GetTypes().

Request

Response

WriteData {:#WriteData}

Sets the data for a particular type. This will precipitate an OnUpdated event with the associated type.

Request

Response

GetReference {:#GetReference}

Gets the entity reference for this entity, which can be persisted and then later used to locate this entity. These references are weak references and are not sufficient to keep the entity alive.

Request

Response

Watch {:#Watch}

Begins watching for data changes on a particular type. The watcher immediately fires OnUpdated with the current value for the requested type (or null if the type is not present). Closing the Entity interface does not close the watcher.

Request

EntityWatcher {:#EntityWatcher}

Defined in fuchsia.modular/entity.fidl

OnUpdated {:#OnUpdated}

Fires on data updates for a particular type. If the type is initially not present, a null data pointer is produced. The type may only transition from absent to present at most once, as there is no deletion.

No deduplication is performed.

Request

EntityProvider {:#EntityProvider}

Defined in fuchsia.modular/entity_provider.fidl

EntityProviders (agents) must implement and provide the EntityProvider service if they create entity references (using EntityReferenceFactory). This service is used by the framework to provide data for an Entity interface for an entity. This interface is requested by the framework in the agent's application outgoing services, and is closed by the framework when there are no more Entitys that need to be provided.

In the below methods, cookie will have been previously passed to EntityReferenceFactory.CreateReference(), though this may have been in an earlier or remote app instance. Entity providers should attempt to resolve unfamiliar cookies or else treat the entities as empty and read-only.

GetTypes {:#GetTypes}

Returns the types associated with the requested entity. Each entry in type references a well-known content type.

If the cookie cannot be resolved, the provider should produce an empty vector.

Request

Response

GetData {:#GetData}

Given one of the types returned from GetTypes() above, returns associated short-form data, or null if the type is absent from GetTypes().

If the cookie cannot be resolved, the provider should return null.

Request

Response

WriteData {:#WriteData}

Sets the data for a particular type. This must precipitate an OnUpdate event with the associated type.

If the cookie cannot be resolved, the provider should no-op with EntityWriteStatus::READ_ONLY.

Request

Response

Watch {:#Watch}

Begins watching for data changes on a particular type. The watcher must immediately fire OnUpdated with the current value for the requested type (or null if the type is not present).

No deduplication of events should be performed.

At most one update may be in-flight at a time on a particular watcher; once a client is ready for another update, it will call the callback. At most one update should be queued for dispatch for a particular watcher; older updates should be dropped.

If the cookie cannot be resolved, the provider should emit a single event with null data.

Request

EntityReferenceFactory {:#EntityReferenceFactory}

Defined in fuchsia.modular/entity_reference_factory.fidl

Agents use this interface to create Entity references that can subsequently be dereferenced into an Entity interface using EntityResolver. Agents that create entity references must also expose an EntityProvider service in their application‘s outgoing services, so that agents can provide data for Entitys that they create. This interface is available through an agent’s AgentContext.

CreateReference {:#CreateReference}

Agents call this to manufacture a reference for an Entity they will provide. Returns an opaque, persistable entity_reference that components can resolve into an Entity interface using EntityResolver. When data is requested from an Entity interface resolved from this entity_reference, the cookie associated with this entity_reference will be passed back to the EntityProvider of the Agent that originally created this reference.

cookie should uniquely identify the Entity within the scope of the calling entity provider. For example, it may be used as the primary key value for a database.

Request

Response

EntityResolver {:#EntityResolver}

Defined in fuchsia.modular/entity_resolver.fidl

This interface is given to all components in their ComponentContext. Any component can resolve an entity reference into an Entity.

ResolveEntity {:#ResolveEntity}

Finds and binds entity_request to an Entity handle for the Entity referenced by entity_reference. If an error occurs, entity_request will be closed.

This method is called by any component who wants to use an Entity using an entity reference. A component has to get an entity reference (directly or indirectly) from an agent, for example through some fidl interface. The agent will create an entity reference using EntityReferenceFactory. During entity resolution, that agent then provides data for the Entity through an EntityProvider service it exposes. Thus, any Agent that wishes to use EntityReferenceFactory to dispense entity references through its agent services MUST also implement the EntityProvider service.

Request

IntentHandler {:#IntentHandler}

Defined in fuchsia.modular/intent_handler.fidl

The IntentHandler interface is exposed by modules which wish to handle intents on the behalf of other modules or agents.

The modular framework expects any module which declares support for intent handling in its module manifest to expose IntentHandler in its outgoing services.

Any time the framework receives an intent which is to be handled by a specific module its IntentHandler will be called with the intent it is meant to handle.

HandleIntent {:#HandleIntent}

Handles the provided intent. Any links referenced in the intent parameters will be in the namespace of the handling component, and can be retrieved via ModuleContext.GetLink.

Request

Lifecycle {:#Lifecycle}

Defined in fuchsia.modular/lifecycle.fidl

An interface implemented by applications that wish to terminate gracefully.

Terminate {:#Terminate}

The client of this application has requested that this application terminate gracefully.

If the application does not terminate itself in a timely manner, the client may forcibly terminate the application.

Request

ModuleContext {:#ModuleContext}

Defined in fuchsia.modular/module_context.fidl

This interface is exposed to all Module instances in a story. It allows to create Link instances and run more Module instances.

AddModuleToStory {:#AddModuleToStory}

Starts a new Module instance and adds it to the story. The Module to execute is identified by the contents of [intent] and the Module instance is given a [name] in the scope of the starting Module instance. The view for the Module is given to the story shell for display.

Providing a [surface_relation] advises the StoryShell how to layout surfaces that the new module creates. If [surface_relation] is null then a default relation is used.

If the method is called again with the same [name] by the same Module instance, but with different arguments, the existing Module instance is restarted with the changed arguments. If the other arguments don't change, just an additional ModuleController connection is made.

Request

Response

EmbedModule {:#EmbedModule}

Like AddModuleToStory(), but passes a [view_token] explicitly to embed the view of the requested Module instance in the view of the requesting Module instance, instead of relying on the story shell for display. If a Module instance with the same [name] and [intent] is already running, [view_token] is destroyed.

Request

Response

RemoveSelfFromStory {:#RemoveSelfFromStory}

When a module calls [RemoveSelfFromStory()] the framework will stop the module and remove it from the story. If there are no more running modules in the story the story will be deleted.

Request

CreateEntity {:#CreateEntity}

Creates a [fuchsia.modular.Entity] with the given [type] and [data]. The lifetime of the created entity is tied to the lifetime of the current story, but can be dereferenced by modules and agents outside the scope of the story.

[entity_request] will be connected to the created entity, or closed if the creation fails.

The returned [reference] is the entity reference for the created entity, or null if the entity creation failed.

Request

Response

OngoingActivity {:#OngoingActivity}

Defined in fuchsia.modular/module_context.fidl

This interface defines the protocol over which a Module can communicate about an ongoing activity to the framework. It is provided to Modules via ModuleContext.StartOngoingActivity().

ModuleController {:#ModuleController}

Defined in fuchsia.modular/module_controller.fidl

This interface is used by the caller of ModuleContext.StartModule() to control the started Module instance.

Closing this connection doesn't affect its Module instance; it just relinquishes the ability of the caller to control the Module instance.

Focus {:#Focus}

Requests that this module become the focused module in the story.

Request

Defocus {:#Defocus}

Requests that this module be hidden in the story.

Request

Stop {:#Stop}

Requests the Module instance to stop. The running Module component's Lifecycle::Terminate() method is called, the instance is shut down and state within the framework is cleaned up.

The result callback is called once the Module's runtime has been torn down.

Request

Response

OnStateChange {:#OnStateChange}

Called with the current state when it changes. DEPRECATED: Do not use this. ModuleState is a framework-internal concept and should not be exposed outside.

Response

ModuleResolver {:#ModuleResolver}

Defined in fuchsia.modular/module_resolver.fidl

FindModules {:#FindModules}

Finds Modules (contained in Fuchsia packages) that satisfy the constraints specified in query. Module resolution is done by matching the requested query.action and query.parameter_constraints (with both names and types) against actions and constraints specified in module manifests.

If no results could be found, response.results will be empty.

For detailed information on the resolution process, see docs/modular/module_resolution.md.

Request

Response

FocusController {:#FocusController}

Defined in fuchsia.modular/focus.fidl

This file has interfaces for 2 pieces of information: (1) The story that is currently in focus and (2) stories that are visible to the user. Names of interfaces follow the usual patterns:

{Focus,VisibleStories}Controller is used by session shell to update information whenever changes take place.

FocusProvider is used by maxwell and session shell to query and get updates on which story is in focus on which device and visible stories on this device.

Implemented by sessionmgr. Given to session shell through its namespace.

Set {:#Set}

Request

WatchRequest {:#WatchRequest}

Request

FocusRequestWatcher {:#FocusRequestWatcher}

Defined in fuchsia.modular/focus.fidl

Implemented by session shell. OnFocusRequest() gets called whenever there is a new request to change focus on this device. Requests can be made via FocusProvider.Request().

OnFocusRequest {:#OnFocusRequest}

Request

FocusProvider {:#FocusProvider}

Defined in fuchsia.modular/focus.fidl

Implemented by sessionmgr. Given to session shell and session agents through their namespace. Focus is persisted on the ledger.

Query {:#Query}

Returns the stories that are focused across all devices.

Request

Response

Watch {:#Watch}

Watches for change in focus on any of the user's devices.

Request

Request {:#Request}

Requests session shell to change focus on this device. If session shell responds to this request, focus shall be taken away from previously focused story and an update will be sent on FocusWatcher.OnFocusChange(). If story_id is NULL, the timeline is brought back into focus.

Request

FocusWatcher {:#FocusWatcher}

Defined in fuchsia.modular/focus.fidl

Implemented by anyone who is interested in getting updates when focus changes.

OnFocusChange {:#OnFocusChange}

Request

SessionShell {:#SessionShell}

Defined in fuchsia.modular/session_shell.fidl

This interface is implemented by a session shell and is used by the sessionmgr to hand to the session shell views of stories, or to notify that the view of a story is about to be closed.

AttachView {:#AttachView}

Displays the given story view. The story this view belongs to is identified by view_id.story_id. DEPRECATED. For transitional purposes only.

Request

AttachView2 {:#AttachView2}

Request

DetachView {:#DetachView}

Instructs the session shell to detach the view identified by view_id that was previously provided by AttachView() from the UI of the session shell. The view will be closed soon after DetachView() returns, or when a timeout is reached.

It is customary for the session shell to display a placeholder before a view is attached for a given view identifier, or after it was detached.

If the story identified by view_id.story_id is about to be deleted, the Shell will observe a call to StoryProviderWatcher.OnDelete() sometime after DetachView() returns.

If the session for which this session shell is responsible for is being terminated, or the session shell is stopped because it's replaced by another session shell, DetachView() will not be called at all, and the shell will rather observe a call to Lifecycle.Terminate().

Request

Response

SessionShellContext {:#SessionShellContext}

Defined in fuchsia.modular/session_shell.fidl

This interface allows a SessionShell to request capabilities from its creator in a way that is more explicit about the services that are offered than a generic ServiceProvider.

GetAccount {:#GetAccount}

The account associated with the currently logged-in user. It's NULL if logged into GUEST mode.

Request

Response

GetComponentContext {:#GetComponentContext}

Request

GetFocusController {:#GetFocusController}

Request

GetFocusProvider {:#GetFocusProvider}

Request

GetPresentation {:#GetPresentation}

Request

GetStoryProvider {:#GetStoryProvider}

Request

Logout {:#Logout}

Requests logout of the user. This causes the basemgr to tear down the Sessionmgr instance of the user.

Request

SessionShellPresentationProvider {:#SessionShellPresentationProvider}

Defined in fuchsia.modular/session_shell.fidl

Session shell provides this service to the framework which may plumb it to different subscribers, such as story shell and intelligence provider.

EXPERIMENTAL Service that allows consumers of a given story to get a connection to a Presentation, and visual state services provided by the user shell. This allows story shell implementations to coordinate event and focus handling. An analog mechanism exists between BaseShell and SessionShell.

GetPresentation {:#GetPresentation}

When a StoryShell calls StoryShellContext.GetPresentation(), this request arrives here.

Request

WatchVisualState {:#WatchVisualState}

When a StoryShell calls StoryShellContext.WatchVisualState(), this request arrives here.

Request

PuppetMaster {:#PuppetMaster}

Defined in fuchsia.modular/puppet_master.fidl

ControlStory {:#ControlStory}

Request

DeleteStory {:#DeleteStory}

Request

Response

GetStories {:#GetStories}

Request

Response

StoryPuppetMaster {:#StoryPuppetMaster}

Defined in fuchsia.modular/puppet_master.fidl

Enqueue {:#Enqueue}

Request

Execute {:#Execute}

Request

Response

SetStoryInfoExtra {:#SetStoryInfoExtra}

Request

Response

Annotate {:#Annotate}

Attach the annotations to the story. If the story does not yet exist, it will be created.

Existing annotations with the same key will be overwritten, or deleted if new value is null.

Request

Response

AnnotateModule {:#AnnotateModule}

Attach the annotations to the module with the given id. The module can be annotated before being added to the story, but if the story does not yet exist, AnnotationError.NOT_FOUND is returned.

Existing annotations with the same key will be overwritten.

Request

Response

StoryController {:#StoryController}

Defined in fuchsia.modular/story_controller.fidl

Used by the clients of StoryProvider (SessionShell) to interact with a single story. Created by StoryProvider.

If StoryController is closed, the StoryState associated with this story does not change.

GetInfo {:#GetInfo}

Gets information associated with the story.

Request

Response

GetInfo2 {:#GetInfo2}

For transition purposes only.

Request

Response

RequestStart {:#RequestStart}

Requests to run the story controlled by this StoryController instance. When the story starts, if not yet running, the view of the newly started story shell will be passed in a call to SessionShell.AttachView().

Request

Stop {:#Stop}

Requests to stop the story controlled by this StoryController. If Start() requests are pending when this request is issued, the request is queued until the Start() requests complete. Before stopping the story, a snapshot of the story will be taken and saved. Returns when the story is stopped.

Request

Response

Watch {:#Watch}

Registers a watcher for changes of the story state.

Note that stories can stop themselves at any time and it is advisable for the holder of a StoryController to provide a watcher.

Request

GetModuleController {:#GetModuleController}

DEPRECATED (metadata about, and requesting changes to runtime state).

Request

Annotate {:#Annotate}

Attach the annotations to the story.

Existing annotations with the same key will be overwritten.

Request

Response

StoryWatcher {:#StoryWatcher}

Defined in fuchsia.modular/story_controller.fidl

Implemented by the client calling StoryController.Watch().

OnStateChange {:#OnStateChange}

Called with the current state right after registration, and subsequently when the state changes.

Request

OnModuleAdded {:#OnModuleAdded}

DEPRECATED

Request

OnModuleFocused {:#OnModuleFocused}

DEPRECATED

Request

StoryProvider {:#StoryProvider}

Defined in fuchsia.modular/story_provider.fidl

Sessionmgr passes a connection to this service to the SessionShell so it can operate on stories for the user. It is also passed to other services that monitor or manipulate stories, specifically the maxwell services.

Closing a StoryProvider connection has no effect on the state of the framework.

GetStories {:#GetStories}

Returns a list of existing stories. If watcher is provided, the client will be notified of story changes (new stories, deleted stories, runtime state changes).

Request

Response

GetStories2 {:#GetStories2}

For transition purposes only.

Request

Response

GetStoryInfo {:#GetStoryInfo}

Requests detailed information about the given story. If the story doesn't exist, returns null.

Request

Response

GetStoryInfo2 {:#GetStoryInfo2}

For transition purposes only.

Request

Response

GetController {:#GetController}

Obtains a controller for a previously created story identified by its story ID. Obtaining the controller doesn‘t run it yet. If the story doesn’t exist, the interface request is closed.

Request

Watch {:#Watch}

Registers a watcher for changes in the story collection. DEPRECATED: In favor of GetStories().

Request

StoryProviderWatcher {:#StoryProviderWatcher}

Defined in fuchsia.modular/story_provider.fidl

Implemented by clients of StoryProvider.

OnChange {:#OnChange}

Called in three different situations:

  • Immediately when a new watcher is registered with one OnChange() invocation with the current infor and state of each story known on the current device.

  • Every time a change to StoryInfo is applied to the record of the story kept on the current device, including a new story created on another device becoming known on this device for the first time.

  • Every time the StoryState of the story changes on this device. The StoryState on another device of a story known on this device is not made known on this device.

  • Every time the StoryVisibilityState of the story changes on this device. The StoryVisibilityState on another device of a story known on this device is not made known on this device.

    I.e. if the story is started or stopped on another device, it does not cause an OnChange() call on this device. Cf. OnDelete() below.

The ID of the story the notifications are about are part of StoryInfo.

story_state is STOPPED if the story was just created or just became known on this device and was not yet started on the current device. It's RUNNING when the story is started on the current device.

story_visibility_state is DEFAULT until a mod on the current device requests for the visibility state to be changed.

Request

OnChange2 {:#OnChange2}

For transition purposes only.

Request

OnDelete {:#OnDelete}

Called when a story record is permanently deleted. The deletion could have originated on this or on another device.

If the story is running on this device at the time it is deleted, OnChange() will not be called first.

Request

StoryShell {:#StoryShell}

Defined in fuchsia.modular/story_shell.fidl

This interface is implemented by a story shell. Dependencies are passed to it in Initialize() on startup. The story shell is also expected to implement Lifecycle in order to receive a Terminate() call on teardown.

In one component instance there can only be one StoryShell service instance. The view token is sent to the separate View service. This way, the story shell may be implemented as a flutter component.

Teardown may occur via the session shell calling StoryController.Stop(), the sessionmgr being terminated, or by the system shutting down.

Initialize {:#Initialize}

Request

AddSurface {:#AddSurface}

Adds a new Surface and its corresponding view to be displayed by the StoryShell. More context that allows the story shell to decide how to layout will be added later. Also, interface to influence life cycle and focus is obviously missing. view_connection the new view and the associated Surface ID. surface_info metadata relating to the Surface.

Request

AddSurface2 {:#AddSurface2}

DEPRECATED. For transition purposes only.

Request

AddSurface3 {:#AddSurface3}

For transition purposes only.

Request

FocusSurface {:#FocusSurface}

Focuses the surface with surface_id, bringing it to the foreground.

Request

DefocusSurface {:#DefocusSurface}

Defocuses the surface with surface_id, dismissing it to the background.

Request

Response

OnSurfaceFocused {:#OnSurfaceFocused}

Notify when a Surface is focused in the story. The focus could be from a user interaction or requested by the framework through StoryController#FocusModule. EXPERIMENTAL

Response

RemoveSurface {:#RemoveSurface}

Remove the Surface with surface_id from the StoryShell entirely. This is final. The Surface is removed from the graph. If necessary, the associated Surface is defocused. There is no expectation that DefocusSurface is called before this.

Request

UpdateSurface {:#UpdateSurface}

Update the surface This is called when the intent is to update the surface metadata in the story graph in place. Any fields, except for the surface_id can be updated. If no value or null is passed for a field it remains unchanged. This includes the view_holder_token inside the connection.

E.g called when an intent resolves to a module that is known by the caller to already be running, to update associated metadata.

Request

UpdateSurface2 {:#UpdateSurface2}

DEPRECATED. For transition purposes only.

Request

UpdateSurface3 {:#UpdateSurface3}

For transition purposes only.

Request

StoryShellContext {:#StoryShellContext}

Defined in fuchsia.modular/story_shell.fidl

This interface provides the StoryShell instance with everything it needs to know or be able to do about the Story. Not much right now, but we expect this to increase.

GetPresentation {:#GetPresentation}

Requests a Presentation connection from the SessionShell. See SessionShellPresenationProvider in session_shell.fidl.

Request

WatchVisualState {:#WatchVisualState}

Starts watching Story shell's visual state.

Request

RequestView {:#RequestView}

Requests a view for a Surface. Requests that a view for surface_id is provided through StoryShell.ReconnectView().

Request

StoryVisualStateWatcher {:#StoryVisualStateWatcher}

Defined in fuchsia.modular/story_shell.fidl

Implemented by StoryShell to get notified about visual state changes.

OnVisualStateChange {:#OnVisualStateChange}

Request

StoryShellFactory {:#StoryShellFactory}

Defined in fuchsia.modular/story_shell_factory.fidl

StoryShellFactory creates or returns an existing StoryShell for a particular story. This is intended to be implemented by session shells that want to implement StoryShell functionality themselves.

AttachStory {:#AttachStory}

Requests a StoryShell for the story with the given story_id.

Request

DetachStory {:#DetachStory}

Instructs the session shell to teardown the story shell with the given story_id. This will be called before the story is stopped.

Request

Response

UserIntelligenceProvider {:#UserIntelligenceProvider}

Defined in fuchsia.modular/user_intelligence_provider.fidl

StartAgents {:#StartAgents}

The ComponentContext is used to create agents and use message queues.

Request

GetServicesForAgent {:#GetServicesForAgent}

A standard set of services provided to all agents at startup, along with services particuarly for this agent.

Request

Response

Agent {:#Agent}

Defined in fuchsia.modular/agent.fidl

An agent is a component whose lifecycle is not tied to any Story.

  • An agent is a singleton instance.
  • Components can connect to an Agent using the fuchsia.modular.ComponentContext capability.
  • An agent vends services to components that connect to it over a ServiceProvider.
  • An agent is started when someone wants to connect to it, or when a task it has scheduled has triggered.

This FIDL interface should be implemented by a component that is meant to be run as an Agent.

When an agent application implements the Lifecycle interface, it can receive a signal for when it should stop. An agent may be stopped for the following reasons:

(1) All AgentController connections associated with this agent are closed.

(2) The system wants to optimize for resources.

Once the framework delivers a Lifecycle.Terminate(), the agent application may exit itself, or is killed by framework after a timeout.

For more info see:

  • fuchsia.modular.AgentContext and fuchsia.modular.ComponentContext for capabilities an agent has.
  • fuchsia.modular.Lifecycle for how Components get lifecycle events.

Connect {:#Connect}

Called when some component tries to connect to this agent. requestor_url identifies the requesting client. Different client roles are identified differently: * For Module clients in the general case, requestor_url will be the name provided at Module create time (ie, in calls to StoryPuppetMaster's StoryCommand.AddMod/mod_name) with :‘s escaped (see below for a complete explanation). * For all other clients (Agents and Shells), requestor_url is set to the requesting component’s URL.

services must be connected to an implementation of fuchsia.sys.ServiceProvider offering services specific to the requesting client.

Details on module naming: modules are named hierarchically based on what client created them. This is called a module path. If created by 1) an agent or 2) an existing module, the path is constructed differently.

In the case of (2), the module path is the concatenation of the existing module‘s path with the new module’s name, as provided by the parent module. In the case of (1), the module path is the concatenation of StoryCommand.AddMod/mod_name and StoryCommand.AddMod/surface_relation_parent.

The full path is encoded into requestor_url as escape_colons(module_path).join(‘:’).

Request

RunTask {:#RunTask}

Called when some task identified by task_id is scheduled to run. The task was first posted by this Agent using AgentContext.ScheduleTask(). The return callback is called by this Agent when all work related to this task is completed. Note that the framework may call Lifecycle.Terminate() before RunTask returns.

TODO(alhaad): The current implementation allows the Agent to run a task until its callback returns. If the task takes a long time to finish, the framework has no way to signal a request for termination other than to shut down the entire Agent instance. Instead, we should cap task length with strategies like budgets. Also, the Task should likely have its own connection that allows for more signalling.

Request

Response

AgentContext {:#AgentContext}

Defined in fuchsia.modular/agent_context.fidl

An instance of this service is exposed to agents in their namespace.

GetComponentContext {:#GetComponentContext}

DEPRECATED: ComponentContext is now available in the namespace/environment for Modules.

Request

GetEntityReferenceFactory {:#GetEntityReferenceFactory}

Connects to an EntityReferenceFactory for this Agent. Entity references obtained from this EntityReferenceFactory will be resolved back to this Agent.

Request

GetTokenManager {:#GetTokenManager}

The auth token manager this Agent may use for accessing external services.

Request

AgentController {:#AgentController}

Defined in fuchsia.modular/agent_controller.fidl

This interface is used by the caller of ComponentContext::ConnectToAgent() to tell the framework that it is still interested in keeping this Agent running.

The system counts AgentController connections and terminates this Agent if the count goes to zero.

BaseShell {:#BaseShell}

Defined in fuchsia.modular/base_shell.fidl

This interface is implemented by a base shell. Dependencies are passed to it in Initialize() on startup. The base shell is also expected to implement Lifecycle in order to receive a Terminate() call on teardown.

In one component instance there can only be one BaseShell service instance. The ViewOwner request is sent to the separate ViewProvider service. This way, the base shell may be implemented as a flutter component.

Initialize {:#Initialize}

Request

GetAuthenticationUIContext {:#GetAuthenticationUIContext}

This method may be invoked by the basemgr to request an AuthenticationUIContext. request will then be used to request the base shell to show login screen during a UserProvider.AddUser() or if a token needs to be refreshed.

Request

BaseShellContext {:#BaseShellContext}

Defined in fuchsia.modular/base_shell.fidl

This interface allows the BaseShell to request capabilities from the Basemgr in a way that is more explicit about the services that are offered than a generic ServiceProvider.

GetUserProvider {:#GetUserProvider}

Acquires the user provider service, which is used to add/remove/list and authenticate users.

Request

GetPresentation {:#GetPresentation}

Acquires the presentation service, which is assumed to already be connected to the presenter.

Request

UserProvider {:#UserProvider}

Defined in fuchsia.modular/user_provider.fidl

Given by the Basemgr to the BaseShell at Initialize() so the BaseShell can get information about the users of this device from the Basemgr, and act on the provided information (including extending the user database).

AddUser {:#AddUser}

Adds information of a user that can be used to authenticate her/him to this device. Once successfully added, the user can login to the same device via Login().

identity_provider is the identity provider to use for identification.

device_name is what the user wants to name the device. If null or empty the device's current hostname will be used.

account is NULL if there was an error during identification and error_code is set.

Request

Response

RemoveUser {:#RemoveUser}

Removes information of a user from the local user database.

account_id is received from either AddUser() or PreviousUsers().

Request

Response

Login {:#Login}

Uses the credentials provided in AddUser() to start a user session. This would mean syncing with the user‘s ledger instance and displaying a user shell with all of the user’s stories.

Request

Login2 {:#Login2}

DEPRECATED: For transitional purposes only.

Request

PreviousUsers {:#PreviousUsers}

List of all users who have authenticated to this device in the past.

Request

Response

Clipboard {:#Clipboard}

Defined in fuchsia.modular/clipboard.fidl

An interface that provides clients with the ability to store and retrieve text.

Push {:#Push}

Pushes text onto the clipboard.

Request

Peek {:#Peek}

Peeks at the current topmost item on the clipboard and returns it, or null if no such item exists.

Request

Response

ComponentContext {:#ComponentContext}

Defined in fuchsia.modular/component_context.fidl

Provided to all component instances in their respective initialization information by the framework. For example, a Module gets it from its ModuleContext and an Agent gets it from its AgentContext.

GetLedger {:#GetLedger}

Gets the Ledger associated with this component. This ledger instance is unique to this component (nb. not the component instance) under this user.

Request

ConnectToAgent {:#ConnectToAgent}

Used to start an agent in the user scope if it isn't already running, and connect to it.

Request

ConnectToAgentService {:#ConnectToAgentService}

Connects to an agent that provides the given request.service_name, and then connects the given request.channel to that service. request.agent_controller must be kept alive until the service is no longer required.

If an error is encountered, the request.channel will be closed with a status code, such as:

  • ZX_ERR_NOT_FOUND -- if a request.handler agent URL is not specified, and an agent for the request.service_name is not found
  • ZX_ERR_PEER_CLOSED -- if request.service_name is not available from the agent (either specified or discovered)

Request

GetEntityResolver {:#GetEntityResolver}

Gets the EntityResolver service, which can be used to resolve an entity reference to an Entity interface.

Request

Entity {:#Entity}

Defined in fuchsia.modular/entity.fidl

A multi-typed data entity.

GetTypes {:#GetTypes}

Returns the types associated with this entity. Each entry in types references a well-known content type.

Request

Response

GetData {:#GetData}

Given one of the types returned from GetTypes() above, returns associated short-form data, or null if the type is absent from GetTypes().

Request

Response

WriteData {:#WriteData}

Sets the data for a particular type. This will precipitate an OnUpdated event with the associated type.

Request

Response

GetReference {:#GetReference}

Gets the entity reference for this entity, which can be persisted and then later used to locate this entity. These references are weak references and are not sufficient to keep the entity alive.

Request

Response

Watch {:#Watch}

Begins watching for data changes on a particular type. The watcher immediately fires OnUpdated with the current value for the requested type (or null if the type is not present). Closing the Entity interface does not close the watcher.

Request

EntityWatcher {:#EntityWatcher}

Defined in fuchsia.modular/entity.fidl

OnUpdated {:#OnUpdated}

Fires on data updates for a particular type. If the type is initially not present, a null data pointer is produced. The type may only transition from absent to present at most once, as there is no deletion.

No deduplication is performed.

Request

EntityProvider {:#EntityProvider}

Defined in fuchsia.modular/entity_provider.fidl

EntityProviders (agents) must implement and provide the EntityProvider service if they create entity references (using EntityReferenceFactory). This service is used by the framework to provide data for an Entity interface for an entity. This interface is requested by the framework in the agent's application outgoing services, and is closed by the framework when there are no more Entitys that need to be provided.

In the below methods, cookie will have been previously passed to EntityReferenceFactory.CreateReference(), though this may have been in an earlier or remote app instance. Entity providers should attempt to resolve unfamiliar cookies or else treat the entities as empty and read-only.

GetTypes {:#GetTypes}

Returns the types associated with the requested entity. Each entry in type references a well-known content type.

If the cookie cannot be resolved, the provider should produce an empty vector.

Request

Response

GetData {:#GetData}

Given one of the types returned from GetTypes() above, returns associated short-form data, or null if the type is absent from GetTypes().

If the cookie cannot be resolved, the provider should return null.

Request

Response

WriteData {:#WriteData}

Sets the data for a particular type. This must precipitate an OnUpdate event with the associated type.

If the cookie cannot be resolved, the provider should no-op with EntityWriteStatus::READ_ONLY.

Request

Response

Watch {:#Watch}

Begins watching for data changes on a particular type. The watcher must immediately fire OnUpdated with the current value for the requested type (or null if the type is not present).

No deduplication of events should be performed.

At most one update may be in-flight at a time on a particular watcher; once a client is ready for another update, it will call the callback. At most one update should be queued for dispatch for a particular watcher; older updates should be dropped.

If the cookie cannot be resolved, the provider should emit a single event with null data.

Request

EntityReferenceFactory {:#EntityReferenceFactory}

Defined in fuchsia.modular/entity_reference_factory.fidl

Agents use this interface to create Entity references that can subsequently be dereferenced into an Entity interface using EntityResolver. Agents that create entity references must also expose an EntityProvider service in their application‘s outgoing services, so that agents can provide data for Entitys that they create. This interface is available through an agent’s AgentContext.

CreateReference {:#CreateReference}

Agents call this to manufacture a reference for an Entity they will provide. Returns an opaque, persistable entity_reference that components can resolve into an Entity interface using EntityResolver. When data is requested from an Entity interface resolved from this entity_reference, the cookie associated with this entity_reference will be passed back to the EntityProvider of the Agent that originally created this reference.

cookie should uniquely identify the Entity within the scope of the calling entity provider. For example, it may be used as the primary key value for a database.

Request

Response

EntityResolver {:#EntityResolver}

Defined in fuchsia.modular/entity_resolver.fidl

This interface is given to all components in their ComponentContext. Any component can resolve an entity reference into an Entity.

ResolveEntity {:#ResolveEntity}

Finds and binds entity_request to an Entity handle for the Entity referenced by entity_reference. If an error occurs, entity_request will be closed.

This method is called by any component who wants to use an Entity using an entity reference. A component has to get an entity reference (directly or indirectly) from an agent, for example through some fidl interface. The agent will create an entity reference using EntityReferenceFactory. During entity resolution, that agent then provides data for the Entity through an EntityProvider service it exposes. Thus, any Agent that wishes to use EntityReferenceFactory to dispense entity references through its agent services MUST also implement the EntityProvider service.

Request

IntentHandler {:#IntentHandler}

Defined in fuchsia.modular/intent_handler.fidl

The IntentHandler interface is exposed by modules which wish to handle intents on the behalf of other modules or agents.

The modular framework expects any module which declares support for intent handling in its module manifest to expose IntentHandler in its outgoing services.

Any time the framework receives an intent which is to be handled by a specific module its IntentHandler will be called with the intent it is meant to handle.

HandleIntent {:#HandleIntent}

Handles the provided intent. Any links referenced in the intent parameters will be in the namespace of the handling component, and can be retrieved via ModuleContext.GetLink.

Request

Lifecycle {:#Lifecycle}

Defined in fuchsia.modular/lifecycle.fidl

An interface implemented by applications that wish to terminate gracefully.

Terminate {:#Terminate}

The client of this application has requested that this application terminate gracefully.

If the application does not terminate itself in a timely manner, the client may forcibly terminate the application.

Request

ModuleContext {:#ModuleContext}

Defined in fuchsia.modular/module_context.fidl

This interface is exposed to all Module instances in a story. It allows to create Link instances and run more Module instances.

AddModuleToStory {:#AddModuleToStory}

Starts a new Module instance and adds it to the story. The Module to execute is identified by the contents of [intent] and the Module instance is given a [name] in the scope of the starting Module instance. The view for the Module is given to the story shell for display.

Providing a [surface_relation] advises the StoryShell how to layout surfaces that the new module creates. If [surface_relation] is null then a default relation is used.

If the method is called again with the same [name] by the same Module instance, but with different arguments, the existing Module instance is restarted with the changed arguments. If the other arguments don't change, just an additional ModuleController connection is made.

Request

Response

EmbedModule {:#EmbedModule}

Like AddModuleToStory(), but passes a [view_token] explicitly to embed the view of the requested Module instance in the view of the requesting Module instance, instead of relying on the story shell for display. If a Module instance with the same [name] and [intent] is already running, [view_token] is destroyed.

Request

Response

RemoveSelfFromStory {:#RemoveSelfFromStory}

When a module calls [RemoveSelfFromStory()] the framework will stop the module and remove it from the story. If there are no more running modules in the story the story will be deleted.

Request

CreateEntity {:#CreateEntity}

Creates a [fuchsia.modular.Entity] with the given [type] and [data]. The lifetime of the created entity is tied to the lifetime of the current story, but can be dereferenced by modules and agents outside the scope of the story.

[entity_request] will be connected to the created entity, or closed if the creation fails.

The returned [reference] is the entity reference for the created entity, or null if the entity creation failed.

Request

Response

OngoingActivity {:#OngoingActivity}

Defined in fuchsia.modular/module_context.fidl

This interface defines the protocol over which a Module can communicate about an ongoing activity to the framework. It is provided to Modules via ModuleContext.StartOngoingActivity().

ModuleController {:#ModuleController}

Defined in fuchsia.modular/module_controller.fidl

This interface is used by the caller of ModuleContext.StartModule() to control the started Module instance.

Closing this connection doesn't affect its Module instance; it just relinquishes the ability of the caller to control the Module instance.

Focus {:#Focus}

Requests that this module become the focused module in the story.

Request

Defocus {:#Defocus}

Requests that this module be hidden in the story.

Request

Stop {:#Stop}

Requests the Module instance to stop. The running Module component's Lifecycle::Terminate() method is called, the instance is shut down and state within the framework is cleaned up.

The result callback is called once the Module's runtime has been torn down.

Request

Response

OnStateChange {:#OnStateChange}

Called with the current state when it changes. DEPRECATED: Do not use this. ModuleState is a framework-internal concept and should not be exposed outside.

Response

ModuleResolver {:#ModuleResolver}

Defined in fuchsia.modular/module_resolver.fidl

FindModules {:#FindModules}

Finds Modules (contained in Fuchsia packages) that satisfy the constraints specified in query. Module resolution is done by matching the requested query.action and query.parameter_constraints (with both names and types) against actions and constraints specified in module manifests.

If no results could be found, response.results will be empty.

For detailed information on the resolution process, see docs/modular/module_resolution.md.

Request

Response

FocusController {:#FocusController}

Defined in fuchsia.modular/focus.fidl

This file has interfaces for 2 pieces of information: (1) The story that is currently in focus and (2) stories that are visible to the user. Names of interfaces follow the usual patterns:

{Focus,VisibleStories}Controller is used by session shell to update information whenever changes take place.

FocusProvider is used by maxwell and session shell to query and get updates on which story is in focus on which device and visible stories on this device.

Implemented by sessionmgr. Given to session shell through its namespace.

Set {:#Set}

Request

WatchRequest {:#WatchRequest}

Request

FocusRequestWatcher {:#FocusRequestWatcher}

Defined in fuchsia.modular/focus.fidl

Implemented by session shell. OnFocusRequest() gets called whenever there is a new request to change focus on this device. Requests can be made via FocusProvider.Request().

OnFocusRequest {:#OnFocusRequest}

Request

FocusProvider {:#FocusProvider}

Defined in fuchsia.modular/focus.fidl

Implemented by sessionmgr. Given to session shell and session agents through their namespace. Focus is persisted on the ledger.

Query {:#Query}

Returns the stories that are focused across all devices.

Request

Response

Watch {:#Watch}

Watches for change in focus on any of the user's devices.

Request

Request {:#Request}

Requests session shell to change focus on this device. If session shell responds to this request, focus shall be taken away from previously focused story and an update will be sent on FocusWatcher.OnFocusChange(). If story_id is NULL, the timeline is brought back into focus.

Request

FocusWatcher {:#FocusWatcher}

Defined in fuchsia.modular/focus.fidl

Implemented by anyone who is interested in getting updates when focus changes.

OnFocusChange {:#OnFocusChange}

Request

SessionShell {:#SessionShell}

Defined in fuchsia.modular/session_shell.fidl

This interface is implemented by a session shell and is used by the sessionmgr to hand to the session shell views of stories, or to notify that the view of a story is about to be closed.

AttachView {:#AttachView}

Displays the given story view. The story this view belongs to is identified by view_id.story_id. DEPRECATED. For transitional purposes only.

Request

AttachView2 {:#AttachView2}

Request

DetachView {:#DetachView}

Instructs the session shell to detach the view identified by view_id that was previously provided by AttachView() from the UI of the session shell. The view will be closed soon after DetachView() returns, or when a timeout is reached.

It is customary for the session shell to display a placeholder before a view is attached for a given view identifier, or after it was detached.

If the story identified by view_id.story_id is about to be deleted, the Shell will observe a call to StoryProviderWatcher.OnDelete() sometime after DetachView() returns.

If the session for which this session shell is responsible for is being terminated, or the session shell is stopped because it's replaced by another session shell, DetachView() will not be called at all, and the shell will rather observe a call to Lifecycle.Terminate().

Request

Response

SessionShellContext {:#SessionShellContext}

Defined in fuchsia.modular/session_shell.fidl

This interface allows a SessionShell to request capabilities from its creator in a way that is more explicit about the services that are offered than a generic ServiceProvider.

GetAccount {:#GetAccount}

The account associated with the currently logged-in user. It's NULL if logged into GUEST mode.

Request

Response

GetComponentContext {:#GetComponentContext}

Request

GetFocusController {:#GetFocusController}

Request

GetFocusProvider {:#GetFocusProvider}

Request

GetPresentation {:#GetPresentation}

Request

GetStoryProvider {:#GetStoryProvider}

Request

Logout {:#Logout}

Requests logout of the user. This causes the basemgr to tear down the Sessionmgr instance of the user.

Request

SessionShellPresentationProvider {:#SessionShellPresentationProvider}

Defined in fuchsia.modular/session_shell.fidl

Session shell provides this service to the framework which may plumb it to different subscribers, such as story shell and intelligence provider.

EXPERIMENTAL Service that allows consumers of a given story to get a connection to a Presentation, and visual state services provided by the user shell. This allows story shell implementations to coordinate event and focus handling. An analog mechanism exists between BaseShell and SessionShell.

GetPresentation {:#GetPresentation}

When a StoryShell calls StoryShellContext.GetPresentation(), this request arrives here.

Request

WatchVisualState {:#WatchVisualState}

When a StoryShell calls StoryShellContext.WatchVisualState(), this request arrives here.

Request

PuppetMaster {:#PuppetMaster}

Defined in fuchsia.modular/puppet_master.fidl

ControlStory {:#ControlStory}

Request

DeleteStory {:#DeleteStory}

Request

Response

GetStories {:#GetStories}

Request

Response

StoryPuppetMaster {:#StoryPuppetMaster}

Defined in fuchsia.modular/puppet_master.fidl

Enqueue {:#Enqueue}

Request

Execute {:#Execute}

Request

Response

SetStoryInfoExtra {:#SetStoryInfoExtra}

Request

Response

Annotate {:#Annotate}

Attach the annotations to the story. If the story does not yet exist, it will be created.

Existing annotations with the same key will be overwritten, or deleted if new value is null.

Request

Response

AnnotateModule {:#AnnotateModule}

Attach the annotations to the module with the given id. The module can be annotated before being added to the story, but if the story does not yet exist, AnnotationError.NOT_FOUND is returned.

Existing annotations with the same key will be overwritten.

Request

Response

StoryController {:#StoryController}

Defined in fuchsia.modular/story_controller.fidl

Used by the clients of StoryProvider (SessionShell) to interact with a single story. Created by StoryProvider.

If StoryController is closed, the StoryState associated with this story does not change.

GetInfo {:#GetInfo}

Gets information associated with the story.

Request

Response

GetInfo2 {:#GetInfo2}

For transition purposes only.

Request

Response

RequestStart {:#RequestStart}

Requests to run the story controlled by this StoryController instance. When the story starts, if not yet running, the view of the newly started story shell will be passed in a call to SessionShell.AttachView().

Request

Stop {:#Stop}

Requests to stop the story controlled by this StoryController. If Start() requests are pending when this request is issued, the request is queued until the Start() requests complete. Before stopping the story, a snapshot of the story will be taken and saved. Returns when the story is stopped.

Request

Response

Watch {:#Watch}

Registers a watcher for changes of the story state.

Note that stories can stop themselves at any time and it is advisable for the holder of a StoryController to provide a watcher.

Request

GetModuleController {:#GetModuleController}

DEPRECATED (metadata about, and requesting changes to runtime state).

Request

Annotate {:#Annotate}

Attach the annotations to the story.

Existing annotations with the same key will be overwritten.

Request

Response

StoryWatcher {:#StoryWatcher}

Defined in fuchsia.modular/story_controller.fidl

Implemented by the client calling StoryController.Watch().

OnStateChange {:#OnStateChange}

Called with the current state right after registration, and subsequently when the state changes.

Request

OnModuleAdded {:#OnModuleAdded}

DEPRECATED

Request

OnModuleFocused {:#OnModuleFocused}

DEPRECATED

Request

StoryProvider {:#StoryProvider}

Defined in fuchsia.modular/story_provider.fidl

Sessionmgr passes a connection to this service to the SessionShell so it can operate on stories for the user. It is also passed to other services that monitor or manipulate stories, specifically the maxwell services.

Closing a StoryProvider connection has no effect on the state of the framework.

GetStories {:#GetStories}

Returns a list of existing stories. If watcher is provided, the client will be notified of story changes (new stories, deleted stories, runtime state changes).

Request

Response

GetStories2 {:#GetStories2}

For transition purposes only.

Request

Response

GetStoryInfo {:#GetStoryInfo}

Requests detailed information about the given story. If the story doesn't exist, returns null.

Request

Response

GetStoryInfo2 {:#GetStoryInfo2}

For transition purposes only.

Request

Response

GetController {:#GetController}

Obtains a controller for a previously created story identified by its story ID. Obtaining the controller doesn‘t run it yet. If the story doesn’t exist, the interface request is closed.

Request

Watch {:#Watch}

Registers a watcher for changes in the story collection. DEPRECATED: In favor of GetStories().

Request

StoryProviderWatcher {:#StoryProviderWatcher}

Defined in fuchsia.modular/story_provider.fidl

Implemented by clients of StoryProvider.

OnChange {:#OnChange}

Called in three different situations:

  • Immediately when a new watcher is registered with one OnChange() invocation with the current infor and state of each story known on the current device.

  • Every time a change to StoryInfo is applied to the record of the story kept on the current device, including a new story created on another device becoming known on this device for the first time.

  • Every time the StoryState of the story changes on this device. The StoryState on another device of a story known on this device is not made known on this device.

  • Every time the StoryVisibilityState of the story changes on this device. The StoryVisibilityState on another device of a story known on this device is not made known on this device.

    I.e. if the story is started or stopped on another device, it does not cause an OnChange() call on this device. Cf. OnDelete() below.

The ID of the story the notifications are about are part of StoryInfo.

story_state is STOPPED if the story was just created or just became known on this device and was not yet started on the current device. It's RUNNING when the story is started on the current device.

story_visibility_state is DEFAULT until a mod on the current device requests for the visibility state to be changed.

Request

OnChange2 {:#OnChange2}

For transition purposes only.

Request

OnDelete {:#OnDelete}

Called when a story record is permanently deleted. The deletion could have originated on this or on another device.

If the story is running on this device at the time it is deleted, OnChange() will not be called first.

Request

StoryShell {:#StoryShell}

Defined in fuchsia.modular/story_shell.fidl

This interface is implemented by a story shell. Dependencies are passed to it in Initialize() on startup. The story shell is also expected to implement Lifecycle in order to receive a Terminate() call on teardown.

In one component instance there can only be one StoryShell service instance. The view token is sent to the separate View service. This way, the story shell may be implemented as a flutter component.

Teardown may occur via the session shell calling StoryController.Stop(), the sessionmgr being terminated, or by the system shutting down.

Initialize {:#Initialize}

Request

AddSurface {:#AddSurface}

Adds a new Surface and its corresponding view to be displayed by the StoryShell. More context that allows the story shell to decide how to layout will be added later. Also, interface to influence life cycle and focus is obviously missing. view_connection the new view and the associated Surface ID. surface_info metadata relating to the Surface.

Request

AddSurface2 {:#AddSurface2}

DEPRECATED. For transition purposes only.

Request

AddSurface3 {:#AddSurface3}

For transition purposes only.

Request

FocusSurface {:#FocusSurface}

Focuses the surface with surface_id, bringing it to the foreground.

Request

DefocusSurface {:#DefocusSurface}

Defocuses the surface with surface_id, dismissing it to the background.

Request

Response

OnSurfaceFocused {:#OnSurfaceFocused}

Notify when a Surface is focused in the story. The focus could be from a user interaction or requested by the framework through StoryController#FocusModule. EXPERIMENTAL

Response

RemoveSurface {:#RemoveSurface}

Remove the Surface with surface_id from the StoryShell entirely. This is final. The Surface is removed from the graph. If necessary, the associated Surface is defocused. There is no expectation that DefocusSurface is called before this.

Request

UpdateSurface {:#UpdateSurface}

Update the surface This is called when the intent is to update the surface metadata in the story graph in place. Any fields, except for the surface_id can be updated. If no value or null is passed for a field it remains unchanged. This includes the view_holder_token inside the connection.

E.g called when an intent resolves to a module that is known by the caller to already be running, to update associated metadata.

Request

UpdateSurface2 {:#UpdateSurface2}

DEPRECATED. For transition purposes only.

Request

UpdateSurface3 {:#UpdateSurface3}

For transition purposes only.

Request

StoryShellContext {:#StoryShellContext}

Defined in fuchsia.modular/story_shell.fidl

This interface provides the StoryShell instance with everything it needs to know or be able to do about the Story. Not much right now, but we expect this to increase.

GetPresentation {:#GetPresentation}

Requests a Presentation connection from the SessionShell. See SessionShellPresenationProvider in session_shell.fidl.

Request

WatchVisualState {:#WatchVisualState}

Starts watching Story shell's visual state.

Request

RequestView {:#RequestView}

Requests a view for a Surface. Requests that a view for surface_id is provided through StoryShell.ReconnectView().

Request

StoryVisualStateWatcher {:#StoryVisualStateWatcher}

Defined in fuchsia.modular/story_shell.fidl

Implemented by StoryShell to get notified about visual state changes.

OnVisualStateChange {:#OnVisualStateChange}

Request

StoryShellFactory {:#StoryShellFactory}

Defined in fuchsia.modular/story_shell_factory.fidl

StoryShellFactory creates or returns an existing StoryShell for a particular story. This is intended to be implemented by session shells that want to implement StoryShell functionality themselves.

AttachStory {:#AttachStory}

Requests a StoryShell for the story with the given story_id.

Request

DetachStory {:#DetachStory}

Instructs the session shell to teardown the story shell with the given story_id. This will be called before the story is stopped.

Request

Response

UserIntelligenceProvider {:#UserIntelligenceProvider}

Defined in fuchsia.modular/user_intelligence_provider.fidl

StartAgents {:#StartAgents}

The ComponentContext is used to create agents and use message queues.

Request

GetServicesForAgent {:#GetServicesForAgent}

A standard set of services provided to all agents at startup, along with services particuarly for this agent.

Request

Response

STRUCTS

Annotation {:#Annotation}

Defined in fuchsia.modular/annotation.fidl

A user-defined annotation for a story or module.

BaseShellParams {:#BaseShellParams}

Defined in fuchsia.modular/base_shell.fidl

UserLoginParams {:#UserLoginParams}

Defined in fuchsia.modular/user_provider.fidl

Used to specify arguments to log into a user session.

UserLoginParams2 {:#UserLoginParams2}

Defined in fuchsia.modular/user_provider.fidl

DEPRECATED, for backwards compatibility only

AppConfig {:#AppConfig}

Defined in fuchsia.modular/config.fidl

Used to pass around configuration references to apps such as user shell, base shell, story shell.

Intent {:#Intent}

Defined in fuchsia.modular/intent.fidl

The Intent struct is a runtime descriptor for an abstract action to be initiated in Fuchsia. For details please see docs/intent.md.

This is nullable for backwards compatibility.

IntentParameter {:#IntentParameter}

Defined in fuchsia.modular/intent.fidl

A struct representing a parameter that is passed to the handler of an Intent's Action.

LinkPath {:#LinkPath}

Defined in fuchsia.modular/link_path.fidl

Addresses a Link within a story. A LinkPath struct should be treated as an opaque unique identifier of a link instance. The module_path and link_name components are leftovers from legacy code and have no external meaning. TODO(thatguy,lindkvist): Replace this structure with a vector<>. MI4-1021

ModuleParameterMap {:#ModuleParameterMap}

Defined in fuchsia.modular/module_data.fidl

ModuleParameterMapEntry {:#ModuleParameterMapEntry}

Defined in fuchsia.modular/module_data.fidl

ModuleManifest {:#ModuleManifest}

Defined in fuchsia.modular/module_manifest.fidl

Metadata that define the runtime properties of a Module.

IntentFilter {:#IntentFilter}

Defined in fuchsia.modular/module_manifest.fidl

This struct is used to describe an intent that a module is able to handle.

ParameterConstraint {:#ParameterConstraint}

Defined in fuchsia.modular/module_manifest.fidl

FindModulesQuery {:#FindModulesQuery}

Defined in fuchsia.modular/module_resolver.fidl

Mirrors the information present in a Intent. Where a Intent is meant to interface between Modules and the Framework, this structure is specific to the interface between the Framework and the ModuleResolver.

In that role, it has references to structures and concepts that are only visible within the abstraction layer of the Framework.

FindModulesParameterConstraint {:#FindModulesParameterConstraint}

Defined in fuchsia.modular/module_resolver.fidl

FindModulesResponse {:#FindModulesResponse}

Defined in fuchsia.modular/module_resolver.fidl

FindModulesResult {:#FindModulesResult}

Defined in fuchsia.modular/module_resolver.fidl

FocusInfo {:#FocusInfo}

Defined in fuchsia.modular/focus.fidl

Specifies the focused story of a device.

ViewIdentifier {:#ViewIdentifier}

Defined in fuchsia.modular/session_shell.fidl

Identifies a view provided to a session shell. The values of the story_id field match those used in the StoryProvider interface, allowing identification of the same story across interfaces.

This is a struct rather than a naked string to allow for future evolution of the identifier without changing the SessionShell API itself.

CreateLinkInfo {:#CreateLinkInfo}

Defined in fuchsia.modular/create_link.fidl

Defines the attributes for a Link when the Link is created.

LinkAllowedTypes {:#LinkAllowedTypes}

Defined in fuchsia.modular/create_link.fidl

If empty, allows any Entity type.

CreateModuleParameterMapInfo {:#CreateModuleParameterMapInfo}

Defined in fuchsia.modular/create_module_parameter_map.fidl

Module parameters are named pointers to link instances.

CreateModuleParameterMapEntry {:#CreateModuleParameterMapEntry}

Defined in fuchsia.modular/create_module_parameter_map.fidl

StoryPuppetMaster_SetStoryInfoExtra_Response {:#StoryPuppetMaster_SetStoryInfoExtra_Response}

generated

StoryPuppetMaster_Annotate_Response {:#StoryPuppetMaster_Annotate_Response}

generated

StoryPuppetMaster_AnnotateModule_Response {:#StoryPuppetMaster_AnnotateModule_Response}

generated

ExecuteResult {:#ExecuteResult}

Defined in fuchsia.modular/puppet_master.fidl

SetFocusState {:#SetFocusState}

Defined in fuchsia.modular/story_command.fidl

AddMod {:#AddMod}

Defined in fuchsia.modular/story_command.fidl

Adds a mod described by intent to the story with name mod_name. If mod_name already exists in the story, the mod is updated.

Clients should treat the full vector as a single opaque value.

Clients should provide mod_name_transitional instead. If both are provided, mod_name is ignored.

RemoveMod {:#RemoveMod}

Defined in fuchsia.modular/story_command.fidl

Removes the mod under mod_name from the story.

Clients should provide mod_name_transitional instead. If both are provided, mod_name is ignored.

SetLinkValue {:#SetLinkValue}

Defined in fuchsia.modular/story_command.fidl

Sets the value of link at path to value.

FocusMod {:#FocusMod}

Defined in fuchsia.modular/story_command.fidl

Instructs the session shell to focus the mod under mod_name.

Clients should provide mod_name_transitional instead. If both are provided, mod_name is ignored.

SetKindOfProtoStoryOption {:#SetKindOfProtoStoryOption}

Defined in fuchsia.modular/story_command.fidl

Updates the kind_of_proto_story option in a story.

StoryController_Annotate_Response {:#StoryController_Annotate_Response}

generated

StoryInfo {:#StoryInfo}

Defined in fuchsia.modular/story_info.fidl

Information about a story as provided to the SessionShell.

A value of zero means the story has never been focused.

StoryInfoExtraEntry {:#StoryInfoExtraEntry}

Defined in fuchsia.modular/story_info.fidl

StoryOptions {:#StoryOptions}

Defined in fuchsia.modular/story_options.fidl

ViewConnection {:#ViewConnection}

Defined in fuchsia.modular/story_shell.fidl

A pair mapping a surface ID to a view (via view_holder_token).

ViewConnection2 {:#ViewConnection2}

Defined in fuchsia.modular/story_shell.fidl

DEPRECATED, for transition purposes only.

SurfaceInfo {:#SurfaceInfo}

Defined in fuchsia.modular/story_shell.fidl

Contains metadata for a Surface.

SurfaceRelation {:#SurfaceRelation}

Defined in fuchsia.modular/surface.fidl

Describes the relationship between two Surfaces. Provides information to the StoryShell for layout optimization.

Annotation {:#Annotation}

Defined in fuchsia.modular/annotation.fidl

A user-defined annotation for a story or module.

BaseShellParams {:#BaseShellParams}

Defined in fuchsia.modular/base_shell.fidl

UserLoginParams {:#UserLoginParams}

Defined in fuchsia.modular/user_provider.fidl

Used to specify arguments to log into a user session.

UserLoginParams2 {:#UserLoginParams2}

Defined in fuchsia.modular/user_provider.fidl

DEPRECATED, for backwards compatibility only

AppConfig {:#AppConfig}

Defined in fuchsia.modular/config.fidl

Used to pass around configuration references to apps such as user shell, base shell, story shell.

Intent {:#Intent}

Defined in fuchsia.modular/intent.fidl

The Intent struct is a runtime descriptor for an abstract action to be initiated in Fuchsia. For details please see docs/intent.md.

This is nullable for backwards compatibility.

IntentParameter {:#IntentParameter}

Defined in fuchsia.modular/intent.fidl

A struct representing a parameter that is passed to the handler of an Intent's Action.

LinkPath {:#LinkPath}

Defined in fuchsia.modular/link_path.fidl

Addresses a Link within a story. A LinkPath struct should be treated as an opaque unique identifier of a link instance. The module_path and link_name components are leftovers from legacy code and have no external meaning. TODO(thatguy,lindkvist): Replace this structure with a vector<>. MI4-1021

ModuleParameterMap {:#ModuleParameterMap}

Defined in fuchsia.modular/module_data.fidl

ModuleParameterMapEntry {:#ModuleParameterMapEntry}

Defined in fuchsia.modular/module_data.fidl

ModuleManifest {:#ModuleManifest}

Defined in fuchsia.modular/module_manifest.fidl

Metadata that define the runtime properties of a Module.

IntentFilter {:#IntentFilter}

Defined in fuchsia.modular/module_manifest.fidl

This struct is used to describe an intent that a module is able to handle.

ParameterConstraint {:#ParameterConstraint}

Defined in fuchsia.modular/module_manifest.fidl

FindModulesQuery {:#FindModulesQuery}

Defined in fuchsia.modular/module_resolver.fidl

Mirrors the information present in a Intent. Where a Intent is meant to interface between Modules and the Framework, this structure is specific to the interface between the Framework and the ModuleResolver.

In that role, it has references to structures and concepts that are only visible within the abstraction layer of the Framework.

FindModulesParameterConstraint {:#FindModulesParameterConstraint}

Defined in fuchsia.modular/module_resolver.fidl

FindModulesResponse {:#FindModulesResponse}

Defined in fuchsia.modular/module_resolver.fidl

FindModulesResult {:#FindModulesResult}

Defined in fuchsia.modular/module_resolver.fidl

FocusInfo {:#FocusInfo}

Defined in fuchsia.modular/focus.fidl

Specifies the focused story of a device.

ViewIdentifier {:#ViewIdentifier}

Defined in fuchsia.modular/session_shell.fidl

Identifies a view provided to a session shell. The values of the story_id field match those used in the StoryProvider interface, allowing identification of the same story across interfaces.

This is a struct rather than a naked string to allow for future evolution of the identifier without changing the SessionShell API itself.

CreateLinkInfo {:#CreateLinkInfo}

Defined in fuchsia.modular/create_link.fidl

Defines the attributes for a Link when the Link is created.

LinkAllowedTypes {:#LinkAllowedTypes}

Defined in fuchsia.modular/create_link.fidl

If empty, allows any Entity type.

CreateModuleParameterMapInfo {:#CreateModuleParameterMapInfo}

Defined in fuchsia.modular/create_module_parameter_map.fidl

Module parameters are named pointers to link instances.

CreateModuleParameterMapEntry {:#CreateModuleParameterMapEntry}

Defined in fuchsia.modular/create_module_parameter_map.fidl

StoryPuppetMaster_SetStoryInfoExtra_Response {:#StoryPuppetMaster_SetStoryInfoExtra_Response}

generated

StoryPuppetMaster_Annotate_Response {:#StoryPuppetMaster_Annotate_Response}

generated

StoryPuppetMaster_AnnotateModule_Response {:#StoryPuppetMaster_AnnotateModule_Response}

generated

ExecuteResult {:#ExecuteResult}

Defined in fuchsia.modular/puppet_master.fidl

SetFocusState {:#SetFocusState}

Defined in fuchsia.modular/story_command.fidl

AddMod {:#AddMod}

Defined in fuchsia.modular/story_command.fidl

Adds a mod described by intent to the story with name mod_name. If mod_name already exists in the story, the mod is updated.

Clients should treat the full vector as a single opaque value.

Clients should provide mod_name_transitional instead. If both are provided, mod_name is ignored.

RemoveMod {:#RemoveMod}

Defined in fuchsia.modular/story_command.fidl

Removes the mod under mod_name from the story.

Clients should provide mod_name_transitional instead. If both are provided, mod_name is ignored.

SetLinkValue {:#SetLinkValue}

Defined in fuchsia.modular/story_command.fidl

Sets the value of link at path to value.

FocusMod {:#FocusMod}

Defined in fuchsia.modular/story_command.fidl

Instructs the session shell to focus the mod under mod_name.

Clients should provide mod_name_transitional instead. If both are provided, mod_name is ignored.

SetKindOfProtoStoryOption {:#SetKindOfProtoStoryOption}

Defined in fuchsia.modular/story_command.fidl

Updates the kind_of_proto_story option in a story.

StoryController_Annotate_Response {:#StoryController_Annotate_Response}

generated

StoryInfo {:#StoryInfo}

Defined in fuchsia.modular/story_info.fidl

Information about a story as provided to the SessionShell.

A value of zero means the story has never been focused.

StoryInfoExtraEntry {:#StoryInfoExtraEntry}

Defined in fuchsia.modular/story_info.fidl

StoryOptions {:#StoryOptions}

Defined in fuchsia.modular/story_options.fidl

ViewConnection {:#ViewConnection}

Defined in fuchsia.modular/story_shell.fidl

A pair mapping a surface ID to a view (via view_holder_token).

ViewConnection2 {:#ViewConnection2}

Defined in fuchsia.modular/story_shell.fidl

DEPRECATED, for transition purposes only.

SurfaceInfo {:#SurfaceInfo}

Defined in fuchsia.modular/story_shell.fidl

Contains metadata for a Surface.

SurfaceRelation {:#SurfaceRelation}

Defined in fuchsia.modular/surface.fidl

Describes the relationship between two Surfaces. Provides information to the StoryShell for layout optimization.

ENUMS

AnnotationError {:#AnnotationError}

Type: uint32

Defined in fuchsia.modular/annotation.fidl

Error returned from calls to Annotate().

EntityWriteStatus {:#EntityWriteStatus}

Type: uint32

Defined in fuchsia.modular/entity.fidl

StartModuleStatus {:#StartModuleStatus}

Type: uint32

Defined in fuchsia.modular/module_context.fidl

Communicates the status of an Intent to a Module.

OngoingActivityType {:#OngoingActivityType}

Type: uint32

Defined in fuchsia.modular/module_context.fidl

ModuleSource {:#ModuleSource}

Type: uint32

Defined in fuchsia.modular/module_data.fidl

ModuleState {:#ModuleState}

Type: uint32

Defined in fuchsia.modular/module_state.fidl

State used to notify about state transitions of a Module instance. This is very similar to the StoryState, however it‘s not entirely the same and hence a separate type. A module cannot have an INITIAL state, because it’s started as soon as it is created, and it gets deleted as soon as it reaches the STOPPED state, whileas a story can be restarted.

Currently possible state transitions (and the events that cause them) are:

        -> RUNNING     ModuleContext.AddModuleToStory() or
                       ModuleContext.EmbedModule() or
                       StoryController.AddModule()

RUNNING -> STOPPED ModuleController.Stop() or StoryController.Stop() RUNNING -> ERROR application exits

FindModulesStatus {:#FindModulesStatus}

Type: uint32

Defined in fuchsia.modular/module_resolver.fidl

ExecuteStatus {:#ExecuteStatus}

Type: uint32

Defined in fuchsia.modular/puppet_master.fidl

ConfigureStoryError {:#ConfigureStoryError}

Type: int32

Defined in fuchsia.modular/puppet_master.fidl

StoryVisualState {:#StoryVisualState}

Type: uint32

Defined in fuchsia.modular/story_shell.fidl

Defines the visual state of the Story shell.

StoryState {:#StoryState}

Type: uint32

Defined in fuchsia.modular/story_state.fidl

State of a Story. A story is either running, stopping, or stopped, separately on every device of the user. If it‘s running, it can also be focused, but that’s tracked in a separate service, cf. FocusProvider in focus.fidl.

Possible state transitions are:

STOPPED -> RUNNING RUNNING -> STOPPING STOPPING -> STOPPED

StoryVisibilityState {:#StoryVisibilityState}

Type: uint32

Defined in fuchsia.modular/story_visibility_state.fidl

Visibility state of a Story within the session shell. This state describes how a story should be displayed within the session shell, regardless of whether the story is in focus or not. Focus state and visibility state are orthogonal concepts. E.g A story can be out-of-focus and be in IMMERSIVE state at the same time if a user was playing a video, exits, then re-enters the story. The expectation in this scenario is that the story is in IMMERSIVE state upon re-enter.

All state transitions are possible.

SurfaceArrangement {:#SurfaceArrangement}

Type: uint32

Defined in fuchsia.modular/surface.fidl

Expresses arrangement type.

SurfaceDependency {:#SurfaceDependency}

Type: uint32

Defined in fuchsia.modular/surface.fidl

Links surface dismissal.

AnnotationError {:#AnnotationError}

Type: uint32

Defined in fuchsia.modular/annotation.fidl

Error returned from calls to Annotate().

EntityWriteStatus {:#EntityWriteStatus}

Type: uint32

Defined in fuchsia.modular/entity.fidl

StartModuleStatus {:#StartModuleStatus}

Type: uint32

Defined in fuchsia.modular/module_context.fidl

Communicates the status of an Intent to a Module.

OngoingActivityType {:#OngoingActivityType}

Type: uint32

Defined in fuchsia.modular/module_context.fidl

ModuleSource {:#ModuleSource}

Type: uint32

Defined in fuchsia.modular/module_data.fidl

ModuleState {:#ModuleState}

Type: uint32

Defined in fuchsia.modular/module_state.fidl

State used to notify about state transitions of a Module instance. This is very similar to the StoryState, however it‘s not entirely the same and hence a separate type. A module cannot have an INITIAL state, because it’s started as soon as it is created, and it gets deleted as soon as it reaches the STOPPED state, whileas a story can be restarted.

Currently possible state transitions (and the events that cause them) are:

        -> RUNNING     ModuleContext.AddModuleToStory() or
                       ModuleContext.EmbedModule() or
                       StoryController.AddModule()

RUNNING -> STOPPED ModuleController.Stop() or StoryController.Stop() RUNNING -> ERROR application exits

FindModulesStatus {:#FindModulesStatus}

Type: uint32

Defined in fuchsia.modular/module_resolver.fidl

ExecuteStatus {:#ExecuteStatus}

Type: uint32

Defined in fuchsia.modular/puppet_master.fidl

ConfigureStoryError {:#ConfigureStoryError}

Type: int32

Defined in fuchsia.modular/puppet_master.fidl

StoryVisualState {:#StoryVisualState}

Type: uint32

Defined in fuchsia.modular/story_shell.fidl

Defines the visual state of the Story shell.

StoryState {:#StoryState}

Type: uint32

Defined in fuchsia.modular/story_state.fidl

State of a Story. A story is either running, stopping, or stopped, separately on every device of the user. If it‘s running, it can also be focused, but that’s tracked in a separate service, cf. FocusProvider in focus.fidl.

Possible state transitions are:

STOPPED -> RUNNING RUNNING -> STOPPING STOPPING -> STOPPED

StoryVisibilityState {:#StoryVisibilityState}

Type: uint32

Defined in fuchsia.modular/story_visibility_state.fidl

Visibility state of a Story within the session shell. This state describes how a story should be displayed within the session shell, regardless of whether the story is in focus or not. Focus state and visibility state are orthogonal concepts. E.g A story can be out-of-focus and be in IMMERSIVE state at the same time if a user was playing a video, exits, then re-enters the story. The expectation in this scenario is that the story is in IMMERSIVE state upon re-enter.

All state transitions are possible.

SurfaceArrangement {:#SurfaceArrangement}

Type: uint32

Defined in fuchsia.modular/surface.fidl

Expresses arrangement type.

SurfaceDependency {:#SurfaceDependency}

Type: uint32

Defined in fuchsia.modular/surface.fidl

Links surface dismissal.

TABLES

AgentServiceRequest {:#AgentServiceRequest}

Defined in fuchsia.modular/component_context.fidl

Used by ComponentContext.ConnectToAgentService

ModuleData {:#ModuleData}

Defined in fuchsia.modular/module_data.fidl

Information about a Module instance in a story.

TODO(thatguy,mesch): This field should now always be set, so make it required once the framework is cleaned up enough to guarantee this statement.

The Annotation.value field of each Annotation is always set.

ActionDisplay {:#ActionDisplay}

Defined in fuchsia.modular/module_manifest.fidl

Defines how a suggestion of an action will be presented.

DisplayInfo {:#DisplayInfo}

Defined in fuchsia.modular/module_manifest.fidl

Presentation information about the suggestion.

ParameterMapping {:#ParameterMapping}

Defined in fuchsia.modular/module_manifest.fidl

Defines pairs that will be replaced in the DisplayInfo.

StoryInfo2 {:#StoryInfo2}

Defined in fuchsia.modular/story_info.fidl

Information about a story as provided to the SessionShell. For transition purposes only.

A value of zero means the story has never been focused.

The Annotation.value field of each Annotation is always set.

SurfaceInfo2 {:#SurfaceInfo2}

Defined in fuchsia.modular/story_shell.fidl

Contains metadata for a Surface.

The Annotation.value field of each Annotation is always set.

AgentServiceRequest {:#AgentServiceRequest}

Defined in fuchsia.modular/component_context.fidl

Used by ComponentContext.ConnectToAgentService

ModuleData {:#ModuleData}

Defined in fuchsia.modular/module_data.fidl

Information about a Module instance in a story.

TODO(thatguy,mesch): This field should now always be set, so make it required once the framework is cleaned up enough to guarantee this statement.

The Annotation.value field of each Annotation is always set.

ActionDisplay {:#ActionDisplay}

Defined in fuchsia.modular/module_manifest.fidl

Defines how a suggestion of an action will be presented.

DisplayInfo {:#DisplayInfo}

Defined in fuchsia.modular/module_manifest.fidl

Presentation information about the suggestion.

ParameterMapping {:#ParameterMapping}

Defined in fuchsia.modular/module_manifest.fidl

Defines pairs that will be replaced in the DisplayInfo.

StoryInfo2 {:#StoryInfo2}

Defined in fuchsia.modular/story_info.fidl

Information about a story as provided to the SessionShell. For transition purposes only.

A value of zero means the story has never been focused.

The Annotation.value field of each Annotation is always set.

SurfaceInfo2 {:#SurfaceInfo2}

Defined in fuchsia.modular/story_shell.fidl

Contains metadata for a Surface.

The Annotation.value field of each Annotation is always set.

UNIONS

IntentParameterData {:#IntentParameterData}

Defined in fuchsia.modular/intent.fidl

DEPRECATED: Use entity_reference.

Only one entry in entity_type must match the constraint specified by the Module for the constraint to be considered satisfied.

CreateModuleParameterInfo {:#CreateModuleParameterInfo}

Defined in fuchsia.modular/create_module_parameter_map.fidl

StoryPuppetMaster_SetStoryInfoExtra_Result {:#StoryPuppetMaster_SetStoryInfoExtra_Result}

generated

StoryPuppetMaster_Annotate_Result {:#StoryPuppetMaster_Annotate_Result}

generated

StoryPuppetMaster_AnnotateModule_Result {:#StoryPuppetMaster_AnnotateModule_Result}

generated

StoryCommand {:#StoryCommand}

Defined in fuchsia.modular/story_command.fidl

StoryCommands are POD structures that describe the set of operations that can be performed on a story by components outside the modular framework. All commands are:

(1) Scoped to a single story (2) Idempotent: issuing the same command twice yields the same result (3) Symmetrical with observation: the same structures are used to describe operations to watchers of a story (through SessionWatcher) as are used to control a story.

StoryController_Annotate_Result {:#StoryController_Annotate_Result}

generated

IntentParameterData {:#IntentParameterData}

Defined in fuchsia.modular/intent.fidl

DEPRECATED: Use entity_reference.

Only one entry in entity_type must match the constraint specified by the Module for the constraint to be considered satisfied.

CreateModuleParameterInfo {:#CreateModuleParameterInfo}

Defined in fuchsia.modular/create_module_parameter_map.fidl

StoryPuppetMaster_SetStoryInfoExtra_Result {:#StoryPuppetMaster_SetStoryInfoExtra_Result}

generated

StoryPuppetMaster_Annotate_Result {:#StoryPuppetMaster_Annotate_Result}

generated

StoryPuppetMaster_AnnotateModule_Result {:#StoryPuppetMaster_AnnotateModule_Result}

generated

StoryCommand {:#StoryCommand}

Defined in fuchsia.modular/story_command.fidl

StoryCommands are POD structures that describe the set of operations that can be performed on a story by components outside the modular framework. All commands are:

(1) Scoped to a single story (2) Idempotent: issuing the same command twice yields the same result (3) Symmetrical with observation: the same structures are used to describe operations to watchers of a story (through SessionWatcher) as are used to control a story.

StoryController_Annotate_Result {:#StoryController_Annotate_Result}

generated

XUNIONS

AnnotationValue {:#AnnotationValue}

Defined in fuchsia.modular/annotation.fidl

The value of a Annotation.

The actual field used depends on the type of annotation, which is user-defined, and not enforced by the framework.

The size of buffer is limited to MAX_ANNOTATION_VALUE_BUFFER_LENGTH_BYTES bytes.

AnnotationValue {:#AnnotationValue}

Defined in fuchsia.modular/annotation.fidl

The value of a Annotation.

The actual field used depends on the type of annotation, which is user-defined, and not enforced by the framework.

The size of buffer is limited to MAX_ANNOTATION_VALUE_BUFFER_LENGTH_BYTES bytes.

CONSTANTS

Does not apply to other fields; see MAX_ANNOTATION_VALUE_LENGTH.

Does not apply to other fields; see MAX_ANNOTATION_VALUE_LENGTH.