blob: e800e9083e23959602f272e20f99ccceea487fe3 [file] [log] [blame]
// Copyright 2020 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.device.manager;
using zx;
using fuchsia.hardware.power.statecontrol;
/// Provides protocol for managing driver manager and all the devices during a
/// system state transition.
protocol SystemStateTransition {
/// Sets and updates the termination SystemPowerState of driver_manager.
/// On Success, the system power state is cached. The next time
/// driver_manager's stop event is triggered, driver_manager suspends
/// the system to "state".
/// Returns ZX_ERR_INVALID_ARGS if the system power state is not a shutdown/reboot
/// Returns ZX_ERR_BAD_STATE if driver_manager is unable to save the state.
/// Each time the api is called the termination state is updated and cached.
SetTerminationSystemState(fuchsia.hardware.power.statecontrol.SystemPowerState state) -> () error zx.status;