blob: 5a9f4402e7c26535d04ed9acfff5d17b703dc0cd [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.internal;
using fuchsia.auth;
using fuchsia.modular;
using fuchsia.modular.auth;
using fuchsia.ui.policy;
using fuchsia.ui.viewsv1token;
// The basemgr application (there is no |Basemgr| service) requests
// an instance of this service in order to launch and display a |Sessionmgr| per
// user.
// TODO(alexmin): Re-word this bit once the Sessionmgr implementation is landed.
[Discoverable] // Created by sessionmgr application.
interface Sessionmgr {
// Launches a sessionmgr instance for a user identified by |user_id| and
// specific TokenManager handles for ledger and agent_runner.
// TODO(alhaad): Fold paramters into |UserContext|.
1: Initialize(fuchsia.modular.auth.Account? account,
fuchsia.modular.AppConfig session_shell,
fuchsia.modular.AppConfig story_shell,
fuchsia.auth.TokenManager? ledger_token_manager,
fuchsia.auth.TokenManager? agent_token_manager,
UserContext user_context,
request<fuchsia.ui.viewsv1token.ViewOwner>? view_owner);
2: SwapSessionShell(fuchsia.modular.AppConfig session_shell) -> ();
// This interface is provided by basemgr to |Sessionmgr|.
interface UserContext {
// See detailed comments in SessionShellContext.Logout().
1: Logout();
2: GetPresentation(request<fuchsia.ui.policy.Presentation> presentation);