blob: ade34ec73c75f452c52299402e77697dd11ac3fd [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.modular;
/// 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.
interface ModuleController {
/// Requests that this module become the focused module in the story.
2: Focus();
/// Requests that this module be hidden in the story.
3: Defocus();
/// 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.
4: Stop() -> ();
/// 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.
5: -> OnStateChange(ModuleState new_state);