BOOTSTRAP (kcms) functions


LIBRARY ROUTINE

kcms_foreach - invoke a function on a set of kcms objects

LIBRARY CALL

int
kcms_foreach(
   kobject      parent,
   kcms_method  handler,
   int          object_type,
   int          persevere)

INPUT

OUTPUT

none

RETURN VALUE

TRUE (1) on success, FALSE (0) otherwise

DESCRIPTION

This function is used to invoke a function over some set (or subset) of kcms objects. The following handler function is used in the examples below:
   int print_name(kobject object)
   {
      kstring  name;

kcms_get_attribute(object, KCMS_NAME, &name); kprintf("object name: %s\n", name); return TRUE; }

To print out the names of all software objects in a toolbox, you could use the following:
   kcms_foreach(toolbox, print_name, KOBJ_CMSOBJ, TRUE);
The following call will print out the name of all available toolboxes:
   kcms_foreach(NULL, print_name, KOBJ_CMSTB, TRUE);
The following call will print out the name of all software objects in all available toolboxes:
   kcms_foreach(NULL, print_name, KOBJ_CMSOBJ, TRUE);

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$BOOTSTRAP/objects/library/kcms/src/public.c

SEE ALSO

kcms(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.