| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.modular.session; |
| |
| using fuchsia.io; |
| using fuchsia.ui.policy; |
| using fuchsia.sys; |
| |
| /// Descriptions and defaults for these configurations are echoed in |
| /// peridot/docs/modular/guide/config.md. |
| table BasemgrConfig { |
| /// When set to false, Cobalt statistics are disabled. |
| /// Default: true |
| 1: bool enable_cobalt; |
| |
| 2: reserved; |
| |
| /// Create story shells through StoryShellFactory exposed by the session |
| /// shell instead of creating separate story shell components. When set, |
| /// `story_shell_url` and any story shell args are ignored. |
| /// Default: false |
| 3: bool use_session_shell_for_story_shell_factory; |
| |
| /// Launch configurations specific to base shell. |
| 4: BaseShellConfig base_shell; |
| |
| /// A map of launch configurations specific to session shells. |
| 5: vector<SessionShellMapEntry> session_shell_map; |
| |
| /// Launch configurations specific to story shell. |
| 6: StoryShellConfig story_shell; |
| |
| 7: reserved; |
| |
| /// Launch configuration for a session launcher component. |
| /// |
| /// If specified, this component is started instead of sessionmgr, |
| /// and all other configuration fields are ignored, except `enable_cobalt`. |
| /// |
| /// The session launcher component can then use the `Launcher` protocol |
| /// to launch sessionmgr with a particular configuration. |
| 8: AppConfig session_launcher; |
| }; |
| |
| table BaseShellConfig { |
| /// Contains the fuchsia package url and arguments to pass to the shell. |
| 1: AppConfig app_config; |
| |
| /// When set to true, the base shell is kept alive after a log in. This is |
| /// used for testing because current integration tests expect base shell |
| /// to always be running. |
| /// Default: false |
| 2: bool keep_alive_after_login; |
| }; |
| |
| table SessionShellMapEntry { |
| /// The name of the session shell represented by its url. |
| 1: string:fuchsia.io.MAX_PATH name; |
| |
| /// The launch configurations for the session shell. |
| 2: SessionShellConfig config; |
| }; |
| |
| table SessionShellConfig { |
| /// Contains the fuchsia package url and arguments to pass to the shell. |
| 1: AppConfig app_config; |
| |
| /// The display usage policy for this session shell. |
| /// |
| /// Optional: defaults to DisplayUsage::kUnknown. |
| 2: fuchsia.ui.policy.DisplayUsage display_usage; |
| |
| /// The screen height in millimeters for the session shell's display. |
| /// |
| /// Optional: defaults to full screen. |
| 3: float32 screen_height; |
| |
| /// The screen width in millimeters for the session shell's display. |
| /// |
| /// Optional: defaults to full screen. |
| 4: float32 screen_width; |
| }; |
| |
| table StoryShellConfig { |
| /// Contains the fuchsia package url and arguments to pass to the shell. |
| 1: AppConfig app_config; |
| }; |
| |
| table SessionmgrConfig { |
| 1: reserved; |
| |
| /// When set to false, Cobalt statistics are disabled. This is used for |
| /// testing. |
| /// Default: true |
| 2: bool enable_cobalt; |
| |
| 3: bool reserved; |
| |
| 4: reserved; |
| |
| /// A list of fuchsia package urls that specify which agents to launch at |
| /// startup. |
| 5: vector<string:fuchsia.io.MAX_PATH> startup_agents; |
| |
| /// A list of fuchsia package urls that specify which agents to launch at |
| /// startup with PuppetMaster and FocusProvider services. |
| 6: vector<string:fuchsia.io.MAX_PATH> session_agents; |
| |
| /// The fuchsia package url for which story shell to use. |
| 7: string:fuchsia.io.MAX_PATH story_shell_url; |
| |
| /// A map of agents to the arguments they should be started with. |
| 8: vector<AppConfig> component_args; |
| |
| 9: reserved; |
| |
| /// A list of services mapped to the component URL that serves it. |
| /// Valid components to specify here are agents or the session shell. |
| /// Services listed here are available in the incoming namespaces for |
| /// modules, shells, and agents. |
| 10: vector<AgentServiceIndexEntry> agent_service_index; |
| |
| /// A list of agent URLs that will cause the session to be restarted |
| /// when they terminate. If an agent is not in this list, sessionmgr will |
| /// restart it individually, preserving the session. |
| /// |
| /// The session shell is automatically added to this list. |
| 11: vector<string:fuchsia.io.MAX_PATH>:MAX restart_session_on_agent_crash; |
| }; |
| |
| /// Used to pass around configuration references to apps such as base shell, |
| /// session shell, story shell, and agents. |
| table AppConfig { |
| /// The fuchsia package url for app. |
| 1: string:fuchsia.io.MAX_PATH url; |
| |
| /// The arguments for the app. |
| 2: vector<string> args; |
| }; |
| |
| /// A service and the URL of the agent known to provide that service. |
| table AgentServiceIndexEntry { |
| /// The service name. |
| 1: string service_name; |
| |
| /// The fuchsia component url for agent. |
| 2: fuchsia.sys.component_url agent_url; |
| }; |
| |
| /// Contains the configurations for the modular framework components. |
| table ModularConfig { |
| 1: BasemgrConfig basemgr_config; |
| |
| 2: SessionmgrConfig sessionmgr_config; |
| }; |