"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/lib/isccc/include/isccc/alist.h" (4 Sep 2020, 2413 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "alist.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  *
   11  * Portions Copyright (C) 2001 Nominum, Inc.
   12  *
   13  * Permission to use, copy, modify, and/or distribute this software for any
   14  * purpose with or without fee is hereby granted, provided that the above
   15  * copyright notice and this permission notice appear in all copies.
   16  *
   17  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
   18  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
   19  * OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY
   20  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   21  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   22  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   23  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   24  */
   25 
   26 #ifndef ISCCC_ALIST_H
   27 #define ISCCC_ALIST_H 1
   28 
   29 /*! \file isccc/alist.h */
   30 
   31 #include <stdbool.h>
   32 #include <stdio.h>
   33 
   34 #include <isc/lang.h>
   35 
   36 #include <isccc/types.h>
   37 
   38 ISC_LANG_BEGINDECLS
   39 
   40 isccc_sexpr_t *
   41 isccc_alist_create(void);
   42 
   43 bool
   44 isccc_alist_alistp(isccc_sexpr_t *alist);
   45 
   46 bool
   47 isccc_alist_emptyp(isccc_sexpr_t *alist);
   48 
   49 isccc_sexpr_t *
   50 isccc_alist_first(isccc_sexpr_t *alist);
   51 
   52 isccc_sexpr_t *
   53 isccc_alist_assq(isccc_sexpr_t *alist, const char *key);
   54 
   55 void
   56 isccc_alist_delete(isccc_sexpr_t *alist, const char *key);
   57 
   58 isccc_sexpr_t *
   59 isccc_alist_define(isccc_sexpr_t *alist, const char *key, isccc_sexpr_t *value);
   60 
   61 isccc_sexpr_t *
   62 isccc_alist_definestring(isccc_sexpr_t *alist, const char *key,
   63              const char *str);
   64 
   65 isccc_sexpr_t *
   66 isccc_alist_definebinary(isccc_sexpr_t *alist, const char *key,
   67              isccc_region_t *r);
   68 
   69 isccc_sexpr_t *
   70 isccc_alist_lookup(isccc_sexpr_t *alist, const char *key);
   71 
   72 isc_result_t
   73 isccc_alist_lookupstring(isccc_sexpr_t *alist, const char *key, char **strp);
   74 
   75 isc_result_t
   76 isccc_alist_lookupbinary(isccc_sexpr_t *alist, const char *key,
   77              isccc_region_t **r);
   78 
   79 void
   80 isccc_alist_prettyprint(isccc_sexpr_t *sexpr, unsigned int indent,
   81             FILE *stream);
   82 
   83 ISC_LANG_ENDDECLS
   84 
   85 #endif /* ISCCC_ALIST_H */