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