alist.h

Go to the documentation of this file.
00001 /*
00002  * Portions Copyright (C) 2004-2007  Internet Systems Consortium, Inc. ("ISC")
00003  * Portions Copyright (C) 2001  Internet Software Consortium.
00004  *
00005  * Permission to use, copy, modify, and/or distribute this software for any
00006  * purpose with or without fee is hereby granted, provided that the above
00007  * copyright notice and this permission notice appear in all copies.
00008  *
00009  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
00010  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
00011  * OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY
00012  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00013  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00014  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00015  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00016  *
00017  * Portions Copyright (C) 2001  Nominum, Inc.
00018  *
00019  * Permission to use, copy, modify, and/or distribute this software for any
00020  * purpose with or without fee is hereby granted, provided that the above
00021  * copyright notice and this permission notice appear in all copies.
00022  *
00023  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
00024  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
00025  * OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY
00026  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00027  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00028  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00029  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00030  */
00031 
00032 /* $Id: alist.h,v 1.10 2007/08/28 07:20:43 tbox Exp $ */
00033 
00034 #ifndef ISCCC_ALIST_H
00035 #define ISCCC_ALIST_H 1
00036 
00037 /*! \file isccc/alist.h */
00038 
00039 #include <stdio.h>
00040 
00041 #include <isc/lang.h>
00042 #include <isccc/types.h>
00043 
00044 ISC_LANG_BEGINDECLS
00045 
00046 isccc_sexpr_t *
00047 isccc_alist_create(void);
00048 
00049 isc_boolean_t
00050 isccc_alist_alistp(isccc_sexpr_t *alist);
00051 
00052 isc_boolean_t
00053 isccc_alist_emptyp(isccc_sexpr_t *alist);
00054 
00055 isccc_sexpr_t *
00056 isccc_alist_first(isccc_sexpr_t *alist);
00057 
00058 isccc_sexpr_t *
00059 isccc_alist_assq(isccc_sexpr_t *alist, const char *key);
00060 
00061 void
00062 isccc_alist_delete(isccc_sexpr_t *alist, const char *key);
00063 
00064 isccc_sexpr_t *
00065 isccc_alist_define(isccc_sexpr_t *alist, const char *key, isccc_sexpr_t *value);
00066 
00067 isccc_sexpr_t *
00068 isccc_alist_definestring(isccc_sexpr_t *alist, const char *key, const char *str);
00069 
00070 isccc_sexpr_t *
00071 isccc_alist_definebinary(isccc_sexpr_t *alist, const char *key, isccc_region_t *r);
00072 
00073 isccc_sexpr_t *
00074 isccc_alist_lookup(isccc_sexpr_t *alist, const char *key);
00075 
00076 isc_result_t
00077 isccc_alist_lookupstring(isccc_sexpr_t *alist, const char *key, char **strp);
00078 
00079 isc_result_t
00080 isccc_alist_lookupbinary(isccc_sexpr_t *alist, const char *key, isccc_region_t **r);
00081 
00082 void
00083 isccc_alist_prettyprint(isccc_sexpr_t *sexpr, unsigned int indent, FILE *stream);
00084 
00085 ISC_LANG_ENDDECLS
00086 
00087 #endif /* ISCCC_ALIST_H */

Generated on Tue Apr 28 17:41:06 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha