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 60f2eee1 2018-07-08 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 b36429ab 2018-11-05 stsp const struct got_error *got_object_idset_add(struct got_object_idset *,
23 b36429ab 2018-11-05 stsp struct got_object_id *, void *);
24 45b73774 2018-06-04 stsp void *got_object_idset_get(struct got_object_idset *, struct got_object_id *);
25 e7c810ea 2018-06-22 stsp const struct got_error *got_object_idset_remove(void **,
26 e7c810ea 2018-06-22 stsp struct got_object_idset *, struct got_object_id *);
27 54be8251 2018-06-04 stsp int got_object_idset_contains(struct got_object_idset *,
28 54be8251 2018-06-04 stsp struct got_object_id *);
29 cb103d04 2018-11-07 stsp const struct got_error *got_object_idset_for_each(struct got_object_idset *,
30 cb103d04 2018-11-07 stsp const struct got_error *(*cb)(struct got_object_id *, void *, void *),
31 cb103d04 2018-11-07 stsp void *);
32 069f84d5 2018-06-11 stsp int got_object_idset_num_elements(struct got_object_idset *);