blob: a693d3658831d5ad17fceaaf1d0e676bce72254a [file] [log] [blame]
// Copyright 2023 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.session;
/// A protocol used to restart the currently running session.
@discoverable
closed protocol Restarter {
/// Restarts the session.
///
/// * error `RestartError.NOT_RUNNING` if there is no
/// currently running session to restart.
/// * error `RestartError.DESTROY_COMPONENT_FAILED` if an existing session component
/// could not be destroyed. The existing session remains running at this point.
/// * error `RestartError.CREATE_COMPONENT_FAILED` if the session component
/// could not be started. No session will be running at this point.
strict Restart() -> () error RestartError;
};
/// An error that occurs when restarting a session.
type RestartError = flexible enum {
/// There is no currently running session to restart.
NOT_RUNNING = 1;
/// There was an error resolving the session's component URL.
NOT_FOUND = 2;
/// The session component could not be destroyed.
DESTROY_COMPONENT_FAILED = 3;
/// The session component could not be created.
CREATE_COMPONENT_FAILED = 4;
};