blob: d6339a43dbbc470a3f12f8fbdb7271ab6c492a90 [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 filesystems which wish to be globally exposed under the filesystem host.
[Discoverable, ForDeprecatedCBindings]
protocol Registry {
/// Registers the output directory of a filesystem. These filesystems are
/// exported from the fuchsia.fshost.Filesystems service, where they are
/// be identified by an instance number (of the form "000", "001", etc).
/// This directory is automatically de-registered from fuchsia.fshost.Filesystems
/// if the server end of the connection is closed.
RegisterFilesystem( public_export) -> (zx.status s);
/// A collection of all registered filesystems.
[Discoverable, ForDeprecatedCBindings]
protocol Filesystems {
/// Manages the block watcher.
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
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(43186): replace with the component manager shutdown API once it
// becomes available.
Shutdown() -> ();