blob: 6958002b95a87e20f0f3e31975c88b23dee55de1 [file] [log] [blame]
// Copyright 2020 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.
#ifndef ZIRCON_SYSTEM_ULIB_BLOBFS_ITERATOR_BLOCK_ITERATOR_PROVIDER_H_
#define ZIRCON_SYSTEM_ULIB_BLOBFS_ITERATOR_BLOCK_ITERATOR_PROVIDER_H_
#include <memory>
#include "block-iterator.h"
namespace blobfs {
// Interface for a class that provides instances of `BlockIterator` by node index.
class BlockIteratorProvider {
public:
// Provide a valid `BlockIterator` for the block at node index `node_index`.
virtual BlockIterator BlockIteratorByNodeIndex(uint32_t node_index) = 0;
};
} // namespace blobfs
#endif // ZIRCON_SYSTEM_ULIB_BLOBFS_ITERATOR_BLOCK_ITERATOR_PROVIDER_H_