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