blob: ff27c451ea1b72b0756f0ebed19065914f94b0cb [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;
using fuchsia.auth;
using fuchsia.ui.policy;
// This interface is implemented by a base shell. Dependencies and parameters
// are passed to it in Initialize() on startup. The base shell is also
// expected to implement Lifecycle in order to receive a Terminate() call on
// teardown.
// In one component instance there can only be one BaseShell service instance.
// The ViewOwner request is sent to the separate ViewProvider service. This way,
// the base shell may be implemented as a flutter component.
// Teardown may be initiated by the base shell calling
// BaseShellContext.Shutdown(), or by the system shutting down.
interface BaseShell {
1: Initialize(BaseShellContext base_shell_context,
BaseShellParams base_shell_params);
// This method may be invoked by the basemgr to request an
// AuthenticationUIContext. |request| will then be used to request the base
// shell to show login screen during a UserProvider.AddUser() or if a token
// needs to be refreshed.
3: GetAuthenticationUIContext(request<fuchsia.auth.AuthenticationUIContext> request);
// This interface allows the |BaseShell| to request capabilities from the
// |Basemgr| in a way that is more explicit about the services that are
// offered than a generic |ServiceProvider|.
interface BaseShellContext {
1: GetUserProvider(request<UserProvider> request);
// This requests the shutdown of the basemgr.
2: Shutdown();
// These params are passed to |BaseShell.Initialize|.
struct BaseShellParams {
// TODO(jjosh): make this non-optional, if feasible.
fuchsia.ui.policy.Presentation? presentation;