1picl_walk_tree_by_class(3PICLP)ICL Library Functionpsicl_walk_tree_by_class(3PICL)
2
3
4

NAME

6       picl_walk_tree_by_class - walk subtree by class
7

SYNOPSIS

9       cc [ flag... ] file... -lpicl [ library... ]
10       #include <picl.h>
11
12       int picl_walk_tree_by_class(picl_nodehdl_t rooth,
13            const char *classname, void *c_args,
14            int (*callback)(picl_nodehdl_t nodeh, void *c_args));
15
16

DESCRIPTION

18       The picl_walk_tree_by_class() function visits all the nodes of the sub‐
19       tree under the node specified by rooth. The PICL class name of the vis‐
20       ited  node  is  compared with the class name specified by classname. If
21       the class names match, then the callback function specified by callback
22       is  called  with  the matching node handle and the argument provided in
23       c_args. If the class name specified in  classname  is  NULL,  then  the
24       callback function is invoked for all the nodes.
25
26
27       The  return  value  from  the  callback  function  is used to determine
28       whether to continue or terminate the tree walk. The  callback  function
29       returns PICL_WALK_CONTINUE or PICL_WALK_TERMINATE to continue or termi‐
30       nate the tree walk.
31

RETURN VALUES

33       Upon successful completion, 0 is returned. On failure,  a  non-negative
34       integer is returned to indicate an error.
35
36
37       PICL_STALEHANDLE  is  returned  if  the handle is no longer valid. This
38       occurs if the PICL tree was refreshed or reinitialized.
39
40
41       PICL_INVALIDHANDLE is returned if the specified handle  never  existed.
42       This  error may be returned for a previously valid handle if the daemon
43       was brought down and restarted. When this occurs a client must  revali‐
44       date any saved handles.
45

ERRORS

47       PICL_NOTINITIALIZED    Session not initialized
48
49
50       PICL_NORESPONSE        Daemon not responding
51
52
53       PICL_NOTNODE           Not a node
54
55
56       PICL_INVALIDHANDLE     Invalid handle specified
57
58
59       PICL_STALEHANDLE       Stale handle specified
60
61
62       PICL_FAILURE           General system failure
63
64

ATTRIBUTES

66       See attributes(5)  for descriptions of the following attributes:
67
68
69
70
71       ┌─────────────────────────────┬─────────────────────────────┐
72       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
73       ├─────────────────────────────┼─────────────────────────────┤
74       │MT-Level                     │MT-Safe                      │
75       └─────────────────────────────┴─────────────────────────────┘
76

SEE ALSO

78       picl_get_propval_by_name(3PICL), attributes(5)
79
80
81
82SunOS 5.11                        1 Aug 2000    picl_walk_tree_by_class(3PICL)
Impressum