2
* Copyright 2008, 2009 Alexandros Frantzis, Michael Iatrou
4
* This file is part of libbls.
6
* libbls is free software: you can redistribute it and/or modify it under the
7
* terms of the GNU Lesser General Public License as published by the Free Software
8
* Foundation, either version 3 of the License, or (at your option) any later
11
* libbls is distributed in the hope that it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16
* You should have received a copy of the GNU General Public License along with
17
* libbls. If not, see <http://www.gnu.org/licenses/>.
21
* @file segcol_internal.h
23
* Segcol definitions for internal use
25
#ifndef _SEGCOL_INTERNAL_H
26
#define _SEGCOL_INTERNAL_H
37
* Struct that holds the function pointers for an implementation of segcol_t.
40
int (*free)(segcol_t *segcol);
41
int (*append)(segcol_t *segcol, segment_t *seg);
42
int (*insert)(segcol_t *segcol, off_t offset, segment_t *seg);
43
int (*delete)(segcol_t *segcol, segcol_t **deleted, off_t offset,
45
int (*find)(segcol_t *segcol, segcol_iter_t **iter, off_t offset);
46
int (*iter_new)(segcol_t *segcol, void **iter);
47
int (*iter_next)(segcol_iter_t *iter);
48
int (*iter_is_valid)(segcol_iter_t *iter, int *valid);
49
int (*iter_get_segment)(segcol_iter_t *iter, segment_t **seg);
50
int (*iter_get_mapping)(segcol_iter_t *iter, off_t *mapping);
51
int (*iter_free)(segcol_iter_t *iter);
55
* @name Internal functions
59
int segcol_create_impl(segcol_t **segcol, void *impl,
60
struct segcol_funcs *funcs);
62
void *segcol_get_impl(segcol_t *segcol);
64
void *segcol_iter_get_impl(segcol_iter_t *iter);
70
#endif /* _SEGCOL_INTERNAL_H */