blob: f405ac68f705cd437dae51e6600771d805aadcc7 [file] [log] [blame]
// Copyright 2016 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.sys;
/// An interface for controlling an environment.
///
/// Closing this interface implicitly kills the controlled environment unless
/// the `Detach` method has been called.
///
/// If the environment is destroyed, this interface will be closed.
///
/// Typically obtained via `Environment.CreateNestedEnvironment`.
closed protocol EnvironmentController {
/// Terminates the environment.
///
/// When an `Environment` is terminated, all applications launched
/// in the environment (and in all transitively nested environments) are also
/// killed.
strict Kill() -> ();
/// Decouples the lifetime of the environment from this controller.
///
/// After calling `Detach`, the environment will not be implicitly killed when
/// this interface is closed.
strict Detach();
/// Event that is triggered when the environment is created.
strict -> OnCreated();
};