Blame


1 54be8251 2018-06-04 stsp /*
2 54be8251 2018-06-04 stsp * Copyright (c) 2018 Stefan Sperling <stsp@openbsd.org>
3 54be8251 2018-06-04 stsp *
4 54be8251 2018-06-04 stsp * Permission to use, copy, modify, and distribute this software for any
5 54be8251 2018-06-04 stsp * purpose with or without fee is hereby granted, provided that the above
6 54be8251 2018-06-04 stsp * copyright notice and this permission notice appear in all copies.
7 54be8251 2018-06-04 stsp *
8 54be8251 2018-06-04 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 54be8251 2018-06-04 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 54be8251 2018-06-04 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 54be8251 2018-06-04 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 54be8251 2018-06-04 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 54be8251 2018-06-04 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 54be8251 2018-06-04 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 54be8251 2018-06-04 stsp */
16 54be8251 2018-06-04 stsp
17 54be8251 2018-06-04 stsp struct got_object_idset;
18 54be8251 2018-06-04 stsp
19 54be8251 2018-06-04 stsp struct got_object_idset *got_object_idset_alloc(void);
20 54be8251 2018-06-04 stsp void got_object_idset_free(struct got_object_idset *);
21 54be8251 2018-06-04 stsp
22 d5a90aac 2018-06-04 stsp const struct got_error *got_object_idset_add(void **,
23 d5a90aac 2018-06-04 stsp struct got_object_idset *, struct got_object_id *, void *);
24 54be8251 2018-06-04 stsp void *got_object_idset_get_data(struct got_object_idset *,
25 54be8251 2018-06-04 stsp struct got_object_id *);
26 54be8251 2018-06-04 stsp const struct got_error *got_object_idset_remove(struct got_object_idset *,
27 54be8251 2018-06-04 stsp struct got_object_id *);
28 54be8251 2018-06-04 stsp int got_object_idset_contains(struct got_object_idset *,
29 54be8251 2018-06-04 stsp struct got_object_id *);
30 54be8251 2018-06-04 stsp void got_object_idset_for_each(struct got_object_idset *,
31 54be8251 2018-06-04 stsp void (*cb)(struct got_object_id *, void *));
32 c6f420bf 2018-06-04 stsp unsigned int got_object_idset_num_elements(struct got_object_idset *);