Merge branch 'vendor/BIND' into bind_vendor2
[dragonfly.git] / contrib / bind-9.5.2 / lib / isccc / include / isccc / alist.h
1 /*
2  * Portions Copyright (C) 2004-2007  Internet Systems Consortium, Inc. ("ISC")
3  * Portions Copyright (C) 2001  Internet Software Consortium.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY
12  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  *
17  * Portions Copyright (C) 2001  Nominum, Inc.
18  *
19  * Permission to use, copy, modify, and/or distribute this software for any
20  * purpose with or without fee is hereby granted, provided that the above
21  * copyright notice and this permission notice appear in all copies.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
24  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
25  * OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY
26  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
27  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
28  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
29  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
30  */
31
32 /* $Id: alist.h,v 1.10 2007/08/28 07:20:43 tbox Exp $ */
33
34 #ifndef ISCCC_ALIST_H
35 #define ISCCC_ALIST_H 1
36
37 /*! \file isccc/alist.h */
38
39 #include <stdio.h>
40
41 #include <isc/lang.h>
42 #include <isccc/types.h>
43
44 ISC_LANG_BEGINDECLS
45
46 isccc_sexpr_t *
47 isccc_alist_create(void);
48
49 isc_boolean_t
50 isccc_alist_alistp(isccc_sexpr_t *alist);
51
52 isc_boolean_t
53 isccc_alist_emptyp(isccc_sexpr_t *alist);
54
55 isccc_sexpr_t *
56 isccc_alist_first(isccc_sexpr_t *alist);
57
58 isccc_sexpr_t *
59 isccc_alist_assq(isccc_sexpr_t *alist, const char *key);
60
61 void
62 isccc_alist_delete(isccc_sexpr_t *alist, const char *key);
63
64 isccc_sexpr_t *
65 isccc_alist_define(isccc_sexpr_t *alist, const char *key, isccc_sexpr_t *value);
66
67 isccc_sexpr_t *
68 isccc_alist_definestring(isccc_sexpr_t *alist, const char *key, const char *str);
69
70 isccc_sexpr_t *
71 isccc_alist_definebinary(isccc_sexpr_t *alist, const char *key, isccc_region_t *r);
72
73 isccc_sexpr_t *
74 isccc_alist_lookup(isccc_sexpr_t *alist, const char *key);
75
76 isc_result_t
77 isccc_alist_lookupstring(isccc_sexpr_t *alist, const char *key, char **strp);
78
79 isc_result_t
80 isccc_alist_lookupbinary(isccc_sexpr_t *alist, const char *key, isccc_region_t **r);
81
82 void
83 isccc_alist_prettyprint(isccc_sexpr_t *sexpr, unsigned int indent, FILE *stream);
84
85 ISC_LANG_ENDDECLS
86
87 #endif /* ISCCC_ALIST_H */