int
kcms_foreach(
kobject parent,
kcms_method handler,
int object_type,
int persevere)
kobject
:
int
my_handler(
kobject object)
The function should return TRUE
,
to signify success, and FALSE
to signify failure.
.TS H center tab(:) ; lfB | lfB lf(CW) | l . object_type:Kcms object type = .TH KOBJ_CMSTB:Toolbox object KOBJ_CMSOBJ:Software object KOBJ_CMSOBJ:File object .TE
kcms_foreach()
should continue
when the handler function
returns FALSE
.
none
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);
none
none
$BOOTSTRAP/objects/library/kcms/src/public.c