blob: ce2e26acf2b6b470e5464c9eea315ca1bb64e9da [file] [log] [blame]
// Copyright 2019 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.fshost;
using zx;
/// Manages the block watcher.
[Discoverable]
protocol BlockWatcher {
/// Pauses the block watcher. This causes the block watcher to drop all
/// new block device events.
/// Returns ZX_ERR_UNAVAILABLE if the watcher has been paused too many times.
Pause() -> (zx.status status);
/// Resumes the block watcher. The block watcher won't resume until every
/// Pause() call has had a corresponding Resume().
/// Returns ZX_ERR_BAD_STATE if the watcher isn't paused.
Resume() -> (zx.status status);
};
/// Manages fshost lifecycle
[Discoverable]
protocol Admin {
/// Causes fshost to unmount all filesystems and exit. Fshost has
/// successfully unmounted all filesystems when this function returns, and
/// exits immediately after writing the response to this function.
// TODO(fxbug.dev/43186): replace with the component manager shutdown API once it
// becomes available.
Shutdown() -> ();
};