9621 Make createtxg and guid properties public
[unleashed.git] / usr / src / lib / libpicltree / llib-lpicltree
blob88fcc07d1af9a58357987ec2df64f61def6a747e
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*LINTLIBRARY*/
23 /*PROTOLIB1*/
26  * Copyright (c) 1999-2000 by Sun Microsystems, Inc.
27  * All rights reserved.
28  */
30 #pragma ident   "%Z%%M% %I%     %E% SMI"
32 #include <synch.h>
33 #include <picl.h>
34 #include <picltree.h>
35 #include "ptree_impl.h"
37 int     ptree_get_root(picl_nodehdl_t *nodeh);
38 int     ptree_create_node(const char *name, const char *clname,
39                         picl_nodehdl_t *nodeh);
40 int     ptree_destroy_node(picl_nodehdl_t nodeh);
41 int     ptree_add_node(picl_nodehdl_t parh, picl_nodehdl_t chdh);
42 int     ptree_delete_node(picl_nodehdl_t nodeh);
44 int     ptree_create_prop(const ptree_propinfo_t *pi, const void *vbuf,
45                         picl_prophdl_t *proph);
46 int     ptree_destroy_prop(picl_prophdl_t proph);
47 int     ptree_delete_prop(picl_prophdl_t proph);
48 int     ptree_add_prop(picl_nodehdl_t nodeh, picl_prophdl_t proph);
49 int     ptree_create_table(picl_prophdl_t *tbl_hdl);
50 int     ptree_add_row_to_table(picl_prophdl_t tbl, int nprops,
51                         const picl_prophdl_t *props);
52 int     ptree_update_propval_by_name(picl_nodehdl_t nodeh, const char *name,
53                         const void *vbuf, unsigned int sz);
54 int     ptree_update_propval(picl_prophdl_t proph, const void *buf,
55                         unsigned int sz);
56 int     ptree_get_propval(picl_prophdl_t proph, void *buf, unsigned int sz);
57 int     ptree_get_propval_by_name(picl_nodehdl_t nodeh, const char *name,
58                         void *buf, unsigned int sz);
59 int     ptree_get_propinfo(picl_prophdl_t proph, ptree_propinfo_t *pi);
60 int     ptree_get_first_prop(picl_nodehdl_t nodeh, picl_prophdl_t *proph);
61 int     ptree_get_next_prop(picl_prophdl_t thish, picl_prophdl_t *proph);
62 int     ptree_get_prop_by_name(picl_nodehdl_t nodeh, const char *name,
63                         picl_prophdl_t *proph);
64 int     ptree_get_next_by_row(picl_prophdl_t proph, picl_prophdl_t *rowh);
65 int     ptree_get_next_by_col(picl_prophdl_t proph, picl_prophdl_t *colh);
67 int     ptree_get_node_by_path(const char *prl, picl_nodehdl_t *nodeh);
68 int     picld_plugin_register(picld_plugin_reg_t *infop);
69 int     ptree_init_propinfo(ptree_propinfo_t *infop, int version, int ptype,
70                         int pmode, size_t psize, char *pname,
71                         int (*readfn)(ptree_rarg_t *, void *),
72                         int (*writefn)(ptree_warg_t *, const void *));
73 int     ptree_create_and_add_prop(picl_nodehdl_t nodeh,
74                         ptree_propinfo_t *infop, void *vbuf,
75                         picl_prophdl_t *proph);
76 int     ptree_create_and_add_node(picl_nodehdl_t rooth, const char *name,
77                         const char *classname, picl_nodehdl_t *nodeh);
79 int     ptree_walk_tree_by_class(picl_nodehdl_t rooth, const char *classname,
80         void *c_args, int (*callback_fn)(picl_nodehdl_t hdl, void *args));
82 int     ptree_find_node(picl_nodehdl_t rooth, char *pname,
83                 picl_prop_type_t ptype, void *pval, size_t valsize,
84                 picl_nodehdl_t *retnodeh);
85 int     ptree_post_event(const char *ename, const void *earg,
86                         size_t size, void (*completion_handler)(char *ename,
87                         void *earg, size_t size));
88 int     ptree_register_handler(const char *ename,
89                         void (*evt_handler)(const char *ename, const void *earg,
90                         size_t size, void *cookie), void *cookie);
91 void    ptree_unregister_handler(const char *ename,
92                         void (*evt_handler)(const char *ename, const void *earg,
93                         size_t size, void *cookie), void *cookie);