public static class IOKit.IORegistryEntry extends IOKit.IOObject
Constructor and Description |
---|
IORegistryEntry() |
IORegistryEntry(Pointer p) |
conformsTo, release
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
public IORegistryEntry()
public IORegistryEntry(Pointer p)
public long getRegistryEntryID()
IOKit.IORegistryEntryGetRegistryEntryID(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.ptr.LongByReference)
to
return an ID for this registry entry that is global to all tasks.IOReturnException
- if the ID could not be retrieved.public java.lang.String getName()
IOKit.IORegistryEntryGetName(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.Pointer)
to return a
name assigned to this registry entry.IOReturnException
- if the name could not be retrieved.public IOKit.IOIterator getChildIterator(java.lang.String plane)
IOKit.IORegistryEntryGetChildIterator(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.ptr.PointerByReference)
to
return an iterator over this registry entry’s child entries in a
plane.plane
- The name of an existing registry plane. Plane names are
defined in IOKitKeys.h
, for example,
kIOServicePlane
.IOReturnException
- if the iterator could not be retrieved.public IOKit.IORegistryEntry getChildEntry(java.lang.String plane)
IOKit.IORegistryEntryGetChildEntry(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.ptr.PointerByReference)
to
return the first child of this registry entry in a plane.plane
- The name of an existing registry plane.IOReturnException
- if the entry exists but could not be retrieved.public IOKit.IORegistryEntry getParentEntry(java.lang.String plane)
IOKit.IORegistryEntryGetParentEntry(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.ptr.PointerByReference)
to
return the first parent of this registry entry in a plane.plane
- The name of an existing registry plane.IOReturnException
- if the entry exists but could not be retrieved.public CoreFoundation.CFTypeRef createCFProperty(CoreFoundation.CFStringRef key)
IOKit.IORegistryEntryCreateCFProperty(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.platform.mac.CoreFoundation.CFStringRef, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)
to create a
CF representation of this registry entry's property.key
- A CFString
specifying the property name.
The caller should release with CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)
.
public CoreFoundation.CFMutableDictionaryRef createCFProperties()
IOKit.IORegistryEntryCreateCFProperties(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.ptr.PointerByReference, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)
to
create a CF dictionary representation of this registry entry's
property table.
The caller should release with
CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)
.
IOReturnException
- if the entry could not be retrieved.CoreFoundation.CFTypeRef searchCFProperty(java.lang.String plane, CoreFoundation.CFStringRef key, int options)
IOKit.IORegistryEntrySearchCFProperty(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.platform.mac.CoreFoundation.CFStringRef, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)
to create a
CF representation of a registry entry's property searched from this object.plane
- The name of an existing registry plane. Plane names are defined in
IOKitKeys.h
, for example, kIOServicePlane
.key
- A CFString
specifying the property name.options
- IOKit.kIORegistryIterateRecursively
may be set to recurse
automatically into the registry hierarchy. Without this option,
this method degenerates into the standard
IOKit.IORegistryEntryCreateCFProperty(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.platform.mac.CoreFoundation.CFStringRef, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)
call.
IOKit.kIORegistryIterateParents
may be set to iterate the
parents of the entry, in place of the children.public java.lang.String getStringProperty(java.lang.String key)
String
value from this IO
Registry Entry.key
- The string name of the key to retrievenull
otherwisepublic java.lang.Long getLongProperty(java.lang.String key)
Long
value from this IO
Registry Entry.key
- The string name of the key to retrievenull
otherwise
This method assumes a 64-bit integer is stored and does not do type checking. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.
public java.lang.Integer getIntegerProperty(java.lang.String key)
Integer
value from this IO
Registry Entry.key
- The string name of the key to retrievenull
otherwise
This method assumes a 32-bit integer is stored and does not do type checking. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.
public java.lang.Double getDoubleProperty(java.lang.String key)
Double
value from this IO
Registry Entry.key
- The string name of the key to retrievenull
otherwise
This method assumes a floating point value is stored and does not do type checking. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.
public java.lang.Boolean getBooleanProperty(java.lang.String key)
Boolean
value from this IO
Registry Entry.key
- The string name of the key to retrievenull
otherwisepublic byte[] getByteArrayProperty(java.lang.String key)
byte
array value from this IO Registry
Entry.key
- The string name of the key to retrievenull
otherwise