blob: f3488ddfbb98ad106e629608183d1f54236fa7b6 [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;
/// A protocol used to launch sessionmgr.
/// basemgr serves this protocol to session components.
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(resource struct {
config fuchsia.mem.Buffer;