| // 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.blobfs; |
| |
| using zx; |
| |
| /// Describes contiguous run of allocated blocks. |
| [ForDeprecatedCBindings] |
| struct BlockRegion { |
| uint64 offset; |
| uint64 length; |
| }; |
| |
| [ForDeprecatedCBindings] |
| protocol Blobfs { |
| /// Retrieve information about allocated regions on the filesystem. |
| GetAllocatedRegions() -> (zx.status status, zx.handle:VMO? regions, uint64 count); |
| |
| /// Assign the handler for blob corruption callbacks. Only one handler will receive callbacks at |
| /// any given time. |
| SetCorruptBlobHandler(CorruptBlobHandler handler) -> (zx.status status); |
| }; |
| |
| [ForDeprecatedCBindings] |
| protocol CorruptBlobHandler { |
| /// Notify that a particular blob is corrupted to the CorruptBlobHandler service. |
| CorruptBlob(vector<uint8>:64 merkleroot); |
| }; |