| // 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() -> (struct { |
| status zx.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() -> (struct { |
| status zx.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() -> (); |
| }; |