Blame


1 aaa0878e 2019-01-08 stsp /*
2 aaa0878e 2019-01-08 stsp * Copyright (c) 2019 Stefan Sperling <stsp@openbsd.org>
3 aaa0878e 2019-01-08 stsp *
4 aaa0878e 2019-01-08 stsp * Permission to use, copy, modify, and distribute this software for any
5 aaa0878e 2019-01-08 stsp * purpose with or without fee is hereby granted, provided that the above
6 aaa0878e 2019-01-08 stsp * copyright notice and this permission notice appear in all copies.
7 aaa0878e 2019-01-08 stsp *
8 aaa0878e 2019-01-08 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 aaa0878e 2019-01-08 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 aaa0878e 2019-01-08 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 aaa0878e 2019-01-08 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 aaa0878e 2019-01-08 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 aaa0878e 2019-01-08 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 aaa0878e 2019-01-08 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 aaa0878e 2019-01-08 stsp */
16 aaa0878e 2019-01-08 stsp
17 aaa0878e 2019-01-08 stsp struct got_pathset;
18 aaa0878e 2019-01-08 stsp
19 aaa0878e 2019-01-08 stsp struct got_pathset *got_pathset_alloc(void);
20 aaa0878e 2019-01-08 stsp void got_pathset_free(struct got_pathset *);
21 aaa0878e 2019-01-08 stsp
22 aaa0878e 2019-01-08 stsp const struct got_error *got_pathset_add(struct got_pathset *, const char *,
23 aaa0878e 2019-01-08 stsp void *);
24 aaa0878e 2019-01-08 stsp void *got_pathset_get(struct got_pathset *, const char *);
25 aaa0878e 2019-01-08 stsp const struct got_error *got_pathset_remove(void **, struct got_pathset *,
26 aaa0878e 2019-01-08 stsp const char *);
27 aaa0878e 2019-01-08 stsp int got_pathset_contains(struct got_pathset *, const char *);
28 aaa0878e 2019-01-08 stsp const struct got_error *got_pathset_for_each(struct got_pathset *,
29 aaa0878e 2019-01-08 stsp const struct got_error *(*cb)(const char *, void *, void *),
30 aaa0878e 2019-01-08 stsp void *);
31 efaf56b7 2019-01-08 stsp const struct got_error *got_pathset_for_each_reverse(struct got_pathset *,
32 efaf56b7 2019-01-08 stsp const struct got_error *(*cb)(const char *, void *, void *),
33 efaf56b7 2019-01-08 stsp void *);
34 aaa0878e 2019-01-08 stsp int got_pathset_num_elements(struct got_pathset *);