Contents

copyProperty(const OSString *, const IORegistryPlane *, IOOptionBits)

Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. Available in macOS 10.1 or later.

Declaration

virtual OSObject * copyProperty(
 const OSString *aKey, 
 const IORegistryPlane *plane, 
 IOOptionBits options = kIORegistryIterateRecursively | options) const;

Parameters

  • aKey:

    The property's name as an OSString.

  • plane:

    The plane to iterate over, eg. gIOServicePlane.

  • options:

    kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children.

Return Value

The property value found, or zero. A reference on any found property is returned to caller, which should be released.

Overview

This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s).

See Also

Miscellaneous