ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference
|
IORegistryEntry |
Inherits from: | |
Declared In: |
The base class for all objects in the I/O Registry.
The IORegistryEntry base class provides functions for describing graphs of connected registry entries, each with a dictionary-based property table. Entries may be connected in different planes, with differing topologies. Access to the registry is protected against multiple threads. Inside the kernel planes are specified with plane objects and are published by the creator - IOService exports the gIOServicePlane plane object for example. Non kernel clients specify planes by their name.
Method called in the parent entry when a child attaches.
Attaches a entry to a parent entry in a plane.
Looks up a registry entry by relative path.
Compares the name of the entry with one name, and optionally returns the matching name.
Compares the name of the entry with one or more names, and optionally returns the matching name.
Returns a registry entry's first child entry in a plane. Available in Mac OS X 10.1 or later.
Returns the location string assigned to the registry entry as an OSSymbol.
Returns the name assigned to the registry entry as an OSSymbol.
Returns a registry entry's first parent entry in a plane. Available in Mac OS X 10.1 or later.
Synchronized method to obtain a property from a registry entry's property table.
Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. Available in Mac OS X 10.1 or later.
Synchronized method to obtain a property from a registry entry's property table.
Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. Available in Mac OS X 10.1 or later.
Synchronized method to obtain a property from a registry entry's property table.
Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. Available in Mac OS X 10.1 or later.
Strips any aliases from the head of path and returns the full path.
Detaches an entry from all its parent entries in a plane.
Detaches an entry and all its children recursively in a plane.
Detaches a child entry from its parent in a plane.
Detaches an entry from a parent entry in a plane.
Synchronized method to obtain copy a registry entry's property table.
Standard free method for all IORegistryEntry subclasses.
Looks up a registry entry by path.
Returns a registry entry's first child entry in a plane.
Returns an iterator over a registry entry's child entries in a plane.
Counts the maximum number of entries between an entry and the registry root, in a plane.
Returns an generation count for all registry changing operations.
Returns the location string assigned to the registry entry as a C string.
Returns the name assigned to the registry entry as a C string.
Returns a registry entry's first parent entry in a plane.
Returns an iterator over a registry entry's parent entries in a specified plane.
Create a path for a registry entry.
Create a path component for a registry entry.
Looks up the plane object by a C string name.
Synchronized method to obtain a property from a registry entry's property table.
Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy.
Synchronized method to obtain a property from a registry entry's property table.
Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy.
Synchronized method to obtain a property from a registry entry's property table.
Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy.
Unsynchronized accessor to a registry entry's property table.
Returns a pointer to the root instance of the registry.
Standard init method for all IORegistryEntry subclasses.
Determines whether a registry entry is attached in a plane.
Determines whether a registry entry is the child of another in a plane.
Determines whether a registry entry is the parent of another in a plane.
Synchronized method to remove a property from a registry entry's property table.
Synchronized method to remove a property from a registry entry's property table.
Synchronized method to remove a property from a registry entry's property table.
Single thread a call to an action w.r.t. the property lock
Synchronized method to serialize a registry entry's property table.
Sets a location string for the registry entry, in a particular plane, or globally.
Sets a name for the registry entry, in a particular plane, or globally.
Sets a name for the registry entry, in a particular plane, or globally.
Optionally supported external method to set properties in a registry entry.
Synchronized method to construct and add an OSData property to a registry entry's property table.
Synchronized method to construct and add an OSBoolean property to a registry entry's property table.
Synchronized method to construct and add a OSString property to a registry entry's property table.
Synchronized method to add a property to a registry entry's property table.
Synchronized method to construct and add an OSNumber property to a registry entry's property table.
Synchronized method to add a property to a registry entry's property table.
Synchronized method to add a property to a registry entry's property table.
Replace a registry entry's property table.
attachToChild |
Method called in the parent entry when a child attaches.
public
virtual bool attachToChild( IORegistryEntry *child, const IORegistryPlane * plane );
child
The registry entry being attached.
plane
The plane object.
true on success, or false on a resource failure, or if the parent is the same as the child.
This method is called in the parent entry when a child attaches, to make overrides possible. This method will also call attachToParent in the child entry if it is not being called from attachToParent. It is a no-op and success if the entry is already a child. Attaching the entry into the registry retains both the child and parent while they are attached.
attachToParent |
Attaches a entry to a parent entry in a plane.
public
virtual bool attachToParent( IORegistryEntry *parent, const IORegistryPlane * plane );
parent
The registry entry to attach to.
plane
The plane object.
true on success, or false on a resource failure, or if the parent is the same as the child.
This is the usual method of entering an entry into the registry. It is a no-op and success if the entry is already attached to the parent. Attaching the entry into the registry retains both the child and parent while they are attached. This method will call attachToChild in the parent entry if it is not being called from attachToChild.
childFromPath |
Looks up a registry entry by relative path.
public
virtual IORegistryEntry * childFromPath( const char * path, const IORegistryPlane * plane = 0, char *residualPath = 0, int *residualLength = 0 );
See fromPath.
This function looks up a entry below the called entry by a relative path. It is just a convenience that calls fromPath with this as the fromEntry parameter.
compareName |
Compares the name of the entry with one name, and optionally returns the matching name.
public
virtual bool compareName( OSString *name, OSString **matched = 0 ) const;
name
The name to compare with as an OSString.
matched
If the caller wants the successfully matched name returned, pass a non-zero pointer for the matched parameter and an OSString will be returned here. It should be released by the caller. Generally, this will be the same as the name parameter, but may not be if wildcards are used.
True if the name compared true with the entry's global name.
This method is called during IOService name matching and elsewhere from the compareNames method. It should be overridden to provide non-standard name matching.
compareNames |
Compares the name of the entry with one or more names, and optionally returns the matching name.
public
virtual bool compareNames( OSObject *name, OSString **matched = 0 ) const;
name
The name or names to compare with as any OSCollection (eg. OSArray, OSSet, OSDictionary) of OSStrings, or a single name may be passed an OSString.
matched
If the caller wants the successfully matched name returned, pass a non-zero pointer for the matched parameter and an OSString will be returned here. It should be released by the caller.
True if one of the names compared true with the entry's global name.
This method is called during IOService name matching and elsewhere to compare the entry's global name with a list of names, or a single name. A list of names may be passed as any OSCollection of OSStrings, while a single name may be passed an OSString, in the name parameter. compareNames will call the compareName method for each name, for overrides.
copyChildEntry |
Returns a registry entry's first child entry in a plane. Available in Mac OS X 10.1 or later.
public
virtual IORegistryEntry * copyChildEntry( const IORegistryPlane * plane ) const;
plane
The plane object.
Returns the first child of the registry entry, or zero if the entry is not attached into the registry in that plane. A reference on the entry is returned to caller, which should be released.
This function will return the child which first attached to a registry entry.
copyLocation |
Returns the location string assigned to the registry entry as an OSSymbol.
public
virtual const OSSymbol * copyLocation( const IORegistryPlane * plane = 0 ) const;
plane
The plane object, or zero for the global name.
A reference to an OSSymbol for the location if one exists, which should be released by the caller, or zero.
Entries can given a location string in a particular plane, or globally. If the entry has had a location set in a plane and the plane is specified that location string will be returned, otherwise the global location string is returned. If no global location string has been set, zero is returned.
copyName |
Returns the name assigned to the registry entry as an OSSymbol.
public
virtual const OSSymbol * copyName( const IORegistryPlane * plane = 0 ) const;
plane
The plane object, or zero for the global name.
A reference to an OSSymbol for the name, which should be released by the caller.
Entries can be named in a particular plane, or globally. If the entry is named in plane and the plane is specified that name will be returned, otherwise the global name is returned. The global name defaults to the entry's meta class name if it has not been named.
copyParentEntry |
Returns a registry entry's first parent entry in a plane. Available in Mac OS X 10.1 or later.
public
virtual IORegistryEntry * copyParentEntry( const IORegistryPlane * plane ) const;
plane
The plane object.
Returns the first parent of the registry entry, or zero if the entry is not attached into the registry in that plane. A reference on the entry is returned to caller, which should be released.
This function will return the parent to which a registry entry was first attached. Since the majority of registry entrys have only one provider, this is a useful simplification.
copyProperty(const char *) |
Synchronized method to obtain a property from a registry entry's property table.
public
virtual OSObject * copyProperty( const char * aKey) const;
aKey
The property's name as a C string.
The property value found, or zero. It should be released by the caller.
This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics, and return a reference to the caller. This method is synchronized with other IORegistryEntry accesses to the property table.
copyProperty(const char *, 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 Mac OS X 10.1 or later.
public
virtual OSObject * copyProperty( const char * aKey, const IORegistryPlane * plane, IOOptionBits options = kIORegistryIterateRecursively | kIORegistryIterateParents) const;
aKey
The property's name as a C string.
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.
The property value found, or zero. A reference on any found property is returned to caller, which should be released.
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).
copyProperty(const OSString *) |
Synchronized method to obtain a property from a registry entry's property table.
public
virtual OSObject * copyProperty( const OSString * aKey) const;
aKey
The property's name as an OSString.
The property value found, or zero. It should be released by the caller.
This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics, and return a reference to the caller. This method is synchronized with other IORegistryEntry accesses to the property table.
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 Mac OS X 10.1 or later.
public
virtual OSObject * copyProperty( const OSString * aKey, const IORegistryPlane * plane, IOOptionBits options = kIORegistryIterateRecursively | kIORegistryIterateParents) const;
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.
The property value found, or zero. A reference on any found property is returned to caller, which should be released.
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).
copyProperty(const OSSymbol *) |
Synchronized method to obtain a property from a registry entry's property table.
public
virtual OSObject * copyProperty( const OSSymbol * aKey) const;
aKey
The property's name as an OSSymbol.
The property value found, or zero. It should be released by the caller.
This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics, and return a reference to the caller. This method is synchronized with other IORegistryEntry accesses to the property table.
copyProperty(const OSSymbol *, 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 Mac OS X 10.1 or later.
public
virtual OSObject * copyProperty( const OSSymbol * aKey, const IORegistryPlane * plane, IOOptionBits options = kIORegistryIterateRecursively | kIORegistryIterateParents) const;
aKey
The property's name as an OSSymbol.
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.
The property value found, or zero. A reference on any found property is returned to caller, which should be released.
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).
dealiasPath |
Strips any aliases from the head of path and returns the full path.
public
static const char * dealiasPath( const char ** opath, const IORegistryPlane * plane );
opath
An in/out paramter - the caller passes in a pointer to a C string pointer to a path. If an alias is found, dealiasPath returns a pointer into the path just beyond the end of the alias.
plane
A plane object must be specified.
A C string pointer to the value of the alias if one is found, or zero if not.
If the path specified begins with an alias found in the /aliases entry, the value of the alias is returned, and a pointer into the passed in path after the alias is passed back to the caller. If an alias is not found, zero is returned and the path parameter is unchanged.
detachAbove |
Detaches an entry from all its parent entries in a plane.
public
virtual void detachAbove( const IORegistryPlane * plane );
plane
The plane object.
This method calls detachFromParent in the entry for each of its parent entries in the plane.
detachAll |
Detaches an entry and all its children recursively in a plane.
public
virtual void detachAll( const IORegistryPlane * plane );
plane
The plane object.
This method breaks the registry connections for a subtree. detachAbove is called in the entry, and all child entries and their children in the plane.
detachFromChild |
Detaches a child entry from its parent in a plane.
public
virtual void detachFromChild( IORegistryEntry *child, const IORegistryPlane * plane );
parent
The registry entry to detach.
plane
The plane object.
This method is called in the parent entry when a child detaches, to make overrides possible. It is a no-op if the entry is not a child of the parent. Detaching the entry will release both the child and parent. This method will call detachFromParent in the child entry if it is not being called from detachFromParent.
detachFromParent |
Detaches an entry from a parent entry in a plane.
public
virtual void detachFromParent( IORegistryEntry *parent, const IORegistryPlane * plane );
parent
The registry entry to detach from.
plane
The plane object.
This is the usual method of removing an entry from the registry. It is a no-op if the entry is not attached to the parent. Detaching the entry will release both the child and parent. This method will call detachFromChild in the parent entry if it is not being called from detachFromChild.
dictionaryWithProperties |
Synchronized method to obtain copy a registry entry's property table.
public
virtual OSDictionary * dictionaryWithProperties( void ) const;
The created dictionary, or zero on a resource value. It should be released by the caller.
This method will copy a registry entry's property table, using the OSDictionary::withDictionary semantics. This method is synchronized with other IORegistryEntry accesses to the property table. Since OSDictionary will only copy property values by reference, synchronization is not guaranteed to any collection values.
free |
Standard free method for all IORegistryEntry subclasses.
public
virtual void free( void );
This method will release any resources of the entry, in particular its property table. Note that the registry entry must always be detached from the registry before free may be called, and subclasses (namely IOService) will have additional protocols for removing registry entries. free should never need be called directly.
fromPath |
Looks up a registry entry by path.
public
static IORegistryEntry * fromPath( const char * path, const IORegistryPlane * plane = 0, char *residualPath = 0, int *residualLength = 0, IORegistryEntry *fromEntry = 0 );
path
A C string path.
plane
The plane to lookup up the path, or zero, in which case the path must begin with the plane name.
residualPath
If the path may contain residual characters after the last path component, the residual will be copied back to the caller's residualPath buffer. If there are residual characters and no residual buffer is specified, fromPath will fail.
residualLength
An in/out parameter - the caller sets the length of the residual buffer available, and fromPath returns the total length of the residual path copied to the buffer. If there is no residualBuffer (residualPath = 0) then residualLength may be zero also.
fromEntry
The lookup will proceed rooted at this entry if non-zero, otherwise it proceeds from the root of the plane.
A retained registry entry is returned on success, or zero on failure. The caller should release the entry.
This function parses paths to lookup registry entries. The path may begin with the Returns a registry entry's first child entry in a plane.
The plane object. Returns the first child of the registry entry, or zero if the entry is not attached into the registry in that plane. The child is retained while the entry is attached, and should not be released by the caller.
This function will return the child which first attached to a registry entry.
Returns an iterator over a registry entry's child entries in a plane.
The plane object. Returns an iterator over the children of the entry, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, though they may no longer be attached during the iteration.
This method creates an iterator which will return each of a registry entry's child entries in a specified plane.
Counts the maximum number of entries between an entry and the registry root, in a plane.
The plane object. The maximum number of entries between the entry and the root. Zero is returned if the entry is not attached in the plane.
This method counts the number of entries between and entry and the registry root, in a plane, for each parent of the entry and returns the maximum value.
Returns an generation count for all registry changing operations.
An integer generation count.
This method provides an accessor to the current generation count (or seed) of the registry which changes when any topology change occurs in the registry - this does not include property table changes. It may be used to invalidate any caching of the results from IORegistryEntry methods.
Returns the location string assigned to the registry entry as a C string.
The plane object, or zero for the global name. A C string location string, valid while the entry is retained, or zero.
Entries can given a location string in a particular plane, or globally. If the entry has had a location set in a plane and the plane is specified that location string will be returned, otherwise the global location string is returned. If no global location string has been set, zero is returned.
Returns the name assigned to the registry entry as a C string.
The plane object, or zero for the global name. A C string name, valid while the entry is retained.
Entries can be named in a particular plane, or globally. If the entry is named in plane and the plane is specified that name will be returned, otherwise the global name is returned. The global name defaults to the entry's meta class name if it has not been named.
Returns a registry entry's first parent entry in a plane.
The plane object. Returns the first parent of the registry entry, or zero if the entry is not attached into the registry in that plane. The parent is retained while the entry is attached, and should not be released by the caller.
This function will return the parent to which a registry entry was first attached. Since the majority of registry entrys have only one provider, this is a useful simplification.
Returns an iterator over a registry entry's parent entries in a specified plane.
The plane object. Returns an iterator over the parents of the registry entry, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, though they may no longer be attached during the iteration.
Create a path for a registry entry.
A char buffer allocated by the caller. An in/out parameter - the caller sets the length of the buffer available, and getPath returns the total length of the path copied to the buffer. The plane object. getPath will fail if the entry is not attached in the plane, or if the buffer is not large enough to contain the path.
The path for a registry entry is copied to the caller's buffer. The path describes the entry's attachment in a particular plane, which must be specified. The path begins with the plane name followed by a colon, and then followed by '/' separated path components for each of the entries between the root and the registry entry. Each component is constructed with the getPathComponent method called in each entry. An alias may also exist for the entry, which are described as properties in a registry entry found at /aliases in the plane. If a property value interpreted as a path in a call to IORegistryEntry::fromPath yields the entry, then the property name is used as the entry's path.
Create a path component for a registry entry.
A char buffer allocated by the caller. An in/out parameter - the caller sets the length of the buffer available, and getPathComponent returns the total length of the path component copied to the buffer. The plane object. true if the path fits into the supplied buffer or false on a overflow.
Each component of a path created with getPath is created with getPathComponent. The default implementation concatenates the entry's name in the the plane, with the "at" symbol and the location string of the entry in the plane if it has been set.
Looks up the plane object by a C string name.
A pointer to the plane object, or zero if no such plane exists. The returned plane should not be released.
Planes are usually provided as globals by the creator, eg. gIOServicePlane, gIODeviceTreePlane, or gIOAudioPlane, however they may also be looked up by name with this method.
Synchronized method to obtain a property from a registry entry's property table.
The property's name as a C string. The property value found, or zero.
This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table.
Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy.
The property's name as a C string. The plane to iterate over, eg. gIOServicePlane. 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. The property value found, or zero.
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).
Synchronized method to obtain a property from a registry entry's property table.
The property's name as an OSString. The property value found, or zero.
This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table.
Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy.
The property's name as an OSString. The plane to iterate over, eg. gIOServicePlane. 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. The property value found, or zero.
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).
Synchronized method to obtain a property from a registry entry's property table.
The property's name as an OSSymbol. The property value found, or zero.
This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table.
Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy.
The property's name as an OSSymbol. The plane to iterate over, eg. gIOServicePlane. 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. The property value found, or zero.
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).
Unsynchronized accessor to a registry entry's property table.
A pointer to the property table as an OSDictionary. The pointer is valid while the registry entry is retained, and should not be released by the caller.
This method will return a pointer to the live property table as an OSDictionery. Its use is not recommended in most cases, instead use the synchronized accessors and helper functions of IORegistryEntry to access properties. It can only safely be used by one thread, which usually means it can only be used before a registry entry is entered into the registry.
Returns a pointer to the root instance of the registry.
A pointer to the IORegistryEntry root instance. It should not be released by the caller.
This method provides an accessor to the root of the registry for the machine. The root may be passed to a registry iterator when iterating a plane, and contains properties that describe the available planes, and diagnostic information for IOKit. Keys for these properties are in IOKitKeys.h.
Standard init method for all IORegistryEntry subclasses.
dictionary that will become the registry entry's property table (retaining it), or zero which will cause an empty property table to be created. true on success, or false on a resource failure.
A registry entry must be initialized with this method before it can be used. A property dictionary may passed and will be retained by this method for use as the registry entry's property table, or an empty one will be created.
Determines whether a registry entry is attached in a plane.
The plane object, 0 indicates any plane. If the entry has a parent in the given plane or if plane = 0 then if entry has any parent; return true, otherwise false.
This method determines if the entry is attached in a plane to any other entry. It can also be used to determine if the entry is a member of any plane.
Determines whether a registry entry is the child of another in a plane.
The possible child registry entry. The plane object. If true, check also if the child is the only child. If the child argument is not a child of the registry entry, false is returned. If onlyChild is true and the child is not the only child of the entry, false is returned, otherwise true is returned.
This method called in the parent entry determines if the specified entry is a child, in a plane. Additionally, it can check if the child is the only child of the parent entry.
Determines whether a registry entry is the parent of another in a plane.
The possible parent registry entry. The plane object. If true, check also if the parent is the only parent. If the parent argument is not a parent of the registry entry, false is returned. If onlyParent is true and the parent is not the only parent of the entry, false is returned, otherwise true is returned.
This method called in the child entry determines if the specified entry is a parent, in a plane. Additionally, it can check if the parent is the only parent of the child entry.
Synchronized method to remove a property from a registry entry's property table.
The property's name as a C string. This method will remove a property from a registry entry's property table, using the OSDictionary::removeObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table.
Synchronized method to remove a property from a registry entry's property table.
The property's name as an OSString. This method will remove a property from a registry entry's property table, using the OSDictionary::removeObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table.
Synchronized method to remove a property from a registry entry's property table.
The property's name as an OSSymbol. This method will remove a property from a registry entry's property table, using the OSDictionary::removeObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table.
Single thread a call to an action w.r.t. the property lock
Pointer to function to be executed in work-loop context. Parameter for action parameter, defaults to 0. Parameter for action parameter, defaults to 0. Parameter for action parameter, defaults to 0. Parameter for action parameter, defaults to 0. Returns the value of the Action callout.
Client function that causes the given action to be called in a manner that syncrhonises with the registry iterators and serialisers. This functin can be used to synchronously manipulate the property table of this nub
Synchronized method to serialize a registry entry's property table.
The OSSerialize instance representing the serialization request. True on success, false otherwise.
This method will serialize a registry entry's property table, using the OSDictionary::serialize semantics. This method is synchronized with other IORegistryEntry accesses to the property table. Many non-kernel clients of IOKit read information from the registry via properties, and will invoke this method in a registry entry to create a serialization of all the entry's properties, which is then reconstructed in the client's task as a CFDictionary. This method may be intercepted by subclasses to update their properties or implement a different serialization method, though it is usually better to implement such functionality by creating objects in the property table and implementing their serialize methods, avoiding any need to implement serializeProperties.
Sets a location string for the registry entry, in a particular plane, or globally.
A C string location string which will be copied, or an OSSymbol which will be retained. The plane object, or zero to set the global location string. Entries can be given a location string in a particular plane, or globally. If the plane is specified the location applies only to that plane, otherwise the global location is set. The location string may be used during path lookups of registry entries, to distinguish between sibling entries with the same name. The default IORegistryEntry parsing of location strings expects a list of hex numbers separated by commas, though subclasses of IORegistryEntry might do their own parsing.
Sets a name for the registry entry, in a particular plane, or globally.
A const C string name which will be copied. The plane object, or zero to set the global name. Entries can be named in a particular plane, or globally. If the plane is specified the name applies only to that plane, otherwise the global name is set. The global name defaults to the entry's meta class name if it has not been named.
Sets a name for the registry entry, in a particular plane, or globally.
An OSSymbol which will be retained. The plane object, or zero to set the global name. Entries can be named in a particular plane, or globally. If the plane is specified the name applies only to that plane, otherwise the global name is set. The global name defaults to the entry's meta class name if it has not been named.
Optionally supported external method to set properties in a registry entry.
Any OSObject subclass, to be interpreted by the implementing method - for example an OSDictionary, OSData etc. may all be appropriate. An IOReturn code to be returned to the caller.
This method is not implemented by IORegistryEntry, but is available to kernel and non-kernel clients to set properties in a registry entry. IOUserClient provides connection based, more controlled access to this functionality and may be more appropriate for many uses, since there is no differentiation between clients available to this method.
Synchronized method to construct and add an OSData property to a registry entry's property table.
The property's name as a C-string. The property's value as a pointer. OSData will copy this data. The property's size in bytes, for OSData. true on success or false on a resource failure.
This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSData copied from the supplied data and length, set in the property table with the given name, and released.
Synchronized method to construct and add an OSBoolean property to a registry entry's property table.
The property's name as a C string. The property's boolean value. true on success or false on a resource failure.
This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSBoolean from the supplied value, set in the property table with the given name, and released.
Synchronized method to construct and add a OSString property to a registry entry's property table.
The property's name as a C string. The property value as a C string. true on success or false on a resource failure.
This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSString from the supplied C string, set in the property table with the given name, and released.
Synchronized method to add a property to a registry entry's property table.
The property's name as a C string. The property value. true on success or false on a resource failure.
This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table.
Synchronized method to construct and add an OSNumber property to a registry entry's property table.
The property's name as a C string. The property's numeric value. The property's size in bits, for OSNumber. true on success or false on a resource failure.
This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSNumber from the supplied value and size, set in the property table with the given name, and released.
Synchronized method to add a property to a registry entry's property table.
The property's name as an OSString. The property value. true on success or false on a resource failure.
This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table.
Synchronized method to add a property to a registry entry's property table.
The properties name as an OSSymbol. The property value. true on success or false on a resource failure.
This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table.
Replace a registry entry's property table.
The new dictionary to be used as the entry's property table. This method will release the current property table of a the entry and replace it with another, retaining the new property table.
Target of the function, can be used as a refcon. Note if a C++ function
was specified, this parameter is implicitly the first parameter in the target
member function's parameter list. Argument to action from run operation. Argument to action from run operation. Argument to action from run operation. Argument to action from run operation. Type and arguments of callout C function that is used when
a runCommand is executed by a client. Cast to this type when you want a C++
member function to be used. Note the arg1 - arg3 parameters are passed straight pass through to the action callout.
This structure will be used to expand the capablilties of this class in the future.
Reserved for future use. (Internal use only)
getChildEntry
public
virtual IORegistryEntry * getChildEntry(
const IORegistryPlane * plane ) const; Parameters
plane
Return Value
Discussion
getChildIterator
public
virtual OSIterator * getChildIterator(
const IORegistryPlane * plane ) const; Parameters
plane
Return Value
Discussion
getDepth
public
virtual unsigned int getDepth(
const IORegistryPlane * plane ) const; Parameters
plane
Return Value
Discussion
getGenerationCount
public
static SInt32 getGenerationCount(
void ); Return Value
Discussion
getLocation
public
virtual const char * getLocation( const IORegistryPlane * plane =
0 ) const; Parameters
plane
Return Value
Discussion
getName
public
virtual const char * getName( const IORegistryPlane * plane =
0 ) const; Parameters
plane
Return Value
Discussion
getParentEntry
public
virtual IORegistryEntry * getParentEntry(
const IORegistryPlane * plane ) const; Parameters
plane
Return Value
Discussion
getParentIterator
public
virtual OSIterator * getParentIterator(
const IORegistryPlane * plane ) const; Parameters
plane
Return Value
getPath
public
virtual bool getPath(
char *path,
int *length,
const IORegistryPlane * plane) const; Parameters
path
length
plane
Return Value
Discussion
getPathComponent
public
virtual bool getPathComponent(
char *path,
int *length,
const IORegistryPlane * plane ) const; Parameters
path
length
plane
Return Value
Discussion
getPlane
public
static const IORegistryPlane * getPlane( const char * name ); Return Value
Discussion
getProperty(const char *)
public
virtual OSObject * getProperty(
const char * aKey) const; Parameters
aKey
Return Value
Discussion
getProperty(const char *, const IORegistryPlane *, IOOptionBits)
public
virtual OSObject * getProperty(
const char * aKey,
const IORegistryPlane * plane,
IOOptionBits options = kIORegistryIterateRecursively | kIORegistryIterateParents) const; Parameters
aKey
plane
options
Return Value
Discussion
getProperty(const OSString *)
public
virtual OSObject * getProperty(
const OSString * aKey) const; Parameters
aKey
Return Value
Discussion
getProperty(const OSString *, const IORegistryPlane *, IOOptionBits)
public
virtual OSObject * getProperty(
const OSString * aKey,
const IORegistryPlane * plane,
IOOptionBits options = kIORegistryIterateRecursively | kIORegistryIterateParents) const; Parameters
aKey
plane
options
Return Value
Discussion
getProperty(const OSSymbol *)
public
virtual OSObject * getProperty(
const OSSymbol * aKey) const; Parameters
aKey
Return Value
Discussion
getProperty(const OSSymbol *, const IORegistryPlane *, IOOptionBits)
public
virtual OSObject * getProperty(
const OSSymbol * aKey,
const IORegistryPlane * plane,
IOOptionBits options = kIORegistryIterateRecursively | kIORegistryIterateParents) const; Parameters
aKey
plane
options
Return Value
Discussion
getPropertyTable
public
OSDictionary * getPropertyTable(
void ) const; Return Value
Discussion
getRegistryRoot
public
static IORegistryEntry * getRegistryRoot(
void ); Return Value
Discussion
init
public
virtual bool init(
OSDictionary *dictionary = 0 ); Parameters
A
Return Value
Discussion
inPlane
public
virtual bool inPlane(
const IORegistryPlane * plane = 0) const; Parameters
plane
Return Value
Discussion
isChild
public
virtual bool isChild(
IORegistryEntry *child,
const IORegistryPlane * plane,
bool onlyChild = false ) const; Parameters
child
plane
onlyChild
Return Value
Discussion
isParent
public
virtual bool isParent(
IORegistryEntry *parent,
const IORegistryPlane * plane,
bool onlyParent = false ) const; Parameters
parent
plane
onlyParent
Return Value
Discussion
removeProperty
public
virtual void removeProperty(
const char * aKey); Parameters
aKey
Discussion
removeProperty(const OSString *)
public
virtual void removeProperty(
const OSString * aKey); Parameters
aKey
Discussion
removeProperty(const OSSymbol *)
public
virtual void removeProperty(
const OSSymbol * aKey); Parameters
aKey
Discussion
runPropertyAction
public
virtual IOReturn runPropertyAction(
Action action,
OSObject *target,
void *arg0 = 0,
void *arg1 = 0,
void *arg2 = 0,
void *arg3 = 0); Parameters
action
arg0
arg1
arg2
arg3
Return Value
Discussion
serializeProperties
public
virtual bool serializeProperties(
OSSerialize *serialize ) const; Parameters
serialize
Return Value
Discussion
setLocation
public
virtual void setLocation(
const OSSymbol * location,
const IORegistryPlane * plane = 0 ); Parameters
location
plane
Discussion
setName(const char *, const IORegistryPlane *)
public
virtual void setName(
const char * name,
const IORegistryPlane * plane = 0 ); Parameters
name
plane
Discussion
setName(const OSSymbol *, const IORegistryPlane *)
public
virtual void setName(
const OSSymbol * name,
const IORegistryPlane * plane = 0 ); Parameters
name
plane
Discussion
setProperties
public
virtual IOReturn setProperties(
OSObject *properties ); Parameters
properties
Return Value
Discussion
setProperty
public
virtual bool setProperty(
const char * aKey,
void * bytes,
unsigned int length); Parameters
aKey
bytes
length
Return Value
Discussion
setProperty(const char *, bool)
public
virtual bool setProperty(
const char * aKey,
bool aBoolean); Parameters
aKey
aBoolean
Return Value
Discussion
setProperty(const char *, const char *)
public
virtual bool setProperty(
const char * aKey,
const char * aString); Parameters
aKey
aString
Return Value
Discussion
setProperty(const char *, OSObject *)
public
virtual bool setProperty(
const char * aKey,
OSObject * anObject); Parameters
aKey
anObject
Return Value
Discussion
setProperty(const char *, unsigned long long, unsigned int)
public
virtual bool setProperty(
const char * aKey,
unsigned long long aValue,
unsigned int aNumberOfBits); Parameters
aKey
aValue
aNumberOfBits
Return Value
Discussion
setProperty(const OSString *, OSObject *)
public
virtual bool setProperty(
const OSString * aKey,
OSObject * anObject); Parameters
aKey
anObject
Return Value
Discussion
setProperty(const OSSymbol *, OSObject *)
public
virtual bool setProperty(
const OSSymbol * aKey,
OSObject * anObject); Parameters
aKey
anObject
Return Value
Discussion
setPropertyTable
public
virtual void setPropertyTable(
OSDictionary *dict ); Parameters
dict
Discussion
Typedefs
Action
public
typedef IOReturn ( *Action)(
OSObject *target,
void *arg0,
void *arg1,
void *arg2,
void *arg3); Fields
target
arg0
arg1
arg2
arg3
Discussion
Structs and Unions
ExpansionData
protected
struct ExpansionData;
Discussion
Member Data
reserved
protected
ExpansionData * reserved;
Discussion
Did this document help you?
Last Updated: 2008-12-19