PPATH_BOOL(3) Library Functions Manual PPATH_BOOL(3)

ppath_bool, ppath_copydel_bool, ppath_copyset_bool, ppath_set_bool, ppath_get_bool, ppath_delete_bool
boolean property path operations

Property-List Paths Library (libppath, -lppath)

#include <ppath/ppath.h>

int
ppath_copydel_bool(prop_object_t, prop_object_t *, const ppath_t *);

int
ppath_copyset_bool(prop_object_t, prop_object_t *, const ppath_t *, bool);

int
ppath_set_bool(prop_object_t, const ppath_t *, bool);

int
ppath_get_bool(prop_object_t, const ppath_t *, bool *);

int
ppath_delete_bool(prop_object_t, const ppath_t *);

The ppath_bool routines read, write, or delete boolean values in a property list by path.

ppath_bool provides these functions for manipulating boolean values in a property list by the values' paths:
ppath_copydel_bool(prop_object_t o, prop_object_t *op, const ppath_t *p)
Create a copy of the property list o at *op. Delete from the copy the prop_bool_t named by p.

If *op is NULL, ppath_copydel_bool() creates a shallow copy of o at *op. If *op is not NULL, ppath_copydel_bool() expects for *op to be an existing shallow copy of o.

For the purposes of ppath_copydel_bool(), *op is a shallow copy of property list o if equal properties at equal paths are shared between the two. Before ppath_copydel_bool() modifies a property shared by *op and o, it creates a private copy of the property for *op.

ppath_copyset_bool(prop_object_t o, prop_object_t *op, const ppath_t *p, bool v)
Create a copy of the property list o at *op. In the copy, replace with v the prop_bool_t named by p.

If *op is NULL, ppath_copyset_bool() creates a shallow copy of o at *op. If *op is not NULL, ppath_copyset_bool() expects for *op to be an existing shallow copy of o.

For the purposes of ppath_copyset_bool(), *op is a shallow copy of property list o if equal properties at equal paths are shared between the two. Before ppath_copydel_bool() modifies a property shared by *op and o, it creates a private copy of the property for *op.

ppath_set_bool(prop_object_t o, const ppath_t *p, bool v)
Replace with v the prop_bool_t in o named by p.
ppath_get_bool(prop_object_t o, const ppath_t *p, bool *vp)
Retrieve the prop_bool_t named by p from o, and write it to *vp.
ppath_delete_bool(prop_object_t o, const ppath_t *p)
Delete the prop_bool_t named by p from o. ppath_delete_bool() decreases by one the deleted boolean value's reference count.

ppath_bool routines return 0 on success, and non-zero on error.

[]
A ppath_bool operation returns when the object named by the path is not a prop_bool_t.
[]
ppath_bool routines return if the path p does not exist in o.
[]
ppath_set_bool(), and ppath_copyset_bool() return if there was insufficient memory to complete the operation.

ppath(3), ppath_object(3), proplib(3)

The ppath_bool property container path library first appeared in NetBSD 6.0.

David Young ⟨dyoung@pobox.com⟩
September 13, 2011 NetBSD 9.0