2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*LINTLIBRARY*/
2N/A/*PROTOLIB1*/
2N/A
2N/A/*
2N/A * Copyright (c) 1999-2000 by Sun Microsystems, Inc.
2N/A * All rights reserved.
2N/A */
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#include <synch.h>
2N/A#include <picl.h>
2N/A#include <picltree.h>
2N/A#include "ptree_impl.h"
2N/A
2N/Aint ptree_get_root(picl_nodehdl_t *nodeh);
2N/Aint ptree_create_node(const char *name, const char *clname,
2N/A picl_nodehdl_t *nodeh);
2N/Aint ptree_destroy_node(picl_nodehdl_t nodeh);
2N/Aint ptree_add_node(picl_nodehdl_t parh, picl_nodehdl_t chdh);
2N/Aint ptree_delete_node(picl_nodehdl_t nodeh);
2N/A
2N/Aint ptree_create_prop(const ptree_propinfo_t *pi, const void *vbuf,
2N/A picl_prophdl_t *proph);
2N/Aint ptree_destroy_prop(picl_prophdl_t proph);
2N/Aint ptree_delete_prop(picl_prophdl_t proph);
2N/Aint ptree_add_prop(picl_nodehdl_t nodeh, picl_prophdl_t proph);
2N/Aint ptree_create_table(picl_prophdl_t *tbl_hdl);
2N/Aint ptree_add_row_to_table(picl_prophdl_t tbl, int nprops,
2N/A const picl_prophdl_t *props);
2N/Aint ptree_update_propval_by_name(picl_nodehdl_t nodeh, const char *name,
2N/A const void *vbuf, unsigned int sz);
2N/Aint ptree_update_propval(picl_prophdl_t proph, const void *buf,
2N/A unsigned int sz);
2N/Aint ptree_get_propval(picl_prophdl_t proph, void *buf, unsigned int sz);
2N/Aint ptree_get_propval_by_name(picl_nodehdl_t nodeh, const char *name,
2N/A void *buf, unsigned int sz);
2N/Aint ptree_get_propinfo(picl_prophdl_t proph, ptree_propinfo_t *pi);
2N/Aint ptree_get_first_prop(picl_nodehdl_t nodeh, picl_prophdl_t *proph);
2N/Aint ptree_get_next_prop(picl_prophdl_t thish, picl_prophdl_t *proph);
2N/Aint ptree_get_prop_by_name(picl_nodehdl_t nodeh, const char *name,
2N/A picl_prophdl_t *proph);
2N/Aint ptree_get_next_by_row(picl_prophdl_t proph, picl_prophdl_t *rowh);
2N/Aint ptree_get_next_by_col(picl_prophdl_t proph, picl_prophdl_t *colh);
2N/A
2N/Aint ptree_get_node_by_path(const char *prl, picl_nodehdl_t *nodeh);
2N/Aint picld_plugin_register(picld_plugin_reg_t *infop);
2N/Aint ptree_init_propinfo(ptree_propinfo_t *infop, int version, int ptype,
2N/A int pmode, size_t psize, char *pname,
2N/A int (*readfn)(ptree_rarg_t *, void *),
2N/A int (*writefn)(ptree_warg_t *, const void *));
2N/Aint ptree_create_and_add_prop(picl_nodehdl_t nodeh,
2N/A ptree_propinfo_t *infop, void *vbuf,
2N/A picl_prophdl_t *proph);
2N/Aint ptree_create_and_add_node(picl_nodehdl_t rooth, const char *name,
2N/A const char *classname, picl_nodehdl_t *nodeh);
2N/A
2N/Aint ptree_walk_tree_by_class(picl_nodehdl_t rooth, const char *classname,
2N/A void *c_args, int (*callback_fn)(picl_nodehdl_t hdl, void *args));
2N/A
2N/Aint ptree_find_node(picl_nodehdl_t rooth, char *pname,
2N/A picl_prop_type_t ptype, void *pval, size_t valsize,
2N/A picl_nodehdl_t *retnodeh);
2N/Aint ptree_post_event(const char *ename, const void *earg,
2N/A size_t size, void (*completion_handler)(char *ename,
2N/A void *earg, size_t size));
2N/Aint ptree_register_handler(const char *ename,
2N/A void (*evt_handler)(const char *ename, const void *earg,
2N/A size_t size, void *cookie), void *cookie);
2N/Avoid ptree_unregister_handler(const char *ename,
2N/A void (*evt_handler)(const char *ename, const void *earg,
2N/A size_t size, void *cookie), void *cookie);