blob: cc0036ff21f2574bd5ab767cd4ec687f6d2db7b4 [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.
type BlockRegion = struct {
offset uint64;
length uint64;
};
@discoverable
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;
});
};
protocol CorruptBlobHandler {
/// Notify that a particular blob is corrupted to the CorruptBlobHandler service.
CorruptBlob(struct {
merkleroot vector<uint8>:64;
});
};