Blame


1 efd2a263 2018-01-19 stsp /*
2 efd2a263 2018-01-19 stsp * Copyright (c) 2018 Stefan Sperling <stsp@openbsd.org>
3 efd2a263 2018-01-19 stsp *
4 efd2a263 2018-01-19 stsp * Permission to use, copy, modify, and distribute this software for any
5 efd2a263 2018-01-19 stsp * purpose with or without fee is hereby granted, provided that the above
6 efd2a263 2018-01-19 stsp * copyright notice and this permission notice appear in all copies.
7 efd2a263 2018-01-19 stsp *
8 efd2a263 2018-01-19 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 efd2a263 2018-01-19 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 efd2a263 2018-01-19 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 efd2a263 2018-01-19 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 efd2a263 2018-01-19 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 efd2a263 2018-01-19 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 efd2a263 2018-01-19 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 efd2a263 2018-01-19 stsp */
16 efd2a263 2018-01-19 stsp
17 c3703302 2018-01-23 stsp struct got_delta {
18 c3703302 2018-01-23 stsp SIMPLEQ_ENTRY(got_delta) entry;
19 96f5e8b3 2018-01-23 stsp char *path_packfile;
20 96f5e8b3 2018-01-23 stsp off_t offset;
21 96f5e8b3 2018-01-23 stsp int type;
22 5a2e13f7 2018-01-23 stsp size_t size;
23 96f5e8b3 2018-01-23 stsp };
24 96f5e8b3 2018-01-23 stsp
25 96f5e8b3 2018-01-23 stsp struct got_delta_chain {
26 96f5e8b3 2018-01-23 stsp int nentries;
27 c3703302 2018-01-23 stsp SIMPLEQ_HEAD(, got_delta) entries;
28 96f5e8b3 2018-01-23 stsp };
29 96f5e8b3 2018-01-23 stsp
30 c3703302 2018-01-23 stsp struct got_delta *got_delta_open(const char *, int, off_t, size_t);
31 c3703302 2018-01-23 stsp void got_delta_close(struct got_delta *);
32 96f5e8b3 2018-01-23 stsp const struct got_error *got_delta_chain_get_base_type(int *,
33 96f5e8b3 2018-01-23 stsp struct got_delta_chain *) ;
34 efd2a263 2018-01-19 stsp const struct got_error *
35 efd2a263 2018-01-19 stsp got_delta_apply(struct got_repository *, FILE *, size_t, struct got_object *,
36 efd2a263 2018-01-19 stsp FILE *);