]> git.ipfire.org Git - thirdparty/git.git/blame - reftable/generic.h
Merge branch 'rs/opt-parse-long-fixups'
[thirdparty/git.git] / reftable / generic.h
CommitLineData
17df8dbe
HWN
1/*
2Copyright 2020 Google LLC
3
4Use of this source code is governed by a BSD-style
5license that can be found in the LICENSE file or at
6https://developers.google.com/open-source/licenses/bsd
7*/
8
9#ifndef GENERIC_H
10#define GENERIC_H
11
12#include "record.h"
13#include "reftable-generic.h"
14
15/* generic interface to reftables */
16struct reftable_table_vtable {
17 int (*seek_record)(void *tab, struct reftable_iterator *it,
18 struct reftable_record *);
19 uint32_t (*hash_id)(void *tab);
20 uint64_t (*min_update_index)(void *tab);
21 uint64_t (*max_update_index)(void *tab);
22};
23
24struct reftable_iterator_vtable {
25 int (*next)(void *iter_arg, struct reftable_record *rec);
26 void (*close)(void *iter_arg);
27};
28
29void iterator_set_empty(struct reftable_iterator *it);
30int iterator_next(struct reftable_iterator *it, struct reftable_record *rec);
31
32#endif