blob: 89189467da07e80db2fb607c4b7e5dd7eaa21d0b [file] [log] [blame]
// Copyright 2020 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.mem;
using fuchsia.sys;
/// A protocol used to launch sessionmgr.
///
/// basemgr serves this protocol to session components.
[Discoverable]
protocol Launcher {
/// Launches an instance of sessionmgr with the given Modular configuration.
///
/// |config| should contain all configuration necessary for starting a
/// session. When LaunchSessionmgr is called, basemgr uses only |config| to
/// configure the session. It does not use any fields from its startup
/// configuration (/config(_override)/data/startup.config).
///
/// |config| cannot include a session launcher component.
///
/// If sessionmgr is already running, it will be stopped and restarted with
/// the new configuration.
///
/// On error, the protocol channel is closed with:
///
/// * `ZX_ERR_INVALID_ARGS`: |config| is invalid, could not be read, or
/// includes a session launcher component.
/// * `ZX_ERR_BAD_STATE`: The session cannot be launched because
/// basemgr is shutting down.
///
/// * `config` Modular configuration serialized as UTF-8 JSON
LaunchSessionmgr(fuchsia.mem.Buffer config);
/// Launches an instance of sessionmgr with the given Modular configuration and
/// a list of services to be provided to agents in
/// ModularConfig.sessionmgr_config.session_agents and .startup_agents.
///
/// |additional_services.host_directory| is required. The channel will close with
/// ZX_ERR_INVALID_ARGS if not present.
LaunchSessionmgrWithServices(fuchsia.mem.Buffer config,
fuchsia.sys.ServiceList additional_services);
};