Commit 44287026 authored by Andreas Gustafsson's avatar Andreas Gustafsson

the values of the notify and dialup options may now be of either boolean or

string types; added cfg_obj_is*() functions for determining the type of a configuration object;
reordered some functions in parser.c
parent fba7c63e
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: cfg.h,v 1.11 2001/02/22 23:59:28 bwelling Exp $ */
/* $Id: cfg.h,v 1.12 2001/02/23 00:15:55 gson Exp $ */
#ifndef DNS_CFG_H
#define DNS_CFG_H 1
......@@ -138,6 +138,19 @@ cfg_parser_destroy(cfg_parser_t **pctxp);
* Destroy a configuration parser.
*/
isc_boolean_t
cfg_obj_isvoid(cfg_obj_t *obj);
/*
* Return true iff 'obj' is of void type (e.g., an optional
* value not specified).
*/
isc_boolean_t
cfg_obj_ismap(cfg_obj_t *obj);
/*
* Return true iff 'obj' is of a map type.
*/
isc_result_t
cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj);
/*
......@@ -167,6 +180,12 @@ cfg_map_getname(cfg_obj_t *mapobj);
* or NULL if the map object does not have a name.
*/
isc_boolean_t
cfg_obj_istuple(cfg_obj_t *obj);
/*
* Return true iff 'obj' is of a map type.
*/
cfg_obj_t *
cfg_tuple_get(cfg_obj_t *tupleobj, const char* name);
/*
......@@ -179,6 +198,12 @@ cfg_tuple_get(cfg_obj_t *tupleobj, const char* name);
* fields of said tuple type.
*/
isc_boolean_t
cfg_obj_isuint32(cfg_obj_t *obj);
/*
* Return true iff 'obj' is of integer type.
*/
isc_uint32_t
cfg_obj_asuint32(cfg_obj_t *obj);
/*
......@@ -191,6 +216,12 @@ cfg_obj_asuint32(cfg_obj_t *obj);
* A 32-bit unsigned integer.
*/
isc_boolean_t
cfg_obj_isstring(cfg_obj_t *obj);
/*
* Return true iff 'obj' is of string type.
*/
char *
cfg_obj_asstring(cfg_obj_t *obj);
/*
......@@ -204,6 +235,12 @@ cfg_obj_asstring(cfg_obj_t *obj);
* A pointer to a null terminated string.
*/
isc_boolean_t
cfg_obj_isboolean(cfg_obj_t *obj);
/*
* Return true iff 'obj' is of a boolean type.
*/
isc_boolean_t
cfg_obj_asboolean(cfg_obj_t *obj);
/*
......@@ -216,6 +253,12 @@ cfg_obj_asboolean(cfg_obj_t *obj);
* A boolean value.
*/
isc_boolean_t
cfg_obj_issockaddr(cfg_obj_t *obj);
/*
* Return true iff 'obj' is of sockaddr type.
*/
isc_sockaddr_t *
cfg_obj_assockaddr(cfg_obj_t *obj);
/*
......@@ -229,6 +272,12 @@ cfg_obj_assockaddr(cfg_obj_t *obj);
* if necessary.
*/
isc_boolean_t
cfg_obj_islist(cfg_obj_t *obj);
/*
* Return true iff 'obj' is of list type.
*/
cfg_listelt_t *
cfg_list_first(cfg_obj_t *obj);
/*
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment