#include "reader.h"
#include "system.h"
#include "block.h"
#include "constants.h"
#include "iter.h"
#include "record.h"
#include "reftable-error.h"
uint64_t block_source_size(struct reftable_block_source *source)
{ … }
int block_source_read_block(struct reftable_block_source *source,
struct reftable_block *dest, uint64_t off,
uint32_t size)
{ … }
void block_source_close(struct reftable_block_source *source)
{ … }
static struct reftable_reader_offsets *
reader_offsets_for(struct reftable_reader *r, uint8_t typ)
{ … }
static int reader_get_block(struct reftable_reader *r,
struct reftable_block *dest, uint64_t off,
uint32_t sz)
{ … }
uint32_t reftable_reader_hash_id(struct reftable_reader *r)
{ … }
const char *reader_name(struct reftable_reader *r)
{ … }
static int parse_footer(struct reftable_reader *r, uint8_t *footer,
uint8_t *header)
{ … }
struct table_iter { … };
static int table_iter_init(struct table_iter *ti, struct reftable_reader *r)
{ … }
static int table_iter_next_in_block(struct table_iter *ti,
struct reftable_record *rec)
{ … }
static void table_iter_block_done(struct table_iter *ti)
{ … }
static int32_t extract_block_size(uint8_t *data, uint8_t *typ, uint64_t off,
int version)
{ … }
int reader_init_block_reader(struct reftable_reader *r, struct block_reader *br,
uint64_t next_off, uint8_t want_typ)
{ … }
static void table_iter_close(struct table_iter *ti)
{ … }
static int table_iter_next_block(struct table_iter *ti)
{ … }
static int table_iter_next(struct table_iter *ti, struct reftable_record *rec)
{ … }
static int table_iter_seek_to(struct table_iter *ti, uint64_t off, uint8_t typ)
{ … }
static int table_iter_seek_start(struct table_iter *ti, uint8_t typ, int index)
{ … }
static int table_iter_seek_linear(struct table_iter *ti,
struct reftable_record *want)
{ … }
static int table_iter_seek_indexed(struct table_iter *ti,
struct reftable_record *rec)
{ … }
static int table_iter_seek(struct table_iter *ti,
struct reftable_record *want)
{ … }
static int table_iter_seek_void(void *ti, struct reftable_record *want)
{ … }
static int table_iter_next_void(void *ti, struct reftable_record *rec)
{ … }
static void table_iter_close_void(void *ti)
{ … }
static struct reftable_iterator_vtable table_iter_vtable = …;
static void iterator_from_table_iter(struct reftable_iterator *it,
struct table_iter *ti)
{ … }
int reader_init_iter(struct reftable_reader *r,
struct reftable_iterator *it,
uint8_t typ)
{ … }
int reftable_reader_init_ref_iterator(struct reftable_reader *r,
struct reftable_iterator *it)
{ … }
int reftable_reader_init_log_iterator(struct reftable_reader *r,
struct reftable_iterator *it)
{ … }
int reftable_reader_new(struct reftable_reader **out,
struct reftable_block_source *source, char const *name)
{ … }
void reftable_reader_incref(struct reftable_reader *r)
{ … }
void reftable_reader_decref(struct reftable_reader *r)
{ … }
static int reftable_reader_refs_for_indexed(struct reftable_reader *r,
struct reftable_iterator *it,
uint8_t *oid)
{ … }
static int reftable_reader_refs_for_unindexed(struct reftable_reader *r,
struct reftable_iterator *it,
uint8_t *oid)
{ … }
int reftable_reader_refs_for(struct reftable_reader *r,
struct reftable_iterator *it, uint8_t *oid)
{ … }
uint64_t reftable_reader_max_update_index(struct reftable_reader *r)
{ … }
uint64_t reftable_reader_min_update_index(struct reftable_reader *r)
{ … }
int reftable_reader_print_blocks(const char *tablename)
{ … }